diff --git a/cloog-0.16.3/CLOOG_HEAD b/cloog-0.16.3/CLOOG_HEAD deleted file mode 100644 index 16be9926d68fea739006367edd0d9d84bda1ce89..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/CLOOG_HEAD +++ /dev/null @@ -1 +0,0 @@ -0.16.2-37-g225c2ed diff --git a/cloog-0.16.3/ChangeLog b/cloog-0.16.3/ChangeLog deleted file mode 100644 index 5db2aeb31aeffb368b33ad3614cf3abd28e2acd7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -version: 0.16.3 -date: Wed Jul 13 18:18:19 CEST 2011 -changes: - - update isl backend to recent changes in isl - - add support for unrolling ---- -version: 0.16.2 -date: Sun Mar 20 15:51:13 CET 2011 -changes: - - update isl backend to recent changes in isl - - improved output in case of stride detection diff --git a/cloog-0.16.3/Makefile.am b/cloog-0.16.3/Makefile.am deleted file mode 100644 index 259c4ba501d6e1633d37ae28ae740933a961ea45..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/Makefile.am +++ /dev/null @@ -1,177 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile.in ** -# **-------------------------------------------------------------------** -# ** First version: october 25th 2001 ** -# **-------------------------------------------------------------------**/ -# -# makefile.in (or makefile if generated) of CLooG, the Chunky LOOp Generator. -# makefile.in is not a makefile, you must run the 'configure' shellscript to -# generate the makefile thanks to this file. - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2001 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ -if BUNDLED_ISL - MAYBE_ISL = isl - ISL_LA = $(top_builddir)/isl/libisl.la -endif - -SUBDIRS = $(MAYBE_ISL) . doc test -DIST_SUBDIRS = $(MAYBE_ISL) . doc test - -ACLOCAL_AMFLAGS = -I m4 - -FORCE: -isl/libisl.la: FORCE - cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la - -if NO_ISL -CLOOG = -LIBCLOOG = -else -CLOOG = cloog -LIBCLOOG = libcloog-isl.la -endif -bin_PROGRAMS = $(CLOOG) -lib_LTLIBRARIES = $(LIBCLOOG) - -if NEED_GET_MEMORY_FUNCTIONS -GET_MEMORY_FUNCTIONS=source/mp_get_memory_functions.c -endif - -SOURCES_CORE = \ - $(GET_MEMORY_FUNCTIONS) \ - source/block.c \ - source/clast.c \ - source/matrix.c \ - source/state.c \ - source/input.c \ - source/int.c \ - source/loop.c \ - source/names.c \ - source/options.c \ - source/pprint.c \ - source/program.c \ - source/statement.c \ - source/stride.c \ - source/union_domain.c \ - source/version.c - -DEFAULT_INCLUDES = -I. -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CFLAGS = $(CFLAGS_WARN) -libcloog_isl_la_CPPFLAGS = @ISL_CPPFLAGS@ -libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \ - -rpath $(libdir) @ISL_LDFLAGS@ -libcloog_isl_la_LIBADD = @ISL_LIBS@ $(ISL_LA) -libcloog_isl_la_SOURCES = \ - $(SOURCES_CORE) \ - source/isl/domain.c \ - source/isl/constraints.c \ - source/isl/backend.c -LDADD = libcloog-isl.la -cloog_DEPENDENCIES = libcloog-isl.la -cloog_SOURCES = source/cloog.c - -pkginclude_HEADERS = \ - include/cloog/block.h \ - include/cloog/clast.h \ - include/cloog/cloog.h \ - include/cloog/input.h \ - include/cloog/int.h \ - include/cloog/matrix.h \ - include/cloog/state.h \ - include/cloog/domain.h \ - include/cloog/loop.h \ - include/cloog/constraints.h \ - include/cloog/names.h \ - include/cloog/options.h \ - include/cloog/pprint.h \ - include/cloog/program.h \ - include/cloog/statement.h \ - include/cloog/stride.h \ - include/cloog/union_domain.h \ - include/cloog/version.h - -pkgmatrixincludedir = $(pkgincludedir)/matrix -pkgmatrixinclude_HEADERS = \ - include/cloog/matrix/constraintset.h - -pkgislincludedir = $(pkgincludedir)/isl -pkgislinclude_HEADERS = \ - include/cloog/isl/backend.h \ - include/cloog/isl/cloog.h \ - include/cloog/isl/domain.h \ - include/cloog/isl/constraintset.h - -version.h: @GIT_INDEX@ - echo '#define CLOOG_HEAD "'`$(top_builddir)/genversion.sh`'"' > $@ - -EXTRA_DIST = \ - autoconf/Doxyfile.in \ - source/matrix/constraintset.c \ - doc/cloog.texi \ - doc/images \ - examples - -install-data-local: - @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)" - $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -uninstall-local: - rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -dist-hook: - rm -f $(distdir)/test/Makefile - $(top_builddir)/genversion.sh > $(distdir)/CLOOG_HEAD - (cd doc; make cloog.pdf) && cp doc/cloog.pdf $(distdir)/doc/ - -#/***************************************************************************** -# * Rules * -# *****************************************************************************/ - -check: - $(MAKE) test -C test - -valcheck: - $(MAKE) valgrind -C test - -total: - @echo " /*-----------------------------------------------*" - @echo " * CLooG *" - @echo " *-----------------------------------------------*/" - $(MAKE) uninstall - $(MAKE) clean - $(MAKE) - $(MAKE) install - -doc: - @echo " /*-----------------------------------------------*" - @echo " * Generating CLooG's documentation *" - @echo " *-----------------------------------------------*/" - doxygen ./autoconf/Doxyfile diff --git a/cloog-0.16.3/Makefile.in b/cloog-0.16.3/Makefile.in deleted file mode 100644 index 8f91ca01de80b8bb71e81755b6f15d681319d045..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/Makefile.in +++ /dev/null @@ -1,1372 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile.in ** -# **-------------------------------------------------------------------** -# ** First version: october 25th 2001 ** -# **-------------------------------------------------------------------**/ -# -# makefile.in (or makefile if generated) of CLooG, the Chunky LOOp Generator. -# makefile.in is not a makefile, you must run the 'configure' shellscript to -# generate the makefile thanks to this file. - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = $(am__EXEEXT_1) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \ - $(pkgislinclude_HEADERS) $(pkgmatrixinclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/genversion.sh.in $(top_srcdir)/autoconf/Doxyfile.in \ - $(top_srcdir)/configure \ - $(top_srcdir)/include/cloog/version.h.in \ - $(top_srcdir)/source/version.c.in ChangeLog \ - autoconf/config.guess autoconf/config.sub autoconf/depcomp \ - autoconf/install-sh autoconf/ltmain.sh autoconf/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = autoconf/Doxyfile source/version.c \ - include/cloog/version.h genversion.sh -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgislincludedir)" \ - "$(DESTDIR)$(pkgmatrixincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libcloog_isl_la_DEPENDENCIES = $(ISL_LA) -am__libcloog_isl_la_SOURCES_DIST = source/mp_get_memory_functions.c \ - source/block.c source/clast.c source/matrix.c source/state.c \ - source/input.c source/int.c source/loop.c source/names.c \ - source/options.c source/pprint.c source/program.c \ - source/statement.c source/stride.c source/union_domain.c \ - source/version.c source/isl/domain.c source/isl/constraints.c \ - source/isl/backend.c -@NEED_GET_MEMORY_FUNCTIONS_TRUE@am__objects_1 = libcloog_isl_la-mp_get_memory_functions.lo -am__objects_2 = $(am__objects_1) libcloog_isl_la-block.lo \ - libcloog_isl_la-clast.lo libcloog_isl_la-matrix.lo \ - libcloog_isl_la-state.lo libcloog_isl_la-input.lo \ - libcloog_isl_la-int.lo libcloog_isl_la-loop.lo \ - libcloog_isl_la-names.lo libcloog_isl_la-options.lo \ - libcloog_isl_la-pprint.lo libcloog_isl_la-program.lo \ - libcloog_isl_la-statement.lo libcloog_isl_la-stride.lo \ - libcloog_isl_la-union_domain.lo libcloog_isl_la-version.lo -am_libcloog_isl_la_OBJECTS = $(am__objects_2) \ - libcloog_isl_la-domain.lo libcloog_isl_la-constraints.lo \ - libcloog_isl_la-backend.lo -libcloog_isl_la_OBJECTS = $(am_libcloog_isl_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libcloog_isl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libcloog_isl_la_LDFLAGS) $(LDFLAGS) \ - -o $@ -@NO_ISL_FALSE@am_libcloog_isl_la_rpath = -rpath $(libdir) -@NO_ISL_FALSE@am__EXEEXT_1 = cloog$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -am_cloog_OBJECTS = cloog.$(OBJEXT) -cloog_OBJECTS = $(am_cloog_OBJECTS) -cloog_LDADD = $(LDADD) -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libcloog_isl_la_SOURCES) $(cloog_SOURCES) -DIST_SOURCES = $(am__libcloog_isl_la_SOURCES_DIST) $(cloog_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -HEADERS = $(pkginclude_HEADERS) $(pkgislinclude_HEADERS) \ - $(pkgmatrixinclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITS = @BITS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CFLAGS_WARN = @CFLAGS_WARN@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_INDEX = @GIT_INDEX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -ISL_CPPFLAGS = @ISL_CPPFLAGS@ -ISL_LDFLAGS = @ISL_LDFLAGS@ -ISL_LIBS = @ISL_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TEXI2DVI = @TEXI2DVI@ -VERSION = @VERSION@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_REVISION = @VERSION_REVISION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2001 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ -@BUNDLED_ISL_TRUE@MAYBE_ISL = isl -@BUNDLED_ISL_TRUE@ISL_LA = $(top_builddir)/isl/libisl.la -SUBDIRS = $(MAYBE_ISL) . doc test -DIST_SUBDIRS = $(MAYBE_ISL) . doc test -ACLOCAL_AMFLAGS = -I m4 -@NO_ISL_FALSE@CLOOG = cloog -@NO_ISL_TRUE@CLOOG = -@NO_ISL_FALSE@LIBCLOOG = libcloog-isl.la -@NO_ISL_TRUE@LIBCLOOG = -lib_LTLIBRARIES = $(LIBCLOOG) -@NEED_GET_MEMORY_FUNCTIONS_TRUE@GET_MEMORY_FUNCTIONS = source/mp_get_memory_functions.c -SOURCES_CORE = \ - $(GET_MEMORY_FUNCTIONS) \ - source/block.c \ - source/clast.c \ - source/matrix.c \ - source/state.c \ - source/input.c \ - source/int.c \ - source/loop.c \ - source/names.c \ - source/options.c \ - source/pprint.c \ - source/program.c \ - source/statement.c \ - source/stride.c \ - source/union_domain.c \ - source/version.c - -DEFAULT_INCLUDES = -I. -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CFLAGS = $(CFLAGS_WARN) -libcloog_isl_la_CPPFLAGS = @ISL_CPPFLAGS@ -libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \ - -rpath $(libdir) @ISL_LDFLAGS@ - -libcloog_isl_la_LIBADD = @ISL_LIBS@ $(ISL_LA) -libcloog_isl_la_SOURCES = \ - $(SOURCES_CORE) \ - source/isl/domain.c \ - source/isl/constraints.c \ - source/isl/backend.c - -LDADD = libcloog-isl.la -cloog_DEPENDENCIES = libcloog-isl.la -cloog_SOURCES = source/cloog.c -pkginclude_HEADERS = \ - include/cloog/block.h \ - include/cloog/clast.h \ - include/cloog/cloog.h \ - include/cloog/input.h \ - include/cloog/int.h \ - include/cloog/matrix.h \ - include/cloog/state.h \ - include/cloog/domain.h \ - include/cloog/loop.h \ - include/cloog/constraints.h \ - include/cloog/names.h \ - include/cloog/options.h \ - include/cloog/pprint.h \ - include/cloog/program.h \ - include/cloog/statement.h \ - include/cloog/stride.h \ - include/cloog/union_domain.h \ - include/cloog/version.h - -pkgmatrixincludedir = $(pkgincludedir)/matrix -pkgmatrixinclude_HEADERS = \ - include/cloog/matrix/constraintset.h - -pkgislincludedir = $(pkgincludedir)/isl -pkgislinclude_HEADERS = \ - include/cloog/isl/backend.h \ - include/cloog/isl/cloog.h \ - include/cloog/isl/domain.h \ - include/cloog/isl/constraintset.h - -EXTRA_DIST = \ - autoconf/Doxyfile.in \ - source/matrix/constraintset.c \ - doc/cloog.texi \ - doc/images \ - examples - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): -autoconf/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/autoconf/Doxyfile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -source/version.c: $(top_builddir)/config.status $(top_srcdir)/source/version.c.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -include/cloog/version.h: $(top_builddir)/config.status $(top_srcdir)/include/cloog/version.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -genversion.sh: $(top_builddir)/config.status $(srcdir)/genversion.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libcloog-isl.la: $(libcloog_isl_la_OBJECTS) $(libcloog_isl_la_DEPENDENCIES) - $(AM_V_CCLD)$(libcloog_isl_la_LINK) $(am_libcloog_isl_la_rpath) $(libcloog_isl_la_OBJECTS) $(libcloog_isl_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -cloog$(EXEEXT): $(cloog_OBJECTS) $(cloog_DEPENDENCIES) - @rm -f cloog$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cloog_OBJECTS) $(cloog_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-backend.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-block.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-clast.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-constraints.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-domain.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-input.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-int.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-loop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-matrix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-names.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-options.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-pprint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-program.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-state.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-statement.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-stride.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-union_domain.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-version.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libcloog_isl_la-mp_get_memory_functions.lo: source/mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-mp_get_memory_functions.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Tpo -c -o libcloog_isl_la-mp_get_memory_functions.lo `test -f 'source/mp_get_memory_functions.c' || echo '$(srcdir)/'`source/mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Tpo $(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/mp_get_memory_functions.c' object='libcloog_isl_la-mp_get_memory_functions.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-mp_get_memory_functions.lo `test -f 'source/mp_get_memory_functions.c' || echo '$(srcdir)/'`source/mp_get_memory_functions.c - -libcloog_isl_la-block.lo: source/block.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-block.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-block.Tpo -c -o libcloog_isl_la-block.lo `test -f 'source/block.c' || echo '$(srcdir)/'`source/block.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-block.Tpo $(DEPDIR)/libcloog_isl_la-block.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/block.c' object='libcloog_isl_la-block.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-block.lo `test -f 'source/block.c' || echo '$(srcdir)/'`source/block.c - -libcloog_isl_la-clast.lo: source/clast.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-clast.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-clast.Tpo -c -o libcloog_isl_la-clast.lo `test -f 'source/clast.c' || echo '$(srcdir)/'`source/clast.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-clast.Tpo $(DEPDIR)/libcloog_isl_la-clast.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/clast.c' object='libcloog_isl_la-clast.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-clast.lo `test -f 'source/clast.c' || echo '$(srcdir)/'`source/clast.c - -libcloog_isl_la-matrix.lo: source/matrix.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-matrix.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-matrix.Tpo -c -o libcloog_isl_la-matrix.lo `test -f 'source/matrix.c' || echo '$(srcdir)/'`source/matrix.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-matrix.Tpo $(DEPDIR)/libcloog_isl_la-matrix.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/matrix.c' object='libcloog_isl_la-matrix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-matrix.lo `test -f 'source/matrix.c' || echo '$(srcdir)/'`source/matrix.c - -libcloog_isl_la-state.lo: source/state.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-state.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-state.Tpo -c -o libcloog_isl_la-state.lo `test -f 'source/state.c' || echo '$(srcdir)/'`source/state.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-state.Tpo $(DEPDIR)/libcloog_isl_la-state.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/state.c' object='libcloog_isl_la-state.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-state.lo `test -f 'source/state.c' || echo '$(srcdir)/'`source/state.c - -libcloog_isl_la-input.lo: source/input.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-input.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-input.Tpo -c -o libcloog_isl_la-input.lo `test -f 'source/input.c' || echo '$(srcdir)/'`source/input.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-input.Tpo $(DEPDIR)/libcloog_isl_la-input.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/input.c' object='libcloog_isl_la-input.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-input.lo `test -f 'source/input.c' || echo '$(srcdir)/'`source/input.c - -libcloog_isl_la-int.lo: source/int.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-int.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-int.Tpo -c -o libcloog_isl_la-int.lo `test -f 'source/int.c' || echo '$(srcdir)/'`source/int.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-int.Tpo $(DEPDIR)/libcloog_isl_la-int.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/int.c' object='libcloog_isl_la-int.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-int.lo `test -f 'source/int.c' || echo '$(srcdir)/'`source/int.c - -libcloog_isl_la-loop.lo: source/loop.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-loop.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-loop.Tpo -c -o libcloog_isl_la-loop.lo `test -f 'source/loop.c' || echo '$(srcdir)/'`source/loop.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-loop.Tpo $(DEPDIR)/libcloog_isl_la-loop.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/loop.c' object='libcloog_isl_la-loop.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-loop.lo `test -f 'source/loop.c' || echo '$(srcdir)/'`source/loop.c - -libcloog_isl_la-names.lo: source/names.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-names.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-names.Tpo -c -o libcloog_isl_la-names.lo `test -f 'source/names.c' || echo '$(srcdir)/'`source/names.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-names.Tpo $(DEPDIR)/libcloog_isl_la-names.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/names.c' object='libcloog_isl_la-names.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-names.lo `test -f 'source/names.c' || echo '$(srcdir)/'`source/names.c - -libcloog_isl_la-options.lo: source/options.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-options.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-options.Tpo -c -o libcloog_isl_la-options.lo `test -f 'source/options.c' || echo '$(srcdir)/'`source/options.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-options.Tpo $(DEPDIR)/libcloog_isl_la-options.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/options.c' object='libcloog_isl_la-options.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-options.lo `test -f 'source/options.c' || echo '$(srcdir)/'`source/options.c - -libcloog_isl_la-pprint.lo: source/pprint.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-pprint.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-pprint.Tpo -c -o libcloog_isl_la-pprint.lo `test -f 'source/pprint.c' || echo '$(srcdir)/'`source/pprint.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-pprint.Tpo $(DEPDIR)/libcloog_isl_la-pprint.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/pprint.c' object='libcloog_isl_la-pprint.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-pprint.lo `test -f 'source/pprint.c' || echo '$(srcdir)/'`source/pprint.c - -libcloog_isl_la-program.lo: source/program.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-program.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-program.Tpo -c -o libcloog_isl_la-program.lo `test -f 'source/program.c' || echo '$(srcdir)/'`source/program.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-program.Tpo $(DEPDIR)/libcloog_isl_la-program.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/program.c' object='libcloog_isl_la-program.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-program.lo `test -f 'source/program.c' || echo '$(srcdir)/'`source/program.c - -libcloog_isl_la-statement.lo: source/statement.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-statement.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-statement.Tpo -c -o libcloog_isl_la-statement.lo `test -f 'source/statement.c' || echo '$(srcdir)/'`source/statement.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-statement.Tpo $(DEPDIR)/libcloog_isl_la-statement.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/statement.c' object='libcloog_isl_la-statement.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-statement.lo `test -f 'source/statement.c' || echo '$(srcdir)/'`source/statement.c - -libcloog_isl_la-stride.lo: source/stride.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-stride.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-stride.Tpo -c -o libcloog_isl_la-stride.lo `test -f 'source/stride.c' || echo '$(srcdir)/'`source/stride.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-stride.Tpo $(DEPDIR)/libcloog_isl_la-stride.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/stride.c' object='libcloog_isl_la-stride.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-stride.lo `test -f 'source/stride.c' || echo '$(srcdir)/'`source/stride.c - -libcloog_isl_la-union_domain.lo: source/union_domain.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-union_domain.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-union_domain.Tpo -c -o libcloog_isl_la-union_domain.lo `test -f 'source/union_domain.c' || echo '$(srcdir)/'`source/union_domain.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-union_domain.Tpo $(DEPDIR)/libcloog_isl_la-union_domain.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/union_domain.c' object='libcloog_isl_la-union_domain.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-union_domain.lo `test -f 'source/union_domain.c' || echo '$(srcdir)/'`source/union_domain.c - -libcloog_isl_la-version.lo: source/version.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-version.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-version.Tpo -c -o libcloog_isl_la-version.lo `test -f 'source/version.c' || echo '$(srcdir)/'`source/version.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-version.Tpo $(DEPDIR)/libcloog_isl_la-version.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/version.c' object='libcloog_isl_la-version.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-version.lo `test -f 'source/version.c' || echo '$(srcdir)/'`source/version.c - -libcloog_isl_la-domain.lo: source/isl/domain.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-domain.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-domain.Tpo -c -o libcloog_isl_la-domain.lo `test -f 'source/isl/domain.c' || echo '$(srcdir)/'`source/isl/domain.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-domain.Tpo $(DEPDIR)/libcloog_isl_la-domain.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/isl/domain.c' object='libcloog_isl_la-domain.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-domain.lo `test -f 'source/isl/domain.c' || echo '$(srcdir)/'`source/isl/domain.c - -libcloog_isl_la-constraints.lo: source/isl/constraints.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-constraints.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-constraints.Tpo -c -o libcloog_isl_la-constraints.lo `test -f 'source/isl/constraints.c' || echo '$(srcdir)/'`source/isl/constraints.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-constraints.Tpo $(DEPDIR)/libcloog_isl_la-constraints.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/isl/constraints.c' object='libcloog_isl_la-constraints.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-constraints.lo `test -f 'source/isl/constraints.c' || echo '$(srcdir)/'`source/isl/constraints.c - -libcloog_isl_la-backend.lo: source/isl/backend.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-backend.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-backend.Tpo -c -o libcloog_isl_la-backend.lo `test -f 'source/isl/backend.c' || echo '$(srcdir)/'`source/isl/backend.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-backend.Tpo $(DEPDIR)/libcloog_isl_la-backend.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/isl/backend.c' object='libcloog_isl_la-backend.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-backend.lo `test -f 'source/isl/backend.c' || echo '$(srcdir)/'`source/isl/backend.c - -cloog.o: source/cloog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cloog.o -MD -MP -MF $(DEPDIR)/cloog.Tpo -c -o cloog.o `test -f 'source/cloog.c' || echo '$(srcdir)/'`source/cloog.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cloog.Tpo $(DEPDIR)/cloog.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/cloog.c' object='cloog.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cloog.o `test -f 'source/cloog.c' || echo '$(srcdir)/'`source/cloog.c - -cloog.obj: source/cloog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cloog.obj -MD -MP -MF $(DEPDIR)/cloog.Tpo -c -o cloog.obj `if test -f 'source/cloog.c'; then $(CYGPATH_W) 'source/cloog.c'; else $(CYGPATH_W) '$(srcdir)/source/cloog.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cloog.Tpo $(DEPDIR)/cloog.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/cloog.c' object='cloog.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cloog.obj `if test -f 'source/cloog.c'; then $(CYGPATH_W) 'source/cloog.c'; else $(CYGPATH_W) '$(srcdir)/source/cloog.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files -install-pkgislincludeHEADERS: $(pkgislinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgislincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgislincludedir)" - @list='$(pkgislinclude_HEADERS)'; test -n "$(pkgislincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgislincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgislincludedir)" || exit $$?; \ - done - -uninstall-pkgislincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkgislinclude_HEADERS)'; test -n "$(pkgislincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgislincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgislincludedir)" && rm -f $$files -install-pkgmatrixincludeHEADERS: $(pkgmatrixinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgmatrixincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgmatrixincludedir)" - @list='$(pkgmatrixinclude_HEADERS)'; test -n "$(pkgmatrixincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgmatrixincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgmatrixincludedir)" || exit $$?; \ - done - -uninstall-pkgmatrixincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkgmatrixinclude_HEADERS)'; test -n "$(pkgmatrixincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgmatrixincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgmatrixincludedir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgislincludedir)" "$(DESTDIR)$(pkgmatrixincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-data-local install-pkgincludeHEADERS \ - install-pkgislincludeHEADERS install-pkgmatrixincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ - uninstall-local uninstall-pkgincludeHEADERS \ - uninstall-pkgislincludeHEADERS \ - uninstall-pkgmatrixincludeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am \ - install-pkgincludeHEADERS install-pkgislincludeHEADERS \ - install-pkgmatrixincludeHEADERS install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-libLTLIBRARIES uninstall-local \ - uninstall-pkgincludeHEADERS uninstall-pkgislincludeHEADERS \ - uninstall-pkgmatrixincludeHEADERS - - -FORCE: -isl/libisl.la: FORCE - cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la - -version.h: @GIT_INDEX@ - echo '#define CLOOG_HEAD "'`$(top_builddir)/genversion.sh`'"' > $@ - -install-data-local: - @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)" - $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -uninstall-local: - rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -dist-hook: - rm -f $(distdir)/test/Makefile - $(top_builddir)/genversion.sh > $(distdir)/CLOOG_HEAD - (cd doc; make cloog.pdf) && cp doc/cloog.pdf $(distdir)/doc/ - -#/***************************************************************************** -# * Rules * -# *****************************************************************************/ - -check: - $(MAKE) test -C test - -valcheck: - $(MAKE) valgrind -C test - -total: - @echo " /*-----------------------------------------------*" - @echo " * CLooG *" - @echo " *-----------------------------------------------*/" - $(MAKE) uninstall - $(MAKE) clean - $(MAKE) - $(MAKE) install - -doc: - @echo " /*-----------------------------------------------*" - @echo " * Generating CLooG's documentation *" - @echo " *-----------------------------------------------*/" - doxygen ./autoconf/Doxyfile - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.16.3/README b/cloog-0.16.3/README deleted file mode 100644 index 7003a2b3e9a01c9d42378d8074f3c96ce73a3162..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/README +++ /dev/null @@ -1,203 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** The Chunky Loop Generator ** -# **-------------------------------------------------------------------** -# ** First version of this file: january 22th 2002 ** -# **-------------------------------------------------------------------**/ -# - -For complete informations about this software, how to build and use it, -please see the postscript file in the ./doc subdirectory (a pdf version -is available in the web site). - -Overview : -I. Description -II. Building CLooG -III. Options -IV. Running CLooG -V. General Questions - -# **-------------------------------------------------------------------** -# ** I. Description ** -# **-------------------------------------------------------------------**/ - -CLooG is a software which generates loops for scanning Z-polyhedra. That is, -CLooG finds the code or pseudo-code where each integral point of one or more -parametrized polyhedron or parametrized polyhedra union is reached. CLooG is -designed to avoid control overhead and to produce a very efficient code. - -Its input is some data on the polyhedra to scan, basically the system of -affine inequalities that define them, and a context that defines some -properties known on the parameters if any. The output is the pseudo scanning -code. Many facilities are provided to generate a near-to-be-compileable code, -and every useful functions to generate the code may be called from the CLooG -library. - - INPUT | OUTPUT -(fortunately not exactly the input, | (the real one, with default options) - check test/readme.cloog for the | - real input for that problem !) | - | - j^ i>=2 | - | | j<=n+2-i | - | |\ | i<=n | - | | \ | | - m-+-****---+-j<=m | for (i=2;i<=n;i++) { - | ***** | | for (j=2;j<=min(m,-i+n+2);j++) { - | ****** | ==> S1 ; - | *******| | } - 2-+-********-j>=2 | } - | | |\ | - 0-+-+------+--->i | - | | | | - 0 2 n | - | - Context : n>=2 | - m>=2 | - System : 2<=i<=n | - 2<=j<=m | - j<=n+2-i | - -# **-------------------------------------------------------------------** -# ** II. Building CLooG ** -# **-------------------------------------------------------------------**/ - -If you obtained CLooG from the git repository, then you first -need to obtain the submodules and create a configure script. - - ./get_submodules.sh - ./autogen.sh - -The first step is only needed if you plan on using the isl backend. - -The configure shell script attempts to guess correct values for various -system-dependent variables used during compilation. It uses those values to -create a Makefile. The file configure.ac is used to create configure by a -program called autoconf. You only need configure.ac if you want to change -it or regenerate configure using a newer version of autoconf. - -The simplest way to compile this package is: -cd to the directory containing the package's source code and type - - ./configure - -to configure the package for your system (while running, configure prints -some messages telling which features it is checking for). To compile the -package, type - - make - - -to install the program and/or the library, type - - make install - -you can remove the program binaries and object files from the source code -directory by typing - - make clean - -To also remove the files that configure created (so you can compile the -package for a different kind of computer) type - - make distclean - -# **-------------------------------------------------------------------** -# ** III. Options ** -# **-------------------------------------------------------------------**/ - -By default, make will install the package's files in /usr/local/bin, -/usr/local/lib, etc. You can specify an installation prefix other than -/usr/local by giving onfigure the option --prefix=PATH. - -By default, configure will use the isl that comes bundled with CLooG. -Using the --with-isl option of configure the user can specify that "no" isl, -a previously installed ("system") isl or a "build" isl should be used. -In the latter case, the user should also specify the build location -using --with-isl-builddir=PATH. In case of an installed isl, -the installation location can be specified using the ---with-isl-prefix=PATH and --with-isl-exec-prefix=PATH options of configure. - -By default, configure will seek the PolyLib in standard locations. -If necessary, you can specify the PolyLib's path by giving configure the -option --with-polylib-prefix=PATH and/or --with-polylib-exec-prefix=PATH. - -By default, configure will seek the GMP library in standard locations. -If necessary, you can specify the GMP's path by giving configure the -option --with-gmp-prefix=PATH and/or --with-gmp-exec-prefix=PATH. - -By default, when using the PolyLib backend, -CLooG and its library are built using 64 bits integer -representation. You can choose to specify explicitly others integer -representations by using: ---with-bits=32 for 32 bits integers, ---with-bits=64 for 64 bits integers (default), ---with-bits=gmp for multiple precision integers. - -# **-------------------------------------------------------------------** -# ** IV. Running CLooG ** -# **-------------------------------------------------------------------**/ - -To run CLooG, simply type 'cloog', optionally followed by the name of an -input file. You can type 'cloog -h' or 'cloog --help' for some help. -For more informations, please check the ./doc subdirectory. - -# **-------------------------------------------------------------------** -# ** V. General Questions ** -# **-------------------------------------------------------------------**/ - -1. What does CLooG means ? - -CLooG is the Chunky LOOp Generator, Chunky is an automatic loop optimizer for -data locality. CLooG is a completely independent part of the Chunky project. -Pronounce 'CLooG' as 'klug', which means 'sly' in german :-). - -2. CLooG do not compile, what should I do ? - -CLooG should compile everywhere (assuming that PolyLib is still there), thus -there is a problem or the documentation is not clear, in both case it is -necessary to ask the author(s) ! - -3. I need a feature that CLooG do not implement, what should I do ? - -There are two ways. First, CLooG is a LGPL software and library. So you -are welcome to improve it yourself ;-) ! Many project have been successful, it -is -maybe- a sign that this is not too hard to put your hands inside the -source. Second, just ask the author(s) :-) ! Maybe a lot of people would be -interessed by such feature, maybe many people asked for it before, maybe it's -trivial to implement (and even)... Please just never hesitate to ask the -author(s) ! - -4. I implemented a cool feature, can I submit it ? - -Obviously you are welcome to send the author(s) any improvement. But obviously -we are quite careful with readability, correctness and stability, and the -author(s) will read, check and check again any contribution before including it. -Thus, it can take time... There are few basic rules to write contributions: -- (1) Do never change the indentation of any part of the code that is not yours. -- (2) Do never send codes that use more than 80 columns. -- (3) Do never send codes without a lot of comments in (bad or good) english. -- (4) Do never send codes with obscure and/or non-english variable names. -- (5) Use C89, just C, only C (note: "//" comments are not C89, - variable declaration elsewhere than at the beginning of a block, is not C89). -- (6) Read doc/SubmittingPatches -Please understand that in order to live for a long time, and to be used in many -projects the very first priority for CLooG is to be readable and documented. - -5. Is CLooG bug free ? - -No, who can ? ClooG is a complex program, and we do not pretend it to be bug -free. Nevertheless because it has been tested and tested, we are fairly sure -that CLooG results with default options have good chances to be satisfactory. -If you find a result that looks strange, inadequate or incorrect, please send: -- (1) The input file to the author(s). -- (2) The output. -- (3) The first line given by typing 'cloog -v'. -- (4) All your command line options to achieve the result. -We will try to explain the result or to fix the problem as soon as possible. - -6. How can I contact the author(s) ? - -Just send a mail to cloog-development@googlegroups.com diff --git a/cloog-0.16.3/aclocal.m4 b/cloog-0.16.3/aclocal.m4 deleted file mode 100644 index 29d74834589fc60bad36d86265f1e97c00fee7d4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/aclocal.m4 +++ /dev/null @@ -1,991 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/ax_cc_maxopt.m4]) -m4_include([m4/ax_cflags_warn_all.m4]) -m4_include([m4/ax_check_compiler_flags.m4]) -m4_include([m4/ax_compiler_vendor.m4]) -m4_include([m4/ax_create_pkgconfig_info.m4]) -m4_include([m4/ax_gcc_archflag.m4]) -m4_include([m4/ax_gcc_x86_cpuid.m4]) -m4_include([m4/ax_submodule.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) diff --git a/cloog-0.16.3/autoconf/Doxyfile.in b/cloog-0.16.3/autoconf/Doxyfile.in deleted file mode 100644 index fa02ac7c7e1b3cf985505b447c8603ab3253fa62..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/Doxyfile.in +++ /dev/null @@ -1,1101 +0,0 @@ -# Doxyfile 1.3.5 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = CLooG - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @RELEASE@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/source - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = YES - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = -#WARN_LOGFILE = doc/doxygen.log - - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = source \ - include/cloog - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = YES - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = /usr/bin/ - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -# DOTFILE_DIRS = src - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/cloog-0.16.3/autoconf/config.guess b/cloog-0.16.3/autoconf/config.guess deleted file mode 100755 index 115f944a61d60c17d147ae08ad02e2bbac7420da..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/config.guess +++ /dev/null @@ -1,1502 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-04-03' - -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' HUP INT TERM - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.16.3/autoconf/config.sub b/cloog-0.16.3/autoconf/config.sub deleted file mode 100755 index 204218c07382772bc2e9ad083f9dd766af90fb36..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/config.sub +++ /dev/null @@ -1,1731 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-05-21' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.16.3/autoconf/depcomp b/cloog-0.16.3/autoconf/depcomp deleted file mode 100755 index e5f9736c7239301c765e2d7abefb9bb9b9237ac5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/depcomp +++ /dev/null @@ -1,589 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2007-03-29.01 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. - -# 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, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/cloog-0.16.3/autoconf/install-sh b/cloog-0.16.3/autoconf/install-sh deleted file mode 100755 index 3f83ce9b555a535ca90c450882953554c7e4ded5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/install-sh +++ /dev/null @@ -1,524 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2010-02-06.18; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.16.3/autoconf/ltmain.sh b/cloog-0.16.3/autoconf/ltmain.sh deleted file mode 100755 index be43f41885153b038acab15db6d55029061980ef..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/ltmain.sh +++ /dev/null @@ -1,8750 +0,0 @@ -# Generated from ltmain.m4sh. - -# libtool (GNU libtool) 2.2.8 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.8 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.2.8 -TIMESTAMP="" -package_revision=1.3169 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL - -$lt_unset CDPATH - - - - - - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} - -# Generated shell functions inserted here. - -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' - -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# // - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1." - exit_cmd=exit -} - -exit_cmd=: - - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -# $mode is unset -nonopt= -execute_dlfiles= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - opt_verbose=false - ;; - - --no-quiet|--no-silent) - preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - opt_verbose=: - ;; - - --no-verbose) preserve_args="$preserve_args $opt" - opt_verbose=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --help-all) opt_help=': help-all' ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - for mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - install_shared_prog="$install_shared_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - echo >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - echo >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_result=`cygpath -w "$1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result= - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_pathlist_tmp1=$func_stripname_result - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - func_to_host_pathlist_result=` - ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_append func_to_host_pathlist_result ";$func_to_host_path_result" - fi - fi - fi - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result"; then - func_error "Could not determine the host path(s) corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_append func_to_host_pathlist_result ";" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - echo ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/cloog-0.16.3/autoconf/missing b/cloog-0.16.3/autoconf/missing deleted file mode 100755 index 1c8ff7049d8f3aaa9741c53e7f3145d9b76a77d8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/autoconf/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/cloog-0.16.3/configure b/cloog-0.16.3/configure deleted file mode 100755 index 82332792d873419ffa6a031b91396cadaf1c657d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/configure +++ /dev/null @@ -1,15022 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for cloog 0.16.3. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: cloog-development@googlegroups.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cloog' -PACKAGE_TARNAME='cloog' -PACKAGE_VERSION='0.16.3' -PACKAGE_STRING='cloog 0.16.3' -PACKAGE_BUGREPORT='cloog-development@googlegroups.com' -PACKAGE_URL='' - -ac_unique_file="source/cloog.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -enable_option_checking=no -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -subdirs -pkgconfig_libfile -pkgconfig_libdir -VERSION_REVISION -VERSION_MINOR -VERSION_MAJOR -BITS -INSTALL -GIT_INDEX -NO_ISL_FALSE -NO_ISL_TRUE -BUNDLED_ISL_FALSE -BUNDLED_ISL_TRUE -ISL_LIBS -ISL_LDFLAGS -ISL_CPPFLAGS -NEED_GET_MEMORY_FUNCTIONS_FALSE -NEED_GET_MEMORY_FUNCTIONS_TRUE -CFLAGS_WARN -PRTDIAG -HAVE_TEXI2DVI_FALSE -HAVE_TEXI2DVI_TRUE -TEXI2DVI -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -RANLIB -AR -OBJDUMP -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -CD -LN_S -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -versioninfo -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -enable_portable_binary -with_gcc_arch -with_isl -with_isl_prefix -with_isl_exec_prefix -with_isl_builddir -with_gmp -with_gmp_prefix -with_gmp_exec_prefix -with_gmp_builddir -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' -ac_subdirs_all='isl' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cloog 0.16.3 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/cloog] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cloog 0.16.3:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-portable-binary - disable compiler optimizations that would produce - unportable binaries - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-gcc-arch= use architecture for gcc -march/-mtune, - instead of guessing - --with-isl=no|system|build|bundled - Which isl to use - --with-isl-prefix=DIR Prefix of isl installation - --with-isl-exec-prefix=DIR - Exec prefix of isl installation - --with-isl-builddir=DIR Location of isl builddir - --with-gmp=system Which gmp to use - --with-gmp-prefix=DIR Prefix of gmp installation - --with-gmp-exec-prefix=DIR - Exec prefix of gmp installation - --with-gmp-builddir=DIR Location of gmp builddir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cloog configure 0.16.3 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ------------------------------------------------- ## -## Report this to cloog-development@googlegroups.com ## -## ------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by cloog $as_me 0.16.3, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -for ac_dir in autoconf "$srcdir"/autoconf; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - - -VERSION_MAJOR=0 -VERSION_MINOR=16 -VERSION_REVISION=3 - -versioninfo=2:0:0 - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='cloog' - VERSION='0.16.3' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -# Extract the first word of "cd", so it can be a program name with args. -set dummy cd; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CD"; then - ac_cv_prog_CD="$CD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CD="" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CD=$ac_cv_prog_CD -if test -n "$CD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CD" >&5 -$as_echo "$CD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.8' -macro_revision='1.3169' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -# Extract the first word of "texi2dvi", so it can be a program name with args. -set dummy texi2dvi; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_TEXI2DVI+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$TEXI2DVI"; then - ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_TEXI2DVI="texi2dvi" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -TEXI2DVI=$ac_cv_prog_TEXI2DVI -if test -n "$TEXI2DVI"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2DVI" >&5 -$as_echo "$TEXI2DVI" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test -n "$TEXI2DVI"; then - HAVE_TEXI2DVI_TRUE= - HAVE_TEXI2DVI_FALSE='#' -else - HAVE_TEXI2DVI_TRUE='#' - HAVE_TEXI2DVI_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 -$as_echo_n "checking for C compiler vendor... " >&6; } -if test "${ax_cv_c_compiler_vendor+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_c_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'`")" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !($vencpp) - thisisanerror; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 -$as_echo "$ax_cv_c_compiler_vendor" >&6; } - - - - - - -# Check whether --enable-portable-binary was given. -if test "${enable_portable_binary+set}" = set; then : - enableval=$enable_portable_binary; acx_maxopt_portable=$withval -else - acx_maxopt_portable=no -fi - - -# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $xlc_opt" >&5 -$as_echo_n "checking whether C compiler accepts $xlc_opt... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$xlc_opt" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="-O3 -qansialias -w $xlc_opt" -else - 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 "******************************************************" -fi - - ;; - - 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: - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - icc_archflag=$flag; break -else - : -fi - - done - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc architecture flag" >&5 -$as_echo_n "checking for icc architecture flag... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $icc_archflag" >&5 -$as_echo "$icc_archflag" >&6; } - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5 -$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; } -if test "${ax_cv_c_flags__malign_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-malign-double" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__malign_double=yes -else - ax_cv_c_flags__malign_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -malign-double" -else - : -fi - - - # -fstrict-aliasing for gcc-2.95+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5 -$as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; } -if test "${ax_cv_c_flags__fstrict_aliasing+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-fstrict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__fstrict_aliasing=yes -else - ax_cv_c_flags__fstrict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__fstrict_aliasing -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -fstrict-aliasing" -else - : -fi - - - # note that we enable "unsafe" fp optimization with other compilers, too - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5 -$as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; } -if test "${ax_cv_c_flags__ffast_math+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-ffast-math" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__ffast_math=yes -else - ax_cv_c_flags__ffast_math=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__ffast_math -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -ffast-math" -else - : -fi - - - - - - -# Check whether --with-gcc-arch was given. -if test "${with_gcc_arch+set}" = set; then : - withval=$with_gcc_arch; ax_gcc_arch=$withval -else - ax_gcc_arch=yes -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -if test "${ax_cv_gcc_archflag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -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 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) - 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]?:*:*:*) - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x80000006 output" >&5 -$as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0x80000006=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0x80000006, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # 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*) - # Extract the first word of "prtdiag", so it can be a program name with args. -set dummy prtdiag; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PRTDIAG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PRTDIAG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag" - ;; -esac -fi -PRTDIAG=$ac_cv_path_PRTDIAG -if test -n "$PRTDIAG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRTDIAG" >&5 -$as_echo "$PRTDIAG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - 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$acx_maxopt_portable" = 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - ax_cv_gcc_archflag=$flag; break -else - : -fi - - done - test "x$ax_cv_gcc_archflag" = xunknown || break -done -fi - -fi # $GCC=yes - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_archflag" >&5 -$as_echo "$ax_cv_gcc_archflag" >&6; } -if test "x$ax_cv_gcc_archflag" = xunknown; then - : -else - CFLAGS="$CFLAGS $ax_cv_gcc_archflag" -fi - - ;; - 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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS" >&5 -$as_echo_n "checking whether C compiler accepts $CFLAGS... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - : -else - - 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 - - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS_WARN for maximum warnings" >&5 -$as_echo_n "checking CFLAGS_WARN for maximum warnings... " >&6; } -if test "${ac_cv_cflags_warn_all+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_cflags_warn_all="no, unknown" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_save_CFLAGS="$CFLAGS" -for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" # -do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done - CFLAGS="$ac_save_CFLAGS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5 -$as_echo "$ac_cv_cflags_warn_all" >&6; } -case ".$ac_cv_cflags_warn_all" in - .ok|.ok,*) ;; - .|.no|.no,*) - ;; - *) - if echo " $CFLAGS_WARN " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null - then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS_WARN does contain \$ac_cv_cflags_warn_all"; } >&5 - (: CFLAGS_WARN does contain $ac_cv_cflags_warn_all) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS_WARN=\"\$CFLAGS_WARN \$ac_cv_cflags_warn_all\""; } >&5 - (: CFLAGS_WARN="$CFLAGS_WARN $ac_cv_cflags_warn_all") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS_WARN="$CFLAGS_WARN $ac_cv_cflags_warn_all" - fi - ;; -esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - - -for ac_func in strtol -do : - ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOL 1 -_ACEOF - -fi -done - - - - -for ac_header in sys/resource.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_resource_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_RESOURCE_H 1 -_ACEOF - -$as_echo "#define CLOOG_RUSAGE /**/" >>confdefs.h - -fi - -done - - - - - -# Check whether --with-isl was given. -if test "${with_isl+set}" = set; then : - withval=$with_isl; -fi - -case "system" in -no|system|build|bundled) - -# Check whether --with-isl_prefix was given. -if test "${with_isl_prefix+set}" = set; then : - withval=$with_isl_prefix; -fi - - -# Check whether --with-isl_exec_prefix was given. -if test "${with_isl_exec_prefix+set}" = set; then : - withval=$with_isl_exec_prefix; -fi - -esac -case "build" in -no|system|build|bundled) - -# Check whether --with-isl_builddir was given. -if test "${with_isl_builddir+set}" = set; then : - withval=$with_isl_builddir; -fi - -esac -if test "x$with_isl_prefix" != "x" -a "x$with_isl_exec_prefix" = "x"; then - with_isl_exec_prefix=$with_isl_prefix -fi -if test "x$with_isl_prefix" != "x" -o "x$with_isl_exec_prefix" != "x"; then - if test "x$with_isl" != "x" -a "x$with_isl" != "xsystem"; then - as_fn_error "Setting $with_isl_prefix implies use of system isl" "$LINENO" 5 - fi - with_isl="system" -fi -if test "x$with_isl_builddir" != "x"; then - if test "x$with_isl" != "x" -a "x$with_isl" != "xbuild"; then - as_fn_error "Setting $with_isl_builddir implies use of build isl" "$LINENO" 5 - fi - with_isl="build" - isl_srcdir=`echo @abs_srcdir@ | $with_isl_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: isl sources in $isl_srcdir" >&5 -$as_echo "$as_me: isl sources in $isl_srcdir" >&6;} -fi -case "$with_isl" in -no|system|build|bundled) - ;; -*) - if test -d $srcdir/.git -a \ - -d $srcdir/isl -a \ - ! -d $srcdir/isl/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule isl not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule isl not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/isl/configure -a "bundled" != "no"; then - with_isl="bundled" - else - with_isl="bundled" - fi - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which isl to use" >&5 -$as_echo_n "checking which isl to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_isl" >&5 -$as_echo "$with_isl" >&6; } - - -BITS="gmp" - - - - - -# Check whether --with-gmp was given. -if test "${with_gmp+set}" = set; then : - withval=$with_gmp; -fi - -case "system" in -system) - -# Check whether --with-gmp_prefix was given. -if test "${with_gmp_prefix+set}" = set; then : - withval=$with_gmp_prefix; -fi - - -# Check whether --with-gmp_exec_prefix was given. -if test "${with_gmp_exec_prefix+set}" = set; then : - withval=$with_gmp_exec_prefix; -fi - -esac -case "build" in -system) - -# Check whether --with-gmp_builddir was given. -if test "${with_gmp_builddir+set}" = set; then : - withval=$with_gmp_builddir; -fi - -esac -if test "x$with_gmp_prefix" != "x" -a "x$with_gmp_exec_prefix" = "x"; then - with_gmp_exec_prefix=$with_gmp_prefix -fi -if test "x$with_gmp_prefix" != "x" -o "x$with_gmp_exec_prefix" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xsystem"; then - as_fn_error "Setting $with_gmp_prefix implies use of system gmp" "$LINENO" 5 - fi - with_gmp="system" -fi -if test "x$with_gmp_builddir" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xbuild"; then - as_fn_error "Setting $with_gmp_builddir implies use of build gmp" "$LINENO" 5 - fi - with_gmp="build" - gmp_srcdir=`echo @abs_srcdir@ | $with_gmp_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: gmp sources in $gmp_srcdir" >&5 -$as_echo "$as_me: gmp sources in $gmp_srcdir" >&6;} -fi -case "$with_gmp" in -system) - ;; -*) - if test -d $srcdir/.git -a \ - -d $srcdir/gmp -a \ - ! -d $srcdir/gmp/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule gmp not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule gmp not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/gmp/configure -a "system" != "no"; then - with_gmp="bundled" - else - with_gmp="system" - fi - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which gmp to use" >&5 -$as_echo_n "checking which gmp to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gmp" >&5 -$as_echo "$with_gmp" >&6; } - - - -need_get_memory_functions=false -case "$with_gmp" in -system) - if test "x$with_gmp_prefix" != "x"; then - CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS" - fi - - if test "$with_gmp_exec_prefix" != "yes" ; then - LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS" - fi - - ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" -if test "x$ac_cv_header_gmp_h" = x""yes; then : - -else - as_fn_error "Can't find gmp headers." "$LINENO" 5 -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 -$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } -if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __gmpz_init (); -int -main () -{ -return __gmpz_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gmp___gmpz_init=yes -else - ac_cv_lib_gmp___gmpz_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 -$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } -if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then : - LIBS="$LIBS -lgmp" -else - as_fn_error "Can't find gmp library." "$LINENO" 5 -fi - - ac_fn_c_check_decl "$LINENO" "mp_get_memory_functions" "ac_cv_have_decl_mp_get_memory_functions" "#include -" -if test "x$ac_cv_have_decl_mp_get_memory_functions" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MP_GET_MEMORY_FUNCTIONS $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - - need_get_memory_functions=true - -fi - - ;; -esac - if test x$need_get_memory_functions = xtrue; then - NEED_GET_MEMORY_FUNCTIONS_TRUE= - NEED_GET_MEMORY_FUNCTIONS_FALSE='#' -else - NEED_GET_MEMORY_FUNCTIONS_TRUE='#' - NEED_GET_MEMORY_FUNCTIONS_FALSE= -fi - - - - - - -case "$with_isl" in -bundled) - ISL_CPPFLAGS="-I$srcdir/isl/include -Iisl/include" - ;; -build) - ISL_CPPFLAGS="-I$isl_srcdir/include -I$with_isl_builddir/include" - ISL_LIBS="$with_isl_builddir/libisl.la" - ;; -system) - if test "x$with_isl_prefix" != "x"; then - ISL_CPPFLAGS="-I$with_isl_prefix/include" - fi - if test "x$with_isl_exec_prefix" != "x"; then - ISL_LDFLAGS="-L$with_isl_exec_prefix/lib" - fi - ISL_LIBS="-lisl" -esac - if test $with_isl = bundled; then - BUNDLED_ISL_TRUE= - BUNDLED_ISL_FALSE='#' -else - BUNDLED_ISL_TRUE='#' - BUNDLED_ISL_FALSE= -fi - - if test $with_isl = no; then - NO_ISL_TRUE= - NO_ISL_FALSE='#' -else - NO_ISL_TRUE='#' - NO_ISL_FALSE= -fi - - - - -$as_echo "#define CLOOG_INT_GMP 1" >>confdefs.h - - - -if test -f $srcdir/.git/HEAD; then - GIT_INDEX="\$(top_srcdir)/.git/index" -fi - - - - - - - - - - - - - - - - - -PACKAGE_NAME="cloog-isl" -PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1" - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig libname" >&5 -$as_echo_n "checking our pkgconfig libname... " >&6; } -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="${PACKAGE_NAME}" -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="$PACKAGE" -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libname" >&5 -$as_echo "$ax_create_pkgconfig_libname" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig version" >&5 -$as_echo_n "checking our pkgconfig version... " >&6; } -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="${PACKAGE_VERSION}" -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="$VERSION" -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_version" >&5 -$as_echo "$ax_create_pkgconfig_version" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libdir" >&5 -$as_echo_n "checking our pkgconfig_libdir... " >&6; } -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -ax_create_pkgconfig_libdir=`eval echo "$pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libdir" >&5 -$as_echo "$pkgconfig_libdir" >&6; } -test "$pkgconfig_libdir" != "$ax_create_pkgconfig_libdir" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&5 -$as_echo "expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libfile" >&5 -$as_echo_n "checking our pkgconfig_libfile... " >&6; } -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_libfile=`eval echo "$pkgconfig_libfile"` -ax_create_pkgconfig_libfile=`eval echo "$ax_create_pkgconfig_libfile"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libfile" >&5 -$as_echo "$pkgconfig_libfile" >&6; } -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_libfile" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&5 -$as_echo "expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our package / suffix" >&5 -$as_echo_n "checking our package / suffix... " >&6; } -ax_create_pkgconfig_suffix="$program_suffix" -test ".$ax_create_pkgconfig_suffix" != .NONE || ax_create_pkgconfig_suffix="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&5 -$as_echo "${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig description" >&5 -$as_echo_n "checking our pkgconfig description... " >&6; } -ax_create_pkgconfig_description="$PACKAGE_SUMMARY" -test ".$ax_create_pkgconfig_description" != "." || \ -ax_create_pkgconfig_description="$ax_create_pkgconfig_libname Library" -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_description" >&5 -$as_echo "$ax_create_pkgconfig_description" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig requires" >&5 -$as_echo_n "checking our pkgconfig requires... " >&6; } -ax_create_pkgconfig_requires="$PACKAGE_REQUIRES" -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_requires" >&5 -$as_echo "$ax_create_pkgconfig_requires" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ext libs" >&5 -$as_echo_n "checking our pkgconfig ext libs... " >&6; } -ax_create_pkgconfig_pkglibs="$PACKAGE_LIBS" -test ".$ax_create_pkgconfig_pkglibs" != "." || ax_create_pkgconfig_pkglibs="-l$ax_create_pkgconfig_libname" -ax_create_pkgconfig_libs="$ax_create_pkgconfig_pkglibs $LIBS" -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libs" >&5 -$as_echo "$ax_create_pkgconfig_libs" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig cppflags" >&5 -$as_echo_n "checking our pkgconfig cppflags... " >&6; } -ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_cppflags" >&5 -$as_echo "$ax_create_pkgconfig_cppflags" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ldflags" >&5 -$as_echo_n "checking our pkgconfig ldflags... " >&6; } -ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_ldflags" >&5 -$as_echo "$ax_create_pkgconfig_ldflags" >&6; } - -test ".$ax_create_pkgconfig_generate" != "." || \ -ax_create_pkgconfig_generate="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_generate" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: generate the pkgconfig later... $ax_create_pkgconfig_generate" >&5 -$as_echo "generate the pkgconfig later... $ax_create_pkgconfig_generate" >&6; }) - -if test ".$ax_create_pkgconfig_src_libdir" = "." ; then -ax_create_pkgconfig_src_libdir=`pwd` -ax_create_pkgconfig_src_libdir=`$as_dirname -- "$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" || -$as_expr X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_libdir/src || \ -ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/src" -case ".$objdir" in -*libs) ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/$objdir" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&5 -$as_echo "noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&6; } -fi - -if test ".$ax_create_pkgconfig_src_headers" = "." ; then -ax_create_pkgconfig_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) ax_create_pkgconfig_src_headers="" ;; esac -ax_create_pkgconfig_src_headers=`$as_dirname -- "$ax_create_pkgconfig_src_headers/$v/x" || -$as_expr X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_headers/$v/x" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_headers/include || \ -ax_create_pkgconfig_src_headers="$ax_create_pkgconfig_src_headers/include" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&5 -$as_echo "noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&6; } -fi - - -ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate" - - -ac_config_files="$ac_config_files Makefile test/Makefile" - -ac_config_files="$ac_config_files autoconf/Doxyfile" - -ac_config_files="$ac_config_files doc/Makefile" - -ac_config_files="$ac_config_files source/version.c" - -ac_config_files="$ac_config_files include/cloog/version.h" - -ac_config_files="$ac_config_files genversion.sh" - -ac_config_commands="$ac_config_commands version.h" - -ac_config_commands="$ac_config_commands doc/gitversion.texi" - -if test $with_isl = bundled; then - - -subdirs="$subdirs isl" - -fi - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_TEXI2DVI_TRUE}" && test -z "${HAVE_TEXI2DVI_FALSE}"; then - as_fn_error "conditional \"HAVE_TEXI2DVI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NEED_GET_MEMORY_FUNCTIONS_TRUE}" && test -z "${NEED_GET_MEMORY_FUNCTIONS_FALSE}"; then - as_fn_error "conditional \"NEED_GET_MEMORY_FUNCTIONS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUNDLED_ISL_TRUE}" && test -z "${BUNDLED_ISL_FALSE}"; then - as_fn_error "conditional \"BUNDLED_ISL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NO_ISL_TRUE}" && test -z "${NO_ISL_FALSE}"; then - as_fn_error "conditional \"NO_ISL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cloog $as_me 0.16.3, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cloog config.status 0.16.3 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "$ax_create_pkgconfig_generate") CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "autoconf/Doxyfile") CONFIG_FILES="$CONFIG_FILES autoconf/Doxyfile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "source/version.c") CONFIG_FILES="$CONFIG_FILES source/version.c" ;; - "include/cloog/version.h") CONFIG_FILES="$CONFIG_FILES include/cloog/version.h" ;; - "genversion.sh") CONFIG_FILES="$CONFIG_FILES genversion.sh" ;; - "version.h") CONFIG_COMMANDS="$CONFIG_COMMANDS version.h" ;; - "doc/gitversion.texi") CONFIG_COMMANDS="$CONFIG_COMMANDS doc/gitversion.texi" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "$ax_create_pkgconfig_generate":C) -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_generate.in" >&5 -$as_echo "$as_me: creating $pkgconfig_generate.in" >&6;} -cat > $pkgconfig_generate.in <&5 -$as_echo "$as_me: creating $pkgconfig_generate" >&6;} -cat >conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - as_fn_error "$pkgconfig_generate is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - ;; - "genversion.sh":F) chmod +x genversion.sh ;; - "version.h":C) echo '#define CLOOG_HEAD "'`./genversion.sh`'"' > version.h ;; - "doc/gitversion.texi":C) echo '@set VERSION '`./genversion.sh`'' > doc/gitversion.texi ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - - ac_configure_args="$ac_configure_args $cloog_configure_args" - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi - -# -# CONFIG_SUBDIRS section. -# -if test "$no_recursion" != yes; then - - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ac_sub_configure_args= - ac_prev= - eval "set x $ac_configure_args" - shift - for ac_arg - do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case $ac_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - ;; - --disable-option-checking) - ;; - *) - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_sub_configure_args " '$ac_arg'" ;; - esac - done - - # Always prepend --prefix to ensure using the same prefix - # in subdir configurations. - ac_arg="--prefix=$prefix" - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" - - ac_popdir=`pwd` - for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - test -d "$srcdir/$ac_dir" || continue - - ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - cd "$ac_dir" - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f "$ac_srcdir/configure.gnu"; then - ac_sub_configure=$ac_srcdir/configure.gnu - elif test -f "$ac_srcdir/configure"; then - ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - # Make the cache file name correct relative to the subdirectory. - case $cache_file in - [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; - *) # Relative name. - ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} - # The eval makes quoting arguments work. - eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 - fi - - cd "$ac_popdir" - done -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -echo " /*-----------------------------------------------*" -echo " * CLooG configuration is OK *" -echo " *-----------------------------------------------*/" -echo "It appears that your system is OK to start CLooG compilation. You need" -echo "now to type \"make\". After compilation, you should check CLooG by typing" -echo "\"make check\". If no problem occur, you can type \"make uninstall\" if" -echo "you are upgrading an old version. Lastly type \"make install\" to install" -echo "CLooG on your system (log as root if necessary)." diff --git a/cloog-0.16.3/configure.ac b/cloog-0.16.3/configure.ac deleted file mode 100644 index 053685ae726374ee83dcfff2d11d10f996c2cdb1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/configure.ac +++ /dev/null @@ -1,222 +0,0 @@ - -dnl /**-------------------------------------------------------------------** -dnl ** CLooG ** -dnl **-------------------------------------------------------------------** -dnl ** configure.ac ** -dnl **-------------------------------------------------------------------** -dnl ** First version: august 7th 2002 ** -dnl **-------------------------------------------------------------------**/ -dnl -dnl Input file for autoconf to build a configuration shellscript. -dnl To build the configure script from the CLooG's top-level directory, use -dnl autoconf -l autoconf autoconf/configure.in > configure -dnl if it doesn't work (invalid option -l) try -I instead -dnl autoconf -I autoconf autoconf/configure.in > configure - -dnl /************************************************************************** -dnl * CLooG : the Chunky Loop Generator (experimental) * -dnl *************************************************************************** -dnl * * -dnl * Copyright (C) 2001 Cedric Bastoul * -dnl * * -dnl * This library is free software; you can redistribute it and/or * -dnl * modify it under the terms of the GNU Lesser General Public * -dnl * License as published by the Free Software Foundation; either * -dnl * version 2.1 of the License, or (at your option) any later version. * -dnl * * -dnl * This library is distributed in the hope that it will be useful, * -dnl * but WITHOUT ANY WARRANTY; without even the implied warranty of * -dnl * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -dnl * Lesser General Public License for more details. * -dnl * * -dnl * You should have received a copy of the GNU Lesser General Public * -dnl * License along with this library; if not, write to the Free Software * -dnl * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -dnl * Boston, MA 02110-1301 USA * -dnl * * -dnl * CLooG, the Chunky Loop Generator * -dnl * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -dnl * * -dnl ***************************************************************************/ - -m4_define([version_major], [0]) -m4_define([version_minor], [16]) -m4_define([version_revision], [3]) - -AC_PREREQ(2.53) -AC_INIT([cloog], [version_major.version_minor.version_revision], - [cloog-development@googlegroups.com]) -AC_CONFIG_SRCDIR(source/cloog.c) -AC_CONFIG_AUX_DIR(autoconf) -AC_CONFIG_MACRO_DIR([m4]) - -VERSION_MAJOR=version_major -VERSION_MINOR=version_minor -VERSION_REVISION=version_revision -AC_SUBST(versioninfo) -versioninfo=2:0:0 - -AM_INIT_AUTOMAKE([foreign]) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -dnl /************************************************************************** -dnl * Checking * -dnl **************************************************************************/ - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_CHECK_PROG(CD, cd) -dnl Configure needs an empty install.sh file with this, i HATE that... -AC_PROG_INSTALL -AC_PROG_LIBTOOL -AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) -AM_CONDITIONAL(HAVE_TEXI2DVI, test -n "$TEXI2DVI") - -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 - - -dnl Checks for library functions. -AC_CHECK_FUNCS(strtol) - - -dnl /************************************************************************** -dnl * Option setting * -dnl **************************************************************************/ - -AC_CHECK_HEADERS([sys/resource.h], - [AC_DEFINE([CLOOG_RUSAGE], [], [Print time required to generate code])]) - -AX_SUBMODULE(isl,no|system|build|bundled,bundled) -BITS="gmp" - -dnl /************************************************************************** -dnl * Where is GMP? * -dnl **************************************************************************/ - -AX_SUBMODULE(gmp,system,system) - -need_get_memory_functions=false -case "$with_gmp" in -system) - if test "x$with_gmp_prefix" != "x"; then - CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS" - fi - - if test "$with_gmp_exec_prefix" != "yes" ; then - LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS" - fi - - AC_CHECK_HEADER(gmp.h, - [], - [AC_MSG_ERROR(Can't find gmp headers.)]) - AC_CHECK_LIB(gmp, - __gmpz_init, - [LIBS="$LIBS -lgmp"], - [AC_MSG_ERROR(Can't find gmp library.)]) - AC_CHECK_DECLS(mp_get_memory_functions,[],[ - need_get_memory_functions=true - ],[#include ]) - ;; -esac -AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, - test x$need_get_memory_functions = xtrue) - -dnl /************************************************************************** -dnl * Where is isl? * -dnl **************************************************************************/ - -AC_SUBST(ISL_CPPFLAGS) -AC_SUBST(ISL_LDFLAGS) -AC_SUBST(ISL_LIBS) -case "$with_isl" in -bundled) - ISL_CPPFLAGS="-I$srcdir/isl/include -Iisl/include" - ;; -build) - ISL_CPPFLAGS="-I$isl_srcdir/include -I$with_isl_builddir/include" - ISL_LIBS="$with_isl_builddir/libisl.la" - ;; -system) - if test "x$with_isl_prefix" != "x"; then - ISL_CPPFLAGS="-I$with_isl_prefix/include" - fi - if test "x$with_isl_exec_prefix" != "x"; then - ISL_LDFLAGS="-L$with_isl_exec_prefix/lib" - fi - ISL_LIBS="-lisl" -esac -AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled) -AM_CONDITIONAL(NO_ISL, test $with_isl = no) - - -AC_DEFINE([CLOOG_INT_GMP], 1, [Use arbitrary precision integers]) - -AC_SUBST(GIT_INDEX) -if test -f $srcdir/.git/HEAD; then - GIT_INDEX="\$(top_srcdir)/.git/index" -fi - - -dnl /************************************************************************** -dnl * Substitutions * -dnl **************************************************************************/ - - -dnl Substitutions to do in Makefile.in. -AC_SUBST(CC) -AC_SUBST(LN_S) - -AC_SUBST(prefix) -AC_SUBST(exec_prefix) -AC_SUBST(INSTALL) - -AC_SUBST(BITS) - -AC_SUBST(VERSION_MAJOR) -AC_SUBST(VERSION_MINOR) -AC_SUBST(VERSION_REVISION) - -PACKAGE_NAME="cloog-isl" -PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1" -AX_CREATE_PKGCONFIG_INFO - -AC_CONFIG_FILES(Makefile test/Makefile) -AC_CONFIG_FILES(autoconf/Doxyfile) -AC_CONFIG_FILES(doc/Makefile) -AC_CONFIG_FILES(source/version.c) -AC_CONFIG_FILES(include/cloog/version.h) -AC_CONFIG_FILES([genversion.sh], [chmod +x genversion.sh]) -AC_CONFIG_COMMANDS([version.h], - [echo '#define CLOOG_HEAD "'`./genversion.sh`'"' > version.h]) -AC_CONFIG_COMMANDS([doc/gitversion.texi], - [echo '@set VERSION '`./genversion.sh`'' > doc/gitversion.texi]) -if test $with_isl = bundled; then - AC_CONFIG_SUBDIRS(isl) -fi -AC_CONFIG_COMMANDS_POST([ - ac_configure_args="$ac_configure_args $cloog_configure_args" -]) -AC_OUTPUT - - -echo " /*-----------------------------------------------*" -echo " * CLooG configuration is OK *" -echo " *-----------------------------------------------*/" -echo "It appears that your system is OK to start CLooG compilation. You need" -echo "now to type \"make\". After compilation, you should check CLooG by typing" -echo "\"make check\". If no problem occur, you can type \"make uninstall\" if" -echo "you are upgrading an old version. Lastly type \"make install\" to install" -echo "CLooG on your system (log as root if necessary)." diff --git a/cloog-0.16.3/doc/Makefile.am b/cloog-0.16.3/doc/Makefile.am deleted file mode 100644 index 160dfd11d0d7d17690164b7cfe8785551f1ffb96..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -if HAVE_TEXI2DVI -cloog.pdf: cloog.texi gitversion.texi - $(TEXI2DVI) --pdf $< -endif - -gitversion.texi: @GIT_INDEX@ - echo '@set VERSION '`$(top_builddir)/genversion.sh`'' > $@ diff --git a/cloog-0.16.3/doc/Makefile.in b/cloog-0.16.3/doc/Makefile.in deleted file mode 100644 index 91b9aa5739db48b2f3dcc580b30c2b1a41bcd07c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/Makefile.in +++ /dev/null @@ -1,383 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITS = @BITS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CFLAGS_WARN = @CFLAGS_WARN@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_INDEX = @GIT_INDEX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -ISL_CPPFLAGS = @ISL_CPPFLAGS@ -ISL_LDFLAGS = @ISL_LDFLAGS@ -ISL_LIBS = @ISL_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TEXI2DVI = @TEXI2DVI@ -VERSION = @VERSION@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_REVISION = @VERSION_REVISION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - -@HAVE_TEXI2DVI_TRUE@cloog.pdf: cloog.texi gitversion.texi -@HAVE_TEXI2DVI_TRUE@ $(TEXI2DVI) --pdf $< - -gitversion.texi: @GIT_INDEX@ - echo '@set VERSION '`$(top_builddir)/genversion.sh`'' > $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.16.3/doc/TODO b/cloog-0.16.3/doc/TODO deleted file mode 100644 index 152c82d32d31bbe5f83b1c0f6e299da2b9d57d87..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/TODO +++ /dev/null @@ -1,58 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** The Chunky Loop Generator ** -# **-------------------------------------------------------------------** -# ** First version of this file: april 29th 2005 ** -# **-------------------------------------------------------------------**/ -# - -This file is mainly for the authors, in order to put ideas, requests, and -work-in-progress notes. - -# **-------------------------------------------------------------------** -# ** I. Requested features ** -# **-------------------------------------------------------------------**/ - -1. GMP !!! (LooPo Team). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -2. Set the statement prefix (Michael Classen). - -3. Do not fuse the iterators/scattering dimension names lists (Hadda Cheroun). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -4. Exploit URUK transformation properties (WRAP-IT Team). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - - -# **-------------------------------------------------------------------** -# ** II. Known bugs ** -# **-------------------------------------------------------------------**/ - -1. Lead to segfault : -cloog ./test/daegon_lu_osp.cloog -f 3 -l 6 -nobacktrack -override -(while every other -l values do not !) -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -2. -strides gives bad result for a dreamup or interpolation-duration file in -test/non_optimal (I don't remember which one) - -3. Various configure problems (check Sylvain Girbal mails in the mailbox !). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -4. With GMP, try test/emploi.cloog (with valgrind): a memory leak... -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -5. With GMP, option -cpp do not write all the statement internal stuff -(e.g., S1(,,) ; instead of S1(i,j,k) ;). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -# **-------------------------------------------------------------------** -# ** III. Various notes ** -# **-------------------------------------------------------------------**/ - -Kill the cat. - - diff --git a/cloog-0.16.3/doc/cloog.pdf b/cloog-0.16.3/doc/cloog.pdf deleted file mode 100644 index 2f027933b65ae4b350ceab6bc32094b2e5da94e5..0000000000000000000000000000000000000000 Binary files a/cloog-0.16.3/doc/cloog.pdf and /dev/null differ diff --git a/cloog-0.16.3/doc/cloog.texi b/cloog-0.16.3/doc/cloog.texi deleted file mode 100644 index 8fbc1dc5c986baa1e9a9266f466c8940ac18d277..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/cloog.texi +++ /dev/null @@ -1,2542 +0,0 @@ -\input texinfo -@c % -@c % /**-----------------------------------------------------------------** -@c % ** CLooG ** -@c % **-----------------------------------------------------------------** -@c % ** cloog.texi ** -@c % **-----------------------------------------------------------------** -@c % ** First version: july 6th 2002 ** -@c % **-----------------------------------------------------------------**/ -@c % -@c % release 1.0: September 17th 2002 -@c % release 1.1: December 5th 2002 -@c % release 1.2: April 22th 2003 -@c % release 2.0: November 21th 2005 (and now in texinfo instead of LaTeX) -@c % release 2.1: October 15th 2007 -@c % -@c %/************************************************************************** -@c % * CLooG : the Chunky Loop Generator (experimental) * -@c % **************************************************************************/ -@c %/* CAUTION: the English used is probably the worst you ever read, please -@c % * feel free to correct and improve it ! -@c % */ - -@c %\textit{"I found the ultimate transformation functions, optimization for -@c %static control programs is now a closed problem, I have \textnormal{just} -@c %to generate the target code !"} - - - -@c % /************************************************************************* -@c % * PART I: HEADER * -@c % *************************************************************************/ -@c %**start of header -@setfilename cloog.info -@settitle CLooG - a loop generator for scanning polyhedra - -@set EDITION 2.1 -@include gitversion.texi -@set UPDATED October 15th 2007 -@setchapternewpage odd - -@c %**end of header - -@c % /************************************************************************* -@c % * PART II: SUMMARY DESCRIPTION AND COPYRIGHT * -@c % *************************************************************************/ - -@copying -This manual is for CLooG version @value{VERSION}, a software -which generates loops for scanning Z-polyhedra. That is, CLooG produces a -code visiting each integral point of a union of parametrized -polyhedra. CLooG is designed to avoid control overhead and to produce a very -efficient code. - -It would be quite kind to refer the following paper in any publication that -results from the use of the CLooG software or its library: - -@example -@@InProceedings@{Bas04, -@ @ author =@ @ @ @ @{C. Bastoul@}, -@ @ title =@ @ @ @ @ @{Code Generation in the Polyhedral Model -@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Is Easier Than You Think@}, -@ @ booktitle = @{PACT'13 IEEE International Conference on -@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Parallel Architecture and Compilation Techniques@}, -@ @ year =@ @ @ @ @ @ 2004, -@ @ pages =@ @ @ @ @ @{7--16@}, -@ @ month =@ @ @ @ @ @{september@}, -@ @ address =@ @ @ @{Juan-les-Pins@} -@} -@end example - -Copyright @copyright{} 2002-2005 C@'edric Bastoul. - -@c quotation -Permission is granted to copy, distribute and/or modify this document under -the terms of the GNU Free Documentation License, Version 1.2 -published by the Free Software Foundation. To receive a copy of the -GNU Free Documentation License, write to the Free Software Foundation, Inc., -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -@c end quotation -@end copying - -@c % /************************************************************************* -@c % * PART III: TITLEPAGE, CONTENTS, COPYRIGHT * -@c % *************************************************************************/ -@titlepage -@title CLooG -@subtitle A Loop Generator For Scanning Polyhedra -@subtitle Edition @value{EDITION}, for CLooG @value{VERSION} -@subtitle @value{UPDATED} -@author C@'edric Bastoul - -@c The following two commands start the copyright page. -@page -@noindent (September 2001) -@table @code -@item C@'edric Bastoul -SCHEDULES GENERATE !!! I just need to apply them now, where can I find -a good code generator ?! - -@item Paul Feautrier -Hmmm. I fear that if you want something powerful enough, you'll have to -write it yourself ! -@end table - -@vskip 0pt plus 1filll -@insertcopying -@end titlepage - -@c Output the table of contents at the beginning. -@contents - -@c % /************************************************************************* -@c % * PART IV: TOP NODE AND MASTER MENU * -@c % *************************************************************************/ -@ifnottex -@node Top -@top CLooG - -@insertcopying -@end ifnottex - -@menu -* Introduction:: -* CLooG Software:: -* CLooG Library:: -@c * Hacking:: -* Installing:: -* Documentation:: -* References:: -@end menu - - - -@c % /************************************************************************* -@c % * PART V: BODY OF THE DOCUMENT * -@c % *************************************************************************/ - -@c % ****************************** INTRODUCTION ****************************** -@node Introduction -@chapter Introduction -CLooG is a free software and library generating loops for scanning Z-polyhedra. -That is, it finds a code (e.g. in C, FORTRAN...) that reaches each integral -point of one or more parameterized polyhedra. CLooG has been originally -written to solve the code generation problem for optimizing compilers based on -the polytope model. Nevertheless it is used now in various area, e.g., to build -control automata for high-level synthesis or to find the best polynomial -approximation of a function. CLooG may help in any situation where scanning -polyhedra matters. It uses the best state-of-the-art code generation -algorithm known as the Quiller@'e et al. algorithm (@pxref{Qui00}) -with our own improvements and extensions (@pxref{Bas04}). -The user has full control on generated code quality. -On one hand, generated code size has to be tuned for sake of -readability or instruction cache use. On the other hand, we must ensure that -a bad control management does not hamper performance of the generated code, -for instance by producing redundant guards or complex loop bounds. -CLooG is specially designed to avoid control overhead and to produce a very -efficient code. - -CLooG stands for @emph{Chunky Loop Generator}: it is a part of the Chunky -project, a research tool for data locality improvement (@pxref{Bas03a}). -It is designed -also to be the back-end of automatic parallelizers like LooPo (@pxref{Gri04}). -Thus it is very -compilable code oriented and provides powerful program transformation -facilities. Mainly, it allows the user to specify very general schedules where, -e.g., unimodularity or invertibility of the transformation doesn't matter. - -The current version is still under -evaluation, and there is no guarantee that the upward compatibility -will be respected (but the previous API has been stable for two years, -we hope this one will be as successful -and we believe it-). -A lot of reports are necessary to freeze the library -API and the input file shape. Most API changes from 0.12.x to 0.14.x -have been requested by the users themselves. -Thus you are very welcome and encouraged -to post reports on bugs, wishes, critics, comments, suggestions or -successful experiences in the forum of @code{http://www.CLooG.org} -or to send them to cedric.bastoul@@inria.fr directly. - -@menu -* Basics:: -* Scattering:: -@end menu - -@node Basics -@section Basically, what's the point ? -If you want to use CLooG, this is because you want to scan or to find -something inside the integral points of a set of polyhedra. There are many -reasons for that. Maybe you need the generated code itself because it -actually implements a very smart program transformation you found. -Maybe you want to use the generated code -because you know that the solution of your problem belongs to the integral -points of those damned polyhedra and you don't know which one. Maybe you just -want to know if a polyhedron has integral points depending on some parameters, -which is the lexicographic minimum, maximum, the third on the basis of the -left etc. Probably you have your own reasons to use CLooG. - -Let us illustrate a basic use of CLooG. Suppose we have a set of affine -constraints that describes a part of a whatever-dimensional space, -called a @strong{domain}, and we -want to scan it. Let us consider for instance the following set of constraints -where @samp{i} -and @samp{j} are the unknown (the two dimensions of the space) and -@samp{m} and @samp{n} are the parameters (some symbolic constants): -@example -@group -2<=i<=n -2<=j<=m -j<=n+2-i -@end group -@end example -Let us also consider that we have a partial knowledge of the parameter values, -called the @strong{context}, expressed as affine constraints as well, -for instance: -@example -@group -m>=2 -n>=2 -@end group -@end example -Note that using parameters is optional, if you are not comfortable with -parameter manipulation, just replace them with any scalar value that fits -@code{m>=2} and @code{n>=2}. -A graphical representation of this part of the 2-dimensional space, where -the integral points are represented using heavy dots would be for instance: - -@image{images/basic,6cm} - -The affine constraints of both the domain and the context are what we will -provide to CLooG as input (in a particular shape that will be described later). -The output of CLooG is a pseudo-code to scan the integral points of the -input domain according to the context: -@example -@group -for (i=2;i<=n;i++) @{ - for (j=2;j<=min(m,-i+n+2);j++) @{ - S1(i,j) ; - @} -@} -@end group -@end example -If you felt such a basic example is yet interesting, there is a good chance -that CLooG is appropriate for you. CLooG can do much more: scanning several -polyhedra or unions of polyhedra at the same time, applying general affine -transformations to the polyhedra, generate compilable code etc. Welcome -to the CLooG's user's guide ! - -@node Scattering -@section Defining a Scanning Order: Scattering Functions -In CLooG, domains only define the set of integral points to scan and their -coordinates. In particular, CLooG is free to choose the scanning order for -generating the most efficient code. This means, for optimizing/parallelizing -compiler people, that CLooG doesn't make any speculation on dependences on and -between statements (by the way, it's not its job !). -For instance, if an user give to -CLooG only two domains @code{S1:1<=i<=n}, @code{S2:1<=i<=n} and the context -@code{n>=1}, the following pseudo-codes are considered to be equivalent: - -@example -@group -/* A convenient target pseudo-code. */ -for (i=1;i<=N;i++) @{ - S1(i) ; -@} -for (i=1;i<=N;i++) @{ - S2(i) ; -@} -@end group -@end example - -@example -@group -/* Another convenient target pseudo-code. */ -for (i=1;i<=N;i++) @{ - S1(i) ; - S2(i) ; -@} -@end group -@end example - -The default behaviour -of CLooG is to generate the second one, since it is optimized in control. -It is right if there are no data dependences -between @code{S1} and @code{S2}, but wrong otherwise. - -Thus it is often useful to force scanning to respect a given order. This can be -done in CLooG by using @strong{scattering functions}. Scattering is a -shortcut for scheduling, allocation, chunking functions and the like we can -find in the restructuring compilation literature. There are a lot of reasons -to scatter the integral points of the domains (i.e. the statement instances -of a program, for compilation people), parallelization or optimization are good -examples. For instance, if the user wants for any reason to set some -precedence constraints between the statements of our example above -in order to force the generation of the -first code, he can do it easily by setting (for example) the following -scheduling functions: - -@tex -$$\theta _{S1}(i) = (1)$$ -$$\theta _{S2}(j) = (2)$$ -@end tex - -@ifnottex -@example -@group -T_S1(i) = (1) -T_S2(j) = (2) -@end group -@end example -@end ifnottex - -This scattering means that each integral point of the domain @code{S1} -is scanned at logical date @code{1} while each integral point of the domain -@code{S2} is scanned at logical date @code{2}. As a result, the whole -domain @code{S1} is scanned before domain @code{S2} and the first code in our -example is generated. - -The user can set every kind of affine scanning order thanks to the -scattering functions. Each domain has its own scattering function and -each scattering function may be multi-dimensional. A multi-dimensional logical -date may be seen as classical date (year,month,day,hour,minute,etc.) where -the first dimensions are the most significant. Each scattering dimension -may depend linearly on the original dimensions (e.g., @code{i}), the -parameters (e.g., @code{n}) ans scalars (e.g., @code{2}). - -A very useful example of multi-dimensional scattering functions is, for -compilation people, the scheduling of the original program. -The basic data to use for code generation are statement iteration domains. -As we saw, these data are not sufficient to rebuild the original -program (what is the ordering between instances of different statements ?). -The missing data can be put in the scattering functions as the original -scheduling. The method to compute it is quite simple (@pxref{Fea92}). The idea is to -build an abstract syntax tree of the program and to read the scheduling for -each statement. For instance, let us consider the following implementation of -a Cholesky factorization: - -@example -@group -/* A Cholesky factorization kernel. */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=i-1;j++) @{ - a[i][i] -= a[i][j] ; /* S1 */ - @} - a[i][i] = sqrt(a[i][i]) ; /* S2 */ - for (j=i+1;j<=N;j++) @{ - for (k=1;k<=i-1;k++) @{ - a[j][i] -= a[j][k]*a[i][k] ; /* S3 */ - @} - a[j][i] /= a[i][i] ; /* S4 */ - @} - @} -@} -@end group -@end example - -The corresponding abstract syntax tree is given in the following figure. -It directly gives the scattering functions (schedules) for all the -statements of the program. - -@image{images/tree,6cm} - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (0,i,0,j,0)^T$\cr - \theta _{S2}(i) &$= (0,i,1)^T$\cr - \theta _{S3}(i,j,k)^T &$= (0,i,2,j,0,k,0)^T$\cr - \theta _{S4}(i,j)^T &$= (0,i,2,j,1)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (0,i,0,j,0)^T -T_S2(i) = (0,i,1)^T -T_S3(i,j,k)^T = (0,i,2,j,0,k,0)^T -T_S4(i,j)^T = (0,i,2,j,1)^T -@end group -@end example -@end ifnottex - -These schedules depend on the iterators and give for each instance of each -statement a unique execution date. Using such scattering functions allow -CLooG to re-generate the input code. - - - - - -@c % ***********************Using the CLooG Software ************************** -@node CLooG Software -@chapter Using the CLooG Software - - -@menu -* A First Example:: -* Writing The Input File:: -* Calling CLooG:: -* CLooG Options:: -* Full Example:: -@end menu - -@c %/************************************************************************* -@c % * A FIRST EXAMPLE * -@c % *************************************************************************/ -@node A First Example -@section A First Example -CLooG takes as input a file that must be written accordingly to a grammar -described in depth in a further section (@pxref{Writing The Input File}). -Moreover it supports many options to tune the target code presentation or -quality as discussed in a dedicated section (@pxref{Calling CLooG}). -However, a basic use -of CLooG is not very complex and we present in this section how to generate the -code corresponding to a basic example discussed earlier (@pxref{Basics}). - -The problem is to find the code that scans a 2-dimensional polyhedron -where @samp{i} and @samp{j} are the unknown (the two dimensions of the space) -and @samp{m} and @samp{n} are the parameters (the symbolic constants), -defined by the following set of constraints: -@example -@group -2<=i<=n -2<=j<=m -j<=n+2-i -@end group -@end example -@noindent We also consider a partial knowledge of the parameter values, -expressed thanks to the following affine constraints: -@example -@group -m>=2 -n>=2 -@end group -@end example - -An input file that corresponds to this problem, and asks for a generated -code in C, may be the following. Note that we do not describe here precisely -the structure and the components of this file (@pxref{Writing The Input File} - for such information, if you feel it necessary): - -@example -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (constraints on two parameters) -2 4 # 2 lines and 4 columns -# eq/in m n 1 eq/in: 1 for inequality >=0, 0 for equality =0 - 1 1 0 -2 # 1*m + 0*n -2*1 >= 0, i.e. m>=2 - 1 0 1 -2 # 0*m + 1*n -2*1 >= 0, i.e. n>=2 - -1 # We want to set manually the parameter names -m n # parameter names - -# --------------------- STATEMENTS -------------------- -1 # Number of statements - -1 # First statement: one domain -# First domain -5 6 # 5 lines and 6 columns -# eq/in i j m n 1 - 1 1 0 0 0 -2 # i >= 2 - 1 -1 0 0 1 0 # i <= n - 1 0 1 0 0 -2 # j >= 2 - 1 0 -1 1 0 0 # j <= m - 1 -1 -1 0 1 2 # n+2-i>=j -0 0 0 # for future options - -1 # We want to set manually the iterator names -i j # iterator names - -# --------------------- SCATTERING -------------------- -0 # No scattering functions -@end example - -This file may be called @samp{basic.cloog} -(this example is provided in the CLooG distribution as -@code{test/manual_basic.cloog}) and we can ask CLooG to process it -and to generate the code by a simple calling to CLooG with this file as input: -@samp{cloog basic.cloog}. By default, CLooG will print the generated code in -the standard output: - -@example -@group -/* Generated by CLooG v@value{VERSION} in 0.00s. */ -for (i=2;i<=n;i++) @{ - for (j=2;j<=min(m,-i+n+2);j++) @{ - S1(i,j) ; - @} -@} -@end group -@end example - -@c %/************************************************************************* -@c % * Input file * -@c % *************************************************************************/ -@node Writing The Input File -@section Writing The Input File -The input text file contains a problem description, i.e. the context, -the domains and the scattering functions. -Because CLooG is very 'compilable code generation oriented', we can associate -some additional informations to each domain. We call this association a -@emph{statement}. The set of all informations is -called a @emph{program}. The input file respects the grammar below -(terminals are preceded by "_"): - -@example -File ::= Program -Program ::= Context Statements Scattering -Context ::= Language Domain_union Naming -Statements ::= Nb_statements Statement_list Naming -Scatterings ::= Nb_functions Scattering_list Naming -Naming ::= Option Name_list -Name_list ::= _String Name_list | (void) -Statement_list ::= Statement Statement_list | (void) -Domain_list ::= _Domain Domain_list | (void) -Scattering_list ::= Domain_union Scattering_list | (void) -Statement ::= Iteration_domain 0 0 0 -Iteration_domain ::= Domain_union -Domain_union ::= Nb_domains Domain_list -Option ::= 0 | 1 -Language ::= c | f -Nb_statements ::= _Integer -Nb_domains ::= _Integer -Nb_functions ::= _Integer -@end example - -Note: if there is only one domain in a @samp{Domain_union}, -i.e., if @samp{Nb_domains} is 1, then this 1 may be omitted. - -@itemize @bullet -@item @samp{Context} represents the informations that are - shared by all the statements. It consists on - the language used (which can be @samp{c} for C or @samp{f} for FORTRAN 90) - and the global constraints on parameters. - These constraints are essential - since they give to CLooG the number of parameters. If there is no - parameter or no constraints on parameters, just give a constraint - always satisfied like @math{1 \geq 0}. @samp{Naming} sets the parameter - names. - If the naming option @samp{Option} is 1, parameter names will be read - on the next line. There must be exactly as many names as parameters. - If the naming option @samp{Option} is 0, parameter names are - automatically generated. The name of the first parameter will - be @samp{M}, and the name of the @math{(n+1)^{th}} parameter directly - follows the name of the @math{n^{th}} parameter in ASCII code. - It is the user responsibility to ensure that parameter names, - iterators and scattering dimension names are different. -@item @samp{Statements} represents the informations on the statements. - @samp{Nb_statements} is the number of statements in the program, - i.e. the number of @samp{Statement} items in the @samp{Statement_list}. - @samp{Statement} represents the informations on a given statement. - To each statement is associated a domain - (the statement iteration domain: @samp{Iteration_domain}) and three - zeroes that represents future options. - @samp{Naming} sets the iterator names. If the naming option - @samp{Option} is 1, the iterator names - will be read on the next line. There must be exactly as many names as - nesting level in the deepest iteration domain. If the naming option - @samp{Option} is 0, iterator names are automatically generated. - The iterator name of the outermost loop will be @samp{i}, and the - iterator name of the loop at level @math{n+1} directly follows the - iterator name of the loop at level @math{n} in ASCII code. -@item @samp{Scatterings} represents the informations on scattering functions. - @samp{Nb_functions} is the number of functions (it must be - equal to the number of statements or 0 if there is no scattering - function). The functions themselves are represented through - @samp{Scattering_list}. - @samp{Naming} sets the scattering dimension names. If the naming option - @samp{Option} is 1, the scattering dimension names will be read on the - next line. - There must be exactly as many names as scattering dimensions. If the - naming option @samp{Option} is 0, scattering dimension names are automatically - generated. The name of the @math{n^{th}} scattering dimension - will be @samp{cn}. -@end itemize - -@menu -* Domain Representation:: -* Scattering Representation:: -@end menu - -@node Domain Representation -@subsection Domain Representation -As shown by the grammar, the input file describes the various informations -thanks to characters, integers and domains. Each domain is defined by a set of -constraints in the PolyLib format (@pxref{Wil93}). They have the -following syntax: -@enumerate -@item some optional comment lines beginning with @samp{#}, -@item the row and column numbers, possibly followed by comments, -@item the constraint rows, each row corresponds to a constraint the - domain have to satisfy. Each row must be on a single line and is possibly - followed by comments. The constraint is an equality @math{p(x) = 0} if the - first element is 0, an inequality @math{p(x) \geq 0} if the first element - is 1. The next elements are the unknown coefficients, followed by - the parameter coefficients. The last element is the constant factor. -@end enumerate -For instance, assuming that @samp{i}, @samp{j} and @samp{k} are iterators and -@samp{m} and @samp{n} are parameters, the domain defined by the following -constraints : - -@tex -$$ -\hbox{$ \cases{ -i + m &$\geq 0$\cr - -j + n &$\geq 0$\cr - i + j - k &$\geq 0$}$} -$$ -@end tex - -@ifnottex -@example -@group - -i + m >= 0 - -j + n >= 0 -i + j - k >= 0 -@end group -@end example -@end ifnottex - -@noindent can be written in the input file as follows : - -@example -@group -# This is the domain -3 7 # 3 lines and 7 columns -# eq/in i j k m n 1 - 1 -1 0 0 1 0 0 # -i + m >= 0 - 1 0 -1 0 0 1 0 # -j + n >= 0 - 1 1 1 -1 0 0 0 # i + j - k >= 0 -@end group -@end example - -Each iteration domain @samp{Iteration_domain} of a given statement -is a union of polyhedra -@samp{Domain_union}. A union is defined by its number of elements -@samp{Nb_domains} and the elements themselves @samp{Domain_list}. -For instance, let us consider the following pseudo-code: - -@example -@group -for (i=1;i<=n;i++) @{ - if ((i >= m) || (i <= 2*m)) - S1 ; - for (j=i+1;j<=m;j++) - S2 ; -@} -@end group -@end example - -@noindent The iteration domain of @samp{S1} can be divided into two -polyhedra and written in the input file as follows: - -@example -@group -2 # Number of polyhedra in the union -# First domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 1 -1 0 0 # i >= m -# Second domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 -1 2 0 0 # i <= 2*m -@end group -@end example - -@node Scattering Representation -@subsection Scattering Function Representation -Scattering functions are depicted in the input file thanks a representation -very close to the domain one. -An integer gives the number of functions @samp{Nb_functions} and each function -is represented by a domain. Each line of the domain corresponds to an equality -defining a dimension of the function. Note that at present -(CLooG @value{VERSION}) -@strong{all functions must have the same scattering dimension number}. If a -user wants to set scattering functions with different dimensionality, he has -to complete the smaller one with zeroes to reach the maximum dimensionality. -For instance, let us consider the following code and -scheduling functions: - -@example -@group -for (i=1;i<=n;i++) @{ - if ((i >= m) || (i <= 2*m)) - S1 ; - for (j=i+1;j<=m;j++) - S2 ; -@} -@end group -@end example - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i) &$= (i,0)^T$\cr - \theta _{S2}(i,j)^T &$= (n,i+j)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i) = (i,0)^T -T_S2(i,j)^T = (n,i+j)^T -@end group -@end example -@end ifnottex - - -@noindent This scheduling can be written in the input file as follows: - -@example -@group -2 # Number of scattering functions -# First function -2 7 # 2 lines and 7 columns -# eq/in c1 c2 i m n 1 - 0 1 0 -1 0 0 0 # c1 = i - 0 0 1 0 0 0 0 # c2 = 0 -# Second function -2 8 # 2 lines and 8 columns -# eq/in c1 c2 i j m n 1 - 0 1 0 0 0 0 -1 0 # c1 = n - 0 0 1 -1 -1 0 0 0 # c2 = i+j -@end group -@end example -The complete input file for the user who wants to generate the code for this -example with the preceding scheduling would be -(this file is provided in the CLooG distribution -as @code{test/manual_scattering.cloog}: - -@example -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no constraints on two parameters) -1 4 # 1 lines and 4 columns -# eq/in m n 1 - 1 0 0 0 # 0 >= 0, always true - -1 # We want to set manually the parameter names -m n # parameter names - -# --------------------- STATEMENTS -------------------- -2 # Number of statements - -2 # First statement: two domains -# First domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 1 -1 0 0 # i >= m -# Second domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 -1 2 0 0 # i <= 2*m -0 0 0 # for future options - -1 # Second statement: one domain -4 6 # 4 lines and 6 columns -# eq/in i j m n 1 - 1 1 0 0 0 -1 # i >= 1 - 1 -1 0 0 1 0 # i <= n - 1 -1 1 0 0 -1 # j >= i+1 - 1 0 -1 1 0 0 # j <= m -0 0 0 # for future options - -1 # We want to set manually the iterator names -i j # iterator names - -# --------------------- SCATTERING -------------------- -2 # Scattering functions -# First function -2 7 # 2 lines and 7 columns -# eq/in p1 p2 i m n 1 - 0 1 0 -1 0 0 0 # p1 = i - 0 0 1 0 0 0 0 # p2 = 0 -# Second function -2 8 # 2 lines and 8 columns -# eq/in p1 p2 i j m n 1 - 0 1 0 0 0 0 -1 0 # p1 = n - 0 0 1 -1 -1 0 0 0 # p2 = i+j - -1 # We want to set manually the scattering dimension names -p1 p2 # scattering dimension names -@end example - - -@c %/************************************************************************* -@c % * Calling CLooG * -@c % *************************************************************************/ -@node Calling CLooG -@section Calling CLooG -CLooG is called by the following command: -@example - cloog [ options | file ] -@end example -The default behavior of CLooG is to read the input informations from a file and -to print the generated code or pseudo-code on the standard output. -CLooG's behavior and the output code shape is under the user control thanks -to many options which are detailed a further section (@pxref{CLooG Options}). -@code{file} is the input file. @code{stdin} is a special value: when used, -input is standard input. For instance, we can call CLooG to treat the -input file @code{basic.cloog} with default options by typing: -@code{cloog basic.cloog} or @code{more basic.cloog | cloog stdin}. - -@c %/************************************************************************* -@c % * CLooG Options * -@c % *************************************************************************/ -@node CLooG Options -@section CLooG Options - -@menu -* Last Depth to Optimize Control:: -* First Depth to Optimize Control:: -* Simplify Convex Hull:: -* Once Time Loop Elimination:: -* Equality Spreading:: -* First Level for Spreading:: -* Statement Block:: -* Loop Strides:: -* Unrolling:: -* Compilable Code:: -* Output:: -* Help:: -* Version :: -* Quiet :: -@end menu - -@node Last Depth to Optimize Control -@subsection Last Depth to Optimize Control @code{-l } - -@code{-l }: this option sets the last loop depth to be optimized in -control. The higher this depth, the less control overhead. -For instance, with some input file, a user can generate -different pseudo-codes with different @code{depth} values as shown below. -@example -@group -/* Generated using a given input file and @strong{option -l 1} */ -for (i=0;i<=M;i++) @{ - S1 ; - for (j=0;j<=N;j++) @{ - S2 ; - @} - for (j=0;j<=N;j++) @{ - S3 ; - @} - S4 ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -l 2} */ -for (i=0;i<=M;i++) @{ - S1 ; - for (j=0;j<=N;j++) @{ - S2 ; - S3 ; - @} - S4 ; -@} -@end group -@end example - In this example we can see that this option can change the operation - execution order between statements. Let us remind that CLooG does not - make any speculation on dependences between statements - (@pxref{Scattering}). Thus if nothing (i.e. scattering functions) - forbids this, CLooG considers the above codes to be equivalent. - If there is no scattering functions, the minimum value for @code{depth} - is 1 (in the case of 0, the user doesn't really need a loop generator !), - and the number of scattering dimensions otherwise (CLooG will warn the - user if he doesn't respect such constraint). - The maximum value for depth is -1 (infinity). - Default value is infinity. - -@node First Depth to Optimize Control -@subsection First Depth to Optimize Control @code{-f } - - @code{-f }: this option sets the first loop depth to be optimized - in control. The lower this depth, the less control overhead (and the longer - the generated code). For instance, with some input file, a user - can generate different pseudo-codes with different @code{depth} values - as shown below. - The minimum value for @code{depth} is 1, and the - maximum value is -1 (infinity). - Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -f 3} */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=M;j++) @{ - S1 ; - if (j >= 10) @{ - S2 ; - @} - @} -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -f 2} */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=9;j++) @{ - S1 ; - @} - for (j=10;j<=M;j++) @{ - S1 ; - S2 ; - @} -@} -@end group -@end example - -@node Simple Convex Hull -@subsection Simple Convex Hull @code{-sh } - - @code{-sh }: this option enables (@code{boolean=1}) - or forbids (@code{boolean=0}) the use of an overapproximation - of the convex hull that may be easier to compute - (especially in the isl backend) and that may result in - simpler bounds. - This option works only for generated code without - code duplication (it means, you have to tune @code{-f} and - @code{-l} options first to generate only a loop nest with internal - guards). For instance, with the input file @code{test/union.cloog}, a user - can generate different pseudo-codes as shown below. - Default value is 0. -@example -@group -/* Generated using test/union.cloog and @strong{option -f -1 -l 2 -override} */ -for (i=0;i<=11;i++) @{ - for (j=max(0,5*i-50);j<=min(15,5*i+10);j++) @{ - if ((i <= 10) && (j <= 10)) @{ - S1 ; - @} - if ((i >= 1) && (j >= 5)) @{ - S2 ; - @} - @} -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -sh 1 -f -1 -l 2 -override} */ -for (i=0;i<=11;i++) @{ - for (j=0;j<=15;j++) @{ - if ((i <= 10) && (j <= 10)) @{ - S1 ; - @} - if ((i >= 1) && (j >= 5)) @{ - S2 ; - @} - @} -@} -@end group -@end example - -@node Once Time Loop Elimination -@subsection Once Time Loop Elimination @code{-otl } - - @code{-otl }: this option allows (@code{boolean=1}) or - forbids (@code{boolean=0}) the simplification of loops running - once. Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -otl 0} */ -for (j=i+1;j<=i+1;j++) @{ - S1 ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -otl 1} */ -j = i+1 ; -S1 ; -@end group -@end example - - -@node Equality Spreading -@subsection Equality Spreading @code{-esp } - - @code{-esp }: this option allows (@code{boolean=1}) or - forbids (@code{boolean=0}) values spreading when there - are equalities. Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -esp 0} */ -i = M+2 ; -j = N ; -for (k=i;k<=j+M;k++) @{ - S1 ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -esp 1} */ -for (k=M+2;k<=N+M;k++) @{ - S1(i = M+2, j = N) ; -@} -@end group -@end example - - -@node First Level for Spreading -@subsection First Level for Spreading @code{-fsp } - - @code{-fsp }: it can be useful to set a - first level to begin equality spreading. Particularly when using - scattering functions, the user may want to see the scattering dimension - values instead of spreading or hiding them. If user has set a - spreading, @code{level} is - the first level to start it. Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -fsp 1} */ -for (j=0;j<=N+M;j++) @{ - S1(i = N) ; -@} -for (j=0;j<=N+M;j++) @{ - S1(i = M) ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -fsp 2} */ -c1 = N ; -for (j=0;j<=c1+M;j++) @{ - S1(i = c1) ; -@} -c1 = M ; -for (j=0;j<=N+c1;j++) @{ - S1(i = c1) ; -@} -@end group -@end example - - -@node Statement Block -@subsection Statement Block @code{-block } - - @code{-block }: this option allows (@code{boolean=1}) to - create a statement block for each new iterator, even if there is only - an equality. This can be useful in order to parse the generated - pseudo-code. When @code{boolean} is set to 0 or when the generation - language is FORTRAN, this feature is disabled. Default value is 0. -@example -@group -/* Generated using a given input file and @strong{option -block 0} */ -i = M+2 ; -j = N ; -S1 ; -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -block 1} */ -@{ i = M+2 ; - @{ j = N ; - S1 ; - @} -@} -@end group -@end example - - -@node Loop Strides -@subsection Loop Strides @code{-strides } - - @code{-strides }: this options allows (@code{boolean=1}) to - handle non-unit strides for loop increments. This can remove a lot of - guards and make the generated code more efficient. Default value is 0. -@example -@group -/* Generated using a given input file and @strong{option -strides 0} */ -for (i=1;i<=n;i++) @{ - if (i%2 == 0) @{ - S1(j = i/2) ; - @} - if (i%4 == 0) @{ - S2(j = i/4) ; - @} -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -strides 1} */ -for (i=2;i<=n;i+=2) @{ - S1(j = i/2) ; - if (i%4 == 0) @{ - S2(j = i/4) ; - @} -@} -@end group -@end example - - -@node Unrolling -@subsection First Depth to Unroll @code{-first-unroll } - - @code{-first-unroll }: this option sets the first loop depth - to unroll. Note that a loop is only unrolled when it is supported - by the backend. In case of the isl backend, a loop is unrolled - if it has a lower bound that can only be incremented - a fixed (non-parametric) amount of times. - - -@node Compilable Code -@subsection Compilable Code @code{-compilable } - - @code{-compilable }: this options allows (@code{value} is not 0) - to generate a compilable code where all parameters have the integral value - @code{value}. This option creates a macro for each statement. Since - CLooG do not know anything about the statement sources, it fills the - macros with a basic increment that computes the total number of - scanned integral points. The user may change easily the macros according - to his own needs. This option is possible only if the generated code is - in C. Default value is 0. -@example -@group -/* Generated using a given input file and @strong{option -compilable 0} */ -for (i=0;i<=n;i++) @{ - for (j=0;j<=n;j++) @{ - S1 ; - S2 ; - @} - S3 ; -@} -@end group -@end example -@example -/* Generated using the same input file but @strong{option -compilable 10} */ -/* DON'T FORGET TO USE -lm OPTION TO COMPILE. */ - -/* Useful headers. */ -#include -#include -#include - -/* Parameter value. */ -#define PARVAL 10 - -/* Statement macros (please set). */ -#define S1(i,j) @{total++;@} -#define S2(i,j) @{total++;@} -#define S3(i) @{total++;@} - -int main() @{ - /* Original iterators. */ - int i, j ; - /* Parameters. */ - int n=PARVAL, total=0 ; - - for (i=0;i<=n;i++) @{ - for (j=0;j<=n;j++) @{ - S1(i,j) ; - S2(i,j) ; - @} - S3(i) ; - @} - - printf("Number of integral points: %d.\n",total) ; - return 0 ; -@} -@end example - -@node Callable Code -@subsection Callable Code @code{-callable } - - @code{-callable }: if @code{boolean=1}, then a @code{test} - function will be generated that has the parameters as arguments. - Similarly to the @code{-compilable} option, - a macro for each statement is generated. The generated definitions of - these macros are as used during the correctness testing, but they - can easily be changed by the user to suit her own needs. - This option is only available if the target language is C. - The default value is 0. - -@example -/* Generated from double.cloog with @strong{option -callable 0} */ -for (i=0;i<=M;i++) @{ - S1 ; - for (j=0;j<=N;j++) @{ - S2 ; - S3 ; - @} - S4 ; -@} -@end example -@example -/* Generated from double.cloog with @strong{option -callable 1} */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? ((n)-(d)+1)/(d) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? (n)/(d) : ((n)+(d)+1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) @{ hash(1); hash(i); @} -#define S2(i,j) @{ hash(2); hash(i); hash(j); @} -#define S3(i,j) @{ hash(3); hash(i); hash(j); @} -#define S4(i) @{ hash(4); hash(i); @} - -void test(int M, int N) -@{ - /* Original iterators. */ - int i, j; - for (i=0;i<=M;i++) @{ - S1(i) ; - for (j=0;j<=N;j++) @{ - S2(i,j) ; - S3(i,j) ; - @} - S4(i) ; - @} -@} -@end example - -@node Output -@subsection Output @code{-o } - - @code{-o }: this option sets the output file. @code{stdout} is a - special value: when used, output is standard output. - Default value is @code{stdout}. - -@node Help -@subsection Help @code{--help} or @code{-h} - - @code{--help} or @code{-h}: this option ask CLooG to print a short help. - -@node Version -@subsection Version @code{--version} or @code{-v} - - @code{--version} or @code{-v}: this option ask CLooG to print some version - informations. - -@node Quiet -@subsection Quiet @code{--quiet} or @code{-q} - - @code{--quiet} or @code{-q}: this option tells CLooG not to print - any informational messages. - - -@c %/************************************************************************* -@c % * A Full Example * -@c % *************************************************************************/ -@node Full Example -@section A Full Example - -Let us consider the allocation problem of a Gaussian elimination, i.e. we want -to distribute the various statement instances of the compute kernel onto -different processors. The original code is the following: -@example -@group -for (i=1;j<=N-1;i++) @{ - for (j=i+1;j<=N;j++) @{ - c[i][j] = a[j][i]/a[i][i] ; /* S1 */ - for (k=i+1;k<=N;k++) @{ - a[j][k] -= c[i][j]*a[i][k] ; /* S2 */ - @} - @} -@} -@end group -@end example - -@noindent The best affine allocation functions can be found by any good automatic -parallelizer like LooPo (@pxref{Gri04}): - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (i)$\cr - \theta _{S2}(i,j,k)^T &$= (k)$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (i) -T_S2(i,j,k)^T = (k) -@end group -@end example -@end ifnottex - -@noindent To ensure that on each processor, the set of statement instances is -executed according to the original ordering, we add as minor scattering -dimensions the original scheduling (@pxref{Scattering}): - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (i,0,i,0,j,0)^T$\cr - \theta _{S2}(i,j,k)^T &$= (k,0,i,0,j,1,k,0)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (i,0,i,0,j,0)^T -T_S2(i,j,k)^T = (k,0,i,0,j,1,k,0)^T -@end group -@end example -@end ifnottex - -@noindent To ensure that the scattering functions have the same dimensionality, we -complete the first function with zeroes -(this is a CLooG @value{VERSION} and previous versions requirement, -it should be removed in a future version, don't worry it's absolutely legal !): - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (i,0,i,0,j,0,0,0)^T$\cr - \theta _{S2}(i,j,k)^T &$= (k,0,i,0,j,1,k,0)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (i,0,i,0,j,0,0,0)^T -T_S2(i,j,k)^T = (k,0,i,0,j,1,k,0)^T -@end group -@end example -@end ifnottex - -@noindent The input file corresponding to this code generation problem -could be (this file is provided in the CLooG distribution -as @code{test/manual_gauss.cloog}: - -@example -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no constraints on one parameter) -1 3 # 1 line and 3 columns -# eq/in n 1 - 1 0 0 # 0 >= 0, always true - -1 # We want to set manually the parameter name -n # parameter name - -# --------------------- STATEMENTS -------------------- -2 # Number of statements - -1 # First statement: one domain -4 5 # 4 lines and 3 columns -# eq/in i j n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 -1 # i <= n-1 - 1 -1 1 0 -1 # j >= i+1 - 1 0 -1 1 0 # j <= n -0 0 0 # for future options - -1 -# Second statement: one domain -6 6 # 6 lines and 3 columns -# eq/in i j k n 1 - 1 1 0 0 0 -1 # i >= 1 - 1 -1 0 0 1 -1 # i <= n-1 - 1 -1 1 0 0 -1 # j >= i+1 - 1 0 -1 0 1 0 # j <= n - 1 -1 0 1 0 -1 # k >= i+1 - 1 0 0 -1 1 0 # k <= n -0 0 0 # for future options - -0 # We let CLooG set the iterator names - -# --------------------- SCATTERING -------------------- -2 # Scattering functions -# First function -8 13 # 3 lines and 3 columns -# eq/in p1 p2 p3 p4 p5 p6 p7 p8 i j n 1 - 0 1 0 0 0 0 0 0 0 -1 0 0 0 # p1 = i - 0 0 1 0 0 0 0 0 0 0 0 0 0 # p2 = 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 # p3 = i - 0 0 0 0 1 0 0 0 0 0 0 0 0 # p4 = 0 - 0 0 0 0 0 1 0 0 0 0 -1 0 0 # p5 = j - 0 0 0 0 0 0 1 0 0 0 0 0 0 # p6 = 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 # p7 = 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 # p8 = 0 -# Second function -8 14 # 3 lines and 3 columns -# eq/in p1 p2 p3 p4 p5 p6 p7 p8 i j k n 1 - 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 # p1 = k - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # p2 = 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # p3 = i - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # p4 = 0 - 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 # p5 = j - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 # p6 = 1 - 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 # p7 = k - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # p8 = 0 - -1 # We want to set manually the scattering dimension names -p1 p2 p3 p4 p5 p6 p7 p8 # scattering dimension names -@end example - -Calling CLooG, with for instance the command line -@code{cloog -fsp 2 gauss.cloog} for a better view -of the allocation (the processor number is given by @code{p1}), -will result on the following target code that actually implements -the transformation. A minor processing on the dimension @code{p1} -to implement, e.g., MPI calls, which is not shown here may -result in dramatic speedups ! - -@example -if (n >= 2) @{ - p1 = 1 ; - for (p5=2;p5<=n;p5++) @{ - S1(i = 1,j = p5) ; - @} -@} -for (p1=2;p1<=n-1;p1++) @{ - for (p3=1;p3<=p1-1;p3++) @{ - for (p5=p3+1;p5<=n;p5++) @{ - S2(i = p3,j = p5,k = p1) ; - @} - @} - for (p5=p1+1;p5<=n;p5++) @{ - S1(i = p1,j = p5) ; - @} -@} -if (n >= 2) @{ - p1 = n ; - for (p3=1;p3<=n-1;p3++) @{ - for (p5=p3+1;p5<=n;p5++) @{ - S2(i = p3,j = p5,k = n) ; - @} - @} -@} -@end example - - -@c %/************************************************************************* -@c % * A Full Example * -@c % *************************************************************************/ -@node CLooG Library -@chapter Using the CLooG Library -The CLooG Library was implemented to allow the user to call CLooG -directly from his programs, without file accesses or system calls. The -user only needs to link his programs with C libraries. The CLooG -library mainly provides one function (@code{cloog_clast_create_from_input}) -which takes as input the problem -description with some options, and returns the data structure corresponding -to the generated code (a @code{struct clast_stmt} structure) -which is more or less an abstract syntax tree. -The user can work with this data structure and/or use -our pretty printing function to write the final code in either C or FORTRAN. -Some other functions are provided for convenience reasons. -These functions as well as the data structures are described in this section. - -@menu -* CLooG Data Structures:: -* CLooG Output:: -* Retrieving version information:: -* Example of Library Utilization:: -@end menu - - -@node CLooG Data Structures -@section CLooG Data Structures Description -In this section, we describe the data structures used by the loop -generator to represent and to process a code generation problem. - -@menu -* CloogState:: -* CloogMatrix:: -* CloogDomain:: -* CloogScattering:: -* CloogUnionDomain:: -* CloogStatement:: -* CloogOptions:: -* CloogInput:: -@end menu - - -@node CloogState -@subsection CloogState -@example -@group -CloogState *cloog_state_malloc(void); -void cloog_state_free(CloogState *state); -@end group -@end example - -@noindent The @code{CloogState} structure is (implicitly) needed to perform -any CLooG operation. It should be created using @code{cloog_state_malloc} -before any other CLooG objects are created and destroyed using -@code{cloog_state_free} after all objects have been freed. -It is allowed to use more than one @code{CloogState} structure at -the same time, but an object created within the state of a one -@code{CloogState} structure is not allowed to interact with an object -created within the state of an other @code{CloogState} structure. - - -@node CloogMatrix -@subsection CloogMatrix - -@noindent The @code{CloogMatrix} structure is equivalent to the PolyLib -@code{Matrix} data structure (@pxref{Wil93}). This structure is devoted to -represent a set of constraints. - -@example -@group -struct cloogmatrix -@{ unsigned NbRows ; /* Number of rows. */ - unsigned NbColumns ; /* Number of columns. */ - cloog_int_t **p; /* Array of pointers to the matrix rows. */ - cloog_int_t *p_Init; /* Matrix rows contiguously in memory. */ -@}; -typedef struct cloogmatrix CloogMatrix; - -CloogMatrix *cloog_matrix_alloc(unsigned NbRows, unsigned NbColumns); -void cloog_matrix_print(FILE *foo, CloogMatrix *m); -void cloog_matrix_free(CloogMatrix *matrix); -@end group -@end example - -@noindent The whole matrix is stored in memory row after row at the -@code{p_Init} address. @code{p} is an array of pointers where -@code{p[i]} points to the first element of the @math{i^{th}} row. -@code{NbRows} and @code{NbColumns} are respectively the number of -rows and columns of the matrix. -Each row corresponds to a constraint. The first element of each row is an -equality/inequality tag. The -constraint is an equality @math{p(x) = 0} if the first element is 0, but it is -an inequality @math{p(x) \geq 0} if the first element is 1. -The next elements are the coefficients of the unknowns, -followed by the coefficients of the parameters, and finally the constant term. -For instance, the following three constraints: - -@tex -$$ -\hbox{$ \cases{ -i + m &$= 0$\cr - -j + n &$\geq 0$\cr - j + i - k &$\geq 0$}$} -$$ -@end tex - -@ifnottex -@example -@group - -i + m = 0 - -j + n >= 0 - i + j - k >= 0 -@end group -@end example -@end ifnottex - -@noindent would be represented by the following rows: - -@example -@group -# eq/in i j k m n cst - 0 0 -1 0 1 0 0 - 1 -1 0 0 0 1 0 - 1 1 1 -1 0 0 0 -@end group -@end example - -@noindent To be able to provide different precision version (CLooG -supports 32 bits, 64 bits and arbitrary precision through the GMP library), -the @code{cloog_int_t} type depends on the configuration options (it may be -@code{long int} for 32 bits version, @code{long long int} for 64 bits version, -and @code{mpz_t} for multiple precision version). - -@node CloogDomain -@subsection CloogDomain -@example -@group -CloogDomain *cloog_domain_union_read(CloogState *state, - FILE *input, int nb_parameters); -CloogDomain *cloog_domain_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_par); -void cloog_domain_free(CloogDomain *domain); -@end group -@end example - -@noindent @code{CloogDomain} is an opaque type representing a polyhedral -domain (a union of polyhedra). -A @code{CloogDomain} can be read -from a file using @code{cloog_domain_union_read} or -converted from a @code{CloogMatrix}. -The input format for @code{cloog_domain_union_read} -is that of @ref{Domain Representation}. -The function @code{cloog_domain_from_cloog_matrix} takes a @code{CloogState}, a -@code{CloogMatrix} and @code{int} as input and returns a pointer to a -@code{CloogDomain}. @code{matrix} describes the domain and @code{nb_par} is the -number of parameters in this domain. The input data structures are neither -modified nor freed. -The @code{CloogDomain} can be freed using @code{cloog_domain_free}. -There are also some backend dependent functions for creating -@code{CloogDomain}s. - -@menu -* CloogDomain/PolyLib:: -* CloogDomain/isl:: -@end menu - -@node CloogDomain/PolyLib -@subsubsection PolyLib - -@example -#include -CloogDomain *cloog_domain_from_polylib_polyhedron(CloogState *state, - Polyhedron *, int nb_par); -@end example -@noindent -The function @code{cloog_domain_from_polylib_polyhedron} takes a PolyLib -@code{Polyhedron} as input and returns a pointer to a @code{CloogDomain}. -The @code{nb_par} parameter indicates the number of parameters -in the domain. The input data structure if neither modified nor freed. - -@node CloogDomain/isl -@subsubsection isl - -@example -#include -CloogDomain *cloog_domain_from_isl_set(struct isl_set *set); -__isl_give isl_set *isl_set_from_cloog_domain(CloogDomain *domain); -@end example -@noindent -The function @code{cloog_domain_from_isl_set} takes a -@code{struct isl_set} as input and returns a pointer to a @code{CloogDomain}. -The function consumes a reference to the given @code{struct isl_set}. -Similarly, @code{isl_set_from_cloog_domain} consumes a reference -to a @code{CloogDomain} and returns an @code{isl_set}. - - -@node CloogScattering -@subsection CloogScattering -@example -@group -CloogScattering *cloog_domain_read_scattering(CloogDomain *domain, - FILE *foo); -CloogScattering *cloog_scattering_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_scat, int nb_par); -void cloog_scattering_free(CloogScattering *); -@end group -@end example - -@noindent -The @code{CloogScattering} type represents a scattering function. -A @code{CloogScattering} for a given @code{CloogDomain} can be read -from a file using @code{cloog_scattering_read} or converted -from a @code{CloogMatrix} using @code{cloog_scattering_from_cloog_matrix}. -The function @code{cloog_scattering_from_cloog_matrix} takes a -@code{CloogState}, a @code{CloogMatrix} and two @code{int}s as input and -returns a -pointer to a @code{CloogScattering}. -@code{matrix} describes the scattering, while @code{nb_scat} and -@code{nb_par} are the number of scattering dimensions and -the number of parameters, respectively. The input data structures are -neither modified nor freed. -A @code{CloogScattering} can be freed using @code{cloog_scattering_free}. -There are also some backend dependent functions for creating -@code{CloogScattering}s. - -@menu -* CloogScattering/PolyLib:: -* CloogScattering/isl:: -@end menu - -@node CloogScattering/PolyLib -@subsubsection PolyLib - -@example -#include -CloogScattering *cloog_scattering_from_polylib_polyhedron( - CloogState *state, Polyhedron *polyhedron, int nb_par); -@end example -@noindent -The function @code{cloog_scattering_from_polylib_polyhedron} takes a PolyLib -@code{Polyhedron} as input and returns a pointer to a @code{CloogScattering}. -The @code{nb_par} parameter indicates the number of parameters -in the domain. The input data structure if neither modified nor freed. - -@node CloogScattering/isl -@subsubsection isl - -@example -#include -CloogScattering *cloog_scattering_from_isl_map(struct isl_map *map); -@end example -@noindent -The function @code{cloog_scattering_from_isl_map} takes a -@code{struct isl_map} as input and returns a pointer to a @code{CloogScattering}. -The output dimensions of the @code{struct isl_map} correspond to the -scattering dimensions, while the input dimensions correspond to the -domain dimensions. -The function consumes a reference to the given @code{struct isl_map}. - - -@node CloogUnionDomain -@subsection CloogUnionDomain -@example -@group -enum cloog_dim_type @{ CLOOG_PARAM, CLOOG_ITER, CLOOG_SCAT @}; - -CloogUnionDomain *cloog_union_domain_alloc(int nb_par); -CloogUnionDomain *cloog_union_domain_add_domain(CloogUnionDomain *ud, - const char *name, CloogDomain *domain, - CloogScattering *scattering, void *usr); -CloogUnionDomain *cloog_union_domain_set_name(CloogUnionDomain *ud, - enum cloog_dim_type type, int index, const char *name); -void cloog_union_domain_free(CloogUnionDomain *ud); -@end group -@end example - -@noindent A @code{CloogUnionDomain} structure represents a union -of scattered named domains. A @code{CloogUnionDomain} is -initialized by a call to @code{cloog_union_domain_alloc}, -after which domains can be added using @code{cloog_union_domain_add_domain}. - -@code{cloog_union_domain_alloc} takes the number of parameters as input. -@code{cloog_union_domain_add_domain} takes a previously created -@code{CloogUnionDomain} as input along with an optional name, -a domain, an optional scattering function and a user pointer. -The name may be @code{NULL} and is duplicated if it is not. -If no name is specified, then the statements will be named according -to the order in which they were added. -@code{domain} and @code{scattering} are taken over -by the @code{CloogUnionDomain}. @code{scattering} may be @code{NULL}, -but it must be consistently @code{NULL} or not over all calls -to @code{cloog_union_domain_add_domain}. -@code{cloog_union_domain_set_name} can be used to set the names -of parameters, iterators and scattering dimensions. -The names of iterators and scattering dimensions can only be set -after all domains have been added. - -There is also a backend dependent function for creating -@code{CloogUnionDomain}s. - -@menu -* CloogUnionDomain/isl:: -@end menu - -@node CloogUnionDomain/isl -@subsubsection isl - -@example -#include -CloogUnionDomain *cloog_union_domain_from_isl_union_map( - __isl_take isl_union_map *umap); -CloogUnionDomain *cloog_union_domain_from_isl_union_set( - __isl_take isl_union_set *uset); -@end example -@noindent -The function @code{cloog_union_domain_from_isl_union_map} takes a -@code{isl_union_map} as input and returns a pointer -to a @code{CloogUnionDomain}. -The input is a mapping from different -spaces (different tuple names and possibly different dimensions) -to a common space. The iteration domains are set to the domains -in each space. The statement names are set to the names of the -spaces. The parameter names of the result are set to those of -the input, but the iterator and scattering dimension names are -left unspecified. -The function consumes a reference to the given @code{isl_union_map}. -The function @code{cloog_union_domain_from_isl_union_set} is similar, -but takes unscattered domains as input. - - -@node CloogStatement -@subsection CloogStatement -@example -@group -struct cloogstatement -@{ int number ; /* The statement unique number. */ - char *name; /* Name of the statement. */ - void * usr ; /* Pointer for user's convenience. */ - struct cloogstatement * next ;/* Next element of the linked list. */ -@} ; -typedef struct cloogstatement CloogStatement ; - -CloogStatement *cloog_statement_malloc(CloogState *state); -void cloog_statement_print(FILE *, CloogStatement *); -void cloog_statement_free(CloogStatement *); -@end group -@end example - -@noindent The @code{CloogStatement} structure represents a @code{NULL} -terminated linked -list of statements. In CLooG, a statement is only defined by its unique -number (@code{number}). The user can use the pointer @code{usr} for his -own convenience to link his own statement representation to the -corresponding @code{CloogStatement} structure. The whole management of the -@code{usr} pointer is under the responsibility of the user, in particular, -CLooG never tries to print, to allocate or to free a memory block pointed -by @code{usr}. - - - -@node CloogOptions -@subsection CloogOptions -@example -@group -struct cloogoptions -@{ int l ; /* -l option. */ - int f ; /* -f option. */ - int strides ; /* -strides option. */ - int sh ; /* -sh option. */ - int first_unroll; /* First level to unroll. */ - int esp ; /* -esp option. */ - int fsp ; /* -fsp option. */ - int otl ; /* -otl option. */ - int block ; /* -block option. */ - int compilable ; /* -compilable option. */ - int language; /* LANGUAGE_C or LANGUAGE_FORTRAN */ - int save_domains; /* Save unsimplified copy of domain. */ -@} ; -typedef struct cloogoptions CloogOptions ; - -CloogOptions *cloog_options_malloc(CloogState *state); -void cloog_options_print(FILE *foo, CloogOptions *options); -void cloog_options_free(CloogOptions *options); -@end group -@end example - -@noindent The @code{CloogOptions} structure contains all the possible options to -rule CLooG's behaviour (@pxref{Calling CLooG}). -As a reminder, the default values are: -@itemize @bullet -@item @math{l = -1} (optimize control until the innermost loops), -@item @math{f = 1} (optimize control from the outermost loops), -@item @math{strides = 0} (use only unit strides), -@item @math{sh = 0} (do not compute simple convex hulls), -@item @math{first_unroll = -1} (do not perform unrolling), -@item @math{esp = 1} (spread complex equalities), -@item @math{fsp = 1} (start to spread from the first iterators), -@item @math{otl = 1} (simplify loops running only once). -@item @math{block = 0} (do not make statement blocks when not necessary). -@item @math{compilable = 0} (do not generate a compilable code). -@end itemize - -The @code{save_domains} option is only useful for users of the CLooG -library. This option defaults to 0, but when it is set, the @code{domain} -field of each @code{clast_user_stmt} will be set to the set of values for the -scattering dimensions for which this instance of the user statement is executed. -The @code{domain} field of each @code{clast_for} contains the set of values for -the scattering dimensions for which an instance of a user statement is executed -inside the @code{clast_for}. It is only available if the @code{clast_for} -enumerates a scattering dimension. - -@node CloogInput -@subsection CloogInput -@example -@group -CloogInput *cloog_input_read(FILE *file, CloogOptions *options); -CloogInput *cloog_input_alloc(CloogDomain *context, - CloogUnionDomain *ud); -void cloog_input_free(CloogInput *input); - -void cloog_input_dump_cloog(FILE *, CloogInput *, CloogOptions *); -@end group -@end example - -@noindent A @code{CloogInput} structure represents the input to CLooG. -It is essentially a @code{CloogUnionDomain} along with a context -@code{CloogDomain}. A @code{CloogInput} can be created from -a @code{CloogDomain} and a @code{CloogUnionDomains} using -@code{cloog_input_alloc}, or it can be read from a CLooG input -file using @code{cloog_input_read}. The latter also modifies -the @code{language} field of the @code{CloogOptions} structure. -The constructed @code{CloogInput} can be used as input -to a @code{cloog_clast_create_from_input} call. - -A @code{CloogInput} data structure and a @code{CloogOptions} contain -the same information as a .cloog file. This function dumps the .cloog -description of the given data structures into a file. - -@node Dump CLooG Input File Function -@subsection Dump CLooG Input File Function -@example -@end example - -@node CLooG Output -@section CLooG Output - -@noindent -Given a description of the input, -an AST corresponding to the @code{CloogInput} can be constructed -using @code{cloog_clast_create_from_input} and destroyed using -@code{free_clast_stmt}. -@example -struct clast_stmt *cloog_clast_create_from_input(CloogInput *input, - CloogOptions *options); -void free_clast_stmt(struct clast_stmt *s); -@end example -@noindent -@code{clast_stmt} represents a linked list of ``statements''. -@example -struct clast_stmt @{ - const struct clast_stmt_op *op; - struct clast_stmt *next; -@}; -@end example -@noindent -The entries in the list are not of type @code{clast_stmt} itself, -but of some larger type. The following statement types are defined -by CLooG. - -@example -struct clast_root @{ - struct clast_stmt stmt; - CloogNames * names; -@}; -struct clast_root *new_clast_root(CloogNames *names); - -struct clast_assignment @{ - struct clast_stmt stmt; - const char * LHS; - struct clast_expr * RHS; -@}; -struct clast_assignment *new_clast_assignment(const char *lhs, - struct clast_expr *rhs); - -struct clast_block @{ - struct clast_stmt stmt; - struct clast_stmt * body; -@}; -struct clast_block *new_clast_block(void); - -struct clast_user_stmt @{ - struct clast_stmt stmt; - CloogDomain * domain; - CloogStatement * statement; - struct clast_stmt * substitutions; -@}; -struct clast_user_stmt *new_clast_user_stmt(CloogDomain *domain, - CloogStatement *stmt, struct clast_stmt *subs); - -struct clast_for @{ - struct clast_stmt stmt; - CloogDomain * domain; - const char * iterator; - struct clast_expr * LB; - struct clast_expr * UB; - cloog_int_t stride; - struct clast_stmt * body; -@}; -struct clast_for *new_clast_for(CloogDomain *domain, const char *it, - struct clast_expr *LB, struct clast_expr *UB, - cloog_int_t stride); - -struct clast_guard @{ - struct clast_stmt stmt; - struct clast_stmt * then; - int n; - struct clast_equation eq[1]; -@}; -struct clast_guard *new_clast_guard(int n); -@end example -@noindent -The @code{clast_stmt} returned by @code{cloog_clast_create} -is a @code{clast_root}. -It contains a placeholder for all the variable names that appear -in the AST and a (list of) nested statement(s). - -@noindent -A @code{clast_assignment} assigns the value given by -the @code{clast_expr} @code{RHS} to a variable named @code{LHS}. - -@noindent -A @code{clast_block} groups a list of statements into one statement. -These statements are only generated if the @code{block} option is set, -@pxref{Statement Block} and @ref{CloogOptions}. - -@noindent -A @code{clast_user_stmt} represents a call to a statement specified -by the user, @pxref{CloogStatement}. -@code{substitutions} is a list of @code{clast_assignment} statements -assigning an expression in terms of the scattering dimensions to -each of the original iterators in the original order. -The @code{LHS}s of these assignments are left blank (@code{NULL}). -The @code{domain} is set to @code{NULL} if the @code{save_domains} option -is not set. Otherwise, it is set to the set -of values for the scattering dimensions -for which this instance of the user statement is executed. -Note that unless the @code{noscalars} option has been set, the -constant scattering dimensions may have been removed from this set. - -@noindent -A @code{clast_for} represents a for loop, iterating @code{body} for each -value of @code{iterator} between @code{LB} and @code{UB} in steps -of size @code{stride}. -The @code{domain} is set to @code{NULL} if the @code{save_domains} option is not -set. Otherwise, it is set to the set of values for the scattering dimensions -for which a user statement is executed inside this @code{clast_for}. Note that -unless the @code{noscalars} option has been set, the constant scattering -dimensions may have been removed from this set. - -@noindent -A @code{clast_guard} represents the guarded execution of the @code{then} -(list of) statement(s) by a conjunction of @code{n} (in)equalities. -Each (in)equality is represented by a @code{clast_equation}. -@example -struct clast_equation @{ - struct clast_expr * LHS; - struct clast_expr * RHS; - int sign; -@}; -@end example -@noindent -The condition expressed by a @code{clast_equation} is -@code{LHS <= RHS}, @code{LHS == RHS} or @code{LHS >= RHS} -depending on whether @code{sign} is less than zero, equal -to zero, or greater than zero. - -The dynamic type of a @code{clast_stmt} can be determined -using the macro @code{CLAST_STMT_IS_A(stmt,type)}, -where @code{stmt} is a pointer to a @code{clast_stmt} -and @code{type} is one of @code{stmt_root}, @code{stmt_ass}, -@code{stmt_user}, @code{stmt_block}, @code{stmt_for} or -@code{stmt_guard}. -Users are allowed to define their own statement types by -assigning the @code{op} field of the statements a pointer -to a @code{clast_stmt_op} structure. -@example -struct clast_stmt_op @{ - void (*free)(struct clast_stmt *); -@}; -@end example -@noindent -The @code{free} field of this structure should point -to a function that frees the user defined statement. - -@noindent -A @code{clast_expr} can be an identifier, a term, -a binary expression or a reduction. -@example -enum clast_expr_type @{ - clast_expr_name, - clast_expr_term, - clast_expr_bin, - clast_expr_red -@}; -struct clast_expr @{ - enum clast_expr_type type; -@}; -void free_clast_expr(struct clast_expr *e); -@end example - -@noindent -Identifiers are of subtype @code{clast_name}. -@example -struct clast_name @{ - struct clast_expr expr; - const char * name; -@}; -struct clast_name *new_clast_name(const char *name); -void free_clast_name(struct clast_name *t); -@end example -@noindent -The character string pointed to by @code{name} is -assumed to be part of the @code{CloogNames} structure -in the root of the clast as is therefore not copied. - -@noindent -Terms are of type @code{clast_term}. -@example -struct clast_term @{ - struct clast_expr expr; - cloog_int_t val; - struct clast_expr *var; -@}; -struct clast_term *new_clast_term(cloog_int_t c, struct clast_expr *v); -void free_clast_term(struct clast_term *t); -@end example -@noindent -If @code{var} is set to @code{NULL}, then the term represents -the integer value @code{val}. Otherwise, it represents -the term @code{val * var}. -@code{new_clast_term} simply copies the @code{v} pointer -without copying the underlying @code{clast_expr}. -@code{free_clast_term}, on the other hand, recursively frees -@code{var}. - -@noindent -Binary expressions are of type @code{clast_bin_type} and -represent either the floor of a division (fdiv), -the ceil of a division (cdiv), an exact division or -the remainder of an fdiv. -@example -enum clast_bin_type @{ clast_bin_fdiv, clast_bin_cdiv, - clast_bin_div, clast_bin_mod @}; -struct clast_binary @{ - struct clast_expr expr; - enum clast_bin_type type; - struct clast_expr* LHS; - cloog_int_t RHS; -@}; -struct clast_binary *new_clast_binary(enum clast_bin_type t, - struct clast_expr *lhs, cloog_int_t rhs); -void free_clast_binary(struct clast_binary *b); -@end example - -@noindent -Reductions are of type @code{clast_reduction} and -can represent either the sum, the minimum or the maximum -of its elements. -@example -enum clast_red_type @{ clast_red_sum, clast_red_min, clast_red_max @}; -struct clast_reduction @{ - struct clast_expr expr; - enum clast_red_type type; - int n; - struct clast_expr* elts[1]; -@}; -struct clast_reduction *new_clast_reduction(enum clast_red_type t, - int n); -void free_clast_reduction(struct clast_reduction *r); -@end example - -@node Retrieving version information -@section Retrieving version information -CLooG provides static and dynamic version checks to assist on -including a compatible version of the library. -A static version check at compile time can be achieved by -querying the version constants defined in @code{version.h}: - -@itemize @bullet -@item @code{CLOOG_VERSION_MAJOR} -@item @code{CLOOG_VERSION_MINOR} -@item @code{CLOOG_VERSION_REVISION} -@end itemize - -This way it is possible to ensure the included headers are of the -correct version. It is still possible that the installed CLooG -library version differs from the installed headers. -In order to avoid this, a dynamic version check is provided with -the functions: - -@example -@group -int cloog_version_major(void); -int cloog_version_minor(void); -int cloog_version_revision(void); -@end group -@end example - -By using both the static and the dynamic version check, it is possible -to match CLooG's header version with the library's version. - -@node Example of Library Utilization -@section Example of Library Utilization -Here is a basic example showing how it is possible to use the CLooG library, -assuming that a standard installation has been done. -The following C program reads a CLooG input file on the standard input, -then prints the solution on the standard output. -Options are preselected to the default values of the CLooG software. -This example is provided in the @code{example} directory of the -CLooG distribution. -@example -/* example.c */ -# include -# include - -int main() -@{ - CloogState *state; - CloogInput *input; - CloogOptions * options ; - struct clast_stmt *root; - - /* Setting options and reading program informations. */ - state = cloog_state_malloc(); - options = cloog_options_malloc(state); - input = cloog_input_read(stdin, options); - - /* Generating and printing the code. */ - root = cloog_clast_create_from_input(input, options); - clast_pprint(stdout, root, 0, options); - - cloog_clast_free(root); - cloog_options_free(options) ; - cloog_state_free(state); - return 0; -@} -@end example - -@noindent The compilation command could be: -@example -gcc example.c -lcloog -o example -@end example -@noindent A calling command with the input file test.cloog could be: -@example -more test.cloog | ./example -@end example - - -@c % ******************************** HACKING ********************************* -@c @node Hacking -@c @chapter Hacking CLooG - -@c @menu -@c * Program organization:: -@c * Special Options:: -@c * CLooG Coding Standards:: -@c @end menu - -@c @node Program organization -@c @section Program organization - -@c @node Special Options -@c @section Special Options - -@c @node CLooG Coding Standards -@c @section CLooG Coding Standards - - -@c % ****************************** INSTALLING ******************************** -@node Installing -@chapter Installing CLooG - -@menu -* License:: -* Requirements:: -* Basic Installation:: -* Optional Features:: -* Uninstallation:: -@end menu - -@node License -@section License -First of all, it would be very kind to refer the following paper in any -publication that result from the use of the CLooG software or its library, -@pxref{Bas04} (a bibtex entry is provided behind the title page of this -manual, along with copyright notice, and in the CLooG home -@code{http://www.CLooG.org}. - -This library 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 2.1 of the License, or (at your option) any later version. -This library 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 -Lesser General Public License for more details. -@code{http://www.gnu.org/licenses/lgpl-2.1.html} - -Note, though, that if you link CLooG against a GPL library such -as the PolyLib backend, then the combination becomes GPL too. -In particular, a CLooG library based on the PolyLib backend -is GPL version 2 only. -Since the isl backend is LGPL, linking against it does not affect -the license of CLooG. - - -@node Requirements -@section Requirements - -CLooG can be used with one of two possible backends, -one using isl and one using PolyLib. -The isl library is included in the CLooG distribution, -while the PolyLib library needs to be obtained separately. -On the other hand, isl requires GMP, while PolyLib can be -compiled with or without the use of GMP. -The user therefore needs to install at least one of -PolyLib or GMP. - -@menu -* PolyLib:: -* GMP Library:: -@end menu - - -@node PolyLib -@subsection PolyLib (optional) -To successfully install CLooG with the PolyLib backend, -the user first needs to install PolyLib -version 5.22.1 or above (default 64 bits version is satisfying -as well as 32 bits or GMP multiple precision version). -Polylib can be downloaded freely -at @code{http://icps.u-strasbg.fr/PolyLib/} or -@code{http://www.irisa.fr/polylib/}. Once downloaded and unpacked -(e.g. using the @samp{tar -zxvf polylib-5.22.3.tar.gz} command), -the user can compile -it by typing the following commands on the PolyLib's root directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -Alternatively, the latest development version can be obtained from the -git repository: -@itemize @bullet -@item @code{git clone git://repo.or.cz/polylib.git} -@item @code{cd polylib} -@item @code{./autogen.sh} -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -The PolyLib default installation is @code{/usr/local}. This directory may -not be inside your library path. To fix the problem, the user should set -@example -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib -@end example -@noindent if your shell is, e.g., bash or -@example -setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib -@end example -@noindent if your shell is, e.g., tcsh. Add the line to your .bashrc or .tcshrc (or -whatever convenient file) to make this change permanent. Another solution -is to ask PolyLib to install in the standard path by using the prefix -option of the configure script: -@samp{./configure --prefix=/usr}. - -CLooG makes intensive calls to polyhedral operations, and PolyLib -functions do the job. Polylib is a free library written in C for the -manipulation of polyhedra. The library is operating on objects like -vectors, matrices, lattices, polyhedra, Z-polyhedra, unions of -polyhedra and a lot of other intermediary structures. It provides -functions for all the important operations on these structures. - -@node GMP Library -@subsection GMP Library (optional) - -To be able to deal with insanely large coefficient, the user will need to -install the GNU Multiple Precision Library (GMP for short) version 4.1.4 -or above. It can be freely downloaded from @code{http://www.swox.com/gmp}. -Note that the isl backend currently requires GMP. -The user can compile GMP by typing the following commands on the GMP root -directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -The GMP default installation is @code{/usr/local}, the same method to -fix a library path problem applies as with PolyLib (@pxref{PolyLib}). - -If you want to use the PolyLib backend, then -PolyLib has to be built using the GMP library by specifying the option -@samp{--with-libgmp=PATH_TO_GMP} to the PolyLib configure script -(where @code{PATH_TO_GMP} is @code{/usr/local} if you did not change the GMP -installation directory). Then you have to set the convenient CLooG configure -script options to build the GMP version (@pxref{Optional Features}). - - -@node Basic Installation -@section CLooG Basic Installation - -Once downloaded and unpacked -(e.g. using the @samp{tar -zxvf cloog-@value{VERSION}.tar.gz} command), -you can compile CLooG by typing the following commands on the CLooG's root -directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -Alternatively, the latest development version can be obtained from the -git repository: -@itemize @bullet -@item @code{git clone git://repo.or.cz/cloog.git} -@item @code{cd cloog} -@item @code{./get_submodules.sh} -@item @code{./autogen.sh} -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -Depending on which backend you want to use and where they -are located, you may need to pass some -options to the configure script, @pxref{Optional Features}. - -The program binaries and object files can be removed from the -source code directory by typing @code{make clean}. To also remove the -files that the @code{configure} script created (so you can compile the -package for a different kind of computer) type @code{make distclean}. - -Both the CLooG software and library have been successfully compiled -on the following systems: -@itemize @bullet -@item PC's under Linux, with the @code{gcc} compiler, -@item PC's under Windows (Cygwin), with the @code{gcc} compiler, -@item Sparc and UltraSparc Stations, with the @code{gcc} compiler. -@end itemize - -@node Optional Features -@section Optional Features -The @code{configure} shell script attempts to guess correct values for -various system-dependent variables and user options used during compilation. -It uses those values to create the @code{Makefile}. Various user options -are provided by the CLooG's configure script. They are summarized in the -following list and may be printed by typing @code{./configure --help} in the -CLooG top-level directory. - -@itemize @bullet -@item By default, the installation directory is @code{/usr/local}: -@code{make install} will install the package's files in -@code{/usr/local/bin}, @code{/usr/local/lib} and @code{/usr/local/include}. -The user can specify an installation prefix other than @code{/usr/local} by -giving @code{configure} the option @code{--prefix=PATH}. - -@item By default, the isl backend will use the version of isl -that is @code{bundled} together with CLooG. -Using the @code{--with-isl} option of @code{configure} -the user can specify that @code{no} isl, -a previously installed (@code{system}) isl or a @code{build} isl -should be used. -In the latter case, the user should also specify the build location -using @code{--with-isl-builddir=PATH}. -In case of an installed isl, -the installation location can be specified using the -@code{--with-isl-prefix=PATH} and -@code{--with-isl-exec-prefix=PATH} options of @code{configure}. - -@item By default, the PolyLib backend will use an installed -(@code{system}) PolyLib, if any. -The installation location can be specified using the -@code{--with-polylib-prefix=PATH} and -@code{--with-polylib-exec-prefix=PATH} options of @code{configure}. -Using the @code{--with-polylib} option of @code{configure} -the user can specify that @code{no} PolyLib or a @code{build} PolyLib -should be used. -In the latter case, the user should also specify the build location -using @code{--with-polylib-builddir=PATH}. - -@item By default, the PolyLib backend of CLooG is built -in 64bits version if such version of the -PolyLib is found by @code{configure}. If the only existing version of the -PolyLib is the 32bits or if the user give to @code{configure} the option -@code{--with-bits=32}, the 32bits version of CLooG will be compiled. In the -same way, the option @code{--with-bits=gmp} have to be used to build -the multiple precision version. - -@item By default, @code{configure} will look for the GMP library -(necessary to build the multiple precision version) in standard -locations. If necessary, the user can specify the GMP path by giving -@code{configure} the option @code{--with-gmp-prefix=PATH} and/or -@code{--with-gmp-exec-prefix=PATH}. -@end itemize - -@node Uninstallation -@section Uninstallation -The user can easily remove the CLooG software and library from his system -by typing (as root if necessary) from the CLooG top-level directory -@code{make uninstall}. - -@c % **************************** DOCUMENTATION ****************************** -@node Documentation -@chapter Documentation -The CLooG distribution provides several documentation sources. First, the -source code itself is as documented as possible. The code comments use a -Doxygen-compatible presentation (something similar to what JavaDoc does for -JAVA). The user may install Doxygen -(see @code{http://www.stack.nl/~dimitri/doxygen}) to automatically -generate a technical documentation by typing @code{make doc} or -@code{doxygen ./autoconf/Doxyfile} at the CLooG top-level directory after -running the configure script (@pxref{Installing}). Doxygen will generate -documentation sources (in HTML, LaTeX and man) in the @code{doc/source} -directory of the CLooG distribution. - -The Texinfo sources of the present document are also provided in the @code{doc} -directory. You can build it in either DVI format (by typing -@code{texi2dvi cloog.texi}) or PDF format -(by typing @code{texi2pdf cloog.texi}) or HTML format -(by typing @code{makeinfo --html cloog.texi}, using @code{--no-split} -option to generate a single HTML file) or info format -(by typing @code{makeinfo cloog.texi}). - -@c % ****************************** REFERENCES ******************************** -@node References -@chapter References - -@itemize -@item -@anchor{Bas03a}[Bas03a] C. Bastoul, P. Feautrier. Improving data locality -by chunking. CC'12 International Conference on Compiler Construction, -LNCS 2622, pages 320-335, Warsaw, april 2003. - -@item -@anchor{Bas03b}[Bas03b] C. Bastoul. Efficient code generation for automatic -parallelization and optimization. ISPDC'03 IEEE International Symposium on -Parallel and Distributed Computing, pages 23-30, Ljubljana, october 2003. - -@item -@anchor{Bas04}[Bas04] C. Bastoul. Code Generation in the Polyhedral Model -Is Easier Than You Think. PACT'13 IEEE International Conference on Parallel -Architecture and Compilation Techniques, pages 7-16, Juan-les-Pins, -september 2004. - -@item -@anchor{Fea92}[Fea92] P. Feautrier Some efficient solutions to the affine -scheduling problem, part II: multidimensional time. -International Journal of Parallel Programming, 21(6):389--420, December 1992. - -@item -@anchor{Gri04}[Gri04] M. Griebl. Automatic parallelization of loop programs -for distributed memory architectures. Habilitation Thesis. Facult@"at f@"ur -Mathematik und Informatik, Universit@"at Passau, 2004. -@emph{http://www.infosun.fmi.uni-passau.de/cl/loopo/} - -@item -@anchor{Qui00}[Qui00] F. Quiller@'e, S. Rajopadhye, and D. Wilde. -Generation of efficient nested loops from polyhedra. -International Journal of Parallel Programming, 28(5):469-498, -october 2000. - -@item -@anchor{Wil93}[Wil93] Doran K. Wilde. -A library for doing polyhedral operations. -Technical Report 785, IRISA, Rennes, France, 1993. - -@end itemize - - - - -@c % /************************************************************************* -@c % * PART VI: END OF THE DOCUMENT * -@c % *************************************************************************/ -@c @unnumbered Index - -@c @printindex cp - -@bye diff --git a/cloog-0.16.3/doc/images/basic.eps b/cloog-0.16.3/doc/images/basic.eps deleted file mode 100644 index 0cc049736ce9920a33a8db6edb294966b970fc4e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/images/basic.eps +++ /dev/null @@ -1,402 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: basic.fig -%%Creator: fig2dev Version 3.2 Patchlevel 4 -%%CreationDate: Thu Nov 17 16:54:54 2005 -%%For: bastoul@ulysse.futurs.inria.fr (Cedric Bastoul) -%%BoundingBox: 0 0 445 301 -%%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 301 moveto 0 0 lineto 445 0 lineto 445 301 lineto closepath clip newpath --153.0 333.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def -/reencdict 12 dict def /ReEncode { reencdict begin -/newcodesandnames exch def /newfontname exch def /basefontname exch def -/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def -basefontdict { exch dup /FID ne { dup /Encoding eq -{ exch dup length array copy newfont 3 1 roll put } -{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall -newfont /FontName newfontname put newcodesandnames aload pop -128 1 255 { newfont /Encoding get exch /.notdef put } for -newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat -newfontname newfont definefont pop end } def -/isovec [ -8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde -8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis -8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron -8#220 /dotlessi 8#230 /oe 8#231 /OE -8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling -8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis -8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot -8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus -8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph -8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine -8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf -8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute -8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring -8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute -8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute -8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve -8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply -8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex -8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave -8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring -8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute -8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute -8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve -8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide -8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex -8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def -/Times-Bold /Times-Bold-iso isovec ReEncode -/Times-Roman /Times-Roman-iso isovec ReEncode - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -10 setmiterlimit -0 slj 0 slc - 0.06000 0.06000 sc -% -% Fig objects follow -% -% -% here starts figure with depth 51 -% Polyline -n 4200 1500 m 4200 3900 l 8400 3900 l 6000 1500 l - cp gs col7 0.75 shd ef gr -% Ellipse -7.500 slw - [15 45] 45 sd -1 slc -n 5400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 8400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Polyline -0 slc -gs clippath -9615 5160 m 9615 5040 l 9395 5040 l 9575 5100 l 9395 5160 l cp -eoclip -n 3000 5100 m - 9600 5100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 9395 5160 m 9575 5100 l 9395 5040 l 9395 5160 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -3060 885 m 2940 885 l 2940 1105 l 3000 925 l 3060 1105 l cp -eoclip -n 3000 5100 m - 3000 900 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3060 1105 m 3000 925 l 2940 1105 l 3060 1105 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -n 3000 4500 m - 2925 4500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3900 m - 2925 3900 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3300 m - 2925 3300 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3600 5100 m - 3600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4200 5100 m - 4200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 5400 5100 m - 5400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4800 5100 m - 4800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6000 5100 m - 6000 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6600 5100 m - 6600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2700 m - 2925 2700 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 1500 m - 2925 1500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2100 m - 2925 2100 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 1500 m - 9000 1500 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 8400 5100 m - 8400 900 l gs col0 s gr [] 0 sd -% Polyline -n 7200 5100 m - 7200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 7800 5100 m - 7800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 8400 5100 m - 8400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 3900 m - 9000 3900 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 5400 900 m - 9600 5100 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 4200 5100 m - 4200 900 l gs col0 s gr [] 0 sd -/Times-Bold-iso ff 390.00 scf sf -2625 4650 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2625 4050 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -3525 5550 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2700 1050 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -8025 825 m -gs 1 -1 sc (i<=n) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -4125 5550 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -8325 5550 m -gs 1 -1 sc (n) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2550 1575 m -gs 1 -1 sc (m) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -9075 3975 m -gs 1 -1 sc (j>=2) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -9075 1575 m -gs 1 -1 sc (j<=m) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -9450 5475 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -3825 825 m -gs 1 -1 sc (i>=2) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -4875 825 m -gs 1 -1 sc (j<=n+2-i) col0 sh gr -% here ends figure; -$F2psEnd -rs -showpage diff --git a/cloog-0.16.3/doc/images/basic.fig b/cloog-0.16.3/doc/images/basic.fig deleted file mode 100644 index 7fe0a9745f860ee30aa2d0e7a98d2eb0d92d6fce..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/images/basic.fig +++ /dev/null @@ -1,100 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3900 75 75 5400 3900 5400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3900 75 75 4800 3900 4800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3300 75 75 4200 3300 4200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3300 75 75 4800 3300 4800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2700 75 75 4200 2700 4200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3900 75 75 4200 3900 4200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3900 75 75 6000 3900 6000 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3900 75 75 6600 3900 6600 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 3900 75 75 7200 3900 7200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7800 3900 75 75 7800 3900 7800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 3300 75 75 7200 3300 7200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3300 75 75 6600 3300 6600 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3300 75 75 6000 3300 6000 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3300 75 75 5400 3300 5400 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2700 75 75 4800 2700 4800 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2700 75 75 5400 2700 5400 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2700 75 75 6000 2700 6000 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2700 75 75 6600 2700 6600 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2100 75 75 6000 2100 6000 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2100 75 75 5400 2100 5400 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2100 75 75 4800 2100 4800 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2100 75 75 4200 2100 4200 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 1500 75 75 4200 1500 4200 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 1500 75 75 4800 1500 4800 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 1500 75 75 5400 1500 5400 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7800 3300 75 75 7800 3300 7800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 8400 3900 75 75 8400 3900 8400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 2700 75 75 7200 2700 7200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2100 75 75 6600 2100 6600 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 1500 75 75 6000 1500 6000 1575 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 9600 5100 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 3000 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 4500 2925 4500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3900 2925 3900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3300 2925 3300 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3600 5100 3600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4200 5100 4200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 5400 5100 5400 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4800 5100 4800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6000 5100 6000 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6600 5100 6600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2700 2925 2700 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 1500 2925 1500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2100 2925 2100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 1500 9000 1500 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 8400 5100 8400 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 7200 5100 7200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 7800 5100 7800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 8400 5100 8400 5175 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 3900 9000 3900 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 5400 900 9600 5100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 4200 5100 4200 900 -2 3 0 0 0 7 51 -1 15 0.000 0 0 -1 0 0 5 - 4200 1500 4200 3900 8400 3900 6000 1500 4200 1500 -4 0 0 50 -1 2 26 0.0000 0 270 195 2625 4650 1\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 2625 4050 2\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 3525 5550 1\001 -4 0 0 50 -1 2 26 0.0000 0 345 135 2700 1050 j\001 -4 0 0 50 -1 0 26 0.0000 0 270 750 8025 825 i<=n\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 4125 5550 2\001 -4 0 0 50 -1 2 26 0.0000 0 180 225 8325 5550 n\001 -4 0 0 50 -1 2 26 0.0000 0 180 330 2550 1575 m\001 -4 0 0 50 -1 0 26 0.0000 0 360 750 9075 3975 j>=2\001 -4 0 0 50 -1 0 26 0.0000 0 360 855 9075 1575 j<=m\001 -4 0 0 50 -1 2 26 0.0000 0 270 105 9450 5475 i\001 -4 0 0 50 -1 0 26 0.0000 0 270 750 3825 825 i>=2\001 -4 0 0 50 -1 0 26 0.0000 0 360 1410 4875 825 j<=n+2-i\001 diff --git a/cloog-0.16.3/doc/images/basic.jpg b/cloog-0.16.3/doc/images/basic.jpg deleted file mode 100644 index 995b1d816207e6585df9c61ea65745d38e0db845..0000000000000000000000000000000000000000 Binary files a/cloog-0.16.3/doc/images/basic.jpg and /dev/null differ diff --git a/cloog-0.16.3/doc/images/basic.pdf b/cloog-0.16.3/doc/images/basic.pdf deleted file mode 100644 index d15d42b4145419f03f56fde14b10e2e983e8dbb0..0000000000000000000000000000000000000000 Binary files a/cloog-0.16.3/doc/images/basic.pdf and /dev/null differ diff --git a/cloog-0.16.3/doc/images/basic.txt b/cloog-0.16.3/doc/images/basic.txt deleted file mode 100644 index e40913a6b6ec17394b5950ab170f10460e219791..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/images/basic.txt +++ /dev/null @@ -1,13 +0,0 @@ - j^ i>=2 - | | j<=n+2-i - | |\ | i<=n - | | \ | -m-+-****---+-j<=m - | ***** | - | ****** | - | *******| -2-+-********-j>=2 - | | |\ -0-+-+------+--->i - | | | - 0 2 n diff --git a/cloog-0.16.3/doc/images/tree.eps b/cloog-0.16.3/doc/images/tree.eps deleted file mode 100644 index d80f6e93a8401479b391745adbb401fb5bdafea8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/images/tree.eps +++ /dev/null @@ -1,258 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: tree.eps -%%Creator: fig2dev Version 3.2 Patchlevel 3c -%%CreationDate: Fri Sep 6 10:09:40 2002 -%%For: bastoul@whisky (Cedric Bastoul) -%%BoundingBox: 0 0 388 312 -%%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 312 moveto 0 0 lineto 388 0 lineto 388 312 lineto closepath clip newpath --165.0 369.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -%%Page: 1 1 -10 setmiterlimit - 0.06000 0.06000 sc -% -% Fig objects follow -% -7.500 slw -% Ellipse -n 5400 1200 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 3000 3600 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 7800 3600 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 6600 4800 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 5400 2325 237 237 0 360 DrawEllipse gs col0 s gr - -% Polyline -gs clippath -5355 2115 m 5445 2115 l 5445 1888 l 5400 2068 l 5355 1888 l cp -eoclip -n 5400 1425 m - 5400 2100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5355 1888 m 5400 2068 l 5445 1888 l 5355 1888 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -5355 3390 m 5445 3390 l 5445 3163 l 5400 3343 l 5355 3163 l cp -eoclip -n 5400 2550 m - 5400 3375 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5355 3163 m 5400 3343 l 5445 3163 l 5355 3163 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -2955 4590 m 3045 4590 l 3045 4363 l 3000 4543 l 2955 4363 l cp -eoclip -n 3000 3825 m - 3000 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 2955 4363 m 3000 4543 l 3045 4363 l 2955 4363 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -6563 4544 m 6611 4621 l 6803 4500 l 6627 4558 l 6755 4424 l cp -eoclip -n 7800 3825 m - 6600 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6755 4424 m 6627 4558 l 6803 4500 l 6755 4424 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -8988 4621 m 9036 4544 l 8844 4424 l 8973 4558 l 8796 4500 l cp -eoclip -n 7800 3825 m - 9000 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 8796 4500 m 8973 4558 l 8844 4424 l 8796 4500 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -6555 5790 m 6645 5790 l 6645 5563 l 6600 5743 l 6555 5563 l cp -eoclip -n 6600 5025 m - 6600 5775 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6555 5563 m 6600 5743 l 6645 5563 l 6555 5563 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -7802 3411 m 7831 3326 l 7615 3253 l 7772 3354 l 7587 3338 l cp -eoclip -n 5400 2550 m - 7803 3364 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 7587 3338 m 7772 3354 l 7615 3253 l 7587 3338 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -2971 3337 m 3000 3422 l 3215 3348 l 3031 3364 l 3186 3262 l cp -eoclip -n 5400 2550 m - 3000 3375 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3186 3262 m 3031 3364 l 3215 3348 l 3186 3262 l cp gs 0.00 setgray ef gr col0 s -/Times-Roman ff 330.00 scf sf -3075 4200 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -6675 5400 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -5475 3000 m -gs 1 -1 sc (1) col0 sh gr -/Times-Roman ff 330.00 scf sf -3825 3000 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -6900 3000 m -gs 1 -1 sc (2) col0 sh gr -/Times-Roman ff 330.00 scf sf -6975 4200 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -8475 4200 m -gs 1 -1 sc (1) col0 sh gr -/Times-Roman ff 330.00 scf sf -5475 1800 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -2850 4950 m -gs 1 -1 sc (S1) col0 sh gr -/Times-Roman ff 330.00 scf sf -5250 3750 m -gs 1 -1 sc (S2) col0 sh gr -/Times-Roman ff 330.00 scf sf -6450 6150 m -gs 1 -1 sc (S3) col0 sh gr -/Times-Roman ff 330.00 scf sf -8850 4950 m -gs 1 -1 sc (S4) col0 sh gr -/Times-Roman ff 330.00 scf sf -5355 2430 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman ff 330.00 scf sf -2963 3667 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 330.00 scf sf -7763 3675 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 330.00 scf sf -6533 4890 m -gs 1 -1 sc (k) col0 sh gr -$F2psEnd -rs diff --git a/cloog-0.16.3/doc/images/tree.fig b/cloog-0.16.3/doc/images/tree.fig deleted file mode 100644 index 9c202bbb3f7ecb9f2dc1065d2d82346ead4aa5a9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/images/tree.fig +++ /dev/null @@ -1,54 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 1200 237 237 5400 1200 5625 1275 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 3000 3600 237 237 3000 3600 3225 3675 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 7800 3600 237 237 7800 3600 8025 3675 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6600 4800 237 237 6600 4800 6825 4875 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 2325 237 237 5400 2325 5625 2400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 1425 5400 2100 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 5400 3375 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 3000 3825 3000 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 7800 3825 6600 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 7800 3825 9000 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 6600 5025 6600 5775 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 7803 3364 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 3000 3375 -4 0 0 50 0 0 22 0.0000 0 225 150 3075 4200 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6675 5400 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 5475 3000 1\001 -4 0 0 50 0 0 22 0.0000 0 225 150 3825 3000 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6900 3000 2\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6975 4200 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 8475 4200 1\001 -4 0 0 50 0 0 22 0.0000 0 225 150 5475 1800 0\001 -4 0 0 50 0 0 22 0.0000 0 225 345 2850 4950 S1\001 -4 0 0 50 0 0 22 0.0000 0 225 345 5250 3750 S2\001 -4 0 0 50 0 0 22 0.0000 0 225 345 6450 6150 S3\001 -4 0 0 50 0 0 22 0.0000 0 225 345 8850 4950 S4\001 -4 0 0 50 0 0 22 0.0000 0 225 90 5355 2430 i\001 -4 0 0 50 0 0 22 0.0000 0 300 90 2963 3667 j\001 -4 0 0 50 0 0 22 0.0000 0 300 90 7763 3675 j\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6533 4890 k\001 diff --git a/cloog-0.16.3/doc/images/tree.jpg b/cloog-0.16.3/doc/images/tree.jpg deleted file mode 100644 index 7329268b65736eafa7d05bbd39135092db60da2d..0000000000000000000000000000000000000000 Binary files a/cloog-0.16.3/doc/images/tree.jpg and /dev/null differ diff --git a/cloog-0.16.3/doc/images/tree.pdf b/cloog-0.16.3/doc/images/tree.pdf deleted file mode 100644 index 7569edebb461590b8208c320a8e109fd4a44c25c..0000000000000000000000000000000000000000 Binary files a/cloog-0.16.3/doc/images/tree.pdf and /dev/null differ diff --git a/cloog-0.16.3/doc/images/tree.txt b/cloog-0.16.3/doc/images/tree.txt deleted file mode 100644 index 7bcfef2882193fa78830ff5ad0c9f469b7af2e87..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/doc/images/tree.txt +++ /dev/null @@ -1,25 +0,0 @@ - * - | - |0 - | - V - i - | - +-----+-----+ - | | | - |0 |1 |2 - | | | - V V V - j S2 j - | | - |0 +--+--+ - | | | - V |0 |1 - S1 | | - V V - k S4 - | - |0 - | - V - S3 diff --git a/cloog-0.16.3/examples/README b/cloog-0.16.3/examples/README deleted file mode 100644 index 1a9881e8f89eafba23d491d952f30c056d833a69..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/examples/README +++ /dev/null @@ -1,58 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** Library use examples ** -# **-------------------------------------------------------------------** -# ** First version of this file: july 15th 2003 ** -# **-------------------------------------------------------------------**/ -# - - -In this directory are presented various examples of how to use the CLooG -library. For each case, you will need to edit the makefile file according to -your system, in particular you will have to set where your CLooG library has -been installed, and where are the CLooG header files. Don't forget to update -your LD_LIBRARY_PATH environment variable to reach the CLooG library. If you -performed the default installation of CLooG, the library is in /usr/local/lib -thus you need to set LD_LIBRARY_PATH thanks to one of the following command: -'setenv LD_LIBRARY_PATH /usr/local/lib' for tcsh-like shells, or -'export LD_LIBRARY_PATH=/usr/local/lib' for bash-like shells. - -For any problem: . - - -# **-------------------------------------------------------------------** -# ** I. Example ** -# **-------------------------------------------------------------------**/ - - -This example program creates a simple CLooG-like loop generation program in a -few lines. The input problem has to be given on standard input. We can test it -for instance by typing 'more FILE.cloog | ./example' (or example.exe under -Cygwin). - - -# **-------------------------------------------------------------------** -# ** II. cloog2loopgen ** -# **-------------------------------------------------------------------**/ - -NO MORE EXISTS ! - -This example creates a program converting a CLooG input file to a LoopGen input -file. This can be useful to compare the two tools (I do not support LoopGen, -don't ask me if you find some bugs !). The usage of the created tool is: -'cloog2loopgen input_file output_file'. - - -# **-------------------------------------------------------------------** -# ** III. cloog2Omega ** -# **-------------------------------------------------------------------**/ - - -NO MORE EXISTS ! - -This example creates a program converting a CLooG input file to an Omega -CodeGen input file. This can be useful to compare the two tools (I do not -support CodeGen, don't ask me if you find some bugs !). The usage of the -created tool is: 'cloog2omega input_file output_file'. diff --git a/cloog-0.16.3/examples/example/Makefile b/cloog-0.16.3/examples/example/Makefile deleted file mode 100644 index 9b6150b7e2ba6735637b260e81f98dff2fd5d81a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/examples/example/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Please enter here the locations for CloogLib include and libraries if they -# aren't the default values (/usr/lib and /usr/include). -CLOOG_INC = $(HOME)/progs/linux/include -CLOOG_LIB = $(HOME)/progs/linux/lib - -CC = gcc -LDLIBS= -lcloog -CFLAGS= -I $(CLOOG_INC) -L $(CLOOG_LIB) - - -example: example.c - @echo " /*-----------------------------------------------*" - @echo " * Making example *" - @echo " *-----------------------------------------------*/" - $(CC) example.c -o example $(CFLAGS) $(LDLIBS) - -clean: - @echo " /*-----------------------------------------------*" - @echo " * Cleaning example *" - @echo " *-----------------------------------------------*/" - -rm -f example example.exe core diff --git a/cloog-0.16.3/examples/example/example.c b/cloog-0.16.3/examples/example/example.c deleted file mode 100644 index 403d213674c1e10127ab80eeafc0e8e59f949ca1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/examples/example/example.c +++ /dev/null @@ -1,29 +0,0 @@ -/* This is a very simple example of how to use the CLooGLib inside your - * programs. You should compile it by typing 'make' (after edition of the - * makefile), then test it for instance by typing - * 'more FILE.cloog | ./example' (or example.exe under Cygwin). - */ - -# include -# include - -int main() -{ - CloogState *state; - CloogInput *input; - CloogOptions * options ; - struct clast_stmt *root; - - state = cloog_state_malloc(); - options = cloog_options_malloc(state); - input = cloog_input_read(stdin, options); - - root = cloog_clast_create_from_input(input, options); - clast_pprint(stdout, root, 0, options); - - cloog_clast_free(root); - cloog_options_free(options) ; - cloog_state_free(state); - - return 0 ; -} diff --git a/cloog-0.16.3/genversion.sh.in b/cloog-0.16.3/genversion.sh.in deleted file mode 100755 index 77c04d70478a9439adc369152ea7fd43bab4f60f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/genversion.sh.in +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/sh -srcdir=@abs_srcdir@ -PACKAGE=@PACKAGE@ -VERSION=@VERSION@ - -if test -f $srcdir/.git/HEAD; then - GIT_REPO="$srcdir/.git" - GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe` -elif test -f $srcdir/CLOOG_HEAD; then - GIT_HEAD_ID=`cat $srcdir/CLOOG_HEAD` -else - GIT_HEAD_ID="$PACKAGE-$VERSION-UNKNOWN" -fi - -echo $GIT_HEAD_ID | sed -e 's/cloog-//' diff --git a/cloog-0.16.3/include/cloog/block.h b/cloog-0.16.3/include/cloog/block.h deleted file mode 100644 index 95f2a443454380b878e8a3288f8c3c7174593246..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/block.h +++ /dev/null @@ -1,117 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** block.h ** - **-------------------------------------------------------------------** - ** First version: June 11th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_BLOCK_H -#define CLOOG_BLOCK_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -/** - * CloogBlock structure: - * this structure contains the informations of a statement block. It may happen - * that users are lazy enough to ask CLooG to generate the code for statements - * with exactly the same domain/scattering pair (possibly differing by only one - * constant) instead of giving only one pair. CLooG provides them a last chance - * to save time and memory by trying to find these blocks itself. The block - * contains the statement list and the common informations of the statements. - * This structure contains also the number of existing active references to it: - * because CLooG uses many copies of blocks there is no need to actually copy - * these blocks but just to return a pointer to them and to increment the number - * of active references. Each time a CloogBlock will be freed, we will decrement - * the active reference counter and actually free it if its value is zero. - */ -struct cloogblock -{ - CloogState *state; /**< State. */ - CloogStatement * statement ; /**< The list of statements in the block. */ - int nb_scaldims ; /**< Number of scalar dimensions. */ - cloog_int_t *scaldims; /**< Scalar dimension values. */ - int depth ; /**< Original block depth (outer loop number).*/ - int references ; /**< Number of references to this structure. */ - void * usr; /**< User field, for library user convenience. - * This pointer is not freed when the - * CloogBlock structure is freed. - */ -} ; -typedef struct cloogblock CloogBlock ; - - -/** - * CloogBlockList structure: - * this structure reprensents a node of a linked list of CloogBlock structures. - */ -struct cloogblocklist -{ CloogBlock * block ; /**< An element of the list. */ - struct cloogblocklist * next ;/**< Pointer to the next element of the list.*/ -} ; -typedef struct cloogblocklist CloogBlockList ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_block_print_structure(FILE *, CloogBlock *, int) ; -void cloog_block_print(FILE *, CloogBlock *) ; -void cloog_block_list_print(FILE *, CloogBlockList *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_block_free(CloogBlock *) ; -void cloog_block_list_free(CloogBlockList *) ; - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogBlock * cloog_block_malloc(CloogState *state); -CloogBlock * cloog_block_alloc(CloogStatement *statement, int nb_scaldims, - cloog_int_t *scaldims, int depth); -CloogBlockList * cloog_block_list_malloc(void); -CloogBlockList * cloog_block_list_alloc(CloogBlock *) ; -CloogBlock * cloog_block_copy(CloogBlock * block) ; -void cloog_block_merge(CloogBlock *, CloogBlock *) ; - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ - diff --git a/cloog-0.16.3/include/cloog/clast.h b/cloog-0.16.3/include/cloog/clast.h deleted file mode 100644 index b4553695b2799e576a890fb6fda8f5ca10c019e3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/clast.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef CLOOG_CLAST_H -#define CLOOG_CLAST_H -#if defined(__cplusplus) -extern "C" - { -#endif - -enum clast_expr_type { - clast_expr_name, - clast_expr_term, - clast_expr_bin, - clast_expr_red -}; -struct clast_expr { - enum clast_expr_type type; -}; - -struct clast_name { - struct clast_expr expr; - const char * name; -}; - -/* Represents the term - * val * var (if var != NULL) - * or - * val (if var == NULL) - */ -struct clast_term { - struct clast_expr expr; - cloog_int_t val; - struct clast_expr *var; -}; - -enum clast_red_type { clast_red_sum, clast_red_min, clast_red_max }; -struct clast_reduction { - struct clast_expr expr; - enum clast_red_type type; - int n; - struct clast_expr* elts[1]; -}; - -enum clast_bin_type { clast_bin_fdiv, clast_bin_cdiv, - clast_bin_div, clast_bin_mod }; -struct clast_binary { - struct clast_expr expr; - enum clast_bin_type type; - struct clast_expr* LHS; - cloog_int_t RHS; -}; - -struct clast_stmt; -struct clast_stmt_op { - void (*free)(struct clast_stmt *); -}; - -#define CLAST_STMT_IS_A(stmt, type) ((stmt)->op == &(type)) - -extern const struct clast_stmt_op stmt_root; -extern const struct clast_stmt_op stmt_ass; -extern const struct clast_stmt_op stmt_user; -extern const struct clast_stmt_op stmt_block; -extern const struct clast_stmt_op stmt_for; -extern const struct clast_stmt_op stmt_guard; - -struct clast_stmt { - const struct clast_stmt_op *op; - struct clast_stmt *next; -}; - -struct clast_root { - struct clast_stmt stmt; - CloogNames * names; /**< Names of iterators and parameters. */ -}; - -struct clast_assignment { - struct clast_stmt stmt; - const char * LHS; - struct clast_expr * RHS; -}; - -struct clast_block { - struct clast_stmt stmt; - struct clast_stmt * body; -}; - -struct clast_user_stmt { - struct clast_stmt stmt; - CloogDomain * domain; - CloogStatement * statement; - struct clast_stmt * substitutions; -}; - -struct clast_for { - struct clast_stmt stmt; - CloogDomain * domain; - const char * iterator; - struct clast_expr * LB; - struct clast_expr * UB; - cloog_int_t stride; - struct clast_stmt * body; -}; - -struct clast_equation { - struct clast_expr * LHS; - struct clast_expr * RHS; - int sign; -}; - -struct clast_guard { - struct clast_stmt stmt; - struct clast_stmt * then; - int n; - struct clast_equation eq[1]; -}; - - -struct clast_stmt *cloog_clast_create_from_input(CloogInput *input, - CloogOptions *options); -struct clast_stmt *cloog_clast_create(CloogProgram *program, - CloogOptions *options); -void cloog_clast_free(struct clast_stmt *s); - -struct clast_name *new_clast_name(const char *name); -struct clast_term *new_clast_term(cloog_int_t c, struct clast_expr *v); -struct clast_binary *new_clast_binary(enum clast_bin_type t, - struct clast_expr *lhs, cloog_int_t rhs); -struct clast_reduction *new_clast_reduction(enum clast_red_type t, int n); -struct clast_root *new_clast_root(CloogNames *names); -struct clast_assignment *new_clast_assignment(const char *lhs, - struct clast_expr *rhs); -struct clast_user_stmt *new_clast_user_stmt(CloogDomain *domain, - CloogStatement *stmt, struct clast_stmt *subs); -struct clast_block *new_clast_block(void); -struct clast_for *new_clast_for(CloogDomain *domain, const char *it, - struct clast_expr *LB, struct clast_expr *UB, - CloogStride *stride); -struct clast_guard *new_clast_guard(int n); - -void free_clast_name(struct clast_name *t); -void free_clast_term(struct clast_term *t); -void free_clast_binary(struct clast_binary *b); -void free_clast_reduction(struct clast_reduction *r); -void free_clast_expr(struct clast_expr *e); -void free_clast_stmt(struct clast_stmt *s); - -int clast_expr_equal(struct clast_expr *e1, struct clast_expr *e2); - -struct clast_expr *clast_bound_from_constraint(CloogConstraint *constraint, - int level, CloogNames *names); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/cloog.h b/cloog-0.16.3/include/cloog/cloog.h deleted file mode 100644 index a8c3f28204eba16eabdf7fcabfd1458bced3c67d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/cloog.h +++ /dev/null @@ -1,62 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** cloog.h ** - **-------------------------------------------------------------------** - ** First version: july 25th 2002 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - -/****************************************************************************** - * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM clooh.h.in BY configure * - ******************************************************************************/ - -#ifndef CLOOG_H -#define CLOOG_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* !CLOOG_H */ diff --git a/cloog-0.16.3/include/cloog/constraints.h b/cloog-0.16.3/include/cloog/constraints.h deleted file mode 100644 index 4818c4c184880d7ae6140fafbe3c2bc6f30cda90..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/constraints.h +++ /dev/null @@ -1,121 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** constraints.h ** - **-------------------------------------------------------------------** - ** First version: april 17th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_CONSTRAINTS_H -#define CLOOG_CONSTRAINTS_H - -struct cloogconstraint; -typedef struct cloogconstraint CloogConstraint; -struct cloogconstraintset; -typedef struct cloogconstraintset CloogConstraintSet; -struct cloogequalities; -typedef struct cloogequalities CloogEqualities; - -#if defined(__cplusplus) -extern "C" - { -#endif - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ -CloogEqualities *cloog_equal_alloc(int n, int nb_levels, - int nb_parameters); -void cloog_equal_free(CloogEqualities *equal); -int cloog_equal_count(CloogEqualities *equal); -int cloog_equal_type(CloogEqualities *equal, int level); -void cloog_equal_del(CloogEqualities *equal, int level); -int cloog_equal_total_dimension(CloogEqualities *equal); - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -void cloog_constraint_set_normalize(CloogConstraintSet *, int); -void cloog_constraint_set_free(CloogConstraintSet *); -int cloog_constraint_set_contains_level(CloogConstraintSet *constraints, - int level, int nb_parameters); -int cloog_constraint_set_total_dimension(CloogConstraintSet *constraints); -int cloog_constraint_set_n_iterators(CloogConstraintSet *constraints, - int nb_parameters); -CloogConstraintSet *cloog_constraint_set_copy(CloogConstraintSet *); -CloogConstraintSet *cloog_constraint_set_simplify(CloogConstraintSet *, CloogEqualities *, int, int); - -int cloog_constraint_needs_reduction(CloogConstraint *upper, int level); -CloogConstraintSet *cloog_constraint_set_for_reduction(CloogConstraint *upper, - CloogConstraint *lower); -CloogConstraintSet *cloog_constraint_set_reduce(CloogConstraintSet *constraints, - int level, CloogEqualities *equal, int nb_par, cloog_int_t *bound); -int cloog_constraint_set_foreach_constraint(CloogConstraintSet *constraints, - int (*fn)(CloogConstraint *constraint, void *user), void *user); -int cloog_constraint_is_valid(CloogConstraint *constraint); -CloogConstraint *cloog_constraint_copy(CloogConstraint *constraint); -void cloog_constraint_release(CloogConstraint *constraint); -CloogConstraint *cloog_constraint_invalid(void); -int cloog_constraint_total_dimension(CloogConstraint *constraint); - -CloogConstraint *cloog_equal_constraint(CloogEqualities *equal, int j); -void cloog_equal_add(CloogEqualities *equal, - CloogConstraintSet *constraints, - int level, CloogConstraint *line, int nb_par); - -CloogConstraint *cloog_constraint_set_defining_equality( - CloogConstraintSet *constraints, int level); -CloogConstraint *cloog_constraint_set_defining_inequalities( - CloogConstraintSet *constraints, - int level, CloogConstraint **lower, int nb_parameters); -int cloog_constraint_involves(CloogConstraint *constraint, int v); -int cloog_constraint_is_lower_bound(CloogConstraint *constraint, int v); -int cloog_constraint_is_upper_bound(CloogConstraint *constraint, int v); -int cloog_constraint_is_equality(CloogConstraint *constraint); -void cloog_constraint_constant_get(CloogConstraint *constraint, - cloog_int_t *val); -void cloog_constraint_coefficient_get(CloogConstraint *constraint, - int var, cloog_int_t *val); -void cloog_constraint_coefficient_set(CloogConstraint *constraint, - int var, cloog_int_t val); -void cloog_constraint_copy_coefficients(CloogConstraint *constraint, - cloog_int_t *dst); -CloogConstraintSet *cloog_constraint_set_drop_constraint( - CloogConstraintSet *constraints, CloogConstraint *constraint); - -struct clast_expr *cloog_constraint_variable_expr(CloogConstraint *constraint, - int level, CloogNames *names); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/domain.h b/cloog-0.16.3/include/cloog/domain.h deleted file mode 100644 index 65fda6639766700faa9c32fb1f47a4a3a181a15d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/domain.h +++ /dev/null @@ -1,172 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** domain.h ** - **-------------------------------------------------------------------** - ** First version: october 28th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_DOMAIN_H -#define CLOOG_DOMAIN_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -struct cloogdomain; -typedef struct cloogdomain CloogDomain ; -struct cloogscattering; -typedef struct cloogscattering CloogScattering; - - -/** - * CloogDomainList structure: - * this structure reprensents a node of a linked list of CloogDomain structures. - */ -struct cloogdomainlist { - CloogDomain *domain; /**< An element of the list. */ - struct cloogdomainlist *next;/**< Pointer to the next element of the list.*/ -} ; -typedef struct cloogdomainlist CloogDomainList; - - -/** - * CloogScatteringList structure: - * this structure reprensents a node of a linked list of CloogScattering structures. - */ -struct cloogscatteringlist { - CloogScattering *scatt; /**< An element of the list. */ - struct cloogscatteringlist *next;/**< Pointer to the next element of the list.*/ -} ; -typedef struct cloogscatteringlist CloogScatteringList; - - -/****************************************************************************** - * PolyLib interface * - ******************************************************************************/ -void cloog_domain_print_constraints(FILE *, CloogDomain *, - int print_number); -void cloog_scattering_print_constraints(FILE *, CloogScattering *); -void cloog_domain_free(CloogDomain *) ; -void cloog_scattering_free(CloogScattering *); -CloogDomain * cloog_domain_copy(CloogDomain *) ; -CloogDomain * cloog_domain_convex(CloogDomain * Pol) ; -CloogDomain * cloog_domain_simple_convex(CloogDomain * domain); -CloogDomain * cloog_domain_simplify(CloogDomain *, CloogDomain *) ; -CloogDomain * cloog_domain_union(CloogDomain *, CloogDomain *) ; -CloogDomain * cloog_domain_intersection(CloogDomain *, CloogDomain *) ; -CloogDomain * cloog_domain_difference(CloogDomain *, CloogDomain *) ; -void cloog_domain_sort(CloogDomain**,unsigned,unsigned,int *); -int cloog_domain_follows(CloogDomain *dom1, CloogDomain *dom2, unsigned level); -CloogDomain * cloog_domain_empty(CloogDomain *model); -int cloog_domain_is_bounded(CloogDomain *dim, unsigned level); -CloogDomain *cloog_domain_bound_splitter(CloogDomain *dom, int level); - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level, - const char *name); - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_domain_list_free(CloogDomainList *); -void cloog_scattering_list_free(CloogScatteringList *); - - -/*+**************************************************************************** - * Reading function * - ******************************************************************************/ -CloogDomain * cloog_domain_read_context(CloogState *state, FILE * foo); -CloogDomain * cloog_domain_union_read(CloogState *state, FILE *foo, int nb_par); -CloogScattering *cloog_domain_read_scattering(CloogDomain *domain, FILE *foo); - -CloogDomain * cloog_domain_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_par); -CloogScattering * cloog_scattering_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_scat, int nb_par); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogConstraintSet *cloog_domain_constraints(CloogDomain *); -int cloog_domain_isempty(CloogDomain *) ; -CloogDomain * cloog_domain_universe(CloogState *state, unsigned dim); -CloogDomain * cloog_domain_project(CloogDomain *, int); -CloogDomain * cloog_domain_extend(CloogDomain *, int); -int cloog_domain_never_integral(CloogDomain *) ; -void cloog_domain_stride(CloogDomain *, int, cloog_int_t *, cloog_int_t *); -int cloog_domain_can_stride(CloogDomain *domain, int level); -int cloog_domain_is_otl(CloogDomain *domain, int level); -CloogDomain * cloog_domain_stride_lower_bound(CloogDomain *domain, int level, - CloogStride *stride); -CloogDomain * cloog_domain_add_stride_constraint(CloogDomain *domain, - CloogStride *stride); -int cloog_domain_can_unroll(CloogDomain *domain, int level, - cloog_int_t *n, CloogConstraint **lb); -CloogDomain * cloog_domain_fixed_offset(CloogDomain *domain, int level, - CloogConstraint *lb, cloog_int_t offset); -int cloog_domain_lazy_disjoint(CloogDomain *, CloogDomain *) ; -int cloog_domain_lazy_equal(CloogDomain *, CloogDomain *) ; -int cloog_scattering_lazy_block(CloogScattering *, CloogScattering *, - CloogScatteringList *, int); -int cloog_scattering_lazy_isscalar(CloogScattering *, int, - cloog_int_t *); -int cloog_domain_lazy_isconstant(CloogDomain *domain, int dimension, - cloog_int_t *value); -int cloog_scattering_list_lazy_same(CloogScatteringList *); -CloogDomain * cloog_domain_cut_first(CloogDomain *domain, CloogDomain **rest); -CloogDomain * cloog_domain_simplify_union(CloogDomain *domain); -CloogScattering * cloog_scattering_erase_dimension(CloogScattering *, int); - -int cloog_domain_dimension(CloogDomain *) ; -int cloog_domain_parameter_dimension(CloogDomain *domain); -int cloog_scattering_dimension(CloogScattering *, CloogDomain *); -int cloog_domain_isconvex(CloogDomain *) ; -CloogDomain * cloog_domain_cube(CloogState *state, - int dim, cloog_int_t min, cloog_int_t max); -CloogDomain * cloog_domain_from_context(CloogDomain *context); -CloogDomain * cloog_domain_scatter(CloogDomain *domain, CloogScattering *scatt); -int cloog_scattering_fully_specified(CloogScattering *scattering, - CloogDomain *domain); - -CloogStride *cloog_domain_list_stride(CloogDomainList *list, int level); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/input.h b/cloog-0.16.3/include/cloog/input.h deleted file mode 100644 index 4ad59fa1ef366da36265fce9b89769e428adc6cd..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/input.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef CLOOG_INPUT_H -#define CLOOG_INPUT_H - -#if defined(__cplusplus) -extern "C" { -#endif - -struct clooginput { - CloogDomain *context; - CloogUnionDomain *ud; -}; -typedef struct clooginput CloogInput; - -CloogInput *cloog_input_read(FILE *file, CloogOptions *options); -CloogInput *cloog_input_alloc(CloogDomain *context, CloogUnionDomain *ud); -void cloog_input_free(CloogInput *input); - -void cloog_input_dump_cloog(FILE *file, CloogInput *input, CloogOptions *opt); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/include/cloog/int.h b/cloog-0.16.3/include/cloog/int.h deleted file mode 100644 index 623a1cb646d92b8c85cd5469694d8adef65d25bd..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/int.h +++ /dev/null @@ -1,174 +0,0 @@ -#ifndef CLOOG_INT_H -#define CLOOG_INT_H - -#include -#include -#if defined(CLOOG_INT_GMP) -#include -#include -#ifndef mp_get_memory_functions -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)); -#endif -#endif - -#if defined(__cplusplus) -extern "C" - { -#endif - -#if defined(CLOOG_INT_INT) -typedef int cloog_int_t; -#define CLOOG_INT_FORMAT "%d" -#elif defined(CLOOG_INT_LONG) -typedef long cloog_int_t; -#define CLOOG_INT_FORMAT "%ld" -#elif defined(CLOOG_INT_LONG_LONG) -typedef long long cloog_int_t; -#define CLOOG_INT_FORMAT "%lld" -#elif defined(CLOOG_INT_GMP) -typedef mpz_t cloog_int_t; -#else -#error "No integer type defined" -#endif - -#if defined(CLOOG_INT_GMP) - -#define cloog_int_init(i) mpz_init(i) -#define cloog_int_clear(i) mpz_clear(i); - -#define cloog_int_set(r,i) mpz_set(r,i) -#define cloog_int_set_si(r,i) mpz_set_si(r,i) -#define cloog_int_abs(r,i) mpz_abs(r,i) -#define cloog_int_neg(r,i) mpz_neg(r,i) -#define cloog_int_swap(i,j) mpz_swap(i,j) - -#define cloog_int_add(r,i,j) mpz_add(r,i,j) -#define cloog_int_add_ui(r,i,j) mpz_add_ui(r,i,j) -#define cloog_int_sub(r,i,j) mpz_sub(r,i,j) -#define cloog_int_sub_ui(r,i,j) mpz_sub_ui(r,i,j) -#define cloog_int_mul(r,i,j) mpz_mul(r,i,j) -#define cloog_int_addmul(r,i,j) mpz_addmul(r,i,j) -#define cloog_int_divexact(r,i,j) mpz_divexact(r,i,j) -#define cloog_int_tdiv_q(r,i,j) mpz_tdiv_q(r,i,j) -#define cloog_int_fdiv_q(r,i,j) mpz_fdiv_q(r,i,j) -#define cloog_int_fdiv_r(r,i,j) mpz_fdiv_r(r,i,j) -#define cloog_int_cdiv_q(r,i,j) mpz_cdiv_q(r,i,j) -#define cloog_int_gcd(r,i,j) mpz_gcd(r,i,j) - -#define cloog_int_sgn(i) mpz_sgn(i) -#define cloog_int_cmp(i,j) mpz_cmp(i,j) -#define cloog_int_abs_cmp(i,j) mpz_cmpabs(i,j) -#define cloog_int_cmp_si(i,si) mpz_cmp_si(i,si) -#define cloog_int_eq(i,j) (mpz_cmp(i,j) == 0) -#define cloog_int_ne(i,j) (mpz_cmp(i,j) != 0) -#define cloog_int_gt(i,j) (mpz_cmp(i,j) > 0) - -#define cloog_int_is_divisible_by(i,j) mpz_divisible_p(i,j) - -#define cloog_int_read(r,s) mpz_set_str(r,s,10) -typedef void (*cloog_int_print_gmp_free_t)(void *, size_t); -#define cloog_int_print(out,i) \ - do { \ - char *s; \ - cloog_int_print_gmp_free_t gmp_free; \ - s = mpz_get_str(0, 10, i); \ - fprintf(out, "%s", s); \ - mp_get_memory_functions(NULL, NULL, &gmp_free); \ - (*gmp_free)(s, strlen(s)+1); \ - } while (0) - -#else - -#define cloog_int_init(i) ((i) = 0) -#define cloog_int_clear(i) do { } while (0) - -#define cloog_int_set(r,i) ((r) = (i)) -#define cloog_int_set_si(r,i) ((r) = (i)) -#define cloog_int_abs(r,i) ((r) = (i) > 0 ? (i) : -(i)) -#define cloog_int_neg(r,i) ((r) = -(i)) -#define cloog_int_swap(i,j) do { \ - cloog_int_t _t = i; \ - i = j; \ - j = _t; \ - } while (0) - -#define cloog_int_add(r,i,j) ((r) = (i) + (j)) -#define cloog_int_add_ui(r,i,j) ((r) = (i) + (j)) -#define cloog_int_sub(r,i,j) ((r) = (i) - (j)) -#define cloog_int_sub_ui(r,i,j) ((r) = (i) - (j)) -#define cloog_int_mul(r,i,j) ((r) = (i) * (j)) -#define cloog_int_addmul(r,i,j) ((r) += (i) * (j)) -#define cloog_int_divexact(r,i,j) ((r) = (i) / (j)) -#define cloog_int_tdiv_q(r,i,j) ((r) = (i) / (j)) -#define cloog_int_fdiv_q(r,i,j) do { \ - assert((j) > 0); \ - (r) = (i) >= 0 ? (i) / (j) : \ - -((-(i)+(j)-1)/(j)); \ - } while (0) -#define cloog_int_fdiv_r(r,i,j) do { \ - assert((j) > 0); \ - (r) = (i) >= 0 ? (i) % (j) : \ - (j)-1 - ((-(i)+(j)-1)%(j)); \ - } while (0) -#define cloog_int_cdiv_q(r,i,j) do { \ - assert((j) > 0); \ - (r) = (i) >= 0 ? \ - ((i)+(j)-1) / (j) : \ - -(-(i)/(j)); \ - } while (0) -cloog_int_t cloog_gcd(cloog_int_t a, cloog_int_t b); -#define cloog_int_gcd(r,i,j) (r) = cloog_gcd(i,j) - -#define cloog_int_sgn(i) ((i) > 0 ? 1 : (i) < 0 ? -1 : 0) -#define cloog_int_cmp(i,j) (i - j) -#define cloog_int_abs_cmp(i,j) (((i) > 0 ? (i) : -(i)) - ((j) > 0 ? (j) : -(j))) -#define cloog_int_cmp_si(i,si) (i - si) -#define cloog_int_eq(i,j) ((i) == (j)) -#define cloog_int_ne(i,j) ((i) != (j)) -#define cloog_int_gt(i,j) ((i) > (j)) - -#define cloog_int_is_divisible_by(i,j) ((i) % (j) == 0) - -#define cloog_int_read(i,s) sscanf(s, CLOOG_INT_FORMAT, &i) -#define cloog_int_print(out,i) fprintf(out, CLOOG_INT_FORMAT, i) - -#endif - -#define cloog_int_is_pos(i) (cloog_int_sgn(i) > 0) -#define cloog_int_is_neg(i) (cloog_int_sgn(i) < 0) -#define cloog_int_is_zero(i) (cloog_int_sgn(i) == 0) -#define cloog_int_is_one(i) (cloog_int_cmp_si(i,1) == 0) -#define cloog_int_is_neg_one(i) (cloog_int_cmp_si(i,-1) == 0) -#define cloog_int_gt_si(i,si) (cloog_int_cmp_si(i,si) > 0) -#define cloog_int_ne_si(i,j) (cloog_int_cmp_si(i,j) != 0) -#define cloog_int_lt(i,j) (cloog_int_cmp(i,j) < 0) -#define cloog_int_le(i,j) (cloog_int_cmp(i,j) <= 0) -#define cloog_int_abs_ne(i,j) (cloog_int_abs_cmp(i,j) != 0) -#define cloog_int_abs_ge(i,j) (cloog_int_abs_cmp(i,j) >= 0) -#define cloog_int_abs_lt(i,j) (cloog_int_abs_cmp(i,j) < 0) - -struct cloog_vec { - unsigned size; - cloog_int_t *p; -}; - -struct cloog_vec *cloog_vec_alloc(unsigned size); -void cloog_vec_free(struct cloog_vec *vec); - -int cloog_seq_first_non_zero(cloog_int_t *p, unsigned len); -void cloog_seq_cpy(cloog_int_t *dst, cloog_int_t *src, unsigned len); -void cloog_seq_neg(cloog_int_t *dst, cloog_int_t *src, unsigned len); -void cloog_seq_combine(cloog_int_t *dst, cloog_int_t m1, cloog_int_t *src1, - cloog_int_t m2, cloog_int_t *src2, unsigned len); -void cloog_seq_gcd(cloog_int_t *p, unsigned len, cloog_int_t *gcd); -int cloog_seq_is_neg(cloog_int_t *p1, cloog_int_t *p2, unsigned len); -void cloog_seq_normalize(cloog_int_t *p, unsigned len); - -#if defined(__cplusplus) - } -#endif - -#endif diff --git a/cloog-0.16.3/include/cloog/isl/backend.h b/cloog-0.16.3/include/cloog/isl/backend.h deleted file mode 100644 index e4576d9eb98fc3e8ec732fe7c12295aedf122151..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/isl/backend.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CLOOG_ISL_BACKEND_H -#define CLOOG_ISL_BACKEND_H - -#include - -struct cloogbackend { - struct isl_ctx *ctx; - unsigned ctx_allocated : 1; -}; - -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/isl/cloog.h b/cloog-0.16.3/include/cloog/isl/cloog.h deleted file mode 100644 index 9379054e9bbdb1431e6ce1b65ea30d00ddffe448..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/isl/cloog.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CLOOG_ISL_H -#define CLOOG_ISL_H - -#ifndef CLOOG_INT_GMP -#define CLOOG_INT_GMP -#endif - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -CloogState *cloog_isl_state_malloc(struct isl_ctx *ctx); - -#if defined(__cplusplus) -} -#endif - -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/isl/constraintset.h b/cloog-0.16.3/include/cloog/isl/constraintset.h deleted file mode 100644 index c3c2eed77c084ce0f5b56fb6c6148970925e9a10..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/isl/constraintset.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef CLOOG_ISL_CONSTRAINTSET_H -#define CLOOG_ISL_CONSTRAINTSET_H - -#include - -#if defined(__cplusplus) -extern "C" - { -#endif - -struct cloogconstraintset { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -struct cloogequalities { - int n; - unsigned total_dim; - isl_constraint **constraints; - int *types; -}; - -struct cloogconstraint { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -CloogConstraintSet *cloog_constraint_set_from_isl_basic_set(struct isl_basic_set *bset); -CloogConstraint *cloog_constraint_from_isl_constraint(struct isl_constraint *constraint); -isl_constraint *cloog_constraint_to_isl(CloogConstraint *constraint); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/isl/domain.h b/cloog-0.16.3/include/cloog/isl/domain.h deleted file mode 100644 index 289b71174f738a443d094a32e162e0e78b1a5ecf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/isl/domain.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef CLOOG_ISL_DOMAIN_H -#define CLOOG_ISL_DOMAIN_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" - { -#endif - - -struct cloogdomain { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -struct cloogscattering { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -CloogDomain *cloog_domain_from_isl_set(struct isl_set *set); -CloogScattering *cloog_scattering_from_isl_map(struct isl_map *map); -CloogUnionDomain *cloog_union_domain_from_isl_union_map( - __isl_take isl_union_map *umap); -CloogUnionDomain *cloog_union_domain_from_isl_union_set( - __isl_take isl_union_set *uset); - -__isl_give isl_set *isl_set_from_cloog_domain(CloogDomain *domain); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/loop.h b/cloog-0.16.3/include/cloog/loop.h deleted file mode 100644 index b62a274529dab2193380c44566d1f5f0300eb0fd..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/loop.h +++ /dev/null @@ -1,120 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** loop.h ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_LOOP_H -#define CLOOG_LOOP_H -#if defined(__cplusplus) -extern "C" - { -#endif - -/** - * CloogLoop structure: - * this structure contains all the informations of a loop generated or to be - * generated. - * - if the loop has not been processed yet (it is not a result of a call to - * cloog_loop_generate), the domain is the whole iteration domain of a given - * block, the stride is 1 (i.e. there is no stride), block is necessarily not - * NULL and inner is NULL. - * - if the loop comes as a result of a cloog_loop_generate call, the domain - * describes the constraints (guards and loop bounds) for only one dimension - * (the last one: outer dimensions being considered as parameters), the stride - * may differ from one (this means that on the considered dimension, a step of - * 'stride' must be considered between integral point, the first integral - * point to be considered being the lower bound of the loop), inner may differ - * from NULL, meaning that there are further dimensions and nesting levels in - * the loop. - */ -struct cloogloop -{ - CloogState *state; /**< State. */ - CloogDomain * domain ; /**< The iteration domain. */ - CloogDomain *unsimplified; /**< Unsimplified version of domain. */ - int otl; /**< Loop is executed at most once. */ - CloogStride *stride; /**< If not NULL, stride information on iterator - * (filled only after loop generation). - */ - CloogBlock * block ; /**< The included statement block, NULL if none.*/ - void * usr; /**< User field, for library user convenience. - * This pointer is not freed when the - * CloogLoop structure is freed. - */ - struct cloogloop * inner ; /**< Loops at the next level. */ - struct cloogloop * next ; /**< Next loop at the same level. */ -} ; -typedef struct cloogloop CloogLoop ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_loop_print_structure(FILE *, CloogLoop *, int) ; -void cloog_loop_print(FILE *, CloogLoop *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_loop_free(CloogLoop *) ; - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ -CloogLoop *cloog_loop_from_domain(CloogState *state, CloogDomain *domain, - int number); -CloogLoop * cloog_loop_read(CloogState *state, - FILE * foo, int number, int nb_parameters); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogLoop * cloog_loop_block(CloogLoop *loop, int *scaldims, int nb_scattdims); -CloogLoop * cloog_loop_malloc(CloogState *state); -CloogLoop *cloog_loop_generate(CloogLoop *loop, CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options); -CloogLoop *cloog_loop_simplify(CloogLoop *loop, CloogDomain *context, int level, - int nb_scattdims, CloogOptions *options); -void cloog_loop_scatter(CloogLoop *, CloogScattering *); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/matrix.h b/cloog-0.16.3/include/cloog/matrix.h deleted file mode 100644 index 2b73039e126083090be4e79d8935b2d19d9938f3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/matrix.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef CLOOG_MATRIX_H -#define CLOOG_MATRIX_H -#if defined(__cplusplus) -extern "C" - { -#endif - -/* The CloogMatrix structure is equivalent to the PolyLib Matrix data structure - * (see Wil93). This structure is devoted to represent a set of constraints. - * - * The whole matrix is stored in memory row after row at the p_Init address. p - * is an array of pointers where p[i] points to the first element of the i^{th - * row. NbRows and NbColumns are respectively the number of rows and columns of - * the matrix. Each row corresponds to a constraint. The first element of each - * row is an equality/inequality tag. The constraint is an equality p(x) = 0 if - * the first element is 0, but it is an inequality p(x) \geq 0 if the first - * element is 1. The next elements are the unknown coefficients, followed by - * the parameter coefficients, then the constant term. For instance, the - * following three constraints: - * - * -i + m = 0 - * -j + n >= 0 - * i + j - k >= 0 - * - * would be represented by the following rows: - * - * # eq/in i j k m n cst - * 0 0 -1 0 1 0 0 - * 1 -1 0 0 0 1 0 - * 1 1 1 -1 0 0 0 - * - * To be able to provide different precision version (CLooG supports 32 bits, - * 64 bits and arbitrary precision through the GMP library), the cloog_int_t - * type depends on the configuration options (it may be long int for 32 bits - * version, long long int for 64 bits version, and mpz_t for multiple precision - * version). */ - -struct cloogmatrix -{ unsigned NbRows; /* Number of rows. */ - unsigned NbColumns; /* Number of columns. */ - cloog_int_t ** p; /* Array of pointers to the matrix rows. */ - cloog_int_t * p_Init; /* Matrix rows contiguously in memory. */ -}; - -typedef struct cloogmatrix CloogMatrix; - -CloogMatrix *cloog_matrix_alloc (unsigned, unsigned); -void cloog_matrix_free (CloogMatrix *); -void cloog_matrix_print_structure(FILE *file, CloogMatrix *M, - const char *prefix, const char *suffix); -CloogMatrix *cloog_matrix_read(FILE *input); -CloogMatrix *cloog_matrix_read_of_size(FILE *input, - unsigned n_row, unsigned n_col); -void cloog_matrix_print(FILE*, CloogMatrix*); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/matrix/constraintset.h b/cloog-0.16.3/include/cloog/matrix/constraintset.h deleted file mode 100644 index 50231629f905b63efa6fff8708881d51daca21ca..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/matrix/constraintset.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef CLOOG_MATRIX_CONSTRAINTSET_H -#define CLOOG_MATRIX_CONSTRAINTSET_H - -#if defined(__cplusplus) -extern "C" - { -#endif - -struct cloogconstraintset { - CloogMatrix M; -}; - -struct cloogequalities { - CloogConstraintSet *constraints; - int *types; -}; - -struct cloogconstraint { - CloogConstraintSet *set; - cloog_int_t **line; -}; - -CloogConstraintSet *cloog_constraint_set_from_cloog_matrix(CloogMatrix *M); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/names.h b/cloog-0.16.3/include/cloog/names.h deleted file mode 100644 index 7f566f1ed6436973da7a2a227aeddb2620bb62c7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/names.h +++ /dev/null @@ -1,103 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** names.h ** - **-------------------------------------------------------------------** - ** First version: august 1st 2002 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_NAMES_H -#define CLOOG_NAMES_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -# define MAX_NAME 50 -# define FIRST_PARAMETER 'M' -# define FIRST_ITERATOR 'i' - - -/** - * CloogNames structure: - * this structure contains all the informations about parameter and iterator - * names (as strings). - */ -struct cloognames -{ int nb_scalars ; /**< Scalar dimension number. */ - int nb_scattering ; /**< Scattering iterator number. */ - int nb_iterators ; /**< Iterator number. */ - int nb_parameters ; /**< Parameter number. */ - char ** scalars ; /**< The scalar names (an array of strings). */ - char ** scattering ; /**< The scattering names (an array of strings). */ - char ** iterators ; /**< The iterator names (an array of strings). */ - char ** parameters ; /**< The parameter names (an array of strings). */ - int references; /**< Number of references to this structure. */ -} ; -typedef struct cloognames CloogNames ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_names_print_structure(FILE *, CloogNames *, int) ; -void cloog_names_print(FILE *, CloogNames *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_names_free(CloogNames *) ; - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ -char ** cloog_names_read_strings(FILE *file, int nb_items); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogNames * cloog_names_malloc(void); -CloogNames * cloog_names_copy(CloogNames *names); -CloogNames * cloog_names_alloc(void); -char ** cloog_names_generate_items(int, char *, char) ; -CloogNames * cloog_names_generate(int, int, int, int, char, char, char, char) ; -void cloog_names_scalarize(CloogNames *, int, int *) ; -const char * cloog_names_name_at_level(CloogNames *names, int level); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/options.h b/cloog-0.16.3/include/cloog/options.h deleted file mode 100644 index 97e482ee6c373273a1573f04b762d40440b99f07..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/options.h +++ /dev/null @@ -1,159 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** options.h ** - **-------------------------------------------------------------------** - ** First version: april 19th 2003 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - -#include - -#ifndef CLOOG_OPTIONS_H -#define CLOOG_OPTIONS_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -/* Uncomment the following line if you want some information about - * maximum total allocated memory for code generation. -#define CLOOG_MEMORY - */ -#define CLOOG_SCALARS - -struct cloogoptions; -typedef struct cloogoptions CloogOptions; - -struct cloogoptions -{ - CloogState *state; /* State. */ - /* OPTIONS FOR LOOP GENERATION */ - int l ; /* Last level to optimize. */ - int f ; /* First level to optimize. */ - int stop ; /* Level to stop code generation. */ - int strides ; /* 1 if user wants to handle non-unit strides (then loop - * increment can be something else than one), 0 otherwise. - */ - int sh; /* 1 for computing simple hulls */ - int first_unroll; - - /* OPTIONS FOR PRETTY PRINTING */ - int esp ; /* 1 if user wants to spread all equalities, i.e. when there - * is something like "i = 3*j + 1 ; A[i] = 0 ;" the generator - * will write "A[3*j + 1] = 0 ;", 0 otherwise. - */ - int fsp ; /* The iteration level where equalities spreading can begin - * (it might happen that the user wants not to spread values - * of scattering iterators). - */ - int otl ; /* 1 for eliminate loops running just one time and write them - * as an affectation of the iterator, 0 otherwise. - */ - int block ; /* 1 to make one new block {...} per new dimension, - * 0 otherwise. - */ - int compilable; /* 1 to generate a compilable code by using - * preprocessing, 0 otherwise. - */ - int callable; /* 1 to generate callable code by using - * preprocessing, 0 otherwise. - */ - int language; /* 1 to generate FORTRAN, 0 for C otherwise. */ - - int save_domains;/* Save unsimplified copy of domain. */ - - /* MISC OPTIONS */ - char * name ; /* Name of the input file. */ - float time ; /* Time spent for code generation in seconds. */ -#ifdef CLOOG_MEMORY - int memory ; /* Memory spent for code generation in kilobytes. */ -#endif - int quiet; /* Don't print any informational messages. */ - /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */ - int leaks ; /* 1 if I want to print the allocation statistics, - * 0 otherwise. - */ - int backtrack; /* 1 to perform backtracking in - * Quillere's algorithm, 0 otherwise. - */ - int override ; /* 1 if I want to bypass CLooG decisions on option correctness - * (generated code may be incorrect), 0 otherwise. - */ - int structure ; /* 1 if I want to print the CloogProgram structure before the - * pretty printed code, 0 otherwise. - */ - int noblocks ; /* 1 if I don't want to make statement blocks, 0 otherwise. */ - int noscalars ; /* 1 if I don't want to use scalar dimensions, 0 otherwise. */ - int nosimplify; /* 1 if I don't want to simplify polyhedra, 0 otherwise. */ -} ; - - -/****************************************************************************** - * Error reporting functions * - ******************************************************************************/ - -enum cloog_msg_type { CLOOG_ERROR, CLOOG_WARNING, CLOOG_INFO }; - -void cloog_msg(CloogOptions *options, enum cloog_msg_type type, - const char *msg, ...); -void cloog_die(const char *msg, ...); - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_options_print(FILE *, CloogOptions *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_options_free(CloogOptions *) ; - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ -void cloog_options_read(CloogState *state, int argc, char **argv, - FILE **input, FILE **output, CloogOptions **options); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogOptions *cloog_options_malloc(CloogState *state); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/pprint.h b/cloog-0.16.3/include/cloog/pprint.h deleted file mode 100644 index 62fb244f85a048a66cbdf1212a45c7c7140dd9db..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/pprint.h +++ /dev/null @@ -1,68 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** pprint.h ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_PPRINT_H -#define CLOOG_PPRINT_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -# define MAX_STRING_VAL 32 -# define INDENT_STEP 2 - -# define EQTYPE_NONE 0 -# define EQTYPE_CONSTANT 1 -# define EQTYPE_PUREITEM 2 -# define EQTYPE_EXAFFINE 3 - -# define LANGUAGE_C 0 -# define LANGUAGE_FORTRAN 1 - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void clast_pprint(FILE *foo, struct clast_stmt *root, int indent, - CloogOptions *options); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/program.h b/cloog-0.16.3/include/cloog/program.h deleted file mode 100644 index 530d21f2e0959a7b18824cd3f7399351b36a8461..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/program.h +++ /dev/null @@ -1,116 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** program.h ** - **-------------------------------------------------------------------** - ** First version: october 25th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_PROGRAM_H -#define CLOOG_PROGRAM_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -# define MAX_STRING 1024 -# define MEGA 1000000 /* One million. */ - - -/** - * CloogProgram structure: - * this structure contains all the informations of a program generated or to be - * generated. - */ -struct cloogprogram -{ /* Basic program description fields. */ - char language ; /**< The language of the program. */ - int nb_scattdims ; /**< Scattering dimension number. */ - CloogDomain * context ; /**< The context of the program. */ - CloogLoop * loop ; /**< The loops of the program. */ - CloogNames * names ; /**< Iterators and parameters names. */ - CloogBlockList * blocklist ; /**< The statement block list. */ - - /* Internal service fields, filled up by cloog_program_scatter function. */ - int * scaldims ; /**< Boolean array saying whether a given - * scattering dimension is scalar or not. - */ - /* Library user reserved field. */ - void * usr; /**< User field, for library user convenience. - * This pointer is not freed when the - * CloogProgram structure is freed. - */ -} ; -typedef struct cloogprogram CloogProgram ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_program_print_structure(FILE *, CloogProgram *, int) ; -void cloog_program_print(FILE *, CloogProgram *) ; -void cloog_program_pprint(FILE *, CloogProgram *, CloogOptions *) ; -void cloog_program_dump_cloog(FILE *, CloogProgram *, CloogScatteringList *); - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_program_free(CloogProgram *) ; - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ -CloogProgram * cloog_program_read(FILE *, CloogOptions *) ; - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogProgram * cloog_program_malloc(void); -CloogProgram * cloog_program_alloc(CloogDomain *context, CloogUnionDomain *ud, - CloogOptions *options); -CloogProgram * cloog_program_generate(CloogProgram *, CloogOptions *) ; -void cloog_program_block(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options); -void cloog_program_extract_scalars(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options); -void cloog_program_scatter(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ - diff --git a/cloog-0.16.3/include/cloog/state.h b/cloog-0.16.3/include/cloog/state.h deleted file mode 100644 index ebc3272507d5de76ac45845649682931ff88b23f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/state.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef CLOOG_STATE_H -#define CLOOG_STATE_H - -struct cloogbackend; -typedef struct cloogbackend CloogBackend; - -#if defined(__cplusplus) -extern "C" { -#endif - -struct cloogstate { - CloogBackend *backend; - - cloog_int_t zero; - cloog_int_t one; - cloog_int_t negone; - - int block_allocated; - int block_freed; - int block_max; - - int domain_allocated; - int domain_freed; - int domain_max; - - int loop_allocated; - int loop_freed; - int loop_max; - - int statement_allocated; - int statement_freed; - int statement_max; -}; -typedef struct cloogstate CloogState; - -CloogState *cloog_core_state_malloc(void); -CloogState *cloog_state_malloc(void); - -void cloog_core_state_free(CloogState *state); -void cloog_state_free(CloogState *state); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/include/cloog/statement.h b/cloog-0.16.3/include/cloog/statement.h deleted file mode 100644 index abc505e10ed4eac1d9d9ddc0512b589ee50410ed..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/statement.h +++ /dev/null @@ -1,85 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** statement.h ** - **-------------------------------------------------------------------** - ** First version: november 4th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_STATEMENT_H -#define CLOOG_STATEMENT_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -struct cloogstatement -{ - CloogState *state; /* State. */ - char *name; /* Name of the statement. */ - int number; /* The statement unique number. */ - void * usr ; /* A pointer for library users convenience. */ - struct cloogstatement * next ; /* Pointer to the next statement with the - * same original domain and the same - * scattering function. - */ -} ; -typedef struct cloogstatement CloogStatement ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_statement_print_structure(FILE *, CloogStatement *, int) ; -void cloog_statement_print(FILE *, CloogStatement *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_statement_free(CloogStatement *) ; - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogStatement * cloog_statement_malloc(CloogState *state); -CloogStatement * cloog_statement_alloc(CloogState *state, int); -CloogStatement * cloog_statement_copy(CloogStatement *) ; -void cloog_statement_add(CloogStatement**, CloogStatement**, CloogStatement*) ; - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ - diff --git a/cloog-0.16.3/include/cloog/stride.h b/cloog-0.16.3/include/cloog/stride.h deleted file mode 100644 index f93dc4e3f867c724c7b47c097f7c2894387853da..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/stride.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef CLOOG_STRIDE_H -#define CLOOG_STRIDE_H - -#if defined(__cplusplus) -extern "C" { -#endif - -/** - * Information about strides. - */ -struct cloogstride { - int references; - cloog_int_t stride; /**< The actual stride. */ - cloog_int_t offset; /**< Offset of strided loop. */ - cloog_int_t factor; - CloogConstraint *constraint; -}; -typedef struct cloogstride CloogStride; - -CloogStride *cloog_stride_alloc(cloog_int_t stride, cloog_int_t offset); -CloogStride *cloog_stride_alloc_from_constraint(cloog_int_t stride, - CloogConstraint *constraint, cloog_int_t factor); -CloogStride *cloog_stride_copy(CloogStride *stride); -void cloog_stride_free(CloogStride *stride); - -CloogConstraint *cloog_constraint_stride_lower_bound(CloogConstraint *c, - int level, CloogStride *stride); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/include/cloog/union_domain.h b/cloog-0.16.3/include/cloog/union_domain.h deleted file mode 100644 index 7fc9eef45b8483d550f549b6e31cc8c5f68a5d9b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/union_domain.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef CLOOG_UNION_DOMAIN_H -#define CLOOG_UNION_DOMAIN_H - -#if defined(__cplusplus) -extern "C" { -#endif - -/** - * CloogNamedDomainList structure: - * this structure reprensents a node of a linked list of CloogDomain structures. - */ -struct cloognameddomainlist { - CloogDomain *domain; /**< An element of the list. */ - CloogScattering *scattering; /**< Scattering function for domain. */ - char *name; /**< Name of the domain. */ - void *usr; /**< A pointer for library user's convenience. */ - struct cloognameddomainlist *next;/**< Pointer to the next element of the list.*/ -}; -typedef struct cloognameddomainlist CloogNamedDomainList; - -/** - * A structure representing the input domains and scattering functions. - */ -struct clooguniondomain { - int n_name[3]; - char **name[3]; - CloogNamedDomainList *domain; - CloogNamedDomainList **next_domain; -}; -typedef struct clooguniondomain CloogUnionDomain; - -enum cloog_dim_type { CLOOG_PARAM, CLOOG_ITER, CLOOG_SCAT }; - -CloogUnionDomain *cloog_union_domain_read(FILE *file, int nb_par, - CloogOptions *options); -CloogUnionDomain *cloog_union_domain_alloc(int nb_par); -CloogUnionDomain *cloog_union_domain_add_domain(CloogUnionDomain *ud, - const char *name, CloogDomain *domain, CloogScattering *scattering, - void *usr); -CloogUnionDomain *cloog_union_domain_set_name(CloogUnionDomain *ud, - enum cloog_dim_type type, int index, const char *name); -void cloog_union_domain_free(CloogUnionDomain *ud); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/include/cloog/version.h b/cloog-0.16.3/include/cloog/version.h deleted file mode 100644 index c24b9d3bbf10486113a8244e52e08f9ec627128f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/version.h +++ /dev/null @@ -1,50 +0,0 @@ -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_VERSION_H -#define CLOOG_VERSION_H -#if defined(__cplusplus) -extern "C" - { -#endif - -#define CLOOG_VERSION_MAJOR 0 -#define CLOOG_VERSION_MINOR 16 -#define CLOOG_VERSION_REVISION 3 - -const char *cloog_version(void); - -int cloog_version_major(void); - -int cloog_version_minor(void); - -int cloog_version_revision(void); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/include/cloog/version.h.in b/cloog-0.16.3/include/cloog/version.h.in deleted file mode 100644 index cee91a04debce3511c7336276ee6f206a76e7b4f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/include/cloog/version.h.in +++ /dev/null @@ -1,50 +0,0 @@ -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_VERSION_H -#define CLOOG_VERSION_H -#if defined(__cplusplus) -extern "C" - { -#endif - -#define CLOOG_VERSION_MAJOR @VERSION_MAJOR@ -#define CLOOG_VERSION_MINOR @VERSION_MINOR@ -#define CLOOG_VERSION_REVISION @VERSION_REVISION@ - -const char *cloog_version(void); - -int cloog_version_major(void); - -int cloog_version_minor(void); - -int cloog_version_revision(void); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.16.3/isl/AUTHORS b/cloog-0.16.3/isl/AUTHORS deleted file mode 100644 index 965ed119ef497a5205910e7539565b4338ba766b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/AUTHORS +++ /dev/null @@ -1,19 +0,0 @@ -isl was written by - - Sven Verdoolaege -2006-2007 Leiden Institute of Advanced Computer Science - Universiteit Leiden - Niels Bohrweg 1 - 2333 CA Leiden - The Netherlands -2008-2009 K.U.Leuven - Departement Computerwetenschappen - Celestijnenlaan 200A - B-3001 Leuven - Belgium -2010 INRIA Saclay - Ile-de-France - Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod - 91893 Orsay - France - -The quicksort implementation was written by Douglas C. Schmidt. diff --git a/cloog-0.16.3/isl/ChangeLog b/cloog-0.16.3/isl/ChangeLog deleted file mode 100644 index 96e77a30308998b316d20b50b7dafdd466fbcb7f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/ChangeLog +++ /dev/null @@ -1,51 +0,0 @@ -version: 0.07 -date: Tue Jul 12 19:34:51 CEST 2011 -changes: - - hide internal structures of isl_div and isl_constraint - - preliminary scheduling - - add support for local spaces and (piecewise) quasi-affine expressions ---- -version: 0.06 -date: Fri Mar 18 15:59:16 CET 2011 -changes: - - improved parsing - - consistency changes in API - - hide internal structure of isl_ctx ---- -version: 0.05.1 -date: Wed Jan 5 10:21:42 CET 2011 -changes: - - fix simple symmetry detection in parametric integer programming ---- -version: 0.05 -date: Thu Dec 23 17:03:14 CET 2010 -changes: - - rename header files from isl_header.h to isl/header.h - - add higher level interface for dependence analysis - - improved argument parsing - - optionally triangulate domains during Bernstein expansion - - support extended PolyLib format - - hide internal structure of some data types - - improved coalescing - - add simple symmetry detection in parametric integer programming ---- -version: 0.04 -date: Fri Sep 10 12:57:50 CEST 2010 -changes: - - rename isl_pw_qpolynomial_fold_add - - add isl_map_apply_pw_qpolynomial_fold - - support named and nested spaces - - support union sets and maps - - add public API for matrices ---- -version: 0.03 -date: Tue Jun 29 13:16:46 CEST 2010 -changes: - - new printing functions - - support for "may" accesses in dependence analysis - - improved coalescing - - improved transitive closure - - fix several hard to trigger bugs - - improved argument parsing - - support parametric vertex enumeration for barvinok - - optionally use Bernstein expansion to compute bounds diff --git a/cloog-0.16.3/isl/GIT_HEAD_ID b/cloog-0.16.3/isl/GIT_HEAD_ID deleted file mode 100644 index 6c13e124af02789a169bb3c133efbc092f2e7422..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/GIT_HEAD_ID +++ /dev/null @@ -1 +0,0 @@ -isl-0.07 diff --git a/cloog-0.16.3/isl/Makefile.am b/cloog-0.16.3/isl/Makefile.am deleted file mode 100644 index e3e96d02ad5f5575bc39bc1099701ddfd320984a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/Makefile.am +++ /dev/null @@ -1,263 +0,0 @@ -SUBDIRS = . doc -DIST_SUBDIRS = doc - -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = nostdinc - -lib_LTLIBRARIES = libisl.la -noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \ - isl_polyhedron_minimize isl_polytope_scan \ - isl_polyhedron_detect_equalities isl_cat \ - isl_closure isl_bound -TESTS = isl_test pip_test.sh bound_test.sh - -if HAVE_PIPLIB -ISL_PIPLIB = \ - isl_lp_piplib.c \ - isl_map_piplib.c \ - isl_sample_piplib.c \ - isl_sample_piplib.h \ - isl_piplib.c -else -ISL_PIPLIB = \ - isl_lp_no_piplib.c \ - isl_map_no_piplib.c \ - isl_sample_no_piplib.c -endif - -if NEED_GET_MEMORY_FUNCTIONS -GET_MEMORY_FUNCTIONS=mp_get_memory_functions.c -endif - -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/ -AM_CFLAGS = @WARNING_FLAGS@ - -libisl_la_SOURCES = \ - $(ISL_PIPLIB) \ - $(GET_MEMORY_FUNCTIONS) \ - isl_aff.c \ - isl_aff_private.h \ - isl_affine_hull.c \ - isl_arg.c \ - isl_band.c \ - isl_band_private.h \ - isl_basis_reduction.h \ - basis_reduction_tab.c \ - isl_bernstein.c \ - isl_bernstein.h \ - isl_blk.c \ - isl_bound.c \ - isl_bound.h \ - isl_coalesce.c \ - isl_constraint.c \ - isl_constraint_private.h \ - isl_convex_hull.c \ - isl_ctx.c \ - isl_ctx_private.h \ - isl_dim.c \ - isl_dim_private.h \ - isl_dim_map.h \ - isl_dim_map.c \ - isl_div.c \ - isl_div_private.h \ - isl_equalities.c \ - isl_equalities.h \ - isl_factorization.c \ - isl_factorization.h \ - isl_farkas.c \ - isl_flow.c \ - isl_fold.c \ - isl_gmp.c \ - isl_hash.c \ - isl_hmap_map_basic_set.c \ - isl_hmap_map_basic_set.h \ - isl_ilp.c \ - isl_input.c \ - isl_list.c \ - isl_list_private.h \ - isl_local_space_private.h \ - isl_local_space.c \ - isl_lp.c \ - isl_lp_piplib.h \ - isl_map.c \ - isl_map_simplify.c \ - isl_map_subtract.c \ - isl_map_private.h \ - isl_map_piplib.h \ - isl_mat.c \ - isl_mat_private.h \ - isl_morph.c \ - isl_morph.h \ - isl_name.c \ - isl_name.h \ - isl_obj.c \ - isl_options.c \ - isl_output.c \ - isl_qsort.c \ - isl_qsort.h \ - isl_piplib.h \ - isl_point_private.h \ - isl_point.c \ - isl_polynomial_private.h \ - isl_polynomial.c \ - isl_printer_private.h \ - isl_printer.c \ - isl_range.c \ - isl_range.h \ - isl_reordering.c \ - isl_reordering.h \ - isl_sample.h \ - isl_sample.c \ - isl_scan.c \ - isl_scan.h \ - isl_schedule.c \ - isl_schedule_private.h \ - isl_stream.c \ - isl_seq.c \ - isl_tab.c \ - isl_tab.h \ - isl_tab_pip.c \ - isl_transitive_closure.c \ - isl_union_map.c \ - isl_union_map_private.h \ - isl_vec.c \ - isl_version.c \ - isl_vertices_private.h \ - isl_vertices.c -EXTRA_libisl_la_SOURCES = \ - isl_lp_piplib.c \ - isl_lp_no_piplib.c \ - isl_map_piplib.c \ - isl_map_no_piplib.c \ - isl_sample_no_piplib.c \ - isl_sample_piplib.c \ - isl_sample_piplib.h \ - isl_piplib.c -libisl_la_LIBADD = @PIPLIB_LIBS@ -lgmp -libisl_la_LDFLAGS = -version-info @versioninfo@ \ - @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@ -libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@ - -isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_test_LDFLAGS = @GMP_LDFLAGS@ -isl_test_LDADD = libisl.la -lgmp - -isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_sample_LDADD = libisl.la -isl_polyhedron_sample_SOURCES = \ - polyhedron_sample.c - -isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_pip_LDFLAGS = @GMP_LDFLAGS@ -isl_pip_LDADD = libisl.la -lgmp -isl_pip_SOURCES = \ - pip.c - -isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_bound_LDFLAGS = @GMP_LDFLAGS@ -isl_bound_LDADD = libisl.la -lgmp -isl_bound_SOURCES = \ - bound.c - -isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_minimize_LDFLAGS = @GMP_LDFLAGS@ -isl_polyhedron_minimize_LDADD = libisl.la -lgmp -isl_polyhedron_minimize_SOURCES = \ - polyhedron_minimize.c - -isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polytope_scan_LDADD = libisl.la -isl_polytope_scan_SOURCES = \ - polytope_scan.c - -isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_detect_equalities_LDADD = libisl.la -isl_polyhedron_detect_equalities_SOURCES = \ - polyhedron_detect_equalities.c - -isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_cat_LDADD = libisl.la -isl_cat_SOURCES = \ - cat.c - -isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_closure_LDADD = libisl.la -isl_closure_SOURCES = \ - closure.c - -nodist_pkginclude_HEADERS = \ - include/isl/config.h \ - include/isl/stdint.h -pkginclude_HEADERS = \ - include/isl/aff.h \ - include/isl/aff_type.h \ - include/isl/arg.h \ - include/isl/band.h \ - include/isl/blk.h \ - include/isl/constraint.h \ - include/isl/ctx.h \ - include/isl/dim.h \ - include/isl/div.h \ - include/isl/flow.h \ - include/isl/ilp.h \ - include/isl/int.h \ - include/isl/hash.h \ - include/isl/list.h \ - include/isl/local_space.h \ - include/isl/lp.h \ - include/isl/mat.h \ - include/isl/map.h \ - include/isl/map_type.h \ - include/isl/obj.h \ - include/isl/options.h \ - include/isl/point.h \ - include/isl/polynomial.h \ - include/isl/printer.h \ - include/isl/schedule.h \ - include/isl/seq.h \ - include/isl/set.h \ - include/isl/set_type.h \ - include/isl/stream.h \ - include/isl/union_map.h \ - include/isl/union_set.h \ - include/isl/vec.h \ - include/isl/version.h \ - include/isl/vertices.h - -EXTRA_DIST = \ - isl_config_post.h \ - basis_reduction_templ.c \ - isl_list_templ.c \ - isl_list_templ.h \ - isl_pw_templ.c \ - isl_union_templ.c \ - isl.py \ - doc/chicago.bst \ - doc/chicago.sty \ - doc/implementation.tex \ - doc/isl.bib \ - doc/mypod2latex \ - doc/manual.tex \ - doc/user.pod \ - test_inputs - -dist-hook: - echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID - (cd doc; make manual.pdf) - cp doc/manual.pdf $(distdir)/doc/ - -pkgconfigdir=$(pkgconfig_libdir) -pkgconfig_DATA = $(pkgconfig_libfile) - -gitversion.h: @GIT_HEAD@ - $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@ - -install-data-local: $(srcdir)/isl.py - @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \ - $(builddir)/libisl.la`; \ - case $$libisl in \ - '') echo Cannot find isl library name. GDB bindings not installed.;; \ - *) echo $(INSTALL_DATA) $(srcdir)/isl.py \ - $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ - $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac diff --git a/cloog-0.16.3/isl/Makefile.in b/cloog-0.16.3/isl/Makefile.in deleted file mode 100644 index 1ff453fd37aec34a4ae3aa238e5a99d9c4faf0de..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/Makefile.in +++ /dev/null @@ -1,2198 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = isl_test$(EXEEXT) isl_polyhedron_sample$(EXEEXT) \ - isl_pip$(EXEEXT) isl_polyhedron_minimize$(EXEEXT) \ - isl_polytope_scan$(EXEEXT) \ - isl_polyhedron_detect_equalities$(EXEEXT) isl_cat$(EXEEXT) \ - isl_closure$(EXEEXT) isl_bound$(EXEEXT) -TESTS = isl_test$(EXEEXT) pip_test.sh bound_test.sh -subdir = . -DIST_COMMON = $(am__configure_deps) $(pkginclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/bound_test.sh.in $(srcdir)/isl_config.h.in \ - $(srcdir)/pip_test.sh.in $(top_srcdir)/configure \ - $(top_srcdir)/include/isl/config.h.in AUTHORS ChangeLog \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/m4/ax_detect_git_head.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_warn_unused_result.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_set_warning_flags.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = isl_config.h $(top_builddir)/include/isl/config.h -CONFIG_CLEAN_FILES = bound_test.sh pip_test.sh -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libisl_la_DEPENDENCIES = -am__libisl_la_SOURCES_DIST = isl_lp_no_piplib.c isl_map_no_piplib.c \ - isl_sample_no_piplib.c isl_lp_piplib.c isl_map_piplib.c \ - isl_sample_piplib.c isl_sample_piplib.h isl_piplib.c \ - mp_get_memory_functions.c isl_aff.c isl_aff_private.h \ - isl_affine_hull.c isl_arg.c isl_band.c isl_band_private.h \ - isl_basis_reduction.h basis_reduction_tab.c isl_bernstein.c \ - isl_bernstein.h isl_blk.c isl_bound.c isl_bound.h \ - isl_coalesce.c isl_constraint.c isl_constraint_private.h \ - isl_convex_hull.c isl_ctx.c isl_ctx_private.h isl_dim.c \ - isl_dim_private.h isl_dim_map.h isl_dim_map.c isl_div.c \ - isl_div_private.h isl_equalities.c isl_equalities.h \ - isl_factorization.c isl_factorization.h isl_farkas.c \ - isl_flow.c isl_fold.c isl_gmp.c isl_hash.c \ - isl_hmap_map_basic_set.c isl_hmap_map_basic_set.h isl_ilp.c \ - isl_input.c isl_list.c isl_list_private.h \ - isl_local_space_private.h isl_local_space.c isl_lp.c \ - isl_lp_piplib.h isl_map.c isl_map_simplify.c \ - isl_map_subtract.c isl_map_private.h isl_map_piplib.h \ - isl_mat.c isl_mat_private.h isl_morph.c isl_morph.h isl_name.c \ - isl_name.h isl_obj.c isl_options.c isl_output.c isl_qsort.c \ - isl_qsort.h isl_piplib.h isl_point_private.h isl_point.c \ - isl_polynomial_private.h isl_polynomial.c \ - isl_printer_private.h isl_printer.c isl_range.c isl_range.h \ - isl_reordering.c isl_reordering.h isl_sample.h isl_sample.c \ - isl_scan.c isl_scan.h isl_schedule.c isl_schedule_private.h \ - isl_stream.c isl_seq.c isl_tab.c isl_tab.h isl_tab_pip.c \ - isl_transitive_closure.c isl_union_map.c \ - isl_union_map_private.h isl_vec.c isl_version.c \ - isl_vertices_private.h isl_vertices.c -@HAVE_PIPLIB_FALSE@am__objects_1 = libisl_la-isl_lp_no_piplib.lo \ -@HAVE_PIPLIB_FALSE@ libisl_la-isl_map_no_piplib.lo \ -@HAVE_PIPLIB_FALSE@ libisl_la-isl_sample_no_piplib.lo -@HAVE_PIPLIB_TRUE@am__objects_1 = libisl_la-isl_lp_piplib.lo \ -@HAVE_PIPLIB_TRUE@ libisl_la-isl_map_piplib.lo \ -@HAVE_PIPLIB_TRUE@ libisl_la-isl_sample_piplib.lo \ -@HAVE_PIPLIB_TRUE@ libisl_la-isl_piplib.lo -@NEED_GET_MEMORY_FUNCTIONS_TRUE@am__objects_2 = libisl_la-mp_get_memory_functions.lo -am_libisl_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ - libisl_la-isl_aff.lo libisl_la-isl_affine_hull.lo \ - libisl_la-isl_arg.lo libisl_la-isl_band.lo \ - libisl_la-basis_reduction_tab.lo libisl_la-isl_bernstein.lo \ - libisl_la-isl_blk.lo libisl_la-isl_bound.lo \ - libisl_la-isl_coalesce.lo libisl_la-isl_constraint.lo \ - libisl_la-isl_convex_hull.lo libisl_la-isl_ctx.lo \ - libisl_la-isl_dim.lo libisl_la-isl_dim_map.lo \ - libisl_la-isl_div.lo libisl_la-isl_equalities.lo \ - libisl_la-isl_factorization.lo libisl_la-isl_farkas.lo \ - libisl_la-isl_flow.lo libisl_la-isl_fold.lo \ - libisl_la-isl_gmp.lo libisl_la-isl_hash.lo \ - libisl_la-isl_hmap_map_basic_set.lo libisl_la-isl_ilp.lo \ - libisl_la-isl_input.lo libisl_la-isl_list.lo \ - libisl_la-isl_local_space.lo libisl_la-isl_lp.lo \ - libisl_la-isl_map.lo libisl_la-isl_map_simplify.lo \ - libisl_la-isl_map_subtract.lo libisl_la-isl_mat.lo \ - libisl_la-isl_morph.lo libisl_la-isl_name.lo \ - libisl_la-isl_obj.lo libisl_la-isl_options.lo \ - libisl_la-isl_output.lo libisl_la-isl_qsort.lo \ - libisl_la-isl_point.lo libisl_la-isl_polynomial.lo \ - libisl_la-isl_printer.lo libisl_la-isl_range.lo \ - libisl_la-isl_reordering.lo libisl_la-isl_sample.lo \ - libisl_la-isl_scan.lo libisl_la-isl_schedule.lo \ - libisl_la-isl_stream.lo libisl_la-isl_seq.lo \ - libisl_la-isl_tab.lo libisl_la-isl_tab_pip.lo \ - libisl_la-isl_transitive_closure.lo libisl_la-isl_union_map.lo \ - libisl_la-isl_vec.lo libisl_la-isl_version.lo \ - libisl_la-isl_vertices.lo -libisl_la_OBJECTS = $(am_libisl_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libisl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libisl_la_LDFLAGS) $(LDFLAGS) -o $@ -PROGRAMS = $(noinst_PROGRAMS) -am_isl_bound_OBJECTS = isl_bound-bound.$(OBJEXT) -isl_bound_OBJECTS = $(am_isl_bound_OBJECTS) -isl_bound_DEPENDENCIES = libisl.la -isl_bound_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(isl_bound_LDFLAGS) $(LDFLAGS) -o $@ -am_isl_cat_OBJECTS = isl_cat-cat.$(OBJEXT) -isl_cat_OBJECTS = $(am_isl_cat_OBJECTS) -isl_cat_DEPENDENCIES = libisl.la -am_isl_closure_OBJECTS = isl_closure-closure.$(OBJEXT) -isl_closure_OBJECTS = $(am_isl_closure_OBJECTS) -isl_closure_DEPENDENCIES = libisl.la -am_isl_pip_OBJECTS = isl_pip-pip.$(OBJEXT) -isl_pip_OBJECTS = $(am_isl_pip_OBJECTS) -isl_pip_DEPENDENCIES = libisl.la -isl_pip_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(isl_pip_LDFLAGS) $(LDFLAGS) -o $@ -am_isl_polyhedron_detect_equalities_OBJECTS = isl_polyhedron_detect_equalities-polyhedron_detect_equalities.$(OBJEXT) -isl_polyhedron_detect_equalities_OBJECTS = \ - $(am_isl_polyhedron_detect_equalities_OBJECTS) -isl_polyhedron_detect_equalities_DEPENDENCIES = libisl.la -am_isl_polyhedron_minimize_OBJECTS = \ - isl_polyhedron_minimize-polyhedron_minimize.$(OBJEXT) -isl_polyhedron_minimize_OBJECTS = \ - $(am_isl_polyhedron_minimize_OBJECTS) -isl_polyhedron_minimize_DEPENDENCIES = libisl.la -isl_polyhedron_minimize_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(isl_polyhedron_minimize_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_isl_polyhedron_sample_OBJECTS = \ - isl_polyhedron_sample-polyhedron_sample.$(OBJEXT) -isl_polyhedron_sample_OBJECTS = $(am_isl_polyhedron_sample_OBJECTS) -isl_polyhedron_sample_DEPENDENCIES = libisl.la -am_isl_polytope_scan_OBJECTS = \ - isl_polytope_scan-polytope_scan.$(OBJEXT) -isl_polytope_scan_OBJECTS = $(am_isl_polytope_scan_OBJECTS) -isl_polytope_scan_DEPENDENCIES = libisl.la -isl_test_SOURCES = isl_test.c -isl_test_OBJECTS = isl_test-isl_test.$(OBJEXT) -isl_test_DEPENDENCIES = libisl.la -isl_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(isl_test_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libisl_la_SOURCES) $(EXTRA_libisl_la_SOURCES) \ - $(isl_bound_SOURCES) $(isl_cat_SOURCES) $(isl_closure_SOURCES) \ - $(isl_pip_SOURCES) $(isl_polyhedron_detect_equalities_SOURCES) \ - $(isl_polyhedron_minimize_SOURCES) \ - $(isl_polyhedron_sample_SOURCES) $(isl_polytope_scan_SOURCES) \ - isl_test.c -DIST_SOURCES = $(am__libisl_la_SOURCES_DIST) \ - $(EXTRA_libisl_la_SOURCES) $(isl_bound_SOURCES) \ - $(isl_cat_SOURCES) $(isl_closure_SOURCES) $(isl_pip_SOURCES) \ - $(isl_polyhedron_detect_equalities_SOURCES) \ - $(isl_polyhedron_minimize_SOURCES) \ - $(isl_polyhedron_sample_SOURCES) $(isl_polytope_scan_SOURCES) \ - isl_test.c -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -DATA = $(pkgconfig_DATA) -HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_HEAD = @GIT_HEAD@ -GIT_HEAD_ID = @GIT_HEAD_ID@ -GIT_HEAD_VERSION = @GIT_HEAD_VERSION@ -GMP_CPPFLAGS = @GMP_CPPFLAGS@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFLATEX = @PDFLATEX@ -PERL = @PERL@ -PIPLIB_CPPFLAGS = @PIPLIB_CPPFLAGS@ -PIPLIB_LDFLAGS = @PIPLIB_LDFLAGS@ -PIPLIB_LIBS = @PIPLIB_LIBS@ -POD2HTML = @POD2HTML@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -WARNING_FLAGS = @WARNING_FLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -SUBDIRS = . doc -DIST_SUBDIRS = doc -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = nostdinc -lib_LTLIBRARIES = libisl.la -@HAVE_PIPLIB_FALSE@ISL_PIPLIB = \ -@HAVE_PIPLIB_FALSE@ isl_lp_no_piplib.c \ -@HAVE_PIPLIB_FALSE@ isl_map_no_piplib.c \ -@HAVE_PIPLIB_FALSE@ isl_sample_no_piplib.c - -@HAVE_PIPLIB_TRUE@ISL_PIPLIB = \ -@HAVE_PIPLIB_TRUE@ isl_lp_piplib.c \ -@HAVE_PIPLIB_TRUE@ isl_map_piplib.c \ -@HAVE_PIPLIB_TRUE@ isl_sample_piplib.c \ -@HAVE_PIPLIB_TRUE@ isl_sample_piplib.h \ -@HAVE_PIPLIB_TRUE@ isl_piplib.c - -@NEED_GET_MEMORY_FUNCTIONS_TRUE@GET_MEMORY_FUNCTIONS = mp_get_memory_functions.c -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/ -AM_CFLAGS = @WARNING_FLAGS@ -libisl_la_SOURCES = \ - $(ISL_PIPLIB) \ - $(GET_MEMORY_FUNCTIONS) \ - isl_aff.c \ - isl_aff_private.h \ - isl_affine_hull.c \ - isl_arg.c \ - isl_band.c \ - isl_band_private.h \ - isl_basis_reduction.h \ - basis_reduction_tab.c \ - isl_bernstein.c \ - isl_bernstein.h \ - isl_blk.c \ - isl_bound.c \ - isl_bound.h \ - isl_coalesce.c \ - isl_constraint.c \ - isl_constraint_private.h \ - isl_convex_hull.c \ - isl_ctx.c \ - isl_ctx_private.h \ - isl_dim.c \ - isl_dim_private.h \ - isl_dim_map.h \ - isl_dim_map.c \ - isl_div.c \ - isl_div_private.h \ - isl_equalities.c \ - isl_equalities.h \ - isl_factorization.c \ - isl_factorization.h \ - isl_farkas.c \ - isl_flow.c \ - isl_fold.c \ - isl_gmp.c \ - isl_hash.c \ - isl_hmap_map_basic_set.c \ - isl_hmap_map_basic_set.h \ - isl_ilp.c \ - isl_input.c \ - isl_list.c \ - isl_list_private.h \ - isl_local_space_private.h \ - isl_local_space.c \ - isl_lp.c \ - isl_lp_piplib.h \ - isl_map.c \ - isl_map_simplify.c \ - isl_map_subtract.c \ - isl_map_private.h \ - isl_map_piplib.h \ - isl_mat.c \ - isl_mat_private.h \ - isl_morph.c \ - isl_morph.h \ - isl_name.c \ - isl_name.h \ - isl_obj.c \ - isl_options.c \ - isl_output.c \ - isl_qsort.c \ - isl_qsort.h \ - isl_piplib.h \ - isl_point_private.h \ - isl_point.c \ - isl_polynomial_private.h \ - isl_polynomial.c \ - isl_printer_private.h \ - isl_printer.c \ - isl_range.c \ - isl_range.h \ - isl_reordering.c \ - isl_reordering.h \ - isl_sample.h \ - isl_sample.c \ - isl_scan.c \ - isl_scan.h \ - isl_schedule.c \ - isl_schedule_private.h \ - isl_stream.c \ - isl_seq.c \ - isl_tab.c \ - isl_tab.h \ - isl_tab_pip.c \ - isl_transitive_closure.c \ - isl_union_map.c \ - isl_union_map_private.h \ - isl_vec.c \ - isl_version.c \ - isl_vertices_private.h \ - isl_vertices.c - -EXTRA_libisl_la_SOURCES = \ - isl_lp_piplib.c \ - isl_lp_no_piplib.c \ - isl_map_piplib.c \ - isl_map_no_piplib.c \ - isl_sample_no_piplib.c \ - isl_sample_piplib.c \ - isl_sample_piplib.h \ - isl_piplib.c - -libisl_la_LIBADD = @PIPLIB_LIBS@ -lgmp -libisl_la_LDFLAGS = -version-info @versioninfo@ \ - @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@ - -libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@ -isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_test_LDFLAGS = @GMP_LDFLAGS@ -isl_test_LDADD = libisl.la -lgmp -isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_sample_LDADD = libisl.la -isl_polyhedron_sample_SOURCES = \ - polyhedron_sample.c - -isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_pip_LDFLAGS = @GMP_LDFLAGS@ -isl_pip_LDADD = libisl.la -lgmp -isl_pip_SOURCES = \ - pip.c - -isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_bound_LDFLAGS = @GMP_LDFLAGS@ -isl_bound_LDADD = libisl.la -lgmp -isl_bound_SOURCES = \ - bound.c - -isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_minimize_LDFLAGS = @GMP_LDFLAGS@ -isl_polyhedron_minimize_LDADD = libisl.la -lgmp -isl_polyhedron_minimize_SOURCES = \ - polyhedron_minimize.c - -isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polytope_scan_LDADD = libisl.la -isl_polytope_scan_SOURCES = \ - polytope_scan.c - -isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_detect_equalities_LDADD = libisl.la -isl_polyhedron_detect_equalities_SOURCES = \ - polyhedron_detect_equalities.c - -isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_cat_LDADD = libisl.la -isl_cat_SOURCES = \ - cat.c - -isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_closure_LDADD = libisl.la -isl_closure_SOURCES = \ - closure.c - -nodist_pkginclude_HEADERS = \ - include/isl/config.h \ - include/isl/stdint.h - -pkginclude_HEADERS = \ - include/isl/aff.h \ - include/isl/aff_type.h \ - include/isl/arg.h \ - include/isl/band.h \ - include/isl/blk.h \ - include/isl/constraint.h \ - include/isl/ctx.h \ - include/isl/dim.h \ - include/isl/div.h \ - include/isl/flow.h \ - include/isl/ilp.h \ - include/isl/int.h \ - include/isl/hash.h \ - include/isl/list.h \ - include/isl/local_space.h \ - include/isl/lp.h \ - include/isl/mat.h \ - include/isl/map.h \ - include/isl/map_type.h \ - include/isl/obj.h \ - include/isl/options.h \ - include/isl/point.h \ - include/isl/polynomial.h \ - include/isl/printer.h \ - include/isl/schedule.h \ - include/isl/seq.h \ - include/isl/set.h \ - include/isl/set_type.h \ - include/isl/stream.h \ - include/isl/union_map.h \ - include/isl/union_set.h \ - include/isl/vec.h \ - include/isl/version.h \ - include/isl/vertices.h - -EXTRA_DIST = \ - isl_config_post.h \ - basis_reduction_templ.c \ - isl_list_templ.c \ - isl_list_templ.h \ - isl_pw_templ.c \ - isl_union_templ.c \ - isl.py \ - doc/chicago.bst \ - doc/chicago.sty \ - doc/implementation.tex \ - doc/isl.bib \ - doc/mypod2latex \ - doc/manual.tex \ - doc/user.pod \ - test_inputs - -pkgconfigdir = $(pkgconfig_libdir) -pkgconfig_DATA = $(pkgconfig_libfile) -all: isl_config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -isl_config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/isl_config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status isl_config.h -$(srcdir)/isl_config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -include/isl/config.h: include/isl/stamp-h2 - @if test ! -f $@; then \ - rm -f include/isl/stamp-h2; \ - $(MAKE) $(AM_MAKEFLAGS) include/isl/stamp-h2; \ - else :; fi - -include/isl/stamp-h2: $(top_srcdir)/include/isl/config.h.in $(top_builddir)/config.status - @rm -f include/isl/stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status include/isl/config.h - -distclean-hdr: - -rm -f isl_config.h stamp-h1 include/isl/config.h include/isl/stamp-h2 -bound_test.sh: $(top_builddir)/config.status $(srcdir)/bound_test.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -pip_test.sh: $(top_builddir)/config.status $(srcdir)/pip_test.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libisl.la: $(libisl_la_OBJECTS) $(libisl_la_DEPENDENCIES) - $(AM_V_CCLD)$(libisl_la_LINK) -rpath $(libdir) $(libisl_la_OBJECTS) $(libisl_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -isl_bound$(EXEEXT): $(isl_bound_OBJECTS) $(isl_bound_DEPENDENCIES) - @rm -f isl_bound$(EXEEXT) - $(AM_V_CCLD)$(isl_bound_LINK) $(isl_bound_OBJECTS) $(isl_bound_LDADD) $(LIBS) -isl_cat$(EXEEXT): $(isl_cat_OBJECTS) $(isl_cat_DEPENDENCIES) - @rm -f isl_cat$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_cat_OBJECTS) $(isl_cat_LDADD) $(LIBS) -isl_closure$(EXEEXT): $(isl_closure_OBJECTS) $(isl_closure_DEPENDENCIES) - @rm -f isl_closure$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_closure_OBJECTS) $(isl_closure_LDADD) $(LIBS) -isl_pip$(EXEEXT): $(isl_pip_OBJECTS) $(isl_pip_DEPENDENCIES) - @rm -f isl_pip$(EXEEXT) - $(AM_V_CCLD)$(isl_pip_LINK) $(isl_pip_OBJECTS) $(isl_pip_LDADD) $(LIBS) -isl_polyhedron_detect_equalities$(EXEEXT): $(isl_polyhedron_detect_equalities_OBJECTS) $(isl_polyhedron_detect_equalities_DEPENDENCIES) - @rm -f isl_polyhedron_detect_equalities$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_polyhedron_detect_equalities_OBJECTS) $(isl_polyhedron_detect_equalities_LDADD) $(LIBS) -isl_polyhedron_minimize$(EXEEXT): $(isl_polyhedron_minimize_OBJECTS) $(isl_polyhedron_minimize_DEPENDENCIES) - @rm -f isl_polyhedron_minimize$(EXEEXT) - $(AM_V_CCLD)$(isl_polyhedron_minimize_LINK) $(isl_polyhedron_minimize_OBJECTS) $(isl_polyhedron_minimize_LDADD) $(LIBS) -isl_polyhedron_sample$(EXEEXT): $(isl_polyhedron_sample_OBJECTS) $(isl_polyhedron_sample_DEPENDENCIES) - @rm -f isl_polyhedron_sample$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_polyhedron_sample_OBJECTS) $(isl_polyhedron_sample_LDADD) $(LIBS) -isl_polytope_scan$(EXEEXT): $(isl_polytope_scan_OBJECTS) $(isl_polytope_scan_DEPENDENCIES) - @rm -f isl_polytope_scan$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_polytope_scan_OBJECTS) $(isl_polytope_scan_LDADD) $(LIBS) -isl_test$(EXEEXT): $(isl_test_OBJECTS) $(isl_test_DEPENDENCIES) - @rm -f isl_test$(EXEEXT) - $(AM_V_CCLD)$(isl_test_LINK) $(isl_test_OBJECTS) $(isl_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_bound-bound.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_cat-cat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_closure-closure.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_pip-pip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polytope_scan-polytope_scan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_test-isl_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-basis_reduction_tab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_aff.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_affine_hull.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_arg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_band.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_bernstein.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_blk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_bound.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_coalesce.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_constraint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_convex_hull.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_ctx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_dim.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_dim_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_div.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_equalities.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_factorization.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_farkas.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_flow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_fold.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_gmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_hash.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_ilp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_input.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_local_space.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp_no_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_no_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_simplify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_subtract.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_mat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_morph.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_name.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_obj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_options.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_output.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_point.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_polynomial.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_printer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_qsort.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_range.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_reordering.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sample.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sample_no_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sample_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_scan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_schedule.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_seq.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_tab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_tab_pip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_transitive_closure.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_union_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_vec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_vertices.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-mp_get_memory_functions.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libisl_la-isl_lp_no_piplib.lo: isl_lp_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_lp_no_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_lp_no_piplib.Tpo -c -o libisl_la-isl_lp_no_piplib.lo `test -f 'isl_lp_no_piplib.c' || echo '$(srcdir)/'`isl_lp_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_lp_no_piplib.Tpo $(DEPDIR)/libisl_la-isl_lp_no_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_lp_no_piplib.c' object='libisl_la-isl_lp_no_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_lp_no_piplib.lo `test -f 'isl_lp_no_piplib.c' || echo '$(srcdir)/'`isl_lp_no_piplib.c - -libisl_la-isl_map_no_piplib.lo: isl_map_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_no_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_no_piplib.Tpo -c -o libisl_la-isl_map_no_piplib.lo `test -f 'isl_map_no_piplib.c' || echo '$(srcdir)/'`isl_map_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_no_piplib.Tpo $(DEPDIR)/libisl_la-isl_map_no_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_no_piplib.c' object='libisl_la-isl_map_no_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_no_piplib.lo `test -f 'isl_map_no_piplib.c' || echo '$(srcdir)/'`isl_map_no_piplib.c - -libisl_la-isl_sample_no_piplib.lo: isl_sample_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sample_no_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sample_no_piplib.Tpo -c -o libisl_la-isl_sample_no_piplib.lo `test -f 'isl_sample_no_piplib.c' || echo '$(srcdir)/'`isl_sample_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sample_no_piplib.Tpo $(DEPDIR)/libisl_la-isl_sample_no_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_sample_no_piplib.c' object='libisl_la-isl_sample_no_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_sample_no_piplib.lo `test -f 'isl_sample_no_piplib.c' || echo '$(srcdir)/'`isl_sample_no_piplib.c - -libisl_la-isl_lp_piplib.lo: isl_lp_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_lp_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_lp_piplib.Tpo -c -o libisl_la-isl_lp_piplib.lo `test -f 'isl_lp_piplib.c' || echo '$(srcdir)/'`isl_lp_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_lp_piplib.Tpo $(DEPDIR)/libisl_la-isl_lp_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_lp_piplib.c' object='libisl_la-isl_lp_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_lp_piplib.lo `test -f 'isl_lp_piplib.c' || echo '$(srcdir)/'`isl_lp_piplib.c - -libisl_la-isl_map_piplib.lo: isl_map_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_piplib.Tpo -c -o libisl_la-isl_map_piplib.lo `test -f 'isl_map_piplib.c' || echo '$(srcdir)/'`isl_map_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_piplib.Tpo $(DEPDIR)/libisl_la-isl_map_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_piplib.c' object='libisl_la-isl_map_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_piplib.lo `test -f 'isl_map_piplib.c' || echo '$(srcdir)/'`isl_map_piplib.c - -libisl_la-isl_sample_piplib.lo: isl_sample_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sample_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sample_piplib.Tpo -c -o libisl_la-isl_sample_piplib.lo `test -f 'isl_sample_piplib.c' || echo '$(srcdir)/'`isl_sample_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sample_piplib.Tpo $(DEPDIR)/libisl_la-isl_sample_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_sample_piplib.c' object='libisl_la-isl_sample_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_sample_piplib.lo `test -f 'isl_sample_piplib.c' || echo '$(srcdir)/'`isl_sample_piplib.c - -libisl_la-isl_piplib.lo: isl_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_piplib.Tpo -c -o libisl_la-isl_piplib.lo `test -f 'isl_piplib.c' || echo '$(srcdir)/'`isl_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_piplib.Tpo $(DEPDIR)/libisl_la-isl_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_piplib.c' object='libisl_la-isl_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_piplib.lo `test -f 'isl_piplib.c' || echo '$(srcdir)/'`isl_piplib.c - -libisl_la-mp_get_memory_functions.lo: mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-mp_get_memory_functions.lo -MD -MP -MF $(DEPDIR)/libisl_la-mp_get_memory_functions.Tpo -c -o libisl_la-mp_get_memory_functions.lo `test -f 'mp_get_memory_functions.c' || echo '$(srcdir)/'`mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-mp_get_memory_functions.Tpo $(DEPDIR)/libisl_la-mp_get_memory_functions.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mp_get_memory_functions.c' object='libisl_la-mp_get_memory_functions.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-mp_get_memory_functions.lo `test -f 'mp_get_memory_functions.c' || echo '$(srcdir)/'`mp_get_memory_functions.c - -libisl_la-isl_aff.lo: isl_aff.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_aff.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_aff.Tpo -c -o libisl_la-isl_aff.lo `test -f 'isl_aff.c' || echo '$(srcdir)/'`isl_aff.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_aff.Tpo $(DEPDIR)/libisl_la-isl_aff.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_aff.c' object='libisl_la-isl_aff.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_aff.lo `test -f 'isl_aff.c' || echo '$(srcdir)/'`isl_aff.c - -libisl_la-isl_affine_hull.lo: isl_affine_hull.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_affine_hull.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_affine_hull.Tpo -c -o libisl_la-isl_affine_hull.lo `test -f 'isl_affine_hull.c' || echo '$(srcdir)/'`isl_affine_hull.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_affine_hull.Tpo $(DEPDIR)/libisl_la-isl_affine_hull.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_affine_hull.c' object='libisl_la-isl_affine_hull.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_affine_hull.lo `test -f 'isl_affine_hull.c' || echo '$(srcdir)/'`isl_affine_hull.c - -libisl_la-isl_arg.lo: isl_arg.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_arg.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_arg.Tpo -c -o libisl_la-isl_arg.lo `test -f 'isl_arg.c' || echo '$(srcdir)/'`isl_arg.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_arg.Tpo $(DEPDIR)/libisl_la-isl_arg.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_arg.c' object='libisl_la-isl_arg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_arg.lo `test -f 'isl_arg.c' || echo '$(srcdir)/'`isl_arg.c - -libisl_la-isl_band.lo: isl_band.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_band.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_band.Tpo -c -o libisl_la-isl_band.lo `test -f 'isl_band.c' || echo '$(srcdir)/'`isl_band.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_band.Tpo $(DEPDIR)/libisl_la-isl_band.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_band.c' object='libisl_la-isl_band.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_band.lo `test -f 'isl_band.c' || echo '$(srcdir)/'`isl_band.c - -libisl_la-basis_reduction_tab.lo: basis_reduction_tab.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-basis_reduction_tab.lo -MD -MP -MF $(DEPDIR)/libisl_la-basis_reduction_tab.Tpo -c -o libisl_la-basis_reduction_tab.lo `test -f 'basis_reduction_tab.c' || echo '$(srcdir)/'`basis_reduction_tab.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-basis_reduction_tab.Tpo $(DEPDIR)/libisl_la-basis_reduction_tab.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basis_reduction_tab.c' object='libisl_la-basis_reduction_tab.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-basis_reduction_tab.lo `test -f 'basis_reduction_tab.c' || echo '$(srcdir)/'`basis_reduction_tab.c - -libisl_la-isl_bernstein.lo: isl_bernstein.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_bernstein.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_bernstein.Tpo -c -o libisl_la-isl_bernstein.lo `test -f 'isl_bernstein.c' || echo '$(srcdir)/'`isl_bernstein.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_bernstein.Tpo $(DEPDIR)/libisl_la-isl_bernstein.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_bernstein.c' object='libisl_la-isl_bernstein.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_bernstein.lo `test -f 'isl_bernstein.c' || echo '$(srcdir)/'`isl_bernstein.c - -libisl_la-isl_blk.lo: isl_blk.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_blk.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_blk.Tpo -c -o libisl_la-isl_blk.lo `test -f 'isl_blk.c' || echo '$(srcdir)/'`isl_blk.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_blk.Tpo $(DEPDIR)/libisl_la-isl_blk.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_blk.c' object='libisl_la-isl_blk.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_blk.lo `test -f 'isl_blk.c' || echo '$(srcdir)/'`isl_blk.c - -libisl_la-isl_bound.lo: isl_bound.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_bound.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_bound.Tpo -c -o libisl_la-isl_bound.lo `test -f 'isl_bound.c' || echo '$(srcdir)/'`isl_bound.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_bound.Tpo $(DEPDIR)/libisl_la-isl_bound.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_bound.c' object='libisl_la-isl_bound.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_bound.lo `test -f 'isl_bound.c' || echo '$(srcdir)/'`isl_bound.c - -libisl_la-isl_coalesce.lo: isl_coalesce.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_coalesce.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_coalesce.Tpo -c -o libisl_la-isl_coalesce.lo `test -f 'isl_coalesce.c' || echo '$(srcdir)/'`isl_coalesce.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_coalesce.Tpo $(DEPDIR)/libisl_la-isl_coalesce.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_coalesce.c' object='libisl_la-isl_coalesce.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_coalesce.lo `test -f 'isl_coalesce.c' || echo '$(srcdir)/'`isl_coalesce.c - -libisl_la-isl_constraint.lo: isl_constraint.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_constraint.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_constraint.Tpo -c -o libisl_la-isl_constraint.lo `test -f 'isl_constraint.c' || echo '$(srcdir)/'`isl_constraint.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_constraint.Tpo $(DEPDIR)/libisl_la-isl_constraint.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_constraint.c' object='libisl_la-isl_constraint.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_constraint.lo `test -f 'isl_constraint.c' || echo '$(srcdir)/'`isl_constraint.c - -libisl_la-isl_convex_hull.lo: isl_convex_hull.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_convex_hull.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_convex_hull.Tpo -c -o libisl_la-isl_convex_hull.lo `test -f 'isl_convex_hull.c' || echo '$(srcdir)/'`isl_convex_hull.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_convex_hull.Tpo $(DEPDIR)/libisl_la-isl_convex_hull.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_convex_hull.c' object='libisl_la-isl_convex_hull.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_convex_hull.lo `test -f 'isl_convex_hull.c' || echo '$(srcdir)/'`isl_convex_hull.c - -libisl_la-isl_ctx.lo: isl_ctx.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_ctx.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_ctx.Tpo -c -o libisl_la-isl_ctx.lo `test -f 'isl_ctx.c' || echo '$(srcdir)/'`isl_ctx.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_ctx.Tpo $(DEPDIR)/libisl_la-isl_ctx.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_ctx.c' object='libisl_la-isl_ctx.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_ctx.lo `test -f 'isl_ctx.c' || echo '$(srcdir)/'`isl_ctx.c - -libisl_la-isl_dim.lo: isl_dim.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_dim.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_dim.Tpo -c -o libisl_la-isl_dim.lo `test -f 'isl_dim.c' || echo '$(srcdir)/'`isl_dim.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_dim.Tpo $(DEPDIR)/libisl_la-isl_dim.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_dim.c' object='libisl_la-isl_dim.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_dim.lo `test -f 'isl_dim.c' || echo '$(srcdir)/'`isl_dim.c - -libisl_la-isl_dim_map.lo: isl_dim_map.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_dim_map.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_dim_map.Tpo -c -o libisl_la-isl_dim_map.lo `test -f 'isl_dim_map.c' || echo '$(srcdir)/'`isl_dim_map.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_dim_map.Tpo $(DEPDIR)/libisl_la-isl_dim_map.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_dim_map.c' object='libisl_la-isl_dim_map.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_dim_map.lo `test -f 'isl_dim_map.c' || echo '$(srcdir)/'`isl_dim_map.c - -libisl_la-isl_div.lo: isl_div.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_div.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_div.Tpo -c -o libisl_la-isl_div.lo `test -f 'isl_div.c' || echo '$(srcdir)/'`isl_div.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_div.Tpo $(DEPDIR)/libisl_la-isl_div.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_div.c' object='libisl_la-isl_div.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_div.lo `test -f 'isl_div.c' || echo '$(srcdir)/'`isl_div.c - -libisl_la-isl_equalities.lo: isl_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_equalities.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_equalities.Tpo -c -o libisl_la-isl_equalities.lo `test -f 'isl_equalities.c' || echo '$(srcdir)/'`isl_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_equalities.Tpo $(DEPDIR)/libisl_la-isl_equalities.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_equalities.c' object='libisl_la-isl_equalities.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_equalities.lo `test -f 'isl_equalities.c' || echo '$(srcdir)/'`isl_equalities.c - -libisl_la-isl_factorization.lo: isl_factorization.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_factorization.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_factorization.Tpo -c -o libisl_la-isl_factorization.lo `test -f 'isl_factorization.c' || echo '$(srcdir)/'`isl_factorization.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_factorization.Tpo $(DEPDIR)/libisl_la-isl_factorization.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_factorization.c' object='libisl_la-isl_factorization.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_factorization.lo `test -f 'isl_factorization.c' || echo '$(srcdir)/'`isl_factorization.c - -libisl_la-isl_farkas.lo: isl_farkas.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_farkas.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_farkas.Tpo -c -o libisl_la-isl_farkas.lo `test -f 'isl_farkas.c' || echo '$(srcdir)/'`isl_farkas.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_farkas.Tpo $(DEPDIR)/libisl_la-isl_farkas.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_farkas.c' object='libisl_la-isl_farkas.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_farkas.lo `test -f 'isl_farkas.c' || echo '$(srcdir)/'`isl_farkas.c - -libisl_la-isl_flow.lo: isl_flow.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_flow.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_flow.Tpo -c -o libisl_la-isl_flow.lo `test -f 'isl_flow.c' || echo '$(srcdir)/'`isl_flow.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_flow.Tpo $(DEPDIR)/libisl_la-isl_flow.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_flow.c' object='libisl_la-isl_flow.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_flow.lo `test -f 'isl_flow.c' || echo '$(srcdir)/'`isl_flow.c - -libisl_la-isl_fold.lo: isl_fold.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_fold.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_fold.Tpo -c -o libisl_la-isl_fold.lo `test -f 'isl_fold.c' || echo '$(srcdir)/'`isl_fold.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_fold.Tpo $(DEPDIR)/libisl_la-isl_fold.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_fold.c' object='libisl_la-isl_fold.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_fold.lo `test -f 'isl_fold.c' || echo '$(srcdir)/'`isl_fold.c - -libisl_la-isl_gmp.lo: isl_gmp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_gmp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_gmp.Tpo -c -o libisl_la-isl_gmp.lo `test -f 'isl_gmp.c' || echo '$(srcdir)/'`isl_gmp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_gmp.Tpo $(DEPDIR)/libisl_la-isl_gmp.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_gmp.c' object='libisl_la-isl_gmp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_gmp.lo `test -f 'isl_gmp.c' || echo '$(srcdir)/'`isl_gmp.c - -libisl_la-isl_hash.lo: isl_hash.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_hash.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_hash.Tpo -c -o libisl_la-isl_hash.lo `test -f 'isl_hash.c' || echo '$(srcdir)/'`isl_hash.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_hash.Tpo $(DEPDIR)/libisl_la-isl_hash.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_hash.c' object='libisl_la-isl_hash.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_hash.lo `test -f 'isl_hash.c' || echo '$(srcdir)/'`isl_hash.c - -libisl_la-isl_hmap_map_basic_set.lo: isl_hmap_map_basic_set.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_hmap_map_basic_set.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Tpo -c -o libisl_la-isl_hmap_map_basic_set.lo `test -f 'isl_hmap_map_basic_set.c' || echo '$(srcdir)/'`isl_hmap_map_basic_set.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Tpo $(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_hmap_map_basic_set.c' object='libisl_la-isl_hmap_map_basic_set.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_hmap_map_basic_set.lo `test -f 'isl_hmap_map_basic_set.c' || echo '$(srcdir)/'`isl_hmap_map_basic_set.c - -libisl_la-isl_ilp.lo: isl_ilp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_ilp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_ilp.Tpo -c -o libisl_la-isl_ilp.lo `test -f 'isl_ilp.c' || echo '$(srcdir)/'`isl_ilp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_ilp.Tpo $(DEPDIR)/libisl_la-isl_ilp.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_ilp.c' object='libisl_la-isl_ilp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_ilp.lo `test -f 'isl_ilp.c' || echo '$(srcdir)/'`isl_ilp.c - -libisl_la-isl_input.lo: isl_input.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_input.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_input.Tpo -c -o libisl_la-isl_input.lo `test -f 'isl_input.c' || echo '$(srcdir)/'`isl_input.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_input.Tpo $(DEPDIR)/libisl_la-isl_input.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_input.c' object='libisl_la-isl_input.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_input.lo `test -f 'isl_input.c' || echo '$(srcdir)/'`isl_input.c - -libisl_la-isl_list.lo: isl_list.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_list.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_list.Tpo -c -o libisl_la-isl_list.lo `test -f 'isl_list.c' || echo '$(srcdir)/'`isl_list.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_list.Tpo $(DEPDIR)/libisl_la-isl_list.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_list.c' object='libisl_la-isl_list.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_list.lo `test -f 'isl_list.c' || echo '$(srcdir)/'`isl_list.c - -libisl_la-isl_local_space.lo: isl_local_space.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_local_space.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_local_space.Tpo -c -o libisl_la-isl_local_space.lo `test -f 'isl_local_space.c' || echo '$(srcdir)/'`isl_local_space.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_local_space.Tpo $(DEPDIR)/libisl_la-isl_local_space.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_local_space.c' object='libisl_la-isl_local_space.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_local_space.lo `test -f 'isl_local_space.c' || echo '$(srcdir)/'`isl_local_space.c - -libisl_la-isl_lp.lo: isl_lp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_lp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_lp.Tpo -c -o libisl_la-isl_lp.lo `test -f 'isl_lp.c' || echo '$(srcdir)/'`isl_lp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_lp.Tpo $(DEPDIR)/libisl_la-isl_lp.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_lp.c' object='libisl_la-isl_lp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_lp.lo `test -f 'isl_lp.c' || echo '$(srcdir)/'`isl_lp.c - -libisl_la-isl_map.lo: isl_map.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map.Tpo -c -o libisl_la-isl_map.lo `test -f 'isl_map.c' || echo '$(srcdir)/'`isl_map.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map.Tpo $(DEPDIR)/libisl_la-isl_map.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map.c' object='libisl_la-isl_map.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map.lo `test -f 'isl_map.c' || echo '$(srcdir)/'`isl_map.c - -libisl_la-isl_map_simplify.lo: isl_map_simplify.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_simplify.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_simplify.Tpo -c -o libisl_la-isl_map_simplify.lo `test -f 'isl_map_simplify.c' || echo '$(srcdir)/'`isl_map_simplify.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_simplify.Tpo $(DEPDIR)/libisl_la-isl_map_simplify.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_simplify.c' object='libisl_la-isl_map_simplify.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_simplify.lo `test -f 'isl_map_simplify.c' || echo '$(srcdir)/'`isl_map_simplify.c - -libisl_la-isl_map_subtract.lo: isl_map_subtract.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_subtract.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_subtract.Tpo -c -o libisl_la-isl_map_subtract.lo `test -f 'isl_map_subtract.c' || echo '$(srcdir)/'`isl_map_subtract.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_subtract.Tpo $(DEPDIR)/libisl_la-isl_map_subtract.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_subtract.c' object='libisl_la-isl_map_subtract.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_subtract.lo `test -f 'isl_map_subtract.c' || echo '$(srcdir)/'`isl_map_subtract.c - -libisl_la-isl_mat.lo: isl_mat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_mat.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_mat.Tpo -c -o libisl_la-isl_mat.lo `test -f 'isl_mat.c' || echo '$(srcdir)/'`isl_mat.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_mat.Tpo $(DEPDIR)/libisl_la-isl_mat.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_mat.c' object='libisl_la-isl_mat.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_mat.lo `test -f 'isl_mat.c' || echo '$(srcdir)/'`isl_mat.c - -libisl_la-isl_morph.lo: isl_morph.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_morph.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_morph.Tpo -c -o libisl_la-isl_morph.lo `test -f 'isl_morph.c' || echo '$(srcdir)/'`isl_morph.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_morph.Tpo $(DEPDIR)/libisl_la-isl_morph.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_morph.c' object='libisl_la-isl_morph.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_morph.lo `test -f 'isl_morph.c' || echo '$(srcdir)/'`isl_morph.c - -libisl_la-isl_name.lo: isl_name.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_name.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_name.Tpo -c -o libisl_la-isl_name.lo `test -f 'isl_name.c' || echo '$(srcdir)/'`isl_name.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_name.Tpo $(DEPDIR)/libisl_la-isl_name.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_name.c' object='libisl_la-isl_name.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_name.lo `test -f 'isl_name.c' || echo '$(srcdir)/'`isl_name.c - -libisl_la-isl_obj.lo: isl_obj.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_obj.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_obj.Tpo -c -o libisl_la-isl_obj.lo `test -f 'isl_obj.c' || echo '$(srcdir)/'`isl_obj.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_obj.Tpo $(DEPDIR)/libisl_la-isl_obj.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_obj.c' object='libisl_la-isl_obj.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_obj.lo `test -f 'isl_obj.c' || echo '$(srcdir)/'`isl_obj.c - -libisl_la-isl_options.lo: isl_options.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_options.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_options.Tpo -c -o libisl_la-isl_options.lo `test -f 'isl_options.c' || echo '$(srcdir)/'`isl_options.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_options.Tpo $(DEPDIR)/libisl_la-isl_options.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_options.c' object='libisl_la-isl_options.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_options.lo `test -f 'isl_options.c' || echo '$(srcdir)/'`isl_options.c - -libisl_la-isl_output.lo: isl_output.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_output.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_output.Tpo -c -o libisl_la-isl_output.lo `test -f 'isl_output.c' || echo '$(srcdir)/'`isl_output.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_output.Tpo $(DEPDIR)/libisl_la-isl_output.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_output.c' object='libisl_la-isl_output.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_output.lo `test -f 'isl_output.c' || echo '$(srcdir)/'`isl_output.c - -libisl_la-isl_qsort.lo: isl_qsort.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_qsort.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_qsort.Tpo -c -o libisl_la-isl_qsort.lo `test -f 'isl_qsort.c' || echo '$(srcdir)/'`isl_qsort.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_qsort.Tpo $(DEPDIR)/libisl_la-isl_qsort.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_qsort.c' object='libisl_la-isl_qsort.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_qsort.lo `test -f 'isl_qsort.c' || echo '$(srcdir)/'`isl_qsort.c - -libisl_la-isl_point.lo: isl_point.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_point.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_point.Tpo -c -o libisl_la-isl_point.lo `test -f 'isl_point.c' || echo '$(srcdir)/'`isl_point.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_point.Tpo $(DEPDIR)/libisl_la-isl_point.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_point.c' object='libisl_la-isl_point.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_point.lo `test -f 'isl_point.c' || echo '$(srcdir)/'`isl_point.c - -libisl_la-isl_polynomial.lo: isl_polynomial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_polynomial.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_polynomial.Tpo -c -o libisl_la-isl_polynomial.lo `test -f 'isl_polynomial.c' || echo '$(srcdir)/'`isl_polynomial.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_polynomial.Tpo $(DEPDIR)/libisl_la-isl_polynomial.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_polynomial.c' object='libisl_la-isl_polynomial.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_polynomial.lo `test -f 'isl_polynomial.c' || echo '$(srcdir)/'`isl_polynomial.c - -libisl_la-isl_printer.lo: isl_printer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_printer.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_printer.Tpo -c -o libisl_la-isl_printer.lo `test -f 'isl_printer.c' || echo '$(srcdir)/'`isl_printer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_printer.Tpo $(DEPDIR)/libisl_la-isl_printer.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_printer.c' object='libisl_la-isl_printer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_printer.lo `test -f 'isl_printer.c' || echo '$(srcdir)/'`isl_printer.c - -libisl_la-isl_range.lo: isl_range.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_range.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_range.Tpo -c -o libisl_la-isl_range.lo `test -f 'isl_range.c' || echo '$(srcdir)/'`isl_range.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_range.Tpo $(DEPDIR)/libisl_la-isl_range.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_range.c' object='libisl_la-isl_range.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_range.lo `test -f 'isl_range.c' || echo '$(srcdir)/'`isl_range.c - -libisl_la-isl_reordering.lo: isl_reordering.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_reordering.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_reordering.Tpo -c -o libisl_la-isl_reordering.lo `test -f 'isl_reordering.c' || echo '$(srcdir)/'`isl_reordering.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_reordering.Tpo $(DEPDIR)/libisl_la-isl_reordering.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_reordering.c' object='libisl_la-isl_reordering.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_reordering.lo `test -f 'isl_reordering.c' || echo '$(srcdir)/'`isl_reordering.c - -libisl_la-isl_sample.lo: isl_sample.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sample.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sample.Tpo -c -o libisl_la-isl_sample.lo `test -f 'isl_sample.c' || echo '$(srcdir)/'`isl_sample.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sample.Tpo $(DEPDIR)/libisl_la-isl_sample.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_sample.c' object='libisl_la-isl_sample.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_sample.lo `test -f 'isl_sample.c' || echo '$(srcdir)/'`isl_sample.c - -libisl_la-isl_scan.lo: isl_scan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_scan.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_scan.Tpo -c -o libisl_la-isl_scan.lo `test -f 'isl_scan.c' || echo '$(srcdir)/'`isl_scan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_scan.Tpo $(DEPDIR)/libisl_la-isl_scan.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_scan.c' object='libisl_la-isl_scan.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_scan.lo `test -f 'isl_scan.c' || echo '$(srcdir)/'`isl_scan.c - -libisl_la-isl_schedule.lo: isl_schedule.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_schedule.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_schedule.Tpo -c -o libisl_la-isl_schedule.lo `test -f 'isl_schedule.c' || echo '$(srcdir)/'`isl_schedule.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_schedule.Tpo $(DEPDIR)/libisl_la-isl_schedule.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_schedule.c' object='libisl_la-isl_schedule.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_schedule.lo `test -f 'isl_schedule.c' || echo '$(srcdir)/'`isl_schedule.c - -libisl_la-isl_stream.lo: isl_stream.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_stream.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_stream.Tpo -c -o libisl_la-isl_stream.lo `test -f 'isl_stream.c' || echo '$(srcdir)/'`isl_stream.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_stream.Tpo $(DEPDIR)/libisl_la-isl_stream.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_stream.c' object='libisl_la-isl_stream.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_stream.lo `test -f 'isl_stream.c' || echo '$(srcdir)/'`isl_stream.c - -libisl_la-isl_seq.lo: isl_seq.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_seq.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_seq.Tpo -c -o libisl_la-isl_seq.lo `test -f 'isl_seq.c' || echo '$(srcdir)/'`isl_seq.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_seq.Tpo $(DEPDIR)/libisl_la-isl_seq.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_seq.c' object='libisl_la-isl_seq.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_seq.lo `test -f 'isl_seq.c' || echo '$(srcdir)/'`isl_seq.c - -libisl_la-isl_tab.lo: isl_tab.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_tab.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_tab.Tpo -c -o libisl_la-isl_tab.lo `test -f 'isl_tab.c' || echo '$(srcdir)/'`isl_tab.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_tab.Tpo $(DEPDIR)/libisl_la-isl_tab.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_tab.c' object='libisl_la-isl_tab.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_tab.lo `test -f 'isl_tab.c' || echo '$(srcdir)/'`isl_tab.c - -libisl_la-isl_tab_pip.lo: isl_tab_pip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_tab_pip.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_tab_pip.Tpo -c -o libisl_la-isl_tab_pip.lo `test -f 'isl_tab_pip.c' || echo '$(srcdir)/'`isl_tab_pip.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_tab_pip.Tpo $(DEPDIR)/libisl_la-isl_tab_pip.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_tab_pip.c' object='libisl_la-isl_tab_pip.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_tab_pip.lo `test -f 'isl_tab_pip.c' || echo '$(srcdir)/'`isl_tab_pip.c - -libisl_la-isl_transitive_closure.lo: isl_transitive_closure.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_transitive_closure.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_transitive_closure.Tpo -c -o libisl_la-isl_transitive_closure.lo `test -f 'isl_transitive_closure.c' || echo '$(srcdir)/'`isl_transitive_closure.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_transitive_closure.Tpo $(DEPDIR)/libisl_la-isl_transitive_closure.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_transitive_closure.c' object='libisl_la-isl_transitive_closure.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_transitive_closure.lo `test -f 'isl_transitive_closure.c' || echo '$(srcdir)/'`isl_transitive_closure.c - -libisl_la-isl_union_map.lo: isl_union_map.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_union_map.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_union_map.Tpo -c -o libisl_la-isl_union_map.lo `test -f 'isl_union_map.c' || echo '$(srcdir)/'`isl_union_map.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_union_map.Tpo $(DEPDIR)/libisl_la-isl_union_map.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_union_map.c' object='libisl_la-isl_union_map.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_union_map.lo `test -f 'isl_union_map.c' || echo '$(srcdir)/'`isl_union_map.c - -libisl_la-isl_vec.lo: isl_vec.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_vec.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_vec.Tpo -c -o libisl_la-isl_vec.lo `test -f 'isl_vec.c' || echo '$(srcdir)/'`isl_vec.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_vec.Tpo $(DEPDIR)/libisl_la-isl_vec.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_vec.c' object='libisl_la-isl_vec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_vec.lo `test -f 'isl_vec.c' || echo '$(srcdir)/'`isl_vec.c - -libisl_la-isl_version.lo: isl_version.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_version.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_version.Tpo -c -o libisl_la-isl_version.lo `test -f 'isl_version.c' || echo '$(srcdir)/'`isl_version.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_version.Tpo $(DEPDIR)/libisl_la-isl_version.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_version.c' object='libisl_la-isl_version.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_version.lo `test -f 'isl_version.c' || echo '$(srcdir)/'`isl_version.c - -libisl_la-isl_vertices.lo: isl_vertices.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_vertices.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_vertices.Tpo -c -o libisl_la-isl_vertices.lo `test -f 'isl_vertices.c' || echo '$(srcdir)/'`isl_vertices.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_vertices.Tpo $(DEPDIR)/libisl_la-isl_vertices.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_vertices.c' object='libisl_la-isl_vertices.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_vertices.lo `test -f 'isl_vertices.c' || echo '$(srcdir)/'`isl_vertices.c - -isl_bound-bound.o: bound.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_bound-bound.o -MD -MP -MF $(DEPDIR)/isl_bound-bound.Tpo -c -o isl_bound-bound.o `test -f 'bound.c' || echo '$(srcdir)/'`bound.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_bound-bound.Tpo $(DEPDIR)/isl_bound-bound.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bound.c' object='isl_bound-bound.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_bound-bound.o `test -f 'bound.c' || echo '$(srcdir)/'`bound.c - -isl_bound-bound.obj: bound.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_bound-bound.obj -MD -MP -MF $(DEPDIR)/isl_bound-bound.Tpo -c -o isl_bound-bound.obj `if test -f 'bound.c'; then $(CYGPATH_W) 'bound.c'; else $(CYGPATH_W) '$(srcdir)/bound.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_bound-bound.Tpo $(DEPDIR)/isl_bound-bound.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bound.c' object='isl_bound-bound.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_bound-bound.obj `if test -f 'bound.c'; then $(CYGPATH_W) 'bound.c'; else $(CYGPATH_W) '$(srcdir)/bound.c'; fi` - -isl_cat-cat.o: cat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_cat-cat.o -MD -MP -MF $(DEPDIR)/isl_cat-cat.Tpo -c -o isl_cat-cat.o `test -f 'cat.c' || echo '$(srcdir)/'`cat.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_cat-cat.Tpo $(DEPDIR)/isl_cat-cat.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cat.c' object='isl_cat-cat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_cat-cat.o `test -f 'cat.c' || echo '$(srcdir)/'`cat.c - -isl_cat-cat.obj: cat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_cat-cat.obj -MD -MP -MF $(DEPDIR)/isl_cat-cat.Tpo -c -o isl_cat-cat.obj `if test -f 'cat.c'; then $(CYGPATH_W) 'cat.c'; else $(CYGPATH_W) '$(srcdir)/cat.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_cat-cat.Tpo $(DEPDIR)/isl_cat-cat.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cat.c' object='isl_cat-cat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_cat-cat.obj `if test -f 'cat.c'; then $(CYGPATH_W) 'cat.c'; else $(CYGPATH_W) '$(srcdir)/cat.c'; fi` - -isl_closure-closure.o: closure.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_closure-closure.o -MD -MP -MF $(DEPDIR)/isl_closure-closure.Tpo -c -o isl_closure-closure.o `test -f 'closure.c' || echo '$(srcdir)/'`closure.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_closure-closure.Tpo $(DEPDIR)/isl_closure-closure.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='closure.c' object='isl_closure-closure.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_closure-closure.o `test -f 'closure.c' || echo '$(srcdir)/'`closure.c - -isl_closure-closure.obj: closure.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_closure-closure.obj -MD -MP -MF $(DEPDIR)/isl_closure-closure.Tpo -c -o isl_closure-closure.obj `if test -f 'closure.c'; then $(CYGPATH_W) 'closure.c'; else $(CYGPATH_W) '$(srcdir)/closure.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_closure-closure.Tpo $(DEPDIR)/isl_closure-closure.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='closure.c' object='isl_closure-closure.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_closure-closure.obj `if test -f 'closure.c'; then $(CYGPATH_W) 'closure.c'; else $(CYGPATH_W) '$(srcdir)/closure.c'; fi` - -isl_pip-pip.o: pip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_pip-pip.o -MD -MP -MF $(DEPDIR)/isl_pip-pip.Tpo -c -o isl_pip-pip.o `test -f 'pip.c' || echo '$(srcdir)/'`pip.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_pip-pip.Tpo $(DEPDIR)/isl_pip-pip.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pip.c' object='isl_pip-pip.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_pip-pip.o `test -f 'pip.c' || echo '$(srcdir)/'`pip.c - -isl_pip-pip.obj: pip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_pip-pip.obj -MD -MP -MF $(DEPDIR)/isl_pip-pip.Tpo -c -o isl_pip-pip.obj `if test -f 'pip.c'; then $(CYGPATH_W) 'pip.c'; else $(CYGPATH_W) '$(srcdir)/pip.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_pip-pip.Tpo $(DEPDIR)/isl_pip-pip.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pip.c' object='isl_pip-pip.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_pip-pip.obj `if test -f 'pip.c'; then $(CYGPATH_W) 'pip.c'; else $(CYGPATH_W) '$(srcdir)/pip.c'; fi` - -isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o: polyhedron_detect_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o -MD -MP -MF $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o `test -f 'polyhedron_detect_equalities.c' || echo '$(srcdir)/'`polyhedron_detect_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_detect_equalities.c' object='isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o `test -f 'polyhedron_detect_equalities.c' || echo '$(srcdir)/'`polyhedron_detect_equalities.c - -isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj: polyhedron_detect_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj -MD -MP -MF $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj `if test -f 'polyhedron_detect_equalities.c'; then $(CYGPATH_W) 'polyhedron_detect_equalities.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_detect_equalities.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_detect_equalities.c' object='isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj `if test -f 'polyhedron_detect_equalities.c'; then $(CYGPATH_W) 'polyhedron_detect_equalities.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_detect_equalities.c'; fi` - -isl_polyhedron_minimize-polyhedron_minimize.o: polyhedron_minimize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_minimize-polyhedron_minimize.o -MD -MP -MF $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo -c -o isl_polyhedron_minimize-polyhedron_minimize.o `test -f 'polyhedron_minimize.c' || echo '$(srcdir)/'`polyhedron_minimize.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_minimize.c' object='isl_polyhedron_minimize-polyhedron_minimize.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_minimize-polyhedron_minimize.o `test -f 'polyhedron_minimize.c' || echo '$(srcdir)/'`polyhedron_minimize.c - -isl_polyhedron_minimize-polyhedron_minimize.obj: polyhedron_minimize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_minimize-polyhedron_minimize.obj -MD -MP -MF $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo -c -o isl_polyhedron_minimize-polyhedron_minimize.obj `if test -f 'polyhedron_minimize.c'; then $(CYGPATH_W) 'polyhedron_minimize.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_minimize.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_minimize.c' object='isl_polyhedron_minimize-polyhedron_minimize.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_minimize-polyhedron_minimize.obj `if test -f 'polyhedron_minimize.c'; then $(CYGPATH_W) 'polyhedron_minimize.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_minimize.c'; fi` - -isl_polyhedron_sample-polyhedron_sample.o: polyhedron_sample.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_sample-polyhedron_sample.o -MD -MP -MF $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo -c -o isl_polyhedron_sample-polyhedron_sample.o `test -f 'polyhedron_sample.c' || echo '$(srcdir)/'`polyhedron_sample.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_sample.c' object='isl_polyhedron_sample-polyhedron_sample.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_sample-polyhedron_sample.o `test -f 'polyhedron_sample.c' || echo '$(srcdir)/'`polyhedron_sample.c - -isl_polyhedron_sample-polyhedron_sample.obj: polyhedron_sample.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_sample-polyhedron_sample.obj -MD -MP -MF $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo -c -o isl_polyhedron_sample-polyhedron_sample.obj `if test -f 'polyhedron_sample.c'; then $(CYGPATH_W) 'polyhedron_sample.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_sample.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_sample.c' object='isl_polyhedron_sample-polyhedron_sample.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_sample-polyhedron_sample.obj `if test -f 'polyhedron_sample.c'; then $(CYGPATH_W) 'polyhedron_sample.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_sample.c'; fi` - -isl_polytope_scan-polytope_scan.o: polytope_scan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polytope_scan-polytope_scan.o -MD -MP -MF $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo -c -o isl_polytope_scan-polytope_scan.o `test -f 'polytope_scan.c' || echo '$(srcdir)/'`polytope_scan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo $(DEPDIR)/isl_polytope_scan-polytope_scan.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polytope_scan.c' object='isl_polytope_scan-polytope_scan.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polytope_scan-polytope_scan.o `test -f 'polytope_scan.c' || echo '$(srcdir)/'`polytope_scan.c - -isl_polytope_scan-polytope_scan.obj: polytope_scan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polytope_scan-polytope_scan.obj -MD -MP -MF $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo -c -o isl_polytope_scan-polytope_scan.obj `if test -f 'polytope_scan.c'; then $(CYGPATH_W) 'polytope_scan.c'; else $(CYGPATH_W) '$(srcdir)/polytope_scan.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo $(DEPDIR)/isl_polytope_scan-polytope_scan.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polytope_scan.c' object='isl_polytope_scan-polytope_scan.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polytope_scan-polytope_scan.obj `if test -f 'polytope_scan.c'; then $(CYGPATH_W) 'polytope_scan.c'; else $(CYGPATH_W) '$(srcdir)/polytope_scan.c'; fi` - -isl_test-isl_test.o: isl_test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_test-isl_test.o -MD -MP -MF $(DEPDIR)/isl_test-isl_test.Tpo -c -o isl_test-isl_test.o `test -f 'isl_test.c' || echo '$(srcdir)/'`isl_test.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_test-isl_test.Tpo $(DEPDIR)/isl_test-isl_test.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_test.c' object='isl_test-isl_test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_test-isl_test.o `test -f 'isl_test.c' || echo '$(srcdir)/'`isl_test.c - -isl_test-isl_test.obj: isl_test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_test-isl_test.obj -MD -MP -MF $(DEPDIR)/isl_test-isl_test.Tpo -c -o isl_test-isl_test.obj `if test -f 'isl_test.c'; then $(CYGPATH_W) 'isl_test.c'; else $(CYGPATH_W) '$(srcdir)/isl_test.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_test-isl_test.Tpo $(DEPDIR)/isl_test-isl_test.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_test.c' object='isl_test-isl_test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_test-isl_test.obj `if test -f 'isl_test.c'; then $(CYGPATH_W) 'isl_test.c'; else $(CYGPATH_W) '$(srcdir)/isl_test.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files -install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-nodist_pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) isl_config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) isl_config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) isl_config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) isl_config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ - isl_config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-data-local install-nodist_pkgincludeHEADERS \ - install-pkgconfigDATA install-pkgincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES \ - uninstall-nodist_pkgincludeHEADERS uninstall-pkgconfigDATA \ - uninstall-pkgincludeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-TESTS check-am clean \ - clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man \ - install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-pkgincludeHEADERS install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS \ - uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS - - -dist-hook: - echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID - (cd doc; make manual.pdf) - cp doc/manual.pdf $(distdir)/doc/ - -gitversion.h: @GIT_HEAD@ - $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@ - -install-data-local: $(srcdir)/isl.py - @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \ - $(builddir)/libisl.la`; \ - case $$libisl in \ - '') echo Cannot find isl library name. GDB bindings not installed.;; \ - *) echo $(INSTALL_DATA) $(srcdir)/isl.py \ - $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ - $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.16.3/isl/aclocal.m4 b/cloog-0.16.3/isl/aclocal.m4 deleted file mode 100644 index acf1a0c360f7c74dbf7e287adf0fccf3bc1d933d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/aclocal.m4 +++ /dev/null @@ -1,995 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/ax_c___attribute__.m4]) -m4_include([m4/ax_cc_maxopt.m4]) -m4_include([m4/ax_check_compiler_flags.m4]) -m4_include([m4/ax_compiler_vendor.m4]) -m4_include([m4/ax_create_pkgconfig_info.m4]) -m4_include([m4/ax_create_stdint_h.m4]) -m4_include([m4/ax_detect_git_head.m4]) -m4_include([m4/ax_gcc_archflag.m4]) -m4_include([m4/ax_gcc_warn_unused_result.m4]) -m4_include([m4/ax_gcc_x86_cpuid.m4]) -m4_include([m4/ax_set_warning_flags.m4]) -m4_include([m4/ax_submodule.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) diff --git a/cloog-0.16.3/isl/basis_reduction_tab.c b/cloog-0.16.3/isl/basis_reduction_tab.c deleted file mode 100644 index af5456939cbbb3b92380de200c36f60befa87d00..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/basis_reduction_tab.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_tab.h" - -struct tab_lp { - struct isl_ctx *ctx; - struct isl_vec *row; - struct isl_tab *tab; - struct isl_tab_undo **stack; - isl_int *obj; - isl_int opt; - isl_int opt_denom; - isl_int tmp; - isl_int tmp2; - int neq; - unsigned dim; - /* number of constraints in initial product tableau */ - int con_offset; - /* objective function has fixed or no integer value */ - int is_fixed; -}; - -static struct tab_lp *init_lp(struct isl_tab *tab); -static void set_lp_obj(struct tab_lp *lp, isl_int *row, int dim); -static int solve_lp(struct tab_lp *lp); -static void get_obj_val(struct tab_lp* lp, mpq_t *F); -static void delete_lp(struct tab_lp *lp); -static int add_lp_row(struct tab_lp *lp, isl_int *row, int dim); -static void get_alpha(struct tab_lp* lp, int row, mpq_t *alpha); -static int del_lp_row(struct tab_lp *lp) WARN_UNUSED; -static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row); - -#define GBR_LP struct tab_lp -#define GBR_type mpq_t -#define GBR_init(v) mpq_init(v) -#define GBR_clear(v) mpq_clear(v) -#define GBR_set(a,b) mpq_set(a,b) -#define GBR_set_ui(a,b) mpq_set_ui(a,b,1) -#define GBR_mul(a,b,c) mpq_mul(a,b,c) -#define GBR_lt(a,b) (mpq_cmp(a,b) < 0) -#define GBR_is_zero(a) (mpq_sgn(a) == 0) -#define GBR_floor(a,b) mpz_fdiv_q(a,mpq_numref(b),mpq_denref(b)) -#define GBR_ceil(a,b) mpz_cdiv_q(a,mpq_numref(b),mpq_denref(b)) -#define GBR_lp_init(P) init_lp(P) -#define GBR_lp_set_obj(lp, obj, dim) set_lp_obj(lp, obj, dim) -#define GBR_lp_solve(lp) solve_lp(lp) -#define GBR_lp_get_obj_val(lp, F) get_obj_val(lp, F) -#define GBR_lp_delete(lp) delete_lp(lp) -#define GBR_lp_next_row(lp) lp->neq -#define GBR_lp_add_row(lp, row, dim) add_lp_row(lp, row, dim) -#define GBR_lp_get_alpha(lp, row, alpha) get_alpha(lp, row, alpha) -#define GBR_lp_del_row(lp) del_lp_row(lp) -#define GBR_lp_is_fixed(lp) (lp)->is_fixed -#define GBR_lp_cut(lp, obj) cut_lp_to_hyperplane(lp, obj) -#include "basis_reduction_templ.c" - -/* Set up a tableau for the Cartesian product of bset with itself. - * This could be optimized by first setting up a tableau for bset - * and then performing the Cartesian product on the tableau. - */ -static struct isl_tab *gbr_tab(struct isl_tab *tab, struct isl_vec *row) -{ - unsigned dim; - struct isl_tab *prod; - - if (!tab || !row) - return NULL; - - dim = tab->n_var; - prod = isl_tab_product(tab, tab); - if (isl_tab_extend_cons(prod, 3 * dim + 1) < 0) { - isl_tab_free(prod); - return NULL; - } - return prod; -} - -static struct tab_lp *init_lp(struct isl_tab *tab) -{ - struct tab_lp *lp = NULL; - - if (!tab) - return NULL; - - lp = isl_calloc_type(tab->mat->ctx, struct tab_lp); - if (!lp) - return NULL; - - isl_int_init(lp->opt); - isl_int_init(lp->opt_denom); - isl_int_init(lp->tmp); - isl_int_init(lp->tmp2); - - lp->dim = tab->n_var; - - lp->ctx = tab->mat->ctx; - isl_ctx_ref(lp->ctx); - - lp->stack = isl_alloc_array(lp->ctx, struct isl_tab_undo *, lp->dim); - - lp->row = isl_vec_alloc(lp->ctx, 1 + 2 * lp->dim); - if (!lp->row) - goto error; - lp->tab = gbr_tab(tab, lp->row); - if (!lp->tab) - goto error; - lp->con_offset = lp->tab->n_con; - lp->obj = NULL; - lp->neq = 0; - - return lp; -error: - delete_lp(lp); - return NULL; -} - -static void set_lp_obj(struct tab_lp *lp, isl_int *row, int dim) -{ - lp->obj = row; -} - -static int solve_lp(struct tab_lp *lp) -{ - enum isl_lp_result res; - unsigned flags = 0; - - lp->is_fixed = 0; - - isl_int_set_si(lp->row->el[0], 0); - isl_seq_cpy(lp->row->el + 1, lp->obj, lp->dim); - isl_seq_neg(lp->row->el + 1 + lp->dim, lp->obj, lp->dim); - if (lp->neq) - flags = ISL_TAB_SAVE_DUAL; - res = isl_tab_min(lp->tab, lp->row->el, lp->ctx->one, - &lp->opt, &lp->opt_denom, flags); - isl_int_mul_ui(lp->opt_denom, lp->opt_denom, 2); - if (isl_int_abs_lt(lp->opt, lp->opt_denom)) { - struct isl_vec *sample = isl_tab_get_sample_value(lp->tab); - if (!sample) - return -1; - isl_seq_inner_product(lp->obj, sample->el + 1, lp->dim, &lp->tmp); - isl_seq_inner_product(lp->obj, sample->el + 1 + lp->dim, lp->dim, &lp->tmp2); - isl_int_cdiv_q(lp->tmp, lp->tmp, sample->el[0]); - isl_int_fdiv_q(lp->tmp2, lp->tmp2, sample->el[0]); - if (isl_int_ge(lp->tmp, lp->tmp2)) - lp->is_fixed = 1; - isl_vec_free(sample); - } - isl_int_divexact_ui(lp->opt_denom, lp->opt_denom, 2); - if (res != isl_lp_ok) - return -1; - return 0; -} - -/* The current objective function has a fixed (or no) integer value. - * Cut the tableau to the hyperplane that fixes this value in - * both halves of the tableau. - * Return 1 if the resulting tableau is empty. - */ -static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row) -{ - enum isl_lp_result res; - - isl_int_set_si(lp->row->el[0], 0); - isl_seq_cpy(lp->row->el + 1, row, lp->dim); - isl_seq_clr(lp->row->el + 1 + lp->dim, lp->dim); - res = isl_tab_min(lp->tab, lp->row->el, lp->ctx->one, - &lp->tmp, NULL, 0); - if (res != isl_lp_ok) - return -1; - - isl_int_neg(lp->row->el[0], lp->tmp); - if (isl_tab_add_eq(lp->tab, lp->row->el) < 0) - return -1; - - isl_seq_cpy(lp->row->el + 1 + lp->dim, row, lp->dim); - isl_seq_clr(lp->row->el + 1, lp->dim); - if (isl_tab_add_eq(lp->tab, lp->row->el) < 0) - return -1; - - lp->con_offset += 2; - - return lp->tab->empty; -} - -static void get_obj_val(struct tab_lp* lp, mpq_t *F) -{ - isl_int_neg(mpq_numref(*F), lp->opt); - isl_int_set(mpq_denref(*F), lp->opt_denom); -} - -static void delete_lp(struct tab_lp *lp) -{ - if (!lp) - return; - - isl_int_clear(lp->opt); - isl_int_clear(lp->opt_denom); - isl_int_clear(lp->tmp); - isl_int_clear(lp->tmp2); - isl_vec_free(lp->row); - free(lp->stack); - isl_tab_free(lp->tab); - isl_ctx_deref(lp->ctx); - free(lp); -} - -static int add_lp_row(struct tab_lp *lp, isl_int *row, int dim) -{ - lp->stack[lp->neq] = isl_tab_snap(lp->tab); - - isl_int_set_si(lp->row->el[0], 0); - isl_seq_cpy(lp->row->el + 1, row, lp->dim); - isl_seq_neg(lp->row->el + 1 + lp->dim, row, lp->dim); - - if (isl_tab_add_valid_eq(lp->tab, lp->row->el) < 0) - return -1; - - return lp->neq++; -} - -static void get_alpha(struct tab_lp* lp, int row, mpq_t *alpha) -{ - row += lp->con_offset; - isl_int_neg(mpq_numref(*alpha), lp->tab->dual->el[1 + row]); - isl_int_set(mpq_denref(*alpha), lp->tab->dual->el[0]); -} - -static int del_lp_row(struct tab_lp *lp) -{ - lp->neq--; - return isl_tab_rollback(lp->tab, lp->stack[lp->neq]); -} diff --git a/cloog-0.16.3/isl/basis_reduction_templ.c b/cloog-0.16.3/isl/basis_reduction_templ.c deleted file mode 100644 index 2e4034ff4e8b52b26806321f09b405f938e69ff9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/basis_reduction_templ.c +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright 2006-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_basis_reduction.h" - -static void save_alpha(GBR_LP *lp, int first, int n, GBR_type *alpha) -{ - int i; - - for (i = 0; i < n; ++i) - GBR_lp_get_alpha(lp, first + i, &alpha[i]); -} - -/* Compute a reduced basis for the set represented by the tableau "tab". - * tab->basis, which must be initialized by the calling function to an affine - * unimodular basis, is updated to reflect the reduced basis. - * The first tab->n_zero rows of the basis (ignoring the constant row) - * are assumed to correspond to equalities and are left untouched. - * tab->n_zero is updated to reflect any additional equalities that - * have been detected in the first rows of the new basis. - * The final tab->n_unbounded rows of the basis are assumed to correspond - * to unbounded directions and are also left untouched. - * In particular this means that the remaining rows are assumed to - * correspond to bounded directions. - * - * This function implements the algorithm described in - * "An Implementation of the Generalized Basis Reduction Algorithm - * for Integer Programming" of Cook el al. to compute a reduced basis. - * We use \epsilon = 1/4. - * - * If ctx->opt->gbr_only_first is set, the user is only interested - * in the first direction. In this case we stop the basis reduction when - * the width in the first direction becomes smaller than 2. - */ -struct isl_tab *isl_tab_compute_reduced_basis(struct isl_tab *tab) -{ - unsigned dim; - struct isl_ctx *ctx; - struct isl_mat *B; - int unbounded; - int i; - GBR_LP *lp = NULL; - GBR_type F_old, alpha, F_new; - int row; - isl_int tmp; - struct isl_vec *b_tmp; - GBR_type *F = NULL; - GBR_type *alpha_buffer[2] = { NULL, NULL }; - GBR_type *alpha_saved; - GBR_type F_saved; - int use_saved = 0; - isl_int mu[2]; - GBR_type mu_F[2]; - GBR_type two; - GBR_type one; - int empty = 0; - int fixed = 0; - int fixed_saved = 0; - int mu_fixed[2]; - int n_bounded; - int gbr_only_first; - - if (!tab) - return NULL; - - if (tab->empty) - return tab; - - ctx = tab->mat->ctx; - gbr_only_first = ctx->opt->gbr_only_first; - dim = tab->n_var; - B = tab->basis; - if (!B) - return tab; - - n_bounded = dim - tab->n_unbounded; - if (n_bounded <= tab->n_zero + 1) - return tab; - - isl_int_init(tmp); - isl_int_init(mu[0]); - isl_int_init(mu[1]); - - GBR_init(alpha); - GBR_init(F_old); - GBR_init(F_new); - GBR_init(F_saved); - GBR_init(mu_F[0]); - GBR_init(mu_F[1]); - GBR_init(two); - GBR_init(one); - - b_tmp = isl_vec_alloc(ctx, dim); - if (!b_tmp) - goto error; - - F = isl_alloc_array(ctx, GBR_type, n_bounded); - alpha_buffer[0] = isl_alloc_array(ctx, GBR_type, n_bounded); - alpha_buffer[1] = isl_alloc_array(ctx, GBR_type, n_bounded); - alpha_saved = alpha_buffer[0]; - - if (!F || !alpha_buffer[0] || !alpha_buffer[1]) - goto error; - - for (i = 0; i < n_bounded; ++i) { - GBR_init(F[i]); - GBR_init(alpha_buffer[0][i]); - GBR_init(alpha_buffer[1][i]); - } - - GBR_set_ui(two, 2); - GBR_set_ui(one, 1); - - lp = GBR_lp_init(tab); - if (!lp) - goto error; - - i = tab->n_zero; - - GBR_lp_set_obj(lp, B->row[1+i]+1, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &F[i]); - - if (GBR_lt(F[i], one)) { - if (!GBR_is_zero(F[i])) { - empty = GBR_lp_cut(lp, B->row[1+i]+1); - if (empty) - goto done; - GBR_set_ui(F[i], 0); - } - tab->n_zero++; - } - - do { - if (i+1 == tab->n_zero) { - GBR_lp_set_obj(lp, B->row[1+i+1]+1, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &F_new); - fixed = GBR_lp_is_fixed(lp); - GBR_set_ui(alpha, 0); - } else - if (use_saved) { - row = GBR_lp_next_row(lp); - GBR_set(F_new, F_saved); - fixed = fixed_saved; - GBR_set(alpha, alpha_saved[i]); - } else { - row = GBR_lp_add_row(lp, B->row[1+i]+1, dim); - GBR_lp_set_obj(lp, B->row[1+i+1]+1, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &F_new); - fixed = GBR_lp_is_fixed(lp); - - GBR_lp_get_alpha(lp, row, &alpha); - - if (i > 0) - save_alpha(lp, row-i, i, alpha_saved); - - if (GBR_lp_del_row(lp) < 0) - goto error; - } - GBR_set(F[i+1], F_new); - - GBR_floor(mu[0], alpha); - GBR_ceil(mu[1], alpha); - - if (isl_int_eq(mu[0], mu[1])) - isl_int_set(tmp, mu[0]); - else { - int j; - - for (j = 0; j <= 1; ++j) { - isl_int_set(tmp, mu[j]); - isl_seq_combine(b_tmp->el, - ctx->one, B->row[1+i+1]+1, - tmp, B->row[1+i]+1, dim); - GBR_lp_set_obj(lp, b_tmp->el, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &mu_F[j]); - mu_fixed[j] = GBR_lp_is_fixed(lp); - if (i > 0) - save_alpha(lp, row-i, i, alpha_buffer[j]); - } - - if (GBR_lt(mu_F[0], mu_F[1])) - j = 0; - else - j = 1; - - isl_int_set(tmp, mu[j]); - GBR_set(F_new, mu_F[j]); - fixed = mu_fixed[j]; - alpha_saved = alpha_buffer[j]; - } - isl_seq_combine(B->row[1+i+1]+1, ctx->one, B->row[1+i+1]+1, - tmp, B->row[1+i]+1, dim); - - if (i+1 == tab->n_zero && fixed) { - if (!GBR_is_zero(F[i+1])) { - empty = GBR_lp_cut(lp, B->row[1+i+1]+1); - if (empty) - goto done; - GBR_set_ui(F[i+1], 0); - } - tab->n_zero++; - } - - GBR_set(F_old, F[i]); - - use_saved = 0; - /* mu_F[0] = 4 * F_new; mu_F[1] = 3 * F_old */ - GBR_set_ui(mu_F[0], 4); - GBR_mul(mu_F[0], mu_F[0], F_new); - GBR_set_ui(mu_F[1], 3); - GBR_mul(mu_F[1], mu_F[1], F_old); - if (GBR_lt(mu_F[0], mu_F[1])) { - B = isl_mat_swap_rows(B, 1 + i, 1 + i + 1); - if (i > tab->n_zero) { - use_saved = 1; - GBR_set(F_saved, F_new); - fixed_saved = fixed; - if (GBR_lp_del_row(lp) < 0) - goto error; - --i; - } else { - GBR_set(F[tab->n_zero], F_new); - if (gbr_only_first && GBR_lt(F[tab->n_zero], two)) - break; - - if (fixed) { - if (!GBR_is_zero(F[tab->n_zero])) { - empty = GBR_lp_cut(lp, B->row[1+tab->n_zero]+1); - if (empty) - goto done; - GBR_set_ui(F[tab->n_zero], 0); - } - tab->n_zero++; - } - } - } else { - GBR_lp_add_row(lp, B->row[1+i]+1, dim); - ++i; - } - } while (i < n_bounded - 1); - - if (0) { -done: - if (empty < 0) { -error: - isl_mat_free(B); - B = NULL; - } - } - - GBR_lp_delete(lp); - - if (alpha_buffer[1]) - for (i = 0; i < n_bounded; ++i) { - GBR_clear(F[i]); - GBR_clear(alpha_buffer[0][i]); - GBR_clear(alpha_buffer[1][i]); - } - free(F); - free(alpha_buffer[0]); - free(alpha_buffer[1]); - - isl_vec_free(b_tmp); - - GBR_clear(alpha); - GBR_clear(F_old); - GBR_clear(F_new); - GBR_clear(F_saved); - GBR_clear(mu_F[0]); - GBR_clear(mu_F[1]); - GBR_clear(two); - GBR_clear(one); - - isl_int_clear(tmp); - isl_int_clear(mu[0]); - isl_int_clear(mu[1]); - - tab->basis = B; - - return tab; -} - -/* Compute an affine form of a reduced basis of the given basic - * non-parametric set, which is assumed to be bounded and not - * include any integer divisions. - * The first column and the first row correspond to the constant term. - * - * If the input contains any equalities, we first create an initial - * basis with the equalities first. Otherwise, we start off with - * the identity matrix. - */ -struct isl_mat *isl_basic_set_reduced_basis(struct isl_basic_set *bset) -{ - struct isl_mat *basis; - struct isl_tab *tab; - - if (!bset) - return NULL; - - if (isl_basic_set_dim(bset, isl_dim_div) != 0) - isl_die(bset->ctx, isl_error_invalid, - "no integer division allowed", return NULL); - if (isl_basic_set_dim(bset, isl_dim_param) != 0) - isl_die(bset->ctx, isl_error_invalid, - "no parameters allowed", return NULL); - - tab = isl_tab_from_basic_set(bset); - if (!tab) - return NULL; - - if (bset->n_eq == 0) - tab->basis = isl_mat_identity(bset->ctx, 1 + tab->n_var); - else { - isl_mat *eq; - unsigned nvar = isl_basic_set_total_dim(bset); - eq = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, - 1, nvar); - eq = isl_mat_left_hermite(eq, 0, NULL, &tab->basis); - tab->basis = isl_mat_lin_to_aff(tab->basis); - tab->n_zero = bset->n_eq; - isl_mat_free(eq); - } - tab = isl_tab_compute_reduced_basis(tab); - if (!tab) - return NULL; - - basis = isl_mat_copy(tab->basis); - - isl_tab_free(tab); - - return basis; -} diff --git a/cloog-0.16.3/isl/bound.c b/cloog-0.16.3/isl/bound.c deleted file mode 100644 index f83e0253641ad81efdcee2cf04b5977491708faf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/bound.c +++ /dev/null @@ -1,278 +0,0 @@ -#include -#include -#include -#include - -struct bound_options { - struct isl_options *isl; - unsigned verify; - int print_all; - int continue_on_error; -}; - -struct isl_arg bound_options_arg[] = { -ISL_ARG_CHILD(struct bound_options, isl, "isl", isl_options_arg, "isl options") -ISL_ARG_BOOL(struct bound_options, verify, 'T', "verify", 0, NULL) -ISL_ARG_BOOL(struct bound_options, print_all, 'A', "print-all", 0, NULL) -ISL_ARG_BOOL(struct bound_options, continue_on_error, '\0', "continue-on-error", 0, NULL) -ISL_ARG_END -}; - -ISL_ARG_DEF(bound_options, struct bound_options, bound_options_arg) - -static __isl_give isl_set *set_bounds(__isl_take isl_set *set) -{ - unsigned nparam; - int i, r; - isl_point *pt, *pt2; - isl_set *box; - - nparam = isl_set_dim(set, isl_dim_param); - r = nparam >= 8 ? 5 : nparam >= 5 ? 15 : 50; - - pt = isl_set_sample_point(isl_set_copy(set)); - pt2 = isl_point_copy(pt); - - for (i = 0; i < nparam; ++i) { - pt = isl_point_add_ui(pt, isl_dim_param, i, r); - pt2 = isl_point_sub_ui(pt2, isl_dim_param, i, r); - } - - box = isl_set_box_from_points(pt, pt2); - - return isl_set_intersect(set, box); -} - -struct verify_point_bound { - struct bound_options *options; - int stride; - int n; - int exact; - int error; - - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *bound; -}; - -static int verify_point(__isl_take isl_point *pnt, void *user) -{ - int i; - unsigned nvar; - unsigned nparam; - struct verify_point_bound *vpb = (struct verify_point_bound *) user; - isl_int t; - isl_pw_qpolynomial_fold *pwf; - isl_qpolynomial *bound = NULL; - isl_qpolynomial *opt = NULL; - isl_set *dom = NULL; - const char *minmax; - int bounded; - int sign; - int ok; - FILE *out = vpb->options->print_all ? stdout : stderr; - - vpb->n--; - - if (1) { - minmax = "ub"; - sign = 1; - } else { - minmax = "lb"; - sign = -1; - } - - isl_int_init(t); - - pwf = isl_pw_qpolynomial_fold_copy(vpb->pwf); - - nparam = isl_pw_qpolynomial_fold_dim(pwf, isl_dim_param); - for (i = 0; i < nparam; ++i) { - isl_point_get_coordinate(pnt, isl_dim_param, i, &t); - pwf = isl_pw_qpolynomial_fold_fix_dim(pwf, isl_dim_param, i, t); - } - - bound = isl_pw_qpolynomial_fold_eval( - isl_pw_qpolynomial_fold_copy(vpb->bound), - isl_point_copy(pnt)); - - dom = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf)); - bounded = isl_set_is_bounded(dom); - - if (bounded < 0) - goto error; - - if (!bounded) - opt = isl_pw_qpolynomial_fold_eval( - isl_pw_qpolynomial_fold_copy(pwf), - isl_set_sample_point(isl_set_copy(dom))); - else if (sign > 0) - opt = isl_pw_qpolynomial_fold_max(isl_pw_qpolynomial_fold_copy(pwf)); - else - opt = isl_pw_qpolynomial_fold_min(isl_pw_qpolynomial_fold_copy(pwf)); - - nvar = isl_set_dim(dom, isl_dim_set); - opt = isl_qpolynomial_drop_dims(opt, isl_dim_set, 0, nvar); - if (vpb->exact && bounded) - ok = isl_qpolynomial_plain_is_equal(opt, bound); - else if (sign > 0) - ok = isl_qpolynomial_le_cst(opt, bound); - else - ok = isl_qpolynomial_le_cst(bound, opt); - if (ok < 0) - goto error; - - if (vpb->options->print_all || !ok) { - fprintf(out, "%s(", minmax); - for (i = 0; i < nparam; ++i) { - if (i) - fprintf(out, ", "); - isl_point_get_coordinate(pnt, isl_dim_param, i, &t); - isl_int_print(out, t, 0); - } - fprintf(out, ") = "); - isl_qpolynomial_print(bound, out, ISL_FORMAT_ISL); - fprintf(out, ", %s = ", bounded ? "opt" : "sample"); - isl_qpolynomial_print(opt, out, ISL_FORMAT_ISL); - if (ok) - fprintf(out, ". OK\n"); - else - fprintf(out, ". NOT OK\n"); - } else if ((vpb->n % vpb->stride) == 0) { - printf("o"); - fflush(stdout); - } - - if (0) { -error: - ok = 0; - } - - isl_pw_qpolynomial_fold_free(pwf); - isl_qpolynomial_free(bound); - isl_qpolynomial_free(opt); - isl_point_free(pnt); - isl_set_free(dom); - - isl_int_clear(t); - - if (!ok) - vpb->error = 1; - - if (vpb->options->continue_on_error) - ok = 1; - - return (vpb->n >= 1 && ok) ? 0 : -1; -} - -static int check_solution(__isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_pw_qpolynomial_fold *bound, int exact, - struct bound_options *options) -{ - struct verify_point_bound vpb; - isl_int count, max; - isl_set *dom; - isl_set *context; - int i, r, n; - - dom = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf)); - context = isl_set_remove_dims(isl_set_copy(dom), isl_dim_set, - 0, isl_set_dim(dom, isl_dim_set)); - context = isl_set_remove_divs(context); - context = set_bounds(context); - - isl_int_init(count); - isl_int_init(max); - - isl_int_set_si(max, 200); - r = isl_set_count_upto(context, max, &count); - assert(r >= 0); - n = isl_int_get_si(count); - - isl_int_clear(max); - isl_int_clear(count); - - vpb.options = options; - vpb.pwf = pwf; - vpb.bound = bound; - vpb.n = n; - vpb.stride = n > 70 ? 1 + (n + 1)/70 : 1; - vpb.error = 0; - vpb.exact = exact; - - if (!options->print_all) { - for (i = 0; i < vpb.n; i += vpb.stride) - printf("."); - printf("\r"); - fflush(stdout); - } - - isl_set_foreach_point(context, verify_point, &vpb); - - isl_set_free(context); - isl_set_free(dom); - isl_pw_qpolynomial_fold_free(pwf); - isl_pw_qpolynomial_fold_free(bound); - - if (!options->print_all) - printf("\n"); - - if (vpb.error) { - fprintf(stderr, "Check failed !\n"); - return -1; - } - - return 0; -} - -int main(int argc, char **argv) -{ - isl_ctx *ctx; - isl_pw_qpolynomial_fold *copy; - isl_pw_qpolynomial_fold *pwf; - struct isl_stream *s; - struct isl_obj obj; - struct bound_options *options; - int exact; - int r = 0; - - options = bound_options_new_with_defaults(); - assert(options); - argc = bound_options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(bound_options_arg, options); - - s = isl_stream_new_file(ctx, stdin); - obj = isl_stream_read_obj(s); - if (obj.type == isl_obj_pw_qpolynomial) - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial(isl_fold_max, - obj.v); - else if (obj.type == isl_obj_pw_qpolynomial_fold) - pwf = obj.v; - else { - obj.type->free(obj.v); - isl_die(ctx, isl_error_invalid, "invalid input", goto error); - } - - if (options->verify) - copy = isl_pw_qpolynomial_fold_copy(pwf); - - pwf = isl_pw_qpolynomial_fold_bound(pwf, &exact); - pwf = isl_pw_qpolynomial_fold_coalesce(pwf); - - if (options->verify) { - r = check_solution(copy, pwf, exact, options); - } else { - if (!exact) - printf("# NOT exact\n"); - isl_pw_qpolynomial_fold_print(pwf, stdout, 0); - fprintf(stdout, "\n"); - isl_pw_qpolynomial_fold_free(pwf); - } - -error: - isl_stream_free(s); - - isl_ctx_free(ctx); - - return r; -} diff --git a/cloog-0.16.3/isl/bound_test.sh.in b/cloog-0.16.3/isl/bound_test.sh.in deleted file mode 100755 index e3fc037ecafab0c296ff04a93f473b5da2dfc862..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/bound_test.sh.in +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -EXEEXT=@EXEEXT@ - -BOUND_TESTS="\ - basicLinear2.pwqp \ - basicLinear.pwqp \ - basicTestParameterPosNeg.pwqp \ - basicTest.pwqp \ - devos.pwqp \ - equality1.pwqp \ - equality2.pwqp \ - equality3.pwqp \ - equality4.pwqp \ - equality5.pwqp \ - faddeev.pwqp \ - linearExample.pwqp \ - neg.pwqp \ - philippe3vars3pars.pwqp \ - philippe3vars.pwqp \ - philippeNeg.pwqp \ - philippePolynomialCoeff1P.pwqp \ - philippePolynomialCoeff.pwqp \ - philippe.pwqp \ - product.pwqp \ - split.pwqp \ - test3Deg3Var.pwqp \ - toplas.pwqp \ - unexpanded.pwqp" - -for i in $BOUND_TESTS; do - echo $i; - ./isl_bound$EXEEXT -T --bound=bernstein < $srcdir/test_inputs/$i || exit - ./isl_bound$EXEEXT -T --bound=range < $srcdir/test_inputs/$i || exit -done diff --git a/cloog-0.16.3/isl/cat.c b/cloog-0.16.3/isl/cat.c deleted file mode 100644 index f278e9c5af460d1b9bb942c2164d6e6ec0c3ef3a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/cat.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include - -struct isl_arg_choice cat_format[] = { - {"isl", ISL_FORMAT_ISL}, - {"omega", ISL_FORMAT_OMEGA}, - {"polylib", ISL_FORMAT_POLYLIB}, - {"ext-polylib", ISL_FORMAT_EXT_POLYLIB}, - {"latex", ISL_FORMAT_LATEX}, - {0} -}; - -struct cat_options { - struct isl_options *isl; - unsigned format; -}; - -struct isl_arg cat_options_arg[] = { -ISL_ARG_CHILD(struct cat_options, isl, "isl", isl_options_arg, "isl options") -ISL_ARG_CHOICE(struct cat_options, format, 0, "format", \ - cat_format, ISL_FORMAT_ISL, "output format") -ISL_ARG_END -}; - -ISL_ARG_DEF(cat_options, struct cat_options, cat_options_arg) - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx; - struct isl_stream *s; - struct isl_obj obj; - struct cat_options *options; - isl_printer *p; - - options = cat_options_new_with_defaults(); - assert(options); - argc = cat_options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(cat_options_arg, options); - - s = isl_stream_new_file(ctx, stdin); - obj = isl_stream_read_obj(s); - isl_stream_free(s); - - p = isl_printer_to_file(ctx, stdout); - p = isl_printer_set_output_format(p, options->format); - p = obj.type->print(p, obj.v); - p = isl_printer_end_line(p); - isl_printer_free(p); - - obj.type->free(obj.v); - - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.16.3/isl/closure.c b/cloog-0.16.3/isl/closure.c deleted file mode 100644 index 43d69d499952be84e8dbfe4b027f476c5e91aa8a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/closure.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx; - struct isl_map *map; - struct isl_options *options; - int exact; - - options = isl_options_new_with_defaults(); - assert(options); - argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(isl_options_arg, options); - - map = isl_map_read_from_file(ctx, stdin, -1); - map = isl_map_transitive_closure(map, &exact); - if (!exact) - printf("# NOT exact\n"); - isl_map_print(map, stdout, 0, ISL_FORMAT_ISL); - printf("\n"); - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - printf("# coalesced\n"); - isl_map_print(map, stdout, 0, ISL_FORMAT_ISL); - printf("\n"); - isl_map_free(map); - - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.16.3/isl/config.guess b/cloog-0.16.3/isl/config.guess deleted file mode 100755 index 115f944a61d60c17d147ae08ad02e2bbac7420da..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/config.guess +++ /dev/null @@ -1,1502 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-04-03' - -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' HUP INT TERM - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.16.3/isl/config.sub b/cloog-0.16.3/isl/config.sub deleted file mode 100755 index 204218c07382772bc2e9ad083f9dd766af90fb36..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/config.sub +++ /dev/null @@ -1,1731 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-05-21' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.16.3/isl/configure b/cloog-0.16.3/isl/configure deleted file mode 100755 index 4b7f26ec9dcc8785d0195e7cc6c7d3f3d1609b2b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/configure +++ /dev/null @@ -1,15960 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for isl 0.07. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: isl-development@googlegroups.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='isl' -PACKAGE_TARNAME='isl' -PACKAGE_VERSION='0.07' -PACKAGE_STRING='isl 0.07' -PACKAGE_BUGREPORT='isl-development@googlegroups.com' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -GIT_HEAD_VERSION -GIT_HEAD -GIT_HEAD_ID -pkgconfig_libfile -pkgconfig_libdir -WARNING_FLAGS -HAVE_PIPLIB_FALSE -HAVE_PIPLIB_TRUE -PIPLIB_LIBS -PIPLIB_LDFLAGS -PIPLIB_CPPFLAGS -NEED_GET_MEMORY_FUNCTIONS_FALSE -NEED_GET_MEMORY_FUNCTIONS_TRUE -GMP_LDFLAGS -GMP_CPPFLAGS -GENERATE_DOC_FALSE -GENERATE_DOC_TRUE -POD2HTML -PDFLATEX -PERL -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -PRTDIAG -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -versioninfo -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -enable_portable_binary -with_gcc_arch -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -with_gmp_prefix -with_gmp_exec_prefix -with_piplib -with_piplib_prefix -with_piplib_exec_prefix -with_piplib_builddir -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures isl 0.07 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/isl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of isl 0.07:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-portable-binary - disable compiler optimizations that would produce - unportable binaries - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gcc-arch= use architecture for gcc -march/-mtune, - instead of guessing - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-gmp-prefix=DIR Prefix of gmp installation - --with-gmp-exec-prefix=DIR - Exec prefix of gmp installation - --with-piplib=no|system|build - Which piplib to use [default=no] - --with-piplib-prefix=DIR - Prefix of piplib installation - --with-piplib-exec-prefix=DIR - Exec prefix of piplib installation - --with-piplib-builddir=DIR - Location of piplib builddir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -isl configure 0.07 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_member -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by isl $as_me 0.07, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_aux_dir= -for ac_dir in . "$srcdir"/.; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='isl' - VERSION='0.07' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' - - -versioninfo=7:0:0 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 -$as_echo_n "checking for C compiler vendor... " >&6; } -if test "${ax_cv_c_compiler_vendor+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_c_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__ clang:__clang__ 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'`")" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !($vencpp) - thisisanerror; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 -$as_echo "$ax_cv_c_compiler_vendor" >&6; } - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - - - - -# Check whether --enable-portable-binary was given. -if test "${enable_portable_binary+set}" = set; then : - enableval=$enable_portable_binary; acx_maxopt_portable=$withval -else - acx_maxopt_portable=no -fi - - -# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $xlc_opt" >&5 -$as_echo_n "checking whether C compiler accepts $xlc_opt... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$xlc_opt" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="-O3 -qansialias -w $xlc_opt" -else - 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 "******************************************************" -fi - - ;; - - 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: - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - icc_archflag=$flag; break -else - : -fi - - done - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc architecture flag" >&5 -$as_echo_n "checking for icc architecture flag... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $icc_archflag" >&5 -$as_echo "$icc_archflag" >&6; } - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5 -$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; } -if test "${ax_cv_c_flags__malign_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-malign-double" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__malign_double=yes -else - ax_cv_c_flags__malign_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -malign-double" -else - : -fi - - - # -fstrict-aliasing for gcc-2.95+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5 -$as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; } -if test "${ax_cv_c_flags__fstrict_aliasing+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-fstrict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__fstrict_aliasing=yes -else - ax_cv_c_flags__fstrict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__fstrict_aliasing -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -fstrict-aliasing" -else - : -fi - - - # note that we enable "unsafe" fp optimization with other compilers, too - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5 -$as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; } -if test "${ax_cv_c_flags__ffast_math+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-ffast-math" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__ffast_math=yes -else - ax_cv_c_flags__ffast_math=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__ffast_math -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -ffast-math" -else - : -fi - - - - - - -# Check whether --with-gcc-arch was given. -if test "${with_gcc_arch+set}" = set; then : - withval=$with_gcc_arch; ax_gcc_arch=$withval -else - ax_gcc_arch=yes -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -if test "${ax_cv_gcc_archflag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -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 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) - 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]?:*:*:*) - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x80000006 output" >&5 -$as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0x80000006=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0x80000006, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # 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*) - # Extract the first word of "prtdiag", so it can be a program name with args. -set dummy prtdiag; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PRTDIAG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PRTDIAG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag" - ;; -esac -fi -PRTDIAG=$ac_cv_path_PRTDIAG -if test -n "$PRTDIAG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRTDIAG" >&5 -$as_echo "$PRTDIAG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - 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$acx_maxopt_portable" = 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - ax_cv_gcc_archflag=$flag; break -else - : -fi - - done - test "x$ax_cv_gcc_archflag" = xunknown || break -done -fi - -fi # $GCC=yes - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_archflag" >&5 -$as_echo "$ax_cv_gcc_archflag" >&6; } -if test "x$ax_cv_gcc_archflag" = xunknown; then - : -else - CFLAGS="$CFLAGS $ax_cv_gcc_archflag" -fi - - - # drop to -O1 for gcc 4.2 - $CC --version | - sed -e 's/.* \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2/' | - (read major minor - if test $major -eq 4 -a $minor -eq 2; then - exit 0 - fi - exit 1 - ) && CFLAGS="-O1" - ;; - 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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS" >&5 -$as_echo_n "checking whether C compiler accepts $CFLAGS... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - : -else - - 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 - - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports function __attribute__((__warn_unused_result__))" >&5 -$as_echo_n "checking whether the compiler supports function __attribute__((__warn_unused_result__))... " >&6; } -if test "${ax_cv_gcc_warn_unused_result+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -__attribute__((__warn_unused_result__)) - int f(int i) { return i; } -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_gcc_warn_unused_result=yes -else - ax_cv_gcc_warn_unused_result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_warn_unused_result" >&5 -$as_echo "$ax_cv_gcc_warn_unused_result" >&6; } - if test "$ax_cv_gcc_warn_unused_result" = yes; then - -$as_echo "#define GCC_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 -$as_echo_n "checking for __attribute__... " >&6; } -if test "${ax_cv___attribute__+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void foo(void) __attribute__ ((unused)); - static void - foo(void) { - exit(1); - } - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv___attribute__=yes -else - ax_cv___attribute__=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___attribute__" >&5 -$as_echo "$ax_cv___attribute__" >&6; } - if test "$ax_cv___attribute__" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h - - fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.8' -macro_revision='1.3169' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PERL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PERL"; then - ac_cv_prog_PERL="$PERL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PERL="perl" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PERL=$ac_cv_prog_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "pdflatex", so it can be a program name with args. -set dummy pdflatex; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PDFLATEX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PDFLATEX"; then - ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PDFLATEX="pdflatex" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PDFLATEX=$ac_cv_prog_PDFLATEX -if test -n "$PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 -$as_echo "$PDFLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "pod2html", so it can be a program name with args. -set dummy pod2html; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_POD2HTML+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$POD2HTML"; then - ac_cv_prog_POD2HTML="$POD2HTML" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_POD2HTML="pod2html" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -POD2HTML=$ac_cv_prog_POD2HTML -if test -n "$POD2HTML"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2HTML" >&5 -$as_echo "$POD2HTML" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML"; then - GENERATE_DOC_TRUE= - GENERATE_DOC_FALSE='#' -else - GENERATE_DOC_TRUE='#' - GENERATE_DOC_FALSE= -fi - - -# ------ AX CREATE STDINT H ------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5 -$as_echo_n "checking for stdint types... " >&6; } -ac_stdint_h=`echo include/isl/stdint.h` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -if test "${ac_cv_header_stdint_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int_least32_t v = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; -else - ac_cv_header_stdint_t="" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then -CFLAGS="-std=c99" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int_least32_t v = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&5 -$as_echo "$as_me: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" -fi - - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5 -$as_echo "(are you sure you want them in ./stdint.h?)" >&6; } -elif test "$ac_stdint_h" = "inttypes.h" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5 -$as_echo "(are you sure you want them in ./inttypes.h?)" >&6; } -elif test "_$ac_cv_header_stdint_t" = "_" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5 -$as_echo "(putting them into $ac_stdint_h)$v" >&6; } -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5 -$as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; } -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - - -inttype_headers=`echo | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 -$as_echo_n "checking for stdint uintptr_t... " >&6; } -if test "${ac_cv_header_stdint_x+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers - do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i> -" -if test "x$ac_cv_type_uintptr_t" = x""yes; then : - ac_cv_header_stdint_x=$i -else - continue -fi - - ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> -" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - and64="/uint64_t" -else - and64="" -fi - - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)" - break - done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 -$as_echo_n "checking for stdint uintptr_t... " >&6; } - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5 -$as_echo "$ac_cv_header_stdint_x" >&6; } - - -if test "_$ac_cv_header_stdint_x" = "_" ; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 -$as_echo_n "checking for stdint uint32_t... " >&6; } -if test "${ac_cv_header_stdint_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers - do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i> -" -if test "x$ac_cv_type_uint32_t" = x""yes; then : - ac_cv_header_stdint_o=$i -else - continue -fi - - ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> -" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - and64="/uint64_t" -else - and64="" -fi - - ac_cv_stdint_result="(seen uint32_t$and64 in $i)" - break - break; - done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 -$as_echo_n "checking for stdint uint32_t... " >&6; } - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5 -$as_echo "$ac_cv_header_stdint_o" >&6; } - -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 -$as_echo_n "checking for stdint u_int32_t... " >&6; } -if test "${ac_cv_header_stdint_u+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i> -" -if test "x$ac_cv_type_u_int32_t" = x""yes; then : - ac_cv_header_stdint_u=$i -else - continue -fi - - ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i> -" -if test "x$ac_cv_type_u_int64_t" = x""yes; then : - and64="/u_int64_t" -else - and64="" -fi - - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)" - break - break; - done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 -$as_echo_n "checking for stdint u_int32_t... " >&6; } - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5 -$as_echo "$ac_cv_header_stdint_u" >&6; } - -fi fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5 -$as_echo_n "checking for stdint datatype model... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 -$as_echo_n "checking size of char... " >&6; } -if test "${ac_cv_sizeof_char+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (char) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_char=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (short) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (int) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_int=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5 -$as_echo_n "checking size of void*... " >&6; } -if test "${ac_cv_sizeof_voidp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_voidp" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (void*) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_voidp=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5 -$as_echo "$ac_cv_sizeof_voidp" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOIDP $ac_cv_sizeof_voidp -_ACEOF - - - ac_cv_char_data_model="" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking data model" >&5 -$as_echo_n "checking data model... " >&6; } - case "$ac_cv_char_data_model/$ac_cv_long_data_model" in - 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; - 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; - 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; - 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; - 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; - 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; - 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; - 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; - 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; - 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; - 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; - 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; - 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; - 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; - 222/*|333/*|444/*|666/*|888/*) : - ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; - *) ac_cv_data_model="none" ; n="very unusual model" ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_data_model ($ac_cv_long_data_model, $n)" >&5 -$as_echo "$ac_cv_data_model ($ac_cv_long_data_model, $n)" >&6; } - -fi - -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_x" -elif test "_$ac_cv_header_stdint_o" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_o" -elif test "_$ac_cv_header_stdint_u" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_u" -else - ac_cv_header_stdint="stddef.h" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5 -$as_echo_n "checking for extra inttypes in chosen header... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5 -$as_echo "($ac_cv_header_stdint)" >&6; } -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint> -" -if test "x$ac_cv_type_int_least32_t" = x""yes; then : - -fi - -ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint> -" -if test "x$ac_cv_type_int_fast32_t" = x""yes; then : - -fi - -ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint> -" -if test "x$ac_cv_type_intmax_t" = x""yes; then : - -fi - - -fi # shortcircut to system "stdint.h" -# ------------------ PREPARE VARIABLES ------------------------------ -if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` -else -ac_cv_stdint_message="using $CC" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5 -$as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; } - -# ----------------- DONE inttypes.h checks START header ------------- -ac_config_commands="$ac_config_commands $ac_stdint_h" - - - - - - -case "system" in -system) - -# Check whether --with-gmp_prefix was given. -if test "${with_gmp_prefix+set}" = set; then : - withval=$with_gmp_prefix; -fi - - -# Check whether --with-gmp_exec_prefix was given. -if test "${with_gmp_exec_prefix+set}" = set; then : - withval=$with_gmp_exec_prefix; -fi - -esac - -if test "x$with_gmp_prefix" != "x" -a "x$with_gmp_exec_prefix" = "x"; then - with_gmp_exec_prefix=$with_gmp_prefix -fi -if test "x$with_gmp_prefix" != "x" -o "x$with_gmp_exec_prefix" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xyes" -a "x$with_gmp" != "xsystem"; then - as_fn_error "Setting $with_gmp_prefix implies use of system gmp" "$LINENO" 5 - fi - with_gmp="system" -fi -if test "x$with_gmp_builddir" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xyes" -a "x$with_gmp" != "xbuild"; then - as_fn_error "Setting $with_gmp_builddir implies use of build gmp" "$LINENO" 5 - fi - with_gmp="build" - gmp_srcdir=`echo @abs_srcdir@ | $with_gmp_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: gmp sources in $gmp_srcdir" >&5 -$as_echo "$as_me: gmp sources in $gmp_srcdir" >&6;} -fi -if test "x$with_gmp_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_gmp_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_gmp" in -system) - ;; -*) - case "system" in - bundled) - if test -d $srcdir/.git -a \ - -d $srcdir/gmp -a \ - ! -d $srcdir/gmp/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule gmp not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule gmp not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/gmp/configure; then - with_gmp="bundled" - else - with_gmp="no" - fi - ;; - *) - with_gmp="system" - ;; - esac - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which gmp to use" >&5 -$as_echo_n "checking which gmp to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gmp" >&5 -$as_echo "$with_gmp" >&6; } - - - - - -if test "x$with_gmp_prefix" != "x"; then - isl_configure_args="$isl_configure_args --with-gmp=$with_gmp_prefix" - GMP_CPPFLAGS="-I$with_gmp_prefix/include" - GMP_LDFLAGS="-L$with_gmp_prefix/lib" -fi -SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" -need_get_memory_functions=false -ac_fn_c_check_decl "$LINENO" "mp_get_memory_functions" "ac_cv_have_decl_mp_get_memory_functions" "#include -" -if test "x$ac_cv_have_decl_mp_get_memory_functions" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MP_GET_MEMORY_FUNCTIONS $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - - need_get_memory_functions=true - -fi - -CPPFLAGS="$SAVE_CPPFLAGS" - if test x$need_get_memory_functions = xtrue; then - NEED_GET_MEMORY_FUNCTIONS_TRUE= - NEED_GET_MEMORY_FUNCTIONS_FALSE='#' -else - NEED_GET_MEMORY_FUNCTIONS_TRUE='#' - NEED_GET_MEMORY_FUNCTIONS_FALSE= -fi - -ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "#include -" -if test "x$ac_cv_have_decl_ffs" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FFS $ac_have_decl -_ACEOF - -ac_fn_c_check_decl "$LINENO" "__builtin_ffs" "ac_cv_have_decl___builtin_ffs" "$ac_includes_default" -if test "x$ac_cv_have_decl___builtin_ffs" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___BUILTIN_FFS $ac_have_decl -_ACEOF - - - - - -# Check whether --with-piplib was given. -if test "${with_piplib+set}" = set; then : - withval=$with_piplib; -fi - -case "system" in -no|system|build) - -# Check whether --with-piplib_prefix was given. -if test "${with_piplib_prefix+set}" = set; then : - withval=$with_piplib_prefix; -fi - - -# Check whether --with-piplib_exec_prefix was given. -if test "${with_piplib_exec_prefix+set}" = set; then : - withval=$with_piplib_exec_prefix; -fi - -esac - -# Check whether --with-piplib_builddir was given. -if test "${with_piplib_builddir+set}" = set; then : - withval=$with_piplib_builddir; -fi - -if test "x$with_piplib_prefix" != "x" -a "x$with_piplib_exec_prefix" = "x"; then - with_piplib_exec_prefix=$with_piplib_prefix -fi -if test "x$with_piplib_prefix" != "x" -o "x$with_piplib_exec_prefix" != "x"; then - if test "x$with_piplib" != "x" -a "x$with_piplib" != "xyes" -a "x$with_piplib" != "xsystem"; then - as_fn_error "Setting $with_piplib_prefix implies use of system piplib" "$LINENO" 5 - fi - with_piplib="system" -fi -if test "x$with_piplib_builddir" != "x"; then - if test "x$with_piplib" != "x" -a "x$with_piplib" != "xyes" -a "x$with_piplib" != "xbuild"; then - as_fn_error "Setting $with_piplib_builddir implies use of build piplib" "$LINENO" 5 - fi - with_piplib="build" - piplib_srcdir=`echo @abs_srcdir@ | $with_piplib_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: piplib sources in $piplib_srcdir" >&5 -$as_echo "$as_me: piplib sources in $piplib_srcdir" >&6;} -fi -if test "x$with_piplib_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_piplib_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_piplib" in -no|system|build) - ;; -*) - case "no" in - bundled) - if test -d $srcdir/.git -a \ - -d $srcdir/piplib -a \ - ! -d $srcdir/piplib/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule piplib not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule piplib not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/piplib/configure; then - with_piplib="bundled" - else - with_piplib="no" - fi - ;; - *) - with_piplib="no" - ;; - esac - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which piplib to use" >&5 -$as_echo_n "checking which piplib to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_piplib" >&5 -$as_echo "$with_piplib" >&6; } - - - -have_piplib=false - - - -case "$with_piplib" in - build) - PIPLIB_CPPFLAGS="-I$piplib_srcdir/include" - PIPLIB_LIBS="$with_piplib_builddir/libpiplibMP.la" - ;; - system) - PIPLIB_LIBS="-lpiplibMP" - if test "x$with_piplib_prefix" != "x"; then - PIPLIB_CPPFLAGS="-I$with_piplib_prefix/include" - PIPLIB_LDFLAGS="-L$with_piplib_prefix/lib" - fi - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$PIPLIB_CPPFLAGS $CPPFLAGS" - LDFLAGS="$PIPLIB_LDFLAGS $LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pip_solve in -lpiplibMP" >&5 -$as_echo_n "checking for pip_solve in -lpiplibMP... " >&6; } -if test "${ac_cv_lib_piplibMP_pip_solve+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpiplibMP $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pip_solve (); -int -main () -{ -return pip_solve (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_piplibMP_pip_solve=yes -else - ac_cv_lib_piplibMP_pip_solve=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_piplibMP_pip_solve" >&5 -$as_echo "$ac_cv_lib_piplibMP_pip_solve" >&6; } -if test "x$ac_cv_lib_piplibMP_pip_solve" = x""yes; then : - - ac_fn_c_check_member "$LINENO" "PipOptions" "Urs_parms" "ac_cv_member_PipOptions_Urs_parms" "#include -" -if test "x$ac_cv_member_PipOptions_Urs_parms" = x""yes; then : - -else - - as_fn_error "Piplib too old; please install version 1.3.6 or newer" "$LINENO" 5 - -fi - - -else - - as_fn_error "Piplib not found" "$LINENO" 5 - -fi - - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" - ;; - no) - ;; - *) - as_fn_error "unsupported" "$LINENO" 5 - ;; -esac -if test "$with_piplib" != "no"; then - -$as_echo "#define ISL_PIPLIB /**/" >>confdefs.h - - have_piplib=true -fi - if test x$have_piplib = xtrue; then - HAVE_PIPLIB_TRUE= - HAVE_PIPLIB_FALSE='#' -else - HAVE_PIPLIB_TRUE='#' - HAVE_PIPLIB_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 -$as_echo_n "checking for C compiler vendor... " >&6; } -if test "${ax_cv_c_compiler_vendor+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_c_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__ clang:__clang__ 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'`")" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !($vencpp) - thisisanerror; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 -$as_echo "$ax_cv_c_compiler_vendor" >&6; } - - - WARNING_FLAGS="" - - if test "${ax_cv_c_compiler_vendor}" = "clang"; then - WARNING_FLAGS="-Wall" - fi - - - - -PACKAGE_CFLAGS="$GMP_CPPFLAGS" -PACKAGE_LDFLAGS="$GMP_LDFLAGS" -PACKAGE_LIBS="-lisl -lgmp" - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig libname" >&5 -$as_echo_n "checking our pkgconfig libname... " >&6; } -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="${PACKAGE_NAME}" -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="$PACKAGE" -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libname" >&5 -$as_echo "$ax_create_pkgconfig_libname" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig version" >&5 -$as_echo_n "checking our pkgconfig version... " >&6; } -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="${PACKAGE_VERSION}" -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="$VERSION" -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_version" >&5 -$as_echo "$ax_create_pkgconfig_version" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libdir" >&5 -$as_echo_n "checking our pkgconfig_libdir... " >&6; } -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -ax_create_pkgconfig_libdir=`eval echo "$pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libdir" >&5 -$as_echo "$pkgconfig_libdir" >&6; } -test "$pkgconfig_libdir" != "$ax_create_pkgconfig_libdir" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&5 -$as_echo "expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libfile" >&5 -$as_echo_n "checking our pkgconfig_libfile... " >&6; } -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_libfile=`eval echo "$pkgconfig_libfile"` -ax_create_pkgconfig_libfile=`eval echo "$ax_create_pkgconfig_libfile"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libfile" >&5 -$as_echo "$pkgconfig_libfile" >&6; } -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_libfile" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&5 -$as_echo "expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our package / suffix" >&5 -$as_echo_n "checking our package / suffix... " >&6; } -ax_create_pkgconfig_suffix="$program_suffix" -test ".$ax_create_pkgconfig_suffix" != .NONE || ax_create_pkgconfig_suffix="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&5 -$as_echo "${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig description" >&5 -$as_echo_n "checking our pkgconfig description... " >&6; } -ax_create_pkgconfig_description="$PACKAGE_SUMMARY" -test ".$ax_create_pkgconfig_description" != "." || \ -ax_create_pkgconfig_description="$ax_create_pkgconfig_libname Library" -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_description" >&5 -$as_echo "$ax_create_pkgconfig_description" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig requires" >&5 -$as_echo_n "checking our pkgconfig requires... " >&6; } -ax_create_pkgconfig_requires="$PACKAGE_REQUIRES" -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_requires" >&5 -$as_echo "$ax_create_pkgconfig_requires" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ext libs" >&5 -$as_echo_n "checking our pkgconfig ext libs... " >&6; } -ax_create_pkgconfig_pkglibs="$PACKAGE_LIBS" -test ".$ax_create_pkgconfig_pkglibs" != "." || ax_create_pkgconfig_pkglibs="-l$ax_create_pkgconfig_libname" -ax_create_pkgconfig_libs="$ax_create_pkgconfig_pkglibs $LIBS" -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libs" >&5 -$as_echo "$ax_create_pkgconfig_libs" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig cppflags" >&5 -$as_echo_n "checking our pkgconfig cppflags... " >&6; } -ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_cppflags" >&5 -$as_echo "$ax_create_pkgconfig_cppflags" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ldflags" >&5 -$as_echo_n "checking our pkgconfig ldflags... " >&6; } -ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_ldflags" >&5 -$as_echo "$ax_create_pkgconfig_ldflags" >&6; } - -test ".$ax_create_pkgconfig_generate" != "." || \ -ax_create_pkgconfig_generate="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_generate" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: generate the pkgconfig later... $ax_create_pkgconfig_generate" >&5 -$as_echo "generate the pkgconfig later... $ax_create_pkgconfig_generate" >&6; }) - -if test ".$ax_create_pkgconfig_src_libdir" = "." ; then -ax_create_pkgconfig_src_libdir=`pwd` -ax_create_pkgconfig_src_libdir=`$as_dirname -- "$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" || -$as_expr X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_libdir/src || \ -ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/src" -case ".$objdir" in -*libs) ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/$objdir" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&5 -$as_echo "noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&6; } -fi - -if test ".$ax_create_pkgconfig_src_headers" = "." ; then -ax_create_pkgconfig_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) ax_create_pkgconfig_src_headers="" ;; esac -ax_create_pkgconfig_src_headers=`$as_dirname -- "$ax_create_pkgconfig_src_headers/$v/x" || -$as_expr X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_headers/$v/x" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_headers/include || \ -ax_create_pkgconfig_src_headers="$ax_create_pkgconfig_src_headers/include" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&5 -$as_echo "noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&6; } -fi - - -ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate" - - - - - - - if test -f $srcdir/.git/HEAD; then - GIT_HEAD="$srcdir/.git/index" - GIT_REPO="$srcdir/.git" - GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe` - elif test -f $srcdir/GIT_HEAD_ID; then - GIT_HEAD_ID=`cat $srcdir/GIT_HEAD_ID` - else - mysrcdir=`(cd $srcdir; pwd)` - head=`basename $mysrcdir | sed -e 's/.*-//'` - head2=`echo $head | sed -e 's/^0-9a-f//'` - head3=`echo $head2 | sed -e 's/........................................//'` - if test "x$head3" = "x" -a "x$head" = "x$head2"; then - GIT_HEAD_ID="$head" - else - GIT_HEAD_ID="UNKNOWN" - fi - fi - if test -z "$GIT_REPO" ; then - GIT_HEAD_VERSION="$GIT_HEAD_ID" - else - GIT_HEAD_VERSION="\`GIT_DIR=$GIT_REPO git describe\`" - fi - -echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h - - -ac_config_headers="$ac_config_headers isl_config.h" - -ac_config_headers="$ac_config_headers include/isl/config.h" - -ac_config_files="$ac_config_files Makefile" - -ac_config_files="$ac_config_files doc/Makefile" - -ac_config_files="$ac_config_files bound_test.sh" - -ac_config_files="$ac_config_files pip_test.sh" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GENERATE_DOC_TRUE}" && test -z "${GENERATE_DOC_FALSE}"; then - as_fn_error "conditional \"GENERATE_DOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NEED_GET_MEMORY_FUNCTIONS_TRUE}" && test -z "${NEED_GET_MEMORY_FUNCTIONS_FALSE}"; then - as_fn_error "conditional \"NEED_GET_MEMORY_FUNCTIONS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_PIPLIB_TRUE}" && test -z "${HAVE_PIPLIB_FALSE}"; then - as_fn_error "conditional \"HAVE_PIPLIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by isl $as_me 0.07, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -isl config.status 0.07 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - -# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=`$as_echo "_$PACKAGE-$ac_stdint_h" | $as_tr_cpp` -ac_cv_stdint_message="$ac_cv_stdint_message" -ac_cv_header_stdint_t="$ac_cv_header_stdint_t" -ac_cv_header_stdint_x="$ac_cv_header_stdint_x" -ac_cv_header_stdint_o="$ac_cv_header_stdint_o" -ac_cv_header_stdint_u="$ac_cv_header_stdint_u" -ac_cv_type_uint64_t="$ac_cv_type_uint64_t" -ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" -ac_cv_char_data_model="$ac_cv_char_data_model" -ac_cv_long_data_model="$ac_cv_long_data_model" -ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" -ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" -ac_cv_type_intmax_t="$ac_cv_type_intmax_t" - - -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;; - "$ax_create_pkgconfig_generate") CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;; - "isl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS isl_config.h" ;; - "include/isl/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/isl/config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "bound_test.sh") CONFIG_FILES="$CONFIG_FILES bound_test.sh" ;; - "pip_test.sh") CONFIG_FILES="$CONFIG_FILES pip_test.sh" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "$ac_stdint_h":C) -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_stdint_h : $_ac_stdint_h" >&5 -$as_echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;} -ac_stdint=$tmp/_stdint.h - -echo "#ifndef" $_ac_stdint_h >$ac_stdint -echo "#define" $_ac_stdint_h "1" >>$ac_stdint -echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint -echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint -echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint -if test "_$ac_cv_header_stdint_t" != "_" ; then -echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint -echo "#include " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_header="$ac_cv_header_stdint_x" - echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint -fi - -echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_o" != "_" ; then - ac_header="$ac_cv_header_stdint_o" - echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint -fi - -echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint -if test "_$ac_cv_header_stdint_u" != "_" ; then - ac_header="$ac_cv_header_stdint_u" - echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint -fi - -echo "" >>$ac_stdint - -if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then - echo "#include <$ac_header>" >>$ac_stdint - echo "" >>$ac_stdint -fi fi - -echo "/* which 64bit typedef has been found */" >>$ac_stdint -if test "$ac_cv_type_uint64_t" = "yes" ; then -echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint -fi -if test "$ac_cv_type_u_int64_t" = "yes" ; then -echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* which type model has been detected */" >>$ac_stdint -if test "_$ac_cv_char_data_model" != "_" ; then -echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint -echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* whether int_least types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_least32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint -fi -echo "/* whether int_fast types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_fast32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint -fi -echo "/* whether intmax_t type was detected */" >>$ac_stdint -if test "$ac_cv_type_intmax_t" = "yes"; then -echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 199901L -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; - -#elif !defined __STRICT_ANSI__ -#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ -#define _HAVE_UINT64_T -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ -/* note: all ELF-systems seem to have loff-support which needs 64-bit */ -#if !defined _NO_LONGLONG -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; -#endif - -#elif defined __alpha || (defined __mips && defined _ABIN32) -#if !defined _NO_LONGLONG -typedef long int64_t; -typedef unsigned long uint64_t; -#endif - /* compiler/cpu type to define int64_t */ -#endif -#endif -#endif - -#if defined _STDINT_HAVE_U_INT_TYPES -/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ -typedef u_int8_t uint8_t; -typedef u_int16_t uint16_t; -typedef u_int32_t uint32_t; - -/* glibc compatibility */ -#ifndef __int8_t_defined -#define __int8_t_defined -#endif -#endif - -#ifdef _STDINT_NEED_INT_MODEL_T -/* we must guess all the basic types. Apart from byte-adressable system, */ -/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ -/* (btw, those nibble-addressable systems are way off, or so we assume) */ - - -#if defined _STDINT_BYTE_MODEL -#if _STDINT_LONG_MODEL+0 == 242 -/* 2:4:2 = IP16 = a normal 16-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef long int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 -/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ -/* 4:4:4 = ILP32 = a normal 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 -/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ -/* 4:8:8 = LP64 = a normal 64-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* this system has a "long" of 64bit */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -typedef unsigned long uint64_t; -typedef long int64_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 448 -/* LLP64 a 64-bit system derived from a 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* assuming the system has a "long long" */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif -#else -#define _STDINT_NO_INT32_T -#endif -#else -#define _STDINT_NO_INT8_T -#define _STDINT_NO_INT32_T -#endif -#endif - -/* - * quote from SunOS-5.8 sys/inttypes.h: - * Use at your own risk. As of February 1996, the committee is squarely - * behind the fixed sized types; the "least" and "fast" types are still being - * discussed. The probability that the "fast" types may be removed before - * the standard is finalized is high enough that they are not currently - * implemented. - */ - -#if defined _STDINT_NEED_INT_LEAST_T -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_least64_t; -#endif - -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_least64_t; -#endif - /* least types */ -#endif - -#if defined _STDINT_NEED_INT_FAST_T -typedef int8_t int_fast8_t; -typedef int int_fast16_t; -typedef int32_t int_fast32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_fast64_t; -#endif - -typedef uint8_t uint_fast8_t; -typedef unsigned uint_fast16_t; -typedef uint32_t uint_fast32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_fast64_t; -#endif - /* fast types */ -#endif - -#ifdef _STDINT_NEED_INTMAX_T -#ifdef _HAVE_UINT64_T -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; -#else -typedef long intmax_t; -typedef unsigned long uintmax_t; -#endif -#endif - -#ifdef _STDINT_NEED_INTPTR_T -#ifndef __intptr_t_defined -#define __intptr_t_defined -/* we encourage using "long" to store pointer values, never use "int" ! */ -#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 -typedef unsigned int uintptr_t; -typedef int intptr_t; -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 -typedef unsigned long uintptr_t; -typedef long intptr_t; -#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T -typedef uint64_t uintptr_t; -typedef int64_t intptr_t; -#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ -typedef unsigned long uintptr_t; -typedef long intptr_t; -#endif -#endif -#endif - -/* The ISO C99 standard specifies that in C++ implementations these - should only be defined if explicitly requested. */ -#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS -#ifndef UINT32_C - -/* Signed. */ -# define INT8_C(c) c -# define INT16_C(c) c -# define INT32_C(c) c -# ifdef _HAVE_LONGLONG_UINT64_T -# define INT64_C(c) c ## L -# else -# define INT64_C(c) c ## LL -# endif - -/* Unsigned. */ -# define UINT8_C(c) c ## U -# define UINT16_C(c) c ## U -# define UINT32_C(c) c ## U -# ifdef _HAVE_LONGLONG_UINT64_T -# define UINT64_C(c) c ## UL -# else -# define UINT64_C(c) c ## ULL -# endif - -/* Maximal type. */ -# ifdef _HAVE_LONGLONG_UINT64_T -# define INTMAX_C(c) c ## L -# define UINTMAX_C(c) c ## UL -# else -# define INTMAX_C(c) c ## LL -# define UINTMAX_C(c) c ## ULL -# endif - - /* literalnumbers */ -#endif -#endif - -/* These limits are merily those of a two complement byte-oriented system */ - -/* Minimum of signed integral types. */ -# define INT8_MIN (-128) -# define INT16_MIN (-32767-1) -# define INT32_MIN (-2147483647-1) -#ifndef INT64_MIN -# define INT64_MIN (-__INT64_C(9223372036854775807)-1) -#endif -/* Maximum of signed integral types. */ -# define INT8_MAX (127) -# define INT16_MAX (32767) -# define INT32_MAX (2147483647) -#ifndef INT64_MAX -# define INT64_MAX (__INT64_C(9223372036854775807)) -#endif - -/* Maximum of unsigned integral types. */ -#ifndef UINT8_MAX -# define UINT8_MAX (255) -#endif -#ifndef UINT16_MAX -# define UINT16_MAX (65535) -#endif -# define UINT32_MAX (4294967295U) -#ifndef UINT64_MAX -# define UINT64_MAX (__UINT64_C(18446744073709551615)) -#endif - -/* Minimum of signed integral types having a minimum size. */ -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST64_MIN INT64_MIN -/* Maximum of signed integral types having a minimum size. */ -# define INT_LEAST8_MAX INT8_MAX -# define INT_LEAST16_MAX INT16_MAX -# define INT_LEAST32_MAX INT32_MAX -# define INT_LEAST64_MAX INT64_MAX - -/* Maximum of unsigned integral types having a minimum size. */ -# define UINT_LEAST8_MAX UINT8_MAX -# define UINT_LEAST16_MAX UINT16_MAX -# define UINT_LEAST32_MAX UINT32_MAX -# define UINT_LEAST64_MAX UINT64_MAX - - /* shortcircuit*/ -#endif - /* once */ -#endif -#endif -STDINT_EOF -fi - if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_stdint_h is unchanged" >&5 -$as_echo "$as_me: $ac_stdint_h is unchanged" >&6;} - else - ac_dir=`$as_dirname -- "$ac_stdint_h" || -$as_expr X"$ac_stdint_h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_stdint_h" : 'X\(//\)[^/]' \| \ - X"$ac_stdint_h" : 'X\(//\)$' \| \ - X"$ac_stdint_h" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_stdint_h" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi - ;; - "$ax_create_pkgconfig_generate":C) -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_generate.in" >&5 -$as_echo "$as_me: creating $pkgconfig_generate.in" >&6;} -cat > $pkgconfig_generate.in <&5 -$as_echo "$as_me: creating $pkgconfig_generate" >&6;} -cat >conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - as_fn_error "$pkgconfig_generate is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - ;; - "bound_test.sh":F) chmod +x bound_test.sh ;; - "pip_test.sh":F) chmod +x pip_test.sh ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - - ac_configure_args="$ac_configure_args $isl_configure_args" - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/cloog-0.16.3/isl/configure.ac b/cloog-0.16.3/isl/configure.ac deleted file mode 100644 index 8df2cbe4f51d36849ac0d653bc6d3c4c0db1c681..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/configure.ac +++ /dev/null @@ -1,112 +0,0 @@ -AC_INIT([isl], [0.07], [isl-development@googlegroups.com]) -AC_CONFIG_AUX_DIR([.]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([foreign]) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -AC_SUBST(versioninfo) -versioninfo=7:0:0 - -AC_PROG_CC - -AX_CC_MAXOPT -AX_GCC_WARN_UNUSED_RESULT -AX_C___ATTRIBUTE__ - -AC_PROG_LIBTOOL - -AC_CHECK_PROG(PERL, perl, perl, []) -AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, []) -AC_CHECK_PROG(POD2HTML, pod2html, pod2html, []) - -AM_CONDITIONAL(GENERATE_DOC, test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML") - -AX_CREATE_STDINT_H(include/isl/stdint.h) - -AX_SUBMODULE(gmp,system,system) - -AC_SUBST(GMP_CPPFLAGS) -AC_SUBST(GMP_LDFLAGS) -if test "x$with_gmp_prefix" != "x"; then - isl_configure_args="$isl_configure_args --with-gmp=$with_gmp_prefix" - GMP_CPPFLAGS="-I$with_gmp_prefix/include" - GMP_LDFLAGS="-L$with_gmp_prefix/lib" -fi -SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" -need_get_memory_functions=false -AC_CHECK_DECLS(mp_get_memory_functions,[],[ - need_get_memory_functions=true -],[#include ]) -CPPFLAGS="$SAVE_CPPFLAGS" -AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, test x$need_get_memory_functions = xtrue) -AC_CHECK_DECLS(ffs,[],[],[#include ]) -AC_CHECK_DECLS(__builtin_ffs,[],[],[]) - -AX_SUBMODULE(piplib,no|system|build,no) - -have_piplib=false -AC_SUBST(PIPLIB_CPPFLAGS) -AC_SUBST(PIPLIB_LDFLAGS) -AC_SUBST(PIPLIB_LIBS) -case "$with_piplib" in - build) - PIPLIB_CPPFLAGS="-I$piplib_srcdir/include" - PIPLIB_LIBS="$with_piplib_builddir/libpiplibMP.la" - ;; - system) - PIPLIB_LIBS="-lpiplibMP" - if test "x$with_piplib_prefix" != "x"; then - PIPLIB_CPPFLAGS="-I$with_piplib_prefix/include" - PIPLIB_LDFLAGS="-L$with_piplib_prefix/lib" - fi - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$PIPLIB_CPPFLAGS $CPPFLAGS" - LDFLAGS="$PIPLIB_LDFLAGS $LDFLAGS" - AC_CHECK_LIB(piplibMP, pip_solve,[ - AC_CHECK_MEMBER(PipOptions.Urs_parms, [], [ - AC_MSG_ERROR([Piplib too old; please install version 1.3.6 or newer]) - ],[#include ]) - ],[ - AC_MSG_ERROR([Piplib not found]) - ]) - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" - ;; - no) - ;; - *) - AC_MSG_ERROR(unsupported) - ;; -esac -if test "$with_piplib" != "no"; then - AC_DEFINE(ISL_PIPLIB,,piplib is available) - have_piplib=true -fi -AM_CONDITIONAL(HAVE_PIPLIB, test x$have_piplib = xtrue) - -AX_SET_WARNING_FLAGS - -AC_SUBST(WARNING_FLAGS) - -PACKAGE_CFLAGS="$GMP_CPPFLAGS" -PACKAGE_LDFLAGS="$GMP_LDFLAGS" -PACKAGE_LIBS="-lisl -lgmp" -AX_CREATE_PKGCONFIG_INFO - -AX_DETECT_GIT_HEAD -echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h - -AH_BOTTOM([#include ]) -AC_CONFIG_HEADERS(isl_config.h) -AC_CONFIG_HEADERS(include/isl/config.h) -AC_CONFIG_FILES(Makefile) -AC_CONFIG_FILES(doc/Makefile) -AC_CONFIG_FILES([bound_test.sh], [chmod +x bound_test.sh]) -AC_CONFIG_FILES([pip_test.sh], [chmod +x pip_test.sh]) -AC_CONFIG_COMMANDS_POST([ - dnl pass on arguments to subdir configures, but don't - dnl add them to config.status - ac_configure_args="$ac_configure_args $isl_configure_args" -]) -AC_OUTPUT diff --git a/cloog-0.16.3/isl/depcomp b/cloog-0.16.3/isl/depcomp deleted file mode 100755 index e5f9736c7239301c765e2d7abefb9bb9b9237ac5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/depcomp +++ /dev/null @@ -1,589 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2007-03-29.01 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. - -# 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, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/cloog-0.16.3/isl/doc/Makefile.am b/cloog-0.16.3/isl/doc/Makefile.am deleted file mode 100644 index aa79a6c9516e8d4d0f7fa861d787c641d723e911..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -if GENERATE_DOC -export TEXINPUTS := $(srcdir):$(TEXINPUTS) -export BIBINPUTS := $(srcdir):$(BIBINPUTS) -export BSTINPUTS := $(srcdir):$(BSTINPUTS) - -user.tex: user.pod - $(PERL) $(srcdir)/mypod2latex $< $@ -manual.pdf: manual.tex user.tex $(srcdir)/implementation.tex - (cd ..; echo "@GIT_HEAD_VERSION@") > version.tex - $(PDFLATEX) $< - bibtex manual - $(PDFLATEX) $< - $(PDFLATEX) $< -user.html: user.pod - (cd ..; echo "@GIT_HEAD_VERSION@") > version - $(POD2HTML) --infile=$< --outfile=$@ --title="Integer Set Library: Manual [version `cat version`]" -endif diff --git a/cloog-0.16.3/isl/doc/Makefile.in b/cloog-0.16.3/isl/doc/Makefile.in deleted file mode 100644 index 72da0fce8fe2927f617489377d156f69a631c833..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/Makefile.in +++ /dev/null @@ -1,399 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/m4/ax_detect_git_head.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_warn_unused_result.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_set_warning_flags.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/isl_config.h \ - $(top_builddir)/include/isl/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_HEAD = @GIT_HEAD@ -GIT_HEAD_ID = @GIT_HEAD_ID@ -GIT_HEAD_VERSION = @GIT_HEAD_VERSION@ -GMP_CPPFLAGS = @GMP_CPPFLAGS@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFLATEX = @PDFLATEX@ -PERL = @PERL@ -PIPLIB_CPPFLAGS = @PIPLIB_CPPFLAGS@ -PIPLIB_LDFLAGS = @PIPLIB_LDFLAGS@ -PIPLIB_LIBS = @PIPLIB_LIBS@ -POD2HTML = @POD2HTML@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -WARNING_FLAGS = @WARNING_FLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - -@GENERATE_DOC_TRUE@export TEXINPUTS := $(srcdir):$(TEXINPUTS) -@GENERATE_DOC_TRUE@export BIBINPUTS := $(srcdir):$(BIBINPUTS) -@GENERATE_DOC_TRUE@export BSTINPUTS := $(srcdir):$(BSTINPUTS) - -@GENERATE_DOC_TRUE@user.tex: user.pod -@GENERATE_DOC_TRUE@ $(PERL) $(srcdir)/mypod2latex $< $@ -@GENERATE_DOC_TRUE@manual.pdf: manual.tex user.tex $(srcdir)/implementation.tex -@GENERATE_DOC_TRUE@ (cd ..; echo "@GIT_HEAD_VERSION@") > version.tex -@GENERATE_DOC_TRUE@ $(PDFLATEX) $< -@GENERATE_DOC_TRUE@ bibtex manual -@GENERATE_DOC_TRUE@ $(PDFLATEX) $< -@GENERATE_DOC_TRUE@ $(PDFLATEX) $< -@GENERATE_DOC_TRUE@user.html: user.pod -@GENERATE_DOC_TRUE@ (cd ..; echo "@GIT_HEAD_VERSION@") > version -@GENERATE_DOC_TRUE@ $(POD2HTML) --infile=$< --outfile=$@ --title="Integer Set Library: Manual [version `cat version`]" - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.16.3/isl/doc/chicago.bst b/cloog-0.16.3/isl/doc/chicago.bst deleted file mode 100644 index ba058338b97c37791bab3d24c0e73bc47d6f8a40..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/chicago.bst +++ /dev/null @@ -1,1726 +0,0 @@ -%%% ==================================================================== -%%% @BibTeX-style-file{ -%%% author = "Glenn Paulley", -%%% version = "4", -%%% date = "28 August 1992", -%%% time = "10:23:39 199", -%%% filename = "chicago.bst", -%%% address = "Data Structuring Group -%%% Department of Computer Science -%%% University of Waterloo -%%% Waterloo, Ontario, Canada -%%% N2L 3G1", -%%% telephone = "(519) 885-1211", -%%% FAX = "(519) 885-1208", -%%% checksum = "26323 1654 5143 37417", -%%% email = "gnpaulle@bluebox.uwaterloo.ca", -%%% codetable = "ISO/ASCII", -%%% keywords = "", -%%% supported = "yes", -%%% abstract = "A BibTeX bibliography style that follows the -%%% `B' reference style of the 13th Edition of -%%% the Chicago Manual of Style. A detailed -%%% feature list is given below.", -%%% docstring = "The checksum field above contains a CRC-16 -%%% checksum as the first value, followed by the -%%% equivalent of the standard UNIX wc (word -%%% count) utility output of lines, words, and -%%% characters. This is produced by Robert -%%% Solovay's checksum utility.", -%%% } -%%% ==================================================================== -% -% "Chicago" BibTeX style, chicago.bst -% =================================== -% -% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09 -% Place it in a file called chicago.bst in the BibTeX search path. -% You need to include chicago.sty as a \documentstyle option. -% (Placing it in the same directory as the LaTeX document should also work.) -% This "chicago" style is based on newapa.bst (American Psych. Assoc.) -% found at ymir.claremont.edu. -% -% Citation format: (author-last-name year) -% (author-last-name and author-last-name year) -% (author-last-name, author-last-name, and author-last-name year) -% (author-last-name et al. year) -% (author-last-name) -% author-last-name (year) -% (author-last-name and author-last-name) -% (author-last-name et al.) -% (year) or (year,year) -% year or year,year -% -% Reference list ordering: alphabetical by author or whatever passes -% for author in the absence of one. -% -% This BibTeX style has support for abbreviated author lists and for -% year-only citations. This is done by having the citations -% actually look like -% -% \citeauthoryear{full-author-info}{abbrev-author-info}{year} -% -% The LaTeX style has to have the following (or similar) -% -% \let\@internalcite\cite -% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} -% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} -% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} -% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} -% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} -% -% These TeX macro definitions are found in chicago.sty. Additional -% commands to manipulate different components of a citation can be defined -% so that, for example, you can list author's names without parentheses -% if using a citation as a noun or object in a sentence. -% -% This file was originally copied from newapa.bst at ymir.claremont.edu. -% -% Features of chicago.bst: -% ======================= -% -% - full names used in citations, but abbreviated citations are available -% (see above) -% - if an entry has a "month", then the month and year are also printed -% as part of that bibitem. -% - all conjunctions use "and" instead of "\&" -% - major modification from Chicago Manual of Style (13th ed.) is that -% only the first author in a reference appears last name first- -% additional authors appear as J. Q. Public. -% - pages are listed as "pp. xx-xx" in all entry types except -% article entries. -% - book, inbook, and manual use "location: publisher" (or organization) -% for address and publisher. All other types list publishers separately. -% - "pp." are used to identify page numbers for all entry types except -% articles. -% - organization is used as a citation label if neither author nor editor -% is present (for manuals). -% - "et al." is used for long author and editor lists, or when "others" -% is used. -% -% Modifications and bug fixes from newapa.bst: -% =========================================== -% -% - added month, year to bib entries if month is present -% - fixed bug with In proceedings, added necessary comma after title -% - all conjunctions changed to "and" from "\&" -% - fixed bug with author labels in my.full.label: "et al." now is -% generated when "others" is an author name -% - major modification from Chicago Manual of Style (13th ed.) is that -% only the first author in a reference appears last name first- -% additional authors appear as J. Q. Public. -% - pages are listed as "pp. xx-xx" in all entry types except -% article entries. Unnecessary (IMHO) "()" around page numbers -% were removed, and page numbers now don't end with a period. -% - created chicago.sty for use with this bibstyle (required). -% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume, -% number, and /or pages. Renamed to format.jour.vol. -% - fixed bug in formatting booktitles: additional period an error if -% book has a volume. -% - fixed bug: editors usually given redundant period before next clause -% (format.editors.dot) removed. -% - added label support for organizations, if both author and editor -% are missing (from alpha.bst). If organization is too long, then -% the key field is used for abbreviated citations. -% - In proceedings or books of several volumes, no comma was written -% between the "Volume x" and the page numbers (this was intentional -% in newapa.bst). Fixed. -% - Some journals may not have volumes/numbers, only month/year (eg. -% IEEE Computer). Fixed bug in article style that assumed volume/number -% was always present. -% -% Original documentation for newapa.sty: -% ===================================== -% -% This version was made by modifying the master file made by -% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX -% style of Peter F. Patel-Schneider. -% -% Copyright (C) 1985, all rights reserved. -% Copying of this file is authorized only if either -% (1) you make absolutely no changes to your copy, including name, or -% (2) if you do make changes, you name it something other than 'newapa.bst'. -% There are undoubtably bugs in this style. If you make bug fixes, -% improvements, etc. please let me know. My e-mail address is: -% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com -% -% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst', -% with lots of tweaking to make it look like APA style, along with tips -% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'. - -ENTRY - { address - author - booktitle - chapter - edition - editor - fjournal - howpublished - institution - journal - key - month - note - number - organization - pages - publisher - school - series - title - type - volume - year - } - {} - { label.year extra.label sort.year sort.label } - -INTEGERS { output.state before.all mid.sentence after.sentence after.block } - -FUNCTION {init.state.consts} -{ #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := -} - -STRINGS { s t u } - -FUNCTION {output.nonnull} -{ 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} - -% Use a colon to separate output. Used only for address/publisher -% combination in book/inbook types, address/institution for manuals, -% and organization:publisher for proceedings (inproceedings). -% -FUNCTION {output.nonnull.colon} -{ 's := - output.state mid.sentence = - { ": " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} - -FUNCTION {output} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull - if$ -} - -FUNCTION {output.colon} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull.colon - if$ -} - -FUNCTION {output.check} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ -} - -FUNCTION {output.check.colon} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull.colon - if$ -} - -FUNCTION {output.year.check} -{ year empty$ - { "empty year in " cite$ * warning$ } - { write$ - " (" year * extra.label * - month empty$ - { ")" * } - { ", " * month * ")" * } - if$ - mid.sentence 'output.state := - } - if$ -} - - -FUNCTION {fin.entry} -{ add.period$ - write$ - newline$ -} - -FUNCTION {new.block} -{ output.state before.all = - 'skip$ - { after.block 'output.state := } - if$ -} - -FUNCTION {new.sentence} -{ output.state after.block = - 'skip$ - { output.state before.all = - 'skip$ - { after.sentence 'output.state := } - if$ - } - if$ -} - -FUNCTION {not} -{ { #0 } - { #1 } - if$ -} - -FUNCTION {and} -{ 'skip$ - { pop$ #0 } - if$ -} - -FUNCTION {or} -{ { pop$ #1 } - 'skip$ - if$ -} - -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ -} - -FUNCTION {new.block.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ -} - -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {field.or.null} -{ duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ -} - -% -% Emphasize the top string on the stack. -% -FUNCTION {emphasize} -{ duplicate$ empty$ - { pop$ "" } - { "{\em " swap$ * "}" * } - if$ -} - -% -% Emphasize the top string on the stack, but add a trailing space. -% -FUNCTION {emphasize.space} -{ duplicate$ empty$ - { pop$ "" } - { "{\em " swap$ * "\/}" * } - if$ -} - -INTEGERS { nameptr namesleft numnames } -% -% Format bibliographical entries with the first author last name first, -% and subsequent authors with initials followed by last name. -% All names are formatted in this routine. -% -FUNCTION {format.names} -{ 's := - #1 'nameptr := % nameptr = 1; - s num.names$ 'numnames := % numnames = num.name$(s); - numnames 'namesleft := - { namesleft #0 > } - - { nameptr #1 = - {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := } - {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := } - if$ - nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } % from Chicago Manual of Style - if$ - } - if$ - } - 't - if$ - s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := - "\protect \index {" * t * "|hyperemph}" * - nameptr #1 + 'nameptr := % nameptr += 1; - namesleft #1 - 'namesleft := % namesleft =- 1; - } - while$ -} - -FUNCTION {my.full.label} -{ 's := - #1 'nameptr := % nameptr = 1; - s num.names$ 'numnames := % numnames = num.name$(s); - numnames 'namesleft := - { namesleft #0 > } - - { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name - nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } % from Chicago Manual of Style - if$ - } - if$ - } - 't - if$ - s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := - "\protect \index {" * t * "|bold}" * - nameptr #1 + 'nameptr := % nameptr += 1; - namesleft #1 - 'namesleft := % namesleft =- 1; - } - while$ - -} - -FUNCTION {format.names.fml} -% -% Format names in "familiar" format, with first initial followed by -% last name. Like format.names, ALL names are formatted. -% -{ 's := - #1 'nameptr := % nameptr = 1; - s num.names$ 'numnames := % numnames = num.name$(s); - numnames 'namesleft := - { namesleft #0 > } - - { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := - - nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } -% { " \& " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := % nameptr += 1; - namesleft #1 - 'namesleft := % namesleft =- 1; - } - while$ -} - -FUNCTION {format.authors} -{ author empty$ - { "" } - { author format.names } - if$ -} - -FUNCTION {format.key} -{ empty$ - { key field.or.null } - { "" } - if$ -} - -% -% Format editor names for use in the "in" types: inbook, incollection, -% inproceedings: first initial, then last names. When editors are the -% LABEL for an entry, then format.editor is used which lists editors -% by last name first. -% -FUNCTION {format.editors.fml} -{ editor empty$ - { "" } - { editor format.names.fml - editor num.names$ #1 > - { " (Eds.)" * } - { " (Ed.)" * } - if$ - } - if$ -} - -% -% Format editor names for use in labels, last names first. -% -FUNCTION {format.editors} -{ editor empty$ - { "" } - { editor format.names - editor num.names$ #1 > - { " (Eds.)" * } - { " (Ed.)" * } - if$ - } - if$ -} - -FUNCTION {format.title} -{ title empty$ - { "" } - { title "t" change.case$ } - if$ -} - -% Note that the APA style requres case changes -% in article titles. The following does not -% change cases. If you perfer it, uncomment the -% following and comment out the above. - -%FUNCTION {format.title} -%{ title empty$ -% { "" } -% { title } -% if$ -%} - -FUNCTION {n.dashify} -{ 't := - "" - { t empty$ not } - { t #1 #1 substring$ "-" = - { t #1 #2 substring$ "--" = not - { "--" * - t #2 global.max$ substring$ 't := - } - { { t #1 #1 substring$ "-" = } - { "-" * - t #2 global.max$ substring$ 't := - } - while$ - } - if$ - } - { t #1 #1 substring$ * - t #2 global.max$ substring$ 't := - } - if$ - } - while$ -} - -FUNCTION {format.btitle} -{ edition empty$ - { title emphasize } - { title empty$ - { title emphasize } - { volume empty$ % gnp - check for volume, then don't need period - { "{\em " title * "\/} (" * edition * " ed.)" * "." * } - { "{\em " title * "\/} (" * edition * " ed.)" * } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.emphasize.booktitle} -{ edition empty$ - { booktitle emphasize } - { booktitle empty$ - { booktitle emphasize } - { volume empty$ % gnp - extra period an error if book has a volume - { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *} - { "{\em " booktitle * "\/} (" * edition * " ed.)" * } - if$ - } - if$ - } - if$ - } - - -FUNCTION {tie.or.space.connect} -{ duplicate$ text.length$ #3 < - { "~" } - { " " } - if$ - swap$ * * -} - -FUNCTION {either.or.check} -{ empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ -} - -FUNCTION {format.bvolume} -{ volume empty$ - { "" } - { "Volume" volume tie.or.space.connect % gnp - changed to mixed case - series empty$ - 'skip$ - { " of " * series emphasize * } - if$ - "volume and number" number either.or.check - } - if$ -} - -FUNCTION {format.number.series} -{ volume empty$ - { number empty$ - { series field.or.null } - { output.state mid.sentence = - { "Number" } % gnp - changed to mixed case always - { "Number" } - if$ - number tie.or.space.connect - series empty$ - { "there's a number but no series in " cite$ * warning$ } - { " in " * series * } - if$ - } - if$ - } - { "" } - if$ -} - -INTEGERS { multiresult } - -FUNCTION {multi.page.check} -{ 't := - #0 'multiresult := - { multiresult not - t empty$ not - and - } - { t #1 #1 substring$ - duplicate$ "-" = - swap$ duplicate$ "," = - swap$ "+" = - or or - { #1 'multiresult := } - { t #2 global.max$ substring$ 't := } - if$ - } - while$ - multiresult -} - -FUNCTION {format.pages} -{ pages empty$ - { "" } - { pages multi.page.check - { "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed () - { "pp.\ " pages tie.or.space.connect } - if$ - } - if$ -} - -% By Young (and Spencer) -% GNP - fixed bugs with missing volume, number, and/or pages -% -% Format journal, volume, number, pages for article types. -% -FUNCTION {format.jour.vol} -{ fjournal empty$ - { journal empty$ - { "no journal in " cite$ * warning$ - "" } - { journal emphasize.space } - if$ - } - { fjournal emphasize.space } - if$ - number empty$ - { volume empty$ - { "no number and no volume in " cite$ * warning$ - "" * } - { "~{\em " * Volume * "}" * } - if$ - } - { volume empty$ - {"no volume for " cite$ * warning$ - "~(" * number * ")" * } - { "~" * - volume emphasize.space - "(" * number * ")" * * } - if$ - } - if$ - pages empty$ - {"page numbers missing in " cite$ * warning$ - "" * } % gnp - place a null string on the stack for output - { duplicate$ empty$ - { pop$ format.pages } - { ", " * pages n.dashify * } % gnp - removed pp. for articles - if$ - } - if$ -} - -FUNCTION {format.chapter.pages} -{ chapter empty$ - 'format.pages - { type empty$ - { "Chapter" } % gnp - changed to mixed case - { type "t" change.case$ } - if$ - chapter tie.or.space.connect - pages empty$ - {"page numbers missing in " cite$ * warning$} % gnp - added check - { ", " * format.pages * } - if$ - } - if$ -} - -FUNCTION {format.in.ed.booktitle} -{ booktitle empty$ - { "" } - { editor empty$ - { "In " format.emphasize.booktitle * } - { "In " format.editors.fml * ", " * format.emphasize.booktitle * } - if$ - } - if$ -} - -FUNCTION {format.thesis.type} -{ type empty$ - 'skip$ - { pop$ - type "t" change.case$ - } - if$ -} - -FUNCTION {format.tr.number} -{ type empty$ - { "Technical Report" } - 'type - if$ - number empty$ - { "t" change.case$ } - { number tie.or.space.connect } - if$ -} - -FUNCTION {format.article.crossref} -{ "See" - "\citeN{" * crossref * "}" * -} - -FUNCTION {format.crossref.editor} -{ editor #1 "{vv~}{ll}" format.name$ - editor num.names$ duplicate$ - #2 > - { pop$ " et~al." * } - { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { " et~al." * } - { " and " * editor #2 "{vv~}{ll}" format.name$ * } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.book.crossref} -{ volume empty$ - { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ - "In " - } - { "Volume" volume tie.or.space.connect % gnp - changed to mixed case - " of " * - } - if$ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { "{\em " * series * "\/}" * } - if$ - } - { key * } - if$ - } - { format.crossref.editor * } - if$ - " \citeN{" * crossref * "}" * -} - -FUNCTION {format.incoll.inproc.crossref} -{ "See" - " \citeN{" * crossref * "}" * -} - -% format.lab.names: -% -% determines "short" names for the abbreviated author information. -% "Long" labels are created in calc.label, using the routine my.full.label -% to format author and editor fields. -% -% There are 4 cases for labels. (n=3 in the example) -% a) one author Foo -% b) one to n Foo, Bar and Baz -% c) use of "and others" Foo, Bar et al. -% d) more than n Foo et al. -% -FUNCTION {format.lab.names} -{ 's := - s num.names$ 'numnames := - numnames #2 > % change number to number of others allowed before - % forcing "et al". - { s #1 "{vv~}{ll}" format.name$ - "\protect \index {" * - s #1 "{vv~}{ll}{, jj}{, f.}" format.name$ * - "}" * - "\protect\chicagoetal/" * } - { - numnames #1 - 'namesleft := - #2 'nameptr := - s #1 "{vv~}{ll}" format.name$ - "\protect \index {" * - s #1 "{vv~}{ll}{, jj}{, f.}" format.name$ * - "}" * - { namesleft #0 > } - { nameptr numnames = - { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { "\protect\chicagoetal/" * } - { "\protect\chicagoand/" * s nameptr "{vv~}{ll}" format.name$ * - "\protect \index {" * - s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ * - "}" * - } - if$ - } - { ", " * s nameptr "{vv~}{ll}" format.name$ * } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } - if$ -} - -FUNCTION {author.key.label} -{ author empty$ - { key empty$ - { "no key, author in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {editor.key.label} -{ editor empty$ - { key empty$ - { "no key, editor in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { editor format.lab.names } - if$ -} - -FUNCTION {author.key.organization.label} -% -% added - gnp. Provide label formatting by organization if author is null. -% -{ author empty$ - { organization empty$ - { key empty$ - { "no key, author or organization in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { organization } - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {editor.key.organization.label} -% -% added - gnp. Provide label formatting by organization if editor is null. -% -{ editor empty$ - { organization empty$ - { key empty$ - { "no key, editor or organization in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { organization } - if$ - } - { editor format.lab.names } - if$ -} - -FUNCTION {author.editor.key.label} -{ author empty$ - { editor empty$ - { key empty$ - { "no key, author, or editor in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { editor format.lab.names } - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {calc.label.orig} -% -% Changed - GNP. See also author.organization.sort, editor.organization.sort -% Form label for BibTeX entry. The classification of which fields are used -% for which type of entry (book, inbook, etc.) are taken from alpha.bst. -% The change here from newapa is to also include organization as a -% citation label if author or editor is missing. -% -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label - { type$ "proceedings" = - 'editor.key.organization.label - { type$ "manual" = - 'author.key.organization.label - 'author.key.label - if$ - } - if$ - } - if$ - - author empty$ % generate the full label citation information. - { editor empty$ - { organization empty$ - { "no author, editor, or organization in " cite$ * warning$ - "??" } - { organization } - if$ - } - { editor my.full.label } - if$ - } - { author.key.label } - if$ - -% leave label on the stack, to be popped when required. - - "}{" * swap$ * -% year field.or.null purify$ #-1 #4 substring$ * -% -% save the year for sort processing afterwards (adding a, b, c, etc.) -% - year field.or.null purify$ #-1 #4 substring$ - 'label.year := -} - -FUNCTION {calc.label} -% -% Changed - GNP. See also author.organization.sort, editor.organization.sort -% Form label for BibTeX entry. The classification of which fields are used -% for which type of entry (book, inbook, etc.) are taken from alpha.bst. -% The change here from newapa is to also include organization as a -% citation label if author or editor is missing. -% -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label - { type$ "proceedings" = - 'editor.key.organization.label - { type$ "manual" = - 'author.key.organization.label - 'author.key.label - if$ - } - if$ - } - if$ - - author empty$ % generate the full label citation information. - { editor empty$ - { organization empty$ - { "no author, editor, or organization in " cite$ * warning$ - "??" } - { organization } - if$ - } - { editor my.full.label } - if$ - } - { author my.full.label } - if$ - -% leave label on the stack, to be popped when required. - - "}{" * swap$ * "}{" * title * "}{" * -% year field.or.null purify$ #-1 #4 substring$ * -% -% save the year for sort processing afterwards (adding a, b, c, etc.) -% - year field.or.null purify$ #-1 #4 substring$ - 'label.year := -} - -FUNCTION {output.bibitem} -{ newline$ - - "\bibitem[\protect\citeauthortitleyear{" write$ - calc.label write$ - sort.year write$ - "}]{" write$ - - cite$ write$ - "}" write$ - newline$ - "" - before.all 'output.state := -} - -FUNCTION {article} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - crossref missing$ - { format.jour.vol output - } - { format.article.crossref output.nonnull - format.pages output - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {book} -{ output.bibitem - author empty$ - { format.editors - "author and editor" output.check } - { format.authors - output.nonnull - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - output.year.check % added - new.block - format.btitle - "title" output.check - crossref missing$ - { format.bvolume output - new.block - format.number.series output - new.sentence - address output - publisher "publisher" output.check.colon - } - { new.block - format.book.crossref output.nonnull - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {booklet} -{ output.bibitem - format.authors output - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - howpublished output - address output - new.block - note output - fin.entry -} - -FUNCTION {inbook} -{ output.bibitem - author empty$ - { format.editors - "author and editor" output.check - } - { format.authors output.nonnull - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - output.year.check % added - new.block - format.btitle - "title" output.check - crossref missing$ - { format.bvolume output - format.chapter.pages - "chapter and pages" output.check - new.block - format.number.series output - new.sentence - address output - publisher - "publisher" output.check.colon - } - { format.chapter.pages "chapter and pages" output.check - new.block - format.book.crossref output.nonnull - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {incollection} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle - "booktitle" output.check - format.bvolume output - format.number.series output - format.chapter.pages output % gnp - was special.output.nonnull -% left out comma before page numbers - new.sentence - address output - publisher "publisher" output.check.colon - } - { format.incoll.inproc.crossref - output.nonnull - format.chapter.pages output - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {inproceedings} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle - "booktitle" output.check - format.bvolume output - format.number.series output - address output - format.pages output - new.sentence - organization output - publisher output.colon - } - { format.incoll.inproc.crossref output.nonnull - format.pages output - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {conference} { inproceedings } - -FUNCTION {manual} -{ output.bibitem - author empty$ - { editor empty$ - { organization "organization" output.check - organization format.key output } % if all else fails, use key - { format.editors "author and editor" output.check } - if$ - } - { format.authors output.nonnull } - if$ - output.year.check % added - new.block - format.btitle - "title" output.check - organization address new.block.checkb -% Reversed the order of "address" and "organization", added the ":". - address output - organization "organization" output.check.colon -% address output -% ":" output -% organization output - new.block - note output - fin.entry -} - -FUNCTION {mastersthesis} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - "Master's thesis" format.thesis.type output.nonnull - school "school" output.check - address output - new.block - note output - fin.entry -} - -FUNCTION {misc} -{ output.bibitem - format.authors output - author format.key output % added - output.year.check % added - title howpublished new.block.checkb - format.title output - new.block - howpublished output - new.block - note output - fin.entry -} - -FUNCTION {phdthesis} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.btitle - "title" output.check - new.block - "Ph.\ D. thesis" format.thesis.type output.nonnull - school "school" output.check - address output - new.block - note output - fin.entry -} - -FUNCTION {proceedings} -{ output.bibitem - editor empty$ - { organization output - organization format.key output } % gnp - changed from author format.key - { format.editors output.nonnull } - if$ -% author format.key output % gnp - removed (should be either -% editor or organization - output.year.check % added (newapa) - new.block - format.btitle - "title" output.check - format.bvolume output - format.number.series output - address output - new.sentence - organization output - publisher output.colon - new.block - note output - fin.entry -} - -FUNCTION {techreport} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - format.tr.number output.nonnull - institution - "institution" output.check - address output - new.block - note output - fin.entry -} - -FUNCTION {unpublished} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - note "note" output.check - fin.entry -} - -FUNCTION {default.type} { misc } - -MACRO {jan} {"January"} - -MACRO {feb} {"February"} - -MACRO {mar} {"March"} - -MACRO {apr} {"April"} - -MACRO {may} {"May"} - -MACRO {jun} {"June"} - -MACRO {jul} {"July"} - -MACRO {aug} {"August"} - -MACRO {sep} {"September"} - -MACRO {oct} {"October"} - -MACRO {nov} {"November"} - -MACRO {dec} {"December"} - -MACRO {acmcs} {"ACM Computing Surveys"} - -MACRO {acta} {"Acta Informatica"} - -MACRO {ai} {"Artificial Intelligence"} - -MACRO {cacm} {"Communications of the ACM"} - -MACRO {ibmjrd} {"IBM Journal of Research and Development"} - -MACRO {ibmsj} {"IBM Systems Journal"} - -MACRO {ieeese} {"IEEE Transactions on Software Engineering"} - -MACRO {ieeetc} {"IEEE Transactions on Computers"} - -MACRO {ieeetcad} - {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} - -MACRO {ipl} {"Information Processing Letters"} - -MACRO {jacm} {"Journal of the ACM"} - -MACRO {jcss} {"Journal of Computer and System Sciences"} - -MACRO {scp} {"Science of Computer Programming"} - -MACRO {sicomp} {"SIAM Journal on Computing"} - -MACRO {tocs} {"ACM Transactions on Computer Systems"} - -MACRO {tods} {"ACM Transactions on Database Systems"} - -MACRO {tog} {"ACM Transactions on Graphics"} - -MACRO {toms} {"ACM Transactions on Mathematical Software"} - -MACRO {toois} {"ACM Transactions on Office Information Systems"} - -MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} - -MACRO {tcs} {"Theoretical Computer Science"} - -READ - -FUNCTION {sortify} -{ purify$ - "l" change.case$ -} - -INTEGERS { len } - -FUNCTION {chop.word} -{ 's := - 'len := - s #1 len substring$ = - { s len #1 + global.max$ substring$ } - 's - if$ -} - - - -FUNCTION {sort.format.names} -{ 's := - #1 'nameptr := - "" - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { nameptr #2 = - { year field.or.null purify$ #-1 #4 substring$ * } - 'skip$ - if$ - nameptr #1 > - { " " * } - 'skip$ - if$ - s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := - nameptr numnames = t "others" = and - { " et~al" * } - { t sortify * } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ -} - -FUNCTION {sort.format.title} -{ 't := - "A " #2 - "An " #3 - "The " #4 t chop.word - chop.word - chop.word - sortify - #1 global.max$ substring$ -} - -FUNCTION {author.sort} -{ author empty$ - { key empty$ - { "to sort, need author or key in " cite$ * warning$ - "" } - { key sortify } - if$ - } - { author sort.format.names } - if$ -} - -FUNCTION {editor.sort} -{ editor empty$ - { key empty$ - { "to sort, need editor or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { editor sort.format.names } - if$ -} - -FUNCTION {author.editor.sort} -{ author empty$ - { "missing author in " cite$ * warning$ - editor empty$ - { key empty$ - { "to sort, need author, editor, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { editor sort.format.names } - if$ - } - { author sort.format.names } - if$ -} - -FUNCTION {author.organization.sort} -% -% added - GNP. Stack author or organization for sorting (from alpha.bst). -% Unlike alpha.bst, we need entire names, not abbreviations -% -{ author empty$ - { organization empty$ - { key empty$ - { "to sort, need author, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { organization sortify } - if$ - } - { author sort.format.names } - if$ -} - -FUNCTION {editor.organization.sort} -% -% added - GNP. Stack editor or organization for sorting (from alpha.bst). -% Unlike alpha.bst, we need entire names, not abbreviations -% -{ editor empty$ - { organization empty$ - { key empty$ - { "to sort, need editor, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { organization sortify } - if$ - } - { editor sort.format.names } - if$ -} - -FUNCTION {presort} -% -% Presort creates the bibentry's label via a call to calc.label, and then -% sorts the entries based on entry type. Chicago.bst adds support for -% including organizations as the sort key; the following is stolen from -% alpha.bst. -% -{ %calc.label sortify % recalculate bibitem label - %year field.or.null purify$ #-1 #4 substring$ * % add year - %duplicate$ warning$ - %" " - %* - type$ "book" = - type$ "inbook" = - or - 'author.editor.sort - { type$ "proceedings" = - 'editor.organization.sort - { type$ "manual" = - 'author.organization.sort - 'author.sort - if$ - } - if$ - } - if$ - #1 entry.max$ substring$ % added for newapa - 'sort.label := % added for newapa - sort.label % added for newapa - %* - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := -} - -ITERATE {presort} - -SORT % by label, year, author/editor, title - -STRINGS { last.label next.extra } - -INTEGERS { last.extra.num } - -FUNCTION {initialize.extra.label.stuff} -{ #0 int.to.chr$ 'last.label := - "" 'next.extra := - #0 'last.extra.num := -} - -FUNCTION {forward.pass} -% -% Pass through all entries, comparing current entry to last one. -% Need to concatenate year to the stack (done by calc.label) to determine -% if two entries are the same (see presort) -% -{ last.label - calc.label.orig year field.or.null purify$ #-1 #4 substring$ * % add year - #1 entry.max$ substring$ = % are they equal? - { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := - } - { "a" chr.to.int$ 'last.extra.num := - "" 'extra.label := - calc.label.orig year field.or.null purify$ #-1 #4 substring$ * % add year - #1 entry.max$ substring$ 'last.label := % assign to last.label - } - if$ -} - -FUNCTION {reverse.pass} -{ next.extra "b" = - { "a" 'extra.label := } - 'skip$ - if$ - label.year extra.label * 'sort.year := - extra.label 'next.extra := -} - -EXECUTE {initialize.extra.label.stuff} - -ITERATE {forward.pass} - -REVERSE {reverse.pass} - -FUNCTION {bib.sort.order} -{ sort.label - " " - * - year field.or.null sortify - * - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := -} - -ITERATE {bib.sort.order} - -SORT % by sort.label, year, title --- giving final bib. order. - -FUNCTION {begin.bib} - -{ preamble$ empty$ - 'skip$ - { preamble$ write$ newline$ } - if$ - "\begin{thebibliography}{}" write$ newline$ -} - - -EXECUTE {begin.bib} - -EXECUTE {init.state.consts} - -ITERATE {call.type$} - -FUNCTION {end.bib} -{ newline$ - "\end{thebibliography}" write$ newline$ -} - -EXECUTE {end.bib} - diff --git a/cloog-0.16.3/isl/doc/chicago.sty b/cloog-0.16.3/isl/doc/chicago.sty deleted file mode 100644 index 33588dba9238069c48fc92072e0d702455fcd55c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/chicago.sty +++ /dev/null @@ -1,320 +0,0 @@ -% -*- LaTeX -*- -%%% ==================================================================== -%%% @LaTeX-style-file{ -%%% author = "Glenn Paulley", -%%% version = "4", -%%% date = "31 August 1992", -%%% time = "09:42:44 199", -%%% filename = "chicago.sty", -%%% address = "Data Structuring Group -%%% Department of Computer Science -%%% University of Waterloo -%%% Waterloo, Ontario, Canada -%%% N2L 3G1", -%%% telephone = "(519) 885-1211", -%%% FAX = "(519) 885-1208", -%%% checksum = "44674 264 1050 10394", -%%% email = "gnpaulle@bluebox.uwaterloo.ca", -%%% codetable = "ISO/ASCII", -%%% keywords = "", -%%% supported = "yes", -%%% abstract = "Contains the LaTeX style command definitions -%%% for the Chicago BibTeX styles chicago.bst and -%%% chicagoa.bst. For details, see below.", -%%% docstring = "The checksum field above contains a CRC-16 -%%% checksum as the first value, followed by the -%%% equivalent of the standard UNIX wc (word -%%% count) utility output of lines, words, and -%%% characters. This is produced by Robert -%%% Solovay's checksum utility.", -%%% } -%%% ==================================================================== -% -% chicago.sty: Style file for use with bibtex style chicago.bst, for -% bibliographies formatted according to the 13th Edition of the Chicago -% Manual of Style. -% -% 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst', -% with lots of tweaking to make it look like APA style, along with tips -% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'. -% newapa.sty formed the basis of this style, chicago.sty. Author-date -% references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst -% supports annotations. -% -% Version 4 (August, 1992): -% - fixed chicago.bst and chicagoa.bst to handle long author lists in -% sorting -% - fixed chicago.bst and chicagoa.bst so that missing page numbers in -% ``article'' entries are handled correctly -% - modified chicago.sty to format entries with 2nd and subsequent lines -% indented. -% -% Citation format: (author-last-name year) -% (author-last-name and author-last-name year) -% (author-last-name et al. year) -% (author-last-name) -% author-last-name -% author-last-name (year) -% (author-last-name and author-last-name) -% (author-last-name et al.) -% (year) or (year,year) -% year or year,year -% -% Reference list ordering: alphabetical by author or whatever passes -% for author in the absence of one. -% -% This BibTeX style has support for abbreviated author lists and for -% year-only citations. This is done by having the citations -% actually look like -% -% \citeauthoryear{full-author-info}{abbrev-author-info}{year} -% -% The LaTeX style has to have the following (or similar) -% -% \let\@internalcite\cite -% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} -% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} -% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} -% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} -% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} -% -% ------------------------------------------------------------------------- -% This file implements citations for the ``chicago'' bibliography style. -% Place it in a file called chicago.sty in the TeX search path. -%(Placing it in the same directory as the LaTeX document should also work.) -% -% This file is a modification of the ``newapa'' LaTeX style, -% originally adapted by Steven Spencer from the ``apalike'' LaTeX style. -% It was originally modified by Stephen N. Spencer, with further -% modifications by Young U. Ryu. -% -% The ``chicago'' BibTeX bibliography style creates citations with labels: -% \citeauthoryear{author-info}{abbrev. author-info}{year} -% -% These labels are processed by the following LaTeX commands: -% -% \cite{key} -% which produces citations with full author list and year. -% eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985) -% \citeNP{key} -% which produces citations with full author list and year, but without -% enclosing parentheses: -% eg. Brown 1978; Jarke, Turner and Stohl 1985 -% \citeA{key} -% which produces citations with only the full author list. -% eg. (Brown; Jarke, Turner and Stohl) -% \citeANP{key} -% which produces citations with only the full author list, without -% parentheses eg. Brown; Jarke, Turner and Stohl -% \citeN{key} -% which produces citations with the full author list and year, but -% can be used as nouns in a sentence; no parentheses appear around -% the author names, but only around the year. -% eg. Shneiderman (1978) states that...... -% \citeN should only be used for a single citation. -% \shortcite{key} -% which produces citations with abbreviated author list and year. -% \shortciteNP{key} -% which produces citations with abbreviated author list and year. -% \shortciteA{key} -% which produces only the abbreviated author list. -% \shortciteANP{key} -% which produces only the abbreviated author list. -% \shortciteN{key} -% which produces the abbreviated author list and year, with only the -% year in parentheses. Use with only one citation. -% \citeyear{key} -% which produces the year information only, within parentheses. -% \citeyearNP{key} -% which produces the year information only. -% -% Abbreviated author lists use the ``et al.'' construct. -% -% `NP' means `no parentheses'. -% -% This LaTeX style file must be used with the ``chicago'' or ``chicagoa'' -% (annotated chicago style) BibTeX styles. -% -\typeout{Using Chicago Manual of Style bibliography: 31 August 1992} -% -% ------------------------------------------------------------------------- -% -% Citation macros. -% -\def\chicagoand/{ and } -\def\chicagoetal/{ et~al.} -% -\let\@internalcite\cite -% -\def\cite{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##1\ ##4}\@internalcite} -\def\citeNP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##1\ ##4}\@internalcite} -\def\citetitleN{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% - \def\citeauthortitleyear##1##2##3##4{##3\ (##1; ##4}\@citedata} -\def\citeN{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% - \def\citeauthortitleyear##1##2##3##4{##1\ (##4}\@citedata} -\def\citeA{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##1}\@internalcite} -\def\citeANP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##1}\@internalcite} -% -\def\shortcite{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##2\ ##4}\@internalcite} -\def\shortciteNP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##2\ ##4}\@internalcite} -\def\shortciteN{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% - \def\citeauthortitleyear##1##2##3##4{##2\ (##4}\@citedata} -\def\shortciteA{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##2}\@internalcite} -\def\shortciteANP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##2}\@internalcite} -% -\def\citeyear{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##4}\@citedata} -\def\citeyearNP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##4}\@citedata} - -% -% \@citedata and \@citedatax: -% -% Place commas in-between citations in the same \citeyear, \citeyearNP, -% \citeN, or \shortciteN command. -% Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list. -% -\def\@citedata{% - \@ifnextchar [{\@tempswatrue\@citedatax}% - {\@tempswafalse\@citedatax[]}% -} - -\def\@citedatax[#1]#2{% -\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% - \def\@citea{}\@cite{\@for\@citeb:=#2\do% - {\@citea\def\@citea{), }\@ifundefined% by Young - {b@\@citeb}{{\bf ?}% - \@warning{Citation `\@citeb' on page \thepage \space undefined}}% -{\csname b@\@citeb\endcsname}}}{#1}}% - -\@ifpackageloaded{hyperref}{% - \let\BRorg@citedatax\@citedatax - \def\@citedatax[#1]#2{% - \BRorg@citedatax[#1]{#2}% - \Hy@backout{#2}% - }% -}{} -\@ifpackageloaded{hyperref}{% -\def\hyperemph#1{{\em\hyperpage{#1}}}% -\def\bold#1{{\bf\hyperpage{#1}}}% -}{% -\def\hyperemph#1{{\em #1}}% -\def\bold#1{{\bf #1}}% -} - -\def\BR@@lbibitem[#1]#2#3\par{% - \BRorg@bibitem[#1]{#2}#3\hfill\penalty100\hbox{} - \newblock - \backref\hfill[{\csname br@#2\endcsname}% - ]\parskip=-10pt\penalty-10000\hbox{}\nobreak\par -}% -\def\BR@@bibitem#1#2\par{% - \BRorg@bibitem{#1}#2 - \newblock - \backref\penalty-100\hbox{}\nobreak\hfill[\hbox{\csname br@#2\endcsname}% - ]\par -} -\def\thepageorcolor{\thepage} -\def\Hy@backout#1{% - \@bsphack - \ifx\@empty\@currentlabel - \protected@write\@auxout{}{% - \string\@writefile{brf}{% - \string\backcite{#1}{{\thepageorcolor}{(document)}{Doc-Start}}% - }% - }% - \else - \protected@write\@auxout{}{% - \string\@writefile{brf}{% - \string\backcite{#1}{{\thepageorcolor}{\@currentlabel}{\@currentHref}}% - }% - }% - \fi - \@esphack -} - -% don't box citations, separate with ; and a space -% also, make the penalty between citations negative: a good place to break. -% -\def\@citex[#1]#2{% -\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% - \def\@citea{}\@cite{\@for\@citeb:=#2\do% - {\@citea\def\@citea{; }\@ifundefined% by Young - {b@\@citeb}{{\bf ?}% - \@warning{Citation `\@citeb' on page \thepage \space undefined}}% -{\csname b@\@citeb\endcsname}}}{#1}}% - -% (from apalike.sty) -% No labels in the bibliography. -% -\def\@biblabel#1{} - -% (from apalike.sty) -% Set length of hanging indentation for bibliography entries. -% -\newlength{\bibhang} -\setlength{\bibhang}{2em} - -% Indent second and subsequent lines of bibliographic entries. Stolen -% from openbib.sty: \newblock is set to {}. - -\newdimen\bibindent -\bibindent=1.5em -\@ifundefined{refname}% - {\@ifundefined{chapter}% - {\newcommand{\refname}{References}}% - {\newcommand{\refname}{Bibliography}}% - }% - {}% -\@ifundefined{chapter}% - {\def\thebibliography#1{\section*{\refname\@mkboth - {\uppercase{\refname}}{\uppercase{\refname}}} - \addcontentsline{toc}{section}{References} - \list - {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]} - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \usecounter{enumi}} - \def\newblock{} - \sloppy - \sfcode`\.=1000\relax}} - {\def\thebibliography#1{\chapter*{\refname\@mkboth - {\refname}{\refname}} - \addcontentsline{toc}{chapter}{References} - \list - {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]} - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \usecounter{enumi}} - \def\newblock{} - \sloppy - \sfcode`\.=1000\relax}} diff --git a/cloog-0.16.3/isl/doc/implementation.tex b/cloog-0.16.3/isl/doc/implementation.tex deleted file mode 100644 index d5ece80e4c8ba7876ed2769f38434b4a72848dfe..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/implementation.tex +++ /dev/null @@ -1,2036 +0,0 @@ -\section{Sets and Relations} - -\begin{definition}[Polyhedral Set] -A {\em polyhedral set}\index{polyhedral set} $S$ is a finite union of basic sets -$S = \bigcup_i S_i$, each of which can be represented using affine -constraints -$$ -S_i : \Z^n \to 2^{\Z^d} : \vec s \mapsto -S_i(\vec s) = -\{\, \vec x \in \Z^d \mid \exists \vec z \in \Z^e : -A \vec x + B \vec s + D \vec z + \vec c \geq \vec 0 \,\} -, -$$ -with $A \in \Z^{m \times d}$, -$B \in \Z^{m \times n}$, -$D \in \Z^{m \times e}$ -and $\vec c \in \Z^m$. -\end{definition} - -\begin{definition}[Parameter Domain of a Set] -Let $S \in \Z^n \to 2^{\Z^d}$ be a set. -The {\em parameter domain} of $S$ is the set -$$\pdom S \coloneqq \{\, \vec s \in \Z^n \mid S(\vec s) \ne \emptyset \,\}.$$ -\end{definition} - -\begin{definition}[Polyhedral Relation] -A {\em polyhedral relation}\index{polyhedral relation} -$R$ is a finite union of basic relations -$R = \bigcup_i R_i$ of type -$\Z^n \to 2^{\Z^{d_1+d_2}}$, -each of which can be represented using affine -constraints -$$ -R_i = \vec s \mapsto -R_i(\vec s) = -\{\, \vec x_1 \to \vec x_2 \in \Z^{d_1} \times \Z^{d_2} -\mid \exists \vec z \in \Z^e : -A_1 \vec x_1 + A_2 \vec x_2 + B \vec s + D \vec z + \vec c \geq \vec 0 \,\} -, -$$ -with $A_i \in \Z^{m \times d_i}$, -$B \in \Z^{m \times n}$, -$D \in \Z^{m \times e}$ -and $\vec c \in \Z^m$. -\end{definition} - -\begin{definition}[Parameter Domain of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The {\em parameter domain} of $R$ is the set -$$\pdom R \coloneqq \{\, \vec s \in \Z^n \mid R(\vec s) \ne \emptyset \,\}.$$ -\end{definition} - -\begin{definition}[Domain of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The {\em domain} of $R$ is the polyhedral set -$$\domain R \coloneqq \vec s \mapsto -\{\, \vec x_1 \in \Z^{d_1} \mid \exists \vec x_2 \in \Z^{d_2} : -(\vec x_1, \vec x_2) \in R(\vec s) \,\} -. -$$ -\end{definition} - -\begin{definition}[Range of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The {\em range} of $R$ is the polyhedral set -$$ -\range R \coloneqq \vec s \mapsto -\{\, \vec x_2 \in \Z^{d_2} \mid \exists \vec x_1 \in \Z^{d_1} : -(\vec x_1, \vec x_2) \in R(\vec s) \,\} -. -$$ -\end{definition} - -\begin{definition}[Composition of Relations] -Let $R \in \Z^n \to 2^{\Z^{d_1+d_2}}$ and -$S \in \Z^n \to 2^{\Z^{d_2+d_3}}$ be two relations, -then the composition of -$R$ and $S$ is defined as -$$ -S \circ R \coloneqq -\vec s \mapsto -\{\, \vec x_1 \to \vec x_3 \in \Z^{d_1} \times \Z^{d_3} -\mid \exists \vec x_2 \in \Z^{d_2} : -\vec x_1 \to \vec x_2 \in R(\vec s) \wedge -\vec x_2 \to \vec x_3 \in S(\vec s) -\,\} -. -$$ -\end{definition} - -\begin{definition}[Difference Set of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The difference set ($\Delta \, R$) of $R$ is the set -of differences between image elements and the corresponding -domain elements, -$$ -\diff R \coloneqq -\vec s \mapsto -\{\, \vec \delta \in \Z^{d} \mid \exists \vec x \to \vec y \in R : -\vec \delta = \vec y - \vec x -\,\} -$$ -\end{definition} - -\section{Simple Hull}\label{s:simple hull} - -It is sometimes useful to have a single -basic set or basic relation that contains a given set or relation. -For rational sets, the obvious choice would be to compute the -(rational) convex hull. For integer sets, the obvious choice -would be the integer hull. -However, {\tt isl} currently does not support an integer hull operation -and even if it did, it would be fairly expensive to compute. -The convex hull operation is supported, but it is also fairly -expensive to compute given only an implicit representation. - -Usually, it is not required to compute the exact integer hull, -and an overapproximation of this hull is sufficient. -The ``simple hull'' of a set is such an overapproximation -and it is defined as the (inclusion-wise) smallest basic set -that is described by constraints that are translates of -the constraints in the input set. -This means that the simple hull is relatively cheap to compute -and that the number of constraints in the simple hull is no -larger than the number of constraints in the input. -\begin{definition}[Simple Hull of a Set] -The {\em simple hull} of a set -$S = \bigcup_{1 \le i \le v} S_i$, with -$$ -S : \Z^n \to 2^{\Z^d} : \vec s \mapsto -S(\vec s) = -\left\{\, \vec x \in \Z^d \mid \exists \vec z \in \Z^e : -\bigvee_{1 \le i \le v} -A_i \vec x + B_i \vec s + D_i \vec z + \vec c_i \geq \vec 0 \,\right\} -$$ -is the set -$$ -H : \Z^n \to 2^{\Z^d} : \vec s \mapsto -S(\vec s) = -\left\{\, \vec x \in \Z^d \mid \exists \vec z \in \Z^e : -\bigwedge_{1 \le i \le v} -A_i \vec x + B_i \vec s + D_i \vec z + \vec c_i + \vec K_i \geq \vec 0 -\,\right\} -, -$$ -with $\vec K_i$ the (component-wise) smallest non-negative integer vectors -such that $S \subseteq H$. -\end{definition} -The $\vec K_i$ can be obtained by solving a number of -LP problems, one for each element of each $\vec K_i$. -If any LP problem is unbounded, then the corresponding constraint -is dropped. - -\section{Parametric Integer Programming} - -\subsection{Introduction}\label{s:intro} - -Parametric integer programming \shortcite{Feautrier88parametric} -is used to solve many problems within the context of the polyhedral model. -Here, we are mainly interested in dependence analysis \shortcite{Fea91} -and in computing a unique representation for existentially quantified -variables. The latter operation has been used for counting elements -in sets involving such variables -\shortcite{BouletRe98,Verdoolaege2005experiences} and lies at the core -of the internal representation of {\tt isl}. - -Parametric integer programming was first implemented in \texttt{PipLib}. -An alternative method for parametric integer programming -was later implemented in {\tt barvinok} \cite{barvinok-0.22}. -This method is not based on Feautrier's algorithm, but on rational -generating functions \cite{Woods2003short} and was inspired by the -``digging'' technique of \shortciteN{DeLoera2004Three} for solving -non-parametric integer programming problems. - -In the following sections, we briefly recall the dual simplex -method combined with Gomory cuts and describe some extensions -and optimizations. The main algorithm is applied to a matrix -data structure known as a tableau. In case of parametric problems, -there are two tableaus, one for the main problem and one for -the constraints on the parameters, known as the context tableau. -The handling of the context tableau is described in \autoref{s:context}. - -\subsection{The Dual Simplex Method} - -Tableaus can be represented in several slightly different ways. -In {\tt isl}, the dual simplex method uses the same representation -as that used by its incremental LP solver based on the \emph{primal} -simplex method. The implementation of this LP solver is based -on that of {\tt Simplify} \shortcite{Detlefs2005simplify}, which, in turn, -was derived from the work of \shortciteN{Nelson1980phd}. -In the original \shortcite{Nelson1980phd}, the tableau was implemented -as a sparse matrix, but neither {\tt Simplify} nor the current -implementation of {\tt isl} does so. - -Given some affine constraints on the variables, -$A \vec x + \vec b \ge \vec 0$, the tableau represents the relationship -between the variables $\vec x$ and non-negative variables -$\vec y = A \vec x + \vec b$ corresponding to the constraints. -The initial tableau contains $\begin{pmatrix} -\vec b & A -\end{pmatrix}$ and expresses the constraints $\vec y$ in the rows in terms -of the variables $\vec x$ in the columns. The main operation defined -on a tableau exchanges a column and a row variable and is called a pivot. -During this process, some coefficients may become rational. -As in the \texttt{PipLib} implementation, -{\tt isl} maintains a shared denominator per row. -The sample value of a tableau is one where each column variable is assigned -zero and each row variable is assigned the constant term of the row. -This sample value represents a valid solution if each constraint variable -is assigned a non-negative value, i.e., if the constant terms of -rows corresponding to constraints are all non-negative. - -The dual simplex method starts from an initial sample value that -may be invalid, but that is known to be (lexicographically) no -greater than any solution, and gradually increments this sample value -through pivoting until a valid solution is obtained. -In particular, each pivot exchanges a row variable -$r = -n + \sum_i a_i \, c_i$ with negative -sample value $-n$ with a column variable $c_j$ -such that $a_j > 0$. Since $c_j = (n + r - \sum_{i\ne j} a_i \, c_i)/a_j$, -the new row variable will have a positive sample value $n$. -If no such column can be found, then the problem is infeasible. -By always choosing the column that leads to the (lexicographically) -smallest increment in the variables $\vec x$, -the first solution found is guaranteed to be the (lexicographically) -minimal solution \cite{Feautrier88parametric}. -In order to be able to determine the smallest increment, the tableau -is (implicitly) extended with extra rows defining the original -variables in terms of the column variables. -If we assume that all variables are non-negative, then we know -that the zero vector is no greater than the minimal solution and -then the initial extended tableau looks as follows. -$$ -\begin{tikzpicture} -\matrix (m) [matrix of math nodes] -{ -& {} & 1 & \vec c \\ -\vec x && |(top)| \vec 0 & I \\ -\vec r && \vec b & |(bottom)|A \\ -}; -\begin{pgfonlayer}{background} -\node (core) [inner sep=0pt,fill=black!20,right delimiter=),left delimiter=(,fit=(top)(bottom)] {}; -\end{pgfonlayer} -\end{tikzpicture} -$$ -Each column in this extended tableau is lexicographically positive -and will remain so because of the column choice explained above. -It is then clear that the value of $\vec x$ will increase in each step. -Note that there is no need to store the extra rows explicitly. -If a given $x_i$ is a column variable, then the corresponding row -is the unit vector $e_i$. If, on the other hand, it is a row variable, -then the row already appears somewhere else in the tableau. - -In case of parametric problems, the sign of the constant term -may depend on the parameters. Each time the constant term of a constraint row -changes, we therefore need to check whether the new term can attain -negative and/or positive values over the current set of possible -parameter values, i.e., the context. -If all these terms can only attain non-negative values, the current -state of the tableau represents a solution. If one of the terms -can only attain non-positive values and is not identically zero, -the corresponding row can be pivoted. -Otherwise, we pick one of the terms that can attain both positive -and negative values and split the context into a part where -it only attains non-negative values and a part where it only attains -negative values. - -\subsection{Gomory Cuts} - -The solution found by the dual simplex method may have -non-integral coordinates. If so, some rational solutions -(including the current sample value), can be cut off by -applying a (parametric) Gomory cut. -Let $r = b(\vec p) + \sp {\vec a} {\vec c}$ be the row -corresponding to the first non-integral coordinate of $\vec x$, -with $b(\vec p)$ the constant term, an affine expression in the -parameters $\vec p$, i.e., $b(\vec p) = \sp {\vec f} {\vec p} + g$. -Note that only row variables can attain -non-integral values as the sample value of the column variables is zero. -Consider the expression -$b(\vec p) - \ceil{b(\vec p)} + \sp {\fract{\vec a}} {\vec c}$, -with $\ceil\cdot$ the ceiling function and $\fract\cdot$ the -fractional part. This expression is negative at the sample value -since $\vec c = \vec 0$ and $r = b(\vec p)$ is fractional, i.e., -$\ceil{b(\vec p)} > b(\vec p)$. On the other hand, for each integral -value of $r$ and $\vec c \ge 0$, the expression is non-negative -because $b(\vec p) - \ceil{b(\vec p)} > -1$. -Imposing this expression to be non-negative therefore does not -invalidate any integral solutions, while it does cut away the current -fractional sample value. To be able to formulate this constraint, -a new variable $q = \floor{-b(\vec p)} = - \ceil{b(\vec p)}$ is added -to the context. This integral variable is uniquely defined by the constraints -$0 \le -d \, b(\vec p) - d \, q \le d - 1$, with $d$ the common -denominator of $\vec f$ and $g$. In practice, the variable -$q' = \floor{\sp {\fract{-f}} {\vec p} + \fract{-g}}$ is used instead -and the coefficients of the new constraint are adjusted accordingly. -The sign of the constant term of this new constraint need not be determined -as it is non-positive by construction. -When several of these extra context variables are added, it is important -to avoid adding duplicates. -Recent versions of {\tt PipLib} also check for such duplicates. - -\subsection{Negative Unknowns and Maximization} - -There are two places in the above algorithm where the unknowns $\vec x$ -are assumed to be non-negative: the initial tableau starts from -sample value $\vec x = \vec 0$ and $\vec c$ is assumed to be non-negative -during the construction of Gomory cuts. -To deal with negative unknowns, \shortciteN[Appendix A.2]{Fea91} -proposed to use a ``big parameter'', say $M$, that is taken to be -an arbitrarily large positive number. Instead of looking for the -lexicographically minimal value of $\vec x$, we search instead -for the lexicographically minimal value of $\vec x' = \vec M + \vec x$. -The sample value $\vec x' = \vec 0$ of the initial tableau then -corresponds to $\vec x = -\vec M$, which is clearly not greater than -any potential solution. The sign of the constant term of a row -is determined lexicographically, with the coefficient of $M$ considered -first. That is, if the coefficient of $M$ is not zero, then its sign -is the sign of the entire term. Otherwise, the sign is determined -by the remaining affine expression in the parameters. -If the original problem has a bounded optimum, then the final sample -value will be of the form $\vec M + \vec v$ and the optimal value -of the original problem is then $\vec v$. -Maximization problems can be handled in a similar way by computing -the minimum of $\vec M - \vec x$. - -When the optimum is unbounded, the optimal value computed for -the original problem will involve the big parameter. -In the original implementation of {\tt PipLib}, the big parameter could -even appear in some of the extra variables $\vec q$ created during -the application of a Gomory cut. The final result could then contain -implicit conditions on the big parameter through conditions on such -$\vec q$ variables. This problem was resolved in later versions -of {\tt PipLib} by taking $M$ to be divisible by any positive number. -The big parameter can then never appear in any $\vec q$ because -$\fract {\alpha M } = 0$. It should be noted, though, that an unbounded -problem usually (but not always) -indicates an incorrect formulation of the problem. - -The original version of {\tt PipLib} required the user to ``manually'' -add a big parameter, perform the reformulation and interpret the result -\shortcite{Feautrier02}. Recent versions allow the user to simply -specify that the unknowns may be negative or that the maximum should -be computed and then these transformations are performed internally. -Although there are some application, e.g., -that of \shortciteN{Feautrier92multi}, -where it is useful to have explicit control over the big parameter, -negative unknowns and maximization are by far the most common applications -of the big parameter and we believe that the user should not be bothered -with such implementation issues. -The current version of {\tt isl} therefore does not -provide any interface for specifying big parameters. Instead, the user -can specify whether a maximum needs to be computed and no assumptions -are made on the sign of the unknowns. Instead, the sign of the unknowns -is checked internally and a big parameter is automatically introduced when -needed. For compatibility with {\tt PipLib}, the {\tt isl\_pip} tool -does explicitly add non-negativity constraints on the unknowns unless -the \verb+Urs_unknowns+ option is specified. -Currently, there is also no way in {\tt isl} of expressing a big -parameter in the output. Even though -{\tt isl} makes the same divisibility assumption on the big parameter -as recent versions of {\tt PipLib}, it will therefore eventually -produce an error if the problem turns out to be unbounded. - -\subsection{Preprocessing} - -In this section, we describe some transformations that are -or can be applied in advance to reduce the running time -of the actual dual simplex method with Gomory cuts. - -\subsubsection{Feasibility Check and Detection of Equalities} - -Experience with the original {\tt PipLib} has shown that Gomory cuts -do not perform very well on problems that are (non-obviously) empty, -i.e., problems with rational solutions, but no integer solutions. -In {\tt isl}, we therefore first perform a feasibility check on -the original problem considered as a non-parametric problem -over the combined space of unknowns and parameters. -In fact, we do not simply check the feasibility, but we also -check for implicit equalities among the integer points by computing -the integer affine hull. The algorithm used is the same as that -described in \autoref{s:GBR} below. -Computing the affine hull is fairly expensive, but it can -bring huge benefits if any equalities can be found or if the problem -turns out to be empty. - -\subsubsection{Constraint Simplification} - -If the coefficients of the unknown and parameters in a constraint -have a common factor, then this factor should be removed, possibly -rounding down the constant term. For example, the constraint -$2 x - 5 \ge 0$ should be simplified to $x - 3 \ge 0$. -{\tt isl} performs such simplifications on all sets and relations. -Recent versions of {\tt PipLib} also perform this simplification -on the input. - -\subsubsection{Exploiting Equalities}\label{s:equalities} - -If there are any (explicit) equalities in the input description, -{\tt PipLib} converts each into a pair of inequalities. -It is also possible to write $r$ equalities as $r+1$ inequalities -\shortcite{Feautrier02}, but it is even better to \emph{exploit} the -equalities to reduce the dimensionality of the problem. -Given an equality involving at least one unknown, we pivot -the row corresponding to the equality with the column corresponding -to the last unknown with non-zero coefficient. The new column variable -can then be removed completely because it is identically zero, -thereby reducing the dimensionality of the problem by one. -The last unknown is chosen to ensure that the columns of the initial -tableau remain lexicographically positive. In particular, if -the equality is of the form $b + \sum_{i \le j} a_i \, x_i = 0$ with -$a_j \ne 0$, then the (implicit) top rows of the initial tableau -are changed as follows -$$ -\begin{tikzpicture} -\matrix [matrix of math nodes] -{ - & {} & |(top)| 0 & I_1 & |(j)| & \\ -j && 0 & & 1 & \\ - && 0 & & & |(bottom)|I_2 \\ -}; -\node[overlay,above=2mm of j,anchor=south]{j}; -\begin{pgfonlayer}{background} -\node (m) [inner sep=0pt,fill=black!20,right delimiter=),left delimiter=(,fit=(top)(bottom)] {}; -\end{pgfonlayer} -\begin{scope}[xshift=4cm] -\matrix [matrix of math nodes] -{ - & {} & |(top)| 0 & I_1 & \\ -j && |(left)| -b/a_j & -a_i/a_j & \\ - && 0 & & |(bottom)|I_2 \\ -}; -\begin{pgfonlayer}{background} -\node (m2) [inner sep=0pt,fill=black!20,right delimiter=),left delimiter=(,fit=(top)(bottom)(left)] {}; -\end{pgfonlayer} -\end{scope} - \draw [shorten >=7mm,-to,thick,decorate, - decoration={snake,amplitude=.4mm,segment length=2mm, - pre=moveto,pre length=5mm,post length=8mm}] - (m) -- (m2); -\end{tikzpicture} -$$ -Currently, {\tt isl} also eliminates equalities involving only parameters -in a similar way, provided at least one of the coefficients is equal to one. -The application of parameter compression (see below) -would obviate the need for removing parametric equalities. - -\subsubsection{Offline Symmetry Detection}\label{s:offline} - -Some problems, notably those of \shortciteN{Bygde2010licentiate}, -have a collection of constraints, say -$b_i(\vec p) + \sp {\vec a} {\vec x} \ge 0$, -that only differ in their (parametric) constant terms. -These constant terms will be non-negative on different parts -of the context and this context may have to be split for each -of the constraints. In the worst case, the basic algorithm may -have to consider all possible orderings of the constant terms. -Instead, {\tt isl} introduces a new parameter, say $u$, and -replaces the collection of constraints by the single -constraint $u + \sp {\vec a} {\vec x} \ge 0$ along with -context constraints $u \le b_i(\vec p)$. -Any solution to the new system is also a solution -to the original system since -$\sp {\vec a} {\vec x} \ge -u \ge -b_i(\vec p)$. -Conversely, $m = \min_i b_i(\vec p)$ satisfies the constraints -on $u$ and therefore extends a solution to the new system. -It can also be plugged into a new solution. -See \autoref{s:post} for how this substitution is currently performed -in {\tt isl}. -The method described in this section can only detect symmetries -that are explicitly available in the input. -See \autoref{s:online} for the detection -and exploitation of symmetries that appear during the course of -the dual simplex method. - -\subsubsection{Parameter Compression}\label{s:compression} - -It may in some cases be apparent from the equalities in the problem -description that there can only be a solution for a sublattice -of the parameters. In such cases ``parameter compression'' -\shortcite{Meister2004PhD,Meister2008} can be used to replace -the parameters by alternative ``dense'' parameters. -For example, if there is a constraint $2x = n$, then the system -will only have solutions for even values of $n$ and $n$ can be replaced -by $2n'$. Similarly, the parameters $n$ and $m$ in a system with -the constraint $2n = 3m$ can be replaced by a single parameter $n'$ -with $n=3n'$ and $m=2n'$. -It is also possible to perform a similar compression on the unknowns, -but it would be more complicated as the compression would have to -preserve the lexicographical order. Moreover, due to our handling -of equalities described above there should be -no need for such variable compression. -Although parameter compression has been implemented in {\tt isl}, -it is currently not yet used during parametric integer programming. - -\subsection{Postprocessing}\label{s:post} - -The output of {\tt PipLib} is a quast (quasi-affine selection tree). -Each internal node in this tree corresponds to a split of the context -based on a parametric constant term in the main tableau with indeterminate -sign. Each of these nodes may introduce extra variables in the context -corresponding to integer divisions. Each leaf of the tree prescribes -the solution in that part of the context that satisfies all the conditions -on the path leading to the leaf. -Such a quast is a very economical way of representing the solution, but -it would not be suitable as the (only) internal representation of -sets and relations in {\tt isl}. Instead, {\tt isl} represents -the constraints of a set or relation in disjunctive normal form. -The result of a parametric integer programming problem is then also -converted to this internal representation. Unfortunately, the conversion -to disjunctive normal form can lead to an explosion of the size -of the representation. -In some cases, this overhead would have to be paid anyway in subsequent -operations, but in other cases, especially for outside users that just -want to solve parametric integer programming problems, we would like -to avoid this overhead in future. That is, we are planning on introducing -quasts or a related representation as one of several possible internal -representations and on allowing the output of {\tt isl\_pip} to optionally -be printed as a quast. - -Currently, {\tt isl} also does not have an internal representation -for expressions such as $\min_i b_i(\vec p)$ from the offline -symmetry detection of \autoref{s:offline}. -Assume that one of these expressions has $n$ bounds $b_i(\vec p)$. -If the expression -does not appear in the affine expression describing the solution, -but only in the constraints, and if moreover, the expression -only appears with a positive coefficient, i.e., -$\min_i b_i(\vec p) \ge f_j(\vec p)$, then each of these constraints -can simply be reduplicated $n$ times, once for each of the bounds. -Otherwise, a conversion to disjunctive normal form -leads to $n$ cases, each described as $u = b_i(\vec p)$ with constraints -$b_i(\vec p) \le b_j(\vec p)$ for $j > i$ -and -$b_i(\vec p) < b_j(\vec p)$ for $j < i$. -Note that even though this conversion leads to a size increase -by a factor of $n$, not detecting the symmetry could lead to -an increase by a factor of $n!$ if all possible orderings end up being -considered. - -\subsection{Context Tableau}\label{s:context} - -The main operation that a context tableau needs to provide is a test -on the sign of an affine expression over the elements of the context. -This sign can be determined by solving two integer linear feasibility -problems, one with a constraint added to the context that enforces -the expression to be non-negative and one where the expression is -negative. As already mentioned by \shortciteN{Feautrier88parametric}, -any integer linear feasibility solver could be used, but the {\tt PipLib} -implementation uses a recursive call to the dual simplex with Gomory -cuts algorithm to determine the feasibility of a context. -In {\tt isl}, two ways of handling the context have been implemented, -one that performs the recursive call and one, used by default, that -uses generalized basis reduction. -We start with some optimizations that are shared between the two -implementations and then discuss additional details of each of them. - -\subsubsection{Maintaining Witnesses}\label{s:witness} - -A common feature of both integer linear feasibility solvers is that -they will not only say whether a set is empty or not, but if the set -is non-empty, they will also provide a \emph{witness} for this result, -i.e., a point that belongs to the set. By maintaining a list of such -witnesses, we can avoid many feasibility tests during the determination -of the signs of affine expressions. In particular, if the expression -evaluates to a positive number on some of these points and to a negative -number on some others, then no feasibility test needs to be performed. -If all the evaluations are non-negative, we only need to check for the -possibility of a negative value and similarly in case of all -non-positive evaluations. Finally, in the rare case that all points -evaluate to zero or at the start, when no points have been collected yet, -one or two feasibility tests need to be performed depending on the result -of the first test. - -When a new constraint is added to the context, the points that -violate the constraint are temporarily removed. They are reconsidered -when we backtrack over the addition of the constraint, as they will -satisfy the negation of the constraint. It is only when we backtrack -over the addition of the points that they are finally removed completely. -When an extra integer division is added to the context, -the new coordinates of the -witnesses can easily be computed by evaluating the integer division. -The idea of keeping track of witnesses was first used in {\tt barvinok}. - -\subsubsection{Choice of Constant Term on which to Split} - -Recall that if there are no rows with a non-positive constant term, -but there are rows with an indeterminate sign, then the context -needs to be split along the constant term of one of these rows. -If there is more than one such row, then we need to choose which row -to split on first. {\tt PipLib} uses a heuristic based on the (absolute) -sizes of the coefficients. In particular, it takes the largest coefficient -of each row and then selects the row where this largest coefficient is smaller -than those of the other rows. - -In {\tt isl}, we take that row for which non-negativity of its constant -term implies non-negativity of as many of the constant terms of the other -rows as possible. The intuition behind this heuristic is that on the -positive side, we will have fewer negative and indeterminate signs, -while on the negative side, we need to perform a pivot, which may -affect any number of rows meaning that the effect on the signs -is difficult to predict. This heuristic is of course much more -expensive to evaluate than the heuristic used by {\tt PipLib}. -More extensive tests are needed to evaluate whether the heuristic is worthwhile. - -\subsubsection{Dual Simplex + Gomory Cuts} - -When a new constraint is added to the context, the first steps -of the dual simplex method applied to this new context will be the same -or at least very similar to those taken on the original context, i.e., -before the constraint was added. In {\tt isl}, we therefore apply -the dual simplex method incrementally on the context and backtrack -to a previous state when a constraint is removed again. -An initial implementation that was never made public would also -keep the Gomory cuts, but the current implementation backtracks -to before the point where Gomory cuts are added before adding -an extra constraint to the context. -Keeping the Gomory cuts has the advantage that the sample value -is always an integer point and that this point may also satisfy -the new constraint. However, due to the technique of maintaining -witnesses explained above, -we would not perform a feasibility test in such cases and then -the previously added cuts may be redundant, possibly resulting -in an accumulation of a large number of cuts. - -If the parameters may be negative, then the same big parameter trick -used in the main tableau is applied to the context. This big parameter -is of course unrelated to the big parameter from the main tableau. -Note that it is not a requirement for this parameter to be ``big'', -but it does allow for some code reuse in {\tt isl}. -In {\tt PipLib}, the extra parameter is not ``big'', but this may be because -the big parameter of the main tableau also appears -in the context tableau. - -Finally, it was reported by \shortciteN{Galea2009personal}, who -worked on a parametric integer programming implementation -in {\tt PPL} \shortcite{PPL}, -that it is beneficial to add cuts for \emph{all} rational coordinates -in the context tableau. Based on this report, -the initial {\tt isl} implementation was adapted accordingly. - -\subsubsection{Generalized Basis Reduction}\label{s:GBR} - -The default algorithm used in {\tt isl} for feasibility checking -is generalized basis reduction \shortcite{Cook1991implementation}. -This algorithm is also used in the {\tt barvinok} implementation. -The algorithm is fairly robust, but it has some overhead. -We therefore try to avoid calling the algorithm in easy cases. -In particular, we incrementally keep track of points for which -the entire unit hypercube positioned at that point lies in the context. -This set is described by translates of the constraints of the context -and if (rationally) non-empty, any rational point -in the set can be rounded up to yield an integer point in the context. - -A restriction of the algorithm is that it only works on bounded sets. -The affine hull of the recession cone therefore needs to be projected -out first. As soon as the algorithm is invoked, we then also -incrementally keep track of this recession cone. The reduced basis -found by one call of the algorithm is also reused as initial basis -for the next call. - -Some problems lead to the -introduction of many integer divisions. Within a given context, -some of these integer divisions may be equal to each other, even -if the expressions are not identical, or they may be equal to some -affine combination of other variables. -To detect such cases, we compute the affine hull of the context -each time a new integer division is added. The algorithm used -for computing this affine hull is that of \shortciteN{Karr1976affine}, -while the points used in this algorithm are obtained by performing -integer feasibility checks on that part of the context outside -the current approximation of the affine hull. -The list of witnesses is used to construct an initial approximation -of the hull, while any extra points found during the construction -of the hull is added to this list. -Any equality found in this way that expresses an integer division -as an \emph{integer} affine combination of other variables is -propagated to the main tableau, where it is used to eliminate that -integer division. - -\subsection{Experiments} - -\autoref{t:comparison} compares the execution times of {\tt isl} -(with both types of context tableau) -on some more difficult instances to those of other tools, -run on an Intel Xeon W3520 @ 2.66GHz. -Easier problems such as the -test cases distributed with {\tt Pip\-Lib} can be solved so quickly -that we would only be measuring overhead such as input/output and conversions -and not the running time of the actual algorithm. -We compare the following versions: -{\tt piplib-1.4.0-5-g0132fd9}, -{\tt barvinok-0.32.1-73-gc5d7751}, -{\tt isl-0.05.1-82-g3a37260} -and {\tt PPL} version 0.11.2. - -The first test case is the following dependence analysis problem -originating from the Phideo project \shortcite{Verhaegh1995PhD} -that was communicated to us by Bart Kienhuis: -\begin{lstlisting}[flexiblecolumns=true,breaklines=true]{} -lexmax { [j1,j2] -> [i1,i2,i3,i4,i5,i6,i7,i8,i9,i10] : 1 <= i1,j1 <= 8 and 1 <= i2,i3,i4,i5,i6,i7,i8,i9,i10 <= 2 and 1 <= j2 <= 128 and i1-1 = j1-1 and i2-1+2*i3-2+4*i4-4+8*i5-8+16*i6-16+32*i7-32+64*i8-64+128*i9-128+256*i10-256=3*j2-3+66 }; -\end{lstlisting} -This problem was the main inspiration -for some of the optimizations in \autoref{s:GBR}. -The second group of test cases are projections used during counting. -The first nine of these come from \shortciteN{Seghir2006minimizing}. -The remaining two come from \shortciteN{Verdoolaege2005experiences} and -were used to drive the first, Gomory cuts based, implementation -in {\tt isl}. -The third and final group of test cases are borrowed from -\shortciteN{Bygde2010licentiate} and inspired the offline symmetry detection -of \autoref{s:offline}. Without symmetry detection, the running times -are 11s and 5.9s. -All running times of {\tt barvinok} and {\tt isl} include a conversion -to disjunctive normal form. Without this conversion, the final two -cases can be solved in 0.07s and 0.21s. -The {\tt PipLib} implementation has some fixed limits and will -sometimes report the problem to be too complex (TC), while on some other -problems it will run out of memory (OOM). -The {\tt barvinok} implementation does not support problems -with a non-trivial lineality space (line) nor maximization problems (max). -The Gomory cuts based {\tt isl} implementation was terminated after 1000 -minutes on the first problem. The gbr version introduces some -overhead on some of the easier problems, but is overall the clear winner. - -\begin{table} -\begin{center} -\begin{tabular}{lrrrrr} - & {\tt PipLib} & {\tt barvinok} & {\tt isl} cut & {\tt isl} gbr & {\tt PPL} \\ -\hline -\hline -% bart.pip -Phideo & TC & 793m & $>$999m & 2.7s & 372m \\ -\hline -e1 & 0.33s & 3.5s & 0.08s & 0.11s & 0.18s \\ -e3 & 0.14s & 0.13s & 0.10s & 0.10s & 0.17s \\ -e4 & 0.24s & 9.1s & 0.09s & 0.11s & 0.70s \\ -e5 & 0.12s & 6.0s & 0.06s & 0.14s & 0.17s \\ -e6 & 0.10s & 6.8s & 0.17s & 0.08s & 0.21s \\ -e7 & 0.03s & 0.27s & 0.04s & 0.04s & 0.03s \\ -e8 & 0.03s & 0.18s & 0.03s & 0.04s & 0.01s \\ -e9 & OOM & 70m & 2.6s & 0.94s & 22s \\ -vd & 0.04s & 0.10s & 0.03s & 0.03s & 0.03s \\ -bouleti & 0.25s & line & 0.06s & 0.06s & 0.15s \\ -difficult & OOM & 1.3s & 1.7s & 0.33s & 1.4s \\ -\hline -cnt/sum & TC & max & 2.2s & 2.2s & OOM \\ -jcomplex & TC & max & 3.7s & 3.9s & OOM \\ -\end{tabular} -\caption{Comparison of Execution Times} -\label{t:comparison} -\end{center} -\end{table} - -\subsection{Online Symmetry Detection}\label{s:online} - -Manual experiments on small instances of the problems of -\shortciteN{Bygde2010licentiate} and an analysis of the results -by the approximate MPA method developed by \shortciteN{Bygde2010licentiate} -have revealed that these problems contain many more symmetries -than can be detected using the offline method of \autoref{s:offline}. -In this section, we present an online detection mechanism that has -not been implemented yet, but that has shown promising results -in manual applications. - -Let us first consider what happens when we do not perform offline -symmetry detection. At some point, one of the -$b_i(\vec p) + \sp {\vec a} {\vec x} \ge 0$ constraints, -say the $j$th constraint, appears as a column -variable, say $c_1$, while the other constraints are represented -as rows of the form $b_i(\vec p) - b_j(\vec p) + c$. -The context is then split according to the relative order of -$b_j(\vec p)$ and one of the remaining $b_i(\vec p)$. -The offline method avoids this split by replacing all $b_i(\vec p)$ -by a single newly introduced parameter that represents the minimum -of these $b_i(\vec p)$. -In the online method the split is similarly avoided by the introduction -of a new parameter. In particular, a new parameter is introduced -that represents -$\left| b_j(\vec p) - b_i(\vec p) \right|_+ = -\max(b_j(\vec p) - b_i(\vec p), 0)$. - -In general, let $r = b(\vec p) + \sp {\vec a} {\vec c}$ be a row -of the tableau such that the sign of $b(\vec p)$ is indeterminate -and such that exactly one of the elements of $\vec a$ is a $1$, -while all remaining elements are non-positive. -That is, $r = b(\vec p) + c_j - f$ with $f = -\sum_{i\ne j} a_i c_i \ge 0$. -We introduce a new parameter $t$ with -context constraints $t \ge -b(\vec p)$ and $t \ge 0$ and replace -the column variable $c_j$ by $c' + t$. The row $r$ is now equal -to $b(\vec p) + t + c' - f$. The constant term of this row is always -non-negative because any negative value of $b(\vec p)$ is compensated -by $t \ge -b(\vec p)$ while and non-negative value remains non-negative -because $t \ge 0$. - -We need to show that this transformation does not eliminate any valid -solutions and that it does not introduce any spurious solutions. -Given a valid solution for the original problem, we need to find -a non-negative value of $c'$ satisfying the constraints. -If $b(\vec p) \ge 0$, we can take $t = 0$ so that -$c' = c_j - t = c_j \ge 0$. -If $b(\vec p) < 0$, we can take $t = -b(\vec p)$. -Since $r = b(\vec p) + c_j - f \ge 0$ and $f \ge 0$, we have -$c' = c_j + b(\vec p) \ge 0$. -Note that these choices amount to plugging in -$t = \left|-b(\vec p)\right|_+ = \max(-b(\vec p), 0)$. -Conversely, given a solution to the new problem, we need to find -a non-negative value of $c_j$, but this is easy since $c_j = c' + t$ -and both of these are non-negative. - -Plugging in $t = \max(-b(\vec p), 0)$ can be performed as in -\autoref{s:post}, but, as in the case of offline symmetry detection, -it may be better to provide a direct representation for such -expressions in the internal representation of sets and relations -or at least in a quast-like output format. - -\section{Coalescing}\label{s:coalescing} - -See \shortciteN{Verdoolaege2009isl}, for now. -More details will be added later. - -\section{Transitive Closure} - -\subsection{Introduction} - -\begin{definition}[Power of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation and -$k \in \Z_{\ge 1}$ -a positive number, then power $k$ of relation $R$ is defined as -\begin{equation} -\label{eq:transitive:power} -R^k \coloneqq -\begin{cases} -R & \text{if $k = 1$} -\\ -R \circ R^{k-1} & \text{if $k \ge 2$} -. -\end{cases} -\end{equation} -\end{definition} - -\begin{definition}[Transitive Closure of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation, -then the transitive closure $R^+$ of $R$ is the union -of all positive powers of $R$, -$$ -R^+ \coloneqq \bigcup_{k \ge 1} R^k -. -$$ -\end{definition} -Alternatively, the transitive closure may be defined -inductively as -\begin{equation} -\label{eq:transitive:inductive} -R^+ \coloneqq R \cup \left(R \circ R^+\right) -. -\end{equation} - -Since the transitive closure of a polyhedral relation -may no longer be a polyhedral relation \shortcite{Kelly1996closure}, -we can, in the general case, only compute an approximation -of the transitive closure. -Whereas \shortciteN{Kelly1996closure} compute underapproximations, -we, like \shortciteN{Beletska2009}, compute overapproximations. -That is, given a relation $R$, we will compute a relation $T$ -such that $R^+ \subseteq T$. Of course, we want this approximation -to be as close as possible to the actual transitive closure -$R^+$ and we want to detect the cases where the approximation is -exact, i.e., where $T = R^+$. - -For computing an approximation of the transitive closure of $R$, -we follow the same general strategy as \shortciteN{Beletska2009} -and first compute an approximation of $R^k$ for $k \ge 1$ and then project -out the parameter $k$ from the resulting relation. - -\begin{example} -As a trivial example, consider the relation -$R = \{\, x \to x + 1 \,\}$. The $k$th power of this map -for arbitrary $k$ is -$$ -R^k = k \mapsto \{\, x \to x + k \mid k \ge 1 \,\} -. -$$ -The transitive closure is then -$$ -\begin{aligned} -R^+ & = \{\, x \to y \mid \exists k \in \Z_{\ge 1} : y = x + k \,\} -\\ -& = \{\, x \to y \mid y \ge x + 1 \,\} -. -\end{aligned} -$$ -\end{example} - -\subsection{Computing an Approximation of $R^k$} -\label{s:power} - -There are some special cases where the computation of $R^k$ is very easy. -One such case is that where $R$ does not compose with itself, -i.e., $R \circ R = \emptyset$ or $\domain R \cap \range R = \emptyset$. -In this case, $R^k$ is only non-empty for $k=1$ where it is equal -to $R$ itself. - -In general, it is impossible to construct a closed form -of $R^k$ as a polyhedral relation. -We will therefore need to make some approximations. -As a first approximations, we will consider each of the basic -relations in $R$ as simply adding one or more offsets to a domain element -to arrive at an image element and ignore the fact that some of these -offsets may only be applied to some of the domain elements. -That is, we will only consider the difference set $\Delta\,R$ of the relation. -In particular, we will first construct a collection $P$ of paths -that move through -a total of $k$ offsets and then intersect domain and range of this -collection with those of $R$. -That is, -\begin{equation} -\label{eq:transitive:approx} -K = P \cap \left(\domain R \to \range R\right) -, -\end{equation} -with -\begin{equation} -\label{eq:transitive:path} -P = \vec s \mapsto \{\, \vec x \to \vec y \mid -\exists k_i \in \Z_{\ge 0}, \vec\delta_i \in k_i \, \Delta_i(\vec s) : -\vec y = \vec x + \sum_i \vec\delta_i -\wedge -\sum_i k_i = k > 0 -\,\} -\end{equation} -and with $\Delta_i$ the basic sets that compose -the difference set $\Delta\,R$. -Note that the number of basic sets $\Delta_i$ need not be -the same as the number of basic relations in $R$. -Also note that since addition is commutative, it does not -matter in which order we add the offsets and so we are allowed -to group them as we did in \eqref{eq:transitive:path}. - -If all the $\Delta_i$s are singleton sets -$\Delta_i = \{\, \vec \delta_i \,\}$ with $\vec \delta_i \in \Z^d$, -then \eqref{eq:transitive:path} simplifies to -\begin{equation} -\label{eq:transitive:singleton} -P = \{\, \vec x \to \vec y \mid -\exists k_i \in \Z_{\ge 0} : -\vec y = \vec x + \sum_i k_i \, \vec \delta_i -\wedge -\sum_i k_i = k > 0 -\,\} -\end{equation} -and then the approximation computed in \eqref{eq:transitive:approx} -is essentially the same as that of \shortciteN{Beletska2009}. -If some of the $\Delta_i$s are not singleton sets or if -some of $\vec \delta_i$s are parametric, then we need -to resort to further approximations. - -To ease both the exposition and the implementation, we will for -the remainder of this section work with extended offsets -$\Delta_i' = \Delta_i \times \{\, 1 \,\}$. -That is, each offset is extended with an extra coordinate that is -set equal to one. The paths constructed by summing such extended -offsets have the length encoded as the difference of their -final coordinates. The path $P'$ can then be decomposed into -paths $P_i'$, one for each $\Delta_i$, -\begin{equation} -\label{eq:transitive:decompose} -P' = \left( -(P_m' \cup \identity) \circ \cdots \circ -(P_2' \cup \identity) \circ -(P_1' \cup \identity) -\right) \cap -\{\, -\vec x' \to \vec y' \mid y_{d+1} - x_{d+1} = k > 0 -\,\} -, -\end{equation} -with -$$ -P_i' = \vec s \mapsto \{\, \vec x' \to \vec y' \mid -\exists k \in \Z_{\ge 1}, \vec \delta \in k \, \Delta_i'(\vec s) : -\vec y' = \vec x' + \vec \delta -\,\} -. -$$ -Note that each $P_i'$ contains paths of length at least one. -We therefore need to take the union with the identity relation -when composing the $P_i'$s to allow for paths that do not contain -any offsets from one or more $\Delta_i'$. -The path that consists of only identity relations is removed -by imposing the constraint $y_{d+1} - x_{d+1} > 0$. -Taking the union with the identity relation means that -that the relations we compose in \eqref{eq:transitive:decompose} -each consist of two basic relations. If there are $m$ -disjuncts in the input relation, then a direct application -of the composition operation may therefore result in a relation -with $2^m$ disjuncts, which is prohibitively expensive. -It is therefore crucial to apply coalescing (\autoref{s:coalescing}) -after each composition. - -Let us now consider how to compute an overapproximation of $P_i'$. -Those that correspond to singleton $\Delta_i$s are grouped together -and handled as in \eqref{eq:transitive:singleton}. -Note that this is just an optimization. The procedure described -below would produce results that are at least as accurate. -For simplicity, we first assume that no constraint in $\Delta_i'$ -involves any existentially quantified variables. -We will return to existentially quantified variables at the end -of this section. -Without existentially quantified variables, we can classify -the constraints of $\Delta_i'$ as follows -\begin{enumerate} -\item non-parametric constraints -\begin{equation} -\label{eq:transitive:non-parametric} -A_1 \vec x + \vec c_1 \geq \vec 0 -\end{equation} -\item purely parametric constraints -\begin{equation} -\label{eq:transitive:parametric} -B_2 \vec s + \vec c_2 \geq \vec 0 -\end{equation} -\item negative mixed constraints -\begin{equation} -\label{eq:transitive:mixed} -A_3 \vec x + B_3 \vec s + \vec c_3 \geq \vec 0 -\end{equation} -such that for each row $j$ and for all $\vec s$, -$$ -\Delta_i'(\vec s) \cap -\{\, \vec \delta' \mid B_{3,j} \vec s + c_{3,j} > 0 \,\} -= \emptyset -$$ -\item positive mixed constraints -$$ -A_4 \vec x + B_4 \vec s + \vec c_4 \geq \vec 0 -$$ -such that for each row $j$, there is at least one $\vec s$ such that -$$ -\Delta_i'(\vec s) \cap -\{\, \vec \delta' \mid B_{4,j} \vec s + c_{4,j} > 0 \,\} -\ne \emptyset -$$ -\end{enumerate} -We will use the following approximation $Q_i$ for $P_i'$: -\begin{equation} -\label{eq:transitive:Q} -\begin{aligned} -Q_i = \vec s \mapsto -\{\, -\vec x' \to \vec y' -\mid {} & \exists k \in \Z_{\ge 1}, \vec f \in \Z^d : -\vec y' = \vec x' + (\vec f, k) -\wedge {} -\\ -& -A_1 \vec f + k \vec c_1 \geq \vec 0 -\wedge -B_2 \vec s + \vec c_2 \geq \vec 0 -\wedge -A_3 \vec f + B_3 \vec s + \vec c_3 \geq \vec 0 -\,\} -. -\end{aligned} -\end{equation} -To prove that $Q_i$ is indeed an overapproximation of $P_i'$, -we need to show that for every $\vec s \in \Z^n$, for every -$k \in \Z_{\ge 1}$ and for every $\vec f \in k \, \Delta_i(\vec s)$ -we have that -$(\vec f, k)$ satisfies the constraints in \eqref{eq:transitive:Q}. -If $\Delta_i(\vec s)$ is non-empty, then $\vec s$ must satisfy -the constraints in \eqref{eq:transitive:parametric}. -Each element $(\vec f, k) \in k \, \Delta_i'(\vec s)$ is a sum -of $k$ elements $(\vec f_j, 1)$ in $\Delta_i'(\vec s)$. -Each of these elements satisfies the constraints in -\eqref{eq:transitive:non-parametric}, i.e., -$$ -\left[ -\begin{matrix} -A_1 & \vec c_1 -\end{matrix} -\right] -\left[ -\begin{matrix} -\vec f_j \\ 1 -\end{matrix} -\right] -\ge \vec 0 -. -$$ -The sum of these elements therefore satisfies the same set of inequalities, -i.e., $A_1 \vec f + k \vec c_1 \geq \vec 0$. -Finally, the constraints in \eqref{eq:transitive:mixed} are such -that for any $\vec s$ in the parameter domain of $\Delta$, -we have $-\vec r(\vec s) \coloneqq B_3 \vec s + \vec c_3 \le \vec 0$, -i.e., $A_3 \vec f_j \ge \vec r(\vec s) \ge \vec 0$ -and therefore also $A_3 \vec f \ge \vec r(\vec s)$. -Note that if there are no mixed constraints and if the -rational relaxation of $\Delta_i(\vec s)$, i.e., -$\{\, \vec x \in \Q^d \mid A_1 \vec x + \vec c_1 \ge \vec 0\,\}$, -has integer vertices, then the approximation is exact, i.e., -$Q_i = P_i'$. In this case, the vertices of $\Delta'_i(\vec s)$ -generate the rational cone -$\{\, \vec x' \in \Q^{d+1} \mid \left[ -\begin{matrix} -A_1 & \vec c_1 -\end{matrix} -\right] \vec x' \,\}$ and therefore $\Delta'_i(\vec s)$ is -a Hilbert basis of this cone \shortcite[Theorem~16.4]{Schrijver1986}. - -Note however that, as pointed out by \shortciteN{DeSmet2010personal}, -if there \emph{are} any mixed constraints, then the above procedure may -not compute the most accurate affine approximation of -$k \, \Delta_i(\vec s)$ with $k \ge 1$. -In particular, we only consider the negative mixed constraints that -happen to appear in the description of $\Delta_i(\vec s)$, while we -should instead consider \emph{all} valid such constraints. -It is also sufficient to consider those constraints because any -constraint that is valid for $k \, \Delta_i(\vec s)$ is also -valid for $1 \, \Delta_i(\vec s) = \Delta_i(\vec s)$. -Take therefore any constraint -$\spv a x + \spv b s + c \ge 0$ valid for $\Delta_i(\vec s)$. -This constraint is also valid for $k \, \Delta_i(\vec s)$ iff -$k \, \spv a x + \spv b s + c \ge 0$. -If $\spv b s + c$ can attain any positive value, then $\spv a x$ -may be negative for some elements of $\Delta_i(\vec s)$. -We then have $k \, \spv a x < \spv a x$ for $k > 1$ and so the constraint -is not valid for $k \, \Delta_i(\vec s)$. -We therefore need to impose $\spv b s + c \le 0$ for all values -of $\vec s$ such that $\Delta_i(\vec s)$ is non-empty, i.e., -$\vec b$ and $c$ need to be such that $- \spv b s - c \ge 0$ is a valid -constraint of $\Delta_i(\vec s)$. That is, $(\vec b, c)$ are the opposites -of the coefficients of a valid constraint of $\Delta_i(\vec s)$. -The approximation of $k \, \Delta_i(\vec s)$ can therefore be obtained -using three applications of Farkas' lemma. The first obtains the coefficients -of constraints valid for $\Delta_i(\vec s)$. The second obtains -the coefficients of constraints valid for the projection of $\Delta_i(\vec s)$ -onto the parameters. The opposite of the second set is then computed -and intersected with the first set. The result is the set of coefficients -of constraints valid for $k \, \Delta_i(\vec s)$. A final application -of Farkas' lemma is needed to obtain the approximation of -$k \, \Delta_i(\vec s)$ itself. - -\begin{example} -Consider the relation -$$ -n \to \{\, (x, y) \to (1 + x, 1 - n + y) \mid n \ge 2 \,\} -. -$$ -The difference set of this relation is -$$ -\Delta = n \to \{\, (1, 1 - n) \mid n \ge 2 \,\} -. -$$ -Using our approach, we would only consider the mixed constraint -$y - 1 + n \ge 0$, leading to the following approximation of the -transitive closure: -$$ -n \to \{\, (x, y) \to (o_0, o_1) \mid n \ge 2 \wedge o_1 \le 1 - n + y \wedge o_0 \ge 1 + x \,\} -. -$$ -If, instead, we apply Farkas's lemma to $\Delta$, i.e., -\begin{verbatim} -D := [n] -> { [1, 1 - n] : n >= 2 }; -CD := coefficients D; -CD; -\end{verbatim} -we obtain -\begin{verbatim} -{ rat: coefficients[[c_cst, c_n] -> [i2, i3]] : i3 <= c_n and - i3 <= c_cst + 2c_n + i2 } -\end{verbatim} -The pure-parametric constraints valid for $\Delta$, -\begin{verbatim} -P := { [a,b] -> [] }(D); -CP := coefficients P; -CP; -\end{verbatim} -are -\begin{verbatim} -{ rat: coefficients[[c_cst, c_n] -> []] : c_n >= 0 and 2c_n >= -c_cst } -\end{verbatim} -Negating these coefficients and intersecting with \verb+CD+, -\begin{verbatim} -NCP := { rat: coefficients[[a,b] -> []] - -> coefficients[[-a,-b] -> []] }(CP); -CK := wrap((unwrap CD) * (dom (unwrap NCP))); -CK; -\end{verbatim} -we obtain -\begin{verbatim} -{ rat: [[c_cst, c_n] -> [i2, i3]] : i3 <= c_n and - i3 <= c_cst + 2c_n + i2 and c_n <= 0 and 2c_n <= -c_cst } -\end{verbatim} -The approximation for $k\,\Delta$, -\begin{verbatim} -K := solutions CK; -K; -\end{verbatim} -is then -\begin{verbatim} -[n] -> { rat: [i0, i1] : i1 <= -i0 and i0 >= 1 and i1 <= 2 - n - i0 } -\end{verbatim} -Finally, the computed approximation for $R^+$, -\begin{verbatim} -T := unwrap({ [dx,dy] -> [[x,y] -> [x+dx,y+dy]] }(K)); -R := [n] -> { [x,y] -> [x+1,y+1-n] : n >= 2 }; -T := T * ((dom R) -> (ran R)); -T; -\end{verbatim} -is -\begin{verbatim} -[n] -> { [x, y] -> [o0, o1] : o1 <= x + y - o0 and - o0 >= 1 + x and o1 <= 2 - n + x + y - o0 and n >= 2 } -\end{verbatim} -\end{example} - -Existentially quantified variables can be handled by -classifying them into variables that are uniquely -determined by the parameters, variables that are independent -of the parameters and others. The first set can be treated -as parameters and the second as variables. Constraints involving -the other existentially quantified variables are removed. - -\begin{example} -Consider the relation -$$ -R = -n \to \{\, x \to y \mid \exists \, \alpha_0, \alpha_1: 7\alpha_0 = -2 + n \wedge 5\alpha_1 = -1 - x + y \wedge y \ge 6 + x \,\} -. -$$ -The difference set of this relation is -$$ -\Delta = \Delta \, R = -n \to \{\, x \mid \exists \, \alpha_0, \alpha_1: 7\alpha_0 = -2 + n \wedge 5\alpha_1 = -1 + x \wedge x \ge 6 \,\} -. -$$ -The existentially quantified variables can be defined in terms -of the parameters and variables as -$$ -\alpha_0 = \floor{\frac{-2 + n}7} -\qquad -\text{and} -\qquad -\alpha_1 = \floor{\frac{-1 + x}5} -. -$$ -$\alpha_0$ can therefore be treated as a parameter, -while $\alpha_1$ can be treated as a variable. -This in turn means that $7\alpha_0 = -2 + n$ can be treated as -a purely parametric constraint, while the other two constraints are -non-parametric. -The corresponding $Q$~\eqref{eq:transitive:Q} is therefore -$$ -\begin{aligned} -n \to \{\, (x,z) \to (y,w) \mid -\exists\, \alpha_0, \alpha_1, k, f : {} & -k \ge 1 \wedge -y = x + f \wedge -w = z + k \wedge {} \\ -& -7\alpha_0 = -2 + n \wedge -5\alpha_1 = -k + x \wedge -x \ge 6 k -\,\} -. -\end{aligned} -$$ -Projecting out the final coordinates encoding the length of the paths, -results in the exact transitive closure -$$ -R^+ = -n \to \{\, x \to y \mid \exists \, \alpha_0, \alpha_1: 7\alpha_1 = -2 + n \wedge 6\alpha_0 \ge -x + y \wedge 5\alpha_0 \le -1 - x + y \,\} -. -$$ -\end{example} - -The fact that we ignore some impure constraints clearly leads -to a loss of accuracy. In some cases, some of this loss can be recovered -by not considering the parameters in a special way. -That is, instead of considering the set -$$ -\Delta = \diff R = -\vec s \mapsto -\{\, \vec \delta \in \Z^{d} \mid \exists \vec x \to \vec y \in R : -\vec \delta = \vec y - \vec x -\,\} -$$ -we consider the set -$$ -\Delta' = \diff R' = -\{\, \vec \delta \in \Z^{n+d} \mid \exists -(\vec s, \vec x) \to (\vec s, \vec y) \in R' : -\vec \delta = (\vec s - \vec s, \vec y - \vec x) -\,\} -. -$$ -The first $n$ coordinates of every element in $\Delta'$ are zero. -Projecting out these zero coordinates from $\Delta'$ is equivalent -to projecting out the parameters in $\Delta$. -The result is obviously a superset of $\Delta$, but all its constraints -are of type \eqref{eq:transitive:non-parametric} and they can therefore -all be used in the construction of $Q_i$. - -\begin{example} -Consider the relation -$$ -% [n] -> { [x, y] -> [1 + x, 1 - n + y] | n >= 2 } -R = n \to \{\, (x, y) \to (1 + x, 1 - n + y) \mid n \ge 2 \,\} -. -$$ -We have -$$ -\diff R = n \to \{\, (1, 1 - n) \mid n \ge 2 \,\} -$$ -and so, by treating the parameters in a special way, we obtain -the following approximation for $R^+$: -$$ -n \to \{\, (x, y) \to (x', y') \mid n \ge 2 \wedge y' \le 1 - n + y \wedge x' \ge 1 + x \,\} -. -$$ -If we consider instead -$$ -R' = \{\, (n, x, y) \to (n, 1 + x, 1 - n + y) \mid n \ge 2 \,\} -$$ -then -$$ -\diff R' = \{\, (0, 1, y) \mid y \le -1 \,\} -$$ -and we obtain the approximation -$$ -n \to \{\, (x, y) \to (x', y') \mid n \ge 2 \wedge x' \ge 1 + x \wedge y' \le x + y - x' \,\} -. -$$ -If we consider both $\diff R$ and $\diff R'$, then we obtain -$$ -n \to \{\, (x, y) \to (x', y') \mid n \ge 2 \wedge y' \le 1 - n + y \wedge x' \ge 1 + x \wedge y' \le x + y - x' \,\} -. -$$ -Note, however, that this is not the most accurate affine approximation that -can be obtained. That would be -$$ -n \to \{\, (x, y) \to (x', y') \mid y' \le 2 - n + x + y - x' \wedge n \ge 2 \wedge x' \ge 1 + x \,\} -. -$$ -\end{example} - -\subsection{Checking Exactness} - -The approximation $T$ for the transitive closure $R^+$ can be obtained -by projecting out the parameter $k$ from the approximation $K$ -\eqref{eq:transitive:approx} of the power $R^k$. -Since $K$ is an overapproximation of $R^k$, $T$ will also be an -overapproximation of $R^+$. -To check whether the results are exact, we need to consider two -cases depending on whether $R$ is {\em cyclic}, where $R$ is defined -to be cyclic if $R^+$ maps any element to itself, i.e., -$R^+ \cap \identity \ne \emptyset$. -If $R$ is acyclic, then the inductive definition of -\eqref{eq:transitive:inductive} is equivalent to its completion, -i.e., -$$ -R^+ = R \cup \left(R \circ R^+\right) -$$ -is a defining property. -Since $T$ is known to be an overapproximation, we only need to check -whether -$$ -T \subseteq R \cup \left(R \circ T\right) -. -$$ -This is essentially Theorem~5 of \shortciteN{Kelly1996closure}. -The only difference is that they only consider lexicographically -forward relations, a special case of acyclic relations. - -If, on the other hand, $R$ is cyclic, then we have to resort -to checking whether the approximation $K$ of the power is exact. -Note that $T$ may be exact even if $K$ is not exact, so the check -is sound, but incomplete. -To check exactness of the power, we simply need to check -\eqref{eq:transitive:power}. Since again $K$ is known -to be an overapproximation, we only need to check whether -$$ -\begin{aligned} -K'|_{y_{d+1} - x_{d+1} = 1} & \subseteq R' -\\ -K'|_{y_{d+1} - x_{d+1} \ge 2} & \subseteq R' \circ K'|_{y_{d+1} - x_{d+1} \ge 1} -, -\end{aligned} -$$ -where $R' = \{\, \vec x' \to \vec y' \mid \vec x \to \vec y \in R -\wedge y_{d+1} - x_{d+1} = 1\,\}$, i.e., $R$ extended with path -lengths equal to 1. - -All that remains is to explain how to check the cyclicity of $R$. -Note that the exactness on the power is always sound, even -in the acyclic case, so we only need to be careful that we find -all cyclic cases. Now, if $R$ is cyclic, i.e., -$R^+ \cap \identity \ne \emptyset$, then, since $T$ is -an overapproximation of $R^+$, also -$T \cap \identity \ne \emptyset$. This in turn means -that $\Delta \, K'$ contains a point whose first $d$ coordinates -are zero and whose final coordinate is positive. -In the implementation we currently perform this test on $P'$ instead of $K'$. -Note that if $R^+$ is acyclic and $T$ is not, then the approximation -is clearly not exact and the approximation of the power $K$ -will not be exact either. - -\subsection{Decomposing $R$ into strongly connected components} - -If the input relation $R$ is a union of several basic relations -that can be partially ordered -then the accuracy of the approximation may be improved by computing -an approximation of each strongly connected components separately. -For example, if $R = R_1 \cup R_2$ and $R_1 \circ R_2 = \emptyset$, -then we know that any path that passes through $R_2$ cannot later -pass through $R_1$, i.e., -\begin{equation} -\label{eq:transitive:components} -R^+ = R_1^+ \cup R_2^+ \cup \left(R_2^+ \circ R_1^+\right) -. -\end{equation} -We can therefore compute (approximations of) transitive closures -of $R_1$ and $R_2$ separately. -Note, however, that the condition $R_1 \circ R_2 = \emptyset$ -is actually too strong. -If $R_1 \circ R_2$ is a subset of $R_2 \circ R_1$ -then we can reorder the segments -in any path that moves through both $R_1$ and $R_2$ to -first move through $R_1$ and then through $R_2$. - -This idea can be generalized to relations that are unions -of more than two basic relations by constructing the -strongly connected components in the graph with as vertices -the basic relations and an edge between two basic relations -$R_i$ and $R_j$ if $R_i$ needs to follow $R_j$ in some paths. -That is, there is an edge from $R_i$ to $R_j$ iff -\begin{equation} -\label{eq:transitive:edge} -R_i \circ R_j -\not\subseteq -R_j \circ R_i -. -\end{equation} -The components can be obtained from the graph by applying -Tarjan's algorithm \shortcite{Tarjan1972}. - -In practice, we compute the (extended) powers $K_i'$ of each component -separately and then compose them as in \eqref{eq:transitive:decompose}. -Note, however, that in this case the order in which we apply them is -important and should correspond to a topological ordering of the -strongly connected components. Simply applying Tarjan's -algorithm will produce topologically sorted strongly connected components. -The graph on which Tarjan's algorithm is applied is constructed on-the-fly. -That is, whenever the algorithm checks if there is an edge between -two vertices, we evaluate \eqref{eq:transitive:edge}. -The exactness check is performed on each component separately. -If the approximation turns out to be inexact for any of the components, -then the entire result is marked inexact and the exactness check -is skipped on the components that still need to be handled. - -It should be noted that \eqref{eq:transitive:components} -is only valid for exact transitive closures. -If overapproximations are computed in the right hand side, then the result will -still be an overapproximation of the left hand side, but this result -may not be transitively closed. If we only separate components based -on the condition $R_i \circ R_j = \emptyset$, then there is no problem, -as this condition will still hold on the computed approximations -of the transitive closures. If, however, we have exploited -\eqref{eq:transitive:edge} during the decomposition and if the -result turns out not to be exact, then we check whether -the result is transitively closed. If not, we recompute -the transitive closure, skipping the decomposition. -Note that testing for transitive closedness on the result may -be fairly expensive, so we may want to make this check -configurable. - -\begin{figure} -\begin{center} -\begin{tikzpicture}[x=0.5cm,y=0.5cm,>=stealth,shorten >=1pt] -\foreach \x in {1,...,10}{ - \foreach \y in {1,...,10}{ - \draw[->] (\x,\y) -- (\x,\y+1); - } -} -\foreach \x in {1,...,20}{ - \foreach \y in {5,...,15}{ - \draw[->] (\x,\y) -- (\x+1,\y); - } -} -\end{tikzpicture} -\end{center} -\caption{The relation from \autoref{ex:closure4}} -\label{f:closure4} -\end{figure} -\begin{example} -\label{ex:closure4} -Consider the relation in example {\tt closure4} that comes with -the Omega calculator~\shortcite{Omega_calc}, $R = R_1 \cup R_2$, -with -$$ -\begin{aligned} -R_1 & = \{\, (x,y) \to (x,y+1) \mid 1 \le x,y \le 10 \,\} -\\ -R_2 & = \{\, (x,y) \to (x+1,y) \mid 1 \le x \le 20 \wedge 5 \le y \le 15 \,\} -. -\end{aligned} -$$ -This relation is shown graphically in \autoref{f:closure4}. -We have -$$ -\begin{aligned} -R_1 \circ R_2 &= -\{\, (x,y) \to (x+1,y+1) \mid 1 \le x \le 9 \wedge 5 \le y \le 10 \,\} -\\ -R_2 \circ R_1 &= -\{\, (x,y) \to (x+1,y+1) \mid 1 \le x \le 10 \wedge 4 \le y \le 10 \,\} -. -\end{aligned} -$$ -Clearly, $R_1 \circ R_2 \subseteq R_2 \circ R_1$ and so -$$ -\left( -R_1 \cup R_2 -\right)^+ -= -\left(R_2^+ \circ R_1^+\right) -\cup R_1^+ -\cup R_2^+ -. -$$ -\end{example} - -\begin{figure} -\newcounter{n} -\newcounter{t1} -\newcounter{t2} -\newcounter{t3} -\newcounter{t4} -\begin{center} -\begin{tikzpicture}[>=stealth,shorten >=1pt] -\setcounter{n}{7} -\foreach \i in {1,...,\value{n}}{ - \foreach \j in {1,...,\value{n}}{ - \setcounter{t1}{2 * \j - 4 - \i + 1} - \setcounter{t2}{\value{n} - 3 - \i + 1} - \setcounter{t3}{2 * \i - 1 - \j + 1} - \setcounter{t4}{\value{n} - \j + 1} - \ifnum\value{t1}>0\ifnum\value{t2}>0 - \ifnum\value{t3}>0\ifnum\value{t4}>0 - \draw[thick,->] (\i,\j) to[out=20] (\i+3,\j); - \fi\fi\fi\fi - \setcounter{t1}{2 * \j - 1 - \i + 1} - \setcounter{t2}{\value{n} - \i + 1} - \setcounter{t3}{2 * \i - 4 - \j + 1} - \setcounter{t4}{\value{n} - 3 - \j + 1} - \ifnum\value{t1}>0\ifnum\value{t2}>0 - \ifnum\value{t3}>0\ifnum\value{t4}>0 - \draw[thick,->] (\i,\j) to[in=-20,out=20] (\i,\j+3); - \fi\fi\fi\fi - \setcounter{t1}{2 * \j - 1 - \i + 1} - \setcounter{t2}{\value{n} - 1 - \i + 1} - \setcounter{t3}{2 * \i - 1 - \j + 1} - \setcounter{t4}{\value{n} - 1 - \j + 1} - \ifnum\value{t1}>0\ifnum\value{t2}>0 - \ifnum\value{t3}>0\ifnum\value{t4}>0 - \draw[thick,->] (\i,\j) to (\i+1,\j+1); - \fi\fi\fi\fi - } -} -\end{tikzpicture} -\end{center} -\caption{The relation from \autoref{ex:decomposition}} -\label{f:decomposition} -\end{figure} -\begin{example} -\label{ex:decomposition} -Consider the relation on the right of \shortciteN[Figure~2]{Beletska2009}, -reproduced in \autoref{f:decomposition}. -The relation can be described as $R = R_1 \cup R_2 \cup R_3$, -with -$$ -\begin{aligned} -R_1 &= n \mapsto \{\, (i,j) \to (i+3,j) \mid -i \le 2 j - 4 \wedge -i \le n - 3 \wedge -j \le 2 i - 1 \wedge -j \le n \,\} -\\ -R_2 &= n \mapsto \{\, (i,j) \to (i,j+3) \mid -i \le 2 j - 1 \wedge -i \le n \wedge -j \le 2 i - 4 \wedge -j \le n - 3 \,\} -\\ -R_3 &= n \mapsto \{\, (i,j) \to (i+1,j+1) \mid -i \le 2 j - 1 \wedge -i \le n - 1 \wedge -j \le 2 i - 1 \wedge -j \le n - 1\,\} -. -\end{aligned} -$$ -The figure shows this relation for $n = 7$. -Both -$R_3 \circ R_1 \subseteq R_1 \circ R_3$ -and -$R_3 \circ R_2 \subseteq R_2 \circ R_3$, -which the reader can verify using the {\tt iscc} calculator: -\begin{verbatim} -R1 := [n] -> { [i,j] -> [i+3,j] : i <= 2 j - 4 and i <= n - 3 and - j <= 2 i - 1 and j <= n }; -R2 := [n] -> { [i,j] -> [i,j+3] : i <= 2 j - 1 and i <= n and - j <= 2 i - 4 and j <= n - 3 }; -R3 := [n] -> { [i,j] -> [i+1,j+1] : i <= 2 j - 1 and i <= n - 1 and - j <= 2 i - 1 and j <= n - 1 }; -(R1 . R3) - (R3 . R1); -(R2 . R3) - (R3 . R2); -\end{verbatim} -$R_3$ can therefore be moved forward in any path. -For the other two basic relations, we have both -$R_2 \circ R_1 \not\subseteq R_1 \circ R_2$ -and -$R_1 \circ R_2 \not\subseteq R_2 \circ R_1$ -and so $R_1$ and $R_2$ form a strongly connected component. -By computing the power of $R_3$ and $R_1 \cup R_2$ separately -and composing the results, the power of $R$ can be computed exactly -using \eqref{eq:transitive:singleton}. -As explained by \shortciteN{Beletska2009}, applying the same formula -to $R$ directly, without a decomposition, would result in -an overapproximation of the power. -\end{example} - -\subsection{Partitioning the domains and ranges of $R$} - -The algorithm of \autoref{s:power} assumes that the input relation $R$ -can be treated as a union of translations. -This is a reasonable assumption if $R$ maps elements of a given -abstract domain to the same domain. -However, if $R$ is a union of relations that map between different -domains, then this assumption no longer holds. -In particular, when an entire dependence graph is encoded -in a single relation, as is done by, e.g., -\shortciteN[Section~6.1]{Barthou2000MSE}, then it does not make -sense to look at differences between iterations of different domains. -Now, arguably, a modified Floyd-Warshall algorithm should -be applied to the dependence graph, as advocated by -\shortciteN{Kelly1996closure}, with the transitive closure operation -only being applied to relations from a given domain to itself. -However, it is also possible to detect disjoint domains and ranges -and to apply Floyd-Warshall internally. - -\linesnumbered -\begin{algorithm} -\caption{The modified Floyd-Warshall algorithm of -\protect\shortciteN{Kelly1996closure}} -\label{a:Floyd} -\SetKwInput{Input}{Input} -\SetKwInput{Output}{Output} -\Input{Relations $R_{pq}$, $0 \le p, q < n$} -\Output{Updated relations $R_{pq}$ such that each relation -$R_{pq}$ contains all indirect paths from $p$ to $q$ in the input graph} -% -\BlankLine -\SetVline -\dontprintsemicolon -% -\For{$r \in [0, n-1]$}{ - $R_{rr} \coloneqq R_{rr}^+$ \nllabel{l:Floyd:closure}\; - \For{$p \in [0, n-1]$}{ - \For{$q \in [0, n-1]$}{ - \If{$p \ne r$ or $q \ne r$}{ - $R_{pq} \coloneqq R_{pq} \cup \left(R_{rq} \circ R_{pr}\right) - \cup \left(R_{rq} \circ R_{rr} \circ R_{pr}\right)$ - \nllabel{l:Floyd:update} - } - } - } -} -\end{algorithm} - -Let the input relation $R$ be a union of $m$ basic relations $R_i$. -Let $D_{2i}$ be the domains of $R_i$ and $D_{2i+1}$ the ranges of $R_i$. -The first step is to group overlapping $D_j$ until a partition is -obtained. If the resulting partition consists of a single part, -then we continue with the algorithm of \autoref{s:power}. -Otherwise, we apply Floyd-Warshall on the graph with as vertices -the parts of the partition and as edges the $R_i$ attached to -the appropriate pairs of vertices. -In particular, let there be $n$ parts $P_k$ in the partition. -We construct $n^2$ relations -$$ -R_{pq} \coloneqq \bigcup_{i \text{ s.t. } \domain R_i \subseteq P_p \wedge - \range R_i \subseteq P_q} R_i -, -$$ -apply \autoref{a:Floyd} and return the union of all resulting -$R_{pq}$ as the transitive closure of $R$. -Each iteration of the $r$-loop in \autoref{a:Floyd} updates -all relations $R_{pq}$ to include paths that go from $p$ to $r$, -possibly stay there for a while, and then go from $r$ to $q$. -Note that paths that ``stay in $r$'' include all paths that -pass through earlier vertices since $R_{rr}$ itself has been updated -accordingly in previous iterations of the outer loop. -In principle, it would be sufficient to use the $R_{pr}$ -and $R_{rq}$ computed in the previous iteration of the -$r$-loop in Line~\ref{l:Floyd:update}. -However, from an implementation perspective, it is easier -to allow either or both of these to have been updated -in the same iteration of the $r$-loop. -This may result in duplicate paths, but these can usually -be removed by coalescing (\autoref{s:coalescing}) the result of the union -in Line~\ref{l:Floyd:update}, which should be done in any case. -The transitive closure in Line~\ref{l:Floyd:closure} -is performed using a recursive call. This recursive call -includes the partitioning step, but the resulting partition will -usually be a singleton. -The result of the recursive call will either be exact or an -overapproximation. The final result of Floyd-Warshall is therefore -also exact or an overapproximation. - -\begin{figure} -\begin{center} -\begin{tikzpicture}[x=1cm,y=1cm,>=stealth,shorten >=3pt] -\foreach \x/\y in {0/0,1/1,3/2} { - \fill (\x,\y) circle (2pt); -} -\foreach \x/\y in {0/1,2/2,3/3} { - \draw (\x,\y) circle (2pt); -} -\draw[->] (0,0) -- (0,1); -\draw[->] (0,1) -- (1,1); -\draw[->] (2,2) -- (3,2); -\draw[->] (3,2) -- (3,3); -\draw[->,dashed] (2,2) -- (3,3); -\draw[->,dotted] (0,0) -- (1,1); -\end{tikzpicture} -\end{center} -\caption{The relation (solid arrows) on the right of Figure~1 of -\protect\shortciteN{Beletska2009} and its transitive closure} -\label{f:COCOA:1} -\end{figure} -\begin{example} -Consider the relation on the right of Figure~1 of -\shortciteN{Beletska2009}, -reproduced in \autoref{f:COCOA:1}. -This relation can be described as -$$ -\begin{aligned} -\{\, (x, y) \to (x_2, y_2) \mid {} & (3y = 2x \wedge x_2 = x \wedge 3y_2 = 3 + 2x \wedge x \ge 0 \wedge x \le 3) \vee {} \\ -& (x_2 = 1 + x \wedge y_2 = y \wedge x \ge 0 \wedge 3y \ge 2 + 2x \wedge x \le 2 \wedge 3y \le 3 + 2x) \,\} -. -\end{aligned} -$$ -Note that the domain of the upward relation overlaps with the range -of the rightward relation and vice versa, but that the domain -of neither relation overlaps with its own range or the domain of -the other relation. -The domains and ranges can therefore be partitioned into two parts, -$P_0$ and $P_1$, shown as the white and black dots in \autoref{f:COCOA:1}, -respectively. -Initially, we have -$$ -\begin{aligned} -R_{00} & = \emptyset -\\ -R_{01} & = -\{\, (x, y) \to (x+1, y) \mid -(x \ge 0 \wedge 3y \ge 2 + 2x \wedge x \le 2 \wedge 3y \le 3 + 2x) \,\} -\\ -R_{10} & = -\{\, (x, y) \to (x_2, y_2) \mid (3y = 2x \wedge x_2 = x \wedge 3y_2 = 3 + 2x \wedge x \ge 0 \wedge x \le 3) \,\} -\\ -R_{11} & = \emptyset -. -\end{aligned} -$$ -In the first iteration, $R_{00}$ remains the same ($\emptyset^+ = \emptyset$). -$R_{01}$ and $R_{10}$ are therefore also unaffected, but -$R_{11}$ is updated to include $R_{01} \circ R_{10}$, i.e., -the dashed arrow in the figure. -This new $R_{11}$ is obviously transitively closed, so it is not -changed in the second iteration and it does not have an effect -on $R_{01}$ and $R_{10}$. However, $R_{00}$ is updated to -include $R_{10} \circ R_{01}$, i.e., the dotted arrow in the figure. -The transitive closure of the original relation is then equal to -$R_{00} \cup R_{01} \cup R_{10} \cup R_{11}$. -\end{example} - -\subsection{Incremental Computation} -\label{s:incremental} - -In some cases it is possible and useful to compute the transitive closure -of union of basic relations incrementally. In particular, -if $R$ is a union of $m$ basic maps, -$$ -R = \bigcup_j R_j -, -$$ -then we can pick some $R_i$ and compute the transitive closure of $R$ as -\begin{equation} -\label{eq:transitive:incremental} -R^+ = R_i^+ \cup -\left( -\bigcup_{j \ne i} -R_i^* \circ R_j \circ R_i^* -\right)^+ -. -\end{equation} -For this approach to be successful, it is crucial that each -of the disjuncts in the argument of the second transitive -closure in \eqref{eq:transitive:incremental} be representable -as a single basic relation, i.e., without a union. -If this condition holds, then by using \eqref{eq:transitive:incremental}, -the number of disjuncts in the argument of the transitive closure -can be reduced by one. -Now, $R_i^* = R_i^+ \cup \identity$, but in some cases it is possible -to relax the constraints of $R_i^+$ to include part of the identity relation, -say on domain $D$. We will use the notation -${\cal C}(R_i,D) = R_i^+ \cup \identity_D$ to represent -this relaxed version of $R^+$. -\shortciteN{Kelly1996closure} use the notation $R_i^?$. -${\cal C}(R_i,D)$ can be computed by allowing $k$ to attain -the value $0$ in \eqref{eq:transitive:Q} and by using -$$ -P \cap \left(D \to D\right) -$$ -instead of \eqref{eq:transitive:approx}. -Typically, $D$ will be a strict superset of both $\domain R_i$ -and $\range R_i$. We therefore need to check that domain -and range of the transitive closure are part of ${\cal C}(R_i,D)$, -i.e., the part that results from the paths of positive length ($k \ge 1$), -are equal to the domain and range of $R_i$. -If not, then the incremental approach cannot be applied for -the given choice of $R_i$ and $D$. - -In order to be able to replace $R^*$ by ${\cal C}(R_i,D)$ -in \eqref{eq:transitive:incremental}, $D$ should be chosen -to include both $\domain R$ and $\range R$, i.e., such -that $\identity_D \circ R_j \circ \identity_D = R_j$ for all $j\ne i$. -\shortciteN{Kelly1996closure} say that they use -$D = \domain R_i \cup \range R_i$, but presumably they mean that -they use $D = \domain R \cup \range R$. -Now, this expression of $D$ contains a union, so it not directly usable. -\shortciteN{Kelly1996closure} do not explain how they avoid this union. -Apparently, in their implementation, -they are using the convex hull of $\domain R \cup \range R$ -or at least an approximation of this convex hull. -We use the simple hull (\autoref{s:simple hull}) of $\domain R \cup \range R$. - -It is also possible to use a domain $D$ that does {\em not\/} -include $\domain R \cup \range R$, but then we have to -compose with ${\cal C}(R_i,D)$ more selectively. -In particular, if we have -\begin{equation} -\label{eq:transitive:right} -\text{for each $j \ne i$ either } -\domain R_j \subseteq D \text{ or } \domain R_j \cap \range R_i = \emptyset -\end{equation} -and, similarly, -\begin{equation} -\label{eq:transitive:left} -\text{for each $j \ne i$ either } -\range R_j \subseteq D \text{ or } \range R_j \cap \domain R_i = \emptyset -\end{equation} -then we can refine \eqref{eq:transitive:incremental} to -$$ -R_i^+ \cup -\left( -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \subseteq D $\\ - $\scriptstyle\range R_j \subseteq D$}} -{\cal C} \circ R_j \circ {\cal C} -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \cap \range R_i = \emptyset$\\ - $\scriptstyle\range R_j \subseteq D$}} -\!\!\!\!\! -{\cal C} \circ R_j -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \subseteq D $\\ - $\scriptstyle\range R_j \cap \domain R_i = \emptyset$}} -\!\!\!\!\! -R_j \circ {\cal C} -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \cap \range R_i = \emptyset$\\ - $\scriptstyle\range R_j \cap \domain R_i = \emptyset$}} -\!\!\!\!\! -R_j -\right) -\right)^+ -. -$$ -If only property~\eqref{eq:transitive:right} holds, -we can use -$$ -R_i^+ \cup -\left( -\left( -R_i^+ \cup \identity -\right) -\circ -\left( -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \subseteq D $}} -R_j \circ {\cal C} -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \cap \range R_i = \emptyset$}} -\!\!\!\!\! -R_j -\right) -\right)^+ -\right) -, -$$ -while if only property~\eqref{eq:transitive:left} holds, -we can use -$$ -R_i^+ \cup -\left( -\left( -\left( -\bigcup_{\shortstack{$\scriptstyle\range R_j \subseteq D $}} -{\cal C} \circ R_j -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\range R_j \cap \domain R_i = \emptyset$}} -\!\!\!\!\! -R_j -\right) -\right)^+ -\circ -\left( -R_i^+ \cup \identity -\right) -\right) -. -$$ - -It should be noted that if we want the result of the incremental -approach to be transitively closed, then we can only apply it -if all of the transitive closure operations involved are exact. -If, say, the second transitive closure in \eqref{eq:transitive:incremental} -contains extra elements, then the result does not necessarily contain -the composition of these extra elements with powers of $R_i$. - -\subsection{An {\tt Omega}-like implementation} - -While the main algorithm of \shortciteN{Kelly1996closure} is -designed to compute and underapproximation of the transitive closure, -the authors mention that they could also compute overapproximations. -In this section, we describe our implementation of an algorithm -that is based on their ideas. -Note that the {\tt Omega} library computes underapproximations -\shortcite[Section 6.4]{Omega_lib}. - -The main tool is Equation~(2) of \shortciteN{Kelly1996closure}. -The input relation $R$ is first overapproximated by a ``d-form'' relation -$$ -\{\, \vec i \to \vec j \mid \exists \vec \alpha : -\vec L \le \vec j - \vec i \le \vec U -\wedge -(\forall p : j_p - i_p = M_p \alpha_p) -\,\} -, -$$ -where $p$ ranges over the dimensions and $\vec L$, $\vec U$ and -$\vec M$ are constant integer vectors. The elements of $\vec U$ -may be $\infty$, meaning that there is no upper bound corresponding -to that element, and similarly for $\vec L$. -Such an overapproximation can be obtained by computing strides, -lower and upper bounds on the difference set $\Delta \, R$. -The transitive closure of such a ``d-form'' relation is -\begin{equation} -\label{eq:omega} -\{\, \vec i \to \vec j \mid \exists \vec \alpha, k : -k \ge 1 \wedge -k \, \vec L \le \vec j - \vec i \le k \, \vec U -\wedge -(\forall p : j_p - i_p = M_p \alpha_p) -\,\} -. -\end{equation} -The domain and range of this transitive closure are then -intersected with those of the input relation. -This is a special case of the algorithm in \autoref{s:power}. - -In their algorithm for computing lower bounds, the authors -use the above algorithm as a substep on the disjuncts in the relation. -At the end, they say -\begin{quote} -If an upper bound is required, it can be calculated in a manner -similar to that of a single conjunct [sic] relation. -\end{quote} -Presumably, the authors mean that a ``d-form'' approximation -of the whole input relation should be used. -However, the accuracy can be improved by also trying to -apply the incremental technique from the same paper, -which is explained in more detail in \autoref{s:incremental}. -In this case, ${\cal C}(R_i,D)$ can be obtained by -allowing the value zero for $k$ in \eqref{eq:omega}, -i.e., by computing -$$ -\{\, \vec i \to \vec j \mid \exists \vec \alpha, k : -k \ge 0 \wedge -k \, \vec L \le \vec j - \vec i \le k \, \vec U -\wedge -(\forall p : j_p - i_p = M_p \alpha_p) -\,\} -. -$$ -In our implementation we take as $D$ the simple hull -(\autoref{s:simple hull}) of $\domain R \cup \range R$. -To determine whether it is safe to use ${\cal C}(R_i,D)$, -we check the following conditions, as proposed by -\shortciteN{Kelly1996closure}: -${\cal C}(R_i,D) - R_i^+$ is not a union and for each $j \ne i$ -the condition -$$ -\left({\cal C}(R_i,D) - R_i^+\right) -\circ -R_j -\circ -\left({\cal C}(R_i,D) - R_i^+\right) -= -R_j -$$ -holds. diff --git a/cloog-0.16.3/isl/doc/isl.bib b/cloog-0.16.3/isl/doc/isl.bib deleted file mode 100644 index cfe8081e56b75cd8e1e1994fe9eac9e58f3b799d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/isl.bib +++ /dev/null @@ -1,313 +0,0 @@ -@inproceedings{Kelly1996closure, - author = {Wayne Kelly and - William Pugh and - Evan Rosser and - Tatiana Shpeisman}, - title = {Transitive Closure of Infinite Graphs and Its Applications}, - pages = {126-140}, - editor = {Chua-Huang Huang and - P. Sadayappan and - Utpal Banerjee and - David Gelernter and - Alexandru Nicolau and - David A. Padua}, - booktitle = {Languages and Compilers for Parallel Computing, 8th International - Workshop, LCPC'95, Columbus, Ohio, USA, August 10-12, 1995, - Proceedings}, - publisher = {Springer}, - series = {Lecture Notes in Computer Science}, - volume = {1033}, - year = {1996}, - isbn = {3-540-60765-X}, -} - -@inproceedings{Beletska2009, - author = {Beletska, Anna and Barthou, Denis and Bielecki, Wlodzimierz and Cohen, Albert}, - title = {Computing the Transitive Closure of a Union of Affine Integer Tuple Relations}, - booktitle = {COCOA '09: Proceedings of the 3rd International Conference on Combinatorial Optimization and Applications}, - year = {2009}, - isbn = {978-3-642-02025-4}, - pages = {98--109}, - location = {Huangshan, China}, - doi = {10.1007/978-3-642-02026-1_9}, - publisher = {Springer-Verlag}, - address = {Berlin, Heidelberg}, -} - -@book{Schrijver1986, - author = "Schrijver, Alexander", - title = "Theory of Linear and Integer Programming", - publisher = "John Wiley \& Sons", - year = 1986 -} - -@article{Tarjan1972, - author = {Tarjan, Robert}, - journal = {SIAM Journal on Computing}, - number = {2}, - pages = {146--160}, - publisher = {SIAM}, - title = {Depth-First Search and Linear Graph Algorithms}, - volume = {1}, - year = {1972} -} - -@TechReport{ Omega_calc, - author = "Wayne Kelly and Vadim Maslov and William Pugh and Evan Rosser and Tatiana Shpeisman and Dave Wonnacott", - title = "The {Omega} Calculator and Library", - month = nov, - institution = "University of Maryland", - year = 1996 -} - -@TechReport{ Omega_lib, - author = "Wayne Kelly and Vadim Maslov and William Pugh and Evan Rosser and Tatiana Shpeisman and Dave Wonnacott", - title = "The {Omega} Library", - month = nov, - institution = "University of Maryland", - year = 1996 -} - -@unpublished{Verdoolaege2009isl, - author = "Verdoolaege, Sven", - title = "An integer set library for program analysis", - note = "Advances in the Theory of Integer Linear Optimization and its Extensions,AMS 2009 Spring Western Section Meeting, San Francisco, California, 25-26 April 2009", - month = Apr, - year = "2009", - url = "https://lirias.kuleuven.be/handle/123456789/228373", -} - -@article{Barthou2000MSE, - author = {Barthou, Denis and Cohen, Albert and Collard, Jean-Fran\c{c}ois}, - title = {Maximal Static Expansion}, - journal = {Int. J. Parallel Program.}, - volume = {28}, - number = {3}, - year = {2000}, - issn = {0885-7458}, - pages = {213--243}, - doi = {10.1023/A:1007500431910}, - publisher = {Kluwer Academic Publishers}, - address = {Norwell, MA, USA}, -} - -@article{ Feautrier88parametric, - author = "P. Feautrier", - title = "Parametric Integer Programming", - journal = "RAIRO Recherche Op\'erationnelle", - volume = "22", - number = "3", - pages = "243--268", - year = "1988", -} - -@Article{ Fea91, - author = {Feautrier, P.}, - title = {Dataflow analysis of array and scalar references}, - journal = {International Journal of Parallel Programming}, - year = {1991}, - OPTkey = {}, - volume = {20}, - number = {1}, - OPTmonth = {}, - pages = {23--53}, - OPTnote = {}, - OPTannote = {}, -} - -@INPROCEEDINGS{BouletRe98, - AUTHOR = {Pierre Boulet and Xavier Redon}, - TITLE = {Communication Pre-evaluation in {HPF}}, - BOOKTITLE = {EUROPAR'98}, - PAGES = {263--272}, - YEAR = 1998, - VOLUME = 1470, - series = {Lecture Notes in Computer Science}, - PUBLISHER = {Springer-Verlag, Berlin}, - ABSTRACT = { Parallel computers are difficult to program efficiently. We believe - that a good way to help programmers write efficient programs is to - provide them with tools that show them how their programs behave on - a parallel computer. Data distribution is the major performance - factor of data-parallel programs and so automatic data layout for - HPF programs has been studied by many researchers recently. The - communication volume induced by a data distribution is a good - estimator of the efficiency of this data distribution. - - We present here a symbolic method to compute the communication - volume generated by a given data distribution during the program - writing phase (before compilation). We stay machine-independent to - assure portability. Our goal is to help the programmer understand - the data movements its program generates and thus find a good data - distribution. Our method is based on parametric polyhedral - computations. It can be applied to a large class of regular codes.}, -} - -@INPROCEEDINGS {Verdoolaege2005experiences, - AUTHOR = "Verdoolaege, Sven and Beyls, Kristof and Bruynooghe, Maurice and Catthoor, Francky", - TITLE = {{E}xperiences with enumeration of integer projections of parametric polytopes}, - BOOKTITLE = {{P}roceedings of 14th {I}nternational {C}onference on {C}ompiler {C}onstruction, {E}dinburgh, {S}cotland}, - YEAR = {2005}, - EDITOR = {Bodik, R.}, - VOLUME = 3443, - pages = "91-105", - series = "Lecture Notes in Computer Science", - publisher = "Springer-Verlag", - address = "Berlin", - doi = "10.1007/b107108", -} - -@article{Detlefs2005simplify, - author = {David Detlefs and Greg Nelson and James B. Saxe}, - title = {Simplify: a theorem prover for program checking}, - journal = {J. ACM}, - volume = {52}, - number = {3}, - year = {2005}, - issn = {0004-5411}, - pages = {365--473}, - doi = {10.1145/1066100.1066102}, - publisher = {ACM}, - address = {New York, NY, USA}, - } - -@phdthesis{Nelson1980phd, - author = {Charles Gregory Nelson}, - title = {Techniques for program verification}, - year = {1980}, - order_no = {AAI8011683}, - school = {Stanford University}, - address = {Stanford, CA, USA}, - } - -@article{Woods2003short, - year = 2003, - Journal = "J. Amer. Math. Soc.", - volume = 16, - pages = "957--979", - month = apr, - title = {{Short rational generating functions for lattice point - problems}}, - author = {Alexander Barvinok and Kevin Woods}, -} - -@misc{barvinok-0.22, - author = {Sven Verdoolaege}, - title = {{\texttt{barvinok}}, version 0.22}, - howpublished = {Available from \url{http://freshmeat.net/projects/barvinok/}}, - year = 2006 -} - -@inproceedings{DeLoera2004Three, - title = "Three Kinds of Integer Programming Algorithms based on Barvinok's Rational Functions", - author = "De Loera, J. A. and D. Haws and R. Hemmecke and P. Huggins and R. Yoshida", - booktitle = "Integer Programming and Combinatorial Optimization: 10th International IPCO Conference", - year = "2004", - month = jan, - series = "Lecture Notes in Computer Science", - Volume = 3064, - Pages = "244-255", -} - -@TechReport{Feautrier02, - author = {P. Feautrier and J. Collard and C. Bastoul}, - title = {Solving systems of affine (in)equalities}, - institution = {PRiSM, Versailles University}, - year = 2002 -} - -@article{ Feautrier92multi, - author = "Paul Feautrier", - title = "Some Efficient Solutions to the Affine Scheduling Problem. {P}art {II}. Multidimensional Time", - journal = "International Journal of Parallel Programming", - volume = "21", - number = "6", - pages = "389--420", - year = "1992", - month = dec, - url = "citeseer.nj.nec.com/article/feautrier92some.html", -} - -@misc{Bygde2010licentiate, - author = {Stefan Bygde}, - title = {Static {WCET} Analysis based on Abstract Interpretation and Counting of Elements}, - month = {March}, - year = {2010}, - howpublished = {Licentiate thesis}, - publisher = {M{\"{a}}lardalen University Press}, - url = {http://www.mrtc.mdh.se/index.php?choice=publications&id=2144}, -} - -@phdthesis{Meister2004PhD, - title = {Stating and Manipulating Periodicity in the Polytope Model. Applications to Program Analysis and Optimization}, - author= {Beno\^it Meister}, - school = {Universit\'e Louis Pasteur}, - month = Dec, - year = {2004}, -} - -@inproceedings{Meister2008, - author = {Beno\^it Meister and Sven Verdoolaege}, - title = {Polynomial Approximations in the Polytope Model: Bringing the Power - of Quasi-Polynomials to the Masses}, - year = {2008}, - booktitle = {Digest of the 6th Workshop on Optimization for DSP and Embedded Systems, ODES-6}, - editor = "Jagadeesh Sankaran and Vander Aa, Tom", - month = apr, -} - -@misc{Galea2009personal, - author = "Fran\c{c}ois Galea", - title = "personal communication", - year = 2009, - month = nov, -} - -@misc{PPL, - author = "R. Bagnara and P. M. Hill and E. Zaffanella", - title = "The {Parma Polyhedra Library}", - howpublished = {\url{http://www.cs.unipr.it/ppl/}}, -} - -@TECHREPORT{Cook1991implementation, -AUTHOR={William Cook and Thomas Rutherford and Herbert E. Scarf and David F. Shallcross}, -TITLE={An Implementation of the Generalized Basis Reduction Algorithm for Integer Programming}, -YEAR=1991, -MONTH=Aug, -INSTITUTION={Cowles Foundation, Yale University}, -TYPE={Cowles Foundation Discussion Papers}, -NOTE={available at \url{http://ideas.repec.org/p/cwl/cwldpp/990.html}}, -NUMBER={990}, -} - - @article{Karr1976affine, -author={ Michael Karr}, -title={ Affine Relationships Among Variables of a Program }, -journal={Acta Informatica}, -Volume={6}, -pages={133-151}, -year={1976}, -publisher={Springer-Verlag}, -ignore={ }, -} - -@PhdThesis{Verhaegh1995PhD, - title = "Multidimensional Periodic Scheduling", - author = "Wim F. J. Verhaegh", - school = "Technische Universiteit Eindhoven", - year = 1995, -} - -@INPROCEEDINGS{Seghir2006minimizing, - AUTHOR = "Rachid Seghir and Vincent Loechner", - TITLE = {Memory Optimization by Counting Points in Integer Transformations of Parametric Polytopes}, - BOOKTITLE = {{P}roceedings of the {I}nternational {C}onference on {C}ompilers, {A}rchitectures, and {S}ynthesis for {E}mbedded Systems, CASES 2006, {S}eoul, {K}orea}, - month = oct, - YEAR = {2006} -} - -@misc{DeSmet2010personal, - author = "De Smet, Sven", - title = "personal communication", - year = 2010, - month = apr, -} diff --git a/cloog-0.16.3/isl/doc/manual.pdf b/cloog-0.16.3/isl/doc/manual.pdf deleted file mode 100644 index 89a2a0a3fef5a6568f4a76b9b345eae77c54098e..0000000000000000000000000000000000000000 Binary files a/cloog-0.16.3/isl/doc/manual.pdf and /dev/null differ diff --git a/cloog-0.16.3/isl/doc/manual.tex b/cloog-0.16.3/isl/doc/manual.tex deleted file mode 100644 index 91b3db0e640350069e72873fcb5e4f0770fc0e4d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/manual.tex +++ /dev/null @@ -1,75 +0,0 @@ -\documentclass{report} -\usepackage[plainpages=false,pdfpagelabels,breaklinks,pagebackref]{hyperref} -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{txfonts} -\usepackage{chicago} -\usepackage{aliascnt} -\usepackage{tikz} -\usepackage{calc} -\usepackage[ruled]{algorithm2e} -\usetikzlibrary{matrix,fit,backgrounds,decorations.pathmorphing,positioning} -\usepackage{listings} - -\lstset{basicstyle=\tt,flexiblecolumns=false} - -\def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle\bf#1$}} -{\mbox{\boldmath$\textstyle\bf#1$}} -{\mbox{\boldmath$\scriptstyle\bf#1$}} -{\mbox{\boldmath$\scriptscriptstyle\bf#1$}}} - -\providecommand{\fract}[1]{\left\{#1\right\}} -\providecommand{\floor}[1]{\left\lfloor#1\right\rfloor} -\providecommand{\ceil}[1]{\left\lceil#1\right\rceil} -\def\sp#1#2{\langle #1, #2 \rangle} -\def\spv#1#2{\langle\vec #1,\vec #2\rangle} - -\newtheorem{theorem}{Theorem} -\newaliascnt{example}{theorem} -\newtheorem{example}[example]{Example} -\newaliascnt{def}{theorem} -\newtheorem{definition}[def]{Definition} -\aliascntresetthe{example} -\aliascntresetthe{def} -\numberwithin{theorem}{section} -\numberwithin{def}{section} -\numberwithin{example}{section} - -\newcommand{\algocflineautorefname}{Algorithm} -\newcommand{\exampleautorefname}{Example} -\newcommand{\lstnumberautorefname}{Line} -\renewcommand{\sectionautorefname}{Section} -\renewcommand{\subsectionautorefname}{Section} - -\def\Z{\mathbb{Z}} -\def\Q{\mathbb{Q}} - -\def\pdom{\mathop{\rm pdom}\nolimits} -\def\domain{\mathop{\rm dom}\nolimits} -\def\range{\mathop{\rm ran}\nolimits} -\def\identity{\mathop{\rm Id}\nolimits} -\def\diff{\mathop{\Delta}\nolimits} - -\providecommand{\floor}[1]{\left\lfloor#1\right\rfloor} - -\begin{document} - -\title{Integer Set Library: Manual\\ -\small Version: \input{version} } -\author{Sven Verdoolaege} - -\maketitle -\tableofcontents - -\chapter{User Manual} - -\input{user} - -\chapter{Implementation Details} - -\input{implementation} - -\bibliography{isl} -\bibliographystyle{chicago} - -\end{document} diff --git a/cloog-0.16.3/isl/doc/mypod2latex b/cloog-0.16.3/isl/doc/mypod2latex deleted file mode 100755 index b11c0593d01544b000bb999775c1af0a33609f90..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/mypod2latex +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Pod::LaTeX; - -my ($in, $out) = @ARGV; - -my $parser = new Pod::LaTeX( - AddPreamble => 0, - AddPostamble => 0, - LevelNoNum => 5, - ); - -$parser->parse_from_file($in, $out); diff --git a/cloog-0.16.3/isl/doc/user.pod b/cloog-0.16.3/isl/doc/user.pod deleted file mode 100644 index 76799c1133aa4521049e63b651ba0b9d9f45a769..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/doc/user.pod +++ /dev/null @@ -1,3376 +0,0 @@ -=head1 Introduction - -C is a thread-safe C library for manipulating -sets and relations of integer points bounded by affine constraints. -The descriptions of the sets and relations may involve -both parameters and existentially quantified variables. -All computations are performed in exact integer arithmetic -using C. -The C library offers functionality that is similar -to that offered by the C and C libraries, -but the underlying algorithms are in most cases completely different. - -The library is by no means complete and some fairly basic -functionality is still missing. -Still, even in its current form, the library has been successfully -used as a backend polyhedral library for the polyhedral -scanner C and as part of an equivalence checker of -static affine programs. -For bug reports, feature requests and questions, -visit the the discussion group at -L. - -=head2 Backward Incompatible Changes - -=head3 Changes since isl-0.02 - -=over - -=item * The old printing functions have been deprecated -and replaced by C functions, see L. - -=item * Most functions related to dependence analysis have acquired -an extra C argument. To obtain the old behavior, this argument -should be given the value 1. See L. - -=back - -=head3 Changes since isl-0.03 - -=over - -=item * The function C has been -renamed to C. -Similarly, C has been -renamed to C. - -=back - -=head3 Changes since isl-0.04 - -=over - -=item * All header files have been renamed from C -to C. - -=back - -=head3 Changes since isl-0.05 - -=over - -=item * The functions C and -C no longer print a newline. - -=item * The functions C -and C now return -the accesses for which no source could be found instead of -the iterations where those accesses occur. - -=item * The functions C and -C now take the dimension specification -of a B as input. An old call -C can be rewritten to -C. - -=item * The function C no longer takes -a parameter position as input. Instead, the exponent -is now expressed as the domain of the resulting relation. - -=back - -=head3 Changes since isl-0.06 - -=over - -=item * The format of C's -C output has changed. -Use C to obtain the old output. - -=item * The C<*_fast_*> functions have been renamed to C<*_plain_*>. -Some of the old names have been kept for backward compatibility, -but they will be removed in the future. - -=back - -=head1 Installation - -The source of C can be obtained either as a tarball -or from the git repository. Both are available from -L. -The installation process depends on how you obtained -the source. - -=head2 Installation from the git repository - -=over - -=item 1 Clone or update the repository - -The first time the source is obtained, you need to clone -the repository. - - git clone git://repo.or.cz/isl.git - -To obtain updates, you need to pull in the latest changes - - git pull - -=item 2 Generate C - - ./autogen.sh - -=back - -After performing the above steps, continue -with the L. - -=head2 Common installation instructions - -=over - -=item 1 Obtain C - -Building C requires C, including its headers files. -Your distribution may not provide these header files by default -and you may need to install a package called C or something -similar. Alternatively, C can be built from -source, available from L. - -=item 2 Configure - -C uses the standard C C script. -To run it, just type - - ./configure - -optionally followed by some configure options. -A complete list of options can be obtained by running - - ./configure --help - -Below we discuss some of the more common options. - -C can optionally use C, but no -C functionality is currently used by default. -The C<--with-piplib> option can -be used to specify which C -library to use, either an installed version (C), -an externally built version (C) -or no version (C). The option C is mostly useful -in C scripts of larger projects that bundle both C -and C. - -=over - -=item C<--prefix> - -Installation prefix for C - -=item C<--with-gmp-prefix> - -Installation prefix for C (architecture-independent files). - -=item C<--with-gmp-exec-prefix> - -Installation prefix for C (architecture-dependent files). - -=item C<--with-piplib> - -Which copy of C to use, either C (default), C or C. - -=item C<--with-piplib-prefix> - -Installation prefix for C C (architecture-independent files). - -=item C<--with-piplib-exec-prefix> - -Installation prefix for C C (architecture-dependent files). - -=item C<--with-piplib-builddir> - -Location where C C was built. - -=back - -=item 3 Compile - - make - -=item 4 Install (optional) - - make install - -=back - -=head1 Library - -=head2 Initialization - -All manipulations of integer sets and relations occur within -the context of an C. -A given C can only be used within a single thread. -All arguments of a function are required to have been allocated -within the same context. -There are currently no functions available for moving an object -from one C to another C. This means that -there is currently no way of safely moving an object from one -thread to another, unless the whole C is moved. - -An C can be allocated using C and -freed using C. -All objects allocated within an C should be freed -before the C itself is freed. - - isl_ctx *isl_ctx_alloc(); - void isl_ctx_free(isl_ctx *ctx); - -=head2 Integers - -All operations on integers, mainly the coefficients -of the constraints describing the sets and relations, -are performed in exact integer arithmetic using C. -However, to allow future versions of C to optionally -support fixed integer arithmetic, all calls to C -are wrapped inside C specific macros. -The basic type is C and the operations below -are available on this type. -The meanings of these operations are essentially the same -as their C C counterparts. -As always with C types, Cs need to be -initialized with C before they can be used -and they need to be released with C -after the last use. -The user should not assume that an C is represented -as a C, but should instead explicitly convert between -Cs and Cs using C and -C whenever a C is required. - -=over - -=item isl_int_init(i) - -=item isl_int_clear(i) - -=item isl_int_set(r,i) - -=item isl_int_set_si(r,i) - -=item isl_int_set_gmp(r,g) - -=item isl_int_get_gmp(i,g) - -=item isl_int_abs(r,i) - -=item isl_int_neg(r,i) - -=item isl_int_swap(i,j) - -=item isl_int_swap_or_set(i,j) - -=item isl_int_add_ui(r,i,j) - -=item isl_int_sub_ui(r,i,j) - -=item isl_int_add(r,i,j) - -=item isl_int_sub(r,i,j) - -=item isl_int_mul(r,i,j) - -=item isl_int_mul_ui(r,i,j) - -=item isl_int_addmul(r,i,j) - -=item isl_int_submul(r,i,j) - -=item isl_int_gcd(r,i,j) - -=item isl_int_lcm(r,i,j) - -=item isl_int_divexact(r,i,j) - -=item isl_int_cdiv_q(r,i,j) - -=item isl_int_fdiv_q(r,i,j) - -=item isl_int_fdiv_r(r,i,j) - -=item isl_int_fdiv_q_ui(r,i,j) - -=item isl_int_read(r,s) - -=item isl_int_print(out,i,width) - -=item isl_int_sgn(i) - -=item isl_int_cmp(i,j) - -=item isl_int_cmp_si(i,si) - -=item isl_int_eq(i,j) - -=item isl_int_ne(i,j) - -=item isl_int_lt(i,j) - -=item isl_int_le(i,j) - -=item isl_int_gt(i,j) - -=item isl_int_ge(i,j) - -=item isl_int_abs_eq(i,j) - -=item isl_int_abs_ne(i,j) - -=item isl_int_abs_lt(i,j) - -=item isl_int_abs_gt(i,j) - -=item isl_int_abs_ge(i,j) - -=item isl_int_is_zero(i) - -=item isl_int_is_one(i) - -=item isl_int_is_negone(i) - -=item isl_int_is_pos(i) - -=item isl_int_is_neg(i) - -=item isl_int_is_nonpos(i) - -=item isl_int_is_nonneg(i) - -=item isl_int_is_divisible_by(i,j) - -=back - -=head2 Sets and Relations - -C uses six types of objects for representing sets and relations, -C, C, C, C, -C and C. -C and C represent sets and relations that -can be described as a conjunction of affine constraints, while -C and C represent unions of -Cs and Cs, respectively. -However, all Cs or Cs in the union need -to have the same dimension. Cs and Cs -represent unions of Cs or Cs of I dimensions, -where dimensions with different space names -(see L) are considered different as well. -The difference between sets and relations (maps) is that sets have -one set of variables, while relations have two sets of variables, -input variables and output variables. - -=head2 Memory Management - -Since a high-level operation on sets and/or relations usually involves -several substeps and since the user is usually not interested in -the intermediate results, most functions that return a new object -will also release all the objects passed as arguments. -If the user still wants to use one or more of these arguments -after the function call, she should pass along a copy of the -object rather than the object itself. -The user is then responsible for making sure that the original -object gets used somewhere else or is explicitly freed. - -The arguments and return values of all documents functions are -annotated to make clear which arguments are released and which -arguments are preserved. In particular, the following annotations -are used - -=over - -=item C<__isl_give> - -C<__isl_give> means that a new object is returned. -The user should make sure that the returned pointer is -used exactly once as a value for an C<__isl_take> argument. -In between, it can be used as a value for as many -C<__isl_keep> arguments as the user likes. -There is one exception, and that is the case where the -pointer returned is C. Is this case, the user -is free to use it as an C<__isl_take> argument or not. - -=item C<__isl_take> - -C<__isl_take> means that the object the argument points to -is taken over by the function and may no longer be used -by the user as an argument to any other function. -The pointer value must be one returned by a function -returning an C<__isl_give> pointer. -If the user passes in a C value, then this will -be treated as an error in the sense that the function will -not perform its usual operation. However, it will still -make sure that all the the other C<__isl_take> arguments -are released. - -=item C<__isl_keep> - -C<__isl_keep> means that the function will only use the object -temporarily. After the function has finished, the user -can still use it as an argument to other functions. -A C value will be treated in the same way as -a C value for an C<__isl_take> argument. - -=back - -=head2 Dimension Specifications - -Whenever a new set or relation is created from scratch, -its dimension needs to be specified using an C. - - #include - __isl_give isl_dim *isl_dim_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out); - __isl_give isl_dim *isl_dim_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim); - __isl_give isl_dim *isl_dim_copy(__isl_keep isl_dim *dim); - void isl_dim_free(__isl_take isl_dim *dim); - unsigned isl_dim_size(__isl_keep isl_dim *dim, - enum isl_dim_type type); - -The dimension specification used for creating a set -needs to be created using C, while -that for creating a relation -needs to be created using C. -C can be used -to find out the number of dimensions of each type in -a dimension specification, where type may be -C, C (only for relations), -C (only for relations), C -(only for sets) or C. - -It is often useful to create objects that live in the -same space as some other object. This can be accomplished -by creating the new objects -(see L or -L) based on the dimension -specification of the original object. - - #include - __isl_give isl_dim *isl_basic_set_get_dim( - __isl_keep isl_basic_set *bset); - __isl_give isl_dim *isl_set_get_dim(__isl_keep isl_set *set); - - #include - __isl_give isl_dim *isl_union_set_get_dim( - __isl_keep isl_union_set *uset); - - #include - __isl_give isl_dim *isl_basic_map_get_dim( - __isl_keep isl_basic_map *bmap); - __isl_give isl_dim *isl_map_get_dim(__isl_keep isl_map *map); - - #include - __isl_give isl_dim *isl_union_map_get_dim( - __isl_keep isl_union_map *umap); - - #include - __isl_give isl_dim *isl_constraint_get_dim( - __isl_keep isl_constraint *constraint); - - #include - __isl_give isl_dim *isl_qpolynomial_get_dim( - __isl_keep isl_qpolynomial *qp); - __isl_give isl_dim *isl_qpolynomial_fold_get_dim( - __isl_keep isl_qpolynomial_fold *fold); - __isl_give isl_dim *isl_pw_qpolynomial_get_dim( - __isl_keep isl_pw_qpolynomial *pwqp); - __isl_give isl_dim *isl_union_pw_qpolynomial_get_dim( - __isl_keep isl_union_pw_qpolynomial *upwqp); - __isl_give isl_dim *isl_union_pw_qpolynomial_fold_get_dim( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - - #include - __isl_give isl_dim *isl_aff_get_dim( - __isl_keep isl_aff *aff); - __isl_give isl_dim *isl_pw_aff_get_dim( - __isl_keep isl_pw_aff *pwaff); - - #include - __isl_give isl_dim *isl_point_get_dim( - __isl_keep isl_point *pnt); - -The names of the individual dimensions may be set or read off -using the following functions. - - #include - __isl_give isl_dim *isl_dim_set_name(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos, - __isl_keep const char *name); - __isl_keep const char *isl_dim_get_name(__isl_keep isl_dim *dim, - enum isl_dim_type type, unsigned pos); - -Note that C returns a pointer to some internal -data structure, so the result can only be used while the -corresponding C is alive. -Also note that every function that operates on two sets or relations -requires that both arguments have the same parameters. This also -means that if one of the arguments has named parameters, then the -other needs to have named parameters too and the names need to match. -Pairs of C and/or C arguments may -have different parameters (as long as they are named), in which case -the result will have as parameters the union of the parameters of -the arguments. - -The names of entire spaces may be set or read off -using the following functions. - - #include - __isl_give isl_dim *isl_dim_set_tuple_name( - __isl_take isl_dim *dim, - enum isl_dim_type type, const char *s); - const char *isl_dim_get_tuple_name(__isl_keep isl_dim *dim, - enum isl_dim_type type); - -The C argument needs to be one of C, C -or C. As with C, -the C function returns a pointer to some internal -data structure. -Binary operations require the corresponding spaces of their arguments -to have the same name. - -Spaces can be nested. In particular, the domain of a set or -the domain or range of a relation can be a nested relation. -The following functions can be used to construct and deconstruct -such nested dimension specifications. - - #include - int isl_dim_is_wrapping(__isl_keep isl_dim *dim); - __isl_give isl_dim *isl_dim_wrap(__isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_unwrap(__isl_take isl_dim *dim); - -The input to C and C should -be the dimension specification of a set, while that of -C should be the dimension specification of a relation. -Conversely, the output of C is the dimension specification -of a relation, while that of C is the dimension specification -of a set. - -Dimension specifications can be created from other dimension -specifications using the following functions. - - __isl_give isl_dim *isl_dim_domain(__isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_from_domain(__isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_range(__isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_from_range(__isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_reverse(__isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_join(__isl_take isl_dim *left, - __isl_take isl_dim *right); - __isl_give isl_dim *isl_dim_align_params( - __isl_take isl_dim *dim1, __isl_take isl_dim *dim2) - __isl_give isl_dim *isl_dim_insert(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos, unsigned n); - __isl_give isl_dim *isl_dim_add(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned n); - __isl_give isl_dim *isl_dim_drop(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_dim *isl_dim_map_from_set( - __isl_take isl_dim *dim); - __isl_give isl_dim *isl_dim_zip(__isl_take isl_dim *dim); - -Note that if dimensions are added or removed from a space, then -the name and the internal structure are lost. - -=head2 Local Spaces - -A local space is essentially a dimension specification with -zero or more existentially quantified variables. -The local space of a basic set or relation can be obtained -using the following functions. - - #include - __isl_give isl_local_space *isl_basic_set_get_local_space( - __isl_keep isl_basic_set *bset); - - #include - __isl_give isl_local_space *isl_basic_map_get_local_space( - __isl_keep isl_basic_map *bmap); - -A new local space can be created from a dimension specification using - - #include - __isl_give isl_local_space *isl_local_space_from_dim( - __isl_take isl_dim *dim); - -They can be inspected, copied and freed using the following functions. - - #include - isl_ctx *isl_local_space_get_ctx( - __isl_keep isl_local_space *ls); - int isl_local_space_dim(__isl_keep isl_local_space *ls, - enum isl_dim_type type); - const char *isl_local_space_get_dim_name( - __isl_keep isl_local_space *ls, - enum isl_dim_type type, unsigned pos); - __isl_give isl_local_space *isl_local_space_set_dim_name( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, const char *s); - __isl_give isl_dim *isl_local_space_get_dim( - __isl_keep isl_local_space *ls); - __isl_give isl_div *isl_local_space_get_div( - __isl_keep isl_local_space *ls, int pos); - __isl_give isl_local_space *isl_local_space_copy( - __isl_keep isl_local_space *ls); - void *isl_local_space_free(__isl_take isl_local_space *ls); - -Two local spaces can be compared using - - int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, - __isl_keep isl_local_space *ls2); - -Local spaces can be created from other local spaces -using the following functions. - - __isl_give isl_local_space *isl_local_space_from_domain( - __isl_take isl_local_space *ls); - __isl_give isl_local_space *isl_local_space_add_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned n); - __isl_give isl_local_space *isl_local_space_insert_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_local_space *isl_local_space_drop_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); - -=head2 Input and Output - -C supports its own input/output format, which is similar -to the C format, but also supports the C format -in some cases. - -=head3 C format - -The C format is similar to that of C, but has a different -syntax for describing the parameters and allows for the definition -of an existentially quantified variable as the integer division -of an affine expression. -For example, the set of integers C between C<0> and C -such that C can be described as - - [n] -> { [i] : exists (a = [i/10] : 0 <= i and i <= n and - i - 10 a <= 6) } - -A set or relation can have several disjuncts, separated -by the keyword C. Each disjunct is either a conjunction -of constraints or a projection (C) of a conjunction -of constraints. The constraints are separated by the keyword -C. - -=head3 C format - -If the represented set is a union, then the first line -contains a single number representing the number of disjuncts. -Otherwise, a line containing the number C<1> is optional. - -Each disjunct is represented by a matrix of constraints. -The first line contains two numbers representing -the number of rows and columns, -where the number of rows is equal to the number of constraints -and the number of columns is equal to two plus the number of variables. -The following lines contain the actual rows of the constraint matrix. -In each row, the first column indicates whether the constraint -is an equality (C<0>) or inequality (C<1>). The final column -corresponds to the constant term. - -If the set is parametric, then the coefficients of the parameters -appear in the last columns before the constant column. -The coefficients of any existentially quantified variables appear -between those of the set variables and those of the parameters. - -=head3 Extended C format - -The extended C format is nearly identical to the -C format. The only difference is that the line -containing the number of rows and columns of a constraint matrix -also contains four additional numbers: -the number of output dimensions, the number of input dimensions, -the number of local dimensions (i.e., the number of existentially -quantified variables) and the number of parameters. -For sets, the number of ``output'' dimensions is equal -to the number of set dimensions, while the number of ``input'' -dimensions is zero. - -=head3 Input - - #include - __isl_give isl_basic_set *isl_basic_set_read_from_file( - isl_ctx *ctx, FILE *input, int nparam); - __isl_give isl_basic_set *isl_basic_set_read_from_str( - isl_ctx *ctx, const char *str, int nparam); - __isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx, - FILE *input, int nparam); - __isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx, - const char *str, int nparam); - - #include - __isl_give isl_basic_map *isl_basic_map_read_from_file( - isl_ctx *ctx, FILE *input, int nparam); - __isl_give isl_basic_map *isl_basic_map_read_from_str( - isl_ctx *ctx, const char *str, int nparam); - __isl_give isl_map *isl_map_read_from_file( - struct isl_ctx *ctx, FILE *input, int nparam); - __isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx, - const char *str, int nparam); - - #include - __isl_give isl_union_set *isl_union_set_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_union_set *isl_union_set_read_from_str( - struct isl_ctx *ctx, const char *str); - - #include - __isl_give isl_union_map *isl_union_map_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_union_map *isl_union_map_read_from_str( - struct isl_ctx *ctx, const char *str); - -The input format is autodetected and may be either the C format -or the C format. -C specifies how many of the final columns in -the C format correspond to parameters. -If input is given in the C format, then the number -of parameters needs to be equal to C. -If C is negative, then any number of parameters -is accepted in the C format and zero parameters -are assumed in the C format. - -=head3 Output - -Before anything can be printed, an C needs to -be created. - - __isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, - FILE *file); - __isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx); - void isl_printer_free(__isl_take isl_printer *printer); - __isl_give char *isl_printer_get_str( - __isl_keep isl_printer *printer); - -The behavior of the printer can be modified in various ways - - __isl_give isl_printer *isl_printer_set_output_format( - __isl_take isl_printer *p, int output_format); - __isl_give isl_printer *isl_printer_set_indent( - __isl_take isl_printer *p, int indent); - __isl_give isl_printer *isl_printer_indent( - __isl_take isl_printer *p, int indent); - __isl_give isl_printer *isl_printer_set_prefix( - __isl_take isl_printer *p, const char *prefix); - __isl_give isl_printer *isl_printer_set_suffix( - __isl_take isl_printer *p, const char *suffix); - -The C may be either C, C, -C, C or C -and defaults to C. -Each line in the output is indented by C (set by -C) spaces -(default: 0), prefixed by C and suffixed by C. -In the C format output, -the coefficients of the existentially quantified variables -appear between those of the set variables and those -of the parameters. -The function C increases the indentation -by the specified amount (which may be negative). - -To actually print something, use - - #include - __isl_give isl_printer *isl_printer_print_basic_set( - __isl_take isl_printer *printer, - __isl_keep isl_basic_set *bset); - __isl_give isl_printer *isl_printer_print_set( - __isl_take isl_printer *printer, - __isl_keep isl_set *set); - - #include - __isl_give isl_printer *isl_printer_print_basic_map( - __isl_take isl_printer *printer, - __isl_keep isl_basic_map *bmap); - __isl_give isl_printer *isl_printer_print_map( - __isl_take isl_printer *printer, - __isl_keep isl_map *map); - - #include - __isl_give isl_printer *isl_printer_print_union_set( - __isl_take isl_printer *p, - __isl_keep isl_union_set *uset); - - #include - __isl_give isl_printer *isl_printer_print_union_map( - __isl_take isl_printer *p, - __isl_keep isl_union_map *umap); - -When called on a file printer, the following function flushes -the file. When called on a string printer, the buffer is cleared. - - __isl_give isl_printer *isl_printer_flush( - __isl_take isl_printer *p); - -=head2 Creating New Sets and Relations - -C has functions for creating some standard sets and relations. - -=over - -=item * Empty sets and relations - - __isl_give isl_basic_set *isl_basic_set_empty( - __isl_take isl_dim *dim); - __isl_give isl_basic_map *isl_basic_map_empty( - __isl_take isl_dim *dim); - __isl_give isl_set *isl_set_empty( - __isl_take isl_dim *dim); - __isl_give isl_map *isl_map_empty( - __isl_take isl_dim *dim); - __isl_give isl_union_set *isl_union_set_empty( - __isl_take isl_dim *dim); - __isl_give isl_union_map *isl_union_map_empty( - __isl_take isl_dim *dim); - -For Cs and Cs, the dimensions specification -is only used to specify the parameters. - -=item * Universe sets and relations - - __isl_give isl_basic_set *isl_basic_set_universe( - __isl_take isl_dim *dim); - __isl_give isl_basic_map *isl_basic_map_universe( - __isl_take isl_dim *dim); - __isl_give isl_set *isl_set_universe( - __isl_take isl_dim *dim); - __isl_give isl_map *isl_map_universe( - __isl_take isl_dim *dim); - __isl_give isl_union_set *isl_union_set_universe( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_universe( - __isl_take isl_union_map *umap); - -The sets and relations constructed by the functions above -contain all integer values, while those constructed by the -functions below only contain non-negative values. - - __isl_give isl_basic_set *isl_basic_set_nat_universe( - __isl_take isl_dim *dim); - __isl_give isl_basic_map *isl_basic_map_nat_universe( - __isl_take isl_dim *dim); - __isl_give isl_set *isl_set_nat_universe( - __isl_take isl_dim *dim); - __isl_give isl_map *isl_map_nat_universe( - __isl_take isl_dim *dim); - -=item * Identity relations - - __isl_give isl_basic_map *isl_basic_map_identity( - __isl_take isl_dim *dim); - __isl_give isl_map *isl_map_identity( - __isl_take isl_dim *dim); - -The number of input and output dimensions in C needs -to be the same. - -=item * Lexicographic order - - __isl_give isl_map *isl_map_lex_lt( - __isl_take isl_dim *set_dim); - __isl_give isl_map *isl_map_lex_le( - __isl_take isl_dim *set_dim); - __isl_give isl_map *isl_map_lex_gt( - __isl_take isl_dim *set_dim); - __isl_give isl_map *isl_map_lex_ge( - __isl_take isl_dim *set_dim); - __isl_give isl_map *isl_map_lex_lt_first( - __isl_take isl_dim *dim, unsigned n); - __isl_give isl_map *isl_map_lex_le_first( - __isl_take isl_dim *dim, unsigned n); - __isl_give isl_map *isl_map_lex_gt_first( - __isl_take isl_dim *dim, unsigned n); - __isl_give isl_map *isl_map_lex_ge_first( - __isl_take isl_dim *dim, unsigned n); - -The first four functions take a dimension specification for a B -and return relations that express that the elements in the domain -are lexicographically less -(C), less or equal (C), -greater (C) or greater or equal (C) -than the elements in the range. -The last four functions take a dimension specification for a map -and return relations that express that the first C dimensions -in the domain are lexicographically less -(C), less or equal (C), -greater (C) or greater or equal (C) -than the first C dimensions in the range. - -=back - -A basic set or relation can be converted to a set or relation -using the following functions. - - __isl_give isl_set *isl_set_from_basic_set( - __isl_take isl_basic_set *bset); - __isl_give isl_map *isl_map_from_basic_map( - __isl_take isl_basic_map *bmap); - -Sets and relations can be converted to union sets and relations -using the following functions. - - __isl_give isl_union_map *isl_union_map_from_map( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_from_set( - __isl_take isl_set *set); - -The inverse conversions below can only be used if the input -union set or relation is known to contain elements in exactly one -space. - - __isl_give isl_set *isl_set_from_union_set( - __isl_take isl_union_set *uset); - __isl_give isl_map *isl_map_from_union_map( - __isl_take isl_union_map *umap); - -Sets and relations can be copied and freed again using the following -functions. - - __isl_give isl_basic_set *isl_basic_set_copy( - __isl_keep isl_basic_set *bset); - __isl_give isl_set *isl_set_copy(__isl_keep isl_set *set); - __isl_give isl_union_set *isl_union_set_copy( - __isl_keep isl_union_set *uset); - __isl_give isl_basic_map *isl_basic_map_copy( - __isl_keep isl_basic_map *bmap); - __isl_give isl_map *isl_map_copy(__isl_keep isl_map *map); - __isl_give isl_union_map *isl_union_map_copy( - __isl_keep isl_union_map *umap); - void isl_basic_set_free(__isl_take isl_basic_set *bset); - void isl_set_free(__isl_take isl_set *set); - void *isl_union_set_free(__isl_take isl_union_set *uset); - void isl_basic_map_free(__isl_take isl_basic_map *bmap); - void isl_map_free(__isl_take isl_map *map); - void *isl_union_map_free(__isl_take isl_union_map *umap); - -Other sets and relations can be constructed by starting -from a universe set or relation, adding equality and/or -inequality constraints and then projecting out the -existentially quantified variables, if any. -Constraints can be constructed, manipulated and -added to (or removed from) (basic) sets and relations -using the following functions. - - #include - __isl_give isl_constraint *isl_equality_alloc( - __isl_take isl_dim *dim); - __isl_give isl_constraint *isl_inequality_alloc( - __isl_take isl_dim *dim); - void isl_constraint_set_constant( - __isl_keep isl_constraint *constraint, isl_int v); - void isl_constraint_set_coefficient( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int v); - __isl_give isl_basic_map *isl_basic_map_add_constraint( - __isl_take isl_basic_map *bmap, - __isl_take isl_constraint *constraint); - __isl_give isl_basic_set *isl_basic_set_add_constraint( - __isl_take isl_basic_set *bset, - __isl_take isl_constraint *constraint); - __isl_give isl_map *isl_map_add_constraint( - __isl_take isl_map *map, - __isl_take isl_constraint *constraint); - __isl_give isl_set *isl_set_add_constraint( - __isl_take isl_set *set, - __isl_take isl_constraint *constraint); - __isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, - __isl_take isl_constraint *constraint); - -For example, to create a set containing the even integers -between 10 and 42, you would use the following code. - - isl_int v; - struct isl_dim *dim; - struct isl_constraint *c; - struct isl_basic_set *bset; - - isl_int_init(v); - dim = isl_dim_set_alloc(ctx, 0, 2); - bset = isl_basic_set_universe(isl_dim_copy(dim)); - - c = isl_equality_alloc(isl_dim_copy(dim)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 2); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_inequality_alloc(isl_dim_copy(dim)); - isl_int_set_si(v, -10); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_inequality_alloc(dim); - isl_int_set_si(v, 42); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 1); - - isl_int_clear(v); - -Or, alternatively, - - struct isl_basic_set *bset; - bset = isl_basic_set_read_from_str(ctx, - "{[i] : exists (a : i = 2a and i >= 10 and i <= 42)}", -1); - -A basic set or relation can also be constructed from two matrices -describing the equalities and the inequalities. - - __isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( - __isl_take isl_dim *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4); - __isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( - __isl_take isl_dim *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - -The C arguments indicate the order in which -different kinds of variables appear in the input matrices -and should be a permutation of C, C, -C and C for sets and -of C, C, -C, C and C for relations. - -A (basic) relation can also be constructed from a (piecewise) affine expression -or a list of affine expressions (See L<"Piecewise Quasi Affine Expressions">). - - __isl_give isl_basic_map *isl_basic_map_from_aff( - __isl_take isl_aff *aff); - __isl_give isl_map *isl_map_from_pw_aff( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_basic_map *isl_basic_map_from_aff_list( - __isl_take isl_dim *domain_dim, - __isl_take isl_aff_list *list); - -The C argument describes the domain of the resulting -basic relation. It is required because the C may consist -of zero affine expressions. - -=head2 Inspecting Sets and Relations - -Usually, the user should not have to care about the actual constraints -of the sets and maps, but should instead apply the abstract operations -explained in the following sections. -Occasionally, however, it may be required to inspect the individual -coefficients of the constraints. This section explains how to do so. -In these cases, it may also be useful to have C compute -an explicit representation of the existentially quantified variables. - - __isl_give isl_set *isl_set_compute_divs( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_compute_divs( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_compute_divs( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_compute_divs( - __isl_take isl_union_map *umap); - -This explicit representation defines the existentially quantified -variables as integer divisions of the other variables, possibly -including earlier existentially quantified variables. -An explicitly represented existentially quantified variable therefore -has a unique value when the values of the other variables are known. -If, furthermore, the same existentials, i.e., existentials -with the same explicit representations, should appear in the -same order in each of the disjuncts of a set or map, then the user should call -either of the following functions. - - __isl_give isl_set *isl_set_align_divs( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_align_divs( - __isl_take isl_map *map); - -Alternatively, the existentially quantified variables can be removed -using the following functions, which compute an overapproximation. - - __isl_give isl_basic_set *isl_basic_set_remove_divs( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_remove_divs( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_remove_divs( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_remove_divs( - __isl_take isl_map *map); - -To iterate over all the sets or maps in a union set or map, use - - int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_set *set, void *user), - void *user); - int isl_union_map_foreach_map(__isl_keep isl_union_map *umap, - int (*fn)(__isl_take isl_map *map, void *user), - void *user); - -The number of sets or maps in a union set or map can be obtained -from - - int isl_union_set_n_set(__isl_keep isl_union_set *uset); - int isl_union_map_n_map(__isl_keep isl_union_map *umap); - -To extract the set or map from a union with a given dimension -specification, use - - __isl_give isl_set *isl_union_set_extract_set( - __isl_keep isl_union_set *uset, - __isl_take isl_dim *dim); - __isl_give isl_map *isl_union_map_extract_map( - __isl_keep isl_union_map *umap, - __isl_take isl_dim *dim); - -To iterate over all the basic sets or maps in a set or map, use - - int isl_set_foreach_basic_set(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_basic_set *bset, void *user), - void *user); - int isl_map_foreach_basic_map(__isl_keep isl_map *map, - int (*fn)(__isl_take isl_basic_map *bmap, void *user), - void *user); - -The callback function C should return 0 if successful and --1 if an error occurs. In the latter case, or if any other error -occurs, the above functions will return -1. - -It should be noted that C does not guarantee that -the basic sets or maps passed to C are disjoint. -If this is required, then the user should call one of -the following functions first. - - __isl_give isl_set *isl_set_make_disjoint( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_make_disjoint( - __isl_take isl_map *map); - -The number of basic sets in a set can be obtained -from - - int isl_set_n_basic_set(__isl_keep isl_set *set); - -To iterate over the constraints of a basic set or map, use - - #include - - int isl_basic_map_foreach_constraint( - __isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_constraint *c, void *user), - void *user); - void isl_constraint_free(struct isl_constraint *c); - -Again, the callback function C should return 0 if successful and --1 if an error occurs. In the latter case, or if any other error -occurs, the above functions will return -1. -The constraint C represents either an equality or an inequality. -Use the following function to find out whether a constraint -represents an equality. If not, it represents an inequality. - - int isl_constraint_is_equality( - __isl_keep isl_constraint *constraint); - -The coefficients of the constraints can be inspected using -the following functions. - - void isl_constraint_get_constant( - __isl_keep isl_constraint *constraint, isl_int *v); - void isl_constraint_get_coefficient( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int *v); - int isl_constraint_involves_dims( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned first, unsigned n); - -The explicit representations of the existentially quantified -variables can be inspected using the following functions. -Note that the user is only allowed to use these functions -if the inspected set or map is the result of a call -to C or C. - - __isl_give isl_div *isl_constraint_div( - __isl_keep isl_constraint *constraint, int pos); - isl_ctx *isl_div_get_ctx(__isl_keep isl_div *div); - void isl_div_get_constant(__isl_keep isl_div *div, - isl_int *v); - void isl_div_get_denominator(__isl_keep isl_div *div, - isl_int *v); - void isl_div_get_coefficient(__isl_keep isl_div *div, - enum isl_dim_type type, int pos, isl_int *v); - -To obtain the constraints of a basic set or map in matrix -form, use the following functions. - - __isl_give isl_mat *isl_basic_set_equalities_matrix( - __isl_keep isl_basic_set *bset, - enum isl_dim_type c1, enum isl_dim_type c2, - enum isl_dim_type c3, enum isl_dim_type c4); - __isl_give isl_mat *isl_basic_set_inequalities_matrix( - __isl_keep isl_basic_set *bset, - enum isl_dim_type c1, enum isl_dim_type c2, - enum isl_dim_type c3, enum isl_dim_type c4); - __isl_give isl_mat *isl_basic_map_equalities_matrix( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - __isl_give isl_mat *isl_basic_map_inequalities_matrix( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - -The C arguments dictate the order in which -different kinds of variables appear in the resulting matrix -and should be a permutation of C, C, -C, C and C. - -The names of the domain and range spaces of a set or relation can be -read off or set using the following functions. - - const char *isl_basic_set_get_tuple_name( - __isl_keep isl_basic_set *bset); - __isl_give isl_basic_set *isl_basic_set_set_tuple_name( - __isl_take isl_basic_set *set, const char *s); - const char *isl_set_get_tuple_name( - __isl_keep isl_set *set); - const char *isl_basic_map_get_tuple_name( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type); - const char *isl_map_get_tuple_name( - __isl_keep isl_map *map, - enum isl_dim_type type); - -As with C, the value returned points to -an internal data structure. -The names of individual dimensions can be read off using -the following functions. - - const char *isl_constraint_get_dim_name( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned pos); - const char *isl_basic_set_get_dim_name( - __isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos); - const char *isl_set_get_dim_name( - __isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - const char *isl_basic_map_get_dim_name( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos); - const char *isl_map_get_dim_name( - __isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); - -These functions are mostly useful to obtain the names -of the parameters. - -=head2 Properties - -=head3 Unary Properties - -=over - -=item * Emptiness - -The following functions test whether the given set or relation -contains any integer points. The ``plain'' variants do not perform -any computations, but simply check if the given set or relation -is already known to be empty. - - int isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset); - int isl_basic_set_is_empty(__isl_keep isl_basic_set *bset); - int isl_set_plain_is_empty(__isl_keep isl_set *set); - int isl_set_is_empty(__isl_keep isl_set *set); - int isl_union_set_is_empty(__isl_keep isl_union_set *uset); - int isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap); - int isl_basic_map_is_empty(__isl_keep isl_basic_map *bmap); - int isl_map_plain_is_empty(__isl_keep isl_map *map); - int isl_map_is_empty(__isl_keep isl_map *map); - int isl_union_map_is_empty(__isl_keep isl_union_map *umap); - -=item * Universality - - int isl_basic_set_is_universe(__isl_keep isl_basic_set *bset); - int isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap); - int isl_set_plain_is_universe(__isl_keep isl_set *set); - -=item * Single-valuedness - - int isl_map_is_single_valued(__isl_keep isl_map *map); - int isl_union_map_is_single_valued(__isl_keep isl_union_map *umap); - -=item * Injectivity - - int isl_map_plain_is_injective(__isl_keep isl_map *map); - int isl_map_is_injective(__isl_keep isl_map *map); - int isl_union_map_plain_is_injective( - __isl_keep isl_union_map *umap); - int isl_union_map_is_injective( - __isl_keep isl_union_map *umap); - -=item * Bijectivity - - int isl_map_is_bijective(__isl_keep isl_map *map); - int isl_union_map_is_bijective(__isl_keep isl_union_map *umap); - -=item * Wrapping - -The following functions check whether the domain of the given -(basic) set is a wrapped relation. - - int isl_basic_set_is_wrapping( - __isl_keep isl_basic_set *bset); - int isl_set_is_wrapping(__isl_keep isl_set *set); - -=item * Internal Product - - int isl_basic_map_can_zip( - __isl_keep isl_basic_map *bmap); - int isl_map_can_zip(__isl_keep isl_map *map); - -Check whether the product of domain and range of the given relation -can be computed, -i.e., whether both domain and range are nested relations. - -=back - -=head3 Binary Properties - -=over - -=item * Equality - - int isl_set_plain_is_equal(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_set_is_equal(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_union_set_is_equal( - __isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - int isl_basic_map_is_equal( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - int isl_map_is_equal(__isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_map_plain_is_equal(__isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_union_map_is_equal( - __isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - -=item * Disjointness - - int isl_set_plain_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - -=item * Subset - - int isl_set_is_subset(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_set_is_strict_subset( - __isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_union_set_is_subset( - __isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - int isl_union_set_is_strict_subset( - __isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - int isl_basic_map_is_subset( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - int isl_basic_map_is_strict_subset( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - int isl_map_is_subset( - __isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_map_is_strict_subset( - __isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_union_map_is_subset( - __isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - int isl_union_map_is_strict_subset( - __isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - -=back - -=head2 Unary Operations - -=over - -=item * Complement - - __isl_give isl_set *isl_set_complement( - __isl_take isl_set *set); - -=item * Inverse map - - __isl_give isl_basic_map *isl_basic_map_reverse( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_reverse( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_reverse( - __isl_take isl_union_map *umap); - -=item * Projection - - __isl_give isl_basic_set *isl_basic_set_project_out( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_basic_set *isl_basic_map_domain( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_set *isl_basic_map_range( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_map_domain( - __isl_take isl_map *bmap); - __isl_give isl_set *isl_map_range( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_map_domain( - __isl_take isl_union_map *umap); - __isl_give isl_union_set *isl_union_map_range( - __isl_take isl_union_map *umap); - - __isl_give isl_basic_map *isl_basic_map_domain_map( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_map *isl_basic_map_range_map( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map); - __isl_give isl_map *isl_map_range_map(__isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_domain_map( - __isl_take isl_union_map *umap); - __isl_give isl_union_map *isl_union_map_range_map( - __isl_take isl_union_map *umap); - -The functions above construct a (basic, regular or union) relation -that maps (a wrapped version of) the input relation to its domain or range. - -=item * Elimination - - __isl_give isl_set *isl_set_eliminate( - __isl_take isl_set *set, enum isl_dim_type type, - unsigned first, unsigned n); - -Eliminate the coefficients for the given dimensions from the constraints, -without removing the dimensions. - -=item * Slicing - - __isl_give isl_basic_set *isl_basic_set_fix( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, - isl_int value); - __isl_give isl_basic_set *isl_basic_set_fix_si( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_set *isl_set_fix(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, - isl_int value); - __isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_basic_map *isl_basic_map_fix_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); - -Intersect the set or relation with the hyperplane where the given -dimension has the fixed given value. - -=item * Identity - - __isl_give isl_map *isl_set_identity( - __isl_take isl_set *set); - __isl_give isl_union_map *isl_union_set_identity( - __isl_take isl_union_set *uset); - -Construct an identity relation on the given (union) set. - -=item * Deltas - - __isl_give isl_basic_set *isl_basic_map_deltas( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_map_deltas(__isl_take isl_map *map); - __isl_give isl_union_set *isl_union_map_deltas( - __isl_take isl_union_map *umap); - -These functions return a (basic) set containing the differences -between image elements and corresponding domain elements in the input. - - __isl_give isl_basic_map *isl_basic_map_deltas_map( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_deltas_map( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_deltas_map( - __isl_take isl_union_map *umap); - -The functions above construct a (basic, regular or union) relation -that maps (a wrapped version of) the input relation to its delta set. - -=item * Coalescing - -Simplify the representation of a set or relation by trying -to combine pairs of basic sets or relations into a single -basic set or relation. - - __isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set); - __isl_give isl_map *isl_map_coalesce(__isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_coalesce( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_coalesce( - __isl_take isl_union_map *umap); - -=item * Detecting equalities - - __isl_give isl_basic_set *isl_basic_set_detect_equalities( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_detect_equalities( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_detect_equalities( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_detect_equalities( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_detect_equalities( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_detect_equalities( - __isl_take isl_union_map *umap); - -Simplify the representation of a set or relation by detecting implicit -equalities. - -=item * Removing redundant constraints - - __isl_give isl_basic_set *isl_basic_set_remove_redundancies( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_remove_redundancies( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_basic_map_remove_redundancies( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_remove_redundancies( - __isl_take isl_map *map); - -=item * Convex hull - - __isl_give isl_basic_set *isl_set_convex_hull( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_map_convex_hull( - __isl_take isl_map *map); - -If the input set or relation has any existentially quantified -variables, then the result of these operations is currently undefined. - -=item * Simple hull - - __isl_give isl_basic_set *isl_set_simple_hull( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_map_simple_hull( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_simple_hull( - __isl_take isl_union_map *umap); - -These functions compute a single basic set or relation -that contains the whole input set or relation. -In particular, the output is described by translates -of the constraints describing the basic sets or relations in the input. - -=begin latex - -(See \autoref{s:simple hull}.) - -=end latex - -=item * Affine hull - - __isl_give isl_basic_set *isl_basic_set_affine_hull( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_set_affine_hull( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_affine_hull( - __isl_take isl_union_set *uset); - __isl_give isl_basic_map *isl_basic_map_affine_hull( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_map *isl_map_affine_hull( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_affine_hull( - __isl_take isl_union_map *umap); - -In case of union sets and relations, the affine hull is computed -per space. - -=item * Polyhedral hull - - __isl_give isl_basic_set *isl_set_polyhedral_hull( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_map_polyhedral_hull( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_polyhedral_hull( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_polyhedral_hull( - __isl_take isl_union_map *umap); - -These functions compute a single basic set or relation -not involving any existentially quantified variables -that contains the whole input set or relation. -In case of union sets and relations, the polyhedral hull is computed -per space. - -=item * Optimization - - #include - enum isl_lp_result isl_basic_set_max( - __isl_keep isl_basic_set *bset, - __isl_keep isl_aff *obj, isl_int *opt) - enum isl_lp_result isl_set_max(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt); - -Compute the maximum of the integer affine expression C -over the points in C, returning the result in C. -The return value may be one of C, -C, C or C. - -=item * Parametric optimization - - __isl_give isl_pw_aff *isl_set_dim_max( - __isl_take isl_set *set, int pos); - -Compute the maximum of the given set dimension as a function of the -parameters, but independently of the other set dimensions. -For lexicographic optimization, see L<"Lexicographic Optimization">. - -=item * Dual - -The following functions compute either the set of (rational) coefficient -values of valid constraints for the given set or the set of (rational) -values satisfying the constraints with coefficients from the given set. -Internally, these two sets of functions perform essentially the -same operations, except that the set of coefficients is assumed to -be a cone, while the set of values may be any polyhedron. -The current implementation is based on the Farkas lemma and -Fourier-Motzkin elimination, but this may change or be made optional -in future. In particular, future implementations may use different -dualization algorithms or skip the elimination step. - - __isl_give isl_basic_set *isl_basic_set_coefficients( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_set_coefficients( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_coefficients( - __isl_take isl_union_set *bset); - __isl_give isl_basic_set *isl_basic_set_solutions( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_set_solutions( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_solutions( - __isl_take isl_union_set *bset); - -=item * Power - - __isl_give isl_map *isl_map_power(__isl_take isl_map *map, - int *exact); - __isl_give isl_union_map *isl_union_map_power( - __isl_take isl_union_map *umap, int *exact); - -Compute a parametric representation for all positive powers I of C. -The result maps I to a nested relation corresponding to the -Ith power of C. -The result may be an overapproximation. If the result is known to be exact, -then C<*exact> is set to C<1>. - -=item * Transitive closure - - __isl_give isl_map *isl_map_transitive_closure( - __isl_take isl_map *map, int *exact); - __isl_give isl_union_map *isl_union_map_transitive_closure( - __isl_take isl_union_map *umap, int *exact); - -Compute the transitive closure of C. -The result may be an overapproximation. If the result is known to be exact, -then C<*exact> is set to C<1>. - -=item * Reaching path lengths - - __isl_give isl_map *isl_map_reaching_path_lengths( - __isl_take isl_map *map, int *exact); - -Compute a relation that maps each element in the range of C -to the lengths of all paths composed of edges in C that -end up in the given element. -The result may be an overapproximation. If the result is known to be exact, -then C<*exact> is set to C<1>. -To compute the I path length, the resulting relation -should be postprocessed by C. -In particular, if the input relation is a dependence relation -(mapping sources to sinks), then the maximal path length corresponds -to the free schedule. -Note, however, that C expects the maximum to be -finite, so if the path lengths are unbounded (possibly due to -the overapproximation), then you will get an error message. - -=item * Wrapping - - __isl_give isl_basic_set *isl_basic_map_wrap( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_map_wrap( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_map_wrap( - __isl_take isl_union_map *umap); - __isl_give isl_basic_map *isl_basic_set_unwrap( - __isl_take isl_basic_set *bset); - __isl_give isl_map *isl_set_unwrap( - __isl_take isl_set *set); - __isl_give isl_union_map *isl_union_set_unwrap( - __isl_take isl_union_set *uset); - -=item * Flattening - -Remove any internal structure of domain (and range) of the given -set or relation. If there is any such internal structure in the input, -then the name of the space is also removed. - - __isl_give isl_basic_set *isl_basic_set_flatten( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_flatten( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_basic_map_flatten_range( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_flatten_range( - __isl_take isl_map *map); - __isl_give isl_basic_map *isl_basic_map_flatten( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_flatten( - __isl_take isl_map *map); - - __isl_give isl_map *isl_set_flatten_map( - __isl_take isl_set *set); - -The function above constructs a relation -that maps the input set to a flattened version of the set. - -=item * Lifting - -Lift the input set to a space with extra dimensions corresponding -to the existentially quantified variables in the input. -In particular, the result lives in a wrapped map where the domain -is the original space and the range corresponds to the original -existentially quantified variables. - - __isl_give isl_basic_set *isl_basic_set_lift( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_lift( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_lift( - __isl_take isl_union_set *uset); - -=item * Internal Product - - __isl_give isl_basic_map *isl_basic_map_zip( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_zip( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_zip( - __isl_take isl_union_map *umap); - -Given a relation with nested relations for domain and range, -interchange the range of the domain with the domain of the range. - -=item * Aligning parameters - - __isl_give isl_set *isl_set_align_params( - __isl_take isl_set *set, - __isl_take isl_dim *model); - __isl_give isl_map *isl_map_align_params( - __isl_take isl_map *map, - __isl_take isl_dim *model); - -Change the order of the parameters of the given set or relation -such that the first parameters match those of C. -This may involve the introduction of extra parameters. -All parameters need to be named. - -=item * Dimension manipulation - - __isl_give isl_set *isl_set_add_dims( - __isl_take isl_set *set, - enum isl_dim_type type, unsigned n); - __isl_give isl_map *isl_map_add_dims( - __isl_take isl_map *map, - enum isl_dim_type type, unsigned n); - -It is usually not advisable to directly change the (input or output) -space of a set or a relation as this removes the name and the internal -structure of the space. However, the above functions can be useful -to add new parameters, assuming -C and C -are not sufficient. - -=back - -=head2 Binary Operations - -The two arguments of a binary operation not only need to live -in the same C, they currently also need to have -the same (number of) parameters. - -=head3 Basic Operations - -=over - -=item * Intersection - - __isl_give isl_basic_set *isl_basic_set_intersect( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_set *isl_set_intersect_params( - __isl_take isl_set *set, - __isl_take isl_set *params); - __isl_give isl_set *isl_set_intersect( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_union_set *isl_union_set_intersect( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_basic_map *isl_basic_map_intersect_domain( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_intersect_range( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_intersect( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_intersect_params( - __isl_take isl_map *map, - __isl_take isl_set *params); - __isl_give isl_map *isl_map_intersect_domain( - __isl_take isl_map *map, - __isl_take isl_set *set); - __isl_give isl_map *isl_map_intersect_range( - __isl_take isl_map *map, - __isl_take isl_set *set); - __isl_give isl_map *isl_map_intersect( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_intersect_domain( - __isl_take isl_union_map *umap, - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_intersect_range( - __isl_take isl_union_map *umap, - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_intersect( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Union - - __isl_give isl_set *isl_basic_set_union( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_map *isl_basic_map_union( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_set *isl_set_union( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_map *isl_map_union( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_set *isl_union_set_union( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_union_map *isl_union_map_union( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Set difference - - __isl_give isl_set *isl_set_subtract( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_map *isl_map_subtract( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_set *isl_union_set_subtract( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_union_map *isl_union_map_subtract( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Application - - __isl_give isl_basic_set *isl_basic_set_apply( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_apply( - __isl_take isl_set *set, - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_apply( - __isl_take isl_union_set *uset, - __isl_take isl_union_map *umap); - __isl_give isl_basic_map *isl_basic_map_apply_domain( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_basic_map *isl_basic_map_apply_range( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_apply_domain( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_apply_domain( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - __isl_give isl_map *isl_map_apply_range( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_apply_range( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Cartesian Product - - __isl_give isl_set *isl_set_product( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_union_set *isl_union_set_product( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_basic_map *isl_basic_map_range_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_range_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_range_product( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - __isl_give isl_map *isl_map_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_product( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -The above functions compute the cross product of the given -sets or relations. The domains and ranges of the results -are wrapped maps between domains and ranges of the inputs. -To obtain a ``flat'' product, use the following functions -instead. - - __isl_give isl_basic_set *isl_basic_set_flat_product( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_set *isl_set_flat_product( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_basic_map *isl_basic_map_flat_range_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_flat_range_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_flat_range_product( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - __isl_give isl_basic_map *isl_basic_map_flat_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_flat_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - -=item * Simplification - - __isl_give isl_basic_set *isl_basic_set_gist( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context); - __isl_give isl_set *isl_set_gist(__isl_take isl_set *set, - __isl_take isl_set *context); - __isl_give isl_union_set *isl_union_set_gist( - __isl_take isl_union_set *uset, - __isl_take isl_union_set *context); - __isl_give isl_basic_map *isl_basic_map_gist( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_map *context); - __isl_give isl_map *isl_map_gist(__isl_take isl_map *map, - __isl_take isl_map *context); - __isl_give isl_union_map *isl_union_map_gist( - __isl_take isl_union_map *umap, - __isl_take isl_union_map *context); - -The gist operation returns a set or relation that has the -same intersection with the context as the input set or relation. -Any implicit equality in the intersection is made explicit in the result, -while all inequalities that are redundant with respect to the intersection -are removed. -In case of union sets and relations, the gist operation is performed -per space. - -=back - -=head3 Lexicographic Optimization - -Given a (basic) set C (or C) and a zero-dimensional domain C, -the following functions -compute a set that contains the lexicographic minimum or maximum -of the elements in C (or C) for those values of the parameters -that satisfy C. -If C is not C, then C<*empty> is assigned a set -that contains the parameter values in C for which C (or C) -has no elements. -In other words, the union of the parameter values -for which the result is non-empty and of C<*empty> -is equal to C. - - __isl_give isl_set *isl_basic_set_partial_lexmin( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_set *isl_basic_set_partial_lexmax( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_set *isl_set_partial_lexmin( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); - __isl_give isl_set *isl_set_partial_lexmax( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); - -Given a (basic) set C (or C), the following functions simply -return a set containing the lexicographic minimum or maximum -of the elements in C (or C). -In case of union sets, the optimum is computed per space. - - __isl_give isl_set *isl_basic_set_lexmin( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_basic_set_lexmax( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_lexmin( - __isl_take isl_set *set); - __isl_give isl_set *isl_set_lexmax( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_lexmin( - __isl_take isl_union_set *uset); - __isl_give isl_union_set *isl_union_set_lexmax( - __isl_take isl_union_set *uset); - -Given a (basic) relation C (or C) and a domain C, -the following functions -compute a relation that maps each element of C -to the single lexicographic minimum or maximum -of the elements that are associated to that same -element in C (or C). -If C is not C, then C<*empty> is assigned a set -that contains the elements in C that do not map -to any elements in C (or C). -In other words, the union of the domain of the result and of C<*empty> -is equal to C. - - __isl_give isl_map *isl_basic_map_partial_lexmax( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_map *isl_basic_map_partial_lexmin( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_map *isl_map_partial_lexmax( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); - __isl_give isl_map *isl_map_partial_lexmin( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); - -Given a (basic) map C (or C), the following functions simply -return a map mapping each element in the domain of -C (or C) to the lexicographic minimum or maximum -of all elements associated to that element. -In case of union relations, the optimum is computed per space. - - __isl_give isl_map *isl_basic_map_lexmin( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_basic_map_lexmax( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_lexmin( - __isl_take isl_map *map); - __isl_give isl_map *isl_map_lexmax( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_lexmin( - __isl_take isl_union_map *umap); - __isl_give isl_union_map *isl_union_map_lexmax( - __isl_take isl_union_map *umap); - -=head2 Lists - -Lists are defined over several element types, including -C, C and C. -Here we take lists of Cs as an example. -Lists can be created, copied and freed using the following functions. - - #include - __isl_give isl_set_list *isl_set_list_alloc( - isl_ctx *ctx, int n); - __isl_give isl_set_list *isl_set_list_copy( - __isl_keep isl_set_list *list); - __isl_give isl_set_list *isl_set_list_add( - __isl_take isl_set_list *list, - __isl_take isl_set *el); - void isl_set_list_free(__isl_take isl_set_list *list); - -C creates an empty list with a capacity for -C elements. - -Lists can be inspected using the following functions. - - #include - isl_ctx *isl_set_list_get_ctx(__isl_keep isl_set_list *list); - int isl_set_list_n_set(__isl_keep isl_set_list *list); - __isl_give struct isl_set *isl_set_list_get_set( - __isl_keep isl_set_list *list, int index); - int isl_set_list_foreach(__isl_keep isl_set_list *list, - int (*fn)(__isl_take struct isl_set *el, void *user), - void *user); - -Lists can be printed using - - #include - __isl_give isl_printer *isl_printer_print_set_list( - __isl_take isl_printer *p, - __isl_keep isl_set_list *list); - -=head2 Matrices - -Matrices can be created, copied and freed using the following functions. - - #include - __isl_give isl_mat *isl_mat_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_col); - __isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); - void isl_mat_free(__isl_take isl_mat *mat); - -Note that the elements of a newly created matrix may have arbitrary values. -The elements can be changed and inspected using the following functions. - - isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat); - int isl_mat_rows(__isl_keep isl_mat *mat); - int isl_mat_cols(__isl_keep isl_mat *mat); - int isl_mat_get_element(__isl_keep isl_mat *mat, - int row, int col, isl_int *v); - __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, - int row, int col, isl_int v); - __isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, - int row, int col, int v); - -C will return a negative value if anything went wrong. -In that case, the value of C<*v> is undefined. - -The following function can be used to compute the (right) inverse -of a matrix, i.e., a matrix such that the product of the original -and the inverse (in that order) is a multiple of the identity matrix. -The input matrix is assumed to be of full row-rank. - - __isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat); - -The following function can be used to compute the (right) kernel -(or null space) of a matrix, i.e., a matrix such that the product of -the original and the kernel (in that order) is the zero matrix. - - __isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat); - -=head2 Piecewise Quasi Affine Expressions - -The zero quasi affine expression can be created using - - __isl_give isl_aff *isl_aff_zero( - __isl_take isl_local_space *ls); - -A quasi affine expression can also be initialized from an C: - - #include - __isl_give isl_aff *isl_aff_from_div(__isl_take isl_div *div); - -An empty piecewise quasi affine expression (one with no cells) -or a piecewise quasi affine expression with a single cell can -be created using the following functions. - - #include - __isl_give isl_pw_aff *isl_pw_aff_empty( - __isl_take isl_dim *dim); - __isl_give isl_pw_aff *isl_pw_aff_alloc( - __isl_take isl_set *set, __isl_take isl_aff *aff); - -Quasi affine expressions can be copied and freed using - - #include - __isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff); - void *isl_aff_free(__isl_take isl_aff *aff); - - __isl_give isl_pw_aff *isl_pw_aff_copy( - __isl_keep isl_pw_aff *pwaff); - void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff); - -A (rational) bound on a dimension can be extracted from an C -using the following function. The constraint is required to have -a non-zero coefficient for the specified dimension. - - #include - __isl_give isl_aff *isl_constraint_get_bound( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos); - -The entire affine expression of the constraint can also be extracted -using the following function. - - #include - __isl_give isl_aff *isl_constraint_get_aff( - __isl_keep isl_constraint *constraint); - -Conversely, an equality constraint equating -the affine expression to zero or an inequality constraint enforcing -the affine expression to be non-negative, can be constructed using - - __isl_give isl_constraint *isl_equality_from_aff( - __isl_take isl_aff *aff); - __isl_give isl_constraint *isl_inequality_from_aff( - __isl_take isl_aff *aff); - -The expression can be inspected using - - #include - isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff); - int isl_aff_dim(__isl_keep isl_aff *aff, - enum isl_dim_type type); - __isl_give isl_local_space *isl_aff_get_local_space( - __isl_keep isl_aff *aff); - const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned pos); - int isl_aff_get_constant(__isl_keep isl_aff *aff, - isl_int *v); - int isl_aff_get_coefficient(__isl_keep isl_aff *aff, - enum isl_dim_type type, int pos, isl_int *v); - int isl_aff_get_denominator(__isl_keep isl_aff *aff, - isl_int *v); - __isl_give isl_div *isl_aff_get_div( - __isl_keep isl_aff *aff, int pos); - - int isl_aff_involves_dims(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - - isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff); - unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, - enum isl_dim_type type); - int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff); - -It can be modified using - - #include - __isl_give isl_aff *isl_aff_set_dim_name( - __isl_take isl_aff *aff, enum isl_dim_type type, - unsigned pos, const char *s); - __isl_give isl_aff *isl_aff_set_constant( - __isl_take isl_aff *aff, isl_int v); - __isl_give isl_aff *isl_aff_set_constant_si( - __isl_take isl_aff *aff, int v); - __isl_give isl_aff *isl_aff_set_coefficient( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); - __isl_give isl_aff *isl_aff_set_coefficient_si( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); - __isl_give isl_aff *isl_aff_set_denominator( - __isl_take isl_aff *aff, isl_int v); - - __isl_give isl_aff *isl_aff_add_constant( - __isl_take isl_aff *aff, isl_int v); - __isl_give isl_aff *isl_aff_add_constant_si( - __isl_take isl_aff *aff, int v); - __isl_give isl_aff *isl_aff_add_coefficient( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); - __isl_give isl_aff *isl_aff_add_coefficient_si( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); - - __isl_give isl_aff *isl_aff_insert_dims( - __isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_pw_aff *isl_pw_aff_insert_dims( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_aff *isl_aff_add_dims( - __isl_take isl_aff *aff, - enum isl_dim_type type, unsigned n); - __isl_give isl_pw_aff *isl_pw_aff_add_dims( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned n); - __isl_give isl_aff *isl_aff_drop_dims( - __isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_pw_aff *isl_pw_aff_drop_dims( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - -Note that the C and C functions -set the I of the constant or coefficient, while -C and C add an integer value to -the possibly rational constant or coefficient. - -To check whether an affine expressions is obviously zero -or obviously equal to some other affine expression, use - - #include - int isl_aff_plain_is_zero(__isl_keep isl_aff *aff); - int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, - __isl_keep isl_aff *aff2); - -Operations include - - #include - __isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - __isl_give isl_pw_aff *isl_pw_aff_add( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - __isl_give isl_pw_aff *isl_pw_aff_sub( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_neg( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_ceil( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_floor( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, - isl_int f); - __isl_give isl_pw_aff *isl_pw_aff_scale( - __isl_take isl_pw_aff *pwaff, isl_int f); - __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, - isl_int f); - __isl_give isl_aff *isl_aff_scale_down_ui( - __isl_take isl_aff *aff, unsigned f); - __isl_give isl_pw_aff *isl_pw_aff_scale_down( - __isl_take isl_pw_aff *pwaff, isl_int f); - - __isl_give isl_pw_aff *isl_pw_aff_coalesce( - __isl_take isl_pw_aff *pwqp); - - __isl_give isl_pw_aff *isl_pw_aff_align_params( - __isl_take isl_pw_aff *pwaff, - __isl_take isl_dim *model); - - __isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, - __isl_take isl_set *context); - __isl_give isl_pw_aff *isl_pw_aff_gist( - __isl_take isl_pw_aff *pwaff, - __isl_take isl_set *context); - - __isl_give isl_set *isl_pw_aff_domain( - __isl_take isl_pw_aff *pwaff); - - __isl_give isl_basic_set *isl_aff_ge_basic_set( - __isl_take isl_aff *aff1, __isl_take isl_aff *aff2); - __isl_give isl_set *isl_pw_aff_eq_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_le_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_lt_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_ge_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_gt_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -The function C returns a basic set -containing those elements in the shared space -of C and C where C is greater than or equal to C. -The function C returns a set -containing those elements in the shared domain -of C and C where C is greater than or equal to C. - - #include - __isl_give isl_set *isl_pw_aff_nonneg_set( - __isl_take isl_pw_aff *pwaff); - -The function C returns a set -containing those elements in the domain -of C where C is non-negative. - - #include - __isl_give isl_pw_aff *isl_pw_aff_cond( - __isl_take isl_set *cond, - __isl_take isl_pw_aff *pwaff_true, - __isl_take isl_pw_aff *pwaff_false); - -The function C performs a conditional operator -and returns an expression that is equal to C -for elements in C and equal to C for elements -not in C. - - #include - __isl_give isl_pw_aff *isl_pw_aff_max( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -The function C computes a piecewise quasi-affine -expression with a domain that is the union of those of C and -C and such that on each cell, the quasi-affine expression is -the maximum of those of C and C. If only one of -C or C is defined on a given cell, then the -associated expression is the defined one. - -An expression can be printed using - - #include - __isl_give isl_printer *isl_printer_print_aff( - __isl_take isl_printer *p, __isl_keep isl_aff *aff); - - __isl_give isl_printer *isl_printer_print_pw_aff( - __isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff); - -=head2 Points - -Points are elements of a set. They can be used to construct -simple sets (boxes) or they can be used to represent the -individual elements of a set. -The zero point (the origin) can be created using - - __isl_give isl_point *isl_point_zero(__isl_take isl_dim *dim); - -The coordinates of a point can be inspected, set and changed -using - - void isl_point_get_coordinate(__isl_keep isl_point *pnt, - enum isl_dim_type type, int pos, isl_int *v); - __isl_give isl_point *isl_point_set_coordinate( - __isl_take isl_point *pnt, - enum isl_dim_type type, int pos, isl_int v); - - __isl_give isl_point *isl_point_add_ui( - __isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); - __isl_give isl_point *isl_point_sub_ui( - __isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); - -Other properties can be obtained using - - isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); - -Points can be copied or freed using - - __isl_give isl_point *isl_point_copy( - __isl_keep isl_point *pnt); - void isl_point_free(__isl_take isl_point *pnt); - -A singleton set can be created from a point using - - __isl_give isl_basic_set *isl_basic_set_from_point( - __isl_take isl_point *pnt); - __isl_give isl_set *isl_set_from_point( - __isl_take isl_point *pnt); - -and a box can be created from two opposite extremal points using - - __isl_give isl_basic_set *isl_basic_set_box_from_points( - __isl_take isl_point *pnt1, - __isl_take isl_point *pnt2); - __isl_give isl_set *isl_set_box_from_points( - __isl_take isl_point *pnt1, - __isl_take isl_point *pnt2); - -All elements of a B (union) set can be enumerated using -the following functions. - - int isl_set_foreach_point(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_point *pnt, void *user), - void *user); - int isl_union_set_foreach_point(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_point *pnt, void *user), - void *user); - -The function C is called for each integer point in -C with as second argument the last argument of -the C call. The function C -should return C<0> on success and C<-1> on failure. -In the latter case, C will stop -enumerating and return C<-1> as well. -If the enumeration is performed successfully and to completion, -then C returns C<0>. - -To obtain a single point of a (basic) set, use - - __isl_give isl_point *isl_basic_set_sample_point( - __isl_take isl_basic_set *bset); - __isl_give isl_point *isl_set_sample_point( - __isl_take isl_set *set); - -If C does not contain any (integer) points, then the -resulting point will be ``void'', a property that can be -tested using - - int isl_point_is_void(__isl_keep isl_point *pnt); - -=head2 Piecewise Quasipolynomials - -A piecewise quasipolynomial is a particular kind of function that maps -a parametric point to a rational value. -More specifically, a quasipolynomial is a polynomial expression in greatest -integer parts of affine expressions of parameters and variables. -A piecewise quasipolynomial is a subdivision of a given parametric -domain into disjoint cells with a quasipolynomial associated to -each cell. The value of the piecewise quasipolynomial at a given -point is the value of the quasipolynomial associated to the cell -that contains the point. Outside of the union of cells, -the value is assumed to be zero. -For example, the piecewise quasipolynomial - - [n] -> { [x] -> ((1 + n) - x) : x <= n and x >= 0 } - -maps C to C<1 + n - x> for values of C between C<0> and C. -A given piecewise quasipolynomial has a fixed domain dimension. -Union piecewise quasipolynomials are used to contain piecewise quasipolynomials -defined over different domains. -Piecewise quasipolynomials are mainly used by the C -library for representing the number of elements in a parametric set or map. -For example, the piecewise quasipolynomial above represents -the number of points in the map - - [n] -> { [x] -> [y] : x,y >= 0 and 0 <= x + y <= n } - -=head3 Printing (Piecewise) Quasipolynomials - -Quasipolynomials and piecewise quasipolynomials can be printed -using the following functions. - - __isl_give isl_printer *isl_printer_print_qpolynomial( - __isl_take isl_printer *p, - __isl_keep isl_qpolynomial *qp); - - __isl_give isl_printer *isl_printer_print_pw_qpolynomial( - __isl_take isl_printer *p, - __isl_keep isl_pw_qpolynomial *pwqp); - - __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial *upwqp); - -The output format of the printer -needs to be set to either C or C. -For C, only C -is supported. -In case of printing in C, the user may want -to set the names of all dimensions - - __isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned pos, - const char *s); - __isl_give isl_pw_qpolynomial * - isl_pw_qpolynomial_set_dim_name( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned pos, - const char *s); - -=head3 Creating New (Piecewise) Quasipolynomials - -Some simple quasipolynomials can be created using the following functions. -More complicated quasipolynomials can be created by applying -operations such as addition and multiplication -on the resulting quasipolynomials - - __isl_give isl_qpolynomial *isl_qpolynomial_zero( - __isl_take isl_dim *dim); - __isl_give isl_qpolynomial *isl_qpolynomial_one( - __isl_take isl_dim *dim); - __isl_give isl_qpolynomial *isl_qpolynomial_infty( - __isl_take isl_dim *dim); - __isl_give isl_qpolynomial *isl_qpolynomial_neginfty( - __isl_take isl_dim *dim); - __isl_give isl_qpolynomial *isl_qpolynomial_nan( - __isl_take isl_dim *dim); - __isl_give isl_qpolynomial *isl_qpolynomial_rat_cst( - __isl_take isl_dim *dim, - const isl_int n, const isl_int d); - __isl_give isl_qpolynomial *isl_qpolynomial_div( - __isl_take isl_div *div); - __isl_give isl_qpolynomial *isl_qpolynomial_var( - __isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos); - __isl_give isl_qpolynomial *isl_qpolynomial_from_aff( - __isl_take isl_aff *aff); - -The zero piecewise quasipolynomial or a piecewise quasipolynomial -with a single cell can be created using the following functions. -Multiple of these single cell piecewise quasipolynomials can -be combined to create more complicated piecewise quasipolynomials. - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero( - __isl_take isl_dim *dim); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc( - __isl_take isl_set *set, - __isl_take isl_qpolynomial *qp); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero( - __isl_take isl_dim *dim); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial( - __isl_take isl_pw_qpolynomial *pwqp); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_pw_qpolynomial *pwqp); - -Quasipolynomials can be copied and freed again using the following -functions. - - __isl_give isl_qpolynomial *isl_qpolynomial_copy( - __isl_keep isl_qpolynomial *qp); - void isl_qpolynomial_free(__isl_take isl_qpolynomial *qp); - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy( - __isl_keep isl_pw_qpolynomial *pwqp); - void *isl_pw_qpolynomial_free( - __isl_take isl_pw_qpolynomial *pwqp); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy( - __isl_keep isl_union_pw_qpolynomial *upwqp); - void isl_union_pw_qpolynomial_free( - __isl_take isl_union_pw_qpolynomial *upwqp); - -=head3 Inspecting (Piecewise) Quasipolynomials - -To iterate over all piecewise quasipolynomials in a union -piecewise quasipolynomial, use the following function - - int isl_union_pw_qpolynomial_foreach_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, - int (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user), - void *user); - -To extract the piecewise quasipolynomial from a union with a given dimension -specification, use - - __isl_give isl_pw_qpolynomial * - isl_union_pw_qpolynomial_extract_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, - __isl_take isl_dim *dim); - -To iterate over the cells in a piecewise quasipolynomial, -use either of the following two functions - - int isl_pw_qpolynomial_foreach_piece( - __isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, - void *user), void *user); - int isl_pw_qpolynomial_foreach_lifted_piece( - __isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, - void *user), void *user); - -As usual, the function C should return C<0> on success -and C<-1> on failure. The difference between -C and -C is that -C will first -compute unique representations for all existentially quantified -variables and then turn these existentially quantified variables -into extra set variables, adapting the associated quasipolynomial -accordingly. This means that the C passed to C -will not have any existentially quantified variables, but that -the dimensions of the sets may be different for different -invocations of C. - -To iterate over all terms in a quasipolynomial, -use - - int isl_qpolynomial_foreach_term( - __isl_keep isl_qpolynomial *qp, - int (*fn)(__isl_take isl_term *term, - void *user), void *user); - -The terms themselves can be inspected and freed using -these functions - - unsigned isl_term_dim(__isl_keep isl_term *term, - enum isl_dim_type type); - void isl_term_get_num(__isl_keep isl_term *term, - isl_int *n); - void isl_term_get_den(__isl_keep isl_term *term, - isl_int *d); - int isl_term_get_exp(__isl_keep isl_term *term, - enum isl_dim_type type, unsigned pos); - __isl_give isl_div *isl_term_get_div( - __isl_keep isl_term *term, unsigned pos); - void isl_term_free(__isl_take isl_term *term); - -Each term is a product of parameters, set variables and -integer divisions. The function C -returns the exponent of a given dimensions in the given term. -The Cs in the arguments of C -and C need to have been initialized -using C before calling these functions. - -=head3 Properties of (Piecewise) Quasipolynomials - -To check whether a quasipolynomial is actually a constant, -use the following function. - - int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp, - isl_int *n, isl_int *d); - -If C is a constant and if C and C are not C -then the numerator and denominator of the constant -are returned in C<*n> and C<*d>, respectively. - -=head3 Operations on (Piecewise) Quasipolynomials - - __isl_give isl_qpolynomial *isl_qpolynomial_scale( - __isl_take isl_qpolynomial *qp, isl_int v); - __isl_give isl_qpolynomial *isl_qpolynomial_neg( - __isl_take isl_qpolynomial *qp); - __isl_give isl_qpolynomial *isl_qpolynomial_add( - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - __isl_give isl_qpolynomial *isl_qpolynomial_sub( - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - __isl_give isl_qpolynomial *isl_qpolynomial_mul( - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - __isl_give isl_qpolynomial *isl_qpolynomial_pow( - __isl_take isl_qpolynomial *qp, unsigned exponent); - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sub( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_disjoint( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_neg( - __isl_take isl_pw_qpolynomial *pwqp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); - - __isl_give isl_qpolynomial *isl_pw_qpolynomial_eval( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_point *pnt); - - __isl_give isl_qpolynomial *isl_union_pw_qpolynomial_eval( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_point *pnt); - - __isl_give isl_set *isl_pw_qpolynomial_domain( - __isl_take isl_pw_qpolynomial *pwqp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain( - __isl_take isl_pw_qpolynomial *pwpq, - __isl_take isl_set *set); - - __isl_give isl_union_set *isl_union_pw_qpolynomial_domain( - __isl_take isl_union_pw_qpolynomial *upwqp); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain( - __isl_take isl_union_pw_qpolynomial *upwpq, - __isl_take isl_union_set *uset); - - __isl_give isl_qpolynomial *isl_qpolynomial_align_params( - __isl_take isl_qpolynomial *qp, - __isl_take isl_dim *model); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce( - __isl_take isl_union_pw_qpolynomial *upwqp); - - __isl_give isl_qpolynomial *isl_qpolynomial_gist( - __isl_take isl_qpolynomial *qp, - __isl_take isl_set *context); - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_set *context); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_union_set *context); - -The gist operation applies the gist operation to each of -the cells in the domain of the input piecewise quasipolynomial. -The context is also exploited -to simplify the quasipolynomials associated to each cell. - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( - __isl_take isl_pw_qpolynomial *pwqp, int sign); - __isl_give isl_union_pw_qpolynomial * - isl_union_pw_qpolynomial_to_polynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, int sign); - -Approximate each quasipolynomial by a polynomial. If C is positive, -the polynomial will be an overapproximation. If C is negative, -it will be an underapproximation. If C is zero, the approximation -will lie somewhere in between. - -=head2 Bounds on Piecewise Quasipolynomials and Piecewise Quasipolynomial Reductions - -A piecewise quasipolynomial reduction is a piecewise -reduction (or fold) of quasipolynomials. -In particular, the reduction can be maximum or a minimum. -The objects are mainly used to represent the result of -an upper or lower bound on a quasipolynomial over its domain, -i.e., as the result of the following function. - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_fold type, int *tight); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( - __isl_take isl_union_pw_qpolynomial *upwqp, - enum isl_fold type, int *tight); - -The C argument may be either C or C. -If C is not C, then C<*tight> is set to C<1> -is the returned bound is known be tight, i.e., for each value -of the parameters there is at least -one element in the domain that reaches the bound. -If the domain of C is not wrapping, then the bound is computed -over all elements in that domain and the result has a purely parametric -domain. If the domain of C is wrapping, then the bound is -computed over the range of the wrapped relation. The domain of the -wrapped relation becomes the domain of the result. - -A (piecewise) quasipolynomial reduction can be copied or freed using the -following functions. - - __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( - __isl_keep isl_qpolynomial_fold *fold); - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy( - __isl_keep isl_pw_qpolynomial_fold *pwf); - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - void isl_qpolynomial_fold_free( - __isl_take isl_qpolynomial_fold *fold); - void *isl_pw_qpolynomial_fold_free( - __isl_take isl_pw_qpolynomial_fold *pwf); - void isl_union_pw_qpolynomial_fold_free( - __isl_take isl_union_pw_qpolynomial_fold *upwf); - -=head3 Printing Piecewise Quasipolynomial Reductions - -Piecewise quasipolynomial reductions can be printed -using the following function. - - __isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_pw_qpolynomial_fold *pwf); - __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -For C, -output format of the printer -needs to be set to either C or C. -For C, -output format of the printer -needs to be set to C. -In case of printing in C, the user may want -to set the names of all dimensions - - __isl_give isl_pw_qpolynomial_fold * - isl_pw_qpolynomial_fold_set_dim_name( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned pos, - const char *s); - -=head3 Inspecting (Piecewise) Quasipolynomial Reductions - -To iterate over all piecewise quasipolynomial reductions in a union -piecewise quasipolynomial reduction, use the following function - - int isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( - __isl_keep isl_union_pw_qpolynomial_fold *upwf, - int (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf, - void *user), void *user); - -To iterate over the cells in a piecewise quasipolynomial reduction, -use either of the following two functions - - int isl_pw_qpolynomial_fold_foreach_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); - int isl_pw_qpolynomial_fold_foreach_lifted_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); - -See L for an explanation -of the difference between these two functions. - -To iterate over all quasipolynomials in a reduction, use - - int isl_qpolynomial_fold_foreach_qpolynomial( - __isl_keep isl_qpolynomial_fold *fold, - int (*fn)(__isl_take isl_qpolynomial *qp, - void *user), void *user); - -=head3 Operations on Piecewise Quasipolynomial Reductions - - __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( - __isl_take isl_qpolynomial_fold *fold, isl_int v); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( - __isl_take isl_union_pw_qpolynomial_fold *upwf1, - __isl_take isl_union_pw_qpolynomial_fold *upwf2); - - __isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_eval( - __isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_point *pnt); - - __isl_give isl_qpolynomial *isl_union_pw_qpolynomial_fold_eval( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_point *pnt); - - __isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf); - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *uset); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce( - __isl_take isl_pw_qpolynomial_fold *pwf); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce( - __isl_take isl_union_pw_qpolynomial_fold *upwf); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist( - __isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_set *context); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *context); - -The gist operation applies the gist operation to each of -the cells in the domain of the input piecewise quasipolynomial reduction. -In future, the operation will also exploit the context -to simplify the quasipolynomial reductions associated to each cell. - - __isl_give isl_pw_qpolynomial_fold * - isl_set_apply_pw_qpolynomial_fold( - __isl_take isl_set *set, - __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); - __isl_give isl_pw_qpolynomial_fold * - isl_map_apply_pw_qpolynomial_fold( - __isl_take isl_map *map, - __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); - __isl_give isl_union_pw_qpolynomial_fold * - isl_union_set_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_set *uset, - __isl_take isl_union_pw_qpolynomial_fold *upwf, - int *tight); - __isl_give isl_union_pw_qpolynomial_fold * - isl_union_map_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_map *umap, - __isl_take isl_union_pw_qpolynomial_fold *upwf, - int *tight); - -The functions taking a map -compose the given map with the given piecewise quasipolynomial reduction. -That is, compute a bound (of the same type as C or C itself) -over all elements in the intersection of the range of the map -and the domain of the piecewise quasipolynomial reduction -as a function of an element in the domain of the map. -The functions taking a set compute a bound over all elements in the -intersection of the set and the domain of the -piecewise quasipolynomial reduction. - -=head2 Dependence Analysis - -C contains specialized functionality for performing -array dataflow analysis. That is, given a I access relation -and a collection of possible I access relations, -C can compute relations that describe -for each iteration of the sink access, which iteration -of which of the source access relations was the last -to access the same data element before the given iteration -of the sink access. -To compute standard flow dependences, the sink should be -a read, while the sources should be writes. -If any of the source accesses are marked as being I -accesses, then there will be a dependence to the last -I access B to any I access that follows -this last I access. -In particular, if I sources are I accesses, -then memory based dependence analysis is performed. -If, on the other hand, all sources are I accesses, -then value based dependence analysis is performed. - - #include - - typedef int (*isl_access_level_before)(void *first, void *second); - - __isl_give isl_access_info *isl_access_info_alloc( - __isl_take isl_map *sink, - void *sink_user, isl_access_level_before fn, - int max_source); - __isl_give isl_access_info *isl_access_info_add_source( - __isl_take isl_access_info *acc, - __isl_take isl_map *source, int must, - void *source_user); - void isl_access_info_free(__isl_take isl_access_info *acc); - - __isl_give isl_flow *isl_access_info_compute_flow( - __isl_take isl_access_info *acc); - - int isl_flow_foreach(__isl_keep isl_flow *deps, - int (*fn)(__isl_take isl_map *dep, int must, - void *dep_user, void *user), - void *user); - __isl_give isl_map *isl_flow_get_no_source( - __isl_keep isl_flow *deps, int must); - void isl_flow_free(__isl_take isl_flow *deps); - -The function C performs the actual -dependence analysis. The other functions are used to construct -the input for this function or to read off the output. - -The input is collected in an C, which can -be created through a call to C. -The arguments to this functions are the sink access relation -C, a token C used to identify the sink -access to the user, a callback function for specifying the -relative order of source and sink accesses, and the number -of source access relations that will be added. -The callback function has type C. -The function is called with two user supplied tokens identifying -either a source or the sink and it should return the shared nesting -level and the relative order of the two accesses. -In particular, let I be the number of loops shared by -the two accesses. If C precedes C textually, -then the function should return I<2 * n + 1>; otherwise, -it should return I<2 * n>. -The sources can be added to the C by performing -(at most) C calls to C. -C indicates whether the source is a I access -or a I access. Note that a multi-valued access relation -should only be marked I if every iteration in the domain -of the relation accesses I elements in its image. -The C token is again used to identify -the source access. The range of the source access relation -C should have the same dimension as the range -of the sink access relation. -The C function should usually not be -called explicitly, because it is called implicitly by -C. - -The result of the dependence analysis is collected in an -C. There may be elements of -the sink access for which no preceding source access could be -found or for which all preceding sources are I accesses. -The relations containing these elements can be obtained through -calls to C, the first with C set -and the second with C unset. -In the case of standard flow dependence analysis, -with the sink a read and the sources I writes, -the first relation corresponds to the reads from uninitialized -array elements and the second relation is empty. -The actual flow dependences can be extracted using -C. This function will call the user-specified -callback function C for each B dependence between -a source and the sink. The callback function is called -with four arguments, the actual flow dependence relation -mapping source iterations to sink iterations, a boolean that -indicates whether it is a I or I dependence, a token -identifying the source and an additional C with value -equal to the third argument of the C call. -A dependence is marked I if it originates from a I -source and if it is not followed by any I sources. - -After finishing with an C, the user should call -C to free all associated memory. - -A higher-level interface to dependence analysis is provided -by the following function. - - #include - - int isl_union_map_compute_flow(__isl_take isl_union_map *sink, - __isl_take isl_union_map *must_source, - __isl_take isl_union_map *may_source, - __isl_take isl_union_map *schedule, - __isl_give isl_union_map **must_dep, - __isl_give isl_union_map **may_dep, - __isl_give isl_union_map **must_no_source, - __isl_give isl_union_map **may_no_source); - -The arrays are identified by the tuple names of the ranges -of the accesses. The iteration domains by the tuple names -of the domains of the accesses and of the schedule. -The relative order of the iteration domains is given by the -schedule. The relations returned through C -and C are subsets of C. -Any of C, C, C -or C may be C, but a C value for -any of the other arguments is treated as an error. - -=head2 Scheduling - -B - -The following function can be used to compute a schedule -for a union of domains. The generated schedule respects -all C dependences. That is, all dependence distances -over these dependences in the scheduled space are lexicographically -positive. The generated schedule schedule also tries to minimize -the dependence distances over C dependences. -Moreover, it tries to obtain sequences (bands) of schedule dimensions -for groups of domains where the dependence distances have only -non-negative values. -The algorithm used to construct the schedule is similar to that -of C. - - #include - __isl_give isl_schedule *isl_union_set_compute_schedule( - __isl_take isl_union_set *domain, - __isl_take isl_union_map *validity, - __isl_take isl_union_map *proximity); - void *isl_schedule_free(__isl_take isl_schedule *sched); - -A mapping from the domains to the scheduled space can be obtained -from an C using the following function. - - __isl_give isl_union_map *isl_schedule_get_map( - __isl_keep isl_schedule *sched); - -A representation of the schedule can be printed using - - __isl_give isl_printer *isl_printer_print_schedule( - __isl_take isl_printer *p, - __isl_keep isl_schedule *schedule); - -A representation of the schedule as a forest of bands can be obtained -using the following function. - - __isl_give isl_band_list *isl_schedule_get_band_forest( - __isl_keep isl_schedule *schedule); - -The list can be manipulated as explained in L<"Lists">. -The bands inside the list can be copied and freed using the following -functions. - - #include - __isl_give isl_band *isl_band_copy( - __isl_keep isl_band *band); - void *isl_band_free(__isl_take isl_band *band); - -Each band contains zero or more scheduling dimensions. -These are referred to as the members of the band. -The section of the schedule that corresponds to the band is -referred to as the partial schedule of the band. -For those nodes that participate in a band, the outer scheduling -dimensions form the prefix schedule, while the inner scheduling -dimensions form the suffix schedule. -That is, if we take a cut of the band forest, then the union of -the concatenations of the prefix, partial and suffix schedules of -each band in the cut is equal to the entire schedule (modulo -some possible padding at the end with zero scheduling dimensions). -The properties of a band can be inspected using the following functions. - - #include - isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band); - - int isl_band_has_children(__isl_keep isl_band *band); - __isl_give isl_band_list *isl_band_get_children( - __isl_keep isl_band *band); - - __isl_give isl_union_map *isl_band_get_prefix_schedule( - __isl_keep isl_band *band); - __isl_give isl_union_map *isl_band_get_partial_schedule( - __isl_keep isl_band *band); - __isl_give isl_union_map *isl_band_get_suffix_schedule( - __isl_keep isl_band *band); - - int isl_band_n_member(__isl_keep isl_band *band); - int isl_band_member_is_zero_distance( - __isl_keep isl_band *band, int pos); - -Note that a scheduling dimension is considered to be ``zero -distance'' if it does not carry any proximity dependences -within its band. -That is, if the dependence distances of the proximity -dependences are all zero in that direction (for fixed -iterations of outer bands). - -A representation of the band can be printed using - - #include - __isl_give isl_printer *isl_printer_print_band( - __isl_take isl_printer *p, - __isl_keep isl_band *band); - -=head2 Parametric Vertex Enumeration - -The parametric vertex enumeration described in this section -is mainly intended to be used internally and by the C -library. - - #include - __isl_give isl_vertices *isl_basic_set_compute_vertices( - __isl_keep isl_basic_set *bset); - -The function C performs the -actual computation of the parametric vertices and the chamber -decomposition and store the result in an C object. -This information can be queried by either iterating over all -the vertices or iterating over all the chambers or cells -and then iterating over all vertices that are active on the chamber. - - int isl_vertices_foreach_vertex( - __isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_vertex *vertex, void *user), - void *user); - - int isl_vertices_foreach_cell( - __isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), - void *user); - int isl_cell_foreach_vertex(__isl_keep isl_cell *cell, - int (*fn)(__isl_take isl_vertex *vertex, void *user), - void *user); - -Other operations that can be performed on an C object are -the following. - - isl_ctx *isl_vertices_get_ctx( - __isl_keep isl_vertices *vertices); - int isl_vertices_get_n_vertices( - __isl_keep isl_vertices *vertices); - void isl_vertices_free(__isl_take isl_vertices *vertices); - -Vertices can be inspected and destroyed using the following functions. - - isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex); - int isl_vertex_get_id(__isl_keep isl_vertex *vertex); - __isl_give isl_basic_set *isl_vertex_get_domain( - __isl_keep isl_vertex *vertex); - __isl_give isl_basic_set *isl_vertex_get_expr( - __isl_keep isl_vertex *vertex); - void isl_vertex_free(__isl_take isl_vertex *vertex); - -C returns a singleton parametric set describing -the vertex, while C returns the activity domain -of the vertex. -Note that C and C return -B basic sets, so they should mainly be used for inspection -and should not be mixed with integer sets. - -Chambers can be inspected and destroyed using the following functions. - - isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell); - __isl_give isl_basic_set *isl_cell_get_domain( - __isl_keep isl_cell *cell); - void isl_cell_free(__isl_take isl_cell *cell); - -=head1 Applications - -Although C is mainly meant to be used as a library, -it also contains some basic applications that use some -of the functionality of C. -The input may be specified in either the L -or the L. - -=head2 C - -C takes a polyhedron as input and prints -an integer element of the polyhedron, if there is any. -The first column in the output is the denominator and is always -equal to 1. If the polyhedron contains no integer points, -then a vector of length zero is printed. - -=head2 C - -C takes the same input as the C program -from the C distribution, i.e., a set of constraints -on the parameters, a line containing only -1 and finally a set -of constraints on a parametric polyhedron. -The coefficients of the parameters appear in the last columns -(but before the final constant column). -The output is the lexicographic minimum of the parametric polyhedron. -As C currently does not have its own output format, the output -is just a dump of the internal state. - -=head2 C - -C computes the minimum of some linear -or affine objective function over the integer points in a polyhedron. -If an affine objective function -is given, then the constant should appear in the last column. - -=head2 C - -Given a polytope, C prints -all integer points in the polytope. diff --git a/cloog-0.16.3/isl/include/isl/aff.h b/cloog-0.16.3/isl/include/isl/aff.h deleted file mode 100644 index ffeca4bc3703f64fa5c755f98664c49ec1843372..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/aff.h +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef ISL_AFF_H -#define ISL_AFF_H - -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_give isl_aff *isl_aff_zero(__isl_take isl_local_space *ls); - -__isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff); -void *isl_aff_free(__isl_take isl_aff *aff); - -isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff); - -int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type); -int isl_aff_involves_dims(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_dim *isl_aff_get_dim(__isl_keep isl_aff *aff); -__isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff); - -const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned pos); -int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v); -int isl_aff_get_coefficient(__isl_keep isl_aff *aff, - enum isl_dim_type type, int pos, isl_int *v); -int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v); -__isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v); -__isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v); -__isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); -__isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); -__isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v); -__isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v); -__isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v); -__isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); -__isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); - -__isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, const char *s); - -int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2); -int isl_aff_plain_is_zero(__isl_keep isl_aff *aff); - -__isl_give isl_div *isl_aff_get_div(__isl_keep isl_aff *aff, int pos); - -__isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff); -__isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff); -__isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff); - -__isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); -__isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - -__isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f); -__isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f); -__isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f); - -__isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned n); -__isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, - __isl_take isl_set *context); - -__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - -__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p, - __isl_keep isl_aff *aff); -void isl_aff_dump(__isl_keep isl_aff *aff); - -isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff); -__isl_give isl_dim *isl_pw_aff_get_dim(__isl_keep isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_dim *dim); -__isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set, - __isl_take isl_aff *aff); - -int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -__isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff); -void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff); - -unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type); -int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_aff *isl_pw_aff_align_params(__isl_take isl_pw_aff *pwaff, - __isl_take isl_dim *model); - -__isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_sub(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff); -__isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff); -__isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_set *cond, - __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false); - -__isl_give isl_pw_aff *isl_pw_aff_scale(__isl_take isl_pw_aff *pwaff, - isl_int f); -__isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff, - isl_int f); - -__isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned n); -__isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp); -__isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff, - __isl_take isl_set *context); - -__isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff); -void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/aff_type.h b/cloog-0.16.3/isl/include/isl/aff_type.h deleted file mode 100644 index 549ec80404c336c78f3d297730b229690c5a1bfa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/aff_type.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef ISL_AFF_TYPE_H -#define ISL_AFF_TYPE_H - -struct isl_aff; -typedef struct isl_aff isl_aff; - -struct isl_pw_aff; -typedef struct isl_pw_aff isl_pw_aff; - -#endif diff --git a/cloog-0.16.3/isl/include/isl/arg.h b/cloog-0.16.3/isl/include/isl/arg.h deleted file mode 100644 index d37e4959d86d06811980ae8855b45e58d0e07ac1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/arg.h +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_ARG_H -#define ISL_ARG_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_arg_choice { - const char *name; - unsigned value; -}; - -struct isl_arg_flags { - const char *name; - unsigned mask; - unsigned value; -}; - -enum isl_arg_type { - isl_arg_end, - isl_arg_alias, - isl_arg_arg, - isl_arg_bool, - isl_arg_child, - isl_arg_choice, - isl_arg_flags, - isl_arg_footer, - isl_arg_int, - isl_arg_user, - isl_arg_long, - isl_arg_ulong, - isl_arg_str, - isl_arg_version -}; - -struct isl_arg { - enum isl_arg_type type; - char short_name; - const char *long_name; - const char *argument_name; - size_t offset; - const char *help_msg; -#define ISL_ARG_SINGLE_DASH (1 << 0) -#define ISL_ARG_BOOL_ARG (1 << 1) -#define ISL_ARG_HIDDEN (1 << 2) - unsigned flags; - union { - struct { - struct isl_arg_choice *choice; - unsigned default_value; - unsigned default_selected; - int (*set)(void *opt, unsigned val); - } choice; - struct { - struct isl_arg_flags *flags; - unsigned default_value; - } flags; - struct { - unsigned default_value; - int (*set)(void *opt, unsigned val); - } b; - struct { - int default_value; - } i; - struct { - long default_value; - long default_selected; - int (*set)(void *opt, long val); - } l; - struct { - unsigned long default_value; - } ul; - struct { - const char *default_value; - } str; - struct { - struct isl_arg *child; - size_t size; - } child; - struct { - void (*print_version)(void); - } version; - struct { - int (*init)(void*); - void (*clear)(void*); - } user; - } u; -}; - -#define ISL_ARG_ALIAS(l) { \ - .type = isl_arg_alias, \ - .long_name = l, \ -}, -#define ISL_ARG_ARG(st,f,a,d) { \ - .type = isl_arg_arg, \ - .argument_name = a, \ - .offset = offsetof(st, f), \ - .u = { .str = { .default_value = d } } \ -}, -#define ISL_ARG_FOOTER(h) { \ - .type = isl_arg_footer, \ - .help_msg = h, \ -}, -#define ISL_ARG_CHOICE(st,f,s,l,c,d,h) { \ - .type = isl_arg_choice, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .choice = { .choice = c, .default_value = d, \ - .default_selected = d, .set = NULL } } \ -}, -#define ISL_ARG_OPT_CHOICE(st,f,s,l,c,d,ds,h) { \ - .type = isl_arg_choice, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .choice = { .choice = c, .default_value = d, \ - .default_selected = ds, .set = NULL } } \ -}, -#define ISL_ARG_USER_OPT_CHOICE(st,f,s,l,c,setter,d,ds,h) { \ - .type = isl_arg_choice, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .choice = { .choice = c, .default_value = d, \ - .default_selected = ds, .set = setter } } \ -}, -#define _ISL_ARG_BOOL_F(o,s,l,setter,d,h,fl) { \ - .type = isl_arg_bool, \ - .short_name = s, \ - .long_name = l, \ - .offset = o, \ - .help_msg = h, \ - .flags = fl, \ - .u = { .b = { .default_value = d, .set = setter } } \ -}, -#define ISL_ARG_BOOL_F(st,f,s,l,d,h,fl) \ - _ISL_ARG_BOOL_F(offsetof(st, f),s,l,NULL,d,h,fl) -#define ISL_ARG_BOOL(st,f,s,l,d,h) \ - ISL_ARG_BOOL_F(st,f,s,l,d,h,0) -#define ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,fl) \ - _ISL_ARG_BOOL_F(-1,s,l,setter,0,h,fl) -#define ISL_ARG_PHANTOM_BOOL(s,l,setter,h) \ - ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,0) -#define ISL_ARG_INT_F(st,f,s,l,a,d,h,fl) { \ - .type = isl_arg_int, \ - .short_name = s, \ - .long_name = l, \ - .argument_name = a, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .flags = fl, \ - .u = { .ul = { .default_value = d } } \ -}, -#define ISL_ARG_INT(st,f,s,l,a,d,h) \ - ISL_ARG_INT_F(st,f,s,l,a,d,h,0) -#define ISL_ARG_LONG(st,f,s,lo,d,h) { \ - .type = isl_arg_long, \ - .short_name = s, \ - .long_name = lo, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .l = { .default_value = d, .default_selected = d, \ - .set = NULL } } \ -}, -#define ISL_ARG_USER_LONG(st,f,s,lo,setter,d,h) { \ - .type = isl_arg_long, \ - .short_name = s, \ - .long_name = lo, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .l = { .default_value = d, .default_selected = d, \ - .set = setter } } \ -}, -#define ISL_ARG_OPT_LONG(st,f,s,lo,d,ds,h) { \ - .type = isl_arg_long, \ - .short_name = s, \ - .long_name = lo, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .l = { .default_value = d, .default_selected = ds, \ - .set = NULL } } \ -}, -#define ISL_ARG_ULONG(st,f,s,l,d,h) { \ - .type = isl_arg_ulong, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .ul = { .default_value = d } } \ -}, -#define ISL_ARG_STR(st,f,s,l,a,d,h) { \ - .type = isl_arg_str, \ - .short_name = s, \ - .long_name = l, \ - .argument_name = a, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .str = { .default_value = d } } \ -}, -#define _ISL_ARG_CHILD(o,sz,l,c,h,fl) { \ - .type = isl_arg_child, \ - .long_name = l, \ - .offset = o, \ - .help_msg = h, \ - .flags = fl, \ - .u = { .child = { .child = c, .size = sz } } \ -}, -#define ISL_ARG_CHILD(st,f,l,c,h) \ - _ISL_ARG_CHILD(offsetof(st, f),sizeof(*((st *)NULL)->f),l,c,h,0) -#define ISL_ARG_GROUP_F(c,h,fl) \ - _ISL_ARG_CHILD(-1,0,NULL,c,h,fl) -#define ISL_ARG_GROUP(c,h) \ - ISL_ARG_GROUP_F(c,h,0) -#define ISL_ARG_FLAGS(st,f,s,l,c,d,h) { \ - .type = isl_arg_flags, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .flags = { .flags = c, .default_value = d } } \ -}, -#define ISL_ARG_USER(st,f,i,c) { \ - .type = isl_arg_user, \ - .offset = offsetof(st, f), \ - .u = { .user = { .init = i, .clear = c} } \ -}, -#define ISL_ARG_VERSION(print) { \ - .type = isl_arg_version, \ - .u = { .version = { .print_version = print } } \ -}, -#define ISL_ARG_END { isl_arg_end } - -#define ISL_ARG_ALL (1 << 0) - -void isl_arg_set_defaults(struct isl_arg *arg, void *opt); -void isl_arg_free(struct isl_arg *arg, void *opt); -int isl_arg_parse(struct isl_arg *arg, int argc, char **argv, void *opt, - unsigned flags); - -#define ISL_ARG_DECL(prefix,st,arg) \ -extern struct isl_arg arg[]; \ -st *prefix ## _new_with_defaults(); \ -void prefix ## _free(st *opt); \ -int prefix ## _parse(st *opt, int argc, char **argv, unsigned flags); - -#define ISL_ARG_DEF(prefix,st,arg) \ -st *prefix ## _new_with_defaults() \ -{ \ - st *opt = (st *)calloc(1, sizeof(st)); \ - if (opt) \ - isl_arg_set_defaults(arg, opt); \ - return opt; \ -} \ - \ -void prefix ## _free(st *opt) \ -{ \ - isl_arg_free(arg, opt); \ -} \ - \ -int prefix ## _parse(st *opt, int argc, char **argv, unsigned flags) \ -{ \ - return isl_arg_parse(arg, argc, argv, opt, flags); \ -} - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/band.h b/cloog-0.16.3/isl/include/isl/band.h deleted file mode 100644 index 880cb126204cfae140344f1679a61aabdbedd466..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/band.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef ISL_BAND_H -#define ISL_BAND_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_band; -typedef struct isl_band isl_band; - -__isl_give isl_band *isl_band_copy(__isl_keep isl_band *band); -void *isl_band_free(__isl_take isl_band *band); - -isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band); - -int isl_band_has_children(__isl_keep isl_band *band); -__isl_give isl_band_list *isl_band_get_children( - __isl_keep isl_band *band); - -__isl_give isl_union_map *isl_band_get_prefix_schedule( - __isl_keep isl_band *band); -__isl_give isl_union_map *isl_band_get_partial_schedule( - __isl_keep isl_band *band); -__isl_give isl_union_map *isl_band_get_suffix_schedule( - __isl_keep isl_band *band); - -int isl_band_n_member(__isl_keep isl_band *band); -int isl_band_member_is_zero_distance(__isl_keep isl_band *band, int pos); - -__isl_give isl_printer *isl_printer_print_band(__isl_take isl_printer *p, - __isl_keep isl_band *band); -void isl_band_dump(__isl_keep isl_band *band); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/blk.h b/cloog-0.16.3/isl/include/isl/blk.h deleted file mode 100644 index 8094e2a04fd2d00238c6b1110b8f33356ac28bdb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/blk.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_BLK_H -#define ISL_BLK_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_blk { - size_t size; - isl_int *data; -}; - -#define ISL_BLK_CACHE_SIZE 20 - -struct isl_ctx; - -struct isl_blk isl_blk_alloc(struct isl_ctx *ctx, size_t n); -struct isl_blk isl_blk_empty(); -int isl_blk_is_error(struct isl_blk block); -struct isl_blk isl_blk_extend(struct isl_ctx *ctx, struct isl_blk block, - size_t new_n); -void isl_blk_free(struct isl_ctx *ctx, struct isl_blk block); -void isl_blk_clear_cache(struct isl_ctx *ctx); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/config.h.in b/cloog-0.16.3/isl/include/isl/config.h.in deleted file mode 100644 index 231575e5859c9fc35e3922d1263e4ecf0812b276..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/config.h.in +++ /dev/null @@ -1,3 +0,0 @@ -#undef GCC_WARN_UNUSED_RESULT - -#undef ISL_PIPLIB diff --git a/cloog-0.16.3/isl/include/isl/constraint.h b/cloog-0.16.3/isl/include/isl/constraint.h deleted file mode 100644 index 6f2e8c77153f17e0a733b9660826fa4d08f69f75..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/constraint.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_CONSTRAINT_H -#define ISL_CONSTRAINT_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_constraint; -typedef struct isl_constraint isl_constraint; - -isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c); - -__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_dim *dim); -__isl_give isl_constraint *isl_inequality_alloc(__isl_take isl_dim *dim); - -struct isl_constraint *isl_constraint_cow(struct isl_constraint *c); -struct isl_constraint *isl_constraint_copy(struct isl_constraint *c); -void isl_constraint_free(struct isl_constraint *c); - -__isl_give isl_constraint *isl_basic_map_first_constraint( - __isl_take isl_basic_map *bmap); -__isl_give isl_constraint *isl_basic_set_first_constraint( - __isl_take isl_basic_set *bset); -struct isl_constraint *isl_constraint_next(struct isl_constraint *c); -int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user); -int isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user); -int isl_constraint_is_equal(struct isl_constraint *constraint1, - struct isl_constraint *constraint2); - -int isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user); - -__isl_give isl_basic_map *isl_basic_map_add_constraint( - __isl_take isl_basic_map *bmap, __isl_take isl_constraint *constraint); -__isl_give isl_basic_set *isl_basic_set_add_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint); -__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map, - __isl_take isl_constraint *constraint); -__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set, - __isl_take isl_constraint *constraint); - -int isl_basic_map_has_defining_equality( - __isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos, - __isl_give isl_constraint **c); -int isl_basic_set_has_defining_equality( - struct isl_basic_set *bset, enum isl_dim_type type, int pos, - struct isl_constraint **constraint); -int isl_basic_set_has_defining_inequalities( - struct isl_basic_set *bset, enum isl_dim_type type, int pos, - struct isl_constraint **lower, - struct isl_constraint **upper); - -__isl_give isl_dim *isl_constraint_get_dim( - __isl_keep isl_constraint *constraint); -int isl_constraint_dim(struct isl_constraint *constraint, - enum isl_dim_type type); - -int isl_constraint_involves_dims(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned first, unsigned n); - -const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned pos); -void isl_constraint_get_constant(__isl_keep isl_constraint *constraint, - isl_int *v); -void isl_constraint_get_coefficient(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int *v); -void isl_constraint_set_constant(__isl_keep isl_constraint *constraint, isl_int v); -void isl_constraint_set_constant_si(__isl_keep isl_constraint *constraint, - int v); -void isl_constraint_set_coefficient(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int v); -void isl_constraint_set_coefficient_si(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, int v); - -__isl_give isl_div *isl_constraint_div(__isl_keep isl_constraint *constraint, - int pos); -struct isl_constraint *isl_constraint_add_div(struct isl_constraint *constraint, - struct isl_div *div, int *pos); - -void isl_constraint_clear(struct isl_constraint *constraint); -struct isl_constraint *isl_constraint_negate(struct isl_constraint *constraint); - -int isl_constraint_is_equality(__isl_keep isl_constraint *constraint); -int isl_constraint_is_div_constraint(__isl_keep isl_constraint *constraint); - -__isl_give isl_basic_map *isl_basic_map_from_constraint( - __isl_take isl_constraint *constraint); -struct isl_basic_set *isl_basic_set_from_constraint( - struct isl_constraint *constraint); - -__isl_give isl_aff *isl_constraint_get_bound( - __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos); -__isl_give isl_aff *isl_constraint_get_aff( - __isl_keep isl_constraint *constraint); -__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff); -__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff); - -__isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint); - -__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p, - __isl_keep isl_constraint *c); -void isl_constraint_dump(__isl_keep isl_constraint *c); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/ctx.h b/cloog-0.16.3/isl/include/isl/ctx.h deleted file mode 100644 index b653ed60350c2706b3d333b9154d010fda90d311..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/ctx.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_CTX_H -#define ISL_CTX_H - -#include -#include - -#include -#include -#include -#include -#include - -#define __isl_give -#define __isl_take -#define __isl_keep - -#ifdef GCC_WARN_UNUSED_RESULT -#define WARN_UNUSED GCC_WARN_UNUSED_RESULT -#else -#define WARN_UNUSED -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Nearly all isa functions require a struct isl_ctx allocated using - * isl_ctx_alloc. This ctx contains (or will contain) options that - * control the behavior of the library and some caches. - * - * An object allocated within a given ctx should never be used inside - * another ctx. Functions for moving objects from one ctx to another - * will be added as the need arises. - * - * A given context should only be used inside a single thread. - * A global context for synchronization between different threads - * as well as functions for moving a context to a different thread - * will be added as the need arises. - * - * If anything goes wrong (out of memory, failed assertion), then - * the library will currently simply abort. This will be made - * configurable in the future. - * Users of the library should expect functions that return - * a pointer to a structure, to return NULL, indicating failure. - * Any function accepting a pointer to a structure will treat - * a NULL argument as a failure, resulting in the function freeing - * the remaining structures (if any) and returning NULL itself - * (in case of pointer return type). - * The only exception is the isl_ctx argument, which should never be NULL. - */ -struct isl_stats { - long gbr_solved_lps; -}; -enum isl_error { - isl_error_none = 0, - isl_error_abort, - isl_error_unknown, - isl_error_internal, - isl_error_invalid, - isl_error_unsupported -}; -struct isl_ctx; -typedef struct isl_ctx isl_ctx; - -/* Some helper macros */ - -#define ISL_FL_INIT(l, f) (l) = (f) /* Specific flags location. */ -#define ISL_FL_SET(l, f) ((l) |= (f)) -#define ISL_FL_CLR(l, f) ((l) &= ~(f)) -#define ISL_FL_ISSET(l, f) (!!((l) & (f))) - -#define ISL_F_INIT(p, f) ISL_FL_INIT((p)->flags, f) /* Structure element flags. */ -#define ISL_F_SET(p, f) ISL_FL_SET((p)->flags, f) -#define ISL_F_CLR(p, f) ISL_FL_CLR((p)->flags, f) -#define ISL_F_ISSET(p, f) ISL_FL_ISSET((p)->flags, f) - -/* isl_check_ctx() checks at compile time if 'ctx' is of type 'isl_ctx *' and - * returns the value of 'expr'. It is used to ensure, that always an isl_ctx is - * passed to the following macros, even if they currently do not use it. - */ -#define isl_check_ctx(ctx, expr) (ctx != (isl_ctx *) 0) ? expr : expr - -#define isl_alloc(ctx,type,size) isl_check_ctx(ctx, (type *)malloc(size)) -#define isl_calloc(ctx,type,size) isl_check_ctx(ctx, \ - (type *)calloc(1, size)) -#define isl_realloc(ctx,ptr,type,size) isl_check_ctx(ctx, \ - (type *)realloc(ptr,size)) -#define isl_alloc_type(ctx,type) isl_alloc(ctx,type,sizeof(type)) -#define isl_calloc_type(ctx,type) isl_calloc(ctx,type,sizeof(type)) -#define isl_realloc_type(ctx,ptr,type) isl_realloc(ctx,ptr,type,sizeof(type)) -#define isl_alloc_array(ctx,type,n) isl_alloc(ctx,type,(n)*sizeof(type)) -#define isl_calloc_array(ctx,type,n) isl_check_ctx(ctx,\ - (type *)calloc(n, sizeof(type))) -#define isl_realloc_array(ctx,ptr,type,n) \ - isl_realloc(ctx,ptr,type,(n)*sizeof(type)) - -#define isl_die(ctx,errno,msg,code) \ - do { \ - isl_ctx_set_error(ctx, errno); \ - fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \ - code; \ - } while (0) -#define isl_assert4(ctx,test,code,errno) \ - do { \ - if (test) \ - break; \ - isl_die(ctx, errno, "Assertion \"" #test "\" failed", code); \ - } while (0) -#define isl_assert(ctx,test,code) \ - isl_assert4(ctx,test,code,isl_error_unknown) - -#define isl_min(a,b) ((a < b) ? (a) : (b)) - -/* struct isl_ctx functions */ - -struct isl_options *isl_ctx_options(isl_ctx *ctx); - -isl_ctx *isl_ctx_alloc_with_options(struct isl_arg *arg, __isl_take void *opt); -isl_ctx *isl_ctx_alloc(); -void *isl_ctx_peek_options(isl_ctx *ctx, struct isl_arg *arg); -void isl_ctx_ref(struct isl_ctx *ctx); -void isl_ctx_deref(struct isl_ctx *ctx); -void isl_ctx_free(isl_ctx *ctx); - -void isl_ctx_abort(isl_ctx *ctx); -void isl_ctx_resume(isl_ctx *ctx); -int isl_ctx_aborted(isl_ctx *ctx); - -#define ISL_ARG_CTX_DECL(prefix,st,arg) \ -st *isl_ctx_peek_ ## prefix(isl_ctx *ctx); - -#define ISL_ARG_CTX_DEF(prefix,st,arg) \ -st *isl_ctx_peek_ ## prefix(isl_ctx *ctx) \ -{ \ - return (st *)isl_ctx_peek_options(ctx, arg); \ -} - -enum isl_error isl_ctx_last_error(isl_ctx *ctx); -void isl_ctx_reset_error(isl_ctx *ctx); -void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/dim.h b/cloog-0.16.3/isl/include/isl/dim.h deleted file mode 100644 index 5cb26645972b4b0ae6c7ba5644e5906a5ff9a426..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/dim.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_DIM_H -#define ISL_DIM_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_dim; -typedef struct isl_dim isl_dim; - -enum isl_dim_type { - isl_dim_cst, - isl_dim_param, - isl_dim_in, - isl_dim_out, - isl_dim_set = isl_dim_out, - isl_dim_div, - isl_dim_all -}; - -isl_ctx *isl_dim_get_ctx(__isl_keep isl_dim *dim); -__isl_give isl_dim *isl_dim_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_give isl_dim *isl_dim_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim); -__isl_give isl_dim *isl_dim_copy(__isl_keep isl_dim *dim); -struct isl_dim *isl_dim_cow(struct isl_dim *dim); -void isl_dim_free(__isl_take isl_dim *dim); - -__isl_give isl_dim *isl_dim_set_tuple_name(__isl_take isl_dim *dim, - enum isl_dim_type type, const char *s); -const char *isl_dim_get_tuple_name(__isl_keep isl_dim *dim, - enum isl_dim_type type); - -__isl_give isl_dim *isl_dim_set_name(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos, - __isl_keep const char *name); -__isl_keep const char *isl_dim_get_name(__isl_keep isl_dim *dim, - enum isl_dim_type type, unsigned pos); - -struct isl_dim *isl_dim_extend(struct isl_dim *dim, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_give isl_dim *isl_dim_add(__isl_take isl_dim *dim, enum isl_dim_type type, - unsigned n); -__isl_give isl_dim *isl_dim_move(__isl_take isl_dim *dim, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_dim *isl_dim_insert(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_dim *isl_dim_join(__isl_take isl_dim *left, - __isl_take isl_dim *right); -struct isl_dim *isl_dim_product(struct isl_dim *left, struct isl_dim *right); -__isl_give isl_dim *isl_dim_range_product(__isl_take isl_dim *left, - __isl_take isl_dim *right); -__isl_give isl_dim *isl_dim_map_from_set(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_reverse(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_drop(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned first, unsigned num); -struct isl_dim *isl_dim_drop_inputs(struct isl_dim *dim, - unsigned first, unsigned n); -struct isl_dim *isl_dim_drop_outputs(struct isl_dim *dim, - unsigned first, unsigned n); -__isl_give isl_dim *isl_dim_domain(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_from_domain(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_range(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_from_range(__isl_take isl_dim *dim); -struct isl_dim *isl_dim_underlying(struct isl_dim *dim, unsigned n_div); - -__isl_give isl_dim *isl_dim_align_params(__isl_take isl_dim *dim1, - __isl_take isl_dim *dim2); - -int isl_dim_is_wrapping(__isl_keep isl_dim *dim); -__isl_give isl_dim *isl_dim_wrap(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_unwrap(__isl_take isl_dim *dim); - -int isl_dim_can_zip(__isl_keep isl_dim *dim); -__isl_give isl_dim *isl_dim_zip(__isl_take isl_dim *dim); - -int isl_dim_equal(struct isl_dim *dim1, struct isl_dim *dim2); -int isl_dim_match(struct isl_dim *dim1, enum isl_dim_type dim1_type, - struct isl_dim *dim2, enum isl_dim_type dim2_type); -int isl_dim_tuple_match(__isl_keep isl_dim *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_dim *dim2, enum isl_dim_type dim2_type); -int isl_dim_compatible(struct isl_dim *dim1, struct isl_dim *dim2); -unsigned isl_dim_size(__isl_keep isl_dim *dim, enum isl_dim_type type); -unsigned isl_dim_total(struct isl_dim *dim); - -__isl_give isl_printer *isl_printer_print_dim(__isl_take isl_printer *p, - __isl_keep isl_dim *dim); -void isl_dim_dump(__isl_keep isl_dim *dim); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/div.h b/cloog-0.16.3/isl/include/isl/div.h deleted file mode 100644 index 398c7be81998b6947507dc398b40dafd132d9b5f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/div.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_DIV_H -#define ISL_DIV_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_div; -typedef struct isl_div isl_div; - -isl_ctx *isl_div_get_ctx(__isl_keep isl_div *div); - -struct isl_div *isl_div_alloc(struct isl_dim *dim); -__isl_give isl_div *isl_div_copy(__isl_keep isl_div *div); -void isl_div_free(struct isl_div *c); - -void isl_div_get_constant(__isl_keep isl_div *div, isl_int *v); -void isl_div_get_denominator(__isl_keep isl_div *div, isl_int *v); -void isl_div_get_coefficient(__isl_keep isl_div *div, - enum isl_dim_type type, int pos, isl_int *v); -void isl_div_set_constant(struct isl_div *div, isl_int v); -void isl_div_set_denominator(struct isl_div *div, isl_int v); -void isl_div_set_coefficient(struct isl_div *div, - enum isl_dim_type type, int pos, isl_int v); - -unsigned isl_div_dim(__isl_keep isl_div *div, enum isl_dim_type type); -__isl_give isl_div *isl_div_div(__isl_take isl_div *div, int pos); - -__isl_give isl_aff *isl_aff_from_div(__isl_take isl_div *div); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/flow.h b/cloog-0.16.3/isl/include/isl/flow.h deleted file mode 100644 index 8fc269859aa07626161ab6289eac20b984aeb031..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/flow.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef ISL_FLOW_H -#define ISL_FLOW_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Let n (>= 0) be the number of iterators shared by first and second. - * If first precedes second textually return 2 * n + 1, - * otherwise return 2 * n. - */ -typedef int (*isl_access_level_before)(void *first, void *second); - -struct isl_access_info; -typedef struct isl_access_info isl_access_info; -struct isl_flow; -typedef struct isl_flow isl_flow; - -__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink, - void *sink_user, isl_access_level_before fn, int max_source); -__isl_give isl_access_info *isl_access_info_add_source( - __isl_take isl_access_info *acc, __isl_take isl_map *source, - int must, void *source_user); -void isl_access_info_free(__isl_take isl_access_info *acc); - -isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc); - -__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc); -int isl_flow_foreach(__isl_keep isl_flow *deps, - int (*fn)(__isl_take isl_map *dep, int must, void *dep_user, void *user), - void *user); -__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must); -void isl_flow_free(__isl_take isl_flow *deps); - -isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps); - -int isl_union_map_compute_flow(__isl_take isl_union_map *sink, - __isl_take isl_union_map *must_source, - __isl_take isl_union_map *may_source, - __isl_take isl_union_map *schedule, - __isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep, - __isl_give isl_union_map **must_no_source, - __isl_give isl_union_map **may_no_source); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/hash.h b/cloog-0.16.3/isl/include/isl/hash.h deleted file mode 100644 index 654b6b6dc52db0e10a6883cdc845726d980bc913..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/hash.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_HASH_H -#define ISL_HASH_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define isl_hash_init() (2166136261u) -#define isl_hash_byte(h,b) do { \ - h *= 16777619; \ - h ^= b; \ - } while(0) -#define isl_hash_hash(h,h2) \ - do { \ - isl_hash_byte(h, (h2) & 0xFF); \ - isl_hash_byte(h, ((h2) >> 8) & 0xFF); \ - isl_hash_byte(h, ((h2) >> 16) & 0xFF); \ - isl_hash_byte(h, ((h2) >> 24) & 0xFF); \ - } while(0) -#define isl_hash_bits(h,bits) \ - ((bits) == 32) ? (h) : \ - ((bits) >= 16) ? \ - ((h) >> (bits)) ^ ((h) & (((uint32_t)1 << (bits)) - 1)) : \ - (((h) >> (bits)) ^ (h)) & (((uint32_t)1 << (bits)) - 1) - -uint32_t isl_hash_string(uint32_t hash, const char *s); -uint32_t isl_hash_mem(uint32_t hash, const void *p, size_t len); - -#define isl_hash_builtin(h,l) isl_hash_mem(h, &l, sizeof(l)) - -struct isl_hash_table_entry -{ - uint32_t hash; - void *data; -}; - -struct isl_hash_table { - int bits; - int n; - struct isl_hash_table_entry *entries; -}; - -struct isl_ctx; - -struct isl_hash_table *isl_hash_table_alloc(struct isl_ctx *ctx, int min_size); -void isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table); - -int isl_hash_table_init(struct isl_ctx *ctx, struct isl_hash_table *table, - int min_size); -void isl_hash_table_clear(struct isl_hash_table *table); -struct isl_hash_table_entry *isl_hash_table_find(struct isl_ctx *ctx, - struct isl_hash_table *table, - uint32_t key_hash, - int (*eq)(const void *entry, const void *val), - const void *val, int reserve); -int isl_hash_table_foreach(struct isl_ctx *ctx, - struct isl_hash_table *table, - int (*fn)(void **entry, void *user), void *user); -void isl_hash_table_remove(struct isl_ctx *ctx, - struct isl_hash_table *table, - struct isl_hash_table_entry *entry); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/ilp.h b/cloog-0.16.3/isl/include/isl/ilp.h deleted file mode 100644 index 460aaed12f699c0a7f3b52be6407aa4f57090939..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/ilp.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_ILP_H -#define ISL_ILP_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_lp_result isl_basic_set_solve_ilp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p); -enum isl_lp_result isl_basic_set_max(__isl_keep isl_basic_set *bset, - __isl_keep isl_aff *obj, isl_int *opt); -enum isl_lp_result isl_set_max(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/int.h b/cloog-0.16.3/isl/include/isl/int.h deleted file mode 100644 index 7c292d0f97c1fdc8f5ca5f3b36c9d7f2d9cff982..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/int.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_INT_H -#define ISL_INT_H - -#include -#include -#include -#if defined(__cplusplus) -#include -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef mp_get_memory_functions -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)); -#endif - -/* isl_int is the basic integer type. It currently always corresponds - * to a gmp mpz_t, but in the future, different types such as long long - * or cln::cl_I will be supported. - */ -typedef mpz_t isl_int; - -#define isl_int_init(i) mpz_init(i) -#define isl_int_clear(i) mpz_clear(i) - -#define isl_int_set(r,i) mpz_set(r,i) -#define isl_int_set_gmp(r,i) mpz_set(r,i) -#define isl_int_set_si(r,i) mpz_set_si(r,i) -#define isl_int_set_ui(r,i) mpz_set_ui(r,i) -#define isl_int_get_gmp(i,g) mpz_set(g,i) -#define isl_int_get_si(r) mpz_get_si(r) -#define isl_int_get_ui(r) mpz_get_ui(r) -#define isl_int_get_d(r) mpz_get_d(r) -#define isl_int_get_str(r) mpz_get_str(0, 10, r) -#define isl_int_abs(r,i) mpz_abs(r,i) -#define isl_int_neg(r,i) mpz_neg(r,i) -#define isl_int_swap(i,j) mpz_swap(i,j) -#define isl_int_swap_or_set(i,j) mpz_swap(i,j) -#define isl_int_add_ui(r,i,j) mpz_add_ui(r,i,j) -#define isl_int_sub_ui(r,i,j) mpz_sub_ui(r,i,j) - -#define isl_int_add(r,i,j) mpz_add(r,i,j) -#define isl_int_sub(r,i,j) mpz_sub(r,i,j) -#define isl_int_mul(r,i,j) mpz_mul(r,i,j) -#define isl_int_mul_ui(r,i,j) mpz_mul_ui(r,i,j) -#define isl_int_pow_ui(r,i,j) mpz_pow_ui(r,i,j) -#define isl_int_addmul(r,i,j) mpz_addmul(r,i,j) -#define isl_int_submul(r,i,j) mpz_submul(r,i,j) - -#define isl_int_gcd(r,i,j) mpz_gcd(r,i,j) -#define isl_int_lcm(r,i,j) mpz_lcm(r,i,j) -#define isl_int_divexact(r,i,j) mpz_divexact(r,i,j) -#define isl_int_divexact_ui(r,i,j) mpz_divexact_ui(r,i,j) -#define isl_int_tdiv_q(r,i,j) mpz_tdiv_q(r,i,j) -#define isl_int_cdiv_q(r,i,j) mpz_cdiv_q(r,i,j) -#define isl_int_fdiv_q(r,i,j) mpz_fdiv_q(r,i,j) -#define isl_int_fdiv_r(r,i,j) mpz_fdiv_r(r,i,j) -#define isl_int_fdiv_q_ui(r,i,j) mpz_fdiv_q_ui(r,i,j) - -#define isl_int_read(r,s) mpz_set_str(r,s,10) -typedef void (*isl_int_print_gmp_free_t)(void *, size_t); -#define isl_int_print(out,i,width) \ - do { \ - char *s; \ - isl_int_print_gmp_free_t gmp_free; \ - s = mpz_get_str(0, 10, i); \ - fprintf(out, "%*s", width, s); \ - mp_get_memory_functions(NULL, NULL, &gmp_free); \ - (*gmp_free)(s, strlen(s)+1); \ - } while (0) - -#define isl_int_sgn(i) mpz_sgn(i) -#define isl_int_cmp(i,j) mpz_cmp(i,j) -#define isl_int_cmp_si(i,si) mpz_cmp_si(i,si) -#define isl_int_eq(i,j) (mpz_cmp(i,j) == 0) -#define isl_int_ne(i,j) (mpz_cmp(i,j) != 0) -#define isl_int_lt(i,j) (mpz_cmp(i,j) < 0) -#define isl_int_le(i,j) (mpz_cmp(i,j) <= 0) -#define isl_int_gt(i,j) (mpz_cmp(i,j) > 0) -#define isl_int_ge(i,j) (mpz_cmp(i,j) >= 0) -#define isl_int_abs_eq(i,j) (mpz_cmpabs(i,j) == 0) -#define isl_int_abs_ne(i,j) (mpz_cmpabs(i,j) != 0) -#define isl_int_abs_lt(i,j) (mpz_cmpabs(i,j) < 0) -#define isl_int_abs_gt(i,j) (mpz_cmpabs(i,j) > 0) -#define isl_int_abs_ge(i,j) (mpz_cmpabs(i,j) >= 0) - - -#define isl_int_is_zero(i) (isl_int_sgn(i) == 0) -#define isl_int_is_one(i) (isl_int_cmp_si(i,1) == 0) -#define isl_int_is_negone(i) (isl_int_cmp_si(i,-1) == 0) -#define isl_int_is_pos(i) (isl_int_sgn(i) > 0) -#define isl_int_is_neg(i) (isl_int_sgn(i) < 0) -#define isl_int_is_nonpos(i) (isl_int_sgn(i) <= 0) -#define isl_int_is_nonneg(i) (isl_int_sgn(i) >= 0) -#define isl_int_is_divisible_by(i,j) mpz_divisible_p(i,j) - -uint32_t isl_gmp_hash(mpz_t v, uint32_t hash); -#define isl_int_hash(v,h) isl_gmp_hash(v,h) - -#if defined(__cplusplus) -} -#endif - -#if defined(__cplusplus) -extern "C" { typedef void (*isl_gmp_free_t)(void *, size_t); } - -static inline std::ostream &operator<<(std::ostream &os, isl_int i) -{ - char *s; - isl_gmp_free_t gmp_free; - s = mpz_get_str(0, 10, i); - os << s; - mp_get_memory_functions(NULL, NULL, &gmp_free); - (*gmp_free)(s, strlen(s)+1); - return os; -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/list.h b/cloog-0.16.3/isl/include/isl/list.h deleted file mode 100644 index 51387c32f13046aada19dce1d58a37cdf96d78f2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/list.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_LIST_H -#define ISL_LIST_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define ISL_DECLARE_LIST(EL) \ -struct isl_##EL; \ -struct isl_##EL##_list; \ -typedef struct isl_##EL##_list isl_##EL##_list; \ -isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \ -__isl_give isl_##EL##_list *isl_##EL##_list_alloc(isl_ctx *ctx, int n); \ -__isl_give isl_##EL##_list *isl_##EL##_list_copy( \ - __isl_keep isl_##EL##_list *list); \ -void isl_##EL##_list_free(__isl_take isl_##EL##_list *list); \ -__isl_give isl_##EL##_list *isl_##EL##_list_add( \ - __isl_take isl_##EL##_list *list, \ - __isl_take struct isl_##EL *el); \ -int isl_##EL##_list_n_##EL(__isl_keep isl_##EL##_list *list); \ -__isl_give struct isl_##EL *isl_##EL##_list_get_##EL( \ - __isl_keep isl_##EL##_list *list, int index); \ -int isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list, \ - int (*fn)(__isl_take struct isl_##EL *el, void *user), \ - void *user); \ -__isl_give isl_printer *isl_printer_print_##EL##_list( \ - __isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \ -void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list); - -ISL_DECLARE_LIST(basic_set) -ISL_DECLARE_LIST(set) -ISL_DECLARE_LIST(aff) -ISL_DECLARE_LIST(band) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/local_space.h b/cloog-0.16.3/isl/include/isl/local_space.h deleted file mode 100644 index 3faa0416a6478f77841b41c69e190fa304580687..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/local_space.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ISL_LOCAL_SPACE_H -#define ISL_LOCAL_SPACE_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_local_space; -typedef struct isl_local_space isl_local_space; - -isl_ctx *isl_local_space_get_ctx(__isl_keep isl_local_space *ls); - -__isl_give isl_local_space *isl_local_space_from_dim(__isl_take isl_dim *dim); - -__isl_give isl_local_space *isl_local_space_copy( - __isl_keep isl_local_space *ls); -void *isl_local_space_free(__isl_take isl_local_space *ls); - -int isl_local_space_dim(__isl_keep isl_local_space *ls, - enum isl_dim_type type); -const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, - enum isl_dim_type type, unsigned pos); -__isl_give isl_local_space *isl_local_space_set_dim_name( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, const char *s); -__isl_give isl_dim *isl_local_space_get_dim(__isl_keep isl_local_space *ls); -__isl_give isl_div *isl_local_space_get_div(__isl_keep isl_local_space *ls, - int pos); - -__isl_give isl_local_space *isl_local_space_from_domain( - __isl_take isl_local_space *ls); -__isl_give isl_local_space *isl_local_space_add_dims( - __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned n); -__isl_give isl_local_space *isl_local_space_drop_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_local_space *isl_local_space_insert_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); - -int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, - __isl_keep isl_local_space *ls2); - -__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls); -void isl_local_space_dump(__isl_keep isl_local_space *ls); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/lp.h b/cloog-0.16.3/isl/include/isl/lp.h deleted file mode 100644 index 9f7a9122c29174eaecdbd9ceeeddf8d40a6dd7f1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/lp.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_LP_H -#define ISL_LP_H - -#include -#include -#include -#include - -enum isl_lp_result { - isl_lp_error = -1, - isl_lp_ok = 0, - isl_lp_unbounded, - isl_lp_empty -}; - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_lp_result isl_basic_map_solve_lp(struct isl_basic_map *bmap, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); -enum isl_lp_result isl_basic_set_solve_lp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); -enum isl_lp_result isl_map_solve_lp(__isl_keep isl_map *map, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); -enum isl_lp_result isl_set_solve_lp(__isl_keep isl_set *set, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/map.h b/cloog-0.16.3/isl/include/isl/map.h deleted file mode 100644 index 4678227c6e39f3eaf2de4fdcbe96c2b906b7bc2c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/map.h +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAP_H -#define ISL_MAP_H - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* General notes: - * - * All structures are reference counted to allow reuse without duplication. - * A *_copy operation will increase the reference count, while a *_free - * operation will decrease the reference count and only actually release - * the structures when the reference count drops to zero. - * - * Functions that return an isa structure will in general _destroy_ - * all argument isa structures (the obvious execption begin the _copy - * functions). A pointer passed to such a function may therefore - * never be used after the function call. If you want to keep a - * reference to the old structure(s), use the appropriate _copy function. - */ - -unsigned isl_basic_map_n_in(const struct isl_basic_map *bmap); -unsigned isl_basic_map_n_out(const struct isl_basic_map *bmap); -unsigned isl_basic_map_n_param(const struct isl_basic_map *bmap); -unsigned isl_basic_map_n_div(const struct isl_basic_map *bmap); -unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap); -unsigned isl_basic_map_dim(const struct isl_basic_map *bmap, - enum isl_dim_type type); - -unsigned isl_map_n_in(const struct isl_map *map); -unsigned isl_map_n_out(const struct isl_map *map); -unsigned isl_map_n_param(const struct isl_map *map); -unsigned isl_map_dim(const struct isl_map *map, enum isl_dim_type type); - -isl_ctx *isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap); -isl_ctx *isl_map_get_ctx(__isl_keep isl_map *map); -__isl_give isl_dim *isl_basic_map_get_dim(__isl_keep isl_basic_map *bmap); -__isl_give isl_dim *isl_map_get_dim(__isl_keep isl_map *map); - -struct isl_div *isl_basic_map_div(struct isl_basic_map *bmap, int pos); - -__isl_give isl_local_space *isl_basic_map_get_local_space( - __isl_keep isl_basic_map *bmap); - -__isl_give isl_basic_map *isl_basic_map_set_tuple_name( - __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s); -const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type); -const char *isl_map_get_tuple_name(__isl_keep isl_map *map, - enum isl_dim_type type); -__isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map, - enum isl_dim_type type, const char *s); -const char *isl_basic_map_get_dim_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos); -const char *isl_map_get_dim_name(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); -__isl_give isl_basic_map *isl_basic_map_set_dim_name( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, const char *s); -__isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, const char *s); - -int isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap); - -struct isl_basic_map *isl_basic_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, unsigned extra, - unsigned n_eq, unsigned n_ineq); -__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_dim *dim); -struct isl_basic_map *isl_basic_map_identity_like(struct isl_basic_map *model); -struct isl_basic_map *isl_basic_map_finalize(struct isl_basic_map *bmap); -void isl_basic_map_free(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_copy(__isl_keep isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_extend(struct isl_basic_map *base, - unsigned nparam, unsigned n_in, unsigned n_out, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_map *isl_basic_map_extend_constraints( - struct isl_basic_map *base, unsigned n_eq, unsigned n_ineq); -struct isl_basic_map *isl_basic_map_equal( - struct isl_dim *dim, unsigned n_equal); -struct isl_basic_map *isl_basic_map_less_at(struct isl_dim *dim, unsigned pos); -struct isl_basic_map *isl_basic_map_more_at(struct isl_dim *dim, unsigned pos); -__isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_dim *dim); -struct isl_basic_map *isl_basic_map_empty_like(struct isl_basic_map *model); -struct isl_basic_map *isl_basic_map_empty_like_map(struct isl_map *model); -__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_dim *dim); -__isl_give isl_basic_map *isl_basic_map_nat_universe(__isl_take isl_dim *dim); -__isl_give isl_basic_map *isl_basic_map_universe_like( - __isl_keep isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_remove_redundancies( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_map_simple_hull(__isl_take isl_map *map); - -__isl_give isl_basic_map *isl_basic_map_intersect_domain( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); -__isl_give isl_basic_map *isl_basic_map_intersect_range( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); -__isl_give isl_basic_map *isl_basic_map_intersect( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_basic_map_union( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_give isl_basic_map *isl_basic_map_apply_domain( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_give isl_basic_map *isl_basic_map_apply_range( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_give isl_basic_map *isl_basic_map_affine_hull( - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_reverse(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_map_domain(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_map_range(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_domain_map( - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_range_map( - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_remove_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_map *isl_basic_map_from_basic_set(struct isl_basic_set *bset, - struct isl_dim *dim); -struct isl_basic_set *isl_basic_set_from_basic_map(struct isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_simplify(struct isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_detect_equalities( - struct isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx, - FILE *input, int nparam); -__isl_give isl_basic_map *isl_basic_map_read_from_str(isl_ctx *ctx, - const char *str, int nparam); -__isl_give isl_map *isl_map_read_from_file(struct isl_ctx *ctx, - FILE *input, int nparam); -__isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx, - const char *str, int nparam); -void isl_basic_map_dump(__isl_keep isl_basic_map *bmap); -void isl_basic_map_print(__isl_keep isl_basic_map *bmap, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format); -void isl_map_dump(__isl_keep isl_map *map); -void isl_map_print(__isl_keep isl_map *map, FILE *out, int indent, - unsigned output_format); -__isl_give isl_printer *isl_printer_print_basic_map( - __isl_take isl_printer *printer, __isl_keep isl_basic_map *bmap); -__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *printer, - __isl_keep isl_map *map); -__isl_give isl_basic_map *isl_basic_map_fix_si(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_basic_map *isl_basic_map_lower_bound_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); - -struct isl_basic_map *isl_basic_map_sum( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2); -struct isl_basic_map *isl_basic_map_neg(struct isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_floordiv(struct isl_basic_map *bmap, - isl_int d); - -struct isl_map *isl_map_sum(struct isl_map *map1, struct isl_map *map2); -struct isl_map *isl_map_neg(struct isl_map *map); -struct isl_map *isl_map_floordiv(struct isl_map *map, isl_int d); - -int isl_basic_map_is_equal( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - -__isl_give isl_map *isl_basic_map_partial_lexmax( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_basic_map_partial_lexmin( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_map_partial_lexmax( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_map_partial_lexmin( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_basic_map_lexmax(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_lexmin(__isl_take isl_map *map); -__isl_give isl_map *isl_map_lexmax(__isl_take isl_map *map); -int isl_basic_map_foreach_lexmin(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user); -int isl_basic_map_foreach_lexmax(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user); - -void isl_basic_map_print_internal(__isl_keep isl_basic_map *bmap, - FILE *out, int indent); - -struct isl_basic_map *isl_map_copy_basic_map(struct isl_map *map); -__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap); - -int isl_basic_map_plain_is_fixed(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, isl_int *val); - -int isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap); -int isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap); -int isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap); -int isl_basic_map_fast_is_empty(__isl_keep isl_basic_map *bmap); -int isl_basic_map_is_empty(__isl_keep isl_basic_map *bmap); -int isl_basic_map_is_subset(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); -int isl_basic_map_is_strict_subset(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - -struct isl_map *isl_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, int n, - unsigned flags); -__isl_give isl_map *isl_map_universe(__isl_take isl_dim *dim); -__isl_give isl_map *isl_map_nat_universe(__isl_take isl_dim *dim); -__isl_give isl_map *isl_map_empty(__isl_take isl_dim *dim); -struct isl_map *isl_map_empty_like(struct isl_map *model); -struct isl_map *isl_map_empty_like_basic_map(struct isl_basic_map *model); -struct isl_map *isl_map_dup(struct isl_map *map); -__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_identity(__isl_take isl_dim *dim); -struct isl_map *isl_map_identity_like(struct isl_map *model); -struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model); -__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_dim *dim, unsigned n); -__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_dim *dim, unsigned n); -__isl_give isl_map *isl_map_lex_lt(__isl_take isl_dim *set_dim); -__isl_give isl_map *isl_map_lex_le(__isl_take isl_dim *set_dim); -__isl_give isl_map *isl_map_lex_gt_first(__isl_take isl_dim *dim, unsigned n); -__isl_give isl_map *isl_map_lex_ge_first(__isl_take isl_dim *dim, unsigned n); -__isl_give isl_map *isl_map_lex_gt(__isl_take isl_dim *set_dim); -__isl_give isl_map *isl_map_lex_ge(__isl_take isl_dim *set_dim); -struct isl_map *isl_map_finalize(struct isl_map *map); -void isl_map_free(__isl_take isl_map *map); -__isl_give isl_map *isl_map_copy(__isl_keep isl_map *map); -struct isl_map *isl_map_extend(struct isl_map *base, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_give isl_map *isl_map_reverse(__isl_take isl_map *map); -__isl_give isl_map *isl_map_union( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -struct isl_map *isl_map_union_disjoint( - struct isl_map *map1, struct isl_map *map2); -__isl_give isl_map *isl_map_intersect_domain( - __isl_take isl_map *map, - __isl_take isl_set *set); -__isl_give isl_map *isl_map_intersect_range( - __isl_take isl_map *map, - __isl_take isl_set *set); -__isl_give isl_map *isl_map_apply_domain( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_apply_range( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_basic_map *isl_basic_map_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_map_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_basic_map *isl_basic_map_flat_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_map_flat_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_basic_map *isl_basic_map_flat_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_intersect(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map, - __isl_take isl_set *params); -__isl_give isl_map *isl_map_subtract( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -struct isl_map *isl_map_fix_input_si(struct isl_map *map, - unsigned input, int value); -__isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_basic_set *isl_basic_map_deltas(__isl_take isl_basic_map *bmap); -__isl_give isl_set *isl_map_deltas(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_map_deltas_map( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_deltas_map(__isl_take isl_map *map); -struct isl_map *isl_map_detect_equalities(struct isl_map *map); -__isl_give isl_basic_map *isl_map_affine_hull(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_map_convex_hull(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_map_polyhedral_hull(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_map_add(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned n); -__isl_give isl_map *isl_map_add_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned n); -__isl_give isl_map *isl_map_insert(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_basic_map *isl_basic_map_move_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_map *isl_map_move_dims(__isl_take isl_map *map, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_basic_map *isl_basic_map_remove_divs( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_remove_divs(__isl_take isl_map *map); -__isl_give isl_map *isl_map_remove_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_map *isl_map_remove_inputs(struct isl_map *map, - unsigned first, unsigned n); - -__isl_give isl_map *isl_set_identity(__isl_take isl_set *set); - -int isl_basic_set_is_wrapping(__isl_keep isl_basic_set *bset); -int isl_set_is_wrapping(__isl_keep isl_set *set); -__isl_give isl_basic_set *isl_basic_map_wrap(__isl_take isl_basic_map *bmap); -__isl_give isl_set *isl_map_wrap(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset); -__isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set); -__isl_give isl_basic_map *isl_basic_map_flatten(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_flatten(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_map_flatten_range( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_flatten_range(__isl_take isl_map *map); -__isl_give isl_basic_set *isl_basic_set_flatten(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set); -__isl_give isl_map *isl_set_flatten_map(__isl_take isl_set *set); -__isl_give isl_set *isl_map_domain(__isl_take isl_map *bmap); -__isl_give isl_set *isl_map_range(__isl_take isl_map *map); -__isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map); -__isl_give isl_map *isl_map_range_map(__isl_take isl_map *map); -__isl_give isl_map *isl_map_from_basic_map(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_from_domain(__isl_take isl_set *set); -__isl_give isl_basic_map *isl_basic_map_from_domain( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_map *isl_basic_map_from_range( - __isl_take isl_basic_set *bset); -struct isl_map *isl_map_from_range(struct isl_set *set); -__isl_give isl_basic_map *isl_basic_map_from_domain_and_range( - __isl_take isl_basic_set *domain, __isl_take isl_basic_set *range); -__isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain, - __isl_take isl_set *range); -struct isl_map *isl_map_from_set(struct isl_set *set, struct isl_dim *dim); -struct isl_set *isl_set_from_map(struct isl_map *map); -__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map); - -int isl_map_plain_is_empty(__isl_keep isl_map *map); -int isl_map_fast_is_empty(__isl_keep isl_map *map); -int isl_map_plain_is_universe(__isl_keep isl_map *map); -int isl_map_is_empty(__isl_keep isl_map *map); -int isl_map_is_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -int isl_map_is_strict_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -int isl_map_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -int isl_map_is_single_valued(__isl_keep isl_map *map); -int isl_map_plain_is_injective(__isl_keep isl_map *map); -int isl_map_is_injective(__isl_keep isl_map *map); -int isl_map_is_bijective(__isl_keep isl_map *map); -int isl_map_is_translation(__isl_keep isl_map *map); -int isl_map_has_equal_dim(__isl_keep isl_map *map1, __isl_keep isl_map *map2); - -int isl_basic_map_can_zip(__isl_keep isl_basic_map *bmap); -int isl_map_can_zip(__isl_keep isl_map *map); -__isl_give isl_basic_map *isl_basic_map_zip(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_zip(__isl_take isl_map *map); - -__isl_give isl_map *isl_map_make_disjoint(__isl_take isl_map *map); -__isl_give isl_map *isl_basic_map_compute_divs(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_compute_divs(__isl_take isl_map *map); -__isl_give isl_map *isl_map_align_divs(__isl_take isl_map *map); - -void isl_map_print_internal(__isl_keep isl_map *map, FILE *out, int indent); - -int isl_map_plain_input_is_fixed(__isl_keep isl_map *map, - unsigned in, isl_int *val); -int isl_map_plain_is_fixed(struct isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val); -int isl_map_fast_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val); - -__isl_give isl_basic_map *isl_basic_map_gist(__isl_take isl_basic_map *bmap, - __isl_take isl_basic_map *context); -__isl_give isl_map *isl_map_gist(__isl_take isl_map *map, - __isl_take isl_map *context); -__isl_give isl_map *isl_map_gist_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *context); - -__isl_give isl_map *isl_map_coalesce(__isl_take isl_map *map); - -int isl_map_plain_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -int isl_map_fast_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); - -uint32_t isl_map_get_hash(__isl_keep isl_map *map); - -int isl_map_foreach_basic_map(__isl_keep isl_map *map, - int (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user); - -__isl_give isl_map *isl_set_lifting(__isl_take isl_set *set); - -__isl_give isl_map *isl_map_power(__isl_take isl_map *map, int *exact); -__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map, - int *exact); -__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map, - int *exact); - -__isl_give isl_map *isl_map_lex_le_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_lex_lt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_lex_ge_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); - -__isl_give isl_map *isl_map_align_params(__isl_take isl_map *map, - __isl_take isl_dim *model); - -__isl_give isl_mat *isl_basic_map_equalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); -__isl_give isl_mat *isl_basic_map_inequalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); -__isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( - __isl_take isl_dim *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - -__isl_give isl_basic_map *isl_basic_map_from_aff(__isl_take isl_aff *aff); -__isl_give isl_basic_map *isl_basic_map_from_aff_list( - __isl_take isl_dim *domain_dim, __isl_take isl_aff_list *list); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/map_type.h b/cloog-0.16.3/isl/include/isl/map_type.h deleted file mode 100644 index 1ba26e0d0400f9a774635a2fff62846a445b4bd0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/map_type.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ISL_MAP_TYPE_H -#define ISL_MAP_TYPE_H - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_basic_map; -typedef struct isl_basic_map isl_basic_map; -struct isl_map; -typedef struct isl_map isl_map; - -#ifndef isl_basic_set -struct isl_basic_set; -typedef struct isl_basic_set isl_basic_set; -#endif -#ifndef isl_set -struct isl_set; -typedef struct isl_set isl_set; -#endif - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/mat.h b/cloog-0.16.3/isl/include/isl/mat.h deleted file mode 100644 index eda10486175224a6c7a26ea315c3d21428e4cb33..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/mat.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAT_H -#define ISL_MAT_H - -#include - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_mat; -typedef struct isl_mat isl_mat; - -isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat); - -__isl_give isl_mat *isl_mat_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_col); -struct isl_mat *isl_mat_dup(struct isl_mat *mat); -struct isl_mat *isl_mat_extend(struct isl_mat *mat, - unsigned n_row, unsigned n_col); -struct isl_mat *isl_mat_identity(struct isl_ctx *ctx, unsigned n_row); -__isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); -struct isl_mat *isl_mat_cow(struct isl_mat *mat); -void isl_mat_free(__isl_take isl_mat *mat); - -int isl_mat_rows(__isl_keep isl_mat *mat); -int isl_mat_cols(__isl_keep isl_mat *mat); -int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v); -__isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, - int row, int col, isl_int v); -__isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, - int row, int col, int v); - -struct isl_mat *isl_mat_swap_cols(struct isl_mat *mat, unsigned i, unsigned j); -struct isl_mat *isl_mat_swap_rows(struct isl_mat *mat, unsigned i, unsigned j); - -struct isl_vec *isl_mat_vec_product(struct isl_mat *mat, struct isl_vec *vec); -struct isl_vec *isl_vec_mat_product(struct isl_vec *vec, struct isl_mat *mat); -__isl_give isl_vec *isl_mat_vec_inverse_product(__isl_take isl_mat *mat, - __isl_take isl_vec *vec); -struct isl_mat *isl_mat_aff_direct_sum(struct isl_mat *left, - struct isl_mat *right); -__isl_give isl_mat *isl_mat_diagonal(__isl_take isl_mat *mat1, - __isl_take isl_mat *mat2); -struct isl_mat *isl_mat_left_hermite(struct isl_mat *M, - int neg, struct isl_mat **U, struct isl_mat **Q); -struct isl_mat *isl_mat_lin_to_aff(struct isl_mat *mat); -struct isl_mat *isl_mat_inverse_product(struct isl_mat *left, - struct isl_mat *right); -struct isl_mat *isl_mat_product(struct isl_mat *left, struct isl_mat *right); -struct isl_mat *isl_mat_transpose(struct isl_mat *mat); -__isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat); -__isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat); - -__isl_give isl_mat *isl_mat_normalize(__isl_take isl_mat *mat); -__isl_give isl_mat *isl_mat_normalize_row(__isl_take isl_mat *mat, int row); - -struct isl_mat *isl_mat_drop_cols(struct isl_mat *mat, - unsigned col, unsigned n); -struct isl_mat *isl_mat_drop_rows(struct isl_mat *mat, - unsigned row, unsigned n); -__isl_give isl_mat *isl_mat_insert_cols(__isl_take isl_mat *mat, - unsigned col, unsigned n); -__isl_give isl_mat *isl_mat_insert_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n); -__isl_give isl_mat *isl_mat_move_cols(__isl_take isl_mat *mat, - unsigned dst_col, unsigned src_col, unsigned n); -__isl_give isl_mat *isl_mat_add_rows(__isl_take isl_mat *mat, unsigned n); -__isl_give isl_mat *isl_mat_insert_zero_cols(__isl_take isl_mat *mat, - unsigned first, unsigned n); -__isl_give isl_mat *isl_mat_add_zero_cols(__isl_take isl_mat *mat, unsigned n); -__isl_give isl_mat *isl_mat_insert_zero_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n); -__isl_give isl_mat *isl_mat_add_zero_rows(__isl_take isl_mat *mat, unsigned n); - -void isl_mat_col_add(__isl_keep isl_mat *mat, int dst_col, int src_col); -void isl_mat_col_mul(struct isl_mat *mat, int dst_col, isl_int f, int src_col); -void isl_mat_col_submul(struct isl_mat *mat, - int dst_col, isl_int f, int src_col); - -struct isl_mat *isl_mat_unimodular_complete(struct isl_mat *M, int row); - -__isl_give isl_mat *isl_mat_from_row_vec(__isl_take isl_vec *vec); -__isl_give isl_mat *isl_mat_concat(__isl_take isl_mat *top, - __isl_take isl_mat *bot); -__isl_give isl_mat *isl_mat_vec_concat(__isl_take isl_mat *top, - __isl_take isl_vec *bot); - -int isl_mat_is_equal(__isl_keep isl_mat *mat1, __isl_keep isl_mat *mat2); - -int isl_mat_initial_non_zero_cols(__isl_keep isl_mat *mat); - -void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent); -void isl_mat_dump(__isl_keep isl_mat *mat); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/obj.h b/cloog-0.16.3/isl/include/isl/obj.h deleted file mode 100644 index b2a6afc8c3294931d5b46b0f6bf2907eaa79f496..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/obj.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef ISL_OBJ_H -#define ISL_OBJ_H - -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_obj_vtable { - void *(*copy)(void *v1); - void *(*add)(void *v1, void *v2); - __isl_give isl_printer *(*print)(__isl_take isl_printer *p, void *v); - void (*free)(void *v); -}; -typedef struct isl_obj_vtable *isl_obj_type; -extern struct isl_obj_vtable isl_obj_none_vtable; -#define isl_obj_none (&isl_obj_none_vtable) -extern struct isl_obj_vtable isl_obj_int_vtable; -#define isl_obj_int (&isl_obj_int_vtable) -extern struct isl_obj_vtable isl_obj_set_vtable; -#define isl_obj_set (&isl_obj_set_vtable) -extern struct isl_obj_vtable isl_obj_union_set_vtable; -#define isl_obj_union_set (&isl_obj_union_set_vtable) -extern struct isl_obj_vtable isl_obj_map_vtable; -#define isl_obj_map (&isl_obj_map_vtable) -extern struct isl_obj_vtable isl_obj_union_map_vtable; -#define isl_obj_union_map (&isl_obj_union_map_vtable) -extern struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable; -#define isl_obj_pw_qpolynomial (&isl_obj_pw_qpolynomial_vtable) -extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable; -#define isl_obj_union_pw_qpolynomial (&isl_obj_union_pw_qpolynomial_vtable) -extern struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable; -#define isl_obj_pw_qpolynomial_fold (&isl_obj_pw_qpolynomial_fold_vtable) -extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable; -#define isl_obj_union_pw_qpolynomial_fold (&isl_obj_union_pw_qpolynomial_fold_vtable) -struct isl_obj { - isl_obj_type type; - void *v; -}; - -struct isl_int_obj; -typedef struct isl_int_obj isl_int_obj; - -__isl_give isl_int_obj *isl_int_obj_alloc(isl_ctx *ctx, isl_int v); -void isl_int_obj_free(__isl_take isl_int_obj *i); -__isl_give isl_int_obj *isl_int_obj_add(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2); -__isl_give isl_int_obj *isl_int_obj_sub(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2); -__isl_give isl_int_obj *isl_int_obj_mul(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2); -void isl_int_obj_get_int(__isl_keep isl_int_obj *i, isl_int *v); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/options.h b/cloog-0.16.3/isl/include/isl/options.h deleted file mode 100644 index d280ab30c224632c056995481a3a9d13b828e5ae..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/options.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_OPTIONS_H -#define ISL_OPTIONS_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_options { - #define ISL_LP_TAB 0 - #define ISL_LP_PIP 1 - unsigned lp_solver; - - #define ISL_ILP_GBR 0 - #define ISL_ILP_PIP 1 - unsigned ilp_solver; - - #define ISL_PIP_TAB 0 - #define ISL_PIP_PIP 1 - unsigned pip; - - #define ISL_CONTEXT_GBR 0 - #define ISL_CONTEXT_LEXMIN 1 - unsigned context; - - #define ISL_GBR_NEVER 0 - #define ISL_GBR_ONCE 1 - #define ISL_GBR_ALWAYS 2 - unsigned gbr; - unsigned gbr_only_first; - - #define ISL_CLOSURE_ISL 0 - #define ISL_CLOSURE_BOX 1 - unsigned closure; - - #define ISL_BOUND_BERNSTEIN 0 - #define ISL_BOUND_RANGE 1 - int bound; - - #define ISL_BERNSTEIN_FACTORS 1 - #define ISL_BERNSTEIN_INTERVALS 2 - int bernstein_recurse; - - int bernstein_triangulate; - - int pip_symmetry; - - #define ISL_CONVEX_HULL_WRAP 0 - #define ISL_CONVEX_HULL_FM 1 - int convex; - - int schedule_parametric; - int schedule_outer_zero_distance; - int schedule_maximize_band_depth; - int schedule_split_parallel; -}; - -ISL_ARG_DECL(isl_options, struct isl_options, isl_options_arg) - -extern struct isl_arg isl_options_arg[]; - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/point.h b/cloog-0.16.3/isl/include/isl/point.h deleted file mode 100644 index a5a7f93a401cd7805bdc3df44c86a2da805afc5c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/point.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef ISL_POINT_H -#define ISL_POINT_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_point; -typedef struct isl_point isl_point; - -isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); -__isl_give isl_dim *isl_point_get_dim(__isl_keep isl_point *pnt); - -__isl_give isl_point *isl_point_zero(__isl_take isl_dim *dim); -__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt); -void isl_point_free(__isl_take isl_point *pnt); - -void isl_point_get_coordinate(__isl_keep isl_point *pnt, - enum isl_dim_type type, int pos, isl_int *v); -__isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, isl_int v); - -__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); -__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); - -__isl_give isl_point *isl_point_void(__isl_take isl_dim *dim); -int isl_point_is_void(__isl_keep isl_point *pnt); - -void isl_point_print(__isl_keep isl_point *pnt, FILE *out); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/polynomial.h b/cloog-0.16.3/isl/include/isl/polynomial.h deleted file mode 100644 index 389d6ce28a6696864ab114905131441f755e9e22..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/polynomial.h +++ /dev/null @@ -1,555 +0,0 @@ -#ifndef ISL_POLYNOMIAL_H -#define ISL_POLYNOMIAL_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_qpolynomial; -typedef struct isl_qpolynomial isl_qpolynomial; - -isl_ctx *isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp); -__isl_give isl_dim *isl_qpolynomial_get_dim(__isl_keep isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_reset_dim( - __isl_take isl_qpolynomial *qp, __isl_take isl_dim *dim); -unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type); -int isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_qpolynomial *isl_qpolynomial_zero(__isl_take isl_dim *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_one(__isl_take isl_dim *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_infty(__isl_take isl_dim *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_neginfty(__isl_take isl_dim *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_nan(__isl_take isl_dim *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_rat_cst(__isl_take isl_dim *dim, - const isl_int n, const isl_int d); -__isl_give isl_qpolynomial *isl_qpolynomial_div(__isl_take isl_div *div); -__isl_give isl_qpolynomial *isl_qpolynomial_var(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos); -__isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp); -void isl_qpolynomial_free(__isl_take isl_qpolynomial *qp); - -int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2); -int isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp, - isl_int *n, isl_int *d); -void isl_qpolynomial_get_den(__isl_keep isl_qpolynomial *qp, isl_int *d); - -__isl_give isl_qpolynomial *isl_qpolynomial_neg(__isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_sub(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_pow(__isl_take isl_qpolynomial *qp, - unsigned power); -__isl_give isl_qpolynomial *isl_qpolynomial_add_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v); -__isl_give isl_qpolynomial *isl_qpolynomial_mul_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v); -__isl_give isl_qpolynomial *isl_qpolynomial_scale( - __isl_take isl_qpolynomial *qp, isl_int v); - -__isl_give isl_qpolynomial *isl_qpolynomial_insert_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, - unsigned first, unsigned n); -__isl_give isl_qpolynomial *isl_qpolynomial_add_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n); -__isl_give isl_qpolynomial *isl_qpolynomial_move_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_qpolynomial *isl_qpolynomial_drop_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_qpolynomial *isl_qpolynomial_substitute( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs); - -int isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial *qp, - __isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user), void *user); - -__isl_give isl_qpolynomial *isl_qpolynomial_homogenize( - __isl_take isl_qpolynomial *poly); - -__isl_give isl_qpolynomial *isl_qpolynomial_align_params( - __isl_take isl_qpolynomial *qp, __isl_take isl_dim *model); - -struct isl_term; -typedef struct isl_term isl_term; - -isl_ctx *isl_term_get_ctx(__isl_keep isl_term *term); - -void isl_term_free(__isl_take isl_term *term); - -unsigned isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type); -void isl_term_get_num(__isl_keep isl_term *term, isl_int *n); -void isl_term_get_den(__isl_keep isl_term *term, isl_int *d); -int isl_term_get_exp(__isl_keep isl_term *term, - enum isl_dim_type type, unsigned pos); -__isl_give isl_div *isl_term_get_div(__isl_keep isl_term *term, unsigned pos); - -int isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial *qp, - int (*fn)(__isl_take isl_term *term, void *user), void *user); - -__isl_give isl_qpolynomial *isl_qpolynomial_eval( - __isl_take isl_qpolynomial *qp, __isl_take isl_point *pnt); - -__isl_give isl_qpolynomial *isl_qpolynomial_gist( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *context); - -__isl_give isl_qpolynomial *isl_qpolynomial_from_constraint( - __isl_take isl_constraint *c, enum isl_dim_type type, unsigned pos); -__isl_give isl_qpolynomial *isl_qpolynomial_from_term(__isl_take isl_term *term); -__isl_give isl_qpolynomial *isl_qpolynomial_from_aff(__isl_take isl_aff *aff); -__isl_give isl_basic_map *isl_basic_map_from_qpolynomial( - __isl_take isl_qpolynomial *qp); - -__isl_give isl_printer *isl_printer_print_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp); -void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out, - unsigned output_format); -void isl_qpolynomial_dump(__isl_keep isl_qpolynomial *qp); - -struct isl_pw_qpolynomial; -typedef struct isl_pw_qpolynomial isl_pw_qpolynomial; - -isl_ctx *isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero(__isl_take isl_dim *dim); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy( - __isl_keep isl_pw_qpolynomial *pwqp); -void *isl_pw_qpolynomial_free(__isl_take isl_pw_qpolynomial *pwqp); - -int isl_pw_qpolynomial_is_zero(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_dim *isl_pw_qpolynomial_get_dim( - __isl_keep isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_reset_dim( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_dim *dim); -unsigned isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial *pwqp, - enum isl_dim_type type); -int isl_pw_qpolynomial_involves_dims(__isl_keep isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); -int isl_pw_qpolynomial_has_equal_dim(__isl_keep isl_pw_qpolynomial *pwqp1, - __isl_keep isl_pw_qpolynomial *pwqp2); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_set_dim_name( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_set *isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain( - __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sub( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_disjoint( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_neg( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul_isl_int( - __isl_take isl_pw_qpolynomial *pwqp, isl_int v); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_insert_dims( - __isl_take isl_pw_qpolynomial *pwqp, enum isl_dim_type type, - unsigned first, unsigned n); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned n); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_move_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_dim( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned n, isl_int v); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_eval( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_point *pnt); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_max( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_qpolynomial *isl_pw_qpolynomial_min( - __isl_take isl_pw_qpolynomial *pwqp); - -int isl_pw_qpolynomial_foreach_piece(__isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp, - void *user), void *user); -int isl_pw_qpolynomial_foreach_lifted_piece(__isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp, - void *user), void *user); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx, - const char *str); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_give isl_printer *isl_printer_print_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp); -void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out, - unsigned output_format); -void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_coalesce( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_periods( - __isl_take isl_pw_qpolynomial *pwqp, int max_periods); - -__isl_give isl_pw_qpolynomial *isl_basic_set_multiplicative_call( - __isl_take isl_basic_set *bset, - __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)); - -enum isl_fold { - isl_fold_min, - isl_fold_max, - isl_fold_list -}; - -struct isl_qpolynomial_fold; -typedef struct isl_qpolynomial_fold isl_qpolynomial_fold; - -isl_ctx *isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold *fold); -enum isl_fold isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold *fold); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type, - __isl_take isl_dim *dim); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_alloc( - enum isl_fold type, __isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( - __isl_keep isl_qpolynomial_fold *fold); -void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_reset_dim( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_dim *dim); - -int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold); -int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1, - __isl_keep isl_qpolynomial_fold *fold2); - -__isl_give isl_dim *isl_qpolynomial_fold_get_dim( - __isl_keep isl_qpolynomial_fold *fold); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold( - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_mul_isl_int( - __isl_take isl_qpolynomial_fold *fold, isl_int v); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( - __isl_take isl_qpolynomial_fold *fold, isl_int v); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs); - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_eval( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt); - -int isl_qpolynomial_fold_foreach_qpolynomial( - __isl_keep isl_qpolynomial_fold *fold, - int (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user); - -__isl_give isl_printer *isl_printer_print_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold); -void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, FILE *out, - unsigned output_format); -void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold *fold); - -struct isl_pw_qpolynomial_fold; -typedef struct isl_pw_qpolynomial_fold isl_pw_qpolynomial_fold; - -isl_ctx *isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial( - enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_alloc( - enum isl_fold type, - __isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy( - __isl_keep isl_pw_qpolynomial_fold *pwf); -void *isl_pw_qpolynomial_fold_free(__isl_take isl_pw_qpolynomial_fold *pwf); - -int isl_pw_qpolynomial_fold_is_zero(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_dim *isl_pw_qpolynomial_fold_get_dim( - __isl_keep isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_dim( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_dim *dim); -unsigned isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type); -int isl_pw_qpolynomial_fold_has_equal_dim( - __isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2); - -size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_zero( - __isl_take isl_dim *dim, enum isl_fold type); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_set_dim_name( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_set *isl_pw_qpolynomial_fold_domain( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_domain( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add_disjoint( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_mul_isl_int( - __isl_take isl_pw_qpolynomial_fold *pwf, isl_int v); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_dims( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_move_dims( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fix_dim( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned n, isl_int v); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_eval( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_point *pnt); - -int isl_pw_qpolynomial_fold_foreach_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); -int isl_pw_qpolynomial_fold_foreach_lifted_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); - -__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf); -void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf, - FILE *out, unsigned output_format); -void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_max( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_min( - __isl_take isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( - __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, int *tight); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound( - __isl_take isl_pw_qpolynomial_fold *pwf, int *tight); -__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold( - __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); -__isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold( - __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( - __isl_take isl_pw_qpolynomial *pwqp, int sign); - -struct isl_union_pw_qpolynomial; -typedef struct isl_union_pw_qpolynomial isl_union_pw_qpolynomial; - -isl_ctx *isl_union_pw_qpolynomial_get_ctx( - __isl_keep isl_union_pw_qpolynomial *upwqp); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero( - __isl_take isl_dim *dim); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy( - __isl_keep isl_union_pw_qpolynomial *upwqp); -void isl_union_pw_qpolynomial_free(__isl_take isl_union_pw_qpolynomial *upwqp); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul_isl_int( - __isl_take isl_union_pw_qpolynomial *upwqp, isl_int v); - -__isl_give isl_union_set *isl_union_pw_qpolynomial_domain( - __isl_take isl_union_pw_qpolynomial *upwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain( - __isl_take isl_union_pw_qpolynomial *upwpq, - __isl_take isl_union_set *uset); - -__isl_give isl_dim *isl_union_pw_qpolynomial_get_dim( - __isl_keep isl_union_pw_qpolynomial *upwqp); - -__isl_give isl_qpolynomial *isl_union_pw_qpolynomial_eval( - __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_point *pnt); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce( - __isl_take isl_union_pw_qpolynomial *upwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_union_set *context); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_align_params( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_dim *model); - -int isl_union_pw_qpolynomial_foreach_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, - int (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user), void *user); -__isl_give isl_pw_qpolynomial *isl_union_pw_qpolynomial_extract_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, __isl_take isl_dim *dim); - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp); - -struct isl_union_pw_qpolynomial_fold; -typedef struct isl_union_pw_qpolynomial_fold isl_union_pw_qpolynomial_fold; - -isl_ctx *isl_union_pw_qpolynomial_fold_get_ctx( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_zero( - __isl_take isl_dim *dim, enum isl_fold type); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - __isl_take isl_union_pw_qpolynomial_fold *upwqp, - __isl_take isl_pw_qpolynomial_fold *pwqp); -void isl_union_pw_qpolynomial_fold_free( - __isl_take isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( - __isl_take isl_union_pw_qpolynomial_fold *upwf1, - __isl_take isl_union_pw_qpolynomial_fold *upwf2); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_pw_qpolynomial *upwqp); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_mul_isl_int( - __isl_take isl_union_pw_qpolynomial_fold *upwf, isl_int v); - -__isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *uset); - -enum isl_fold isl_union_pw_qpolynomial_fold_get_type( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_dim *isl_union_pw_qpolynomial_fold_get_dim( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_qpolynomial *isl_union_pw_qpolynomial_fold_eval( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_point *pnt); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce( - __isl_take isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *context); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_align_params( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_dim *model); - -int isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( - __isl_keep isl_union_pw_qpolynomial_fold *upwf, - int (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf, - void *user), void *user); -__isl_give isl_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold( - __isl_keep isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_dim *dim); - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( - __isl_take isl_union_pw_qpolynomial *upwqp, - enum isl_fold type, int *tight); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_set *uset, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_map *umap, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, int sign); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/printer.h b/cloog-0.16.3/isl/include/isl/printer.h deleted file mode 100644 index da2f043991fd7456b03377c721350d8242889a4f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/printer.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef ISL_PRINTER_H -#define ISL_PRINTER_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_printer; -typedef struct isl_printer isl_printer; - -__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file); -__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx); -void isl_printer_free(__isl_take isl_printer *printer); - -isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer); - -__isl_give char *isl_printer_get_str(__isl_keep isl_printer *printer); - -__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p, - int indent); -__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p, - int indent); - -#define ISL_FORMAT_ISL 0 -#define ISL_FORMAT_POLYLIB 1 -#define ISL_FORMAT_POLYLIB_CONSTRAINTS 2 -#define ISL_FORMAT_OMEGA 3 -#define ISL_FORMAT_C 4 -#define ISL_FORMAT_LATEX 5 -#define ISL_FORMAT_EXT_POLYLIB 6 -__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p, - int output_format); - -__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p, - const char *prefix); -__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p, - const char *suffix); -__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p, - int width); - -__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p); -__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p); -__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i); -__isl_give isl_printer *isl_printer_print_isl_int(__isl_take isl_printer *p, - isl_int i); -__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p, - const char *s); - -__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/schedule.h b/cloog-0.16.3/isl/include/isl/schedule.h deleted file mode 100644 index 20cb40b1a0a83782a22d3ebb90f3646153f77e4e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/schedule.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef ISL_SCHEDULE_H -#define ISL_SCHEDULE_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_schedule; -typedef struct isl_schedule isl_schedule; - -__isl_give isl_schedule *isl_union_set_compute_schedule( - __isl_take isl_union_set *domain, - __isl_take isl_union_map *validity, - __isl_take isl_union_map *proximity); -void *isl_schedule_free(__isl_take isl_schedule *sched); -__isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched); - -isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *sched); - -__isl_give isl_band_list *isl_schedule_get_band_forest( - __isl_keep isl_schedule *schedule); - -__isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p, - __isl_keep isl_schedule *schedule); -void isl_schedule_dump(__isl_keep isl_schedule *schedule); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/seq.h b/cloog-0.16.3/isl/include/isl/seq.h deleted file mode 100644 index eda88184026fc20fa1a88d55ace705ad976341fe..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/seq.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SEQ_H -#define ISL_SEQ_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Some common operations on sequences of isl_int's */ - -void isl_seq_clr(isl_int *p, unsigned len); -void isl_seq_set(isl_int *p, isl_int v, unsigned len); -void isl_seq_neg(isl_int *dat, isl_int *src, unsigned len); -void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len); -void isl_seq_addmul(isl_int *dst, isl_int f, isl_int *src, unsigned len); -void isl_seq_submul(isl_int *dst, isl_int f, isl_int *src, unsigned len); -void isl_seq_swp_or_cpy(isl_int *dst, isl_int *src, unsigned len); -void isl_seq_scale(isl_int *dst, isl_int *src, isl_int f, unsigned len); -void isl_seq_scale_down(isl_int *dst, isl_int *src, isl_int f, unsigned len); -void isl_seq_cdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len); -void isl_seq_fdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len); -void isl_seq_fdiv_r(isl_int *dst, isl_int *src, isl_int m, unsigned len); -void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1, - isl_int m2, isl_int *src2, unsigned len); -void isl_seq_elim(isl_int *dst, isl_int *src, unsigned pos, unsigned len, - isl_int *m); -void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd); -void isl_seq_lcm(isl_int *p, unsigned len, isl_int *lcm); -void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len); -void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len, - isl_int *prod); -int isl_seq_first_non_zero(isl_int *p, unsigned len); -int isl_seq_last_non_zero(isl_int *p, unsigned len); -int isl_seq_abs_min_non_zero(isl_int *p, unsigned len); -int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len); -int isl_seq_cmp(isl_int *p1, isl_int *p2, unsigned len); -int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len); - -uint32_t isl_seq_get_hash(isl_int *p, unsigned len); -uint32_t isl_seq_get_hash_bits(isl_int *p, unsigned len, unsigned bits); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/set.h b/cloog-0.16.3/isl/include/isl/set.h deleted file mode 100644 index 026adc3e6ab44110b7bc193d9ff73c94ff9c47cf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/set.h +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SET_H -#define ISL_SET_H - -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -unsigned isl_basic_set_n_dim(const struct isl_basic_set *bset); -unsigned isl_basic_set_n_param(const struct isl_basic_set *bset); -unsigned isl_basic_set_total_dim(const struct isl_basic_set *bset); -unsigned isl_basic_set_dim(const struct isl_basic_set *bset, - enum isl_dim_type type); - -unsigned isl_set_n_dim(const struct isl_set *set); -unsigned isl_set_n_param(const struct isl_set *set); -unsigned isl_set_dim(const struct isl_set *set, enum isl_dim_type type); - -isl_ctx *isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset); -isl_ctx *isl_set_get_ctx(__isl_keep isl_set *set); -__isl_give isl_dim *isl_basic_set_get_dim(__isl_keep isl_basic_set *bset); -__isl_give isl_dim *isl_set_get_dim(__isl_keep isl_set *set); -__isl_give isl_set *isl_set_reset_dim(__isl_take isl_set *set, - __isl_take isl_dim *dim); - -struct isl_div *isl_basic_set_div(struct isl_basic_set *bset, int pos); - -__isl_give isl_local_space *isl_basic_set_get_local_space( - __isl_keep isl_basic_set *bset); - -const char *isl_basic_set_get_tuple_name(__isl_keep isl_basic_set *bset); -const char *isl_set_get_tuple_name(__isl_keep isl_set *set); -__isl_give isl_basic_set *isl_basic_set_set_tuple_name( - __isl_take isl_basic_set *set, const char *s); -__isl_give isl_set *isl_set_set_tuple_name(__isl_take isl_set *set, - const char *s); -const char *isl_basic_set_get_dim_name(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos); -__isl_give isl_basic_set *isl_basic_set_set_dim_name( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, const char *s); -const char *isl_set_get_dim_name(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); -__isl_give isl_set *isl_set_set_dim_name(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, const char *s); - -int isl_basic_set_is_rational(__isl_keep isl_basic_set *bset); - -struct isl_basic_set *isl_basic_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_extend(struct isl_basic_set *base, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_extend_constraints( - struct isl_basic_set *base, unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_finalize(struct isl_basic_set *bset); -void isl_basic_set_free(__isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_copy(__isl_keep isl_basic_set *bset); -struct isl_basic_set *isl_basic_set_dup(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_dim *dim); -struct isl_basic_set *isl_basic_set_empty_like(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_universe(__isl_take isl_dim *dim); -__isl_give isl_basic_set *isl_basic_set_nat_universe(__isl_take isl_dim *dim); -struct isl_basic_set *isl_basic_set_universe_like(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_universe_like_set( - __isl_keep isl_set *model); -struct isl_basic_set *isl_basic_set_interval(struct isl_ctx *ctx, - isl_int min, isl_int max); -struct isl_basic_set *isl_basic_set_positive_orthant(struct isl_dim *dims); -void isl_basic_set_print_internal(__isl_keep isl_basic_set *bset, - FILE *out, int indent); -__isl_give isl_basic_set *isl_basic_set_intersect( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); -__isl_give isl_basic_set *isl_basic_set_apply( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_set_affine_hull( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_remove_dims( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_set *isl_basic_set_simplify(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_detect_equalities( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_remove_redundancies( - __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_basic_set_list_product( - __isl_take struct isl_basic_set_list *list); - -__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx, - FILE *input, int nparam); -__isl_give isl_basic_set *isl_basic_set_read_from_str(isl_ctx *ctx, - const char *str, int nparam); -__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx, - FILE *input, int nparam); -__isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx, - const char *str, int nparam); -void isl_basic_set_dump(__isl_keep isl_basic_set *bset); -void isl_set_dump(__isl_keep isl_set *set); -__isl_give isl_printer *isl_printer_print_basic_set( - __isl_take isl_printer *printer, __isl_keep isl_basic_set *bset); -__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *printer, - __isl_keep isl_set *map); -void isl_basic_set_print(__isl_keep isl_basic_set *bset, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format); -void isl_set_print(__isl_keep struct isl_set *set, FILE *out, int indent, - unsigned output_format); -__isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, isl_int value); -__isl_give isl_basic_set *isl_basic_set_fix_si(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); - -struct isl_basic_set *isl_basic_set_from_underlying_set( - struct isl_basic_set *bset, struct isl_basic_set *like); -struct isl_set *isl_set_from_underlying_set( - struct isl_set *set, struct isl_basic_set *like); -struct isl_set *isl_set_to_underlying_set(struct isl_set *set); - -int isl_basic_set_is_equal( - struct isl_basic_set *bset1, struct isl_basic_set *bset2); - -__isl_give isl_set *isl_basic_set_partial_lexmin( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_basic_set_partial_lexmax( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_set_partial_lexmin( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_set_partial_lexmax( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_basic_set_lexmin(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_basic_set_lexmax(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set); -__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set); -int isl_basic_set_foreach_lexmax(__isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user); - -__isl_give isl_set *isl_basic_set_union( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - -int isl_basic_set_compare_at(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, int pos); -int isl_set_follows_at(__isl_keep isl_set *set1, - __isl_keep isl_set *set2, int pos); - -int isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, unsigned n, int *signs); - -int isl_basic_set_is_universe(__isl_keep isl_basic_set *bset); -int isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset); -int isl_basic_set_fast_is_empty(__isl_keep isl_basic_set *bset); -int isl_basic_set_is_empty(__isl_keep isl_basic_set *bset); -int isl_basic_set_is_bounded(__isl_keep isl_basic_set *bset); - -struct isl_set *isl_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, int n, unsigned flags); -struct isl_set *isl_set_extend(struct isl_set *base, - unsigned nparam, unsigned dim); -__isl_give isl_set *isl_set_empty(__isl_take isl_dim *dim); -struct isl_set *isl_set_empty_like(struct isl_set *set); -__isl_give isl_set *isl_set_universe(__isl_take isl_dim *dim); -__isl_give isl_set *isl_set_nat_universe(__isl_take isl_dim *dim); -__isl_give isl_set *isl_set_universe_like(__isl_keep isl_set *model); -__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *bset); -struct isl_set *isl_set_finalize(struct isl_set *set); -__isl_give isl_set *isl_set_copy(__isl_keep isl_set *set); -void isl_set_free(__isl_take isl_set *set); -struct isl_set *isl_set_dup(struct isl_set *set); -__isl_give isl_set *isl_set_from_basic_set(__isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_set_sample(__isl_take isl_set *set); -__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset); -__isl_give isl_point *isl_set_sample_point(__isl_take isl_set *set); -__isl_give isl_set *isl_set_detect_equalities(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_set_affine_hull(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_set_convex_hull(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_set_polyhedral_hull(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_set_simple_hull(__isl_take isl_set *set); -struct isl_basic_set *isl_set_bounded_simple_hull(struct isl_set *set); -__isl_give isl_set *isl_set_recession_cone(__isl_take isl_set *set); - -struct isl_set *isl_set_union_disjoint( - struct isl_set *set1, struct isl_set *set2); -__isl_give isl_set *isl_set_union( - __isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_set *isl_set_product(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_basic_set *isl_basic_set_flat_product( - __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2); -__isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_set *isl_set_intersect( - __isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, - __isl_take isl_set *params); -__isl_give isl_set *isl_set_subtract( - __isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_set *isl_set_complement(__isl_take isl_set *set); -__isl_give isl_set *isl_set_apply( - __isl_take isl_set *set, - __isl_take isl_map *map); -__isl_give isl_set *isl_set_fix(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, isl_int value); -struct isl_set *isl_set_fix_dim_si(struct isl_set *set, - unsigned dim, int value); -struct isl_set *isl_set_lower_bound_dim(struct isl_set *set, - unsigned dim, isl_int value); -__isl_give isl_set *isl_set_insert(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_basic_set *isl_basic_set_add(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned n); -__isl_give isl_set *isl_set_add_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned n); -__isl_give isl_basic_set *isl_basic_set_move_dims(__isl_take isl_basic_set *bset, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_set *isl_set_move_dims(__isl_take isl_set *set, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_basic_set *isl_basic_set_project_out( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_basic_set *isl_basic_set_remove_divs( - __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_set *isl_set_eliminate_dims(struct isl_set *set, - unsigned first, unsigned n); -__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_remove_divs_involving_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_remove_unknown_divs(__isl_take isl_set *set); -__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set); -__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - -int isl_basic_set_involves_dims(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -int isl_set_involves_dims(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - -void isl_set_print_internal(__isl_keep isl_set *set, FILE *out, int indent); -int isl_set_plain_is_empty(__isl_keep isl_set *set); -int isl_set_fast_is_empty(__isl_keep isl_set *set); -int isl_set_plain_is_universe(__isl_keep isl_set *set); -int isl_set_fast_is_universe(__isl_keep isl_set *set); -int isl_set_is_empty(__isl_keep isl_set *set); -int isl_set_is_bounded(__isl_keep isl_set *set); -int isl_set_is_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_is_strict_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_is_singleton(__isl_keep isl_set *set); -int isl_set_is_box(__isl_keep isl_set *set); -int isl_set_has_equal_dim(__isl_keep isl_set *set1, __isl_keep isl_set *set2); - -__isl_give isl_set *isl_set_sum(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_basic_set *isl_basic_set_neg(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_neg(__isl_take isl_set *set); - -__isl_give isl_set *isl_set_make_disjoint(__isl_take isl_set *set); -struct isl_set *isl_basic_set_compute_divs(struct isl_basic_set *bset); -__isl_give isl_set *isl_set_compute_divs(__isl_take isl_set *set); -__isl_give isl_set *isl_set_align_divs(__isl_take isl_set *set); - -struct isl_basic_set *isl_set_copy_basic_set(struct isl_set *set); -struct isl_set *isl_set_drop_basic_set(struct isl_set *set, - struct isl_basic_set *bset); - -int isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset, - unsigned dim, isl_int *val); - -int isl_set_plain_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val); -int isl_set_fast_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val); -int isl_set_plain_dim_has_fixed_lower_bound(__isl_keep isl_set *set, - unsigned dim, isl_int *val); -int isl_set_dim_is_bounded(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - -__isl_give isl_basic_set *isl_basic_set_gist(__isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context); -__isl_give isl_set *isl_set_gist_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *context); -__isl_give isl_set *isl_set_gist(__isl_take isl_set *set, - __isl_take isl_set *context); -int isl_basic_set_dim_residue_class(struct isl_basic_set *bset, - int pos, isl_int *modulo, isl_int *residue); -int isl_set_dim_residue_class(struct isl_set *set, - int pos, isl_int *modulo, isl_int *residue); - -__isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set); - -int isl_set_plain_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_fast_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_plain_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); -int isl_set_fast_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - -uint32_t isl_set_get_hash(struct isl_set *set); - -int isl_set_dim_is_unique(struct isl_set *set, unsigned dim); - -int isl_set_n_basic_set(__isl_keep isl_set *set); -int isl_set_foreach_basic_set(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_basic_set *bset, void *user), void *user); - -int isl_set_foreach_point(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user); -int isl_set_count(__isl_keep isl_set *set, isl_int *count); -int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset, - isl_int max, isl_int *count); -int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count); - -__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt); -__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt); -__isl_give isl_basic_set *isl_basic_set_box_from_points( - __isl_take isl_point *pnt1, __isl_take isl_point *pnt2); -__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1, - __isl_take isl_point *pnt2); - -__isl_give isl_basic_set *isl_basic_set_lift(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_lift(__isl_take isl_set *set); - -__isl_give isl_map *isl_set_lex_le_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_map *isl_set_lex_lt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_map *isl_set_lex_ge_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_map *isl_set_lex_gt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); - -int isl_set_size(__isl_keep isl_set *set); - -__isl_give isl_set *isl_set_align_params(__isl_take isl_set *set, - __isl_take isl_dim *model); - -__isl_give isl_mat *isl_basic_set_equalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); -__isl_give isl_mat *isl_basic_set_inequalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); -__isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( - __isl_take isl_dim *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); - -__isl_give isl_mat *isl_basic_set_reduced_basis(__isl_keep isl_basic_set *bset); - -__isl_give isl_basic_set *isl_basic_set_coefficients( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_set_coefficients(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_basic_set_solutions( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_set_solutions(__isl_take isl_set *set); - -__isl_give isl_pw_aff *isl_set_dim_max(__isl_take isl_set *set, int pos); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/set_type.h b/cloog-0.16.3/isl/include/isl/set_type.h deleted file mode 100644 index ce349e1b5d4a13035a2ea3484f0d7c8b202cafed..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/set_type.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ISL_SET_TYPE_H -#define ISL_SET_TYPE_H - -#include - -#endif diff --git a/cloog-0.16.3/isl/include/isl/stream.h b/cloog-0.16.3/isl/include/isl/stream.h deleted file mode 100644 index 779c6cf9753cc2bd5314eeff7deb645caad7f845..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/stream.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_STREAM_H -#define ISL_STREAM_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_token_type { ISL_TOKEN_ERROR = -1, - ISL_TOKEN_UNKNOWN = 256, ISL_TOKEN_VALUE, - ISL_TOKEN_IDENT, ISL_TOKEN_GE, - ISL_TOKEN_LE, ISL_TOKEN_GT, ISL_TOKEN_LT, - ISL_TOKEN_LEX_GE, ISL_TOKEN_LEX_LE, - ISL_TOKEN_LEX_GT, ISL_TOKEN_LEX_LT, - ISL_TOKEN_TO, ISL_TOKEN_AND, - ISL_TOKEN_OR, ISL_TOKEN_EXISTS, ISL_TOKEN_NOT, - ISL_TOKEN_DEF, ISL_TOKEN_INFTY, ISL_TOKEN_NAN, - ISL_TOKEN_MIN, ISL_TOKEN_MAX, ISL_TOKEN_RAT, - ISL_TOKEN_TRUE, ISL_TOKEN_FALSE, - ISL_TOKEN_CEILD, ISL_TOKEN_FLOORD, - ISL_TOKEN_STRING, - ISL_TOKEN_LAST }; - -struct isl_token { - enum isl_token_type type; - - unsigned int on_new_line : 1; - unsigned is_keyword : 1; - int line; - int col; - - union { - isl_int v; - char *s; - } u; -}; - -void isl_token_free(struct isl_token *tok); - -struct isl_stream { - struct isl_ctx *ctx; - FILE *file; - const char *str; - int line; - int col; - int eof; - - char *buffer; - size_t size; - size_t len; - int c; - int un[5]; - int n_un; - - struct isl_token *tokens[5]; - int n_token; - - struct isl_hash_table *keywords; - enum isl_token_type next_type; -}; - -struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file); -struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str); -void isl_stream_free(struct isl_stream *s); - -void isl_stream_error(struct isl_stream *s, struct isl_token *tok, char *msg); - -struct isl_token *isl_stream_next_token(struct isl_stream *s); -struct isl_token *isl_stream_next_token_on_same_line(struct isl_stream *s); -int isl_stream_next_token_is(struct isl_stream *s, int type); -void isl_stream_push_token(struct isl_stream *s, struct isl_token *tok); -void isl_stream_flush_tokens(struct isl_stream *s); -int isl_stream_eat_if_available(struct isl_stream *s, int type); -char *isl_stream_read_ident_if_available(struct isl_stream *s); -int isl_stream_eat(struct isl_stream *s, int type); -int isl_stream_is_empty(struct isl_stream *s); -int isl_stream_skip_line(struct isl_stream *s); - -enum isl_token_type isl_stream_register_keyword(struct isl_stream *s, - const char *name); - -struct isl_obj isl_stream_read_obj(struct isl_stream *s); -__isl_give isl_map *isl_stream_read_map(struct isl_stream *s, int nparam); -__isl_give isl_set *isl_stream_read_set(struct isl_stream *s, int nparam); -__isl_give isl_pw_qpolynomial *isl_stream_read_pw_qpolynomial( - struct isl_stream *s); -__isl_give isl_union_map *isl_stream_read_union_map(struct isl_stream *s); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/union_map.h b/cloog-0.16.3/isl/include/isl/union_map.h deleted file mode 100644 index 5f61d0a1b2f58a4ecbbb9dd3bed2d11b3b9da153..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/union_map.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef ISL_UNION_MAP_H -#define ISL_UNION_MAP_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_union_map; -typedef struct isl_union_map isl_union_map; -#ifndef isl_union_set -struct isl_union_set; -typedef struct isl_union_set isl_union_set; -#endif - -__isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map); -__isl_give isl_union_map *isl_union_map_empty(__isl_take isl_dim *dim); -__isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap); -void *isl_union_map_free(__isl_take isl_union_map *umap); - -isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap); -__isl_give isl_dim *isl_union_map_get_dim(__isl_keep isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_universe( - __isl_take isl_union_map *umap); -__isl_give isl_union_set *isl_union_map_domain(__isl_take isl_union_map *umap); -__isl_give isl_union_set *isl_union_map_range(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_domain_map( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_range_map( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_from_domain( - __isl_take isl_union_set *uset); -__isl_give isl_union_map *isl_union_map_from_range( - __isl_take isl_union_set *uset); - -__isl_give isl_union_map *isl_union_map_affine_hull( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_polyhedral_hull( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_simple_hull( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_coalesce( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_compute_divs( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_lexmin(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_lexmax(__isl_take isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_add_map(__isl_take isl_union_map *umap, - __isl_take isl_map *map); -__isl_give isl_union_map *isl_union_map_union(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_subtract( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_intersect( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_product(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_flat_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_gist(__isl_take isl_union_map *umap, - __isl_take isl_union_map *context); - -__isl_give isl_union_map *isl_union_map_intersect_domain( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); -__isl_give isl_union_map *isl_union_map_intersect_range( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); - -__isl_give isl_union_map *isl_union_map_apply_domain( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_apply_range( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_from_domain_and_range( - __isl_take isl_union_set *domain, __isl_take isl_union_set *range); - -__isl_give isl_union_map *isl_union_map_detect_equalities( - __isl_keep isl_union_map *umap); -__isl_give isl_union_set *isl_union_map_deltas(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_deltas_map( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_set_identity(__isl_take isl_union_set *uset); - -int isl_union_map_is_empty(__isl_keep isl_union_map *umap); -int isl_union_map_is_single_valued(__isl_keep isl_union_map *umap); -int isl_union_map_plain_is_injective(__isl_keep isl_union_map *umap); -int isl_union_map_is_injective(__isl_keep isl_union_map *umap); -int isl_union_map_is_bijective(__isl_keep isl_union_map *umap); - -int isl_union_map_is_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); -int isl_union_map_is_equal(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); -int isl_union_map_is_strict_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - -int isl_union_map_n_map(__isl_keep isl_union_map *umap); -int isl_union_map_foreach_map(__isl_keep isl_union_map *umap, - int (*fn)(__isl_take isl_map *map, void *user), void *user); -__isl_give int isl_union_map_contains(__isl_keep isl_union_map *umap, - __isl_keep isl_dim *dim); -__isl_give isl_map *isl_union_map_extract_map(__isl_keep isl_union_map *umap, - __isl_take isl_dim *dim); -__isl_give isl_map *isl_map_from_union_map(__isl_take isl_union_map *umap); - -__isl_give isl_basic_map *isl_union_map_sample(__isl_take isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap, - int *exact); -__isl_give isl_union_map *isl_union_map_transitive_closure( - __isl_take isl_union_map *umap, int *exact); - -__isl_give isl_union_map *isl_union_map_lex_lt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_lex_le_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_lex_gt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_lex_ge_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); - -__isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_give isl_union_map *isl_union_map_read_from_str(struct isl_ctx *ctx, - const char *str); -__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p, - __isl_keep isl_union_map *umap); -void isl_union_map_dump(__isl_keep isl_union_map *umap); - -__isl_give isl_union_set *isl_union_map_wrap(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_set_unwrap(__isl_take isl_union_set *uset); - -__isl_give isl_union_map *isl_union_map_zip(__isl_take isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_align_params( - __isl_take isl_union_map *umap, __isl_take isl_dim *model); -__isl_give isl_union_set *isl_union_set_align_params( - __isl_take isl_union_set *uset, __isl_take isl_dim *model); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/union_set.h b/cloog-0.16.3/isl/include/isl/union_set.h deleted file mode 100644 index 3401f4ebb31546188377ae11ee99c6a6c9b0a26e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/union_set.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef ISL_UNION_SET_H -#define ISL_UNION_SET_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set); -__isl_give isl_union_set *isl_union_set_empty(__isl_take isl_dim *dim); -__isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset); -void *isl_union_set_free(__isl_take isl_union_set *uset); - -isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset); -__isl_give isl_dim *isl_union_set_get_dim(__isl_keep isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_universe( - __isl_take isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_detect_equalities( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_affine_hull( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_polyhedral_hull( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_simple_hull( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_coalesce( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_compute_divs( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_lexmin(__isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_lexmax(__isl_take isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_add_set(__isl_take isl_union_set *uset, - __isl_take isl_set *set); -__isl_give isl_union_set *isl_union_set_union(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); -__isl_give isl_union_set *isl_union_set_subtract( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_set *isl_union_set_intersect( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_set *isl_union_set_product(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); -__isl_give isl_union_set *isl_union_set_gist(__isl_take isl_union_set *uset, - __isl_take isl_union_set *context); - -__isl_give isl_union_set *isl_union_set_apply( - __isl_take isl_union_set *uset, __isl_take isl_union_map *umap); - -int isl_union_set_is_empty(__isl_keep isl_union_set *uset); - -int isl_union_set_is_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); -int isl_union_set_is_equal(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); -int isl_union_set_is_strict_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - -int isl_union_set_n_set(__isl_keep isl_union_set *uset); -int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_set *set, void *user), void *user); -__isl_give int isl_union_set_contains(__isl_keep isl_union_set *uset, - __isl_keep isl_dim *dim); -__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset, - __isl_take isl_dim *dim); -__isl_give isl_set *isl_set_from_union_set(__isl_take isl_union_set *uset); -int isl_union_set_foreach_point(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user); - -__isl_give isl_basic_set *isl_union_set_sample(__isl_take isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_lift(__isl_take isl_union_set *uset); - -__isl_give isl_union_map *isl_union_set_lex_lt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_map *isl_union_set_lex_le_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_map *isl_union_set_lex_gt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_map *isl_union_set_lex_ge_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); - -__isl_give isl_union_set *isl_union_set_coefficients( - __isl_take isl_union_set *bset); -__isl_give isl_union_set *isl_union_set_solutions( - __isl_take isl_union_set *bset); - -__isl_give isl_union_set *isl_union_set_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_give isl_union_set *isl_union_set_read_from_str(struct isl_ctx *ctx, - const char *str); -__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p, - __isl_keep isl_union_set *uset); -void isl_union_set_dump(__isl_keep isl_union_set *uset); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/vec.h b/cloog-0.16.3/isl/include/isl/vec.h deleted file mode 100644 index e59283881ed0a6223e25b3068812e2c3d0a1471c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/vec.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_VEC_H -#define ISL_VEC_H - -#include - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_vec { - int ref; - - struct isl_ctx *ctx; - - unsigned size; - isl_int *el; - - struct isl_blk block; -}; -typedef struct isl_vec isl_vec; - -struct isl_vec *isl_vec_alloc(struct isl_ctx *ctx, unsigned size); -struct isl_vec *isl_vec_copy(struct isl_vec *vec); -struct isl_vec *isl_vec_cow(struct isl_vec *vec); -void isl_vec_free(struct isl_vec *vec); - -isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec); - -int isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2); - -void isl_vec_dump(__isl_keep isl_vec *vec); -__isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer, - __isl_keep isl_vec *vec); - -void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm); -struct isl_vec *isl_vec_ceil(struct isl_vec *vec); -struct isl_vec *isl_vec_normalize(struct isl_vec *vec); -__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec); -__isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m); -__isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1, - __isl_take isl_vec *vec2); -__isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size); -__isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size); - -__isl_give isl_vec *isl_vec_sort(__isl_take isl_vec *vec); - -__isl_give isl_vec *isl_vec_read_from_file(isl_ctx *ctx, FILE *input); - -__isl_give isl_vec *isl_vec_drop_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n); -__isl_give isl_vec *isl_vec_insert_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n); -__isl_give isl_vec *isl_vec_insert_zero_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/version.h b/cloog-0.16.3/isl/include/isl/version.h deleted file mode 100644 index 7f8f23d69451b45b41bbef0f089cc8efba4b7298..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/version.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef ISL_VERSION_H -#define ISL_VERSION_H - -#if defined(__cplusplus) -extern "C" { -#endif - -const char *isl_version(void); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/include/isl/vertices.h b/cloog-0.16.3/isl/include/isl/vertices.h deleted file mode 100644 index 3e8460d65954fff23d2450f61adf15ff34d7ed56..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/include/isl/vertices.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef ISL_VERTICES_H -#define ISL_VERTICES_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_external_vertex; -typedef struct isl_external_vertex isl_vertex; - -struct isl_cell; -typedef struct isl_cell isl_cell; - -struct isl_vertices; -typedef struct isl_vertices isl_vertices; - -isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex); -int isl_vertex_get_id(__isl_keep isl_vertex *vertex); -__isl_give isl_basic_set *isl_vertex_get_domain(__isl_keep isl_vertex *vertex); -__isl_give isl_basic_set *isl_vertex_get_expr(__isl_keep isl_vertex *vertex); -void isl_vertex_free(__isl_take isl_vertex *vertex); - -__isl_give isl_vertices *isl_basic_set_compute_vertices( - __isl_keep isl_basic_set *bset); -isl_ctx *isl_vertices_get_ctx(__isl_keep isl_vertices *vertices); -int isl_vertices_get_n_vertices(__isl_keep isl_vertices *vertices); -int isl_vertices_foreach_vertex(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user); -void isl_vertices_free(__isl_take isl_vertices *vertices); - -isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell); -__isl_give isl_basic_set *isl_cell_get_domain(__isl_keep isl_cell *cell); -int isl_cell_foreach_vertex(__isl_keep isl_cell *cell, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user); -void isl_cell_free(__isl_take isl_cell *cell); - -int isl_vertices_foreach_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/install-sh b/cloog-0.16.3/isl/install-sh deleted file mode 100755 index 3f83ce9b555a535ca90c450882953554c7e4ded5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/install-sh +++ /dev/null @@ -1,524 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2010-02-06.18; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.16.3/isl/isl.py b/cloog-0.16.3/isl/isl.py deleted file mode 100644 index 6382f6384e722ec992141da3d25101c59e12cea0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl.py +++ /dev/null @@ -1,100 +0,0 @@ -import gdb -import re - -# GDB Pretty Printers for most isl objects -class IslObjectPrinter: - """Print an isl object""" - def __init__ (self, val, type): - self.val = val - self.type = type - - def to_string (self): - # Cast val to a void pointer to stop gdb using this pretty - # printer for the pointer which would lead to an infinite loop. - void_ptr = gdb.lookup_type('void').pointer() - value = str(self.val.cast(void_ptr)) - printer = gdb.parse_and_eval("isl_printer_to_str(isl_" - + str(self.type) - + "_get_ctx(" + value + "))") - printer = gdb.parse_and_eval("isl_printer_print_" - + str(self.type) + "(" - + str(printer) + ", " - + value + ")") - string = gdb.parse_and_eval("(char*)isl_printer_get_str(" - + str(printer) + ")") - gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")") - return string - - def display_hint (self): - return 'string' - -class IslIntPrinter: - """Print an isl_int """ - def __init__ (self, val): - self.val = val - - def to_string (self): - # Cast val to a void pointer to stop gdb using this pretty - # printer for the pointer which would lead to an infinite loop. - void_ptr = gdb.lookup_type('void').pointer() - value = str(self.val.cast(void_ptr)) - - context = gdb.parse_and_eval("isl_ctx_alloc()") - printer = gdb.parse_and_eval("isl_printer_to_str(" - + str(context) + ")") - printer = gdb.parse_and_eval("isl_printer_print_isl_int(" - + str(printer) + ", " - + value + ")") - string = gdb.parse_and_eval("(char*)isl_printer_get_str(" - + str(printer) + ")") - gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")") - gdb.parse_and_eval("isl_ctx_free(" + str(context) + ")") - return string - - def display_hint (self): - return 'string' - -class IslPrintCommand (gdb.Command): - """Print an isl value.""" - def __init__ (self): - super (IslPrintCommand, self).__init__ ("islprint", - gdb.COMMAND_OBSCURE) - def invoke (self, arg, from_tty): - arg = gdb.parse_and_eval(arg); - printer = str_lookup_function(arg) - - if printer == None: - print "No isl printer for this type" - return - - print printer.to_string() - -IslPrintCommand() - -def str_lookup_function (val): - if val.type.code != gdb.TYPE_CODE_PTR: - if str(val.type) == "isl_int": - return IslIntPrinter(val) - else: - return None - - lookup_tag = val.type.target() - regex = re.compile ("^isl_(.*)$") - - if lookup_tag == None: - return None - - m = regex.match (str(lookup_tag)) - - if m: - # Those types of printers defined in isl. - if m.group(1) in ["basic_set", "set", "union_set", "basic_map", - "map", "union_map", "qpolynomial", - "pw_qpolynomial", "pw_qpolynomial_fold", - "union_pw_qpolynomial", - "union_pw_qpolynomial_fold"]: - return IslObjectPrinter(val, m.group(1)) - return None - -# Do not register the pretty printer. -# gdb.current_objfile().pretty_printers.append(str_lookup_function) diff --git a/cloog-0.16.3/isl/isl_aff.c b/cloog-0.16.3/isl/isl_aff.c deleted file mode 100644 index f4f1976aa97a1079c7aabff2056327f2c04a6992..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_aff.c +++ /dev/null @@ -1,1347 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * Copyright 2011 Universiteit Leiden - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - * and Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -__isl_give isl_aff *isl_aff_alloc_vec(__isl_take isl_local_space *ls, - __isl_take isl_vec *v) -{ - isl_aff *aff; - - if (!ls || !v) - goto error; - - aff = isl_calloc_type(v->ctx, struct isl_aff); - if (!aff) - goto error; - - aff->ref = 1; - aff->ls = ls; - aff->v = v; - - return aff; -error: - isl_local_space_free(ls); - isl_vec_free(v); - return NULL; -} - -__isl_give isl_aff *isl_aff_alloc(__isl_take isl_local_space *ls) -{ - isl_ctx *ctx; - isl_vec *v; - unsigned total; - - if (!ls) - return NULL; - - ctx = isl_local_space_get_ctx(ls); - if (!isl_local_space_divs_known(ls)) - isl_die(ctx, isl_error_invalid, "local space has unknown divs", - goto error); - - total = isl_local_space_dim(ls, isl_dim_all); - v = isl_vec_alloc(ctx, 1 + 1 + total); - return isl_aff_alloc_vec(ls, v); -error: - isl_local_space_free(ls); - return NULL; -} - -__isl_give isl_aff *isl_aff_zero(__isl_take isl_local_space *ls) -{ - isl_aff *aff; - - aff = isl_aff_alloc(ls); - if (!aff) - return NULL; - - isl_int_set_si(aff->v->el[0], 1); - isl_seq_clr(aff->v->el + 1, aff->v->size - 1); - - return aff; -} - -__isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff) -{ - if (!aff) - return NULL; - - aff->ref++; - return aff; -} - -__isl_give isl_aff *isl_aff_dup(__isl_keep isl_aff *aff) -{ - if (!aff) - return NULL; - - return isl_aff_alloc_vec(isl_local_space_copy(aff->ls), - isl_vec_copy(aff->v)); -} - -__isl_give isl_aff *isl_aff_cow(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - - if (aff->ref == 1) - return aff; - aff->ref--; - return isl_aff_dup(aff); -} - -void *isl_aff_free(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - - if (--aff->ref > 0) - return NULL; - - isl_local_space_free(aff->ls); - isl_vec_free(aff->v); - - free(aff); - - return NULL; -} - -isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff) -{ - return aff ? isl_local_space_get_ctx(aff->ls) : NULL; -} - -int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type) -{ - return aff ? isl_local_space_dim(aff->ls, type) : 0; -} - -__isl_give isl_dim *isl_aff_get_dim(__isl_keep isl_aff *aff) -{ - return aff ? isl_local_space_get_dim(aff->ls) : NULL; -} - -__isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff) -{ - return aff ? isl_local_space_copy(aff->ls) : NULL; -} - -const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned pos) -{ - return aff ? isl_local_space_get_dim_name(aff->ls, type, pos) : 0; -} - -__isl_give isl_aff *isl_aff_reset_dim(__isl_take isl_aff *aff, - __isl_take isl_dim *dim) -{ - aff = isl_aff_cow(aff); - if (!aff || !dim) - goto error; - - aff->ls = isl_local_space_reset_dim(aff->ls, dim); - if (!aff->ls) - return isl_aff_free(aff); - - return aff; -error: - isl_aff_free(aff); - isl_dim_free(dim); - return NULL; -} - -/* Reorder the coefficients of the affine expression based - * on the given reodering. - * The reordering r is assumed to have been extended with the local - * variables. - */ -static __isl_give isl_vec *vec_reorder(__isl_take isl_vec *vec, - __isl_take isl_reordering *r, int n_div) -{ - isl_vec *res; - int i; - - if (!vec || !r) - goto error; - - res = isl_vec_alloc(vec->ctx, 2 + isl_dim_total(r->dim) + n_div); - isl_seq_cpy(res->el, vec->el, 2); - isl_seq_clr(res->el + 2, res->size - 2); - for (i = 0; i < r->len; ++i) - isl_int_set(res->el[2 + r->pos[i]], vec->el[2 + i]); - - isl_reordering_free(r); - isl_vec_free(vec); - return res; -error: - isl_vec_free(vec); - isl_reordering_free(r); - return NULL; -} - -/* Reorder the dimensions of "aff" according to the given reordering. - */ -__isl_give isl_aff *isl_aff_realign(__isl_take isl_aff *aff, - __isl_take isl_reordering *r) -{ - aff = isl_aff_cow(aff); - if (!aff) - goto error; - - r = isl_reordering_extend(r, aff->ls->div->n_row); - aff->v = vec_reorder(aff->v, isl_reordering_copy(r), - aff->ls->div->n_row); - aff->ls = isl_local_space_realign(aff->ls, r); - - if (!aff->v || !aff->ls) - return isl_aff_free(aff); - - return aff; -error: - isl_aff_free(aff); - isl_reordering_free(r); - return NULL; -} - -int isl_aff_plain_is_zero(__isl_keep isl_aff *aff) -{ - if (!aff) - return -1; - - return isl_seq_first_non_zero(aff->v->el + 1, aff->v->size - 1) < 0; -} - -int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2) -{ - int equal; - - if (!aff1 || !aff2) - return -1; - - equal = isl_local_space_is_equal(aff1->ls, aff2->ls); - if (equal < 0 || !equal) - return equal; - - return isl_vec_is_equal(aff1->v, aff2->v); -} - -int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v) -{ - if (!aff) - return -1; - isl_int_set(*v, aff->v->el[0]); - return 0; -} - -int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v) -{ - if (!aff) - return -1; - isl_int_set(*v, aff->v->el[1]); - return 0; -} - -int isl_aff_get_coefficient(__isl_keep isl_aff *aff, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!aff) - return -1; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return -1); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_set(*v, aff->v->el[1 + pos]); - - return 0; -} - -__isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_set(aff->v->el[0], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_set(aff->v->el[1], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v) -{ - if (isl_int_is_zero(v)) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_addmul(aff->v->el[1], aff->v->el[0], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v) -{ - isl_int t; - - isl_int_init(t); - isl_int_set_si(t, v); - aff = isl_aff_add_constant(aff, t); - isl_int_clear(t); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_set_si(aff->v->el[1], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!aff) - return NULL; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_set(aff->v->el[1 + pos], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v) -{ - if (!aff) - return NULL; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_set_si(aff->v->el[1 + pos], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!aff) - return NULL; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_addmul(aff->v->el[1 + pos], aff->v->el[0], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v) -{ - isl_int t; - - isl_int_init(t); - isl_int_set_si(t, v); - aff = isl_aff_add_coefficient(aff, type, pos, t); - isl_int_clear(t); - - return aff; -} - -__isl_give isl_div *isl_aff_get_div(__isl_keep isl_aff *aff, int pos) -{ - if (!aff) - return NULL; - - return isl_local_space_get_div(aff->ls, pos); -} - -__isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_seq_neg(aff->v->el + 1, aff->v->el + 1, aff->v->size - 1); - - return aff; -} - -/* Given f, return floor(f). - * If f is an integer expression, then just return f. - * Otherwise, create a new div d = [f] and return the expression d. - */ -__isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff) -{ - int size; - isl_ctx *ctx; - - if (!aff) - return NULL; - - if (isl_int_is_one(aff->v->el[0])) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->ls = isl_local_space_add_div(aff->ls, isl_vec_copy(aff->v)); - if (!aff->ls) - return isl_aff_free(aff); - - ctx = isl_aff_get_ctx(aff); - size = aff->v->size; - isl_vec_free(aff->v); - aff->v = isl_vec_alloc(ctx, size + 1); - aff->v = isl_vec_clr(aff->v); - if (!aff->v) - return isl_aff_free(aff); - isl_int_set_si(aff->v->el[0], 1); - isl_int_set_si(aff->v->el[size], 1); - - return aff; -} - -/* Given f, return ceil(f). - * If f is an integer expression, then just return f. - * Otherwise, create a new div d = [-f] and return the expression -d. - */ -__isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - - if (isl_int_is_one(aff->v->el[0])) - return aff; - - aff = isl_aff_neg(aff); - aff = isl_aff_floor(aff); - aff = isl_aff_neg(aff); - - return aff; -} - -/* Apply the expansion computed by isl_merge_divs. - * The expansion itself is given by "exp" while the resulting - * list of divs is given by "div". - */ -__isl_give isl_aff *isl_aff_expand_divs( __isl_take isl_aff *aff, - __isl_take isl_mat *div, int *exp) -{ - int i, j; - int old_n_div; - int new_n_div; - int offset; - - aff = isl_aff_cow(aff); - if (!aff || !div) - goto error; - - old_n_div = isl_local_space_dim(aff->ls, isl_dim_div); - new_n_div = isl_mat_rows(div); - if (new_n_div < old_n_div) - isl_die(isl_mat_get_ctx(div), isl_error_invalid, - "not an expansion", goto error); - - aff->v = isl_vec_extend(aff->v, aff->v->size + new_n_div - old_n_div); - if (!aff->v) - goto error; - - offset = 1 + isl_local_space_offset(aff->ls, isl_dim_div); - j = old_n_div - 1; - for (i = new_n_div - 1; i >= 0; --i) { - if (j >= 0 && exp[j] == i) { - if (i != j) - isl_int_swap(aff->v->el[offset + i], - aff->v->el[offset + j]); - j--; - } else - isl_int_set_si(aff->v->el[offset + i], 0); - } - - aff->ls = isl_local_space_replace_divs(aff->ls, isl_mat_copy(div)); - if (!aff->ls) - goto error; - isl_mat_free(div); - return aff; -error: - isl_aff_free(aff); - isl_mat_free(div); - return NULL; -} - -/* Add two affine expressions that live in the same local space. - */ -static __isl_give isl_aff *add_expanded(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - isl_int gcd, f; - - aff1 = isl_aff_cow(aff1); - if (!aff1 || !aff2) - goto error; - - aff1->v = isl_vec_cow(aff1->v); - if (!aff1->v) - goto error; - - isl_int_init(gcd); - isl_int_init(f); - isl_int_gcd(gcd, aff1->v->el[0], aff2->v->el[0]); - isl_int_divexact(f, aff2->v->el[0], gcd); - isl_seq_scale(aff1->v->el + 1, aff1->v->el + 1, f, aff1->v->size - 1); - isl_int_divexact(f, aff1->v->el[0], gcd); - isl_seq_addmul(aff1->v->el + 1, f, aff2->v->el + 1, aff1->v->size - 1); - isl_int_divexact(f, aff2->v->el[0], gcd); - isl_int_mul(aff1->v->el[0], aff1->v->el[0], f); - isl_int_clear(f); - isl_int_clear(gcd); - - isl_aff_free(aff2); - return aff1; -error: - isl_aff_free(aff1); - isl_aff_free(aff2); - return NULL; -} - -__isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - isl_ctx *ctx; - int *exp1 = NULL; - int *exp2 = NULL; - isl_mat *div; - - if (!aff1 || !aff2) - goto error; - - ctx = isl_aff_get_ctx(aff1); - if (!isl_dim_equal(aff1->ls->dim, aff2->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", goto error); - - if (aff1->ls->div->n_row == 0 && aff2->ls->div->n_row == 0) - return add_expanded(aff1, aff2); - - exp1 = isl_alloc_array(ctx, int, aff1->ls->div->n_row); - exp2 = isl_alloc_array(ctx, int, aff2->ls->div->n_row); - if (!exp1 || !exp2) - goto error; - - div = isl_merge_divs(aff1->ls->div, aff2->ls->div, exp1, exp2); - aff1 = isl_aff_expand_divs(aff1, isl_mat_copy(div), exp1); - aff2 = isl_aff_expand_divs(aff2, div, exp2); - free(exp1); - free(exp2); - - return add_expanded(aff1, aff2); -error: - free(exp1); - free(exp2); - isl_aff_free(aff1); - isl_aff_free(aff2); - return NULL; -} - -__isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - return isl_aff_add(aff1, isl_aff_neg(aff2)); -} - -__isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f) -{ - isl_int gcd; - - if (isl_int_is_one(f)) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_init(gcd); - isl_int_gcd(gcd, aff->v->el[0], f); - isl_int_divexact(aff->v->el[0], aff->v->el[0], gcd); - isl_int_divexact(gcd, f, gcd); - isl_seq_scale(aff->v->el + 1, aff->v->el + 1, gcd, aff->v->size - 1); - isl_int_clear(gcd); - - return aff; -} - -__isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f) -{ - isl_int gcd; - - if (isl_int_is_one(f)) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_init(gcd); - isl_seq_gcd(aff->v->el + 1, aff->v->size - 1, &gcd); - isl_int_gcd(gcd, gcd, f); - isl_seq_scale_down(aff->v->el + 1, aff->v->el + 1, gcd, aff->v->size - 1); - isl_int_divexact(gcd, f, gcd); - isl_int_mul(aff->v->el[0], aff->v->el[0], gcd); - isl_int_clear(gcd); - - return aff; -} - -__isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f) -{ - isl_int v; - - if (f == 1) - return aff; - - isl_int_init(v); - isl_int_set_ui(v, f); - aff = isl_aff_scale_down(aff, v); - isl_int_clear(v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, const char *s) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->ls = isl_local_space_set_dim_name(aff->ls, type, pos, s); - if (!aff->ls) - return isl_aff_free(aff); - - return aff; -} - -/* Exploit the equalities in "eq" to simplify the affine expression - * and the expressions of the integer divisions in the local space. - * The integer divisions in this local space are assumed to appear - * as regular dimensions in "eq". - */ -static __isl_give isl_aff *isl_aff_substitute_equalities( - __isl_take isl_aff *aff, __isl_take isl_basic_set *eq) -{ - int i, j; - unsigned total; - unsigned n_div; - - if (!eq) - goto error; - if (eq->n_eq == 0) { - isl_basic_set_free(eq); - return aff; - } - - aff = isl_aff_cow(aff); - if (!aff) - goto error; - - aff->ls = isl_local_space_substitute_equalities(aff->ls, - isl_basic_set_copy(eq)); - if (!aff->ls) - goto error; - - total = 1 + isl_dim_total(eq->dim); - n_div = eq->n_div; - for (i = 0; i < eq->n_eq; ++i) { - j = isl_seq_last_non_zero(eq->eq[i], total + n_div); - if (j < 0 || j == 0 || j >= total) - continue; - - isl_seq_elim(aff->v->el + 1, eq->eq[i], j, total, - &aff->v->el[0]); - } - - isl_basic_set_free(eq); - return aff; -error: - isl_basic_set_free(eq); - isl_aff_free(aff); - return NULL; -} - -/* Look for equalities among the variables shared by context and aff - * and the integer divisions of aff, if any. - * The equalities are then used to eliminate coefficients and/or integer - * divisions from aff. - */ -__isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, - __isl_take isl_set *context) -{ - isl_basic_set *hull; - int n_div; - - if (!aff) - goto error; - n_div = isl_local_space_dim(aff->ls, isl_dim_div); - if (n_div > 0) { - isl_basic_set *bset; - context = isl_set_add_dims(context, isl_dim_set, n_div); - bset = isl_basic_set_from_local_space( - isl_aff_get_local_space(aff)); - bset = isl_basic_set_lift(bset); - bset = isl_basic_set_flatten(bset); - context = isl_set_intersect(context, - isl_set_from_basic_set(bset)); - } - - hull = isl_set_affine_hull(context); - return isl_aff_substitute_equalities(aff, hull); -error: - isl_aff_free(aff); - isl_set_free(context); - return NULL; -} - -/* Return a basic set containing those elements in the space - * of aff where it is non-negative. - */ -__isl_give isl_basic_set *isl_aff_nonneg_basic_set(__isl_take isl_aff *aff) -{ - isl_constraint *ineq; - - ineq = isl_inequality_from_aff(aff); - - return isl_basic_set_from_constraint(ineq); -} - -/* Return a basic set containing those elements in the space - * of aff where it is zero. - */ -__isl_give isl_basic_set *isl_aff_zero_basic_set(__isl_take isl_aff *aff) -{ - isl_constraint *ineq; - - ineq = isl_equality_from_aff(aff); - - return isl_basic_set_from_constraint(ineq); -} - -/* Return a basic set containing those elements in the shared space - * of aff1 and aff2 where aff1 is greater than or equal to aff2. - */ -__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - aff1 = isl_aff_sub(aff1, aff2); - - return isl_aff_nonneg_basic_set(aff1); -} - -__isl_give isl_aff *isl_aff_add_on_domain(__isl_keep isl_set *dom, - __isl_take isl_aff *aff1, __isl_take isl_aff *aff2) -{ - aff1 = isl_aff_add(aff1, aff2); - aff1 = isl_aff_gist(aff1, isl_set_copy(dom)); - return aff1; -} - -int isl_aff_is_empty(__isl_keep isl_aff *aff) -{ - if (!aff) - return -1; - - return 0; -} - -/* Set active[i] to 1 if the dimension at position i is involved - * in the affine expression. - */ -static int set_active(__isl_keep isl_aff *aff, int *active) -{ - int i, j; - unsigned total; - unsigned offset; - - if (!aff || !active) - return -1; - - total = aff->v->size - 2; - for (i = 0; i < total; ++i) - active[i] = !isl_int_is_zero(aff->v->el[2 + i]); - - offset = isl_local_space_offset(aff->ls, isl_dim_div) - 1; - for (i = aff->ls->div->n_row - 1; i >= 0; --i) { - if (!active[offset + i]) - continue; - for (j = 0; j < total; ++j) - active[j] |= - !isl_int_is_zero(aff->ls->div->row[i][2 + j]); - } - - return 0; -} - -/* Check whether the given affine expression has non-zero coefficient - * for any dimension in the given range or if any of these dimensions - * appear with non-zero coefficients in any of the integer divisions - * involved in the affine expression. - */ -int isl_aff_involves_dims(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - isl_ctx *ctx; - int *active = NULL; - int involves = 0; - - if (!aff) - return -1; - if (n == 0) - return 0; - - ctx = isl_aff_get_ctx(aff); - if (first + n > isl_aff_dim(aff, type)) - isl_die(ctx, isl_error_invalid, - "range out of bounds", return -1); - - active = isl_calloc_array(ctx, int, - isl_local_space_dim(aff->ls, isl_dim_all)); - if (set_active(aff, active) < 0) - goto error; - - first += isl_local_space_offset(aff->ls, type) - 1; - for (i = 0; i < n; ++i) - if (active[first + i]) { - involves = 1; - break; - } - - free(active); - - return involves; -error: - free(active); - return -1; -} - -__isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!aff) - return NULL; - if (n == 0 && !isl_local_space_is_named_or_nested(aff->ls, type)) - return aff; - - ctx = isl_aff_get_ctx(aff); - if (first + n > isl_aff_dim(aff, type)) - isl_die(ctx, isl_error_invalid, "range out of bounds", - return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->ls = isl_local_space_drop_dims(aff->ls, type, first, n); - if (!aff->ls) - return isl_aff_free(aff); - - first += 1 + isl_local_space_offset(aff->ls, type); - aff->v = isl_vec_drop_els(aff->v, first, n); - if (!aff->v) - return isl_aff_free(aff); - - return aff; -} - -__isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!aff) - return NULL; - if (n == 0 && !isl_local_space_is_named_or_nested(aff->ls, type)) - return aff; - - ctx = isl_aff_get_ctx(aff); - if (first > isl_aff_dim(aff, type)) - isl_die(ctx, isl_error_invalid, "position out of bounds", - return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->ls = isl_local_space_insert_dims(aff->ls, type, first, n); - if (!aff->ls) - return isl_aff_free(aff); - - first += 1 + isl_local_space_offset(aff->ls, type); - aff->v = isl_vec_insert_zero_els(aff->v, first, n); - if (!aff->v) - return isl_aff_free(aff); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_aff_dim(aff, type); - - return isl_aff_insert_dims(aff, type, pos, n); -} - -__isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_pw_aff_dim(pwaff, type); - - return isl_pw_aff_insert_dims(pwaff, type, pos, n); -} - -#undef PW -#define PW isl_pw_aff -#undef EL -#define EL isl_aff -#undef EL_IS_ZERO -#define EL_IS_ZERO is_empty -#undef ZERO -#define ZERO empty -#undef IS_ZERO -#define IS_ZERO is_empty -#undef FIELD -#define FIELD aff - -#define NO_EVAL -#define NO_OPT -#define NO_MOVE_DIMS -#define NO_LIFT -#define NO_MORPH - -#include - -/* Compute a piecewise quasi-affine expression with a domain that - * is the union of those of pwaff1 and pwaff2 and such that on each - * cell, the quasi-affine expression is the maximum of those of pwaff1 - * and pwaff2. If only one of pwaff1 or pwaff2 is defined on a given - * cell, then the associated expression is the defined one. - */ -__isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - int i, j, n; - isl_pw_aff *res; - isl_ctx *ctx; - isl_set *set; - - if (!pwaff1 || !pwaff2) - goto error; - - ctx = isl_dim_get_ctx(pwaff1->dim); - if (!isl_dim_equal(pwaff1->dim, pwaff2->dim)) - isl_die(ctx, isl_error_invalid, - "arguments should live in same space", goto error); - - if (isl_pw_aff_is_empty(pwaff1)) { - isl_pw_aff_free(pwaff1); - return pwaff2; - } - - if (isl_pw_aff_is_empty(pwaff2)) { - isl_pw_aff_free(pwaff2); - return pwaff1; - } - - n = 2 * (pwaff1->n + 1) * (pwaff2->n + 1); - res = isl_pw_aff_alloc_(isl_dim_copy(pwaff1->dim), n); - - for (i = 0; i < pwaff1->n; ++i) { - set = isl_set_copy(pwaff1->p[i].set); - for (j = 0; j < pwaff2->n; ++j) { - struct isl_set *common; - isl_set *ge; - - common = isl_set_intersect( - isl_set_copy(pwaff1->p[i].set), - isl_set_copy(pwaff2->p[j].set)); - ge = isl_set_from_basic_set(isl_aff_ge_basic_set( - isl_aff_copy(pwaff2->p[j].aff), - isl_aff_copy(pwaff1->p[i].aff))); - ge = isl_set_intersect(common, ge); - if (isl_set_plain_is_empty(ge)) { - isl_set_free(ge); - continue; - } - set = isl_set_subtract(set, isl_set_copy(ge)); - - res = isl_pw_aff_add_piece(res, ge, - isl_aff_copy(pwaff2->p[j].aff)); - } - res = isl_pw_aff_add_piece(res, set, - isl_aff_copy(pwaff1->p[i].aff)); - } - - for (j = 0; j < pwaff2->n; ++j) { - set = isl_set_copy(pwaff2->p[j].set); - for (i = 0; i < pwaff1->n; ++i) - set = isl_set_subtract(set, - isl_set_copy(pwaff1->p[i].set)); - res = isl_pw_aff_add_piece(res, set, - isl_aff_copy(pwaff2->p[j].aff)); - } - - isl_pw_aff_free(pwaff1); - isl_pw_aff_free(pwaff2); - - return res; -error: - isl_pw_aff_free(pwaff1); - isl_pw_aff_free(pwaff2); - return NULL; -} - -/* Construct a map with as domain the domain of pwaff and - * one-dimensional range corresponding to the affine expressions. - */ -__isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff) -{ - int i; - isl_dim *dim; - isl_map *map; - - if (!pwaff) - return NULL; - - dim = isl_pw_aff_get_dim(pwaff); - dim = isl_dim_from_domain(dim); - dim = isl_dim_add(dim, isl_dim_out, 1); - map = isl_map_empty(dim); - - for (i = 0; i < pwaff->n; ++i) { - isl_basic_map *bmap; - isl_map *map_i; - - bmap = isl_basic_map_from_aff(isl_aff_copy(pwaff->p[i].aff)); - map_i = isl_map_from_basic_map(bmap); - map_i = isl_map_intersect_domain(map_i, - isl_set_copy(pwaff->p[i].set)); - map = isl_map_union_disjoint(map, map_i); - } - - isl_pw_aff_free(pwaff); - - return map; -} - -/* Return a set containing those elements in the domain - * of pwaff where it is non-negative. - */ -__isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff) -{ - int i; - isl_set *set; - - if (!pwaff) - return NULL; - - set = isl_set_empty(isl_pw_aff_get_dim(pwaff)); - - for (i = 0; i < pwaff->n; ++i) { - isl_basic_set *bset; - isl_set *set_i; - - bset = isl_aff_nonneg_basic_set(isl_aff_copy(pwaff->p[i].aff)); - set_i = isl_set_from_basic_set(bset); - set_i = isl_set_intersect(set_i, isl_set_copy(pwaff->p[i].set)); - set = isl_set_union_disjoint(set, set_i); - } - - isl_pw_aff_free(pwaff); - - return set; -} - -/* Return a set containing those elements in the domain - * of pwaff where it is zero. - */ -__isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff) -{ - int i; - isl_set *set; - - if (!pwaff) - return NULL; - - set = isl_set_empty(isl_pw_aff_get_dim(pwaff)); - - for (i = 0; i < pwaff->n; ++i) { - isl_basic_set *bset; - isl_set *set_i; - - bset = isl_aff_zero_basic_set(isl_aff_copy(pwaff->p[i].aff)); - set_i = isl_set_from_basic_set(bset); - set_i = isl_set_intersect(set_i, isl_set_copy(pwaff->p[i].set)); - set = isl_set_union_disjoint(set, set_i); - } - - isl_pw_aff_free(pwaff); - - return set; -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is greater than (or equal) to pwaff2. - * - * We compute the difference on the shared domain and then construct - * the set of values where this difference is non-negative. - * If strict is set, we first subtract 1 from the difference. - * If equal is set, we only return the elements where pwaff1 and pwaff2 - * are equal. - */ -static __isl_give isl_set *pw_aff_gte_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2, int strict, int equal) -{ - isl_set *set1, *set2; - - set1 = isl_pw_aff_domain(isl_pw_aff_copy(pwaff1)); - set2 = isl_pw_aff_domain(isl_pw_aff_copy(pwaff2)); - set1 = isl_set_intersect(set1, set2); - pwaff1 = isl_pw_aff_intersect_domain(pwaff1, isl_set_copy(set1)); - pwaff2 = isl_pw_aff_intersect_domain(pwaff2, isl_set_copy(set1)); - pwaff1 = isl_pw_aff_add(pwaff1, isl_pw_aff_neg(pwaff2)); - - if (strict) { - isl_dim *dim = isl_set_get_dim(set1); - isl_aff *aff; - aff = isl_aff_zero(isl_local_space_from_dim(dim)); - aff = isl_aff_add_constant_si(aff, -1); - pwaff1 = isl_pw_aff_add(pwaff1, isl_pw_aff_alloc(set1, aff)); - } else - isl_set_free(set1); - - if (equal) - return isl_pw_aff_zero_set(pwaff1); - return isl_pw_aff_nonneg_set(pwaff1); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is equal to pwaff2. - */ -__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_gte_set(pwaff1, pwaff2, 0, 1); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is greater than or equal to pwaff2. - */ -__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_gte_set(pwaff1, pwaff2, 0, 0); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is strictly greater than pwaff2. - */ -__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_gte_set(pwaff1, pwaff2, 1, 0); -} - -__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_ge_set(pwaff2, pwaff1); -} - -__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_gt_set(pwaff2, pwaff1); -} - -__isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff, - isl_int v) -{ - int i; - - if (isl_int_is_one(v)) - return pwaff; - if (!isl_int_is_pos(v)) - isl_die(isl_pw_aff_get_ctx(pwaff), isl_error_invalid, - "factor needs to be positive", - return isl_pw_aff_free(pwaff)); - pwaff = isl_pw_aff_cow(pwaff); - if (!pwaff) - return NULL; - if (pwaff->n == 0) - return pwaff; - - for (i = 0; i < pwaff->n; ++i) { - pwaff->p[i].aff = isl_aff_scale_down(pwaff->p[i].aff, v); - if (!pwaff->p[i].aff) - return isl_pw_aff_free(pwaff); - } - - return pwaff; -} - -__isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff) -{ - int i; - - pwaff = isl_pw_aff_cow(pwaff); - if (!pwaff) - return NULL; - if (pwaff->n == 0) - return pwaff; - - for (i = 0; i < pwaff->n; ++i) { - pwaff->p[i].aff = isl_aff_floor(pwaff->p[i].aff); - if (!pwaff->p[i].aff) - return isl_pw_aff_free(pwaff); - } - - return pwaff; -} - -__isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff) -{ - int i; - - pwaff = isl_pw_aff_cow(pwaff); - if (!pwaff) - return NULL; - if (pwaff->n == 0) - return pwaff; - - for (i = 0; i < pwaff->n; ++i) { - pwaff->p[i].aff = isl_aff_ceil(pwaff->p[i].aff); - if (!pwaff->p[i].aff) - return isl_pw_aff_free(pwaff); - } - - return pwaff; -} - -/* Return an affine expression that is equal to pwaff_true for elements - * in "cond" and to pwaff_false for elements not in "cond". - * That is, return cond ? pwaff_true : pwaff_false; - */ -__isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_set *cond, - __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false) -{ - isl_set *comp; - - comp = isl_set_complement(isl_set_copy(cond)); - pwaff_true = isl_pw_aff_intersect_domain(pwaff_true, cond); - pwaff_false = isl_pw_aff_intersect_domain(pwaff_false, comp); - - return isl_pw_aff_add_disjoint(pwaff_true, pwaff_false); -} diff --git a/cloog-0.16.3/isl/isl_aff_private.h b/cloog-0.16.3/isl/isl_aff_private.h deleted file mode 100644 index cd5180406a1eac32ed0fa3405288e3d7c876e7ee..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_aff_private.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef ISL_AFF_PRIVATE_H -#define ISL_AFF_PRIVATE_H - -#include -#include -#include -#include - -struct isl_aff { - int ref; - - isl_local_space *ls; - isl_vec *v; -}; - -struct isl_pw_aff_piece { - struct isl_set *set; - struct isl_aff *aff; -}; - -struct isl_pw_aff { - int ref; - - isl_dim *dim; - - int n; - - size_t size; - struct isl_pw_aff_piece p[1]; -}; - -__isl_give isl_aff *isl_aff_alloc(__isl_take isl_local_space *ls); - -__isl_give isl_aff *isl_aff_reset_dim(__isl_take isl_aff *aff, - __isl_take isl_dim *dim); -__isl_give isl_aff *isl_aff_realign(__isl_take isl_aff *aff, - __isl_take isl_reordering *r); - -__isl_give isl_aff *isl_aff_expand_divs( __isl_take isl_aff *aff, - __isl_take isl_mat *div, int *exp); - -__isl_give isl_pw_aff *isl_pw_aff_add_disjoint( - __isl_take isl_pw_aff *pwaff1, __isl_take isl_pw_aff *pwaff2); - -#endif diff --git a/cloog-0.16.3/isl/isl_affine_hull.c b/cloog-0.16.3/isl/isl_affine_hull.c deleted file mode 100644 index ffb775b89415268c79fa63316beb051411e7b55c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_affine_hull.c +++ /dev/null @@ -1,1018 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include "isl_equalities.h" -#include "isl_sample.h" -#include "isl_tab.h" -#include - -struct isl_basic_map *isl_basic_map_implicit_equalities( - struct isl_basic_map *bmap) -{ - struct isl_tab *tab; - - if (!bmap) - return bmap; - - bmap = isl_basic_map_gauss(bmap, NULL); - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NO_IMPLICIT)) - return bmap; - if (bmap->n_ineq <= 1) - return bmap; - - tab = isl_tab_from_basic_map(bmap); - if (isl_tab_detect_implicit_equalities(tab) < 0) - goto error; - bmap = isl_basic_map_update_from_tab(bmap, tab); - isl_tab_free(tab); - bmap = isl_basic_map_gauss(bmap, NULL); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - return bmap; -error: - isl_tab_free(tab); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_implicit_equalities( - struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_implicit_equalities((struct isl_basic_map*)bset); -} - -struct isl_map *isl_map_implicit_equalities(struct isl_map *map) -{ - int i; - - if (!map) - return map; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_implicit_equalities(map->p[i]); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Make eq[row][col] of both bmaps equal so we can add the row - * add the column to the common matrix. - * Note that because of the echelon form, the columns of row row - * after column col are zero. - */ -static void set_common_multiple( - struct isl_basic_set *bset1, struct isl_basic_set *bset2, - unsigned row, unsigned col) -{ - isl_int m, c; - - if (isl_int_eq(bset1->eq[row][col], bset2->eq[row][col])) - return; - - isl_int_init(c); - isl_int_init(m); - isl_int_lcm(m, bset1->eq[row][col], bset2->eq[row][col]); - isl_int_divexact(c, m, bset1->eq[row][col]); - isl_seq_scale(bset1->eq[row], bset1->eq[row], c, col+1); - isl_int_divexact(c, m, bset2->eq[row][col]); - isl_seq_scale(bset2->eq[row], bset2->eq[row], c, col+1); - isl_int_clear(c); - isl_int_clear(m); -} - -/* Delete a given equality, moving all the following equalities one up. - */ -static void delete_row(struct isl_basic_set *bset, unsigned row) -{ - isl_int *t; - int r; - - t = bset->eq[row]; - bset->n_eq--; - for (r = row; r < bset->n_eq; ++r) - bset->eq[r] = bset->eq[r+1]; - bset->eq[bset->n_eq] = t; -} - -/* Make first row entries in column col of bset1 identical to - * those of bset2, using the fact that entry bset1->eq[row][col]=a - * is non-zero. Initially, these elements of bset1 are all zero. - * For each row i < row, we set - * A[i] = a * A[i] + B[i][col] * A[row] - * B[i] = a * B[i] - * so that - * A[i][col] = B[i][col] = a * old(B[i][col]) - */ -static void construct_column( - struct isl_basic_set *bset1, struct isl_basic_set *bset2, - unsigned row, unsigned col) -{ - int r; - isl_int a; - isl_int b; - unsigned total; - - isl_int_init(a); - isl_int_init(b); - total = 1 + isl_basic_set_n_dim(bset1); - for (r = 0; r < row; ++r) { - if (isl_int_is_zero(bset2->eq[r][col])) - continue; - isl_int_gcd(b, bset2->eq[r][col], bset1->eq[row][col]); - isl_int_divexact(a, bset1->eq[row][col], b); - isl_int_divexact(b, bset2->eq[r][col], b); - isl_seq_combine(bset1->eq[r], a, bset1->eq[r], - b, bset1->eq[row], total); - isl_seq_scale(bset2->eq[r], bset2->eq[r], a, total); - } - isl_int_clear(a); - isl_int_clear(b); - delete_row(bset1, row); -} - -/* Make first row entries in column col of bset1 identical to - * those of bset2, using only these entries of the two matrices. - * Let t be the last row with different entries. - * For each row i < t, we set - * A[i] = (A[t][col]-B[t][col]) * A[i] + (B[i][col]-A[i][col) * A[t] - * B[i] = (A[t][col]-B[t][col]) * B[i] + (B[i][col]-A[i][col) * B[t] - * so that - * A[i][col] = B[i][col] = old(A[t][col]*B[i][col]-A[i][col]*B[t][col]) - */ -static int transform_column( - struct isl_basic_set *bset1, struct isl_basic_set *bset2, - unsigned row, unsigned col) -{ - int i, t; - isl_int a, b, g; - unsigned total; - - for (t = row-1; t >= 0; --t) - if (isl_int_ne(bset1->eq[t][col], bset2->eq[t][col])) - break; - if (t < 0) - return 0; - - total = 1 + isl_basic_set_n_dim(bset1); - isl_int_init(a); - isl_int_init(b); - isl_int_init(g); - isl_int_sub(b, bset1->eq[t][col], bset2->eq[t][col]); - for (i = 0; i < t; ++i) { - isl_int_sub(a, bset2->eq[i][col], bset1->eq[i][col]); - isl_int_gcd(g, a, b); - isl_int_divexact(a, a, g); - isl_int_divexact(g, b, g); - isl_seq_combine(bset1->eq[i], g, bset1->eq[i], a, bset1->eq[t], - total); - isl_seq_combine(bset2->eq[i], g, bset2->eq[i], a, bset2->eq[t], - total); - } - isl_int_clear(a); - isl_int_clear(b); - isl_int_clear(g); - delete_row(bset1, t); - delete_row(bset2, t); - return 1; -} - -/* The implementation is based on Section 5.2 of Michael Karr, - * "Affine Relationships Among Variables of a Program", - * except that the echelon form we use starts from the last column - * and that we are dealing with integer coefficients. - */ -static struct isl_basic_set *affine_hull( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - unsigned total; - int col; - int row; - - if (!bset1 || !bset2) - goto error; - - total = 1 + isl_basic_set_n_dim(bset1); - - row = 0; - for (col = total-1; col >= 0; --col) { - int is_zero1 = row >= bset1->n_eq || - isl_int_is_zero(bset1->eq[row][col]); - int is_zero2 = row >= bset2->n_eq || - isl_int_is_zero(bset2->eq[row][col]); - if (!is_zero1 && !is_zero2) { - set_common_multiple(bset1, bset2, row, col); - ++row; - } else if (!is_zero1 && is_zero2) { - construct_column(bset1, bset2, row, col); - } else if (is_zero1 && !is_zero2) { - construct_column(bset2, bset1, row, col); - } else { - if (transform_column(bset1, bset2, row, col)) - --row; - } - } - isl_assert(bset1->ctx, row == bset1->n_eq, goto error); - isl_basic_set_free(bset2); - bset1 = isl_basic_set_normalize_constraints(bset1); - return bset1; -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Find an integer point in the set represented by "tab" - * that lies outside of the equality "eq" e(x) = 0. - * If "up" is true, look for a point satisfying e(x) - 1 >= 0. - * Otherwise, look for a point satisfying -e(x) - 1 >= 0 (i.e., e(x) <= -1). - * The point, if found, is returned. - * If no point can be found, a zero-length vector is returned. - * - * Before solving an ILP problem, we first check if simply - * adding the normal of the constraint to one of the known - * integer points in the basic set represented by "tab" - * yields another point inside the basic set. - * - * The caller of this function ensures that the tableau is bounded or - * that tab->basis and tab->n_unbounded have been set appropriately. - */ -static struct isl_vec *outside_point(struct isl_tab *tab, isl_int *eq, int up) -{ - struct isl_ctx *ctx; - struct isl_vec *sample = NULL; - struct isl_tab_undo *snap; - unsigned dim; - - if (!tab) - return NULL; - ctx = tab->mat->ctx; - - dim = tab->n_var; - sample = isl_vec_alloc(ctx, 1 + dim); - if (!sample) - return NULL; - isl_int_set_si(sample->el[0], 1); - isl_seq_combine(sample->el + 1, - ctx->one, tab->bmap->sample->el + 1, - up ? ctx->one : ctx->negone, eq + 1, dim); - if (isl_basic_map_contains(tab->bmap, sample)) - return sample; - isl_vec_free(sample); - sample = NULL; - - snap = isl_tab_snap(tab); - - if (!up) - isl_seq_neg(eq, eq, 1 + dim); - isl_int_sub_ui(eq[0], eq[0], 1); - - if (isl_tab_extend_cons(tab, 1) < 0) - goto error; - if (isl_tab_add_ineq(tab, eq) < 0) - goto error; - - sample = isl_tab_sample(tab); - - isl_int_add_ui(eq[0], eq[0], 1); - if (!up) - isl_seq_neg(eq, eq, 1 + dim); - - if (sample && isl_tab_rollback(tab, snap) < 0) - goto error; - - return sample; -error: - isl_vec_free(sample); - return NULL; -} - -struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset) -{ - int i; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - isl_assert(bset->ctx, bset->n_div == 0, goto error); - - for (i = 0; i < bset->n_eq; ++i) - isl_int_set_si(bset->eq[i][0], 0); - - for (i = 0; i < bset->n_ineq; ++i) - isl_int_set_si(bset->ineq[i][0], 0); - - ISL_F_CLR(bset, ISL_BASIC_SET_NO_IMPLICIT); - return isl_basic_set_implicit_equalities(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_set *isl_set_recession_cone(__isl_take isl_set *set) -{ - int i; - - if (!set) - return NULL; - if (set->n == 0) - return set; - - set = isl_set_remove_divs(set); - set = isl_set_cow(set); - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_recession_cone(set->p[i]); - if (!set->p[i]) - goto error; - } - - return set; -error: - isl_set_free(set); - return NULL; -} - -/* Extend an initial (under-)approximation of the affine hull of basic - * set represented by the tableau "tab" - * by looking for points that do not satisfy one of the equalities - * in the current approximation and adding them to that approximation - * until no such points can be found any more. - * - * The caller of this function ensures that "tab" is bounded or - * that tab->basis and tab->n_unbounded have been set appropriately. - */ -static struct isl_basic_set *extend_affine_hull(struct isl_tab *tab, - struct isl_basic_set *hull) -{ - int i, j; - unsigned dim; - - if (!tab || !hull) - goto error; - - dim = tab->n_var; - - if (isl_tab_extend_cons(tab, 2 * dim + 1) < 0) - goto error; - - for (i = 0; i < dim; ++i) { - struct isl_vec *sample; - struct isl_basic_set *point; - for (j = 0; j < hull->n_eq; ++j) { - sample = outside_point(tab, hull->eq[j], 1); - if (!sample) - goto error; - if (sample->size > 0) - break; - isl_vec_free(sample); - sample = outside_point(tab, hull->eq[j], 0); - if (!sample) - goto error; - if (sample->size > 0) - break; - isl_vec_free(sample); - - if (isl_tab_add_eq(tab, hull->eq[j]) < 0) - goto error; - } - if (j == hull->n_eq) - break; - if (tab->samples) - tab = isl_tab_add_sample(tab, isl_vec_copy(sample)); - if (!tab) - goto error; - point = isl_basic_set_from_vec(sample); - hull = affine_hull(hull, point); - if (!hull) - return NULL; - } - - return hull; -error: - isl_basic_set_free(hull); - return NULL; -} - -/* Drop all constraints in bset that involve any of the dimensions - * first to first+n-1. - */ -__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving( - __isl_take isl_basic_set *bset, unsigned first, unsigned n) -{ - int i; - - if (n == 0) - return bset; - - bset = isl_basic_set_cow(bset); - - if (!bset) - return NULL; - - for (i = bset->n_eq - 1; i >= 0; --i) { - if (isl_seq_first_non_zero(bset->eq[i] + 1 + first, n) == -1) - continue; - isl_basic_set_drop_equality(bset, i); - } - - for (i = bset->n_ineq - 1; i >= 0; --i) { - if (isl_seq_first_non_zero(bset->ineq[i] + 1 + first, n) == -1) - continue; - isl_basic_set_drop_inequality(bset, i); - } - - return bset; -} - -/* Look for all equalities satisfied by the integer points in bset, - * which is assumed to be bounded. - * - * The equalities are obtained by successively looking for - * a point that is affinely independent of the points found so far. - * In particular, for each equality satisfied by the points so far, - * we check if there is any point on a hyperplane parallel to the - * corresponding hyperplane shifted by at least one (in either direction). - */ -static struct isl_basic_set *uset_affine_hull_bounded(struct isl_basic_set *bset) -{ - struct isl_vec *sample = NULL; - struct isl_basic_set *hull; - struct isl_tab *tab = NULL; - unsigned dim; - - if (isl_basic_set_plain_is_empty(bset)) - return bset; - - dim = isl_basic_set_n_dim(bset); - - if (bset->sample && bset->sample->size == 1 + dim) { - int contains = isl_basic_set_contains(bset, bset->sample); - if (contains < 0) - goto error; - if (contains) { - if (dim == 0) - return bset; - sample = isl_vec_copy(bset->sample); - } else { - isl_vec_free(bset->sample); - bset->sample = NULL; - } - } - - tab = isl_tab_from_basic_set(bset); - if (!tab) - goto error; - if (tab->empty) { - isl_tab_free(tab); - isl_vec_free(sample); - return isl_basic_set_set_to_empty(bset); - } - if (isl_tab_track_bset(tab, isl_basic_set_copy(bset)) < 0) - goto error; - - if (!sample) { - struct isl_tab_undo *snap; - snap = isl_tab_snap(tab); - sample = isl_tab_sample(tab); - if (isl_tab_rollback(tab, snap) < 0) - goto error; - isl_vec_free(tab->bmap->sample); - tab->bmap->sample = isl_vec_copy(sample); - } - - if (!sample) - goto error; - if (sample->size == 0) { - isl_tab_free(tab); - isl_vec_free(sample); - return isl_basic_set_set_to_empty(bset); - } - - hull = isl_basic_set_from_vec(sample); - - isl_basic_set_free(bset); - hull = extend_affine_hull(tab, hull); - isl_tab_free(tab); - - return hull; -error: - isl_vec_free(sample); - isl_tab_free(tab); - isl_basic_set_free(bset); - return NULL; -} - -/* Given an unbounded tableau and an integer point satisfying the tableau, - * construct an initial affine hull containing the recession cone - * shifted to the given point. - * - * The unbounded directions are taken from the last rows of the basis, - * which is assumed to have been initialized appropriately. - */ -static __isl_give isl_basic_set *initial_hull(struct isl_tab *tab, - __isl_take isl_vec *vec) -{ - int i; - int k; - struct isl_basic_set *bset = NULL; - struct isl_ctx *ctx; - unsigned dim; - - if (!vec || !tab) - return NULL; - ctx = vec->ctx; - isl_assert(ctx, vec->size != 0, goto error); - - bset = isl_basic_set_alloc(ctx, 0, vec->size - 1, 0, vec->size - 1, 0); - if (!bset) - goto error; - dim = isl_basic_set_n_dim(bset) - tab->n_unbounded; - for (i = 0; i < dim; ++i) { - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k] + 1, tab->basis->row[1 + i] + 1, - vec->size - 1); - isl_seq_inner_product(bset->eq[k] + 1, vec->el +1, - vec->size - 1, &bset->eq[k][0]); - isl_int_neg(bset->eq[k][0], bset->eq[k][0]); - } - bset->sample = vec; - bset = isl_basic_set_gauss(bset, NULL); - - return bset; -error: - isl_basic_set_free(bset); - isl_vec_free(vec); - return NULL; -} - -/* Given a tableau of a set and a tableau of the corresponding - * recession cone, detect and add all equalities to the tableau. - * If the tableau is bounded, then we can simply keep the - * tableau in its state after the return from extend_affine_hull. - * However, if the tableau is unbounded, then - * isl_tab_set_initial_basis_with_cone will add some additional - * constraints to the tableau that have to be removed again. - * In this case, we therefore rollback to the state before - * any constraints were added and then add the equalities back in. - */ -struct isl_tab *isl_tab_detect_equalities(struct isl_tab *tab, - struct isl_tab *tab_cone) -{ - int j; - struct isl_vec *sample; - struct isl_basic_set *hull; - struct isl_tab_undo *snap; - - if (!tab || !tab_cone) - goto error; - - snap = isl_tab_snap(tab); - - isl_mat_free(tab->basis); - tab->basis = NULL; - - isl_assert(tab->mat->ctx, tab->bmap, goto error); - isl_assert(tab->mat->ctx, tab->samples, goto error); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, goto error); - isl_assert(tab->mat->ctx, tab->n_sample > tab->n_outside, goto error); - - if (isl_tab_set_initial_basis_with_cone(tab, tab_cone) < 0) - goto error; - - sample = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!sample) - goto error; - - isl_seq_cpy(sample->el, tab->samples->row[tab->n_outside], sample->size); - - isl_vec_free(tab->bmap->sample); - tab->bmap->sample = isl_vec_copy(sample); - - if (tab->n_unbounded == 0) - hull = isl_basic_set_from_vec(isl_vec_copy(sample)); - else - hull = initial_hull(tab, isl_vec_copy(sample)); - - for (j = tab->n_outside + 1; j < tab->n_sample; ++j) { - isl_seq_cpy(sample->el, tab->samples->row[j], sample->size); - hull = affine_hull(hull, - isl_basic_set_from_vec(isl_vec_copy(sample))); - } - - isl_vec_free(sample); - - hull = extend_affine_hull(tab, hull); - if (!hull) - goto error; - - if (tab->n_unbounded == 0) { - isl_basic_set_free(hull); - return tab; - } - - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - if (hull->n_eq > tab->n_zero) { - for (j = 0; j < hull->n_eq; ++j) { - isl_seq_normalize(tab->mat->ctx, hull->eq[j], 1 + tab->n_var); - if (isl_tab_add_eq(tab, hull->eq[j]) < 0) - goto error; - } - } - - isl_basic_set_free(hull); - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Compute the affine hull of "bset", where "cone" is the recession cone - * of "bset". - * - * We first compute a unimodular transformation that puts the unbounded - * directions in the last dimensions. In particular, we take a transformation - * that maps all equalities to equalities (in HNF) on the first dimensions. - * Let x be the original dimensions and y the transformed, with y_1 bounded - * and y_2 unbounded. - * - * [ y_1 ] [ y_1 ] [ Q_1 ] - * x = U [ y_2 ] [ y_2 ] = [ Q_2 ] x - * - * Let's call the input basic set S. We compute S' = preimage(S, U) - * and drop the final dimensions including any constraints involving them. - * This results in set S''. - * Then we compute the affine hull A'' of S''. - * Let F y_1 >= g be the constraint system of A''. In the transformed - * space the y_2 are unbounded, so we can add them back without any constraints, - * resulting in - * - * [ y_1 ] - * [ F 0 ] [ y_2 ] >= g - * or - * [ Q_1 ] - * [ F 0 ] [ Q_2 ] x >= g - * or - * F Q_1 x >= g - * - * The affine hull in the original space is then obtained as - * A = preimage(A'', Q_1). - */ -static struct isl_basic_set *affine_hull_with_cone(struct isl_basic_set *bset, - struct isl_basic_set *cone) -{ - unsigned total; - unsigned cone_dim; - struct isl_basic_set *hull; - struct isl_mat *M, *U, *Q; - - if (!bset || !cone) - goto error; - - total = isl_basic_set_total_dim(cone); - cone_dim = total - cone->n_eq; - - M = isl_mat_sub_alloc6(bset->ctx, cone->eq, 0, cone->n_eq, 1, total); - M = isl_mat_left_hermite(M, 0, &U, &Q); - if (!M) - goto error; - isl_mat_free(M); - - U = isl_mat_lin_to_aff(U); - bset = isl_basic_set_preimage(bset, isl_mat_copy(U)); - - bset = isl_basic_set_drop_constraints_involving(bset, total - cone_dim, - cone_dim); - bset = isl_basic_set_drop_dims(bset, total - cone_dim, cone_dim); - - Q = isl_mat_lin_to_aff(Q); - Q = isl_mat_drop_rows(Q, 1 + total - cone_dim, cone_dim); - - if (bset && bset->sample && bset->sample->size == 1 + total) - bset->sample = isl_mat_vec_product(isl_mat_copy(Q), bset->sample); - - hull = uset_affine_hull_bounded(bset); - - if (!hull) - isl_mat_free(U); - else { - struct isl_vec *sample = isl_vec_copy(hull->sample); - U = isl_mat_drop_cols(U, 1 + total - cone_dim, cone_dim); - if (sample && sample->size > 0) - sample = isl_mat_vec_product(U, sample); - else - isl_mat_free(U); - hull = isl_basic_set_preimage(hull, Q); - if (hull) { - isl_vec_free(hull->sample); - hull->sample = sample; - } else - isl_vec_free(sample); - } - - isl_basic_set_free(cone); - - return hull; -error: - isl_basic_set_free(bset); - isl_basic_set_free(cone); - return NULL; -} - -/* Look for all equalities satisfied by the integer points in bset, - * which is assumed not to have any explicit equalities. - * - * The equalities are obtained by successively looking for - * a point that is affinely independent of the points found so far. - * In particular, for each equality satisfied by the points so far, - * we check if there is any point on a hyperplane parallel to the - * corresponding hyperplane shifted by at least one (in either direction). - * - * Before looking for any outside points, we first compute the recession - * cone. The directions of this recession cone will always be part - * of the affine hull, so there is no need for looking for any points - * in these directions. - * In particular, if the recession cone is full-dimensional, then - * the affine hull is simply the whole universe. - */ -static struct isl_basic_set *uset_affine_hull(struct isl_basic_set *bset) -{ - struct isl_basic_set *cone; - - if (isl_basic_set_plain_is_empty(bset)) - return bset; - - cone = isl_basic_set_recession_cone(isl_basic_set_copy(bset)); - if (!cone) - goto error; - if (cone->n_eq == 0) { - struct isl_basic_set *hull; - isl_basic_set_free(cone); - hull = isl_basic_set_universe_like(bset); - isl_basic_set_free(bset); - return hull; - } - - if (cone->n_eq < isl_basic_set_total_dim(cone)) - return affine_hull_with_cone(bset, cone); - - isl_basic_set_free(cone); - return uset_affine_hull_bounded(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Look for all equalities satisfied by the integer points in bmap - * that are independent of the equalities already explicitly available - * in bmap. - * - * We first remove all equalities already explicitly available, - * then look for additional equalities in the reduced space - * and then transform the result to the original space. - * The original equalities are _not_ added to this set. This is - * the responsibility of the calling function. - * The resulting basic set has all meaning about the dimensions removed. - * In particular, dimensions that correspond to existential variables - * in bmap and that are found to be fixed are not removed. - */ -static struct isl_basic_set *equalities_in_underlying_set( - struct isl_basic_map *bmap) -{ - struct isl_mat *T1 = NULL; - struct isl_mat *T2 = NULL; - struct isl_basic_set *bset = NULL; - struct isl_basic_set *hull = NULL; - - bset = isl_basic_map_underlying_set(bmap); - if (!bset) - return NULL; - if (bset->n_eq) - bset = isl_basic_set_remove_equalities(bset, &T1, &T2); - if (!bset) - goto error; - - hull = uset_affine_hull(bset); - if (!T2) - return hull; - - if (!hull) { - isl_mat_free(T1); - isl_mat_free(T2); - } else { - struct isl_vec *sample = isl_vec_copy(hull->sample); - if (sample && sample->size > 0) - sample = isl_mat_vec_product(T1, sample); - else - isl_mat_free(T1); - hull = isl_basic_set_preimage(hull, T2); - if (hull) { - isl_vec_free(hull->sample); - hull->sample = sample; - } else - isl_vec_free(sample); - } - - return hull; -error: - isl_mat_free(T2); - isl_basic_set_free(bset); - isl_basic_set_free(hull); - return NULL; -} - -/* Detect and make explicit all equalities satisfied by the (integer) - * points in bmap. - */ -struct isl_basic_map *isl_basic_map_detect_equalities( - struct isl_basic_map *bmap) -{ - int i, j; - struct isl_basic_set *hull = NULL; - - if (!bmap) - return NULL; - if (bmap->n_ineq == 0) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_ALL_EQUALITIES)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return isl_basic_map_implicit_equalities(bmap); - - hull = equalities_in_underlying_set(isl_basic_map_copy(bmap)); - if (!hull) - goto error; - if (ISL_F_ISSET(hull, ISL_BASIC_SET_EMPTY)) { - isl_basic_set_free(hull); - return isl_basic_map_set_to_empty(bmap); - } - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), 0, - hull->n_eq, 0); - for (i = 0; i < hull->n_eq; ++i) { - j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_cpy(bmap->eq[j], hull->eq[i], - 1 + isl_basic_set_total_dim(hull)); - } - isl_vec_free(bmap->sample); - bmap->sample = isl_vec_copy(hull->sample); - isl_basic_set_free(hull); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_IMPLICIT | ISL_BASIC_MAP_ALL_EQUALITIES); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_set_free(hull); - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_detect_equalities( - __isl_take isl_basic_set *bset) -{ - return (isl_basic_set *) - isl_basic_map_detect_equalities((isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, - __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap)) -{ - struct isl_basic_map *bmap; - int i; - - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - bmap = isl_basic_map_copy(map->p[i]); - bmap = fn(bmap); - if (!bmap) - goto error; - isl_basic_map_free(map->p[i]); - map->p[i] = bmap; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_detect_equalities(__isl_take isl_map *map) -{ - return isl_map_inline_foreach_basic_map(map, - &isl_basic_map_detect_equalities); -} - -__isl_give isl_set *isl_set_detect_equalities(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_detect_equalities((isl_map *)set); -} - -/* After computing the rational affine hull (by detecting the implicit - * equalities), we compute the additional equalities satisfied by - * the integer points (if any) and add the original equalities back in. - */ -struct isl_basic_map *isl_basic_map_affine_hull(struct isl_basic_map *bmap) -{ - bmap = isl_basic_map_detect_equalities(bmap); - bmap = isl_basic_map_cow(bmap); - if (bmap) - isl_basic_map_free_inequality(bmap, bmap->n_ineq); - bmap = isl_basic_map_finalize(bmap); - return bmap; -} - -struct isl_basic_set *isl_basic_set_affine_hull(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_affine_hull((struct isl_basic_map *)bset); -} - -struct isl_basic_map *isl_map_affine_hull(struct isl_map *map) -{ - int i; - struct isl_basic_map *model = NULL; - struct isl_basic_map *hull = NULL; - struct isl_set *set; - - map = isl_map_detect_equalities(map); - map = isl_map_align_divs(map); - - if (!map) - return NULL; - - if (map->n == 0) { - hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return hull; - } - - model = isl_basic_map_copy(map->p[0]); - set = isl_map_underlying_set(map); - set = isl_set_cow(set); - if (!set) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_cow(set->p[i]); - set->p[i] = isl_basic_set_affine_hull(set->p[i]); - set->p[i] = isl_basic_set_gauss(set->p[i], NULL); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); - if (set->n == 0) { - hull = isl_basic_map_empty_like(model); - isl_basic_map_free(model); - } else { - struct isl_basic_set *bset; - while (set->n > 1) { - set->p[0] = affine_hull(set->p[0], set->p[--set->n]); - if (!set->p[0]) - goto error; - } - bset = isl_basic_set_copy(set->p[0]); - hull = isl_basic_map_overlying_set(bset, model); - } - isl_set_free(set); - hull = isl_basic_map_simplify(hull); - return isl_basic_map_finalize(hull); -error: - isl_basic_map_free(model); - isl_set_free(set); - return NULL; -} - -struct isl_basic_set *isl_set_affine_hull(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_affine_hull((struct isl_map *)set); -} diff --git a/cloog-0.16.3/isl/isl_arg.c b/cloog-0.16.3/isl/isl_arg.c deleted file mode 100644 index f4704787e75cf4583fd2556e578a3869f7b8b922..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_arg.c +++ /dev/null @@ -1,1110 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -#include -#include - -static struct isl_arg help_arg[] = { -ISL_ARG_PHANTOM_BOOL('h', "help", NULL, "print this help, then exit") -ISL_ARG_END -}; - -static void set_default_choice(struct isl_arg *arg, void *opt) -{ - *(unsigned *)(((char *)opt) + arg->offset) = arg->u.choice.default_value; -} - -static void set_default_flags(struct isl_arg *arg, void *opt) -{ - *(unsigned *)(((char *)opt) + arg->offset) = arg->u.flags.default_value; -} - -static void set_default_bool(struct isl_arg *arg, void *opt) -{ - if (arg->offset == (size_t) -1) - return; - *(unsigned *)(((char *)opt) + arg->offset) = arg->u.b.default_value; -} - -static void set_default_child(struct isl_arg *arg, void *opt) -{ - void *child; - - if (arg->offset == (size_t) -1) - child = opt; - else { - child = calloc(1, arg->u.child.size); - *(void **)(((char *)opt) + arg->offset) = child; - } - - if (child) - isl_arg_set_defaults(arg->u.child.child, child); -} - -static void set_default_user(struct isl_arg *arg, void *opt) -{ - arg->u.user.init(((char *)opt) + arg->offset); -} - -static void set_default_int(struct isl_arg *arg, void *opt) -{ - *(int *)(((char *)opt) + arg->offset) = arg->u.i.default_value; -} - -static void set_default_long(struct isl_arg *arg, void *opt) -{ - *(long *)(((char *)opt) + arg->offset) = arg->u.l.default_value; -} - -static void set_default_ulong(struct isl_arg *arg, void *opt) -{ - *(unsigned long *)(((char *)opt) + arg->offset) = arg->u.ul.default_value; -} - -static void set_default_str(struct isl_arg *arg, void *opt) -{ - const char *str = NULL; - if (arg->u.str.default_value) - str = strdup(arg->u.str.default_value); - *(const char **)(((char *)opt) + arg->offset) = str; -} - -void isl_arg_set_defaults(struct isl_arg *arg, void *opt) -{ - int i; - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - switch (arg[i].type) { - case isl_arg_choice: - set_default_choice(&arg[i], opt); - break; - case isl_arg_flags: - set_default_flags(&arg[i], opt); - break; - case isl_arg_bool: - set_default_bool(&arg[i], opt); - break; - case isl_arg_child: - set_default_child(&arg[i], opt); - break; - case isl_arg_user: - set_default_user(&arg[i], opt); - break; - case isl_arg_int: - set_default_int(&arg[i], opt); - break; - case isl_arg_long: - set_default_long(&arg[i], opt); - break; - case isl_arg_ulong: - set_default_ulong(&arg[i], opt); - break; - case isl_arg_arg: - case isl_arg_str: - set_default_str(&arg[i], opt); - break; - case isl_arg_alias: - case isl_arg_footer: - case isl_arg_version: - case isl_arg_end: - break; - } - } -} - -static void free_args(struct isl_arg *arg, void *opt) -{ - int i; - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - switch (arg[i].type) { - case isl_arg_child: - if (arg[i].offset == (size_t) -1) - free_args(arg[i].u.child.child, opt); - else - isl_arg_free(arg[i].u.child.child, - *(void **)(((char *)opt) + arg[i].offset)); - break; - case isl_arg_arg: - case isl_arg_str: - free(*(char **)(((char *)opt) + arg[i].offset)); - break; - case isl_arg_user: - if (arg[i].u.user.clear) - arg[i].u.user.clear(((char *)opt) + arg[i].offset); - break; - case isl_arg_alias: - case isl_arg_bool: - case isl_arg_choice: - case isl_arg_flags: - case isl_arg_int: - case isl_arg_long: - case isl_arg_ulong: - case isl_arg_version: - case isl_arg_footer: - case isl_arg_end: - break; - } - } -} - -void isl_arg_free(struct isl_arg *arg, void *opt) -{ - if (!opt) - return; - - free_args(arg, opt); - - free(opt); -} - -static int print_arg_help(struct isl_arg *decl, const char *prefix, int no) -{ - int len = 0; - - if (!decl->long_name) { - printf(" -%c", decl->short_name); - return 4; - } - - if (decl->short_name) { - printf(" -%c, --", decl->short_name); - len += 8; - } else if (decl->flags & ISL_ARG_SINGLE_DASH) { - printf(" -"); - len += 3; - } else { - printf(" --"); - len += 8; - } - - if (prefix) { - printf("%s-", prefix); - len += strlen(prefix) + 1; - } - if (no) { - printf("no-"); - len += 3; - } - printf("%s", decl->long_name); - len += strlen(decl->long_name); - - while ((++decl)->type == isl_arg_alias) { - printf(", --"); - len += 4; - if (no) { - printf("no-"); - len += 3; - } - printf("%s", decl->long_name); - len += strlen(decl->long_name); - } - - return len; -} - -const void *isl_memrchr(const void *s, int c, size_t n) -{ - const char *p = s; - while (n-- > 0) - if (p[n] == c) - return p + n; - return NULL; -} - -static int wrap_msg(const char *s, int indent, int pos) -{ - int len; - int wrap_len = 75 - indent; - - if (pos + 1 >= indent) - printf("\n%*s", indent, ""); - else - printf("%*s", indent - pos, ""); - - len = strlen(s); - while (len > wrap_len) { - const char *space = isl_memrchr(s, ' ', wrap_len); - int l; - - if (!space) - space = strchr(s + wrap_len, ' '); - if (!space) - break; - l = space - s; - printf("%.*s", l, s); - s = space + 1; - len -= l + 1; - printf("\n%*s", indent, ""); - } - - printf("%s", s); - return len; -} - -static int print_help_msg(struct isl_arg *decl, int pos) -{ - if (!decl->help_msg) - return pos; - - return wrap_msg(decl->help_msg, 30, pos); -} - -static void print_default(struct isl_arg *decl, const char *def, int pos) -{ - const char *default_prefix = "[default: "; - const char *default_suffix = "]"; - int len; - - len = strlen(default_prefix) + strlen(def) + strlen(default_suffix); - - if (!decl->help_msg) { - if (pos >= 29) - printf("\n%30s", ""); - else - printf("%*s", 30 - pos, ""); - pos = 0; - } else { - if (pos + len >= 48) - printf("\n%30s", ""); - else - printf(" "); - } - printf("%s%s%s", default_prefix, def, default_suffix); -} - -static void print_default_choice(struct isl_arg *decl, int pos) -{ - int i; - const char *s = "none"; - - for (i = 0; decl->u.choice.choice[i].name; ++i) - if (decl->u.choice.choice[i].value == decl->u.choice.default_value) { - s = decl->u.choice.choice[i].name; - break; - } - - print_default(decl, s, pos); -} - -static void print_choice_help(struct isl_arg *decl, const char *prefix) -{ - int i; - int pos; - - pos = print_arg_help(decl, prefix, 0); - printf("="); - pos++; - - for (i = 0; decl->u.choice.choice[i].name; ++i) { - if (i) { - printf("|"); - pos++; - } - printf("%s", decl->u.choice.choice[i].name); - pos += strlen(decl->u.choice.choice[i].name); - } - - pos = print_help_msg(decl, pos); - print_default_choice(decl, pos); - - printf("\n"); -} - -static void print_default_flags(struct isl_arg *decl, int pos) -{ - int i, first; - const char *default_prefix = "[default: "; - const char *default_suffix = "]"; - int len = strlen(default_prefix) + strlen(default_suffix); - - for (i = 0; decl->u.flags.flags[i].name; ++i) - if ((decl->u.flags.default_value & decl->u.flags.flags[i].mask) == - decl->u.flags.flags[i].value) - len += strlen(decl->u.flags.flags[i].name); - - if (!decl->help_msg) { - if (pos >= 29) - printf("\n%30s", ""); - else - printf("%*s", 30 - pos, ""); - pos = 0; - } else { - if (pos + len >= 48) - printf("\n%30s", ""); - else - printf(" "); - } - printf("%s", default_prefix); - - for (first = 1, i = 0; decl->u.flags.flags[i].name; ++i) - if ((decl->u.flags.default_value & decl->u.flags.flags[i].mask) == - decl->u.flags.flags[i].value) { - if (!first) - printf(","); - printf("%s", decl->u.flags.flags[i].name); - first = 0; - } - - printf("%s", default_suffix); -} - -static void print_flags_help(struct isl_arg *decl, const char *prefix) -{ - int i, j; - int pos; - - pos = print_arg_help(decl, prefix, 0); - printf("="); - pos++; - - for (i = 0; decl->u.flags.flags[i].name; ++i) { - if (i) { - printf(","); - pos++; - } - for (j = i; - decl->u.flags.flags[j].mask == decl->u.flags.flags[i].mask; - ++j) { - if (j != i) { - printf("|"); - pos++; - } - printf("%s", decl->u.flags.flags[j].name); - pos += strlen(decl->u.flags.flags[j].name); - } - i = j - 1; - } - - pos = print_help_msg(decl, pos); - print_default_flags(decl, pos); - - printf("\n"); -} - -static void print_bool_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - int no = decl->u.b.default_value == 1; - pos = print_arg_help(decl, prefix, no); - pos = print_help_msg(decl, pos); - if (decl->offset != (size_t) -1) - print_default(decl, no ? "yes" : "no", pos); - printf("\n"); -} - -static int print_argument_name(struct isl_arg *decl, const char *name, int pos) -{ - printf("%c<%s>", decl->long_name ? '=' : ' ', name); - return pos + 3 + strlen(name); -} - -static void print_int_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - char val[20]; - pos = print_arg_help(decl, prefix, 0); - pos = print_argument_name(decl, decl->argument_name, pos); - pos = print_help_msg(decl, pos); - snprintf(val, sizeof(val), "%d", decl->u.i.default_value); - print_default(decl, val, pos); - printf("\n"); -} - -static void print_long_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - pos = print_arg_help(decl, prefix, 0); - if (decl->u.l.default_value != decl->u.l.default_selected) { - printf("["); - pos++; - } - printf("=long"); - pos += 5; - if (decl->u.l.default_value != decl->u.l.default_selected) { - printf("]"); - pos++; - } - print_help_msg(decl, pos); - printf("\n"); -} - -static void print_ulong_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - pos = print_arg_help(decl, prefix, 0); - printf("=ulong"); - pos += 6; - print_help_msg(decl, pos); - printf("\n"); -} - -static void print_str_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - const char *a = decl->argument_name ? decl->argument_name : "string"; - pos = print_arg_help(decl, prefix, 0); - pos = print_argument_name(decl, a, pos); - pos = print_help_msg(decl, pos); - if (decl->u.str.default_value) - print_default(decl, decl->u.str.default_value, pos); - printf("\n"); -} - -static void print_help(struct isl_arg *arg, const char *prefix) -{ - int i; - int any = 0; - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - if (arg[i].flags & ISL_ARG_HIDDEN) - continue; - switch (arg[i].type) { - case isl_arg_flags: - print_flags_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_choice: - print_choice_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_bool: - print_bool_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_int: - print_int_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_long: - print_long_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_ulong: - print_ulong_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_str: - print_str_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_alias: - case isl_arg_version: - case isl_arg_arg: - case isl_arg_footer: - case isl_arg_child: - case isl_arg_user: - case isl_arg_end: - break; - } - } - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - if (arg[i].type != isl_arg_child) - continue; - if (arg[i].flags & ISL_ARG_HIDDEN) - continue; - - if (any) - printf("\n"); - if (arg[i].help_msg) - printf(" %s\n", arg[i].help_msg); - print_help(arg[i].u.child.child, arg[i].long_name); - any = 1; - } -} - -static const char *prog_name(const char *prog) -{ - const char *slash; - - slash = strrchr(prog, '/'); - if (slash) - prog = slash + 1; - if (strncmp(prog, "lt-", 3) == 0) - prog += 3; - - return prog; -} - -static int any_version(struct isl_arg *decl) -{ - int i; - - for (i = 0; decl[i].type != isl_arg_end; ++i) { - switch (decl[i].type) { - case isl_arg_version: - return 1; - case isl_arg_child: - if (any_version(decl[i].u.child.child)) - return 1; - break; - default: - break; - } - } - - return 0; -} - -static void print_help_and_exit(struct isl_arg *arg, const char *prog) -{ - int i; - - printf("Usage: %s [OPTION...]", prog_name(prog)); - - for (i = 0; arg[i].type != isl_arg_end; ++i) - if (arg[i].type == isl_arg_arg) - printf(" %s", arg[i].argument_name); - - printf("\n\n"); - - print_help(arg, NULL); - printf("\n"); - if (any_version(arg)) - printf(" -V, --version\n"); - print_bool_help(help_arg, NULL); - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - if (arg[i].type != isl_arg_footer) - continue; - wrap_msg(arg[i].help_msg, 0, 0); - printf("\n"); - } - - exit(0); -} - -static int match_long_name(struct isl_arg *decl, - const char *start, const char *end) -{ - do { - if (end - start == strlen(decl->long_name) && - !strncmp(start, decl->long_name, end - start)) - return 1; - } while ((++decl)->type == isl_arg_alias); - - return 0; -} - -static const char *skip_dash_dash(struct isl_arg *decl, const char *arg) -{ - if (!strncmp(arg, "--", 2)) - return arg + 2; - if ((decl->flags & ISL_ARG_SINGLE_DASH) && arg[0] == '-') - return arg + 1; - return NULL; -} - -static const char *skip_name(struct isl_arg *decl, const char *arg, - const char *prefix, int need_argument, int *has_argument) -{ - const char *equal; - const char *name; - const char *end; - - if (arg[0] == '-' && arg[1] && arg[1] == decl->short_name) { - if (need_argument && !arg[2]) - return NULL; - if (has_argument) - *has_argument = arg[2] != '\0'; - return arg + 2; - } - if (!decl->long_name) - return NULL; - - name = skip_dash_dash(decl, arg); - if (!name) - return NULL; - - equal = strchr(name, '='); - if (need_argument && !equal) - return NULL; - - if (has_argument) - *has_argument = !!equal; - end = equal ? equal : name + strlen(name); - - if (prefix) { - size_t prefix_len = strlen(prefix); - if (strncmp(name, prefix, prefix_len) == 0 && - name[prefix_len] == '-') - name += prefix_len + 1; - } - - if (!match_long_name(decl, name, end)) - return NULL; - - return equal ? equal + 1 : end; -} - -static int parse_choice_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int i; - int has_argument; - const char *choice; - - choice = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!choice) - return 0; - - if (!has_argument && (!arg[1] || arg[1][0] == '-')) { - unsigned u = decl->u.choice.default_selected; - if (decl->u.choice.set) - decl->u.choice.set(opt, u); - else - *(unsigned *)(((char *)opt) + decl->offset) = u; - - return 1; - } - - if (!has_argument) - choice = arg[1]; - - for (i = 0; decl->u.choice.choice[i].name; ++i) { - unsigned u; - - if (strcmp(choice, decl->u.choice.choice[i].name)) - continue; - - u = decl->u.choice.choice[i].value; - if (decl->u.choice.set) - decl->u.choice.set(opt, u); - else - *(unsigned *)(((char *)opt) + decl->offset) = u; - - return has_argument ? 1 : 2; - } - - return 0; -} - -static int set_flag(struct isl_arg *decl, unsigned *val, const char *flag, - size_t len) -{ - int i; - - for (i = 0; decl->u.flags.flags[i].name; ++i) { - if (strncmp(flag, decl->u.flags.flags[i].name, len)) - continue; - - *val &= ~decl->u.flags.flags[i].mask; - *val |= decl->u.flags.flags[i].value; - - return 1; - } - - return 0; -} - -static int parse_flags_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *flags; - const char *comma; - unsigned val; - - flags = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!flags) - return 0; - - if (!has_argument && !arg[1]) - return 0; - - if (!has_argument) - flags = arg[1]; - - val = *(unsigned *)(((char *)opt) + decl->offset); - - while ((comma = strchr(flags, ',')) != NULL) { - if (!set_flag(decl, &val, flags, comma - flags)) - return 0; - flags = comma + 1; - } - if (!set_flag(decl, &val, flags, strlen(flags))) - return 0; - - *(unsigned *)(((char *)opt) + decl->offset) = val; - - return has_argument ? 1 : 2; -} - -static int parse_bool_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - const char *name; - unsigned *p = (unsigned *)(((char *)opt) + decl->offset); - - if (skip_name(decl, arg[0], prefix, 0, NULL)) { - if ((decl->flags & ISL_ARG_BOOL_ARG) && arg[1]) { - char *endptr; - int val = strtol(arg[1], &endptr, 0); - if (*endptr == '\0' && (val == 0 || val == 1)) { - if (decl->u.b.set) - decl->u.b.set(opt, val); - else if (decl->offset != (size_t) -1) - *p = val; - return 2; - } - } - if (decl->u.b.set) - decl->u.b.set(opt, 1); - else if (decl->offset != (size_t) -1) - *p = 1; - - return 1; - } - - if (!decl->long_name) - return 0; - - name = skip_dash_dash(decl, arg[0]); - if (!name) - return 0; - - if (prefix) { - size_t prefix_len = strlen(prefix); - if (strncmp(name, prefix, prefix_len) == 0 && - name[prefix_len] == '-') { - name += prefix_len + 1; - prefix = NULL; - } - } - - if (strncmp(name, "no-", 3)) - return 0; - name += 3; - - if (prefix) { - size_t prefix_len = strlen(prefix); - if (strncmp(name, prefix, prefix_len) == 0 && - name[prefix_len] == '-') - name += prefix_len + 1; - } - - if (match_long_name(decl, name, name + strlen(name))) { - if (decl->u.b.set) - decl->u.b.set(opt, 0); - else if (decl->offset != (size_t) -1) - *p = 0; - - return 1; - } - - return 0; -} - -static int parse_str_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *s; - char **p = (char **)(((char *)opt) + decl->offset); - - s = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!s) - return 0; - - if (has_argument) { - free(*p); - *p = strdup(s); - return 1; - } - - if (arg[1]) { - free(*p); - *p = strdup(arg[1]); - return 2; - } - - return 0; -} - -static int parse_int_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *val; - char *endptr; - int *p = (int *)(((char *)opt) + decl->offset); - - val = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!val) - return 0; - - if (has_argument) { - *p = atoi(val); - return 1; - } - - if (arg[1]) { - int i = strtol(arg[1], &endptr, 0); - if (*endptr == '\0') { - *p = i; - return 2; - } - } - - return 0; -} - -static int parse_long_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *val; - char *endptr; - long *p = (long *)(((char *)opt) + decl->offset); - - val = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!val) - return 0; - - if (has_argument) { - long l = strtol(val, NULL, 0); - if (decl->u.l.set) - decl->u.l.set(opt, l); - else - *p = l; - return 1; - } - - if (arg[1]) { - long l = strtol(arg[1], &endptr, 0); - if (*endptr == '\0') { - if (decl->u.l.set) - decl->u.l.set(opt, l); - else - *p = l; - return 2; - } - } - - if (decl->u.l.default_value != decl->u.l.default_selected) { - if (decl->u.l.set) - decl->u.l.set(opt, decl->u.l.default_selected); - else - *p = decl->u.l.default_selected; - return 1; - } - - return 0; -} - -static int parse_ulong_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *val; - char *endptr; - unsigned long *p = (unsigned long *)(((char *)opt) + decl->offset); - - val = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!val) - return 0; - - if (has_argument) { - *p = strtoul(val, NULL, 0); - return 1; - } - - if (arg[1]) { - unsigned long ul = strtoul(arg[1], &endptr, 0); - if (*endptr == '\0') { - *p = ul; - return 2; - } - } - - return 0; -} - -static int parse_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt); - -static int parse_child_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - void *child; - - if (decl->offset == (size_t) -1) - child = opt; - else { - child = *(void **)(((char *)opt) + decl->offset); - prefix = decl->long_name; - } - return parse_option(decl->u.child.child, arg, prefix, child); -} - -static int parse_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int i; - - for (i = 0; decl[i].type != isl_arg_end; ++i) { - int parsed = 0; - switch (decl[i].type) { - case isl_arg_choice: - parsed = parse_choice_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_flags: - parsed = parse_flags_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_int: - parsed = parse_int_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_long: - parsed = parse_long_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_ulong: - parsed = parse_ulong_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_bool: - parsed = parse_bool_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_str: - parsed = parse_str_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_child: - parsed = parse_child_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_alias: - case isl_arg_arg: - case isl_arg_footer: - case isl_arg_user: - case isl_arg_version: - case isl_arg_end: - break; - } - if (parsed) - return parsed; - } - - return 0; -} - -static void print_version(struct isl_arg *decl) -{ - int i; - - for (i = 0; decl[i].type != isl_arg_end; ++i) { - switch (decl[i].type) { - case isl_arg_version: - decl[i].u.version.print_version(); - break; - case isl_arg_child: - print_version(decl[i].u.child.child); - break; - default: - break; - } - } -} - -static void print_version_and_exit(struct isl_arg *decl) -{ - print_version(decl); - - exit(0); -} - -static int drop_argument(int argc, char **argv, int drop, int n) -{ - for (; drop < argc; ++drop) - argv[drop] = argv[drop + n]; - - return argc - n; -} - -static int n_arg(struct isl_arg *arg) -{ - int i; - int n_arg = 0; - - for (i = 0; arg[i].type != isl_arg_end; ++i) - if (arg[i].type == isl_arg_arg) - n_arg++; - - return n_arg; -} - -static int next_arg(struct isl_arg *arg, int a) -{ - for (++a; arg[a].type != isl_arg_end; ++a) - if (arg[a].type == isl_arg_arg) - return a; - - return -1; -} - -int isl_arg_parse(struct isl_arg *arg, int argc, char **argv, void *opt, - unsigned flags) -{ - int a = -1; - int skip = 0; - int i; - int n; - - n = n_arg(arg); - - for (i = 1; i < argc; ++i) { - if (strcmp(argv[i], "--help") == 0) - print_help_and_exit(arg, argv[0]); - } - - for (i = 1; i < argc; ++i) { - if ((strcmp(argv[i], "--version") == 0 || - strcmp(argv[i], "-V") == 0) && any_version(arg)) - print_version_and_exit(arg); - } - - while (argc > 1 + skip) { - int parsed; - if (argv[1 + skip][0] != '-') { - a = next_arg(arg, a); - if (a >= 0) { - char **p; - p = (char **)(((char *)opt)+arg[a].offset); - free(*p); - *p = strdup(argv[1 + skip]); - argc = drop_argument(argc, argv, 1 + skip, 1); - --n; - } else if (ISL_FL_ISSET(flags, ISL_ARG_ALL)) { - fprintf(stderr, "%s: extra argument: %s\n", - prog_name(argv[0]), argv[1 + skip]); - exit(-1); - } else - ++skip; - continue; - } - parsed = parse_option(arg, &argv[1 + skip], NULL, opt); - if (parsed) - argc = drop_argument(argc, argv, 1 + skip, parsed); - else if (ISL_FL_ISSET(flags, ISL_ARG_ALL)) { - fprintf(stderr, "%s: unrecognized option: %s\n", - prog_name(argv[0]), argv[1 + skip]); - exit(-1); - } else - ++skip; - } - - if (n > 0) { - fprintf(stderr, "%s: expecting %d more argument(s)\n", - prog_name(argv[0]), n); - exit(-1); - } - - return argc; -} diff --git a/cloog-0.16.3/isl/isl_band.c b/cloog-0.16.3/isl/isl_band.c deleted file mode 100644 index e4fbf939aa4cc95b0045306d06af08663aa1d351..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_band.c +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include - -isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band) -{ - return band ? isl_union_map_get_ctx(band->map) : NULL; -} - -/* We not only increment the reference count of the band, - * but also that of the schedule that contains this band. - * This ensures that the schedule won't disappear while there - * is still a reference to the band outside of the schedule. - * There is no need to increment the reference count of the parent - * band as the parent band is part of the same schedule. - */ -__isl_give isl_band *isl_band_copy(__isl_keep isl_band *band) -{ - if (!band) - return NULL; - - band->ref++; - band->schedule->ref++; - return band; -} - -/* If this is not the last reference to the band (the one from within the - * schedule), then we also need to decrement the reference count of the - * containing schedule as it was incremented in isl_band_copy. - */ -void *isl_band_free(__isl_take isl_band *band) -{ - if (!band) - return NULL; - - if (--band->ref > 0) - return isl_schedule_free(band->schedule); - - isl_union_map_free(band->map); - isl_band_list_free(band->children); - free(band->zero); - free(band); - - return NULL; -} - -int isl_band_has_children(__isl_keep isl_band *band) -{ - if (!band) - return -1; - - return band->children != NULL; -} - -__isl_give isl_band_list *isl_band_get_children( - __isl_keep isl_band *band) -{ - if (!band) - return NULL; - if (!band->children) - isl_die(isl_band_get_ctx(band), isl_error_invalid, - "band has no children", return NULL); - return isl_band_list_dup(band->children); -} - -int isl_band_n_member(__isl_keep isl_band *band) -{ - return band ? band->n : 0; -} - -/* Is the given scheduling dimension zero distance within the band and - * with respect to the proximity dependences. - */ -int isl_band_member_is_zero_distance(__isl_keep isl_band *band, int pos) -{ - if (!band) - return -1; - - if (pos < 0 || pos >= band->n) - isl_die(isl_band_get_ctx(band), isl_error_invalid, - "invalid member position", return -1); - - return band->zero[pos]; -} - -/* Return the schedule that leads up to this band. - */ -__isl_give isl_union_map *isl_band_get_prefix_schedule( - __isl_keep isl_band *band) -{ - isl_union_map *prefix; - isl_band *a; - - if (!band) - return NULL; - - prefix = isl_union_map_copy(band->map); - prefix = isl_union_map_from_domain(isl_union_map_domain(prefix)); - - for (a = band->parent; a; a = a->parent) { - isl_union_map *partial = isl_union_map_copy(a->map); - prefix = isl_union_map_flat_range_product(partial, prefix); - } - - return prefix; -} - -/* Return the schedule of the band in isolation. - */ -__isl_give isl_union_map *isl_band_get_partial_schedule( - __isl_keep isl_band *band) -{ - return band ? isl_union_map_copy(band->map) : NULL; -} - -/* Return the schedule for the forest underneath the given band. - */ -__isl_give isl_union_map *isl_band_get_suffix_schedule( - __isl_keep isl_band *band) -{ - isl_union_map *suffix; - - if (!band) - return NULL; - - if (!isl_band_has_children(band)) { - suffix = isl_union_map_copy(band->map); - suffix = isl_union_map_from_domain(isl_union_map_domain(suffix)); - } else { - int i, n; - isl_band_list *children; - - suffix = isl_union_map_empty(isl_union_map_get_dim(band->map)); - children = isl_band_get_children(band); - n = isl_band_list_n_band(children); - for (i = 0; i < n; ++i) { - isl_band *child; - isl_union_map *partial_i; - isl_union_map *suffix_i; - - child = isl_band_list_get_band(children, i); - partial_i = isl_band_get_partial_schedule(child); - suffix_i = isl_band_get_suffix_schedule(child); - suffix_i = isl_union_map_flat_range_product(partial_i, - suffix_i); - suffix = isl_union_map_union(suffix, suffix_i); - - isl_band_free(child); - } - isl_band_list_free(children); - } - - return suffix; -} - -__isl_give isl_printer *isl_printer_print_band(__isl_take isl_printer *p, - __isl_keep isl_band *band) -{ - isl_union_map *prefix, *partial, *suffix; - - prefix = isl_band_get_prefix_schedule(band); - partial = isl_band_get_partial_schedule(band); - suffix = isl_band_get_suffix_schedule(band); - - p = isl_printer_print_str(p, "("); - p = isl_printer_print_union_map(p, prefix); - p = isl_printer_print_str(p, ","); - p = isl_printer_print_union_map(p, partial); - p = isl_printer_print_str(p, ","); - p = isl_printer_print_union_map(p, suffix); - p = isl_printer_print_str(p, ")"); - - isl_union_map_free(prefix); - isl_union_map_free(partial); - isl_union_map_free(suffix); - - return p; -} - -void isl_band_dump(__isl_keep isl_band *band) -{ - isl_printer *printer; - - if (!band) - return; - - printer = isl_printer_to_file(isl_band_get_ctx(band), stderr); - printer = isl_printer_print_band(printer, band); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} diff --git a/cloog-0.16.3/isl/isl_band_private.h b/cloog-0.16.3/isl/isl_band_private.h deleted file mode 100644 index 579ef669220f106c0965a15c017d0f8ce91bf5ab..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_band_private.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ISL_BAND_PRIVATE_H -#define ISL_BAND_PRIVATE_H - -#include -#include -#include -#include - -/* Information about a band within a schedule. - * - * n is the number of scheduling dimensions within the band. - * zero is an array of length n, indicating whether a scheduling dimension - * results in zero dependence distances for the proximity dependences. - * map is the partial map corresponding to this band. - * schedule is the schedule that contains this band. - * parent is the parent of this band (or NULL if the band is a root). - * children are the children of this band (or NULL if the band is a leaf). - * - * To avoid circular dependences in the reference counting, - * the schedule and parent pointers are not reference counted. - * isl_band_copy increments the reference count of schedule to ensure - * that outside references to the band keep the schedule alive. - */ -struct isl_band { - int ref; - - int n; - int *zero; - - isl_union_map *map; - isl_schedule *schedule; - isl_band *parent; - isl_band_list *children; -}; - -#endif diff --git a/cloog-0.16.3/isl/isl_basis_reduction.h b/cloog-0.16.3/isl/isl_basis_reduction.h deleted file mode 100644 index fd635605707ca3fb13bcafc432ebbd83ed55a2dd..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_basis_reduction.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_BASIS_REDUCTION_H -#define ISL_BASIS_REDUCTION_H - -#include -#include -#include "isl_tab.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_tab *isl_tab_compute_reduced_basis(struct isl_tab *tab); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_bernstein.c b/cloog-0.16.3/isl/isl_bernstein.c deleted file mode 100644 index 1458e27bd7400533225ca61d91f9f25ed3dd1064..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_bernstein.c +++ /dev/null @@ -1,548 +0,0 @@ -/* - * Copyright 2006-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct bernstein_data { - enum isl_fold type; - isl_qpolynomial *poly; - int check_tight; - - isl_cell *cell; - - isl_qpolynomial_fold *fold; - isl_qpolynomial_fold *fold_tight; - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *pwf_tight; -}; - -static int vertex_is_integral(__isl_keep isl_basic_set *vertex) -{ - unsigned nvar; - unsigned nparam; - int i; - - nvar = isl_basic_set_dim(vertex, isl_dim_set); - nparam = isl_basic_set_dim(vertex, isl_dim_param); - for (i = 0; i < nvar; ++i) { - int r = nvar - 1 - i; - if (!isl_int_is_one(vertex->eq[r][1 + nparam + i]) && - !isl_int_is_negone(vertex->eq[r][1 + nparam + i])) - return 0; - } - - return 1; -} - -static __isl_give isl_qpolynomial *vertex_coordinate( - __isl_keep isl_basic_set *vertex, int i, __isl_take isl_dim *dim) -{ - unsigned nvar; - unsigned nparam; - int r; - isl_int denom; - isl_qpolynomial *v; - - nvar = isl_basic_set_dim(vertex, isl_dim_set); - nparam = isl_basic_set_dim(vertex, isl_dim_param); - r = nvar - 1 - i; - - isl_int_init(denom); - isl_int_set(denom, vertex->eq[r][1 + nparam + i]); - isl_assert(vertex->ctx, !isl_int_is_zero(denom), goto error); - - if (isl_int_is_pos(denom)) - isl_seq_neg(vertex->eq[r], vertex->eq[r], - 1 + isl_basic_set_total_dim(vertex)); - else - isl_int_neg(denom, denom); - - v = isl_qpolynomial_from_affine(dim, vertex->eq[r], denom); - isl_int_clear(denom); - - return v; -error: - isl_dim_free(dim); - isl_int_clear(denom); - return NULL; -} - -/* Check whether the bound associated to the selection "k" is tight, - * which is the case if we select exactly one vertex and if that vertex - * is integral for all values of the parameters. - */ -static int is_tight(int *k, int n, int d, isl_cell *cell) -{ - int i; - - for (i = 0; i < n; ++i) { - int v; - if (k[i] != d) { - if (k[i]) - return 0; - continue; - } - v = cell->ids[n - 1 - i]; - return vertex_is_integral(cell->vertices->v[v].vertex); - } - - return 0; -} - -static void add_fold(__isl_take isl_qpolynomial *b, __isl_keep isl_set *dom, - int *k, int n, int d, struct bernstein_data *data) -{ - isl_qpolynomial_fold *fold; - - fold = isl_qpolynomial_fold_alloc(data->type, b); - - if (data->check_tight && is_tight(k, n, d, data->cell)) - data->fold_tight = isl_qpolynomial_fold_fold_on_domain(dom, - data->fold_tight, fold); - else - data->fold = isl_qpolynomial_fold_fold_on_domain(dom, - data->fold, fold); -} - -/* Extract the coefficients of the Bernstein base polynomials and store - * them in data->fold and data->fold_tight. - * - * In particular, the coefficient of each monomial - * of multi-degree (k[0], k[1], ..., k[n-1]) is divided by the corresponding - * multinomial coefficient d!/k[0]! k[1]! ... k[n-1]! - * - * c[i] contains the coefficient of the selected powers of the first i+1 vars. - * multinom[i] contains the partial multinomial coefficient. - */ -static void extract_coefficients(isl_qpolynomial *poly, - __isl_keep isl_set *dom, struct bernstein_data *data) -{ - int i; - int d; - int n; - isl_ctx *ctx; - isl_qpolynomial **c = NULL; - int *k = NULL; - int *left = NULL; - isl_vec *multinom = NULL; - - if (!poly) - return; - - ctx = isl_qpolynomial_get_ctx(poly); - n = isl_qpolynomial_dim(poly, isl_dim_set); - d = isl_qpolynomial_degree(poly); - isl_assert(ctx, n >= 2, return); - - c = isl_calloc_array(ctx, isl_qpolynomial *, n); - k = isl_alloc_array(ctx, int, n); - left = isl_alloc_array(ctx, int, n); - multinom = isl_vec_alloc(ctx, n); - if (!c || !k || !left || !multinom) - goto error; - - isl_int_set_si(multinom->el[0], 1); - for (k[0] = d; k[0] >= 0; --k[0]) { - int i = 1; - isl_qpolynomial_free(c[0]); - c[0] = isl_qpolynomial_coeff(poly, isl_dim_set, n - 1, k[0]); - left[0] = d - k[0]; - k[1] = -1; - isl_int_set(multinom->el[1], multinom->el[0]); - while (i > 0) { - if (i == n - 1) { - int j; - isl_dim *dim; - isl_qpolynomial *b; - isl_qpolynomial *f; - for (j = 2; j <= left[i - 1]; ++j) - isl_int_divexact_ui(multinom->el[i], - multinom->el[i], j); - b = isl_qpolynomial_coeff(c[i - 1], isl_dim_set, - n - 1 - i, left[i - 1]); - b = isl_qpolynomial_drop_dims(b, isl_dim_set, - 0, n); - dim = isl_qpolynomial_get_dim(b); - f = isl_qpolynomial_rat_cst(dim, ctx->one, - multinom->el[i]); - b = isl_qpolynomial_mul(b, f); - k[n - 1] = left[n - 2]; - add_fold(b, dom, k, n, d, data); - --i; - continue; - } - if (k[i] >= left[i - 1]) { - --i; - continue; - } - ++k[i]; - if (k[i]) - isl_int_divexact_ui(multinom->el[i], - multinom->el[i], k[i]); - isl_qpolynomial_free(c[i]); - c[i] = isl_qpolynomial_coeff(c[i - 1], isl_dim_set, - n - 1 - i, k[i]); - left[i] = left[i - 1] - k[i]; - k[i + 1] = -1; - isl_int_set(multinom->el[i + 1], multinom->el[i]); - ++i; - } - isl_int_mul_ui(multinom->el[0], multinom->el[0], k[0]); - } - - for (i = 0; i < n; ++i) - isl_qpolynomial_free(c[i]); - - isl_vec_free(multinom); - free(left); - free(k); - free(c); - return; -error: - isl_vec_free(multinom); - free(left); - free(k); - if (c) - for (i = 0; i < n; ++i) - isl_qpolynomial_free(c[i]); - free(c); - return; -} - -/* Perform bernstein expansion on the parametric vertices that are active - * on "cell". - * - * data->poly has been homogenized in the calling function. - * - * We plug in the barycentric coordinates for the set variables - * - * \vec x = \sum_i \alpha_i v_i(\vec p) - * - * and the constant "1 = \sum_i \alpha_i" for the homogeneous dimension. - * Next, we extract the coefficients of the Bernstein base polynomials. - */ -static int bernstein_coefficients_cell(__isl_take isl_cell *cell, void *user) -{ - int i, j; - struct bernstein_data *data = (struct bernstein_data *)user; - isl_dim *dim_param; - isl_dim *dim_dst; - isl_qpolynomial *poly = data->poly; - unsigned nvar; - int n_vertices; - isl_qpolynomial **subs; - isl_pw_qpolynomial_fold *pwf; - isl_set *dom; - isl_ctx *ctx; - - nvar = isl_qpolynomial_dim(poly, isl_dim_set) - 1; - n_vertices = cell->n_vertices; - - ctx = isl_qpolynomial_get_ctx(poly); - if (n_vertices > nvar + 1 && ctx->opt->bernstein_triangulate) - return isl_cell_foreach_simplex(cell, - &bernstein_coefficients_cell, user); - - subs = isl_alloc_array(ctx, isl_qpolynomial *, 1 + nvar); - if (!subs) - goto error; - - dim_param = isl_basic_set_get_dim(cell->dom); - dim_dst = isl_qpolynomial_get_dim(poly); - dim_dst = isl_dim_add(dim_dst, isl_dim_set, n_vertices); - - for (i = 0; i < 1 + nvar; ++i) - subs[i] = isl_qpolynomial_zero(isl_dim_copy(dim_dst)); - - for (i = 0; i < n_vertices; ++i) { - isl_qpolynomial *c; - c = isl_qpolynomial_var(isl_dim_copy(dim_dst), isl_dim_set, - 1 + nvar + i); - for (j = 0; j < nvar; ++j) { - int k = cell->ids[i]; - isl_qpolynomial *v; - v = vertex_coordinate(cell->vertices->v[k].vertex, j, - isl_dim_copy(dim_param)); - v = isl_qpolynomial_add_dims(v, isl_dim_set, - 1 + nvar + n_vertices); - v = isl_qpolynomial_mul(v, isl_qpolynomial_copy(c)); - subs[1 + j] = isl_qpolynomial_add(subs[1 + j], v); - } - subs[0] = isl_qpolynomial_add(subs[0], c); - } - isl_dim_free(dim_dst); - - poly = isl_qpolynomial_copy(poly); - - poly = isl_qpolynomial_add_dims(poly, isl_dim_set, n_vertices); - poly = isl_qpolynomial_substitute(poly, isl_dim_set, 0, 1 + nvar, subs); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_set, 0, 1 + nvar); - - data->cell = cell; - dom = isl_set_from_basic_set(isl_basic_set_copy(cell->dom)); - data->fold = isl_qpolynomial_fold_empty(data->type, isl_dim_copy(dim_param)); - data->fold_tight = isl_qpolynomial_fold_empty(data->type, dim_param); - extract_coefficients(poly, dom, data); - - pwf = isl_pw_qpolynomial_fold_alloc(data->type, isl_set_copy(dom), - data->fold); - data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, pwf); - pwf = isl_pw_qpolynomial_fold_alloc(data->type, dom, data->fold_tight); - data->pwf_tight = isl_pw_qpolynomial_fold_fold(data->pwf_tight, pwf); - - isl_qpolynomial_free(poly); - isl_cell_free(cell); - for (i = 0; i < 1 + nvar; ++i) - isl_qpolynomial_free(subs[i]); - free(subs); - return 0; -error: - isl_cell_free(cell); - return -1; -} - -/* Base case of applying bernstein expansion. - * - * We compute the chamber decomposition of the parametric polytope "bset" - * and then perform bernstein expansion on the parametric vertices - * that are active on each chamber. - */ -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_base( - __isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct bernstein_data *data, int *tight) -{ - unsigned nvar; - isl_dim *dim; - isl_pw_qpolynomial_fold *pwf; - isl_vertices *vertices; - int covers; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - if (nvar == 0) { - isl_set *dom; - isl_qpolynomial_fold *fold; - fold = isl_qpolynomial_fold_alloc(data->type, poly); - dom = isl_set_from_basic_set(bset); - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_alloc(data->type, dom, fold); - } - - if (isl_qpolynomial_is_zero(poly)) { - isl_set *dom; - isl_qpolynomial_fold *fold; - fold = isl_qpolynomial_fold_alloc(data->type, poly); - dom = isl_set_from_basic_set(bset); - pwf = isl_pw_qpolynomial_fold_alloc(data->type, dom, fold); - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_drop_dims(pwf, - isl_dim_set, 0, nvar); - } - - dim = isl_basic_set_get_dim(bset); - dim = isl_dim_drop(dim, isl_dim_set, 0, nvar); - data->pwf = isl_pw_qpolynomial_fold_zero(isl_dim_copy(dim), data->type); - data->pwf_tight = isl_pw_qpolynomial_fold_zero(dim, data->type); - data->poly = isl_qpolynomial_homogenize(isl_qpolynomial_copy(poly)); - vertices = isl_basic_set_compute_vertices(bset); - isl_vertices_foreach_disjoint_cell(vertices, - &bernstein_coefficients_cell, data); - isl_vertices_free(vertices); - isl_qpolynomial_free(data->poly); - - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - - covers = isl_pw_qpolynomial_fold_covers(data->pwf_tight, data->pwf); - if (covers < 0) - goto error; - - if (tight) - *tight = covers; - - if (covers) { - isl_pw_qpolynomial_fold_free(data->pwf); - return data->pwf_tight; - } - - data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, data->pwf_tight); - - return data->pwf; -error: - isl_pw_qpolynomial_fold_free(data->pwf_tight); - isl_pw_qpolynomial_fold_free(data->pwf); - return NULL; -} - -/* Apply bernstein expansion recursively by working in on len[i] - * set variables at a time, with i ranging from n_group - 1 to 0. - */ -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_recursive( - __isl_take isl_pw_qpolynomial *pwqp, - int n_group, int *len, struct bernstein_data *data, int *tight) -{ - int i; - unsigned nparam; - unsigned nvar; - isl_pw_qpolynomial_fold *pwf; - - if (!pwqp) - return NULL; - - nparam = isl_pw_qpolynomial_dim(pwqp, isl_dim_param); - nvar = isl_pw_qpolynomial_dim(pwqp, isl_dim_set); - - pwqp = isl_pw_qpolynomial_move_dims(pwqp, isl_dim_param, nparam, - isl_dim_set, 0, nvar - len[n_group - 1]); - pwf = isl_pw_qpolynomial_bound(pwqp, data->type, tight); - - for (i = n_group - 2; i >= 0; --i) { - nparam = isl_pw_qpolynomial_fold_dim(pwf, isl_dim_param); - pwf = isl_pw_qpolynomial_fold_move_dims(pwf, isl_dim_set, 0, - isl_dim_param, nparam - len[i], len[i]); - if (tight && !*tight) - tight = NULL; - pwf = isl_pw_qpolynomial_fold_bound(pwf, tight); - } - - return pwf; -} - -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_factors( - __isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct bernstein_data *data, int *tight) -{ - isl_factorizer *f; - isl_set *set; - isl_pw_qpolynomial *pwqp; - isl_pw_qpolynomial_fold *pwf; - - f = isl_basic_set_factorizer(bset); - if (!f) - goto error; - if (f->n_group == 0) { - isl_factorizer_free(f); - return bernstein_coefficients_base(bset, poly, data, tight); - } - - set = isl_set_from_basic_set(bset); - pwqp = isl_pw_qpolynomial_alloc(set, poly); - pwqp = isl_pw_qpolynomial_morph(pwqp, isl_morph_copy(f->morph)); - - pwf = bernstein_coefficients_recursive(pwqp, f->n_group, f->len, data, - tight); - - isl_factorizer_free(f); - - return pwf; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return NULL; -} - -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_full_recursive( - __isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct bernstein_data *data, int *tight) -{ - int i; - int *len; - unsigned nvar; - isl_pw_qpolynomial_fold *pwf; - isl_set *set; - isl_pw_qpolynomial *pwqp; - - if (!bset || !poly) - goto error; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - len = isl_alloc_array(bset->ctx, int, nvar); - if (!len) - goto error; - - for (i = 0; i < nvar; ++i) - len[i] = 1; - - set = isl_set_from_basic_set(bset); - pwqp = isl_pw_qpolynomial_alloc(set, poly); - - pwf = bernstein_coefficients_recursive(pwqp, nvar, len, data, tight); - - free(len); - - return pwf; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return NULL; -} - -/* Compute a bound on the polynomial defined over the parametric polytope - * using bernstein expansion and store the result - * in bound->pwf and bound->pwf_tight. - * - * If bernstein_recurse is set to ISL_BERNSTEIN_FACTORS, we check if - * the polytope can be factorized and apply bernstein expansion recursively - * on the factors. - * If bernstein_recurse is set to ISL_BERNSTEIN_INTERVALS, we apply - * bernstein expansion recursively on each dimension. - * Otherwise, we apply bernstein expansion on the entire polytope. - */ -int isl_qpolynomial_bound_on_domain_bernstein(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound) -{ - struct bernstein_data data; - isl_pw_qpolynomial_fold *pwf; - unsigned nvar; - int tight = 0; - int *tp = bound->check_tight ? &tight : NULL; - - if (!bset || !poly) - goto error; - - data.type = bound->type; - data.check_tight = bound->check_tight; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - if (bset->ctx->opt->bernstein_recurse & ISL_BERNSTEIN_FACTORS) - pwf = bernstein_coefficients_factors(bset, poly, &data, tp); - else if (nvar > 1 && - (bset->ctx->opt->bernstein_recurse & ISL_BERNSTEIN_INTERVALS)) - pwf = bernstein_coefficients_full_recursive(bset, poly, &data, tp); - else - pwf = bernstein_coefficients_base(bset, poly, &data, tp); - - if (tight) - bound->pwf_tight = isl_pw_qpolynomial_fold_fold(bound->pwf_tight, pwf); - else - bound->pwf = isl_pw_qpolynomial_fold_fold(bound->pwf, pwf); - - return 0; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return -1; -} diff --git a/cloog-0.16.3/isl/isl_bernstein.h b/cloog-0.16.3/isl/isl_bernstein.h deleted file mode 100644 index 7694b04e566175d7afcc964c1e7666bb4441fc18..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_bernstein.h +++ /dev/null @@ -1,4 +0,0 @@ -#include - -int isl_qpolynomial_bound_on_domain_bernstein(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound); diff --git a/cloog-0.16.3/isl/isl_blk.c b/cloog-0.16.3/isl/isl_blk.c deleted file mode 100644 index 0c1dae7e8e4fb0abfe1e5d6d22aee28eb29c00be..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_blk.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include - -/* The maximal number of cache misses before first element is evicted */ -#define ISL_BLK_MAX_MISS 100 - -struct isl_blk isl_blk_empty() -{ - struct isl_blk block; - block.size = 0; - block.data = NULL; - return block; -} - -static int isl_blk_is_empty(struct isl_blk block) -{ - return block.size == 0 && block.data == NULL; -} - -static struct isl_blk isl_blk_error() -{ - struct isl_blk block; - block.size = -1; - block.data = NULL; - return block; -} - -int isl_blk_is_error(struct isl_blk block) -{ - return block.size == -1 && block.data == NULL; -} - -static struct isl_blk extend(struct isl_ctx *ctx, struct isl_blk block, - size_t new_n) -{ - int i; - isl_int *p; - - if (block.size >= new_n) - return block; - - p = block.data; - block.data = isl_realloc_array(ctx, block.data, isl_int, new_n); - if (!block.data) { - free(p); - return isl_blk_error(); - } - - for (i = block.size; i < new_n; ++i) - isl_int_init(block.data[i]); - block.size = new_n; - - return block; -} - -static void isl_blk_free_force(struct isl_ctx *ctx, struct isl_blk block) -{ - int i; - - for (i = 0; i < block.size; ++i) - isl_int_clear(block.data[i]); - free(block.data); -} - -struct isl_blk isl_blk_alloc(struct isl_ctx *ctx, size_t n) -{ - int i; - struct isl_blk block; - - block = isl_blk_empty(); - if (n && ctx->n_cached) { - int best = 0; - for (i = 1; ctx->cache[best].size != n && i < ctx->n_cached; ++i) { - if (ctx->cache[best].size < n) { - if (ctx->cache[i].size > ctx->cache[best].size) - best = i; - } else if (ctx->cache[i].size >= n && - ctx->cache[i].size < ctx->cache[best].size) - best = i; - } - if (ctx->cache[best].size < 2 * n + 100) { - block = ctx->cache[best]; - if (--ctx->n_cached != best) - ctx->cache[best] = ctx->cache[ctx->n_cached]; - if (best == 0) - ctx->n_miss = 0; - } else if (ctx->n_miss++ >= ISL_BLK_MAX_MISS) { - isl_blk_free_force(ctx, ctx->cache[0]); - if (--ctx->n_cached != 0) - ctx->cache[0] = ctx->cache[ctx->n_cached]; - ctx->n_miss = 0; - } - } - - return extend(ctx, block, n); -} - -struct isl_blk isl_blk_extend(struct isl_ctx *ctx, struct isl_blk block, - size_t new_n) -{ - if (isl_blk_is_empty(block)) - return isl_blk_alloc(ctx, new_n); - - return extend(ctx, block, new_n); -} - -void isl_blk_free(struct isl_ctx *ctx, struct isl_blk block) -{ - if (isl_blk_is_empty(block) || isl_blk_is_error(block)) - return; - - if (ctx->n_cached < ISL_BLK_CACHE_SIZE) - ctx->cache[ctx->n_cached++] = block; - else - isl_blk_free_force(ctx, block); -} - -void isl_blk_clear_cache(struct isl_ctx *ctx) -{ - int i; - - for (i = 0; i < ctx->n_cached; ++i) - isl_blk_free_force(ctx, ctx->cache[i]); - ctx->n_cached = 0; -} diff --git a/cloog-0.16.3/isl/isl_bound.c b/cloog-0.16.3/isl/isl_bound.c deleted file mode 100644 index 3828f8dedc99c238b8e5df74c64fa65c8219e3a0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_bound.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include - -/* Compute a bound on the polynomial defined over the parametric polytope - * using either range propagation or bernstein expansion and - * store the result in bound->pwf and bound->pwf_tight. - * Since bernstein expansion requires bounded domains, we apply - * range propagation on unbounded domains. Otherwise, we respect the choice - * of the user. - */ -static int compressed_guarded_poly_bound(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - int bounded; - - if (!bset || !poly) - goto error; - - if (bset->ctx->opt->bound == ISL_BOUND_RANGE) - return isl_qpolynomial_bound_on_domain_range(bset, poly, bound); - - bounded = isl_basic_set_is_bounded(bset); - if (bounded < 0) - goto error; - if (bounded) - return isl_qpolynomial_bound_on_domain_bernstein(bset, poly, bound); - else - return isl_qpolynomial_bound_on_domain_range(bset, poly, bound); -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return -1; -} - -static int unwrapped_guarded_poly_bound(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - isl_pw_qpolynomial_fold *top_pwf; - isl_pw_qpolynomial_fold *top_pwf_tight; - isl_dim *dim; - isl_morph *morph; - unsigned orig_nvar, final_nvar; - int r; - - bset = isl_basic_set_detect_equalities(bset); - - if (!bset) - goto error; - - if (bset->n_eq == 0) - return compressed_guarded_poly_bound(bset, poly, user); - - orig_nvar = isl_basic_set_dim(bset, isl_dim_set); - - morph = isl_basic_set_full_compression(bset); - - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - poly = isl_qpolynomial_morph(poly, isl_morph_copy(morph)); - - final_nvar = isl_basic_set_dim(bset, isl_dim_set); - - dim = isl_morph_get_ran_dim(morph); - dim = isl_dim_drop(dim, isl_dim_set, 0, isl_dim_size(dim, isl_dim_set)); - - top_pwf = bound->pwf; - top_pwf_tight = bound->pwf_tight; - - bound->pwf = isl_pw_qpolynomial_fold_zero(isl_dim_copy(dim), - bound->type); - bound->pwf_tight = isl_pw_qpolynomial_fold_zero(dim, bound->type); - - r = compressed_guarded_poly_bound(bset, poly, user); - - morph = isl_morph_remove_dom_dims(morph, isl_dim_set, 0, orig_nvar); - morph = isl_morph_remove_ran_dims(morph, isl_dim_set, 0, final_nvar); - morph = isl_morph_inverse(morph); - - bound->pwf = isl_pw_qpolynomial_fold_morph(bound->pwf, - isl_morph_copy(morph)); - bound->pwf_tight = isl_pw_qpolynomial_fold_morph(bound->pwf_tight, morph); - - bound->pwf = isl_pw_qpolynomial_fold_fold(top_pwf, bound->pwf); - bound->pwf_tight = isl_pw_qpolynomial_fold_fold(top_pwf_tight, - bound->pwf_tight); - - return r; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return -1; -} - -static int guarded_poly_bound(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - isl_dim *dim; - isl_pw_qpolynomial_fold *top_pwf; - isl_pw_qpolynomial_fold *top_pwf_tight; - int nparam; - int n_in; - int r; - - if (!bound->wrapping) - return unwrapped_guarded_poly_bound(bset, poly, user); - - nparam = isl_dim_size(bound->dim, isl_dim_param); - n_in = isl_dim_size(bound->dim, isl_dim_set); - - bset = isl_basic_set_move_dims(bset, isl_dim_param, nparam, - isl_dim_set, 0, n_in); - poly = isl_qpolynomial_move_dims(poly, isl_dim_param, nparam, - isl_dim_set, 0, n_in); - - dim = isl_basic_set_get_dim(bset); - dim = isl_dim_drop(dim, isl_dim_set, 0, isl_dim_size(dim, isl_dim_set)); - - top_pwf = bound->pwf; - top_pwf_tight = bound->pwf_tight; - - bound->pwf = isl_pw_qpolynomial_fold_zero(isl_dim_copy(dim), - bound->type); - bound->pwf_tight = isl_pw_qpolynomial_fold_zero(dim, bound->type); - - r = unwrapped_guarded_poly_bound(bset, poly, user); - - bound->pwf = isl_pw_qpolynomial_fold_reset_dim(bound->pwf, - isl_dim_copy(bound->dim)); - bound->pwf_tight = isl_pw_qpolynomial_fold_reset_dim(bound->pwf_tight, - isl_dim_copy(bound->dim)); - - bound->pwf = isl_pw_qpolynomial_fold_fold(top_pwf, bound->pwf); - bound->pwf_tight = isl_pw_qpolynomial_fold_fold(top_pwf_tight, - bound->pwf_tight); - - return r; -} - -static int guarded_qp(__isl_take isl_qpolynomial *qp, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - int r; - - r = isl_qpolynomial_as_polynomial_on_domain(qp, bound->bset, - &guarded_poly_bound, user); - isl_qpolynomial_free(qp); - return r; -} - -static int basic_guarded_fold(__isl_take isl_basic_set *bset, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - int r; - - bound->bset = bset; - r = isl_qpolynomial_fold_foreach_qpolynomial(bound->fold, - &guarded_qp, user); - isl_basic_set_free(bset); - return r; -} - -static int guarded_fold(__isl_take isl_set *set, - __isl_take isl_qpolynomial_fold *fold, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - - if (!set || !fold) - goto error; - - set = isl_set_make_disjoint(set); - - bound->fold = fold; - bound->type = isl_qpolynomial_fold_get_type(fold); - - if (isl_set_foreach_basic_set(set, &basic_guarded_fold, bound) < 0) - goto error; - - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - - return 0; -error: - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - return -1; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound( - __isl_take isl_pw_qpolynomial_fold *pwf, int *tight) -{ - unsigned nvar; - struct isl_bound bound; - int covers; - - if (!pwf) - return NULL; - - bound.dim = isl_pw_qpolynomial_fold_get_dim(pwf); - nvar = isl_dim_size(bound.dim, isl_dim_set); - - bound.wrapping = isl_dim_is_wrapping(bound.dim); - if (bound.wrapping) { - bound.dim = isl_dim_unwrap(bound.dim); - nvar = isl_dim_size(bound.dim, isl_dim_out); - bound.dim = isl_dim_domain(bound.dim); - } else - bound.dim = isl_dim_drop(bound.dim, isl_dim_set, 0, nvar); - - if (nvar == 0) { - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_reset_dim(pwf, bound.dim); - } - - if (isl_pw_qpolynomial_fold_is_zero(pwf)) { - enum isl_fold type = pwf->type; - isl_pw_qpolynomial_fold_free(pwf); - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_zero(bound.dim, type); - } - - bound.pwf = isl_pw_qpolynomial_fold_zero(isl_dim_copy(bound.dim), - pwf->type); - bound.pwf_tight = isl_pw_qpolynomial_fold_zero(isl_dim_copy(bound.dim), - pwf->type); - bound.check_tight = !!tight; - - if (isl_pw_qpolynomial_fold_foreach_lifted_piece(pwf, - guarded_fold, &bound) < 0) - goto error; - - covers = isl_pw_qpolynomial_fold_covers(bound.pwf_tight, bound.pwf); - if (covers < 0) - goto error; - - if (tight) - *tight = covers; - - isl_dim_free(bound.dim); - isl_pw_qpolynomial_fold_free(pwf); - - if (covers) { - isl_pw_qpolynomial_fold_free(bound.pwf); - return bound.pwf_tight; - } - - bound.pwf = isl_pw_qpolynomial_fold_fold(bound.pwf, bound.pwf_tight); - - return bound.pwf; -error: - isl_pw_qpolynomial_fold_free(bound.pwf_tight); - isl_pw_qpolynomial_fold_free(bound.pwf); - isl_pw_qpolynomial_fold_free(pwf); - isl_dim_free(bound.dim); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( - __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, int *tight) -{ - isl_pw_qpolynomial_fold *pwf; - - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial(type, pwqp); - return isl_pw_qpolynomial_fold_bound(pwf, tight); -} - -struct isl_union_bound_data { - enum isl_fold type; - int tight; - isl_union_pw_qpolynomial_fold *res; -}; - -static int bound_pw(__isl_take isl_pw_qpolynomial *pwqp, void *user) -{ - struct isl_union_bound_data *data = user; - isl_pw_qpolynomial_fold *pwf; - - pwf = isl_pw_qpolynomial_bound(pwqp, data->type, - data->tight ? &data->tight : NULL); - data->res = isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - data->res, pwf); - - return 0; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( - __isl_take isl_union_pw_qpolynomial *upwqp, - enum isl_fold type, int *tight) -{ - isl_dim *dim; - struct isl_union_bound_data data = { type, 1, NULL }; - - if (!upwqp) - return NULL; - - if (!tight) - data.tight = 0; - - dim = isl_union_pw_qpolynomial_get_dim(upwqp); - data.res = isl_union_pw_qpolynomial_fold_zero(dim, type); - if (isl_union_pw_qpolynomial_foreach_pw_qpolynomial(upwqp, - &bound_pw, &data) < 0) - goto error; - - isl_union_pw_qpolynomial_free(upwqp); - if (tight) - *tight = data.tight; - - return data.res; -error: - isl_union_pw_qpolynomial_free(upwqp); - isl_union_pw_qpolynomial_fold_free(data.res); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_bound.h b/cloog-0.16.3/isl/isl_bound.h deleted file mode 100644 index b3a40db396e9c0333f38be848e0564ac16874a8d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_bound.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ISL_BOUND_H -#define ISL_BOUND_H - -#include - -struct isl_bound { - /* input */ - int check_tight; - int wrapping; - enum isl_fold type; - isl_dim *dim; - isl_basic_set *bset; - isl_qpolynomial_fold *fold; - - /* output */ - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *pwf_tight; -}; - -#endif diff --git a/cloog-0.16.3/isl/isl_coalesce.c b/cloog-0.16.3/isl/isl_coalesce.c deleted file mode 100644 index 8cb942e28d865dc674549d4b44a47519653e2342..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_coalesce.c +++ /dev/null @@ -1,1294 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include "isl_map_private.h" -#include -#include "isl_tab.h" -#include - -#define STATUS_ERROR -1 -#define STATUS_REDUNDANT 1 -#define STATUS_VALID 2 -#define STATUS_SEPARATE 3 -#define STATUS_CUT 4 -#define STATUS_ADJ_EQ 5 -#define STATUS_ADJ_INEQ 6 - -static int status_in(isl_int *ineq, struct isl_tab *tab) -{ - enum isl_ineq_type type = isl_tab_ineq_type(tab, ineq); - switch (type) { - default: - case isl_ineq_error: return STATUS_ERROR; - case isl_ineq_redundant: return STATUS_VALID; - case isl_ineq_separate: return STATUS_SEPARATE; - case isl_ineq_cut: return STATUS_CUT; - case isl_ineq_adj_eq: return STATUS_ADJ_EQ; - case isl_ineq_adj_ineq: return STATUS_ADJ_INEQ; - } -} - -/* Compute the position of the equalities of basic map "i" - * with respect to basic map "j". - * The resulting array has twice as many entries as the number - * of equalities corresponding to the two inequalties to which - * each equality corresponds. - */ -static int *eq_status_in(struct isl_map *map, int i, int j, - struct isl_tab **tabs) -{ - int k, l; - int *eq = isl_calloc_array(map->ctx, int, 2 * map->p[i]->n_eq); - unsigned dim; - - dim = isl_basic_map_total_dim(map->p[i]); - for (k = 0; k < map->p[i]->n_eq; ++k) { - for (l = 0; l < 2; ++l) { - isl_seq_neg(map->p[i]->eq[k], map->p[i]->eq[k], 1+dim); - eq[2 * k + l] = status_in(map->p[i]->eq[k], tabs[j]); - if (eq[2 * k + l] == STATUS_ERROR) - goto error; - } - if (eq[2 * k] == STATUS_SEPARATE || - eq[2 * k + 1] == STATUS_SEPARATE) - break; - } - - return eq; -error: - free(eq); - return NULL; -} - -/* Compute the position of the inequalities of basic map "i" - * with respect to basic map "j". - */ -static int *ineq_status_in(struct isl_map *map, int i, int j, - struct isl_tab **tabs) -{ - int k; - unsigned n_eq = map->p[i]->n_eq; - int *ineq = isl_calloc_array(map->ctx, int, map->p[i]->n_ineq); - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - if (isl_tab_is_redundant(tabs[i], n_eq + k)) { - ineq[k] = STATUS_REDUNDANT; - continue; - } - ineq[k] = status_in(map->p[i]->ineq[k], tabs[j]); - if (ineq[k] == STATUS_ERROR) - goto error; - if (ineq[k] == STATUS_SEPARATE) - break; - } - - return ineq; -error: - free(ineq); - return NULL; -} - -static int any(int *con, unsigned len, int status) -{ - int i; - - for (i = 0; i < len ; ++i) - if (con[i] == status) - return 1; - return 0; -} - -static int count(int *con, unsigned len, int status) -{ - int i; - int c = 0; - - for (i = 0; i < len ; ++i) - if (con[i] == status) - c++; - return c; -} - -static int all(int *con, unsigned len, int status) -{ - int i; - - for (i = 0; i < len ; ++i) { - if (con[i] == STATUS_REDUNDANT) - continue; - if (con[i] != status) - return 0; - } - return 1; -} - -static void drop(struct isl_map *map, int i, struct isl_tab **tabs) -{ - isl_basic_map_free(map->p[i]); - isl_tab_free(tabs[i]); - - if (i != map->n - 1) { - map->p[i] = map->p[map->n - 1]; - tabs[i] = tabs[map->n - 1]; - } - tabs[map->n - 1] = NULL; - map->n--; -} - -/* Replace the pair of basic maps i and j by the basic map bounded - * by the valid constraints in both basic maps and the constraint - * in extra (if not NULL). - */ -static int fuse(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j, - __isl_keep isl_mat *extra) -{ - int k, l; - struct isl_basic_map *fused = NULL; - struct isl_tab *fused_tab = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - unsigned extra_rows = extra ? extra->n_row : 0; - - fused = isl_basic_map_alloc_dim(isl_dim_copy(map->p[i]->dim), - map->p[i]->n_div, - map->p[i]->n_eq + map->p[j]->n_eq, - map->p[i]->n_ineq + map->p[j]->n_ineq + extra_rows); - if (!fused) - goto error; - - for (k = 0; k < map->p[i]->n_eq; ++k) { - if (eq_i && (eq_i[2 * k] != STATUS_VALID || - eq_i[2 * k + 1] != STATUS_VALID)) - continue; - l = isl_basic_map_alloc_equality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->eq[l], map->p[i]->eq[k], 1 + total); - } - - for (k = 0; k < map->p[j]->n_eq; ++k) { - if (eq_j && (eq_j[2 * k] != STATUS_VALID || - eq_j[2 * k + 1] != STATUS_VALID)) - continue; - l = isl_basic_map_alloc_equality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->eq[l], map->p[j]->eq[k], 1 + total); - } - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - if (ineq_i[k] != STATUS_VALID) - continue; - l = isl_basic_map_alloc_inequality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->ineq[l], map->p[i]->ineq[k], 1 + total); - } - - for (k = 0; k < map->p[j]->n_ineq; ++k) { - if (ineq_j[k] != STATUS_VALID) - continue; - l = isl_basic_map_alloc_inequality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->ineq[l], map->p[j]->ineq[k], 1 + total); - } - - for (k = 0; k < map->p[i]->n_div; ++k) { - int l = isl_basic_map_alloc_div(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->div[l], map->p[i]->div[k], 1 + 1 + total); - } - - for (k = 0; k < extra_rows; ++k) { - l = isl_basic_map_alloc_inequality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->ineq[l], extra->row[k], 1 + total); - } - - fused = isl_basic_map_gauss(fused, NULL); - ISL_F_SET(fused, ISL_BASIC_MAP_FINAL); - if (ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_RATIONAL) && - ISL_F_ISSET(map->p[j], ISL_BASIC_MAP_RATIONAL)) - ISL_F_SET(fused, ISL_BASIC_MAP_RATIONAL); - - fused_tab = isl_tab_from_basic_map(fused); - if (isl_tab_detect_redundant(fused_tab) < 0) - goto error; - - isl_basic_map_free(map->p[i]); - map->p[i] = fused; - isl_tab_free(tabs[i]); - tabs[i] = fused_tab; - drop(map, j, tabs); - - return 1; -error: - isl_tab_free(fused_tab); - isl_basic_map_free(fused); - return -1; -} - -/* Given a pair of basic maps i and j such that all constraints are either - * "valid" or "cut", check if the facets corresponding to the "cut" - * constraints of i lie entirely within basic map j. - * If so, replace the pair by the basic map consisting of the valid - * constraints in both basic maps. - * - * To see that we are not introducing any extra points, call the - * two basic maps A and B and the resulting map U and let x - * be an element of U \setminus ( A \cup B ). - * Then there is a pair of cut constraints c_1 and c_2 in A and B such that x - * violates them. Let X be the intersection of U with the opposites - * of these constraints. Then x \in X. - * The facet corresponding to c_1 contains the corresponding facet of A. - * This facet is entirely contained in B, so c_2 is valid on the facet. - * However, since it is also (part of) a facet of X, -c_2 is also valid - * on the facet. This means c_2 is saturated on the facet, so c_1 and - * c_2 must be opposites of each other, but then x could not violate - * both of them. - */ -static int check_facets(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *ineq_i, int *ineq_j) -{ - int k, l; - struct isl_tab_undo *snap; - unsigned n_eq = map->p[i]->n_eq; - - snap = isl_tab_snap(tabs[i]); - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - if (ineq_i[k] != STATUS_CUT) - continue; - if (isl_tab_select_facet(tabs[i], n_eq + k) < 0) - return -1; - for (l = 0; l < map->p[j]->n_ineq; ++l) { - int stat; - if (ineq_j[l] != STATUS_CUT) - continue; - stat = status_in(map->p[j]->ineq[l], tabs[i]); - if (stat != STATUS_VALID) - break; - } - if (isl_tab_rollback(tabs[i], snap) < 0) - return -1; - if (l < map->p[j]->n_ineq) - break; - } - - if (k < map->p[i]->n_ineq) - /* BAD CUT PAIR */ - return 0; - return fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); -} - -/* Both basic maps have at least one inequality with and adjacent - * (but opposite) inequality in the other basic map. - * Check that there are no cut constraints and that there is only - * a single pair of adjacent inequalities. - * If so, we can replace the pair by a single basic map described - * by all but the pair of adjacent inequalities. - * Any additional points introduced lie strictly between the two - * adjacent hyperplanes and can therefore be integral. - * - * ____ _____ - * / ||\ / \ - * / || \ / \ - * \ || \ => \ \ - * \ || / \ / - * \___||_/ \_____/ - * - * The test for a single pair of adjancent inequalities is important - * for avoiding the combination of two basic maps like the following - * - * /| - * / | - * /__| - * _____ - * | | - * | | - * |___| - */ -static int check_adj_ineq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *ineq_i, int *ineq_j) -{ - int changed = 0; - - if (any(ineq_i, map->p[i]->n_ineq, STATUS_CUT) || - any(ineq_j, map->p[j]->n_ineq, STATUS_CUT)) - /* ADJ INEQ CUT */ - ; - else if (count(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) == 1 && - count(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ) == 1) - changed = fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); - /* else ADJ INEQ TOO MANY */ - - return changed; -} - -/* Check if basic map "i" contains the basic map represented - * by the tableau "tab". - */ -static int contains(struct isl_map *map, int i, int *ineq_i, - struct isl_tab *tab) -{ - int k, l; - unsigned dim; - - dim = isl_basic_map_total_dim(map->p[i]); - for (k = 0; k < map->p[i]->n_eq; ++k) { - for (l = 0; l < 2; ++l) { - int stat; - isl_seq_neg(map->p[i]->eq[k], map->p[i]->eq[k], 1+dim); - stat = status_in(map->p[i]->eq[k], tab); - if (stat != STATUS_VALID) - return 0; - } - } - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - int stat; - if (ineq_i[k] == STATUS_REDUNDANT) - continue; - stat = status_in(map->p[i]->ineq[k], tab); - if (stat != STATUS_VALID) - return 0; - } - return 1; -} - -/* Basic map "i" has an inequality "k" that is adjacent to some equality - * of basic map "j". All the other inequalities are valid for "j". - * Check if basic map "j" forms an extension of basic map "i". - * - * In particular, we relax constraint "k", compute the corresponding - * facet and check whether it is included in the other basic map. - * If so, we know that relaxing the constraint extends the basic - * map with exactly the other basic map (we already know that this - * other basic map is included in the extension, because there - * were no "cut" inequalities in "i") and we can replace the - * two basic maps by thie extension. - * ____ _____ - * / || / | - * / || / | - * \ || => \ | - * \ || \ | - * \___|| \____| - */ -static int is_extension(struct isl_map *map, int i, int j, int k, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - int super; - struct isl_tab_undo *snap, *snap2; - unsigned n_eq = map->p[i]->n_eq; - - snap = isl_tab_snap(tabs[i]); - tabs[i] = isl_tab_relax(tabs[i], n_eq + k); - snap2 = isl_tab_snap(tabs[i]); - if (isl_tab_select_facet(tabs[i], n_eq + k) < 0) - return -1; - super = contains(map, j, ineq_j, tabs[i]); - if (super) { - if (isl_tab_rollback(tabs[i], snap2) < 0) - return -1; - map->p[i] = isl_basic_map_cow(map->p[i]); - if (!map->p[i]) - return -1; - isl_int_add_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); - ISL_F_SET(map->p[i], ISL_BASIC_MAP_FINAL); - drop(map, j, tabs); - changed = 1; - } else - if (isl_tab_rollback(tabs[i], snap) < 0) - return -1; - - return changed; -} - -/* For each non-redundant constraint in "bmap" (as determined by "tab"), - * wrap the constraint around "bound" such that it includes the whole - * set "set" and append the resulting constraint to "wraps". - * "wraps" is assumed to have been pre-allocated to the appropriate size. - * wraps->n_row is the number of actual wrapped constraints that have - * been added. - * If any of the wrapping problems results in a constraint that is - * identical to "bound", then this means that "set" is unbounded in such - * way that no wrapping is possible. If this happens then wraps->n_row - * is reset to zero. - */ -static int add_wraps(__isl_keep isl_mat *wraps, __isl_keep isl_basic_map *bmap, - struct isl_tab *tab, isl_int *bound, __isl_keep isl_set *set) -{ - int l; - int w; - unsigned total = isl_basic_map_total_dim(bmap); - - w = wraps->n_row; - - for (l = 0; l < bmap->n_ineq; ++l) { - if (isl_seq_is_neg(bound, bmap->ineq[l], 1 + total)) - continue; - if (isl_seq_eq(bound, bmap->ineq[l], 1 + total)) - continue; - if (isl_tab_is_redundant(tab, bmap->n_eq + l)) - continue; - - isl_seq_cpy(wraps->row[w], bound, 1 + total); - if (!isl_set_wrap_facet(set, wraps->row[w], bmap->ineq[l])) - return -1; - if (isl_seq_eq(wraps->row[w], bound, 1 + total)) - goto unbounded; - ++w; - } - for (l = 0; l < bmap->n_eq; ++l) { - if (isl_seq_is_neg(bound, bmap->eq[l], 1 + total)) - continue; - if (isl_seq_eq(bound, bmap->eq[l], 1 + total)) - continue; - - isl_seq_cpy(wraps->row[w], bound, 1 + total); - isl_seq_neg(wraps->row[w + 1], bmap->eq[l], 1 + total); - if (!isl_set_wrap_facet(set, wraps->row[w], wraps->row[w + 1])) - return -1; - if (isl_seq_eq(wraps->row[w], bound, 1 + total)) - goto unbounded; - ++w; - - isl_seq_cpy(wraps->row[w], bound, 1 + total); - if (!isl_set_wrap_facet(set, wraps->row[w], bmap->eq[l])) - return -1; - if (isl_seq_eq(wraps->row[w], bound, 1 + total)) - goto unbounded; - ++w; - } - - wraps->n_row = w; - return 0; -unbounded: - wraps->n_row = 0; - return 0; -} - -/* Check if the constraints in "wraps" from "first" until the last - * are all valid for the basic set represented by "tab". - * If not, wraps->n_row is set to zero. - */ -static int check_wraps(__isl_keep isl_mat *wraps, int first, - struct isl_tab *tab) -{ - int i; - - for (i = first; i < wraps->n_row; ++i) { - enum isl_ineq_type type; - type = isl_tab_ineq_type(tab, wraps->row[i]); - if (type == isl_ineq_error) - return -1; - if (type == isl_ineq_redundant) - continue; - wraps->n_row = 0; - return 0; - } - - return 0; -} - -/* Return a set that corresponds to the non-redudant constraints - * (as recorded in tab) of bmap. - * - * It's important to remove the redundant constraints as some - * of the other constraints may have been modified after the - * constraints were marked redundant. - * In particular, a constraint may have been relaxed. - * Redundant constraints are ignored when a constraint is relaxed - * and should therefore continue to be ignored ever after. - * Otherwise, the relaxation might be thwarted by some of - * these constraints. - */ -static __isl_give isl_set *set_from_updated_bmap(__isl_keep isl_basic_map *bmap, - struct isl_tab *tab) -{ - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_update_from_tab(bmap, tab); - return isl_set_from_basic_set(isl_basic_map_underlying_set(bmap)); -} - -/* Given a basic set i with a constraint k that is adjacent to either the - * whole of basic set j or a facet of basic set j, check if we can wrap - * both the facet corresponding to k and the facet of j (or the whole of j) - * around their ridges to include the other set. - * If so, replace the pair of basic sets by their union. - * - * All constraints of i (except k) are assumed to be valid for j. - * - * However, the constraints of j may not be valid for i and so - * we have to check that the wrapping constraints for j are valid for i. - * - * In the case where j has a facet adjacent to i, tab[j] is assumed - * to have been restricted to this facet, so that the non-redundant - * constraints in tab[j] are the ridges of the facet. - * Note that for the purpose of wrapping, it does not matter whether - * we wrap the ridges of i around the whole of j or just around - * the facet since all the other constraints are assumed to be valid for j. - * In practice, we wrap to include the whole of j. - * ____ _____ - * / | / \ - * / || / | - * \ || => \ | - * \ || \ | - * \___|| \____| - * - */ -static int can_wrap_in_facet(struct isl_map *map, int i, int j, int k, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - struct isl_mat *wraps = NULL; - struct isl_set *set_i = NULL; - struct isl_set *set_j = NULL; - struct isl_vec *bound = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - struct isl_tab_undo *snap; - int n; - - set_i = set_from_updated_bmap(map->p[i], tabs[i]); - set_j = set_from_updated_bmap(map->p[j], tabs[j]); - wraps = isl_mat_alloc(map->ctx, 2 * (map->p[i]->n_eq + map->p[j]->n_eq) + - map->p[i]->n_ineq + map->p[j]->n_ineq, - 1 + total); - bound = isl_vec_alloc(map->ctx, 1 + total); - if (!set_i || !set_j || !wraps || !bound) - goto error; - - isl_seq_cpy(bound->el, map->p[i]->ineq[k], 1 + total); - isl_int_add_ui(bound->el[0], bound->el[0], 1); - - isl_seq_cpy(wraps->row[0], bound->el, 1 + total); - wraps->n_row = 1; - - if (add_wraps(wraps, map->p[j], tabs[j], bound->el, set_i) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - snap = isl_tab_snap(tabs[i]); - - if (isl_tab_select_facet(tabs[i], map->p[i]->n_eq + k) < 0) - goto error; - if (isl_tab_detect_redundant(tabs[i]) < 0) - goto error; - - isl_seq_neg(bound->el, map->p[i]->ineq[k], 1 + total); - - n = wraps->n_row; - if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set_j) < 0) - goto error; - - if (isl_tab_rollback(tabs[i], snap) < 0) - goto error; - if (check_wraps(wraps, n, tabs[i]) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - changed = fuse(map, i, j, tabs, eq_i, ineq_i, eq_j, ineq_j, wraps); - -unbounded: - isl_mat_free(wraps); - - isl_set_free(set_i); - isl_set_free(set_j); - - isl_vec_free(bound); - - return changed; -error: - isl_vec_free(bound); - isl_mat_free(wraps); - isl_set_free(set_i); - isl_set_free(set_j); - return -1; -} - -/* Set the is_redundant property of the "n" constraints in "cuts", - * except "k" to "v". - * This is a fairly tricky operation as it bypasses isl_tab.c. - * The reason we want to temporarily mark some constraints redundant - * is that we want to ignore them in add_wraps. - * - * Initially all cut constraints are non-redundant, but the - * selection of a facet right before the call to this function - * may have made some of them redundant. - * Likewise, the same constraints are marked non-redundant - * in the second call to this function, before they are officially - * made non-redundant again in the subsequent rollback. - */ -static void set_is_redundant(struct isl_tab *tab, unsigned n_eq, - int *cuts, int n, int k, int v) -{ - int l; - - for (l = 0; l < n; ++l) { - if (l == k) - continue; - tab->con[n_eq + cuts[l]].is_redundant = v; - } -} - -/* Given a pair of basic maps i and j such that j sticks out - * of i at n cut constraints, each time by at most one, - * try to compute wrapping constraints and replace the two - * basic maps by a single basic map. - * The other constraints of i are assumed to be valid for j. - * - * The facets of i corresponding to the cut constraints are - * wrapped around their ridges, except those ridges determined - * by any of the other cut constraints. - * The intersections of cut constraints need to be ignored - * as the result of wrapping one cut constraint around another - * would result in a constraint cutting the union. - * In each case, the facets are wrapped to include the union - * of the two basic maps. - * - * The pieces of j that lie at an offset of exactly one from - * one of the cut constraints of i are wrapped around their edges. - * Here, there is no need to ignore intersections because we - * are wrapping around the union of the two basic maps. - * - * If any wrapping fails, i.e., if we cannot wrap to touch - * the union, then we give up. - * Otherwise, the pair of basic maps is replaced by their union. - */ -static int wrap_in_facets(struct isl_map *map, int i, int j, - int *cuts, int n, struct isl_tab **tabs, - int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - isl_mat *wraps = NULL; - isl_set *set = NULL; - isl_vec *bound = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - int max_wrap; - int k; - struct isl_tab_undo *snap_i, *snap_j; - - if (isl_tab_extend_cons(tabs[j], 1) < 0) - goto error; - - max_wrap = 2 * (map->p[i]->n_eq + map->p[j]->n_eq) + - map->p[i]->n_ineq + map->p[j]->n_ineq; - max_wrap *= n; - - set = isl_set_union(set_from_updated_bmap(map->p[i], tabs[i]), - set_from_updated_bmap(map->p[j], tabs[j])); - wraps = isl_mat_alloc(map->ctx, max_wrap, 1 + total); - bound = isl_vec_alloc(map->ctx, 1 + total); - if (!set || !wraps || !bound) - goto error; - - snap_i = isl_tab_snap(tabs[i]); - snap_j = isl_tab_snap(tabs[j]); - - wraps->n_row = 0; - - for (k = 0; k < n; ++k) { - if (isl_tab_select_facet(tabs[i], map->p[i]->n_eq + cuts[k]) < 0) - goto error; - if (isl_tab_detect_redundant(tabs[i]) < 0) - goto error; - set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 1); - - isl_seq_neg(bound->el, map->p[i]->ineq[cuts[k]], 1 + total); - if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set) < 0) - goto error; - - set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 0); - if (isl_tab_rollback(tabs[i], snap_i) < 0) - goto error; - - if (!wraps->n_row) - break; - - isl_seq_cpy(bound->el, map->p[i]->ineq[cuts[k]], 1 + total); - isl_int_add_ui(bound->el[0], bound->el[0], 1); - if (isl_tab_add_eq(tabs[j], bound->el) < 0) - goto error; - if (isl_tab_detect_redundant(tabs[j]) < 0) - goto error; - - if (!tabs[j]->empty && - add_wraps(wraps, map->p[j], tabs[j], bound->el, set) < 0) - goto error; - - if (isl_tab_rollback(tabs[j], snap_j) < 0) - goto error; - - if (!wraps->n_row) - break; - } - - if (k == n) - changed = fuse(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j, wraps); - - isl_vec_free(bound); - isl_mat_free(wraps); - isl_set_free(set); - - return changed; -error: - isl_vec_free(bound); - isl_mat_free(wraps); - isl_set_free(set); - return -1; -} - -/* Given two basic sets i and j such that i has no cut equalities, - * check if relaxing all the cut inequalities of i by one turns - * them into valid constraint for j and check if we can wrap in - * the bits that are sticking out. - * If so, replace the pair by their union. - * - * We first check if all relaxed cut inequalities of i are valid for j - * and then try to wrap in the intersections of the relaxed cut inequalities - * with j. - * - * During this wrapping, we consider the points of j that lie at a distance - * of exactly 1 from i. In particular, we ignore the points that lie in - * between this lower-dimensional space and the basic map i. - * We can therefore only apply this to integer maps. - * ____ _____ - * / ___|_ / \ - * / | | / | - * \ | | => \ | - * \|____| \ | - * \___| \____/ - * - * _____ ______ - * | ____|_ | \ - * | | | | | - * | | | => | | - * |_| | | | - * |_____| \______| - * - * _______ - * | | - * | |\ | - * | | \ | - * | | \ | - * | | \| - * | | \ - * | |_____\ - * | | - * |_______| - * - * Wrapping can fail if the result of wrapping one of the facets - * around its edges does not produce any new facet constraint. - * In particular, this happens when we try to wrap in unbounded sets. - * - * _______________________________________________________________________ - * | - * | ___ - * | | | - * |_| |_________________________________________________________________ - * |___| - * - * The following is not an acceptable result of coalescing the above two - * sets as it includes extra integer points. - * _______________________________________________________________________ - * | - * | - * | - * | - * \______________________________________________________________________ - */ -static int can_wrap_in_set(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - int k, m; - int n; - int *cuts = NULL; - - if (ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_RATIONAL) || - ISL_F_ISSET(map->p[j], ISL_BASIC_MAP_RATIONAL)) - return 0; - - n = count(ineq_i, map->p[i]->n_ineq, STATUS_CUT); - if (n == 0) - return 0; - - cuts = isl_alloc_array(map->ctx, int, n); - if (!cuts) - return -1; - - for (k = 0, m = 0; m < n; ++k) { - enum isl_ineq_type type; - - if (ineq_i[k] != STATUS_CUT) - continue; - - isl_int_add_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); - type = isl_tab_ineq_type(tabs[j], map->p[i]->ineq[k]); - isl_int_sub_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); - if (type == isl_ineq_error) - goto error; - if (type != isl_ineq_redundant) - break; - cuts[m] = k; - ++m; - } - - if (m == n) - changed = wrap_in_facets(map, i, j, cuts, n, tabs, - eq_i, ineq_i, eq_j, ineq_j); - - free(cuts); - - return changed; -error: - free(cuts); - return -1; -} - -/* Check if either i or j has a single cut constraint that can - * be used to wrap in (a facet of) the other basic set. - * if so, replace the pair by their union. - */ -static int check_wrap(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT)) - changed = can_wrap_in_set(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - if (changed) - return changed; - - if (!any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = can_wrap_in_set(map, j, i, tabs, - eq_j, ineq_j, eq_i, ineq_i); - return changed; -} - -/* At least one of the basic maps has an equality that is adjacent - * to inequality. Make sure that only one of the basic maps has - * such an equality and that the other basic map has exactly one - * inequality adjacent to an equality. - * We call the basic map that has the inequality "i" and the basic - * map that has the equality "j". - * If "i" has any "cut" (in)equality, then relaxing the inequality - * by one would not result in a basic map that contains the other - * basic map. - */ -static int check_adj_eq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - int k; - - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_INEQ) && - any(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_INEQ)) - /* ADJ EQ TOO MANY */ - return 0; - - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_INEQ)) - return check_adj_eq(map, j, i, tabs, - eq_j, ineq_j, eq_i, ineq_i); - - /* j has an equality adjacent to an inequality in i */ - - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT)) - return 0; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_CUT)) - /* ADJ EQ CUT */ - return 0; - if (count(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_EQ) != 1 || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_EQ) || - any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ)) - /* ADJ EQ TOO MANY */ - return 0; - - for (k = 0; k < map->p[i]->n_ineq ; ++k) - if (ineq_i[k] == STATUS_ADJ_EQ) - break; - - changed = is_extension(map, i, j, k, tabs, eq_i, ineq_i, eq_j, ineq_j); - if (changed) - return changed; - - if (count(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_INEQ) != 1) - return 0; - - changed = can_wrap_in_facet(map, i, j, k, tabs, eq_i, ineq_i, eq_j, ineq_j); - - return changed; -} - -/* The two basic maps lie on adjacent hyperplanes. In particular, - * basic map "i" has an equality that lies parallel to basic map "j". - * Check if we can wrap the facets around the parallel hyperplanes - * to include the other set. - * - * We perform basically the same operations as can_wrap_in_facet, - * except that we don't need to select a facet of one of the sets. - * _ - * \\ \\ - * \\ => \\ - * \ \| - * - * We only allow one equality of "i" to be adjacent to an equality of "j" - * to avoid coalescing - * - * [m, n] -> { [x, y] -> [x, 1 + y] : x >= 1 and y >= 1 and - * x <= 10 and y <= 10; - * [x, y] -> [1 + x, y] : x >= 1 and x <= 20 and - * y >= 5 and y <= 15 } - * - * to - * - * [m, n] -> { [x, y] -> [x2, y2] : x >= 1 and 10y2 <= 20 - x + 10y and - * 4y2 >= 5 + 3y and 5y2 <= 15 + 4y and - * y2 <= 1 + x + y - x2 and y2 >= y and - * y2 >= 1 + x + y - x2 } - */ -static int check_eq_adj_eq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int k; - int changed = 0; - struct isl_mat *wraps = NULL; - struct isl_set *set_i = NULL; - struct isl_set *set_j = NULL; - struct isl_vec *bound = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - - if (count(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_EQ) != 1) - return 0; - - for (k = 0; k < 2 * map->p[i]->n_eq ; ++k) - if (eq_i[k] == STATUS_ADJ_EQ) - break; - - set_i = set_from_updated_bmap(map->p[i], tabs[i]); - set_j = set_from_updated_bmap(map->p[j], tabs[j]); - wraps = isl_mat_alloc(map->ctx, 2 * (map->p[i]->n_eq + map->p[j]->n_eq) + - map->p[i]->n_ineq + map->p[j]->n_ineq, - 1 + total); - bound = isl_vec_alloc(map->ctx, 1 + total); - if (!set_i || !set_j || !wraps || !bound) - goto error; - - if (k % 2 == 0) - isl_seq_neg(bound->el, map->p[i]->eq[k / 2], 1 + total); - else - isl_seq_cpy(bound->el, map->p[i]->eq[k / 2], 1 + total); - isl_int_add_ui(bound->el[0], bound->el[0], 1); - - isl_seq_cpy(wraps->row[0], bound->el, 1 + total); - wraps->n_row = 1; - - if (add_wraps(wraps, map->p[j], tabs[j], bound->el, set_i) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - isl_int_sub_ui(bound->el[0], bound->el[0], 1); - isl_seq_neg(bound->el, bound->el, 1 + total); - - isl_seq_cpy(wraps->row[wraps->n_row], bound->el, 1 + total); - wraps->n_row++; - - if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set_j) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - changed = fuse(map, i, j, tabs, eq_i, ineq_i, eq_j, ineq_j, wraps); - - if (0) { -error: changed = -1; - } -unbounded: - - isl_mat_free(wraps); - isl_set_free(set_i); - isl_set_free(set_j); - isl_vec_free(bound); - - return changed; -} - -/* Check if the union of the given pair of basic maps - * can be represented by a single basic map. - * If so, replace the pair by the single basic map and return 1. - * Otherwise, return 0; - * - * We first check the effect of each constraint of one basic map - * on the other basic map. - * The constraint may be - * redundant the constraint is redundant in its own - * basic map and should be ignore and removed - * in the end - * valid all (integer) points of the other basic map - * satisfy the constraint - * separate no (integer) point of the other basic map - * satisfies the constraint - * cut some but not all points of the other basic map - * satisfy the constraint - * adj_eq the given constraint is adjacent (on the outside) - * to an equality of the other basic map - * adj_ineq the given constraint is adjacent (on the outside) - * to an inequality of the other basic map - * - * We consider seven cases in which we can replace the pair by a single - * basic map. We ignore all "redundant" constraints. - * - * 1. all constraints of one basic map are valid - * => the other basic map is a subset and can be removed - * - * 2. all constraints of both basic maps are either "valid" or "cut" - * and the facets corresponding to the "cut" constraints - * of one of the basic maps lies entirely inside the other basic map - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps - * - * 3. there is a single pair of adjacent inequalities - * (all other constraints are "valid") - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps - * - * 4. there is a single adjacent pair of an inequality and an equality, - * the other constraints of the basic map containing the inequality are - * "valid". Moreover, if the inequality the basic map is relaxed - * and then turned into an equality, then resulting facet lies - * entirely inside the other basic map - * => the pair can be replaced by the basic map containing - * the inequality, with the inequality relaxed. - * - * 5. there is a single adjacent pair of an inequality and an equality, - * the other constraints of the basic map containing the inequality are - * "valid". Moreover, the facets corresponding to both - * the inequality and the equality can be wrapped around their - * ridges to include the other basic map - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps together - * with all wrapping constraints - * - * 6. one of the basic maps extends beyond the other by at most one. - * Moreover, the facets corresponding to the cut constraints and - * the pieces of the other basic map at offset one from these cut - * constraints can be wrapped around their ridges to include - * the union of the two basic maps - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps together - * with all wrapping constraints - * - * 7. the two basic maps live in adjacent hyperplanes. In principle - * such sets can always be combined through wrapping, but we impose - * that there is only one such pair, to avoid overeager coalescing. - * - * Throughout the computation, we maintain a collection of tableaus - * corresponding to the basic maps. When the basic maps are dropped - * or combined, the tableaus are modified accordingly. - */ -static int coalesce_pair(struct isl_map *map, int i, int j, - struct isl_tab **tabs) -{ - int changed = 0; - int *eq_i = NULL; - int *eq_j = NULL; - int *ineq_i = NULL; - int *ineq_j = NULL; - - eq_i = eq_status_in(map, i, j, tabs); - if (!eq_i) - goto error; - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ERROR)) - goto error; - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_SEPARATE)) - goto done; - - eq_j = eq_status_in(map, j, i, tabs); - if (!eq_j) - goto error; - if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_ERROR)) - goto error; - if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_SEPARATE)) - goto done; - - ineq_i = ineq_status_in(map, i, j, tabs); - if (!ineq_i) - goto error; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_ERROR)) - goto error; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_SEPARATE)) - goto done; - - ineq_j = ineq_status_in(map, j, i, tabs); - if (!ineq_j) - goto error; - if (any(ineq_j, map->p[j]->n_ineq, STATUS_ERROR)) - goto error; - if (any(ineq_j, map->p[j]->n_ineq, STATUS_SEPARATE)) - goto done; - - if (all(eq_i, 2 * map->p[i]->n_eq, STATUS_VALID) && - all(ineq_i, map->p[i]->n_ineq, STATUS_VALID)) { - drop(map, j, tabs); - changed = 1; - } else if (all(eq_j, 2 * map->p[j]->n_eq, STATUS_VALID) && - all(ineq_j, map->p[j]->n_ineq, STATUS_VALID)) { - drop(map, i, tabs); - changed = 1; - } else if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_EQ)) { - changed = check_eq_adj_eq(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - } else if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_EQ)) { - changed = check_eq_adj_eq(map, j, i, tabs, - eq_j, ineq_j, eq_i, ineq_i); - } else if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_INEQ) || - any(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_INEQ)) { - changed = check_adj_eq(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - } else if (any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_EQ) || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_EQ)) { - /* Can't happen */ - /* BAD ADJ INEQ */ - } else if (any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ)) { - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) && - !any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = check_adj_ineq(map, i, j, tabs, - ineq_i, ineq_j); - } else { - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) && - !any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = check_facets(map, i, j, tabs, ineq_i, ineq_j); - if (!changed) - changed = check_wrap(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - } - -done: - free(eq_i); - free(eq_j); - free(ineq_i); - free(ineq_j); - return changed; -error: - free(eq_i); - free(eq_j); - free(ineq_i); - free(ineq_j); - return -1; -} - -static struct isl_map *coalesce(struct isl_map *map, struct isl_tab **tabs) -{ - int i, j; - - for (i = map->n - 2; i >= 0; --i) -restart: - for (j = i + 1; j < map->n; ++j) { - int changed; - changed = coalesce_pair(map, i, j, tabs); - if (changed < 0) - goto error; - if (changed) - goto restart; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -/* For each pair of basic maps in the map, check if the union of the two - * can be represented by a single basic map. - * If so, replace the pair by the single basic map and start over. - */ -struct isl_map *isl_map_coalesce(struct isl_map *map) -{ - int i; - unsigned n; - struct isl_tab **tabs = NULL; - - if (!map) - return NULL; - - if (map->n <= 1) - return map; - - map = isl_map_align_divs(map); - - tabs = isl_calloc_array(map->ctx, struct isl_tab *, map->n); - if (!tabs) - goto error; - - n = map->n; - for (i = 0; i < map->n; ++i) { - tabs[i] = isl_tab_from_basic_map(map->p[i]); - if (!tabs[i]) - goto error; - if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT)) - if (isl_tab_detect_implicit_equalities(tabs[i]) < 0) - goto error; - if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_REDUNDANT)) - if (isl_tab_detect_redundant(tabs[i]) < 0) - goto error; - } - for (i = map->n - 1; i >= 0; --i) - if (tabs[i]->empty) - drop(map, i, tabs); - - map = coalesce(map, tabs); - - if (map) - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_update_from_tab(map->p[i], - tabs[i]); - map->p[i] = isl_basic_map_finalize(map->p[i]); - if (!map->p[i]) - goto error; - ISL_F_SET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(map->p[i], ISL_BASIC_MAP_NO_REDUNDANT); - } - - for (i = 0; i < n; ++i) - isl_tab_free(tabs[i]); - - free(tabs); - - return map; -error: - if (tabs) - for (i = 0; i < n; ++i) - isl_tab_free(tabs[i]); - free(tabs); - isl_map_free(map); - return NULL; -} - -/* For each pair of basic sets in the set, check if the union of the two - * can be represented by a single basic set. - * If so, replace the pair by the single basic set and start over. - */ -struct isl_set *isl_set_coalesce(struct isl_set *set) -{ - return (struct isl_set *)isl_map_coalesce((struct isl_map *)set); -} diff --git a/cloog-0.16.3/isl/isl_config.h.in b/cloog-0.16.3/isl/isl_config.h.in deleted file mode 100644 index b63f6265fa729d8d6fdf10f6b065f8d1b378625f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_config.h.in +++ /dev/null @@ -1,100 +0,0 @@ -/* isl_config.h.in. Generated from configure.ac by autoheader. */ - -/* most gcc compilers know a function __attribute__((__warn_unused_result__)) - */ -#undef GCC_WARN_UNUSED_RESULT - -/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */ -#undef HAVE_DECL_FFS - -/* Define to 1 if you have the declaration of `mp_get_memory_functions', and - to 0 if you don't. */ -#undef HAVE_DECL_MP_GET_MEMORY_FUNCTIONS - -/* Define to 1 if you have the declaration of `__builtin_ffs', and to 0 if you - don't. */ -#undef HAVE_DECL___BUILTIN_FFS - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* piplib is available */ -#undef ISL_PIPLIB - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - -/* The size of `void*', as computed by sizeof. */ -#undef SIZEOF_VOIDP - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -#include diff --git a/cloog-0.16.3/isl/isl_config_post.h b/cloog-0.16.3/isl/isl_config_post.h deleted file mode 100644 index a9c23f472c2a413236457f6e3d43b721a69be61c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_config_post.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef HAVE___ATTRIBUTE__ -#define __attribute__(x) -#endif - -#if (HAVE_DECL_FFS==0) && (HAVE_DECL___BUILTIN_FFS==1) -# define ffs __builtin_ffs -#endif diff --git a/cloog-0.16.3/isl/isl_constraint.c b/cloog-0.16.3/isl/isl_constraint.c deleted file mode 100644 index 7c4b77828d045020ad12e146f717c97a326abc0a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_constraint.c +++ /dev/null @@ -1,1181 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c) -{ - return c ? c->ctx : NULL; -} - -static unsigned n(struct isl_constraint *c, enum isl_dim_type type) -{ - return isl_basic_map_dim(c->bmap, type); -} - -static unsigned offset(struct isl_constraint *c, enum isl_dim_type type) -{ - struct isl_dim *dim = c->bmap->dim; - switch (type) { - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -static unsigned basic_map_offset(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type) -{ - return type == isl_dim_div ? 1 + isl_dim_total(bmap->dim) - : 1 + isl_dim_offset(bmap->dim, type); -} - -static unsigned basic_set_offset(struct isl_basic_set *bset, - enum isl_dim_type type) -{ - struct isl_dim *dim = bset->dim; - switch (type) { - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -struct isl_constraint *isl_basic_map_constraint(struct isl_basic_map *bmap, - isl_int **line) -{ - struct isl_constraint *constraint; - - if (!bmap || !line) - goto error; - - constraint = isl_alloc_type(bmap->ctx, struct isl_constraint); - if (!constraint) - goto error; - - constraint->ctx = bmap->ctx; - isl_ctx_ref(constraint->ctx); - constraint->ref = 1; - constraint->bmap = bmap; - constraint->line = line; - - return constraint; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_constraint *isl_basic_set_constraint(struct isl_basic_set *bset, - isl_int **line) -{ - return isl_basic_map_constraint((struct isl_basic_map *)bset, line); -} - -struct isl_constraint *isl_equality_alloc(struct isl_dim *dim) -{ - struct isl_basic_map *bmap; - - if (!dim) - return NULL; - - bmap = isl_basic_map_alloc_dim(dim, 0, 1, 0); - if (!bmap) - return NULL; - - isl_basic_map_alloc_equality(bmap); - isl_seq_clr(bmap->eq[0], 1 + isl_basic_map_total_dim(bmap)); - return isl_basic_map_constraint(bmap, &bmap->eq[0]); -} - -struct isl_constraint *isl_inequality_alloc(struct isl_dim *dim) -{ - struct isl_basic_map *bmap; - - if (!dim) - return NULL; - - bmap = isl_basic_map_alloc_dim(dim, 0, 0, 1); - if (!bmap) - return NULL; - - isl_basic_map_alloc_inequality(bmap); - isl_seq_clr(bmap->ineq[0], 1 + isl_basic_map_total_dim(bmap)); - return isl_basic_map_constraint(bmap, &bmap->ineq[0]); -} - -struct isl_constraint *isl_constraint_dup(struct isl_constraint *c) -{ - struct isl_basic_map *bmap; - int i; - int eq; - - if (!c) - return NULL; - - eq = c->line < c->bmap->eq + c->bmap->n_eq; - i = eq ? c->line - c->bmap->eq : c->line - c->bmap->ineq; - bmap = isl_basic_map_copy(c->bmap); - if (!bmap) - return NULL; - return isl_basic_map_constraint(bmap, eq ? bmap->eq + i : bmap->ineq + i); -} - -struct isl_constraint *isl_constraint_cow(struct isl_constraint *c) -{ - if (!c) - return NULL; - - if (c->ref == 1) - return c; - c->ref--; - return isl_constraint_dup(c); -} - -struct isl_constraint *isl_constraint_copy(struct isl_constraint *constraint) -{ - if (!constraint) - return NULL; - - constraint->ref++; - return constraint; -} - -void isl_constraint_free(struct isl_constraint *c) -{ - if (!c) - return; - - if (--c->ref > 0) - return; - - isl_basic_map_free(c->bmap); - isl_ctx_deref(c->ctx); - free(c); -} - -__isl_give isl_constraint *isl_basic_map_first_constraint( - __isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (bmap->n_eq > 0) - return isl_basic_map_constraint(bmap, &bmap->eq[0]); - - if (bmap->n_ineq > 0) - return isl_basic_map_constraint(bmap, &bmap->ineq[0]); - - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_constraint *isl_basic_set_first_constraint( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_first_constraint((struct isl_basic_map *)bset); -} - -struct isl_constraint *isl_constraint_next(struct isl_constraint *c) -{ - c = isl_constraint_cow(c); - if (c->line >= c->bmap->eq) { - c->line++; - if (c->line < c->bmap->eq + c->bmap->n_eq) - return c; - c->line = c->bmap->ineq; - } else - c->line++; - if (c->line < c->bmap->ineq + c->bmap->n_ineq) - return c; - isl_constraint_free(c); - return NULL; -} - -int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user) -{ - int i; - struct isl_constraint *c; - - if (!bmap) - return -1; - - isl_assert(bmap->ctx, ISL_F_ISSET(bmap, ISL_BASIC_MAP_FINAL), - return -1); - - for (i = 0; i < bmap->n_eq; ++i) { - c = isl_basic_map_constraint(isl_basic_map_copy(bmap), - &bmap->eq[i]); - if (!c) - return -1; - if (fn(c, user) < 0) - return -1; - } - - for (i = 0; i < bmap->n_ineq; ++i) { - c = isl_basic_map_constraint(isl_basic_map_copy(bmap), - &bmap->ineq[i]); - if (!c) - return -1; - if (fn(c, user) < 0) - return -1; - } - - return 0; -} - -int isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user) -{ - return isl_basic_map_foreach_constraint((isl_basic_map *)bset, fn, user); -} - -int isl_constraint_is_equal(struct isl_constraint *constraint1, - struct isl_constraint *constraint2) -{ - if (!constraint1 || !constraint2) - return 0; - return constraint1->bmap == constraint2->bmap && - constraint1->line == constraint2->line; -} - -struct isl_basic_map *isl_basic_map_add_constraint( - struct isl_basic_map *bmap, struct isl_constraint *constraint) -{ - if (!bmap || !constraint) - goto error; - - isl_assert(constraint->ctx, - isl_dim_equal(bmap->dim, constraint->bmap->dim), goto error); - - bmap = isl_basic_map_intersect(bmap, - isl_basic_map_from_constraint(constraint)); - return bmap; -error: - isl_basic_map_free(bmap); - isl_constraint_free(constraint); - return NULL; -} - -struct isl_basic_set *isl_basic_set_add_constraint( - struct isl_basic_set *bset, struct isl_constraint *constraint) -{ - return (struct isl_basic_set *) - isl_basic_map_add_constraint((struct isl_basic_map *)bset, - constraint); -} - -__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map, - __isl_take isl_constraint *constraint) -{ - isl_basic_map *bmap; - - bmap = isl_basic_map_from_constraint(constraint); - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; -} - -__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set, - __isl_take isl_constraint *constraint) -{ - return isl_map_add_constraint(set, constraint); -} - -struct isl_constraint *isl_constraint_add_div(struct isl_constraint *constraint, - struct isl_div *div, int *pos) -{ - if (!constraint || !div) - goto error; - - isl_assert(constraint->ctx, - isl_dim_equal(div->bmap->dim, constraint->bmap->dim), goto error); - isl_assert(constraint->ctx, - constraint->bmap->n_eq + constraint->bmap->n_ineq == 1, goto error); - - constraint->bmap = isl_basic_map_cow(constraint->bmap); - constraint->bmap = isl_basic_map_extend_dim(constraint->bmap, - isl_dim_copy(constraint->bmap->dim), 1, 0, 0); - if (!constraint->bmap) - goto error; - constraint->line = &constraint->bmap->ineq[0]; - *pos = isl_basic_map_alloc_div(constraint->bmap); - if (*pos < 0) - goto error; - isl_seq_cpy(constraint->bmap->div[*pos], div->line[0], - 1 + 1 + isl_basic_map_total_dim(constraint->bmap)); - isl_div_free(div); - return constraint; -error: - isl_constraint_free(constraint); - isl_div_free(div); - return NULL; -} - -__isl_give isl_dim *isl_constraint_get_dim( - __isl_keep isl_constraint *constraint) -{ - return constraint ? isl_basic_map_get_dim(constraint->bmap) : NULL; -} - -int isl_constraint_dim(struct isl_constraint *constraint, - enum isl_dim_type type) -{ - if (!constraint) - return -1; - return n(constraint, type); -} - -int isl_constraint_involves_dims(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned first, unsigned n) -{ - if (!constraint) - return -1; - - if (first + n > isl_basic_set_dim(constraint->bmap, type)) - isl_die(constraint->ctx, isl_error_invalid, - "index out of bounds", return -1); - - first += isl_basic_map_offset(constraint->bmap, type); - - if (isl_seq_first_non_zero(constraint->line[0] + first, n) >= 0) - return 1; - - return 0; -} - -const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned pos) -{ - return constraint ? - isl_basic_map_get_dim_name(constraint->bmap, type, pos) : NULL; -} - -void isl_constraint_get_constant(struct isl_constraint *constraint, isl_int *v) -{ - if (!constraint) - return; - isl_int_set(*v, constraint->line[0][0]); -} - -void isl_constraint_get_coefficient(struct isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!constraint) - return; - - isl_assert(constraint->ctx, pos < n(constraint, type), return); - isl_int_set(*v, constraint->line[0][offset(constraint, type) + pos]); -} - -struct isl_div *isl_constraint_div(struct isl_constraint *constraint, int pos) -{ - if (!constraint) - return NULL; - - isl_assert(constraint->ctx, pos < n(constraint, isl_dim_div), - return NULL); - isl_assert(constraint->ctx, - !isl_int_is_zero(constraint->bmap->div[pos][0]), return NULL); - return isl_basic_map_div(isl_basic_map_copy(constraint->bmap), pos); -} - -void isl_constraint_set_constant(struct isl_constraint *constraint, isl_int v) -{ - if (!constraint) - return; - isl_int_set(constraint->line[0][0], v); -} - -void isl_constraint_set_constant_si(__isl_keep isl_constraint *constraint, - int v) -{ - if (!constraint) - return; - isl_int_set_si(constraint->line[0][0], v); -} - -void isl_constraint_set_coefficient(struct isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!constraint) - return; - - isl_assert(constraint->ctx, pos < n(constraint, type), return); - isl_int_set(constraint->line[0][offset(constraint, type) + pos], v); -} - -void isl_constraint_set_coefficient_si(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, int v) -{ - if (!constraint) - return; - - isl_assert(constraint->ctx, pos < n(constraint, type), return); - isl_int_set_si(constraint->line[0][offset(constraint, type) + pos], v); -} - -void isl_constraint_clear(struct isl_constraint *constraint) -{ - unsigned total; - - if (!constraint) - return; - total = isl_basic_map_total_dim(constraint->bmap); - isl_seq_clr(constraint->line[0], 1 + total); -} - -/* Check whether the two basic maps have identical divs in the same order. - */ -static int equal_divs(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2) -{ - int i; - unsigned total; - - if (!isl_basic_map_divs_known(bmap1)) - return 0; - if (!isl_basic_map_divs_known(bmap2)) - return 0; - if (bmap1->n_div != bmap2->n_div) - return 0; - - total = isl_basic_map_total_dim(bmap1); - for (i = 0; i < bmap1->n_div; ++i) - if (!isl_seq_eq(bmap1->div[i], bmap2->div[i], 2 + total)) - return 0; - - return 1; -} - -/* Drop any constraint from "bset" that is identical to "constraint". - * In particular, this means that the local spaces of "bset" and - * "constraint" need to be the same. - * - * Since the given constraint may actually be a pointer into the bset, - * we have to be careful not to reorder the constraints as the user - * may be holding on to other constraints from the same bset. - * This should be cleaned up when the internal representation of - * isl_constraint is changed to use isl_aff. - */ -__isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint) -{ - int i; - unsigned n; - isl_int **row; - unsigned total; - - if (!bset || !constraint) - goto error; - - if (!isl_dim_equal(bset->dim, constraint->bmap->dim)) - isl_die(bset->ctx, isl_error_invalid, - "spaces don't match", goto error); - - if (bset != constraint->bmap && !equal_divs(bset, constraint->bmap)) { - isl_constraint_free(constraint); - return bset; - } - - if (isl_constraint_is_equality(constraint)) { - n = bset->n_eq; - row = bset->eq; - } else { - n = bset->n_ineq; - row = bset->ineq; - } - - total = isl_basic_map_total_dim(constraint->bmap); - for (i = 0; i < n; ++i) - if (isl_seq_eq(row[i], constraint->line[0], 1 + total)) - isl_seq_clr(row[i], 1 + total); - - isl_constraint_free(constraint); - return bset; -error: - isl_constraint_free(constraint); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_constraint *isl_constraint_negate(struct isl_constraint *constraint) -{ - unsigned total; - - if (!constraint) - return NULL; - - isl_assert(constraint->ctx, !isl_constraint_is_equality(constraint), - goto error); - isl_assert(constraint->ctx, constraint->bmap->ref == 1, goto error); - total = isl_basic_map_total_dim(constraint->bmap); - isl_seq_neg(constraint->line[0], constraint->line[0], 1 + total); - isl_int_sub_ui(constraint->line[0][0], constraint->line[0][0], 1); - ISL_F_CLR(constraint->bmap, ISL_BASIC_MAP_NORMALIZED); - return constraint; -error: - isl_constraint_free(constraint); - return NULL; -} - -int isl_constraint_is_equality(struct isl_constraint *constraint) -{ - if (!constraint) - return -1; - return constraint->line >= constraint->bmap->eq; -} - -int isl_constraint_is_div_constraint(__isl_keep isl_constraint *constraint) -{ - int i; - - if (!constraint) - return -1; - if (isl_constraint_is_equality(constraint)) - return 0; - for (i = 0; i < constraint->bmap->n_div; ++i) { - if (isl_int_is_zero(constraint->bmap->div[i][0])) - continue; - if (isl_basic_map_is_div_constraint(constraint->bmap, - constraint->line[0], i)) - return 1; - } - - return 0; -} - -/* We manually set ISL_BASIC_SET_FINAL instead of calling - * isl_basic_map_finalize because we want to keep the position - * of the divs and we therefore do not want to throw away redundant divs. - * This is arguably a bit fragile. - */ -__isl_give isl_basic_map *isl_basic_map_from_constraint( - __isl_take isl_constraint *constraint) -{ - int k; - struct isl_basic_map *bmap; - isl_int *c; - unsigned total; - - if (!constraint) - return NULL; - - if (constraint->bmap->n_eq == 1 && constraint->bmap->n_ineq == 0) { - bmap = isl_basic_map_copy(constraint->bmap); - isl_constraint_free(constraint); - return bmap; - } - - bmap = isl_basic_map_universe_like(constraint->bmap); - bmap = isl_basic_map_align_divs(bmap, constraint->bmap); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 1, 1); - if (isl_constraint_is_equality(constraint)) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - c = bmap->eq[k]; - } - else { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - c = bmap->ineq[k]; - } - total = isl_basic_map_total_dim(bmap); - isl_seq_cpy(c, constraint->line[0], 1 + total); - isl_constraint_free(constraint); - if (bmap) - ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); - return bmap; -error: - isl_constraint_free(constraint); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_from_constraint( - struct isl_constraint *constraint) -{ - if (!constraint) - return NULL; - - isl_assert(constraint->ctx,n(constraint, isl_dim_in) == 0, goto error); - return (isl_basic_set *)isl_basic_map_from_constraint(constraint); -error: - isl_constraint_free(constraint); - return NULL; -} - -int isl_basic_map_has_defining_equality( - __isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos, - __isl_give isl_constraint **c) -{ - int i; - unsigned offset; - unsigned total; - - if (!bmap) - return -1; - offset = basic_map_offset(bmap, type); - total = isl_basic_map_total_dim(bmap); - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), return -1); - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][offset + pos]) && - isl_seq_first_non_zero(bmap->eq[i]+offset+pos+1, - 1+total-offset-pos-1) == -1) { - *c = isl_basic_map_constraint(isl_basic_map_copy(bmap), - &bmap->eq[i]); - return 1; - } - return 0; -} - -int isl_basic_set_has_defining_equality( - __isl_keep isl_basic_set *bset, enum isl_dim_type type, int pos, - __isl_give isl_constraint **c) -{ - return isl_basic_map_has_defining_equality((isl_basic_map *)bset, - type, pos, c); -} - -int isl_basic_set_has_defining_inequalities( - struct isl_basic_set *bset, enum isl_dim_type type, int pos, - struct isl_constraint **lower, - struct isl_constraint **upper) -{ - int i, j; - unsigned offset; - unsigned total; - isl_int m; - isl_int **lower_line, **upper_line; - - if (!bset) - return -1; - offset = basic_set_offset(bset, type); - total = isl_basic_set_total_dim(bset); - isl_assert(bset->ctx, pos < isl_basic_set_dim(bset, type), return -1); - isl_int_init(m); - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][offset + pos])) - continue; - if (isl_int_is_one(bset->ineq[i][offset + pos])) - continue; - if (isl_int_is_negone(bset->ineq[i][offset + pos])) - continue; - if (isl_seq_first_non_zero(bset->ineq[i]+offset+pos+1, - 1+total-offset-pos-1) != -1) - continue; - for (j = i + 1; j < bset->n_ineq; ++j) { - if (!isl_seq_is_neg(bset->ineq[i]+1, bset->ineq[j]+1, - total)) - continue; - isl_int_add(m, bset->ineq[i][0], bset->ineq[j][0]); - if (isl_int_abs_ge(m, bset->ineq[i][offset+pos])) - continue; - - if (isl_int_is_pos(bset->ineq[i][offset+pos])) { - lower_line = &bset->ineq[i]; - upper_line = &bset->ineq[j]; - } else { - lower_line = &bset->ineq[j]; - upper_line = &bset->ineq[i]; - } - *lower = isl_basic_set_constraint( - isl_basic_set_copy(bset), lower_line); - *upper = isl_basic_set_constraint( - isl_basic_set_copy(bset), upper_line); - isl_int_clear(m); - return 1; - } - } - *lower = NULL; - *upper = NULL; - isl_int_clear(m); - return 0; -} - -/* Given two constraints "a" and "b" on the variable at position "abs_pos" - * (in "a" and "b"), add a constraint to "bset" that ensures that the - * bound implied by "a" is (strictly) larger than the bound implied by "b". - * - * If both constraints imply lower bounds, then this means that "a" is - * active in the result. - * If both constraints imply upper bounds, then this means that "b" is - * active in the result. - */ -static __isl_give isl_basic_set *add_larger_bound_constraint( - __isl_take isl_basic_set *bset, isl_int *a, isl_int *b, - unsigned abs_pos, int strict) -{ - int k; - isl_int t; - unsigned total; - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - - total = isl_basic_set_dim(bset, isl_dim_all); - - isl_int_init(t); - isl_int_neg(t, b[1 + abs_pos]); - - isl_seq_combine(bset->ineq[k], t, a, a[1 + abs_pos], b, 1 + abs_pos); - isl_seq_combine(bset->ineq[k] + 1 + abs_pos, - t, a + 1 + abs_pos + 1, a[1 + abs_pos], b + 1 + abs_pos + 1, - total - abs_pos); - - if (strict) - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - - isl_int_clear(t); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Add constraints to "context" that ensure that "u" is the smallest - * (and therefore active) upper bound on "abs_pos" in "bset" and return - * the resulting basic set. - */ -static __isl_give isl_basic_set *set_smallest_upper_bound( - __isl_keep isl_basic_set *context, - __isl_keep isl_basic_set *bset, unsigned abs_pos, int n_upper, int u) -{ - int j; - - context = isl_basic_set_copy(context); - context = isl_basic_set_cow(context); - - context = isl_basic_set_extend_constraints(context, 0, n_upper - 1); - - for (j = 0; j < bset->n_ineq; ++j) { - if (j == u) - continue; - if (!isl_int_is_neg(bset->ineq[j][1 + abs_pos])) - continue; - context = add_larger_bound_constraint(context, - bset->ineq[j], bset->ineq[u], abs_pos, j > u); - } - - context = isl_basic_set_simplify(context); - context = isl_basic_set_finalize(context); - - return context; -} - -/* Add constraints to "context" that ensure that "u" is the largest - * (and therefore active) upper bound on "abs_pos" in "bset" and return - * the resulting basic set. - */ -static __isl_give isl_basic_set *set_largest_lower_bound( - __isl_keep isl_basic_set *context, - __isl_keep isl_basic_set *bset, unsigned abs_pos, int n_lower, int l) -{ - int j; - - context = isl_basic_set_copy(context); - context = isl_basic_set_cow(context); - - context = isl_basic_set_extend_constraints(context, 0, n_lower - 1); - - for (j = 0; j < bset->n_ineq; ++j) { - if (j == l) - continue; - if (!isl_int_is_pos(bset->ineq[j][1 + abs_pos])) - continue; - context = add_larger_bound_constraint(context, - bset->ineq[l], bset->ineq[j], abs_pos, j > l); - } - - context = isl_basic_set_simplify(context); - context = isl_basic_set_finalize(context); - - return context; -} - -static int foreach_upper_bound(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned abs_pos, - __isl_take isl_basic_set *context, int n_upper, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - isl_basic_set *context_i; - isl_constraint *upper = NULL; - int i; - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][1 + abs_pos])) - continue; - - context_i = set_smallest_upper_bound(context, bset, - abs_pos, n_upper, i); - if (isl_basic_set_is_empty(context_i)) { - isl_basic_set_free(context_i); - continue; - } - upper = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[i]); - if (!upper || !context_i) - goto error; - if (fn(NULL, upper, context_i, user) < 0) - break; - } - - isl_basic_set_free(context); - - if (i < bset->n_ineq) - return -1; - - return 0; -error: - isl_constraint_free(upper); - isl_basic_set_free(context_i); - isl_basic_set_free(context); - return -1; -} - -static int foreach_lower_bound(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned abs_pos, - __isl_take isl_basic_set *context, int n_lower, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - isl_basic_set *context_i; - isl_constraint *lower = NULL; - int i; - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][1 + abs_pos])) - continue; - - context_i = set_largest_lower_bound(context, bset, - abs_pos, n_lower, i); - if (isl_basic_set_is_empty(context_i)) { - isl_basic_set_free(context_i); - continue; - } - lower = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[i]); - if (!lower || !context_i) - goto error; - if (fn(lower, NULL, context_i, user) < 0) - break; - } - - isl_basic_set_free(context); - - if (i < bset->n_ineq) - return -1; - - return 0; -error: - isl_constraint_free(lower); - isl_basic_set_free(context_i); - isl_basic_set_free(context); - return -1; -} - -static int foreach_bound_pair(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned abs_pos, - __isl_take isl_basic_set *context, int n_lower, int n_upper, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - isl_basic_set *context_i, *context_j; - isl_constraint *lower = NULL; - isl_constraint *upper = NULL; - int i, j; - - for (i = 0; i < bset->n_ineq; ++i) { - if (!isl_int_is_pos(bset->ineq[i][1 + abs_pos])) - continue; - - context_i = set_largest_lower_bound(context, bset, - abs_pos, n_lower, i); - if (isl_basic_set_is_empty(context_i)) { - isl_basic_set_free(context_i); - continue; - } - - for (j = 0; j < bset->n_ineq; ++j) { - if (!isl_int_is_neg(bset->ineq[j][1 + abs_pos])) - continue; - - context_j = set_smallest_upper_bound(context_i, bset, - abs_pos, n_upper, j); - context_j = isl_basic_set_extend_constraints(context_j, - 0, 1); - context_j = add_larger_bound_constraint(context_j, - bset->ineq[i], bset->ineq[j], abs_pos, 0); - context_j = isl_basic_set_simplify(context_j); - context_j = isl_basic_set_finalize(context_j); - if (isl_basic_set_is_empty(context_j)) { - isl_basic_set_free(context_j); - continue; - } - lower = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[i]); - upper = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[j]); - if (!lower || !upper || !context_j) - goto error; - if (fn(lower, upper, context_j, user) < 0) - break; - } - - isl_basic_set_free(context_i); - - if (j < bset->n_ineq) - break; - } - - isl_basic_set_free(context); - - if (i < bset->n_ineq) - return -1; - - return 0; -error: - isl_constraint_free(lower); - isl_constraint_free(upper); - isl_basic_set_free(context_i); - isl_basic_set_free(context_j); - isl_basic_set_free(context); - return -1; -} - -/* For each pair of lower and upper bounds on the variable "pos" - * of type "type", call "fn" with these lower and upper bounds and the - * set of constraints on the remaining variables where these bounds - * are active, i.e., (stricly) larger/smaller than the other lower/upper bounds. - * - * If the designated variable is equal to an affine combination of the - * other variables then fn is called with both lower and upper - * set to the corresponding equality. - * - * If there is no lower (or upper) bound, then NULL is passed - * as the corresponding bound. - * - * We first check if the variable is involved in any equality. - * If not, we count the number of lower and upper bounds and - * act accordingly. - */ -int isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - int i; - isl_constraint *lower = NULL; - isl_constraint *upper = NULL; - isl_basic_set *context = NULL; - unsigned abs_pos; - int n_lower, n_upper; - - if (!bset) - return -1; - isl_assert(bset->ctx, pos < isl_basic_set_dim(bset, type), return -1); - isl_assert(bset->ctx, type == isl_dim_param || type == isl_dim_set, - return -1); - - abs_pos = pos; - if (type == isl_dim_set) - abs_pos += isl_basic_set_dim(bset, isl_dim_param); - - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][1 + abs_pos])) - continue; - - lower = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->eq[i]); - upper = isl_constraint_copy(lower); - context = isl_basic_set_remove_dims(isl_basic_set_copy(bset), - type, pos, 1); - if (!lower || !upper || !context) - goto error; - return fn(lower, upper, context, user); - } - - n_lower = 0; - n_upper = 0; - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_pos(bset->ineq[i][1 + abs_pos])) - n_lower++; - else if (isl_int_is_neg(bset->ineq[i][1 + abs_pos])) - n_upper++; - } - - context = isl_basic_set_copy(bset); - context = isl_basic_set_cow(context); - if (!context) - goto error; - for (i = context->n_ineq - 1; i >= 0; --i) - if (!isl_int_is_zero(context->ineq[i][1 + abs_pos])) - isl_basic_set_drop_inequality(context, i); - - context = isl_basic_set_drop(context, type, pos, 1); - if (!n_lower && !n_upper) - return fn(NULL, NULL, context, user); - if (!n_lower) - return foreach_upper_bound(bset, type, abs_pos, context, n_upper, - fn, user); - if (!n_upper) - return foreach_lower_bound(bset, type, abs_pos, context, n_lower, - fn, user); - return foreach_bound_pair(bset, type, abs_pos, context, n_lower, n_upper, - fn, user); -error: - isl_constraint_free(lower); - isl_constraint_free(upper); - isl_basic_set_free(context); - return -1; -} - -__isl_give isl_aff *isl_constraint_get_bound( - __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos) -{ - isl_aff *aff; - isl_local_space *ls; - - if (!constraint) - return NULL; - if (pos >= isl_basic_set_dim(constraint->bmap, type)) - isl_die(constraint->ctx, isl_error_invalid, - "index out of bounds", return NULL); - if (!isl_basic_map_may_be_set(constraint->bmap)) - isl_die(constraint->ctx, isl_error_invalid, - "not a set constraint", return NULL); - - pos += offset(constraint, type); - if (isl_int_is_zero(constraint->line[0][pos])) - isl_die(constraint->ctx, isl_error_invalid, - "constraint does not define a bound on given dimension", - return NULL); - - ls = isl_basic_set_get_local_space(constraint->bmap); - aff = isl_aff_alloc(ls); - if (!aff) - return NULL; - - if (isl_int_is_neg(constraint->line[0][pos])) - isl_seq_cpy(aff->v->el + 1, constraint->line[0], - aff->v->size - 1); - else - isl_seq_neg(aff->v->el + 1, constraint->line[0], - aff->v->size - 1); - isl_int_set_si(aff->v->el[1 + pos], 0); - isl_int_abs(aff->v->el[0], constraint->line[0][pos]); - - return aff; -} - -/* For an inequality constraint - * - * f >= 0 - * - * or an equality constraint - * - * f = 0 - * - * return the affine expression f. - */ -__isl_give isl_aff *isl_constraint_get_aff( - __isl_keep isl_constraint *constraint) -{ - isl_aff *aff; - isl_local_space *ls; - - if (!constraint) - return NULL; - - ls = isl_basic_set_get_local_space(constraint->bmap); - aff = isl_aff_alloc(ls); - if (!aff) - return NULL; - - isl_seq_cpy(aff->v->el + 1, constraint->line[0], aff->v->size - 1); - isl_int_set_si(aff->v->el[0], 1); - - return aff; -} - -/* Construct an equality constraint equating the given affine expression - * to zero. - */ -__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff) -{ - int k; - isl_basic_set *bset; - - if (!aff) - return NULL; - - bset = isl_basic_set_from_local_space(isl_aff_get_local_space(aff)); - bset = isl_basic_set_extend_constraints(bset, 1, 0); - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - - isl_seq_cpy(bset->eq[k], aff->v->el + 1, aff->v->size - 1); - isl_aff_free(aff); - - return isl_basic_set_constraint(bset, &bset->eq[k]); -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - return NULL; -} - -/* Construct an inequality constraint enforcing the given affine expression - * to be non-negative. - */ -__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff) -{ - int k; - isl_basic_set *bset; - - if (!aff) - return NULL; - - bset = isl_basic_set_from_local_space(isl_aff_get_local_space(aff)); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - - isl_seq_cpy(bset->ineq[k], aff->v->el + 1, aff->v->size - 1); - isl_aff_free(aff); - - return isl_basic_set_constraint(bset, &bset->ineq[k]); -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_constraint_private.h b/cloog-0.16.3/isl/isl_constraint_private.h deleted file mode 100644 index 8fab9d403d2cea883468b20fe3a6579d4ffd8cf1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_constraint_private.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef ISL_CONSTRAINT_PRIVATE_H -#define ISL_CONSTRAINT_PRIVATE_H - -#include - -struct isl_constraint { - int ref; - struct isl_ctx *ctx; - - struct isl_basic_map *bmap; - isl_int **line; -}; - -struct isl_constraint *isl_basic_set_constraint(struct isl_basic_set *bset, - isl_int **line); - -#endif diff --git a/cloog-0.16.3/isl/isl_convex_hull.c b/cloog-0.16.3/isl/isl_convex_hull.c deleted file mode 100644 index 266d9a76e016a2bc71ab70d587cfd8caadb24ba0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_convex_hull.c +++ /dev/null @@ -1,2426 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include -#include "isl_equalities.h" -#include "isl_tab.h" - -static struct isl_basic_set *uset_convex_hull_wrap_bounded(struct isl_set *set); - -/* Return 1 if constraint c is redundant with respect to the constraints - * in bmap. If c is a lower [upper] bound in some variable and bmap - * does not have a lower [upper] bound in that variable, then c cannot - * be redundant and we do not need solve any lp. - */ -int isl_basic_map_constraint_is_redundant(struct isl_basic_map **bmap, - isl_int *c, isl_int *opt_n, isl_int *opt_d) -{ - enum isl_lp_result res; - unsigned total; - int i, j; - - if (!bmap) - return -1; - - total = isl_basic_map_total_dim(*bmap); - for (i = 0; i < total; ++i) { - int sign; - if (isl_int_is_zero(c[1+i])) - continue; - sign = isl_int_sgn(c[1+i]); - for (j = 0; j < (*bmap)->n_ineq; ++j) - if (sign == isl_int_sgn((*bmap)->ineq[j][1+i])) - break; - if (j == (*bmap)->n_ineq) - break; - } - if (i < total) - return 0; - - res = isl_basic_map_solve_lp(*bmap, 0, c, (*bmap)->ctx->one, - opt_n, opt_d, NULL); - if (res == isl_lp_unbounded) - return 0; - if (res == isl_lp_error) - return -1; - if (res == isl_lp_empty) { - *bmap = isl_basic_map_set_to_empty(*bmap); - return 0; - } - return !isl_int_is_neg(*opt_n); -} - -int isl_basic_set_constraint_is_redundant(struct isl_basic_set **bset, - isl_int *c, isl_int *opt_n, isl_int *opt_d) -{ - return isl_basic_map_constraint_is_redundant( - (struct isl_basic_map **)bset, c, opt_n, opt_d); -} - -/* Remove redundant - * constraints. If the minimal value along the normal of a constraint - * is the same if the constraint is removed, then the constraint is redundant. - * - * Alternatively, we could have intersected the basic map with the - * corresponding equality and the checked if the dimension was that - * of a facet. - */ -__isl_give isl_basic_map *isl_basic_map_remove_redundancies( - __isl_take isl_basic_map *bmap) -{ - struct isl_tab *tab; - - if (!bmap) - return NULL; - - bmap = isl_basic_map_gauss(bmap, NULL); - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NO_REDUNDANT)) - return bmap; - if (bmap->n_ineq <= 1) - return bmap; - - tab = isl_tab_from_basic_map(bmap); - if (isl_tab_detect_implicit_equalities(tab) < 0) - goto error; - if (isl_tab_detect_redundant(tab) < 0) - goto error; - bmap = isl_basic_map_update_from_tab(bmap, tab); - isl_tab_free(tab); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - return bmap; -error: - isl_tab_free(tab); - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_remove_redundancies( - __isl_take isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_remove_redundancies((struct isl_basic_map *)bset); -} - -/* Remove redundant constraints in each of the basic maps. - */ -__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map) -{ - return isl_map_inline_foreach_basic_map(map, - &isl_basic_map_remove_redundancies); -} - -__isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set) -{ - return isl_map_remove_redundancies(set); -} - -/* Check if the set set is bound in the direction of the affine - * constraint c and if so, set the constant term such that the - * resulting constraint is a bounding constraint for the set. - */ -static int uset_is_bound(struct isl_set *set, isl_int *c, unsigned len) -{ - int first; - int j; - isl_int opt; - isl_int opt_denom; - - isl_int_init(opt); - isl_int_init(opt_denom); - first = 1; - for (j = 0; j < set->n; ++j) { - enum isl_lp_result res; - - if (ISL_F_ISSET(set->p[j], ISL_BASIC_SET_EMPTY)) - continue; - - res = isl_basic_set_solve_lp(set->p[j], - 0, c, set->ctx->one, &opt, &opt_denom, NULL); - if (res == isl_lp_unbounded) - break; - if (res == isl_lp_error) - goto error; - if (res == isl_lp_empty) { - set->p[j] = isl_basic_set_set_to_empty(set->p[j]); - if (!set->p[j]) - goto error; - continue; - } - if (first || isl_int_is_neg(opt)) { - if (!isl_int_is_one(opt_denom)) - isl_seq_scale(c, c, opt_denom, len); - isl_int_sub(c[0], c[0], opt); - } - first = 0; - } - isl_int_clear(opt); - isl_int_clear(opt_denom); - return j >= set->n; -error: - isl_int_clear(opt); - isl_int_clear(opt_denom); - return -1; -} - -__isl_give isl_basic_map *isl_basic_map_set_rational( - __isl_take isl_basic_set *bmap) -{ - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - ISL_F_SET(bmap, ISL_BASIC_MAP_RATIONAL); - - return isl_basic_map_finalize(bmap); -} - -__isl_give isl_basic_set *isl_basic_set_set_rational( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_set_rational(bset); -} - -static struct isl_set *isl_set_set_rational(struct isl_set *set) -{ - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_set_rational(set->p[i]); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -static struct isl_basic_set *isl_basic_set_add_equality( - struct isl_basic_set *bset, isl_int *c) -{ - int i; - unsigned dim; - - if (!bset) - return NULL; - - if (ISL_F_ISSET(bset, ISL_BASIC_SET_EMPTY)) - return bset; - - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(bset->ctx, bset->n_div == 0, goto error); - dim = isl_basic_set_n_dim(bset); - bset = isl_basic_set_cow(bset); - bset = isl_basic_set_extend(bset, 0, dim, 0, 1, 0); - i = isl_basic_set_alloc_equality(bset); - if (i < 0) - goto error; - isl_seq_cpy(bset->eq[i], c, 1 + dim); - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_set *isl_set_add_basic_set_equality(struct isl_set *set, isl_int *c) -{ - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_add_equality(set->p[i], c); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -/* Given a union of basic sets, construct the constraints for wrapping - * a facet around one of its ridges. - * In particular, if each of n the d-dimensional basic sets i in "set" - * contains the origin, satisfies the constraints x_1 >= 0 and x_2 >= 0 - * and is defined by the constraints - * [ 1 ] - * A_i [ x ] >= 0 - * - * then the resulting set is of dimension n*(1+d) and has as constraints - * - * [ a_i ] - * A_i [ x_i ] >= 0 - * - * a_i >= 0 - * - * \sum_i x_{i,1} = 1 - */ -static struct isl_basic_set *wrap_constraints(struct isl_set *set) -{ - struct isl_basic_set *lp; - unsigned n_eq; - unsigned n_ineq; - int i, j, k; - unsigned dim, lp_dim; - - if (!set) - return NULL; - - dim = 1 + isl_set_n_dim(set); - n_eq = 1; - n_ineq = set->n; - for (i = 0; i < set->n; ++i) { - n_eq += set->p[i]->n_eq; - n_ineq += set->p[i]->n_ineq; - } - lp = isl_basic_set_alloc(set->ctx, 0, dim * set->n, 0, n_eq, n_ineq); - lp = isl_basic_set_set_rational(lp); - if (!lp) - return NULL; - lp_dim = isl_basic_set_n_dim(lp); - k = isl_basic_set_alloc_equality(lp); - isl_int_set_si(lp->eq[k][0], -1); - for (i = 0; i < set->n; ++i) { - isl_int_set_si(lp->eq[k][1+dim*i], 0); - isl_int_set_si(lp->eq[k][1+dim*i+1], 1); - isl_seq_clr(lp->eq[k]+1+dim*i+2, dim-2); - } - for (i = 0; i < set->n; ++i) { - k = isl_basic_set_alloc_inequality(lp); - isl_seq_clr(lp->ineq[k], 1+lp_dim); - isl_int_set_si(lp->ineq[k][1+dim*i], 1); - - for (j = 0; j < set->p[i]->n_eq; ++j) { - k = isl_basic_set_alloc_equality(lp); - isl_seq_clr(lp->eq[k], 1+dim*i); - isl_seq_cpy(lp->eq[k]+1+dim*i, set->p[i]->eq[j], dim); - isl_seq_clr(lp->eq[k]+1+dim*(i+1), dim*(set->n-i-1)); - } - - for (j = 0; j < set->p[i]->n_ineq; ++j) { - k = isl_basic_set_alloc_inequality(lp); - isl_seq_clr(lp->ineq[k], 1+dim*i); - isl_seq_cpy(lp->ineq[k]+1+dim*i, set->p[i]->ineq[j], dim); - isl_seq_clr(lp->ineq[k]+1+dim*(i+1), dim*(set->n-i-1)); - } - } - return lp; -} - -/* Given a facet "facet" of the convex hull of "set" and a facet "ridge" - * of that facet, compute the other facet of the convex hull that contains - * the ridge. - * - * We first transform the set such that the facet constraint becomes - * - * x_1 >= 0 - * - * I.e., the facet lies in - * - * x_1 = 0 - * - * and on that facet, the constraint that defines the ridge is - * - * x_2 >= 0 - * - * (This transformation is not strictly needed, all that is needed is - * that the ridge contains the origin.) - * - * Since the ridge contains the origin, the cone of the convex hull - * will be of the form - * - * x_1 >= 0 - * x_2 >= a x_1 - * - * with this second constraint defining the new facet. - * The constant a is obtained by settting x_1 in the cone of the - * convex hull to 1 and minimizing x_2. - * Now, each element in the cone of the convex hull is the sum - * of elements in the cones of the basic sets. - * If a_i is the dilation factor of basic set i, then the problem - * we need to solve is - * - * min \sum_i x_{i,2} - * st - * \sum_i x_{i,1} = 1 - * a_i >= 0 - * [ a_i ] - * A [ x_i ] >= 0 - * - * with - * [ 1 ] - * A_i [ x_i ] >= 0 - * - * the constraints of each (transformed) basic set. - * If a = n/d, then the constraint defining the new facet (in the transformed - * space) is - * - * -n x_1 + d x_2 >= 0 - * - * In the original space, we need to take the same combination of the - * corresponding constraints "facet" and "ridge". - * - * If a = -infty = "-1/0", then we just return the original facet constraint. - * This means that the facet is unbounded, but has a bounded intersection - * with the union of sets. - */ -isl_int *isl_set_wrap_facet(__isl_keep isl_set *set, - isl_int *facet, isl_int *ridge) -{ - int i; - isl_ctx *ctx; - struct isl_mat *T = NULL; - struct isl_basic_set *lp = NULL; - struct isl_vec *obj; - enum isl_lp_result res; - isl_int num, den; - unsigned dim; - - if (!set) - return NULL; - ctx = set->ctx; - set = isl_set_copy(set); - set = isl_set_set_rational(set); - - dim = 1 + isl_set_n_dim(set); - T = isl_mat_alloc(ctx, 3, dim); - if (!T) - goto error; - isl_int_set_si(T->row[0][0], 1); - isl_seq_clr(T->row[0]+1, dim - 1); - isl_seq_cpy(T->row[1], facet, dim); - isl_seq_cpy(T->row[2], ridge, dim); - T = isl_mat_right_inverse(T); - set = isl_set_preimage(set, T); - T = NULL; - if (!set) - goto error; - lp = wrap_constraints(set); - obj = isl_vec_alloc(ctx, 1 + dim*set->n); - if (!obj) - goto error; - isl_int_set_si(obj->block.data[0], 0); - for (i = 0; i < set->n; ++i) { - isl_seq_clr(obj->block.data + 1 + dim*i, 2); - isl_int_set_si(obj->block.data[1 + dim*i+2], 1); - isl_seq_clr(obj->block.data + 1 + dim*i+3, dim-3); - } - isl_int_init(num); - isl_int_init(den); - res = isl_basic_set_solve_lp(lp, 0, - obj->block.data, ctx->one, &num, &den, NULL); - if (res == isl_lp_ok) { - isl_int_neg(num, num); - isl_seq_combine(facet, num, facet, den, ridge, dim); - isl_seq_normalize(ctx, facet, dim); - } - isl_int_clear(num); - isl_int_clear(den); - isl_vec_free(obj); - isl_basic_set_free(lp); - isl_set_free(set); - if (res == isl_lp_error) - return NULL; - isl_assert(ctx, res == isl_lp_ok || res == isl_lp_unbounded, - return NULL); - return facet; -error: - isl_basic_set_free(lp); - isl_mat_free(T); - isl_set_free(set); - return NULL; -} - -/* Compute the constraint of a facet of "set". - * - * We first compute the intersection with a bounding constraint - * that is orthogonal to one of the coordinate axes. - * If the affine hull of this intersection has only one equality, - * we have found a facet. - * Otherwise, we wrap the current bounding constraint around - * one of the equalities of the face (one that is not equal to - * the current bounding constraint). - * This process continues until we have found a facet. - * The dimension of the intersection increases by at least - * one on each iteration, so termination is guaranteed. - */ -static __isl_give isl_mat *initial_facet_constraint(__isl_keep isl_set *set) -{ - struct isl_set *slice = NULL; - struct isl_basic_set *face = NULL; - int i; - unsigned dim = isl_set_n_dim(set); - int is_bound; - isl_mat *bounds; - - isl_assert(set->ctx, set->n > 0, goto error); - bounds = isl_mat_alloc(set->ctx, 1, 1 + dim); - if (!bounds) - return NULL; - - isl_seq_clr(bounds->row[0], dim); - isl_int_set_si(bounds->row[0][1 + dim - 1], 1); - is_bound = uset_is_bound(set, bounds->row[0], 1 + dim); - if (is_bound < 0) - goto error; - isl_assert(set->ctx, is_bound, goto error); - isl_seq_normalize(set->ctx, bounds->row[0], 1 + dim); - bounds->n_row = 1; - - for (;;) { - slice = isl_set_copy(set); - slice = isl_set_add_basic_set_equality(slice, bounds->row[0]); - face = isl_set_affine_hull(slice); - if (!face) - goto error; - if (face->n_eq == 1) { - isl_basic_set_free(face); - break; - } - for (i = 0; i < face->n_eq; ++i) - if (!isl_seq_eq(bounds->row[0], face->eq[i], 1 + dim) && - !isl_seq_is_neg(bounds->row[0], - face->eq[i], 1 + dim)) - break; - isl_assert(set->ctx, i < face->n_eq, goto error); - if (!isl_set_wrap_facet(set, bounds->row[0], face->eq[i])) - goto error; - isl_seq_normalize(set->ctx, bounds->row[0], bounds->n_col); - isl_basic_set_free(face); - } - - return bounds; -error: - isl_basic_set_free(face); - isl_mat_free(bounds); - return NULL; -} - -/* Given the bounding constraint "c" of a facet of the convex hull of "set", - * compute a hyperplane description of the facet, i.e., compute the facets - * of the facet. - * - * We compute an affine transformation that transforms the constraint - * - * [ 1 ] - * c [ x ] = 0 - * - * to the constraint - * - * z_1 = 0 - * - * by computing the right inverse U of a matrix that starts with the rows - * - * [ 1 0 ] - * [ c ] - * - * Then - * [ 1 ] [ 1 ] - * [ x ] = U [ z ] - * and - * [ 1 ] [ 1 ] - * [ z ] = Q [ x ] - * - * with Q = U^{-1} - * Since z_1 is zero, we can drop this variable as well as the corresponding - * column of U to obtain - * - * [ 1 ] [ 1 ] - * [ x ] = U' [ z' ] - * and - * [ 1 ] [ 1 ] - * [ z' ] = Q' [ x ] - * - * with Q' equal to Q, but without the corresponding row. - * After computing the facets of the facet in the z' space, - * we convert them back to the x space through Q. - */ -static struct isl_basic_set *compute_facet(struct isl_set *set, isl_int *c) -{ - struct isl_mat *m, *U, *Q; - struct isl_basic_set *facet = NULL; - struct isl_ctx *ctx; - unsigned dim; - - ctx = set->ctx; - set = isl_set_copy(set); - dim = isl_set_n_dim(set); - m = isl_mat_alloc(set->ctx, 2, 1 + dim); - if (!m) - goto error; - isl_int_set_si(m->row[0][0], 1); - isl_seq_clr(m->row[0]+1, dim); - isl_seq_cpy(m->row[1], c, 1+dim); - U = isl_mat_right_inverse(m); - Q = isl_mat_right_inverse(isl_mat_copy(U)); - U = isl_mat_drop_cols(U, 1, 1); - Q = isl_mat_drop_rows(Q, 1, 1); - set = isl_set_preimage(set, U); - facet = uset_convex_hull_wrap_bounded(set); - facet = isl_basic_set_preimage(facet, Q); - if (facet) - isl_assert(ctx, facet->n_eq == 0, goto error); - return facet; -error: - isl_basic_set_free(facet); - isl_set_free(set); - return NULL; -} - -/* Given an initial facet constraint, compute the remaining facets. - * We do this by running through all facets found so far and computing - * the adjacent facets through wrapping, adding those facets that we - * hadn't already found before. - * - * For each facet we have found so far, we first compute its facets - * in the resulting convex hull. That is, we compute the ridges - * of the resulting convex hull contained in the facet. - * We also compute the corresponding facet in the current approximation - * of the convex hull. There is no need to wrap around the ridges - * in this facet since that would result in a facet that is already - * present in the current approximation. - * - * This function can still be significantly optimized by checking which of - * the facets of the basic sets are also facets of the convex hull and - * using all the facets so far to help in constructing the facets of the - * facets - * and/or - * using the technique in section "3.1 Ridge Generation" of - * "Extended Convex Hull" by Fukuda et al. - */ -static struct isl_basic_set *extend(struct isl_basic_set *hull, - struct isl_set *set) -{ - int i, j, f; - int k; - struct isl_basic_set *facet = NULL; - struct isl_basic_set *hull_facet = NULL; - unsigned dim; - - if (!hull) - return NULL; - - isl_assert(set->ctx, set->n > 0, goto error); - - dim = isl_set_n_dim(set); - - for (i = 0; i < hull->n_ineq; ++i) { - facet = compute_facet(set, hull->ineq[i]); - facet = isl_basic_set_add_equality(facet, hull->ineq[i]); - facet = isl_basic_set_gauss(facet, NULL); - facet = isl_basic_set_normalize_constraints(facet); - hull_facet = isl_basic_set_copy(hull); - hull_facet = isl_basic_set_add_equality(hull_facet, hull->ineq[i]); - hull_facet = isl_basic_set_gauss(hull_facet, NULL); - hull_facet = isl_basic_set_normalize_constraints(hull_facet); - if (!facet || !hull_facet) - goto error; - hull = isl_basic_set_cow(hull); - hull = isl_basic_set_extend_dim(hull, - isl_dim_copy(hull->dim), 0, 0, facet->n_ineq); - if (!hull) - goto error; - for (j = 0; j < facet->n_ineq; ++j) { - for (f = 0; f < hull_facet->n_ineq; ++f) - if (isl_seq_eq(facet->ineq[j], - hull_facet->ineq[f], 1 + dim)) - break; - if (f < hull_facet->n_ineq) - continue; - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - isl_seq_cpy(hull->ineq[k], hull->ineq[i], 1+dim); - if (!isl_set_wrap_facet(set, hull->ineq[k], facet->ineq[j])) - goto error; - } - isl_basic_set_free(hull_facet); - isl_basic_set_free(facet); - } - hull = isl_basic_set_simplify(hull); - hull = isl_basic_set_finalize(hull); - return hull; -error: - isl_basic_set_free(hull_facet); - isl_basic_set_free(facet); - isl_basic_set_free(hull); - return NULL; -} - -/* Special case for computing the convex hull of a one dimensional set. - * We simply collect the lower and upper bounds of each basic set - * and the biggest of those. - */ -static struct isl_basic_set *convex_hull_1d(struct isl_set *set) -{ - struct isl_mat *c = NULL; - isl_int *lower = NULL; - isl_int *upper = NULL; - int i, j, k; - isl_int a, b; - struct isl_basic_set *hull; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_simplify(set->p[i]); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); - if (!set) - goto error; - isl_assert(set->ctx, set->n > 0, goto error); - c = isl_mat_alloc(set->ctx, 2, 2); - if (!c) - goto error; - - if (set->p[0]->n_eq > 0) { - isl_assert(set->ctx, set->p[0]->n_eq == 1, goto error); - lower = c->row[0]; - upper = c->row[1]; - if (isl_int_is_pos(set->p[0]->eq[0][1])) { - isl_seq_cpy(lower, set->p[0]->eq[0], 2); - isl_seq_neg(upper, set->p[0]->eq[0], 2); - } else { - isl_seq_neg(lower, set->p[0]->eq[0], 2); - isl_seq_cpy(upper, set->p[0]->eq[0], 2); - } - } else { - for (j = 0; j < set->p[0]->n_ineq; ++j) { - if (isl_int_is_pos(set->p[0]->ineq[j][1])) { - lower = c->row[0]; - isl_seq_cpy(lower, set->p[0]->ineq[j], 2); - } else { - upper = c->row[1]; - isl_seq_cpy(upper, set->p[0]->ineq[j], 2); - } - } - } - - isl_int_init(a); - isl_int_init(b); - for (i = 0; i < set->n; ++i) { - struct isl_basic_set *bset = set->p[i]; - int has_lower = 0; - int has_upper = 0; - - for (j = 0; j < bset->n_eq; ++j) { - has_lower = 1; - has_upper = 1; - if (lower) { - isl_int_mul(a, lower[0], bset->eq[j][1]); - isl_int_mul(b, lower[1], bset->eq[j][0]); - if (isl_int_lt(a, b) && isl_int_is_pos(bset->eq[j][1])) - isl_seq_cpy(lower, bset->eq[j], 2); - if (isl_int_gt(a, b) && isl_int_is_neg(bset->eq[j][1])) - isl_seq_neg(lower, bset->eq[j], 2); - } - if (upper) { - isl_int_mul(a, upper[0], bset->eq[j][1]); - isl_int_mul(b, upper[1], bset->eq[j][0]); - if (isl_int_lt(a, b) && isl_int_is_pos(bset->eq[j][1])) - isl_seq_neg(upper, bset->eq[j], 2); - if (isl_int_gt(a, b) && isl_int_is_neg(bset->eq[j][1])) - isl_seq_cpy(upper, bset->eq[j], 2); - } - } - for (j = 0; j < bset->n_ineq; ++j) { - if (isl_int_is_pos(bset->ineq[j][1])) - has_lower = 1; - if (isl_int_is_neg(bset->ineq[j][1])) - has_upper = 1; - if (lower && isl_int_is_pos(bset->ineq[j][1])) { - isl_int_mul(a, lower[0], bset->ineq[j][1]); - isl_int_mul(b, lower[1], bset->ineq[j][0]); - if (isl_int_lt(a, b)) - isl_seq_cpy(lower, bset->ineq[j], 2); - } - if (upper && isl_int_is_neg(bset->ineq[j][1])) { - isl_int_mul(a, upper[0], bset->ineq[j][1]); - isl_int_mul(b, upper[1], bset->ineq[j][0]); - if (isl_int_gt(a, b)) - isl_seq_cpy(upper, bset->ineq[j], 2); - } - } - if (!has_lower) - lower = NULL; - if (!has_upper) - upper = NULL; - } - isl_int_clear(a); - isl_int_clear(b); - - hull = isl_basic_set_alloc(set->ctx, 0, 1, 0, 0, 2); - hull = isl_basic_set_set_rational(hull); - if (!hull) - goto error; - if (lower) { - k = isl_basic_set_alloc_inequality(hull); - isl_seq_cpy(hull->ineq[k], lower, 2); - } - if (upper) { - k = isl_basic_set_alloc_inequality(hull); - isl_seq_cpy(hull->ineq[k], upper, 2); - } - hull = isl_basic_set_finalize(hull); - isl_set_free(set); - isl_mat_free(c); - return hull; -error: - isl_set_free(set); - isl_mat_free(c); - return NULL; -} - -static struct isl_basic_set *convex_hull_0d(struct isl_set *set) -{ - struct isl_basic_set *convex_hull; - - if (!set) - return NULL; - - if (isl_set_is_empty(set)) - convex_hull = isl_basic_set_empty(isl_dim_copy(set->dim)); - else - convex_hull = isl_basic_set_universe(isl_dim_copy(set->dim)); - isl_set_free(set); - return convex_hull; -} - -/* Compute the convex hull of a pair of basic sets without any parameters or - * integer divisions using Fourier-Motzkin elimination. - * The convex hull is the set of all points that can be written as - * the sum of points from both basic sets (in homogeneous coordinates). - * We set up the constraints in a space with dimensions for each of - * the three sets and then project out the dimensions corresponding - * to the two original basic sets, retaining only those corresponding - * to the convex hull. - */ -static struct isl_basic_set *convex_hull_pair_elim(struct isl_basic_set *bset1, - struct isl_basic_set *bset2) -{ - int i, j, k; - struct isl_basic_set *bset[2]; - struct isl_basic_set *hull = NULL; - unsigned dim; - - if (!bset1 || !bset2) - goto error; - - dim = isl_basic_set_n_dim(bset1); - hull = isl_basic_set_alloc(bset1->ctx, 0, 2 + 3 * dim, 0, - 1 + dim + bset1->n_eq + bset2->n_eq, - 2 + bset1->n_ineq + bset2->n_ineq); - bset[0] = bset1; - bset[1] = bset2; - for (i = 0; i < 2; ++i) { - for (j = 0; j < bset[i]->n_eq; ++j) { - k = isl_basic_set_alloc_equality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->eq[k], (i+1) * (1+dim)); - isl_seq_clr(hull->eq[k]+(i+2)*(1+dim), (1-i)*(1+dim)); - isl_seq_cpy(hull->eq[k]+(i+1)*(1+dim), bset[i]->eq[j], - 1+dim); - } - for (j = 0; j < bset[i]->n_ineq; ++j) { - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->ineq[k], (i+1) * (1+dim)); - isl_seq_clr(hull->ineq[k]+(i+2)*(1+dim), (1-i)*(1+dim)); - isl_seq_cpy(hull->ineq[k]+(i+1)*(1+dim), - bset[i]->ineq[j], 1+dim); - } - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->ineq[k], 1+2+3*dim); - isl_int_set_si(hull->ineq[k][(i+1)*(1+dim)], 1); - } - for (j = 0; j < 1+dim; ++j) { - k = isl_basic_set_alloc_equality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->eq[k], 1+2+3*dim); - isl_int_set_si(hull->eq[k][j], -1); - isl_int_set_si(hull->eq[k][1+dim+j], 1); - isl_int_set_si(hull->eq[k][2*(1+dim)+j], 1); - } - hull = isl_basic_set_set_rational(hull); - hull = isl_basic_set_remove_dims(hull, isl_dim_set, dim, 2*(1+dim)); - hull = isl_basic_set_remove_redundancies(hull); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return hull; -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - isl_basic_set_free(hull); - return NULL; -} - -/* Is the set bounded for each value of the parameters? - */ -int isl_basic_set_is_bounded(__isl_keep isl_basic_set *bset) -{ - struct isl_tab *tab; - int bounded; - - if (!bset) - return -1; - if (isl_basic_set_plain_is_empty(bset)) - return 1; - - tab = isl_tab_from_recession_cone(bset, 1); - bounded = isl_tab_cone_is_bounded(tab); - isl_tab_free(tab); - return bounded; -} - -/* Is the image bounded for each value of the parameters and - * the domain variables? - */ -int isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap) -{ - unsigned nparam = isl_basic_map_dim(bmap, isl_dim_param); - unsigned n_in = isl_basic_map_dim(bmap, isl_dim_in); - int bounded; - - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_move_dims(bmap, isl_dim_param, nparam, - isl_dim_in, 0, n_in); - bounded = isl_basic_set_is_bounded((isl_basic_set *)bmap); - isl_basic_map_free(bmap); - - return bounded; -} - -/* Is the set bounded for each value of the parameters? - */ -int isl_set_is_bounded(__isl_keep isl_set *set) -{ - int i; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) { - int bounded = isl_basic_set_is_bounded(set->p[i]); - if (!bounded || bounded < 0) - return bounded; - } - return 1; -} - -/* Compute the lineality space of the convex hull of bset1 and bset2. - * - * We first compute the intersection of the recession cone of bset1 - * with the negative of the recession cone of bset2 and then compute - * the linear hull of the resulting cone. - */ -static struct isl_basic_set *induced_lineality_space( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - int i, k; - struct isl_basic_set *lin = NULL; - unsigned dim; - - if (!bset1 || !bset2) - goto error; - - dim = isl_basic_set_total_dim(bset1); - lin = isl_basic_set_alloc_dim(isl_basic_set_get_dim(bset1), 0, - bset1->n_eq + bset2->n_eq, - bset1->n_ineq + bset2->n_ineq); - lin = isl_basic_set_set_rational(lin); - if (!lin) - goto error; - for (i = 0; i < bset1->n_eq; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_cpy(lin->eq[k] + 1, bset1->eq[i] + 1, dim); - } - for (i = 0; i < bset1->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->ineq[k][0], 0); - isl_seq_cpy(lin->ineq[k] + 1, bset1->ineq[i] + 1, dim); - } - for (i = 0; i < bset2->n_eq; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_neg(lin->eq[k] + 1, bset2->eq[i] + 1, dim); - } - for (i = 0; i < bset2->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->ineq[k][0], 0); - isl_seq_neg(lin->ineq[k] + 1, bset2->ineq[i] + 1, dim); - } - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return isl_basic_set_affine_hull(lin); -error: - isl_basic_set_free(lin); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -static struct isl_basic_set *uset_convex_hull(struct isl_set *set); - -/* Given a set and a linear space "lin" of dimension n > 0, - * project the linear space from the set, compute the convex hull - * and then map the set back to the original space. - * - * Let - * - * M x = 0 - * - * describe the linear space. We first compute the Hermite normal - * form H = M U of M = H Q, to obtain - * - * H Q x = 0 - * - * The last n rows of H will be zero, so the last n variables of x' = Q x - * are the one we want to project out. We do this by transforming each - * basic set A x >= b to A U x' >= b and then removing the last n dimensions. - * After computing the convex hull in x'_1, i.e., A' x'_1 >= b', - * we transform the hull back to the original space as A' Q_1 x >= b', - * with Q_1 all but the last n rows of Q. - */ -static struct isl_basic_set *modulo_lineality(struct isl_set *set, - struct isl_basic_set *lin) -{ - unsigned total = isl_basic_set_total_dim(lin); - unsigned lin_dim; - struct isl_basic_set *hull; - struct isl_mat *M, *U, *Q; - - if (!set || !lin) - goto error; - lin_dim = total - lin->n_eq; - M = isl_mat_sub_alloc6(set->ctx, lin->eq, 0, lin->n_eq, 1, total); - M = isl_mat_left_hermite(M, 0, &U, &Q); - if (!M) - goto error; - isl_mat_free(M); - isl_basic_set_free(lin); - - Q = isl_mat_drop_rows(Q, Q->n_row - lin_dim, lin_dim); - - U = isl_mat_lin_to_aff(U); - Q = isl_mat_lin_to_aff(Q); - - set = isl_set_preimage(set, U); - set = isl_set_remove_dims(set, isl_dim_set, total - lin_dim, lin_dim); - hull = uset_convex_hull(set); - hull = isl_basic_set_preimage(hull, Q); - - return hull; -error: - isl_basic_set_free(lin); - isl_set_free(set); - return NULL; -} - -/* Given two polyhedra with as constraints h_{ij} x >= 0 in homegeneous space, - * set up an LP for solving - * - * \sum_j \alpha_{1j} h_{1j} = \sum_j \alpha_{2j} h_{2j} - * - * \alpha{i0} corresponds to the (implicit) positivity constraint 1 >= 0 - * The next \alpha{ij} correspond to the equalities and come in pairs. - * The final \alpha{ij} correspond to the inequalities. - */ -static struct isl_basic_set *valid_direction_lp( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - struct isl_dim *dim; - struct isl_basic_set *lp; - unsigned d; - int n; - int i, j, k; - - if (!bset1 || !bset2) - goto error; - d = 1 + isl_basic_set_total_dim(bset1); - n = 2 + - 2 * bset1->n_eq + bset1->n_ineq + 2 * bset2->n_eq + bset2->n_ineq; - dim = isl_dim_set_alloc(bset1->ctx, 0, n); - lp = isl_basic_set_alloc_dim(dim, 0, d, n); - if (!lp) - goto error; - for (i = 0; i < n; ++i) { - k = isl_basic_set_alloc_inequality(lp); - if (k < 0) - goto error; - isl_seq_clr(lp->ineq[k] + 1, n); - isl_int_set_si(lp->ineq[k][0], -1); - isl_int_set_si(lp->ineq[k][1 + i], 1); - } - for (i = 0; i < d; ++i) { - k = isl_basic_set_alloc_equality(lp); - if (k < 0) - goto error; - n = 0; - isl_int_set_si(lp->eq[k][n], 0); n++; - /* positivity constraint 1 >= 0 */ - isl_int_set_si(lp->eq[k][n], i == 0); n++; - for (j = 0; j < bset1->n_eq; ++j) { - isl_int_set(lp->eq[k][n], bset1->eq[j][i]); n++; - isl_int_neg(lp->eq[k][n], bset1->eq[j][i]); n++; - } - for (j = 0; j < bset1->n_ineq; ++j) { - isl_int_set(lp->eq[k][n], bset1->ineq[j][i]); n++; - } - /* positivity constraint 1 >= 0 */ - isl_int_set_si(lp->eq[k][n], -(i == 0)); n++; - for (j = 0; j < bset2->n_eq; ++j) { - isl_int_neg(lp->eq[k][n], bset2->eq[j][i]); n++; - isl_int_set(lp->eq[k][n], bset2->eq[j][i]); n++; - } - for (j = 0; j < bset2->n_ineq; ++j) { - isl_int_neg(lp->eq[k][n], bset2->ineq[j][i]); n++; - } - } - lp = isl_basic_set_gauss(lp, NULL); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return lp; -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Compute a vector s in the homogeneous space such that > 0 - * for all rays in the homogeneous space of the two cones that correspond - * to the input polyhedra bset1 and bset2. - * - * We compute s as a vector that satisfies - * - * s = \sum_j \alpha_{ij} h_{ij} for i = 1,2 (*) - * - * with h_{ij} the normals of the facets of polyhedron i - * (including the "positivity constraint" 1 >= 0) and \alpha_{ij} - * strictly positive numbers. For simplicity we impose \alpha_{ij} >= 1. - * We first set up an LP with as variables the \alpha{ij}. - * In this formulation, for each polyhedron i, - * the first constraint is the positivity constraint, followed by pairs - * of variables for the equalities, followed by variables for the inequalities. - * We then simply pick a feasible solution and compute s using (*). - * - * Note that we simply pick any valid direction and make no attempt - * to pick a "good" or even the "best" valid direction. - */ -static struct isl_vec *valid_direction( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - struct isl_basic_set *lp; - struct isl_tab *tab; - struct isl_vec *sample = NULL; - struct isl_vec *dir; - unsigned d; - int i; - int n; - - if (!bset1 || !bset2) - goto error; - lp = valid_direction_lp(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2)); - tab = isl_tab_from_basic_set(lp); - sample = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - isl_basic_set_free(lp); - if (!sample) - goto error; - d = isl_basic_set_total_dim(bset1); - dir = isl_vec_alloc(bset1->ctx, 1 + d); - if (!dir) - goto error; - isl_seq_clr(dir->block.data + 1, dir->size - 1); - n = 1; - /* positivity constraint 1 >= 0 */ - isl_int_set(dir->block.data[0], sample->block.data[n]); n++; - for (i = 0; i < bset1->n_eq; ++i) { - isl_int_sub(sample->block.data[n], - sample->block.data[n], sample->block.data[n+1]); - isl_seq_combine(dir->block.data, - bset1->ctx->one, dir->block.data, - sample->block.data[n], bset1->eq[i], 1 + d); - - n += 2; - } - for (i = 0; i < bset1->n_ineq; ++i) - isl_seq_combine(dir->block.data, - bset1->ctx->one, dir->block.data, - sample->block.data[n++], bset1->ineq[i], 1 + d); - isl_vec_free(sample); - isl_seq_normalize(bset1->ctx, dir->el, dir->size); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return dir; -error: - isl_vec_free(sample); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Given a polyhedron b_i + A_i x >= 0 and a map T = S^{-1}, - * compute b_i' + A_i' x' >= 0, with - * - * [ b_i A_i ] [ y' ] [ y' ] - * [ 1 0 ] S^{-1} [ x' ] >= 0 or [ b_i' A_i' ] [ x' ] >= 0 - * - * In particular, add the "positivity constraint" and then perform - * the mapping. - */ -static struct isl_basic_set *homogeneous_map(struct isl_basic_set *bset, - struct isl_mat *T) -{ - int k; - - if (!bset) - goto error; - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k] + 1, isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->ineq[k][0], 1); - bset = isl_basic_set_preimage(bset, T); - return bset; -error: - isl_mat_free(T); - isl_basic_set_free(bset); - return NULL; -} - -/* Compute the convex hull of a pair of basic sets without any parameters or - * integer divisions, where the convex hull is known to be pointed, - * but the basic sets may be unbounded. - * - * We turn this problem into the computation of a convex hull of a pair - * _bounded_ polyhedra by "changing the direction of the homogeneous - * dimension". This idea is due to Matthias Koeppe. - * - * Consider the cones in homogeneous space that correspond to the - * input polyhedra. The rays of these cones are also rays of the - * polyhedra if the coordinate that corresponds to the homogeneous - * dimension is zero. That is, if the inner product of the rays - * with the homogeneous direction is zero. - * The cones in the homogeneous space can also be considered to - * correspond to other pairs of polyhedra by chosing a different - * homogeneous direction. To ensure that both of these polyhedra - * are bounded, we need to make sure that all rays of the cones - * correspond to vertices and not to rays. - * Let s be a direction such that > 0 for all rays r of both cones. - * Then using s as a homogeneous direction, we obtain a pair of polytopes. - * The vector s is computed in valid_direction. - * - * Note that we need to consider _all_ rays of the cones and not just - * the rays that correspond to rays in the polyhedra. If we were to - * only consider those rays and turn them into vertices, then we - * may inadvertently turn some vertices into rays. - * - * The standard homogeneous direction is the unit vector in the 0th coordinate. - * We therefore transform the two polyhedra such that the selected - * direction is mapped onto this standard direction and then proceed - * with the normal computation. - * Let S be a non-singular square matrix with s as its first row, - * then we want to map the polyhedra to the space - * - * [ y' ] [ y ] [ y ] [ y' ] - * [ x' ] = S [ x ] i.e., [ x ] = S^{-1} [ x' ] - * - * We take S to be the unimodular completion of s to limit the growth - * of the coefficients in the following computations. - * - * Let b_i + A_i x >= 0 be the constraints of polyhedron i. - * We first move to the homogeneous dimension - * - * b_i y + A_i x >= 0 [ b_i A_i ] [ y ] [ 0 ] - * y >= 0 or [ 1 0 ] [ x ] >= [ 0 ] - * - * Then we change directoin - * - * [ b_i A_i ] [ y' ] [ y' ] - * [ 1 0 ] S^{-1} [ x' ] >= 0 or [ b_i' A_i' ] [ x' ] >= 0 - * - * Then we compute the convex hull of the polytopes b_i' + A_i' x' >= 0 - * resulting in b' + A' x' >= 0, which we then convert back - * - * [ y ] [ y ] - * [ b' A' ] S [ x ] >= 0 or [ b A ] [ x ] >= 0 - * - * The polyhedron b + A x >= 0 is then the convex hull of the input polyhedra. - */ -static struct isl_basic_set *convex_hull_pair_pointed( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - struct isl_ctx *ctx = NULL; - struct isl_vec *dir = NULL; - struct isl_mat *T = NULL; - struct isl_mat *T2 = NULL; - struct isl_basic_set *hull; - struct isl_set *set; - - if (!bset1 || !bset2) - goto error; - ctx = bset1->ctx; - dir = valid_direction(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2)); - if (!dir) - goto error; - T = isl_mat_alloc(bset1->ctx, dir->size, dir->size); - if (!T) - goto error; - isl_seq_cpy(T->row[0], dir->block.data, dir->size); - T = isl_mat_unimodular_complete(T, 1); - T2 = isl_mat_right_inverse(isl_mat_copy(T)); - - bset1 = homogeneous_map(bset1, isl_mat_copy(T2)); - bset2 = homogeneous_map(bset2, T2); - set = isl_set_alloc_dim(isl_basic_set_get_dim(bset1), 2, 0); - set = isl_set_add_basic_set(set, bset1); - set = isl_set_add_basic_set(set, bset2); - hull = uset_convex_hull(set); - hull = isl_basic_set_preimage(hull, T); - - isl_vec_free(dir); - - return hull; -error: - isl_vec_free(dir); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -static struct isl_basic_set *uset_convex_hull_wrap(struct isl_set *set); -static struct isl_basic_set *modulo_affine_hull( - struct isl_set *set, struct isl_basic_set *affine_hull); - -/* Compute the convex hull of a pair of basic sets without any parameters or - * integer divisions. - * - * This function is called from uset_convex_hull_unbounded, which - * means that the complete convex hull is unbounded. Some pairs - * of basic sets may still be bounded, though. - * They may even lie inside a lower dimensional space, in which - * case they need to be handled inside their affine hull since - * the main algorithm assumes that the result is full-dimensional. - * - * If the convex hull of the two basic sets would have a non-trivial - * lineality space, we first project out this lineality space. - */ -static struct isl_basic_set *convex_hull_pair(struct isl_basic_set *bset1, - struct isl_basic_set *bset2) -{ - isl_basic_set *lin, *aff; - int bounded1, bounded2; - - if (bset1->ctx->opt->convex == ISL_CONVEX_HULL_FM) - return convex_hull_pair_elim(bset1, bset2); - - aff = isl_set_affine_hull(isl_basic_set_union(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2))); - if (!aff) - goto error; - if (aff->n_eq != 0) - return modulo_affine_hull(isl_basic_set_union(bset1, bset2), aff); - isl_basic_set_free(aff); - - bounded1 = isl_basic_set_is_bounded(bset1); - bounded2 = isl_basic_set_is_bounded(bset2); - - if (bounded1 < 0 || bounded2 < 0) - goto error; - - if (bounded1 && bounded2) - uset_convex_hull_wrap(isl_basic_set_union(bset1, bset2)); - - if (bounded1 || bounded2) - return convex_hull_pair_pointed(bset1, bset2); - - lin = induced_lineality_space(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2)); - if (!lin) - goto error; - if (isl_basic_set_is_universe(lin)) { - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return lin; - } - if (lin->n_eq < isl_basic_set_total_dim(lin)) { - struct isl_set *set; - set = isl_set_alloc_dim(isl_basic_set_get_dim(bset1), 2, 0); - set = isl_set_add_basic_set(set, bset1); - set = isl_set_add_basic_set(set, bset2); - return modulo_lineality(set, lin); - } - isl_basic_set_free(lin); - - return convex_hull_pair_pointed(bset1, bset2); -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Compute the lineality space of a basic set. - * We currently do not allow the basic set to have any divs. - * We basically just drop the constants and turn every inequality - * into an equality. - */ -struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset) -{ - int i, k; - struct isl_basic_set *lin = NULL; - unsigned dim; - - if (!bset) - goto error; - isl_assert(bset->ctx, bset->n_div == 0, goto error); - dim = isl_basic_set_total_dim(bset); - - lin = isl_basic_set_alloc_dim(isl_basic_set_get_dim(bset), 0, dim, 0); - if (!lin) - goto error; - for (i = 0; i < bset->n_eq; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_cpy(lin->eq[k] + 1, bset->eq[i] + 1, dim); - } - lin = isl_basic_set_gauss(lin, NULL); - if (!lin) - goto error; - for (i = 0; i < bset->n_ineq && lin->n_eq < dim; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_cpy(lin->eq[k] + 1, bset->ineq[i] + 1, dim); - lin = isl_basic_set_gauss(lin, NULL); - if (!lin) - goto error; - } - isl_basic_set_free(bset); - return lin; -error: - isl_basic_set_free(lin); - isl_basic_set_free(bset); - return NULL; -} - -/* Compute the (linear) hull of the lineality spaces of the basic sets in the - * "underlying" set "set". - */ -static struct isl_basic_set *uset_combined_lineality_space(struct isl_set *set) -{ - int i; - struct isl_set *lin = NULL; - - if (!set) - return NULL; - if (set->n == 0) { - struct isl_dim *dim = isl_set_get_dim(set); - isl_set_free(set); - return isl_basic_set_empty(dim); - } - - lin = isl_set_alloc_dim(isl_set_get_dim(set), set->n, 0); - for (i = 0; i < set->n; ++i) - lin = isl_set_add_basic_set(lin, - isl_basic_set_lineality_space(isl_basic_set_copy(set->p[i]))); - isl_set_free(set); - return isl_set_affine_hull(lin); -} - -/* Compute the convex hull of a set without any parameters or - * integer divisions. - * In each step, we combined two basic sets until only one - * basic set is left. - * The input basic sets are assumed not to have a non-trivial - * lineality space. If any of the intermediate results has - * a non-trivial lineality space, it is projected out. - */ -static struct isl_basic_set *uset_convex_hull_unbounded(struct isl_set *set) -{ - struct isl_basic_set *convex_hull = NULL; - - convex_hull = isl_set_copy_basic_set(set); - set = isl_set_drop_basic_set(set, convex_hull); - if (!set) - goto error; - while (set->n > 0) { - struct isl_basic_set *t; - t = isl_set_copy_basic_set(set); - if (!t) - goto error; - set = isl_set_drop_basic_set(set, t); - if (!set) - goto error; - convex_hull = convex_hull_pair(convex_hull, t); - if (set->n == 0) - break; - t = isl_basic_set_lineality_space(isl_basic_set_copy(convex_hull)); - if (!t) - goto error; - if (isl_basic_set_is_universe(t)) { - isl_basic_set_free(convex_hull); - convex_hull = t; - break; - } - if (t->n_eq < isl_basic_set_total_dim(t)) { - set = isl_set_add_basic_set(set, convex_hull); - return modulo_lineality(set, t); - } - isl_basic_set_free(t); - } - isl_set_free(set); - return convex_hull; -error: - isl_set_free(set); - isl_basic_set_free(convex_hull); - return NULL; -} - -/* Compute an initial hull for wrapping containing a single initial - * facet. - * This function assumes that the given set is bounded. - */ -static struct isl_basic_set *initial_hull(struct isl_basic_set *hull, - struct isl_set *set) -{ - struct isl_mat *bounds = NULL; - unsigned dim; - int k; - - if (!hull) - goto error; - bounds = initial_facet_constraint(set); - if (!bounds) - goto error; - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - dim = isl_set_n_dim(set); - isl_assert(set->ctx, 1 + dim == bounds->n_col, goto error); - isl_seq_cpy(hull->ineq[k], bounds->row[0], bounds->n_col); - isl_mat_free(bounds); - - return hull; -error: - isl_basic_set_free(hull); - isl_mat_free(bounds); - return NULL; -} - -struct max_constraint { - struct isl_mat *c; - int count; - int ineq; -}; - -static int max_constraint_equal(const void *entry, const void *val) -{ - struct max_constraint *a = (struct max_constraint *)entry; - isl_int *b = (isl_int *)val; - - return isl_seq_eq(a->c->row[0] + 1, b, a->c->n_col - 1); -} - -static void update_constraint(struct isl_ctx *ctx, struct isl_hash_table *table, - isl_int *con, unsigned len, int n, int ineq) -{ - struct isl_hash_table_entry *entry; - struct max_constraint *c; - uint32_t c_hash; - - c_hash = isl_seq_get_hash(con + 1, len); - entry = isl_hash_table_find(ctx, table, c_hash, max_constraint_equal, - con + 1, 0); - if (!entry) - return; - c = entry->data; - if (c->count < n) { - isl_hash_table_remove(ctx, table, entry); - return; - } - c->count++; - if (isl_int_gt(c->c->row[0][0], con[0])) - return; - if (isl_int_eq(c->c->row[0][0], con[0])) { - if (ineq) - c->ineq = ineq; - return; - } - c->c = isl_mat_cow(c->c); - isl_int_set(c->c->row[0][0], con[0]); - c->ineq = ineq; -} - -/* Check whether the constraint hash table "table" constains the constraint - * "con". - */ -static int has_constraint(struct isl_ctx *ctx, struct isl_hash_table *table, - isl_int *con, unsigned len, int n) -{ - struct isl_hash_table_entry *entry; - struct max_constraint *c; - uint32_t c_hash; - - c_hash = isl_seq_get_hash(con + 1, len); - entry = isl_hash_table_find(ctx, table, c_hash, max_constraint_equal, - con + 1, 0); - if (!entry) - return 0; - c = entry->data; - if (c->count < n) - return 0; - return isl_int_eq(c->c->row[0][0], con[0]); -} - -/* Check for inequality constraints of a basic set without equalities - * such that the same or more stringent copies of the constraint appear - * in all of the basic sets. Such constraints are necessarily facet - * constraints of the convex hull. - * - * If the resulting basic set is by chance identical to one of - * the basic sets in "set", then we know that this basic set contains - * all other basic sets and is therefore the convex hull of set. - * In this case we set *is_hull to 1. - */ -static struct isl_basic_set *common_constraints(struct isl_basic_set *hull, - struct isl_set *set, int *is_hull) -{ - int i, j, s, n; - int min_constraints; - int best; - struct max_constraint *constraints = NULL; - struct isl_hash_table *table = NULL; - unsigned total; - - *is_hull = 0; - - for (i = 0; i < set->n; ++i) - if (set->p[i]->n_eq == 0) - break; - if (i >= set->n) - return hull; - min_constraints = set->p[i]->n_ineq; - best = i; - for (i = best + 1; i < set->n; ++i) { - if (set->p[i]->n_eq != 0) - continue; - if (set->p[i]->n_ineq >= min_constraints) - continue; - min_constraints = set->p[i]->n_ineq; - best = i; - } - constraints = isl_calloc_array(hull->ctx, struct max_constraint, - min_constraints); - if (!constraints) - return hull; - table = isl_alloc_type(hull->ctx, struct isl_hash_table); - if (isl_hash_table_init(hull->ctx, table, min_constraints)) - goto error; - - total = isl_dim_total(set->dim); - for (i = 0; i < set->p[best]->n_ineq; ++i) { - constraints[i].c = isl_mat_sub_alloc6(hull->ctx, - set->p[best]->ineq + i, 0, 1, 0, 1 + total); - if (!constraints[i].c) - goto error; - constraints[i].ineq = 1; - } - for (i = 0; i < min_constraints; ++i) { - struct isl_hash_table_entry *entry; - uint32_t c_hash; - c_hash = isl_seq_get_hash(constraints[i].c->row[0] + 1, total); - entry = isl_hash_table_find(hull->ctx, table, c_hash, - max_constraint_equal, constraints[i].c->row[0] + 1, 1); - if (!entry) - goto error; - isl_assert(hull->ctx, !entry->data, goto error); - entry->data = &constraints[i]; - } - - n = 0; - for (s = 0; s < set->n; ++s) { - if (s == best) - continue; - - for (i = 0; i < set->p[s]->n_eq; ++i) { - isl_int *eq = set->p[s]->eq[i]; - for (j = 0; j < 2; ++j) { - isl_seq_neg(eq, eq, 1 + total); - update_constraint(hull->ctx, table, - eq, total, n, 0); - } - } - for (i = 0; i < set->p[s]->n_ineq; ++i) { - isl_int *ineq = set->p[s]->ineq[i]; - update_constraint(hull->ctx, table, ineq, total, n, - set->p[s]->n_eq == 0); - } - ++n; - } - - for (i = 0; i < min_constraints; ++i) { - if (constraints[i].count < n) - continue; - if (!constraints[i].ineq) - continue; - j = isl_basic_set_alloc_inequality(hull); - if (j < 0) - goto error; - isl_seq_cpy(hull->ineq[j], constraints[i].c->row[0], 1 + total); - } - - for (s = 0; s < set->n; ++s) { - if (set->p[s]->n_eq) - continue; - if (set->p[s]->n_ineq != hull->n_ineq) - continue; - for (i = 0; i < set->p[s]->n_ineq; ++i) { - isl_int *ineq = set->p[s]->ineq[i]; - if (!has_constraint(hull->ctx, table, ineq, total, n)) - break; - } - if (i == set->p[s]->n_ineq) - *is_hull = 1; - } - - isl_hash_table_clear(table); - for (i = 0; i < min_constraints; ++i) - isl_mat_free(constraints[i].c); - free(constraints); - free(table); - return hull; -error: - isl_hash_table_clear(table); - free(table); - if (constraints) - for (i = 0; i < min_constraints; ++i) - isl_mat_free(constraints[i].c); - free(constraints); - return hull; -} - -/* Create a template for the convex hull of "set" and fill it up - * obvious facet constraints, if any. If the result happens to - * be the convex hull of "set" then *is_hull is set to 1. - */ -static struct isl_basic_set *proto_hull(struct isl_set *set, int *is_hull) -{ - struct isl_basic_set *hull; - unsigned n_ineq; - int i; - - n_ineq = 1; - for (i = 0; i < set->n; ++i) { - n_ineq += set->p[i]->n_eq; - n_ineq += set->p[i]->n_ineq; - } - hull = isl_basic_set_alloc_dim(isl_dim_copy(set->dim), 0, 0, n_ineq); - hull = isl_basic_set_set_rational(hull); - if (!hull) - return NULL; - return common_constraints(hull, set, is_hull); -} - -static struct isl_basic_set *uset_convex_hull_wrap(struct isl_set *set) -{ - struct isl_basic_set *hull; - int is_hull; - - hull = proto_hull(set, &is_hull); - if (hull && !is_hull) { - if (hull->n_ineq == 0) - hull = initial_hull(hull, set); - hull = extend(hull, set); - } - isl_set_free(set); - - return hull; -} - -/* Compute the convex hull of a set without any parameters or - * integer divisions. Depending on whether the set is bounded, - * we pass control to the wrapping based convex hull or - * the Fourier-Motzkin elimination based convex hull. - * We also handle a few special cases before checking the boundedness. - */ -static struct isl_basic_set *uset_convex_hull(struct isl_set *set) -{ - struct isl_basic_set *convex_hull = NULL; - struct isl_basic_set *lin; - - if (isl_set_n_dim(set) == 0) - return convex_hull_0d(set); - - set = isl_set_coalesce(set); - set = isl_set_set_rational(set); - - if (!set) - goto error; - if (!set) - return NULL; - if (set->n == 1) { - convex_hull = isl_basic_set_copy(set->p[0]); - isl_set_free(set); - return convex_hull; - } - if (isl_set_n_dim(set) == 1) - return convex_hull_1d(set); - - if (isl_set_is_bounded(set) && - set->ctx->opt->convex == ISL_CONVEX_HULL_WRAP) - return uset_convex_hull_wrap(set); - - lin = uset_combined_lineality_space(isl_set_copy(set)); - if (!lin) - goto error; - if (isl_basic_set_is_universe(lin)) { - isl_set_free(set); - return lin; - } - if (lin->n_eq < isl_basic_set_total_dim(lin)) - return modulo_lineality(set, lin); - isl_basic_set_free(lin); - - return uset_convex_hull_unbounded(set); -error: - isl_set_free(set); - isl_basic_set_free(convex_hull); - return NULL; -} - -/* This is the core procedure, where "set" is a "pure" set, i.e., - * without parameters or divs and where the convex hull of set is - * known to be full-dimensional. - */ -static struct isl_basic_set *uset_convex_hull_wrap_bounded(struct isl_set *set) -{ - struct isl_basic_set *convex_hull = NULL; - - if (!set) - goto error; - - if (isl_set_n_dim(set) == 0) { - convex_hull = isl_basic_set_universe(isl_dim_copy(set->dim)); - isl_set_free(set); - convex_hull = isl_basic_set_set_rational(convex_hull); - return convex_hull; - } - - set = isl_set_set_rational(set); - set = isl_set_coalesce(set); - if (!set) - goto error; - if (set->n == 1) { - convex_hull = isl_basic_set_copy(set->p[0]); - isl_set_free(set); - return convex_hull; - } - if (isl_set_n_dim(set) == 1) - return convex_hull_1d(set); - - return uset_convex_hull_wrap(set); -error: - isl_set_free(set); - return NULL; -} - -/* Compute the convex hull of set "set" with affine hull "affine_hull", - * We first remove the equalities (transforming the set), compute the - * convex hull of the transformed set and then add the equalities back - * (after performing the inverse transformation. - */ -static struct isl_basic_set *modulo_affine_hull( - struct isl_set *set, struct isl_basic_set *affine_hull) -{ - struct isl_mat *T; - struct isl_mat *T2; - struct isl_basic_set *dummy; - struct isl_basic_set *convex_hull; - - dummy = isl_basic_set_remove_equalities( - isl_basic_set_copy(affine_hull), &T, &T2); - if (!dummy) - goto error; - isl_basic_set_free(dummy); - set = isl_set_preimage(set, T); - convex_hull = uset_convex_hull(set); - convex_hull = isl_basic_set_preimage(convex_hull, T2); - convex_hull = isl_basic_set_intersect(convex_hull, affine_hull); - return convex_hull; -error: - isl_basic_set_free(affine_hull); - isl_set_free(set); - return NULL; -} - -/* Compute the convex hull of a map. - * - * The implementation was inspired by "Extended Convex Hull" by Fukuda et al., - * specifically, the wrapping of facets to obtain new facets. - */ -struct isl_basic_map *isl_map_convex_hull(struct isl_map *map) -{ - struct isl_basic_set *bset; - struct isl_basic_map *model = NULL; - struct isl_basic_set *affine_hull = NULL; - struct isl_basic_map *convex_hull = NULL; - struct isl_set *set = NULL; - struct isl_ctx *ctx; - - if (!map) - goto error; - - ctx = map->ctx; - if (map->n == 0) { - convex_hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return convex_hull; - } - - map = isl_map_detect_equalities(map); - map = isl_map_align_divs(map); - if (!map) - goto error; - model = isl_basic_map_copy(map->p[0]); - set = isl_map_underlying_set(map); - if (!set) - goto error; - - affine_hull = isl_set_affine_hull(isl_set_copy(set)); - if (!affine_hull) - goto error; - if (affine_hull->n_eq != 0) - bset = modulo_affine_hull(set, affine_hull); - else { - isl_basic_set_free(affine_hull); - bset = uset_convex_hull(set); - } - - convex_hull = isl_basic_map_overlying_set(bset, model); - if (!convex_hull) - return NULL; - - ISL_F_SET(convex_hull, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(convex_hull, ISL_BASIC_MAP_ALL_EQUALITIES); - ISL_F_CLR(convex_hull, ISL_BASIC_MAP_RATIONAL); - return convex_hull; -error: - isl_set_free(set); - isl_basic_map_free(model); - return NULL; -} - -struct isl_basic_set *isl_set_convex_hull(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_convex_hull((struct isl_map *)set); -} - -__isl_give isl_basic_map *isl_map_polyhedral_hull(__isl_take isl_map *map) -{ - isl_basic_map *hull; - - hull = isl_map_convex_hull(map); - return isl_basic_map_remove_divs(hull); -} - -__isl_give isl_basic_set *isl_set_polyhedral_hull(__isl_take isl_set *set) -{ - return (isl_basic_set *)isl_map_polyhedral_hull((isl_map *)set); -} - -struct sh_data_entry { - struct isl_hash_table *table; - struct isl_tab *tab; -}; - -/* Holds the data needed during the simple hull computation. - * In particular, - * n the number of basic sets in the original set - * hull_table a hash table of already computed constraints - * in the simple hull - * p for each basic set, - * table a hash table of the constraints - * tab the tableau corresponding to the basic set - */ -struct sh_data { - struct isl_ctx *ctx; - unsigned n; - struct isl_hash_table *hull_table; - struct sh_data_entry p[1]; -}; - -static void sh_data_free(struct sh_data *data) -{ - int i; - - if (!data) - return; - isl_hash_table_free(data->ctx, data->hull_table); - for (i = 0; i < data->n; ++i) { - isl_hash_table_free(data->ctx, data->p[i].table); - isl_tab_free(data->p[i].tab); - } - free(data); -} - -struct ineq_cmp_data { - unsigned len; - isl_int *p; -}; - -static int has_ineq(const void *entry, const void *val) -{ - isl_int *row = (isl_int *)entry; - struct ineq_cmp_data *v = (struct ineq_cmp_data *)val; - - return isl_seq_eq(row + 1, v->p + 1, v->len) || - isl_seq_is_neg(row + 1, v->p + 1, v->len); -} - -static int hash_ineq(struct isl_ctx *ctx, struct isl_hash_table *table, - isl_int *ineq, unsigned len) -{ - uint32_t c_hash; - struct ineq_cmp_data v; - struct isl_hash_table_entry *entry; - - v.len = len; - v.p = ineq; - c_hash = isl_seq_get_hash(ineq + 1, len); - entry = isl_hash_table_find(ctx, table, c_hash, has_ineq, &v, 1); - if (!entry) - return - 1; - entry->data = ineq; - return 0; -} - -/* Fill hash table "table" with the constraints of "bset". - * Equalities are added as two inequalities. - * The value in the hash table is a pointer to the (in)equality of "bset". - */ -static int hash_basic_set(struct isl_hash_table *table, - struct isl_basic_set *bset) -{ - int i, j; - unsigned dim = isl_basic_set_total_dim(bset); - - for (i = 0; i < bset->n_eq; ++i) { - for (j = 0; j < 2; ++j) { - isl_seq_neg(bset->eq[i], bset->eq[i], 1 + dim); - if (hash_ineq(bset->ctx, table, bset->eq[i], dim) < 0) - return -1; - } - } - for (i = 0; i < bset->n_ineq; ++i) { - if (hash_ineq(bset->ctx, table, bset->ineq[i], dim) < 0) - return -1; - } - return 0; -} - -static struct sh_data *sh_data_alloc(struct isl_set *set, unsigned n_ineq) -{ - struct sh_data *data; - int i; - - data = isl_calloc(set->ctx, struct sh_data, - sizeof(struct sh_data) + - (set->n - 1) * sizeof(struct sh_data_entry)); - if (!data) - return NULL; - data->ctx = set->ctx; - data->n = set->n; - data->hull_table = isl_hash_table_alloc(set->ctx, n_ineq); - if (!data->hull_table) - goto error; - for (i = 0; i < set->n; ++i) { - data->p[i].table = isl_hash_table_alloc(set->ctx, - 2 * set->p[i]->n_eq + set->p[i]->n_ineq); - if (!data->p[i].table) - goto error; - if (hash_basic_set(data->p[i].table, set->p[i]) < 0) - goto error; - } - return data; -error: - sh_data_free(data); - return NULL; -} - -/* Check if inequality "ineq" is a bound for basic set "j" or if - * it can be relaxed (by increasing the constant term) to become - * a bound for that basic set. In the latter case, the constant - * term is updated. - * Return 1 if "ineq" is a bound - * 0 if "ineq" may attain arbitrarily small values on basic set "j" - * -1 if some error occurred - */ -static int is_bound(struct sh_data *data, struct isl_set *set, int j, - isl_int *ineq) -{ - enum isl_lp_result res; - isl_int opt; - - if (!data->p[j].tab) { - data->p[j].tab = isl_tab_from_basic_set(set->p[j]); - if (!data->p[j].tab) - return -1; - } - - isl_int_init(opt); - - res = isl_tab_min(data->p[j].tab, ineq, data->ctx->one, - &opt, NULL, 0); - if (res == isl_lp_ok && isl_int_is_neg(opt)) - isl_int_sub(ineq[0], ineq[0], opt); - - isl_int_clear(opt); - - return (res == isl_lp_ok || res == isl_lp_empty) ? 1 : - res == isl_lp_unbounded ? 0 : -1; -} - -/* Check if inequality "ineq" from basic set "i" can be relaxed to - * become a bound on the whole set. If so, add the (relaxed) inequality - * to "hull". - * - * We first check if "hull" already contains a translate of the inequality. - * If so, we are done. - * Then, we check if any of the previous basic sets contains a translate - * of the inequality. If so, then we have already considered this - * inequality and we are done. - * Otherwise, for each basic set other than "i", we check if the inequality - * is a bound on the basic set. - * For previous basic sets, we know that they do not contain a translate - * of the inequality, so we directly call is_bound. - * For following basic sets, we first check if a translate of the - * inequality appears in its description and if so directly update - * the inequality accordingly. - */ -static struct isl_basic_set *add_bound(struct isl_basic_set *hull, - struct sh_data *data, struct isl_set *set, int i, isl_int *ineq) -{ - uint32_t c_hash; - struct ineq_cmp_data v; - struct isl_hash_table_entry *entry; - int j, k; - - if (!hull) - return NULL; - - v.len = isl_basic_set_total_dim(hull); - v.p = ineq; - c_hash = isl_seq_get_hash(ineq + 1, v.len); - - entry = isl_hash_table_find(hull->ctx, data->hull_table, c_hash, - has_ineq, &v, 0); - if (entry) - return hull; - - for (j = 0; j < i; ++j) { - entry = isl_hash_table_find(hull->ctx, data->p[j].table, - c_hash, has_ineq, &v, 0); - if (entry) - break; - } - if (j < i) - return hull; - - k = isl_basic_set_alloc_inequality(hull); - isl_seq_cpy(hull->ineq[k], ineq, 1 + v.len); - if (k < 0) - goto error; - - for (j = 0; j < i; ++j) { - int bound; - bound = is_bound(data, set, j, hull->ineq[k]); - if (bound < 0) - goto error; - if (!bound) - break; - } - if (j < i) { - isl_basic_set_free_inequality(hull, 1); - return hull; - } - - for (j = i + 1; j < set->n; ++j) { - int bound, neg; - isl_int *ineq_j; - entry = isl_hash_table_find(hull->ctx, data->p[j].table, - c_hash, has_ineq, &v, 0); - if (entry) { - ineq_j = entry->data; - neg = isl_seq_is_neg(ineq_j + 1, - hull->ineq[k] + 1, v.len); - if (neg) - isl_int_neg(ineq_j[0], ineq_j[0]); - if (isl_int_gt(ineq_j[0], hull->ineq[k][0])) - isl_int_set(hull->ineq[k][0], ineq_j[0]); - if (neg) - isl_int_neg(ineq_j[0], ineq_j[0]); - continue; - } - bound = is_bound(data, set, j, hull->ineq[k]); - if (bound < 0) - goto error; - if (!bound) - break; - } - if (j < set->n) { - isl_basic_set_free_inequality(hull, 1); - return hull; - } - - entry = isl_hash_table_find(hull->ctx, data->hull_table, c_hash, - has_ineq, &v, 1); - if (!entry) - goto error; - entry->data = hull->ineq[k]; - - return hull; -error: - isl_basic_set_free(hull); - return NULL; -} - -/* Check if any inequality from basic set "i" can be relaxed to - * become a bound on the whole set. If so, add the (relaxed) inequality - * to "hull". - */ -static struct isl_basic_set *add_bounds(struct isl_basic_set *bset, - struct sh_data *data, struct isl_set *set, int i) -{ - int j, k; - unsigned dim = isl_basic_set_total_dim(bset); - - for (j = 0; j < set->p[i]->n_eq; ++j) { - for (k = 0; k < 2; ++k) { - isl_seq_neg(set->p[i]->eq[j], set->p[i]->eq[j], 1+dim); - bset = add_bound(bset, data, set, i, set->p[i]->eq[j]); - } - } - for (j = 0; j < set->p[i]->n_ineq; ++j) - bset = add_bound(bset, data, set, i, set->p[i]->ineq[j]); - return bset; -} - -/* Compute a superset of the convex hull of set that is described - * by only translates of the constraints in the constituents of set. - */ -static struct isl_basic_set *uset_simple_hull(struct isl_set *set) -{ - struct sh_data *data = NULL; - struct isl_basic_set *hull = NULL; - unsigned n_ineq; - int i; - - if (!set) - return NULL; - - n_ineq = 0; - for (i = 0; i < set->n; ++i) { - if (!set->p[i]) - goto error; - n_ineq += 2 * set->p[i]->n_eq + set->p[i]->n_ineq; - } - - hull = isl_basic_set_alloc_dim(isl_dim_copy(set->dim), 0, 0, n_ineq); - if (!hull) - goto error; - - data = sh_data_alloc(set, n_ineq); - if (!data) - goto error; - - for (i = 0; i < set->n; ++i) - hull = add_bounds(hull, data, set, i); - - sh_data_free(data); - isl_set_free(set); - - return hull; -error: - sh_data_free(data); - isl_basic_set_free(hull); - isl_set_free(set); - return NULL; -} - -/* Compute a superset of the convex hull of map that is described - * by only translates of the constraints in the constituents of map. - */ -struct isl_basic_map *isl_map_simple_hull(struct isl_map *map) -{ - struct isl_set *set = NULL; - struct isl_basic_map *model = NULL; - struct isl_basic_map *hull; - struct isl_basic_map *affine_hull; - struct isl_basic_set *bset = NULL; - - if (!map) - return NULL; - if (map->n == 0) { - hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return hull; - } - if (map->n == 1) { - hull = isl_basic_map_copy(map->p[0]); - isl_map_free(map); - return hull; - } - - map = isl_map_detect_equalities(map); - affine_hull = isl_map_affine_hull(isl_map_copy(map)); - map = isl_map_align_divs(map); - model = isl_basic_map_copy(map->p[0]); - - set = isl_map_underlying_set(map); - - bset = uset_simple_hull(set); - - hull = isl_basic_map_overlying_set(bset, model); - - hull = isl_basic_map_intersect(hull, affine_hull); - hull = isl_basic_map_remove_redundancies(hull); - ISL_F_SET(hull, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(hull, ISL_BASIC_MAP_ALL_EQUALITIES); - - return hull; -} - -struct isl_basic_set *isl_set_simple_hull(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_simple_hull((struct isl_map *)set); -} - -/* Given a set "set", return parametric bounds on the dimension "dim". - */ -static struct isl_basic_set *set_bounds(struct isl_set *set, int dim) -{ - unsigned set_dim = isl_set_dim(set, isl_dim_set); - set = isl_set_copy(set); - set = isl_set_eliminate_dims(set, dim + 1, set_dim - (dim + 1)); - set = isl_set_eliminate_dims(set, 0, dim); - return isl_set_convex_hull(set); -} - -/* Computes a "simple hull" and then check if each dimension in the - * resulting hull is bounded by a symbolic constant. If not, the - * hull is intersected with the corresponding bounds on the whole set. - */ -struct isl_basic_set *isl_set_bounded_simple_hull(struct isl_set *set) -{ - int i, j; - struct isl_basic_set *hull; - unsigned nparam, left; - int removed_divs = 0; - - hull = isl_set_simple_hull(isl_set_copy(set)); - if (!hull) - goto error; - - nparam = isl_basic_set_dim(hull, isl_dim_param); - for (i = 0; i < isl_basic_set_dim(hull, isl_dim_set); ++i) { - int lower = 0, upper = 0; - struct isl_basic_set *bounds; - - left = isl_basic_set_total_dim(hull) - nparam - i - 1; - for (j = 0; j < hull->n_eq; ++j) { - if (isl_int_is_zero(hull->eq[j][1 + nparam + i])) - continue; - if (isl_seq_first_non_zero(hull->eq[j]+1+nparam+i+1, - left) == -1) - break; - } - if (j < hull->n_eq) - continue; - - for (j = 0; j < hull->n_ineq; ++j) { - if (isl_int_is_zero(hull->ineq[j][1 + nparam + i])) - continue; - if (isl_seq_first_non_zero(hull->ineq[j]+1+nparam+i+1, - left) != -1 || - isl_seq_first_non_zero(hull->ineq[j]+1+nparam, - i) != -1) - continue; - if (isl_int_is_pos(hull->ineq[j][1 + nparam + i])) - lower = 1; - else - upper = 1; - if (lower && upper) - break; - } - - if (lower && upper) - continue; - - if (!removed_divs) { - set = isl_set_remove_divs(set); - if (!set) - goto error; - removed_divs = 1; - } - bounds = set_bounds(set, i); - hull = isl_basic_set_intersect(hull, bounds); - if (!hull) - goto error; - } - - isl_set_free(set); - return hull; -error: - isl_set_free(set); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_ctx.c b/cloog-0.16.3/isl/isl_ctx.c deleted file mode 100644 index 5b37bf550b9114de21b76fb6644b820ef347c503..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_ctx.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include - -static struct isl_options *find_nested_options(struct isl_arg *arg, - void *opt, struct isl_arg *wanted) -{ - int i; - struct isl_options *options; - - if (arg == wanted) - return opt; - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - if (arg[i].type != isl_arg_child) - continue; - options = find_nested_options(arg[i].u.child.child, - *(void **)(((char *)opt) + arg->offset), wanted); - if (options) - return options; - } - - return NULL; -} - -static struct isl_options *find_nested_isl_options(struct isl_arg *arg, - void *opt) -{ - return find_nested_options(arg, opt, isl_options_arg); -} - -void *isl_ctx_peek_options(isl_ctx *ctx, struct isl_arg *arg) -{ - if (!ctx) - return NULL; - return find_nested_options(ctx->user_arg, ctx->user_opt, arg); -} - -isl_ctx *isl_ctx_alloc_with_options(struct isl_arg *arg, void *user_opt) -{ - struct isl_ctx *ctx = NULL; - struct isl_options *opt = NULL; - int opt_allocated = 0; - - if (!user_opt) - return NULL; - - opt = find_nested_isl_options(arg, user_opt); - if (!opt) { - opt = isl_options_new_with_defaults(); - if (!opt) - goto error; - opt_allocated = 1; - } - - ctx = isl_calloc_type(NULL, struct isl_ctx); - if (!ctx) - goto error; - - if (isl_hash_table_init(ctx, &ctx->name_hash, 0)) - goto error; - - ctx->stats = isl_calloc_type(ctx, struct isl_stats); - if (!ctx->stats) - goto error; - - ctx->user_arg = arg; - ctx->user_opt = user_opt; - ctx->opt_allocated = opt_allocated; - ctx->opt = opt; - ctx->ref = 0; - - isl_int_init(ctx->zero); - isl_int_set_si(ctx->zero, 0); - - isl_int_init(ctx->one); - isl_int_set_si(ctx->one, 1); - - isl_int_init(ctx->two); - isl_int_set_si(ctx->two, 2); - - isl_int_init(ctx->negone); - isl_int_set_si(ctx->negone, -1); - - isl_int_init(ctx->normalize_gcd); - - ctx->n_cached = 0; - ctx->n_miss = 0; - - ctx->error = isl_error_none; - - return ctx; -error: - isl_arg_free(arg, user_opt); - if (opt_allocated) - isl_options_free(opt); - free(ctx); - return NULL; -} - -struct isl_ctx *isl_ctx_alloc() -{ - struct isl_options *opt; - - opt = isl_options_new_with_defaults(); - - return isl_ctx_alloc_with_options(isl_options_arg, opt); -} - -void isl_ctx_ref(struct isl_ctx *ctx) -{ - ctx->ref++; -} - -void isl_ctx_deref(struct isl_ctx *ctx) -{ - isl_assert(ctx, ctx->ref > 0, return); - ctx->ref--; -} - -void isl_ctx_free(struct isl_ctx *ctx) -{ - if (!ctx) - return; - isl_assert(ctx, ctx->ref == 0, return); - isl_hash_table_clear(&ctx->name_hash); - isl_blk_clear_cache(ctx); - isl_int_clear(ctx->zero); - isl_int_clear(ctx->one); - isl_int_clear(ctx->two); - isl_int_clear(ctx->negone); - isl_int_clear(ctx->normalize_gcd); - isl_arg_free(ctx->user_arg, ctx->user_opt); - if (ctx->opt_allocated) - free(ctx->opt); - free(ctx->stats); - free(ctx); -} - -struct isl_options *isl_ctx_options(isl_ctx *ctx) -{ - if (!ctx) - return NULL; - return ctx->opt; -} - -enum isl_error isl_ctx_last_error(isl_ctx *ctx) -{ - return ctx->error; -} - -void isl_ctx_reset_error(isl_ctx *ctx) -{ - ctx->error = isl_error_none; -} - -void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error) -{ - if (ctx) - ctx->error = error; -} - -void isl_ctx_abort(isl_ctx *ctx) -{ - if (ctx) - ctx->abort = 1; -} - -void isl_ctx_resume(isl_ctx *ctx) -{ - if (ctx) - ctx->abort = 0; -} - -int isl_ctx_aborted(isl_ctx *ctx) -{ - return ctx ? ctx->abort : -1; -} diff --git a/cloog-0.16.3/isl/isl_ctx_private.h b/cloog-0.16.3/isl/isl_ctx_private.h deleted file mode 100644 index a943b240cf40958efefa95bf9b18812aed336545..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_ctx_private.h +++ /dev/null @@ -1,28 +0,0 @@ -#include - -struct isl_ctx { - int ref; - - struct isl_stats *stats; - - int opt_allocated; - struct isl_options *opt; - void *user_opt; - struct isl_arg *user_arg; - - isl_int zero; - isl_int one; - isl_int two; - isl_int negone; - - isl_int normalize_gcd; - - int n_cached; - int n_miss; - struct isl_blk cache[ISL_BLK_CACHE_SIZE]; - struct isl_hash_table name_hash; - - enum isl_error error; - - int abort; -}; diff --git a/cloog-0.16.3/isl/isl_dim.c b/cloog-0.16.3/isl/isl_dim.c deleted file mode 100644 index 6aa67f03dc0c773ac2617807b8c9f309fc4d8178..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_dim.c +++ /dev/null @@ -1,1345 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include "isl_name.h" -#include - -isl_ctx *isl_dim_get_ctx(__isl_keep isl_dim *dim) -{ - return dim ? dim->ctx : NULL; -} - -struct isl_dim *isl_dim_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - struct isl_dim *dim; - - dim = isl_alloc_type(ctx, struct isl_dim); - if (!dim) - return NULL; - - dim->ctx = ctx; - isl_ctx_ref(ctx); - dim->ref = 1; - dim->nparam = nparam; - dim->n_in = n_in; - dim->n_out = n_out; - - dim->tuple_name[0] = NULL; - dim->tuple_name[1] = NULL; - - dim->nested[0] = NULL; - dim->nested[1] = NULL; - - dim->n_name = 0; - dim->names = NULL; - - return dim; -} - -struct isl_dim *isl_dim_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim) -{ - return isl_dim_alloc(ctx, nparam, 0, dim); -} - -static unsigned global_pos(struct isl_dim *dim, - enum isl_dim_type type, unsigned pos) -{ - struct isl_ctx *ctx = dim->ctx; - - switch (type) { - case isl_dim_param: - isl_assert(ctx, pos < dim->nparam, return isl_dim_total(dim)); - return pos; - case isl_dim_in: - isl_assert(ctx, pos < dim->n_in, return isl_dim_total(dim)); - return pos + dim->nparam; - case isl_dim_out: - isl_assert(ctx, pos < dim->n_out, return isl_dim_total(dim)); - return pos + dim->nparam + dim->n_in; - default: - isl_assert(ctx, 0, return isl_dim_total(dim)); - } - return isl_dim_total(dim); -} - -/* Extend length of names array to the total number of dimensions. - */ -static __isl_give isl_dim *extend_names(__isl_take isl_dim *dim) -{ - struct isl_name **names; - int i; - - if (isl_dim_total(dim) <= dim->n_name) - return dim; - - if (!dim->names) { - dim->names = isl_calloc_array(dim->ctx, - struct isl_name *, isl_dim_total(dim)); - if (!dim->names) - goto error; - } else { - names = isl_realloc_array(dim->ctx, dim->names, - struct isl_name *, isl_dim_total(dim)); - if (!names) - goto error; - dim->names = names; - for (i = dim->n_name; i < isl_dim_total(dim); ++i) - dim->names[i] = NULL; - } - - dim->n_name = isl_dim_total(dim); - - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -static struct isl_dim *set_name(struct isl_dim *dim, - enum isl_dim_type type, unsigned pos, - struct isl_name *name) -{ - struct isl_ctx *ctx = dim->ctx; - dim = isl_dim_cow(dim); - - if (!dim) - goto error; - - pos = global_pos(dim, type, pos); - if (pos == isl_dim_total(dim)) - goto error; - - if (pos >= dim->n_name) { - if (!name) - return dim; - dim = extend_names(dim); - if (!dim) - goto error; - } - - dim->names[pos] = name; - - return dim; -error: - isl_name_free(ctx, name); - isl_dim_free(dim); - return NULL; -} - -static struct isl_name *get_name(struct isl_dim *dim, - enum isl_dim_type type, unsigned pos) -{ - if (!dim) - return NULL; - - pos = global_pos(dim, type, pos); - if (pos == isl_dim_total(dim)) - return NULL; - if (pos >= dim->n_name) - return NULL; - return dim->names[pos]; -} - -static unsigned offset(struct isl_dim *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return 0; - case isl_dim_in: return dim->nparam; - case isl_dim_out: return dim->nparam + dim->n_in; - default: return 0; - } -} - -static unsigned n(struct isl_dim *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return dim->nparam; - case isl_dim_in: return dim->n_in; - case isl_dim_out: return dim->n_out; - case isl_dim_all: return dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -unsigned isl_dim_size(struct isl_dim *dim, enum isl_dim_type type) -{ - if (!dim) - return 0; - return n(dim, type); -} - -unsigned isl_dim_offset(__isl_keep isl_dim *dim, enum isl_dim_type type) -{ - if (!dim) - return 0; - return offset(dim, type); -} - -static struct isl_dim *copy_names(struct isl_dim *dst, - enum isl_dim_type dst_type, unsigned offset, struct isl_dim *src, - enum isl_dim_type src_type) -{ - int i; - struct isl_name *name; - - if (!dst) - return NULL; - - for (i = 0; i < n(src, src_type); ++i) { - name = get_name(src, src_type, i); - if (!name) - continue; - dst = set_name(dst, dst_type, offset + i, - isl_name_copy(dst->ctx, name)); - if (!dst) - return NULL; - } - return dst; -} - -struct isl_dim *isl_dim_dup(struct isl_dim *dim) -{ - struct isl_dim *dup; - if (!dim) - return NULL; - dup = isl_dim_alloc(dim->ctx, dim->nparam, dim->n_in, dim->n_out); - if (dim->tuple_name[0] && - !(dup->tuple_name[0] = isl_name_copy(dim->ctx, dim->tuple_name[0]))) - goto error; - if (dim->tuple_name[1] && - !(dup->tuple_name[1] = isl_name_copy(dim->ctx, dim->tuple_name[1]))) - goto error; - if (dim->nested[0] && !(dup->nested[0] = isl_dim_copy(dim->nested[0]))) - goto error; - if (dim->nested[1] && !(dup->nested[1] = isl_dim_copy(dim->nested[1]))) - goto error; - if (!dim->names) - return dup; - dup = copy_names(dup, isl_dim_param, 0, dim, isl_dim_param); - dup = copy_names(dup, isl_dim_in, 0, dim, isl_dim_in); - dup = copy_names(dup, isl_dim_out, 0, dim, isl_dim_out); - return dup; -error: - isl_dim_free(dup); - return NULL; -} - -struct isl_dim *isl_dim_cow(struct isl_dim *dim) -{ - if (!dim) - return NULL; - - if (dim->ref == 1) - return dim; - dim->ref--; - return isl_dim_dup(dim); -} - -struct isl_dim *isl_dim_copy(struct isl_dim *dim) -{ - if (!dim) - return NULL; - - dim->ref++; - return dim; -} - -void isl_dim_free(struct isl_dim *dim) -{ - int i; - - if (!dim) - return; - - if (--dim->ref > 0) - return; - - isl_name_free(dim->ctx, dim->tuple_name[0]); - isl_name_free(dim->ctx, dim->tuple_name[1]); - - isl_dim_free(dim->nested[0]); - isl_dim_free(dim->nested[1]); - - for (i = 0; i < dim->n_name; ++i) - isl_name_free(dim->ctx, dim->names[i]); - free(dim->names); - isl_ctx_deref(dim->ctx); - - free(dim); -} - -static int name_ok(isl_ctx *ctx, const char *s) -{ - char *p; - long dummy; - - dummy = strtol(s, &p, 0); - if (p != s) - isl_die(ctx, isl_error_invalid, "name looks like a number", - return 0); - - return 1; -} - -__isl_give isl_dim *isl_dim_set_tuple_name(__isl_take isl_dim *dim, - enum isl_dim_type type, const char *s) -{ - struct isl_name *name; - - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - if (type != isl_dim_in && type != isl_dim_out) - isl_die(dim->ctx, isl_error_invalid, - "only input, output and set tuples can have names", - goto error); - if (!s) { - name = NULL; - } else { - if (!name_ok(dim->ctx, s)) - goto error; - name = isl_name_get(dim->ctx, s); - if (!name) - goto error; - } - - isl_name_free(dim->ctx, dim->tuple_name[type - isl_dim_in]); - dim->tuple_name[type - isl_dim_in] = name; - - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -const char *isl_dim_get_tuple_name(__isl_keep isl_dim *dim, - enum isl_dim_type type) -{ - struct isl_name *name; - if (!dim) - return NULL; - if (type != isl_dim_in && type != isl_dim_out) - return NULL; - name = dim->tuple_name[type - isl_dim_in]; - return name ? name->name : NULL; -} - -struct isl_dim *isl_dim_set_name(struct isl_dim *dim, - enum isl_dim_type type, unsigned pos, - const char *s) -{ - struct isl_name *name; - - if (!dim) - return NULL; - if (!name_ok(dim->ctx, s)) - goto error; - isl_name_free(dim->ctx, get_name(dim, type, pos)); - name = isl_name_get(dim->ctx, s); - if (!name) - goto error; - return set_name(dim, type, pos, name); -error: - isl_dim_free(dim); - return NULL; -} - -const char *isl_dim_get_name(struct isl_dim *dim, - enum isl_dim_type type, unsigned pos) -{ - struct isl_name *name = get_name(dim, type, pos); - return name ? name->name : NULL; -} - -static struct isl_name *tuple_name(__isl_keep isl_dim *dim, - enum isl_dim_type type) -{ - if (!dim) - return NULL; - if (type == isl_dim_in) - return dim->tuple_name[0]; - if (type == isl_dim_out) - return dim->tuple_name[1]; - return NULL; -} - -static __isl_keep isl_dim *nested(__isl_keep isl_dim *dim, - enum isl_dim_type type) -{ - if (!dim) - return NULL; - if (type == isl_dim_in) - return dim->nested[0]; - if (type == isl_dim_out) - return dim->nested[1]; - return NULL; -} - -int isl_dim_tuple_match(__isl_keep isl_dim *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_dim *dim2, enum isl_dim_type dim2_type) -{ - struct isl_name *name1, *name2; - isl_dim *nested1, *nested2; - - if (n(dim1, dim1_type) != n(dim2, dim2_type)) - return 0; - name1 = tuple_name(dim1, dim1_type); - name2 = tuple_name(dim2, dim2_type); - if (!name1 ^ !name2) - return 0; - if (name1 && name1->name != name2->name) - return 0; - nested1 = nested(dim1, dim1_type); - nested2 = nested(dim2, dim2_type); - if (!nested1 ^ !nested2) - return 0; - if (nested1 && !isl_dim_equal(nested1, nested2)) - return 0; - return 1; -} - -static int match(struct isl_dim *dim1, enum isl_dim_type dim1_type, - struct isl_dim *dim2, enum isl_dim_type dim2_type) -{ - int i; - - if (!isl_dim_tuple_match(dim1, dim1_type, dim2, dim2_type)) - return 0; - - if (!dim1->names && !dim2->names) - return 1; - - for (i = 0; i < n(dim1, dim1_type); ++i) { - if (get_name(dim1, dim1_type, i) != - get_name(dim2, dim2_type, i)) - return 0; - } - return 1; -} - -int isl_dim_match(struct isl_dim *dim1, enum isl_dim_type dim1_type, - struct isl_dim *dim2, enum isl_dim_type dim2_type) -{ - return match(dim1, dim1_type, dim2, dim2_type); -} - -static void get_names(struct isl_dim *dim, enum isl_dim_type type, - unsigned first, unsigned n, struct isl_name **names) -{ - int i; - - for (i = 0; i < n ; ++i) - names[i] = get_name(dim, type, first+i); -} - -struct isl_dim *isl_dim_extend(struct isl_dim *dim, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - struct isl_name **names = NULL; - - if (!dim) - return NULL; - if (dim->nparam == nparam && dim->n_in == n_in && dim->n_out == n_out) - return dim; - - isl_assert(dim->ctx, dim->nparam <= nparam, goto error); - isl_assert(dim->ctx, dim->n_in <= n_in, goto error); - isl_assert(dim->ctx, dim->n_out <= n_out, goto error); - - dim = isl_dim_cow(dim); - - if (dim->names) { - names = isl_calloc_array(dim->ctx, struct isl_name *, - nparam + n_in + n_out); - if (!names) - goto error; - get_names(dim, isl_dim_param, 0, dim->nparam, names); - get_names(dim, isl_dim_in, 0, dim->n_in, names + nparam); - get_names(dim, isl_dim_out, 0, dim->n_out, - names + nparam + n_in); - free(dim->names); - dim->names = names; - dim->n_name = nparam + n_in + n_out; - } - dim->nparam = nparam; - dim->n_in = n_in; - dim->n_out = n_out; - - return dim; -error: - free(names); - isl_dim_free(dim); - return NULL; -} - -struct isl_dim *isl_dim_add(struct isl_dim *dim, enum isl_dim_type type, - unsigned n) -{ - if (!dim) - return NULL; - dim = isl_dim_reset(dim, type); - switch (type) { - case isl_dim_param: - dim = isl_dim_extend(dim, - dim->nparam + n, dim->n_in, dim->n_out); - if (dim && dim->nested[0] && - !(dim->nested[0] = isl_dim_add(dim->nested[0], - isl_dim_param, n))) - goto error; - if (dim && dim->nested[1] && - !(dim->nested[1] = isl_dim_add(dim->nested[1], - isl_dim_param, n))) - goto error; - return dim; - case isl_dim_in: - return isl_dim_extend(dim, - dim->nparam, dim->n_in + n, dim->n_out); - case isl_dim_out: - return isl_dim_extend(dim, - dim->nparam, dim->n_in, dim->n_out + n); - default: - isl_die(dim->ctx, isl_error_invalid, - "cannot add dimensions of specified type", goto error); - } -error: - isl_dim_free(dim); - return NULL; -} - -static int valid_dim_type(enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: - case isl_dim_in: - case isl_dim_out: - return 1; - default: - return 0; - } -} - -__isl_give isl_dim *isl_dim_insert(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - struct isl_name **names = NULL; - - if (!dim) - return NULL; - if (n == 0) - return isl_dim_reset(dim, type); - - if (!valid_dim_type(type)) - isl_die(dim->ctx, isl_error_invalid, - "cannot insert dimensions of specified type", - goto error); - - isl_assert(dim->ctx, pos <= isl_dim_size(dim, type), goto error); - - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - - if (dim->names) { - enum isl_dim_type t; - int off; - int s[3]; - int *size = s - isl_dim_param; - names = isl_calloc_array(dim->ctx, struct isl_name *, - dim->nparam + dim->n_in + dim->n_out + n); - if (!names) - goto error; - off = 0; - size[isl_dim_param] = dim->nparam; - size[isl_dim_in] = dim->n_in; - size[isl_dim_out] = dim->n_out; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - if (t != type) { - get_names(dim, t, 0, size[t], names + off); - off += size[t]; - } else { - get_names(dim, t, 0, pos, names + off); - off += pos + n; - get_names(dim, t, pos, size[t]-pos, names+off); - off += size[t] - pos; - } - } - free(dim->names); - dim->names = names; - dim->n_name = dim->nparam + dim->n_in + dim->n_out + n; - } - switch (type) { - case isl_dim_param: dim->nparam += n; break; - case isl_dim_in: dim->n_in += n; break; - case isl_dim_out: dim->n_out += n; break; - default: ; - } - dim = isl_dim_reset(dim, type); - - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -__isl_give isl_dim *isl_dim_move(__isl_take isl_dim *dim, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - if (!dim) - return NULL; - if (n == 0) - return dim; - - isl_assert(dim->ctx, src_pos + n <= isl_dim_size(dim, src_type), - goto error); - - if (dst_type == src_type && dst_pos == src_pos) - return dim; - - isl_assert(dim->ctx, dst_type != src_type, goto error); - - dim = isl_dim_reset(dim, src_type); - dim = isl_dim_reset(dim, dst_type); - - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - - if (dim->names) { - struct isl_name **names; - enum isl_dim_type t; - int off; - int s[3]; - int *size = s - isl_dim_param; - names = isl_calloc_array(dim->ctx, struct isl_name *, - dim->nparam + dim->n_in + dim->n_out); - if (!names) - goto error; - off = 0; - size[isl_dim_param] = dim->nparam; - size[isl_dim_in] = dim->n_in; - size[isl_dim_out] = dim->n_out; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - if (t == dst_type) { - get_names(dim, t, 0, dst_pos, names + off); - off += dst_pos; - get_names(dim, src_type, src_pos, n, names+off); - off += n; - get_names(dim, t, dst_pos, size[t] - dst_pos, - names + off); - off += size[t] - dst_pos; - } else if (t == src_type) { - get_names(dim, t, 0, src_pos, names + off); - off += src_pos; - get_names(dim, t, src_pos + n, - size[t] - src_pos - n, names + off); - off += size[t] - src_pos - n; - } else { - get_names(dim, t, 0, size[t], names + off); - off += size[t]; - } - } - free(dim->names); - dim->names = names; - dim->n_name = dim->nparam + dim->n_in + dim->n_out; - } - - switch (dst_type) { - case isl_dim_param: dim->nparam += n; break; - case isl_dim_in: dim->n_in += n; break; - case isl_dim_out: dim->n_out += n; break; - default: ; - } - - switch (src_type) { - case isl_dim_param: dim->nparam -= n; break; - case isl_dim_in: dim->n_in -= n; break; - case isl_dim_out: dim->n_out -= n; break; - default: ; - } - - if (dst_type != isl_dim_param && src_type != isl_dim_param) - return dim; - - for (i = 0; i < 2; ++i) { - if (!dim->nested[i]) - continue; - dim->nested[i] = isl_dim_replace(dim->nested[i], - isl_dim_param, dim); - if (!dim->nested[i]) - goto error; - } - - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_dim *isl_dim_join(struct isl_dim *left, struct isl_dim *right) -{ - struct isl_dim *dim; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, match(left, isl_dim_param, right, isl_dim_param), - goto error); - isl_assert(left->ctx, - isl_dim_tuple_match(left, isl_dim_out, right, isl_dim_in), - goto error); - - dim = isl_dim_alloc(left->ctx, left->nparam, left->n_in, right->n_out); - if (!dim) - goto error; - - dim = copy_names(dim, isl_dim_param, 0, left, isl_dim_param); - dim = copy_names(dim, isl_dim_in, 0, left, isl_dim_in); - dim = copy_names(dim, isl_dim_out, 0, right, isl_dim_out); - - if (dim && left->tuple_name[0] && - !(dim->tuple_name[0] = isl_name_copy(dim->ctx, left->tuple_name[0]))) - goto error; - if (dim && right->tuple_name[1] && - !(dim->tuple_name[1] = isl_name_copy(dim->ctx, right->tuple_name[1]))) - goto error; - if (dim && left->nested[0] && - !(dim->nested[0] = isl_dim_copy(left->nested[0]))) - goto error; - if (dim && right->nested[1] && - !(dim->nested[1] = isl_dim_copy(right->nested[1]))) - goto error; - - isl_dim_free(left); - isl_dim_free(right); - - return dim; -error: - isl_dim_free(left); - isl_dim_free(right); - return NULL; -} - -struct isl_dim *isl_dim_product(struct isl_dim *left, struct isl_dim *right) -{ - isl_dim *dom1, *dom2, *nest1, *nest2; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, match(left, isl_dim_param, right, isl_dim_param), - goto error); - - dom1 = isl_dim_domain(isl_dim_copy(left)); - dom2 = isl_dim_domain(isl_dim_copy(right)); - nest1 = isl_dim_wrap(isl_dim_join(isl_dim_reverse(dom1), dom2)); - - dom1 = isl_dim_range(left); - dom2 = isl_dim_range(right); - nest2 = isl_dim_wrap(isl_dim_join(isl_dim_reverse(dom1), dom2)); - - return isl_dim_join(isl_dim_reverse(nest1), nest2); -error: - isl_dim_free(left); - isl_dim_free(right); - return NULL; -} - -__isl_give isl_dim *isl_dim_range_product(__isl_take isl_dim *left, - __isl_take isl_dim *right) -{ - isl_dim *dom, *ran1, *ran2, *nest; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, match(left, isl_dim_param, right, isl_dim_param), - goto error); - if (!isl_dim_match(left, isl_dim_in, right, isl_dim_in)) - isl_die(left->ctx, isl_error_invalid, - "domains need to match", goto error); - - dom = isl_dim_domain(isl_dim_copy(left)); - - ran1 = isl_dim_range(left); - ran2 = isl_dim_range(right); - nest = isl_dim_wrap(isl_dim_join(isl_dim_reverse(ran1), ran2)); - - return isl_dim_join(isl_dim_reverse(dom), nest); -error: - isl_dim_free(left); - isl_dim_free(right); - return NULL; -} - -__isl_give isl_dim *isl_dim_map_from_set(__isl_take isl_dim *dim) -{ - struct isl_name **names = NULL; - - if (!dim) - return NULL; - isl_assert(dim->ctx, dim->n_in == 0, goto error); - if (dim->n_out == 0 && !isl_dim_is_named_or_nested(dim, isl_dim_out)) - return dim; - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - if (dim->names) { - names = isl_calloc_array(dim->ctx, struct isl_name *, - dim->nparam + dim->n_out + dim->n_out); - if (!names) - goto error; - get_names(dim, isl_dim_param, 0, dim->nparam, names); - get_names(dim, isl_dim_out, 0, dim->n_out, names + dim->nparam); - } - dim->n_in = dim->n_out; - if (names) { - free(dim->names); - dim->names = names; - dim->n_name = dim->nparam + dim->n_out + dim->n_out; - dim = copy_names(dim, isl_dim_out, 0, dim, isl_dim_in); - } - isl_name_free(dim->ctx, dim->tuple_name[0]); - dim->tuple_name[0] = isl_name_copy(dim->ctx, dim->tuple_name[1]); - isl_dim_free(dim->nested[0]); - dim->nested[0] = isl_dim_copy(dim->nested[1]); - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -static struct isl_dim *set_names(struct isl_dim *dim, enum isl_dim_type type, - unsigned first, unsigned n, struct isl_name **names) -{ - int i; - - for (i = 0; i < n ; ++i) - dim = set_name(dim, type, first+i, names[i]); - - return dim; -} - -struct isl_dim *isl_dim_reverse(struct isl_dim *dim) -{ - unsigned t; - isl_dim *nested; - struct isl_name **names = NULL; - struct isl_name *name; - - if (!dim) - return NULL; - if (match(dim, isl_dim_in, dim, isl_dim_out)) - return dim; - - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - - name = dim->tuple_name[0]; - dim->tuple_name[0] = dim->tuple_name[1]; - dim->tuple_name[1] = name; - - nested = dim->nested[0]; - dim->nested[0] = dim->nested[1]; - dim->nested[1] = nested; - - if (dim->names) { - names = isl_alloc_array(dim->ctx, struct isl_name *, - dim->n_in + dim->n_out); - if (!names) - goto error; - get_names(dim, isl_dim_in, 0, dim->n_in, names); - get_names(dim, isl_dim_out, 0, dim->n_out, names + dim->n_in); - } - - t = dim->n_in; - dim->n_in = dim->n_out; - dim->n_out = t; - - if (dim->names) { - dim = set_names(dim, isl_dim_out, 0, dim->n_out, names); - dim = set_names(dim, isl_dim_in, 0, dim->n_in, names + dim->n_out); - free(names); - } - - return dim; -error: - free(names); - isl_dim_free(dim); - return NULL; -} - -struct isl_dim *isl_dim_drop(struct isl_dim *dim, enum isl_dim_type type, - unsigned first, unsigned num) -{ - int i; - - if (!dim) - return NULL; - - if (num == 0) - return isl_dim_reset(dim, type); - - if (!valid_dim_type(type)) - isl_die(dim->ctx, isl_error_invalid, - "cannot drop dimensions of specified type", goto error); - - isl_assert(dim->ctx, first + num <= n(dim, type), goto error); - dim = isl_dim_cow(dim); - if (!dim) - goto error; - if (dim->names) { - dim = extend_names(dim); - if (!dim) - goto error; - for (i = 0; i < num; ++i) - isl_name_free(dim->ctx, get_name(dim, type, first+i)); - for (i = first+num; i < n(dim, type); ++i) - set_name(dim, type, i - num, get_name(dim, type, i)); - switch (type) { - case isl_dim_param: - get_names(dim, isl_dim_in, 0, dim->n_in, - dim->names + offset(dim, isl_dim_in) - num); - case isl_dim_in: - get_names(dim, isl_dim_out, 0, dim->n_out, - dim->names + offset(dim, isl_dim_out) - num); - default: - ; - } - dim->n_name -= num; - } - switch (type) { - case isl_dim_param: dim->nparam -= num; break; - case isl_dim_in: dim->n_in -= num; break; - case isl_dim_out: dim->n_out -= num; break; - default: ; - } - dim = isl_dim_reset(dim, type); - if (type == isl_dim_param) { - if (dim && dim->nested[0] && - !(dim->nested[0] = isl_dim_drop(dim->nested[0], - isl_dim_param, first, num))) - goto error; - if (dim && dim->nested[1] && - !(dim->nested[1] = isl_dim_drop(dim->nested[1], - isl_dim_param, first, num))) - goto error; - } - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_dim *isl_dim_drop_inputs(struct isl_dim *dim, - unsigned first, unsigned n) -{ - if (!dim) - return NULL; - return isl_dim_drop(dim, isl_dim_in, first, n); -} - -struct isl_dim *isl_dim_drop_outputs(struct isl_dim *dim, - unsigned first, unsigned n) -{ - if (!dim) - return NULL; - return isl_dim_drop(dim, isl_dim_out, first, n); -} - -struct isl_dim *isl_dim_domain(struct isl_dim *dim) -{ - if (!dim) - return NULL; - dim = isl_dim_drop_outputs(dim, 0, dim->n_out); - return isl_dim_reverse(dim); -} - -__isl_give isl_dim *isl_dim_from_domain(__isl_take isl_dim *dim) -{ - return isl_dim_reverse(dim); -} - -struct isl_dim *isl_dim_range(struct isl_dim *dim) -{ - if (!dim) - return NULL; - return isl_dim_drop_inputs(dim, 0, dim->n_in); -} - -__isl_give isl_dim *isl_dim_from_range(__isl_take isl_dim *dim) -{ - return dim; -} - -__isl_give isl_dim *isl_dim_as_set_dim(__isl_take isl_dim *dim) -{ - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - - dim->n_out += dim->n_in; - dim->n_in = 0; - dim = isl_dim_reset(dim, isl_dim_in); - dim = isl_dim_reset(dim, isl_dim_out); - - return dim; -} - -struct isl_dim *isl_dim_underlying(struct isl_dim *dim, unsigned n_div) -{ - int i; - - if (!dim) - return NULL; - if (n_div == 0 && - dim->nparam == 0 && dim->n_in == 0 && dim->n_name == 0) - return isl_dim_reset(isl_dim_reset(dim, isl_dim_in), isl_dim_out); - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - dim->n_out += dim->nparam + dim->n_in + n_div; - dim->nparam = 0; - dim->n_in = 0; - - for (i = 0; i < dim->n_name; ++i) - isl_name_free(dim->ctx, get_name(dim, isl_dim_out, i)); - dim->n_name = 0; - dim = isl_dim_reset(dim, isl_dim_in); - dim = isl_dim_reset(dim, isl_dim_out); - - return dim; -} - -unsigned isl_dim_total(struct isl_dim *dim) -{ - return dim ? dim->nparam + dim->n_in + dim->n_out : 0; -} - -int isl_dim_equal(struct isl_dim *dim1, struct isl_dim *dim2) -{ - return match(dim1, isl_dim_param, dim2, isl_dim_param) && - isl_dim_tuple_match(dim1, isl_dim_in, dim2, isl_dim_in) && - isl_dim_tuple_match(dim1, isl_dim_out, dim2, isl_dim_out); -} - -int isl_dim_compatible(struct isl_dim *dim1, struct isl_dim *dim2) -{ - return dim1->nparam == dim2->nparam && - dim1->n_in + dim1->n_out == dim2->n_in + dim2->n_out; -} - -static uint32_t isl_hash_dim(uint32_t hash, __isl_keep isl_dim *dim) -{ - int i; - struct isl_name *name; - - if (!dim) - return hash; - - hash = isl_hash_builtin(hash, dim->nparam); - hash = isl_hash_builtin(hash, dim->n_in); - hash = isl_hash_builtin(hash, dim->n_out); - - for (i = 0; i < dim->nparam; ++i) { - name = get_name(dim, isl_dim_param, i); - hash = isl_hash_name(hash, name); - } - - name = tuple_name(dim, isl_dim_in); - hash = isl_hash_name(hash, name); - name = tuple_name(dim, isl_dim_out); - hash = isl_hash_name(hash, name); - - hash = isl_hash_dim(hash, dim->nested[0]); - hash = isl_hash_dim(hash, dim->nested[1]); - - return hash; -} - -uint32_t isl_dim_get_hash(__isl_keep isl_dim *dim) -{ - uint32_t hash; - - if (!dim) - return 0; - - hash = isl_hash_init(); - hash = isl_hash_dim(hash, dim); - - return hash; -} - -int isl_dim_is_wrapping(__isl_keep isl_dim *dim) -{ - if (!dim) - return -1; - - if (dim->n_in != 0 || dim->tuple_name[0] || dim->nested[0]) - return 0; - - return dim->nested[1] != NULL; -} - -__isl_give isl_dim *isl_dim_wrap(__isl_take isl_dim *dim) -{ - isl_dim *wrap; - - if (!dim) - return NULL; - - wrap = isl_dim_alloc(dim->ctx, dim->nparam, 0, dim->n_in + dim->n_out); - - wrap = copy_names(wrap, isl_dim_param, 0, dim, isl_dim_param); - wrap = copy_names(wrap, isl_dim_set, 0, dim, isl_dim_in); - wrap = copy_names(wrap, isl_dim_set, dim->n_in, dim, isl_dim_out); - - if (!wrap) - goto error; - - wrap->nested[1] = dim; - - return wrap; -error: - isl_dim_free(dim); - return NULL; -} - -__isl_give isl_dim *isl_dim_unwrap(__isl_take isl_dim *dim) -{ - isl_dim *unwrap; - - if (!dim) - return NULL; - - if (!isl_dim_is_wrapping(dim)) - isl_die(dim->ctx, isl_error_invalid, "not a wrapping dim", - goto error); - - unwrap = isl_dim_copy(dim->nested[1]); - isl_dim_free(dim); - - return unwrap; -error: - isl_dim_free(dim); - return NULL; -} - -int isl_dim_is_named_or_nested(__isl_keep isl_dim *dim, enum isl_dim_type type) -{ - if (type != isl_dim_in && type != isl_dim_out) - return 0; - if (!dim) - return -1; - if (dim->tuple_name[type - isl_dim_in]) - return 1; - if (dim->nested[type - isl_dim_in]) - return 1; - return 0; -} - -int isl_dim_may_be_set(__isl_keep isl_dim *dim) -{ - if (!dim) - return -1; - if (isl_dim_size(dim, isl_dim_in) != 0) - return 0; - if (isl_dim_is_named_or_nested(dim, isl_dim_in)) - return 0; - return 1; -} - -__isl_give isl_dim *isl_dim_reset(__isl_take isl_dim *dim, - enum isl_dim_type type) -{ - if (!isl_dim_is_named_or_nested(dim, type)) - return dim; - - dim = isl_dim_cow(dim); - if (!dim) - return NULL; - - isl_name_free(dim->ctx, dim->tuple_name[type - isl_dim_in]); - dim->tuple_name[type - isl_dim_in] = NULL; - isl_dim_free(dim->nested[type - isl_dim_in]); - dim->nested[type - isl_dim_in] = NULL; - - return dim; -} - -__isl_give isl_dim *isl_dim_flatten(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - if (!dim->nested[0] && !dim->nested[1]) - return dim; - - if (dim->nested[0]) - dim = isl_dim_reset(dim, isl_dim_in); - if (dim && dim->nested[1]) - dim = isl_dim_reset(dim, isl_dim_out); - - return dim; -} - -__isl_give isl_dim *isl_dim_flatten_range(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - if (!dim->nested[1]) - return dim; - - return isl_dim_reset(dim, isl_dim_out); -} - -/* Replace the dimensions of the given type of dst by those of src. - */ -__isl_give isl_dim *isl_dim_replace(__isl_take isl_dim *dst, - enum isl_dim_type type, __isl_keep isl_dim *src) -{ - dst = isl_dim_cow(dst); - - if (!dst || !src) - goto error; - - dst = isl_dim_drop(dst, type, 0, isl_dim_size(dst, type)); - dst = isl_dim_add(dst, type, isl_dim_size(src, type)); - dst = copy_names(dst, type, 0, src, type); - - if (dst && type == isl_dim_param) { - int i; - for (i = 0; i <= 1; ++i) { - if (!dst->nested[i]) - continue; - dst->nested[i] = isl_dim_replace(dst->nested[i], - type, src); - if (!dst->nested[i]) - goto error; - } - } - - return dst; -error: - isl_dim_free(dst); - return NULL; -} - -/* Given a dimension specification "dim" of a set, create a dimension - * specification for the lift of the set. In particular, the result - * is of the form [dim -> local[..]], with n_local variables in the - * range of the wrapped map. - */ -__isl_give isl_dim *isl_dim_lift(__isl_take isl_dim *dim, unsigned n_local) -{ - isl_dim *local_dim; - - if (!dim) - return NULL; - - local_dim = isl_dim_dup(dim); - local_dim = isl_dim_drop(local_dim, isl_dim_set, 0, dim->n_out); - local_dim = isl_dim_add(local_dim, isl_dim_set, n_local); - local_dim = isl_dim_set_tuple_name(local_dim, isl_dim_set, "local"); - dim = isl_dim_join(isl_dim_from_domain(dim), - isl_dim_from_range(local_dim)); - dim = isl_dim_wrap(dim); - dim = isl_dim_set_tuple_name(dim, isl_dim_set, "lifted"); - - return dim; -} - -int isl_dim_can_zip(__isl_keep isl_dim *dim) -{ - if (!dim) - return -1; - - return dim->nested[0] && dim->nested[1]; -} - -__isl_give isl_dim *isl_dim_zip(__isl_take isl_dim *dim) -{ - isl_dim *dom, *ran; - isl_dim *dom_dom, *dom_ran, *ran_dom, *ran_ran; - - if (!isl_dim_can_zip(dim)) - isl_die(dim->ctx, isl_error_invalid, "dim cannot be zipped", - goto error); - - if (!dim) - return 0; - dom = isl_dim_unwrap(isl_dim_domain(isl_dim_copy(dim))); - ran = isl_dim_unwrap(isl_dim_range(dim)); - dom_dom = isl_dim_domain(isl_dim_copy(dom)); - dom_ran = isl_dim_range(dom); - ran_dom = isl_dim_domain(isl_dim_copy(ran)); - ran_ran = isl_dim_range(ran); - dom = isl_dim_join(isl_dim_from_domain(dom_dom), - isl_dim_from_range(ran_dom)); - ran = isl_dim_join(isl_dim_from_domain(dom_ran), - isl_dim_from_range(ran_ran)); - return isl_dim_join(isl_dim_from_domain(isl_dim_wrap(dom)), - isl_dim_from_range(isl_dim_wrap(ran))); -error: - isl_dim_free(dim); - return NULL; -} - -int isl_dim_has_named_params(__isl_keep isl_dim *dim) -{ - int i; - unsigned off; - - if (!dim) - return -1; - if (dim->nparam == 0) - return 1; - off = isl_dim_offset(dim, isl_dim_param); - if (off + dim->nparam > dim->n_name) - return 0; - for (i = 0; i < dim->nparam; ++i) - if (!dim->names[off + i]) - return 0; - return 1; -} - -/* Align the initial parameters of dim1 to match the order in dim2. - */ -__isl_give isl_dim *isl_dim_align_params(__isl_take isl_dim *dim1, - __isl_take isl_dim *dim2) -{ - isl_reordering *exp; - - if (!isl_dim_has_named_params(dim1) || !isl_dim_has_named_params(dim2)) - isl_die(isl_dim_get_ctx(dim1), isl_error_invalid, - "parameter alignment requires named parameters", - goto error); - - exp = isl_parameter_alignment_reordering(dim1, dim2); - isl_dim_free(dim1); - isl_dim_free(dim2); - if (!exp) - return NULL; - dim1 = isl_dim_copy(exp->dim); - isl_reordering_free(exp); - return dim1; -error: - isl_dim_free(dim1); - isl_dim_free(dim2); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_dim_map.c b/cloog-0.16.3/isl/isl_dim_map.c deleted file mode 100644 index ab3d30346129029e1a26b4f3e8ea4e9f036e57db..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_dim_map.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010-2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include - -struct isl_dim_map_entry { - int pos; - int sgn; -}; - -/* Maps dst positions to src positions */ -struct isl_dim_map { - unsigned len; - struct isl_dim_map_entry m[1]; -}; - -__isl_give isl_dim_map *isl_dim_map_alloc(isl_ctx *ctx, unsigned len) -{ - int i; - struct isl_dim_map *dim_map; - dim_map = isl_alloc(ctx, struct isl_dim_map, - sizeof(struct isl_dim_map) + len * sizeof(struct isl_dim_map_entry)); - if (!dim_map) - return NULL; - dim_map->len = 1 + len; - dim_map->m[0].pos = 0; - dim_map->m[0].sgn = 1; - for (i = 0; i < len; ++i) - dim_map->m[1 + i].sgn = 0; - return dim_map; -} - -void isl_dim_map_range(__isl_keep isl_dim_map *dim_map, - unsigned dst_pos, unsigned dst_stride, - unsigned src_pos, unsigned src_stride, - unsigned n, int sign) -{ - int i; - - if (!dim_map) - return; - - for (i = 0; i < n; ++i) { - unsigned d = 1 + dst_pos + dst_stride * i; - unsigned s = 1 + src_pos + src_stride * i; - dim_map->m[d].pos = s; - dim_map->m[d].sgn = sign; - } -} - -void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map, - struct isl_dim *dim, enum isl_dim_type type, - unsigned first, unsigned n, unsigned dst_pos) -{ - int i; - unsigned src_pos; - - if (!dim_map || !dim) - return; - - src_pos = 1 + isl_dim_offset(dim, type); - for (i = 0; i < n; ++i) { - dim_map->m[1 + dst_pos + i].pos = src_pos + first + i; - dim_map->m[1 + dst_pos + i].sgn = 1; - } -} - -void isl_dim_map_dim(__isl_keep isl_dim_map *dim_map, __isl_keep isl_dim *dim, - enum isl_dim_type type, unsigned dst_pos) -{ - isl_dim_map_dim_range(dim_map, dim, type, - 0, isl_dim_size(dim, type), dst_pos); -} - -void isl_dim_map_div(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap, unsigned dst_pos) -{ - int i; - unsigned src_pos; - - if (!dim_map || !bmap) - return; - - src_pos = 1 + isl_dim_total(bmap->dim); - for (i = 0; i < bmap->n_div; ++i) { - dim_map->m[1 + dst_pos + i].pos = src_pos + i; - dim_map->m[1 + dst_pos + i].sgn = 1; - } -} - -void isl_dim_map_dump(struct isl_dim_map *dim_map) -{ - int i; - - for (i = 0; i < dim_map->len; ++i) - fprintf(stderr, "%d -> %d * %d; ", i, - dim_map->m[i].sgn, dim_map->m[i].pos); - fprintf(stderr, "\n"); -} - -static void copy_constraint_dim_map(isl_int *dst, isl_int *src, - struct isl_dim_map *dim_map) -{ - int i; - - for (i = 0; i < dim_map->len; ++i) { - if (dim_map->m[i].sgn == 0) - isl_int_set_si(dst[i], 0); - else if (dim_map->m[i].sgn > 0) - isl_int_set(dst[i], src[dim_map->m[i].pos]); - else - isl_int_neg(dst[i], src[dim_map->m[i].pos]); - } -} - -static void copy_div_dim_map(isl_int *dst, isl_int *src, - struct isl_dim_map *dim_map) -{ - isl_int_set(dst[0], src[0]); - copy_constraint_dim_map(dst+1, src+1, dim_map); -} - -__isl_give isl_basic_map *isl_basic_map_add_constraints_dim_map( - __isl_take isl_basic_map *dst, __isl_take isl_basic_map *src, - __isl_take isl_dim_map *dim_map) -{ - int i; - - if (!src || !dst || !dim_map) - goto error; - - for (i = 0; i < src->n_eq; ++i) { - int i1 = isl_basic_map_alloc_equality(dst); - if (i1 < 0) - goto error; - copy_constraint_dim_map(dst->eq[i1], src->eq[i], dim_map); - } - - for (i = 0; i < src->n_ineq; ++i) { - int i1 = isl_basic_map_alloc_inequality(dst); - if (i1 < 0) - goto error; - copy_constraint_dim_map(dst->ineq[i1], src->ineq[i], dim_map); - } - - for (i = 0; i < src->n_div; ++i) { - int i1 = isl_basic_map_alloc_div(dst); - if (i1 < 0) - goto error; - copy_div_dim_map(dst->div[i1], src->div[i], dim_map); - } - - free(dim_map); - isl_basic_map_free(src); - - return dst; -error: - free(dim_map); - isl_basic_map_free(src); - isl_basic_map_free(dst); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_add_constraints_dim_map( - __isl_take isl_basic_set *dst, __isl_take isl_basic_set *src, - __isl_take isl_dim_map *dim_map) -{ - return isl_basic_map_add_constraints_dim_map(dst, src, dim_map); -} - -/* Extend the given dim_map with mappings for the divs in bmap. - */ -__isl_give isl_dim_map *isl_dim_map_extend(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap) -{ - int i; - struct isl_dim_map *res; - int offset; - - offset = isl_basic_map_offset(bmap, isl_dim_div); - - res = isl_dim_map_alloc(bmap->ctx, dim_map->len - 1 + bmap->n_div); - if (!res) - return NULL; - - for (i = 0; i < dim_map->len; ++i) - res->m[i] = dim_map->m[i]; - for (i = 0; i < bmap->n_div; ++i) { - res->m[dim_map->len + i].pos = offset + i; - res->m[dim_map->len + i].sgn = 1; - } - - return res; -} - -/* Extract a dim_map from a reordering. - * We essentially need to reverse the mapping, and add an offset - * of 1 for the constant term. - */ -__isl_give isl_dim_map *isl_dim_map_from_reordering( - __isl_keep isl_reordering *exp) -{ - int i; - isl_ctx *ctx; - struct isl_dim_map *dim_map; - - if (!exp) - return NULL; - - ctx = isl_dim_get_ctx(exp->dim); - dim_map = isl_dim_map_alloc(ctx, isl_dim_total(exp->dim)); - if (!dim_map) - return NULL; - - for (i = 0; i < exp->len; ++i) { - dim_map->m[1 + exp->pos[i]].pos = 1 + i; - dim_map->m[1 + exp->pos[i]].sgn = 1; - } - - return dim_map; -} diff --git a/cloog-0.16.3/isl/isl_dim_map.h b/cloog-0.16.3/isl/isl_dim_map.h deleted file mode 100644 index 0dcdc7320ec074d409ca9dd29a783b7f54979167..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_dim_map.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ISL_DIM_MAP_H -#define ISL_DIM_MAP_H - -#include -#include -#include - -struct isl_dim_map; -typedef struct isl_dim_map isl_dim_map; - -__isl_give isl_dim_map *isl_dim_map_alloc(isl_ctx *ctx, unsigned len); -void isl_dim_map_range(__isl_keep isl_dim_map *dim_map, - unsigned dst_pos, unsigned dst_stride, - unsigned src_pos, unsigned src_stride, - unsigned n, int sign); -void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map, - struct isl_dim *dim, enum isl_dim_type type, - unsigned first, unsigned n, unsigned dst_pos); -void isl_dim_map_dim(__isl_keep isl_dim_map *dim_map, __isl_keep isl_dim *dim, - enum isl_dim_type type, unsigned dst_pos); -void isl_dim_map_div(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap, unsigned dst_pos); -__isl_give isl_basic_set *isl_basic_set_add_constraints_dim_map( - __isl_take isl_basic_set *dst, __isl_take isl_basic_set *src, - __isl_take isl_dim_map *dim_map); -__isl_give isl_basic_map *isl_basic_map_add_constraints_dim_map( - __isl_take isl_basic_map *dst, __isl_take isl_basic_map *src, - __isl_take isl_dim_map *dim_map); - -__isl_give isl_dim_map *isl_dim_map_extend(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap); - -__isl_give isl_dim_map *isl_dim_map_from_reordering( - __isl_keep isl_reordering *exp); - -#endif diff --git a/cloog-0.16.3/isl/isl_dim_private.h b/cloog-0.16.3/isl/isl_dim_private.h deleted file mode 100644 index c9e5ca8a3800e101f8bcf54266841d90025d2567..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_dim_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include - -struct isl_name; -struct isl_dim { - int ref; - - struct isl_ctx *ctx; - - unsigned nparam; - unsigned n_in; /* zero for sets */ - unsigned n_out; /* dim for sets */ - - struct isl_name *tuple_name[2]; - struct isl_dim *nested[2]; - - unsigned n_name; - struct isl_name **names; -}; - -uint32_t isl_dim_get_hash(__isl_keep isl_dim *dim); - -__isl_give isl_dim *isl_dim_as_set_dim(__isl_take isl_dim *dim); - -unsigned isl_dim_offset(__isl_keep isl_dim *dim, enum isl_dim_type type); - -int isl_dim_may_be_set(__isl_keep isl_dim *dim); -int isl_dim_is_named_or_nested(__isl_keep isl_dim *dim, enum isl_dim_type type); -int isl_dim_has_named_params(__isl_keep isl_dim *dim); -__isl_give isl_dim *isl_dim_reset(__isl_take isl_dim *dim, - enum isl_dim_type type); -__isl_give isl_dim *isl_dim_flatten(__isl_take isl_dim *dim); -__isl_give isl_dim *isl_dim_flatten_range(__isl_take isl_dim *dim); - -__isl_give isl_dim *isl_dim_replace(__isl_take isl_dim *dst, - enum isl_dim_type type, __isl_keep isl_dim *src); - -__isl_give isl_dim *isl_dim_lift(__isl_take isl_dim *dim, unsigned n_local); diff --git a/cloog-0.16.3/isl/isl_div.c b/cloog-0.16.3/isl/isl_div.c deleted file mode 100644 index a04646f043e6f04e9c84bf6759628853ebb22148..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_div.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_div_get_ctx(__isl_keep isl_div *div) -{ - return div ? div->ctx : NULL; -} - -static unsigned n(struct isl_div *d, enum isl_dim_type type) -{ - struct isl_dim *dim = d->bmap->dim; - switch (type) { - case isl_dim_param: return dim->nparam; - case isl_dim_in: return dim->n_in; - case isl_dim_out: return dim->n_out; - case isl_dim_div: return d->bmap->n_div; - default: return 0; - } -} - -unsigned isl_div_dim(__isl_keep isl_div *div, enum isl_dim_type type) -{ - return n(div, type); -} - -static unsigned offset(struct isl_div *d, enum isl_dim_type type) -{ - struct isl_dim *dim = d->bmap->dim; - switch (type) { - case isl_dim_param: return 1 + 1; - case isl_dim_in: return 1 + 1 + dim->nparam; - case isl_dim_out: return 1 + 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -struct isl_div *isl_basic_map_div(struct isl_basic_map *bmap, int pos) -{ - struct isl_div *div; - - if (!bmap) - goto error; - - isl_assert(bmap->ctx, pos < bmap->n_div, goto error); - - div = isl_alloc_type(bmap->ctx, struct isl_div); - if (!div) - goto error; - - div->ctx = bmap->ctx; - isl_ctx_ref(div->ctx); - div->ref = 1; - div->bmap = bmap; - div->line = &bmap->div[pos]; - - return div; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_div *isl_basic_set_div(struct isl_basic_set *bset, int pos) -{ - return isl_basic_map_div((struct isl_basic_map *)bset, pos); -} - -__isl_give isl_div *isl_div_div(__isl_take isl_div *div, int pos) -{ - isl_basic_map *bmap; - if (!div) - return NULL; - bmap = isl_basic_map_copy(div->bmap); - isl_div_free(div); - return isl_basic_map_div(bmap, pos); -} - -struct isl_div *isl_div_alloc(struct isl_dim *dim) -{ - struct isl_basic_map *bmap; - - if (!dim) - return NULL; - - bmap = isl_basic_map_alloc_dim(dim, 1, 0, 0); - if (!bmap) - return NULL; - - isl_basic_map_alloc_div(bmap); - isl_seq_clr(bmap->div[0], 1 + 1 + isl_basic_map_total_dim(bmap)); - return isl_basic_map_div(bmap, 0); -} - -__isl_give isl_div *isl_div_copy(__isl_keep isl_div *div) -{ - if (!div) - return NULL; - - div->ref++; - return div; -} - -void isl_div_free(struct isl_div *c) -{ - if (!c) - return; - - if (--c->ref > 0) - return; - - isl_basic_map_free(c->bmap); - isl_ctx_deref(c->ctx); - free(c); -} - -void isl_div_get_constant(struct isl_div *div, isl_int *v) -{ - if (!div) - return; - isl_int_set(*v, div->line[0][1]); -} - -void isl_div_get_denominator(struct isl_div *div, isl_int *v) -{ - if (!div) - return; - isl_int_set(*v, div->line[0][0]); -} - -void isl_div_get_coefficient(struct isl_div *div, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!div) - return; - - isl_assert(div->ctx, pos < n(div, type), return); - isl_int_set(*v, div->line[0][offset(div, type) + pos]); -} - -void isl_div_set_constant(struct isl_div *div, isl_int v) -{ - if (!div) - return; - isl_int_set(div->line[0][1], v); -} - -void isl_div_set_denominator(struct isl_div *div, isl_int v) -{ - if (!div) - return; - isl_int_set(div->line[0][0], v); -} - -void isl_div_set_coefficient(struct isl_div *div, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!div) - return; - - isl_assert(div->ctx, pos < n(div, type), return); - isl_int_set(div->line[0][offset(div, type) + pos], v); -} - -__isl_give isl_aff *isl_aff_from_div(__isl_take isl_div *div) -{ - isl_aff *aff; - int pos; - - if (!div) - return NULL; - - pos = div->line - div->bmap->div; - aff = isl_aff_zero(isl_basic_map_get_local_space(div->bmap)); - aff = isl_aff_set_coefficient_si(aff, isl_dim_div, pos, 1); - - isl_div_free(div); - return aff; -} diff --git a/cloog-0.16.3/isl/isl_div_private.h b/cloog-0.16.3/isl/isl_div_private.h deleted file mode 100644 index f0a88f909f2aa13a2e83d9d045d98b056a39815a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_div_private.h +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -struct isl_div { - int ref; - struct isl_ctx *ctx; - - struct isl_basic_map *bmap; - isl_int **line; -}; diff --git a/cloog-0.16.3/isl/isl_equalities.c b/cloog-0.16.3/isl/isl_equalities.c deleted file mode 100644 index 68d2c89a6cdaa8aead8580b9ee0ac6bede0e4622..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_equalities.c +++ /dev/null @@ -1,697 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_map_private.h" -#include "isl_equalities.h" - -/* Given a set of modulo constraints - * - * c + A y = 0 mod d - * - * this function computes a particular solution y_0 - * - * The input is given as a matrix B = [ c A ] and a vector d. - * - * The output is matrix containing the solution y_0 or - * a zero-column matrix if the constraints admit no integer solution. - * - * The given set of constrains is equivalent to - * - * c + A y = -D x - * - * with D = diag d and x a fresh set of variables. - * Reducing both c and A modulo d does not change the - * value of y in the solution and may lead to smaller coefficients. - * Let M = [ D A ] and [ H 0 ] = M U, the Hermite normal form of M. - * Then - * [ x ] - * M [ y ] = - c - * and so - * [ x ] - * [ H 0 ] U^{-1} [ y ] = - c - * Let - * [ A ] [ x ] - * [ B ] = U^{-1} [ y ] - * then - * H A + 0 B = -c - * - * so B may be chosen arbitrarily, e.g., B = 0, and then - * - * [ x ] = [ -c ] - * U^{-1} [ y ] = [ 0 ] - * or - * [ x ] [ -c ] - * [ y ] = U [ 0 ] - * specifically, - * - * y = U_{2,1} (-c) - * - * If any of the coordinates of this y are non-integer - * then the constraints admit no integer solution and - * a zero-column matrix is returned. - */ -static struct isl_mat *particular_solution(struct isl_mat *B, struct isl_vec *d) -{ - int i, j; - struct isl_mat *M = NULL; - struct isl_mat *C = NULL; - struct isl_mat *U = NULL; - struct isl_mat *H = NULL; - struct isl_mat *cst = NULL; - struct isl_mat *T = NULL; - - M = isl_mat_alloc(B->ctx, B->n_row, B->n_row + B->n_col - 1); - C = isl_mat_alloc(B->ctx, 1 + B->n_row, 1); - if (!M || !C) - goto error; - isl_int_set_si(C->row[0][0], 1); - for (i = 0; i < B->n_row; ++i) { - isl_seq_clr(M->row[i], B->n_row); - isl_int_set(M->row[i][i], d->block.data[i]); - isl_int_neg(C->row[1 + i][0], B->row[i][0]); - isl_int_fdiv_r(C->row[1+i][0], C->row[1+i][0], M->row[i][i]); - for (j = 0; j < B->n_col - 1; ++j) - isl_int_fdiv_r(M->row[i][B->n_row + j], - B->row[i][1 + j], M->row[i][i]); - } - M = isl_mat_left_hermite(M, 0, &U, NULL); - if (!M || !U) - goto error; - H = isl_mat_sub_alloc(M, 0, B->n_row, 0, B->n_row); - H = isl_mat_lin_to_aff(H); - C = isl_mat_inverse_product(H, C); - if (!C) - goto error; - for (i = 0; i < B->n_row; ++i) { - if (!isl_int_is_divisible_by(C->row[1+i][0], C->row[0][0])) - break; - isl_int_divexact(C->row[1+i][0], C->row[1+i][0], C->row[0][0]); - } - if (i < B->n_row) - cst = isl_mat_alloc(B->ctx, B->n_row, 0); - else - cst = isl_mat_sub_alloc(C, 1, B->n_row, 0, 1); - T = isl_mat_sub_alloc(U, B->n_row, B->n_col - 1, 0, B->n_row); - cst = isl_mat_product(T, cst); - isl_mat_free(M); - isl_mat_free(C); - isl_mat_free(U); - return cst; -error: - isl_mat_free(M); - isl_mat_free(C); - isl_mat_free(U); - return NULL; -} - -/* Compute and return the matrix - * - * U_1^{-1} diag(d_1, 1, ..., 1) - * - * with U_1 the unimodular completion of the first (and only) row of B. - * The columns of this matrix generate the lattice that satisfies - * the single (linear) modulo constraint. - */ -static struct isl_mat *parameter_compression_1( - struct isl_mat *B, struct isl_vec *d) -{ - struct isl_mat *U; - - U = isl_mat_alloc(B->ctx, B->n_col - 1, B->n_col - 1); - if (!U) - return NULL; - isl_seq_cpy(U->row[0], B->row[0] + 1, B->n_col - 1); - U = isl_mat_unimodular_complete(U, 1); - U = isl_mat_right_inverse(U); - if (!U) - return NULL; - isl_mat_col_mul(U, 0, d->block.data[0], 0); - U = isl_mat_lin_to_aff(U); - return U; -} - -/* Compute a common lattice of solutions to the linear modulo - * constraints specified by B and d. - * See also the documentation of isl_mat_parameter_compression. - * We put the matrix - * - * A = [ L_1^{-T} L_2^{-T} ... L_k^{-T} ] - * - * on a common denominator. This denominator D is the lcm of modulos d. - * Since L_i = U_i^{-1} diag(d_i, 1, ... 1), we have - * L_i^{-T} = U_i^T diag(d_i, 1, ... 1)^{-T} = U_i^T diag(1/d_i, 1, ..., 1). - * Putting this on the common denominator, we have - * D * L_i^{-T} = U_i^T diag(D/d_i, D, ..., D). - */ -static struct isl_mat *parameter_compression_multi( - struct isl_mat *B, struct isl_vec *d) -{ - int i, j, k; - isl_int D; - struct isl_mat *A = NULL, *U = NULL; - struct isl_mat *T; - unsigned size; - - isl_int_init(D); - - isl_vec_lcm(d, &D); - - size = B->n_col - 1; - A = isl_mat_alloc(B->ctx, size, B->n_row * size); - U = isl_mat_alloc(B->ctx, size, size); - if (!U || !A) - goto error; - for (i = 0; i < B->n_row; ++i) { - isl_seq_cpy(U->row[0], B->row[i] + 1, size); - U = isl_mat_unimodular_complete(U, 1); - if (!U) - goto error; - isl_int_divexact(D, D, d->block.data[i]); - for (k = 0; k < U->n_col; ++k) - isl_int_mul(A->row[k][i*size+0], D, U->row[0][k]); - isl_int_mul(D, D, d->block.data[i]); - for (j = 1; j < U->n_row; ++j) - for (k = 0; k < U->n_col; ++k) - isl_int_mul(A->row[k][i*size+j], - D, U->row[j][k]); - } - A = isl_mat_left_hermite(A, 0, NULL, NULL); - T = isl_mat_sub_alloc(A, 0, A->n_row, 0, A->n_row); - T = isl_mat_lin_to_aff(T); - if (!T) - goto error; - isl_int_set(T->row[0][0], D); - T = isl_mat_right_inverse(T); - if (!T) - goto error; - isl_assert(T->ctx, isl_int_is_one(T->row[0][0]), goto error); - T = isl_mat_transpose(T); - isl_mat_free(A); - isl_mat_free(U); - - isl_int_clear(D); - return T; -error: - isl_mat_free(A); - isl_mat_free(U); - isl_int_clear(D); - return NULL; -} - -/* Given a set of modulo constraints - * - * c + A y = 0 mod d - * - * this function returns an affine transformation T, - * - * y = T y' - * - * that bijectively maps the integer vectors y' to integer - * vectors y that satisfy the modulo constraints. - * - * This function is inspired by Section 2.5.3 - * of B. Meister, "Stating and Manipulating Periodicity in the Polytope - * Model. Applications to Program Analysis and Optimization". - * However, the implementation only follows the algorithm of that - * section for computing a particular solution and not for computing - * a general homogeneous solution. The latter is incomplete and - * may remove some valid solutions. - * Instead, we use an adaptation of the algorithm in Section 7 of - * B. Meister, S. Verdoolaege, "Polynomial Approximations in the Polytope - * Model: Bringing the Power of Quasi-Polynomials to the Masses". - * - * The input is given as a matrix B = [ c A ] and a vector d. - * Each element of the vector d corresponds to a row in B. - * The output is a lower triangular matrix. - * If no integer vector y satisfies the given constraints then - * a matrix with zero columns is returned. - * - * We first compute a particular solution y_0 to the given set of - * modulo constraints in particular_solution. If no such solution - * exists, then we return a zero-columned transformation matrix. - * Otherwise, we compute the generic solution to - * - * A y = 0 mod d - * - * That is we want to compute G such that - * - * y = G y'' - * - * with y'' integer, describes the set of solutions. - * - * We first remove the common factors of each row. - * In particular if gcd(A_i,d_i) != 1, then we divide the whole - * row i (including d_i) by this common factor. If afterwards gcd(A_i) != 1, - * then we divide this row of A by the common factor, unless gcd(A_i) = 0. - * In the later case, we simply drop the row (in both A and d). - * - * If there are no rows left in A, then G is the identity matrix. Otherwise, - * for each row i, we now determine the lattice of integer vectors - * that satisfies this row. Let U_i be the unimodular extension of the - * row A_i. This unimodular extension exists because gcd(A_i) = 1. - * The first component of - * - * y' = U_i y - * - * needs to be a multiple of d_i. Let y' = diag(d_i, 1, ..., 1) y''. - * Then, - * - * y = U_i^{-1} diag(d_i, 1, ..., 1) y'' - * - * for arbitrary integer vectors y''. That is, y belongs to the lattice - * generated by the columns of L_i = U_i^{-1} diag(d_i, 1, ..., 1). - * If there is only one row, then G = L_1. - * - * If there is more than one row left, we need to compute the intersection - * of the lattices. That is, we need to compute an L such that - * - * L = L_i L_i' for all i - * - * with L_i' some integer matrices. Let A be constructed as follows - * - * A = [ L_1^{-T} L_2^{-T} ... L_k^{-T} ] - * - * and computed the Hermite Normal Form of A = [ H 0 ] U - * Then, - * - * L_i^{-T} = H U_{1,i} - * - * or - * - * H^{-T} = L_i U_{1,i}^T - * - * In other words G = L = H^{-T}. - * To ensure that G is lower triangular, we compute and use its Hermite - * normal form. - * - * The affine transformation matrix returned is then - * - * [ 1 0 ] - * [ y_0 G ] - * - * as any y = y_0 + G y' with y' integer is a solution to the original - * modulo constraints. - */ -struct isl_mat *isl_mat_parameter_compression( - struct isl_mat *B, struct isl_vec *d) -{ - int i; - struct isl_mat *cst = NULL; - struct isl_mat *T = NULL; - isl_int D; - - if (!B || !d) - goto error; - isl_assert(B->ctx, B->n_row == d->size, goto error); - cst = particular_solution(B, d); - if (!cst) - goto error; - if (cst->n_col == 0) { - T = isl_mat_alloc(B->ctx, B->n_col, 0); - isl_mat_free(cst); - isl_mat_free(B); - isl_vec_free(d); - return T; - } - isl_int_init(D); - /* Replace a*g*row = 0 mod g*m by row = 0 mod m */ - for (i = 0; i < B->n_row; ++i) { - isl_seq_gcd(B->row[i] + 1, B->n_col - 1, &D); - if (isl_int_is_one(D)) - continue; - if (isl_int_is_zero(D)) { - B = isl_mat_drop_rows(B, i, 1); - d = isl_vec_cow(d); - if (!B || !d) - goto error2; - isl_seq_cpy(d->block.data+i, d->block.data+i+1, - d->size - (i+1)); - d->size--; - i--; - continue; - } - B = isl_mat_cow(B); - if (!B) - goto error2; - isl_seq_scale_down(B->row[i] + 1, B->row[i] + 1, D, B->n_col-1); - isl_int_gcd(D, D, d->block.data[i]); - d = isl_vec_cow(d); - if (!d) - goto error2; - isl_int_divexact(d->block.data[i], d->block.data[i], D); - } - isl_int_clear(D); - if (B->n_row == 0) - T = isl_mat_identity(B->ctx, B->n_col); - else if (B->n_row == 1) - T = parameter_compression_1(B, d); - else - T = parameter_compression_multi(B, d); - T = isl_mat_left_hermite(T, 0, NULL, NULL); - if (!T) - goto error; - isl_mat_sub_copy(T->ctx, T->row + 1, cst->row, cst->n_row, 0, 0, 1); - isl_mat_free(cst); - isl_mat_free(B); - isl_vec_free(d); - return T; -error2: - isl_int_clear(D); -error: - isl_mat_free(cst); - isl_mat_free(B); - isl_vec_free(d); - return NULL; -} - -/* Given a set of equalities - * - * M x - c = 0 - * - * this function computes a unimodular transformation from a lower-dimensional - * space to the original space that bijectively maps the integer points x' - * in the lower-dimensional space to the integer points x in the original - * space that satisfy the equalities. - * - * The input is given as a matrix B = [ -c M ] and the output is a - * matrix that maps [1 x'] to [1 x]. - * If T2 is not NULL, then *T2 is set to a matrix mapping [1 x] to [1 x']. - * - * First compute the (left) Hermite normal form of M, - * - * M [U1 U2] = M U = H = [H1 0] - * or - * M = H Q = [H1 0] [Q1] - * [Q2] - * - * with U, Q unimodular, Q = U^{-1} (and H lower triangular). - * Define the transformed variables as - * - * x = [U1 U2] [ x1' ] = [U1 U2] [Q1] x - * [ x2' ] [Q2] - * - * The equalities then become - * - * H1 x1' - c = 0 or x1' = H1^{-1} c = c' - * - * If any of the c' is non-integer, then the original set has no - * integer solutions (since the x' are a unimodular transformation - * of the x) and a zero-column matrix is returned. - * Otherwise, the transformation is given by - * - * x = U1 H1^{-1} c + U2 x2' - * - * The inverse transformation is simply - * - * x2' = Q2 x - */ -struct isl_mat *isl_mat_variable_compression(struct isl_mat *B, - struct isl_mat **T2) -{ - int i; - struct isl_mat *H = NULL, *C = NULL, *H1, *U = NULL, *U1, *U2, *TC; - unsigned dim; - - if (T2) - *T2 = NULL; - if (!B) - goto error; - - dim = B->n_col - 1; - H = isl_mat_sub_alloc(B, 0, B->n_row, 1, dim); - H = isl_mat_left_hermite(H, 0, &U, T2); - if (!H || !U || (T2 && !*T2)) - goto error; - if (T2) { - *T2 = isl_mat_drop_rows(*T2, 0, B->n_row); - *T2 = isl_mat_lin_to_aff(*T2); - if (!*T2) - goto error; - } - C = isl_mat_alloc(B->ctx, 1+B->n_row, 1); - if (!C) - goto error; - isl_int_set_si(C->row[0][0], 1); - isl_mat_sub_neg(C->ctx, C->row+1, B->row, B->n_row, 0, 0, 1); - H1 = isl_mat_sub_alloc(H, 0, H->n_row, 0, H->n_row); - H1 = isl_mat_lin_to_aff(H1); - TC = isl_mat_inverse_product(H1, C); - if (!TC) - goto error; - isl_mat_free(H); - if (!isl_int_is_one(TC->row[0][0])) { - for (i = 0; i < B->n_row; ++i) { - if (!isl_int_is_divisible_by(TC->row[1+i][0], TC->row[0][0])) { - struct isl_ctx *ctx = B->ctx; - isl_mat_free(B); - isl_mat_free(TC); - isl_mat_free(U); - if (T2) { - isl_mat_free(*T2); - *T2 = NULL; - } - return isl_mat_alloc(ctx, 1 + dim, 0); - } - isl_seq_scale_down(TC->row[1+i], TC->row[1+i], TC->row[0][0], 1); - } - isl_int_set_si(TC->row[0][0], 1); - } - U1 = isl_mat_sub_alloc(U, 0, U->n_row, 0, B->n_row); - U1 = isl_mat_lin_to_aff(U1); - U2 = isl_mat_sub_alloc(U, 0, U->n_row, B->n_row, U->n_row - B->n_row); - U2 = isl_mat_lin_to_aff(U2); - isl_mat_free(U); - TC = isl_mat_product(U1, TC); - TC = isl_mat_aff_direct_sum(TC, U2); - - isl_mat_free(B); - - return TC; -error: - isl_mat_free(B); - isl_mat_free(H); - isl_mat_free(U); - if (T2) { - isl_mat_free(*T2); - *T2 = NULL; - } - return NULL; -} - -/* Use the n equalities of bset to unimodularly transform the - * variables x such that n transformed variables x1' have a constant value - * and rewrite the constraints of bset in terms of the remaining - * transformed variables x2'. The matrix pointed to by T maps - * the new variables x2' back to the original variables x, while T2 - * maps the original variables to the new variables. - */ -static struct isl_basic_set *compress_variables( - struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2) -{ - struct isl_mat *B, *TC; - unsigned dim; - - if (T) - *T = NULL; - if (T2) - *T2 = NULL; - if (!bset) - goto error; - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(bset->ctx, bset->n_div == 0, goto error); - dim = isl_basic_set_n_dim(bset); - isl_assert(bset->ctx, bset->n_eq <= dim, goto error); - if (bset->n_eq == 0) - return bset; - - B = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, 0, 1 + dim); - TC = isl_mat_variable_compression(B, T2); - if (!TC) - goto error; - if (TC->n_col == 0) { - isl_mat_free(TC); - if (T2) { - isl_mat_free(*T2); - *T2 = NULL; - } - return isl_basic_set_set_to_empty(bset); - } - - bset = isl_basic_set_preimage(bset, T ? isl_mat_copy(TC) : TC); - if (T) - *T = TC; - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_set *isl_basic_set_remove_equalities( - struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2) -{ - if (T) - *T = NULL; - if (T2) - *T2 = NULL; - if (!bset) - return NULL; - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - bset = isl_basic_set_gauss(bset, NULL); - if (ISL_F_ISSET(bset, ISL_BASIC_SET_EMPTY)) - return bset; - bset = compress_variables(bset, T, T2); - return bset; -error: - isl_basic_set_free(bset); - *T = NULL; - return NULL; -} - -/* Check if dimension dim belongs to a residue class - * i_dim \equiv r mod m - * with m != 1 and if so return m in *modulo and r in *residue. - * As a special case, when i_dim has a fixed value v, then - * *modulo is set to 0 and *residue to v. - * - * If i_dim does not belong to such a residue class, then *modulo - * is set to 1 and *residue is set to 0. - */ -int isl_basic_set_dim_residue_class(struct isl_basic_set *bset, - int pos, isl_int *modulo, isl_int *residue) -{ - struct isl_ctx *ctx; - struct isl_mat *H = NULL, *U = NULL, *C, *H1, *U1; - unsigned total; - unsigned nparam; - - if (!bset || !modulo || !residue) - return -1; - - if (isl_basic_set_plain_dim_is_fixed(bset, pos, residue)) { - isl_int_set_si(*modulo, 0); - return 0; - } - - ctx = bset->ctx; - total = isl_basic_set_total_dim(bset); - nparam = isl_basic_set_n_param(bset); - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, 1, total); - H = isl_mat_left_hermite(H, 0, &U, NULL); - if (!H) - return -1; - - isl_seq_gcd(U->row[nparam + pos]+bset->n_eq, - total-bset->n_eq, modulo); - if (isl_int_is_zero(*modulo)) - isl_int_set_si(*modulo, 1); - if (isl_int_is_one(*modulo)) { - isl_int_set_si(*residue, 0); - isl_mat_free(H); - isl_mat_free(U); - return 0; - } - - C = isl_mat_alloc(bset->ctx, 1+bset->n_eq, 1); - if (!C) - goto error; - isl_int_set_si(C->row[0][0], 1); - isl_mat_sub_neg(C->ctx, C->row+1, bset->eq, bset->n_eq, 0, 0, 1); - H1 = isl_mat_sub_alloc(H, 0, H->n_row, 0, H->n_row); - H1 = isl_mat_lin_to_aff(H1); - C = isl_mat_inverse_product(H1, C); - isl_mat_free(H); - U1 = isl_mat_sub_alloc(U, nparam+pos, 1, 0, bset->n_eq); - U1 = isl_mat_lin_to_aff(U1); - isl_mat_free(U); - C = isl_mat_product(U1, C); - if (!C) - goto error; - if (!isl_int_is_divisible_by(C->row[1][0], C->row[0][0])) { - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_set_to_empty(bset); - isl_basic_set_free(bset); - isl_int_set_si(*modulo, 1); - isl_int_set_si(*residue, 0); - return 0; - } - isl_int_divexact(*residue, C->row[1][0], C->row[0][0]); - isl_int_fdiv_r(*residue, *residue, *modulo); - isl_mat_free(C); - return 0; -error: - isl_mat_free(H); - isl_mat_free(U); - return -1; -} - -/* Check if dimension dim belongs to a residue class - * i_dim \equiv r mod m - * with m != 1 and if so return m in *modulo and r in *residue. - * As a special case, when i_dim has a fixed value v, then - * *modulo is set to 0 and *residue to v. - * - * If i_dim does not belong to such a residue class, then *modulo - * is set to 1 and *residue is set to 0. - */ -int isl_set_dim_residue_class(struct isl_set *set, - int pos, isl_int *modulo, isl_int *residue) -{ - isl_int m; - isl_int r; - int i; - - if (!set || !modulo || !residue) - return -1; - - if (set->n == 0) { - isl_int_set_si(*modulo, 0); - isl_int_set_si(*residue, 0); - return 0; - } - - if (isl_basic_set_dim_residue_class(set->p[0], pos, modulo, residue)<0) - return -1; - - if (set->n == 1) - return 0; - - if (isl_int_is_one(*modulo)) - return 0; - - isl_int_init(m); - isl_int_init(r); - - for (i = 1; i < set->n; ++i) { - if (isl_basic_set_dim_residue_class(set->p[0], pos, &m, &r) < 0) - goto error; - isl_int_gcd(*modulo, *modulo, m); - if (!isl_int_is_zero(*modulo)) - isl_int_fdiv_r(*residue, *residue, *modulo); - if (isl_int_is_one(*modulo)) - break; - if (!isl_int_is_zero(*modulo)) - isl_int_fdiv_r(r, r, *modulo); - if (isl_int_ne(*residue, r)) { - isl_int_set_si(*modulo, 1); - isl_int_set_si(*residue, 0); - break; - } - } - - isl_int_clear(m); - isl_int_clear(r); - - return 0; -error: - isl_int_clear(m); - isl_int_clear(r); - return -1; -} diff --git a/cloog-0.16.3/isl/isl_equalities.h b/cloog-0.16.3/isl/isl_equalities.h deleted file mode 100644 index ceb554496f5787b1646f494ae9aa88330000e034..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_equalities.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_EQUALITIES_H -#define ISL_EQUALITIES_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_mat *isl_mat_variable_compression( - struct isl_mat *B, struct isl_mat **T2); -struct isl_mat *isl_mat_parameter_compression( - struct isl_mat *B, struct isl_vec *d); -struct isl_basic_set *isl_basic_set_remove_equalities( - struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_factorization.c b/cloog-0.16.3/isl/isl_factorization.c deleted file mode 100644 index 6acfd73d22a72434e046e3538708a57ac2b82721..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_factorization.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright 2005-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include - -static __isl_give isl_factorizer *isl_factorizer_alloc( - __isl_take isl_morph *morph, int n_group) -{ - isl_factorizer *f = NULL; - int *len = NULL; - - if (!morph) - return NULL; - - if (n_group > 0) { - len = isl_alloc_array(morph->dom->ctx, int, n_group); - if (!len) - goto error; - } - - f = isl_alloc_type(morph->dom->ctx, struct isl_factorizer); - if (!f) - goto error; - - f->morph = morph; - f->n_group = n_group; - f->len = len; - - return f; -error: - free(len); - isl_morph_free(morph); - return NULL; -} - -void isl_factorizer_free(__isl_take isl_factorizer *f) -{ - if (!f) - return; - - isl_morph_free(f->morph); - free(f->len); - free(f); -} - -void isl_factorizer_dump(__isl_take isl_factorizer *f, FILE *out) -{ - int i; - - if (!f) - return; - - isl_morph_dump(f->morph, out); - fprintf(out, "["); - for (i = 0; i < f->n_group; ++i) { - if (i) - fprintf(out, ", "); - fprintf(out, "%d", f->len[i]); - } - fprintf(out, "]\n"); -} - -__isl_give isl_factorizer *isl_factorizer_identity(__isl_keep isl_basic_set *bset) -{ - return isl_factorizer_alloc(isl_morph_identity(bset), 0); -} - -__isl_give isl_factorizer *isl_factorizer_groups(__isl_keep isl_basic_set *bset, - __isl_take isl_mat *Q, __isl_take isl_mat *U, int n, int *len) -{ - int i; - unsigned nvar; - unsigned ovar; - isl_dim *dim; - isl_basic_set *dom; - isl_basic_set *ran; - isl_morph *morph; - isl_factorizer *f; - isl_mat *id; - - if (!bset || !Q || !U) - goto error; - - ovar = 1 + isl_dim_offset(bset->dim, isl_dim_set); - id = isl_mat_identity(bset->ctx, ovar); - Q = isl_mat_diagonal(isl_mat_copy(id), Q); - U = isl_mat_diagonal(id, U); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - dim = isl_basic_set_get_dim(bset); - dom = isl_basic_set_universe(isl_dim_copy(dim)); - dim = isl_dim_drop(dim, isl_dim_set, 0, nvar); - dim = isl_dim_add(dim, isl_dim_set, nvar); - ran = isl_basic_set_universe(dim); - morph = isl_morph_alloc(dom, ran, Q, U); - f = isl_factorizer_alloc(morph, n); - if (!f) - return NULL; - for (i = 0; i < n; ++i) - f->len[i] = len[i]; - return f; -error: - isl_mat_free(Q); - isl_mat_free(U); - return NULL; -} - -struct isl_factor_groups { - int *pos; /* for each column: row position of pivot */ - int *group; /* group to which a column belongs */ - int *cnt; /* number of columns in the group */ - int *rowgroup; /* group to which a constraint belongs */ -}; - -/* Initialize isl_factor_groups structure: find pivot row positions, - * each column initially belongs to its own group and the groups - * of the constraints are still unknown. - */ -static int init_groups(struct isl_factor_groups *g, __isl_keep isl_mat *H) -{ - int i, j; - - if (!H) - return -1; - - g->pos = isl_alloc_array(H->ctx, int, H->n_col); - g->group = isl_alloc_array(H->ctx, int, H->n_col); - g->cnt = isl_alloc_array(H->ctx, int, H->n_col); - g->rowgroup = isl_alloc_array(H->ctx, int, H->n_row); - - if (!g->pos || !g->group || !g->cnt || !g->rowgroup) - return -1; - - for (i = 0; i < H->n_row; ++i) - g->rowgroup[i] = -1; - for (i = 0, j = 0; i < H->n_col; ++i) { - for ( ; j < H->n_row; ++j) - if (!isl_int_is_zero(H->row[j][i])) - break; - g->pos[i] = j; - } - for (i = 0; i < H->n_col; ++i) { - g->group[i] = i; - g->cnt[i] = 1; - } - - return 0; -} - -/* Update group[k] to the group column k belongs to. - * When merging two groups, only the group of the current - * group leader is changed. Here we change the group of - * the other members to also point to the group that the - * old group leader now points to. - */ -static void update_group(struct isl_factor_groups *g, int k) -{ - int p = g->group[k]; - while (g->cnt[p] == 0) - p = g->group[p]; - g->group[k] = p; -} - -/* Merge group i with all groups of the subsequent columns - * with non-zero coefficients in row j of H. - * (The previous columns are all zero; otherwise we would have handled - * the row before.) - */ -static int update_group_i_with_row_j(struct isl_factor_groups *g, int i, int j, - __isl_keep isl_mat *H) -{ - int k; - - g->rowgroup[j] = g->group[i]; - for (k = i + 1; k < H->n_col && j >= g->pos[k]; ++k) { - update_group(g, k); - update_group(g, i); - if (g->group[k] != g->group[i] && - !isl_int_is_zero(H->row[j][k])) { - isl_assert(H->ctx, g->cnt[g->group[k]] != 0, return -1); - isl_assert(H->ctx, g->cnt[g->group[i]] != 0, return -1); - if (g->group[i] < g->group[k]) { - g->cnt[g->group[i]] += g->cnt[g->group[k]]; - g->cnt[g->group[k]] = 0; - g->group[g->group[k]] = g->group[i]; - } else { - g->cnt[g->group[k]] += g->cnt[g->group[i]]; - g->cnt[g->group[i]] = 0; - g->group[g->group[i]] = g->group[k]; - } - } - } - - return 0; -} - -/* Update the group information based on the constraint matrix. - */ -static int update_groups(struct isl_factor_groups *g, __isl_keep isl_mat *H) -{ - int i, j; - - for (i = 0; i < H->n_col && g->cnt[0] < H->n_col; ++i) { - if (g->pos[i] == H->n_row) - continue; /* A line direction */ - if (g->rowgroup[g->pos[i]] == -1) - g->rowgroup[g->pos[i]] = i; - for (j = g->pos[i] + 1; j < H->n_row; ++j) { - if (isl_int_is_zero(H->row[j][i])) - continue; - if (g->rowgroup[j] != -1) - continue; - if (update_group_i_with_row_j(g, i, j, H) < 0) - return -1; - } - } - for (i = 1; i < H->n_col; ++i) - update_group(g, i); - - return 0; -} - -static void clear_groups(struct isl_factor_groups *g) -{ - if (!g) - return; - free(g->pos); - free(g->group); - free(g->cnt); - free(g->rowgroup); -} - -/* Determine if the set variables of the basic set can be factorized and - * return the results in an isl_factorizer. - * - * The algorithm works by first computing the Hermite normal form - * and then grouping columns linked by one or more constraints together, - * where a constraints "links" two or more columns if the constraint - * has nonzero coefficients in the columns. - */ -__isl_give isl_factorizer *isl_basic_set_factorizer( - __isl_keep isl_basic_set *bset) -{ - int i, j, n, done; - isl_mat *H, *U, *Q; - unsigned nvar; - struct isl_factor_groups g = { 0 }; - isl_factorizer *f; - - if (!bset) - return NULL; - - isl_assert(bset->ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, - return NULL); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - if (nvar <= 1) - return isl_factorizer_identity(bset); - - H = isl_mat_alloc(bset->ctx, bset->n_eq + bset->n_ineq, nvar); - if (!H) - return NULL; - isl_mat_sub_copy(bset->ctx, H->row, bset->eq, bset->n_eq, - 0, 1 + isl_dim_offset(bset->dim, isl_dim_set), nvar); - isl_mat_sub_copy(bset->ctx, H->row + bset->n_eq, bset->ineq, bset->n_ineq, - 0, 1 + isl_dim_offset(bset->dim, isl_dim_set), nvar); - H = isl_mat_left_hermite(H, 0, &U, &Q); - - if (init_groups(&g, H) < 0) - goto error; - if (update_groups(&g, H) < 0) - goto error; - - if (g.cnt[0] == nvar) { - isl_mat_free(H); - isl_mat_free(U); - isl_mat_free(Q); - clear_groups(&g); - - return isl_factorizer_identity(bset); - } - - done = 0; - n = 0; - while (done != nvar) { - int group = g.group[done]; - for (i = 1; i < g.cnt[group]; ++i) { - if (g.group[done + i] == group) - continue; - for (j = done + g.cnt[group]; j < nvar; ++j) - if (g.group[j] == group) - break; - if (j == nvar) - isl_die(bset->ctx, isl_error_internal, - "internal error", goto error); - g.group[j] = g.group[done + i]; - Q = isl_mat_swap_rows(Q, done + i, j); - U = isl_mat_swap_cols(U, done + i, j); - } - done += g.cnt[group]; - g.pos[n++] = g.cnt[group]; - } - - f = isl_factorizer_groups(bset, Q, U, n, g.pos); - - isl_mat_free(H); - clear_groups(&g); - - return f; -error: - isl_mat_free(H); - isl_mat_free(U); - isl_mat_free(Q); - clear_groups(&g); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_factorization.h b/cloog-0.16.3/isl/isl_factorization.h deleted file mode 100644 index f0d3518d7545d22849c7d2856fcd6be5c474ca81..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_factorization.h +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Data for factorizing a particular basic set. - * After applying "morph" to the basic set, there are "n_group" - * groups of consecutive set variables, each of length "len[i]", - * with 0 <= i < n_group. - * If no factorization is possible, then "n_group" is set to 0. - */ -struct isl_factorizer { - isl_morph *morph; - int n_group; - int *len; -}; -typedef struct isl_factorizer isl_factorizer; - -__isl_give isl_factorizer *isl_basic_set_factorizer( - __isl_keep isl_basic_set *bset); - -void isl_factorizer_free(__isl_take isl_factorizer *f); -void isl_factorizer_dump(__isl_take isl_factorizer *f, FILE *out); - -#if defined(__cplusplus) -} -#endif diff --git a/cloog-0.16.3/isl/isl_farkas.c b/cloog-0.16.3/isl/isl_farkas.c deleted file mode 100644 index 2dc617eacabab2a33071d204946e65148df89b69..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_farkas.c +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include - -/* - * Let C be a cone and define - * - * C' := { y | forall x in C : y x >= 0 } - * - * C' contains the coefficients of all linear constraints - * that are valid for C. - * Furthermore, C'' = C. - * - * If C is defined as { x | A x >= 0 } - * then any element in C' must be a non-negative combination - * of the rows of A, i.e., y = t A with t >= 0. That is, - * - * C' = { y | exists t >= 0 : y = t A } - * - * If any of the rows in A actually represents an equality, then - * also negative combinations of this row are allowed and so the - * non-negativity constraint on the corresponding element of t - * can be dropped. - * - * A polyhedron P = { x | b + A x >= 0 } can be represented - * in homogeneous coordinates by the cone - * C = { [z,x] | b z + A x >= and z >= 0 } - * The valid linear constraints on C correspond to the valid affine - * constraints on P. - * This is essentially Farkas' lemma. - * - * Let A' = [b A], then, since - * [ 1 0 ] - * [ w y ] = [t_0 t] [ b A ] - * - * we have - * - * C' = { w, y | exists t_0, t >= 0 : y = t A' and w = t_0 + t b } - * or - * - * C' = { w, y | exists t >= 0 : y = t A' and w - t b >= 0 } - * - * In practice, we introduce an extra variable (w), shifting all - * other variables to the right, and an extra inequality - * (w - t b >= 0) corresponding to the positivity constraint on - * the homogeneous coordinate. - * - * When going back from coefficients to solutions, we immediately - * plug in 1 for z, which corresponds to shifting all variables - * to the left, with the leftmost ending up in the constant position. - */ - -/* Add the given prefix to all named isl_dim_set dimensions in "dim". - */ -static __isl_give isl_dim *isl_dim_prefix(__isl_take isl_dim *dim, - const char *prefix) -{ - int i; - isl_ctx *ctx; - unsigned nvar; - size_t prefix_len = strlen(prefix); - - if (!dim) - return NULL; - - ctx = isl_dim_get_ctx(dim); - nvar = isl_dim_size(dim, isl_dim_set); - - for (i = 0; i < nvar; ++i) { - const char *name; - char *prefix_name; - - name = isl_dim_get_name(dim, isl_dim_set, i); - if (!name) - continue; - - prefix_name = isl_alloc_array(ctx, char, - prefix_len + strlen(name) + 1); - if (!prefix_name) - goto error; - memcpy(prefix_name, prefix, prefix_len); - strcpy(prefix_name + prefix_len, name); - - dim = isl_dim_set_name(dim, isl_dim_set, i, prefix_name); - free(prefix_name); - } - - return dim; -error: - isl_dim_free(dim); - return NULL; -} - -/* Given a dimension specification of the solutions space, construct - * a dimension specification for the space of coefficients. - * - * In particular transform - * - * [params] -> { S } - * - * to - * - * { coefficients[[cst, params] -> S] } - * - * and prefix each dimension name with "c_". - */ -static __isl_give isl_dim *isl_dim_coefficients(__isl_take isl_dim *dim) -{ - isl_dim *dim_param; - unsigned nvar; - unsigned nparam; - - nvar = isl_dim_size(dim, isl_dim_set); - nparam = isl_dim_size(dim, isl_dim_param); - dim_param = isl_dim_copy(dim); - dim_param = isl_dim_drop(dim_param, isl_dim_set, 0, nvar); - dim_param = isl_dim_move(dim_param, isl_dim_set, 0, - isl_dim_param, 0, nparam); - dim_param = isl_dim_prefix(dim_param, "c_"); - dim_param = isl_dim_insert(dim_param, isl_dim_set, 0, 1); - dim_param = isl_dim_set_name(dim_param, isl_dim_set, 0, "c_cst"); - dim = isl_dim_drop(dim, isl_dim_param, 0, nparam); - dim = isl_dim_prefix(dim, "c_"); - dim = isl_dim_join(isl_dim_from_domain(dim_param), - isl_dim_from_range(dim)); - dim = isl_dim_wrap(dim); - dim = isl_dim_set_tuple_name(dim, isl_dim_set, "coefficients"); - - return dim; -} - -/* Drop the given prefix from all named dimensions of type "type" in "dim". - */ -static __isl_give isl_dim *isl_dim_unprefix(__isl_take isl_dim *dim, - enum isl_dim_type type, const char *prefix) -{ - int i; - unsigned n; - size_t prefix_len = strlen(prefix); - - n = isl_dim_size(dim, type); - - for (i = 0; i < n; ++i) { - const char *name; - - name = isl_dim_get_name(dim, type, i); - if (!name) - continue; - if (strncmp(name, prefix, prefix_len)) - continue; - - dim = isl_dim_set_name(dim, type, i, name + prefix_len); - } - - return dim; -} - -/* Given a dimension specification of the space of coefficients, construct - * a dimension specification for the space of solutions. - * - * In particular transform - * - * { coefficients[[cst, params] -> S] } - * - * to - * - * [params] -> { S } - * - * and drop the "c_" prefix from the dimension names. - */ -static __isl_give isl_dim *isl_dim_solutions(__isl_take isl_dim *dim) -{ - unsigned nparam; - - dim = isl_dim_unwrap(dim); - dim = isl_dim_drop(dim, isl_dim_in, 0, 1); - dim = isl_dim_unprefix(dim, isl_dim_in, "c_"); - dim = isl_dim_unprefix(dim, isl_dim_out, "c_"); - nparam = isl_dim_size(dim, isl_dim_in); - dim = isl_dim_move(dim, isl_dim_param, 0, isl_dim_in, 0, nparam); - dim = isl_dim_range(dim); - - return dim; -} - -/* Compute the dual of "bset" by applying Farkas' lemma. - * As explained above, we add an extra dimension to represent - * the coefficient of the constant term when going from solutions - * to coefficients (shift == 1) and we drop the extra dimension when going - * in the opposite direction (shift == -1). "dim" is the space in which - * the dual should be created. - */ -static __isl_give isl_basic_set *farkas(__isl_take isl_dim *dim, - __isl_take isl_basic_set *bset, int shift) -{ - int i, j, k; - isl_basic_set *dual = NULL; - unsigned total; - - total = isl_basic_set_total_dim(bset); - - dual = isl_basic_set_alloc_dim(dim, bset->n_eq + bset->n_ineq, - total, bset->n_ineq + (shift > 0)); - dual = isl_basic_set_set_rational(dual); - - for (i = 0; i < bset->n_eq + bset->n_ineq; ++i) { - k = isl_basic_set_alloc_div(dual); - if (k < 0) - goto error; - isl_int_set_si(dual->div[k][0], 0); - } - - for (i = 0; i < total; ++i) { - k = isl_basic_set_alloc_equality(dual); - if (k < 0) - goto error; - isl_seq_clr(dual->eq[k], 1 + shift + total); - isl_int_set_si(dual->eq[k][1 + shift + i], -1); - for (j = 0; j < bset->n_eq; ++j) - isl_int_set(dual->eq[k][1 + shift + total + j], - bset->eq[j][1 + i]); - for (j = 0; j < bset->n_ineq; ++j) - isl_int_set(dual->eq[k][1 + shift + total + bset->n_eq + j], - bset->ineq[j][1 + i]); - } - - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(dual); - if (k < 0) - goto error; - isl_seq_clr(dual->ineq[k], - 1 + shift + total + bset->n_eq + bset->n_ineq); - isl_int_set_si(dual->ineq[k][1 + shift + total + bset->n_eq + i], 1); - } - - if (shift > 0) { - k = isl_basic_set_alloc_inequality(dual); - if (k < 0) - goto error; - isl_seq_clr(dual->ineq[k], 2 + total); - isl_int_set_si(dual->ineq[k][1], 1); - for (j = 0; j < bset->n_eq; ++j) - isl_int_neg(dual->ineq[k][2 + total + j], - bset->eq[j][0]); - for (j = 0; j < bset->n_ineq; ++j) - isl_int_neg(dual->ineq[k][2 + total + bset->n_eq + j], - bset->ineq[j][0]); - } - - dual = isl_basic_set_remove_divs(dual); - isl_basic_set_simplify(dual); - isl_basic_set_finalize(dual); - - isl_basic_set_free(bset); - return dual; -error: - isl_basic_set_free(bset); - isl_basic_set_free(dual); - return NULL; -} - -/* Construct a basic set containing the tuples of coefficients of all - * valid affine constraints on the given basic set. - */ -__isl_give isl_basic_set *isl_basic_set_coefficients( - __isl_take isl_basic_set *bset) -{ - isl_dim *dim; - - if (!bset) - return NULL; - if (bset->n_div) - isl_die(bset->ctx, isl_error_invalid, - "input set not allowed to have local variables", - goto error); - - dim = isl_basic_set_get_dim(bset); - dim = isl_dim_coefficients(dim); - - return farkas(dim, bset, 1); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Construct a basic set containing the elements that satisfy all - * affine constraints whose coefficient tuples are - * contained in the given basic set. - */ -__isl_give isl_basic_set *isl_basic_set_solutions( - __isl_take isl_basic_set *bset) -{ - isl_dim *dim; - - if (!bset) - return NULL; - if (bset->n_div) - isl_die(bset->ctx, isl_error_invalid, - "input set not allowed to have local variables", - goto error); - - dim = isl_basic_set_get_dim(bset); - dim = isl_dim_solutions(dim); - - return farkas(dim, bset, -1); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Construct a basic set containing the tuples of coefficients of all - * valid affine constraints on the given set. - */ -__isl_give isl_basic_set *isl_set_coefficients(__isl_take isl_set *set) -{ - int i; - isl_basic_set *coeff; - - if (!set) - return NULL; - if (set->n == 0) { - isl_dim *dim = isl_set_get_dim(set); - dim = isl_dim_coefficients(dim); - coeff = isl_basic_set_universe(dim); - coeff = isl_basic_set_set_rational(coeff); - isl_set_free(set); - return coeff; - } - - coeff = isl_basic_set_coefficients(isl_basic_set_copy(set->p[0])); - - for (i = 1; i < set->n; ++i) { - isl_basic_set *bset, *coeff_i; - bset = isl_basic_set_copy(set->p[i]); - coeff_i = isl_basic_set_coefficients(bset); - coeff = isl_basic_set_intersect(coeff, coeff_i); - } - - isl_set_free(set); - return coeff; -} - -/* Construct a basic set containing the elements that satisfy all - * affine constraints whose coefficient tuples are - * contained in the given set. - */ -__isl_give isl_basic_set *isl_set_solutions(__isl_take isl_set *set) -{ - int i; - isl_basic_set *sol; - - if (!set) - return NULL; - if (set->n == 0) { - isl_dim *dim = isl_set_get_dim(set); - dim = isl_dim_solutions(dim); - sol = isl_basic_set_universe(dim); - sol = isl_basic_set_set_rational(sol); - isl_set_free(set); - return sol; - } - - sol = isl_basic_set_solutions(isl_basic_set_copy(set->p[0])); - - for (i = 1; i < set->n; ++i) { - isl_basic_set *bset, *sol_i; - bset = isl_basic_set_copy(set->p[i]); - sol_i = isl_basic_set_solutions(bset); - sol = isl_basic_set_intersect(sol, sol_i); - } - - isl_set_free(set); - return sol; -} diff --git a/cloog-0.16.3/isl/isl_flow.c b/cloog-0.16.3/isl/isl_flow.c deleted file mode 100644 index 128aee56770ef2516bf832515d607385149f15a3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_flow.c +++ /dev/null @@ -1,1304 +0,0 @@ -/* - * Copyright 2005-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include - -/* A private structure to keep track of a mapping together with - * a user-specified identifier and a boolean indicating whether - * the map represents a must or may access/dependence. - */ -struct isl_labeled_map { - struct isl_map *map; - void *data; - int must; -}; - -/* A structure containing the input for dependence analysis: - * - a sink - * - n_must + n_may (<= max_source) sources - * - a function for determining the relative order of sources and sink - * The must sources are placed before the may sources. - */ -struct isl_access_info { - struct isl_labeled_map sink; - isl_access_level_before level_before; - int max_source; - int n_must; - int n_may; - struct isl_labeled_map source[1]; -}; - -/* A structure containing the output of dependence analysis: - * - n_source dependences - * - a wrapped subset of the sink for which definitely no source could be found - * - a wrapped subset of the sink for which possibly no source could be found - */ -struct isl_flow { - isl_set *must_no_source; - isl_set *may_no_source; - int n_source; - struct isl_labeled_map *dep; -}; - -/* Construct an isl_access_info structure and fill it up with - * the given data. The number of sources is set to 0. - */ -__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink, - void *sink_user, isl_access_level_before fn, int max_source) -{ - isl_ctx *ctx; - struct isl_access_info *acc; - - if (!sink) - return NULL; - - ctx = isl_map_get_ctx(sink); - isl_assert(ctx, max_source >= 0, goto error); - - acc = isl_alloc(ctx, struct isl_access_info, - sizeof(struct isl_access_info) + - (max_source - 1) * sizeof(struct isl_labeled_map)); - if (!acc) - goto error; - - acc->sink.map = sink; - acc->sink.data = sink_user; - acc->level_before = fn; - acc->max_source = max_source; - acc->n_must = 0; - acc->n_may = 0; - - return acc; -error: - isl_map_free(sink); - return NULL; -} - -/* Free the given isl_access_info structure. - */ -void isl_access_info_free(__isl_take isl_access_info *acc) -{ - int i; - - if (!acc) - return; - isl_map_free(acc->sink.map); - for (i = 0; i < acc->n_must + acc->n_may; ++i) - isl_map_free(acc->source[i].map); - free(acc); -} - -isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc) -{ - return acc ? isl_map_get_ctx(acc->sink.map) : NULL; -} - -/* Add another source to an isl_access_info structure, making - * sure the "must" sources are placed before the "may" sources. - * This function may be called at most max_source times on a - * given isl_access_info structure, with max_source as specified - * in the call to isl_access_info_alloc that constructed the structure. - */ -__isl_give isl_access_info *isl_access_info_add_source( - __isl_take isl_access_info *acc, __isl_take isl_map *source, - int must, void *source_user) -{ - isl_ctx *ctx; - - if (!acc) - return NULL; - ctx = isl_map_get_ctx(acc->sink.map); - isl_assert(ctx, acc->n_must + acc->n_may < acc->max_source, goto error); - - if (must) { - if (acc->n_may) - acc->source[acc->n_must + acc->n_may] = - acc->source[acc->n_must]; - acc->source[acc->n_must].map = source; - acc->source[acc->n_must].data = source_user; - acc->source[acc->n_must].must = 1; - acc->n_must++; - } else { - acc->source[acc->n_must + acc->n_may].map = source; - acc->source[acc->n_must + acc->n_may].data = source_user; - acc->source[acc->n_must + acc->n_may].must = 0; - acc->n_may++; - } - - return acc; -error: - isl_map_free(source); - isl_access_info_free(acc); - return NULL; -} - -/* A temporary structure used while sorting the accesses in an isl_access_info. - */ -struct isl_access_sort_info { - struct isl_map *source_map; - void *source_data; - struct isl_access_info *acc; -}; - -/* Return -n, 0 or n (with n a positive value), depending on whether - * the source access identified by p1 should be sorted before, together - * or after that identified by p2. - * - * If p1 and p2 share a different number of levels with the sink, - * then the one with the lowest number of shared levels should be - * sorted first. - * If they both share no levels, then the order is irrelevant. - * Otherwise, if p1 appears before p2, then it should be sorted first. - * For more generic initial schedules, it is possible that neither - * p1 nor p2 appears before the other, or at least not in any obvious way. - * We therefore also check if p2 appears before p1, in which case p2 - * should be sorted first. - * If not, we try to order the two statements based on the description - * of the iteration domains. This results in an arbitrary, but fairly - * stable ordering. - */ -static int access_sort_cmp(const void *p1, const void *p2) -{ - const struct isl_access_sort_info *i1, *i2; - int level1, level2; - uint32_t h1, h2; - i1 = (const struct isl_access_sort_info *) p1; - i2 = (const struct isl_access_sort_info *) p2; - - level1 = i1->acc->level_before(i1->source_data, i1->acc->sink.data); - level2 = i2->acc->level_before(i2->source_data, i2->acc->sink.data); - - if (level1 != level2 || !level1) - return level1 - level2; - - level1 = i1->acc->level_before(i1->source_data, i2->source_data); - if (level1 % 2) - return -1; - - level2 = i1->acc->level_before(i2->source_data, i1->source_data); - if (level2 % 2) - return 1; - - h1 = isl_map_get_hash(i1->source_map); - h2 = isl_map_get_hash(i2->source_map); - return h1 > h2 ? 1 : h1 < h2 ? -1 : 0; -} - -/* Sort the must source accesses in order of increasing number of shared - * levels with the sink access. - * Source accesses with the same number of shared levels are sorted - * in their textual order. - */ -static __isl_give isl_access_info *isl_access_info_sort_sources( - __isl_take isl_access_info *acc) -{ - int i; - isl_ctx *ctx; - struct isl_access_sort_info *array; - - if (!acc) - return NULL; - if (acc->n_must <= 1) - return acc; - - ctx = isl_map_get_ctx(acc->sink.map); - array = isl_alloc_array(ctx, struct isl_access_sort_info, acc->n_must); - if (!array) - goto error; - - for (i = 0; i < acc->n_must; ++i) { - array[i].source_map = acc->source[i].map; - array[i].source_data = acc->source[i].data; - array[i].acc = acc; - } - - qsort(array, acc->n_must, sizeof(struct isl_access_sort_info), - access_sort_cmp); - - for (i = 0; i < acc->n_must; ++i) { - acc->source[i].map = array[i].source_map; - acc->source[i].data = array[i].source_data; - } - - free(array); - - return acc; -error: - isl_access_info_free(acc); - return NULL; -} - -/* Initialize an empty isl_flow structure corresponding to a given - * isl_access_info structure. - * For each must access, two dependences are created (initialized - * to the empty relation), one for the resulting must dependences - * and one for the resulting may dependences. May accesses can - * only lead to may dependences, so only one dependence is created - * for each of them. - * This function is private as isl_flow structures are only supposed - * to be created by isl_access_info_compute_flow. - */ -static __isl_give isl_flow *isl_flow_alloc(__isl_keep isl_access_info *acc) -{ - int i; - struct isl_ctx *ctx; - struct isl_flow *dep; - - if (!acc) - return NULL; - - ctx = isl_map_get_ctx(acc->sink.map); - dep = isl_calloc_type(ctx, struct isl_flow); - if (!dep) - return NULL; - - dep->dep = isl_calloc_array(ctx, struct isl_labeled_map, - 2 * acc->n_must + acc->n_may); - if (!dep->dep) - goto error; - - dep->n_source = 2 * acc->n_must + acc->n_may; - for (i = 0; i < acc->n_must; ++i) { - struct isl_dim *dim; - dim = isl_dim_join(isl_map_get_dim(acc->source[i].map), - isl_dim_reverse(isl_map_get_dim(acc->sink.map))); - dep->dep[2 * i].map = isl_map_empty(dim); - dep->dep[2 * i + 1].map = isl_map_copy(dep->dep[2 * i].map); - dep->dep[2 * i].data = acc->source[i].data; - dep->dep[2 * i + 1].data = acc->source[i].data; - dep->dep[2 * i].must = 1; - dep->dep[2 * i + 1].must = 0; - if (!dep->dep[2 * i].map || !dep->dep[2 * i + 1].map) - goto error; - } - for (i = acc->n_must; i < acc->n_must + acc->n_may; ++i) { - struct isl_dim *dim; - dim = isl_dim_join(isl_map_get_dim(acc->source[i].map), - isl_dim_reverse(isl_map_get_dim(acc->sink.map))); - dep->dep[acc->n_must + i].map = isl_map_empty(dim); - dep->dep[acc->n_must + i].data = acc->source[i].data; - dep->dep[acc->n_must + i].must = 0; - if (!dep->dep[acc->n_must + i].map) - goto error; - } - - return dep; -error: - isl_flow_free(dep); - return NULL; -} - -/* Iterate over all sources and for each resulting flow dependence - * that is not empty, call the user specfied function. - * The second argument in this function call identifies the source, - * while the third argument correspond to the final argument of - * the isl_flow_foreach call. - */ -int isl_flow_foreach(__isl_keep isl_flow *deps, - int (*fn)(__isl_take isl_map *dep, int must, void *dep_user, void *user), - void *user) -{ - int i; - - if (!deps) - return -1; - - for (i = 0; i < deps->n_source; ++i) { - if (isl_map_plain_is_empty(deps->dep[i].map)) - continue; - if (fn(isl_map_copy(deps->dep[i].map), deps->dep[i].must, - deps->dep[i].data, user) < 0) - return -1; - } - - return 0; -} - -/* Return a copy of the subset of the sink for which no source could be found. - */ -__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must) -{ - if (!deps) - return NULL; - - if (must) - return isl_set_unwrap(isl_set_copy(deps->must_no_source)); - else - return isl_set_unwrap(isl_set_copy(deps->may_no_source)); -} - -void isl_flow_free(__isl_take isl_flow *deps) -{ - int i; - - if (!deps) - return; - isl_set_free(deps->must_no_source); - isl_set_free(deps->may_no_source); - if (deps->dep) { - for (i = 0; i < deps->n_source; ++i) - isl_map_free(deps->dep[i].map); - free(deps->dep); - } - free(deps); -} - -isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps) -{ - return deps ? isl_set_get_ctx(deps->must_no_source) : NULL; -} - -/* Return a map that enforces that the domain iteration occurs after - * the range iteration at the given level. - * If level is odd, then the domain iteration should occur after - * the target iteration in their shared level/2 outermost loops. - * In this case we simply need to enforce that these outermost - * loop iterations are the same. - * If level is even, then the loop iterator of the domain should - * be greater than the loop iterator of the range at the last - * of the level/2 shared loops, i.e., loop level/2 - 1. - */ -static __isl_give isl_map *after_at_level(struct isl_dim *dim, int level) -{ - struct isl_basic_map *bmap; - - if (level % 2) - bmap = isl_basic_map_equal(dim, level/2); - else - bmap = isl_basic_map_more_at(dim, level/2 - 1); - - return isl_map_from_basic_map(bmap); -} - -/* Compute the last iteration of must source j that precedes the sink - * at the given level for sink iterations in set_C. - * The subset of set_C for which no such iteration can be found is returned - * in *empty. - */ -static struct isl_map *last_source(struct isl_access_info *acc, - struct isl_set *set_C, - int j, int level, struct isl_set **empty) -{ - struct isl_map *read_map; - struct isl_map *write_map; - struct isl_map *dep_map; - struct isl_map *after; - struct isl_map *result; - - read_map = isl_map_copy(acc->sink.map); - write_map = isl_map_copy(acc->source[j].map); - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - after = after_at_level(isl_map_get_dim(dep_map), level); - dep_map = isl_map_intersect(dep_map, after); - result = isl_map_partial_lexmax(dep_map, set_C, empty); - result = isl_map_reverse(result); - - return result; -} - -/* For a given mapping between iterations of must source j and iterations - * of the sink, compute the last iteration of must source k preceding - * the sink at level before_level for any of the sink iterations, - * but following the corresponding iteration of must source j at level - * after_level. - */ -static struct isl_map *last_later_source(struct isl_access_info *acc, - struct isl_map *old_map, - int j, int before_level, - int k, int after_level, - struct isl_set **empty) -{ - struct isl_dim *dim; - struct isl_set *set_C; - struct isl_map *read_map; - struct isl_map *write_map; - struct isl_map *dep_map; - struct isl_map *after_write; - struct isl_map *before_read; - struct isl_map *result; - - set_C = isl_map_range(isl_map_copy(old_map)); - read_map = isl_map_copy(acc->sink.map); - write_map = isl_map_copy(acc->source[k].map); - - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - dim = isl_dim_join(isl_map_get_dim(acc->source[k].map), - isl_dim_reverse(isl_map_get_dim(acc->source[j].map))); - after_write = after_at_level(dim, after_level); - after_write = isl_map_apply_range(after_write, old_map); - after_write = isl_map_reverse(after_write); - dep_map = isl_map_intersect(dep_map, after_write); - before_read = after_at_level(isl_map_get_dim(dep_map), before_level); - dep_map = isl_map_intersect(dep_map, before_read); - result = isl_map_partial_lexmax(dep_map, set_C, empty); - result = isl_map_reverse(result); - - return result; -} - -/* Given a shared_level between two accesses, return 1 if the - * the first can precede the second at the requested target_level. - * If the target level is odd, i.e., refers to a statement level - * dimension, then first needs to precede second at the requested - * level, i.e., shared_level must be equal to target_level. - * If the target level is odd, then the two loops should share - * at least the requested number of outer loops. - */ -static int can_precede_at_level(int shared_level, int target_level) -{ - if (shared_level < target_level) - return 0; - if ((target_level % 2) && shared_level > target_level) - return 0; - return 1; -} - -/* Given a possible flow dependence temp_rel[j] between source j and the sink - * at level sink_level, remove those elements for which - * there is an iteration of another source k < j that is closer to the sink. - * The flow dependences temp_rel[k] are updated with the improved sources. - * Any improved source needs to precede the sink at the same level - * and needs to follow source j at the same or a deeper level. - * The lower this level, the later the execution date of source k. - * We therefore consider lower levels first. - * - * If temp_rel[j] is empty, then there can be no improvement and - * we return immediately. - */ -static int intermediate_sources(__isl_keep isl_access_info *acc, - struct isl_map **temp_rel, int j, int sink_level) -{ - int k, level; - int depth = 2 * isl_map_dim(acc->source[j].map, isl_dim_in) + 1; - - if (isl_map_plain_is_empty(temp_rel[j])) - return 0; - - for (k = j - 1; k >= 0; --k) { - int plevel, plevel2; - plevel = acc->level_before(acc->source[k].data, acc->sink.data); - if (!can_precede_at_level(plevel, sink_level)) - continue; - - plevel2 = acc->level_before(acc->source[j].data, - acc->source[k].data); - - for (level = sink_level; level <= depth; ++level) { - struct isl_map *T; - struct isl_set *trest; - struct isl_map *copy; - - if (!can_precede_at_level(plevel2, level)) - continue; - - copy = isl_map_copy(temp_rel[j]); - T = last_later_source(acc, copy, j, sink_level, k, - level, &trest); - if (isl_map_plain_is_empty(T)) { - isl_set_free(trest); - isl_map_free(T); - continue; - } - temp_rel[j] = isl_map_intersect_range(temp_rel[j], trest); - temp_rel[k] = isl_map_union_disjoint(temp_rel[k], T); - } - } - - return 0; -} - -/* Compute all iterations of may source j that precedes the sink at the given - * level for sink iterations in set_C. - */ -static __isl_give isl_map *all_sources(__isl_keep isl_access_info *acc, - __isl_take isl_set *set_C, int j, int level) -{ - isl_map *read_map; - isl_map *write_map; - isl_map *dep_map; - isl_map *after; - - read_map = isl_map_copy(acc->sink.map); - read_map = isl_map_intersect_domain(read_map, set_C); - write_map = isl_map_copy(acc->source[acc->n_must + j].map); - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - after = after_at_level(isl_map_get_dim(dep_map), level); - dep_map = isl_map_intersect(dep_map, after); - - return isl_map_reverse(dep_map); -} - -/* For a given mapping between iterations of must source k and iterations - * of the sink, compute the all iteration of may source j preceding - * the sink at level before_level for any of the sink iterations, - * but following the corresponding iteration of must source k at level - * after_level. - */ -static __isl_give isl_map *all_later_sources(__isl_keep isl_access_info *acc, - __isl_keep isl_map *old_map, - int j, int before_level, int k, int after_level) -{ - isl_dim *dim; - isl_set *set_C; - isl_map *read_map; - isl_map *write_map; - isl_map *dep_map; - isl_map *after_write; - isl_map *before_read; - - set_C = isl_map_range(isl_map_copy(old_map)); - read_map = isl_map_copy(acc->sink.map); - read_map = isl_map_intersect_domain(read_map, set_C); - write_map = isl_map_copy(acc->source[acc->n_must + j].map); - - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - dim = isl_dim_join(isl_map_get_dim(acc->source[acc->n_must + j].map), - isl_dim_reverse(isl_map_get_dim(acc->source[k].map))); - after_write = after_at_level(dim, after_level); - after_write = isl_map_apply_range(after_write, old_map); - after_write = isl_map_reverse(after_write); - dep_map = isl_map_intersect(dep_map, after_write); - before_read = after_at_level(isl_map_get_dim(dep_map), before_level); - dep_map = isl_map_intersect(dep_map, before_read); - return isl_map_reverse(dep_map); -} - -/* Given the must and may dependence relations for the must accesses - * for level sink_level, check if there are any accesses of may access j - * that occur in between and return their union. - * If some of these accesses are intermediate with respect to - * (previously thought to be) must dependences, then these - * must dependences are turned into may dependences. - */ -static __isl_give isl_map *all_intermediate_sources( - __isl_keep isl_access_info *acc, __isl_take isl_map *map, - struct isl_map **must_rel, struct isl_map **may_rel, - int j, int sink_level) -{ - int k, level; - int depth = 2 * isl_map_dim(acc->source[acc->n_must + j].map, - isl_dim_in) + 1; - - for (k = 0; k < acc->n_must; ++k) { - int plevel; - - if (isl_map_plain_is_empty(may_rel[k]) && - isl_map_plain_is_empty(must_rel[k])) - continue; - - plevel = acc->level_before(acc->source[k].data, - acc->source[acc->n_must + j].data); - - for (level = sink_level; level <= depth; ++level) { - isl_map *T; - isl_map *copy; - isl_set *ran; - - if (!can_precede_at_level(plevel, level)) - continue; - - copy = isl_map_copy(may_rel[k]); - T = all_later_sources(acc, copy, j, sink_level, k, level); - map = isl_map_union(map, T); - - copy = isl_map_copy(must_rel[k]); - T = all_later_sources(acc, copy, j, sink_level, k, level); - ran = isl_map_range(isl_map_copy(T)); - map = isl_map_union(map, T); - may_rel[k] = isl_map_union_disjoint(may_rel[k], - isl_map_intersect_range(isl_map_copy(must_rel[k]), - isl_set_copy(ran))); - T = isl_map_from_domain_and_range( - isl_set_universe( - isl_dim_domain(isl_map_get_dim(must_rel[k]))), - ran); - must_rel[k] = isl_map_subtract(must_rel[k], T); - } - } - - return map; -} - -/* Compute dependences for the case where all accesses are "may" - * accesses, which boils down to computing memory based dependences. - * The generic algorithm would also work in this case, but it would - * be overkill to use it. - */ -static __isl_give isl_flow *compute_mem_based_dependences( - __isl_take isl_access_info *acc) -{ - int i; - isl_set *mustdo; - isl_set *maydo; - isl_flow *res; - - res = isl_flow_alloc(acc); - if (!res) - goto error; - - mustdo = isl_map_domain(isl_map_copy(acc->sink.map)); - maydo = isl_set_copy(mustdo); - - for (i = 0; i < acc->n_may; ++i) { - int plevel; - int is_before; - isl_dim *dim; - isl_map *before; - isl_map *dep; - - plevel = acc->level_before(acc->source[i].data, acc->sink.data); - is_before = plevel & 1; - plevel >>= 1; - - dim = isl_map_get_dim(res->dep[i].map); - if (is_before) - before = isl_map_lex_le_first(dim, plevel); - else - before = isl_map_lex_lt_first(dim, plevel); - dep = isl_map_apply_range(isl_map_copy(acc->source[i].map), - isl_map_reverse(isl_map_copy(acc->sink.map))); - dep = isl_map_intersect(dep, before); - mustdo = isl_set_subtract(mustdo, - isl_map_range(isl_map_copy(dep))); - res->dep[i].map = isl_map_union(res->dep[i].map, dep); - } - - res->may_no_source = isl_set_subtract(maydo, isl_set_copy(mustdo)); - res->must_no_source = mustdo; - - isl_access_info_free(acc); - - return res; -error: - isl_access_info_free(acc); - return NULL; -} - -/* Compute dependences for the case where there is at least one - * "must" access. - * - * The core algorithm considers all levels in which a source may precede - * the sink, where a level may either be a statement level or a loop level. - * The outermost statement level is 1, the first loop level is 2, etc... - * The algorithm basically does the following: - * for all levels l of the read access from innermost to outermost - * for all sources w that may precede the sink access at that level - * compute the last iteration of the source that precedes the sink access - * at that level - * add result to possible last accesses at level l of source w - * for all sources w2 that we haven't considered yet at this level that may - * also precede the sink access - * for all levels l2 of w from l to innermost - * for all possible last accesses dep of w at l - * compute last iteration of w2 between the source and sink - * of dep - * add result to possible last accesses at level l of write w2 - * and replace possible last accesses dep by the remainder - * - * - * The above algorithm is applied to the must access. During the course - * of the algorithm, we keep track of sink iterations that still - * need to be considered. These iterations are split into those that - * haven't been matched to any source access (mustdo) and those that have only - * been matched to may accesses (maydo). - * At the end of each level, we also consider the may accesses. - * In particular, we consider may accesses that precede the remaining - * sink iterations, moving elements from mustdo to maydo when appropriate, - * and may accesses that occur between a must source and a sink of any - * dependences found at the current level, turning must dependences into - * may dependences when appropriate. - * - */ -static __isl_give isl_flow *compute_val_based_dependences( - __isl_take isl_access_info *acc) -{ - isl_ctx *ctx; - isl_flow *res; - isl_set *mustdo = NULL; - isl_set *maydo = NULL; - int level, j; - int depth; - isl_map **must_rel = NULL; - isl_map **may_rel = NULL; - - acc = isl_access_info_sort_sources(acc); - if (!acc) - return NULL; - - res = isl_flow_alloc(acc); - if (!res) - goto error; - ctx = isl_map_get_ctx(acc->sink.map); - - depth = 2 * isl_map_dim(acc->sink.map, isl_dim_in) + 1; - mustdo = isl_map_domain(isl_map_copy(acc->sink.map)); - maydo = isl_set_empty_like(mustdo); - if (!mustdo || !maydo) - goto error; - if (isl_set_plain_is_empty(mustdo)) - goto done; - - must_rel = isl_alloc_array(ctx, struct isl_map *, acc->n_must); - may_rel = isl_alloc_array(ctx, struct isl_map *, acc->n_must); - if (!must_rel || !may_rel) - goto error; - - for (level = depth; level >= 1; --level) { - for (j = acc->n_must-1; j >=0; --j) { - must_rel[j] = isl_map_empty_like(res->dep[j].map); - may_rel[j] = isl_map_copy(must_rel[j]); - } - - for (j = acc->n_must - 1; j >= 0; --j) { - struct isl_map *T; - struct isl_set *rest; - int plevel; - - plevel = acc->level_before(acc->source[j].data, - acc->sink.data); - if (!can_precede_at_level(plevel, level)) - continue; - - T = last_source(acc, mustdo, j, level, &rest); - must_rel[j] = isl_map_union_disjoint(must_rel[j], T); - mustdo = rest; - - intermediate_sources(acc, must_rel, j, level); - - T = last_source(acc, maydo, j, level, &rest); - may_rel[j] = isl_map_union_disjoint(may_rel[j], T); - maydo = rest; - - intermediate_sources(acc, may_rel, j, level); - - if (isl_set_plain_is_empty(mustdo) && - isl_set_plain_is_empty(maydo)) - break; - } - for (j = j - 1; j >= 0; --j) { - int plevel; - - plevel = acc->level_before(acc->source[j].data, - acc->sink.data); - if (!can_precede_at_level(plevel, level)) - continue; - - intermediate_sources(acc, must_rel, j, level); - intermediate_sources(acc, may_rel, j, level); - } - - for (j = 0; j < acc->n_may; ++j) { - int plevel; - isl_map *T; - isl_set *ran; - - plevel = acc->level_before(acc->source[acc->n_must + j].data, - acc->sink.data); - if (!can_precede_at_level(plevel, level)) - continue; - - T = all_sources(acc, isl_set_copy(maydo), j, level); - res->dep[2 * acc->n_must + j].map = - isl_map_union(res->dep[2 * acc->n_must + j].map, T); - T = all_sources(acc, isl_set_copy(mustdo), j, level); - ran = isl_map_range(isl_map_copy(T)); - res->dep[2 * acc->n_must + j].map = - isl_map_union(res->dep[2 * acc->n_must + j].map, T); - mustdo = isl_set_subtract(mustdo, isl_set_copy(ran)); - maydo = isl_set_union_disjoint(maydo, ran); - - T = res->dep[2 * acc->n_must + j].map; - T = all_intermediate_sources(acc, T, must_rel, may_rel, - j, level); - res->dep[2 * acc->n_must + j].map = T; - } - - for (j = acc->n_must - 1; j >= 0; --j) { - res->dep[2 * j].map = - isl_map_union_disjoint(res->dep[2 * j].map, - must_rel[j]); - res->dep[2 * j + 1].map = - isl_map_union_disjoint(res->dep[2 * j + 1].map, - may_rel[j]); - } - - if (isl_set_plain_is_empty(mustdo) && - isl_set_plain_is_empty(maydo)) - break; - } - - free(must_rel); - free(may_rel); -done: - res->must_no_source = mustdo; - res->may_no_source = maydo; - isl_access_info_free(acc); - return res; -error: - isl_access_info_free(acc); - isl_flow_free(res); - isl_set_free(mustdo); - isl_set_free(maydo); - free(must_rel); - free(may_rel); - return NULL; -} - -/* Given a "sink" access, a list of n "source" accesses, - * compute for each iteration of the sink access - * and for each element accessed by that iteration, - * the source access in the list that last accessed the - * element accessed by the sink access before this sink access. - * Each access is given as a map from the loop iterators - * to the array indices. - * The result is a list of n relations between source and sink - * iterations and a subset of the domain of the sink access, - * corresponding to those iterations that access an element - * not previously accessed. - * - * To deal with multi-valued sink access relations, the sink iteration - * domain is first extended with dimensions that correspond to the data - * space. After the computation is finished, these extra dimensions are - * projected out again. - */ -__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc) -{ - int j; - struct isl_flow *res; - isl_map *domain_map = NULL; - - if (!acc) - return NULL; - - domain_map = isl_map_domain_map(isl_map_copy(acc->sink.map)); - acc->sink.map = isl_map_range_map(acc->sink.map); - if (!acc->sink.map) - goto error; - - if (acc->n_must == 0) - res = compute_mem_based_dependences(acc); - else - res = compute_val_based_dependences(acc); - if (!res) - return NULL; - - for (j = 0; j < res->n_source; ++j) { - res->dep[j].map = isl_map_apply_range(res->dep[j].map, - isl_map_copy(domain_map)); - if (!res->dep[j].map) - goto error2; - } - if (!res->must_no_source || !res->may_no_source) - goto error2; - - isl_map_free(domain_map); - return res; -error: - isl_map_free(domain_map); - isl_access_info_free(acc); - return NULL; -error2: - isl_map_free(domain_map); - isl_flow_free(res); - return NULL; -} - - -/* Keep track of some information about a schedule for a given - * access. In particular, keep track of which dimensions - * have a constant value and of the actual constant values. - */ -struct isl_sched_info { - int *is_cst; - isl_vec *cst; -}; - -static void sched_info_free(__isl_take struct isl_sched_info *info) -{ - if (!info) - return; - isl_vec_free(info->cst); - free(info->is_cst); - free(info); -} - -/* Extract information on the constant dimensions of the schedule - * for a given access. The "map" is of the form - * - * [S -> D] -> A - * - * with S the schedule domain, D the iteration domain and A the data domain. - */ -static __isl_give struct isl_sched_info *sched_info_alloc( - __isl_keep isl_map *map) -{ - isl_ctx *ctx; - isl_dim *dim; - struct isl_sched_info *info; - int i, n; - - if (!map) - return NULL; - - dim = isl_dim_unwrap(isl_dim_domain(isl_map_get_dim(map))); - if (!dim) - return NULL; - n = isl_dim_size(dim, isl_dim_in); - isl_dim_free(dim); - - ctx = isl_map_get_ctx(map); - info = isl_alloc_type(ctx, struct isl_sched_info); - if (!info) - return NULL; - info->is_cst = isl_alloc_array(ctx, int, n); - info->cst = isl_vec_alloc(ctx, n); - if (!info->is_cst || !info->cst) - goto error; - - for (i = 0; i < n; ++i) - info->is_cst[i] = isl_map_plain_is_fixed(map, isl_dim_in, i, - &info->cst->el[i]); - - return info; -error: - sched_info_free(info); - return NULL; -} - -struct isl_compute_flow_data { - isl_union_map *must_source; - isl_union_map *may_source; - isl_union_map *must_dep; - isl_union_map *may_dep; - isl_union_map *must_no_source; - isl_union_map *may_no_source; - - int count; - int must; - isl_dim *dim; - struct isl_sched_info *sink_info; - struct isl_sched_info **source_info; - isl_access_info *accesses; -}; - -static int count_matching_array(__isl_take isl_map *map, void *user) -{ - int eq; - isl_dim *dim; - struct isl_compute_flow_data *data; - - data = (struct isl_compute_flow_data *)user; - - dim = isl_dim_range(isl_map_get_dim(map)); - - eq = isl_dim_equal(dim, data->dim); - - isl_dim_free(dim); - isl_map_free(map); - - if (eq < 0) - return -1; - if (eq) - data->count++; - - return 0; -} - -static int collect_matching_array(__isl_take isl_map *map, void *user) -{ - int eq; - isl_dim *dim; - struct isl_sched_info *info; - struct isl_compute_flow_data *data; - - data = (struct isl_compute_flow_data *)user; - - dim = isl_dim_range(isl_map_get_dim(map)); - - eq = isl_dim_equal(dim, data->dim); - - isl_dim_free(dim); - - if (eq < 0) - goto error; - if (!eq) { - isl_map_free(map); - return 0; - } - - info = sched_info_alloc(map); - data->source_info[data->count] = info; - - data->accesses = isl_access_info_add_source(data->accesses, - map, data->must, info); - - data->count++; - - return 0; -error: - isl_map_free(map); - return -1; -} - -/* Determine the shared nesting level and the "textual order" of - * the given accesses. - * - * We first determine the minimal schedule dimension for both accesses. - * - * If among those dimensions, we can find one where both have a fixed - * value and if moreover those values are different, then the previous - * dimension is the last shared nesting level and the textual order - * is determined based on the order of the fixed values. - * If no such fixed values can be found, then we set the shared - * nesting level to the minimal schedule dimension, with no textual ordering. - */ -static int before(void *first, void *second) -{ - struct isl_sched_info *info1 = first; - struct isl_sched_info *info2 = second; - int n1, n2; - int i; - - n1 = info1->cst->size; - n2 = info2->cst->size; - - if (n2 < n1) - n1 = n2; - - for (i = 0; i < n1; ++i) { - if (!info1->is_cst[i]) - continue; - if (!info2->is_cst[i]) - continue; - if (isl_int_eq(info1->cst->el[i], info2->cst->el[i])) - continue; - return 2 * i + isl_int_lt(info1->cst->el[i], info2->cst->el[i]); - } - - return 2 * n1; -} - -/* Given a sink access, look for all the source accesses that access - * the same array and perform dataflow analysis on them using - * isl_access_info_compute_flow. - */ -static int compute_flow(__isl_take isl_map *map, void *user) -{ - int i; - isl_ctx *ctx; - struct isl_compute_flow_data *data; - isl_flow *flow; - - data = (struct isl_compute_flow_data *)user; - - ctx = isl_map_get_ctx(map); - - data->accesses = NULL; - data->sink_info = NULL; - data->source_info = NULL; - data->count = 0; - data->dim = isl_dim_range(isl_map_get_dim(map)); - - if (isl_union_map_foreach_map(data->must_source, - &count_matching_array, data) < 0) - goto error; - if (isl_union_map_foreach_map(data->may_source, - &count_matching_array, data) < 0) - goto error; - - data->sink_info = sched_info_alloc(map); - data->source_info = isl_calloc_array(ctx, struct isl_sched_info *, - data->count); - - data->accesses = isl_access_info_alloc(isl_map_copy(map), - data->sink_info, &before, data->count); - if (!data->sink_info || !data->source_info || !data->accesses) - goto error; - data->count = 0; - data->must = 1; - if (isl_union_map_foreach_map(data->must_source, - &collect_matching_array, data) < 0) - goto error; - data->must = 0; - if (isl_union_map_foreach_map(data->may_source, - &collect_matching_array, data) < 0) - goto error; - - flow = isl_access_info_compute_flow(data->accesses); - data->accesses = NULL; - - if (!flow) - goto error; - - data->must_no_source = isl_union_map_union(data->must_no_source, - isl_union_map_from_map(isl_flow_get_no_source(flow, 1))); - data->may_no_source = isl_union_map_union(data->may_no_source, - isl_union_map_from_map(isl_flow_get_no_source(flow, 0))); - - for (i = 0; i < flow->n_source; ++i) { - isl_union_map *dep; - dep = isl_union_map_from_map(isl_map_copy(flow->dep[i].map)); - if (flow->dep[i].must) - data->must_dep = isl_union_map_union(data->must_dep, dep); - else - data->may_dep = isl_union_map_union(data->may_dep, dep); - } - - isl_flow_free(flow); - - sched_info_free(data->sink_info); - if (data->source_info) { - for (i = 0; i < data->count; ++i) - sched_info_free(data->source_info[i]); - free(data->source_info); - } - isl_dim_free(data->dim); - isl_map_free(map); - - return 0; -error: - isl_access_info_free(data->accesses); - sched_info_free(data->sink_info); - if (data->source_info) { - for (i = 0; i < data->count; ++i) - sched_info_free(data->source_info[i]); - free(data->source_info); - } - isl_dim_free(data->dim); - isl_map_free(map); - - return -1; -} - -/* Given a collection of "sink" and "source" accesses, - * compute for each iteration of a sink access - * and for each element accessed by that iteration, - * the source access in the list that last accessed the - * element accessed by the sink access before this sink access. - * Each access is given as a map from the loop iterators - * to the array indices. - * The result is a relations between source and sink - * iterations and a subset of the domain of the sink accesses, - * corresponding to those iterations that access an element - * not previously accessed. - * - * We first prepend the schedule dimensions to the domain - * of the accesses so that we can easily compare their relative order. - * Then we consider each sink access individually in compute_flow. - */ -int isl_union_map_compute_flow(__isl_take isl_union_map *sink, - __isl_take isl_union_map *must_source, - __isl_take isl_union_map *may_source, - __isl_take isl_union_map *schedule, - __isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep, - __isl_give isl_union_map **must_no_source, - __isl_give isl_union_map **may_no_source) -{ - isl_dim *dim; - isl_union_map *range_map = NULL; - struct isl_compute_flow_data data; - - sink = isl_union_map_align_params(sink, - isl_union_map_get_dim(must_source)); - sink = isl_union_map_align_params(sink, - isl_union_map_get_dim(may_source)); - sink = isl_union_map_align_params(sink, - isl_union_map_get_dim(schedule)); - dim = isl_union_map_get_dim(sink); - must_source = isl_union_map_align_params(must_source, isl_dim_copy(dim)); - may_source = isl_union_map_align_params(may_source, isl_dim_copy(dim)); - schedule = isl_union_map_align_params(schedule, isl_dim_copy(dim)); - - schedule = isl_union_map_reverse(schedule); - range_map = isl_union_map_range_map(schedule); - schedule = isl_union_map_reverse(isl_union_map_copy(range_map)); - sink = isl_union_map_apply_domain(sink, isl_union_map_copy(schedule)); - must_source = isl_union_map_apply_domain(must_source, - isl_union_map_copy(schedule)); - may_source = isl_union_map_apply_domain(may_source, schedule); - - data.must_source = must_source; - data.may_source = may_source; - data.must_dep = must_dep ? - isl_union_map_empty(isl_dim_copy(dim)) : NULL; - data.may_dep = may_dep ? isl_union_map_empty(isl_dim_copy(dim)) : NULL; - data.must_no_source = must_no_source ? - isl_union_map_empty(isl_dim_copy(dim)) : NULL; - data.may_no_source = may_no_source ? - isl_union_map_empty(isl_dim_copy(dim)) : NULL; - - isl_dim_free(dim); - - if (isl_union_map_foreach_map(sink, &compute_flow, &data) < 0) - goto error; - - isl_union_map_free(sink); - isl_union_map_free(must_source); - isl_union_map_free(may_source); - - if (must_dep) { - data.must_dep = isl_union_map_apply_domain(data.must_dep, - isl_union_map_copy(range_map)); - data.must_dep = isl_union_map_apply_range(data.must_dep, - isl_union_map_copy(range_map)); - *must_dep = data.must_dep; - } - if (may_dep) { - data.may_dep = isl_union_map_apply_domain(data.may_dep, - isl_union_map_copy(range_map)); - data.may_dep = isl_union_map_apply_range(data.may_dep, - isl_union_map_copy(range_map)); - *may_dep = data.may_dep; - } - if (must_no_source) { - data.must_no_source = isl_union_map_apply_domain( - data.must_no_source, isl_union_map_copy(range_map)); - *must_no_source = data.must_no_source; - } - if (may_no_source) { - data.may_no_source = isl_union_map_apply_domain( - data.may_no_source, isl_union_map_copy(range_map)); - *may_no_source = data.may_no_source; - } - - isl_union_map_free(range_map); - - return 0; -error: - isl_union_map_free(range_map); - isl_union_map_free(sink); - isl_union_map_free(must_source); - isl_union_map_free(may_source); - isl_union_map_free(data.must_dep); - isl_union_map_free(data.may_dep); - isl_union_map_free(data.must_no_source); - isl_union_map_free(data.may_no_source); - - if (must_dep) - *must_dep = NULL; - if (may_dep) - *may_dep = NULL; - if (must_no_source) - *must_no_source = NULL; - if (may_no_source) - *may_no_source = NULL; - return -1; -} diff --git a/cloog-0.16.3/isl/isl_fold.c b/cloog-0.16.3/isl/isl_fold.c deleted file mode 100644 index dbf0578082d512899b0bde82467d1d0e5d6e44df..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_fold.c +++ /dev/null @@ -1,1583 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -enum isl_fold isl_fold_type_negate(enum isl_fold type) -{ - switch (type) { - case isl_fold_min: - return isl_fold_max; - case isl_fold_max: - return isl_fold_min; - case isl_fold_list: - return isl_fold_list; - } - - isl_die(NULL, isl_error_internal, "unhandled isl_fold type", abort()); -} - -static __isl_give isl_qpolynomial_fold *qpolynomial_fold_alloc( - enum isl_fold type, __isl_take isl_dim *dim, int n) -{ - isl_qpolynomial_fold *fold; - - if (!dim) - goto error; - - isl_assert(dim->ctx, n >= 0, goto error); - fold = isl_calloc(dim->ctx, struct isl_qpolynomial_fold, - sizeof(struct isl_qpolynomial_fold) + - (n - 1) * sizeof(struct isl_qpolynomial *)); - if (!fold) - goto error; - - fold->ref = 1; - fold->size = n; - fold->n = 0; - fold->type = type; - fold->dim = dim; - - return fold; -error: - isl_dim_free(dim); - return NULL; -} - -isl_ctx *isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold *fold) -{ - return fold ? fold->dim->ctx : NULL; -} - -__isl_give isl_dim *isl_qpolynomial_fold_get_dim( - __isl_keep isl_qpolynomial_fold *fold) -{ - return fold ? isl_dim_copy(fold->dim) : NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_reset_dim( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_dim *dim) -{ - int i; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold || !dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_reset_dim(fold->qp[i], - isl_dim_copy(dim)); - if (!fold->qp[i]) - goto error; - } - - isl_dim_free(fold->dim); - fold->dim = dim; - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_dim_free(dim); - return NULL; -} - -int isl_qpolynomial_fold_involves_dims(__isl_keep isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!fold) - return -1; - if (fold->n == 0 || n == 0) - return 0; - - for (i = 0; i < fold->n; ++i) { - int involves = isl_qpolynomial_involves_dims(fold->qp[i], - type, first, n); - if (involves < 0 || involves) - return involves; - } - return 0; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_set_dim_name( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - fold->dim = isl_dim_set_name(fold->dim, type, pos, s); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_set_dim_name(fold->qp[i], - type, pos, s); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_drop_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!fold) - return NULL; - if (n == 0) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - fold->dim = isl_dim_drop(fold->dim, type, first, n); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_drop_dims(fold->qp[i], - type, first, n); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_insert_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!fold) - return NULL; - if (n == 0 && !isl_dim_is_named_or_nested(fold->dim, type)) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - fold->dim = isl_dim_insert(fold->dim, type, first, n); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_insert_dims(fold->qp[i], - type, first, n); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -static int isl_qpolynomial_cst_sign(__isl_keep isl_qpolynomial *qp) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_as_cst(qp->upoly); - if (!cst) - return 0; - - return isl_int_sgn(cst->n) < 0 ? -1 : 1; -} - -static int isl_qpolynomial_aff_sign(__isl_keep isl_set *set, - __isl_keep isl_qpolynomial *qp) -{ - enum isl_lp_result res; - isl_vec *aff; - isl_int opt; - int sgn = 0; - - aff = isl_qpolynomial_extract_affine(qp); - if (!aff) - return 0; - - isl_int_init(opt); - - res = isl_set_solve_lp(set, 0, aff->el + 1, aff->el[0], - &opt, NULL, NULL); - if (res == isl_lp_error) - goto done; - if (res == isl_lp_empty || - (res == isl_lp_ok && !isl_int_is_neg(opt))) { - sgn = 1; - goto done; - } - - res = isl_set_solve_lp(set, 1, aff->el + 1, aff->el[0], - &opt, NULL, NULL); - if (res == isl_lp_ok && !isl_int_is_pos(opt)) - sgn = -1; - -done: - isl_int_clear(opt); - isl_vec_free(aff); - return sgn; -} - -/* Determine, if possible, the sign of the quasipolynomial "qp" on - * the domain "set". - * - * If qp is a constant, then the problem is trivial. - * If qp is linear, then we check if the minimum of the corresponding - * affine constraint is non-negative or if the maximum is non-positive. - * - * Otherwise, we check if the outermost variable "v" has a lower bound "l" - * in "set". If so, we write qp(v,v') as - * - * q(v,v') * (v - l) + r(v') - * - * if q(v,v') and r(v') have the same known sign, then the original - * quasipolynomial has the same sign as well. - * - * Return - * -1 if qp <= 0 - * 1 if qp >= 0 - * 0 if unknown - */ -static int isl_qpolynomial_sign(__isl_keep isl_set *set, - __isl_keep isl_qpolynomial *qp) -{ - int d; - int i; - int is; - struct isl_upoly_rec *rec; - isl_vec *v; - isl_int l; - enum isl_lp_result res; - int sgn = 0; - - is = isl_qpolynomial_is_cst(qp, NULL, NULL); - if (is < 0) - return 0; - if (is) - return isl_qpolynomial_cst_sign(qp); - - is = isl_qpolynomial_is_affine(qp); - if (is < 0) - return 0; - if (is) - return isl_qpolynomial_aff_sign(set, qp); - - if (qp->div->n_row > 0) - return 0; - - rec = isl_upoly_as_rec(qp->upoly); - if (!rec) - return 0; - - d = isl_dim_total(qp->dim); - v = isl_vec_alloc(set->ctx, 2 + d); - if (!v) - return 0; - - isl_seq_clr(v->el + 1, 1 + d); - isl_int_set_si(v->el[0], 1); - isl_int_set_si(v->el[2 + qp->upoly->var], 1); - - isl_int_init(l); - - res = isl_set_solve_lp(set, 0, v->el + 1, v->el[0], &l, NULL, NULL); - if (res == isl_lp_ok) { - isl_qpolynomial *min; - isl_qpolynomial *base; - isl_qpolynomial *r, *q; - isl_qpolynomial *t; - - min = isl_qpolynomial_cst(isl_dim_copy(qp->dim), l); - base = isl_qpolynomial_var_pow(isl_dim_copy(qp->dim), - qp->upoly->var, 1); - - r = isl_qpolynomial_alloc(isl_dim_copy(qp->dim), 0, - isl_upoly_copy(rec->p[rec->n - 1])); - q = isl_qpolynomial_copy(r); - - for (i = rec->n - 2; i >= 0; --i) { - r = isl_qpolynomial_mul(r, isl_qpolynomial_copy(min)); - t = isl_qpolynomial_alloc(isl_dim_copy(qp->dim), 0, - isl_upoly_copy(rec->p[i])); - r = isl_qpolynomial_add(r, t); - if (i == 0) - break; - q = isl_qpolynomial_mul(q, isl_qpolynomial_copy(base)); - q = isl_qpolynomial_add(q, isl_qpolynomial_copy(r)); - } - - if (isl_qpolynomial_is_zero(q)) - sgn = isl_qpolynomial_sign(set, r); - else if (isl_qpolynomial_is_zero(r)) - sgn = isl_qpolynomial_sign(set, q); - else { - int sgn_q, sgn_r; - sgn_r = isl_qpolynomial_sign(set, r); - sgn_q = isl_qpolynomial_sign(set, q); - if (sgn_r == sgn_q) - sgn = sgn_r; - } - - isl_qpolynomial_free(min); - isl_qpolynomial_free(base); - isl_qpolynomial_free(q); - isl_qpolynomial_free(r); - } - - isl_int_clear(l); - - isl_vec_free(v); - - return sgn; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold_on_domain( - __isl_keep isl_set *set, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2) -{ - int i, j; - int n1; - struct isl_qpolynomial_fold *res = NULL; - int better; - - if (!fold1 || !fold2) - goto error; - - isl_assert(fold1->dim->ctx, fold1->type == fold2->type, goto error); - isl_assert(fold1->dim->ctx, isl_dim_equal(fold1->dim, fold2->dim), - goto error); - - better = fold1->type == isl_fold_max ? -1 : 1; - - if (isl_qpolynomial_fold_is_empty(fold1)) { - isl_qpolynomial_fold_free(fold1); - return fold2; - } - - if (isl_qpolynomial_fold_is_empty(fold2)) { - isl_qpolynomial_fold_free(fold2); - return fold1; - } - - res = qpolynomial_fold_alloc(fold1->type, isl_dim_copy(fold1->dim), - fold1->n + fold2->n); - if (!res) - goto error; - - for (i = 0; i < fold1->n; ++i) { - res->qp[res->n] = isl_qpolynomial_copy(fold1->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - n1 = res->n; - - for (i = 0; i < fold2->n; ++i) { - for (j = n1 - 1; j >= 0; --j) { - isl_qpolynomial *d; - int sgn; - d = isl_qpolynomial_sub( - isl_qpolynomial_copy(res->qp[j]), - isl_qpolynomial_copy(fold2->qp[i])); - sgn = isl_qpolynomial_sign(set, d); - isl_qpolynomial_free(d); - if (sgn == 0) - continue; - if (sgn != better) - break; - isl_qpolynomial_free(res->qp[j]); - if (j != n1 - 1) - res->qp[j] = res->qp[n1 - 1]; - n1--; - if (n1 != res->n - 1) - res->qp[n1] = res->qp[res->n - 1]; - res->n--; - } - if (j >= 0) - continue; - res->qp[res->n] = isl_qpolynomial_copy(fold2->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - - return res; -error: - isl_qpolynomial_fold_free(res); - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_add_qpolynomial( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_qpolynomial *qp) -{ - int i; - - if (!fold || !qp) - goto error; - - if (isl_qpolynomial_is_zero(qp)) { - isl_qpolynomial_free(qp); - return fold; - } - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_add(fold->qp[i], - isl_qpolynomial_copy(qp)); - if (!fold->qp[i]) - goto error; - } - - isl_qpolynomial_free(qp); - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_add_on_domain( - __isl_keep isl_set *dom, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2) -{ - int i; - isl_qpolynomial_fold *res = NULL; - - if (!fold1 || !fold2) - goto error; - - if (isl_qpolynomial_fold_is_empty(fold1)) { - isl_qpolynomial_fold_free(fold1); - return fold2; - } - - if (isl_qpolynomial_fold_is_empty(fold2)) { - isl_qpolynomial_fold_free(fold2); - return fold1; - } - - if (fold1->n == 1 && fold2->n != 1) - return isl_qpolynomial_fold_add_on_domain(dom, fold2, fold1); - - if (fold2->n == 1) { - res = isl_qpolynomial_fold_add_qpolynomial(fold1, - isl_qpolynomial_copy(fold2->qp[0])); - isl_qpolynomial_fold_free(fold2); - return res; - } - - res = isl_qpolynomial_fold_add_qpolynomial( - isl_qpolynomial_fold_copy(fold1), - isl_qpolynomial_copy(fold2->qp[0])); - - for (i = 1; i < fold2->n; ++i) { - isl_qpolynomial_fold *res_i; - res_i = isl_qpolynomial_fold_add_qpolynomial( - isl_qpolynomial_fold_copy(fold1), - isl_qpolynomial_copy(fold2->qp[i])); - res = isl_qpolynomial_fold_fold_on_domain(dom, res, res_i); - } - - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return res; -error: - isl_qpolynomial_fold_free(res); - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute_equalities( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_basic_set *eq) -{ - int i; - - if (!fold || !eq) - goto error; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_substitute_equalities(fold->qp[i], - isl_basic_set_copy(eq)); - if (!fold->qp[i]) - goto error; - } - - isl_basic_set_free(eq); - return fold; -error: - isl_basic_set_free(eq); - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context) -{ - int i; - - if (!fold || !context) - goto error; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_gist(fold->qp[i], - isl_set_copy(context)); - if (!fold->qp[i]) - goto error; - } - - isl_set_free(context); - return fold; -error: - isl_set_free(context); - isl_qpolynomial_fold_free(fold); - return NULL; -} - -#define HAS_TYPE - -#undef PW -#define PW isl_pw_qpolynomial_fold -#undef EL -#define EL isl_qpolynomial_fold -#undef EL_IS_ZERO -#define EL_IS_ZERO is_empty -#undef ZERO -#define ZERO zero -#undef IS_ZERO -#define IS_ZERO is_zero -#undef FIELD -#define FIELD fold - -#define NO_NEG - -#include - -#undef UNION -#define UNION isl_union_pw_qpolynomial_fold -#undef PART -#define PART isl_pw_qpolynomial_fold -#undef PARTS -#define PARTS pw_qpolynomial_fold - -#include - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type, - __isl_take isl_dim *dim) -{ - return qpolynomial_fold_alloc(type, dim, 0); -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_alloc( - enum isl_fold type, __isl_take isl_qpolynomial *qp) -{ - isl_qpolynomial_fold *fold; - - if (!qp) - return NULL; - - fold = qpolynomial_fold_alloc(type, isl_dim_copy(qp->dim), 1); - if (!fold) - goto error; - - fold->qp[0] = qp; - fold->n++; - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( - __isl_keep isl_qpolynomial_fold *fold) -{ - if (!fold) - return NULL; - - fold->ref++; - return fold; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_dup( - __isl_keep isl_qpolynomial_fold *fold) -{ - int i; - isl_qpolynomial_fold *dup; - - if (!fold) - return NULL; - dup = qpolynomial_fold_alloc(fold->type, - isl_dim_copy(fold->dim), fold->n); - if (!dup) - return NULL; - - dup->n = fold->n; - for (i = 0; i < fold->n; ++i) { - dup->qp[i] = isl_qpolynomial_copy(fold->qp[i]); - if (!dup->qp[i]) - goto error; - } - - return dup; -error: - isl_qpolynomial_fold_free(dup); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_cow( - __isl_take isl_qpolynomial_fold *fold) -{ - if (!fold) - return NULL; - - if (fold->ref == 1) - return fold; - fold->ref--; - return isl_qpolynomial_fold_dup(fold); -} - -void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold) -{ - int i; - - if (!fold) - return; - if (--fold->ref > 0) - return; - - for (i = 0; i < fold->n; ++i) - isl_qpolynomial_free(fold->qp[i]); - isl_dim_free(fold->dim); - free(fold); -} - -int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold) -{ - if (!fold) - return -1; - - return fold->n == 0; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold( - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2) -{ - int i; - struct isl_qpolynomial_fold *res = NULL; - - if (!fold1 || !fold2) - goto error; - - isl_assert(fold1->dim->ctx, fold1->type == fold2->type, goto error); - isl_assert(fold1->dim->ctx, isl_dim_equal(fold1->dim, fold2->dim), - goto error); - - if (isl_qpolynomial_fold_is_empty(fold1)) { - isl_qpolynomial_fold_free(fold1); - return fold2; - } - - if (isl_qpolynomial_fold_is_empty(fold2)) { - isl_qpolynomial_fold_free(fold2); - return fold1; - } - - res = qpolynomial_fold_alloc(fold1->type, isl_dim_copy(fold1->dim), - fold1->n + fold2->n); - if (!res) - goto error; - - for (i = 0; i < fold1->n; ++i) { - res->qp[res->n] = isl_qpolynomial_copy(fold1->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - - for (i = 0; i < fold2->n; ++i) { - res->qp[res->n] = isl_qpolynomial_copy(fold2->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - - return res; -error: - isl_qpolynomial_fold_free(res); - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( - __isl_take isl_pw_qpolynomial_fold *pw1, - __isl_take isl_pw_qpolynomial_fold *pw2) -{ - int i, j, n; - struct isl_pw_qpolynomial_fold *res; - isl_set *set; - - if (!pw1 || !pw2) - goto error; - - isl_assert(pw1->dim->ctx, isl_dim_equal(pw1->dim, pw2->dim), goto error); - - if (isl_pw_qpolynomial_fold_is_zero(pw1)) { - isl_pw_qpolynomial_fold_free(pw1); - return pw2; - } - - if (isl_pw_qpolynomial_fold_is_zero(pw2)) { - isl_pw_qpolynomial_fold_free(pw2); - return pw1; - } - - if (pw1->type != pw2->type) - isl_die(pw1->dim->ctx, isl_error_invalid, - "fold types don't match", goto error); - - n = (pw1->n + 1) * (pw2->n + 1); - res = isl_pw_qpolynomial_fold_alloc_(isl_dim_copy(pw1->dim), - pw1->type, n); - - for (i = 0; i < pw1->n; ++i) { - set = isl_set_copy(pw1->p[i].set); - for (j = 0; j < pw2->n; ++j) { - struct isl_set *common; - isl_qpolynomial_fold *sum; - set = isl_set_subtract(set, - isl_set_copy(pw2->p[j].set)); - common = isl_set_intersect(isl_set_copy(pw1->p[i].set), - isl_set_copy(pw2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - sum = isl_qpolynomial_fold_fold_on_domain(common, - isl_qpolynomial_fold_copy(pw1->p[i].fold), - isl_qpolynomial_fold_copy(pw2->p[j].fold)); - - res = isl_pw_qpolynomial_fold_add_piece(res, common, sum); - } - res = isl_pw_qpolynomial_fold_add_piece(res, set, - isl_qpolynomial_fold_copy(pw1->p[i].fold)); - } - - for (j = 0; j < pw2->n; ++j) { - set = isl_set_copy(pw2->p[j].set); - for (i = 0; i < pw1->n; ++i) - set = isl_set_subtract(set, isl_set_copy(pw1->p[i].set)); - res = isl_pw_qpolynomial_fold_add_piece(res, set, - isl_qpolynomial_fold_copy(pw2->p[j].fold)); - } - - isl_pw_qpolynomial_fold_free(pw1); - isl_pw_qpolynomial_fold_free(pw2); - - return res; -error: - isl_pw_qpolynomial_fold_free(pw1); - isl_pw_qpolynomial_fold_free(pw2); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - __isl_take isl_union_pw_qpolynomial_fold *u, - __isl_take isl_pw_qpolynomial_fold *part) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - u = isl_union_pw_qpolynomial_fold_cow(u); - - if (!part || !u) - goto error; - - isl_assert(u->dim->ctx, isl_dim_match(part->dim, isl_dim_param, u->dim, - isl_dim_param), goto error); - - hash = isl_dim_get_hash(part->dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, hash, - &has_dim, part->dim, 1); - if (!entry) - goto error; - - if (!entry->data) - entry->data = part; - else { - entry->data = isl_pw_qpolynomial_fold_fold(entry->data, - isl_pw_qpolynomial_fold_copy(part)); - if (!entry->data) - goto error; - isl_pw_qpolynomial_fold_free(part); - } - - return u; -error: - isl_pw_qpolynomial_fold_free(part); - isl_union_pw_qpolynomial_fold_free(u); - return NULL; -} - -static int fold_part(__isl_take isl_pw_qpolynomial_fold *part, void *user) -{ - isl_union_pw_qpolynomial_fold **u; - u = (isl_union_pw_qpolynomial_fold **)user; - - *u = isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold(*u, part); - - return 0; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( - __isl_take isl_union_pw_qpolynomial_fold *u1, - __isl_take isl_union_pw_qpolynomial_fold *u2) -{ - u1 = isl_union_pw_qpolynomial_fold_cow(u1); - - if (!u1 || !u2) - goto error; - - if (isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(u2, - &fold_part, &u1) < 0) - goto error; - - isl_union_pw_qpolynomial_fold_free(u2); - - return u1; -error: - isl_union_pw_qpolynomial_fold_free(u1); - isl_union_pw_qpolynomial_fold_free(u2); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial( - enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp) -{ - int i; - isl_pw_qpolynomial_fold *pwf; - - if (!pwqp) - return NULL; - - pwf = isl_pw_qpolynomial_fold_alloc_(isl_dim_copy(pwqp->dim), type, - pwqp->n); - - for (i = 0; i < pwqp->n; ++i) - pwf = isl_pw_qpolynomial_fold_add_piece(pwf, - isl_set_copy(pwqp->p[i].set), - isl_qpolynomial_fold_alloc(type, - isl_qpolynomial_copy(pwqp->p[i].qp))); - - isl_pw_qpolynomial_free(pwqp); - - return pwf; -} - -int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1, - __isl_keep isl_qpolynomial_fold *fold2) -{ - int i; - - if (!fold1 || !fold2) - return -1; - - if (fold1->n != fold2->n) - return 0; - - /* We probably want to sort the qps first... */ - for (i = 0; i < fold1->n; ++i) { - int eq = isl_qpolynomial_plain_is_equal(fold1->qp[i], fold2->qp[i]); - if (eq < 0 || !eq) - return eq; - } - - return 1; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_eval( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt) -{ - isl_qpolynomial *qp; - - if (!fold || !pnt) - goto error; - isl_assert(pnt->dim->ctx, isl_dim_equal(pnt->dim, fold->dim), goto error); - isl_assert(pnt->dim->ctx, - fold->type == isl_fold_max || fold->type == isl_fold_min, - goto error); - - if (fold->n == 0) - qp = isl_qpolynomial_zero(isl_dim_copy(fold->dim)); - else { - int i; - qp = isl_qpolynomial_eval(isl_qpolynomial_copy(fold->qp[0]), - isl_point_copy(pnt)); - for (i = 1; i < fold->n; ++i) { - isl_qpolynomial *qp_i; - qp_i = isl_qpolynomial_eval( - isl_qpolynomial_copy(fold->qp[i]), - isl_point_copy(pnt)); - if (fold->type == isl_fold_max) - qp = isl_qpolynomial_max_cst(qp, qp_i); - else - qp = isl_qpolynomial_min_cst(qp, qp_i); - } - } - isl_qpolynomial_fold_free(fold); - isl_point_free(pnt); - - return qp; -error: - isl_qpolynomial_fold_free(fold); - isl_point_free(pnt); - return NULL; -} - -size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf) -{ - int i; - size_t n = 0; - - for (i = 0; i < pwf->n; ++i) - n += pwf->p[i].fold->n; - - return n; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_opt_on_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *set, int max) -{ - int i; - isl_qpolynomial *opt; - - if (!set || !fold) - goto error; - - if (fold->n == 0) { - isl_dim *dim = isl_dim_copy(fold->dim); - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - return isl_qpolynomial_zero(dim); - } - - opt = isl_qpolynomial_opt_on_domain(isl_qpolynomial_copy(fold->qp[0]), - isl_set_copy(set), max); - for (i = 1; i < fold->n; ++i) { - isl_qpolynomial *opt_i; - opt_i = isl_qpolynomial_opt_on_domain( - isl_qpolynomial_copy(fold->qp[i]), - isl_set_copy(set), max); - if (max) - opt = isl_qpolynomial_max_cst(opt, opt_i); - else - opt = isl_qpolynomial_min_cst(opt, opt_i); - } - - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - - return opt; -error: - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - return NULL; -} - -/* Check whether for each quasi-polynomial in "fold2" there is - * a quasi-polynomial in "fold1" that dominates it on "set". - */ -static int qpolynomial_fold_covers_on_domain(__isl_keep isl_set *set, - __isl_keep isl_qpolynomial_fold *fold1, - __isl_keep isl_qpolynomial_fold *fold2) -{ - int i, j; - int covers; - - if (!set || !fold1 || !fold2) - return -1; - - covers = fold1->type == isl_fold_max ? 1 : -1; - - for (i = 0; i < fold2->n; ++i) { - for (j = 0; j < fold1->n; ++j) { - isl_qpolynomial *d; - int sgn; - - d = isl_qpolynomial_sub( - isl_qpolynomial_copy(fold1->qp[j]), - isl_qpolynomial_copy(fold2->qp[i])); - sgn = isl_qpolynomial_sign(set, d); - isl_qpolynomial_free(d); - if (sgn == covers) - break; - } - if (j >= fold1->n) - return 0; - } - - return 1; -} - -/* Check whether "pwf1" dominated "pwf2", i.e., the domain of "pwf1" contains - * that of "pwf2" and on each cell, the corresponding fold from pwf1 dominates - * that of pwf2. - */ -int isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2) -{ - int i, j; - isl_set *dom1, *dom2; - int is_subset; - - if (!pwf1 || !pwf2) - return -1; - - if (pwf2->n == 0) - return 1; - if (pwf1->n == 0) - return 0; - - dom1 = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf1)); - dom2 = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf2)); - is_subset = isl_set_is_subset(dom2, dom1); - isl_set_free(dom1); - isl_set_free(dom2); - - if (is_subset < 0 || !is_subset) - return is_subset; - - for (i = 0; i < pwf2->n; ++i) { - for (j = 0; j < pwf1->n; ++j) { - int is_empty; - isl_set *common; - int covers; - - common = isl_set_intersect(isl_set_copy(pwf1->p[j].set), - isl_set_copy(pwf2->p[i].set)); - is_empty = isl_set_is_empty(common); - if (is_empty < 0 || is_empty) { - isl_set_free(common); - if (is_empty < 0) - return -1; - continue; - } - covers = qpolynomial_fold_covers_on_domain(common, - pwf1->p[j].fold, pwf2->p[i].fold); - isl_set_free(common); - if (covers < 0 || !covers) - return covers; - } - } - - return 1; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_morph( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_morph *morph) -{ - int i; - isl_ctx *ctx; - - if (!fold || !morph) - goto error; - - ctx = fold->dim->ctx; - isl_assert(ctx, isl_dim_equal(fold->dim, morph->dom->dim), goto error); - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - goto error; - - isl_dim_free(fold->dim); - fold->dim = isl_dim_copy(morph->ran->dim); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_morph(fold->qp[i], - isl_morph_copy(morph)); - if (!fold->qp[i]) - goto error; - } - - isl_morph_free(morph); - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_morph_free(morph); - return NULL; -} - -enum isl_fold isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold *fold) -{ - if (!fold) - return isl_fold_list; - return fold->type; -} - -enum isl_fold isl_union_pw_qpolynomial_fold_get_type( - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - if (!upwf) - return isl_fold_list; - return upwf->type; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_lift( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_dim *dim) -{ - int i; - - if (!fold || !dim) - goto error; - - if (isl_dim_equal(fold->dim, dim)) { - isl_dim_free(dim); - return fold; - } - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - goto error; - - isl_dim_free(fold->dim); - fold->dim = isl_dim_copy(dim); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_lift(fold->qp[i], - isl_dim_copy(dim)); - if (!fold->qp[i]) - goto error; - } - - isl_dim_free(dim); - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_dim_free(dim); - return NULL; -} - -int isl_qpolynomial_fold_foreach_qpolynomial( - __isl_keep isl_qpolynomial_fold *fold, - int (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user) -{ - int i; - - if (!fold) - return -1; - - for (i = 0; i < fold->n; ++i) - if (fn(isl_qpolynomial_copy(fold->qp[i]), user) < 0) - return -1; - - return 0; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - if (n == 0) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - fold->dim = isl_dim_move(fold->dim, dst_type, dst_pos, - src_type, src_pos, n); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_move_dims(fold->qp[i], - dst_type, dst_pos, src_type, src_pos, n); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -/* For each 0 <= i < "n", replace variable "first" + i of type "type" - * in fold->qp[k] by subs[i]. - */ -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs) -{ - int i; - - if (n == 0) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_substitute(fold->qp[i], - type, first, n, subs); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -static int add_pwqp(__isl_take isl_pw_qpolynomial *pwqp, void *user) -{ - isl_ctx *ctx; - isl_pw_qpolynomial_fold *pwf; - isl_union_pw_qpolynomial_fold **upwf; - uint32_t hash; - struct isl_hash_table_entry *entry; - - upwf = (isl_union_pw_qpolynomial_fold **)user; - - ctx = pwqp->dim->ctx; - hash = isl_dim_get_hash(pwqp->dim); - entry = isl_hash_table_find(ctx, &(*upwf)->table, - hash, &has_dim, pwqp->dim, 1); - if (!entry) - goto error; - - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial((*upwf)->type, pwqp); - if (!entry->data) - entry->data = pwf; - else { - entry->data = isl_pw_qpolynomial_fold_add(entry->data, pwf); - if (!entry->data) - return -1; - if (isl_pw_qpolynomial_fold_is_zero(entry->data)) { - isl_pw_qpolynomial_fold_free(entry->data); - isl_hash_table_remove(ctx, &(*upwf)->table, entry); - } - } - - return 0; -error: - isl_pw_qpolynomial_free(pwqp); - return -1; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_pw_qpolynomial *upwqp) -{ - upwf = isl_union_pw_qpolynomial_fold_align_params(upwf, - isl_union_pw_qpolynomial_get_dim(upwqp)); - upwqp = isl_union_pw_qpolynomial_align_params(upwqp, - isl_union_pw_qpolynomial_fold_get_dim(upwf)); - - upwf = isl_union_pw_qpolynomial_fold_cow(upwf); - if (!upwf || !upwqp) - goto error; - - if (isl_union_pw_qpolynomial_foreach_pw_qpolynomial(upwqp, &add_pwqp, - &upwf) < 0) - goto error; - - isl_union_pw_qpolynomial_free(upwqp); - - return upwf; -error: - isl_union_pw_qpolynomial_fold_free(upwf); - isl_union_pw_qpolynomial_free(upwqp); - return NULL; -} - -static int compatible_range(__isl_keep isl_dim *dim1, __isl_keep isl_dim *dim2) -{ - int m; - m = isl_dim_match(dim1, isl_dim_param, dim2, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_dim_tuple_match(dim1, isl_dim_out, dim2, isl_dim_set); -} - -/* Compute the intersection of the range of the map and the domain - * of the piecewise quasipolynomial reduction and then compute a bound - * on the associated quasipolynomial reduction over all elements - * in this intersection. - * - * We first introduce some unconstrained dimensions in the - * piecewise quasipolynomial, intersect the resulting domain - * with the wrapped map and the compute the sum. - */ -__isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold( - __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight) -{ - isl_ctx *ctx; - isl_set *dom; - isl_dim *map_dim; - isl_dim *pwf_dim; - unsigned n_in; - int ok; - - ctx = isl_map_get_ctx(map); - if (!ctx) - goto error; - - map_dim = isl_map_get_dim(map); - pwf_dim = isl_pw_qpolynomial_fold_get_dim(pwf); - ok = compatible_range(map_dim, pwf_dim); - isl_dim_free(map_dim); - isl_dim_free(pwf_dim); - if (!ok) - isl_die(ctx, isl_error_invalid, "incompatible dimensions", - goto error); - - n_in = isl_map_dim(map, isl_dim_in); - pwf = isl_pw_qpolynomial_fold_insert_dims(pwf, isl_dim_set, 0, n_in); - - dom = isl_map_wrap(map); - pwf = isl_pw_qpolynomial_fold_reset_dim(pwf, isl_set_get_dim(dom)); - - pwf = isl_pw_qpolynomial_fold_intersect_domain(pwf, dom); - pwf = isl_pw_qpolynomial_fold_bound(pwf, tight); - - return pwf; -error: - isl_map_free(map); - isl_pw_qpolynomial_fold_free(pwf); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold( - __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight) -{ - isl_map *map; - - map = isl_map_from_range(set); - return isl_map_apply_pw_qpolynomial_fold(map, pwf, tight); -} - -struct isl_apply_fold_data { - isl_union_pw_qpolynomial_fold *upwf; - isl_union_pw_qpolynomial_fold *res; - isl_map *map; - int tight; -}; - -static int pw_qpolynomial_fold_apply(__isl_take isl_pw_qpolynomial_fold *pwf, - void *user) -{ - isl_dim *map_dim; - isl_dim *pwf_dim; - struct isl_apply_fold_data *data = user; - int ok; - - map_dim = isl_map_get_dim(data->map); - pwf_dim = isl_pw_qpolynomial_fold_get_dim(pwf); - ok = compatible_range(map_dim, pwf_dim); - isl_dim_free(map_dim); - isl_dim_free(pwf_dim); - - if (ok) { - pwf = isl_map_apply_pw_qpolynomial_fold(isl_map_copy(data->map), - pwf, data->tight ? &data->tight : NULL); - data->res = isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - data->res, pwf); - } else - isl_pw_qpolynomial_fold_free(pwf); - - return 0; -} - -static int map_apply(__isl_take isl_map *map, void *user) -{ - struct isl_apply_fold_data *data = user; - int r; - - data->map = map; - r = isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( - data->upwf, &pw_qpolynomial_fold_apply, data); - - isl_map_free(map); - return r; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_map *umap, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight) -{ - isl_dim *dim; - enum isl_fold type; - struct isl_apply_fold_data data; - - upwf = isl_union_pw_qpolynomial_fold_align_params(upwf, - isl_union_map_get_dim(umap)); - umap = isl_union_map_align_params(umap, - isl_union_pw_qpolynomial_fold_get_dim(upwf)); - - data.upwf = upwf; - data.tight = tight ? 1 : 0; - dim = isl_union_pw_qpolynomial_fold_get_dim(upwf); - type = isl_union_pw_qpolynomial_fold_get_type(upwf); - data.res = isl_union_pw_qpolynomial_fold_zero(dim, type); - if (isl_union_map_foreach_map(umap, &map_apply, &data) < 0) - goto error; - - isl_union_map_free(umap); - isl_union_pw_qpolynomial_fold_free(upwf); - - if (tight) - *tight = data.tight; - - return data.res; -error: - isl_union_map_free(umap); - isl_union_pw_qpolynomial_fold_free(upwf); - isl_union_pw_qpolynomial_fold_free(data.res); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_set *uset, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight) -{ - return isl_union_map_apply_union_pw_qpolynomial_fold(uset, upwf, tight); -} - -/* Reorder the dimension of "fold" according to the given reordering. - */ -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_realign( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_reordering *r) -{ - int i; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold || !r) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_realign(fold->qp[i], - isl_reordering_copy(r)); - if (!fold->qp[i]) - goto error; - } - - fold = isl_qpolynomial_fold_reset_dim(fold, isl_dim_copy(r->dim)); - - isl_reordering_free(r); - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_mul_isl_int( - __isl_take isl_qpolynomial_fold *fold, isl_int v) -{ - int i; - - if (isl_int_is_one(v)) - return fold; - if (fold && isl_int_is_zero(v)) { - isl_qpolynomial_fold *zero; - isl_dim *dim = isl_dim_copy(fold->dim); - zero = isl_qpolynomial_fold_empty(fold->type, dim); - isl_qpolynomial_fold_free(fold); - return zero; - } - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - if (isl_int_is_neg(v)) - fold->type = isl_fold_type_negate(fold->type); - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_mul_isl_int(fold->qp[i], v); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( - __isl_take isl_qpolynomial_fold *fold, isl_int v) -{ - return isl_qpolynomial_fold_mul_isl_int(fold, v); -} diff --git a/cloog-0.16.3/isl/isl_gmp.c b/cloog-0.16.3/isl/isl_gmp.c deleted file mode 100644 index 0c8db59ae15d1010b8d25a9be9077f09c33c4f73..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_gmp.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include - -uint32_t isl_gmp_hash(mpz_t v, uint32_t hash) -{ - int sa = v[0]._mp_size; - int abs_sa = sa < 0 ? -sa : sa; - unsigned char *data = (unsigned char *)v[0]._mp_d; - unsigned char *end = data + abs_sa * sizeof(v[0]._mp_d[0]); - - if (sa < 0) - isl_hash_byte(hash, 0xFF); - for (; data < end; ++data) - isl_hash_byte(hash, *data); - return hash; -} diff --git a/cloog-0.16.3/isl/isl_hash.c b/cloog-0.16.3/isl/isl_hash.c deleted file mode 100644 index 52e3135ee174a36353aed5896a1842acfecd0d60..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_hash.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_config.h" - -uint32_t isl_hash_string(uint32_t hash, const char *s) -{ - for (; *s; s++) - isl_hash_byte(hash, *s); - return hash; -} - -uint32_t isl_hash_mem(uint32_t hash, const void *p, size_t len) -{ - int i; - const char *s = p; - for (i = 0; i < len; ++i) - isl_hash_byte(hash, s[i]); - return hash; -} - -static unsigned int round_up(unsigned int v) -{ - int old_v = v; - - while (v) { - old_v = v; - v ^= v & -v; - } - return old_v << 1; -} - -int isl_hash_table_init(struct isl_ctx *ctx, struct isl_hash_table *table, - int min_size) -{ - size_t size; - - if (!table) - return -1; - - if (min_size < 2) - min_size = 2; - table->bits = ffs(round_up(4 * (min_size + 1) / 3 - 1)) - 1; - table->n = 0; - - size = 1 << table->bits; - table->entries = isl_calloc_array(ctx, struct isl_hash_table_entry, - size); - if (!table->entries) - return -1; - - return 0; -} - -static int grow_table(struct isl_ctx *ctx, struct isl_hash_table *table, - int (*eq)(const void *entry, const void *val)) -{ - size_t old_size, size; - struct isl_hash_table_entry *entries; - uint32_t h; - - entries = table->entries; - old_size = 1 << table->bits; - size = 2 * old_size; - table->entries = isl_calloc_array(ctx, struct isl_hash_table_entry, - size); - if (!table->entries) { - table->entries = entries; - return -1; - } - - table->bits++; - - for (h = 0; h < old_size; ++h) { - struct isl_hash_table_entry *entry; - - if (!entries[h].data) - continue; - - entry = isl_hash_table_find(ctx, table, entries[h].hash, - eq, entries[h].data, 1); - if (!entry) { - table->bits--; - free(table->entries); - table->entries = entries; - return -1; - } - - *entry = entries[h]; - } - - free(entries); - - return 0; -} - -struct isl_hash_table *isl_hash_table_alloc(struct isl_ctx *ctx, int min_size) -{ - struct isl_hash_table *table = NULL; - - table = isl_alloc_type(ctx, struct isl_hash_table); - if (isl_hash_table_init(ctx, table, min_size)) - goto error; - return table; -error: - isl_hash_table_free(ctx, table); - return NULL; -} - -void isl_hash_table_clear(struct isl_hash_table *table) -{ - if (!table) - return; - free(table->entries); -} - -void isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table) -{ - if (!table) - return; - isl_hash_table_clear(table); - free(table); -} - -struct isl_hash_table_entry *isl_hash_table_find(struct isl_ctx *ctx, - struct isl_hash_table *table, - uint32_t key_hash, - int (*eq)(const void *entry, const void *val), - const void *val, int reserve) -{ - size_t size; - uint32_t h, key_bits; - - key_bits = isl_hash_bits(key_hash, table->bits); - size = 1 << table->bits; - for (h = key_bits; table->entries[h].data; h = (h+1) % size) - if (table->entries[h].hash == key_hash && - eq(table->entries[h].data, val)) - return &table->entries[h]; - - if (!reserve) - return NULL; - - if (4 * table->n >= 3 * size) { - if (grow_table(ctx, table, eq) < 0) - return NULL; - return isl_hash_table_find(ctx, table, key_hash, eq, val, 1); - } - - table->n++; - table->entries[h].hash = key_hash; - - return &table->entries[h]; -} - -int isl_hash_table_foreach(struct isl_ctx *ctx, - struct isl_hash_table *table, - int (*fn)(void **entry, void *user), void *user) -{ - size_t size; - uint32_t h; - - size = 1 << table->bits; - for (h = 0; h < size; ++ h) - if (table->entries[h].data && - fn(&table->entries[h].data, user) < 0) - return -1; - - return 0; -} - -void isl_hash_table_remove(struct isl_ctx *ctx, - struct isl_hash_table *table, - struct isl_hash_table_entry *entry) -{ - int h, h2; - size_t size; - - if (!table || !entry) - return; - - size = 1 << table->bits; - h = entry - table->entries; - isl_assert(ctx, h >= 0 && h < size, return); - - for (h2 = h+1; table->entries[h2 % size].data; h2++) { - uint32_t bits = isl_hash_bits(table->entries[h2 % size].hash, - table->bits); - uint32_t offset = (size + bits - (h+1)) % size; - if (offset <= h2 - (h+1)) - continue; - *entry = table->entries[h2 % size]; - h = h2; - entry = &table->entries[h % size]; - } - - entry->hash = 0; - entry->data = NULL; - table->n--; -} diff --git a/cloog-0.16.3/isl/isl_hmap_map_basic_set.c b/cloog-0.16.3/isl/isl_hmap_map_basic_set.c deleted file mode 100644 index b303516f03109053d4e6ea529c6e03348829b750..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_hmap_map_basic_set.c +++ /dev/null @@ -1,102 +0,0 @@ -#include - -struct isl_map_basic_set_pair { - isl_map *key; - isl_basic_set *val; -}; - -__isl_give isl_hmap_map_basic_set *isl_hmap_map_basic_set_alloc(isl_ctx *ctx, - int min_size) -{ - return (isl_hmap_map_basic_set *) isl_hash_table_alloc(ctx, min_size); -} - -static int free_pair(void **entry, void *user) -{ - struct isl_map_basic_set_pair *pair = *entry; - isl_map_free(pair->key); - isl_basic_set_free(pair->val); - free(pair); - *entry = NULL; - return 0; -} - -void isl_hmap_map_basic_set_free(isl_ctx *ctx, - __isl_take isl_hmap_map_basic_set *hmap) -{ - if (!hmap) - return; - isl_hash_table_foreach(ctx, &hmap->table, &free_pair, NULL); - isl_hash_table_free(ctx, &hmap->table); -} - -static int has_key(const void *entry, const void *key) -{ - const struct isl_map_basic_set_pair *pair = entry; - isl_map *map = (isl_map *)key; - - return isl_map_plain_is_equal(pair->key, map); -} - -int isl_hmap_map_basic_set_has(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_keep isl_map *key) -{ - uint32_t hash; - - hash = isl_map_get_hash(key); - return !!isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 0); -} - -__isl_give isl_basic_set *isl_hmap_map_basic_set_get(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key) -{ - struct isl_hash_table_entry *entry; - struct isl_map_basic_set_pair *pair; - uint32_t hash; - - hash = isl_map_get_hash(key); - entry = isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 0); - isl_map_free(key); - - if (!entry) - return NULL; - - pair = entry->data; - - return isl_basic_set_copy(pair->val); -} - -int isl_hmap_map_basic_set_set(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key, - __isl_take isl_basic_set *val) -{ - struct isl_hash_table_entry *entry; - struct isl_map_basic_set_pair *pair; - uint32_t hash; - - hash = isl_map_get_hash(key); - entry = isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 1); - - if (!entry) - return -1; - - if (entry->data) { - pair = entry->data; - isl_basic_set_free(pair->val); - pair->val = val; - isl_map_free(key); - return 0; - } - - pair = isl_alloc_type(ctx, struct isl_map_basic_set_pair); - if (!pair) { - isl_map_free(key); - isl_basic_set_free(val); - return -1; - } - - entry->data = pair; - pair->key = key; - pair->val = val; - return 0; -} diff --git a/cloog-0.16.3/isl/isl_hmap_map_basic_set.h b/cloog-0.16.3/isl/isl_hmap_map_basic_set.h deleted file mode 100644 index 905791d61b57532d21b2ecc84e739e397b100a4c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_hmap_map_basic_set.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ISL_HMAP_MAP_BASIC_SET_H -#define ISL_HMAP_MAP_BASIC_SET_H - -#include -#include -#include - -struct isl_hmap_map_basic_set { - struct isl_hash_table table; -}; -typedef struct isl_hmap_map_basic_set isl_hmap_map_basic_set; - -__isl_give isl_hmap_map_basic_set *isl_hmap_map_basic_set_alloc( isl_ctx *ctx, - int min_size); -void isl_hmap_map_basic_set_free(isl_ctx *ctx, - __isl_take isl_hmap_map_basic_set *hmap); - -int isl_hmap_map_basic_set_has(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_keep isl_map *key); -__isl_give isl_basic_set *isl_hmap_map_basic_set_get(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key); -int isl_hmap_map_basic_set_set(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key, - __isl_take isl_basic_set *val); - -#endif diff --git a/cloog-0.16.3/isl/isl_ilp.c b/cloog-0.16.3/isl/isl_ilp.c deleted file mode 100644 index 1994a682623fdfe9c0f67c745efbdeed3923d944..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_ilp.c +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_sample.h" -#include -#include "isl_equalities.h" -#include -#include -#include - -/* Given a basic set "bset", construct a basic set U such that for - * each element x in U, the whole unit box positioned at x is inside - * the given basic set. - * Note that U may not contain all points that satisfy this property. - * - * We simply add the sum of all negative coefficients to the constant - * term. This ensures that if x satisfies the resulting constraints, - * then x plus any sum of unit vectors satisfies the original constraints. - */ -static struct isl_basic_set *unit_box_base_points(struct isl_basic_set *bset) -{ - int i, j, k; - struct isl_basic_set *unit_box = NULL; - unsigned total; - - if (!bset) - goto error; - - if (bset->n_eq != 0) { - unit_box = isl_basic_set_empty_like(bset); - isl_basic_set_free(bset); - return unit_box; - } - - total = isl_basic_set_total_dim(bset); - unit_box = isl_basic_set_alloc_dim(isl_basic_set_get_dim(bset), - 0, 0, bset->n_ineq); - - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(unit_box); - if (k < 0) - goto error; - isl_seq_cpy(unit_box->ineq[k], bset->ineq[i], 1 + total); - for (j = 0; j < total; ++j) { - if (isl_int_is_nonneg(unit_box->ineq[k][1 + j])) - continue; - isl_int_add(unit_box->ineq[k][0], - unit_box->ineq[k][0], unit_box->ineq[k][1 + j]); - } - } - - isl_basic_set_free(bset); - return unit_box; -error: - isl_basic_set_free(bset); - isl_basic_set_free(unit_box); - return NULL; -} - -/* Find an integer point in "bset", preferably one that is - * close to minimizing "f". - * - * We first check if we can easily put unit boxes inside bset. - * If so, we take the best base point of any of the unit boxes we can find - * and round it up to the nearest integer. - * If not, we simply pick any integer point in "bset". - */ -static struct isl_vec *initial_solution(struct isl_basic_set *bset, isl_int *f) -{ - enum isl_lp_result res; - struct isl_basic_set *unit_box; - struct isl_vec *sol; - - unit_box = unit_box_base_points(isl_basic_set_copy(bset)); - - res = isl_basic_set_solve_lp(unit_box, 0, f, bset->ctx->one, - NULL, NULL, &sol); - if (res == isl_lp_ok) { - isl_basic_set_free(unit_box); - return isl_vec_ceil(sol); - } - - isl_basic_set_free(unit_box); - - return isl_basic_set_sample_vec(isl_basic_set_copy(bset)); -} - -/* Restrict "bset" to those points with values for f in the interval [l, u]. - */ -static struct isl_basic_set *add_bounds(struct isl_basic_set *bset, - isl_int *f, isl_int l, isl_int u) -{ - int k; - unsigned total; - - total = isl_basic_set_total_dim(bset); - bset = isl_basic_set_extend_constraints(bset, 0, 2); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->ineq[k], f, 1 + total); - isl_int_sub(bset->ineq[k][0], bset->ineq[k][0], l); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_neg(bset->ineq[k], f, 1 + total); - isl_int_add(bset->ineq[k][0], bset->ineq[k][0], u); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Find an integer point in "bset" that minimizes f (in any) such that - * the value of f lies inside the interval [l, u]. - * Return this integer point if it can be found. - * Otherwise, return sol. - * - * We perform a number of steps until l > u. - * In each step, we look for an integer point with value in either - * the whole interval [l, u] or half of the interval [l, l+floor(u-l-1/2)]. - * The choice depends on whether we have found an integer point in the - * previous step. If so, we look for the next point in half of the remaining - * interval. - * If we find a point, the current solution is updated and u is set - * to its value minus 1. - * If no point can be found, we update l to the upper bound of the interval - * we checked (u or l+floor(u-l-1/2)) plus 1. - */ -static struct isl_vec *solve_ilp_search(struct isl_basic_set *bset, - isl_int *f, isl_int *opt, struct isl_vec *sol, isl_int l, isl_int u) -{ - isl_int tmp; - int divide = 1; - - isl_int_init(tmp); - - while (isl_int_le(l, u)) { - struct isl_basic_set *slice; - struct isl_vec *sample; - - if (!divide) - isl_int_set(tmp, u); - else { - isl_int_sub(tmp, u, l); - isl_int_fdiv_q_ui(tmp, tmp, 2); - isl_int_add(tmp, tmp, l); - } - slice = add_bounds(isl_basic_set_copy(bset), f, l, tmp); - sample = isl_basic_set_sample_vec(slice); - if (!sample) { - isl_vec_free(sol); - sol = NULL; - break; - } - if (sample->size > 0) { - isl_vec_free(sol); - sol = sample; - isl_seq_inner_product(f, sol->el, sol->size, opt); - isl_int_sub_ui(u, *opt, 1); - divide = 1; - } else { - isl_vec_free(sample); - if (!divide) - break; - isl_int_add_ui(l, tmp, 1); - divide = 0; - } - } - - isl_int_clear(tmp); - - return sol; -} - -/* Find an integer point in "bset" that minimizes f (if any). - * If sol_p is not NULL then the integer point is returned in *sol_p. - * The optimal value of f is returned in *opt. - * - * The algorithm maintains a currently best solution and an interval [l, u] - * of values of f for which integer solutions could potentially still be found. - * The initial value of the best solution so far is any solution. - * The initial value of l is minimal value of f over the rationals - * (rounded up to the nearest integer). - * The initial value of u is the value of f at the initial solution minus 1. - * - * We then call solve_ilp_search to perform a binary search on the interval. - */ -static enum isl_lp_result solve_ilp(struct isl_basic_set *bset, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p) -{ - enum isl_lp_result res; - isl_int l, u; - struct isl_vec *sol; - - res = isl_basic_set_solve_lp(bset, 0, f, bset->ctx->one, - opt, NULL, &sol); - if (res == isl_lp_ok && isl_int_is_one(sol->el[0])) { - if (sol_p) - *sol_p = sol; - else - isl_vec_free(sol); - return isl_lp_ok; - } - isl_vec_free(sol); - if (res == isl_lp_error || res == isl_lp_empty) - return res; - - sol = initial_solution(bset, f); - if (!sol) - return isl_lp_error; - if (sol->size == 0) { - isl_vec_free(sol); - return isl_lp_empty; - } - if (res == isl_lp_unbounded) { - isl_vec_free(sol); - return isl_lp_unbounded; - } - - isl_int_init(l); - isl_int_init(u); - - isl_int_set(l, *opt); - - isl_seq_inner_product(f, sol->el, sol->size, opt); - isl_int_sub_ui(u, *opt, 1); - - sol = solve_ilp_search(bset, f, opt, sol, l, u); - if (!sol) - res = isl_lp_error; - - isl_int_clear(l); - isl_int_clear(u); - - if (sol_p) - *sol_p = sol; - else - isl_vec_free(sol); - - return res; -} - -static enum isl_lp_result solve_ilp_with_eq(struct isl_basic_set *bset, int max, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p) -{ - unsigned dim; - enum isl_lp_result res; - struct isl_mat *T = NULL; - struct isl_vec *v; - - bset = isl_basic_set_copy(bset); - dim = isl_basic_set_total_dim(bset); - v = isl_vec_alloc(bset->ctx, 1 + dim); - if (!v) - goto error; - isl_seq_cpy(v->el, f, 1 + dim); - bset = isl_basic_set_remove_equalities(bset, &T, NULL); - v = isl_vec_mat_product(v, isl_mat_copy(T)); - if (!v) - goto error; - res = isl_basic_set_solve_ilp(bset, max, v->el, opt, sol_p); - isl_vec_free(v); - if (res == isl_lp_ok && sol_p) { - *sol_p = isl_mat_vec_product(T, *sol_p); - if (!*sol_p) - res = isl_lp_error; - } else - isl_mat_free(T); - isl_basic_set_free(bset); - return res; -error: - isl_mat_free(T); - isl_basic_set_free(bset); - return isl_lp_error; -} - -/* Find an integer point in "bset" that minimizes (or maximizes if max is set) - * f (if any). - * If sol_p is not NULL then the integer point is returned in *sol_p. - * The optimal value of f is returned in *opt. - * - * If there is any equality among the points in "bset", then we first - * project it out. Otherwise, we continue with solve_ilp above. - */ -enum isl_lp_result isl_basic_set_solve_ilp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p) -{ - unsigned dim; - enum isl_lp_result res; - - if (!bset) - return isl_lp_error; - if (sol_p) - *sol_p = NULL; - - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - - if (isl_basic_set_plain_is_empty(bset)) - return isl_lp_empty; - - if (bset->n_eq) - return solve_ilp_with_eq(bset, max, f, opt, sol_p); - - dim = isl_basic_set_total_dim(bset); - - if (max) - isl_seq_neg(f, f, 1 + dim); - - res = solve_ilp(bset, f, opt, sol_p); - - if (max) { - isl_seq_neg(f, f, 1 + dim); - isl_int_neg(*opt, *opt); - } - - return res; -error: - isl_basic_set_free(bset); - return isl_lp_error; -} - -static enum isl_lp_result basic_set_opt(__isl_keep isl_basic_set *bset, int max, - __isl_keep isl_aff *obj, isl_int *opt) -{ - enum isl_lp_result res; - - if (!obj) - return isl_lp_error; - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_underlying_set(bset); - res = isl_basic_set_solve_ilp(bset, max, obj->v->el + 1, opt, NULL); - isl_basic_set_free(bset); - return res; -} - -static __isl_give isl_mat *extract_divs(__isl_keep isl_basic_set *bset) -{ - int i; - isl_ctx *ctx = isl_basic_set_get_ctx(bset); - isl_mat *div; - - div = isl_mat_alloc(ctx, bset->n_div, - 1 + 1 + isl_basic_set_total_dim(bset)); - if (!div) - return NULL; - - for (i = 0; i < bset->n_div; ++i) - isl_seq_cpy(div->row[i], bset->div[i], div->n_col); - - return div; -} - -enum isl_lp_result isl_basic_set_opt(__isl_keep isl_basic_set *bset, int max, - __isl_keep isl_aff *obj, isl_int *opt) -{ - int *exp1 = NULL; - int *exp2 = NULL; - isl_ctx *ctx; - isl_mat *bset_div = NULL; - isl_mat *div = NULL; - enum isl_lp_result res; - - if (!bset || !obj) - return isl_lp_error; - - ctx = isl_aff_get_ctx(obj); - if (!isl_dim_equal(bset->dim, obj->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", return isl_lp_error); - if (!isl_int_is_one(obj->v->el[0])) - isl_die(ctx, isl_error_unsupported, - "expecting integer affine expression", - return isl_lp_error); - - if (bset->n_div == 0 && obj->ls->div->n_row == 0) - return basic_set_opt(bset, max, obj, opt); - - bset = isl_basic_set_copy(bset); - obj = isl_aff_copy(obj); - - bset_div = extract_divs(bset); - exp1 = isl_alloc_array(ctx, int, bset_div->n_row); - exp2 = isl_alloc_array(ctx, int, obj->ls->div->n_row); - if (!bset_div || !exp1 || !exp2) - goto error; - - div = isl_merge_divs(bset_div, obj->ls->div, exp1, exp2); - - bset = isl_basic_set_expand_divs(bset, isl_mat_copy(div), exp1); - obj = isl_aff_expand_divs(obj, isl_mat_copy(div), exp2); - - res = basic_set_opt(bset, max, obj, opt); - - isl_mat_free(bset_div); - isl_mat_free(div); - free(exp1); - free(exp2); - isl_basic_set_free(bset); - isl_aff_free(obj); - - return res; -error: - isl_mat_free(div); - isl_mat_free(bset_div); - free(exp1); - free(exp2); - isl_basic_set_free(bset); - isl_aff_free(obj); - return isl_lp_error; -} - -/* Compute the minimum (maximum if max is set) of the integer affine - * expression obj over the points in set and put the result in *opt. - */ -enum isl_lp_result isl_set_opt(__isl_keep isl_set *set, int max, - __isl_keep isl_aff *obj, isl_int *opt) -{ - int i; - enum isl_lp_result res; - int empty = 1; - isl_int opt_i; - - if (!set || !obj) - return isl_lp_error; - if (set->n == 0) - return isl_lp_empty; - - res = isl_basic_set_opt(set->p[0], max, obj, opt); - if (res == isl_lp_error || res == isl_lp_unbounded) - return res; - if (set->n == 1) - return res; - if (res == isl_lp_ok) - empty = 0; - - isl_int_init(opt_i); - for (i = 1; i < set->n; ++i) { - res = isl_basic_set_opt(set->p[i], max, obj, &opt_i); - if (res == isl_lp_error || res == isl_lp_unbounded) { - isl_int_clear(opt_i); - return res; - } - if (res == isl_lp_ok) - empty = 0; - if (isl_int_gt(opt_i, *opt)) - isl_int_set(*opt, opt_i); - } - isl_int_clear(opt_i); - - return empty ? isl_lp_empty : isl_lp_ok; -} - -enum isl_lp_result isl_basic_set_max(__isl_keep isl_basic_set *bset, - __isl_keep isl_aff *obj, isl_int *opt) -{ - return isl_basic_set_opt(bset, 1, obj, opt); -} - -enum isl_lp_result isl_set_max(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt) -{ - return isl_set_opt(set, 1, obj, opt); -} diff --git a/cloog-0.16.3/isl/isl_input.c b/cloog-0.16.3/isl/isl_input.c deleted file mode 100644 index a1cf268b36a4ae223b72ba45f7044858d57311ec..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_input.c +++ /dev/null @@ -1,2554 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "isl_polynomial_private.h" -#include -#include - -struct variable { - char *name; - int pos; - isl_vec *def; - /* non-zero if variable represents a min (-1) or a max (1) */ - int sign; - isl_mat *list; - struct variable *next; -}; - -struct vars { - struct isl_ctx *ctx; - int n; - struct variable *v; -}; - -static struct vars *vars_new(struct isl_ctx *ctx) -{ - struct vars *v; - v = isl_alloc_type(ctx, struct vars); - if (!v) - return NULL; - v->ctx = ctx; - v->n = 0; - v->v = NULL; - return v; -} - -static void variable_free(struct variable *var) -{ - while (var) { - struct variable *next = var->next; - isl_mat_free(var->list); - isl_vec_free(var->def); - free(var->name); - free(var); - var = next; - } -} - -static void vars_free(struct vars *v) -{ - if (!v) - return; - variable_free(v->v); - free(v); -} - -static void vars_drop(struct vars *v, int n) -{ - struct variable *var; - - if (!v || !v->v) - return; - - v->n -= n; - - var = v->v; - while (--n >= 0) { - struct variable *next = var->next; - isl_mat_free(var->list); - isl_vec_free(var->def); - free(var->name); - free(var); - var = next; - } - v->v = var; -} - -static struct variable *variable_new(struct vars *v, const char *name, int len, - int pos) -{ - struct variable *var; - var = isl_calloc_type(v->ctx, struct variable); - if (!var) - goto error; - var->name = strdup(name); - var->name[len] = '\0'; - var->pos = pos; - var->def = NULL; - var->next = v->v; - return var; -error: - variable_free(v->v); - return NULL; -} - -static int vars_pos(struct vars *v, const char *s, int len) -{ - int pos; - struct variable *q; - - if (len == -1) - len = strlen(s); - for (q = v->v; q; q = q->next) { - if (strncmp(q->name, s, len) == 0 && q->name[len] == '\0') - break; - } - if (q) - pos = q->pos; - else { - pos = v->n; - v->v = variable_new(v, s, len, v->n); - if (!v->v) - return -1; - v->n++; - } - return pos; -} - -static int vars_add_anon(struct vars *v) -{ - v->v = variable_new(v, "", 0, v->n); - - if (!v->v) - return -1; - v->n++; - - return 0; -} - -static __isl_give isl_basic_map *set_name(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, char *name) -{ - char *prime; - - if (!bmap) - return NULL; - if (!name) - return bmap; - - prime = strchr(name, '\''); - if (prime) - *prime = '\0'; - bmap = isl_basic_map_set_dim_name(bmap, type, pos, name); - if (prime) - *prime = '\''; - - return bmap; -} - -/* Obtain next token, with some preprocessing. - * In particular, evaluate expressions of the form x^y, - * with x and y values. - */ -static struct isl_token *next_token(struct isl_stream *s) -{ - struct isl_token *tok, *tok2; - - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) - return tok; - if (!isl_stream_eat_if_available(s, '^')) - return tok; - tok2 = isl_stream_next_token(s); - if (!tok2 || tok2->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok2, "expecting constant value"); - goto error; - } - - isl_int_pow_ui(tok->u.v, tok->u.v, isl_int_get_ui(tok2->u.v)); - - isl_token_free(tok2); - return tok; -error: - isl_token_free(tok); - isl_token_free(tok2); - return NULL; -} - -static int accept_cst_factor(struct isl_stream *s, isl_int *f) -{ - struct isl_token *tok; - - tok = next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting constant value"); - goto error; - } - - isl_int_mul(*f, *f, tok->u.v); - - isl_token_free(tok); - - if (isl_stream_eat_if_available(s, '*')) - return accept_cst_factor(s, f); - - return 0; -error: - isl_token_free(tok); - return -1; -} - -/* Given an affine expression aff, return an affine expression - * for aff % d, with d the next token on the stream, which is - * assumed to be a constant. - * - * We introduce an integer division q = [aff/d] and the result - * is set to aff - d q. - */ -static __isl_give isl_vec *affine_mod(struct isl_stream *s, - struct vars *v, __isl_take isl_vec *aff) -{ - struct isl_token *tok; - struct variable *var; - isl_vec *mod; - - tok = next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting constant value"); - goto error; - } - - if (vars_add_anon(v) < 0) - goto error; - - var = v->v; - - var->def = isl_vec_alloc(s->ctx, 2 + v->n); - if (!var->def) - goto error; - isl_seq_cpy(var->def->el + 1, aff->el, aff->size); - isl_int_set_si(var->def->el[1 + aff->size], 0); - isl_int_set(var->def->el[0], tok->u.v); - - mod = isl_vec_alloc(v->ctx, 1 + v->n); - if (!mod) - goto error; - - isl_seq_cpy(mod->el, aff->el, aff->size); - isl_int_neg(mod->el[aff->size], tok->u.v); - - isl_vec_free(aff); - isl_token_free(tok); - return mod; -error: - isl_vec_free(aff); - isl_token_free(tok); - return NULL; -} - -static struct isl_vec *accept_affine(struct isl_stream *s, struct vars *v); -static int read_div_definition(struct isl_stream *s, struct vars *v); -static int read_minmax_definition(struct isl_stream *s, struct vars *v); - -static __isl_give isl_vec *accept_affine_factor(struct isl_stream *s, - struct vars *v) -{ - struct isl_token *tok = NULL; - isl_vec *aff = NULL; - - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type == ISL_TOKEN_IDENT) { - int n = v->n; - int pos = vars_pos(v, tok->u.s, -1); - if (pos < 0) - goto error; - if (pos >= n) { - isl_stream_error(s, tok, "unknown identifier"); - goto error; - } - - aff = isl_vec_alloc(v->ctx, 1 + v->n); - if (!aff) - goto error; - isl_seq_clr(aff->el, aff->size); - isl_int_set_si(aff->el[1 + pos], 1); - isl_token_free(tok); - } else if (tok->type == ISL_TOKEN_VALUE) { - if (isl_stream_eat_if_available(s, '*')) { - aff = accept_affine_factor(s, v); - aff = isl_vec_scale(aff, tok->u.v); - } else { - aff = isl_vec_alloc(v->ctx, 1 + v->n); - if (!aff) - goto error; - isl_seq_clr(aff->el, aff->size); - isl_int_set(aff->el[0], tok->u.v); - } - isl_token_free(tok); - } else if (tok->type == '(') { - isl_token_free(tok); - tok = NULL; - aff = accept_affine(s, v); - if (!aff) - goto error; - if (isl_stream_eat(s, ')')) - goto error; - } else if (tok->type == '[' || - tok->type == ISL_TOKEN_FLOORD || - tok->type == ISL_TOKEN_CEILD) { - int ceil = tok->type == ISL_TOKEN_CEILD; - struct variable *var; - if (vars_add_anon(v) < 0) - goto error; - var = v->v; - aff = isl_vec_alloc(v->ctx, 1 + v->n); - if (!aff) - goto error; - isl_seq_clr(aff->el, aff->size); - isl_int_set_si(aff->el[1 + v->n - 1], ceil ? -1 : 1); - isl_stream_push_token(s, tok); - tok = NULL; - if (read_div_definition(s, v) < 0) - goto error; - if (ceil) - isl_seq_neg(var->def->el + 1, var->def->el + 1, - var->def->size - 1); - aff = isl_vec_zero_extend(aff, 1 + v->n); - } else if (tok->type == ISL_TOKEN_MIN || tok->type == ISL_TOKEN_MAX) { - if (vars_add_anon(v) < 0) - goto error; - aff = isl_vec_alloc(v->ctx, 1 + v->n); - if (!aff) - goto error; - isl_seq_clr(aff->el, aff->size); - isl_int_set_si(aff->el[1 + v->n - 1], 1); - isl_stream_push_token(s, tok); - tok = NULL; - if (read_minmax_definition(s, v) < 0) - goto error; - aff = isl_vec_zero_extend(aff, 1 + v->n); - } else { - isl_stream_error(s, tok, "expecting factor"); - goto error; - } - if (isl_stream_eat_if_available(s, '%')) - return affine_mod(s, v, aff); - if (isl_stream_eat_if_available(s, '*')) { - isl_int f; - isl_int_init(f); - isl_int_set_si(f, 1); - if (accept_cst_factor(s, &f) < 0) { - isl_int_clear(f); - goto error2; - } - aff = isl_vec_scale(aff, f); - isl_int_clear(f); - } - - return aff; -error: - isl_token_free(tok); -error2: - isl_vec_free(aff); - return NULL; -} - -static struct isl_vec *accept_affine(struct isl_stream *s, struct vars *v) -{ - struct isl_token *tok = NULL; - struct isl_vec *aff; - int sign = 1; - - aff = isl_vec_alloc(v->ctx, 1 + v->n); - if (!aff) - return NULL; - isl_seq_clr(aff->el, aff->size); - - for (;;) { - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type == '-') { - sign = -sign; - isl_token_free(tok); - continue; - } - if (tok->type == '(' || tok->type == '[' || - tok->type == ISL_TOKEN_MIN || tok->type == ISL_TOKEN_MAX || - tok->type == ISL_TOKEN_FLOORD || - tok->type == ISL_TOKEN_CEILD || - tok->type == ISL_TOKEN_IDENT) { - isl_vec *aff2; - isl_stream_push_token(s, tok); - tok = NULL; - aff2 = accept_affine_factor(s, v); - if (sign < 0) - aff2 = isl_vec_scale(aff2, s->ctx->negone); - aff = isl_vec_zero_extend(aff, 1 + v->n); - aff = isl_vec_add(aff, aff2); - if (!aff) - goto error; - sign = 1; - } else if (tok->type == ISL_TOKEN_VALUE) { - if (sign < 0) - isl_int_neg(tok->u.v, tok->u.v); - if (isl_stream_eat_if_available(s, '*') || - isl_stream_next_token_is(s, ISL_TOKEN_IDENT)) { - isl_vec *aff2; - aff2 = accept_affine_factor(s, v); - aff2 = isl_vec_scale(aff2, tok->u.v); - aff = isl_vec_zero_extend(aff, 1 + v->n); - aff = isl_vec_add(aff, aff2); - if (!aff) - goto error; - } else { - isl_int_add(aff->el[0], aff->el[0], tok->u.v); - } - sign = 1; - } else { - isl_stream_error(s, tok, "unexpected isl_token"); - isl_stream_push_token(s, tok); - isl_vec_free(aff); - return NULL; - } - isl_token_free(tok); - - tok = next_token(s); - if (tok && tok->type == '-') { - sign = -sign; - isl_token_free(tok); - } else if (tok && tok->type == '+') { - /* nothing */ - isl_token_free(tok); - } else if (tok && tok->type == ISL_TOKEN_VALUE && - isl_int_is_neg(tok->u.v)) { - isl_stream_push_token(s, tok); - } else { - if (tok) - isl_stream_push_token(s, tok); - break; - } - } - - return aff; -error: - isl_token_free(tok); - isl_vec_free(aff); - return NULL; -} - -/* Add any variables in the variable list "v" that are not already in "bmap" - * as existentially quantified variables in "bmap". - */ -static __isl_give isl_basic_map *add_divs(__isl_take isl_basic_map *bmap, - struct vars *v) -{ - int i; - int extra; - struct variable *var; - - extra = v->n - isl_basic_map_total_dim(bmap); - - if (extra == 0) - return bmap; - - bmap = isl_basic_map_extend_dim(bmap, isl_basic_map_get_dim(bmap), - extra, 0, 2 * extra); - - for (i = 0; i < extra; ++i) - if (isl_basic_map_alloc_div(bmap) < 0) - goto error; - - for (i = 0, var = v->v; i < extra; ++i, var = var->next) { - int k = bmap->n_div - 1 - i; - - isl_seq_cpy(bmap->div[k], var->def->el, var->def->size); - isl_seq_clr(bmap->div[k] + var->def->size, - 2 + v->n - var->def->size); - - if (isl_basic_map_add_div_constraints(bmap, k) < 0) - goto error; - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *read_var_def(struct isl_stream *s, - __isl_take isl_basic_map *bmap, enum isl_dim_type type, struct vars *v) -{ - isl_dim *dim; - isl_basic_map *def = NULL; - struct isl_vec *vec; - int k; - int n; - - if (vars_add_anon(v) < 0) - goto error; - n = v->n; - - vec = accept_affine(s, v); - if (!vec) - goto error; - - dim = isl_basic_map_get_dim(bmap); - def = isl_basic_map_universe(dim); - def = add_divs(def, v); - def = isl_basic_map_extend_constraints(def, 1, 0); - k = isl_basic_map_alloc_equality(def); - if (k >= 0) { - isl_seq_cpy(def->eq[k], vec->el, vec->size); - isl_int_set_si(def->eq[k][1 + n - 1], -1); - } - isl_vec_free(vec); - if (k < 0) - goto error; - - vars_drop(v, v->n - n); - - def = isl_basic_map_simplify(def); - def = isl_basic_map_finalize(def); - bmap = isl_basic_map_intersect(bmap, def); - return bmap; -error: - isl_basic_map_free(bmap); - isl_basic_map_free(def); - return NULL; -} - -static __isl_give isl_basic_map *read_var_list(struct isl_stream *s, - __isl_take isl_basic_map *bmap, enum isl_dim_type type, struct vars *v) -{ - int i = 0; - struct isl_token *tok; - - while ((tok = next_token(s)) != NULL) { - int new_name = 0; - - if (tok->type == ISL_TOKEN_IDENT) { - int n = v->n; - int p = vars_pos(v, tok->u.s, -1); - if (p < 0) - goto error; - new_name = p >= n; - } - - if (new_name) { - bmap = isl_basic_map_add(bmap, type, 1); - bmap = set_name(bmap, type, i, v->v->name); - isl_token_free(tok); - } else if (tok->type == ISL_TOKEN_IDENT || - tok->type == ISL_TOKEN_VALUE || - tok->type == '-' || - tok->type == '(') { - if (type == isl_dim_param) { - isl_stream_error(s, tok, - "expecting unique identifier"); - goto error; - } - isl_stream_push_token(s, tok); - tok = NULL; - bmap = isl_basic_map_add(bmap, type, 1); - bmap = read_var_def(s, bmap, type, v); - } else - break; - - tok = isl_stream_next_token(s); - if (tok && tok->type == ']' && - isl_stream_next_token_is(s, '[')) { - isl_token_free(tok); - tok = isl_stream_next_token(s); - } else if (!tok || tok->type != ',') - break; - - isl_token_free(tok); - i++; - } - if (tok) - isl_stream_push_token(s, tok); - - return bmap; -error: - isl_token_free(tok); - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_mat *accept_affine_list(struct isl_stream *s, - struct vars *v) -{ - struct isl_vec *vec; - struct isl_mat *mat; - struct isl_token *tok = NULL; - - vec = accept_affine(s, v); - mat = isl_mat_from_row_vec(vec); - if (!mat) - return NULL; - - for (;;) { - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type != ',') { - isl_stream_push_token(s, tok); - break; - } - isl_token_free(tok); - - vec = accept_affine(s, v); - mat = isl_mat_add_zero_cols(mat, 1 + v->n - isl_mat_cols(mat)); - mat = isl_mat_vec_concat(mat, vec); - if (!mat) - return NULL; - } - - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -static int read_minmax_definition(struct isl_stream *s, struct vars *v) -{ - struct isl_token *tok; - struct variable *var; - - var = v->v; - - tok = isl_stream_next_token(s); - if (!tok) - return -1; - var->sign = tok->type == ISL_TOKEN_MIN ? -1 : 1; - isl_token_free(tok); - - if (isl_stream_eat(s, '(')) - return -1; - - var->list = accept_affine_list(s, v); - if (!var->list) - return -1; - - if (isl_stream_eat(s, ')')) - return -1; - - return 0; -} - -static int read_div_definition(struct isl_stream *s, struct vars *v) -{ - struct isl_token *tok; - int seen_paren = 0; - struct isl_vec *aff; - struct variable *var; - int fc = 0; - - if (isl_stream_eat_if_available(s, ISL_TOKEN_FLOORD) || - isl_stream_eat_if_available(s, ISL_TOKEN_CEILD)) { - fc = 1; - if (isl_stream_eat(s, '(')) - return -1; - } else { - if (isl_stream_eat(s, '[')) - return -1; - if (isl_stream_eat_if_available(s, '(')) - seen_paren = 1; - } - - var = v->v; - - aff = accept_affine(s, v); - if (!aff) - return -1; - - var->def = isl_vec_alloc(s->ctx, 2 + v->n); - if (!var->def) { - isl_vec_free(aff); - return -1; - } - - isl_seq_cpy(var->def->el + 1, aff->el, aff->size); - - isl_vec_free(aff); - - if (fc) { - if (isl_stream_eat(s, ',')) - return -1; - } else { - if (seen_paren && isl_stream_eat(s, ')')) - return -1; - if (isl_stream_eat(s, '/')) - return -1; - } - - tok = next_token(s); - if (!tok) - return -1; - if (tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expected denominator"); - isl_stream_push_token(s, tok); - return -1; - } - isl_int_set(var->def->el[0], tok->u.v); - isl_token_free(tok); - - if (fc) { - if (isl_stream_eat(s, ')')) - return -1; - } else { - if (isl_stream_eat(s, ']')) - return -1; - } - - return 0; -} - -static struct isl_basic_map *add_div_definition(struct isl_stream *s, - struct vars *v, struct isl_basic_map *bmap, int pos) -{ - struct variable *var = v->v; - unsigned o_out = isl_basic_map_offset(bmap, isl_dim_out) - 1; - - if (read_div_definition(s, v) < 0) - goto error; - - if (isl_basic_map_add_div_constraints_var(bmap, o_out + pos, - var->def->el) < 0) - goto error; - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static struct isl_basic_map *read_defined_var_list(struct isl_stream *s, - struct vars *v, struct isl_basic_map *bmap) -{ - struct isl_token *tok; - - while ((tok = isl_stream_next_token(s)) != NULL) { - int p; - int n = v->n; - unsigned n_out = isl_basic_map_dim(bmap, isl_dim_out); - - if (tok->type != ISL_TOKEN_IDENT) - break; - - p = vars_pos(v, tok->u.s, -1); - if (p < 0) - goto error; - if (p < n) { - isl_stream_error(s, tok, "expecting unique identifier"); - goto error; - } - - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_add(bmap, isl_dim_out, 1); - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), - 0, 0, 2); - - isl_token_free(tok); - tok = isl_stream_next_token(s); - if (tok && tok->type == '=') { - isl_token_free(tok); - bmap = add_div_definition(s, v, bmap, n_out); - tok = isl_stream_next_token(s); - } - - if (!tok || tok->type != ',') - break; - - isl_token_free(tok); - } - if (tok) - isl_stream_push_token(s, tok); - - return bmap; -error: - isl_token_free(tok); - isl_basic_map_free(bmap); - return NULL; -} - -static int next_is_tuple(struct isl_stream *s) -{ - struct isl_token *tok; - int is_tuple; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - if (tok->type == '[') { - isl_stream_push_token(s, tok); - return 1; - } - if (tok->type != ISL_TOKEN_IDENT && !tok->is_keyword) { - isl_stream_push_token(s, tok); - return 0; - } - - is_tuple = isl_stream_next_token_is(s, '['); - - isl_stream_push_token(s, tok); - - return is_tuple; -} - -static __isl_give isl_basic_map *read_tuple(struct isl_stream *s, - __isl_take isl_basic_map *bmap, enum isl_dim_type type, struct vars *v); - -static __isl_give isl_basic_map *read_nested_tuple(struct isl_stream *s, - __isl_take isl_basic_map *bmap, struct vars *v) -{ - bmap = read_tuple(s, bmap, isl_dim_in, v); - if (isl_stream_eat(s, ISL_TOKEN_TO)) - goto error; - bmap = read_tuple(s, bmap, isl_dim_out, v); - bmap = isl_basic_map_from_range(isl_basic_map_wrap(bmap)); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *read_tuple(struct isl_stream *s, - __isl_take isl_basic_map *bmap, enum isl_dim_type type, struct vars *v) -{ - struct isl_token *tok; - char *name = NULL; - - tok = isl_stream_next_token(s); - if (tok && (tok->type == ISL_TOKEN_IDENT || tok->is_keyword)) { - name = strdup(tok->u.s); - if (!name) - goto error; - isl_token_free(tok); - tok = isl_stream_next_token(s); - } - if (!tok || tok->type != '[') { - isl_stream_error(s, tok, "expecting '['"); - goto error; - } - isl_token_free(tok); - if (type != isl_dim_param && next_is_tuple(s)) { - isl_dim *dim = isl_basic_map_get_dim(bmap); - int nparam = isl_dim_size(dim, isl_dim_param); - int n_in = isl_dim_size(dim, isl_dim_in); - isl_basic_map *nested; - if (type == isl_dim_out) - dim = isl_dim_move(dim, isl_dim_param, nparam, - isl_dim_in, 0, n_in); - nested = isl_basic_map_alloc_dim(dim, 0, 0, 0); - nested = read_nested_tuple(s, nested, v); - if (type == isl_dim_in) { - nested = isl_basic_map_reverse(nested); - bmap = isl_basic_map_intersect(nested, bmap); - } else { - isl_basic_set *bset; - dim = isl_dim_range(isl_basic_map_get_dim(nested)); - dim = isl_dim_drop(dim, isl_dim_param, nparam, n_in); - dim = isl_dim_join(isl_basic_map_get_dim(bmap), dim); - bset = isl_basic_map_domain(bmap); - nested = isl_basic_map_reset_dim(nested, dim); - bmap = isl_basic_map_intersect_domain(nested, bset); - } - } else - bmap = read_var_list(s, bmap, type, v); - tok = isl_stream_next_token(s); - if (!tok || tok->type != ']') { - isl_stream_error(s, tok, "expecting ']'"); - goto error; - } - isl_token_free(tok); - - if (name) { - bmap = isl_basic_map_set_tuple_name(bmap, type, name); - free(name); - } - - return bmap; -error: - if (tok) - isl_token_free(tok); - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *construct_constraint( - __isl_take isl_basic_map *bmap, enum isl_token_type type, - isl_int *left, isl_int *right) -{ - int k; - unsigned len; - struct isl_ctx *ctx; - - if (!bmap) - return NULL; - len = 1 + isl_basic_map_total_dim(bmap); - ctx = bmap->ctx; - - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - if (type == ISL_TOKEN_LE) - isl_seq_combine(bmap->ineq[k], ctx->negone, left, - ctx->one, right, - len); - else if (type == ISL_TOKEN_GE) - isl_seq_combine(bmap->ineq[k], ctx->one, left, - ctx->negone, right, - len); - else if (type == ISL_TOKEN_LT) { - isl_seq_combine(bmap->ineq[k], ctx->negone, left, - ctx->one, right, - len); - isl_int_sub_ui(bmap->ineq[k][0], bmap->ineq[k][0], 1); - } else if (type == ISL_TOKEN_GT) { - isl_seq_combine(bmap->ineq[k], ctx->one, left, - ctx->negone, right, - len); - isl_int_sub_ui(bmap->ineq[k][0], bmap->ineq[k][0], 1); - } else { - isl_seq_combine(bmap->ineq[k], ctx->one, left, - ctx->negone, right, - len); - isl_basic_map_inequality_to_equality(bmap, k); - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static int is_comparator(struct isl_token *tok) -{ - if (!tok) - return 0; - - switch (tok->type) { - case ISL_TOKEN_LT: - case ISL_TOKEN_GT: - case ISL_TOKEN_LE: - case ISL_TOKEN_GE: - case '=': - return 1; - default: - return 0; - } -} - -/* Add any variables in the variable list "v" that are not already in "bmap" - * as output variables in "bmap". - */ -static __isl_give isl_basic_map *add_lifted_divs(__isl_take isl_basic_map *bmap, - struct vars *v) -{ - int i; - int extra; - struct variable *var; - - extra = v->n - isl_basic_map_total_dim(bmap); - - if (extra == 0) - return bmap; - - bmap = isl_basic_map_add(bmap, isl_dim_out, extra); - bmap = isl_basic_map_extend_dim(bmap, isl_basic_map_get_dim(bmap), - 0, 0, 2 * extra); - - for (i = 0, var = v->v; i < extra; ++i, var = var->next) { - if (!var->def) - continue; - var->def = isl_vec_zero_extend(var->def, 2 + v->n); - if (!var->def) - goto error; - if (isl_basic_map_add_div_constraints_var(bmap, var->pos, - var->def->el) < 0) - goto error; - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static struct isl_basic_map *add_constraint(struct isl_stream *s, - struct vars *v, struct isl_basic_map *bmap) -{ - int i, j; - struct isl_token *tok = NULL; - struct isl_mat *aff1 = NULL, *aff2 = NULL; - - bmap = isl_basic_map_cow(bmap); - - aff1 = accept_affine_list(s, v); - if (!aff1) - goto error; - tok = isl_stream_next_token(s); - if (!is_comparator(tok)) { - isl_stream_error(s, tok, "missing operator"); - if (tok) - isl_stream_push_token(s, tok); - tok = NULL; - goto error; - } - for (;;) { - aff2 = accept_affine_list(s, v); - if (!aff2) - goto error; - - aff1 = isl_mat_add_zero_cols(aff1, aff2->n_col - aff1->n_col); - if (!aff1) - goto error; - bmap = add_lifted_divs(bmap, v); - bmap = isl_basic_map_extend_constraints(bmap, 0, - aff1->n_row * aff2->n_row); - for (i = 0; i < aff1->n_row; ++i) - for (j = 0; j < aff2->n_row; ++j) - bmap = construct_constraint(bmap, tok->type, - aff1->row[i], aff2->row[j]); - isl_token_free(tok); - isl_mat_free(aff1); - aff1 = aff2; - - tok = isl_stream_next_token(s); - if (!is_comparator(tok)) { - if (tok) - isl_stream_push_token(s, tok); - break; - } - } - isl_mat_free(aff1); - - return bmap; -error: - if (tok) - isl_token_free(tok); - isl_mat_free(aff1); - isl_mat_free(aff2); - isl_basic_map_free(bmap); - return NULL; -} - -/* Return first variable, starting at n, representing a min or max, - * or NULL if there is no such variable. - */ -static struct variable *first_minmax(struct vars *v, int n) -{ - struct variable *first = NULL; - struct variable *var; - - for (var = v->v; var && var->pos >= n; var = var->next) - if (var->list) - first = var; - - return first; -} - -/* Check whether the variable at the given position only occurs in - * inequalities and only with the given sign. - */ -static int all_coefficients_of_sign(__isl_keep isl_map *map, int pos, int sign) -{ - int i, j; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - isl_basic_map *bmap = map->p[i]; - - for (j = 0; j < bmap->n_eq; ++j) - if (!isl_int_is_zero(bmap->eq[j][1 + pos])) - return 0; - for (j = 0; j < bmap->n_ineq; ++j) { - int s = isl_int_sgn(bmap->ineq[j][1 + pos]); - if (s == 0) - continue; - if (s != sign) - return 0; - } - } - - return 1; -} - -/* Given a variable m which represents a min or a max of n expressions - * b_i, add the constraints - * - * m <= b_i - * - * in case of a min (var->sign < 0) and m >= b_i in case of a max. - */ -static __isl_give isl_map *bound_minmax(__isl_take isl_map *map, - struct variable *var) -{ - int i, k; - isl_basic_map *bound; - int total; - - total = isl_map_dim(map, isl_dim_all); - bound = isl_basic_map_alloc_dim(isl_map_get_dim(map), - 0, 0, var->list->n_row); - - for (i = 0; i < var->list->n_row; ++i) { - k = isl_basic_map_alloc_inequality(bound); - if (k < 0) - goto error; - if (var->sign < 0) - isl_seq_cpy(bound->ineq[k], var->list->row[i], - var->list->n_col); - else - isl_seq_neg(bound->ineq[k], var->list->row[i], - var->list->n_col); - isl_int_set_si(bound->ineq[k][1 + var->pos], var->sign); - isl_seq_clr(bound->ineq[k] + var->list->n_col, - 1 + total - var->list->n_col); - } - - map = isl_map_intersect(map, isl_map_from_basic_map(bound)); - - return map; -error: - isl_basic_map_free(bound); - isl_map_free(map); - return NULL; -} - -/* Given a variable m which represents a min (or max) of n expressions - * b_i, add constraints that assigns the minimal upper bound to m, i.e., - * divide the space into cells where one - * of the upper bounds is smaller than all the others and assign - * this upper bound to m. - * - * In particular, if there are n bounds b_i, then the input map - * is split into n pieces, each with the extra constraints - * - * m = b_i - * b_i <= b_j for j > i - * b_i < b_j for j < i - * - * in case of a min (var->sign < 0) and similarly in case of a max. - * - * Note: this function is very similar to set_minimum in isl_tab_pip.c - * Perhaps we should try to merge the two. - */ -static __isl_give isl_map *set_minmax(__isl_take isl_map *map, - struct variable *var) -{ - int i, j, k; - isl_basic_map *bmap = NULL; - isl_ctx *ctx; - isl_map *split = NULL; - int total; - - ctx = isl_map_get_ctx(map); - total = isl_map_dim(map, isl_dim_all); - split = isl_map_alloc_dim(isl_map_get_dim(map), - var->list->n_row, ISL_SET_DISJOINT); - - for (i = 0; i < var->list->n_row; ++i) { - bmap = isl_basic_map_alloc_dim(isl_map_get_dim(map), 0, - 1, var->list->n_row - 1); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], var->list->row[i], var->list->n_col); - isl_int_set_si(bmap->eq[k][1 + var->pos], -1); - for (j = 0; j < var->list->n_row; ++j) { - if (j == i) - continue; - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - if (var->sign < 0) - isl_seq_combine(bmap->ineq[k], - ctx->one, var->list->row[j], - ctx->negone, var->list->row[i], - var->list->n_col); - else - isl_seq_combine(bmap->ineq[k], - ctx->negone, var->list->row[j], - ctx->one, var->list->row[i], - var->list->n_col); - isl_seq_clr(bmap->ineq[k] + var->list->n_col, - 1 + total - var->list->n_col); - if (j < i) - isl_int_sub_ui(bmap->ineq[k][0], - bmap->ineq[k][0], 1); - } - bmap = isl_basic_map_finalize(bmap); - split = isl_map_add_basic_map(split, bmap); - } - - map = isl_map_intersect(map, split); - - return map; -error: - isl_basic_map_free(bmap); - isl_map_free(split); - isl_map_free(map); - return NULL; -} - -/* Plug in the definitions of all min and max expressions. - * If a min expression only appears in inequalities and only - * with a positive coefficient, then we can simply bound - * the variable representing the min by its defining terms - * and similarly for a max expression. - * Otherwise, we have to assign the different terms to the - * variable under the condition that the assigned term is smaller - * than the other terms. - */ -static __isl_give isl_map *add_minmax(__isl_take isl_map *map, - struct vars *v, int n) -{ - struct variable *var; - - while (n < v->n) { - var = first_minmax(v, n); - if (!var) - break; - if (all_coefficients_of_sign(map, var->pos, -var->sign)) - map = bound_minmax(map, var); - else - map = set_minmax(map, var); - n = var->pos + 1; - } - - return map; -} - -static isl_map *read_constraint(struct isl_stream *s, - struct vars *v, __isl_take isl_basic_map *bmap) -{ - int n = v->n; - isl_map *map; - unsigned total; - - if (!bmap) - return NULL; - - bmap = isl_basic_set_unwrap(isl_basic_set_lift(isl_basic_map_wrap(bmap))); - total = isl_basic_map_total_dim(bmap); - while (v->n < total) - if (vars_add_anon(v) < 0) - goto error; - - bmap = add_constraint(s, v, bmap); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - - map = isl_map_from_basic_map(bmap); - - map = add_minmax(map, v, n); - - map = isl_set_unwrap(isl_map_domain(map)); - - vars_drop(v, v->n - n); - - return map; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static struct isl_map *read_disjuncts(struct isl_stream *s, - struct vars *v, __isl_take isl_basic_map *bmap); - -static __isl_give isl_map *read_exists(struct isl_stream *s, - struct vars *v, __isl_take isl_basic_map *bmap) -{ - int n = v->n; - int seen_paren = isl_stream_eat_if_available(s, '('); - isl_map *map = NULL; - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = read_defined_var_list(s, v, bmap); - - if (isl_stream_eat(s, ':')) - goto error; - - map = read_disjuncts(s, v, bmap); - map = isl_set_unwrap(isl_map_domain(map)); - bmap = NULL; - - vars_drop(v, v->n - n); - if (seen_paren && isl_stream_eat(s, ')')) - goto error; - - return map; -error: - isl_basic_map_free(bmap); - isl_map_free(map); - return NULL; -} - -static __isl_give isl_map *read_conjunct(struct isl_stream *s, - struct vars *v, __isl_take isl_basic_map *bmap) -{ - isl_map *map; - - if (isl_stream_eat_if_available(s, '(')) { - map = read_disjuncts(s, v, bmap); - if (isl_stream_eat(s, ')')) - goto error; - return map; - } - - if (isl_stream_eat_if_available(s, ISL_TOKEN_EXISTS)) - return read_exists(s, v, bmap); - - if (isl_stream_eat_if_available(s, ISL_TOKEN_TRUE)) - return isl_map_from_basic_map(bmap); - - if (isl_stream_eat_if_available(s, ISL_TOKEN_FALSE)) { - isl_dim *dim = isl_basic_map_get_dim(bmap); - isl_basic_map_free(bmap); - return isl_map_empty(dim); - } - - return read_constraint(s, v, bmap); -error: - isl_map_free(map); - return NULL; -} - -static __isl_give isl_map *read_conjuncts(struct isl_stream *s, - struct vars *v, __isl_take isl_basic_map *bmap) -{ - isl_map *map; - int negate; - - negate = isl_stream_eat_if_available(s, ISL_TOKEN_NOT); - map = read_conjunct(s, v, isl_basic_map_copy(bmap)); - if (negate) { - isl_map *t; - t = isl_map_from_basic_map(isl_basic_map_copy(bmap)); - map = isl_map_subtract(t, map); - } - - while (isl_stream_eat_if_available(s, ISL_TOKEN_AND)) { - isl_map *map_i; - - negate = isl_stream_eat_if_available(s, ISL_TOKEN_NOT); - map_i = read_conjunct(s, v, isl_basic_map_copy(bmap)); - if (negate) - map = isl_map_subtract(map, map_i); - else - map = isl_map_intersect(map, map_i); - } - - isl_basic_map_free(bmap); - return map; -} - -static struct isl_map *read_disjuncts(struct isl_stream *s, - struct vars *v, __isl_take isl_basic_map *bmap) -{ - struct isl_map *map; - - if (isl_stream_next_token_is(s, '}')) { - isl_dim *dim = isl_basic_map_get_dim(bmap); - isl_basic_map_free(bmap); - return isl_map_universe(dim); - } - - map = read_conjuncts(s, v, isl_basic_map_copy(bmap)); - while (isl_stream_eat_if_available(s, ISL_TOKEN_OR)) { - isl_map *map_i; - - map_i = read_conjuncts(s, v, isl_basic_map_copy(bmap)); - map = isl_map_union(map, map_i); - } - - isl_basic_map_free(bmap); - return map; -} - -static int polylib_pos_to_isl_pos(__isl_keep isl_basic_map *bmap, int pos) -{ - if (pos < isl_basic_map_dim(bmap, isl_dim_out)) - return 1 + isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in) + pos; - pos -= isl_basic_map_dim(bmap, isl_dim_out); - - if (pos < isl_basic_map_dim(bmap, isl_dim_in)) - return 1 + isl_basic_map_dim(bmap, isl_dim_param) + pos; - pos -= isl_basic_map_dim(bmap, isl_dim_in); - - if (pos < isl_basic_map_dim(bmap, isl_dim_div)) - return 1 + isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in) + - isl_basic_map_dim(bmap, isl_dim_out) + pos; - pos -= isl_basic_map_dim(bmap, isl_dim_div); - - if (pos < isl_basic_map_dim(bmap, isl_dim_param)) - return 1 + pos; - - return 0; -} - -static __isl_give isl_basic_map *basic_map_read_polylib_constraint( - struct isl_stream *s, __isl_take isl_basic_map *bmap) -{ - int j; - struct isl_token *tok; - int type; - int k; - isl_int *c; - unsigned nparam; - unsigned dim; - - if (!bmap) - return NULL; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - dim = isl_basic_map_dim(bmap, isl_dim_out); - - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting coefficient"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - if (!tok->on_new_line) { - isl_stream_error(s, tok, "coefficient should appear on new line"); - isl_stream_push_token(s, tok); - goto error; - } - - type = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - isl_assert(s->ctx, type == 0 || type == 1, goto error); - if (type == 0) { - k = isl_basic_map_alloc_equality(bmap); - c = bmap->eq[k]; - } else { - k = isl_basic_map_alloc_inequality(bmap); - c = bmap->ineq[k]; - } - if (k < 0) - goto error; - - for (j = 0; j < 1 + isl_basic_map_total_dim(bmap); ++j) { - int pos; - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting coefficient"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - if (tok->on_new_line) { - isl_stream_error(s, tok, - "coefficient should not appear on new line"); - isl_stream_push_token(s, tok); - goto error; - } - pos = polylib_pos_to_isl_pos(bmap, j); - isl_int_set(c[pos], tok->u.v); - isl_token_free(tok); - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *basic_map_read_polylib(struct isl_stream *s, - int nparam) -{ - int i; - struct isl_token *tok; - struct isl_token *tok2; - int n_row, n_col; - int on_new_line; - unsigned in = 0, out, local = 0; - struct isl_basic_map *bmap = NULL; - - if (nparam < 0) - nparam = 0; - - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - tok2 = isl_stream_next_token(s); - if (!tok2) { - isl_token_free(tok); - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - if (tok->type != ISL_TOKEN_VALUE || tok2->type != ISL_TOKEN_VALUE) { - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - isl_stream_error(s, NULL, - "expecting constraint matrix dimensions"); - return NULL; - } - n_row = isl_int_get_si(tok->u.v); - n_col = isl_int_get_si(tok2->u.v); - on_new_line = tok2->on_new_line; - isl_token_free(tok2); - isl_token_free(tok); - isl_assert(s->ctx, !on_new_line, return NULL); - isl_assert(s->ctx, n_row >= 0, return NULL); - isl_assert(s->ctx, n_col >= 2 + nparam, return NULL); - tok = isl_stream_next_token_on_same_line(s); - if (tok) { - if (tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of output dimensions"); - isl_stream_push_token(s, tok); - goto error; - } - out = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - tok = isl_stream_next_token_on_same_line(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of input dimensions"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - in = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - tok = isl_stream_next_token_on_same_line(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of existentials"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - local = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - tok = isl_stream_next_token_on_same_line(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of parameters"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - nparam = isl_int_get_si(tok->u.v); - isl_token_free(tok); - if (n_col != 1 + out + in + local + nparam + 1) { - isl_stream_error(s, NULL, - "dimensions don't match"); - goto error; - } - } else - out = n_col - 2 - nparam; - bmap = isl_basic_map_alloc(s->ctx, nparam, in, out, local, n_row, n_row); - if (!bmap) - return NULL; - - for (i = 0; i < local; ++i) { - int k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->div[k], 1 + 1 + nparam + in + out + local); - } - - for (i = 0; i < n_row; ++i) - bmap = basic_map_read_polylib_constraint(s, bmap); - - tok = isl_stream_next_token_on_same_line(s); - if (tok) { - isl_stream_error(s, tok, "unexpected extra token on line"); - isl_stream_push_token(s, tok); - goto error; - } - - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static struct isl_map *map_read_polylib(struct isl_stream *s, int nparam) -{ - struct isl_token *tok; - struct isl_token *tok2; - int i, n; - struct isl_map *map; - - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - tok2 = isl_stream_next_token_on_same_line(s); - if (tok2 && tok2->type == ISL_TOKEN_VALUE) { - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - return isl_map_from_basic_map(basic_map_read_polylib(s, nparam)); - } - if (tok2) { - isl_stream_error(s, tok2, "unexpected token"); - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - return NULL; - } - n = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - isl_assert(s->ctx, n >= 1, return NULL); - - map = isl_map_from_basic_map(basic_map_read_polylib(s, nparam)); - - for (i = 1; map && i < n; ++i) - map = isl_map_union(map, - isl_map_from_basic_map(basic_map_read_polylib(s, nparam))); - - return map; -} - -static int optional_power(struct isl_stream *s) -{ - int pow; - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 1; - if (tok->type != '^') { - isl_stream_push_token(s, tok); - return 1; - } - isl_token_free(tok); - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting exponent"); - if (tok) - isl_stream_push_token(s, tok); - return 1; - } - pow = isl_int_get_si(tok->u.v); - isl_token_free(tok); - return pow; -} - -static __isl_give isl_div *read_div(struct isl_stream *s, - __isl_take isl_dim *dim, struct vars *v) -{ - int n; - isl_basic_map *bmap; - - n = v->n; - bmap = isl_basic_map_universe(dim); - - if (vars_add_anon(v) < 0) - goto error; - if (read_div_definition(s, v) < 0) - goto error; - bmap = add_divs(bmap, v); - bmap = isl_basic_map_order_divs(bmap); - if (!bmap) - goto error; - vars_drop(v, v->n - n); - - return isl_basic_map_div(bmap, bmap->n_div - 1); -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_qpolynomial *read_term(struct isl_stream *s, - __isl_keep isl_basic_map *bmap, struct vars *v); - -static __isl_give isl_qpolynomial *read_factor(struct isl_stream *s, - __isl_keep isl_basic_map *bmap, struct vars *v) -{ - struct isl_qpolynomial *qp; - struct isl_token *tok; - - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - if (tok->type == '(') { - int pow; - - isl_token_free(tok); - qp = read_term(s, bmap, v); - if (!qp) - return NULL; - if (isl_stream_eat(s, ')')) - goto error; - pow = optional_power(s); - qp = isl_qpolynomial_pow(qp, pow); - } else if (tok->type == ISL_TOKEN_VALUE) { - struct isl_token *tok2; - tok2 = isl_stream_next_token(s); - if (tok2 && tok2->type == '/') { - isl_token_free(tok2); - tok2 = next_token(s); - if (!tok2 || tok2->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok2, "expected denominator"); - isl_token_free(tok); - isl_token_free(tok2); - return NULL; - } - qp = isl_qpolynomial_rat_cst(isl_basic_map_get_dim(bmap), - tok->u.v, tok2->u.v); - isl_token_free(tok2); - } else { - isl_stream_push_token(s, tok2); - qp = isl_qpolynomial_cst(isl_basic_map_get_dim(bmap), - tok->u.v); - } - isl_token_free(tok); - } else if (tok->type == ISL_TOKEN_INFTY) { - isl_token_free(tok); - qp = isl_qpolynomial_infty(isl_basic_map_get_dim(bmap)); - } else if (tok->type == ISL_TOKEN_NAN) { - isl_token_free(tok); - qp = isl_qpolynomial_nan(isl_basic_map_get_dim(bmap)); - } else if (tok->type == ISL_TOKEN_IDENT) { - int n = v->n; - int pos = vars_pos(v, tok->u.s, -1); - int pow; - if (pos < 0) { - isl_token_free(tok); - return NULL; - } - if (pos >= n) { - vars_drop(v, v->n - n); - isl_stream_error(s, tok, "unknown identifier"); - isl_token_free(tok); - return NULL; - } - isl_token_free(tok); - pow = optional_power(s); - qp = isl_qpolynomial_var_pow(isl_basic_map_get_dim(bmap), pos, pow); - } else if (tok->type == '[') { - isl_div *div; - int pow; - - isl_stream_push_token(s, tok); - div = read_div(s, isl_basic_map_get_dim(bmap), v); - pow = optional_power(s); - qp = isl_qpolynomial_div_pow(div, pow); - } else if (tok->type == '-') { - struct isl_qpolynomial *qp2; - - isl_token_free(tok); - qp = isl_qpolynomial_cst(isl_basic_map_get_dim(bmap), - s->ctx->negone); - qp2 = read_factor(s, bmap, v); - qp = isl_qpolynomial_mul(qp, qp2); - } else { - isl_stream_error(s, tok, "unexpected isl_token"); - isl_stream_push_token(s, tok); - return NULL; - } - - if (isl_stream_eat_if_available(s, '*') || - isl_stream_next_token_is(s, ISL_TOKEN_IDENT)) { - struct isl_qpolynomial *qp2; - - qp2 = read_factor(s, bmap, v); - qp = isl_qpolynomial_mul(qp, qp2); - } - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -static __isl_give isl_qpolynomial *read_term(struct isl_stream *s, - __isl_keep isl_basic_map *bmap, struct vars *v) -{ - struct isl_token *tok; - struct isl_qpolynomial *qp; - - qp = read_factor(s, bmap, v); - - for (;;) { - tok = next_token(s); - if (!tok) - return qp; - - if (tok->type == '+') { - struct isl_qpolynomial *qp2; - - isl_token_free(tok); - qp2 = read_factor(s, bmap, v); - qp = isl_qpolynomial_add(qp, qp2); - } else if (tok->type == '-') { - struct isl_qpolynomial *qp2; - - isl_token_free(tok); - qp2 = read_factor(s, bmap, v); - qp = isl_qpolynomial_sub(qp, qp2); - } else if (tok->type == ISL_TOKEN_VALUE && - isl_int_is_neg(tok->u.v)) { - struct isl_qpolynomial *qp2; - - isl_stream_push_token(s, tok); - qp2 = read_factor(s, bmap, v); - qp = isl_qpolynomial_add(qp, qp2); - } else { - isl_stream_push_token(s, tok); - break; - } - } - - return qp; -} - -static __isl_give isl_map *read_optional_disjuncts(struct isl_stream *s, - __isl_take isl_basic_map *bmap, struct vars *v) -{ - struct isl_token *tok; - struct isl_map *map; - - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - map = isl_map_from_basic_map(isl_basic_map_copy(bmap)); - if (tok->type == ':' || - (tok->type == ISL_TOKEN_OR && !strcmp(tok->u.s, "|"))) { - isl_token_free(tok); - map = isl_map_intersect(map, - read_disjuncts(s, v, isl_basic_map_copy(bmap))); - } else - isl_stream_push_token(s, tok); - - isl_basic_map_free(bmap); - - return map; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static struct isl_obj obj_read_poly(struct isl_stream *s, - __isl_take isl_basic_map *bmap, struct vars *v, int n) -{ - struct isl_obj obj = { isl_obj_pw_qpolynomial, NULL }; - struct isl_pw_qpolynomial *pwqp; - struct isl_qpolynomial *qp; - struct isl_map *map; - struct isl_set *set; - - qp = read_term(s, bmap, v); - map = read_optional_disjuncts(s, bmap, v); - set = isl_map_range(map); - - pwqp = isl_pw_qpolynomial_alloc(set, qp); - - vars_drop(v, v->n - n); - - obj.v = pwqp; - return obj; -} - -static struct isl_obj obj_read_poly_or_fold(struct isl_stream *s, - __isl_take isl_basic_map *bmap, struct vars *v, int n) -{ - struct isl_obj obj = { isl_obj_pw_qpolynomial_fold, NULL }; - isl_qpolynomial *qp; - isl_qpolynomial_fold *fold = NULL; - isl_pw_qpolynomial_fold *pwf; - isl_map *map; - isl_set *set; - - if (!isl_stream_eat_if_available(s, ISL_TOKEN_MAX)) - return obj_read_poly(s, bmap, v, n); - - if (isl_stream_eat(s, '(')) - goto error; - - qp = read_term(s, bmap, v); - fold = isl_qpolynomial_fold_alloc(isl_fold_max, qp); - - while (isl_stream_eat_if_available(s, ',')) { - isl_qpolynomial_fold *fold_i; - qp = read_term(s, bmap, v); - fold_i = isl_qpolynomial_fold_alloc(isl_fold_max, qp); - fold = isl_qpolynomial_fold_fold(fold, fold_i); - } - - if (isl_stream_eat(s, ')')) - goto error; - - map = read_optional_disjuncts(s, bmap, v); - set = isl_map_range(map); - pwf = isl_pw_qpolynomial_fold_alloc(isl_fold_max, set, fold); - - vars_drop(v, v->n - n); - - obj.v = pwf; - return obj; -error: - isl_basic_map_free(bmap); - isl_qpolynomial_fold_free(fold); - obj.type = isl_obj_none; - return obj; -} - -static int is_rational(struct isl_stream *s) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - if (tok->type == ISL_TOKEN_RAT && isl_stream_next_token_is(s, ':')) { - isl_token_free(tok); - isl_stream_eat(s, ':'); - return 1; - } - - isl_stream_push_token(s, tok); - - return 0; -} - -static struct isl_obj obj_read_body(struct isl_stream *s, - __isl_take isl_basic_map *bmap, struct vars *v) -{ - struct isl_map *map = NULL; - struct isl_token *tok; - struct isl_obj obj = { isl_obj_set, NULL }; - int n = v->n; - - if (is_rational(s)) - bmap = isl_basic_map_set_rational(bmap); - - if (!next_is_tuple(s)) - return obj_read_poly_or_fold(s, bmap, v, n); - - bmap = read_tuple(s, bmap, isl_dim_in, v); - if (!bmap) - goto error; - tok = isl_stream_next_token(s); - if (tok && tok->type == ISL_TOKEN_TO) { - obj.type = isl_obj_map; - isl_token_free(tok); - if (!next_is_tuple(s)) { - bmap = isl_basic_map_reverse(bmap); - return obj_read_poly_or_fold(s, bmap, v, n); - } - bmap = read_tuple(s, bmap, isl_dim_out, v); - if (!bmap) - goto error; - } else { - bmap = isl_basic_map_reverse(bmap); - if (tok) - isl_stream_push_token(s, tok); - } - - map = read_optional_disjuncts(s, bmap, v); - - vars_drop(v, v->n - n); - - obj.v = map; - return obj; -error: - isl_basic_map_free(bmap); - obj.type = isl_obj_none; - return obj; -} - -static struct isl_obj to_union(isl_ctx *ctx, struct isl_obj obj) -{ - if (obj.type == isl_obj_map) { - obj.v = isl_union_map_from_map(obj.v); - obj.type = isl_obj_union_map; - } else if (obj.type == isl_obj_set) { - obj.v = isl_union_set_from_set(obj.v); - obj.type = isl_obj_union_set; - } else if (obj.type == isl_obj_pw_qpolynomial) { - obj.v = isl_union_pw_qpolynomial_from_pw_qpolynomial(obj.v); - obj.type = isl_obj_union_pw_qpolynomial; - } else if (obj.type == isl_obj_pw_qpolynomial_fold) { - obj.v = isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(obj.v); - obj.type = isl_obj_union_pw_qpolynomial_fold; - } else - isl_assert(ctx, 0, goto error); - return obj; -error: - obj.type->free(obj.v); - obj.type = isl_obj_none; - return obj; -} - -static struct isl_obj obj_add(struct isl_ctx *ctx, - struct isl_obj obj1, struct isl_obj obj2) -{ - if (obj1.type == isl_obj_set && obj2.type == isl_obj_union_set) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_set && obj2.type == isl_obj_set) - obj2 = to_union(ctx, obj2); - if (obj1.type == isl_obj_map && obj2.type == isl_obj_union_map) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_map && obj2.type == isl_obj_map) - obj2 = to_union(ctx, obj2); - if (obj1.type == isl_obj_pw_qpolynomial && - obj2.type == isl_obj_union_pw_qpolynomial) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_pw_qpolynomial && - obj2.type == isl_obj_pw_qpolynomial) - obj2 = to_union(ctx, obj2); - if (obj1.type == isl_obj_pw_qpolynomial_fold && - obj2.type == isl_obj_union_pw_qpolynomial_fold) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_pw_qpolynomial_fold && - obj2.type == isl_obj_pw_qpolynomial_fold) - obj2 = to_union(ctx, obj2); - isl_assert(ctx, obj1.type == obj2.type, goto error); - if (obj1.type == isl_obj_map && !isl_map_has_equal_dim(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - if (obj1.type == isl_obj_set && !isl_set_has_equal_dim(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - if (obj1.type == isl_obj_pw_qpolynomial && - !isl_pw_qpolynomial_has_equal_dim(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - if (obj1.type == isl_obj_pw_qpolynomial_fold && - !isl_pw_qpolynomial_fold_has_equal_dim(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - obj1.v = obj1.type->add(obj1.v, obj2.v); - return obj1; -error: - obj1.type->free(obj1.v); - obj2.type->free(obj2.v); - obj1.type = isl_obj_none; - obj1.v = NULL; - return obj1; -} - -static struct isl_obj obj_read(struct isl_stream *s, int nparam) -{ - isl_basic_map *bmap = NULL; - struct isl_token *tok; - struct vars *v = NULL; - struct isl_obj obj = { isl_obj_set, NULL }; - - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type == ISL_TOKEN_VALUE) { - struct isl_token *tok2; - struct isl_map *map; - - tok2 = isl_stream_next_token(s); - if (!tok2 || tok2->type != ISL_TOKEN_VALUE || - isl_int_is_neg(tok2->u.v)) { - if (tok2) - isl_stream_push_token(s, tok2); - obj.type = isl_obj_int; - obj.v = isl_int_obj_alloc(s->ctx, tok->u.v); - isl_token_free(tok); - return obj; - } - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - map = map_read_polylib(s, nparam); - if (!map) - goto error; - if (isl_map_dim(map, isl_dim_in) > 0) - obj.type = isl_obj_map; - obj.v = map; - return obj; - } - v = vars_new(s->ctx); - if (!v) { - isl_stream_push_token(s, tok); - goto error; - } - bmap = isl_basic_map_alloc(s->ctx, 0, 0, 0, 0, 0, 0); - if (tok->type == '[') { - isl_stream_push_token(s, tok); - bmap = read_tuple(s, bmap, isl_dim_param, v); - if (!bmap) - goto error; - if (nparam >= 0) - isl_assert(s->ctx, nparam == v->n, goto error); - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_TO) { - isl_stream_error(s, tok, "expecting '->'"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - isl_token_free(tok); - tok = isl_stream_next_token(s); - } else if (nparam > 0) - bmap = isl_basic_map_add(bmap, isl_dim_param, nparam); - if (!tok || tok->type != '{') { - isl_stream_error(s, tok, "expecting '{'"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - isl_token_free(tok); - - tok = isl_stream_next_token(s); - if (!tok) - ; - else if (tok->type == ISL_TOKEN_IDENT && !strcmp(tok->u.s, "Sym")) { - isl_token_free(tok); - if (isl_stream_eat(s, '=')) - goto error; - bmap = read_tuple(s, bmap, isl_dim_param, v); - if (!bmap) - goto error; - if (nparam >= 0) - isl_assert(s->ctx, nparam == v->n, goto error); - } else if (tok->type == '}') { - obj.type = isl_obj_union_set; - obj.v = isl_union_set_empty(isl_basic_map_get_dim(bmap)); - isl_token_free(tok); - goto done; - } else - isl_stream_push_token(s, tok); - - for (;;) { - struct isl_obj o; - tok = NULL; - o = obj_read_body(s, isl_basic_map_copy(bmap), v); - if (o.type == isl_obj_none || !o.v) - goto error; - if (!obj.v) - obj = o; - else { - obj = obj_add(s->ctx, obj, o); - if (obj.type == isl_obj_none || !obj.v) - goto error; - } - tok = isl_stream_next_token(s); - if (!tok || tok->type != ';') - break; - isl_token_free(tok); - if (isl_stream_next_token_is(s, '}')) { - tok = isl_stream_next_token(s); - break; - } - } - - if (tok && tok->type == '}') { - isl_token_free(tok); - } else { - isl_stream_error(s, tok, "unexpected isl_token"); - if (tok) - isl_token_free(tok); - goto error; - } -done: - vars_free(v); - isl_basic_map_free(bmap); - - return obj; -error: - isl_basic_map_free(bmap); - obj.type->free(obj.v); - if (v) - vars_free(v); - obj.v = NULL; - return obj; -} - -struct isl_obj isl_stream_read_obj(struct isl_stream *s) -{ - return obj_read(s, -1); -} - -__isl_give isl_map *isl_stream_read_map(struct isl_stream *s, int nparam) -{ - struct isl_obj obj; - - obj = obj_read(s, nparam); - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_map || - obj.type == isl_obj_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_set *isl_stream_read_set(struct isl_stream *s, int nparam) -{ - struct isl_obj obj; - - obj = obj_read(s, nparam); - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_union_map *isl_stream_read_union_map(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s, -1); - if (obj.type == isl_obj_map) { - obj.type = isl_obj_union_map; - obj.v = isl_union_map_from_map(obj.v); - } - if (obj.type == isl_obj_set) { - obj.type = isl_obj_union_set; - obj.v = isl_union_set_from_set(obj.v); - } - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_union_map || - obj.type == isl_obj_union_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_union_set *isl_stream_read_union_set(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s, -1); - if (obj.type == isl_obj_set) { - obj.type = isl_obj_union_set; - obj.v = isl_union_set_from_set(obj.v); - } - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_union_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -static struct isl_basic_map *basic_map_read(struct isl_stream *s, int nparam) -{ - struct isl_obj obj; - struct isl_map *map; - struct isl_basic_map *bmap; - - obj = obj_read(s, nparam); - map = obj.v; - if (!map) - return NULL; - - isl_assert(map->ctx, map->n <= 1, goto error); - - if (map->n == 0) - bmap = isl_basic_map_empty_like_map(map); - else - bmap = isl_basic_map_copy(map->p[0]); - - isl_map_free(map); - - return bmap; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx, - FILE *input, int nparam) -{ - struct isl_basic_map *bmap; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - bmap = basic_map_read(s, nparam); - isl_stream_free(s); - return bmap; -} - -__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx, - FILE *input, int nparam) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_read_from_file(ctx, input, nparam); - if (!bmap) - return NULL; - isl_assert(ctx, isl_basic_map_n_in(bmap) == 0, goto error); - return (struct isl_basic_set *)bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_read_from_str(struct isl_ctx *ctx, - const char *str, int nparam) -{ - struct isl_basic_map *bmap; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - bmap = basic_map_read(s, nparam); - isl_stream_free(s); - return bmap; -} - -struct isl_basic_set *isl_basic_set_read_from_str(struct isl_ctx *ctx, - const char *str, int nparam) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_read_from_str(ctx, str, nparam); - if (!bmap) - return NULL; - isl_assert(ctx, isl_basic_map_n_in(bmap) == 0, goto error); - return (struct isl_basic_set *)bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_read_from_file(struct isl_ctx *ctx, - FILE *input, int nparam) -{ - struct isl_map *map; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - map = isl_stream_read_map(s, nparam); - isl_stream_free(s); - return map; -} - -__isl_give isl_map *isl_map_read_from_str(struct isl_ctx *ctx, - const char *str, int nparam) -{ - struct isl_map *map; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - map = isl_stream_read_map(s, nparam); - isl_stream_free(s); - return map; -} - -__isl_give isl_set *isl_set_read_from_file(struct isl_ctx *ctx, - FILE *input, int nparam) -{ - struct isl_map *map; - map = isl_map_read_from_file(ctx, input, nparam); - if (!map) - return NULL; - isl_assert(ctx, isl_map_n_in(map) == 0, goto error); - return (struct isl_set *)map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_read_from_str(struct isl_ctx *ctx, - const char *str, int nparam) -{ - struct isl_map *map; - map = isl_map_read_from_str(ctx, str, nparam); - if (!map) - return NULL; - isl_assert(ctx, isl_map_n_in(map) == 0, goto error); - return (struct isl_set *)map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_union_map *umap; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - umap = isl_stream_read_union_map(s); - isl_stream_free(s); - return umap; -} - -__isl_give isl_union_map *isl_union_map_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - isl_union_map *umap; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - umap = isl_stream_read_union_map(s); - isl_stream_free(s); - return umap; -} - -__isl_give isl_union_set *isl_union_set_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_union_set *uset; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - uset = isl_stream_read_union_set(s); - isl_stream_free(s); - return uset; -} - -__isl_give isl_union_set *isl_union_set_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - isl_union_set *uset; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - uset = isl_stream_read_union_set(s); - isl_stream_free(s); - return uset; -} - -static __isl_give isl_vec *isl_vec_read_polylib(struct isl_stream *s) -{ - struct isl_vec *vec = NULL; - struct isl_token *tok; - unsigned size; - int j; - - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting vector length"); - goto error; - } - - size = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - vec = isl_vec_alloc(s->ctx, size); - - for (j = 0; j < size; ++j) { - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting constant value"); - goto error; - } - isl_int_set(vec->el[j], tok->u.v); - isl_token_free(tok); - } - - return vec; -error: - isl_token_free(tok); - isl_vec_free(vec); - return NULL; -} - -static __isl_give isl_vec *vec_read(struct isl_stream *s) -{ - return isl_vec_read_polylib(s); -} - -__isl_give isl_vec *isl_vec_read_from_file(isl_ctx *ctx, FILE *input) -{ - isl_vec *v; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - v = vec_read(s); - isl_stream_free(s); - return v; -} - -__isl_give isl_pw_qpolynomial *isl_stream_read_pw_qpolynomial( - struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s, -1); - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_pw_qpolynomial, - goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx, - const char *str) -{ - isl_pw_qpolynomial *pwqp; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - pwqp = isl_stream_read_pw_qpolynomial(s); - isl_stream_free(s); - return pwqp; -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_pw_qpolynomial *pwqp; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - pwqp = isl_stream_read_pw_qpolynomial(s); - isl_stream_free(s); - return pwqp; -} diff --git a/cloog-0.16.3/isl/isl_list.c b/cloog-0.16.3/isl/isl_list.c deleted file mode 100644 index ec1dd2900317c1ca5248e19877271cf40f089f67..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_list.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include - -#undef BASE -#define BASE basic_set - -#include - -#undef BASE -#define BASE set - -#include - -#undef BASE -#define BASE aff - -#include - -#undef BASE -#define BASE band - -#include diff --git a/cloog-0.16.3/isl/isl_list_private.h b/cloog-0.16.3/isl/isl_list_private.h deleted file mode 100644 index 15c0547042f24cd12883282cee8d806c8065f015..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_list_private.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ISL_LIST_PRIVATE_H -#define ISL_LIST_PRIVATE_H - -#include - -#undef EL -#define EL isl_basic_set - -#include - -#undef EL -#define EL isl_set - -#include - -#undef EL -#define EL isl_aff - -#include - -#undef EL -#define EL isl_band - -#include - -#endif diff --git a/cloog-0.16.3/isl/isl_list_templ.c b/cloog-0.16.3/isl/isl_list_templ.c deleted file mode 100644 index 0bf82944e63a0ca384d7607f4326552358dd20bb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_list_templ.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#define xCAT(A,B) A ## B -#define CAT(A,B) xCAT(A,B) -#undef EL -#define EL CAT(isl_,BASE) -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xLIST(EL) EL ## _list -#define LIST(EL) xLIST(EL) - -isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list) -{ - return list ? list->ctx : NULL; -} - -__isl_give LIST(EL) *FN(LIST(EL),alloc)(isl_ctx *ctx, int n) -{ - LIST(EL) *list; - - if (n < 0) - isl_die(ctx, isl_error_invalid, - "cannot create list of negative length", - return NULL); - list = isl_alloc(ctx, LIST(EL), - sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *)); - if (!list) - return NULL; - - list->ctx = ctx; - isl_ctx_ref(ctx); - list->ref = 1; - list->size = n; - list->n = 0; - return list; -} - -__isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list) -{ - if (!list) - return NULL; - - list->ref++; - return list; -} - -__isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list) -{ - int i; - LIST(EL) *dup; - - if (!list) - return NULL; - - dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n); - if (!dup) - return NULL; - for (i = 0; i < list->n; ++i) - dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i])); - return dup; -} - -__isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list, - __isl_take struct EL *el) -{ - if (!list || !el) - goto error; - isl_assert(list->ctx, list->n < list->size, goto error); - list->p[list->n] = el; - list->n++; - return list; -error: - FN(EL,free)(el); - FN(LIST(EL),free)(list); - return NULL; -} - -void FN(LIST(EL),free)(__isl_take LIST(EL) *list) -{ - int i; - - if (!list) - return; - - if (--list->ref > 0) - return; - - isl_ctx_deref(list->ctx); - for (i = 0; i < list->n; ++i) - FN(EL,free)(list->p[i]); - free(list); -} - -int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list) -{ - return list ? list->n : 0; -} - -__isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index) -{ - if (!list) - return NULL; - if (index < 0 || index >= list->n) - isl_die(list->ctx, isl_error_invalid, - "index out of bounds", return NULL); - return FN(EL,copy)(list->p[index]); -} - -int FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list, - int (*fn)(__isl_take EL *el, void *user), void *user) -{ - int i; - - if (!list) - return -1; - - for (i = 0; i < list->n; ++i) { - EL *el = FN(EL,copy(list->p[i])); - if (!el) - return -1; - if (fn(el, user) < 0) - return -1; - } - - return 0; -} - -__isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))( - __isl_take isl_printer *p, __isl_keep LIST(EL) *list) -{ - int i; - - if (!p || !list) - goto error; - p = isl_printer_print_str(p, "("); - for (i = 0; i < list->n; ++i) { - if (i) - p = isl_printer_print_str(p, ","); - p = CAT(isl_printer_print_,BASE)(p, list->p[i]); - } - p = isl_printer_print_str(p, ")"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list) -{ - isl_printer *printer; - - if (!list) - return; - - printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr); - printer = CAT(isl_printer_print_,LIST(BASE))(printer, list); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} diff --git a/cloog-0.16.3/isl/isl_list_templ.h b/cloog-0.16.3/isl/isl_list_templ.h deleted file mode 100644 index a9599800c691eb2aeb7a0a54171d031363ea5ec8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_list_templ.h +++ /dev/null @@ -1,23 +0,0 @@ -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xLIST(EL) EL ## _list -#define LIST(EL) xLIST(EL) - -struct LIST(EL) { - int ref; - isl_ctx *ctx; - - int n; - - size_t size; - struct EL *p[1]; -}; - -#define ISL_DECLARE_LIST_PRIVATE(EL) \ -__isl_give isl_##EL##_list *isl_##EL##_list_dup( \ - __isl_keep isl_##EL##_list *list); - -ISL_DECLARE_LIST_PRIVATE(basic_set) -ISL_DECLARE_LIST_PRIVATE(set) -ISL_DECLARE_LIST_PRIVATE(aff) -ISL_DECLARE_LIST_PRIVATE(band) diff --git a/cloog-0.16.3/isl/isl_local_space.c b/cloog-0.16.3/isl/isl_local_space.c deleted file mode 100644 index 17ac9ea37501ad692b3cf2630321aeb76eedcb79..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_local_space.c +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_local_space_get_ctx(__isl_keep isl_local_space *ls) -{ - return ls ? ls->dim->ctx : NULL; -} - -__isl_give isl_local_space *isl_local_space_alloc_div(__isl_take isl_dim *dim, - __isl_take isl_mat *div) -{ - isl_ctx *ctx; - isl_local_space *ls = NULL; - - if (!dim) - goto error; - - ctx = isl_dim_get_ctx(dim); - ls = isl_calloc_type(ctx, struct isl_local_space); - if (!ls) - goto error; - - ls->ref = 1; - ls->dim = dim; - ls->div = div; - - return ls; -error: - isl_dim_free(dim); - isl_local_space_free(ls); - return NULL; -} - -__isl_give isl_local_space *isl_local_space_alloc(__isl_take isl_dim *dim, - unsigned n_div) -{ - isl_ctx *ctx; - isl_mat *div; - unsigned total; - - if (!dim) - return NULL; - - total = isl_dim_total(dim); - - ctx = isl_dim_get_ctx(dim); - div = isl_mat_alloc(ctx, n_div, 1 + 1 + total + n_div); - return isl_local_space_alloc_div(dim, div); -} - -__isl_give isl_local_space *isl_local_space_from_dim(__isl_take isl_dim *dim) -{ - return isl_local_space_alloc(dim, 0); -} - -__isl_give isl_local_space *isl_local_space_copy(__isl_keep isl_local_space *ls) -{ - if (!ls) - return NULL; - - ls->ref++; - return ls; -} - -__isl_give isl_local_space *isl_local_space_dup(__isl_keep isl_local_space *ls) -{ - if (!ls) - return NULL; - - return isl_local_space_alloc_div(isl_dim_copy(ls->dim), - isl_mat_copy(ls->div)); - -} - -__isl_give isl_local_space *isl_local_space_cow(__isl_take isl_local_space *ls) -{ - if (!ls) - return NULL; - - if (ls->ref == 1) - return ls; - ls->ref--; - return isl_local_space_dup(ls); -} - -void *isl_local_space_free(__isl_take isl_local_space *ls) -{ - if (!ls) - return NULL; - - if (--ls->ref > 0) - return NULL; - - isl_dim_free(ls->dim); - isl_mat_free(ls->div); - - free(ls); - - return NULL; -} - -/* Return true if the two local spaces are identical, with identical - * expressions for the integer divisions. - */ -int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, - __isl_keep isl_local_space *ls2) -{ - int equal; - - if (!ls1 || !ls2) - return -1; - - equal = isl_dim_equal(ls1->dim, ls2->dim); - if (equal < 0 || !equal) - return equal; - - if (!isl_local_space_divs_known(ls1)) - return 0; - if (!isl_local_space_divs_known(ls2)) - return 0; - - return isl_mat_is_equal(ls1->div, ls2->div); -} - -int isl_local_space_dim(__isl_keep isl_local_space *ls, - enum isl_dim_type type) -{ - if (!ls) - return 0; - if (type == isl_dim_div) - return ls->div->n_row; - if (type == isl_dim_all) - return isl_dim_size(ls->dim, isl_dim_all) + ls->div->n_row; - return isl_dim_size(ls->dim, type); -} - -unsigned isl_local_space_offset(__isl_keep isl_local_space *ls, - enum isl_dim_type type) -{ - isl_dim *dim; - - if (!ls) - return 0; - - dim = ls->dim; - switch (type) { - case isl_dim_cst: return 0; - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, - enum isl_dim_type type, unsigned pos) -{ - return ls ? isl_dim_get_name(ls->dim, type, pos) : NULL; -} - -__isl_give isl_div *isl_local_space_get_div(__isl_keep isl_local_space *ls, - int pos) -{ - isl_basic_map *bmap; - - if (!ls) - return NULL; - - if (pos < 0 || pos >= ls->div->n_row) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "index out of bounds", return NULL); - - if (isl_int_is_zero(ls->div->row[pos][0])) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "expression of div unknown", return NULL); - - bmap = isl_basic_map_from_local_space(isl_local_space_copy(ls)); - return isl_basic_map_div(bmap, pos); -} - -__isl_give isl_dim *isl_local_space_get_dim(__isl_keep isl_local_space *ls) -{ - if (!ls) - return NULL; - - return isl_dim_copy(ls->dim); -} - -__isl_give isl_local_space *isl_local_space_set_dim_name( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, const char *s) -{ - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - ls->dim = isl_dim_set_name(ls->dim, type, pos, s); - if (!ls->dim) - return isl_local_space_free(ls); - - return ls; -} - -__isl_give isl_local_space *isl_local_space_reset_dim( - __isl_take isl_local_space *ls, __isl_take isl_dim *dim) -{ - ls = isl_local_space_cow(ls); - if (!ls || !dim) - goto error; - - isl_dim_free(ls->dim); - ls->dim = dim; - - return ls; -error: - isl_local_space_free(ls); - isl_dim_free(dim); - return NULL; -} - -/* Reorder the columns of the given div definitions according to the - * given reordering. - * The order of the divs themselves is assumed not to change. - */ -static __isl_give isl_mat *reorder_divs(__isl_take isl_mat *div, - __isl_take isl_reordering *r) -{ - int i, j; - isl_mat *mat; - int extra; - - if (!div || !r) - goto error; - - extra = isl_dim_total(r->dim) + div->n_row - r->len; - mat = isl_mat_alloc(div->ctx, div->n_row, div->n_col + extra); - if (!mat) - goto error; - - for (i = 0; i < div->n_row; ++i) { - isl_seq_cpy(mat->row[i], div->row[i], 2); - isl_seq_clr(mat->row[i] + 2, mat->n_col - 2); - for (j = 0; j < r->len; ++j) - isl_int_set(mat->row[i][2 + r->pos[j]], - div->row[i][2 + j]); - } - - isl_reordering_free(r); - isl_mat_free(div); - return mat; -error: - isl_reordering_free(r); - isl_mat_free(div); - return NULL; -} - -/* Reorder the dimensions of "ls" according to the given reordering. - * The reordering r is assumed to have been extended with the local - * variables, leaving them in the same order. - */ -__isl_give isl_local_space *isl_local_space_realign( - __isl_take isl_local_space *ls, __isl_take isl_reordering *r) -{ - ls = isl_local_space_cow(ls); - if (!ls || !r) - goto error; - - ls->div = reorder_divs(ls->div, isl_reordering_copy(r)); - if (!ls->div) - goto error; - - ls = isl_local_space_reset_dim(ls, isl_dim_copy(r->dim)); - - isl_reordering_free(r); - return ls; -error: - isl_local_space_free(ls); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_local_space *isl_local_space_add_div( - __isl_take isl_local_space *ls, __isl_take isl_vec *div) -{ - ls = isl_local_space_cow(ls); - if (!ls || !div) - goto error; - - if (ls->div->n_col != div->size) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "incompatible dimensions", goto error); - - ls->div = isl_mat_add_zero_cols(ls->div, 1); - ls->div = isl_mat_add_rows(ls->div, 1); - if (!ls->div) - goto error; - - isl_seq_cpy(ls->div->row[ls->div->n_row - 1], div->el, div->size); - isl_int_set_si(ls->div->row[ls->div->n_row - 1][div->size], 0); - - isl_vec_free(div); - return ls; -error: - isl_local_space_free(ls); - isl_vec_free(div); - return NULL; -} - -__isl_give isl_local_space *isl_local_space_replace_divs( - __isl_take isl_local_space *ls, __isl_take isl_mat *div) -{ - ls = isl_local_space_cow(ls); - - if (!ls || !div) - goto error; - - isl_mat_free(ls->div); - ls->div = div; - return ls; -error: - isl_mat_free(div); - isl_local_space_free(ls); - return NULL; -} - -/* Copy row "s" of "src" to row "d" of "dst", applying the expansion - * defined by "exp". - */ -static void expand_row(__isl_keep isl_mat *dst, int d, - __isl_keep isl_mat *src, int s, int *exp) -{ - int i; - unsigned c = src->n_col - src->n_row; - - isl_seq_cpy(dst->row[d], src->row[s], c); - isl_seq_clr(dst->row[d] + c, dst->n_col - c); - - for (i = 0; i < s; ++i) - isl_int_set(dst->row[d][c + exp[i]], src->row[s][c + i]); -} - -/* Compare (known) divs. - * Return non-zero if at least one of the two divs is unknown. - */ -static int cmp_row(__isl_keep isl_mat *div, int i, int j) -{ - int li, lj; - - if (isl_int_is_zero(div->row[j][0])) - return -1; - if (isl_int_is_zero(div->row[i][0])) - return 1; - - li = isl_seq_last_non_zero(div->row[i], div->n_col); - lj = isl_seq_last_non_zero(div->row[j], div->n_col); - - if (li != lj) - return li - lj; - - return isl_seq_cmp(div->row[i], div->row[j], div->n_col); -} - -/* Combine the two lists of divs into a single list. - * For each row i in div1, exp1[i] is set to the position of the corresponding - * row in the result. Similarly for div2 and exp2. - * This function guarantees - * exp1[i] >= i - * exp1[i+1] > exp1[i] - * For optimal merging, the two input list should have been sorted. - */ -__isl_give isl_mat *isl_merge_divs(__isl_keep isl_mat *div1, - __isl_keep isl_mat *div2, int *exp1, int *exp2) -{ - int i, j, k; - isl_mat *div = NULL; - unsigned d = div1->n_col - div1->n_row; - - div = isl_mat_alloc(div1->ctx, 1 + div1->n_row + div2->n_row, - d + div1->n_row + div2->n_row); - if (!div) - return NULL; - - for (i = 0, j = 0, k = 0; i < div1->n_row && j < div2->n_row; ++k) { - int cmp; - - expand_row(div, k, div1, i, exp1); - expand_row(div, k + 1, div2, j, exp2); - - cmp = cmp_row(div, k, k + 1); - if (cmp == 0) { - exp1[i++] = k; - exp2[j++] = k; - } else if (cmp < 0) { - exp1[i++] = k; - } else { - exp2[j++] = k; - isl_seq_cpy(div->row[k], div->row[k + 1], div->n_col); - } - } - for (; i < div1->n_row; ++i, ++k) { - expand_row(div, k, div1, i, exp1); - exp1[i] = k; - } - for (; j < div2->n_row; ++j, ++k) { - expand_row(div, k, div2, j, exp2); - exp2[j] = k; - } - - div->n_row = k; - div->n_col = d + k; - - return div; -} - -int isl_local_space_divs_known(__isl_keep isl_local_space *ls) -{ - int i; - - if (!ls) - return -1; - - for (i = 0; i < ls->div->n_row; ++i) - if (isl_int_is_zero(ls->div->row[i][0])) - return 0; - - return 1; -} - -/* Construct a local space for a map that has the given local - * space as domain and that has a zero-dimensional range. - */ -__isl_give isl_local_space *isl_local_space_from_domain( - __isl_take isl_local_space *ls) -{ - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - ls->dim = isl_dim_from_domain(ls->dim); - if (!ls->dim) - return isl_local_space_free(ls); - return ls; -} - -__isl_give isl_local_space *isl_local_space_add_dims( - __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned n) -{ - int pos; - - if (!ls) - return NULL; - pos = isl_local_space_dim(ls, type); - return isl_local_space_insert_dims(ls, type, pos, n); -} - -/* Remove common factor of non-constant terms and denominator. - */ -static void normalize_div(__isl_keep isl_local_space *ls, int div) -{ - isl_ctx *ctx = ls->div->ctx; - unsigned total = ls->div->n_col - 2; - - isl_seq_gcd(ls->div->row[div] + 2, total, &ctx->normalize_gcd); - isl_int_gcd(ctx->normalize_gcd, - ctx->normalize_gcd, ls->div->row[div][0]); - if (isl_int_is_one(ctx->normalize_gcd)) - return; - - isl_seq_scale_down(ls->div->row[div] + 2, ls->div->row[div] + 2, - ctx->normalize_gcd, total); - isl_int_divexact(ls->div->row[div][0], ls->div->row[div][0], - ctx->normalize_gcd); - isl_int_fdiv_q(ls->div->row[div][1], ls->div->row[div][1], - ctx->normalize_gcd); -} - -/* Exploit the equalities in "eq" to simplify the expressions of - * the integer divisions in "ls". - * The integer divisions in "ls" are assumed to appear as regular - * dimensions in "eq". - */ -__isl_give isl_local_space *isl_local_space_substitute_equalities( - __isl_take isl_local_space *ls, __isl_take isl_basic_set *eq) -{ - int i, j, k; - unsigned total; - unsigned n_div; - - ls = isl_local_space_cow(ls); - if (!ls || !eq) - goto error; - - total = isl_dim_total(eq->dim); - if (isl_local_space_dim(ls, isl_dim_all) != total) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "dimensions don't match", goto error); - total++; - n_div = eq->n_div; - for (i = 0; i < eq->n_eq; ++i) { - j = isl_seq_last_non_zero(eq->eq[i], total + n_div); - if (j < 0 || j == 0 || j >= total) - continue; - - for (k = 0; k < ls->div->n_row; ++k) { - if (isl_int_is_zero(ls->div->row[k][1 + j])) - continue; - isl_seq_elim(ls->div->row[k] + 1, eq->eq[i], j, total, - &ls->div->row[k][0]); - normalize_div(ls, k); - } - } - - isl_basic_set_free(eq); - return ls; -error: - isl_basic_set_free(eq); - isl_local_space_free(ls); - return NULL; -} - -int isl_local_space_is_named_or_nested(__isl_keep isl_local_space *ls, - enum isl_dim_type type) -{ - if (!ls) - return -1; - return isl_dim_is_named_or_nested(ls->dim, type); -} - -__isl_give isl_local_space *isl_local_space_drop_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!ls) - return NULL; - if (n == 0 && !isl_local_space_is_named_or_nested(ls, type)) - return ls; - - ctx = isl_local_space_get_ctx(ls); - if (first + n > isl_local_space_dim(ls, type)) - isl_die(ctx, isl_error_invalid, "range out of bounds", - return isl_local_space_free(ls)); - - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - - if (type == isl_dim_div) { - ls->div = isl_mat_drop_rows(ls->div, first, n); - } else { - ls->dim = isl_dim_drop(ls->dim, type, first, n); - if (!ls->dim) - return isl_local_space_free(ls); - } - - first += 1 + isl_local_space_offset(ls, type); - ls->div = isl_mat_drop_cols(ls->div, first, n); - if (!ls->div) - return isl_local_space_free(ls); - - return ls; -} - -__isl_give isl_local_space *isl_local_space_insert_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!ls) - return NULL; - if (n == 0 && !isl_local_space_is_named_or_nested(ls, type)) - return ls; - - ctx = isl_local_space_get_ctx(ls); - if (first > isl_local_space_dim(ls, type)) - isl_die(ctx, isl_error_invalid, "position out of bounds", - return isl_local_space_free(ls)); - - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - - if (type == isl_dim_div) { - ls->div = isl_mat_insert_zero_rows(ls->div, first, n); - } else { - ls->dim = isl_dim_insert(ls->dim, type, first, n); - if (!ls->dim) - return isl_local_space_free(ls); - } - - first += 1 + isl_local_space_offset(ls, type); - ls->div = isl_mat_insert_zero_cols(ls->div, first, n); - if (!ls->div) - return isl_local_space_free(ls); - - return ls; -} diff --git a/cloog-0.16.3/isl/isl_local_space_private.h b/cloog-0.16.3/isl/isl_local_space_private.h deleted file mode 100644 index 6f3e93de643378cddae65da365219e78685b5fa9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_local_space_private.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef ISL_LOCAL_SPACE_PRIVATE_H -#define ISL_LOCAL_SPACE_PRIVATE_H - -#include -#include -#include -#include - -struct isl_local_space { - int ref; - - isl_dim *dim; - isl_mat *div; -}; - -__isl_give isl_local_space *isl_local_space_alloc(__isl_take isl_dim *dim, - unsigned n_div); - -__isl_give isl_local_space *isl_local_space_add_div( - __isl_take isl_local_space *ls, __isl_take isl_vec *div); - -__isl_give isl_mat *isl_merge_divs(__isl_keep isl_mat *div1, - __isl_keep isl_mat *div2, int *exp1, int *exp2); - -unsigned isl_local_space_offset(__isl_keep isl_local_space *ls, - enum isl_dim_type type); - -__isl_give isl_local_space *isl_local_space_replace_divs( - __isl_take isl_local_space *ls, __isl_take isl_mat *div); -int isl_local_space_divs_known(__isl_keep isl_local_space *ls); - -__isl_give isl_local_space *isl_local_space_substitute_equalities( - __isl_take isl_local_space *ls, __isl_take isl_basic_set *eq); - -int isl_local_space_is_named_or_nested(__isl_keep isl_local_space *ls, - enum isl_dim_type type); - -__isl_give isl_local_space *isl_local_space_reset_dim( - __isl_take isl_local_space *ls, __isl_take isl_dim *dim); -__isl_give isl_local_space *isl_local_space_realign( - __isl_take isl_local_space *ls, __isl_take isl_reordering *r); - -#endif diff --git a/cloog-0.16.3/isl/isl_lp.c b/cloog-0.16.3/isl/isl_lp.c deleted file mode 100644 index 1673b5b35320c65052f893d3f0ed90ea17e2e17f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_lp.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_lp_piplib.h" -#include -#include "isl_tab.h" - -enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - struct isl_tab *tab; - enum isl_lp_result res; - unsigned dim = isl_basic_map_total_dim(bmap); - - if (maximize) - isl_seq_neg(f, f, 1 + dim); - - bmap = isl_basic_map_gauss(bmap, NULL); - tab = isl_tab_from_basic_map(bmap); - res = isl_tab_min(tab, f, denom, opt, opt_denom, 0); - if (res == isl_lp_ok && sol) { - *sol = isl_tab_get_sample_value(tab); - if (!*sol) - res = isl_lp_error; - } - isl_tab_free(tab); - - if (maximize) - isl_seq_neg(f, f, 1 + dim); - if (maximize && opt) - isl_int_neg(*opt, *opt); - - return res; -} - -/* Given a basic map "bmap" and an affine combination of the variables "f" - * with denominator "denom", set *opt / *opt_denom to the minimal - * (or maximal if "maximize" is true) value attained by f/d over "bmap", - * assuming the basic map is not empty and the expression cannot attain - * arbitrarily small (or large) values. - * If opt_denom is NULL, then *opt is rounded up (or down) - * to the nearest integer. - * The return value reflects the nature of the result (empty, unbounded, - * minmimal or maximal value returned in *opt). - */ -enum isl_lp_result isl_basic_map_solve_lp(struct isl_basic_map *bmap, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - if (sol) - *sol = NULL; - - if (!bmap) - return isl_lp_error; - - switch (bmap->ctx->opt->lp_solver) { - case ISL_LP_PIP: - return isl_pip_solve_lp(bmap, max, f, d, opt, opt_denom, sol); - case ISL_LP_TAB: - return isl_tab_solve_lp(bmap, max, f, d, opt, opt_denom, sol); - default: - return isl_lp_error; - } -} - -enum isl_lp_result isl_basic_set_solve_lp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - return isl_basic_map_solve_lp((struct isl_basic_map *)bset, max, - f, d, opt, opt_denom, sol); -} - -enum isl_lp_result isl_map_solve_lp(__isl_keep isl_map *map, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - int i; - isl_int o; - isl_int t; - isl_int opt_i; - isl_int opt_denom_i; - enum isl_lp_result res; - int max_div; - isl_vec *v = NULL; - - if (!map) - return isl_lp_error; - if (map->n == 0) - return isl_lp_empty; - - max_div = 0; - for (i = 0; i < map->n; ++i) - if (map->p[i]->n_div > max_div) - max_div = map->p[i]->n_div; - if (max_div > 0) { - unsigned total = isl_dim_total(map->dim); - v = isl_vec_alloc(map->ctx, 1 + total + max_div); - if (!v) - return isl_lp_error; - isl_seq_cpy(v->el, f, 1 + total); - isl_seq_clr(v->el + 1 + total, max_div); - f = v->el; - } - - if (!opt && map->n > 1 && sol) { - isl_int_init(o); - opt = &o; - } - if (map->n > 0) - isl_int_init(opt_i); - if (map->n > 0 && opt_denom) { - isl_int_init(opt_denom_i); - isl_int_init(t); - } - - res = isl_basic_map_solve_lp(map->p[0], max, f, d, - opt, opt_denom, sol); - if (res == isl_lp_error || res == isl_lp_unbounded) - goto done; - - if (sol) - *sol = NULL; - - for (i = 1; i < map->n; ++i) { - isl_vec *sol_i = NULL; - enum isl_lp_result res_i; - int better; - - res_i = isl_basic_map_solve_lp(map->p[i], max, f, d, - &opt_i, - opt_denom ? &opt_denom_i : NULL, - sol ? &sol_i : NULL); - if (res_i == isl_lp_error || res_i == isl_lp_unbounded) { - res = res_i; - goto done; - } - if (res_i == isl_lp_empty) - continue; - if (res == isl_lp_empty) { - better = 1; - } else if (!opt_denom) { - if (max) - better = isl_int_gt(opt_i, *opt); - else - better = isl_int_lt(opt_i, *opt); - } else { - isl_int_mul(t, opt_i, *opt_denom); - isl_int_submul(t, *opt, opt_denom_i); - if (max) - better = isl_int_is_pos(t); - else - better = isl_int_is_neg(t); - } - if (better) { - res = res_i; - if (opt) - isl_int_set(*opt, opt_i); - if (opt_denom) - isl_int_set(*opt_denom, opt_denom_i); - if (sol) { - isl_vec_free(*sol); - *sol = sol_i; - } - } else - isl_vec_free(sol_i); - } - -done: - isl_vec_free(v); - if (map->n > 0 && opt_denom) { - isl_int_clear(opt_denom_i); - isl_int_clear(t); - } - if (map->n > 0) - isl_int_clear(opt_i); - if (opt == &o) - isl_int_clear(o); - return res; -} - -enum isl_lp_result isl_set_solve_lp(__isl_keep isl_set *set, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - return isl_map_solve_lp((struct isl_map *)set, max, - f, d, opt, opt_denom, sol); -} diff --git a/cloog-0.16.3/isl/isl_lp_no_piplib.c b/cloog-0.16.3/isl/isl_lp_no_piplib.c deleted file mode 100644 index 54c0135b2124b707a94feac46bdedd6c11312504..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_lp_no_piplib.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_lp_piplib.h" - -enum isl_lp_result isl_pip_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - return isl_lp_error; -} diff --git a/cloog-0.16.3/isl/isl_lp_piplib.c b/cloog-0.16.3/isl/isl_lp_piplib.c deleted file mode 100644 index d4b92af2fe9f28ce8e111ee3109218089be55b0a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_lp_piplib.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_piplib.h" -#include "isl_map_piplib.h" - -static void copy_solution(struct isl_vec *vec, int maximize, isl_int *opt, - isl_int *opt_denom, PipQuast *sol) -{ - int i; - PipList *list; - isl_int tmp; - - if (opt) { - if (opt_denom) { - isl_seq_cpy_from_pip(opt, - &sol->list->vector->the_vector[0], 1); - isl_seq_cpy_from_pip(opt_denom, - &sol->list->vector->the_deno[0], 1); - } else if (maximize) - mpz_fdiv_q(*opt, sol->list->vector->the_vector[0], - sol->list->vector->the_deno[0]); - else - mpz_cdiv_q(*opt, sol->list->vector->the_vector[0], - sol->list->vector->the_deno[0]); - } - - if (!vec) - return; - - isl_int_init(tmp); - isl_int_set_si(vec->el[0], 1); - for (i = 0, list = sol->list->next; list; ++i, list = list->next) { - isl_seq_cpy_from_pip(&vec->el[1 + i], - &list->vector->the_deno[0], 1); - isl_int_lcm(vec->el[0], vec->el[0], vec->el[1 + i]); - } - for (i = 0, list = sol->list->next; list; ++i, list = list->next) { - isl_seq_cpy_from_pip(&tmp, &list->vector->the_deno[0], 1); - isl_int_divexact(tmp, vec->el[0], tmp); - isl_seq_cpy_from_pip(&vec->el[1 + i], - &list->vector->the_vector[0], 1); - isl_int_mul(vec->el[1 + i], vec->el[1 + i], tmp); - } - isl_int_clear(tmp); -} - -enum isl_lp_result isl_pip_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **vec) -{ - enum isl_lp_result res = isl_lp_ok; - PipMatrix *domain = NULL; - PipOptions *options; - PipQuast *sol; - unsigned total; - - total = isl_basic_map_total_dim(bmap); - domain = isl_basic_map_to_pip(bmap, 0, 1, 0); - if (!domain) - goto error; - entier_set_si(domain->p[0][1], -1); - isl_int_set(domain->p[0][domain->NbColumns - 1], f[0]); - isl_seq_cpy_to_pip(domain->p[0]+2, f+1, total); - - options = pip_options_init(); - if (!options) - goto error; - options->Urs_unknowns = -1; - options->Maximize = maximize; - options->Nq = 0; - sol = pip_solve(domain, NULL, -1, options); - pip_options_free(options); - if (!sol) - goto error; - - if (vec) { - isl_ctx *ctx = isl_basic_map_get_ctx(bmap); - *vec = isl_vec_alloc(ctx, 1 + total); - } - if (vec && !*vec) - res = isl_lp_error; - else if (!sol->list) - res = isl_lp_empty; - else if (entier_zero_p(sol->list->vector->the_deno[0])) - res = isl_lp_unbounded; - else - copy_solution(*vec, maximize, opt, opt_denom, sol); - pip_matrix_free(domain); - pip_quast_free(sol); - return res; -error: - if (domain) - pip_matrix_free(domain); - return isl_lp_error; -} diff --git a/cloog-0.16.3/isl/isl_lp_piplib.h b/cloog-0.16.3/isl/isl_lp_piplib.h deleted file mode 100644 index e69a3b4a112abe87fad79a2bd8e6a53341670965..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_lp_piplib.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_LP_PIPLIB_H -#define ISL_LP_PIPLIB_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_lp_result isl_pip_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_map.c b/cloog-0.16.3/isl/isl_map.c deleted file mode 100644 index 3d30064eddf2a34e91fe3331135b57637432817d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map.c +++ /dev/null @@ -1,8951 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include "isl_dim_private.h" -#include "isl_equalities.h" -#include -#include -#include -#include -#include -#include "isl_map_piplib.h" -#include -#include "isl_sample.h" -#include "isl_tab.h" -#include -#include -#include -#include -#include - -static unsigned n(struct isl_dim *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return dim->nparam; - case isl_dim_in: return dim->n_in; - case isl_dim_out: return dim->n_out; - case isl_dim_all: return dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -static unsigned pos(struct isl_dim *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - default: return 0; - } -} - -unsigned isl_basic_map_dim(const struct isl_basic_map *bmap, - enum isl_dim_type type) -{ - if (!bmap) - return 0; - switch (type) { - case isl_dim_cst: return 1; - case isl_dim_param: - case isl_dim_in: - case isl_dim_out: return isl_dim_size(bmap->dim, type); - case isl_dim_div: return bmap->n_div; - case isl_dim_all: return isl_basic_map_total_dim(bmap); - default: return 0; - } -} - -unsigned isl_map_dim(const struct isl_map *map, enum isl_dim_type type) -{ - return map ? n(map->dim, type) : 0; -} - -unsigned isl_set_dim(const struct isl_set *set, enum isl_dim_type type) -{ - return set ? n(set->dim, type) : 0; -} - -unsigned isl_basic_map_offset(struct isl_basic_map *bmap, - enum isl_dim_type type) -{ - struct isl_dim *dim = bmap->dim; - switch (type) { - case isl_dim_cst: return 0; - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -unsigned isl_basic_set_offset(struct isl_basic_set *bset, - enum isl_dim_type type) -{ - return isl_basic_map_offset(bset, type); -} - -static unsigned map_offset(struct isl_map *map, enum isl_dim_type type) -{ - return pos(map->dim, type); -} - -unsigned isl_basic_set_dim(const struct isl_basic_set *bset, - enum isl_dim_type type) -{ - return isl_basic_map_dim((const struct isl_basic_map*)bset, type); -} - -unsigned isl_basic_set_n_dim(const struct isl_basic_set *bset) -{ - return isl_basic_set_dim(bset, isl_dim_set); -} - -unsigned isl_basic_set_n_param(const struct isl_basic_set *bset) -{ - return isl_basic_set_dim(bset, isl_dim_param); -} - -unsigned isl_basic_set_total_dim(const struct isl_basic_set *bset) -{ - return isl_dim_total(bset->dim) + bset->n_div; -} - -unsigned isl_set_n_dim(const struct isl_set *set) -{ - return isl_set_dim(set, isl_dim_set); -} - -unsigned isl_set_n_param(const struct isl_set *set) -{ - return isl_set_dim(set, isl_dim_param); -} - -unsigned isl_basic_map_n_in(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->dim->n_in : 0; -} - -unsigned isl_basic_map_n_out(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->dim->n_out : 0; -} - -unsigned isl_basic_map_n_param(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->dim->nparam : 0; -} - -unsigned isl_basic_map_n_div(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->n_div : 0; -} - -unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap) -{ - return bmap ? isl_dim_total(bmap->dim) + bmap->n_div : 0; -} - -unsigned isl_map_n_in(const struct isl_map *map) -{ - return map->dim->n_in; -} - -unsigned isl_map_n_out(const struct isl_map *map) -{ - return map->dim->n_out; -} - -unsigned isl_map_n_param(const struct isl_map *map) -{ - return map->dim->nparam; -} - -int isl_map_compatible_domain(struct isl_map *map, struct isl_set *set) -{ - int m; - if (!map || !set) - return -1; - m = isl_dim_match(map->dim, isl_dim_param, set->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_dim_tuple_match(map->dim, isl_dim_in, set->dim, isl_dim_set); -} - -int isl_basic_map_compatible_domain(struct isl_basic_map *bmap, - struct isl_basic_set *bset) -{ - int m; - if (!bmap || !bset) - return -1; - m = isl_dim_match(bmap->dim, isl_dim_param, bset->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_dim_tuple_match(bmap->dim, isl_dim_in, bset->dim, isl_dim_set); -} - -int isl_map_compatible_range(__isl_keep isl_map *map, __isl_keep isl_set *set) -{ - int m; - if (!map || !set) - return -1; - m = isl_dim_match(map->dim, isl_dim_param, set->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_dim_tuple_match(map->dim, isl_dim_out, set->dim, isl_dim_set); -} - -int isl_basic_map_compatible_range(struct isl_basic_map *bmap, - struct isl_basic_set *bset) -{ - int m; - if (!bmap || !bset) - return -1; - m = isl_dim_match(bmap->dim, isl_dim_param, bset->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_dim_tuple_match(bmap->dim, isl_dim_out, bset->dim, isl_dim_set); -} - -isl_ctx *isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap) -{ - return bmap ? bmap->ctx : NULL; -} - -isl_ctx *isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset) -{ - return bset ? bset->ctx : NULL; -} - -isl_ctx *isl_map_get_ctx(__isl_keep isl_map *map) -{ - return map ? map->ctx : NULL; -} - -isl_ctx *isl_set_get_ctx(__isl_keep isl_set *set) -{ - return set ? set->ctx : NULL; -} - -struct isl_dim *isl_basic_map_get_dim(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - return isl_dim_copy(bmap->dim); -} - -struct isl_dim *isl_basic_set_get_dim(struct isl_basic_set *bset) -{ - if (!bset) - return NULL; - return isl_dim_copy(bset->dim); -} - -__isl_give isl_local_space *isl_basic_map_get_local_space( - __isl_keep isl_basic_map *bmap) -{ - int i; - isl_local_space *ls; - unsigned total; - - if (!bmap) - return NULL; - - total = isl_basic_map_total_dim(bmap); - ls = isl_local_space_alloc(isl_dim_copy(bmap->dim), bmap->n_div); - if (!ls) - return NULL; - - for (i = 0; i < bmap->n_div; ++i) - isl_seq_cpy(ls->div->row[i], bmap->div[i], 2 + total); - - return ls; -} - -__isl_give isl_local_space *isl_basic_set_get_local_space( - __isl_keep isl_basic_set *bset) -{ - return isl_basic_map_get_local_space(bset); -} - -__isl_give isl_basic_map *isl_basic_map_from_local_space( - __isl_take isl_local_space *ls) -{ - int i; - int n_div; - isl_basic_map *bmap; - - if (!ls) - return NULL; - - n_div = isl_local_space_dim(ls, isl_dim_div); - bmap = isl_basic_map_alloc_dim(isl_local_space_get_dim(ls), - n_div, 0, 2 * n_div); - - for (i = 0; i < n_div; ++i) - if (isl_basic_map_alloc_div(bmap) < 0) - goto error; - - for (i = 0; i < n_div; ++i) { - isl_seq_cpy(bmap->div[i], ls->div->row[i], ls->div->n_col); - if (isl_basic_map_add_div_constraints(bmap, i) < 0) - goto error; - } - - isl_local_space_free(ls); - return bmap; -error: - isl_local_space_free(ls); - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_from_local_space( - __isl_take isl_local_space *ls) -{ - return isl_basic_map_from_local_space(ls); -} - -struct isl_dim *isl_map_get_dim(struct isl_map *map) -{ - if (!map) - return NULL; - return isl_dim_copy(map->dim); -} - -struct isl_dim *isl_set_get_dim(struct isl_set *set) -{ - if (!set) - return NULL; - return isl_dim_copy(set->dim); -} - -__isl_give isl_basic_map *isl_basic_map_set_tuple_name( - __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - bmap->dim = isl_dim_set_tuple_name(bmap->dim, type, s); - if (!bmap->dim) - goto error; - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_set_tuple_name( - __isl_take isl_basic_set *bset, const char *s) -{ - return isl_basic_map_set_tuple_name(bset, isl_dim_set, s); -} - -const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type) -{ - return bmap ? isl_dim_get_tuple_name(bmap->dim, type) : NULL; -} - -__isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map, - enum isl_dim_type type, const char *s) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_dim_set_tuple_name(map->dim, type, s); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_set_tuple_name(map->p[i], type, s); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -const char *isl_map_get_tuple_name(__isl_keep isl_map *map, - enum isl_dim_type type) -{ - return map ? isl_dim_get_tuple_name(map->dim, type) : NULL; -} - -__isl_give isl_set *isl_set_set_tuple_name(__isl_take isl_set *set, - const char *s) -{ - return (isl_set *)isl_map_set_tuple_name((isl_map *)set, isl_dim_set, s); -} - -const char *isl_basic_set_get_tuple_name(__isl_keep isl_basic_set *bset) -{ - return bset ? isl_dim_get_tuple_name(bset->dim, isl_dim_set) : NULL; -} - -const char *isl_set_get_tuple_name(__isl_keep isl_set *set) -{ - return set ? isl_dim_get_tuple_name(set->dim, isl_dim_set) : NULL; -} - -const char *isl_basic_map_get_dim_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - return bmap ? isl_dim_get_name(bmap->dim, type, pos) : NULL; -} - -const char *isl_basic_set_get_dim_name(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos) -{ - return bset ? isl_dim_get_name(bset->dim, type, pos) : NULL; -} - -const char *isl_map_get_dim_name(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos) -{ - return map ? isl_dim_get_name(map->dim, type, pos) : NULL; -} - -const char *isl_set_get_dim_name(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return set ? isl_dim_get_name(set->dim, type, pos) : NULL; -} - -__isl_give isl_basic_map *isl_basic_map_set_dim_name( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, const char *s) -{ - if (!bmap) - return NULL; - bmap->dim = isl_dim_set_name(bmap->dim, type, pos, s); - if (!bmap->dim) - goto error; - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - - if (!map) - return NULL; - - map->dim = isl_dim_set_name(map->dim, type, pos, s); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_set_dim_name(map->p[i], type, pos, s); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_set_dim_name( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, const char *s) -{ - return (isl_basic_set *)isl_basic_map_set_dim_name( - (isl_basic_map *)bset, type, pos, s); -} - -__isl_give isl_set *isl_set_set_dim_name(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, const char *s) -{ - return (isl_set *)isl_map_set_dim_name((isl_map *)set, type, pos, s); -} - -int isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); -} - -int isl_basic_set_is_rational(__isl_keep isl_basic_set *bset) -{ - return isl_basic_map_is_rational(bset); -} - -static struct isl_basic_map *basic_map_init(struct isl_ctx *ctx, - struct isl_basic_map *bmap, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - int i; - size_t row_size = 1 + isl_dim_total(bmap->dim) + extra; - - bmap->ctx = ctx; - isl_ctx_ref(ctx); - - bmap->block = isl_blk_alloc(ctx, (n_ineq + n_eq) * row_size); - if (isl_blk_is_error(bmap->block)) - goto error; - - bmap->ineq = isl_alloc_array(ctx, isl_int *, n_ineq + n_eq); - if (!bmap->ineq) - goto error; - - if (extra == 0) { - bmap->block2 = isl_blk_empty(); - bmap->div = NULL; - } else { - bmap->block2 = isl_blk_alloc(ctx, extra * (1 + row_size)); - if (isl_blk_is_error(bmap->block2)) - goto error; - - bmap->div = isl_alloc_array(ctx, isl_int *, extra); - if (!bmap->div) - goto error; - } - - for (i = 0; i < n_ineq + n_eq; ++i) - bmap->ineq[i] = bmap->block.data + i * row_size; - - for (i = 0; i < extra; ++i) - bmap->div[i] = bmap->block2.data + i * (1 + row_size); - - bmap->ref = 1; - bmap->flags = 0; - bmap->c_size = n_eq + n_ineq; - bmap->eq = bmap->ineq + n_ineq; - bmap->extra = extra; - bmap->n_eq = 0; - bmap->n_ineq = 0; - bmap->n_div = 0; - bmap->sample = NULL; - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc(ctx, nparam, 0, dim, extra, n_eq, n_ineq); - return (struct isl_basic_set *)bmap; -} - -struct isl_basic_set *isl_basic_set_alloc_dim(struct isl_dim *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - if (!dim) - return NULL; - isl_assert(dim->ctx, dim->n_in == 0, goto error); - bmap = isl_basic_map_alloc_dim(dim, extra, n_eq, n_ineq); - return (struct isl_basic_set *)bmap; -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_basic_map *isl_basic_map_alloc_dim(struct isl_dim *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - - if (!dim) - return NULL; - bmap = isl_calloc_type(dim->ctx, struct isl_basic_map); - if (!bmap) - goto error; - bmap->dim = dim; - - return basic_map_init(dim->ctx, bmap, extra, n_eq, n_ineq); -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_basic_map *isl_basic_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - struct isl_dim *dim; - - dim = isl_dim_alloc(ctx, nparam, in, out); - if (!dim) - return NULL; - - bmap = isl_basic_map_alloc_dim(dim, extra, n_eq, n_ineq); - return bmap; -} - -static void dup_constraints( - struct isl_basic_map *dst, struct isl_basic_map *src) -{ - int i; - unsigned total = isl_basic_map_total_dim(src); - - for (i = 0; i < src->n_eq; ++i) { - int j = isl_basic_map_alloc_equality(dst); - isl_seq_cpy(dst->eq[j], src->eq[i], 1+total); - } - - for (i = 0; i < src->n_ineq; ++i) { - int j = isl_basic_map_alloc_inequality(dst); - isl_seq_cpy(dst->ineq[j], src->ineq[i], 1+total); - } - - for (i = 0; i < src->n_div; ++i) { - int j = isl_basic_map_alloc_div(dst); - isl_seq_cpy(dst->div[j], src->div[i], 1+1+total); - } - ISL_F_SET(dst, ISL_BASIC_SET_FINAL); -} - -struct isl_basic_map *isl_basic_map_dup(struct isl_basic_map *bmap) -{ - struct isl_basic_map *dup; - - if (!bmap) - return NULL; - dup = isl_basic_map_alloc_dim(isl_dim_copy(bmap->dim), - bmap->n_div, bmap->n_eq, bmap->n_ineq); - if (!dup) - return NULL; - dup_constraints(dup, bmap); - dup->flags = bmap->flags; - dup->sample = isl_vec_copy(bmap->sample); - return dup; -} - -struct isl_basic_set *isl_basic_set_dup(struct isl_basic_set *bset) -{ - struct isl_basic_map *dup; - - dup = isl_basic_map_dup((struct isl_basic_map *)bset); - return (struct isl_basic_set *)dup; -} - -struct isl_basic_set *isl_basic_set_copy(struct isl_basic_set *bset) -{ - if (!bset) - return NULL; - - if (ISL_F_ISSET(bset, ISL_BASIC_SET_FINAL)) { - bset->ref++; - return bset; - } - return isl_basic_set_dup(bset); -} - -struct isl_set *isl_set_copy(struct isl_set *set) -{ - if (!set) - return NULL; - - set->ref++; - return set; -} - -struct isl_basic_map *isl_basic_map_copy(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_SET_FINAL)) { - bmap->ref++; - return bmap; - } - bmap = isl_basic_map_dup(bmap); - if (bmap) - ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); - return bmap; -} - -struct isl_map *isl_map_copy(struct isl_map *map) -{ - if (!map) - return NULL; - - map->ref++; - return map; -} - -void isl_basic_map_free(struct isl_basic_map *bmap) -{ - if (!bmap) - return; - - if (--bmap->ref > 0) - return; - - isl_ctx_deref(bmap->ctx); - free(bmap->div); - isl_blk_free(bmap->ctx, bmap->block2); - free(bmap->ineq); - isl_blk_free(bmap->ctx, bmap->block); - isl_vec_free(bmap->sample); - isl_dim_free(bmap->dim); - free(bmap); -} - -void isl_basic_set_free(struct isl_basic_set *bset) -{ - isl_basic_map_free((struct isl_basic_map *)bset); -} - -static int room_for_con(struct isl_basic_map *bmap, unsigned n) -{ - return bmap->n_eq + bmap->n_ineq + n <= bmap->c_size; -} - -int isl_basic_map_alloc_equality(struct isl_basic_map *bmap) -{ - struct isl_ctx *ctx; - if (!bmap) - return -1; - ctx = bmap->ctx; - isl_assert(ctx, room_for_con(bmap, 1), return -1); - isl_assert(ctx, (bmap->eq - bmap->ineq) + bmap->n_eq <= bmap->c_size, - return -1); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_ALL_EQUALITIES); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - if ((bmap->eq - bmap->ineq) + bmap->n_eq == bmap->c_size) { - isl_int *t; - int j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - return -1; - t = bmap->ineq[j]; - bmap->ineq[j] = bmap->ineq[bmap->n_ineq - 1]; - bmap->ineq[bmap->n_ineq - 1] = bmap->eq[-1]; - bmap->eq[-1] = t; - bmap->n_eq++; - bmap->n_ineq--; - bmap->eq--; - return 0; - } - isl_seq_clr(bmap->eq[bmap->n_eq] + 1 + isl_basic_map_total_dim(bmap), - bmap->extra - bmap->n_div); - return bmap->n_eq++; -} - -int isl_basic_set_alloc_equality(struct isl_basic_set *bset) -{ - return isl_basic_map_alloc_equality((struct isl_basic_map *)bset); -} - -int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, n <= bmap->n_eq, return -1); - bmap->n_eq -= n; - return 0; -} - -int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_equality((struct isl_basic_map *)bset, n); -} - -int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos) -{ - isl_int *t; - if (!bmap) - return -1; - isl_assert(bmap->ctx, pos < bmap->n_eq, return -1); - - if (pos != bmap->n_eq - 1) { - t = bmap->eq[pos]; - bmap->eq[pos] = bmap->eq[bmap->n_eq - 1]; - bmap->eq[bmap->n_eq - 1] = t; - } - bmap->n_eq--; - return 0; -} - -int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos) -{ - return isl_basic_map_drop_equality((struct isl_basic_map *)bset, pos); -} - -void isl_basic_map_inequality_to_equality( - struct isl_basic_map *bmap, unsigned pos) -{ - isl_int *t; - - t = bmap->ineq[pos]; - bmap->ineq[pos] = bmap->ineq[bmap->n_ineq - 1]; - bmap->ineq[bmap->n_ineq - 1] = bmap->eq[-1]; - bmap->eq[-1] = t; - bmap->n_eq++; - bmap->n_ineq--; - bmap->eq--; - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - ISL_F_CLR(bmap, ISL_BASIC_MAP_ALL_EQUALITIES); -} - -static int room_for_ineq(struct isl_basic_map *bmap, unsigned n) -{ - return bmap->n_ineq + n <= bmap->eq - bmap->ineq; -} - -int isl_basic_map_alloc_inequality(struct isl_basic_map *bmap) -{ - struct isl_ctx *ctx; - if (!bmap) - return -1; - ctx = bmap->ctx; - isl_assert(ctx, room_for_ineq(bmap, 1), return -1); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - ISL_F_CLR(bmap, ISL_BASIC_MAP_ALL_EQUALITIES); - isl_seq_clr(bmap->ineq[bmap->n_ineq] + - 1 + isl_basic_map_total_dim(bmap), - bmap->extra - bmap->n_div); - return bmap->n_ineq++; -} - -int isl_basic_set_alloc_inequality(struct isl_basic_set *bset) -{ - return isl_basic_map_alloc_inequality((struct isl_basic_map *)bset); -} - -int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, n <= bmap->n_ineq, return -1); - bmap->n_ineq -= n; - return 0; -} - -int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_inequality((struct isl_basic_map *)bset, n); -} - -int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos) -{ - isl_int *t; - if (!bmap) - return -1; - isl_assert(bmap->ctx, pos < bmap->n_ineq, return -1); - - if (pos != bmap->n_ineq - 1) { - t = bmap->ineq[pos]; - bmap->ineq[pos] = bmap->ineq[bmap->n_ineq - 1]; - bmap->ineq[bmap->n_ineq - 1] = t; - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } - bmap->n_ineq--; - return 0; -} - -int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos) -{ - return isl_basic_map_drop_inequality((struct isl_basic_map *)bset, pos); -} - -__isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap, - isl_int *eq) -{ - int k; - - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - if (!bmap) - return NULL; - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], eq, 1 + isl_basic_map_total_dim(bmap)); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset, - isl_int *eq) -{ - return (isl_basic_set *) - isl_basic_map_add_eq((isl_basic_map *)bset, eq); -} - -__isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap, - isl_int *ineq) -{ - int k; - - bmap = isl_basic_map_extend_constraints(bmap, 0, 1); - if (!bmap) - return NULL; - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], ineq, 1 + isl_basic_map_total_dim(bmap)); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset, - isl_int *ineq) -{ - return (isl_basic_set *) - isl_basic_map_add_ineq((isl_basic_map *)bset, ineq); -} - -int isl_basic_map_alloc_div(struct isl_basic_map *bmap) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, bmap->n_div < bmap->extra, return -1); - isl_seq_clr(bmap->div[bmap->n_div] + - 1 + 1 + isl_basic_map_total_dim(bmap), - bmap->extra - bmap->n_div); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - return bmap->n_div++; -} - -int isl_basic_set_alloc_div(struct isl_basic_set *bset) -{ - return isl_basic_map_alloc_div((struct isl_basic_map *)bset); -} - -int isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, n <= bmap->n_div, return -1); - bmap->n_div -= n; - return 0; -} - -int isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_div((struct isl_basic_map *)bset, n); -} - -/* Copy constraint from src to dst, putting the vars of src at offset - * dim_off in dst and the divs of src at offset div_off in dst. - * If both sets are actually map, then dim_off applies to the input - * variables. - */ -static void copy_constraint(struct isl_basic_map *dst_map, isl_int *dst, - struct isl_basic_map *src_map, isl_int *src, - unsigned in_off, unsigned out_off, unsigned div_off) -{ - unsigned src_nparam = isl_basic_map_n_param(src_map); - unsigned dst_nparam = isl_basic_map_n_param(dst_map); - unsigned src_in = isl_basic_map_n_in(src_map); - unsigned dst_in = isl_basic_map_n_in(dst_map); - unsigned src_out = isl_basic_map_n_out(src_map); - unsigned dst_out = isl_basic_map_n_out(dst_map); - isl_int_set(dst[0], src[0]); - isl_seq_cpy(dst+1, src+1, isl_min(dst_nparam, src_nparam)); - if (dst_nparam > src_nparam) - isl_seq_clr(dst+1+src_nparam, - dst_nparam - src_nparam); - isl_seq_clr(dst+1+dst_nparam, in_off); - isl_seq_cpy(dst+1+dst_nparam+in_off, - src+1+src_nparam, - isl_min(dst_in-in_off, src_in)); - if (dst_in-in_off > src_in) - isl_seq_clr(dst+1+dst_nparam+in_off+src_in, - dst_in - in_off - src_in); - isl_seq_clr(dst+1+dst_nparam+dst_in, out_off); - isl_seq_cpy(dst+1+dst_nparam+dst_in+out_off, - src+1+src_nparam+src_in, - isl_min(dst_out-out_off, src_out)); - if (dst_out-out_off > src_out) - isl_seq_clr(dst+1+dst_nparam+dst_in+out_off+src_out, - dst_out - out_off - src_out); - isl_seq_clr(dst+1+dst_nparam+dst_in+dst_out, div_off); - isl_seq_cpy(dst+1+dst_nparam+dst_in+dst_out+div_off, - src+1+src_nparam+src_in+src_out, - isl_min(dst_map->extra-div_off, src_map->n_div)); - if (dst_map->n_div-div_off > src_map->n_div) - isl_seq_clr(dst+1+dst_nparam+dst_in+dst_out+ - div_off+src_map->n_div, - dst_map->n_div - div_off - src_map->n_div); -} - -static void copy_div(struct isl_basic_map *dst_map, isl_int *dst, - struct isl_basic_map *src_map, isl_int *src, - unsigned in_off, unsigned out_off, unsigned div_off) -{ - isl_int_set(dst[0], src[0]); - copy_constraint(dst_map, dst+1, src_map, src+1, in_off, out_off, div_off); -} - -static struct isl_basic_map *add_constraints(struct isl_basic_map *bmap1, - struct isl_basic_map *bmap2, unsigned i_pos, unsigned o_pos) -{ - int i; - unsigned div_off; - - if (!bmap1 || !bmap2) - goto error; - - div_off = bmap1->n_div; - - for (i = 0; i < bmap2->n_eq; ++i) { - int i1 = isl_basic_map_alloc_equality(bmap1); - if (i1 < 0) - goto error; - copy_constraint(bmap1, bmap1->eq[i1], bmap2, bmap2->eq[i], - i_pos, o_pos, div_off); - } - - for (i = 0; i < bmap2->n_ineq; ++i) { - int i1 = isl_basic_map_alloc_inequality(bmap1); - if (i1 < 0) - goto error; - copy_constraint(bmap1, bmap1->ineq[i1], bmap2, bmap2->ineq[i], - i_pos, o_pos, div_off); - } - - for (i = 0; i < bmap2->n_div; ++i) { - int i1 = isl_basic_map_alloc_div(bmap1); - if (i1 < 0) - goto error; - copy_div(bmap1, bmap1->div[i1], bmap2, bmap2->div[i], - i_pos, o_pos, div_off); - } - - isl_basic_map_free(bmap2); - - return bmap1; - -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, unsigned pos) -{ - return (struct isl_basic_set *) - add_constraints((struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2, 0, pos); -} - -struct isl_basic_map *isl_basic_map_extend_dim(struct isl_basic_map *base, - struct isl_dim *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *ext; - unsigned flags; - int dims_ok; - - if (!dim) - goto error; - - if (!base) - goto error; - - dims_ok = isl_dim_equal(base->dim, dim) && - base->extra >= base->n_div + extra; - - if (dims_ok && room_for_con(base, n_eq + n_ineq) && - room_for_ineq(base, n_ineq)) { - isl_dim_free(dim); - return base; - } - - isl_assert(base->ctx, base->dim->nparam <= dim->nparam, goto error); - isl_assert(base->ctx, base->dim->n_in <= dim->n_in, goto error); - isl_assert(base->ctx, base->dim->n_out <= dim->n_out, goto error); - extra += base->extra; - n_eq += base->n_eq; - n_ineq += base->n_ineq; - - ext = isl_basic_map_alloc_dim(dim, extra, n_eq, n_ineq); - dim = NULL; - if (!ext) - goto error; - - if (dims_ok) - ext->sample = isl_vec_copy(base->sample); - flags = base->flags; - ext = add_constraints(ext, base, 0, 0); - if (ext) { - ext->flags = flags; - ISL_F_CLR(ext, ISL_BASIC_SET_FINAL); - } - - return ext; - -error: - isl_dim_free(dim); - isl_basic_map_free(base); - return NULL; -} - -struct isl_basic_set *isl_basic_set_extend_dim(struct isl_basic_set *base, - struct isl_dim *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - return (struct isl_basic_set *) - isl_basic_map_extend_dim((struct isl_basic_map *)base, dim, - extra, n_eq, n_ineq); -} - -struct isl_basic_map *isl_basic_map_extend_constraints( - struct isl_basic_map *base, unsigned n_eq, unsigned n_ineq) -{ - if (!base) - return NULL; - return isl_basic_map_extend_dim(base, isl_dim_copy(base->dim), - 0, n_eq, n_ineq); -} - -struct isl_basic_map *isl_basic_map_extend(struct isl_basic_map *base, - unsigned nparam, unsigned n_in, unsigned n_out, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - struct isl_dim *dim; - - if (!base) - return NULL; - dim = isl_dim_alloc(base->ctx, nparam, n_in, n_out); - if (!dim) - goto error; - - bmap = isl_basic_map_extend_dim(base, dim, extra, n_eq, n_ineq); - return bmap; -error: - isl_basic_map_free(base); - return NULL; -} - -struct isl_basic_set *isl_basic_set_extend(struct isl_basic_set *base, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - return (struct isl_basic_set *) - isl_basic_map_extend((struct isl_basic_map *)base, - nparam, 0, dim, extra, n_eq, n_ineq); -} - -struct isl_basic_set *isl_basic_set_extend_constraints( - struct isl_basic_set *base, unsigned n_eq, unsigned n_ineq) -{ - return (struct isl_basic_set *) - isl_basic_map_extend_constraints((struct isl_basic_map *)base, - n_eq, n_ineq); -} - -struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_cow((struct isl_basic_map *)bset); -} - -struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (bmap->ref > 1) { - bmap->ref--; - bmap = isl_basic_map_dup(bmap); - } - if (bmap) - ISL_F_CLR(bmap, ISL_BASIC_SET_FINAL); - return bmap; -} - -struct isl_set *isl_set_cow(struct isl_set *set) -{ - if (!set) - return NULL; - - if (set->ref == 1) - return set; - set->ref--; - return isl_set_dup(set); -} - -struct isl_map *isl_map_cow(struct isl_map *map) -{ - if (!map) - return NULL; - - if (map->ref == 1) - return map; - map->ref--; - return isl_map_dup(map); -} - -static void swap_vars(struct isl_blk blk, isl_int *a, - unsigned a_len, unsigned b_len) -{ - isl_seq_cpy(blk.data, a+a_len, b_len); - isl_seq_cpy(blk.data+b_len, a, a_len); - isl_seq_cpy(a, blk.data, b_len+a_len); -} - -static __isl_give isl_basic_map *isl_basic_map_swap_vars( - __isl_take isl_basic_map *bmap, unsigned pos, unsigned n1, unsigned n2) -{ - int i; - struct isl_blk blk; - - if (!bmap) - goto error; - - isl_assert(bmap->ctx, - pos + n1 + n2 <= 1 + isl_basic_map_total_dim(bmap), goto error); - - if (n1 == 0 || n2 == 0) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - blk = isl_blk_alloc(bmap->ctx, n1 + n2); - if (isl_blk_is_error(blk)) - goto error; - - for (i = 0; i < bmap->n_eq; ++i) - swap_vars(blk, - bmap->eq[i] + pos, n1, n2); - - for (i = 0; i < bmap->n_ineq; ++i) - swap_vars(blk, - bmap->ineq[i] + pos, n1, n2); - - for (i = 0; i < bmap->n_div; ++i) - swap_vars(blk, - bmap->div[i]+1 + pos, n1, n2); - - isl_blk_free(bmap->ctx, blk); - - ISL_F_CLR(bmap, ISL_BASIC_SET_NORMALIZED); - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_set *isl_basic_set_swap_vars( - __isl_take isl_basic_set *bset, unsigned n) -{ - unsigned dim; - unsigned nparam; - - nparam = isl_basic_set_n_param(bset); - dim = isl_basic_set_n_dim(bset); - isl_assert(bset->ctx, n <= dim, goto error); - - return isl_basic_map_swap_vars(bset, 1 + nparam, n, dim - n); -error: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap) -{ - int i = 0; - unsigned total; - if (!bmap) - goto error; - total = isl_basic_map_total_dim(bmap); - isl_basic_map_free_div(bmap, bmap->n_div); - isl_basic_map_free_inequality(bmap, bmap->n_ineq); - if (bmap->n_eq > 0) - isl_basic_map_free_equality(bmap, bmap->n_eq-1); - else { - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - goto error; - } - isl_int_set_si(bmap->eq[i][0], 1); - isl_seq_clr(bmap->eq[i]+1, total); - ISL_F_SET(bmap, ISL_BASIC_MAP_EMPTY); - isl_vec_free(bmap->sample); - bmap->sample = NULL; - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_set_to_empty((struct isl_basic_map *)bset); -} - -void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b) -{ - int i; - unsigned off = isl_dim_total(bmap->dim); - isl_int *t = bmap->div[a]; - bmap->div[a] = bmap->div[b]; - bmap->div[b] = t; - - for (i = 0; i < bmap->n_eq; ++i) - isl_int_swap(bmap->eq[i][1+off+a], bmap->eq[i][1+off+b]); - - for (i = 0; i < bmap->n_ineq; ++i) - isl_int_swap(bmap->ineq[i][1+off+a], bmap->ineq[i][1+off+b]); - - for (i = 0; i < bmap->n_div; ++i) - isl_int_swap(bmap->div[i][1+1+off+a], bmap->div[i][1+1+off+b]); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return NULL; - if (n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - first += pos(map->dim, type) - 1; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_eliminate_vars(map->p[i], first, n); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_eliminate((isl_map *)set, type, first, n); -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_set *isl_set_eliminate_dims(__isl_take isl_set *set, - unsigned first, unsigned n) -{ - return isl_set_eliminate(set, isl_dim_set, first, n); -} - -__isl_give isl_basic_map *isl_basic_map_remove_divs( - __isl_take isl_basic_map *bmap) -{ - bmap = isl_basic_map_eliminate_vars(bmap, isl_dim_total(bmap->dim), - bmap->n_div); - if (!bmap) - return NULL; - bmap->n_div = 0; - return isl_basic_map_finalize(bmap); -} - -__isl_give isl_basic_set *isl_basic_set_remove_divs( - __isl_take isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_remove_divs( - (struct isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_remove_divs(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_remove_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set) -{ - return isl_map_remove_divs(set); -} - -struct isl_basic_map *isl_basic_map_remove_dims(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - if (!bmap) - return NULL; - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - if (n == 0) - return bmap; - bmap = isl_basic_map_eliminate_vars(bmap, - isl_basic_map_offset(bmap, type) - 1 + first, n); - if (!bmap) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY) && type == isl_dim_div) - return bmap; - bmap = isl_basic_map_drop(bmap, type, first, n); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Return true if the definition of the given div (recursively) involves - * any of the given variables. - */ -static int div_involves_vars(__isl_keep isl_basic_map *bmap, int div, - unsigned first, unsigned n) -{ - int i; - unsigned div_offset = isl_basic_map_offset(bmap, isl_dim_div); - - if (isl_int_is_zero(bmap->div[div][0])) - return 0; - if (isl_seq_first_non_zero(bmap->div[div] + 1 + first, n) >= 0) - return 1; - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (isl_int_is_zero(bmap->div[div][1 + div_offset + i])) - continue; - if (div_involves_vars(bmap, i, first, n)) - return 1; - } - - return 0; -} - -/* Remove all divs (recursively) involving any of the given dimensions - * in their definitions. - */ -__isl_give isl_basic_map *isl_basic_map_remove_divs_involving_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!bmap) - return NULL; - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - first += isl_basic_map_offset(bmap, type); - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (!div_involves_vars(bmap, i, first, n)) - continue; - bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, i, 1); - if (!bmap) - return NULL; - i = bmap->n_div; - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_remove_divs_involving_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_remove_divs_involving_dims(map->p[i], - type, first, n); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_divs_involving_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_remove_divs_involving_dims((isl_map *)set, - type, first, n); -} - -int isl_basic_set_involves_dims(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!bset) - return -1; - - if (first + n > isl_basic_set_dim(bset, type)) - isl_die(bset->ctx, isl_error_invalid, - "index out of bounds", return -1); - - first += isl_basic_set_offset(bset, type); - for (i = 0; i < bset->n_eq; ++i) - if (isl_seq_first_non_zero(bset->eq[i] + first, n) >= 0) - return 1; - for (i = 0; i < bset->n_ineq; ++i) - if (isl_seq_first_non_zero(bset->ineq[i] + first, n) >= 0) - return 1; - - return 0; -} - -int isl_set_involves_dims(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!set) - return -1; - - if (first + n > isl_set_dim(set, type)) - isl_die(set->ctx, isl_error_invalid, - "index out of bounds", return -1); - - for (i = 0; i < set->n; ++i) { - int involves = isl_basic_set_involves_dims(set->p[i], - type, first, n); - if (involves < 0 || !involves) - return involves; - } - - return 1; -} - -/* Return true if the definition of the given div is unknown or depends - * on unknown divs. - */ -static int div_is_unknown(__isl_keep isl_basic_map *bmap, int div) -{ - int i; - unsigned div_offset = isl_basic_map_offset(bmap, isl_dim_div); - - if (isl_int_is_zero(bmap->div[div][0])) - return 1; - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (isl_int_is_zero(bmap->div[div][1 + div_offset + i])) - continue; - if (div_is_unknown(bmap, i)) - return 1; - } - - return 0; -} - -/* Remove all divs that are unknown or defined in terms of unknown divs. - */ -__isl_give isl_basic_map *isl_basic_map_remove_unknown_divs( - __isl_take isl_basic_map *bmap) -{ - int i; - - if (!bmap) - return NULL; - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (!div_is_unknown(bmap, i)) - continue; - bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, i, 1); - } - - return bmap; -} - -__isl_give isl_map *isl_map_remove_unknown_divs(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_remove_unknown_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_unknown_divs(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_remove_unknown_divs((isl_map *)set); -} - -__isl_give isl_basic_set *isl_basic_set_remove_dims( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_basic_set *) - isl_basic_map_remove_dims((isl_basic_map *)bset, type, first, n); -} - -struct isl_map *isl_map_remove_dims(struct isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_eliminate_vars(map->p[i], - isl_basic_map_offset(map->p[i], type) - 1 + first, n); - if (!map->p[i]) - goto error; - } - map = isl_map_drop(map, type, first, n); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_remove_dims((isl_map *)bset, type, first, n); -} - -/* Project out n inputs starting at first using Fourier-Motzkin */ -struct isl_map *isl_map_remove_inputs(struct isl_map *map, - unsigned first, unsigned n) -{ - return isl_map_remove_dims(map, isl_dim_in, first, n); -} - -static void dump_term(struct isl_basic_map *bmap, - isl_int c, int pos, FILE *out) -{ - const char *name; - unsigned in = isl_basic_map_n_in(bmap); - unsigned dim = in + isl_basic_map_n_out(bmap); - unsigned nparam = isl_basic_map_n_param(bmap); - if (!pos) - isl_int_print(out, c, 0); - else { - if (!isl_int_is_one(c)) - isl_int_print(out, c, 0); - if (pos < 1 + nparam) { - name = isl_dim_get_name(bmap->dim, - isl_dim_param, pos - 1); - if (name) - fprintf(out, "%s", name); - else - fprintf(out, "p%d", pos - 1); - } else if (pos < 1 + nparam + in) - fprintf(out, "i%d", pos - 1 - nparam); - else if (pos < 1 + nparam + dim) - fprintf(out, "o%d", pos - 1 - nparam - in); - else - fprintf(out, "e%d", pos - 1 - nparam - dim); - } -} - -static void dump_constraint_sign(struct isl_basic_map *bmap, isl_int *c, - int sign, FILE *out) -{ - int i; - int first; - unsigned len = 1 + isl_basic_map_total_dim(bmap); - isl_int v; - - isl_int_init(v); - for (i = 0, first = 1; i < len; ++i) { - if (isl_int_sgn(c[i]) * sign <= 0) - continue; - if (!first) - fprintf(out, " + "); - first = 0; - isl_int_abs(v, c[i]); - dump_term(bmap, v, i, out); - } - isl_int_clear(v); - if (first) - fprintf(out, "0"); -} - -static void dump_constraint(struct isl_basic_map *bmap, isl_int *c, - const char *op, FILE *out, int indent) -{ - int i; - - fprintf(out, "%*s", indent, ""); - - dump_constraint_sign(bmap, c, 1, out); - fprintf(out, " %s ", op); - dump_constraint_sign(bmap, c, -1, out); - - fprintf(out, "\n"); - - for (i = bmap->n_div; i < bmap->extra; ++i) { - if (isl_int_is_zero(c[1+isl_dim_total(bmap->dim)+i])) - continue; - fprintf(out, "%*s", indent, ""); - fprintf(out, "ERROR: unused div coefficient not zero\n"); - abort(); - } -} - -static void dump_constraints(struct isl_basic_map *bmap, - isl_int **c, unsigned n, - const char *op, FILE *out, int indent) -{ - int i; - - for (i = 0; i < n; ++i) - dump_constraint(bmap, c[i], op, out, indent); -} - -static void dump_affine(struct isl_basic_map *bmap, isl_int *exp, FILE *out) -{ - int j; - int first = 1; - unsigned total = isl_basic_map_total_dim(bmap); - - for (j = 0; j < 1 + total; ++j) { - if (isl_int_is_zero(exp[j])) - continue; - if (!first && isl_int_is_pos(exp[j])) - fprintf(out, "+"); - dump_term(bmap, exp[j], j, out); - first = 0; - } -} - -static void dump(struct isl_basic_map *bmap, FILE *out, int indent) -{ - int i; - - dump_constraints(bmap, bmap->eq, bmap->n_eq, "=", out, indent); - dump_constraints(bmap, bmap->ineq, bmap->n_ineq, ">=", out, indent); - - for (i = 0; i < bmap->n_div; ++i) { - fprintf(out, "%*s", indent, ""); - fprintf(out, "e%d = [(", i); - dump_affine(bmap, bmap->div[i]+1, out); - fprintf(out, ")/"); - isl_int_print(out, bmap->div[i][0], 0); - fprintf(out, "]\n"); - } -} - -void isl_basic_set_print_internal(struct isl_basic_set *bset, - FILE *out, int indent) -{ - if (!bset) { - fprintf(out, "null basic set\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, nparam: %d, dim: %d, extra: %d, flags: %x\n", - bset->ref, bset->dim->nparam, bset->dim->n_out, - bset->extra, bset->flags); - dump((struct isl_basic_map *)bset, out, indent); -} - -void isl_basic_map_print_internal(struct isl_basic_map *bmap, - FILE *out, int indent) -{ - if (!bmap) { - fprintf(out, "null basic map\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, nparam: %d, in: %d, out: %d, extra: %d, " - "flags: %x, n_name: %d\n", - bmap->ref, - bmap->dim->nparam, bmap->dim->n_in, bmap->dim->n_out, - bmap->extra, bmap->flags, bmap->dim->n_name); - dump(bmap, out, indent); -} - -int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos) -{ - unsigned total; - if (!bmap) - return -1; - total = isl_basic_map_total_dim(bmap); - isl_assert(bmap->ctx, pos < bmap->n_ineq, return -1); - isl_seq_neg(bmap->ineq[pos], bmap->ineq[pos], 1 + total); - isl_int_sub_ui(bmap->ineq[pos][0], bmap->ineq[pos][0], 1); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - return 0; -} - -struct isl_set *isl_set_alloc_dim(struct isl_dim *dim, int n, unsigned flags) -{ - struct isl_set *set; - - if (!dim) - return NULL; - isl_assert(dim->ctx, dim->n_in == 0, goto error); - isl_assert(dim->ctx, n >= 0, goto error); - set = isl_alloc(dim->ctx, struct isl_set, - sizeof(struct isl_set) + - (n - 1) * sizeof(struct isl_basic_set *)); - if (!set) - goto error; - - set->ctx = dim->ctx; - isl_ctx_ref(set->ctx); - set->ref = 1; - set->size = n; - set->n = 0; - set->dim = dim; - set->flags = flags; - return set; -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_set *isl_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, int n, unsigned flags) -{ - struct isl_set *set; - struct isl_dim *dims; - - dims = isl_dim_alloc(ctx, nparam, 0, dim); - if (!dims) - return NULL; - - set = isl_set_alloc_dim(dims, n, flags); - return set; -} - -/* Make sure "map" has room for at least "n" more basic maps. - */ -struct isl_map *isl_map_grow(struct isl_map *map, int n) -{ - int i; - struct isl_map *grown = NULL; - - if (!map) - return NULL; - isl_assert(map->ctx, n >= 0, goto error); - if (map->n + n <= map->size) - return map; - grown = isl_map_alloc_dim(isl_map_get_dim(map), map->n + n, map->flags); - if (!grown) - goto error; - for (i = 0; i < map->n; ++i) { - grown->p[i] = isl_basic_map_copy(map->p[i]); - if (!grown->p[i]) - goto error; - grown->n++; - } - isl_map_free(map); - return grown; -error: - isl_map_free(grown); - isl_map_free(map); - return NULL; -} - -/* Make sure "set" has room for at least "n" more basic sets. - */ -struct isl_set *isl_set_grow(struct isl_set *set, int n) -{ - return (struct isl_set *)isl_map_grow((struct isl_map *)set, n); -} - -struct isl_set *isl_set_dup(struct isl_set *set) -{ - int i; - struct isl_set *dup; - - if (!set) - return NULL; - - dup = isl_set_alloc_dim(isl_dim_copy(set->dim), set->n, set->flags); - if (!dup) - return NULL; - for (i = 0; i < set->n; ++i) - dup = isl_set_add_basic_set(dup, isl_basic_set_copy(set->p[i])); - return dup; -} - -struct isl_set *isl_set_from_basic_set(struct isl_basic_set *bset) -{ - return isl_map_from_basic_map(bset); -} - -struct isl_map *isl_map_from_basic_map(struct isl_basic_map *bmap) -{ - struct isl_map *map; - - if (!bmap) - return NULL; - - map = isl_map_alloc_dim(isl_dim_copy(bmap->dim), 1, ISL_MAP_DISJOINT); - return isl_map_add_basic_map(map, bmap); -} - -__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *bset) -{ - return (struct isl_set *)isl_map_add_basic_map((struct isl_map *)set, - (struct isl_basic_map *)bset); -} - -void isl_set_free(struct isl_set *set) -{ - int i; - - if (!set) - return; - - if (--set->ref > 0) - return; - - isl_ctx_deref(set->ctx); - for (i = 0; i < set->n; ++i) - isl_basic_set_free(set->p[i]); - isl_dim_free(set->dim); - free(set); -} - -void isl_set_print_internal(struct isl_set *set, FILE *out, int indent) -{ - int i; - - if (!set) { - fprintf(out, "null set\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, n: %d, nparam: %d, dim: %d, flags: %x\n", - set->ref, set->n, set->dim->nparam, set->dim->n_out, - set->flags); - for (i = 0; i < set->n; ++i) { - fprintf(out, "%*s", indent, ""); - fprintf(out, "basic set %d:\n", i); - isl_basic_set_print_internal(set->p[i], out, indent+4); - } -} - -void isl_map_print_internal(struct isl_map *map, FILE *out, int indent) -{ - int i; - - if (!map) { - fprintf(out, "null map\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, n: %d, nparam: %d, in: %d, out: %d, " - "flags: %x, n_name: %d\n", - map->ref, map->n, map->dim->nparam, map->dim->n_in, - map->dim->n_out, map->flags, map->dim->n_name); - for (i = 0; i < map->n; ++i) { - fprintf(out, "%*s", indent, ""); - fprintf(out, "basic map %d:\n", i); - isl_basic_map_print_internal(map->p[i], out, indent+4); - } -} - -struct isl_basic_map *isl_basic_map_intersect_domain( - struct isl_basic_map *bmap, struct isl_basic_set *bset) -{ - struct isl_basic_map *bmap_domain; - - if (!bmap || !bset) - goto error; - - isl_assert(bset->ctx, isl_dim_match(bmap->dim, isl_dim_param, - bset->dim, isl_dim_param), goto error); - - if (isl_dim_size(bset->dim, isl_dim_set) != 0) - isl_assert(bset->ctx, - isl_basic_map_compatible_domain(bmap, bset), goto error); - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), - bset->n_div, bset->n_eq, bset->n_ineq); - bmap_domain = isl_basic_map_from_domain(bset); - bmap = add_constraints(bmap, bmap_domain, 0, 0); - - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_map *isl_basic_map_intersect_range( - struct isl_basic_map *bmap, struct isl_basic_set *bset) -{ - struct isl_basic_map *bmap_range; - - if (!bmap || !bset) - goto error; - - isl_assert(bset->ctx, isl_dim_match(bmap->dim, isl_dim_param, - bset->dim, isl_dim_param), goto error); - - if (isl_dim_size(bset->dim, isl_dim_set) != 0) - isl_assert(bset->ctx, - isl_basic_map_compatible_range(bmap, bset), goto error); - - if (isl_basic_set_is_universe(bset)) { - isl_basic_set_free(bset); - return bmap; - } - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), - bset->n_div, bset->n_eq, bset->n_ineq); - bmap_range = isl_basic_map_from_basic_set(bset, isl_dim_copy(bset->dim)); - bmap = add_constraints(bmap, bmap_range, 0, 0); - - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - isl_basic_set_free(bset); - return NULL; -} - -int isl_basic_map_contains(struct isl_basic_map *bmap, struct isl_vec *vec) -{ - int i; - unsigned total; - isl_int s; - - total = 1 + isl_basic_map_total_dim(bmap); - if (total != vec->size) - return -1; - - isl_int_init(s); - - for (i = 0; i < bmap->n_eq; ++i) { - isl_seq_inner_product(vec->el, bmap->eq[i], total, &s); - if (!isl_int_is_zero(s)) { - isl_int_clear(s); - return 0; - } - } - - for (i = 0; i < bmap->n_ineq; ++i) { - isl_seq_inner_product(vec->el, bmap->ineq[i], total, &s); - if (isl_int_is_neg(s)) { - isl_int_clear(s); - return 0; - } - } - - isl_int_clear(s); - - return 1; -} - -int isl_basic_set_contains(struct isl_basic_set *bset, struct isl_vec *vec) -{ - return isl_basic_map_contains((struct isl_basic_map *)bset, vec); -} - -struct isl_basic_map *isl_basic_map_intersect( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - struct isl_vec *sample = NULL; - - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, isl_dim_match(bmap1->dim, isl_dim_param, - bmap2->dim, isl_dim_param), goto error); - if (isl_dim_total(bmap1->dim) == - isl_dim_size(bmap1->dim, isl_dim_param) && - isl_dim_total(bmap2->dim) != - isl_dim_size(bmap2->dim, isl_dim_param)) - return isl_basic_map_intersect(bmap2, bmap1); - - if (isl_dim_total(bmap2->dim) != - isl_dim_size(bmap2->dim, isl_dim_param)) - isl_assert(bmap1->ctx, - isl_dim_equal(bmap1->dim, bmap2->dim), goto error); - - if (bmap1->sample && - isl_basic_map_contains(bmap1, bmap1->sample) > 0 && - isl_basic_map_contains(bmap2, bmap1->sample) > 0) - sample = isl_vec_copy(bmap1->sample); - else if (bmap2->sample && - isl_basic_map_contains(bmap1, bmap2->sample) > 0 && - isl_basic_map_contains(bmap2, bmap2->sample) > 0) - sample = isl_vec_copy(bmap2->sample); - - bmap1 = isl_basic_map_cow(bmap1); - if (!bmap1) - goto error; - bmap1 = isl_basic_map_extend_dim(bmap1, isl_dim_copy(bmap1->dim), - bmap2->n_div, bmap2->n_eq, bmap2->n_ineq); - bmap1 = add_constraints(bmap1, bmap2, 0, 0); - - if (!bmap1) - isl_vec_free(sample); - else if (sample) { - isl_vec_free(bmap1->sample); - bmap1->sample = sample; - } - - bmap1 = isl_basic_map_simplify(bmap1); - return isl_basic_map_finalize(bmap1); -error: - if (sample) - isl_vec_free(sample); - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_basic_set *isl_basic_set_intersect( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - return (struct isl_basic_set *) - isl_basic_map_intersect( - (struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2); -} - -/* Special case of isl_map_intersect, where both map1 and map2 - * are convex, without any divs and such that either map1 or map2 - * contains a single constraint. This constraint is then simply - * added to the other map. - */ -static __isl_give isl_map *map_intersect_add_constraint( - __isl_take isl_map *map1, __isl_take isl_map *map2) -{ - isl_assert(map1->ctx, map1->n == 1, goto error); - isl_assert(map2->ctx, map1->n == 1, goto error); - isl_assert(map1->ctx, map1->p[0]->n_div == 0, goto error); - isl_assert(map2->ctx, map1->p[0]->n_div == 0, goto error); - - if (map2->p[0]->n_eq + map2->p[0]->n_ineq != 1) - return isl_map_intersect(map2, map1); - - isl_assert(map2->ctx, - map2->p[0]->n_eq + map2->p[0]->n_ineq == 1, goto error); - - map1 = isl_map_cow(map1); - if (!map1) - goto error; - if (isl_map_plain_is_empty(map1)) { - isl_map_free(map2); - return map1; - } - map1->p[0] = isl_basic_map_cow(map1->p[0]); - if (map2->p[0]->n_eq == 1) - map1->p[0] = isl_basic_map_add_eq(map1->p[0], map2->p[0]->eq[0]); - else - map1->p[0] = isl_basic_map_add_ineq(map1->p[0], - map2->p[0]->ineq[0]); - - map1->p[0] = isl_basic_map_simplify(map1->p[0]); - map1->p[0] = isl_basic_map_finalize(map1->p[0]); - if (!map1->p[0]) - goto error; - - if (isl_basic_map_plain_is_empty(map1->p[0])) { - isl_basic_map_free(map1->p[0]); - map1->n = 0; - } - - isl_map_free(map2); - - return map1; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -struct isl_map *isl_map_intersect(struct isl_map *map1, struct isl_map *map2) -{ - unsigned flags = 0; - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - if (isl_map_plain_is_empty(map1)) { - isl_map_free(map2); - return map1; - } - if (isl_map_plain_is_empty(map2)) { - isl_map_free(map1); - return map2; - } - - if (map1->n == 1 && map2->n == 1 && - map1->p[0]->n_div == 0 && map2->p[0]->n_div == 0 && - isl_dim_equal(map1->dim, map2->dim) && - (map1->p[0]->n_eq + map1->p[0]->n_ineq == 1 || - map2->p[0]->n_eq + map2->p[0]->n_ineq == 1)) - return map_intersect_add_constraint(map1, map2); - isl_assert(map1->ctx, isl_dim_match(map1->dim, isl_dim_param, - map2->dim, isl_dim_param), goto error); - if (isl_dim_total(map1->dim) == - isl_dim_size(map1->dim, isl_dim_param) && - isl_dim_total(map2->dim) != isl_dim_size(map2->dim, isl_dim_param)) - return isl_map_intersect(map2, map1); - - if (isl_dim_total(map2->dim) != isl_dim_size(map2->dim, isl_dim_param)) - isl_assert(map1->ctx, - isl_dim_equal(map1->dim, map2->dim), goto error); - - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT) && - ISL_F_ISSET(map2, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - result = isl_map_alloc_dim(isl_dim_copy(map1->dim), - map1->n * map2->n, flags); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - struct isl_basic_map *part; - part = isl_basic_map_intersect( - isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j])); - if (isl_basic_map_is_empty(part)) - isl_basic_map_free(part); - else - result = isl_map_add_basic_map(result, part); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -struct isl_set *isl_set_intersect(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_intersect((struct isl_map *)set1, - (struct isl_map *)set2); -} - -/* The current implementation of isl_map_intersect accepts intersections - * with parameter domains, so we can just call that for now. - */ -__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map, - __isl_take isl_set *params) -{ - return isl_map_intersect(map, params); -} - -__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, - __isl_take isl_set *params) -{ - return isl_map_intersect_params(set, params); -} - -struct isl_basic_map *isl_basic_map_reverse(struct isl_basic_map *bmap) -{ - struct isl_dim *dim; - struct isl_basic_set *bset; - unsigned in; - - if (!bmap) - return NULL; - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - dim = isl_dim_reverse(isl_dim_copy(bmap->dim)); - in = isl_basic_map_n_in(bmap); - bset = isl_basic_set_from_basic_map(bmap); - bset = isl_basic_set_swap_vars(bset, in); - return isl_basic_map_from_basic_set(bset, dim); -} - -__isl_give isl_basic_map *isl_basic_map_insert(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - struct isl_dim *res_dim; - struct isl_basic_map *res; - struct isl_dim_map *dim_map; - unsigned total, off; - enum isl_dim_type t; - - if (n == 0) - return bmap; - - if (!bmap) - return NULL; - - res_dim = isl_dim_insert(isl_basic_map_get_dim(bmap), type, pos, n); - - total = isl_basic_map_total_dim(bmap) + n; - dim_map = isl_dim_map_alloc(bmap->ctx, total); - off = 0; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - if (t != type) { - isl_dim_map_dim(dim_map, bmap->dim, t, off); - } else { - unsigned size = isl_basic_map_dim(bmap, t); - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, pos, off); - isl_dim_map_dim_range(dim_map, bmap->dim, t, - pos, size - pos, off + pos + n); - } - off += isl_dim_size(res_dim, t); - } - isl_dim_map_div(dim_map, bmap, off); - - res = isl_basic_map_alloc_dim(res_dim, - bmap->n_div, bmap->n_eq, bmap->n_ineq); - if (isl_basic_map_is_rational(bmap)) - res = isl_basic_map_set_rational(res); - res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - return isl_basic_map_finalize(res); -} - -__isl_give isl_basic_map *isl_basic_map_add(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned n) -{ - if (!bmap) - return NULL; - return isl_basic_map_insert(bmap, type, - isl_basic_map_dim(bmap, type), n); -} - -__isl_give isl_basic_set *isl_basic_set_add(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned n) -{ - if (!bset) - return NULL; - isl_assert(bset->ctx, type != isl_dim_in, goto error); - return (isl_basic_set *)isl_basic_map_add((isl_basic_map *)bset, type, n); -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_map *isl_map_insert(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - int i; - - if (n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_dim_insert(map->dim, type, pos, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_insert(map->p[i], type, pos, n); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_insert(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - return (isl_set *)isl_map_insert((isl_map *)set, type, pos, n); -} - -__isl_give isl_map *isl_map_add_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned n) -{ - if (!map) - return NULL; - return isl_map_insert(map, type, isl_map_dim(map, type), n); -} - -__isl_give isl_set *isl_set_add_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned n) -{ - if (!set) - return NULL; - isl_assert(set->ctx, type != isl_dim_in, goto error); - return (isl_set *)isl_map_add_dims((isl_map *)set, type, n); -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_move_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - struct isl_dim_map *dim_map; - struct isl_basic_map *res; - enum isl_dim_type t; - unsigned total, off; - - if (!bmap) - return NULL; - if (n == 0) - return bmap; - - isl_assert(bmap->ctx, src_pos + n <= isl_basic_map_dim(bmap, src_type), - goto error); - - if (dst_type == src_type && dst_pos == src_pos) - return bmap; - - isl_assert(bmap->ctx, dst_type != src_type, goto error); - - if (pos(bmap->dim, dst_type) + dst_pos == - pos(bmap->dim, src_type) + src_pos + - ((src_type < dst_type) ? n : 0)) { - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_dim_move(bmap->dim, dst_type, dst_pos, - src_type, src_pos, n); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; - } - - total = isl_basic_map_total_dim(bmap); - dim_map = isl_dim_map_alloc(bmap->ctx, total); - - off = 0; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - unsigned size = isl_dim_size(bmap->dim, t); - if (t == dst_type) { - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, dst_pos, off); - off += dst_pos; - isl_dim_map_dim_range(dim_map, bmap->dim, src_type, - src_pos, n, off); - off += n; - isl_dim_map_dim_range(dim_map, bmap->dim, t, - dst_pos, size - dst_pos, off); - off += size - dst_pos; - } else if (t == src_type) { - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, src_pos, off); - off += src_pos; - isl_dim_map_dim_range(dim_map, bmap->dim, t, - src_pos + n, size - src_pos - n, off); - off += size - src_pos - n; - } else { - isl_dim_map_dim(dim_map, bmap->dim, t, off); - off += size; - } - } - isl_dim_map_div(dim_map, bmap, off); - - res = isl_basic_map_alloc_dim(isl_basic_map_get_dim(bmap), - bmap->n_div, bmap->n_eq, bmap->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - - bmap->dim = isl_dim_move(bmap->dim, dst_type, dst_pos, - src_type, src_pos, n); - if (!bmap->dim) - goto error; - - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - bmap = isl_basic_map_gauss(bmap, NULL); - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_move_dims(__isl_take isl_basic_set *bset, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - return (isl_basic_set *)isl_basic_map_move_dims( - (isl_basic_map *)bset, dst_type, dst_pos, src_type, src_pos, n); -} - -__isl_give isl_set *isl_set_move_dims(__isl_take isl_set *set, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - if (!set) - return NULL; - isl_assert(set->ctx, dst_type != isl_dim_in, goto error); - return (isl_set *)isl_map_move_dims((isl_map *)set, dst_type, dst_pos, - src_type, src_pos, n); -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_map *isl_map_move_dims(__isl_take isl_map *map, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - if (!map) - return NULL; - if (n == 0) - return map; - - isl_assert(map->ctx, src_pos + n <= isl_map_dim(map, src_type), - goto error); - - if (dst_type == src_type && dst_pos == src_pos) - return map; - - isl_assert(map->ctx, dst_type != src_type, goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_dim_move(map->dim, dst_type, dst_pos, src_type, src_pos, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_move_dims(map->p[i], - dst_type, dst_pos, - src_type, src_pos, n); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Move the specified dimensions to the last columns right before - * the divs. Don't change the dimension specification of bmap. - * That's the responsibility of the caller. - */ -static __isl_give isl_basic_map *move_last(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - struct isl_dim_map *dim_map; - struct isl_basic_map *res; - enum isl_dim_type t; - unsigned total, off; - - if (!bmap) - return NULL; - if (pos(bmap->dim, type) + first + n == 1 + isl_dim_total(bmap->dim)) - return bmap; - - total = isl_basic_map_total_dim(bmap); - dim_map = isl_dim_map_alloc(bmap->ctx, total); - - off = 0; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - unsigned size = isl_dim_size(bmap->dim, t); - if (t == type) { - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, first, off); - off += first; - isl_dim_map_dim_range(dim_map, bmap->dim, t, - first, n, total - bmap->n_div - n); - isl_dim_map_dim_range(dim_map, bmap->dim, t, - first + n, size - (first + n), off); - off += size - (first + n); - } else { - isl_dim_map_dim(dim_map, bmap->dim, t, off); - off += size; - } - } - isl_dim_map_div(dim_map, bmap, off + n); - - res = isl_basic_map_alloc_dim(isl_basic_map_get_dim(bmap), - bmap->n_div, bmap->n_eq, bmap->n_ineq); - res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - return res; -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -__isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - size_t row_size; - isl_int **new_div; - isl_int *old; - - if (n == 0) - return bmap; - - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return isl_basic_map_remove_dims(bmap, type, first, n); - - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - - bmap = move_last(bmap, type, first, n); - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - row_size = 1 + isl_dim_total(bmap->dim) + bmap->extra; - old = bmap->block2.data; - bmap->block2 = isl_blk_extend(bmap->ctx, bmap->block2, - (bmap->extra + n) * (1 + row_size)); - if (!bmap->block2.data) - goto error; - new_div = isl_alloc_array(bmap->ctx, isl_int *, bmap->extra + n); - if (!new_div) - goto error; - for (i = 0; i < n; ++i) { - new_div[i] = bmap->block2.data + - (bmap->extra + i) * (1 + row_size); - isl_seq_clr(new_div[i], 1 + row_size); - } - for (i = 0; i < bmap->extra; ++i) - new_div[n + i] = bmap->block2.data + (bmap->div[i] - old); - free(bmap->div); - bmap->div = new_div; - bmap->n_div += n; - bmap->extra += n; - - bmap->dim = isl_dim_drop(bmap->dim, type, first, n); - if (!bmap->dim) - goto error; - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_drop_redundant_divs(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -struct isl_basic_set *isl_basic_set_project_out(struct isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_basic_set *)isl_basic_map_project_out( - (isl_basic_map *)bset, type, first, n); -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -__isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return NULL; - - if (n == 0) - return map; - - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_dim_drop(map->dim, type, first, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_project_out(map->p[i], type, first, n); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_project_out((isl_map *)set, type, first, n); -} - -static struct isl_basic_map *add_divs(struct isl_basic_map *bmap, unsigned n) -{ - int i, j; - - for (i = 0; i < n; ++i) { - j = isl_basic_map_alloc_div(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->div[j], 1+1+isl_basic_map_total_dim(bmap)); - } - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_apply_range( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - struct isl_dim *dim_result = NULL; - struct isl_basic_map *bmap; - unsigned n_in, n_out, n, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - dim_result = isl_dim_join(isl_dim_copy(bmap1->dim), - isl_dim_copy(bmap2->dim)); - - n_in = isl_basic_map_n_in(bmap1); - n_out = isl_basic_map_n_out(bmap2); - n = isl_basic_map_n_out(bmap1); - nparam = isl_basic_map_n_param(bmap1); - - total = nparam + n_in + n_out + bmap1->n_div + bmap2->n_div + n; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += n_in); - isl_dim_map_div(dim_map1, bmap1, pos += n_out); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += bmap2->n_div); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos); - - bmap = isl_basic_map_alloc_dim(dim_result, - bmap1->n_div + bmap2->n_div + n, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = add_divs(bmap, n); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_drop_redundant_divs(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_basic_set *isl_basic_set_apply( - struct isl_basic_set *bset, struct isl_basic_map *bmap) -{ - if (!bset || !bmap) - goto error; - - isl_assert(bset->ctx, isl_basic_map_compatible_domain(bmap, bset), - goto error); - - return (struct isl_basic_set *) - isl_basic_map_apply_range((struct isl_basic_map *)bset, bmap); -error: - isl_basic_set_free(bset); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_apply_domain( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, - isl_basic_map_n_in(bmap1) == isl_basic_map_n_in(bmap2), goto error); - isl_assert(bmap1->ctx, - isl_basic_map_n_param(bmap1) == isl_basic_map_n_param(bmap2), - goto error); - - bmap1 = isl_basic_map_reverse(bmap1); - bmap1 = isl_basic_map_apply_range(bmap1, bmap2); - return isl_basic_map_reverse(bmap1); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -/* Given two basic maps A -> f(A) and B -> g(B), construct a basic map - * A \cap B -> f(A) + f(B) - */ -struct isl_basic_map *isl_basic_map_sum( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - unsigned n_in, n_out, nparam, total, pos; - struct isl_basic_map *bmap = NULL; - struct isl_dim_map *dim_map1, *dim_map2; - int i; - - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, isl_dim_equal(bmap1->dim, bmap2->dim), - goto error); - - nparam = isl_basic_map_n_param(bmap1); - n_in = isl_basic_map_n_in(bmap1); - n_out = isl_basic_map_n_out(bmap1); - - total = nparam + n_in + n_out + bmap1->n_div + bmap2->n_div + 2 * n_out; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap2->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos); - isl_dim_map_div(dim_map1, bmap1, pos += n_in + n_out); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += bmap2->n_div); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += n_out); - - bmap = isl_basic_map_alloc_dim(isl_dim_copy(bmap1->dim), - bmap1->n_div + bmap2->n_div + 2 * n_out, - bmap1->n_eq + bmap2->n_eq + n_out, - bmap1->n_ineq + bmap2->n_ineq); - for (i = 0; i < n_out; ++i) { - int j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j], 1+total); - isl_int_set_si(bmap->eq[j][1+nparam+n_in+i], -1); - isl_int_set_si(bmap->eq[j][1+pos+i], 1); - isl_int_set_si(bmap->eq[j][1+pos-n_out+i], 1); - } - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = add_divs(bmap, 2 * n_out); - - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -/* Given two maps A -> f(A) and B -> g(B), construct a map - * A \cap B -> f(A) + f(B) - */ -struct isl_map *isl_map_sum(struct isl_map *map1, struct isl_map *map2) -{ - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - isl_assert(map1->ctx, isl_dim_equal(map1->dim, map2->dim), goto error); - - result = isl_map_alloc_dim(isl_dim_copy(map1->dim), - map1->n * map2->n, 0); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - struct isl_basic_map *part; - part = isl_basic_map_sum( - isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j])); - if (isl_basic_map_is_empty(part)) - isl_basic_map_free(part); - else - result = isl_map_add_basic_map(result, part); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_set *isl_set_sum(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - return (isl_set *)isl_map_sum((isl_map *)set1, (isl_map *)set2); -} - -/* Given a basic map A -> f(A), construct A -> -f(A). - */ -struct isl_basic_map *isl_basic_map_neg(struct isl_basic_map *bmap) -{ - int i, j; - unsigned off, n; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - n = isl_basic_map_dim(bmap, isl_dim_out); - off = isl_basic_map_offset(bmap, isl_dim_out); - for (i = 0; i < bmap->n_eq; ++i) - for (j = 0; j < n; ++j) - isl_int_neg(bmap->eq[i][off+j], bmap->eq[i][off+j]); - for (i = 0; i < bmap->n_ineq; ++i) - for (j = 0; j < n; ++j) - isl_int_neg(bmap->ineq[i][off+j], bmap->ineq[i][off+j]); - for (i = 0; i < bmap->n_div; ++i) - for (j = 0; j < n; ++j) - isl_int_neg(bmap->div[i][1+off+j], bmap->div[i][1+off+j]); - return isl_basic_map_finalize(bmap); -} - -__isl_give isl_basic_set *isl_basic_set_neg(__isl_take isl_basic_set *bset) -{ - return isl_basic_map_neg(bset); -} - -/* Given a map A -> f(A), construct A -> -f(A). - */ -struct isl_map *isl_map_neg(struct isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_neg(map->p[i]); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_neg(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_neg((isl_map *)set); -} - -/* Given a basic map A -> f(A) and an integer d, construct a basic map - * A -> floor(f(A)/d). - */ -struct isl_basic_map *isl_basic_map_floordiv(struct isl_basic_map *bmap, - isl_int d) -{ - unsigned n_in, n_out, nparam, total, pos; - struct isl_basic_map *result = NULL; - struct isl_dim_map *dim_map; - int i; - - if (!bmap) - return NULL; - - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - n_out = isl_basic_map_n_out(bmap); - - total = nparam + n_in + n_out + bmap->n_div + n_out; - dim_map = isl_dim_map_alloc(bmap->ctx, total); - isl_dim_map_dim(dim_map, bmap->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map, bmap->dim, isl_dim_in, pos += nparam); - isl_dim_map_div(dim_map, bmap, pos += n_in + n_out); - isl_dim_map_dim(dim_map, bmap->dim, isl_dim_out, pos += bmap->n_div); - - result = isl_basic_map_alloc_dim(isl_dim_copy(bmap->dim), - bmap->n_div + n_out, - bmap->n_eq, bmap->n_ineq + 2 * n_out); - result = isl_basic_map_add_constraints_dim_map(result, bmap, dim_map); - result = add_divs(result, n_out); - for (i = 0; i < n_out; ++i) { - int j; - j = isl_basic_map_alloc_inequality(result); - if (j < 0) - goto error; - isl_seq_clr(result->ineq[j], 1+total); - isl_int_neg(result->ineq[j][1+nparam+n_in+i], d); - isl_int_set_si(result->ineq[j][1+pos+i], 1); - j = isl_basic_map_alloc_inequality(result); - if (j < 0) - goto error; - isl_seq_clr(result->ineq[j], 1+total); - isl_int_set(result->ineq[j][1+nparam+n_in+i], d); - isl_int_set_si(result->ineq[j][1+pos+i], -1); - isl_int_sub_ui(result->ineq[j][0], d, 1); - } - - result = isl_basic_map_simplify(result); - return isl_basic_map_finalize(result); -error: - isl_basic_map_free(result); - return NULL; -} - -/* Given a map A -> f(A) and an integer d, construct a map - * A -> floor(f(A)/d). - */ -struct isl_map *isl_map_floordiv(struct isl_map *map, isl_int d) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - ISL_F_CLR(map, ISL_MAP_DISJOINT); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_floordiv(map->p[i], d); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -static struct isl_basic_map *var_equal(struct isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->eq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[i][1+nparam+pos], -1); - isl_int_set_si(bmap->eq[i][1+nparam+n_in+pos], 1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraints to "bmap" expressing i_pos < o_pos - */ -static struct isl_basic_map *var_less(struct isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][0], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], 1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraint to "bmap" expressing i_pos <= o_pos - */ -static __isl_give isl_basic_map *var_less_or_equal( - __isl_take isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], 1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraints to "bmap" expressing i_pos > o_pos - */ -static struct isl_basic_map *var_more(struct isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][0], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], 1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], -1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraint to "bmap" expressing i_pos >= o_pos - */ -static __isl_give isl_basic_map *var_more_or_equal( - __isl_take isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], 1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], -1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_equal(struct isl_dim *dim, unsigned n_equal) -{ - int i; - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_dim(dim, 0, n_equal, 0); - if (!bmap) - return NULL; - for (i = 0; i < n_equal && bmap; ++i) - bmap = var_equal(bmap, i); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on of dimension "dim" expressing i_[0..pos] << o_[0..pos] - */ -struct isl_basic_map *isl_basic_map_less_at(struct isl_dim *dim, unsigned pos) -{ - int i; - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_dim(dim, 0, pos, 1); - if (!bmap) - return NULL; - for (i = 0; i < pos && bmap; ++i) - bmap = var_equal(bmap, i); - if (bmap) - bmap = var_less(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on of dimension "dim" expressing i_[0..pos] <<= o_[0..pos] - */ -__isl_give isl_basic_map *isl_basic_map_less_or_equal_at( - __isl_take isl_dim *dim, unsigned pos) -{ - int i; - isl_basic_map *bmap; - - bmap = isl_basic_map_alloc_dim(dim, 0, pos, 1); - for (i = 0; i < pos; ++i) - bmap = var_equal(bmap, i); - bmap = var_less_or_equal(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on pairs of sets of dimension "dim" expressing i_pos > o_pos - */ -struct isl_basic_map *isl_basic_map_more_at(struct isl_dim *dim, unsigned pos) -{ - int i; - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_dim(dim, 0, pos, 1); - if (!bmap) - return NULL; - for (i = 0; i < pos && bmap; ++i) - bmap = var_equal(bmap, i); - if (bmap) - bmap = var_more(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on of dimension "dim" expressing i_[0..pos] >>= o_[0..pos] - */ -__isl_give isl_basic_map *isl_basic_map_more_or_equal_at( - __isl_take isl_dim *dim, unsigned pos) -{ - int i; - isl_basic_map *bmap; - - bmap = isl_basic_map_alloc_dim(dim, 0, pos, 1); - for (i = 0; i < pos; ++i) - bmap = var_equal(bmap, i); - bmap = var_more_or_equal(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -static __isl_give isl_map *map_lex_lte_first(__isl_take isl_dim *dims, - unsigned n, int equal) -{ - struct isl_map *map; - int i; - - if (n == 0 && equal) - return isl_map_universe(dims); - - map = isl_map_alloc_dim(isl_dim_copy(dims), n, ISL_MAP_DISJOINT); - - for (i = 0; i + 1 < n; ++i) - map = isl_map_add_basic_map(map, - isl_basic_map_less_at(isl_dim_copy(dims), i)); - if (n > 0) { - if (equal) - map = isl_map_add_basic_map(map, - isl_basic_map_less_or_equal_at(dims, n - 1)); - else - map = isl_map_add_basic_map(map, - isl_basic_map_less_at(dims, n - 1)); - } else - isl_dim_free(dims); - - return map; -} - -static __isl_give isl_map *map_lex_lte(__isl_take isl_dim *dims, int equal) -{ - if (!dims) - return NULL; - return map_lex_lte_first(dims, dims->n_out, equal); -} - -__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_dim *dim, unsigned n) -{ - return map_lex_lte_first(dim, n, 0); -} - -__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_dim *dim, unsigned n) -{ - return map_lex_lte_first(dim, n, 1); -} - -__isl_give isl_map *isl_map_lex_lt(__isl_take isl_dim *set_dim) -{ - return map_lex_lte(isl_dim_map_from_set(set_dim), 0); -} - -__isl_give isl_map *isl_map_lex_le(__isl_take isl_dim *set_dim) -{ - return map_lex_lte(isl_dim_map_from_set(set_dim), 1); -} - -static __isl_give isl_map *map_lex_gte_first(__isl_take isl_dim *dims, - unsigned n, int equal) -{ - struct isl_map *map; - int i; - - if (n == 0 && equal) - return isl_map_universe(dims); - - map = isl_map_alloc_dim(isl_dim_copy(dims), n, ISL_MAP_DISJOINT); - - for (i = 0; i + 1 < n; ++i) - map = isl_map_add_basic_map(map, - isl_basic_map_more_at(isl_dim_copy(dims), i)); - if (n > 0) { - if (equal) - map = isl_map_add_basic_map(map, - isl_basic_map_more_or_equal_at(dims, n - 1)); - else - map = isl_map_add_basic_map(map, - isl_basic_map_more_at(dims, n - 1)); - } else - isl_dim_free(dims); - - return map; -} - -static __isl_give isl_map *map_lex_gte(__isl_take isl_dim *dims, int equal) -{ - if (!dims) - return NULL; - return map_lex_gte_first(dims, dims->n_out, equal); -} - -__isl_give isl_map *isl_map_lex_gt_first(__isl_take isl_dim *dim, unsigned n) -{ - return map_lex_gte_first(dim, n, 0); -} - -__isl_give isl_map *isl_map_lex_ge_first(__isl_take isl_dim *dim, unsigned n) -{ - return map_lex_gte_first(dim, n, 1); -} - -__isl_give isl_map *isl_map_lex_gt(__isl_take isl_dim *set_dim) -{ - return map_lex_gte(isl_dim_map_from_set(set_dim), 0); -} - -__isl_give isl_map *isl_map_lex_ge(__isl_take isl_dim *set_dim) -{ - return map_lex_gte(isl_dim_map_from_set(set_dim), 1); -} - -__isl_give isl_map *isl_set_lex_le_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_le(isl_set_get_dim(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_set_lex_lt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_lt(isl_set_get_dim(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_set_lex_ge_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_ge(isl_set_get_dim(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_set_lex_gt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_gt(isl_set_get_dim(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_map_lex_le_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_le(isl_dim_range(isl_map_get_dim(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_map *isl_map_lex_lt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_lt(isl_dim_range(isl_map_get_dim(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_map *isl_map_lex_ge_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_ge(isl_dim_range(isl_map_get_dim(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_gt(isl_dim_range(isl_map_get_dim(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -struct isl_basic_map *isl_basic_map_from_basic_set( - struct isl_basic_set *bset, struct isl_dim *dim) -{ - struct isl_basic_map *bmap; - - bset = isl_basic_set_cow(bset); - if (!bset || !dim) - goto error; - - isl_assert(bset->ctx, isl_dim_compatible(bset->dim, dim), goto error); - isl_dim_free(bset->dim); - bmap = (struct isl_basic_map *) bset; - bmap->dim = dim; - return isl_basic_map_finalize(bmap); -error: - isl_basic_set_free(bset); - isl_dim_free(dim); - return NULL; -} - -struct isl_basic_set *isl_basic_set_from_basic_map(struct isl_basic_map *bmap) -{ - if (!bmap) - goto error; - if (bmap->dim->n_in == 0) - return (struct isl_basic_set *)bmap; - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap->dim = isl_dim_as_set_dim(bmap->dim); - if (!bmap->dim) - goto error; - bmap = isl_basic_map_finalize(bmap); - return (struct isl_basic_set *)bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* For a div d = floor(f/m), add the constraints - * - * f - m d >= 0 - * -(f-(n-1)) + m d >= 0 - * - * Note that the second constraint is the negation of - * - * f - m d >= n - */ -int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap, - unsigned pos, isl_int *div) -{ - int i, j; - unsigned total = isl_basic_map_total_dim(bmap); - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - return -1; - isl_seq_cpy(bmap->ineq[i], div + 1, 1 + total); - isl_int_neg(bmap->ineq[i][1 + pos], div[0]); - - j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - return -1; - isl_seq_neg(bmap->ineq[j], bmap->ineq[i], 1 + total); - isl_int_add(bmap->ineq[j][0], bmap->ineq[j][0], bmap->ineq[j][1 + pos]); - isl_int_sub_ui(bmap->ineq[j][0], bmap->ineq[j][0], 1); - return j; -} - -int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset, - unsigned pos, isl_int *div) -{ - return isl_basic_map_add_div_constraints_var((isl_basic_map *)bset, - pos, div); -} - -int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div) -{ - unsigned total = isl_basic_map_total_dim(bmap); - unsigned div_pos = total - bmap->n_div + div; - - return isl_basic_map_add_div_constraints_var(bmap, div_pos, - bmap->div[div]); -} - -struct isl_basic_set *isl_basic_map_underlying_set( - struct isl_basic_map *bmap) -{ - if (!bmap) - goto error; - if (bmap->dim->nparam == 0 && bmap->dim->n_in == 0 && - bmap->n_div == 0 && - !isl_dim_is_named_or_nested(bmap->dim, isl_dim_in) && - !isl_dim_is_named_or_nested(bmap->dim, isl_dim_out)) - return (struct isl_basic_set *)bmap; - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap->dim = isl_dim_underlying(bmap->dim, bmap->n_div); - if (!bmap->dim) - goto error; - bmap->extra -= bmap->n_div; - bmap->n_div = 0; - bmap = isl_basic_map_finalize(bmap); - return (struct isl_basic_set *)bmap; -error: - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_underlying_set( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_underlying_set((isl_basic_map *)bset); -} - -struct isl_basic_map *isl_basic_map_overlying_set( - struct isl_basic_set *bset, struct isl_basic_map *like) -{ - struct isl_basic_map *bmap; - struct isl_ctx *ctx; - unsigned total; - int i; - - if (!bset || !like) - goto error; - ctx = bset->ctx; - isl_assert(ctx, bset->n_div == 0, goto error); - isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(ctx, bset->dim->n_out == isl_basic_map_total_dim(like), - goto error); - if (isl_dim_equal(bset->dim, like->dim) && like->n_div == 0) { - isl_basic_map_free(like); - return (struct isl_basic_map *)bset; - } - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - total = bset->dim->n_out + bset->extra; - bmap = (struct isl_basic_map *)bset; - isl_dim_free(bmap->dim); - bmap->dim = isl_dim_copy(like->dim); - if (!bmap->dim) - goto error; - bmap->n_div = like->n_div; - bmap->extra += like->n_div; - if (bmap->extra) { - unsigned ltotal; - isl_int **div; - ltotal = total - bmap->extra + like->extra; - if (ltotal > total) - ltotal = total; - bmap->block2 = isl_blk_extend(ctx, bmap->block2, - bmap->extra * (1 + 1 + total)); - if (isl_blk_is_error(bmap->block2)) - goto error; - div = isl_realloc_array(ctx, bmap->div, isl_int *, bmap->extra); - if (!div) - goto error; - bmap->div = div; - for (i = 0; i < bmap->extra; ++i) - bmap->div[i] = bmap->block2.data + i * (1 + 1 + total); - for (i = 0; i < like->n_div; ++i) { - isl_seq_cpy(bmap->div[i], like->div[i], 1 + 1 + ltotal); - isl_seq_clr(bmap->div[i]+1+1+ltotal, total - ltotal); - } - bmap = isl_basic_map_extend_constraints(bmap, - 0, 2 * like->n_div); - for (i = 0; i < like->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_basic_map_add_div_constraints(bmap, i) < 0) - goto error; - } - } - isl_basic_map_free(like); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_basic_map_free(like); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_set *isl_basic_set_from_underlying_set( - struct isl_basic_set *bset, struct isl_basic_set *like) -{ - return (struct isl_basic_set *) - isl_basic_map_overlying_set(bset, (struct isl_basic_map *)like); -} - -struct isl_set *isl_set_from_underlying_set( - struct isl_set *set, struct isl_basic_set *like) -{ - int i; - - if (!set || !like) - goto error; - isl_assert(set->ctx, set->dim->n_out == isl_basic_set_total_dim(like), - goto error); - if (isl_dim_equal(set->dim, like->dim) && like->n_div == 0) { - isl_basic_set_free(like); - return set; - } - set = isl_set_cow(set); - if (!set) - goto error; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_from_underlying_set(set->p[i], - isl_basic_set_copy(like)); - if (!set->p[i]) - goto error; - } - isl_dim_free(set->dim); - set->dim = isl_dim_copy(like->dim); - if (!set->dim) - goto error; - isl_basic_set_free(like); - return set; -error: - isl_basic_set_free(like); - isl_set_free(set); - return NULL; -} - -struct isl_set *isl_map_underlying_set(struct isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - map->dim = isl_dim_cow(map->dim); - if (!map->dim) - goto error; - - for (i = 1; i < map->n; ++i) - isl_assert(map->ctx, map->p[0]->n_div == map->p[i]->n_div, - goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = (struct isl_basic_map *) - isl_basic_map_underlying_set(map->p[i]); - if (!map->p[i]) - goto error; - } - if (map->n == 0) - map->dim = isl_dim_underlying(map->dim, 0); - else { - isl_dim_free(map->dim); - map->dim = isl_dim_copy(map->p[0]->dim); - } - if (!map->dim) - goto error; - return (struct isl_set *)map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_to_underlying_set(struct isl_set *set) -{ - return (struct isl_set *)isl_map_underlying_set((struct isl_map *)set); -} - -__isl_give isl_basic_map *isl_basic_map_reset_dim( - __isl_take isl_basic_map *bmap, __isl_take isl_dim *dim) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap || !dim) - goto error; - - isl_dim_free(bmap->dim); - bmap->dim = dim; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - isl_dim_free(dim); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_reset_dim( - __isl_take isl_basic_set *bset, __isl_take isl_dim *dim) -{ - return (isl_basic_set *)isl_basic_map_reset_dim((isl_basic_map *)bset, - dim); -} - -__isl_give isl_map *isl_map_reset_dim(__isl_take isl_map *map, - __isl_take isl_dim *dim) -{ - int i; - - map = isl_map_cow(map); - if (!map || !dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_reset_dim(map->p[i], - isl_dim_copy(dim)); - if (!map->p[i]) - goto error; - } - isl_dim_free(map->dim); - map->dim = dim; - - return map; -error: - isl_map_free(map); - isl_dim_free(dim); - return NULL; -} - -__isl_give isl_set *isl_set_reset_dim(__isl_take isl_set *set, - __isl_take isl_dim *dim) -{ - return (struct isl_set *) isl_map_reset_dim((struct isl_map *)set, dim); -} - -struct isl_basic_set *isl_basic_map_domain(struct isl_basic_map *bmap) -{ - isl_dim *dim; - struct isl_basic_set *domain; - unsigned n_in; - unsigned n_out; - - if (!bmap) - return NULL; - dim = isl_dim_domain(isl_basic_map_get_dim(bmap)); - - n_in = isl_basic_map_n_in(bmap); - n_out = isl_basic_map_n_out(bmap); - domain = isl_basic_set_from_basic_map(bmap); - domain = isl_basic_set_project_out(domain, isl_dim_set, n_in, n_out); - - domain = isl_basic_set_reset_dim(domain, dim); - - return domain; -} - -int isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return isl_dim_may_be_set(bmap->dim); -} - -struct isl_basic_set *isl_basic_map_range(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - if (isl_basic_map_may_be_set(bmap)) - return bmap; - return isl_basic_map_domain(isl_basic_map_reverse(bmap)); -} - -__isl_give isl_basic_map *isl_basic_map_domain_map( - __isl_take isl_basic_map *bmap) -{ - int i, k; - isl_dim *dim; - isl_basic_map *domain; - int nparam, n_in, n_out; - unsigned total; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - - dim = isl_dim_from_range(isl_dim_domain(isl_basic_map_get_dim(bmap))); - domain = isl_basic_map_universe(dim); - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = isl_basic_map_apply_range(bmap, domain); - bmap = isl_basic_map_extend_constraints(bmap, n_in, 0); - - total = isl_basic_map_total_dim(bmap); - - for (i = 0; i < n_in; ++i) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + total); - isl_int_set_si(bmap->eq[k][1 + nparam + i], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + n_in + n_out + i], 1); - } - - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_range_map( - __isl_take isl_basic_map *bmap) -{ - int i, k; - isl_dim *dim; - isl_basic_map *range; - int nparam, n_in, n_out; - unsigned total; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - - dim = isl_dim_from_range(isl_dim_range(isl_basic_map_get_dim(bmap))); - range = isl_basic_map_universe(dim); - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = isl_basic_map_apply_range(bmap, range); - bmap = isl_basic_map_extend_constraints(bmap, n_out, 0); - - total = isl_basic_map_total_dim(bmap); - - for (i = 0; i < n_out; ++i) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + total); - isl_int_set_si(bmap->eq[k][1 + nparam + n_in + i], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + n_in + n_out + i], 1); - } - - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -int isl_map_may_be_set(__isl_keep isl_map *map) -{ - if (!map) - return -1; - return isl_dim_may_be_set(map->dim); -} - -struct isl_set *isl_map_range(struct isl_map *map) -{ - int i; - struct isl_set *set; - - if (!map) - goto error; - if (isl_map_may_be_set(map)) - return (isl_set *)map; - - map = isl_map_cow(map); - if (!map) - goto error; - - set = (struct isl_set *) map; - set->dim = isl_dim_drop_inputs(set->dim, 0, set->dim->n_in); - if (!set->dim) - goto error; - for (i = 0; i < map->n; ++i) { - set->p[i] = isl_basic_map_range(map->p[i]); - if (!set->p[i]) - goto error; - } - ISL_F_CLR(set, ISL_MAP_DISJOINT); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map) -{ - int i; - isl_dim *domain_dim; - - map = isl_map_cow(map); - if (!map) - return NULL; - - domain_dim = isl_dim_from_range(isl_dim_domain(isl_map_get_dim(map))); - map->dim = isl_dim_from_domain(isl_dim_wrap(map->dim)); - map->dim = isl_dim_join(map->dim, domain_dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_domain_map(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_DISJOINT); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_range_map(__isl_take isl_map *map) -{ - int i; - isl_dim *range_dim; - - map = isl_map_cow(map); - if (!map) - return NULL; - - range_dim = isl_dim_range(isl_map_get_dim(map)); - map->dim = isl_dim_from_domain(isl_dim_wrap(map->dim)); - map->dim = isl_dim_join(map->dim, range_dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_range_map(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_DISJOINT); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_map *isl_map_from_set(struct isl_set *set, struct isl_dim *dim) -{ - int i; - struct isl_map *map = NULL; - - set = isl_set_cow(set); - if (!set || !dim) - goto error; - isl_assert(set->ctx, isl_dim_compatible(set->dim, dim), goto error); - map = (struct isl_map *)set; - for (i = 0; i < set->n; ++i) { - map->p[i] = isl_basic_map_from_basic_set( - set->p[i], isl_dim_copy(dim)); - if (!map->p[i]) - goto error; - } - isl_dim_free(map->dim); - map->dim = dim; - return map; -error: - isl_dim_free(dim); - isl_set_free(set); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_from_domain( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_reverse(isl_basic_map_from_range(bset)); -} - -__isl_give isl_basic_map *isl_basic_map_from_range( - __isl_take isl_basic_set *bset) -{ - return (isl_basic_map *)bset; -} - -struct isl_map *isl_map_from_range(struct isl_set *set) -{ - return (struct isl_map *)set; -} - -__isl_give isl_map *isl_map_from_domain(__isl_take isl_set *set) -{ - return isl_map_reverse(isl_map_from_range(set)); -} - -__isl_give isl_basic_map *isl_basic_map_from_domain_and_range( - __isl_take isl_basic_set *domain, __isl_take isl_basic_set *range) -{ - return isl_basic_map_apply_range(isl_basic_map_from_domain(domain), - isl_basic_map_from_range(range)); -} - -__isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain, - __isl_take isl_set *range) -{ - return isl_map_apply_range(isl_map_from_domain(domain), - isl_map_from_range(range)); -} - -struct isl_set *isl_set_from_map(struct isl_map *map) -{ - int i; - struct isl_set *set = NULL; - - if (!map) - return NULL; - map = isl_map_cow(map); - if (!map) - return NULL; - map->dim = isl_dim_as_set_dim(map->dim); - if (!map->dim) - goto error; - set = (struct isl_set *)map; - for (i = 0; i < map->n; ++i) { - set->p[i] = isl_basic_set_from_basic_map(map->p[i]); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_map_free(map); - return NULL; -} - -struct isl_map *isl_map_alloc_dim(struct isl_dim *dim, int n, unsigned flags) -{ - struct isl_map *map; - - if (!dim) - return NULL; - isl_assert(dim->ctx, n >= 0, return NULL); - map = isl_alloc(dim->ctx, struct isl_map, - sizeof(struct isl_map) + - (n - 1) * sizeof(struct isl_basic_map *)); - if (!map) - goto error; - - map->ctx = dim->ctx; - isl_ctx_ref(map->ctx); - map->ref = 1; - map->size = n; - map->n = 0; - map->dim = dim; - map->flags = flags; - return map; -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_map *isl_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, int n, - unsigned flags) -{ - struct isl_map *map; - struct isl_dim *dims; - - dims = isl_dim_alloc(ctx, nparam, in, out); - if (!dims) - return NULL; - - map = isl_map_alloc_dim(dims, n, flags); - return map; -} - -struct isl_basic_map *isl_basic_map_empty(struct isl_dim *dim) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_dim(dim, 0, 1, 0); - bmap = isl_basic_map_set_to_empty(bmap); - return bmap; -} - -struct isl_basic_set *isl_basic_set_empty(struct isl_dim *dim) -{ - struct isl_basic_set *bset; - bset = isl_basic_set_alloc_dim(dim, 0, 1, 0); - bset = isl_basic_set_set_to_empty(bset); - return bset; -} - -struct isl_basic_map *isl_basic_map_empty_like(struct isl_basic_map *model) -{ - struct isl_basic_map *bmap; - if (!model) - return NULL; - bmap = isl_basic_map_alloc_dim(isl_dim_copy(model->dim), 0, 1, 0); - bmap = isl_basic_map_set_to_empty(bmap); - return bmap; -} - -struct isl_basic_map *isl_basic_map_empty_like_map(struct isl_map *model) -{ - struct isl_basic_map *bmap; - if (!model) - return NULL; - bmap = isl_basic_map_alloc_dim(isl_dim_copy(model->dim), 0, 1, 0); - bmap = isl_basic_map_set_to_empty(bmap); - return bmap; -} - -struct isl_basic_set *isl_basic_set_empty_like(struct isl_basic_set *model) -{ - struct isl_basic_set *bset; - if (!model) - return NULL; - bset = isl_basic_set_alloc_dim(isl_dim_copy(model->dim), 0, 1, 0); - bset = isl_basic_set_set_to_empty(bset); - return bset; -} - -struct isl_basic_map *isl_basic_map_universe(struct isl_dim *dim) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_dim(dim, 0, 0, 0); - bmap = isl_basic_map_finalize(bmap); - return bmap; -} - -struct isl_basic_set *isl_basic_set_universe(struct isl_dim *dim) -{ - struct isl_basic_set *bset; - bset = isl_basic_set_alloc_dim(dim, 0, 0, 0); - bset = isl_basic_set_finalize(bset); - return bset; -} - -__isl_give isl_basic_map *isl_basic_map_nat_universe(__isl_take isl_dim *dim) -{ - int i; - unsigned total = isl_dim_total(dim); - isl_basic_map *bmap; - - bmap= isl_basic_map_alloc_dim(dim, 0, 0, total); - for (i = 0; i < total; ++i) { - int k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], 1 + total); - isl_int_set_si(bmap->ineq[k][1 + i], 1); - } - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_nat_universe(__isl_take isl_dim *dim) -{ - return isl_basic_map_nat_universe(dim); -} - -__isl_give isl_map *isl_map_nat_universe(__isl_take isl_dim *dim) -{ - return isl_map_from_basic_map(isl_basic_map_nat_universe(dim)); -} - -__isl_give isl_set *isl_set_nat_universe(__isl_take isl_dim *dim) -{ - return isl_map_nat_universe(dim); -} - -__isl_give isl_basic_map *isl_basic_map_universe_like( - __isl_keep isl_basic_map *model) -{ - if (!model) - return NULL; - return isl_basic_map_alloc_dim(isl_dim_copy(model->dim), 0, 0, 0); -} - -struct isl_basic_set *isl_basic_set_universe_like(struct isl_basic_set *model) -{ - if (!model) - return NULL; - return isl_basic_set_alloc_dim(isl_dim_copy(model->dim), 0, 0, 0); -} - -__isl_give isl_basic_set *isl_basic_set_universe_like_set( - __isl_keep isl_set *model) -{ - if (!model) - return NULL; - return isl_basic_set_alloc_dim(isl_dim_copy(model->dim), 0, 0, 0); -} - -struct isl_map *isl_map_empty(struct isl_dim *dim) -{ - return isl_map_alloc_dim(dim, 0, ISL_MAP_DISJOINT); -} - -struct isl_map *isl_map_empty_like(struct isl_map *model) -{ - if (!model) - return NULL; - return isl_map_alloc_dim(isl_dim_copy(model->dim), 0, ISL_MAP_DISJOINT); -} - -struct isl_map *isl_map_empty_like_basic_map(struct isl_basic_map *model) -{ - if (!model) - return NULL; - return isl_map_alloc_dim(isl_dim_copy(model->dim), 0, ISL_MAP_DISJOINT); -} - -struct isl_set *isl_set_empty(struct isl_dim *dim) -{ - return isl_set_alloc_dim(dim, 0, ISL_MAP_DISJOINT); -} - -struct isl_set *isl_set_empty_like(struct isl_set *model) -{ - if (!model) - return NULL; - return isl_set_empty(isl_dim_copy(model->dim)); -} - -struct isl_map *isl_map_universe(struct isl_dim *dim) -{ - struct isl_map *map; - if (!dim) - return NULL; - map = isl_map_alloc_dim(isl_dim_copy(dim), 1, ISL_MAP_DISJOINT); - map = isl_map_add_basic_map(map, isl_basic_map_universe(dim)); - return map; -} - -struct isl_set *isl_set_universe(struct isl_dim *dim) -{ - struct isl_set *set; - if (!dim) - return NULL; - set = isl_set_alloc_dim(isl_dim_copy(dim), 1, ISL_MAP_DISJOINT); - set = isl_set_add_basic_set(set, isl_basic_set_universe(dim)); - return set; -} - -__isl_give isl_set *isl_set_universe_like(__isl_keep isl_set *model) -{ - if (!model) - return NULL; - return isl_set_universe(isl_dim_copy(model->dim)); -} - -struct isl_map *isl_map_dup(struct isl_map *map) -{ - int i; - struct isl_map *dup; - - if (!map) - return NULL; - dup = isl_map_alloc_dim(isl_dim_copy(map->dim), map->n, map->flags); - for (i = 0; i < map->n; ++i) - dup = isl_map_add_basic_map(dup, isl_basic_map_copy(map->p[i])); - return dup; -} - -__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *bmap) -{ - if (!bmap || !map) - goto error; - if (isl_basic_map_plain_is_empty(bmap)) { - isl_basic_map_free(bmap); - return map; - } - isl_assert(map->ctx, isl_dim_equal(map->dim, bmap->dim), goto error); - isl_assert(map->ctx, map->n < map->size, goto error); - map->p[map->n] = bmap; - map->n++; - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - if (map) - isl_map_free(map); - if (bmap) - isl_basic_map_free(bmap); - return NULL; -} - -void isl_map_free(struct isl_map *map) -{ - int i; - - if (!map) - return; - - if (--map->ref > 0) - return; - - isl_ctx_deref(map->ctx); - for (i = 0; i < map->n; ++i) - isl_basic_map_free(map->p[i]); - isl_dim_free(map->dim); - free(map); -} - -struct isl_map *isl_map_extend(struct isl_map *base, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - int i; - - base = isl_map_cow(base); - if (!base) - return NULL; - - base->dim = isl_dim_extend(base->dim, nparam, n_in, n_out); - if (!base->dim) - goto error; - for (i = 0; i < base->n; ++i) { - base->p[i] = isl_basic_map_extend_dim(base->p[i], - isl_dim_copy(base->dim), 0, 0, 0); - if (!base->p[i]) - goto error; - } - return base; -error: - isl_map_free(base); - return NULL; -} - -struct isl_set *isl_set_extend(struct isl_set *base, - unsigned nparam, unsigned dim) -{ - return (struct isl_set *)isl_map_extend((struct isl_map *)base, - nparam, 0, dim); -} - -static struct isl_basic_map *isl_basic_map_fix_pos_si( - struct isl_basic_map *bmap, unsigned pos, int value) -{ - int j; - - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j] + 1, isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[j][pos], -1); - isl_int_set_si(bmap->eq[j][0], value); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *isl_basic_map_fix_pos( - __isl_take isl_basic_map *bmap, unsigned pos, isl_int value) -{ - int j; - - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j] + 1, isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[j][pos], -1); - isl_int_set(bmap->eq[j][0], value); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_fix_si(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value) -{ - if (!bmap) - return NULL; - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), goto error); - return isl_basic_map_fix_pos_si(bmap, - isl_basic_map_offset(bmap, type) + pos, value); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - if (!bmap) - return NULL; - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), goto error); - return isl_basic_map_fix_pos(bmap, - isl_basic_map_offset(bmap, type) + pos, value); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_fix_si(struct isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, int value) -{ - return (struct isl_basic_set *) - isl_basic_map_fix_si((struct isl_basic_map *)bset, - type, pos, value); -} - -__isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - return (struct isl_basic_set *) - isl_basic_map_fix((struct isl_basic_map *)bset, - type, pos, value); -} - -struct isl_basic_map *isl_basic_map_fix_input_si(struct isl_basic_map *bmap, - unsigned input, int value) -{ - return isl_basic_map_fix_si(bmap, isl_dim_in, input, value); -} - -struct isl_basic_set *isl_basic_set_fix_dim_si(struct isl_basic_set *bset, - unsigned dim, int value) -{ - return (struct isl_basic_set *) - isl_basic_map_fix_si((struct isl_basic_map *)bset, - isl_dim_set, dim, value); -} - -struct isl_map *isl_map_fix_si(struct isl_map *map, - enum isl_dim_type type, unsigned pos, int value) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - isl_assert(map->ctx, pos < isl_map_dim(map, type), goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_fix_si(map->p[i], type, pos, value); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value) -{ - return (struct isl_set *) - isl_map_fix_si((struct isl_map *)set, type, pos, value); -} - -__isl_give isl_map *isl_map_fix(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - isl_assert(map->ctx, pos < isl_map_dim(map, type), goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_fix(map->p[i], type, pos, value); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_fix(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - return (struct isl_set *)isl_map_fix((isl_map *)set, type, pos, value); -} - -struct isl_map *isl_map_fix_input_si(struct isl_map *map, - unsigned input, int value) -{ - return isl_map_fix_si(map, isl_dim_in, input, value); -} - -struct isl_set *isl_set_fix_dim_si(struct isl_set *set, unsigned dim, int value) -{ - return (struct isl_set *) - isl_map_fix_si((struct isl_map *)set, isl_dim_set, dim, value); -} - -__isl_give isl_basic_map *isl_basic_map_lower_bound_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value) -{ - int j; - - if (!bmap) - return NULL; - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), goto error); - pos += isl_basic_map_offset(bmap, type); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 0, 1); - j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->ineq[j], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[j][pos], 1); - isl_int_set_si(bmap->ineq[j][0], -value); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_lower_bound_dim(struct isl_basic_set *bset, - unsigned dim, isl_int value) -{ - int j; - - bset = isl_basic_set_cow(bset); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - j = isl_basic_set_alloc_inequality(bset); - if (j < 0) - goto error; - isl_seq_clr(bset->ineq[j], 1 + isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->ineq[j][1 + isl_basic_set_n_param(bset) + dim], 1); - isl_int_neg(bset->ineq[j][0], value); - bset = isl_basic_set_simplify(bset); - return isl_basic_set_finalize(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - isl_assert(map->ctx, pos < isl_map_dim(map, type), goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_lower_bound_si(map->p[i], - type, pos, value); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value) -{ - return (struct isl_set *) - isl_map_lower_bound_si((struct isl_map *)set, type, pos, value); -} - -struct isl_set *isl_set_lower_bound_dim(struct isl_set *set, unsigned dim, - isl_int value) -{ - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - - isl_assert(set->ctx, dim < isl_set_n_dim(set), goto error); - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_lower_bound_dim(set->p[i], dim, value); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -struct isl_map *isl_map_reverse(struct isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_dim_reverse(map->dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_reverse(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -static struct isl_map *isl_basic_map_partial_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - if (!bmap) - goto error; - if (bmap->ctx->opt->pip == ISL_PIP_PIP) - return isl_pip_basic_map_lexopt(bmap, dom, empty, max); - else - return isl_tab_basic_map_partial_lexopt(bmap, dom, empty, max); -error: - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - if (empty) - *empty = NULL; - return NULL; -} - -struct isl_map *isl_basic_map_partial_lexmax( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return isl_basic_map_partial_lexopt(bmap, dom, empty, 1); -} - -struct isl_map *isl_basic_map_partial_lexmin( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return isl_basic_map_partial_lexopt(bmap, dom, empty, 0); -} - -struct isl_set *isl_basic_set_partial_lexmin( - struct isl_basic_set *bset, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return (struct isl_set *) - isl_basic_map_partial_lexmin((struct isl_basic_map *)bset, - dom, empty); -} - -struct isl_set *isl_basic_set_partial_lexmax( - struct isl_basic_set *bset, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return (struct isl_set *) - isl_basic_map_partial_lexmax((struct isl_basic_map *)bset, - dom, empty); -} - -/* Given a basic map "bmap", compute the lexicographically minimal - * (or maximal) image element for each domain element in dom. - * Set *empty to those elements in dom that do not have an image element. - * - * We first make sure the basic sets in dom are disjoint and then - * simply collect the results over each of the basic sets separately. - * We could probably improve the efficiency a bit by moving the union - * domain down into the parametric integer programming. - */ -static __isl_give isl_map *basic_map_partial_lexopt( - __isl_take isl_basic_map *bmap, __isl_take isl_set *dom, - __isl_give isl_set **empty, int max) -{ - int i; - struct isl_map *res; - - dom = isl_set_make_disjoint(dom); - if (!dom) - goto error; - - if (isl_set_plain_is_empty(dom)) { - res = isl_map_empty_like_basic_map(bmap); - *empty = isl_set_empty_like(dom); - isl_set_free(dom); - isl_basic_map_free(bmap); - return res; - } - - res = isl_basic_map_partial_lexopt(isl_basic_map_copy(bmap), - isl_basic_set_copy(dom->p[0]), empty, max); - - for (i = 1; i < dom->n; ++i) { - struct isl_map *res_i; - struct isl_set *empty_i; - - res_i = isl_basic_map_partial_lexopt(isl_basic_map_copy(bmap), - isl_basic_set_copy(dom->p[i]), &empty_i, max); - - res = isl_map_union_disjoint(res, res_i); - *empty = isl_set_union_disjoint(*empty, empty_i); - } - - isl_set_free(dom); - isl_basic_map_free(bmap); - return res; -error: - *empty = NULL; - isl_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -/* Given a map "map", compute the lexicographically minimal - * (or maximal) image element for each domain element in dom. - * Set *empty to those elements in dom that do not have an image element. - * - * We first compute the lexicographically minimal or maximal element - * in the first basic map. This results in a partial solution "res" - * and a subset "todo" of dom that still need to be handled. - * We then consider each of the remaining maps in "map" and successively - * improve both "res" and "todo". - * - * Let res^k and todo^k be the results after k steps and let i = k + 1. - * Assume we are computing the lexicographical maximum. - * We first compute the lexicographically maximal element in basic map i. - * This results in a partial solution res_i and a subset todo_i. - * Then we combine these results with those obtain for the first k basic maps - * to obtain a result that is valid for the first k+1 basic maps. - * In particular, the set where there is no solution is the set where - * there is no solution for the first k basic maps and also no solution - * for the ith basic map, i.e., - * - * todo^i = todo^k * todo_i - * - * On dom(res^k) * dom(res_i), we need to pick the larger of the two - * solutions, arbitrarily breaking ties in favor of res^k. - * That is, when res^k(a) >= res_i(a), we pick res^k and - * when res^k(a) < res_i(a), we pick res_i. (Here, ">=" and "<" denote - * the lexicographic order.) - * In practice, we compute - * - * res^k * (res_i . "<=") - * - * and - * - * res_i * (res^k . "<") - * - * Finally, we consider the symmetric difference of dom(res^k) and dom(res_i), - * where only one of res^k and res_i provides a solution and we simply pick - * that one, i.e., - * - * res^k * todo_i - * and - * res_i * todo^k - * - * Note that we only compute these intersections when dom(res^k) intersects - * dom(res_i). Otherwise, the only effect of these intersections is to - * potentially break up res^k and res_i into smaller pieces. - * We want to avoid such splintering as much as possible. - * In fact, an earlier implementation of this function would look for - * better results in the domain of res^k and for extra results in todo^k, - * but this would always result in a splintering according to todo^k, - * even when the domain of basic map i is disjoint from the domains of - * the previous basic maps. - */ -static __isl_give isl_map *isl_map_partial_lexopt( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty, int max) -{ - int i; - struct isl_map *res; - struct isl_set *todo; - - if (!map || !dom) - goto error; - - if (isl_map_plain_is_empty(map)) { - if (empty) - *empty = dom; - else - isl_set_free(dom); - return map; - } - - res = basic_map_partial_lexopt(isl_basic_map_copy(map->p[0]), - isl_set_copy(dom), &todo, max); - - for (i = 1; i < map->n; ++i) { - isl_map *lt, *le; - isl_map *res_i; - isl_set *todo_i; - isl_dim *dim = isl_dim_range(isl_map_get_dim(res)); - - res_i = basic_map_partial_lexopt(isl_basic_map_copy(map->p[i]), - isl_set_copy(dom), &todo_i, max); - - if (max) { - lt = isl_map_lex_lt(isl_dim_copy(dim)); - le = isl_map_lex_le(dim); - } else { - lt = isl_map_lex_gt(isl_dim_copy(dim)); - le = isl_map_lex_ge(dim); - } - lt = isl_map_apply_range(isl_map_copy(res), lt); - lt = isl_map_intersect(lt, isl_map_copy(res_i)); - le = isl_map_apply_range(isl_map_copy(res_i), le); - le = isl_map_intersect(le, isl_map_copy(res)); - - if (!isl_map_is_empty(lt) || !isl_map_is_empty(le)) { - res = isl_map_intersect_domain(res, - isl_set_copy(todo_i)); - res_i = isl_map_intersect_domain(res_i, - isl_set_copy(todo)); - } - - res = isl_map_union_disjoint(res, res_i); - res = isl_map_union_disjoint(res, lt); - res = isl_map_union_disjoint(res, le); - - todo = isl_set_intersect(todo, todo_i); - } - - isl_set_free(dom); - isl_map_free(map); - - if (empty) - *empty = todo; - else - isl_set_free(todo); - - return res; -error: - if (empty) - *empty = NULL; - isl_set_free(dom); - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_partial_lexmax( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return isl_map_partial_lexopt(map, dom, empty, 1); -} - -__isl_give isl_map *isl_map_partial_lexmin( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return isl_map_partial_lexopt(map, dom, empty, 0); -} - -__isl_give isl_set *isl_set_partial_lexmin( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return (struct isl_set *) - isl_map_partial_lexmin((struct isl_map *)set, - dom, empty); -} - -__isl_give isl_set *isl_set_partial_lexmax( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return (struct isl_set *) - isl_map_partial_lexmax((struct isl_map *)set, - dom, empty); -} - -__isl_give isl_map *isl_basic_map_lexopt(__isl_take isl_basic_map *bmap, int max) -{ - struct isl_basic_set *dom = NULL; - struct isl_dim *dom_dim; - - if (!bmap) - goto error; - dom_dim = isl_dim_domain(isl_dim_copy(bmap->dim)); - dom = isl_basic_set_universe(dom_dim); - return isl_basic_map_partial_lexopt(bmap, dom, NULL, max); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap) -{ - return isl_basic_map_lexopt(bmap, 0); -} - -__isl_give isl_map *isl_basic_map_lexmax(__isl_take isl_basic_map *bmap) -{ - return isl_basic_map_lexopt(bmap, 1); -} - -__isl_give isl_set *isl_basic_set_lexmin(__isl_take isl_basic_set *bset) -{ - return (isl_set *)isl_basic_map_lexmin((isl_basic_map *)bset); -} - -__isl_give isl_set *isl_basic_set_lexmax(__isl_take isl_basic_set *bset) -{ - return (isl_set *)isl_basic_map_lexmax((isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_lexopt(__isl_take isl_map *map, int max) -{ - struct isl_set *dom = NULL; - struct isl_dim *dom_dim; - - if (!map) - goto error; - dom_dim = isl_dim_domain(isl_dim_copy(map->dim)); - dom = isl_set_universe(dom_dim); - return isl_map_partial_lexopt(map, dom, NULL, max); -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_lexmin(__isl_take isl_map *map) -{ - return isl_map_lexopt(map, 0); -} - -__isl_give isl_map *isl_map_lexmax(__isl_take isl_map *map) -{ - return isl_map_lexopt(map, 1); -} - -__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_lexmin((isl_map *)set); -} - -__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_lexmax((isl_map *)set); -} - -/* Construct a map that equates the two given dimensions in the given space. - */ -static __isl_give isl_map *equate(__isl_take isl_dim *dim, - enum isl_dim_type src_type, int src_pos, - enum isl_dim_type dst_type, int dst_pos) -{ - isl_basic_map *bmap; - int k; - - bmap = isl_basic_map_alloc_dim(dim, 0, 1, 0); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + isl_basic_map_total_dim(bmap)); - src_pos += isl_basic_map_offset(bmap, src_type); - dst_pos += isl_basic_map_offset(bmap, dst_type); - isl_int_set_si(bmap->eq[k][src_pos], 1); - isl_int_set_si(bmap->eq[k][dst_pos], -1); - - return isl_map_from_basic_map(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Extract the first and only affine expression from list - * and then add it to *pwaff with the given dom. - * This domain is known to be disjoint from other domains - * because of the way isl_basic_set_foreach_lexmax works. - */ -static int update_dim_max(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user) -{ - isl_ctx *ctx = isl_basic_set_get_ctx(dom); - isl_aff *aff; - isl_pw_aff **pwaff = user; - isl_pw_aff *pwaff_i; - - if (isl_aff_list_n_aff(list) != 1) - isl_die(ctx, isl_error_internal, - "expecting single element list", goto error); - - aff = isl_aff_list_get_aff(list, 0); - pwaff_i = isl_pw_aff_alloc(isl_set_from_basic_set(dom), aff); - - *pwaff = isl_pw_aff_add_disjoint(*pwaff, pwaff_i); - - isl_aff_list_free(list); - - return 0; -error: - isl_basic_set_free(dom); - isl_aff_list_free(list); - return -1; -} - -/* Given a one-dimensional basic set, compute the maximum of that - * dimension as an isl_pw_aff. - * - * The isl_pw_aff is constructed by having isl_basic_set_foreach_lexmax - * call update_dim_max on each leaf of the result. - */ -static __isl_give isl_pw_aff *basic_set_dim_max(__isl_keep isl_basic_set *bset) -{ - isl_dim *dim = isl_basic_set_get_dim(bset); - isl_pw_aff *pwaff; - int r; - - dim = isl_dim_domain(isl_dim_from_range(dim)); - pwaff = isl_pw_aff_empty(dim); - - r = isl_basic_set_foreach_lexmax(bset, &update_dim_max, &pwaff); - if (r < 0) - return isl_pw_aff_free(pwaff); - - return pwaff; -} - -/* Compute the maximum of the given set dimension as a function of the - * parameters, but independently of the other set dimensions. - * - * We first project the set onto the given dimension and then compute - * the "lexicographic" maximum in each basic set, combining the results - * using isl_pw_aff_max. - */ -__isl_give isl_pw_aff *isl_set_dim_max(__isl_take isl_set *set, int pos) -{ - int i; - isl_map *map; - isl_pw_aff *pwaff; - - map = isl_map_from_domain(set); - map = isl_map_add_dims(map, isl_dim_out, 1); - map = isl_map_intersect(map, - equate(isl_map_get_dim(map), isl_dim_in, pos, - isl_dim_out, 0)); - set = isl_map_range(map); - if (!set) - return NULL; - - if (set->n == 0) { - isl_dim *dim = isl_set_get_dim(set); - dim = isl_dim_domain(isl_dim_from_range(dim)); - isl_set_free(set); - return isl_pw_aff_empty(dim); - } - - pwaff = basic_set_dim_max(set->p[0]); - for (i = 1; i < set->n; ++i) { - isl_pw_aff *pwaff_i; - - pwaff_i = basic_set_dim_max(set->p[i]); - pwaff = isl_pw_aff_max(pwaff, pwaff_i); - } - - isl_set_free(set); - - return pwaff; -} - -/* Apply a preimage specified by "mat" on the parameters of "bset". - * bset is assumed to have only parameters and divs. - */ -static struct isl_basic_set *basic_set_parameter_preimage( - struct isl_basic_set *bset, struct isl_mat *mat) -{ - unsigned nparam; - - if (!bset || !mat) - goto error; - - bset->dim = isl_dim_cow(bset->dim); - if (!bset->dim) - goto error; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - - isl_assert(bset->ctx, mat->n_row == 1 + nparam, goto error); - - bset->dim->nparam = 0; - bset->dim->n_out = nparam; - bset = isl_basic_set_preimage(bset, mat); - if (bset) { - bset->dim->nparam = bset->dim->n_out; - bset->dim->n_out = 0; - } - return bset; -error: - isl_mat_free(mat); - isl_basic_set_free(bset); - return NULL; -} - -/* Apply a preimage specified by "mat" on the parameters of "set". - * set is assumed to have only parameters and divs. - */ -static struct isl_set *set_parameter_preimage( - struct isl_set *set, struct isl_mat *mat) -{ - struct isl_dim *dim = NULL; - unsigned nparam; - - if (!set || !mat) - goto error; - - dim = isl_dim_copy(set->dim); - dim = isl_dim_cow(dim); - if (!dim) - goto error; - - nparam = isl_set_dim(set, isl_dim_param); - - isl_assert(set->ctx, mat->n_row == 1 + nparam, goto error); - - dim->nparam = 0; - dim->n_out = nparam; - isl_set_reset_dim(set, dim); - set = isl_set_preimage(set, mat); - if (!set) - goto error2; - dim = isl_dim_copy(set->dim); - dim = isl_dim_cow(dim); - if (!dim) - goto error2; - dim->nparam = dim->n_out; - dim->n_out = 0; - isl_set_reset_dim(set, dim); - return set; -error: - isl_dim_free(dim); - isl_mat_free(mat); -error2: - isl_set_free(set); - return NULL; -} - -/* Intersect the basic set "bset" with the affine space specified by the - * equalities in "eq". - */ -static struct isl_basic_set *basic_set_append_equalities( - struct isl_basic_set *bset, struct isl_mat *eq) -{ - int i, k; - unsigned len; - - if (!bset || !eq) - goto error; - - bset = isl_basic_set_extend_dim(bset, isl_dim_copy(bset->dim), 0, - eq->n_row, 0); - if (!bset) - goto error; - - len = 1 + isl_dim_total(bset->dim) + bset->extra; - for (i = 0; i < eq->n_row; ++i) { - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k], eq->row[i], eq->n_col); - isl_seq_clr(bset->eq[k] + eq->n_col, len - eq->n_col); - } - isl_mat_free(eq); - - bset = isl_basic_set_gauss(bset, NULL); - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_mat_free(eq); - isl_basic_set_free(bset); - return NULL; -} - -/* Intersect the set "set" with the affine space specified by the - * equalities in "eq". - */ -static struct isl_set *set_append_equalities(struct isl_set *set, - struct isl_mat *eq) -{ - int i; - - if (!set || !eq) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = basic_set_append_equalities(set->p[i], - isl_mat_copy(eq)); - if (!set->p[i]) - goto error; - } - isl_mat_free(eq); - return set; -error: - isl_mat_free(eq); - isl_set_free(set); - return NULL; -} - -/* Project the given basic set onto its parameter domain, possibly introducing - * new, explicit, existential variables in the constraints. - * The input has parameters and (possibly implicit) existential variables. - * The output has the same parameters, but only - * explicit existentially quantified variables. - * - * The actual projection is performed by pip, but pip doesn't seem - * to like equalities very much, so we first remove the equalities - * among the parameters by performing a variable compression on - * the parameters. Afterward, an inverse transformation is performed - * and the equalities among the parameters are inserted back in. - */ -static struct isl_set *parameter_compute_divs(struct isl_basic_set *bset) -{ - int i, j; - struct isl_mat *eq; - struct isl_mat *T, *T2; - struct isl_set *set; - unsigned nparam, n_div; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - if (bset->n_eq == 0) - return isl_basic_set_lexmin(bset); - - isl_basic_set_gauss(bset, NULL); - - nparam = isl_basic_set_dim(bset, isl_dim_param); - n_div = isl_basic_set_dim(bset, isl_dim_div); - - for (i = 0, j = n_div - 1; i < bset->n_eq && j >= 0; --j) { - if (!isl_int_is_zero(bset->eq[i][1 + nparam + j])) - ++i; - } - if (i == bset->n_eq) - return isl_basic_set_lexmin(bset); - - eq = isl_mat_sub_alloc6(bset->ctx, bset->eq, i, bset->n_eq - i, - 0, 1 + nparam); - eq = isl_mat_cow(eq); - T = isl_mat_variable_compression(isl_mat_copy(eq), &T2); - if (T && T->n_col == 0) { - isl_mat_free(T); - isl_mat_free(T2); - isl_mat_free(eq); - bset = isl_basic_set_set_to_empty(bset); - return isl_set_from_basic_set(bset); - } - bset = basic_set_parameter_preimage(bset, T); - - set = isl_basic_set_lexmin(bset); - set = set_parameter_preimage(set, T2); - set = set_append_equalities(set, eq); - return set; -} - -/* Compute an explicit representation for all the existentially - * quantified variables. - * The input and output dimensions are first turned into parameters. - * compute_divs then returns a map with the same parameters and - * no input or output dimensions and the dimension specification - * is reset to that of the input. - */ -static struct isl_map *compute_divs(struct isl_basic_map *bmap) -{ - struct isl_basic_set *bset; - struct isl_set *set; - struct isl_map *map; - struct isl_dim *dim, *orig_dim = NULL; - unsigned nparam; - unsigned n_in; - unsigned n_out; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - dim = isl_dim_set_alloc(bmap->ctx, nparam + n_in + n_out, 0); - if (!dim) - goto error; - - orig_dim = bmap->dim; - bmap->dim = dim; - bset = (struct isl_basic_set *)bmap; - - set = parameter_compute_divs(bset); - map = (struct isl_map *)set; - map = isl_map_reset_dim(map, orig_dim); - - return map; -error: - isl_basic_map_free(bmap); - return NULL; -} - -int isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap) -{ - int i; - unsigned off; - - if (!bmap) - return -1; - - off = isl_dim_total(bmap->dim); - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - return 0; - isl_assert(bmap->ctx, isl_int_is_zero(bmap->div[i][1+1+off+i]), - return -1); - } - return 1; -} - -static int map_divs_known(__isl_keep isl_map *map) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int known = isl_basic_map_divs_known(map->p[i]); - if (known <= 0) - return known; - } - - return 1; -} - -/* If bmap contains any unknown divs, then compute explicit - * expressions for them. However, this computation may be - * quite expensive, so first try to remove divs that aren't - * strictly needed. - */ -struct isl_map *isl_basic_map_compute_divs(struct isl_basic_map *bmap) -{ - int known; - struct isl_map *map; - - known = isl_basic_map_divs_known(bmap); - if (known < 0) - goto error; - if (known) - return isl_map_from_basic_map(bmap); - - bmap = isl_basic_map_drop_redundant_divs(bmap); - - known = isl_basic_map_divs_known(bmap); - if (known < 0) - goto error; - if (known) - return isl_map_from_basic_map(bmap); - - map = compute_divs(bmap); - return map; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_map *isl_map_compute_divs(struct isl_map *map) -{ - int i; - int known; - struct isl_map *res; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - known = map_divs_known(map); - if (known < 0) { - isl_map_free(map); - return NULL; - } - if (known) - return map; - - res = isl_basic_map_compute_divs(isl_basic_map_copy(map->p[0])); - for (i = 1 ; i < map->n; ++i) { - struct isl_map *r2; - r2 = isl_basic_map_compute_divs(isl_basic_map_copy(map->p[i])); - if (ISL_F_ISSET(map, ISL_MAP_DISJOINT)) - res = isl_map_union_disjoint(res, r2); - else - res = isl_map_union(res, r2); - } - isl_map_free(map); - - return res; -} - -struct isl_set *isl_basic_set_compute_divs(struct isl_basic_set *bset) -{ - return (struct isl_set *) - isl_basic_map_compute_divs((struct isl_basic_map *)bset); -} - -struct isl_set *isl_set_compute_divs(struct isl_set *set) -{ - return (struct isl_set *) - isl_map_compute_divs((struct isl_map *)set); -} - -struct isl_set *isl_map_domain(struct isl_map *map) -{ - int i; - struct isl_set *set; - - if (!map) - goto error; - - map = isl_map_cow(map); - if (!map) - return NULL; - - set = (struct isl_set *)map; - set->dim = isl_dim_domain(set->dim); - if (!set->dim) - goto error; - for (i = 0; i < map->n; ++i) { - set->p[i] = isl_basic_map_domain(map->p[i]); - if (!set->p[i]) - goto error; - } - ISL_F_CLR(set, ISL_MAP_DISJOINT); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_map_free(map); - return NULL; -} - -struct isl_map *isl_map_union_disjoint( - struct isl_map *map1, struct isl_map *map2) -{ - int i; - unsigned flags = 0; - struct isl_map *map = NULL; - - if (!map1 || !map2) - goto error; - - if (map1->n == 0) { - isl_map_free(map1); - return map2; - } - if (map2->n == 0) { - isl_map_free(map2); - return map1; - } - - isl_assert(map1->ctx, isl_dim_equal(map1->dim, map2->dim), goto error); - - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT) && - ISL_F_ISSET(map2, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - map = isl_map_alloc_dim(isl_dim_copy(map1->dim), - map1->n + map2->n, flags); - if (!map) - goto error; - for (i = 0; i < map1->n; ++i) { - map = isl_map_add_basic_map(map, - isl_basic_map_copy(map1->p[i])); - if (!map) - goto error; - } - for (i = 0; i < map2->n; ++i) { - map = isl_map_add_basic_map(map, - isl_basic_map_copy(map2->p[i])); - if (!map) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return map; -error: - isl_map_free(map); - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -struct isl_map *isl_map_union(struct isl_map *map1, struct isl_map *map2) -{ - map1 = isl_map_union_disjoint(map1, map2); - if (!map1) - return NULL; - if (map1->n > 1) - ISL_F_CLR(map1, ISL_MAP_DISJOINT); - return map1; -} - -struct isl_set *isl_set_union_disjoint( - struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_union_disjoint( - (struct isl_map *)set1, (struct isl_map *)set2); -} - -struct isl_set *isl_set_union(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_union((struct isl_map *)set1, (struct isl_map *)set2); -} - -struct isl_map *isl_map_intersect_range( - struct isl_map *map, struct isl_set *set) -{ - unsigned flags = 0; - struct isl_map *result; - int i, j; - - if (!map || !set) - goto error; - - if (!isl_dim_match(map->dim, isl_dim_param, set->dim, isl_dim_param)) - isl_die(set->ctx, isl_error_invalid, - "parameters don't match", goto error); - - if (isl_dim_size(set->dim, isl_dim_set) != 0 && - !isl_map_compatible_range(map, set)) - isl_die(set->ctx, isl_error_invalid, - "incompatible spaces", goto error); - - if (isl_set_plain_is_universe(set)) { - isl_set_free(set); - return map; - } - - if (ISL_F_ISSET(map, ISL_MAP_DISJOINT) && - ISL_F_ISSET(set, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - result = isl_map_alloc_dim(isl_dim_copy(map->dim), - map->n * set->n, flags); - if (!result) - goto error; - for (i = 0; i < map->n; ++i) - for (j = 0; j < set->n; ++j) { - result = isl_map_add_basic_map(result, - isl_basic_map_intersect_range( - isl_basic_map_copy(map->p[i]), - isl_basic_set_copy(set->p[j]))); - if (!result) - goto error; - } - isl_map_free(map); - isl_set_free(set); - return result; -error: - isl_map_free(map); - isl_set_free(set); - return NULL; -} - -struct isl_map *isl_map_intersect_domain( - struct isl_map *map, struct isl_set *set) -{ - return isl_map_reverse( - isl_map_intersect_range(isl_map_reverse(map), set)); -} - -struct isl_map *isl_map_apply_domain( - struct isl_map *map1, struct isl_map *map2) -{ - if (!map1 || !map2) - goto error; - map1 = isl_map_reverse(map1); - map1 = isl_map_apply_range(map1, map2); - return isl_map_reverse(map1); -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -struct isl_map *isl_map_apply_range( - struct isl_map *map1, struct isl_map *map2) -{ - struct isl_dim *dim_result; - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - dim_result = isl_dim_join(isl_dim_copy(map1->dim), - isl_dim_copy(map2->dim)); - - result = isl_map_alloc_dim(dim_result, map1->n * map2->n, 0); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - result = isl_map_add_basic_map(result, - isl_basic_map_apply_range( - isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j]))); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - if (result && result->n <= 1) - ISL_F_SET(result, ISL_MAP_DISJOINT); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -/* - * returns range - domain - */ -struct isl_basic_set *isl_basic_map_deltas(struct isl_basic_map *bmap) -{ - isl_dim *dims, *target_dim; - struct isl_basic_set *bset; - unsigned dim; - unsigned nparam; - int i; - - if (!bmap) - goto error; - isl_assert(bmap->ctx, isl_dim_tuple_match(bmap->dim, isl_dim_in, - bmap->dim, isl_dim_out), - goto error); - target_dim = isl_dim_domain(isl_basic_map_get_dim(bmap)); - dim = isl_basic_map_n_in(bmap); - nparam = isl_basic_map_n_param(bmap); - bset = isl_basic_set_from_basic_map(bmap); - bset = isl_basic_set_cow(bset); - dims = isl_basic_set_get_dim(bset); - dims = isl_dim_add(dims, isl_dim_set, dim); - bset = isl_basic_set_extend_dim(bset, dims, 0, dim, 0); - bset = isl_basic_set_swap_vars(bset, 2*dim); - for (i = 0; i < dim; ++i) { - int j = isl_basic_map_alloc_equality( - (struct isl_basic_map *)bset); - if (j < 0) - goto error; - isl_seq_clr(bset->eq[j], 1 + isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->eq[j][1+nparam+i], 1); - isl_int_set_si(bset->eq[j][1+nparam+dim+i], 1); - isl_int_set_si(bset->eq[j][1+nparam+2*dim+i], -1); - } - bset = isl_basic_set_project_out(bset, isl_dim_set, dim, 2*dim); - bset = isl_basic_set_reset_dim(bset, target_dim); - return bset; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* - * returns range - domain - */ -struct isl_set *isl_map_deltas(struct isl_map *map) -{ - int i; - isl_dim *dim; - struct isl_set *result; - - if (!map) - return NULL; - - isl_assert(map->ctx, isl_dim_tuple_match(map->dim, isl_dim_in, - map->dim, isl_dim_out), - goto error); - dim = isl_map_get_dim(map); - dim = isl_dim_domain(dim); - result = isl_set_alloc_dim(dim, map->n, 0); - if (!result) - goto error; - for (i = 0; i < map->n; ++i) - result = isl_set_add_basic_set(result, - isl_basic_map_deltas(isl_basic_map_copy(map->p[i]))); - isl_map_free(map); - return result; -error: - isl_map_free(map); - return NULL; -} - -/* - * returns [domain -> range] -> range - domain - */ -__isl_give isl_basic_map *isl_basic_map_deltas_map( - __isl_take isl_basic_map *bmap) -{ - int i, k; - isl_dim *dim; - isl_basic_map *domain; - int nparam, n; - unsigned total; - - if (!isl_dim_tuple_match(bmap->dim, isl_dim_in, bmap->dim, isl_dim_out)) - isl_die(bmap->ctx, isl_error_invalid, - "domain and range don't match", goto error); - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n = isl_basic_map_dim(bmap, isl_dim_in); - - dim = isl_dim_from_range(isl_dim_domain(isl_basic_map_get_dim(bmap))); - domain = isl_basic_map_universe(dim); - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = isl_basic_map_apply_range(bmap, domain); - bmap = isl_basic_map_extend_constraints(bmap, n, 0); - - total = isl_basic_map_total_dim(bmap); - - for (i = 0; i < n; ++i) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + total); - isl_int_set_si(bmap->eq[k][1 + nparam + i], 1); - isl_int_set_si(bmap->eq[k][1 + nparam + n + i], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + n + n + i], 1); - } - - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* - * returns [domain -> range] -> range - domain - */ -__isl_give isl_map *isl_map_deltas_map(__isl_take isl_map *map) -{ - int i; - isl_dim *domain_dim; - - if (!map) - return NULL; - - if (!isl_dim_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - isl_die(map->ctx, isl_error_invalid, - "domain and range don't match", goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - domain_dim = isl_dim_from_range(isl_dim_domain(isl_map_get_dim(map))); - map->dim = isl_dim_from_domain(isl_dim_wrap(map->dim)); - map->dim = isl_dim_join(map->dim, domain_dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_deltas_map(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -static struct isl_basic_map *basic_map_identity(struct isl_dim *dims) -{ - struct isl_basic_map *bmap; - unsigned nparam; - unsigned dim; - int i; - - if (!dims) - return NULL; - - nparam = dims->nparam; - dim = dims->n_out; - bmap = isl_basic_map_alloc_dim(dims, 0, dim, 0); - if (!bmap) - goto error; - - for (i = 0; i < dim; ++i) { - int j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[j][1+nparam+i], 1); - isl_int_set_si(bmap->eq[j][1+nparam+dim+i], -1); - } - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - if (dim->n_in != dim->n_out) - isl_die(dim->ctx, isl_error_invalid, - "number of input and output dimensions needs to be " - "the same", goto error); - return basic_map_identity(dim); -error: - isl_dim_free(dim); - return NULL; -} - -struct isl_basic_map *isl_basic_map_identity_like(struct isl_basic_map *model) -{ - if (!model || !model->dim) - return NULL; - return isl_basic_map_identity(isl_dim_copy(model->dim)); -} - -__isl_give isl_map *isl_map_identity(__isl_take isl_dim *dim) -{ - return isl_map_from_basic_map(isl_basic_map_identity(dim)); -} - -struct isl_map *isl_map_identity_like(struct isl_map *model) -{ - if (!model || !model->dim) - return NULL; - return isl_map_identity(isl_dim_copy(model->dim)); -} - -struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model) -{ - if (!model || !model->dim) - return NULL; - return isl_map_identity(isl_dim_copy(model->dim)); -} - -__isl_give isl_map *isl_set_identity(__isl_take isl_set *set) -{ - isl_dim *dim = isl_set_get_dim(set); - isl_map *id; - id = isl_map_identity(isl_dim_map_from_set(dim)); - return isl_map_intersect_range(id, set); -} - -/* Construct a basic set with all set dimensions having only non-negative - * values. - */ -struct isl_basic_set *isl_basic_set_positive_orthant(struct isl_dim *dims) -{ - int i; - unsigned nparam; - unsigned dim; - struct isl_basic_set *bset; - - if (!dims) - return NULL; - nparam = dims->nparam; - dim = dims->n_out; - bset = isl_basic_set_alloc_dim(dims, 0, 0, dim); - if (!bset) - return NULL; - for (i = 0; i < dim; ++i) { - int k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k], 1 + isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->ineq[k][1 + nparam + i], 1); - } - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Construct the half-space x_pos >= 0. - */ -static __isl_give isl_basic_set *nonneg_halfspace(__isl_take isl_dim *dim, - int pos) -{ - int k; - isl_basic_set *nonneg; - - nonneg = isl_basic_set_alloc_dim(dim, 0, 0, 1); - k = isl_basic_set_alloc_inequality(nonneg); - if (k < 0) - goto error; - isl_seq_clr(nonneg->ineq[k], 1 + isl_basic_set_total_dim(nonneg)); - isl_int_set_si(nonneg->ineq[k][pos], 1); - - return isl_basic_set_finalize(nonneg); -error: - isl_basic_set_free(nonneg); - return NULL; -} - -/* Construct the half-space x_pos <= -1. - */ -static __isl_give isl_basic_set *neg_halfspace(__isl_take isl_dim *dim, int pos) -{ - int k; - isl_basic_set *neg; - - neg = isl_basic_set_alloc_dim(dim, 0, 0, 1); - k = isl_basic_set_alloc_inequality(neg); - if (k < 0) - goto error; - isl_seq_clr(neg->ineq[k], 1 + isl_basic_set_total_dim(neg)); - isl_int_set_si(neg->ineq[k][0], -1); - isl_int_set_si(neg->ineq[k][pos], -1); - - return isl_basic_set_finalize(neg); -error: - isl_basic_set_free(neg); - return NULL; -} - -__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - isl_basic_set *nonneg; - isl_basic_set *neg; - - if (!set) - return NULL; - if (n == 0) - return set; - - isl_assert(set->ctx, first + n <= isl_set_dim(set, type), goto error); - - for (i = 0; i < n; ++i) { - nonneg = nonneg_halfspace(isl_set_get_dim(set), - pos(set->dim, type) + first + i); - neg = neg_halfspace(isl_set_get_dim(set), - pos(set->dim, type) + first + i); - - set = isl_set_intersect(set, isl_basic_set_union(nonneg, neg)); - } - - return set; -error: - isl_set_free(set); - return NULL; -} - -static int foreach_orthant(__isl_take isl_set *set, int *signs, int first, - int len, int (*fn)(__isl_take isl_set *orthant, int *signs, void *user), - void *user) -{ - isl_set *half; - - if (!set) - return -1; - if (isl_set_plain_is_empty(set)) { - isl_set_free(set); - return 0; - } - if (first == len) - return fn(set, signs, user); - - signs[first] = 1; - half = isl_set_from_basic_set(nonneg_halfspace(isl_set_get_dim(set), - 1 + first)); - half = isl_set_intersect(half, isl_set_copy(set)); - if (foreach_orthant(half, signs, first + 1, len, fn, user) < 0) - goto error; - - signs[first] = -1; - half = isl_set_from_basic_set(neg_halfspace(isl_set_get_dim(set), - 1 + first)); - half = isl_set_intersect(half, set); - return foreach_orthant(half, signs, first + 1, len, fn, user); -error: - isl_set_free(set); - return -1; -} - -/* Call "fn" on the intersections of "set" with each of the orthants - * (except for obviously empty intersections). The orthant is identified - * by the signs array, with each entry having value 1 or -1 according - * to the sign of the corresponding variable. - */ -int isl_set_foreach_orthant(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_set *orthant, int *signs, void *user), - void *user) -{ - unsigned nparam; - unsigned nvar; - int *signs; - int r; - - if (!set) - return -1; - if (isl_set_plain_is_empty(set)) - return 0; - - nparam = isl_set_dim(set, isl_dim_param); - nvar = isl_set_dim(set, isl_dim_set); - - signs = isl_alloc_array(set->ctx, int, nparam + nvar); - - r = foreach_orthant(isl_set_copy(set), signs, 0, nparam + nvar, - fn, user); - - free(signs); - - return r; -} - -int isl_set_is_equal(struct isl_set *set1, struct isl_set *set2) -{ - return isl_map_is_equal((struct isl_map *)set1, (struct isl_map *)set2); -} - -int isl_basic_map_is_subset( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - int is_subset; - struct isl_map *map1; - struct isl_map *map2; - - if (!bmap1 || !bmap2) - return -1; - - map1 = isl_map_from_basic_map(isl_basic_map_copy(bmap1)); - map2 = isl_map_from_basic_map(isl_basic_map_copy(bmap2)); - - is_subset = isl_map_is_subset(map1, map2); - - isl_map_free(map1); - isl_map_free(map2); - - return is_subset; -} - -int isl_basic_map_is_equal( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - int is_subset; - - if (!bmap1 || !bmap2) - return -1; - is_subset = isl_basic_map_is_subset(bmap1, bmap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_basic_map_is_subset(bmap2, bmap1); - return is_subset; -} - -int isl_basic_set_is_equal( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - return isl_basic_map_is_equal( - (struct isl_basic_map *)bset1, (struct isl_basic_map *)bset2); -} - -int isl_map_is_empty(struct isl_map *map) -{ - int i; - int is_empty; - - if (!map) - return -1; - for (i = 0; i < map->n; ++i) { - is_empty = isl_basic_map_is_empty(map->p[i]); - if (is_empty < 0) - return -1; - if (!is_empty) - return 0; - } - return 1; -} - -int isl_map_plain_is_empty(__isl_keep isl_map *map) -{ - return map ? map->n == 0 : -1; -} - -int isl_map_fast_is_empty(__isl_keep isl_map *map) -{ - return isl_map_plain_is_empty(map); -} - -int isl_set_plain_is_empty(struct isl_set *set) -{ - return set ? set->n == 0 : -1; -} - -int isl_set_fast_is_empty(__isl_keep isl_set *set) -{ - return isl_set_plain_is_empty(set); -} - -int isl_set_is_empty(struct isl_set *set) -{ - return isl_map_is_empty((struct isl_map *)set); -} - -int isl_map_has_equal_dim(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - if (!map1 || !map2) - return -1; - - return isl_dim_equal(map1->dim, map2->dim); -} - -int isl_set_has_equal_dim(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - if (!set1 || !set2) - return -1; - - return isl_dim_equal(set1->dim, set2->dim); -} - -int isl_map_is_equal(struct isl_map *map1, struct isl_map *map2) -{ - int is_subset; - - if (!map1 || !map2) - return -1; - is_subset = isl_map_is_subset(map1, map2); - if (is_subset != 1) - return is_subset; - is_subset = isl_map_is_subset(map2, map1); - return is_subset; -} - -int isl_basic_map_is_strict_subset( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - int is_subset; - - if (!bmap1 || !bmap2) - return -1; - is_subset = isl_basic_map_is_subset(bmap1, bmap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_basic_map_is_subset(bmap2, bmap1); - if (is_subset == -1) - return is_subset; - return !is_subset; -} - -int isl_map_is_strict_subset(struct isl_map *map1, struct isl_map *map2) -{ - int is_subset; - - if (!map1 || !map2) - return -1; - is_subset = isl_map_is_subset(map1, map2); - if (is_subset != 1) - return is_subset; - is_subset = isl_map_is_subset(map2, map1); - if (is_subset == -1) - return is_subset; - return !is_subset; -} - -int isl_set_is_strict_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_map_is_strict_subset((isl_map *)set1, (isl_map *)set2); -} - -int isl_basic_map_is_universe(struct isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return bmap->n_eq == 0 && bmap->n_ineq == 0; -} - -int isl_basic_set_is_universe(struct isl_basic_set *bset) -{ - if (!bset) - return -1; - return bset->n_eq == 0 && bset->n_ineq == 0; -} - -int isl_map_plain_is_universe(__isl_keep isl_map *map) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int r = isl_basic_map_is_universe(map->p[i]); - if (r < 0 || r) - return r; - } - - return 0; -} - -int isl_set_plain_is_universe(__isl_keep isl_set *set) -{ - return isl_map_plain_is_universe((isl_map *) set); -} - -int isl_set_fast_is_universe(__isl_keep isl_set *set) -{ - return isl_set_plain_is_universe(set); -} - -int isl_basic_map_is_empty(struct isl_basic_map *bmap) -{ - struct isl_basic_set *bset = NULL; - struct isl_vec *sample = NULL; - int empty; - unsigned total; - - if (!bmap) - return -1; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return 1; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) { - struct isl_basic_map *copy = isl_basic_map_copy(bmap); - copy = isl_basic_map_remove_redundancies(copy); - empty = ISL_F_ISSET(copy, ISL_BASIC_MAP_EMPTY); - isl_basic_map_free(copy); - return empty; - } - - total = 1 + isl_basic_map_total_dim(bmap); - if (bmap->sample && bmap->sample->size == total) { - int contains = isl_basic_map_contains(bmap, bmap->sample); - if (contains < 0) - return -1; - if (contains) - return 0; - } - isl_vec_free(bmap->sample); - bmap->sample = NULL; - bset = isl_basic_map_underlying_set(isl_basic_map_copy(bmap)); - if (!bset) - return -1; - sample = isl_basic_set_sample_vec(bset); - if (!sample) - return -1; - empty = sample->size == 0; - isl_vec_free(bmap->sample); - bmap->sample = sample; - if (empty) - ISL_F_SET(bmap, ISL_BASIC_MAP_EMPTY); - - return empty; -} - -int isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY); -} - -int isl_basic_map_fast_is_empty(__isl_keep isl_basic_map *bmap) -{ - return isl_basic_map_plain_is_empty(bmap); -} - -int isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset) -{ - if (!bset) - return -1; - return ISL_F_ISSET(bset, ISL_BASIC_SET_EMPTY); -} - -int isl_basic_set_fast_is_empty(__isl_keep isl_basic_set *bset) -{ - return isl_basic_set_plain_is_empty(bset); -} - -int isl_basic_set_is_empty(struct isl_basic_set *bset) -{ - return isl_basic_map_is_empty((struct isl_basic_map *)bset); -} - -struct isl_map *isl_basic_map_union( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - struct isl_map *map; - if (!bmap1 || !bmap2) - return NULL; - - isl_assert(bmap1->ctx, isl_dim_equal(bmap1->dim, bmap2->dim), goto error); - - map = isl_map_alloc_dim(isl_dim_copy(bmap1->dim), 2, 0); - if (!map) - goto error; - map = isl_map_add_basic_map(map, bmap1); - map = isl_map_add_basic_map(map, bmap2); - return map; -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_set *isl_basic_set_union( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - return (struct isl_set *)isl_basic_map_union( - (struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2); -} - -/* Order divs such that any div only depends on previous divs */ -struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap) -{ - int i; - unsigned off; - - if (!bmap) - return NULL; - - off = isl_dim_total(bmap->dim); - - for (i = 0; i < bmap->n_div; ++i) { - int pos; - if (isl_int_is_zero(bmap->div[i][0])) - continue; - pos = isl_seq_first_non_zero(bmap->div[i]+1+1+off+i, - bmap->n_div-i); - if (pos == -1) - continue; - isl_basic_map_swap_div(bmap, i, i + pos); - --i; - } - return bmap; -} - -struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_order_divs((struct isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map) -{ - int i; - - if (!map) - return 0; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_order_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Apply the expansion computed by isl_merge_divs. - * The expansion itself is given by "exp" while the resulting - * list of divs is given by "div". - */ -__isl_give isl_basic_set *isl_basic_set_expand_divs( - __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp) -{ - int i, j; - int n_div; - - bset = isl_basic_set_cow(bset); - if (!bset || !div) - goto error; - - if (div->n_row < bset->n_div) - isl_die(isl_mat_get_ctx(div), isl_error_invalid, - "not an expansion", goto error); - - bset = isl_basic_map_extend_dim(bset, isl_dim_copy(bset->dim), - div->n_row - bset->n_div, 0, - 2 * (div->n_row - bset->n_div)); - - n_div = bset->n_div; - for (i = n_div; i < div->n_row; ++i) - if (isl_basic_set_alloc_div(bset) < 0) - goto error; - - j = n_div - 1; - for (i = div->n_row - 1; i >= 0; --i) { - if (j >= 0 && exp[j] == i) { - if (i != j) - isl_basic_map_swap_div(bset, i, j); - j--; - } else { - isl_seq_cpy(bset->div[i], div->row[i], div->n_col); - if (isl_basic_map_add_div_constraints(bset, i) < 0) - goto error; - } - } - - isl_mat_free(div); - return bset; -error: - isl_basic_set_free(bset); - isl_mat_free(div); - return NULL; -} - -/* Look for a div in dst that corresponds to the div "div" in src. - * The divs before "div" in src and dst are assumed to be the same. - * - * Returns -1 if no corresponding div was found and the position - * of the corresponding div in dst otherwise. - */ -static int find_div(struct isl_basic_map *dst, - struct isl_basic_map *src, unsigned div) -{ - int i; - - unsigned total = isl_dim_total(src->dim); - - isl_assert(dst->ctx, div <= dst->n_div, return -1); - for (i = div; i < dst->n_div; ++i) - if (isl_seq_eq(dst->div[i], src->div[div], 1+1+total+div) && - isl_seq_first_non_zero(dst->div[i]+1+1+total+div, - dst->n_div - div) == -1) - return i; - return -1; -} - -struct isl_basic_map *isl_basic_map_align_divs( - struct isl_basic_map *dst, struct isl_basic_map *src) -{ - int i; - unsigned total = isl_dim_total(src->dim); - - if (!dst || !src) - goto error; - - if (src->n_div == 0) - return dst; - - for (i = 0; i < src->n_div; ++i) - isl_assert(src->ctx, !isl_int_is_zero(src->div[i][0]), goto error); - - src = isl_basic_map_order_divs(src); - dst = isl_basic_map_cow(dst); - dst = isl_basic_map_extend_dim(dst, isl_dim_copy(dst->dim), - src->n_div, 0, 2 * src->n_div); - if (!dst) - return NULL; - for (i = 0; i < src->n_div; ++i) { - int j = find_div(dst, src, i); - if (j < 0) { - j = isl_basic_map_alloc_div(dst); - if (j < 0) - goto error; - isl_seq_cpy(dst->div[j], src->div[i], 1+1+total+i); - isl_seq_clr(dst->div[j]+1+1+total+i, dst->n_div - i); - if (isl_basic_map_add_div_constraints(dst, j) < 0) - goto error; - } - if (j != i) - isl_basic_map_swap_div(dst, i, j); - } - return dst; -error: - isl_basic_map_free(dst); - return NULL; -} - -struct isl_basic_set *isl_basic_set_align_divs( - struct isl_basic_set *dst, struct isl_basic_set *src) -{ - return (struct isl_basic_set *)isl_basic_map_align_divs( - (struct isl_basic_map *)dst, (struct isl_basic_map *)src); -} - -struct isl_map *isl_map_align_divs(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - map = isl_map_compute_divs(map); - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 1; i < map->n; ++i) - map->p[0] = isl_basic_map_align_divs(map->p[0], map->p[i]); - for (i = 1; i < map->n; ++i) - map->p[i] = isl_basic_map_align_divs(map->p[i], map->p[0]); - - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -} - -struct isl_set *isl_set_align_divs(struct isl_set *set) -{ - return (struct isl_set *)isl_map_align_divs((struct isl_map *)set); -} - -struct isl_set *isl_set_apply(struct isl_set *set, struct isl_map *map) -{ - if (!set || !map) - goto error; - isl_assert(set->ctx, isl_map_compatible_domain(map, set), goto error); - map = isl_map_intersect_domain(map, set); - set = isl_map_range(map); - return set; -error: - isl_set_free(set); - isl_map_free(map); - return NULL; -} - -/* There is no need to cow as removing empty parts doesn't change - * the meaning of the set. - */ -struct isl_map *isl_map_remove_empty_parts(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - - for (i = map->n-1; i >= 0; --i) { - if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_EMPTY)) - continue; - isl_basic_map_free(map->p[i]); - if (i != map->n-1) { - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - map->p[i] = map->p[map->n-1]; - } - map->n--; - } - - return map; -} - -struct isl_set *isl_set_remove_empty_parts(struct isl_set *set) -{ - return (struct isl_set *) - isl_map_remove_empty_parts((struct isl_map *)set); -} - -struct isl_basic_map *isl_map_copy_basic_map(struct isl_map *map) -{ - struct isl_basic_map *bmap; - if (!map || map->n == 0) - return NULL; - bmap = map->p[map->n-1]; - isl_assert(map->ctx, ISL_F_ISSET(bmap, ISL_BASIC_SET_FINAL), return NULL); - return isl_basic_map_copy(bmap); -} - -struct isl_basic_set *isl_set_copy_basic_set(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_copy_basic_map((struct isl_map *)set); -} - -__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap) -{ - int i; - - if (!map || !bmap) - goto error; - for (i = map->n-1; i >= 0; --i) { - if (map->p[i] != bmap) - continue; - map = isl_map_cow(map); - if (!map) - goto error; - isl_basic_map_free(map->p[i]); - if (i != map->n-1) { - ISL_F_CLR(map, ISL_SET_NORMALIZED); - map->p[i] = map->p[map->n-1]; - } - map->n--; - return map; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop_basic_set(struct isl_set *set, - struct isl_basic_set *bset) -{ - return (struct isl_set *)isl_map_drop_basic_map((struct isl_map *)set, - (struct isl_basic_map *)bset); -} - -/* Given two basic sets bset1 and bset2, compute the maximal difference - * between the values of dimension pos in bset1 and those in bset2 - * for any common value of the parameters and dimensions preceding pos. - */ -static enum isl_lp_result basic_set_maximal_difference_at( - __isl_keep isl_basic_set *bset1, __isl_keep isl_basic_set *bset2, - int pos, isl_int *opt) -{ - struct isl_dim *dims; - struct isl_basic_map *bmap1 = NULL; - struct isl_basic_map *bmap2 = NULL; - struct isl_ctx *ctx; - struct isl_vec *obj; - unsigned total; - unsigned nparam; - unsigned dim1, dim2; - enum isl_lp_result res; - - if (!bset1 || !bset2) - return isl_lp_error; - - nparam = isl_basic_set_n_param(bset1); - dim1 = isl_basic_set_n_dim(bset1); - dim2 = isl_basic_set_n_dim(bset2); - dims = isl_dim_alloc(bset1->ctx, nparam, pos, dim1 - pos); - bmap1 = isl_basic_map_from_basic_set(isl_basic_set_copy(bset1), dims); - dims = isl_dim_alloc(bset2->ctx, nparam, pos, dim2 - pos); - bmap2 = isl_basic_map_from_basic_set(isl_basic_set_copy(bset2), dims); - if (!bmap1 || !bmap2) - goto error; - bmap1 = isl_basic_map_cow(bmap1); - bmap1 = isl_basic_map_extend(bmap1, nparam, - pos, (dim1 - pos) + (dim2 - pos), - bmap2->n_div, bmap2->n_eq, bmap2->n_ineq); - bmap1 = add_constraints(bmap1, bmap2, 0, dim1 - pos); - if (!bmap1) - goto error; - total = isl_basic_map_total_dim(bmap1); - ctx = bmap1->ctx; - obj = isl_vec_alloc(ctx, 1 + total); - isl_seq_clr(obj->block.data, 1 + total); - isl_int_set_si(obj->block.data[1+nparam+pos], 1); - isl_int_set_si(obj->block.data[1+nparam+pos+(dim1-pos)], -1); - if (!obj) - goto error; - res = isl_basic_map_solve_lp(bmap1, 1, obj->block.data, ctx->one, - opt, NULL, NULL); - isl_basic_map_free(bmap1); - isl_vec_free(obj); - return res; -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return isl_lp_error; -} - -/* Given two _disjoint_ basic sets bset1 and bset2, check whether - * for any common value of the parameters and dimensions preceding pos - * in both basic sets, the values of dimension pos in bset1 are - * smaller or larger than those in bset2. - * - * Returns - * 1 if bset1 follows bset2 - * -1 if bset1 precedes bset2 - * 0 if bset1 and bset2 are incomparable - * -2 if some error occurred. - */ -int isl_basic_set_compare_at(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, int pos) -{ - isl_int opt; - enum isl_lp_result res; - int cmp; - - isl_int_init(opt); - - res = basic_set_maximal_difference_at(bset1, bset2, pos, &opt); - - if (res == isl_lp_empty) - cmp = 0; - else if ((res == isl_lp_ok && isl_int_is_pos(opt)) || - res == isl_lp_unbounded) - cmp = 1; - else if (res == isl_lp_ok && isl_int_is_neg(opt)) - cmp = -1; - else - cmp = -2; - - isl_int_clear(opt); - return cmp; -} - -/* Given two basic sets bset1 and bset2, check whether - * for any common value of the parameters and dimensions preceding pos - * there is a value of dimension pos in bset1 that is larger - * than a value of the same dimension in bset2. - * - * Return - * 1 if there exists such a pair - * 0 if there is no such pair, but there is a pair of equal values - * -1 otherwise - * -2 if some error occurred. - */ -int isl_basic_set_follows_at(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2, int pos) -{ - isl_int opt; - enum isl_lp_result res; - int cmp; - - isl_int_init(opt); - - res = basic_set_maximal_difference_at(bset1, bset2, pos, &opt); - - if (res == isl_lp_empty) - cmp = -1; - else if ((res == isl_lp_ok && isl_int_is_pos(opt)) || - res == isl_lp_unbounded) - cmp = 1; - else if (res == isl_lp_ok && isl_int_is_neg(opt)) - cmp = -1; - else if (res == isl_lp_ok) - cmp = 0; - else - cmp = -2; - - isl_int_clear(opt); - return cmp; -} - -/* Given two sets set1 and set2, check whether - * for any common value of the parameters and dimensions preceding pos - * there is a value of dimension pos in set1 that is larger - * than a value of the same dimension in set2. - * - * Return - * 1 if there exists such a pair - * 0 if there is no such pair, but there is a pair of equal values - * -1 otherwise - * -2 if some error occurred. - */ -int isl_set_follows_at(__isl_keep isl_set *set1, - __isl_keep isl_set *set2, int pos) -{ - int i, j; - int follows = -1; - - if (!set1 || !set2) - return -2; - - for (i = 0; i < set1->n; ++i) - for (j = 0; j < set2->n; ++j) { - int f; - f = isl_basic_set_follows_at(set1->p[i], set2->p[j], pos); - if (f == 1 || f == -2) - return f; - if (f > follows) - follows = f; - } - - return follows; -} - -static int isl_basic_map_plain_has_fixed_var(__isl_keep isl_basic_map *bmap, - unsigned pos, isl_int *val) -{ - int i; - int d; - unsigned total; - - if (!bmap) - return -1; - total = isl_basic_map_total_dim(bmap); - for (i = 0, d = total-1; i < bmap->n_eq && d+1 > pos; ++i) { - for (; d+1 > pos; --d) - if (!isl_int_is_zero(bmap->eq[i][1+d])) - break; - if (d != pos) - continue; - if (isl_seq_first_non_zero(bmap->eq[i]+1, d) != -1) - return 0; - if (isl_seq_first_non_zero(bmap->eq[i]+1+d+1, total-d-1) != -1) - return 0; - if (!isl_int_is_one(bmap->eq[i][1+d])) - return 0; - if (val) - isl_int_neg(*val, bmap->eq[i][0]); - return 1; - } - return 0; -} - -static int isl_map_plain_has_fixed_var(__isl_keep isl_map *map, - unsigned pos, isl_int *val) -{ - int i; - isl_int v; - isl_int tmp; - int fixed; - - if (!map) - return -1; - if (map->n == 0) - return 0; - if (map->n == 1) - return isl_basic_map_plain_has_fixed_var(map->p[0], pos, val); - isl_int_init(v); - isl_int_init(tmp); - fixed = isl_basic_map_plain_has_fixed_var(map->p[0], pos, &v); - for (i = 1; fixed == 1 && i < map->n; ++i) { - fixed = isl_basic_map_plain_has_fixed_var(map->p[i], pos, &tmp); - if (fixed == 1 && isl_int_ne(tmp, v)) - fixed = 0; - } - if (val) - isl_int_set(*val, v); - isl_int_clear(tmp); - isl_int_clear(v); - return fixed; -} - -static int isl_basic_set_plain_has_fixed_var(__isl_keep isl_basic_set *bset, - unsigned pos, isl_int *val) -{ - return isl_basic_map_plain_has_fixed_var((struct isl_basic_map *)bset, - pos, val); -} - -static int isl_set_plain_has_fixed_var(__isl_keep isl_set *set, unsigned pos, - isl_int *val) -{ - return isl_map_plain_has_fixed_var((struct isl_map *)set, pos, val); -} - -int isl_basic_map_plain_is_fixed(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - if (pos >= isl_basic_map_dim(bmap, type)) - return -1; - return isl_basic_map_plain_has_fixed_var(bmap, - isl_basic_map_offset(bmap, type) - 1 + pos, val); -} - -int isl_map_plain_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - if (pos >= isl_map_dim(map, type)) - return -1; - return isl_map_plain_has_fixed_var(map, - map_offset(map, type) - 1 + pos, val); -} - -int isl_map_fast_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - return isl_map_plain_is_fixed(map, type, pos, val); -} - -/* Check if dimension dim has fixed value and if so and if val is not NULL, - * then return this fixed value in *val. - */ -int isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset, - unsigned dim, isl_int *val) -{ - return isl_basic_set_plain_has_fixed_var(bset, - isl_basic_set_n_param(bset) + dim, val); -} - -/* Check if dimension dim has fixed value and if so and if val is not NULL, - * then return this fixed value in *val. - */ -int isl_set_plain_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val) -{ - return isl_set_plain_has_fixed_var(set, isl_set_n_param(set) + dim, val); -} - -int isl_set_fast_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val) -{ - return isl_set_plain_dim_is_fixed(set, dim, val); -} - -/* Check if input variable in has fixed value and if so and if val is not NULL, - * then return this fixed value in *val. - */ -int isl_map_plain_input_is_fixed(__isl_keep isl_map *map, - unsigned in, isl_int *val) -{ - return isl_map_plain_has_fixed_var(map, isl_map_n_param(map) + in, val); -} - -/* Check if dimension dim has an (obvious) fixed lower bound and if so - * and if val is not NULL, then return this lower bound in *val. - */ -int isl_basic_set_plain_dim_has_fixed_lower_bound( - __isl_keep isl_basic_set *bset, unsigned dim, isl_int *val) -{ - int i, i_eq = -1, i_ineq = -1; - isl_int *c; - unsigned total; - unsigned nparam; - - if (!bset) - return -1; - total = isl_basic_set_total_dim(bset); - nparam = isl_basic_set_n_param(bset); - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][1+nparam+dim])) - continue; - if (i_eq != -1) - return 0; - i_eq = i; - } - for (i = 0; i < bset->n_ineq; ++i) { - if (!isl_int_is_pos(bset->ineq[i][1+nparam+dim])) - continue; - if (i_eq != -1 || i_ineq != -1) - return 0; - i_ineq = i; - } - if (i_eq == -1 && i_ineq == -1) - return 0; - c = i_eq != -1 ? bset->eq[i_eq] : bset->ineq[i_ineq]; - /* The coefficient should always be one due to normalization. */ - if (!isl_int_is_one(c[1+nparam+dim])) - return 0; - if (isl_seq_first_non_zero(c+1, nparam+dim) != -1) - return 0; - if (isl_seq_first_non_zero(c+1+nparam+dim+1, - total - nparam - dim - 1) != -1) - return 0; - if (val) - isl_int_neg(*val, c[0]); - return 1; -} - -int isl_set_plain_dim_has_fixed_lower_bound(__isl_keep isl_set *set, - unsigned dim, isl_int *val) -{ - int i; - isl_int v; - isl_int tmp; - int fixed; - - if (!set) - return -1; - if (set->n == 0) - return 0; - if (set->n == 1) - return isl_basic_set_plain_dim_has_fixed_lower_bound(set->p[0], - dim, val); - isl_int_init(v); - isl_int_init(tmp); - fixed = isl_basic_set_plain_dim_has_fixed_lower_bound(set->p[0], - dim, &v); - for (i = 1; fixed == 1 && i < set->n; ++i) { - fixed = isl_basic_set_plain_dim_has_fixed_lower_bound(set->p[i], - dim, &tmp); - if (fixed == 1 && isl_int_ne(tmp, v)) - fixed = 0; - } - if (val) - isl_int_set(*val, v); - isl_int_clear(tmp); - isl_int_clear(v); - return fixed; -} - -struct constraint { - unsigned size; - isl_int *c; -}; - -/* uset_gist depends on constraints without existentially quantified - * variables sorting first. - */ -static int qsort_constraint_cmp(const void *p1, const void *p2) -{ - const struct constraint *c1 = (const struct constraint *)p1; - const struct constraint *c2 = (const struct constraint *)p2; - int l1, l2; - unsigned size = isl_min(c1->size, c2->size); - - l1 = isl_seq_last_non_zero(c1->c, size); - l2 = isl_seq_last_non_zero(c2->c, size); - - if (l1 != l2) - return l1 - l2; - - return isl_seq_cmp(c1->c, c2->c, size); -} - -static struct isl_basic_map *isl_basic_map_sort_constraints( - struct isl_basic_map *bmap) -{ - int i; - struct constraint *c; - unsigned total; - - if (!bmap) - return NULL; - total = isl_basic_map_total_dim(bmap); - c = isl_alloc_array(bmap->ctx, struct constraint, bmap->n_ineq); - if (!c) - goto error; - for (i = 0; i < bmap->n_ineq; ++i) { - c[i].size = total; - c[i].c = bmap->ineq[i]; - } - qsort(c, bmap->n_ineq, sizeof(struct constraint), qsort_constraint_cmp); - for (i = 0; i < bmap->n_ineq; ++i) - bmap->ineq[i] = c[i].c; - free(c); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_sort_constraints( - __isl_take isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_sort_constraints( - (struct isl_basic_map *)bset); -} - -struct isl_basic_map *isl_basic_map_normalize(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NORMALIZED)) - return bmap; - bmap = isl_basic_map_remove_redundancies(bmap); - bmap = isl_basic_map_sort_constraints(bmap); - ISL_F_SET(bmap, ISL_BASIC_MAP_NORMALIZED); - return bmap; -} - -struct isl_basic_set *isl_basic_set_normalize(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_normalize( - (struct isl_basic_map *)bset); -} - -int isl_basic_map_plain_cmp(const __isl_keep isl_basic_map *bmap1, - const __isl_keep isl_basic_map *bmap2) -{ - int i, cmp; - unsigned total; - - if (bmap1 == bmap2) - return 0; - if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) != - ISL_F_ISSET(bmap2, ISL_BASIC_MAP_RATIONAL)) - return ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) ? -1 : 1; - if (isl_basic_map_n_param(bmap1) != isl_basic_map_n_param(bmap2)) - return isl_basic_map_n_param(bmap1) - isl_basic_map_n_param(bmap2); - if (isl_basic_map_n_in(bmap1) != isl_basic_map_n_in(bmap2)) - return isl_basic_map_n_out(bmap1) - isl_basic_map_n_out(bmap2); - if (isl_basic_map_n_out(bmap1) != isl_basic_map_n_out(bmap2)) - return isl_basic_map_n_out(bmap1) - isl_basic_map_n_out(bmap2); - if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_EMPTY) && - ISL_F_ISSET(bmap2, ISL_BASIC_MAP_EMPTY)) - return 0; - if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_EMPTY)) - return 1; - if (ISL_F_ISSET(bmap2, ISL_BASIC_MAP_EMPTY)) - return -1; - if (bmap1->n_eq != bmap2->n_eq) - return bmap1->n_eq - bmap2->n_eq; - if (bmap1->n_ineq != bmap2->n_ineq) - return bmap1->n_ineq - bmap2->n_ineq; - if (bmap1->n_div != bmap2->n_div) - return bmap1->n_div - bmap2->n_div; - total = isl_basic_map_total_dim(bmap1); - for (i = 0; i < bmap1->n_eq; ++i) { - cmp = isl_seq_cmp(bmap1->eq[i], bmap2->eq[i], 1+total); - if (cmp) - return cmp; - } - for (i = 0; i < bmap1->n_ineq; ++i) { - cmp = isl_seq_cmp(bmap1->ineq[i], bmap2->ineq[i], 1+total); - if (cmp) - return cmp; - } - for (i = 0; i < bmap1->n_div; ++i) { - cmp = isl_seq_cmp(bmap1->div[i], bmap2->div[i], 1+1+total); - if (cmp) - return cmp; - } - return 0; -} - -int isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2) -{ - return isl_basic_map_plain_cmp(bmap1, bmap2) == 0; -} - -int isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2) -{ - return isl_basic_map_plain_is_equal((isl_basic_map *)bset1, - (isl_basic_map *)bset2); -} - -static int qsort_bmap_cmp(const void *p1, const void *p2) -{ - const struct isl_basic_map *bmap1 = *(const struct isl_basic_map **)p1; - const struct isl_basic_map *bmap2 = *(const struct isl_basic_map **)p2; - - return isl_basic_map_plain_cmp(bmap1, bmap2); -} - -/* We normalize in place, but if anything goes wrong we need - * to return NULL, so we need to make sure we don't change the - * meaning of any possible other copies of map. - */ -struct isl_map *isl_map_normalize(struct isl_map *map) -{ - int i, j; - struct isl_basic_map *bmap; - - if (!map) - return NULL; - if (ISL_F_ISSET(map, ISL_MAP_NORMALIZED)) - return map; - for (i = 0; i < map->n; ++i) { - bmap = isl_basic_map_normalize(isl_basic_map_copy(map->p[i])); - if (!bmap) - goto error; - isl_basic_map_free(map->p[i]); - map->p[i] = bmap; - } - qsort(map->p, map->n, sizeof(struct isl_basic_map *), qsort_bmap_cmp); - ISL_F_SET(map, ISL_MAP_NORMALIZED); - map = isl_map_remove_empty_parts(map); - if (!map) - return NULL; - for (i = map->n - 1; i >= 1; --i) { - if (!isl_basic_map_plain_is_equal(map->p[i-1], map->p[i])) - continue; - isl_basic_map_free(map->p[i-1]); - for (j = i; j < map->n; ++j) - map->p[j-1] = map->p[j]; - map->n--; - } - return map; -error: - isl_map_free(map); - return NULL; - -} - -struct isl_set *isl_set_normalize(struct isl_set *set) -{ - return (struct isl_set *)isl_map_normalize((struct isl_map *)set); -} - -int isl_map_plain_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - int i; - int equal; - - if (!map1 || !map2) - return -1; - - if (map1 == map2) - return 1; - if (!isl_dim_equal(map1->dim, map2->dim)) - return 0; - - map1 = isl_map_copy(map1); - map2 = isl_map_copy(map2); - map1 = isl_map_normalize(map1); - map2 = isl_map_normalize(map2); - if (!map1 || !map2) - goto error; - equal = map1->n == map2->n; - for (i = 0; equal && i < map1->n; ++i) { - equal = isl_basic_map_plain_is_equal(map1->p[i], map2->p[i]); - if (equal < 0) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return equal; -error: - isl_map_free(map1); - isl_map_free(map2); - return -1; -} - -int isl_map_fast_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - return isl_map_plain_is_equal(map1, map2); -} - -int isl_set_plain_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_map_plain_is_equal((struct isl_map *)set1, - (struct isl_map *)set2); -} - -int isl_set_fast_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_set_plain_is_equal(set1, set2); -} - -/* Return an interval that ranges from min to max (inclusive) - */ -struct isl_basic_set *isl_basic_set_interval(struct isl_ctx *ctx, - isl_int min, isl_int max) -{ - int k; - struct isl_basic_set *bset = NULL; - - bset = isl_basic_set_alloc(ctx, 0, 1, 0, 0, 2); - if (!bset) - goto error; - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_int_set_si(bset->ineq[k][1], 1); - isl_int_neg(bset->ineq[k][0], min); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_int_set_si(bset->ineq[k][1], -1); - isl_int_set(bset->ineq[k][0], max); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Return the Cartesian product of the basic sets in list (in the given order). - */ -__isl_give isl_basic_set *isl_basic_set_list_product( - __isl_take struct isl_basic_set_list *list) -{ - int i; - unsigned dim; - unsigned nparam; - unsigned extra; - unsigned n_eq; - unsigned n_ineq; - struct isl_basic_set *product = NULL; - - if (!list) - goto error; - isl_assert(list->ctx, list->n > 0, goto error); - isl_assert(list->ctx, list->p[0], goto error); - nparam = isl_basic_set_n_param(list->p[0]); - dim = isl_basic_set_n_dim(list->p[0]); - extra = list->p[0]->n_div; - n_eq = list->p[0]->n_eq; - n_ineq = list->p[0]->n_ineq; - for (i = 1; i < list->n; ++i) { - isl_assert(list->ctx, list->p[i], goto error); - isl_assert(list->ctx, - nparam == isl_basic_set_n_param(list->p[i]), goto error); - dim += isl_basic_set_n_dim(list->p[i]); - extra += list->p[i]->n_div; - n_eq += list->p[i]->n_eq; - n_ineq += list->p[i]->n_ineq; - } - product = isl_basic_set_alloc(list->ctx, nparam, dim, extra, - n_eq, n_ineq); - if (!product) - goto error; - dim = 0; - for (i = 0; i < list->n; ++i) { - isl_basic_set_add_constraints(product, - isl_basic_set_copy(list->p[i]), dim); - dim += isl_basic_set_n_dim(list->p[i]); - } - isl_basic_set_list_free(list); - return product; -error: - isl_basic_set_free(product); - isl_basic_set_list_free(list); - return NULL; -} - -struct isl_basic_map *isl_basic_map_product( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - struct isl_dim *dim_result = NULL; - struct isl_basic_map *bmap; - unsigned in1, in2, out1, out2, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, isl_dim_match(bmap1->dim, isl_dim_param, - bmap2->dim, isl_dim_param), goto error); - dim_result = isl_dim_product(isl_dim_copy(bmap1->dim), - isl_dim_copy(bmap2->dim)); - - in1 = isl_basic_map_n_in(bmap1); - in2 = isl_basic_map_n_in(bmap2); - out1 = isl_basic_map_n_out(bmap1); - out2 = isl_basic_map_n_out(bmap2); - nparam = isl_basic_map_n_param(bmap1); - - total = nparam + in1 + in2 + out1 + out2 + bmap1->n_div + bmap2->n_div; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos += in1); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += in2); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += out1); - isl_dim_map_div(dim_map1, bmap1, pos += out2); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - - bmap = isl_basic_map_alloc_dim(dim_result, - bmap1->n_div + bmap2->n_div, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flat_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_basic_map *prod; - - prod = isl_basic_map_product(bmap1, bmap2); - prod = isl_basic_map_flatten(prod); - return prod; -} - -__isl_give isl_basic_set *isl_basic_set_flat_product( - __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2) -{ - return isl_basic_map_flat_product(bset1, bset2); -} - -__isl_give isl_basic_map *isl_basic_map_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_dim *dim_result = NULL; - isl_basic_map *bmap; - unsigned in, out1, out2, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - dim_result = isl_dim_range_product(isl_dim_copy(bmap1->dim), - isl_dim_copy(bmap2->dim)); - - in = isl_basic_map_dim(bmap1, isl_dim_in); - out1 = isl_basic_map_n_out(bmap1); - out2 = isl_basic_map_n_out(bmap2); - nparam = isl_basic_map_n_param(bmap1); - - total = nparam + in + out1 + out2 + bmap1->n_div + bmap2->n_div; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += in); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += out1); - isl_dim_map_div(dim_map1, bmap1, pos += out2); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - - bmap = isl_basic_map_alloc_dim(dim_result, - bmap1->n_div + bmap2->n_div, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flat_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_basic_map *prod; - - prod = isl_basic_map_range_product(bmap1, bmap2); - prod = isl_basic_map_flatten_range(prod); - return prod; -} - -static __isl_give isl_map *map_product(__isl_take isl_map *map1, - __isl_take isl_map *map2, - __isl_give isl_dim *(*dim_product)(__isl_take isl_dim *left, - __isl_take isl_dim *right), - __isl_give isl_basic_map *(*basic_map_product)( - __isl_take isl_basic_map *left, __isl_take isl_basic_map *right)) -{ - unsigned flags = 0; - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - isl_assert(map1->ctx, isl_dim_match(map1->dim, isl_dim_param, - map2->dim, isl_dim_param), goto error); - - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT) && - ISL_F_ISSET(map2, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - result = isl_map_alloc_dim(dim_product(isl_dim_copy(map1->dim), - isl_dim_copy(map2->dim)), - map1->n * map2->n, flags); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - struct isl_basic_map *part; - part = basic_map_product(isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j])); - if (isl_basic_map_is_empty(part)) - isl_basic_map_free(part); - else - result = isl_map_add_basic_map(result, part); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -/* Given two maps A -> B and C -> D, construct a map [A -> C] -> [B -> D] - */ -struct isl_map *isl_map_product(struct isl_map *map1, struct isl_map *map2) -{ - return map_product(map1, map2, &isl_dim_product, &isl_basic_map_product); -} - -/* Given two maps A -> B and C -> D, construct a map (A, C) -> (B, D) - */ -__isl_give isl_map *isl_map_flat_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *prod; - - prod = isl_map_product(map1, map2); - prod = isl_map_flatten(prod); - return prod; -} - -/* Given two set A and B, construct its Cartesian product A x B. - */ -struct isl_set *isl_set_product(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *)isl_map_product((struct isl_map *)set1, - (struct isl_map *)set2); -} - -__isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - return (isl_set *)isl_map_flat_product((isl_map *)set1, (isl_map *)set2); -} - -/* Given two maps A -> B and C -> D, construct a map (A * C) -> [B -> D] - */ -__isl_give isl_map *isl_map_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return map_product(map1, map2, &isl_dim_range_product, - &isl_basic_map_range_product); -} - -/* Given two maps A -> B and C -> D, construct a map (A * C) -> (B, D) - */ -__isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *prod; - - prod = isl_map_range_product(map1, map2); - prod = isl_map_flatten_range(prod); - return prod; -} - -uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap) -{ - int i; - uint32_t hash = isl_hash_init(); - unsigned total; - - if (!bmap) - return 0; - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_normalize(bmap); - if (!bmap) - return 0; - total = isl_basic_map_total_dim(bmap); - isl_hash_byte(hash, bmap->n_eq & 0xFF); - for (i = 0; i < bmap->n_eq; ++i) { - uint32_t c_hash; - c_hash = isl_seq_get_hash(bmap->eq[i], 1 + total); - isl_hash_hash(hash, c_hash); - } - isl_hash_byte(hash, bmap->n_ineq & 0xFF); - for (i = 0; i < bmap->n_ineq; ++i) { - uint32_t c_hash; - c_hash = isl_seq_get_hash(bmap->ineq[i], 1 + total); - isl_hash_hash(hash, c_hash); - } - isl_hash_byte(hash, bmap->n_div & 0xFF); - for (i = 0; i < bmap->n_div; ++i) { - uint32_t c_hash; - if (isl_int_is_zero(bmap->div[i][0])) - continue; - isl_hash_byte(hash, i & 0xFF); - c_hash = isl_seq_get_hash(bmap->div[i], 1 + 1 + total); - isl_hash_hash(hash, c_hash); - } - isl_basic_map_free(bmap); - return hash; -} - -uint32_t isl_basic_set_get_hash(__isl_keep isl_basic_set *bset) -{ - return isl_basic_map_get_hash((isl_basic_map *)bset); -} - -uint32_t isl_map_get_hash(__isl_keep isl_map *map) -{ - int i; - uint32_t hash; - - if (!map) - return 0; - map = isl_map_copy(map); - map = isl_map_normalize(map); - if (!map) - return 0; - - hash = isl_hash_init(); - for (i = 0; i < map->n; ++i) { - uint32_t bmap_hash; - bmap_hash = isl_basic_map_get_hash(map->p[i]); - isl_hash_hash(hash, bmap_hash); - } - - isl_map_free(map); - - return hash; -} - -uint32_t isl_set_get_hash(__isl_keep isl_set *set) -{ - return isl_map_get_hash((isl_map *)set); -} - -/* Check if the value for dimension dim is completely determined - * by the values of the other parameters and variables. - * That is, check if dimension dim is involved in an equality. - */ -int isl_basic_set_dim_is_unique(struct isl_basic_set *bset, unsigned dim) -{ - int i; - unsigned nparam; - - if (!bset) - return -1; - nparam = isl_basic_set_n_param(bset); - for (i = 0; i < bset->n_eq; ++i) - if (!isl_int_is_zero(bset->eq[i][1 + nparam + dim])) - return 1; - return 0; -} - -/* Check if the value for dimension dim is completely determined - * by the values of the other parameters and variables. - * That is, check if dimension dim is involved in an equality - * for each of the subsets. - */ -int isl_set_dim_is_unique(struct isl_set *set, unsigned dim) -{ - int i; - - if (!set) - return -1; - for (i = 0; i < set->n; ++i) { - int unique; - unique = isl_basic_set_dim_is_unique(set->p[i], dim); - if (unique != 1) - return unique; - } - return 1; -} - -int isl_set_n_basic_set(__isl_keep isl_set *set) -{ - return set ? set->n : 0; -} - -int isl_map_foreach_basic_map(__isl_keep isl_map *map, - int (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) - if (fn(isl_basic_map_copy(map->p[i]), user) < 0) - return -1; - - return 0; -} - -int isl_set_foreach_basic_set(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_basic_set *bset, void *user), void *user) -{ - int i; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) - if (fn(isl_basic_set_copy(set->p[i]), user) < 0) - return -1; - - return 0; -} - -__isl_give isl_basic_set *isl_basic_set_lift(__isl_take isl_basic_set *bset) -{ - struct isl_dim *dim; - - if (!bset) - return NULL; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - dim = isl_basic_set_get_dim(bset); - dim = isl_dim_lift(dim, bset->n_div); - if (!dim) - goto error; - isl_dim_free(bset->dim); - bset->dim = dim; - bset->extra -= bset->n_div; - bset->n_div = 0; - - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_set *isl_set_lift(__isl_take isl_set *set) -{ - int i; - struct isl_dim *dim; - unsigned n_div; - - set = isl_set_align_divs(set); - - if (!set) - return NULL; - - set = isl_set_cow(set); - if (!set) - return NULL; - - n_div = set->p[0]->n_div; - dim = isl_set_get_dim(set); - dim = isl_dim_lift(dim, n_div); - if (!dim) - goto error; - isl_dim_free(set->dim); - set->dim = dim; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_lift(set->p[i]); - if (!set->p[i]) - goto error; - } - - return set; -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_map *isl_set_lifting(__isl_take isl_set *set) -{ - struct isl_dim *dim; - struct isl_basic_map *bmap; - unsigned n_set; - unsigned n_div; - unsigned n_param; - unsigned total; - int i, k, l; - - set = isl_set_align_divs(set); - - if (!set) - return NULL; - - dim = isl_set_get_dim(set); - if (set->n == 0 || set->p[0]->n_div == 0) { - isl_set_free(set); - return isl_map_identity(isl_dim_map_from_set(dim)); - } - - n_div = set->p[0]->n_div; - dim = isl_dim_map_from_set(dim); - n_param = isl_dim_size(dim, isl_dim_param); - n_set = isl_dim_size(dim, isl_dim_in); - dim = isl_dim_extend(dim, n_param, n_set, n_set + n_div); - bmap = isl_basic_map_alloc_dim(dim, 0, n_set, 2 * n_div); - for (i = 0; i < n_set; ++i) - bmap = var_equal(bmap, i); - - total = n_param + n_set + n_set + n_div; - for (i = 0; i < n_div; ++i) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], set->p[0]->div[i]+1, 1+n_param); - isl_seq_clr(bmap->ineq[k]+1+n_param, n_set); - isl_seq_cpy(bmap->ineq[k]+1+n_param+n_set, - set->p[0]->div[i]+1+1+n_param, n_set + n_div); - isl_int_neg(bmap->ineq[k][1+n_param+n_set+n_set+i], - set->p[0]->div[i][0]); - - l = isl_basic_map_alloc_inequality(bmap); - if (l < 0) - goto error; - isl_seq_neg(bmap->ineq[l], bmap->ineq[k], 1 + total); - isl_int_add(bmap->ineq[l][0], bmap->ineq[l][0], - set->p[0]->div[i][0]); - isl_int_sub_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - } - - isl_set_free(set); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return isl_map_from_basic_map(bmap); -error: - isl_set_free(set); - isl_basic_map_free(bmap); - return NULL; -} - -int isl_basic_set_size(__isl_keep isl_basic_set *bset) -{ - unsigned dim; - int size = 0; - - if (!bset) - return -1; - - dim = isl_basic_set_total_dim(bset); - size += bset->n_eq * (1 + dim); - size += bset->n_ineq * (1 + dim); - size += bset->n_div * (2 + dim); - - return size; -} - -int isl_set_size(__isl_keep isl_set *set) -{ - int i; - int size = 0; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) - size += isl_basic_set_size(set->p[i]); - - return size; -} - -int isl_basic_map_dim_is_bounded(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - int i; - int lower, upper; - - if (!bmap) - return -1; - - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), return -1); - - pos += isl_basic_map_offset(bmap, type); - - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][pos])) - return 1; - - lower = upper = 0; - for (i = 0; i < bmap->n_ineq; ++i) { - int sgn = isl_int_sgn(bmap->ineq[i][pos]); - if (sgn > 0) - lower = 1; - if (sgn < 0) - upper = 1; - } - - return lower && upper; -} - -int isl_map_dim_is_bounded(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int bounded; - bounded = isl_basic_map_dim_is_bounded(map->p[i], type, pos); - if (bounded < 0 || !bounded) - return bounded; - } - - return 1; -} - -/* Return 1 if the specified dim is involved in both an upper bound - * and a lower bound. - */ -int isl_set_dim_is_bounded(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return isl_map_dim_is_bounded((isl_map *)set, type, pos); -} - -/* For each of the "n" variables starting at "first", determine - * the sign of the variable and put the results in the first "n" - * elements of the array "signs". - * Sign - * 1 means that the variable is non-negative - * -1 means that the variable is non-positive - * 0 means the variable attains both positive and negative values. - */ -int isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset, - unsigned first, unsigned n, int *signs) -{ - isl_vec *bound = NULL; - struct isl_tab *tab = NULL; - struct isl_tab_undo *snap; - int i; - - if (!bset || !signs) - return -1; - - bound = isl_vec_alloc(bset->ctx, 1 + isl_basic_set_total_dim(bset)); - tab = isl_tab_from_basic_set(bset); - if (!bound || !tab) - goto error; - - isl_seq_clr(bound->el, bound->size); - isl_int_set_si(bound->el[0], -1); - - snap = isl_tab_snap(tab); - for (i = 0; i < n; ++i) { - int empty; - - isl_int_set_si(bound->el[1 + first + i], -1); - if (isl_tab_add_ineq(tab, bound->el) < 0) - goto error; - empty = tab->empty; - isl_int_set_si(bound->el[1 + first + i], 0); - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - if (empty) { - signs[i] = 1; - continue; - } - - isl_int_set_si(bound->el[1 + first + i], 1); - if (isl_tab_add_ineq(tab, bound->el) < 0) - goto error; - empty = tab->empty; - isl_int_set_si(bound->el[1 + first + i], 0); - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - signs[i] = empty ? -1 : 0; - } - - isl_tab_free(tab); - isl_vec_free(bound); - return 0; -error: - isl_tab_free(tab); - isl_vec_free(bound); - return -1; -} - -int isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n, int *signs) -{ - if (!bset || !signs) - return -1; - isl_assert(bset->ctx, first + n <= isl_basic_set_dim(bset, type), - return -1); - - first += pos(bset->dim, type) - 1; - return isl_basic_set_vars_get_sign(bset, first, n, signs); -} - -/* Check if the given basic map is obviously single-valued. - * In particular, for each output dimension, check that there is - * an equality that defines the output dimension in terms of - * earlier dimensions. - */ -int isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap) -{ - int i, j; - unsigned total; - unsigned n_out; - unsigned o_out; - - if (!bmap) - return -1; - - total = 1 + isl_basic_map_total_dim(bmap); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - o_out = isl_basic_map_offset(bmap, isl_dim_out); - - for (i = 0; i < n_out; ++i) { - for (j = 0; j < bmap->n_eq; ++j) { - if (isl_int_is_zero(bmap->eq[j][o_out + i])) - continue; - if (isl_seq_first_non_zero(bmap->eq[j] + o_out + i + 1, - total - (o_out + i + 1)) == -1) - break; - } - if (j >= bmap->n_eq) - return 0; - } - - return 1; -} - -/* Check if the given map is obviously single-valued. - */ -int isl_map_plain_is_single_valued(__isl_keep isl_map *map) -{ - if (!map) - return -1; - if (map->n == 0) - return 1; - if (map->n >= 2) - return 0; - - return isl_basic_map_plain_is_single_valued(map->p[0]); -} - -/* Check if the given map is single-valued. - * We simply compute - * - * M \circ M^-1 - * - * and check if the result is a subset of the identity mapping. - */ -int isl_map_is_single_valued(__isl_keep isl_map *map) -{ - isl_dim *dim; - isl_map *test; - isl_map *id; - int sv; - - sv = isl_map_plain_is_single_valued(map); - if (sv < 0 || sv) - return sv; - - test = isl_map_reverse(isl_map_copy(map)); - test = isl_map_apply_range(test, isl_map_copy(map)); - - dim = isl_dim_map_from_set(isl_dim_range(isl_map_get_dim(map))); - id = isl_map_identity(dim); - - sv = isl_map_is_subset(test, id); - - isl_map_free(test); - isl_map_free(id); - - return sv; -} - -int isl_map_is_injective(__isl_keep isl_map *map) -{ - int in; - - map = isl_map_copy(map); - map = isl_map_reverse(map); - in = isl_map_is_single_valued(map); - isl_map_free(map); - - return in; -} - -/* Check if the given map is obviously injective. - */ -int isl_map_plain_is_injective(__isl_keep isl_map *map) -{ - int in; - - map = isl_map_copy(map); - map = isl_map_reverse(map); - in = isl_map_plain_is_single_valued(map); - isl_map_free(map); - - return in; -} - -int isl_map_is_bijective(__isl_keep isl_map *map) -{ - int sv; - - sv = isl_map_is_single_valued(map); - if (sv < 0 || !sv) - return sv; - - return isl_map_is_injective(map); -} - -int isl_set_is_singleton(__isl_keep isl_set *set) -{ - return isl_map_is_single_valued((isl_map *)set); -} - -int isl_map_is_translation(__isl_keep isl_map *map) -{ - int ok; - isl_set *delta; - - delta = isl_map_deltas(isl_map_copy(map)); - ok = isl_set_is_singleton(delta); - isl_set_free(delta); - - return ok; -} - -static int unique(isl_int *p, unsigned pos, unsigned len) -{ - if (isl_seq_first_non_zero(p, pos) != -1) - return 0; - if (isl_seq_first_non_zero(p + pos + 1, len - pos - 1) != -1) - return 0; - return 1; -} - -int isl_basic_set_is_box(__isl_keep isl_basic_set *bset) -{ - int i, j; - unsigned nvar; - unsigned ovar; - - if (!bset) - return -1; - - if (isl_basic_set_dim(bset, isl_dim_div) != 0) - return 0; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - ovar = isl_dim_offset(bset->dim, isl_dim_set); - for (j = 0; j < nvar; ++j) { - int lower = 0, upper = 0; - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][1 + ovar + j])) - continue; - if (!unique(bset->eq[i] + 1 + ovar, j, nvar)) - return 0; - break; - } - if (i < bset->n_eq) - continue; - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][1 + ovar + j])) - continue; - if (!unique(bset->ineq[i] + 1 + ovar, j, nvar)) - return 0; - if (isl_int_is_pos(bset->ineq[i][1 + ovar + j])) - lower = 1; - else - upper = 1; - } - if (!lower || !upper) - return 0; - } - - return 1; -} - -int isl_set_is_box(__isl_keep isl_set *set) -{ - if (!set) - return -1; - if (set->n != 1) - return 0; - - return isl_basic_set_is_box(set->p[0]); -} - -int isl_basic_set_is_wrapping(__isl_keep isl_basic_set *bset) -{ - if (!bset) - return -1; - - return isl_dim_is_wrapping(bset->dim); -} - -int isl_set_is_wrapping(__isl_keep isl_set *set) -{ - if (!set) - return -1; - - return isl_dim_is_wrapping(set->dim); -} - -__isl_give isl_basic_set *isl_basic_map_wrap(__isl_take isl_basic_map *bmap) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_dim_wrap(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return (isl_basic_set *)bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_set *isl_map_wrap(__isl_take isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = (isl_basic_map *)isl_basic_map_wrap(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_dim_wrap(map->dim); - if (!map->dim) - goto error; - - return (isl_set *)map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset) -{ - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - bset->dim = isl_dim_unwrap(bset->dim); - if (!bset->dim) - goto error; - - bset = isl_basic_set_finalize(bset); - - return (isl_basic_map *)bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set) -{ - int i; - - if (!set) - return NULL; - - if (!isl_set_is_wrapping(set)) - isl_die(set->ctx, isl_error_invalid, "not a wrapping set", - goto error); - - set = isl_set_cow(set); - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - set->p[i] = (isl_basic_set *)isl_basic_set_unwrap(set->p[i]); - if (!set->p[i]) - goto error; - } - - set->dim = isl_dim_unwrap(set->dim); - if (!set->dim) - goto error; - - return (isl_map *)set; -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_reset(__isl_take isl_basic_map *bmap, - enum isl_dim_type type) -{ - if (!bmap) - return NULL; - - if (!isl_dim_is_named_or_nested(bmap->dim, type)) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_dim_reset(bmap->dim, type); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_reset(__isl_take isl_map *map, - enum isl_dim_type type) -{ - int i; - - if (!map) - return NULL; - - if (!isl_dim_is_named_or_nested(map->dim, type)) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_reset(map->p[i], type); - if (!map->p[i]) - goto error; - } - map->dim = isl_dim_reset(map->dim, type); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flatten(__isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (!bmap->dim->nested[0] && !bmap->dim->nested[1]) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_dim_flatten(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_flatten(__isl_take isl_basic_set *bset) -{ - return (isl_basic_set *)isl_basic_map_flatten((isl_basic_map *)bset); -} - -__isl_give isl_basic_map *isl_basic_map_flatten_range( - __isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (!bmap->dim->nested[1]) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_dim_flatten_range(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_flatten(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!map->dim->nested[0] && !map->dim->nested[1]) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_flatten(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_dim_flatten(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_flatten((isl_map *)set); -} - -__isl_give isl_map *isl_set_flatten_map(__isl_take isl_set *set) -{ - isl_dim *dim, *flat_dim; - isl_map *map; - - dim = isl_set_get_dim(set); - flat_dim = isl_dim_flatten(isl_dim_copy(dim)); - map = isl_map_identity(isl_dim_join(isl_dim_reverse(dim), flat_dim)); - map = isl_map_intersect_domain(map, set); - - return map; -} - -__isl_give isl_map *isl_map_flatten_range(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!map->dim->nested[1]) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_flatten_range(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_dim_flatten_range(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Reorder the dimensions of "bmap" according to the given dim_map - * and set the dimension specification to "dim". - */ -__isl_give isl_basic_map *isl_basic_map_realign(__isl_take isl_basic_map *bmap, - __isl_take isl_dim *dim, __isl_take struct isl_dim_map *dim_map) -{ - isl_basic_map *res; - - bmap = isl_basic_map_cow(bmap); - if (!bmap || !dim || !dim_map) - goto error; - - res = isl_basic_map_alloc_dim(dim, - bmap->n_div, bmap->n_eq, bmap->n_ineq); - res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - res = isl_basic_map_finalize(res); - return res; -error: - free(dim_map); - isl_basic_map_free(bmap); - isl_dim_free(dim); - return NULL; -} - -/* Reorder the dimensions of "map" according to given reordering. - */ -__isl_give isl_map *isl_map_realign(__isl_take isl_map *map, - __isl_take isl_reordering *r) -{ - int i; - struct isl_dim_map *dim_map; - - map = isl_map_cow(map); - dim_map = isl_dim_map_from_reordering(r); - if (!map || !r || !dim_map) - goto error; - - for (i = 0; i < map->n; ++i) { - struct isl_dim_map *dim_map_i; - - dim_map_i = isl_dim_map_extend(dim_map, map->p[i]); - - map->p[i] = isl_basic_map_realign(map->p[i], - isl_dim_copy(r->dim), dim_map_i); - - if (!map->p[i]) - goto error; - } - - map = isl_map_reset_dim(map, isl_dim_copy(r->dim)); - - isl_reordering_free(r); - free(dim_map); - return map; -error: - free(dim_map); - isl_map_free(map); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_set *isl_set_realign(__isl_take isl_set *set, - __isl_take isl_reordering *r) -{ - return (isl_set *)isl_map_realign((isl_map *)set, r); -} - -__isl_give isl_map *isl_map_align_params(__isl_take isl_map *map, - __isl_take isl_dim *model) -{ - isl_ctx *ctx; - - if (!map || !model) - goto error; - - ctx = isl_dim_get_ctx(model); - if (!isl_dim_has_named_params(model)) - isl_die(ctx, isl_error_invalid, - "model has unnamed parameters", goto error); - if (!isl_dim_has_named_params(map->dim)) - isl_die(ctx, isl_error_invalid, - "relation has unnamed parameters", goto error); - if (!isl_dim_match(map->dim, isl_dim_param, model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_dim_drop(model, isl_dim_in, - 0, isl_dim_size(model, isl_dim_in)); - model = isl_dim_drop(model, isl_dim_out, - 0, isl_dim_size(model, isl_dim_out)); - exp = isl_parameter_alignment_reordering(map->dim, model); - exp = isl_reordering_extend_dim(exp, isl_map_get_dim(map)); - map = isl_map_realign(map, exp); - } - - isl_dim_free(model); - return map; -error: - isl_dim_free(model); - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_align_params(__isl_take isl_set *set, - __isl_take isl_dim *model) -{ - return isl_map_align_params(set, model); -} - -__isl_give isl_mat *isl_basic_map_equalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5) -{ - enum isl_dim_type c[5] = { c1, c2, c3, c4, c5 }; - struct isl_mat *mat; - int i, j, k; - int pos; - - if (!bmap) - return NULL; - mat = isl_mat_alloc(bmap->ctx, bmap->n_eq, - isl_basic_map_total_dim(bmap) + 1); - if (!mat) - return NULL; - for (i = 0; i < bmap->n_eq; ++i) - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(mat->row[i][pos], - bmap->eq[i][off + k]); - ++pos; - } - } - - return mat; -} - -__isl_give isl_mat *isl_basic_map_inequalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5) -{ - enum isl_dim_type c[5] = { c1, c2, c3, c4, c5 }; - struct isl_mat *mat; - int i, j, k; - int pos; - - if (!bmap) - return NULL; - mat = isl_mat_alloc(bmap->ctx, bmap->n_ineq, - isl_basic_map_total_dim(bmap) + 1); - if (!mat) - return NULL; - for (i = 0; i < bmap->n_ineq; ++i) - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(mat->row[i][pos], - bmap->ineq[i][off + k]); - ++pos; - } - } - - return mat; -} - -__isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( - __isl_take isl_dim *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5) -{ - enum isl_dim_type c[5] = { c1, c2, c3, c4, c5 }; - isl_basic_map *bmap; - unsigned total; - unsigned extra; - int i, j, k, l; - int pos; - - if (!dim || !eq || !ineq) - goto error; - - if (eq->n_col != ineq->n_col) - isl_die(dim->ctx, isl_error_invalid, - "equalities and inequalities matrices should have " - "same number of columns", goto error); - - total = 1 + isl_dim_total(dim); - - if (eq->n_col < total) - isl_die(dim->ctx, isl_error_invalid, - "number of columns too small", goto error); - - extra = eq->n_col - total; - - bmap = isl_basic_map_alloc_dim(isl_dim_copy(dim), extra, - eq->n_row, ineq->n_row); - if (!bmap) - goto error; - for (i = 0; i < extra; ++i) { - k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_int_set_si(bmap->div[k][0], 0); - } - for (i = 0; i < eq->n_row; ++i) { - l = isl_basic_map_alloc_equality(bmap); - if (l < 0) - goto error; - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(bmap->eq[l][off + k], - eq->row[i][pos]); - ++pos; - } - } - } - for (i = 0; i < ineq->n_row; ++i) { - l = isl_basic_map_alloc_inequality(bmap); - if (l < 0) - goto error; - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(bmap->ineq[l][off + k], - ineq->row[i][pos]); - ++pos; - } - } - } - - isl_dim_free(dim); - isl_mat_free(eq); - isl_mat_free(ineq); - - return bmap; -error: - isl_dim_free(dim); - isl_mat_free(eq); - isl_mat_free(ineq); - return NULL; -} - -__isl_give isl_mat *isl_basic_set_equalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4) -{ - return isl_basic_map_equalities_matrix((isl_basic_map *)bset, - c1, c2, c3, c4, isl_dim_in); -} - -__isl_give isl_mat *isl_basic_set_inequalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4) -{ - return isl_basic_map_inequalities_matrix((isl_basic_map *)bset, - c1, c2, c3, c4, isl_dim_in); -} - -__isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( - __isl_take isl_dim *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4) -{ - return (isl_basic_set*) - isl_basic_map_from_constraint_matrices(dim, eq, ineq, - c1, c2, c3, c4, isl_dim_in); -} - -int isl_basic_map_can_zip(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - - return isl_dim_can_zip(bmap->dim); -} - -int isl_map_can_zip(__isl_keep isl_map *map) -{ - if (!map) - return -1; - - return isl_dim_can_zip(map->dim); -} - -/* Given a basic map (A -> B) -> (C -> D), return the corresponding basic map - * (A -> C) -> (B -> D). - */ -__isl_give isl_basic_map *isl_basic_map_zip(__isl_take isl_basic_map *bmap) -{ - unsigned pos; - unsigned n1; - unsigned n2; - - if (!bmap) - return NULL; - - if (!isl_basic_map_can_zip(bmap)) - isl_die(bmap->ctx, isl_error_invalid, - "basic map cannot be zipped", goto error); - pos = isl_basic_map_offset(bmap, isl_dim_in) + - isl_dim_size(bmap->dim->nested[0], isl_dim_in); - n1 = isl_dim_size(bmap->dim->nested[0], isl_dim_out); - n2 = isl_dim_size(bmap->dim->nested[1], isl_dim_in); - bmap = isl_basic_map_swap_vars(bmap, pos, n1, n2); - if (!bmap) - return NULL; - bmap->dim = isl_dim_zip(bmap->dim); - if (!bmap->dim) - goto error; - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Given a map (A -> B) -> (C -> D), return the corresponding map - * (A -> C) -> (B -> D). - */ -__isl_give isl_map *isl_map_zip(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!isl_map_can_zip(map)) - isl_die(map->ctx, isl_error_invalid, "map cannot be zipped", - goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_zip(map->p[i]); - if (!map->p[i]) - goto error; - } - - map->dim = isl_dim_zip(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Construct a basic map mapping the domain of the affine expression - * to a one-dimensional range prescribed by the affine expression. - */ -__isl_give isl_basic_map *isl_basic_map_from_aff(__isl_take isl_aff *aff) -{ - int k; - int pos; - isl_local_space *ls; - isl_basic_map *bmap; - - if (!aff) - return NULL; - - ls = isl_aff_get_local_space(aff); - ls = isl_local_space_from_domain(ls); - ls = isl_local_space_add_dims(ls, isl_dim_out, 1); - bmap = isl_basic_map_from_local_space(ls); - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - - pos = isl_basic_map_offset(bmap, isl_dim_out); - isl_seq_cpy(bmap->eq[k], aff->v->el + 1, pos); - isl_int_neg(bmap->eq[k][pos], aff->v->el[0]); - isl_seq_cpy(bmap->eq[k] + pos + 1, aff->v->el + 1 + pos, - aff->v->size - (pos + 1)); - - isl_aff_free(aff); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_aff_free(aff); - isl_basic_map_free(bmap); - return NULL; -} - -/* Construct a basic map mapping a domain in the given space to - * to an n-dimensional range, with n the number of elements in the list, - * where each coordinate in the range is prescribed by the - * corresponding affine expression. - * The domains of all affine expressions in the list are assumed to match - * domain_dim. - */ -__isl_give isl_basic_map *isl_basic_map_from_aff_list( - __isl_take isl_dim *domain_dim, __isl_take isl_aff_list *list) -{ - int i; - isl_dim *dim; - isl_basic_map *bmap; - - if (!list) - return NULL; - - dim = isl_dim_from_domain(domain_dim); - bmap = isl_basic_map_universe(dim); - - for (i = 0; i < list->n; ++i) { - isl_aff *aff; - isl_basic_map *bmap_i; - - aff = isl_aff_copy(list->p[i]); - bmap_i = isl_basic_map_from_aff(aff); - - bmap = isl_basic_map_flat_range_product(bmap, bmap_i); - } - - isl_aff_list_free(list); - return bmap; -} diff --git a/cloog-0.16.3/isl/isl_map_no_piplib.c b/cloog-0.16.3/isl/isl_map_no_piplib.c deleted file mode 100644 index 8a28b074de315fe5b73489cfd5009449a4c7bf4f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map_no_piplib.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_map_piplib.h" -#include - -struct isl_map *isl_pip_basic_map_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_map_piplib.c b/cloog-0.16.3/isl/isl_map_piplib.c deleted file mode 100644 index b1434eb362946786e1d78f5ad831fd1c3148a73b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map_piplib.c +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include "isl_piplib.h" -#include "isl_map_piplib.h" - -static void copy_values_from(isl_int *dst, Entier *src, unsigned n) -{ - int i; - - for (i = 0; i < n; ++i) - entier_assign(dst[i], src[i]); -} - -static void add_value(isl_int *dst, Entier *src) -{ - mpz_add(*dst, *dst, *src); -} - -static void copy_constraint_from(isl_int *dst, PipVector *src, - unsigned nparam, unsigned n_in, unsigned n_out, - unsigned extra, int *pos) -{ - int i; - - copy_values_from(dst, src->the_vector+src->nb_elements-1, 1); - copy_values_from(dst+1, src->the_vector, nparam+n_in); - isl_seq_clr(dst+1+nparam+n_in, n_out); - isl_seq_clr(dst+1+nparam+n_in+n_out, extra); - for (i = 0; i + n_in + nparam < src->nb_elements-1; ++i) { - int p = pos[i]; - add_value(&dst[1+nparam+n_in+n_out+p], - &src->the_vector[n_in+nparam+i]); - } -} - -static int add_inequality(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, PipVector *vec) -{ - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - unsigned n_div = isl_basic_map_n_div(bmap); - int i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - return -1; - copy_constraint_from(bmap->ineq[i], vec, - nparam, n_in, n_out, n_div, pos); - - return i; -} - -/* For a div d = floor(f/m), add the constraints - * - * f - m d >= 0 - * -(f-(n-1)) + m d >= 0 - * - * Note that the second constraint is the negation of - * - * f - m d >= n - */ -static int add_div_constraints(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, PipNewparm *p, unsigned div) -{ - int i, j; - unsigned total = isl_basic_map_total_dim(bmap); - unsigned div_pos = 1 + total - bmap->n_div + div; - - i = add_inequality(ctx, bmap, pos, p->vector); - if (i < 0) - return -1; - copy_values_from(&bmap->ineq[i][div_pos], &p->deno, 1); - isl_int_neg(bmap->ineq[i][div_pos], bmap->ineq[i][div_pos]); - - j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - return -1; - isl_seq_neg(bmap->ineq[j], bmap->ineq[i], 1 + total); - isl_int_add(bmap->ineq[j][0], bmap->ineq[j][0], bmap->ineq[j][div_pos]); - isl_int_sub_ui(bmap->ineq[j][0], bmap->ineq[j][0], 1); - return j; -} - -static int add_equality(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, - unsigned var, PipVector *vec) -{ - int i; - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - - isl_assert(ctx, var < n_out, return -1); - - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - return -1; - copy_constraint_from(bmap->eq[i], vec, - nparam, n_in, n_out, bmap->extra, pos); - isl_int_set_si(bmap->eq[i][1+nparam+n_in+var], -1); - - return i; -} - -static int find_div(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, PipNewparm *p) -{ - int i, j; - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - - i = isl_basic_map_alloc_div(bmap); - if (i < 0) - return -1; - - copy_constraint_from(bmap->div[i]+1, p->vector, - nparam, n_in, n_out, bmap->extra, pos); - - copy_values_from(bmap->div[i], &p->deno, 1); - for (j = 0; j < i; ++j) - if (isl_seq_eq(bmap->div[i], bmap->div[j], - 1+1+isl_basic_map_total_dim(bmap)+j)) { - isl_basic_map_free_div(bmap, 1); - return j; - } - - if (add_div_constraints(ctx, bmap, pos, p, i) < 0) - return -1; - - return i; -} - -/* Count some properties of a quast - * - maximal number of new parameters - * - maximal depth - * - total number of solutions - * - total number of empty branches - */ -static void quast_count(PipQuast *q, int *maxnew, int depth, int *maxdepth, - int *sol, int *nosol) -{ - PipNewparm *p; - - for (p = q->newparm; p; p = p->next) - if (p->rank > *maxnew) - *maxnew = p->rank; - if (q->condition) { - if (++depth > *maxdepth) - *maxdepth = depth; - quast_count(q->next_else, maxnew, depth, maxdepth, sol, nosol); - quast_count(q->next_then, maxnew, depth, maxdepth, sol, nosol); - } else { - if (q->list) - ++(*sol); - else - ++(*nosol); - } -} - -/* - * pos: array of length bmap->set.extra, mapping each of the existential - * variables PIP proposes to an existential variable in bmap - * bmap: collects the currently active constraints - * rest: collects the empty leaves of the quast (if not NULL) - */ -struct scan_data { - struct isl_ctx *ctx; - struct isl_basic_map *bmap; - struct isl_set **rest; - int *pos; -}; - -/* - * New existentially quantified variables are places after the existing ones. - */ -static struct isl_map *scan_quast_r(struct scan_data *data, PipQuast *q, - struct isl_map *map) -{ - PipNewparm *p; - struct isl_basic_map *bmap = data->bmap; - unsigned old_n_div = bmap->n_div; - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - - if (!map) - goto error; - - for (p = q->newparm; p; p = p->next) { - int pos; - unsigned pip_param = nparam + n_in; - - pos = find_div(data->ctx, bmap, data->pos, p); - if (pos < 0) - goto error; - data->pos[p->rank - pip_param] = pos; - } - - if (q->condition) { - int pos = add_inequality(data->ctx, bmap, data->pos, - q->condition); - if (pos < 0) - goto error; - map = scan_quast_r(data, q->next_then, map); - - if (isl_inequality_negate(bmap, pos)) - goto error; - map = scan_quast_r(data, q->next_else, map); - - if (isl_basic_map_free_inequality(bmap, 1)) - goto error; - } else if (q->list) { - PipList *l; - int j; - /* if bmap->n_out is zero, we are only interested in the domains - * where a solution exists and not in the actual solution - */ - for (j = 0, l = q->list; j < n_out && l; ++j, l = l->next) - if (add_equality(data->ctx, bmap, data->pos, j, - l->vector) < 0) - goto error; - map = isl_map_add_basic_map(map, isl_basic_map_copy(bmap)); - if (isl_basic_map_free_equality(bmap, n_out)) - goto error; - } else if (data->rest) { - struct isl_basic_set *bset; - bset = isl_basic_set_from_basic_map(isl_basic_map_copy(bmap)); - bset = isl_basic_set_drop_dims(bset, n_in, n_out); - if (!bset) - goto error; - *data->rest = isl_set_add_basic_set(*data->rest, bset); - } - - if (isl_basic_map_free_inequality(bmap, 2*(bmap->n_div - old_n_div))) - goto error; - if (isl_basic_map_free_div(bmap, bmap->n_div - old_n_div)) - goto error; - return map; -error: - isl_map_free(map); - return NULL; -} - -/* - * Returns a map of dimension "keep_dim" with "context" as domain and - * as range the first "isl_dim_size(keep_dim, isl_dim_out)" variables - * in the quast lists. - */ -static struct isl_map *isl_map_from_quast(struct isl_ctx *ctx, PipQuast *q, - struct isl_dim *keep_dim, - struct isl_basic_set *context, - struct isl_set **rest) -{ - int pip_param; - int nexist; - int max_depth; - int n_sol, n_nosol; - struct scan_data data; - struct isl_map *map = NULL; - struct isl_dim *dims; - unsigned nparam; - unsigned dim; - unsigned keep; - - data.ctx = ctx; - data.rest = rest; - data.bmap = NULL; - data.pos = NULL; - - if (!context || !keep_dim) - goto error; - - dim = isl_basic_set_n_dim(context); - nparam = isl_basic_set_n_param(context); - keep = isl_dim_size(keep_dim, isl_dim_out); - pip_param = nparam + dim; - - max_depth = 0; - n_sol = 0; - n_nosol = 0; - nexist = pip_param-1; - quast_count(q, &nexist, 0, &max_depth, &n_sol, &n_nosol); - nexist -= pip_param-1; - - if (rest) { - *rest = isl_set_alloc_dim(isl_dim_copy(context->dim), n_nosol, - ISL_MAP_DISJOINT); - if (!*rest) - goto error; - } - map = isl_map_alloc_dim(isl_dim_copy(keep_dim), n_sol, - ISL_MAP_DISJOINT); - if (!map) - goto error; - - dims = isl_dim_reverse(isl_dim_copy(context->dim)); - data.bmap = isl_basic_map_from_basic_set(context, dims); - data.bmap = isl_basic_map_extend_dim(data.bmap, - keep_dim, nexist, keep, max_depth+2*nexist); - if (!data.bmap) - goto error2; - - if (data.bmap->extra) { - int i; - data.pos = isl_alloc_array(ctx, int, data.bmap->extra); - if (!data.pos) - goto error; - for (i = 0; i < data.bmap->n_div; ++i) - data.pos[i] = i; - } - - map = scan_quast_r(&data, q, map); - map = isl_map_finalize(map); - if (!map) - goto error2; - if (rest) { - *rest = isl_set_finalize(*rest); - if (!*rest) - goto error2; - } - isl_basic_map_free(data.bmap); - if (data.pos) - free(data.pos); - return map; -error: - isl_basic_set_free(context); - isl_dim_free(keep_dim); -error2: - if (data.pos) - free(data.pos); - isl_basic_map_free(data.bmap); - isl_map_free(map); - if (rest) { - isl_set_free(*rest); - *rest = NULL; - } - return NULL; -} - -static void copy_values_to(Entier *dst, isl_int *src, unsigned n) -{ - int i; - - for (i = 0; i < n; ++i) - entier_assign(dst[i], src[i]); -} - -static void copy_constraint_to(Entier *dst, isl_int *src, - unsigned pip_param, unsigned pip_var, - unsigned extra_front, unsigned extra_back) -{ - copy_values_to(dst+1+extra_front+pip_var+pip_param+extra_back, src, 1); - copy_values_to(dst+1+extra_front+pip_var, src+1, pip_param); - copy_values_to(dst+1+extra_front, src+1+pip_param, pip_var); -} - -PipMatrix *isl_basic_map_to_pip(struct isl_basic_map *bmap, unsigned pip_param, - unsigned extra_front, unsigned extra_back) -{ - int i; - unsigned nrow; - unsigned ncol; - PipMatrix *M; - unsigned off; - unsigned pip_var = isl_basic_map_total_dim(bmap) - pip_param; - - nrow = extra_front + bmap->n_eq + bmap->n_ineq; - ncol = 1 + extra_front + pip_var + pip_param + extra_back + 1; - M = pip_matrix_alloc(nrow, ncol); - if (!M) - return NULL; - - off = extra_front; - for (i = 0; i < bmap->n_eq; ++i) { - entier_set_si(M->p[off+i][0], 0); - copy_constraint_to(M->p[off+i], bmap->eq[i], - pip_param, pip_var, extra_front, extra_back); - } - off += bmap->n_eq; - for (i = 0; i < bmap->n_ineq; ++i) { - entier_set_si(M->p[off+i][0], 1); - copy_constraint_to(M->p[off+i], bmap->ineq[i], - pip_param, pip_var, extra_front, extra_back); - } - return M; -} - -PipMatrix *isl_basic_set_to_pip(struct isl_basic_set *bset, unsigned pip_param, - unsigned extra_front, unsigned extra_back) -{ - return isl_basic_map_to_pip((struct isl_basic_map *)bset, - pip_param, extra_front, extra_back); -} - -struct isl_map *isl_pip_basic_map_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - PipOptions *options; - PipQuast *sol; - struct isl_map *map; - struct isl_ctx *ctx; - PipMatrix *domain = NULL, *context = NULL; - unsigned nparam, n_in, n_out; - - bmap = isl_basic_map_detect_equalities(bmap); - if (!bmap || !dom) - goto error; - - ctx = bmap->ctx; - isl_assert(ctx, isl_basic_map_compatible_domain(bmap, dom), goto error); - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - n_out = isl_basic_map_n_out(bmap); - - domain = isl_basic_map_to_pip(bmap, nparam + n_in, 0, dom->n_div); - if (!domain) - goto error; - context = isl_basic_map_to_pip((struct isl_basic_map *)dom, 0, 0, 0); - if (!context) - goto error; - - options = pip_options_init(); - options->Simplify = 1; - options->Maximize = max; - options->Urs_unknowns = -1; - options->Urs_parms = -1; - sol = pip_solve(domain, context, -1, options); - - if (sol) { - struct isl_basic_set *copy; - copy = isl_basic_set_copy(dom); - map = isl_map_from_quast(ctx, sol, - isl_dim_copy(bmap->dim), copy, empty); - } else { - map = isl_map_empty_like_basic_map(bmap); - if (empty) - *empty = NULL; - } - if (!map) - goto error; - if (map->n == 0 && empty) { - isl_set_free(*empty); - *empty = isl_set_from_basic_set(dom); - } else - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - - pip_quast_free(sol); - pip_options_free(options); - pip_matrix_free(domain); - pip_matrix_free(context); - - return map; -error: - if (domain) - pip_matrix_free(domain); - if (context) - pip_matrix_free(context); - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_map_piplib.h b/cloog-0.16.3/isl/isl_map_piplib.h deleted file mode 100644 index e796e4add7c983462b9c1060c9d8f4df6641f9bb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map_piplib.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAP_PIPLIB_H -#define ISL_MAP_PIPLIB_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_map *isl_pip_basic_map_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_map_private.h b/cloog-0.16.3/isl/isl_map_private.h deleted file mode 100644 index a3b106bd6869cef41373f6962a4efa6c7f3375a0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map_private.h +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAP_PRIVATE_H -#define ISL_MAP_PRIVATE_H - -#define isl_basic_set isl_basic_map -#define isl_set isl_map -#define isl_basic_set_list isl_basic_map_list -#include -#include -#include -#include - -/* A "basic map" is a relation between two sets of variables, - * called the "in" and "out" variables. - * A "basic set" is a basic map with a zero-dimensional - * domain. - * - * It is implemented as a set with two extra fields: - * n_in is the number of in variables - * n_out is the number of out variables - * n_in + n_out should be equal to set.dim - */ -struct isl_basic_map { - int ref; -#define ISL_BASIC_MAP_FINAL (1 << 0) -#define ISL_BASIC_MAP_EMPTY (1 << 1) -#define ISL_BASIC_MAP_NO_IMPLICIT (1 << 2) -#define ISL_BASIC_MAP_NO_REDUNDANT (1 << 3) -#define ISL_BASIC_MAP_RATIONAL (1 << 4) -#define ISL_BASIC_MAP_NORMALIZED (1 << 5) -#define ISL_BASIC_MAP_NORMALIZED_DIVS (1 << 6) -#define ISL_BASIC_MAP_ALL_EQUALITIES (1 << 7) -#define ISL_BASIC_SET_FINAL (1 << 0) -#define ISL_BASIC_SET_EMPTY (1 << 1) -#define ISL_BASIC_SET_NO_IMPLICIT (1 << 2) -#define ISL_BASIC_SET_NO_REDUNDANT (1 << 3) -#define ISL_BASIC_SET_RATIONAL (1 << 4) -#define ISL_BASIC_SET_NORMALIZED (1 << 5) -#define ISL_BASIC_SET_NORMALIZED_DIVS (1 << 6) -#define ISL_BASIC_SET_ALL_EQUALITIES (1 << 7) - unsigned flags; - - struct isl_ctx *ctx; - - struct isl_dim *dim; - unsigned extra; - - unsigned n_eq; - unsigned n_ineq; - - size_t c_size; - isl_int **eq; - isl_int **ineq; - - unsigned n_div; - - isl_int **div; - - struct isl_vec *sample; - - struct isl_blk block; - struct isl_blk block2; -}; - -/* A "map" is a (possibly disjoint) union of basic maps. - * A "set" is a (possibly disjoint) union of basic sets. - * - * Currently, the isl_set structure is identical to the isl_map structure - * and the library depends on this correspondence internally. - * However, users should not depend on this correspondence. - */ -struct isl_map { - int ref; -#define ISL_MAP_DISJOINT (1 << 0) -#define ISL_MAP_NORMALIZED (1 << 1) -#define ISL_SET_DISJOINT (1 << 0) -#define ISL_SET_NORMALIZED (1 << 1) - unsigned flags; - - struct isl_ctx *ctx; - - struct isl_dim *dim; - - int n; - - size_t size; - struct isl_basic_map *p[1]; -}; - -__isl_give isl_map *isl_map_realign(__isl_take isl_map *map, - __isl_take isl_reordering *r); -__isl_give isl_set *isl_set_realign(__isl_take isl_set *set, - __isl_take isl_reordering *r); - -__isl_give isl_map *isl_map_reset(__isl_take isl_map *map, - enum isl_dim_type type); - -__isl_give isl_basic_set *isl_basic_set_reset_dim( - __isl_take isl_basic_set *bset, __isl_take isl_dim *dim); -__isl_give isl_basic_map *isl_basic_map_reset_dim( - __isl_take isl_basic_map *bmap, __isl_take isl_dim *dim); -__isl_give isl_map *isl_map_reset_dim(__isl_take isl_map *map, - __isl_take isl_dim *dim); - -unsigned isl_basic_map_offset(struct isl_basic_map *bmap, - enum isl_dim_type type); -unsigned isl_basic_set_offset(struct isl_basic_set *bset, - enum isl_dim_type type); - -int isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap); -int isl_map_may_be_set(__isl_keep isl_map *map); -int isl_map_compatible_domain(struct isl_map *map, struct isl_set *set); -int isl_basic_map_compatible_domain(struct isl_basic_map *bmap, - struct isl_basic_set *bset); -int isl_basic_map_compatible_range(struct isl_basic_map *bmap, - struct isl_basic_set *bset); - -struct isl_basic_map *isl_basic_map_extend_dim(struct isl_basic_map *base, - struct isl_dim *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_extend_dim(struct isl_basic_set *base, - struct isl_dim *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, unsigned pos); - -struct isl_map *isl_map_grow(struct isl_map *map, int n); -struct isl_set *isl_set_grow(struct isl_set *set, int n); - -int isl_basic_set_contains(struct isl_basic_set *bset, struct isl_vec *vec); -int isl_basic_map_contains(struct isl_basic_map *bmap, struct isl_vec *vec); - -struct isl_basic_set *isl_basic_set_alloc_dim(struct isl_dim *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq); -struct isl_set *isl_set_alloc_dim(struct isl_dim *dim, int n, unsigned flags); -struct isl_basic_map *isl_basic_map_alloc_dim(struct isl_dim *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq); -struct isl_map *isl_map_alloc_dim(struct isl_dim *dim, int n, unsigned flags); - -unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap); - -int isl_basic_map_alloc_equality(struct isl_basic_map *bmap); -int isl_basic_set_alloc_equality(struct isl_basic_set *bset); -int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n); -int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n); -int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n); -int isl_basic_set_alloc_inequality(struct isl_basic_set *bset); -int isl_basic_map_alloc_inequality(struct isl_basic_map *bmap); -int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n); -int isl_basic_map_alloc_div(struct isl_basic_map *bmap); -int isl_basic_set_alloc_div(struct isl_basic_set *bset); -int isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n); -int isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n); -void isl_basic_map_inequality_to_equality( - struct isl_basic_map *bmap, unsigned pos); -int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos); -int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos); -int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos); -int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos); -__isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset, - isl_int *eq); -__isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap, - isl_int *eq); -__isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset, - isl_int *ineq); -__isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap, - isl_int *ineq); - -int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos); - -struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset); -struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap); -struct isl_set *isl_set_cow(struct isl_set *set); -struct isl_map *isl_map_cow(struct isl_map *map); - -struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset); -struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset); -void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b); -struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap); -__isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map); -struct isl_basic_map *isl_basic_map_align_divs( - struct isl_basic_map *dst, struct isl_basic_map *src); -struct isl_basic_set *isl_basic_set_align_divs( - struct isl_basic_set *dst, struct isl_basic_set *src); -struct isl_basic_map *isl_basic_map_gauss( - struct isl_basic_map *bmap, int *progress); -struct isl_basic_set *isl_basic_set_gauss( - struct isl_basic_set *bset, int *progress); -__isl_give isl_basic_set *isl_basic_set_sort_constraints( - __isl_take isl_basic_set *bset); -int isl_basic_map_plain_cmp(const __isl_keep isl_basic_map *bmap1, - const __isl_keep isl_basic_map *bmap2); -int isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2); -int isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); -struct isl_basic_map *isl_basic_map_normalize_constraints( - struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_normalize_constraints( - struct isl_basic_set *bset); -struct isl_basic_map *isl_basic_map_implicit_equalities( - struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_map_underlying_set(struct isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_set_underlying_set( - __isl_take isl_basic_set *bset); -struct isl_set *isl_map_underlying_set(struct isl_map *map); -struct isl_basic_map *isl_basic_map_overlying_set(struct isl_basic_set *bset, - struct isl_basic_map *like); -__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving( - __isl_take isl_basic_set *bset, unsigned first, unsigned n); -__isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_map *isl_basic_map_drop(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_set *isl_set_drop(struct isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_set *isl_basic_set_drop_dims( - struct isl_basic_set *bset, unsigned first, unsigned n); -struct isl_set *isl_set_drop_dims( - struct isl_set *set, unsigned first, unsigned n); -struct isl_map *isl_map_drop_inputs( - struct isl_map *map, unsigned first, unsigned n); -struct isl_map *isl_map_drop(struct isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); - -struct isl_map *isl_map_remove_empty_parts(struct isl_map *map); -struct isl_set *isl_set_remove_empty_parts(struct isl_set *set); - -struct isl_set *isl_set_normalize(struct isl_set *set); - -struct isl_set *isl_set_drop_vars( - struct isl_set *set, unsigned first, unsigned n); - -struct isl_basic_map *isl_basic_map_eliminate_vars( - struct isl_basic_map *bmap, unsigned pos, unsigned n); -struct isl_basic_set *isl_basic_set_eliminate_vars( - struct isl_basic_set *bset, unsigned pos, unsigned n); - -__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - -int isl_basic_set_constraint_is_redundant(struct isl_basic_set **bset, - isl_int *c, isl_int *opt_n, isl_int *opt_d); - -int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div); -struct isl_basic_map *isl_basic_map_drop_redundant_divs( - struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_drop_redundant_divs( - struct isl_basic_set *bset); - -struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset); -struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset); - -struct isl_basic_set *isl_basic_set_set_rational(struct isl_basic_set *bset); -__isl_give isl_basic_map *isl_basic_map_set_rational( - __isl_take isl_basic_map *bmap); - -struct isl_mat; - -struct isl_basic_set *isl_basic_set_preimage(struct isl_basic_set *bset, - struct isl_mat *mat); -struct isl_set *isl_set_preimage(struct isl_set *set, struct isl_mat *mat); - -__isl_give isl_basic_set *isl_basic_set_transform_dims( - __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, - __isl_take isl_mat *trans); - -isl_int *isl_set_wrap_facet(__isl_keep isl_set *set, - isl_int *facet, isl_int *ridge); - -int isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap, - __isl_keep isl_point *point); -int isl_set_contains_point(__isl_keep isl_set *set, __isl_keep isl_point *point); - -int isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset, - unsigned first, unsigned n, int *signs); -int isl_set_foreach_orthant(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_set *orthant, int *signs, void *user), - void *user); - -int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap, - unsigned pos, isl_int *div); -int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset, - unsigned pos, isl_int *div); -int isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap, - isl_int *constraint, unsigned div); - -__isl_give isl_basic_set *isl_basic_set_from_local_space( - __isl_take isl_local_space *ls); -__isl_give isl_basic_map *isl_basic_map_from_local_space( - __isl_take isl_local_space *ls); -__isl_give isl_basic_set *isl_basic_set_expand_divs( - __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp); - -int isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap); - -__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, - __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap)); - -#endif diff --git a/cloog-0.16.3/isl/isl_map_simplify.c b/cloog-0.16.3/isl/isl_map_simplify.c deleted file mode 100644 index 7a24c5bb11f23f0b1f0f733c2636745bdc2a83f0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map_simplify.c +++ /dev/null @@ -1,2497 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_equalities.h" -#include -#include -#include "isl_tab.h" -#include -#include - -static void swap_equality(struct isl_basic_map *bmap, int a, int b) -{ - isl_int *t = bmap->eq[a]; - bmap->eq[a] = bmap->eq[b]; - bmap->eq[b] = t; -} - -static void swap_inequality(struct isl_basic_map *bmap, int a, int b) -{ - if (a != b) { - isl_int *t = bmap->ineq[a]; - bmap->ineq[a] = bmap->ineq[b]; - bmap->ineq[b] = t; - } -} - -static void constraint_drop_vars(isl_int *c, unsigned n, unsigned rem) -{ - isl_seq_cpy(c, c + n, rem); - isl_seq_clr(c + rem, n); -} - -/* Drop n dimensions starting at first. - * - * In principle, this frees up some extra variables as the number - * of columns remains constant, but we would have to extend - * the div array too as the number of rows in this array is assumed - * to be equal to extra. - */ -struct isl_basic_set *isl_basic_set_drop_dims( - struct isl_basic_set *bset, unsigned first, unsigned n) -{ - int i; - - if (!bset) - goto error; - - isl_assert(bset->ctx, first + n <= bset->dim->n_out, goto error); - - if (n == 0 && !isl_dim_get_tuple_name(bset->dim, isl_dim_set)) - return bset; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - for (i = 0; i < bset->n_eq; ++i) - constraint_drop_vars(bset->eq[i]+1+bset->dim->nparam+first, n, - (bset->dim->n_out-first-n)+bset->extra); - - for (i = 0; i < bset->n_ineq; ++i) - constraint_drop_vars(bset->ineq[i]+1+bset->dim->nparam+first, n, - (bset->dim->n_out-first-n)+bset->extra); - - for (i = 0; i < bset->n_div; ++i) - constraint_drop_vars(bset->div[i]+1+1+bset->dim->nparam+first, n, - (bset->dim->n_out-first-n)+bset->extra); - - bset->dim = isl_dim_drop_outputs(bset->dim, first, n); - if (!bset->dim) - goto error; - - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED); - bset = isl_basic_set_simplify(bset); - return isl_basic_set_finalize(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_set *isl_set_drop_dims( - struct isl_set *set, unsigned first, unsigned n) -{ - int i; - - if (!set) - goto error; - - isl_assert(set->ctx, first + n <= set->dim->n_out, goto error); - - if (n == 0 && !isl_dim_get_tuple_name(set->dim, isl_dim_set)) - return set; - set = isl_set_cow(set); - if (!set) - goto error; - set->dim = isl_dim_drop_outputs(set->dim, first, n); - if (!set->dim) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_drop_dims(set->p[i], first, n); - if (!set->p[i]) - goto error; - } - - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_set_free(set); - return NULL; -} - -/* Move "n" divs starting at "first" to the end of the list of divs. - */ -static struct isl_basic_map *move_divs_last(struct isl_basic_map *bmap, - unsigned first, unsigned n) -{ - isl_int **div; - int i; - - if (first + n == bmap->n_div) - return bmap; - - div = isl_alloc_array(bmap->ctx, isl_int *, n); - if (!div) - goto error; - for (i = 0; i < n; ++i) - div[i] = bmap->div[first + i]; - for (i = 0; i < bmap->n_div - first - n; ++i) - bmap->div[first + i] = bmap->div[first + n + i]; - for (i = 0; i < n; ++i) - bmap->div[bmap->n_div - n + i] = div[i]; - free(div); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Drop "n" dimensions of type "type" starting at "first". - * - * In principle, this frees up some extra variables as the number - * of columns remains constant, but we would have to extend - * the div array too as the number of rows in this array is assumed - * to be equal to extra. - */ -struct isl_basic_map *isl_basic_map_drop(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - unsigned dim; - unsigned offset; - unsigned left; - - if (!bmap) - goto error; - - dim = isl_basic_map_dim(bmap, type); - isl_assert(bmap->ctx, first + n <= dim, goto error); - - if (n == 0 && !isl_dim_get_tuple_name(bmap->dim, type)) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - offset = isl_basic_map_offset(bmap, type) + first; - left = isl_basic_map_total_dim(bmap) - (offset - 1) - n; - for (i = 0; i < bmap->n_eq; ++i) - constraint_drop_vars(bmap->eq[i]+offset, n, left); - - for (i = 0; i < bmap->n_ineq; ++i) - constraint_drop_vars(bmap->ineq[i]+offset, n, left); - - for (i = 0; i < bmap->n_div; ++i) - constraint_drop_vars(bmap->div[i]+1+offset, n, left); - - if (type == isl_dim_div) { - bmap = move_divs_last(bmap, first, n); - if (!bmap) - goto error; - isl_basic_map_free_div(bmap, n); - } else - bmap->dim = isl_dim_drop(bmap->dim, type, first, n); - if (!bmap->dim) - goto error; - - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_basic_set *)isl_basic_map_drop((isl_basic_map *)bset, - type, first, n); -} - -struct isl_basic_map *isl_basic_map_drop_inputs( - struct isl_basic_map *bmap, unsigned first, unsigned n) -{ - return isl_basic_map_drop(bmap, isl_dim_in, first, n); -} - -struct isl_map *isl_map_drop(struct isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - goto error; - - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - - if (n == 0 && !isl_dim_get_tuple_name(map->dim, type)) - return map; - map = isl_map_cow(map); - if (!map) - goto error; - map->dim = isl_dim_drop(map->dim, type, first, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_drop(map->p[i], type, first, n); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop(struct isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_drop((isl_map *)set, type, first, n); -} - -struct isl_map *isl_map_drop_inputs( - struct isl_map *map, unsigned first, unsigned n) -{ - return isl_map_drop(map, isl_dim_in, first, n); -} - -/* - * We don't cow, as the div is assumed to be redundant. - */ -static struct isl_basic_map *isl_basic_map_drop_div( - struct isl_basic_map *bmap, unsigned div) -{ - int i; - unsigned pos; - - if (!bmap) - goto error; - - pos = 1 + isl_dim_total(bmap->dim) + div; - - isl_assert(bmap->ctx, div < bmap->n_div, goto error); - - for (i = 0; i < bmap->n_eq; ++i) - constraint_drop_vars(bmap->eq[i]+pos, 1, bmap->extra-div-1); - - for (i = 0; i < bmap->n_ineq; ++i) { - if (!isl_int_is_zero(bmap->ineq[i][pos])) { - isl_basic_map_drop_inequality(bmap, i); - --i; - continue; - } - constraint_drop_vars(bmap->ineq[i]+pos, 1, bmap->extra-div-1); - } - - for (i = 0; i < bmap->n_div; ++i) - constraint_drop_vars(bmap->div[i]+1+pos, 1, bmap->extra-div-1); - - if (div != bmap->n_div - 1) { - int j; - isl_int *t = bmap->div[div]; - - for (j = div; j < bmap->n_div - 1; ++j) - bmap->div[j] = bmap->div[j+1]; - - bmap->div[bmap->n_div - 1] = t; - } - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - isl_basic_map_free_div(bmap, 1); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_normalize_constraints( - struct isl_basic_map *bmap) -{ - int i; - isl_int gcd; - unsigned total = isl_basic_map_total_dim(bmap); - - if (!bmap) - return NULL; - - isl_int_init(gcd); - for (i = bmap->n_eq - 1; i >= 0; --i) { - isl_seq_gcd(bmap->eq[i]+1, total, &gcd); - if (isl_int_is_zero(gcd)) { - if (!isl_int_is_zero(bmap->eq[i][0])) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_basic_map_drop_equality(bmap, i); - continue; - } - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - isl_int_gcd(gcd, gcd, bmap->eq[i][0]); - if (isl_int_is_one(gcd)) - continue; - if (!isl_int_is_divisible_by(bmap->eq[i][0], gcd)) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_seq_scale_down(bmap->eq[i], bmap->eq[i], gcd, 1+total); - } - - for (i = bmap->n_ineq - 1; i >= 0; --i) { - isl_seq_gcd(bmap->ineq[i]+1, total, &gcd); - if (isl_int_is_zero(gcd)) { - if (isl_int_is_neg(bmap->ineq[i][0])) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_basic_map_drop_inequality(bmap, i); - continue; - } - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - isl_int_gcd(gcd, gcd, bmap->ineq[i][0]); - if (isl_int_is_one(gcd)) - continue; - isl_int_fdiv_q(bmap->ineq[i][0], bmap->ineq[i][0], gcd); - isl_seq_scale_down(bmap->ineq[i]+1, bmap->ineq[i]+1, gcd, total); - } - isl_int_clear(gcd); - - return bmap; -} - -struct isl_basic_set *isl_basic_set_normalize_constraints( - struct isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_normalize_constraints( - (struct isl_basic_map *)bset); -} - -/* Assumes divs have been ordered if keep_divs is set. - */ -static void eliminate_var_using_equality(struct isl_basic_map *bmap, - unsigned pos, isl_int *eq, int keep_divs, int *progress) -{ - unsigned total; - int k; - int last_div; - - total = isl_basic_map_total_dim(bmap); - last_div = isl_seq_last_non_zero(eq + 1 + isl_dim_total(bmap->dim), - bmap->n_div); - for (k = 0; k < bmap->n_eq; ++k) { - if (bmap->eq[k] == eq) - continue; - if (isl_int_is_zero(bmap->eq[k][1+pos])) - continue; - if (progress) - *progress = 1; - isl_seq_elim(bmap->eq[k], eq, 1+pos, 1+total, NULL); - isl_seq_normalize(bmap->ctx, bmap->eq[k], 1 + total); - } - - for (k = 0; k < bmap->n_ineq; ++k) { - if (isl_int_is_zero(bmap->ineq[k][1+pos])) - continue; - if (progress) - *progress = 1; - isl_seq_elim(bmap->ineq[k], eq, 1+pos, 1+total, NULL); - isl_seq_normalize(bmap->ctx, bmap->ineq[k], 1 + total); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } - - for (k = 0; k < bmap->n_div; ++k) { - if (isl_int_is_zero(bmap->div[k][0])) - continue; - if (isl_int_is_zero(bmap->div[k][1+1+pos])) - continue; - if (progress) - *progress = 1; - /* We need to be careful about circular definitions, - * so for now we just remove the definition of div k - * if the equality contains any divs. - * If keep_divs is set, then the divs have been ordered - * and we can keep the definition as long as the result - * is still ordered. - */ - if (last_div == -1 || (keep_divs && last_div < k)) - isl_seq_elim(bmap->div[k]+1, eq, - 1+pos, 1+total, &bmap->div[k][0]); - else - isl_seq_clr(bmap->div[k], 1 + total); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } -} - -/* Assumes divs have been ordered if keep_divs is set. - */ -static void eliminate_div(struct isl_basic_map *bmap, isl_int *eq, - unsigned div, int keep_divs) -{ - unsigned pos = isl_dim_total(bmap->dim) + div; - - eliminate_var_using_equality(bmap, pos, eq, keep_divs, NULL); - - isl_basic_map_drop_div(bmap, div); -} - -/* Check if elimination of div "div" using equality "eq" would not - * result in a div depending on a later div. - */ -static int ok_to_eliminate_div(struct isl_basic_map *bmap, isl_int *eq, - unsigned div) -{ - int k; - int last_div; - unsigned pos = isl_dim_total(bmap->dim) + div; - - last_div = isl_seq_last_non_zero(eq + 1 + isl_dim_total(bmap->dim), - bmap->n_div); - if (last_div < 0 || last_div <= div) - return 1; - - for (k = 0; k <= last_div; ++k) { - if (isl_int_is_zero(bmap->div[k][0])) - return 1; - if (!isl_int_is_zero(bmap->div[k][1 + 1 + pos])) - return 0; - } - - return 1; -} - -/* Elimininate divs based on equalities - */ -static struct isl_basic_map *eliminate_divs_eq( - struct isl_basic_map *bmap, int *progress) -{ - int d; - int i; - int modified = 0; - unsigned off; - - bmap = isl_basic_map_order_divs(bmap); - - if (!bmap) - return NULL; - - off = 1 + isl_dim_total(bmap->dim); - - for (d = bmap->n_div - 1; d >= 0 ; --d) { - for (i = 0; i < bmap->n_eq; ++i) { - if (!isl_int_is_one(bmap->eq[i][off + d]) && - !isl_int_is_negone(bmap->eq[i][off + d])) - continue; - if (!ok_to_eliminate_div(bmap, bmap->eq[i], d)) - continue; - modified = 1; - *progress = 1; - eliminate_div(bmap, bmap->eq[i], d, 1); - isl_basic_map_drop_equality(bmap, i); - break; - } - } - if (modified) - return eliminate_divs_eq(bmap, progress); - return bmap; -} - -/* Elimininate divs based on inequalities - */ -static struct isl_basic_map *eliminate_divs_ineq( - struct isl_basic_map *bmap, int *progress) -{ - int d; - int i; - unsigned off; - struct isl_ctx *ctx; - - if (!bmap) - return NULL; - - ctx = bmap->ctx; - off = 1 + isl_dim_total(bmap->dim); - - for (d = bmap->n_div - 1; d >= 0 ; --d) { - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][off + d])) - break; - if (i < bmap->n_eq) - continue; - for (i = 0; i < bmap->n_ineq; ++i) - if (isl_int_abs_gt(bmap->ineq[i][off + d], ctx->one)) - break; - if (i < bmap->n_ineq) - continue; - *progress = 1; - bmap = isl_basic_map_eliminate_vars(bmap, (off-1)+d, 1); - if (!bmap || ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - break; - bmap = isl_basic_map_drop_div(bmap, d); - if (!bmap) - break; - } - return bmap; -} - -struct isl_basic_map *isl_basic_map_gauss( - struct isl_basic_map *bmap, int *progress) -{ - int k; - int done; - int last_var; - unsigned total_var; - unsigned total; - - bmap = isl_basic_map_order_divs(bmap); - - if (!bmap) - return NULL; - - total = isl_basic_map_total_dim(bmap); - total_var = total - bmap->n_div; - - last_var = total - 1; - for (done = 0; done < bmap->n_eq; ++done) { - for (; last_var >= 0; --last_var) { - for (k = done; k < bmap->n_eq; ++k) - if (!isl_int_is_zero(bmap->eq[k][1+last_var])) - break; - if (k < bmap->n_eq) - break; - } - if (last_var < 0) - break; - if (k != done) - swap_equality(bmap, k, done); - if (isl_int_is_neg(bmap->eq[done][1+last_var])) - isl_seq_neg(bmap->eq[done], bmap->eq[done], 1+total); - - eliminate_var_using_equality(bmap, last_var, bmap->eq[done], 1, - progress); - - if (last_var >= total_var && - isl_int_is_zero(bmap->div[last_var - total_var][0])) { - unsigned div = last_var - total_var; - isl_seq_neg(bmap->div[div]+1, bmap->eq[done], 1+total); - isl_int_set_si(bmap->div[div][1+1+last_var], 0); - isl_int_set(bmap->div[div][0], - bmap->eq[done][1+last_var]); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } - } - if (done == bmap->n_eq) - return bmap; - for (k = done; k < bmap->n_eq; ++k) { - if (isl_int_is_zero(bmap->eq[k][0])) - continue; - return isl_basic_map_set_to_empty(bmap); - } - isl_basic_map_free_equality(bmap, bmap->n_eq-done); - return bmap; -} - -struct isl_basic_set *isl_basic_set_gauss( - struct isl_basic_set *bset, int *progress) -{ - return (struct isl_basic_set*)isl_basic_map_gauss( - (struct isl_basic_map *)bset, progress); -} - - -static unsigned int round_up(unsigned int v) -{ - int old_v = v; - - while (v) { - old_v = v; - v ^= v & -v; - } - return old_v << 1; -} - -static int hash_index(isl_int ***index, unsigned int size, int bits, - struct isl_basic_map *bmap, int k) -{ - int h; - unsigned total = isl_basic_map_total_dim(bmap); - uint32_t hash = isl_seq_get_hash_bits(bmap->ineq[k]+1, total, bits); - for (h = hash; index[h]; h = (h+1) % size) - if (&bmap->ineq[k] != index[h] && - isl_seq_eq(bmap->ineq[k]+1, index[h][0]+1, total)) - break; - return h; -} - -static int set_hash_index(isl_int ***index, unsigned int size, int bits, - struct isl_basic_set *bset, int k) -{ - return hash_index(index, size, bits, (struct isl_basic_map *)bset, k); -} - -/* If we can eliminate more than one div, then we need to make - * sure we do it from last div to first div, in order not to - * change the position of the other divs that still need to - * be removed. - */ -static struct isl_basic_map *remove_duplicate_divs( - struct isl_basic_map *bmap, int *progress) -{ - unsigned int size; - int *index; - int *elim_for; - int k, l, h; - int bits; - struct isl_blk eq; - unsigned total_var; - unsigned total; - struct isl_ctx *ctx; - - if (!bmap || bmap->n_div <= 1) - return bmap; - - total_var = isl_dim_total(bmap->dim); - total = total_var + bmap->n_div; - - ctx = bmap->ctx; - for (k = bmap->n_div - 1; k >= 0; --k) - if (!isl_int_is_zero(bmap->div[k][0])) - break; - if (k <= 0) - return bmap; - - elim_for = isl_calloc_array(ctx, int, bmap->n_div); - size = round_up(4 * bmap->n_div / 3 - 1); - bits = ffs(size) - 1; - index = isl_calloc_array(ctx, int, size); - if (!index) - return bmap; - eq = isl_blk_alloc(ctx, 1+total); - if (isl_blk_is_error(eq)) - goto out; - - isl_seq_clr(eq.data, 1+total); - index[isl_seq_get_hash_bits(bmap->div[k], 2+total, bits)] = k + 1; - for (--k; k >= 0; --k) { - uint32_t hash; - - if (isl_int_is_zero(bmap->div[k][0])) - continue; - - hash = isl_seq_get_hash_bits(bmap->div[k], 2+total, bits); - for (h = hash; index[h]; h = (h+1) % size) - if (isl_seq_eq(bmap->div[k], - bmap->div[index[h]-1], 2+total)) - break; - if (index[h]) { - *progress = 1; - l = index[h] - 1; - elim_for[l] = k + 1; - } - index[h] = k+1; - } - for (l = bmap->n_div - 1; l >= 0; --l) { - if (!elim_for[l]) - continue; - k = elim_for[l] - 1; - isl_int_set_si(eq.data[1+total_var+k], -1); - isl_int_set_si(eq.data[1+total_var+l], 1); - eliminate_div(bmap, eq.data, l, 0); - isl_int_set_si(eq.data[1+total_var+k], 0); - isl_int_set_si(eq.data[1+total_var+l], 0); - } - - isl_blk_free(ctx, eq); -out: - free(index); - free(elim_for); - return bmap; -} - -static int n_pure_div_eq(struct isl_basic_map *bmap) -{ - int i, j; - unsigned total; - - total = isl_dim_total(bmap->dim); - for (i = 0, j = bmap->n_div-1; i < bmap->n_eq; ++i) { - while (j >= 0 && isl_int_is_zero(bmap->eq[i][1 + total + j])) - --j; - if (j < 0) - break; - if (isl_seq_first_non_zero(bmap->eq[i] + 1 + total, j) != -1) - return 0; - } - return i; -} - -/* Normalize divs that appear in equalities. - * - * In particular, we assume that bmap contains some equalities - * of the form - * - * a x = m * e_i - * - * and we want to replace the set of e_i by a minimal set and - * such that the new e_i have a canonical representation in terms - * of the vector x. - * If any of the equalities involves more than one divs, then - * we currently simply bail out. - * - * Let us first additionally assume that all equalities involve - * a div. The equalities then express modulo constraints on the - * remaining variables and we can use "parameter compression" - * to find a minimal set of constraints. The result is a transformation - * - * x = T(x') = x_0 + G x' - * - * with G a lower-triangular matrix with all elements below the diagonal - * non-negative and smaller than the diagonal element on the same row. - * We first normalize x_0 by making the same property hold in the affine - * T matrix. - * The rows i of G with a 1 on the diagonal do not impose any modulo - * constraint and simply express x_i = x'_i. - * For each of the remaining rows i, we introduce a div and a corresponding - * equality. In particular - * - * g_ii e_j = x_i - g_i(x') - * - * where each x'_k is replaced either by x_k (if g_kk = 1) or the - * corresponding div (if g_kk != 1). - * - * If there are any equalities not involving any div, then we - * first apply a variable compression on the variables x: - * - * x = C x'' x'' = C_2 x - * - * and perform the above parameter compression on A C instead of on A. - * The resulting compression is then of the form - * - * x'' = T(x') = x_0 + G x' - * - * and in constructing the new divs and the corresponding equalities, - * we have to replace each x'', i.e., the x'_k with (g_kk = 1), - * by the corresponding row from C_2. - */ -static struct isl_basic_map *normalize_divs( - struct isl_basic_map *bmap, int *progress) -{ - int i, j, k; - int total; - int div_eq; - struct isl_mat *B; - struct isl_vec *d; - struct isl_mat *T = NULL; - struct isl_mat *C = NULL; - struct isl_mat *C2 = NULL; - isl_int v; - int *pos; - int dropped, needed; - - if (!bmap) - return NULL; - - if (bmap->n_div == 0) - return bmap; - - if (bmap->n_eq == 0) - return bmap; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS)) - return bmap; - - total = isl_dim_total(bmap->dim); - div_eq = n_pure_div_eq(bmap); - if (div_eq == 0) - return bmap; - - if (div_eq < bmap->n_eq) { - B = isl_mat_sub_alloc6(bmap->ctx, bmap->eq, div_eq, - bmap->n_eq - div_eq, 0, 1 + total); - C = isl_mat_variable_compression(B, &C2); - if (!C || !C2) - goto error; - if (C->n_col == 0) { - bmap = isl_basic_map_set_to_empty(bmap); - isl_mat_free(C); - isl_mat_free(C2); - goto done; - } - } - - d = isl_vec_alloc(bmap->ctx, div_eq); - if (!d) - goto error; - for (i = 0, j = bmap->n_div-1; i < div_eq; ++i) { - while (j >= 0 && isl_int_is_zero(bmap->eq[i][1 + total + j])) - --j; - isl_int_set(d->block.data[i], bmap->eq[i][1 + total + j]); - } - B = isl_mat_sub_alloc6(bmap->ctx, bmap->eq, 0, div_eq, 0, 1 + total); - - if (C) { - B = isl_mat_product(B, C); - C = NULL; - } - - T = isl_mat_parameter_compression(B, d); - if (!T) - goto error; - if (T->n_col == 0) { - bmap = isl_basic_map_set_to_empty(bmap); - isl_mat_free(C2); - isl_mat_free(T); - goto done; - } - isl_int_init(v); - for (i = 0; i < T->n_row - 1; ++i) { - isl_int_fdiv_q(v, T->row[1 + i][0], T->row[1 + i][1 + i]); - if (isl_int_is_zero(v)) - continue; - isl_mat_col_submul(T, 0, v, 1 + i); - } - isl_int_clear(v); - pos = isl_alloc_array(bmap->ctx, int, T->n_row); - if (!pos) - goto error; - /* We have to be careful because dropping equalities may reorder them */ - dropped = 0; - for (j = bmap->n_div - 1; j >= 0; --j) { - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][1 + total + j])) - break; - if (i < bmap->n_eq) { - bmap = isl_basic_map_drop_div(bmap, j); - isl_basic_map_drop_equality(bmap, i); - ++dropped; - } - } - pos[0] = 0; - needed = 0; - for (i = 1; i < T->n_row; ++i) { - if (isl_int_is_one(T->row[i][i])) - pos[i] = i; - else - needed++; - } - if (needed > dropped) { - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), - needed, needed, 0); - if (!bmap) - goto error; - } - for (i = 1; i < T->n_row; ++i) { - if (isl_int_is_one(T->row[i][i])) - continue; - k = isl_basic_map_alloc_div(bmap); - pos[i] = 1 + total + k; - isl_seq_clr(bmap->div[k] + 1, 1 + total + bmap->n_div); - isl_int_set(bmap->div[k][0], T->row[i][i]); - if (C2) - isl_seq_cpy(bmap->div[k] + 1, C2->row[i], 1 + total); - else - isl_int_set_si(bmap->div[k][1 + i], 1); - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(T->row[i][j])) - continue; - if (pos[j] < T->n_row && C2) - isl_seq_submul(bmap->div[k] + 1, T->row[i][j], - C2->row[pos[j]], 1 + total); - else - isl_int_neg(bmap->div[k][1 + pos[j]], - T->row[i][j]); - } - j = isl_basic_map_alloc_equality(bmap); - isl_seq_neg(bmap->eq[j], bmap->div[k]+1, 1+total+bmap->n_div); - isl_int_set(bmap->eq[j][pos[i]], bmap->div[k][0]); - } - free(pos); - isl_mat_free(C2); - isl_mat_free(T); - - if (progress) - *progress = 1; -done: - ISL_F_SET(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - - return bmap; -error: - isl_mat_free(C); - isl_mat_free(C2); - isl_mat_free(T); - return bmap; -} - -static struct isl_basic_map *set_div_from_lower_bound( - struct isl_basic_map *bmap, int div, int ineq) -{ - unsigned total = 1 + isl_dim_total(bmap->dim); - - isl_seq_neg(bmap->div[div] + 1, bmap->ineq[ineq], total + bmap->n_div); - isl_int_set(bmap->div[div][0], bmap->ineq[ineq][total + div]); - isl_int_add(bmap->div[div][1], bmap->div[div][1], bmap->div[div][0]); - isl_int_sub_ui(bmap->div[div][1], bmap->div[div][1], 1); - isl_int_set_si(bmap->div[div][1 + total + div], 0); - - return bmap; -} - -/* Check whether it is ok to define a div based on an inequality. - * To avoid the introduction of circular definitions of divs, we - * do not allow such a definition if the resulting expression would refer to - * any other undefined divs or if any known div is defined in - * terms of the unknown div. - */ -static int ok_to_set_div_from_bound(struct isl_basic_map *bmap, - int div, int ineq) -{ - int j; - unsigned total = 1 + isl_dim_total(bmap->dim); - - /* Not defined in terms of unknown divs */ - for (j = 0; j < bmap->n_div; ++j) { - if (div == j) - continue; - if (isl_int_is_zero(bmap->ineq[ineq][total + j])) - continue; - if (isl_int_is_zero(bmap->div[j][0])) - return 0; - } - - /* No other div defined in terms of this one => avoid loops */ - for (j = 0; j < bmap->n_div; ++j) { - if (div == j) - continue; - if (isl_int_is_zero(bmap->div[j][0])) - continue; - if (!isl_int_is_zero(bmap->div[j][1 + total + div])) - return 0; - } - - return 1; -} - -/* Given two constraints "k" and "l" that are opposite to each other, - * except for the constant term, check if we can use them - * to obtain an expression for one of the hitherto unknown divs. - * "sum" is the sum of the constant terms of the constraints. - * If this sum is strictly smaller than the coefficient of one - * of the divs, then this pair can be used define the div. - * To avoid the introduction of circular definitions of divs, we - * do not use the pair if the resulting expression would refer to - * any other undefined divs or if any known div is defined in - * terms of the unknown div. - */ -static struct isl_basic_map *check_for_div_constraints( - struct isl_basic_map *bmap, int k, int l, isl_int sum, int *progress) -{ - int i; - unsigned total = 1 + isl_dim_total(bmap->dim); - - for (i = 0; i < bmap->n_div; ++i) { - if (!isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_int_is_zero(bmap->ineq[k][total + i])) - continue; - if (isl_int_abs_ge(sum, bmap->ineq[k][total + i])) - continue; - if (!ok_to_set_div_from_bound(bmap, i, k)) - break; - if (isl_int_is_pos(bmap->ineq[k][total + i])) - bmap = set_div_from_lower_bound(bmap, i, k); - else - bmap = set_div_from_lower_bound(bmap, i, l); - if (progress) - *progress = 1; - break; - } - return bmap; -} - -static struct isl_basic_map *remove_duplicate_constraints( - struct isl_basic_map *bmap, int *progress, int detect_divs) -{ - unsigned int size; - isl_int ***index; - int k, l, h; - int bits; - unsigned total = isl_basic_map_total_dim(bmap); - isl_int sum; - isl_ctx *ctx; - - if (!bmap || bmap->n_ineq <= 1) - return bmap; - - size = round_up(4 * (bmap->n_ineq+1) / 3 - 1); - bits = ffs(size) - 1; - ctx = isl_basic_map_get_ctx(bmap); - index = isl_calloc_array(ctx, isl_int **, size); - if (!index) - return bmap; - - index[isl_seq_get_hash_bits(bmap->ineq[0]+1, total, bits)] = &bmap->ineq[0]; - for (k = 1; k < bmap->n_ineq; ++k) { - h = hash_index(index, size, bits, bmap, k); - if (!index[h]) { - index[h] = &bmap->ineq[k]; - continue; - } - if (progress) - *progress = 1; - l = index[h] - &bmap->ineq[0]; - if (isl_int_lt(bmap->ineq[k][0], bmap->ineq[l][0])) - swap_inequality(bmap, k, l); - isl_basic_map_drop_inequality(bmap, k); - --k; - } - isl_int_init(sum); - for (k = 0; k < bmap->n_ineq-1; ++k) { - isl_seq_neg(bmap->ineq[k]+1, bmap->ineq[k]+1, total); - h = hash_index(index, size, bits, bmap, k); - isl_seq_neg(bmap->ineq[k]+1, bmap->ineq[k]+1, total); - if (!index[h]) - continue; - l = index[h] - &bmap->ineq[0]; - isl_int_add(sum, bmap->ineq[k][0], bmap->ineq[l][0]); - if (isl_int_is_pos(sum)) { - if (detect_divs) - bmap = check_for_div_constraints(bmap, k, l, - sum, progress); - continue; - } - if (isl_int_is_zero(sum)) { - /* We need to break out of the loop after these - * changes since the contents of the hash - * will no longer be valid. - * Plus, we probably we want to regauss first. - */ - if (progress) - *progress = 1; - isl_basic_map_drop_inequality(bmap, l); - isl_basic_map_inequality_to_equality(bmap, k); - } else - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_int_clear(sum); - - free(index); - return bmap; -} - - -struct isl_basic_map *isl_basic_map_simplify(struct isl_basic_map *bmap) -{ - int progress = 1; - if (!bmap) - return NULL; - while (progress) { - progress = 0; - bmap = isl_basic_map_normalize_constraints(bmap); - bmap = remove_duplicate_divs(bmap, &progress); - bmap = eliminate_divs_eq(bmap, &progress); - bmap = eliminate_divs_ineq(bmap, &progress); - bmap = isl_basic_map_gauss(bmap, &progress); - /* requires equalities in normal form */ - bmap = normalize_divs(bmap, &progress); - bmap = remove_duplicate_constraints(bmap, &progress, 1); - } - return bmap; -} - -struct isl_basic_set *isl_basic_set_simplify(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_simplify((struct isl_basic_map *)bset); -} - - -int isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap, - isl_int *constraint, unsigned div) -{ - unsigned pos; - - if (!bmap) - return -1; - - pos = 1 + isl_dim_total(bmap->dim) + div; - - if (isl_int_eq(constraint[pos], bmap->div[div][0])) { - int neg; - isl_int_sub(bmap->div[div][1], - bmap->div[div][1], bmap->div[div][0]); - isl_int_add_ui(bmap->div[div][1], bmap->div[div][1], 1); - neg = isl_seq_is_neg(constraint, bmap->div[div]+1, pos); - isl_int_sub_ui(bmap->div[div][1], bmap->div[div][1], 1); - isl_int_add(bmap->div[div][1], - bmap->div[div][1], bmap->div[div][0]); - if (!neg) - return 0; - if (isl_seq_first_non_zero(constraint+pos+1, - bmap->n_div-div-1) != -1) - return 0; - } else if (isl_int_abs_eq(constraint[pos], bmap->div[div][0])) { - if (!isl_seq_eq(constraint, bmap->div[div]+1, pos)) - return 0; - if (isl_seq_first_non_zero(constraint+pos+1, - bmap->n_div-div-1) != -1) - return 0; - } else - return 0; - - return 1; -} - - -/* If the only constraints a div d=floor(f/m) - * appears in are its two defining constraints - * - * f - m d >=0 - * -(f - (m - 1)) + m d >= 0 - * - * then it can safely be removed. - */ -static int div_is_redundant(struct isl_basic_map *bmap, int div) -{ - int i; - unsigned pos = 1 + isl_dim_total(bmap->dim) + div; - - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][pos])) - return 0; - - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_int_is_zero(bmap->ineq[i][pos])) - continue; - if (!isl_basic_map_is_div_constraint(bmap, bmap->ineq[i], div)) - return 0; - } - - for (i = 0; i < bmap->n_div; ++i) - if (!isl_int_is_zero(bmap->div[i][1+pos])) - return 0; - - return 1; -} - -/* - * Remove divs that don't occur in any of the constraints or other divs. - * These can arise when dropping some of the variables in a quast - * returned by piplib. - */ -static struct isl_basic_map *remove_redundant_divs(struct isl_basic_map *bmap) -{ - int i; - - if (!bmap) - return NULL; - - for (i = bmap->n_div-1; i >= 0; --i) { - if (!div_is_redundant(bmap, i)) - continue; - bmap = isl_basic_map_drop_div(bmap, i); - } - return bmap; -} - -struct isl_basic_map *isl_basic_map_finalize(struct isl_basic_map *bmap) -{ - bmap = remove_redundant_divs(bmap); - if (!bmap) - return NULL; - ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); - return bmap; -} - -struct isl_basic_set *isl_basic_set_finalize(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_finalize((struct isl_basic_map *)bset); -} - -struct isl_set *isl_set_finalize(struct isl_set *set) -{ - int i; - - if (!set) - return NULL; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_finalize(set->p[i]); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -struct isl_map *isl_map_finalize(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_finalize(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - - -/* Remove definition of any div that is defined in terms of the given variable. - * The div itself is not removed. Functions such as - * eliminate_divs_ineq depend on the other divs remaining in place. - */ -static struct isl_basic_map *remove_dependent_vars(struct isl_basic_map *bmap, - int pos) -{ - int i; - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_int_is_zero(bmap->div[i][1+1+pos])) - continue; - isl_int_set_si(bmap->div[i][0], 0); - } - return bmap; -} - -/* Eliminate the specified variables from the constraints using - * Fourier-Motzkin. The variables themselves are not removed. - */ -struct isl_basic_map *isl_basic_map_eliminate_vars( - struct isl_basic_map *bmap, unsigned pos, unsigned n) -{ - int d; - int i, j, k; - unsigned total; - - if (n == 0) - return bmap; - if (!bmap) - return NULL; - total = isl_basic_map_total_dim(bmap); - - bmap = isl_basic_map_cow(bmap); - for (d = pos + n - 1; d >= 0 && d >= pos; --d) - bmap = remove_dependent_vars(bmap, d); - - for (d = pos + n - 1; - d >= 0 && d >= total - bmap->n_div && d >= pos; --d) - isl_seq_clr(bmap->div[d-(total-bmap->n_div)], 2+total); - for (d = pos + n - 1; d >= 0 && d >= pos; --d) { - int n_lower, n_upper; - if (!bmap) - return NULL; - for (i = 0; i < bmap->n_eq; ++i) { - if (isl_int_is_zero(bmap->eq[i][1+d])) - continue; - eliminate_var_using_equality(bmap, d, bmap->eq[i], 0, NULL); - isl_basic_map_drop_equality(bmap, i); - break; - } - if (i < bmap->n_eq) - continue; - n_lower = 0; - n_upper = 0; - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_int_is_pos(bmap->ineq[i][1+d])) - n_lower++; - else if (isl_int_is_neg(bmap->ineq[i][1+d])) - n_upper++; - } - bmap = isl_basic_map_extend_constraints(bmap, - 0, n_lower * n_upper); - if (!bmap) - goto error; - for (i = bmap->n_ineq - 1; i >= 0; --i) { - int last; - if (isl_int_is_zero(bmap->ineq[i][1+d])) - continue; - last = -1; - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(bmap->ineq[j][1+d])) - continue; - last = j; - if (isl_int_sgn(bmap->ineq[i][1+d]) == - isl_int_sgn(bmap->ineq[j][1+d])) - continue; - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], bmap->ineq[i], - 1+total); - isl_seq_elim(bmap->ineq[k], bmap->ineq[j], - 1+d, 1+total, NULL); - } - isl_basic_map_drop_inequality(bmap, i); - i = last + 1; - } - if (n_lower > 0 && n_upper > 0) { - bmap = isl_basic_map_normalize_constraints(bmap); - bmap = remove_duplicate_constraints(bmap, NULL, 0); - bmap = isl_basic_map_gauss(bmap, NULL); - bmap = isl_basic_map_remove_redundancies(bmap); - if (!bmap) - goto error; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - break; - } - } - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_eliminate_vars( - struct isl_basic_set *bset, unsigned pos, unsigned n) -{ - return (struct isl_basic_set *)isl_basic_map_eliminate_vars( - (struct isl_basic_map *)bset, pos, n); -} - -/* Don't assume equalities are in order, because align_divs - * may have changed the order of the divs. - */ -static void compute_elimination_index(struct isl_basic_map *bmap, int *elim) -{ - int d, i; - unsigned total; - - total = isl_dim_total(bmap->dim); - for (d = 0; d < total; ++d) - elim[d] = -1; - for (i = 0; i < bmap->n_eq; ++i) { - for (d = total - 1; d >= 0; --d) { - if (isl_int_is_zero(bmap->eq[i][1+d])) - continue; - elim[d] = i; - break; - } - } -} - -static void set_compute_elimination_index(struct isl_basic_set *bset, int *elim) -{ - compute_elimination_index((struct isl_basic_map *)bset, elim); -} - -static int reduced_using_equalities(isl_int *dst, isl_int *src, - struct isl_basic_map *bmap, int *elim) -{ - int d; - int copied = 0; - unsigned total; - - total = isl_dim_total(bmap->dim); - for (d = total - 1; d >= 0; --d) { - if (isl_int_is_zero(src[1+d])) - continue; - if (elim[d] == -1) - continue; - if (!copied) { - isl_seq_cpy(dst, src, 1 + total); - copied = 1; - } - isl_seq_elim(dst, bmap->eq[elim[d]], 1 + d, 1 + total, NULL); - } - return copied; -} - -static int set_reduced_using_equalities(isl_int *dst, isl_int *src, - struct isl_basic_set *bset, int *elim) -{ - return reduced_using_equalities(dst, src, - (struct isl_basic_map *)bset, elim); -} - -static struct isl_basic_set *isl_basic_set_reduce_using_equalities( - struct isl_basic_set *bset, struct isl_basic_set *context) -{ - int i; - int *elim; - - if (!bset || !context) - goto error; - - if (context->n_eq == 0) { - isl_basic_set_free(context); - return bset; - } - - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - - elim = isl_alloc_array(bset->ctx, int, isl_basic_set_n_dim(bset)); - if (!elim) - goto error; - set_compute_elimination_index(context, elim); - for (i = 0; i < bset->n_eq; ++i) - set_reduced_using_equalities(bset->eq[i], bset->eq[i], - context, elim); - for (i = 0; i < bset->n_ineq; ++i) - set_reduced_using_equalities(bset->ineq[i], bset->ineq[i], - context, elim); - isl_basic_set_free(context); - free(elim); - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - return bset; -error: - isl_basic_set_free(bset); - isl_basic_set_free(context); - return NULL; -} - -static struct isl_basic_set *remove_shifted_constraints( - struct isl_basic_set *bset, struct isl_basic_set *context) -{ - unsigned int size; - isl_int ***index; - int bits; - int k, h, l; - isl_ctx *ctx; - - if (!bset) - return NULL; - - size = round_up(4 * (context->n_ineq+1) / 3 - 1); - bits = ffs(size) - 1; - ctx = isl_basic_set_get_ctx(bset); - index = isl_calloc_array(ctx, isl_int **, size); - if (!index) - return bset; - - for (k = 0; k < context->n_ineq; ++k) { - h = set_hash_index(index, size, bits, context, k); - index[h] = &context->ineq[k]; - } - for (k = 0; k < bset->n_ineq; ++k) { - h = set_hash_index(index, size, bits, bset, k); - if (!index[h]) - continue; - l = index[h] - &context->ineq[0]; - if (isl_int_lt(bset->ineq[k][0], context->ineq[l][0])) - continue; - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - isl_basic_set_drop_inequality(bset, k); - --k; - } - free(index); - return bset; -error: - free(index); - return bset; -} - -/* Remove all information from bset that is redundant in the context - * of context. Both bset and context are assumed to be full-dimensional. - * - * We first * remove the inequalities from "bset" - * that are obviously redundant with respect to some inequality in "context". - * - * If there are any inequalities left, we construct a tableau for - * the context and then add the inequalities of "bset". - * Before adding these inequalities, we freeze all constraints such that - * they won't be considered redundant in terms of the constraints of "bset". - * Then we detect all redundant constraints (among the - * constraints that weren't frozen), first by checking for redundancy in the - * the tableau and then by checking if replacing a constraint by its negation - * would lead to an empty set. This last step is fairly expensive - * and could be optimized by more reuse of the tableau. - * Finally, we update bset according to the results. - */ -static __isl_give isl_basic_set *uset_gist_full(__isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context) -{ - int i, k; - isl_basic_set *combined = NULL; - struct isl_tab *tab = NULL; - unsigned context_ineq; - unsigned total; - - if (!bset || !context) - goto error; - - if (isl_basic_set_is_universe(bset)) { - isl_basic_set_free(context); - return bset; - } - - if (isl_basic_set_is_universe(context)) { - isl_basic_set_free(context); - return bset; - } - - bset = remove_shifted_constraints(bset, context); - if (!bset) - goto error; - if (bset->n_ineq == 0) - goto done; - - context_ineq = context->n_ineq; - combined = isl_basic_set_cow(isl_basic_set_copy(context)); - combined = isl_basic_set_extend_constraints(combined, 0, bset->n_ineq); - tab = isl_tab_from_basic_set(combined); - for (i = 0; i < context_ineq; ++i) - if (isl_tab_freeze_constraint(tab, i) < 0) - goto error; - tab = isl_tab_extend(tab, bset->n_ineq); - for (i = 0; i < bset->n_ineq; ++i) - if (isl_tab_add_ineq(tab, bset->ineq[i]) < 0) - goto error; - bset = isl_basic_set_add_constraints(combined, bset, 0); - combined = NULL; - if (!bset) - goto error; - if (isl_tab_detect_redundant(tab) < 0) - goto error; - total = isl_basic_set_total_dim(bset); - for (i = context_ineq; i < bset->n_ineq; ++i) { - int is_empty; - if (tab->con[i].is_redundant) - continue; - tab->con[i].is_redundant = 1; - combined = isl_basic_set_dup(bset); - combined = isl_basic_set_update_from_tab(combined, tab); - combined = isl_basic_set_extend_constraints(combined, 0, 1); - k = isl_basic_set_alloc_inequality(combined); - if (k < 0) - goto error; - isl_seq_neg(combined->ineq[k], bset->ineq[i], 1 + total); - isl_int_sub_ui(combined->ineq[k][0], combined->ineq[k][0], 1); - is_empty = isl_basic_set_is_empty(combined); - if (is_empty < 0) - goto error; - isl_basic_set_free(combined); - combined = NULL; - if (!is_empty) - tab->con[i].is_redundant = 0; - } - for (i = 0; i < context_ineq; ++i) - tab->con[i].is_redundant = 1; - bset = isl_basic_set_update_from_tab(bset, tab); - if (bset) { - ISL_F_SET(bset, ISL_BASIC_SET_NO_IMPLICIT); - ISL_F_SET(bset, ISL_BASIC_SET_NO_REDUNDANT); - } - - isl_tab_free(tab); -done: - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - isl_basic_set_free(context); - return bset; -error: - isl_tab_free(tab); - isl_basic_set_free(combined); - isl_basic_set_free(context); - isl_basic_set_free(bset); - return NULL; -} - -/* Remove all information from bset that is redundant in the context - * of context. In particular, equalities that are linear combinations - * of those in context are removed. Then the inequalities that are - * redundant in the context of the equalities and inequalities of - * context are removed. - * - * We first compute the integer affine hull of the intersection, - * compute the gist inside this affine hull and then add back - * those equalities that are not implied by the context. - * - * If two constraints are mutually redundant, then uset_gist_full - * will remove the second of those constraints. We therefore first - * sort the constraints so that constraints not involving existentially - * quantified variables are given precedence over those that do. - * We have to perform this sorting before the variable compression, - * because that may effect the order of the variables. - */ -static __isl_give isl_basic_set *uset_gist(__isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context) -{ - isl_mat *eq; - isl_mat *T, *T2; - isl_basic_set *aff; - isl_basic_set *aff_context; - unsigned total; - - if (!bset || !context) - goto error; - - bset = isl_basic_set_intersect(bset, isl_basic_set_copy(context)); - if (isl_basic_set_plain_is_empty(bset)) { - isl_basic_set_free(context); - return bset; - } - bset = isl_basic_set_sort_constraints(bset); - aff = isl_basic_set_affine_hull(isl_basic_set_copy(bset)); - if (!aff) - goto error; - if (isl_basic_set_plain_is_empty(aff)) { - isl_basic_set_free(aff); - isl_basic_set_free(context); - return bset; - } - if (aff->n_eq == 0) { - isl_basic_set_free(aff); - return uset_gist_full(bset, context); - } - total = isl_basic_set_total_dim(bset); - eq = isl_mat_sub_alloc6(bset->ctx, aff->eq, 0, aff->n_eq, 0, 1 + total); - eq = isl_mat_cow(eq); - T = isl_mat_variable_compression(eq, &T2); - if (T && T->n_col == 0) { - isl_mat_free(T); - isl_mat_free(T2); - isl_basic_set_free(context); - isl_basic_set_free(aff); - return isl_basic_set_set_to_empty(bset); - } - - aff_context = isl_basic_set_affine_hull(isl_basic_set_copy(context)); - - bset = isl_basic_set_preimage(bset, isl_mat_copy(T)); - context = isl_basic_set_preimage(context, T); - - bset = uset_gist_full(bset, context); - bset = isl_basic_set_preimage(bset, T2); - bset = isl_basic_set_intersect(bset, aff); - bset = isl_basic_set_reduce_using_equalities(bset, aff_context); - - if (bset) { - ISL_F_SET(bset, ISL_BASIC_SET_NO_IMPLICIT); - ISL_F_SET(bset, ISL_BASIC_SET_NO_REDUNDANT); - } - - return bset; -error: - isl_basic_set_free(bset); - isl_basic_set_free(context); - return NULL; -} - -/* Normalize the divs in "bmap" in the context of the equalities in "context". - * We simply add the equalities in context to bmap and then do a regular - * div normalizations. Better results can be obtained by normalizing - * only the divs in bmap than do not also appear in context. - * We need to be careful to reduce the divs using the equalities - * so that later calls to isl_basic_map_overlying_set wouldn't introduce - * spurious constraints. - */ -static struct isl_basic_map *normalize_divs_in_context( - struct isl_basic_map *bmap, struct isl_basic_map *context) -{ - int i; - unsigned total_context; - int div_eq; - - div_eq = n_pure_div_eq(bmap); - if (div_eq == 0) - return bmap; - - if (context->n_div > 0) - bmap = isl_basic_map_align_divs(bmap, context); - - total_context = isl_basic_map_total_dim(context); - bmap = isl_basic_map_extend_constraints(bmap, context->n_eq, 0); - for (i = 0; i < context->n_eq; ++i) { - int k; - k = isl_basic_map_alloc_equality(bmap); - isl_seq_cpy(bmap->eq[k], context->eq[i], 1 + total_context); - isl_seq_clr(bmap->eq[k] + 1 + total_context, - isl_basic_map_total_dim(bmap) - total_context); - } - bmap = isl_basic_map_gauss(bmap, NULL); - bmap = normalize_divs(bmap, NULL); - bmap = isl_basic_map_gauss(bmap, NULL); - return bmap; -} - -struct isl_basic_map *isl_basic_map_gist(struct isl_basic_map *bmap, - struct isl_basic_map *context) -{ - struct isl_basic_set *bset; - - if (!bmap || !context) - goto error; - - if (isl_basic_map_is_universe(bmap)) { - isl_basic_map_free(context); - return bmap; - } - if (isl_basic_map_plain_is_empty(context)) { - struct isl_dim *dim = isl_dim_copy(bmap->dim); - isl_basic_map_free(context); - isl_basic_map_free(bmap); - return isl_basic_map_universe(dim); - } - if (isl_basic_map_plain_is_empty(bmap)) { - isl_basic_map_free(context); - return bmap; - } - - bmap = isl_basic_map_remove_redundancies(bmap); - context = isl_basic_map_remove_redundancies(context); - - if (context->n_eq) - bmap = normalize_divs_in_context(bmap, context); - - context = isl_basic_map_align_divs(context, bmap); - bmap = isl_basic_map_align_divs(bmap, context); - - bset = uset_gist(isl_basic_map_underlying_set(isl_basic_map_copy(bmap)), - isl_basic_map_underlying_set(context)); - - return isl_basic_map_overlying_set(bset, bmap); -error: - isl_basic_map_free(bmap); - isl_basic_map_free(context); - return NULL; -} - -/* - * Assumes context has no implicit divs. - */ -__isl_give isl_map *isl_map_gist_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *context) -{ - int i; - - if (!map || !context) - goto error;; - - if (isl_basic_map_plain_is_empty(context)) { - struct isl_dim *dim = isl_dim_copy(map->dim); - isl_basic_map_free(context); - isl_map_free(map); - return isl_map_universe(dim); - } - - context = isl_basic_map_remove_redundancies(context); - map = isl_map_cow(map); - if (!map || !context) - goto error;; - isl_assert(map->ctx, isl_dim_equal(map->dim, context->dim), goto error); - map = isl_map_compute_divs(map); - for (i = 0; i < map->n; ++i) - context = isl_basic_map_align_divs(context, map->p[i]); - for (i = map->n - 1; i >= 0; --i) { - map->p[i] = isl_basic_map_gist(map->p[i], - isl_basic_map_copy(context)); - if (!map->p[i]) - goto error; - if (isl_basic_map_plain_is_empty(map->p[i])) { - isl_basic_map_free(map->p[i]); - if (i != map->n - 1) - map->p[i] = map->p[map->n - 1]; - map->n--; - } - } - isl_basic_map_free(context); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - isl_basic_map_free(context); - return NULL; -} - -__isl_give isl_map *isl_map_gist(__isl_take isl_map *map, - __isl_take isl_map *context) -{ - context = isl_map_compute_divs(context); - return isl_map_gist_basic_map(map, isl_map_simple_hull(context)); -} - -struct isl_basic_set *isl_basic_set_gist(struct isl_basic_set *bset, - struct isl_basic_set *context) -{ - return (struct isl_basic_set *)isl_basic_map_gist( - (struct isl_basic_map *)bset, (struct isl_basic_map *)context); -} - -__isl_give isl_set *isl_set_gist_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *context) -{ - return (struct isl_set *)isl_map_gist_basic_map((struct isl_map *)set, - (struct isl_basic_map *)context); -} - -__isl_give isl_set *isl_set_gist(__isl_take isl_set *set, - __isl_take isl_set *context) -{ - return (struct isl_set *)isl_map_gist((struct isl_map *)set, - (struct isl_map *)context); -} - -/* Quick check to see if two basic maps are disjoint. - * In particular, we reduce the equalities and inequalities of - * one basic map in the context of the equalities of the other - * basic map and check if we get a contradiction. - */ -int isl_basic_map_plain_is_disjoint(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2) -{ - struct isl_vec *v = NULL; - int *elim = NULL; - unsigned total; - int i; - - if (!bmap1 || !bmap2) - return -1; - isl_assert(bmap1->ctx, isl_dim_equal(bmap1->dim, bmap2->dim), - return -1); - if (bmap1->n_div || bmap2->n_div) - return 0; - if (!bmap1->n_eq && !bmap2->n_eq) - return 0; - - total = isl_dim_total(bmap1->dim); - if (total == 0) - return 0; - v = isl_vec_alloc(bmap1->ctx, 1 + total); - if (!v) - goto error; - elim = isl_alloc_array(bmap1->ctx, int, total); - if (!elim) - goto error; - compute_elimination_index(bmap1, elim); - for (i = 0; i < bmap2->n_eq; ++i) { - int reduced; - reduced = reduced_using_equalities(v->block.data, bmap2->eq[i], - bmap1, elim); - if (reduced && !isl_int_is_zero(v->block.data[0]) && - isl_seq_first_non_zero(v->block.data + 1, total) == -1) - goto disjoint; - } - for (i = 0; i < bmap2->n_ineq; ++i) { - int reduced; - reduced = reduced_using_equalities(v->block.data, - bmap2->ineq[i], bmap1, elim); - if (reduced && isl_int_is_neg(v->block.data[0]) && - isl_seq_first_non_zero(v->block.data + 1, total) == -1) - goto disjoint; - } - compute_elimination_index(bmap2, elim); - for (i = 0; i < bmap1->n_ineq; ++i) { - int reduced; - reduced = reduced_using_equalities(v->block.data, - bmap1->ineq[i], bmap2, elim); - if (reduced && isl_int_is_neg(v->block.data[0]) && - isl_seq_first_non_zero(v->block.data + 1, total) == -1) - goto disjoint; - } - isl_vec_free(v); - free(elim); - return 0; -disjoint: - isl_vec_free(v); - free(elim); - return 1; -error: - isl_vec_free(v); - free(elim); - return -1; -} - -int isl_basic_set_plain_is_disjoint(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2) -{ - return isl_basic_map_plain_is_disjoint((struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2); -} - -int isl_map_plain_is_disjoint(__isl_keep isl_map *map1, - __isl_keep isl_map *map2) -{ - int i, j; - - if (!map1 || !map2) - return -1; - - if (isl_map_plain_is_equal(map1, map2)) - return 0; - - for (i = 0; i < map1->n; ++i) { - for (j = 0; j < map2->n; ++j) { - int d = isl_basic_map_plain_is_disjoint(map1->p[i], - map2->p[j]); - if (d != 1) - return d; - } - } - return 1; -} - -int isl_set_plain_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2) -{ - return isl_map_plain_is_disjoint((struct isl_map *)set1, - (struct isl_map *)set2); -} - -int isl_set_fast_is_disjoint(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_set_plain_is_disjoint(set1, set2); -} - -/* Check if we can combine a given div with lower bound l and upper - * bound u with some other div and if so return that other div. - * Otherwise return -1. - * - * We first check that - * - the bounds are opposites of each other (except for the constant - * term) - * - the bounds do not reference any other div - * - no div is defined in terms of this div - * - * Let m be the size of the range allowed on the div by the bounds. - * That is, the bounds are of the form - * - * e <= a <= e + m - 1 - * - * with e some expression in the other variables. - * We look for another div b such that no third div is defined in terms - * of this second div b and such that in any constraint that contains - * a (except for the given lower and upper bound), also contains b - * with a coefficient that is m times that of b. - * That is, all constraints (execpt for the lower and upper bound) - * are of the form - * - * e + f (a + m b) >= 0 - * - * If so, we return b so that "a + m b" can be replaced by - * a single div "c = a + m b". - */ -static int div_find_coalesce(struct isl_basic_map *bmap, int *pairs, - unsigned div, unsigned l, unsigned u) -{ - int i, j; - unsigned dim; - int coalesce = -1; - - if (bmap->n_div <= 1) - return -1; - dim = isl_dim_total(bmap->dim); - if (isl_seq_first_non_zero(bmap->ineq[l] + 1 + dim, div) != -1) - return -1; - if (isl_seq_first_non_zero(bmap->ineq[l] + 1 + dim + div + 1, - bmap->n_div - div - 1) != -1) - return -1; - if (!isl_seq_is_neg(bmap->ineq[l] + 1, bmap->ineq[u] + 1, - dim + bmap->n_div)) - return -1; - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (!isl_int_is_zero(bmap->div[i][1 + 1 + dim + div])) - return -1; - } - - isl_int_add(bmap->ineq[l][0], bmap->ineq[l][0], bmap->ineq[u][0]); - if (isl_int_is_neg(bmap->ineq[l][0])) { - isl_int_sub(bmap->ineq[l][0], - bmap->ineq[l][0], bmap->ineq[u][0]); - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_set_to_empty(bmap); - isl_basic_map_free(bmap); - return -1; - } - isl_int_add_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - for (i = 0; i < bmap->n_div; ++i) { - if (i == div) - continue; - if (!pairs[i]) - continue; - for (j = 0; j < bmap->n_div; ++j) { - if (isl_int_is_zero(bmap->div[j][0])) - continue; - if (!isl_int_is_zero(bmap->div[j][1 + 1 + dim + i])) - break; - } - if (j < bmap->n_div) - continue; - for (j = 0; j < bmap->n_ineq; ++j) { - int valid; - if (j == l || j == u) - continue; - if (isl_int_is_zero(bmap->ineq[j][1 + dim + div])) - continue; - if (isl_int_is_zero(bmap->ineq[j][1 + dim + i])) - break; - isl_int_mul(bmap->ineq[j][1 + dim + div], - bmap->ineq[j][1 + dim + div], - bmap->ineq[l][0]); - valid = isl_int_eq(bmap->ineq[j][1 + dim + div], - bmap->ineq[j][1 + dim + i]); - isl_int_divexact(bmap->ineq[j][1 + dim + div], - bmap->ineq[j][1 + dim + div], - bmap->ineq[l][0]); - if (!valid) - break; - } - if (j < bmap->n_ineq) - continue; - coalesce = i; - break; - } - isl_int_sub_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - isl_int_sub(bmap->ineq[l][0], bmap->ineq[l][0], bmap->ineq[u][0]); - return coalesce; -} - -/* Given a lower and an upper bound on div i, construct an inequality - * that when nonnegative ensures that this pair of bounds always allows - * for an integer value of the given div. - * The lower bound is inequality l, while the upper bound is inequality u. - * The constructed inequality is stored in ineq. - * g, fl, fu are temporary scalars. - * - * Let the upper bound be - * - * -n_u a + e_u >= 0 - * - * and the lower bound - * - * n_l a + e_l >= 0 - * - * Let n_u = f_u g and n_l = f_l g, with g = gcd(n_u, n_l). - * We have - * - * - f_u e_l <= f_u f_l g a <= f_l e_u - * - * Since all variables are integer valued, this is equivalent to - * - * - f_u e_l - (f_u - 1) <= f_u f_l g a <= f_l e_u + (f_l - 1) - * - * If this interval is at least f_u f_l g, then it contains at least - * one integer value for a. - * That is, the test constraint is - * - * f_l e_u + f_u e_l + f_l - 1 + f_u - 1 + 1 >= f_u f_l g - */ -static void construct_test_ineq(struct isl_basic_map *bmap, int i, - int l, int u, isl_int *ineq, isl_int g, isl_int fl, isl_int fu) -{ - unsigned dim; - dim = isl_dim_total(bmap->dim); - - isl_int_gcd(g, bmap->ineq[l][1 + dim + i], bmap->ineq[u][1 + dim + i]); - isl_int_divexact(fl, bmap->ineq[l][1 + dim + i], g); - isl_int_divexact(fu, bmap->ineq[u][1 + dim + i], g); - isl_int_neg(fu, fu); - isl_seq_combine(ineq, fl, bmap->ineq[u], fu, bmap->ineq[l], - 1 + dim + bmap->n_div); - isl_int_add(ineq[0], ineq[0], fl); - isl_int_add(ineq[0], ineq[0], fu); - isl_int_sub_ui(ineq[0], ineq[0], 1); - isl_int_mul(g, g, fl); - isl_int_mul(g, g, fu); - isl_int_sub(ineq[0], ineq[0], g); -} - -/* Remove more kinds of divs that are not strictly needed. - * In particular, if all pairs of lower and upper bounds on a div - * are such that they allow at least one integer value of the div, - * the we can eliminate the div using Fourier-Motzkin without - * introducing any spurious solutions. - */ -static struct isl_basic_map *drop_more_redundant_divs( - struct isl_basic_map *bmap, int *pairs, int n) -{ - struct isl_tab *tab = NULL; - struct isl_vec *vec = NULL; - unsigned dim; - int remove = -1; - isl_int g, fl, fu; - - isl_int_init(g); - isl_int_init(fl); - isl_int_init(fu); - - if (!bmap) - goto error; - - dim = isl_dim_total(bmap->dim); - vec = isl_vec_alloc(bmap->ctx, 1 + dim + bmap->n_div); - if (!vec) - goto error; - - tab = isl_tab_from_basic_map(bmap); - - while (n > 0) { - int i, l, u; - int best = -1; - enum isl_lp_result res; - - for (i = 0; i < bmap->n_div; ++i) { - if (!pairs[i]) - continue; - if (best >= 0 && pairs[best] <= pairs[i]) - continue; - best = i; - } - - i = best; - for (l = 0; l < bmap->n_ineq; ++l) { - if (!isl_int_is_pos(bmap->ineq[l][1 + dim + i])) - continue; - for (u = 0; u < bmap->n_ineq; ++u) { - if (!isl_int_is_neg(bmap->ineq[u][1 + dim + i])) - continue; - construct_test_ineq(bmap, i, l, u, - vec->el, g, fl, fu); - res = isl_tab_min(tab, vec->el, - bmap->ctx->one, &g, NULL, 0); - if (res == isl_lp_error) - goto error; - if (res == isl_lp_empty) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - if (res != isl_lp_ok || isl_int_is_neg(g)) - break; - } - if (u < bmap->n_ineq) - break; - } - if (l == bmap->n_ineq) { - remove = i; - break; - } - pairs[i] = 0; - --n; - } - - isl_tab_free(tab); - isl_vec_free(vec); - - isl_int_clear(g); - isl_int_clear(fl); - isl_int_clear(fu); - - free(pairs); - - if (remove < 0) - return bmap; - - bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, remove, 1); - return isl_basic_map_drop_redundant_divs(bmap); -error: - free(pairs); - isl_basic_map_free(bmap); - isl_tab_free(tab); - isl_vec_free(vec); - isl_int_clear(g); - isl_int_clear(fl); - isl_int_clear(fu); - return NULL; -} - -/* Given a pair of divs div1 and div2 such that, expect for the lower bound l - * and the upper bound u, div1 always occurs together with div2 in the form - * (div1 + m div2), where m is the constant range on the variable div1 - * allowed by l and u, replace the pair div1 and div2 by a single - * div that is equal to div1 + m div2. - * - * The new div will appear in the location that contains div2. - * We need to modify all constraints that contain - * div2 = (div - div1) / m - * (If a constraint does not contain div2, it will also not contain div1.) - * If the constraint also contains div1, then we know they appear - * as f (div1 + m div2) and we can simply replace (div1 + m div2) by div, - * i.e., the coefficient of div is f. - * - * Otherwise, we first need to introduce div1 into the constraint. - * Let the l be - * - * div1 + f >=0 - * - * and u - * - * -div1 + f' >= 0 - * - * A lower bound on div2 - * - * n div2 + t >= 0 - * - * can be replaced by - * - * (n * (m div 2 + div1) + m t + n f)/g >= 0 - * - * with g = gcd(m,n). - * An upper bound - * - * -n div2 + t >= 0 - * - * can be replaced by - * - * (-n * (m div2 + div1) + m t + n f')/g >= 0 - * - * These constraint are those that we would obtain from eliminating - * div1 using Fourier-Motzkin. - * - * After all constraints have been modified, we drop the lower and upper - * bound and then drop div1. - */ -static struct isl_basic_map *coalesce_divs(struct isl_basic_map *bmap, - unsigned div1, unsigned div2, unsigned l, unsigned u) -{ - isl_int a; - isl_int b; - isl_int m; - unsigned dim, total; - int i; - - dim = isl_dim_total(bmap->dim); - total = 1 + dim + bmap->n_div; - - isl_int_init(a); - isl_int_init(b); - isl_int_init(m); - isl_int_add(m, bmap->ineq[l][0], bmap->ineq[u][0]); - isl_int_add_ui(m, m, 1); - - for (i = 0; i < bmap->n_ineq; ++i) { - if (i == l || i == u) - continue; - if (isl_int_is_zero(bmap->ineq[i][1 + dim + div2])) - continue; - if (isl_int_is_zero(bmap->ineq[i][1 + dim + div1])) { - isl_int_gcd(b, m, bmap->ineq[i][1 + dim + div2]); - isl_int_divexact(a, m, b); - isl_int_divexact(b, bmap->ineq[i][1 + dim + div2], b); - if (isl_int_is_pos(b)) { - isl_seq_combine(bmap->ineq[i], a, bmap->ineq[i], - b, bmap->ineq[l], total); - } else { - isl_int_neg(b, b); - isl_seq_combine(bmap->ineq[i], a, bmap->ineq[i], - b, bmap->ineq[u], total); - } - } - isl_int_set(bmap->ineq[i][1 + dim + div2], - bmap->ineq[i][1 + dim + div1]); - isl_int_set_si(bmap->ineq[i][1 + dim + div1], 0); - } - - isl_int_clear(a); - isl_int_clear(b); - isl_int_clear(m); - if (l > u) { - isl_basic_map_drop_inequality(bmap, l); - isl_basic_map_drop_inequality(bmap, u); - } else { - isl_basic_map_drop_inequality(bmap, u); - isl_basic_map_drop_inequality(bmap, l); - } - bmap = isl_basic_map_drop_div(bmap, div1); - return bmap; -} - -/* First check if we can coalesce any pair of divs and - * then continue with dropping more redundant divs. - * - * We loop over all pairs of lower and upper bounds on a div - * with coefficient 1 and -1, respectively, check if there - * is any other div "c" with which we can coalesce the div - * and if so, perform the coalescing. - */ -static struct isl_basic_map *coalesce_or_drop_more_redundant_divs( - struct isl_basic_map *bmap, int *pairs, int n) -{ - int i, l, u; - unsigned dim; - - dim = isl_dim_total(bmap->dim); - - for (i = 0; i < bmap->n_div; ++i) { - if (!pairs[i]) - continue; - for (l = 0; l < bmap->n_ineq; ++l) { - if (!isl_int_is_one(bmap->ineq[l][1 + dim + i])) - continue; - for (u = 0; u < bmap->n_ineq; ++u) { - int c; - - if (!isl_int_is_negone(bmap->ineq[u][1+dim+i])) - continue; - c = div_find_coalesce(bmap, pairs, i, l, u); - if (c < 0) - continue; - free(pairs); - bmap = coalesce_divs(bmap, i, c, l, u); - return isl_basic_map_drop_redundant_divs(bmap); - } - } - } - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - - return drop_more_redundant_divs(bmap, pairs, n); -} - -/* Remove divs that are not strictly needed. - * In particular, if a div only occurs positively (or negatively) - * in constraints, then it can simply be dropped. - * Also, if a div occurs only occurs in two constraints and if moreover - * those two constraints are opposite to each other, except for the constant - * term and if the sum of the constant terms is such that for any value - * of the other values, there is always at least one integer value of the - * div, i.e., if one plus this sum is greater than or equal to - * the (absolute value) of the coefficent of the div in the constraints, - * then we can also simply drop the div. - * - * If any divs are left after these simple checks then we move on - * to more complicated cases in drop_more_redundant_divs. - */ -struct isl_basic_map *isl_basic_map_drop_redundant_divs( - struct isl_basic_map *bmap) -{ - int i, j; - unsigned off; - int *pairs = NULL; - int n = 0; - - if (!bmap) - goto error; - - off = isl_dim_total(bmap->dim); - pairs = isl_calloc_array(bmap->ctx, int, bmap->n_div); - if (!pairs) - goto error; - - for (i = 0; i < bmap->n_div; ++i) { - int pos, neg; - int last_pos, last_neg; - int redundant; - int defined; - - defined = !isl_int_is_zero(bmap->div[i][0]); - for (j = 0; j < bmap->n_eq; ++j) - if (!isl_int_is_zero(bmap->eq[j][1 + off + i])) - break; - if (j < bmap->n_eq) - continue; - ++n; - pos = neg = 0; - for (j = 0; j < bmap->n_ineq; ++j) { - if (isl_int_is_pos(bmap->ineq[j][1 + off + i])) { - last_pos = j; - ++pos; - } - if (isl_int_is_neg(bmap->ineq[j][1 + off + i])) { - last_neg = j; - ++neg; - } - } - pairs[i] = pos * neg; - if (pairs[i] == 0) { - for (j = bmap->n_ineq - 1; j >= 0; --j) - if (!isl_int_is_zero(bmap->ineq[j][1+off+i])) - isl_basic_map_drop_inequality(bmap, j); - bmap = isl_basic_map_drop_div(bmap, i); - free(pairs); - return isl_basic_map_drop_redundant_divs(bmap); - } - if (pairs[i] != 1) - continue; - if (!isl_seq_is_neg(bmap->ineq[last_pos] + 1, - bmap->ineq[last_neg] + 1, - off + bmap->n_div)) - continue; - - isl_int_add(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], bmap->ineq[last_neg][0]); - isl_int_add_ui(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], 1); - redundant = isl_int_ge(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][1+off+i]); - isl_int_sub_ui(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], 1); - isl_int_sub(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], bmap->ineq[last_neg][0]); - if (!redundant) { - if (defined || - !ok_to_set_div_from_bound(bmap, i, last_pos)) { - pairs[i] = 0; - --n; - continue; - } - bmap = set_div_from_lower_bound(bmap, i, last_pos); - bmap = isl_basic_map_simplify(bmap); - free(pairs); - return isl_basic_map_drop_redundant_divs(bmap); - } - if (last_pos > last_neg) { - isl_basic_map_drop_inequality(bmap, last_pos); - isl_basic_map_drop_inequality(bmap, last_neg); - } else { - isl_basic_map_drop_inequality(bmap, last_neg); - isl_basic_map_drop_inequality(bmap, last_pos); - } - bmap = isl_basic_map_drop_div(bmap, i); - free(pairs); - return isl_basic_map_drop_redundant_divs(bmap); - } - - if (n > 0) - return coalesce_or_drop_more_redundant_divs(bmap, pairs, n); - - free(pairs); - return bmap; -error: - free(pairs); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_drop_redundant_divs( - struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_drop_redundant_divs((struct isl_basic_map *)bset); -} - -struct isl_map *isl_map_drop_redundant_divs(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_drop_redundant_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop_redundant_divs(struct isl_set *set) -{ - return (struct isl_set *) - isl_map_drop_redundant_divs((struct isl_map *)set); -} diff --git a/cloog-0.16.3/isl/isl_map_subtract.c b/cloog-0.16.3/isl/isl_map_subtract.c deleted file mode 100644 index 05106576b5dad31ca809530c03b2933da6ed8eff..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_map_subtract.c +++ /dev/null @@ -1,790 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_tab.h" -#include - -static void expand_constraint(isl_vec *v, unsigned dim, - isl_int *c, int *div_map, unsigned n_div) -{ - int i; - - isl_seq_cpy(v->el, c, 1 + dim); - isl_seq_clr(v->el + 1 + dim, v->size - (1 + dim)); - - for (i = 0; i < n_div; ++i) - isl_int_set(v->el[1 + dim + div_map[i]], c[1 + dim + i]); -} - -/* Add all constraints of bmap to tab. The equalities of bmap - * are added as a pair of inequalities. - */ -static int tab_add_constraints(struct isl_tab *tab, - __isl_keep isl_basic_map *bmap, int *div_map) -{ - int i; - unsigned dim; - unsigned tab_total; - unsigned bmap_total; - isl_vec *v; - - if (!tab || !bmap) - return -1; - - tab_total = isl_basic_map_total_dim(tab->bmap); - bmap_total = isl_basic_map_total_dim(bmap); - dim = isl_dim_total(tab->bmap->dim); - - if (isl_tab_extend_cons(tab, 2 * bmap->n_eq + bmap->n_ineq) < 0) - return -1; - - v = isl_vec_alloc(bmap->ctx, 1 + tab_total); - if (!v) - return -1; - - for (i = 0; i < bmap->n_eq; ++i) { - expand_constraint(v, dim, bmap->eq[i], div_map, bmap->n_div); - if (isl_tab_add_ineq(tab, v->el) < 0) - goto error; - isl_seq_neg(bmap->eq[i], bmap->eq[i], 1 + bmap_total); - expand_constraint(v, dim, bmap->eq[i], div_map, bmap->n_div); - if (isl_tab_add_ineq(tab, v->el) < 0) - goto error; - isl_seq_neg(bmap->eq[i], bmap->eq[i], 1 + bmap_total); - if (tab->empty) - break; - } - - for (i = 0; i < bmap->n_ineq; ++i) { - expand_constraint(v, dim, bmap->ineq[i], div_map, bmap->n_div); - if (isl_tab_add_ineq(tab, v->el) < 0) - goto error; - if (tab->empty) - break; - } - - isl_vec_free(v); - return 0; -error: - isl_vec_free(v); - return -1; -} - -/* Add a specific constraint of bmap (or its opposite) to tab. - * The position of the constraint is specified by "c", where - * the equalities of bmap are counted twice, once for the inequality - * that is equal to the equality, and once for its negation. - */ -static int tab_add_constraint(struct isl_tab *tab, - __isl_keep isl_basic_map *bmap, int *div_map, int c, int oppose) -{ - unsigned dim; - unsigned tab_total; - unsigned bmap_total; - isl_vec *v; - int r; - - if (!tab || !bmap) - return -1; - - tab_total = isl_basic_map_total_dim(tab->bmap); - bmap_total = isl_basic_map_total_dim(bmap); - dim = isl_dim_total(tab->bmap->dim); - - v = isl_vec_alloc(bmap->ctx, 1 + tab_total); - if (!v) - return -1; - - if (c < 2 * bmap->n_eq) { - if ((c % 2) != oppose) - isl_seq_neg(bmap->eq[c/2], bmap->eq[c/2], - 1 + bmap_total); - if (oppose) - isl_int_sub_ui(bmap->eq[c/2][0], bmap->eq[c/2][0], 1); - expand_constraint(v, dim, bmap->eq[c/2], div_map, bmap->n_div); - r = isl_tab_add_ineq(tab, v->el); - if (oppose) - isl_int_add_ui(bmap->eq[c/2][0], bmap->eq[c/2][0], 1); - if ((c % 2) != oppose) - isl_seq_neg(bmap->eq[c/2], bmap->eq[c/2], - 1 + bmap_total); - } else { - c -= 2 * bmap->n_eq; - if (oppose) { - isl_seq_neg(bmap->ineq[c], bmap->ineq[c], - 1 + bmap_total); - isl_int_sub_ui(bmap->ineq[c][0], bmap->ineq[c][0], 1); - } - expand_constraint(v, dim, bmap->ineq[c], div_map, bmap->n_div); - r = isl_tab_add_ineq(tab, v->el); - if (oppose) { - isl_int_add_ui(bmap->ineq[c][0], bmap->ineq[c][0], 1); - isl_seq_neg(bmap->ineq[c], bmap->ineq[c], - 1 + bmap_total); - } - } - - isl_vec_free(v); - return r; -} - -static int tab_add_divs(struct isl_tab *tab, __isl_keep isl_basic_map *bmap, - int **div_map) -{ - int i, j; - struct isl_vec *vec; - unsigned total; - unsigned dim; - - if (!bmap) - return -1; - if (!bmap->n_div) - return 0; - - if (!*div_map) - *div_map = isl_alloc_array(bmap->ctx, int, bmap->n_div); - if (!*div_map) - return -1; - - total = isl_basic_map_total_dim(tab->bmap); - dim = total - tab->bmap->n_div; - vec = isl_vec_alloc(bmap->ctx, 2 + total + bmap->n_div); - if (!vec) - return -1; - - for (i = 0; i < bmap->n_div; ++i) { - isl_seq_cpy(vec->el, bmap->div[i], 2 + dim); - isl_seq_clr(vec->el + 2 + dim, tab->bmap->n_div); - for (j = 0; j < i; ++j) - isl_int_set(vec->el[2 + dim + (*div_map)[j]], - bmap->div[i][2 + dim + j]); - for (j = 0; j < tab->bmap->n_div; ++j) - if (isl_seq_eq(tab->bmap->div[j], - vec->el, 2 + dim + tab->bmap->n_div)) - break; - (*div_map)[i] = j; - if (j == tab->bmap->n_div) { - vec->size = 2 + dim + tab->bmap->n_div; - if (isl_tab_add_div(tab, vec, NULL, NULL) < 0) - goto error; - } - } - - isl_vec_free(vec); - - return 0; -error: - isl_vec_free(vec); - - return -1; -} - -/* Freeze all constraints of tableau tab. - */ -static int tab_freeze_constraints(struct isl_tab *tab) -{ - int i; - - for (i = 0; i < tab->n_con; ++i) - if (isl_tab_freeze_constraint(tab, i) < 0) - return -1; - - return 0; -} - -/* Check for redundant constraints starting at offset. - * Put the indices of the redundant constraints in index - * and return the number of redundant constraints. - */ -static int n_non_redundant(isl_ctx *ctx, struct isl_tab *tab, - int offset, int **index) -{ - int i, n; - int n_test = tab->n_con - offset; - - if (isl_tab_detect_redundant(tab) < 0) - return -1; - - if (!*index) - *index = isl_alloc_array(ctx, int, n_test); - if (!*index) - return -1; - - for (n = 0, i = 0; i < n_test; ++i) { - int r; - r = isl_tab_is_redundant(tab, offset + i); - if (r < 0) - return -1; - if (r) - continue; - (*index)[n++] = i; - } - - return n; -} - -/* basic_map_collect_diff calls add on each of the pieces of - * the set difference between bmap and map until the add method - * return a negative value. - */ -struct isl_diff_collector { - int (*add)(struct isl_diff_collector *dc, - __isl_take isl_basic_map *bmap); -}; - -/* Compute the set difference between bmap and map and call - * dc->add on each of the piece until this function returns - * a negative value. - * Return 0 on success and -1 on error. dc->add returning - * a negative value is treated as an error, but the calling - * function can interpret the results based on the state of dc. - * - * Assumes that map has known divs. - * - * The difference is computed by a backtracking algorithm. - * Each level corresponds to a basic map in "map". - * When a node in entered for the first time, we check - * if the corresonding basic map intersects the current piece - * of "bmap". If not, we move to the next level. - * Otherwise, we split the current piece into as many - * pieces as there are non-redundant constraints of the current - * basic map in the intersection. Each of these pieces is - * handled by a child of the current node. - * In particular, if there are n non-redundant constraints, - * then for each 0 <= i < n, a piece is cut off by adding - * constraints 0 <= j < i and adding the opposite of constraint i. - * If there are no non-redundant constraints, meaning that the current - * piece is a subset of the current basic map, then we simply backtrack. - * - * In the leaves, we check if the remaining piece has any integer points - * and if so, pass it along to dc->add. As a special case, if nothing - * has been removed when we end up in a leaf, we simply pass along - * the original basic map. - */ -static int basic_map_collect_diff(__isl_take isl_basic_map *bmap, - __isl_take isl_map *map, struct isl_diff_collector *dc) -{ - int i; - int modified; - int level; - int init; - int empty; - isl_ctx *ctx; - struct isl_tab *tab = NULL; - struct isl_tab_undo **snap = NULL; - int *k = NULL; - int *n = NULL; - int **index = NULL; - int **div_map = NULL; - - empty = isl_basic_map_is_empty(bmap); - if (empty) { - isl_basic_map_free(bmap); - isl_map_free(map); - return empty < 0 ? -1 : 0; - } - - bmap = isl_basic_map_cow(bmap); - map = isl_map_cow(map); - - if (!bmap || !map) - goto error; - - ctx = map->ctx; - snap = isl_alloc_array(map->ctx, struct isl_tab_undo *, map->n); - k = isl_alloc_array(map->ctx, int, map->n); - n = isl_alloc_array(map->ctx, int, map->n); - index = isl_calloc_array(map->ctx, int *, map->n); - div_map = isl_calloc_array(map->ctx, int *, map->n); - if (!snap || !k || !n || !index || !div_map) - goto error; - - bmap = isl_basic_map_order_divs(bmap); - map = isl_map_order_divs(map); - - tab = isl_tab_from_basic_map(bmap); - if (isl_tab_track_bmap(tab, isl_basic_map_copy(bmap)) < 0) - goto error; - - modified = 0; - level = 0; - init = 1; - - while (level >= 0) { - if (level >= map->n) { - int empty; - struct isl_basic_map *bm; - if (!modified) { - if (dc->add(dc, isl_basic_map_copy(bmap)) < 0) - goto error; - break; - } - bm = isl_basic_map_copy(tab->bmap); - bm = isl_basic_map_cow(bm); - bm = isl_basic_map_update_from_tab(bm, tab); - bm = isl_basic_map_simplify(bm); - bm = isl_basic_map_finalize(bm); - empty = isl_basic_map_is_empty(bm); - if (empty) - isl_basic_map_free(bm); - else if (dc->add(dc, bm) < 0) - goto error; - if (empty < 0) - goto error; - level--; - init = 0; - continue; - } - if (init) { - int offset; - struct isl_tab_undo *snap2; - snap2 = isl_tab_snap(tab); - if (tab_add_divs(tab, map->p[level], - &div_map[level]) < 0) - goto error; - offset = tab->n_con; - snap[level] = isl_tab_snap(tab); - if (tab_freeze_constraints(tab) < 0) - goto error; - if (tab_add_constraints(tab, map->p[level], - div_map[level]) < 0) - goto error; - k[level] = 0; - n[level] = 0; - if (tab->empty) { - if (isl_tab_rollback(tab, snap2) < 0) - goto error; - level++; - continue; - } - modified = 1; - n[level] = n_non_redundant(ctx, tab, offset, - &index[level]); - if (n[level] < 0) - goto error; - if (n[level] == 0) { - level--; - init = 0; - continue; - } - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - if (tab_add_constraint(tab, map->p[level], - div_map[level], index[level][0], 1) < 0) - goto error; - level++; - continue; - } else { - if (k[level] + 1 >= n[level]) { - level--; - continue; - } - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - if (tab_add_constraint(tab, map->p[level], - div_map[level], - index[level][k[level]], 0) < 0) - goto error; - snap[level] = isl_tab_snap(tab); - k[level]++; - if (tab_add_constraint(tab, map->p[level], - div_map[level], - index[level][k[level]], 1) < 0) - goto error; - level++; - init = 1; - continue; - } - } - - isl_tab_free(tab); - free(snap); - free(n); - free(k); - for (i = 0; index && i < map->n; ++i) - free(index[i]); - free(index); - for (i = 0; div_map && i < map->n; ++i) - free(div_map[i]); - free(div_map); - - isl_basic_map_free(bmap); - isl_map_free(map); - - return 0; -error: - isl_tab_free(tab); - free(snap); - free(n); - free(k); - for (i = 0; index && i < map->n; ++i) - free(index[i]); - free(index); - for (i = 0; div_map && i < map->n; ++i) - free(div_map[i]); - free(div_map); - isl_basic_map_free(bmap); - isl_map_free(map); - return -1; -} - -/* A diff collector that actually collects all parts of the - * set difference in the field diff. - */ -struct isl_subtract_diff_collector { - struct isl_diff_collector dc; - struct isl_map *diff; -}; - -/* isl_subtract_diff_collector callback. - */ -static int basic_map_subtract_add(struct isl_diff_collector *dc, - __isl_take isl_basic_map *bmap) -{ - struct isl_subtract_diff_collector *sdc; - sdc = (struct isl_subtract_diff_collector *)dc; - - sdc->diff = isl_map_union_disjoint(sdc->diff, - isl_map_from_basic_map(bmap)); - - return sdc->diff ? 0 : -1; -} - -/* Return the set difference between bmap and map. - */ -static __isl_give isl_map *basic_map_subtract(__isl_take isl_basic_map *bmap, - __isl_take isl_map *map) -{ - struct isl_subtract_diff_collector sdc; - sdc.dc.add = &basic_map_subtract_add; - sdc.diff = isl_map_empty_like_basic_map(bmap); - if (basic_map_collect_diff(bmap, map, &sdc.dc) < 0) { - isl_map_free(sdc.diff); - sdc.diff = NULL; - } - return sdc.diff; -} - -/* Return the set difference between map1 and map2. - * (U_i A_i) \ (U_j B_j) is computed as U_i (A_i \ (U_j B_j)) - */ -struct isl_map *isl_map_subtract(struct isl_map *map1, struct isl_map *map2) -{ - int i; - struct isl_map *diff; - - if (!map1 || !map2) - goto error; - - isl_assert(map1->ctx, isl_dim_equal(map1->dim, map2->dim), goto error); - - if (isl_map_is_empty(map2)) { - isl_map_free(map2); - return map1; - } - - map1 = isl_map_compute_divs(map1); - map2 = isl_map_compute_divs(map2); - if (!map1 || !map2) - goto error; - - map1 = isl_map_remove_empty_parts(map1); - map2 = isl_map_remove_empty_parts(map2); - - diff = isl_map_empty_like(map1); - for (i = 0; i < map1->n; ++i) { - struct isl_map *d; - d = basic_map_subtract(isl_basic_map_copy(map1->p[i]), - isl_map_copy(map2)); - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT)) - diff = isl_map_union_disjoint(diff, d); - else - diff = isl_map_union(diff, d); - } - - isl_map_free(map1); - isl_map_free(map2); - - return diff; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -struct isl_set *isl_set_subtract(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_subtract( - (struct isl_map *)set1, (struct isl_map *)set2); -} - -/* A diff collector that aborts as soon as its add function is called, - * setting empty to 0. - */ -struct isl_is_empty_diff_collector { - struct isl_diff_collector dc; - int empty; -}; - -/* isl_is_empty_diff_collector callback. - */ -static int basic_map_is_empty_add(struct isl_diff_collector *dc, - __isl_take isl_basic_map *bmap) -{ - struct isl_is_empty_diff_collector *edc; - edc = (struct isl_is_empty_diff_collector *)dc; - - edc->empty = 0; - - isl_basic_map_free(bmap); - return -1; -} - -/* Check if bmap \ map is empty by computing this set difference - * and breaking off as soon as the difference is known to be non-empty. - */ -static int basic_map_diff_is_empty(__isl_keep isl_basic_map *bmap, - __isl_keep isl_map *map) -{ - int r; - struct isl_is_empty_diff_collector edc; - - r = isl_basic_map_plain_is_empty(bmap); - if (r) - return r; - - edc.dc.add = &basic_map_is_empty_add; - edc.empty = 1; - r = basic_map_collect_diff(isl_basic_map_copy(bmap), - isl_map_copy(map), &edc.dc); - if (!edc.empty) - return 0; - - return r < 0 ? -1 : 1; -} - -/* Check if map1 \ map2 is empty by checking if the set difference is empty - * for each of the basic maps in map1. - */ -static int map_diff_is_empty(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - int i; - int is_empty = 1; - - if (!map1 || !map2) - return -1; - - for (i = 0; i < map1->n; ++i) { - is_empty = basic_map_diff_is_empty(map1->p[i], map2); - if (is_empty < 0 || !is_empty) - break; - } - - return is_empty; -} - -/* Return 1 if "bmap" contains a single element. - */ -int isl_basic_map_plain_is_singleton(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - if (bmap->n_div) - return 0; - if (bmap->n_ineq) - return 0; - return bmap->n_eq == isl_basic_map_total_dim(bmap); -} - -/* Return 1 if "map" contains a single element. - */ -int isl_map_plain_is_singleton(__isl_keep isl_map *map) -{ - if (!map) - return -1; - if (map->n != 1) - return 0; - - return isl_basic_map_plain_is_singleton(map->p[0]); -} - -/* Given a singleton basic map, extract the single element - * as an isl_point. - */ -static __isl_give isl_point *singleton_extract_point( - __isl_keep isl_basic_map *bmap) -{ - int j; - unsigned dim; - struct isl_vec *point; - isl_int m; - - if (!bmap) - return NULL; - - dim = isl_basic_map_total_dim(bmap); - isl_assert(bmap->ctx, bmap->n_eq == dim, return NULL); - point = isl_vec_alloc(bmap->ctx, 1 + dim); - if (!point) - return NULL; - - isl_int_init(m); - - isl_int_set_si(point->el[0], 1); - for (j = 0; j < bmap->n_eq; ++j) { - int i = dim - 1 - j; - isl_assert(bmap->ctx, - isl_seq_first_non_zero(bmap->eq[j] + 1, i) == -1, - goto error); - isl_assert(bmap->ctx, - isl_int_is_one(bmap->eq[j][1 + i]) || - isl_int_is_negone(bmap->eq[j][1 + i]), - goto error); - isl_assert(bmap->ctx, - isl_seq_first_non_zero(bmap->eq[j]+1+i+1, dim-i-1) == -1, - goto error); - - isl_int_gcd(m, point->el[0], bmap->eq[j][1 + i]); - isl_int_divexact(m, bmap->eq[j][1 + i], m); - isl_int_abs(m, m); - isl_seq_scale(point->el, point->el, m, 1 + i); - isl_int_divexact(m, point->el[0], bmap->eq[j][1 + i]); - isl_int_neg(m, m); - isl_int_mul(point->el[1 + i], m, bmap->eq[j][0]); - } - - isl_int_clear(m); - return isl_point_alloc(isl_basic_map_get_dim(bmap), point); -error: - isl_int_clear(m); - isl_vec_free(point); - return NULL; -} - -/* Return 1 is the singleton map "map1" is a subset of "map2", - * i.e., if the single element of "map1" is also an element of "map2". - * Assumes "map2" has known divs. - */ -static int map_is_singleton_subset(__isl_keep isl_map *map1, - __isl_keep isl_map *map2) -{ - int i; - int is_subset = 0; - struct isl_point *point; - - if (!map1 || !map2) - return -1; - if (map1->n != 1) - return -1; - - point = singleton_extract_point(map1->p[0]); - if (!point) - return -1; - - for (i = 0; i < map2->n; ++i) { - is_subset = isl_basic_map_contains_point(map2->p[i], point); - if (is_subset) - break; - } - - isl_point_free(point); - return is_subset; -} - -int isl_map_is_subset(struct isl_map *map1, struct isl_map *map2) -{ - int is_subset = 0; - - if (!map1 || !map2) - return -1; - - if (isl_map_is_empty(map1)) - return 1; - - if (isl_map_is_empty(map2)) - return 0; - - if (isl_map_plain_is_universe(map2)) - return 1; - - map2 = isl_map_compute_divs(isl_map_copy(map2)); - if (isl_map_plain_is_singleton(map1)) { - is_subset = map_is_singleton_subset(map1, map2); - isl_map_free(map2); - return is_subset; - } - is_subset = map_diff_is_empty(map1, map2); - isl_map_free(map2); - - return is_subset; -} - -int isl_set_is_subset(struct isl_set *set1, struct isl_set *set2) -{ - return isl_map_is_subset( - (struct isl_map *)set1, (struct isl_map *)set2); -} - -__isl_give isl_map *isl_map_make_disjoint(__isl_take isl_map *map) -{ - int i; - struct isl_subtract_diff_collector sdc; - sdc.dc.add = &basic_map_subtract_add; - - if (!map) - return NULL; - if (ISL_F_ISSET(map, ISL_MAP_DISJOINT)) - return map; - if (map->n <= 1) - return map; - - map = isl_map_compute_divs(map); - map = isl_map_remove_empty_parts(map); - - if (!map || map->n <= 1) - return map; - - sdc.diff = isl_map_from_basic_map(isl_basic_map_copy(map->p[0])); - - for (i = 1; i < map->n; ++i) { - struct isl_basic_map *bmap = isl_basic_map_copy(map->p[i]); - struct isl_map *copy = isl_map_copy(sdc.diff); - if (basic_map_collect_diff(bmap, copy, &sdc.dc) < 0) { - isl_map_free(sdc.diff); - sdc.diff = NULL; - break; - } - } - - isl_map_free(map); - - return sdc.diff; -} - -__isl_give isl_set *isl_set_make_disjoint(__isl_take isl_set *set) -{ - return (struct isl_set *)isl_map_make_disjoint((struct isl_map *)set); -} - -__isl_give isl_set *isl_set_complement(__isl_take isl_set *set) -{ - isl_set *universe; - - if (!set) - return NULL; - - universe = isl_set_universe(isl_set_get_dim(set)); - - return isl_set_subtract(universe, set); -} diff --git a/cloog-0.16.3/isl/isl_mat.c b/cloog-0.16.3/isl/isl_mat.c deleted file mode 100644 index e64beaee9aed0bacc1ac1c9e58b2669ae081710b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_mat.c +++ /dev/null @@ -1,1625 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_map_private.h" -#include - -isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat) -{ - return mat ? mat->ctx : NULL; -} - -struct isl_mat *isl_mat_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_col) -{ - int i; - struct isl_mat *mat; - - mat = isl_alloc_type(ctx, struct isl_mat); - if (!mat) - return NULL; - - mat->row = NULL; - mat->block = isl_blk_alloc(ctx, n_row * n_col); - if (isl_blk_is_error(mat->block)) - goto error; - mat->row = isl_alloc_array(ctx, isl_int *, n_row); - if (!mat->row) - goto error; - - for (i = 0; i < n_row; ++i) - mat->row[i] = mat->block.data + i * n_col; - - mat->ctx = ctx; - isl_ctx_ref(ctx); - mat->ref = 1; - mat->n_row = n_row; - mat->n_col = n_col; - mat->max_col = n_col; - mat->flags = 0; - - return mat; -error: - isl_blk_free(ctx, mat->block); - free(mat); - return NULL; -} - -struct isl_mat *isl_mat_extend(struct isl_mat *mat, - unsigned n_row, unsigned n_col) -{ - int i; - isl_int *old; - isl_int **row; - - if (!mat) - return NULL; - - if (mat->max_col >= n_col && mat->n_row >= n_row) { - if (mat->n_col < n_col) - mat->n_col = n_col; - return mat; - } - - if (mat->max_col < n_col) { - struct isl_mat *new_mat; - - if (n_row < mat->n_row) - n_row = mat->n_row; - new_mat = isl_mat_alloc(mat->ctx, n_row, n_col); - if (!new_mat) - goto error; - for (i = 0; i < mat->n_row; ++i) - isl_seq_cpy(new_mat->row[i], mat->row[i], mat->n_col); - isl_mat_free(mat); - return new_mat; - } - - mat = isl_mat_cow(mat); - if (!mat) - goto error; - - old = mat->block.data; - mat->block = isl_blk_extend(mat->ctx, mat->block, n_row * mat->max_col); - if (isl_blk_is_error(mat->block)) - goto error; - row = isl_realloc_array(mat->ctx, mat->row, isl_int *, n_row); - if (!row) - goto error; - mat->row = row; - - for (i = 0; i < mat->n_row; ++i) - mat->row[i] = mat->block.data + (mat->row[i] - old); - for (i = mat->n_row; i < n_row; ++i) - mat->row[i] = mat->block.data + i * mat->max_col; - mat->n_row = n_row; - if (mat->n_col < n_col) - mat->n_col = n_col; - - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col) -{ - int i; - struct isl_mat *mat; - - mat = isl_alloc_type(ctx, struct isl_mat); - if (!mat) - return NULL; - mat->row = isl_alloc_array(ctx, isl_int *, n_row); - if (!mat->row) - goto error; - for (i = 0; i < n_row; ++i) - mat->row[i] = row[first_row+i] + first_col; - mat->ctx = ctx; - isl_ctx_ref(ctx); - mat->ref = 1; - mat->n_row = n_row; - mat->n_col = n_col; - mat->block = isl_blk_empty(); - mat->flags = ISL_MAT_BORROWED; - return mat; -error: - free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_sub_alloc(__isl_keep isl_mat *mat, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col) -{ - if (!mat) - return NULL; - return isl_mat_sub_alloc6(mat->ctx, mat->row, first_row, n_row, - first_col, n_col); -} - -void isl_mat_sub_copy(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col) -{ - int i; - - for (i = 0; i < n_row; ++i) - isl_seq_cpy(dst[i]+dst_col, src[i]+src_col, n_col); -} - -void isl_mat_sub_neg(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col) -{ - int i; - - for (i = 0; i < n_row; ++i) - isl_seq_neg(dst[i]+dst_col, src[i]+src_col, n_col); -} - -struct isl_mat *isl_mat_copy(struct isl_mat *mat) -{ - if (!mat) - return NULL; - - mat->ref++; - return mat; -} - -struct isl_mat *isl_mat_dup(struct isl_mat *mat) -{ - int i; - struct isl_mat *mat2; - - if (!mat) - return NULL; - mat2 = isl_mat_alloc(mat->ctx, mat->n_row, mat->n_col); - if (!mat2) - return NULL; - for (i = 0; i < mat->n_row; ++i) - isl_seq_cpy(mat2->row[i], mat->row[i], mat->n_col); - return mat2; -} - -struct isl_mat *isl_mat_cow(struct isl_mat *mat) -{ - struct isl_mat *mat2; - if (!mat) - return NULL; - - if (mat->ref == 1 && !ISL_F_ISSET(mat, ISL_MAT_BORROWED)) - return mat; - - mat2 = isl_mat_dup(mat); - isl_mat_free(mat); - return mat2; -} - -void isl_mat_free(struct isl_mat *mat) -{ - if (!mat) - return; - - if (--mat->ref > 0) - return; - - if (!ISL_F_ISSET(mat, ISL_MAT_BORROWED)) - isl_blk_free(mat->ctx, mat->block); - isl_ctx_deref(mat->ctx); - free(mat->row); - free(mat); -} - -int isl_mat_rows(__isl_keep isl_mat *mat) -{ - return mat ? mat->n_row : -1; -} - -int isl_mat_cols(__isl_keep isl_mat *mat) -{ - return mat ? mat->n_col : -1; -} - -int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v) -{ - if (!mat) - return -1; - if (row < 0 || row >= mat->n_row) - isl_die(mat->ctx, isl_error_invalid, "row out of range", - return -1); - if (col < 0 || col >= mat->n_col) - isl_die(mat->ctx, isl_error_invalid, "column out of range", - return -1); - isl_int_set(*v, mat->row[row][col]); - return 0; -} - -__isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, - int row, int col, isl_int v) -{ - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - if (row < 0 || row >= mat->n_row) - isl_die(mat->ctx, isl_error_invalid, "row out of range", - goto error); - if (col < 0 || col >= mat->n_col) - isl_die(mat->ctx, isl_error_invalid, "column out of range", - goto error); - isl_int_set(mat->row[row][col], v); - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, - int row, int col, int v) -{ - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - if (row < 0 || row >= mat->n_row) - isl_die(mat->ctx, isl_error_invalid, "row out of range", - goto error); - if (col < 0 || col >= mat->n_col) - isl_die(mat->ctx, isl_error_invalid, "column out of range", - goto error); - isl_int_set_si(mat->row[row][col], v); - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -struct isl_mat *isl_mat_identity(struct isl_ctx *ctx, unsigned n_row) -{ - int i; - struct isl_mat *mat; - - mat = isl_mat_alloc(ctx, n_row, n_row); - if (!mat) - return NULL; - for (i = 0; i < n_row; ++i) { - isl_seq_clr(mat->row[i], i); - isl_int_set_si(mat->row[i][i], 1); - isl_seq_clr(mat->row[i]+i+1, n_row-(i+1)); - } - - return mat; -} - -struct isl_vec *isl_mat_vec_product(struct isl_mat *mat, struct isl_vec *vec) -{ - int i; - struct isl_vec *prod; - - if (!mat || !vec) - goto error; - - isl_assert(mat->ctx, mat->n_col == vec->size, goto error); - - prod = isl_vec_alloc(mat->ctx, mat->n_row); - if (!prod) - goto error; - - for (i = 0; i < prod->size; ++i) - isl_seq_inner_product(mat->row[i], vec->el, vec->size, - &prod->block.data[i]); - isl_mat_free(mat); - isl_vec_free(vec); - return prod; -error: - isl_mat_free(mat); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_vec *isl_mat_vec_inverse_product(__isl_take isl_mat *mat, - __isl_take isl_vec *vec) -{ - struct isl_mat *vec_mat; - int i; - - if (!mat || !vec) - goto error; - vec_mat = isl_mat_alloc(vec->ctx, vec->size, 1); - if (!vec_mat) - goto error; - for (i = 0; i < vec->size; ++i) - isl_int_set(vec_mat->row[i][0], vec->el[i]); - vec_mat = isl_mat_inverse_product(mat, vec_mat); - isl_vec_free(vec); - if (!vec_mat) - return NULL; - vec = isl_vec_alloc(vec_mat->ctx, vec_mat->n_row); - if (vec) - for (i = 0; i < vec->size; ++i) - isl_int_set(vec->el[i], vec_mat->row[i][0]); - isl_mat_free(vec_mat); - return vec; -error: - isl_mat_free(mat); - isl_vec_free(vec); - return NULL; -} - -struct isl_vec *isl_vec_mat_product(struct isl_vec *vec, struct isl_mat *mat) -{ - int i, j; - struct isl_vec *prod; - - if (!mat || !vec) - goto error; - - isl_assert(mat->ctx, mat->n_row == vec->size, goto error); - - prod = isl_vec_alloc(mat->ctx, mat->n_col); - if (!prod) - goto error; - - for (i = 0; i < prod->size; ++i) { - isl_int_set_si(prod->el[i], 0); - for (j = 0; j < vec->size; ++j) - isl_int_addmul(prod->el[i], vec->el[j], mat->row[j][i]); - } - isl_mat_free(mat); - isl_vec_free(vec); - return prod; -error: - isl_mat_free(mat); - isl_vec_free(vec); - return NULL; -} - -struct isl_mat *isl_mat_aff_direct_sum(struct isl_mat *left, - struct isl_mat *right) -{ - int i; - struct isl_mat *sum; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, left->n_row == right->n_row, goto error); - isl_assert(left->ctx, left->n_row >= 1, goto error); - isl_assert(left->ctx, left->n_col >= 1, goto error); - isl_assert(left->ctx, right->n_col >= 1, goto error); - isl_assert(left->ctx, - isl_seq_first_non_zero(left->row[0]+1, left->n_col-1) == -1, - goto error); - isl_assert(left->ctx, - isl_seq_first_non_zero(right->row[0]+1, right->n_col-1) == -1, - goto error); - - sum = isl_mat_alloc(left->ctx, left->n_row, left->n_col + right->n_col - 1); - if (!sum) - goto error; - isl_int_lcm(sum->row[0][0], left->row[0][0], right->row[0][0]); - isl_int_divexact(left->row[0][0], sum->row[0][0], left->row[0][0]); - isl_int_divexact(right->row[0][0], sum->row[0][0], right->row[0][0]); - - isl_seq_clr(sum->row[0]+1, sum->n_col-1); - for (i = 1; i < sum->n_row; ++i) { - isl_int_mul(sum->row[i][0], left->row[0][0], left->row[i][0]); - isl_int_addmul(sum->row[i][0], - right->row[0][0], right->row[i][0]); - isl_seq_scale(sum->row[i]+1, left->row[i]+1, left->row[0][0], - left->n_col-1); - isl_seq_scale(sum->row[i]+left->n_col, - right->row[i]+1, right->row[0][0], - right->n_col-1); - } - - isl_int_divexact(left->row[0][0], sum->row[0][0], left->row[0][0]); - isl_int_divexact(right->row[0][0], sum->row[0][0], right->row[0][0]); - isl_mat_free(left); - isl_mat_free(right); - return sum; -error: - isl_mat_free(left); - isl_mat_free(right); - return NULL; -} - -static void exchange(struct isl_mat *M, struct isl_mat **U, - struct isl_mat **Q, unsigned row, unsigned i, unsigned j) -{ - int r; - for (r = row; r < M->n_row; ++r) - isl_int_swap(M->row[r][i], M->row[r][j]); - if (U) { - for (r = 0; r < (*U)->n_row; ++r) - isl_int_swap((*U)->row[r][i], (*U)->row[r][j]); - } - if (Q) - isl_mat_swap_rows(*Q, i, j); -} - -static void subtract(struct isl_mat *M, struct isl_mat **U, - struct isl_mat **Q, unsigned row, unsigned i, unsigned j, isl_int m) -{ - int r; - for (r = row; r < M->n_row; ++r) - isl_int_submul(M->row[r][j], m, M->row[r][i]); - if (U) { - for (r = 0; r < (*U)->n_row; ++r) - isl_int_submul((*U)->row[r][j], m, (*U)->row[r][i]); - } - if (Q) { - for (r = 0; r < (*Q)->n_col; ++r) - isl_int_addmul((*Q)->row[i][r], m, (*Q)->row[j][r]); - } -} - -static void oppose(struct isl_mat *M, struct isl_mat **U, - struct isl_mat **Q, unsigned row, unsigned col) -{ - int r; - for (r = row; r < M->n_row; ++r) - isl_int_neg(M->row[r][col], M->row[r][col]); - if (U) { - for (r = 0; r < (*U)->n_row; ++r) - isl_int_neg((*U)->row[r][col], (*U)->row[r][col]); - } - if (Q) - isl_seq_neg((*Q)->row[col], (*Q)->row[col], (*Q)->n_col); -} - -/* Given matrix M, compute - * - * M U = H - * M = H Q - * - * with U and Q unimodular matrices and H a matrix in column echelon form - * such that on each echelon row the entries in the non-echelon column - * are non-negative (if neg == 0) or non-positive (if neg == 1) - * and stricly smaller (in absolute value) than the entries in the echelon - * column. - * If U or Q are NULL, then these matrices are not computed. - */ -struct isl_mat *isl_mat_left_hermite(struct isl_mat *M, int neg, - struct isl_mat **U, struct isl_mat **Q) -{ - isl_int c; - int row, col; - - if (U) - *U = NULL; - if (Q) - *Q = NULL; - if (!M) - goto error; - M = isl_mat_cow(M); - if (!M) - goto error; - if (U) { - *U = isl_mat_identity(M->ctx, M->n_col); - if (!*U) - goto error; - } - if (Q) { - *Q = isl_mat_identity(M->ctx, M->n_col); - if (!*Q) - goto error; - } - - col = 0; - isl_int_init(c); - for (row = 0; row < M->n_row; ++row) { - int first, i, off; - first = isl_seq_abs_min_non_zero(M->row[row]+col, M->n_col-col); - if (first == -1) - continue; - first += col; - if (first != col) - exchange(M, U, Q, row, first, col); - if (isl_int_is_neg(M->row[row][col])) - oppose(M, U, Q, row, col); - first = col+1; - while ((off = isl_seq_first_non_zero(M->row[row]+first, - M->n_col-first)) != -1) { - first += off; - isl_int_fdiv_q(c, M->row[row][first], M->row[row][col]); - subtract(M, U, Q, row, col, first, c); - if (!isl_int_is_zero(M->row[row][first])) - exchange(M, U, Q, row, first, col); - else - ++first; - } - for (i = 0; i < col; ++i) { - if (isl_int_is_zero(M->row[row][i])) - continue; - if (neg) - isl_int_cdiv_q(c, M->row[row][i], M->row[row][col]); - else - isl_int_fdiv_q(c, M->row[row][i], M->row[row][col]); - if (isl_int_is_zero(c)) - continue; - subtract(M, U, Q, row, col, i, c); - } - ++col; - } - isl_int_clear(c); - - return M; -error: - if (Q) { - isl_mat_free(*Q); - *Q = NULL; - } - if (U) { - isl_mat_free(*U); - *U = NULL; - } - isl_mat_free(M); - return NULL; -} - -struct isl_mat *isl_mat_right_kernel(struct isl_mat *mat) -{ - int i, rank; - struct isl_mat *U = NULL; - struct isl_mat *K; - - mat = isl_mat_left_hermite(mat, 0, &U, NULL); - if (!mat || !U) - goto error; - - for (i = 0, rank = 0; rank < mat->n_col; ++rank) { - while (i < mat->n_row && isl_int_is_zero(mat->row[i][rank])) - ++i; - if (i >= mat->n_row) - break; - } - K = isl_mat_alloc(U->ctx, U->n_row, U->n_col - rank); - if (!K) - goto error; - isl_mat_sub_copy(K->ctx, K->row, U->row, U->n_row, 0, rank, U->n_col-rank); - isl_mat_free(mat); - isl_mat_free(U); - return K; -error: - isl_mat_free(mat); - isl_mat_free(U); - return NULL; -} - -struct isl_mat *isl_mat_lin_to_aff(struct isl_mat *mat) -{ - int i; - struct isl_mat *mat2; - - if (!mat) - return NULL; - mat2 = isl_mat_alloc(mat->ctx, 1+mat->n_row, 1+mat->n_col); - if (!mat2) - goto error; - isl_int_set_si(mat2->row[0][0], 1); - isl_seq_clr(mat2->row[0]+1, mat->n_col); - for (i = 0; i < mat->n_row; ++i) { - isl_int_set_si(mat2->row[1+i][0], 0); - isl_seq_cpy(mat2->row[1+i]+1, mat->row[i], mat->n_col); - } - isl_mat_free(mat); - return mat2; -error: - isl_mat_free(mat); - return NULL; -} - -/* Given two matrices M1 and M2, return the block matrix - * - * [ M1 0 ] - * [ 0 M2 ] - */ -__isl_give isl_mat *isl_mat_diagonal(__isl_take isl_mat *mat1, - __isl_take isl_mat *mat2) -{ - int i; - isl_mat *mat; - - if (!mat1 || !mat2) - goto error; - - mat = isl_mat_alloc(mat1->ctx, mat1->n_row + mat2->n_row, - mat1->n_col + mat2->n_col); - if (!mat) - goto error; - for (i = 0; i < mat1->n_row; ++i) { - isl_seq_cpy(mat->row[i], mat1->row[i], mat1->n_col); - isl_seq_clr(mat->row[i] + mat1->n_col, mat2->n_col); - } - for (i = 0; i < mat2->n_row; ++i) { - isl_seq_clr(mat->row[mat1->n_row + i], mat1->n_col); - isl_seq_cpy(mat->row[mat1->n_row + i] + mat1->n_col, - mat2->row[i], mat2->n_col); - } - isl_mat_free(mat1); - isl_mat_free(mat2); - return mat; -error: - isl_mat_free(mat1); - isl_mat_free(mat2); - return NULL; -} - -static int row_first_non_zero(isl_int **row, unsigned n_row, unsigned col) -{ - int i; - - for (i = 0; i < n_row; ++i) - if (!isl_int_is_zero(row[i][col])) - return i; - return -1; -} - -static int row_abs_min_non_zero(isl_int **row, unsigned n_row, unsigned col) -{ - int i, min = row_first_non_zero(row, n_row, col); - if (min < 0) - return -1; - for (i = min + 1; i < n_row; ++i) { - if (isl_int_is_zero(row[i][col])) - continue; - if (isl_int_abs_lt(row[i][col], row[min][col])) - min = i; - } - return min; -} - -static void inv_exchange(struct isl_mat *left, struct isl_mat *right, - unsigned i, unsigned j) -{ - left = isl_mat_swap_rows(left, i, j); - right = isl_mat_swap_rows(right, i, j); -} - -static void inv_oppose( - struct isl_mat *left, struct isl_mat *right, unsigned row) -{ - isl_seq_neg(left->row[row]+row, left->row[row]+row, left->n_col-row); - isl_seq_neg(right->row[row], right->row[row], right->n_col); -} - -static void inv_subtract(struct isl_mat *left, struct isl_mat *right, - unsigned row, unsigned i, isl_int m) -{ - isl_int_neg(m, m); - isl_seq_combine(left->row[i]+row, - left->ctx->one, left->row[i]+row, - m, left->row[row]+row, - left->n_col-row); - isl_seq_combine(right->row[i], right->ctx->one, right->row[i], - m, right->row[row], right->n_col); -} - -/* Compute inv(left)*right - */ -struct isl_mat *isl_mat_inverse_product(struct isl_mat *left, - struct isl_mat *right) -{ - int row; - isl_int a, b; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, left->n_row == left->n_col, goto error); - isl_assert(left->ctx, left->n_row == right->n_row, goto error); - - if (left->n_row == 0) { - isl_mat_free(left); - return right; - } - - left = isl_mat_cow(left); - right = isl_mat_cow(right); - if (!left || !right) - goto error; - - isl_int_init(a); - isl_int_init(b); - for (row = 0; row < left->n_row; ++row) { - int pivot, first, i, off; - pivot = row_abs_min_non_zero(left->row+row, left->n_row-row, row); - if (pivot < 0) { - isl_int_clear(a); - isl_int_clear(b); - isl_assert(left->ctx, pivot >= 0, goto error); - } - pivot += row; - if (pivot != row) - inv_exchange(left, right, pivot, row); - if (isl_int_is_neg(left->row[row][row])) - inv_oppose(left, right, row); - first = row+1; - while ((off = row_first_non_zero(left->row+first, - left->n_row-first, row)) != -1) { - first += off; - isl_int_fdiv_q(a, left->row[first][row], - left->row[row][row]); - inv_subtract(left, right, row, first, a); - if (!isl_int_is_zero(left->row[first][row])) - inv_exchange(left, right, row, first); - else - ++first; - } - for (i = 0; i < row; ++i) { - if (isl_int_is_zero(left->row[i][row])) - continue; - isl_int_gcd(a, left->row[row][row], left->row[i][row]); - isl_int_divexact(b, left->row[i][row], a); - isl_int_divexact(a, left->row[row][row], a); - isl_int_neg(b, b); - isl_seq_combine(left->row[i] + i, - a, left->row[i] + i, - b, left->row[row] + i, - left->n_col - i); - isl_seq_combine(right->row[i], a, right->row[i], - b, right->row[row], right->n_col); - } - } - isl_int_clear(b); - - isl_int_set(a, left->row[0][0]); - for (row = 1; row < left->n_row; ++row) - isl_int_lcm(a, a, left->row[row][row]); - if (isl_int_is_zero(a)){ - isl_int_clear(a); - isl_assert(left->ctx, 0, goto error); - } - for (row = 0; row < left->n_row; ++row) { - isl_int_divexact(left->row[row][row], a, left->row[row][row]); - if (isl_int_is_one(left->row[row][row])) - continue; - isl_seq_scale(right->row[row], right->row[row], - left->row[row][row], right->n_col); - } - isl_int_clear(a); - - isl_mat_free(left); - return right; -error: - isl_mat_free(left); - isl_mat_free(right); - return NULL; -} - -void isl_mat_col_scale(struct isl_mat *mat, unsigned col, isl_int m) -{ - int i; - - for (i = 0; i < mat->n_row; ++i) - isl_int_mul(mat->row[i][col], mat->row[i][col], m); -} - -void isl_mat_col_combine(struct isl_mat *mat, unsigned dst, - isl_int m1, unsigned src1, isl_int m2, unsigned src2) -{ - int i; - isl_int tmp; - - isl_int_init(tmp); - for (i = 0; i < mat->n_row; ++i) { - isl_int_mul(tmp, m1, mat->row[i][src1]); - isl_int_addmul(tmp, m2, mat->row[i][src2]); - isl_int_set(mat->row[i][dst], tmp); - } - isl_int_clear(tmp); -} - -struct isl_mat *isl_mat_right_inverse(struct isl_mat *mat) -{ - struct isl_mat *inv; - int row; - isl_int a, b; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - inv = isl_mat_identity(mat->ctx, mat->n_col); - inv = isl_mat_cow(inv); - if (!inv) - goto error; - - isl_int_init(a); - isl_int_init(b); - for (row = 0; row < mat->n_row; ++row) { - int pivot, first, i, off; - pivot = isl_seq_abs_min_non_zero(mat->row[row]+row, mat->n_col-row); - if (pivot < 0) { - isl_int_clear(a); - isl_int_clear(b); - isl_assert(mat->ctx, pivot >= 0, goto error); - } - pivot += row; - if (pivot != row) - exchange(mat, &inv, NULL, row, pivot, row); - if (isl_int_is_neg(mat->row[row][row])) - oppose(mat, &inv, NULL, row, row); - first = row+1; - while ((off = isl_seq_first_non_zero(mat->row[row]+first, - mat->n_col-first)) != -1) { - first += off; - isl_int_fdiv_q(a, mat->row[row][first], - mat->row[row][row]); - subtract(mat, &inv, NULL, row, row, first, a); - if (!isl_int_is_zero(mat->row[row][first])) - exchange(mat, &inv, NULL, row, row, first); - else - ++first; - } - for (i = 0; i < row; ++i) { - if (isl_int_is_zero(mat->row[row][i])) - continue; - isl_int_gcd(a, mat->row[row][row], mat->row[row][i]); - isl_int_divexact(b, mat->row[row][i], a); - isl_int_divexact(a, mat->row[row][row], a); - isl_int_neg(a, a); - isl_mat_col_combine(mat, i, a, i, b, row); - isl_mat_col_combine(inv, i, a, i, b, row); - } - } - isl_int_clear(b); - - isl_int_set(a, mat->row[0][0]); - for (row = 1; row < mat->n_row; ++row) - isl_int_lcm(a, a, mat->row[row][row]); - if (isl_int_is_zero(a)){ - isl_int_clear(a); - goto error; - } - for (row = 0; row < mat->n_row; ++row) { - isl_int_divexact(mat->row[row][row], a, mat->row[row][row]); - if (isl_int_is_one(mat->row[row][row])) - continue; - isl_mat_col_scale(inv, row, mat->row[row][row]); - } - isl_int_clear(a); - - isl_mat_free(mat); - - return inv; -error: - isl_mat_free(mat); - isl_mat_free(inv); - return NULL; -} - -struct isl_mat *isl_mat_transpose(struct isl_mat *mat) -{ - struct isl_mat *transpose = NULL; - int i, j; - - if (mat->n_col == mat->n_row) { - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - for (i = 0; i < mat->n_row; ++i) - for (j = i + 1; j < mat->n_col; ++j) - isl_int_swap(mat->row[i][j], mat->row[j][i]); - return mat; - } - transpose = isl_mat_alloc(mat->ctx, mat->n_col, mat->n_row); - if (!transpose) - goto error; - for (i = 0; i < mat->n_row; ++i) - for (j = 0; j < mat->n_col; ++j) - isl_int_set(transpose->row[j][i], mat->row[i][j]); - isl_mat_free(mat); - return transpose; -error: - isl_mat_free(mat); - return NULL; -} - -struct isl_mat *isl_mat_swap_cols(struct isl_mat *mat, unsigned i, unsigned j) -{ - int r; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - isl_assert(mat->ctx, i < mat->n_col, goto error); - isl_assert(mat->ctx, j < mat->n_col, goto error); - - for (r = 0; r < mat->n_row; ++r) - isl_int_swap(mat->row[r][i], mat->row[r][j]); - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -struct isl_mat *isl_mat_swap_rows(struct isl_mat *mat, unsigned i, unsigned j) -{ - isl_int *t; - - if (!mat) - return NULL; - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - t = mat->row[i]; - mat->row[i] = mat->row[j]; - mat->row[j] = t; - return mat; -} - -struct isl_mat *isl_mat_product(struct isl_mat *left, struct isl_mat *right) -{ - int i, j, k; - struct isl_mat *prod; - - if (!left || !right) - goto error; - isl_assert(left->ctx, left->n_col == right->n_row, goto error); - prod = isl_mat_alloc(left->ctx, left->n_row, right->n_col); - if (!prod) - goto error; - if (left->n_col == 0) { - for (i = 0; i < prod->n_row; ++i) - isl_seq_clr(prod->row[i], prod->n_col); - isl_mat_free(left); - isl_mat_free(right); - return prod; - } - for (i = 0; i < prod->n_row; ++i) { - for (j = 0; j < prod->n_col; ++j) { - isl_int_mul(prod->row[i][j], - left->row[i][0], right->row[0][j]); - for (k = 1; k < left->n_col; ++k) - isl_int_addmul(prod->row[i][j], - left->row[i][k], right->row[k][j]); - } - } - isl_mat_free(left); - isl_mat_free(right); - return prod; -error: - isl_mat_free(left); - isl_mat_free(right); - return NULL; -} - -/* Replace the variables x in the rows q by x' given by x = M x', - * with M the matrix mat. - * - * If the number of new variables is greater than the original - * number of variables, then the rows q have already been - * preextended. If the new number is smaller, then the coefficients - * of the divs, which are not changed, need to be shifted down. - * The row q may be the equalities, the inequalities or the - * div expressions. In the latter case, has_div is true and - * we need to take into account the extra denominator column. - */ -static int preimage(struct isl_ctx *ctx, isl_int **q, unsigned n, - unsigned n_div, int has_div, struct isl_mat *mat) -{ - int i; - struct isl_mat *t; - int e; - - if (mat->n_col >= mat->n_row) - e = 0; - else - e = mat->n_row - mat->n_col; - if (has_div) - for (i = 0; i < n; ++i) - isl_int_mul(q[i][0], q[i][0], mat->row[0][0]); - t = isl_mat_sub_alloc6(mat->ctx, q, 0, n, has_div, mat->n_row); - t = isl_mat_product(t, mat); - if (!t) - return -1; - for (i = 0; i < n; ++i) { - isl_seq_swp_or_cpy(q[i] + has_div, t->row[i], t->n_col); - isl_seq_cpy(q[i] + has_div + t->n_col, - q[i] + has_div + t->n_col + e, n_div); - isl_seq_clr(q[i] + has_div + t->n_col + n_div, e); - } - isl_mat_free(t); - return 0; -} - -/* Replace the variables x in bset by x' given by x = M x', with - * M the matrix mat. - * - * If there are fewer variables x' then there are x, then we perform - * the transformation in place, which that, in principle, - * this frees up some extra variables as the number - * of columns remains constant, but we would have to extend - * the div array too as the number of rows in this array is assumed - * to be equal to extra. - */ -struct isl_basic_set *isl_basic_set_preimage(struct isl_basic_set *bset, - struct isl_mat *mat) -{ - struct isl_ctx *ctx; - - if (!bset || !mat) - goto error; - - ctx = bset->ctx; - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - - isl_assert(ctx, bset->dim->nparam == 0, goto error); - isl_assert(ctx, 1+bset->dim->n_out == mat->n_row, goto error); - isl_assert(ctx, mat->n_col > 0, goto error); - - if (mat->n_col > mat->n_row) { - bset = isl_basic_set_extend(bset, 0, mat->n_col-1, 0, 0, 0); - if (!bset) - goto error; - } else if (mat->n_col < mat->n_row) { - bset->dim = isl_dim_cow(bset->dim); - if (!bset->dim) - goto error; - bset->dim->n_out -= mat->n_row - mat->n_col; - } - - if (preimage(ctx, bset->eq, bset->n_eq, bset->n_div, 0, - isl_mat_copy(mat)) < 0) - goto error; - - if (preimage(ctx, bset->ineq, bset->n_ineq, bset->n_div, 0, - isl_mat_copy(mat)) < 0) - goto error; - - if (preimage(ctx, bset->div, bset->n_div, bset->n_div, 1, mat) < 0) - goto error2; - - ISL_F_CLR(bset, ISL_BASIC_SET_NO_IMPLICIT); - ISL_F_CLR(bset, ISL_BASIC_SET_NO_REDUNDANT); - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED); - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED_DIVS); - ISL_F_CLR(bset, ISL_BASIC_SET_ALL_EQUALITIES); - - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_mat_free(mat); -error2: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_set *isl_set_preimage(struct isl_set *set, struct isl_mat *mat) -{ - struct isl_ctx *ctx; - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - - ctx = set->ctx; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_preimage(set->p[i], - isl_mat_copy(mat)); - if (!set->p[i]) - goto error; - } - if (mat->n_col != mat->n_row) { - set->dim = isl_dim_cow(set->dim); - if (!set->dim) - goto error; - set->dim->n_out += mat->n_col; - set->dim->n_out -= mat->n_row; - } - isl_mat_free(mat); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_set_free(set); - isl_mat_free(mat); - return NULL; -} - -/* Replace the variables x starting at pos in the rows q - * by x' with x = M x' with M the matrix mat. - * That is, replace the corresponding coefficients c by c M. - */ -static int transform(isl_ctx *ctx, isl_int **q, unsigned n, - unsigned pos, __isl_take isl_mat *mat) -{ - int i; - isl_mat *t; - - t = isl_mat_sub_alloc6(ctx, q, 0, n, pos, mat->n_row); - t = isl_mat_product(t, mat); - if (!t) - return -1; - for (i = 0; i < n; ++i) - isl_seq_swp_or_cpy(q[i] + pos, t->row[i], t->n_col); - isl_mat_free(t); - return 0; -} - -/* Replace the variables x of type "type" starting at "first" in "bset" - * by x' with x = M x' with M the matrix trans. - * That is, replace the corresponding coefficients c by c M. - * - * The transformation matrix should be a square matrix. - */ -__isl_give isl_basic_set *isl_basic_set_transform_dims( - __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, - __isl_take isl_mat *trans) -{ - isl_ctx *ctx; - unsigned pos; - - bset = isl_basic_set_cow(bset); - if (!bset || !trans) - goto error; - - ctx = isl_basic_set_get_ctx(bset); - if (trans->n_row != trans->n_col) - isl_die(trans->ctx, isl_error_invalid, - "expecting square transformation matrix", goto error); - if (first + trans->n_row > isl_basic_set_dim(bset, type)) - isl_die(trans->ctx, isl_error_invalid, - "oversized transformation matrix", goto error); - - pos = isl_basic_set_offset(bset, type) + first; - - if (transform(ctx, bset->eq, bset->n_eq, pos, isl_mat_copy(trans)) < 0) - goto error; - if (transform(ctx, bset->ineq, bset->n_ineq, pos, - isl_mat_copy(trans)) < 0) - goto error; - if (transform(ctx, bset->div, bset->n_div, 1 + pos, - isl_mat_copy(trans)) < 0) - goto error; - - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED); - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED_DIVS); - - isl_mat_free(trans); - return bset; -error: - isl_mat_free(trans); - isl_basic_set_free(bset); - return NULL; -} - -void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent) -{ - int i, j; - - if (!mat) { - fprintf(out, "%*snull mat\n", indent, ""); - return; - } - - if (mat->n_row == 0) - fprintf(out, "%*s[]\n", indent, ""); - - for (i = 0; i < mat->n_row; ++i) { - if (!i) - fprintf(out, "%*s[[", indent, ""); - else - fprintf(out, "%*s[", indent+1, ""); - for (j = 0; j < mat->n_col; ++j) { - if (j) - fprintf(out, ","); - isl_int_print(out, mat->row[i][j], 0); - } - if (i == mat->n_row-1) - fprintf(out, "]]\n"); - else - fprintf(out, "]\n"); - } -} - -void isl_mat_dump(__isl_keep isl_mat *mat) -{ - isl_mat_print_internal(mat, stderr, 0); -} - -struct isl_mat *isl_mat_drop_cols(struct isl_mat *mat, unsigned col, unsigned n) -{ - int r; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - if (col != mat->n_col-n) { - for (r = 0; r < mat->n_row; ++r) - isl_seq_cpy(mat->row[r]+col, mat->row[r]+col+n, - mat->n_col - col - n); - } - mat->n_col -= n; - return mat; -} - -struct isl_mat *isl_mat_drop_rows(struct isl_mat *mat, unsigned row, unsigned n) -{ - int r; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - for (r = row; r+n < mat->n_row; ++r) - mat->row[r] = mat->row[r+n]; - - mat->n_row -= n; - return mat; -} - -__isl_give isl_mat *isl_mat_insert_cols(__isl_take isl_mat *mat, - unsigned col, unsigned n) -{ - isl_mat *ext; - - if (!mat) - return NULL; - if (n == 0) - return mat; - - ext = isl_mat_alloc(mat->ctx, mat->n_row, mat->n_col + n); - if (!ext) - goto error; - - isl_mat_sub_copy(mat->ctx, ext->row, mat->row, mat->n_row, 0, 0, col); - isl_mat_sub_copy(mat->ctx, ext->row, mat->row, mat->n_row, - col + n, col, mat->n_col - col); - - isl_mat_free(mat); - return ext; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_insert_zero_cols(__isl_take isl_mat *mat, - unsigned first, unsigned n) -{ - int i; - - if (!mat) - return NULL; - mat = isl_mat_insert_cols(mat, first, n); - if (!mat) - return NULL; - - for (i = 0; i < mat->n_row; ++i) - isl_seq_clr(mat->row[i] + first, n); - - return mat; -} - -__isl_give isl_mat *isl_mat_add_zero_cols(__isl_take isl_mat *mat, unsigned n) -{ - if (!mat) - return NULL; - - return isl_mat_insert_zero_cols(mat, mat->n_col, n); -} - -__isl_give isl_mat *isl_mat_insert_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n) -{ - isl_mat *ext; - - if (!mat) - return NULL; - if (n == 0) - return mat; - - ext = isl_mat_alloc(mat->ctx, mat->n_row + n, mat->n_col); - if (!ext) - goto error; - - isl_mat_sub_copy(mat->ctx, ext->row, mat->row, row, 0, 0, mat->n_col); - isl_mat_sub_copy(mat->ctx, ext->row + row + n, mat->row + row, - mat->n_row - row, 0, 0, mat->n_col); - - isl_mat_free(mat); - return ext; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_add_rows(__isl_take isl_mat *mat, unsigned n) -{ - if (!mat) - return NULL; - - return isl_mat_insert_rows(mat, mat->n_row, n); -} - -__isl_give isl_mat *isl_mat_insert_zero_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n) -{ - int i; - - mat = isl_mat_insert_rows(mat, row, n); - if (!mat) - return NULL; - - for (i = 0; i < n; ++i) - isl_seq_clr(mat->row[row + i], mat->n_col); - - return mat; -} - -__isl_give isl_mat *isl_mat_add_zero_rows(__isl_take isl_mat *mat, unsigned n) -{ - if (!mat) - return NULL; - - return isl_mat_insert_zero_rows(mat, mat->n_row, n); -} - -void isl_mat_col_submul(struct isl_mat *mat, - int dst_col, isl_int f, int src_col) -{ - int i; - - for (i = 0; i < mat->n_row; ++i) - isl_int_submul(mat->row[i][dst_col], f, mat->row[i][src_col]); -} - -void isl_mat_col_add(__isl_keep isl_mat *mat, int dst_col, int src_col) -{ - int i; - - if (!mat) - return; - - for (i = 0; i < mat->n_row; ++i) - isl_int_add(mat->row[i][dst_col], - mat->row[i][dst_col], mat->row[i][src_col]); -} - -void isl_mat_col_mul(struct isl_mat *mat, int dst_col, isl_int f, int src_col) -{ - int i; - - for (i = 0; i < mat->n_row; ++i) - isl_int_mul(mat->row[i][dst_col], f, mat->row[i][src_col]); -} - -struct isl_mat *isl_mat_unimodular_complete(struct isl_mat *M, int row) -{ - int r; - struct isl_mat *H = NULL, *Q = NULL; - - if (!M) - return NULL; - - isl_assert(M->ctx, M->n_row == M->n_col, goto error); - M->n_row = row; - H = isl_mat_left_hermite(isl_mat_copy(M), 0, NULL, &Q); - M->n_row = M->n_col; - if (!H) - goto error; - for (r = 0; r < row; ++r) - isl_assert(M->ctx, isl_int_is_one(H->row[r][r]), goto error); - for (r = row; r < M->n_row; ++r) - isl_seq_cpy(M->row[r], Q->row[r], M->n_col); - isl_mat_free(H); - isl_mat_free(Q); - return M; -error: - isl_mat_free(H); - isl_mat_free(Q); - isl_mat_free(M); - return NULL; -} - -__isl_give isl_mat *isl_mat_concat(__isl_take isl_mat *top, - __isl_take isl_mat *bot) -{ - struct isl_mat *mat; - - if (!top || !bot) - goto error; - - isl_assert(top->ctx, top->n_col == bot->n_col, goto error); - if (top->n_row == 0) { - isl_mat_free(top); - return bot; - } - if (bot->n_row == 0) { - isl_mat_free(bot); - return top; - } - - mat = isl_mat_alloc(top->ctx, top->n_row + bot->n_row, top->n_col); - if (!mat) - goto error; - isl_mat_sub_copy(mat->ctx, mat->row, top->row, top->n_row, - 0, 0, mat->n_col); - isl_mat_sub_copy(mat->ctx, mat->row + top->n_row, bot->row, bot->n_row, - 0, 0, mat->n_col); - isl_mat_free(top); - isl_mat_free(bot); - return mat; -error: - isl_mat_free(top); - isl_mat_free(bot); - return NULL; -} - -int isl_mat_is_equal(__isl_keep isl_mat *mat1, __isl_keep isl_mat *mat2) -{ - int i; - - if (!mat1 || !mat2) - return -1; - - if (mat1->n_row != mat2->n_row) - return 0; - - if (mat1->n_col != mat2->n_col) - return 0; - - for (i = 0; i < mat1->n_row; ++i) - if (!isl_seq_eq(mat1->row[i], mat2->row[i], mat1->n_col)) - return 0; - - return 1; -} - -__isl_give isl_mat *isl_mat_from_row_vec(__isl_take isl_vec *vec) -{ - struct isl_mat *mat; - - if (!vec) - return NULL; - mat = isl_mat_alloc(vec->ctx, 1, vec->size); - if (!mat) - goto error; - - isl_seq_cpy(mat->row[0], vec->el, vec->size); - - isl_vec_free(vec); - return mat; -error: - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_mat *isl_mat_vec_concat(__isl_take isl_mat *top, - __isl_take isl_vec *bot) -{ - return isl_mat_concat(top, isl_mat_from_row_vec(bot)); -} - -__isl_give isl_mat *isl_mat_move_cols(__isl_take isl_mat *mat, - unsigned dst_col, unsigned src_col, unsigned n) -{ - isl_mat *res; - - if (!mat) - return NULL; - if (n == 0 || dst_col == src_col) - return mat; - - res = isl_mat_alloc(mat->ctx, mat->n_row, mat->n_col); - if (!res) - goto error; - - if (dst_col < src_col) { - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - 0, 0, dst_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col, src_col, n); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col + n, dst_col, src_col - dst_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - src_col + n, src_col + n, - res->n_col - src_col - n); - } else { - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - 0, 0, src_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - src_col, src_col + n, dst_col - src_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col, src_col, n); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col + n, dst_col + n, - res->n_col - dst_col - n); - } - isl_mat_free(mat); - - return res; -error: - isl_mat_free(mat); - return NULL; -} - -void isl_mat_gcd(__isl_keep isl_mat *mat, isl_int *gcd) -{ - int i; - isl_int g; - - isl_int_set_si(*gcd, 0); - if (!mat) - return; - - isl_int_init(g); - for (i = 0; i < mat->n_row; ++i) { - isl_seq_gcd(mat->row[i], mat->n_col, &g); - isl_int_gcd(*gcd, *gcd, g); - } - isl_int_clear(g); -} - -__isl_give isl_mat *isl_mat_scale_down(__isl_take isl_mat *mat, isl_int m) -{ - int i; - - if (isl_int_is_one(m)) - return mat; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - for (i = 0; i < mat->n_row; ++i) - isl_seq_scale_down(mat->row[i], mat->row[i], m, mat->n_col); - - return mat; -} - -__isl_give isl_mat *isl_mat_normalize(__isl_take isl_mat *mat) -{ - isl_int gcd; - - if (!mat) - return NULL; - - isl_int_init(gcd); - isl_mat_gcd(mat, &gcd); - mat = isl_mat_scale_down(mat, gcd); - isl_int_clear(gcd); - - return mat; -} - -__isl_give isl_mat *isl_mat_normalize_row(__isl_take isl_mat *mat, int row) -{ - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - isl_seq_normalize(mat->ctx, mat->row[row], mat->n_col); - - return mat; -} - -/* Number of initial non-zero columns. - */ -int isl_mat_initial_non_zero_cols(__isl_keep isl_mat *mat) -{ - int i; - - if (!mat) - return -1; - - for (i = 0; i < mat->n_col; ++i) - if (row_first_non_zero(mat->row, mat->n_row, i) < 0) - break; - - return i; -} diff --git a/cloog-0.16.3/isl/isl_mat_private.h b/cloog-0.16.3/isl/isl_mat_private.h deleted file mode 100644 index 5ba49902a94d14e8c934c6a0d2e090d399ac58f2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_mat_private.h +++ /dev/null @@ -1,29 +0,0 @@ -#include - -struct isl_mat { - int ref; - - struct isl_ctx *ctx; - -#define ISL_MAT_BORROWED (1 << 0) - unsigned flags; - - unsigned n_row; - unsigned n_col; - - isl_int **row; - - /* actual size of the rows in memory; n_col <= max_col */ - unsigned max_col; - - struct isl_blk block; -}; - -__isl_give isl_mat *isl_mat_sub_alloc(__isl_keep isl_mat *mat, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col); -__isl_give isl_mat *isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col); -void isl_mat_sub_copy(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col); -void isl_mat_sub_neg(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col); diff --git a/cloog-0.16.3/isl/isl_morph.c b/cloog-0.16.3/isl/isl_morph.c deleted file mode 100644 index 5887403bd37f53eb33a75a471ea19f01f662d88f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_morph.c +++ /dev/null @@ -1,777 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include - -__isl_give isl_morph *isl_morph_alloc( - __isl_take isl_basic_set *dom, __isl_take isl_basic_set *ran, - __isl_take isl_mat *map, __isl_take isl_mat *inv) -{ - isl_morph *morph; - - if (!dom || !ran || !map || !inv) - goto error; - - morph = isl_alloc_type(dom->ctx, struct isl_morph); - if (!morph) - goto error; - - morph->ref = 1; - morph->dom = dom; - morph->ran = ran; - morph->map = map; - morph->inv = inv; - - return morph; -error: - isl_basic_set_free(dom); - isl_basic_set_free(ran); - isl_mat_free(map); - isl_mat_free(inv); - return NULL; -} - -__isl_give isl_morph *isl_morph_copy(__isl_keep isl_morph *morph) -{ - if (!morph) - return NULL; - - morph->ref++; - return morph; -} - -__isl_give isl_morph *isl_morph_dup(__isl_keep isl_morph *morph) -{ - if (!morph) - return NULL; - - return isl_morph_alloc(isl_basic_set_copy(morph->dom), - isl_basic_set_copy(morph->ran), - isl_mat_copy(morph->map), isl_mat_copy(morph->inv)); -} - -__isl_give isl_morph *isl_morph_cow(__isl_take isl_morph *morph) -{ - if (!morph) - return NULL; - - if (morph->ref == 1) - return morph; - morph->ref--; - return isl_morph_dup(morph); -} - -void isl_morph_free(__isl_take isl_morph *morph) -{ - if (!morph) - return; - - if (--morph->ref > 0) - return; - - isl_basic_set_free(morph->dom); - isl_basic_set_free(morph->ran); - isl_mat_free(morph->map); - isl_mat_free(morph->inv); - free(morph); -} - -__isl_give isl_dim *isl_morph_get_ran_dim(__isl_keep isl_morph *morph) -{ - if (!morph) - return NULL; - - return isl_dim_copy(morph->ran->dim); -} - -unsigned isl_morph_dom_dim(__isl_keep isl_morph *morph, enum isl_dim_type type) -{ - if (!morph) - return 0; - - return isl_basic_set_dim(morph->dom, type); -} - -unsigned isl_morph_ran_dim(__isl_keep isl_morph *morph, enum isl_dim_type type) -{ - if (!morph) - return 0; - - return isl_basic_set_dim(morph->ran, type); -} - -__isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n) -{ - unsigned dom_offset; - - if (n == 0) - return morph; - - morph = isl_morph_cow(morph); - if (!morph) - return NULL; - - dom_offset = 1 + isl_dim_offset(morph->dom->dim, type); - - morph->dom = isl_basic_set_remove_dims(morph->dom, type, first, n); - - morph->map = isl_mat_drop_cols(morph->map, dom_offset + first, n); - - morph->inv = isl_mat_drop_rows(morph->inv, dom_offset + first, n); - - if (morph->dom && morph->ran && morph->map && morph->inv) - return morph; - - isl_morph_free(morph); - return NULL; -} - -__isl_give isl_morph *isl_morph_remove_ran_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n) -{ - unsigned ran_offset; - - if (n == 0) - return morph; - - morph = isl_morph_cow(morph); - if (!morph) - return NULL; - - ran_offset = 1 + isl_dim_offset(morph->ran->dim, type); - - morph->ran = isl_basic_set_remove_dims(morph->ran, type, first, n); - - morph->map = isl_mat_drop_rows(morph->map, ran_offset + first, n); - - morph->inv = isl_mat_drop_cols(morph->inv, ran_offset + first, n); - - if (morph->dom && morph->ran && morph->map && morph->inv) - return morph; - - isl_morph_free(morph); - return NULL; -} - -void isl_morph_dump(__isl_take isl_morph *morph, FILE *out) -{ - if (!morph) - return; - - isl_basic_set_print(morph->dom, out, 0, "", "", ISL_FORMAT_ISL); - isl_basic_set_print(morph->ran, out, 0, "", "", ISL_FORMAT_ISL); - isl_mat_print_internal(morph->map, out, 4); - isl_mat_print_internal(morph->inv, out, 4); -} - -__isl_give isl_morph *isl_morph_identity(__isl_keep isl_basic_set *bset) -{ - isl_mat *id; - isl_basic_set *universe; - unsigned total; - - if (!bset) - return NULL; - - total = isl_basic_set_total_dim(bset); - id = isl_mat_identity(bset->ctx, 1 + total); - universe = isl_basic_set_universe(isl_dim_copy(bset->dim)); - - return isl_morph_alloc(universe, isl_basic_set_copy(universe), - id, isl_mat_copy(id)); -} - -/* Create a(n identity) morphism between empty sets of the same dimension - * a "bset". - */ -__isl_give isl_morph *isl_morph_empty(__isl_keep isl_basic_set *bset) -{ - isl_mat *id; - isl_basic_set *empty; - unsigned total; - - if (!bset) - return NULL; - - total = isl_basic_set_total_dim(bset); - id = isl_mat_identity(bset->ctx, 1 + total); - empty = isl_basic_set_empty(isl_dim_copy(bset->dim)); - - return isl_morph_alloc(empty, isl_basic_set_copy(empty), - id, isl_mat_copy(id)); -} - -/* Given a matrix that maps a (possibly) parametric domain to - * a parametric domain, add in rows that map the "nparam" parameters onto - * themselves. - */ -static __isl_give isl_mat *insert_parameter_rows(__isl_take isl_mat *mat, - unsigned nparam) -{ - int i; - - if (nparam == 0) - return mat; - if (!mat) - return NULL; - - mat = isl_mat_insert_rows(mat, 1, nparam); - if (!mat) - return NULL; - - for (i = 0; i < nparam; ++i) { - isl_seq_clr(mat->row[1 + i], mat->n_col); - isl_int_set(mat->row[1 + i][1 + i], mat->row[0][0]); - } - - return mat; -} - -/* Construct a basic set described by the "n" equalities of "bset" starting - * at "first". - */ -static __isl_give isl_basic_set *copy_equalities(__isl_keep isl_basic_set *bset, - unsigned first, unsigned n) -{ - int i, k; - isl_basic_set *eq; - unsigned total; - - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - - total = isl_basic_set_total_dim(bset); - eq = isl_basic_set_alloc_dim(isl_dim_copy(bset->dim), 0, n, 0); - if (!eq) - return NULL; - for (i = 0; i < n; ++i) { - k = isl_basic_set_alloc_equality(eq); - if (k < 0) - goto error; - isl_seq_cpy(eq->eq[k], bset->eq[first + k], 1 + total); - } - - return eq; -error: - isl_basic_set_free(eq); - return NULL; -} - -/* Given a basic set, exploit the equalties in the a basic set to construct - * a morphishm that maps the basic set to a lower-dimensional space. - * Specifically, the morphism reduces the number of dimensions of type "type". - * - * This function is a slight generalization of isl_mat_variable_compression - * in that it allows the input to be parametric and that it allows for the - * compression of either parameters or set variables. - * - * We first select the equalities of interest, that is those that involve - * variables of type "type" and no later variables. - * Denote those equalities as - * - * -C(p) + M x = 0 - * - * where C(p) depends on the parameters if type == isl_dim_set and - * is a constant if type == isl_dim_param. - * - * First compute the (left) Hermite normal form of M, - * - * M [U1 U2] = M U = H = [H1 0] - * or - * M = H Q = [H1 0] [Q1] - * [Q2] - * - * with U, Q unimodular, Q = U^{-1} (and H lower triangular). - * Define the transformed variables as - * - * x = [U1 U2] [ x1' ] = [U1 U2] [Q1] x - * [ x2' ] [Q2] - * - * The equalities then become - * - * -C(p) + H1 x1' = 0 or x1' = H1^{-1} C(p) = C'(p) - * - * If the denominator of the constant term does not divide the - * the common denominator of the parametric terms, then every - * integer point is mapped to a non-integer point and then the original set has no - * integer solutions (since the x' are a unimodular transformation - * of the x). In this case, an empty morphism is returned. - * Otherwise, the transformation is given by - * - * x = U1 H1^{-1} C(p) + U2 x2' - * - * The inverse transformation is simply - * - * x2' = Q2 x - * - * Both matrices are extended to map the full original space to the full - * compressed space. - */ -__isl_give isl_morph *isl_basic_set_variable_compression( - __isl_keep isl_basic_set *bset, enum isl_dim_type type) -{ - unsigned otype; - unsigned ntype; - unsigned orest; - unsigned nrest; - int f_eq, n_eq; - isl_dim *dim; - isl_mat *H, *U, *Q, *C = NULL, *H1, *U1, *U2; - isl_basic_set *dom, *ran; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return isl_morph_empty(bset); - - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - - otype = 1 + isl_dim_offset(bset->dim, type); - ntype = isl_basic_set_dim(bset, type); - orest = otype + ntype; - nrest = isl_basic_set_total_dim(bset) - (orest - 1); - - for (f_eq = 0; f_eq < bset->n_eq; ++f_eq) - if (isl_seq_first_non_zero(bset->eq[f_eq] + orest, nrest) == -1) - break; - for (n_eq = 0; f_eq + n_eq < bset->n_eq; ++n_eq) - if (isl_seq_first_non_zero(bset->eq[f_eq + n_eq] + otype, ntype) == -1) - break; - if (n_eq == 0) - return isl_morph_identity(bset); - - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, f_eq, n_eq, otype, ntype); - H = isl_mat_left_hermite(H, 0, &U, &Q); - if (!H || !U || !Q) - goto error; - Q = isl_mat_drop_rows(Q, 0, n_eq); - Q = isl_mat_diagonal(isl_mat_identity(bset->ctx, otype), Q); - Q = isl_mat_diagonal(Q, isl_mat_identity(bset->ctx, nrest)); - C = isl_mat_alloc(bset->ctx, 1 + n_eq, otype); - if (!C) - goto error; - isl_int_set_si(C->row[0][0], 1); - isl_seq_clr(C->row[0] + 1, otype - 1); - isl_mat_sub_neg(C->ctx, C->row + 1, bset->eq + f_eq, n_eq, 0, 0, otype); - H1 = isl_mat_sub_alloc(H, 0, H->n_row, 0, H->n_row); - H1 = isl_mat_lin_to_aff(H1); - C = isl_mat_inverse_product(H1, C); - if (!C) - goto error; - isl_mat_free(H); - - if (!isl_int_is_one(C->row[0][0])) { - int i; - isl_int g; - - isl_int_init(g); - for (i = 0; i < n_eq; ++i) { - isl_seq_gcd(C->row[1 + i] + 1, otype - 1, &g); - isl_int_gcd(g, g, C->row[0][0]); - if (!isl_int_is_divisible_by(C->row[1 + i][0], g)) - break; - } - isl_int_clear(g); - - if (i < n_eq) { - isl_mat_free(C); - isl_mat_free(U); - isl_mat_free(Q); - return isl_morph_empty(bset); - } - - C = isl_mat_normalize(C); - } - - U1 = isl_mat_sub_alloc(U, 0, U->n_row, 0, n_eq); - U1 = isl_mat_lin_to_aff(U1); - U2 = isl_mat_sub_alloc(U, 0, U->n_row, n_eq, U->n_row - n_eq); - U2 = isl_mat_lin_to_aff(U2); - isl_mat_free(U); - - C = isl_mat_product(U1, C); - C = isl_mat_aff_direct_sum(C, U2); - C = insert_parameter_rows(C, otype - 1); - C = isl_mat_diagonal(C, isl_mat_identity(bset->ctx, nrest)); - - dim = isl_dim_copy(bset->dim); - dim = isl_dim_drop(dim, type, 0, ntype); - dim = isl_dim_add(dim, type, ntype - n_eq); - ran = isl_basic_set_universe(dim); - dom = copy_equalities(bset, f_eq, n_eq); - - return isl_morph_alloc(dom, ran, Q, C); -error: - isl_mat_free(C); - isl_mat_free(H); - isl_mat_free(U); - isl_mat_free(Q); - return NULL; -} - -/* Construct a parameter compression for "bset". - * We basically just call isl_mat_parameter_compression with the right input - * and then extend the resulting matrix to include the variables. - * - * Let the equalities be given as - * - * B(p) + A x = 0 - * - * and let [H 0] be the Hermite Normal Form of A, then - * - * H^-1 B(p) - * - * needs to be integer, so we impose that each row is divisible by - * the denominator. - */ -__isl_give isl_morph *isl_basic_set_parameter_compression( - __isl_keep isl_basic_set *bset) -{ - unsigned nparam; - unsigned nvar; - int n_eq; - isl_mat *H, *B; - isl_vec *d; - isl_mat *map, *inv; - isl_basic_set *dom, *ran; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return isl_morph_empty(bset); - if (bset->n_eq == 0) - return isl_morph_identity(bset); - - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - - n_eq = bset->n_eq; - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - isl_assert(bset->ctx, n_eq <= nvar, return NULL); - - d = isl_vec_alloc(bset->ctx, n_eq); - B = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, n_eq, 0, 1 + nparam); - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, n_eq, 1 + nparam, nvar); - H = isl_mat_left_hermite(H, 0, NULL, NULL); - H = isl_mat_drop_cols(H, n_eq, nvar - n_eq); - H = isl_mat_lin_to_aff(H); - H = isl_mat_right_inverse(H); - if (!H || !d) - goto error; - isl_seq_set(d->el, H->row[0][0], d->size); - H = isl_mat_drop_rows(H, 0, 1); - H = isl_mat_drop_cols(H, 0, 1); - B = isl_mat_product(H, B); - inv = isl_mat_parameter_compression(B, d); - inv = isl_mat_diagonal(inv, isl_mat_identity(bset->ctx, nvar)); - map = isl_mat_right_inverse(isl_mat_copy(inv)); - - dom = isl_basic_set_universe(isl_dim_copy(bset->dim)); - ran = isl_basic_set_universe(isl_dim_copy(bset->dim)); - - return isl_morph_alloc(dom, ran, map, inv); -error: - isl_mat_free(H); - isl_mat_free(B); - isl_vec_free(d); - return NULL; -} - -/* Add stride constraints to "bset" based on the inverse mapping - * that was plugged in. In particular, if morph maps x' to x, - * the the constraints of the original input - * - * A x' + b >= 0 - * - * have been rewritten to - * - * A inv x + b >= 0 - * - * However, this substitution may loose information on the integrality of x', - * so we need to impose that - * - * inv x - * - * is integral. If inv = B/d, this means that we need to impose that - * - * B x = 0 mod d - * - * or - * - * exists alpha in Z^m: B x = d alpha - * - */ -static __isl_give isl_basic_set *add_strides(__isl_take isl_basic_set *bset, - __isl_keep isl_morph *morph) -{ - int i, div, k; - isl_int gcd; - - if (isl_int_is_one(morph->inv->row[0][0])) - return bset; - - isl_int_init(gcd); - - for (i = 0; 1 + i < morph->inv->n_row; ++i) { - isl_seq_gcd(morph->inv->row[1 + i], morph->inv->n_col, &gcd); - if (isl_int_is_divisible_by(gcd, morph->inv->row[0][0])) - continue; - div = isl_basic_set_alloc_div(bset); - if (div < 0) - goto error; - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k], morph->inv->row[1 + i], - morph->inv->n_col); - isl_seq_clr(bset->eq[k] + morph->inv->n_col, bset->n_div); - isl_int_set(bset->eq[k][morph->inv->n_col + div], - morph->inv->row[0][0]); - } - - isl_int_clear(gcd); - - return bset; -error: - isl_int_clear(gcd); - isl_basic_set_free(bset); - return NULL; -} - -/* Apply the morphism to the basic set. - * We basically just compute the preimage of "bset" under the inverse mapping - * in morph, add in stride constraints and intersect with the range - * of the morphism. - */ -__isl_give isl_basic_set *isl_morph_basic_set(__isl_take isl_morph *morph, - __isl_take isl_basic_set *bset) -{ - isl_basic_set *res = NULL; - isl_mat *mat = NULL; - int i, k; - int max_stride; - - if (!morph || !bset) - goto error; - - isl_assert(bset->ctx, isl_dim_equal(bset->dim, morph->dom->dim), - goto error); - - max_stride = morph->inv->n_row - 1; - if (isl_int_is_one(morph->inv->row[0][0])) - max_stride = 0; - res = isl_basic_set_alloc_dim(isl_dim_copy(morph->ran->dim), - bset->n_div + max_stride, bset->n_eq + max_stride, bset->n_ineq); - - for (i = 0; i < bset->n_div; ++i) - if (isl_basic_set_alloc_div(res) < 0) - goto error; - - mat = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, - 0, morph->inv->n_row); - mat = isl_mat_product(mat, isl_mat_copy(morph->inv)); - if (!mat) - goto error; - for (i = 0; i < bset->n_eq; ++i) { - k = isl_basic_set_alloc_equality(res); - if (k < 0) - goto error; - isl_seq_cpy(res->eq[k], mat->row[i], mat->n_col); - isl_seq_scale(res->eq[k] + mat->n_col, bset->eq[i] + mat->n_col, - morph->inv->row[0][0], bset->n_div); - } - isl_mat_free(mat); - - mat = isl_mat_sub_alloc6(bset->ctx, bset->ineq, 0, bset->n_ineq, - 0, morph->inv->n_row); - mat = isl_mat_product(mat, isl_mat_copy(morph->inv)); - if (!mat) - goto error; - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(res); - if (k < 0) - goto error; - isl_seq_cpy(res->ineq[k], mat->row[i], mat->n_col); - isl_seq_scale(res->ineq[k] + mat->n_col, - bset->ineq[i] + mat->n_col, - morph->inv->row[0][0], bset->n_div); - } - isl_mat_free(mat); - - mat = isl_mat_sub_alloc6(bset->ctx, bset->div, 0, bset->n_div, - 1, morph->inv->n_row); - mat = isl_mat_product(mat, isl_mat_copy(morph->inv)); - if (!mat) - goto error; - for (i = 0; i < bset->n_div; ++i) { - isl_int_mul(res->div[i][0], - morph->inv->row[0][0], bset->div[i][0]); - isl_seq_cpy(res->div[i] + 1, mat->row[i], mat->n_col); - isl_seq_scale(res->div[i] + 1 + mat->n_col, - bset->div[i] + 1 + mat->n_col, - morph->inv->row[0][0], bset->n_div); - } - isl_mat_free(mat); - - res = add_strides(res, morph); - - if (isl_basic_set_is_rational(bset)) - res = isl_basic_set_set_rational(res); - - res = isl_basic_set_simplify(res); - res = isl_basic_set_finalize(res); - - res = isl_basic_set_intersect(res, isl_basic_set_copy(morph->ran)); - - isl_morph_free(morph); - isl_basic_set_free(bset); - return res; -error: - isl_mat_free(mat); - isl_morph_free(morph); - isl_basic_set_free(bset); - isl_basic_set_free(res); - return NULL; -} - -/* Apply the morphism to the set. - */ -__isl_give isl_set *isl_morph_set(__isl_take isl_morph *morph, - __isl_take isl_set *set) -{ - int i; - - if (!morph || !set) - goto error; - - isl_assert(set->ctx, isl_dim_equal(set->dim, morph->dom->dim), goto error); - - set = isl_set_cow(set); - if (!set) - goto error; - - isl_dim_free(set->dim); - set->dim = isl_dim_copy(morph->ran->dim); - if (!set->dim) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_morph_basic_set(isl_morph_copy(morph), set->p[i]); - if (!set->p[i]) - goto error; - } - - isl_morph_free(morph); - - ISL_F_CLR(set, ISL_SET_NORMALIZED); - - return set; -error: - isl_set_free(set); - isl_morph_free(morph); - return NULL; -} - -/* Construct a morphism that first does morph2 and then morph1. - */ -__isl_give isl_morph *isl_morph_compose(__isl_take isl_morph *morph1, - __isl_take isl_morph *morph2) -{ - isl_mat *map, *inv; - isl_basic_set *dom, *ran; - - if (!morph1 || !morph2) - goto error; - - map = isl_mat_product(isl_mat_copy(morph1->map), isl_mat_copy(morph2->map)); - inv = isl_mat_product(isl_mat_copy(morph2->inv), isl_mat_copy(morph1->inv)); - dom = isl_morph_basic_set(isl_morph_inverse(isl_morph_copy(morph2)), - isl_basic_set_copy(morph1->dom)); - dom = isl_basic_set_intersect(dom, isl_basic_set_copy(morph2->dom)); - ran = isl_morph_basic_set(isl_morph_copy(morph1), - isl_basic_set_copy(morph2->ran)); - ran = isl_basic_set_intersect(ran, isl_basic_set_copy(morph1->ran)); - - isl_morph_free(morph1); - isl_morph_free(morph2); - - return isl_morph_alloc(dom, ran, map, inv); -error: - isl_morph_free(morph1); - isl_morph_free(morph2); - return NULL; -} - -__isl_give isl_morph *isl_morph_inverse(__isl_take isl_morph *morph) -{ - isl_basic_set *bset; - isl_mat *mat; - - morph = isl_morph_cow(morph); - if (!morph) - return NULL; - - bset = morph->dom; - morph->dom = morph->ran; - morph->ran = bset; - - mat = morph->map; - morph->map = morph->inv; - morph->inv = mat; - - return morph; -} - -__isl_give isl_morph *isl_basic_set_full_compression( - __isl_keep isl_basic_set *bset) -{ - isl_morph *morph, *morph2; - - bset = isl_basic_set_copy(bset); - - morph = isl_basic_set_variable_compression(bset, isl_dim_param); - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - - morph2 = isl_basic_set_parameter_compression(bset); - bset = isl_morph_basic_set(isl_morph_copy(morph2), bset); - - morph = isl_morph_compose(morph2, morph); - - morph2 = isl_basic_set_variable_compression(bset, isl_dim_set); - isl_basic_set_free(bset); - - morph = isl_morph_compose(morph2, morph); - - return morph; -} - -__isl_give isl_vec *isl_morph_vec(__isl_take isl_morph *morph, - __isl_take isl_vec *vec) -{ - if (!morph) - goto error; - - vec = isl_mat_vec_product(isl_mat_copy(morph->map), vec); - - isl_morph_free(morph); - return vec; -error: - isl_morph_free(morph); - isl_vec_free(vec); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_morph.h b/cloog-0.16.3/isl/isl_morph.h deleted file mode 100644 index f125cdc1e027a870ea7e5332ee8169ec4abab692..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_morph.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#ifndef ISL_MORHP_H -#define ISL_MORHP_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* An isl_morph is a "morphism" on (basic) sets. - * "map" is an affine mapping from "dom" to "ran" - * and "inv" is the inverse mapping. - */ -struct isl_morph { - int ref; - - isl_basic_set *dom; - isl_basic_set *ran; - - isl_mat *map; - isl_mat *inv; -}; -typedef struct isl_morph isl_morph; - -__isl_give isl_morph *isl_morph_alloc( - __isl_take isl_basic_set *dom, __isl_take isl_basic_set *ran, - __isl_take isl_mat *map, __isl_take isl_mat *inv); -__isl_give isl_morph *isl_morph_copy(__isl_keep isl_morph *morph); -__isl_give isl_morph *isl_morph_identity(__isl_keep isl_basic_set *bset); -void isl_morph_free(__isl_take isl_morph *morph); - -__isl_give isl_dim *isl_morph_get_ran_dim(__isl_keep isl_morph *morph); -unsigned isl_morph_dom_dim(__isl_keep isl_morph *morph, enum isl_dim_type type); -unsigned isl_morph_ran_dim(__isl_keep isl_morph *morph, enum isl_dim_type type); - -__isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_morph *isl_morph_remove_ran_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_morph *isl_morph_compose(__isl_take isl_morph *morph1, - __isl_take isl_morph *morph2); -__isl_give isl_morph *isl_morph_inverse(__isl_take isl_morph *morph); - -void isl_morph_dump(__isl_take isl_morph *morph, FILE *out); - -__isl_give isl_morph *isl_basic_set_variable_compression( - __isl_keep isl_basic_set *bset, enum isl_dim_type type); -__isl_give isl_morph *isl_basic_set_parameter_compression( - __isl_keep isl_basic_set *bset); -__isl_give isl_morph *isl_basic_set_full_compression( - __isl_keep isl_basic_set *bset); - -__isl_give isl_basic_set *isl_morph_basic_set(__isl_take isl_morph *morph, - __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_morph_set(__isl_take isl_morph *morph, - __isl_take isl_set *set); -__isl_give isl_vec *isl_morph_vec(__isl_take isl_morph *morph, - __isl_take isl_vec *vec); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_name.c b/cloog-0.16.3/isl/isl_name.c deleted file mode 100644 index a9a6382f75ef00e77409326c0cdc4f9904268d03..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_name.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_name.h" - -struct isl_name *isl_name_alloc(struct isl_ctx *ctx, const char *s) -{ - const char *copy = strdup(s); - struct isl_name *name; - - if (!copy) - return NULL; - name = isl_alloc_type(ctx, struct isl_name); - if (!name) - goto error; - - name->ref = 1; - name->name = copy; - - name->hash = isl_hash_init(); - name->hash = isl_hash_string(name->hash, s); - - return name; -error: - free((char *)copy); - return NULL; -} - -static int isl_name_has_name(const void *entry, const void *val) -{ - struct isl_name *name = (struct isl_name *)entry; - const char *s = (const char *)val; - - return !strcmp(name->name, s); -} - -struct isl_name *isl_name_get(struct isl_ctx *ctx, const char *name) -{ - struct isl_hash_table_entry *entry; - uint32_t name_hash; - - name_hash = isl_hash_string(isl_hash_init(), name); - entry = isl_hash_table_find(ctx, &ctx->name_hash, name_hash, - isl_name_has_name, name, 1); - if (!entry) - return NULL; - if (entry->data) - return isl_name_copy(ctx, entry->data); - entry->data = isl_name_alloc(ctx, name); - if (!entry->data) - ctx->name_hash.n--; - return entry->data; -} - -struct isl_name *isl_name_copy(struct isl_ctx *ctx, struct isl_name *name) -{ - if (!name) - return NULL; - - name->ref++; - return name; -} - -static int isl_name_eq(const void *entry, const void *name) -{ - return entry == name; -} - -uint32_t isl_hash_name(uint32_t hash, struct isl_name *name) -{ - if (name) - isl_hash_hash(hash, name->hash); - - return hash; -} - -void isl_name_free(struct isl_ctx *ctx, struct isl_name *name) -{ - uint32_t name_hash; - struct isl_hash_table_entry *entry; - - if (!name) - return; - - if (--name->ref > 0) - return; - - name_hash = isl_hash_string(isl_hash_init(), name->name); - entry = isl_hash_table_find(ctx, &ctx->name_hash, name_hash, - isl_name_eq, name, 0); - isl_assert(ctx, entry, return); - isl_hash_table_remove(ctx, &ctx->name_hash, entry); - - free((char *)name->name); - free(name); -} diff --git a/cloog-0.16.3/isl/isl_name.h b/cloog-0.16.3/isl/isl_name.h deleted file mode 100644 index 3db7683c33bf4b710e6f97a31a4f48d387ff1153..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_name.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_NAME_H -#define ISL_NAME_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_name { - int ref; - - const char *name; - uint32_t hash; -}; - -struct isl_name *isl_name_alloc(struct isl_ctx *ctx, const char *name); -struct isl_name *isl_name_get(struct isl_ctx *ctx, const char *name); -struct isl_name *isl_name_copy(struct isl_ctx *ctx, struct isl_name *name); -uint32_t isl_hash_name(uint32_t hash, struct isl_name *name); -void isl_name_free(struct isl_ctx *ctx, struct isl_name *name); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_obj.c b/cloog-0.16.3/isl/isl_obj.c deleted file mode 100644 index 928982daad210425f2f65efceea9b92eb886291b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_obj.c +++ /dev/null @@ -1,425 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include - -struct isl_int_obj { - int ref; - isl_ctx *ctx; - isl_int v; -}; - -__isl_give isl_int_obj *isl_int_obj_alloc(isl_ctx *ctx, isl_int v) -{ - isl_int_obj *i; - - i = isl_alloc_type(ctx, isl_int_obj); - if (!i) - return NULL; - - i->ctx = ctx; - isl_ctx_ref(ctx); - i->ref = 1; - isl_int_init(i->v); - isl_int_set(i->v, v); - - return i; -} - -__isl_give isl_int_obj *isl_int_obj_copy(__isl_keep isl_int_obj *i) -{ - if (!i) - return NULL; - - i->ref++; - return i; -} - -__isl_give isl_int_obj *isl_int_obj_dup(__isl_keep isl_int_obj *i) -{ - if (!i) - return NULL; - - return isl_int_obj_alloc(i->ctx, i->v); -} - -__isl_give isl_int_obj *isl_int_obj_cow(__isl_take isl_int_obj *i) -{ - if (!i) - return NULL; - - if (i->ref == 1) - return i; - i->ref--; - return isl_int_obj_dup(i); -} - -void isl_int_obj_free(__isl_take isl_int_obj *i) -{ - if (!i) - return; - - if (--i->ref > 0) - return; - - isl_ctx_deref(i->ctx); - isl_int_clear(i->v); - free(i); -} - -__isl_give isl_int_obj *isl_int_obj_add(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2) -{ - i1 = isl_int_obj_cow(i1); - if (!i1 || !i2) - goto error; - - isl_int_add(i1->v, i1->v, i2->v); - - isl_int_obj_free(i2); - return i1; -error: - isl_int_obj_free(i1); - isl_int_obj_free(i2); - return NULL; -} - -__isl_give isl_int_obj *isl_int_obj_sub(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2) -{ - i1 = isl_int_obj_cow(i1); - if (!i1 || !i2) - goto error; - - isl_int_sub(i1->v, i1->v, i2->v); - - isl_int_obj_free(i2); - return i1; -error: - isl_int_obj_free(i1); - isl_int_obj_free(i2); - return NULL; -} - -__isl_give isl_int_obj *isl_int_obj_mul(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2) -{ - i1 = isl_int_obj_cow(i1); - if (!i1 || !i2) - goto error; - - isl_int_mul(i1->v, i1->v, i2->v); - - isl_int_obj_free(i2); - return i1; -error: - isl_int_obj_free(i1); - isl_int_obj_free(i2); - return NULL; -} - -void isl_int_obj_get_int(__isl_keep isl_int_obj *i, isl_int *v) -{ - if (!i) - return; - isl_int_set(*v, i->v); -} - -static void *isl_obj_int_copy(void *v) -{ - return isl_int_obj_copy((isl_int_obj *)v); -} - -static void isl_obj_int_free(void *v) -{ - isl_int_obj_free((isl_int_obj *)v); -} - -static __isl_give isl_printer *isl_obj_int_print(__isl_take isl_printer *p, - void *v) -{ - isl_int_obj *i = v; - return isl_printer_print_isl_int(p, i->v); -} - -static void *isl_obj_int_add(void *v1, void *v2) -{ - return isl_int_obj_add((isl_int_obj *)v1, (isl_int_obj *)v2); -} - -struct isl_obj_vtable isl_obj_int_vtable = { - isl_obj_int_copy, - isl_obj_int_add, - isl_obj_int_print, - isl_obj_int_free -}; - -static void *isl_obj_map_copy(void *v) -{ - return isl_map_copy((struct isl_map *)v); -} - -static void isl_obj_map_free(void *v) -{ - isl_map_free((struct isl_map *)v); -} - -static __isl_give isl_printer *isl_obj_map_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_map(p, (struct isl_map *)v); -} - -static void *isl_obj_map_add(void *v1, void *v2) -{ - return isl_map_union((struct isl_map *)v1, (struct isl_map *)v2); -} - -struct isl_obj_vtable isl_obj_map_vtable = { - isl_obj_map_copy, - isl_obj_map_add, - isl_obj_map_print, - isl_obj_map_free -}; - -static void *isl_obj_union_map_copy(void *v) -{ - return isl_union_map_copy((isl_union_map *)v); -} - -static void isl_obj_union_map_free(void *v) -{ - isl_union_map_free((isl_union_map *)v); -} - -static __isl_give isl_printer *isl_obj_union_map_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_union_map(p, (isl_union_map *)v); -} - -static void *isl_obj_union_map_add(void *v1, void *v2) -{ - return isl_union_map_union((isl_union_map *)v1, (isl_union_map *)v2); -} - -struct isl_obj_vtable isl_obj_union_map_vtable = { - isl_obj_union_map_copy, - isl_obj_union_map_add, - isl_obj_union_map_print, - isl_obj_union_map_free -}; - -static void *isl_obj_set_copy(void *v) -{ - return isl_set_copy((struct isl_set *)v); -} - -static void isl_obj_set_free(void *v) -{ - isl_set_free((struct isl_set *)v); -} - -static __isl_give isl_printer *isl_obj_set_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_set(p, (struct isl_set *)v); -} - -static void *isl_obj_set_add(void *v1, void *v2) -{ - return isl_set_union((struct isl_set *)v1, (struct isl_set *)v2); -} - -struct isl_obj_vtable isl_obj_set_vtable = { - isl_obj_set_copy, - isl_obj_set_add, - isl_obj_set_print, - isl_obj_set_free -}; - -static void *isl_obj_union_set_copy(void *v) -{ - return isl_union_set_copy((isl_union_set *)v); -} - -static void isl_obj_union_set_free(void *v) -{ - isl_union_set_free((isl_union_set *)v); -} - -static __isl_give isl_printer *isl_obj_union_set_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_union_set(p, (isl_union_set *)v); -} - -static void *isl_obj_union_set_add(void *v1, void *v2) -{ - return isl_union_set_union((isl_union_set *)v1, (isl_union_set *)v2); -} - -struct isl_obj_vtable isl_obj_union_set_vtable = { - isl_obj_union_set_copy, - isl_obj_union_set_add, - isl_obj_union_set_print, - isl_obj_union_set_free -}; - -static void *isl_obj_none_copy(void *v) -{ - return v; -} - -static void isl_obj_none_free(void *v) -{ -} - -static __isl_give isl_printer *isl_obj_none_print(__isl_take isl_printer *p, - void *v) -{ - return p; -} - -static void *isl_obj_none_add(void *v1, void *v2) -{ - return NULL; -} - -struct isl_obj_vtable isl_obj_none_vtable = { - isl_obj_none_copy, - isl_obj_none_add, - isl_obj_none_print, - isl_obj_none_free -}; - -static void *isl_obj_pw_qp_copy(void *v) -{ - return isl_pw_qpolynomial_copy((struct isl_pw_qpolynomial *)v); -} - -static void isl_obj_pw_qp_free(void *v) -{ - isl_pw_qpolynomial_free((struct isl_pw_qpolynomial *)v); -} - -static __isl_give isl_printer *isl_obj_pw_qp_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_pw_qpolynomial(p, - (struct isl_pw_qpolynomial *)v); -} - -static void *isl_obj_pw_qp_add(void *v1, void *v2) -{ - return isl_pw_qpolynomial_add((struct isl_pw_qpolynomial *)v1, - (struct isl_pw_qpolynomial *)v2); -} - -struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable = { - isl_obj_pw_qp_copy, - isl_obj_pw_qp_add, - isl_obj_pw_qp_print, - isl_obj_pw_qp_free -}; - -static void *isl_obj_union_pw_qp_copy(void *v) -{ - return isl_union_pw_qpolynomial_copy((struct isl_union_pw_qpolynomial *)v); -} - -static void isl_obj_union_pw_qp_free(void *v) -{ - isl_union_pw_qpolynomial_free((struct isl_union_pw_qpolynomial *)v); -} - -static __isl_give isl_printer *isl_obj_union_pw_qp_print( - __isl_take isl_printer *p, void *v) -{ - return isl_printer_print_union_pw_qpolynomial(p, - (struct isl_union_pw_qpolynomial *)v); -} - -static void *isl_obj_union_pw_qp_add(void *v1, void *v2) -{ - return isl_union_pw_qpolynomial_add( - (struct isl_union_pw_qpolynomial *)v1, - (struct isl_union_pw_qpolynomial *)v2); -} - -struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable = { - isl_obj_union_pw_qp_copy, - isl_obj_union_pw_qp_add, - isl_obj_union_pw_qp_print, - isl_obj_union_pw_qp_free -}; - -static void *isl_obj_pw_qpf_copy(void *v) -{ - return isl_pw_qpolynomial_fold_copy((struct isl_pw_qpolynomial_fold *)v); -} - -static void isl_obj_pw_qpf_free(void *v) -{ - isl_pw_qpolynomial_fold_free((struct isl_pw_qpolynomial_fold *)v); -} - -static __isl_give isl_printer *isl_obj_pw_qpf_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_pw_qpolynomial_fold(p, - (struct isl_pw_qpolynomial_fold *)v); -} - -static void *isl_obj_pw_qpf_add(void *v1, void *v2) -{ - return isl_pw_qpolynomial_fold_fold((struct isl_pw_qpolynomial_fold *)v1, - (struct isl_pw_qpolynomial_fold *)v2); -} - -struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable = { - isl_obj_pw_qpf_copy, - isl_obj_pw_qpf_add, - isl_obj_pw_qpf_print, - isl_obj_pw_qpf_free -}; - -static void *isl_obj_union_pw_qpf_copy(void *v) -{ - return isl_union_pw_qpolynomial_fold_copy((struct isl_union_pw_qpolynomial_fold *)v); -} - -static void isl_obj_union_pw_qpf_free(void *v) -{ - isl_union_pw_qpolynomial_fold_free((struct isl_union_pw_qpolynomial_fold *)v); -} - -static __isl_give isl_printer *isl_obj_union_pw_qpf_print( - __isl_take isl_printer *p, void *v) -{ - return isl_printer_print_union_pw_qpolynomial_fold(p, - (struct isl_union_pw_qpolynomial_fold *)v); -} - -static void *isl_obj_union_pw_qpf_add(void *v1, void *v2) -{ - return isl_union_pw_qpolynomial_fold_fold( - (struct isl_union_pw_qpolynomial_fold *)v1, - (struct isl_union_pw_qpolynomial_fold *)v2); -} - -struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable = { - isl_obj_union_pw_qpf_copy, - isl_obj_union_pw_qpf_add, - isl_obj_union_pw_qpf_print, - isl_obj_union_pw_qpf_free -}; diff --git a/cloog-0.16.3/isl/isl_options.c b/cloog-0.16.3/isl/isl_options.c deleted file mode 100644 index 1948c2bf3c615792cd75e6c171d1a19055a43fbc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_options.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -#include -#include -#include - -struct isl_arg_choice isl_lp_solver_choice[] = { - {"tab", ISL_LP_TAB}, -#ifdef ISL_PIPLIB - {"pip", ISL_LP_PIP}, -#endif - {0} -}; - -struct isl_arg_choice isl_ilp_solver_choice[] = { - {"gbr", ISL_ILP_GBR}, -#ifdef ISL_PIPLIB - {"pip", ISL_ILP_PIP}, -#endif - {0} -}; - -struct isl_arg_choice isl_pip_solver_choice[] = { - {"tab", ISL_PIP_TAB}, -#ifdef ISL_PIPLIB - {"pip", ISL_PIP_PIP}, -#endif - {0} -}; - -struct isl_arg_choice isl_pip_context_choice[] = { - {"gbr", ISL_CONTEXT_GBR}, - {"lexmin", ISL_CONTEXT_LEXMIN}, - {0} -}; - -struct isl_arg_choice isl_gbr_choice[] = { - {"never", ISL_GBR_NEVER}, - {"once", ISL_GBR_ONCE}, - {"always", ISL_GBR_ALWAYS}, - {0} -}; - -struct isl_arg_choice isl_closure_choice[] = { - {"isl", ISL_CLOSURE_ISL}, - {"box", ISL_CLOSURE_BOX}, - {0} -}; - -static struct isl_arg_choice bound[] = { - {"bernstein", ISL_BOUND_BERNSTEIN}, - {"range", ISL_BOUND_RANGE}, - {0} -}; - -static struct isl_arg_flags bernstein_recurse[] = { - {"none", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, 0}, - {"factors", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, - ISL_BERNSTEIN_FACTORS}, - {"intervals", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, - ISL_BERNSTEIN_INTERVALS}, - {"full", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, - ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS}, - {0} -}; - -static struct isl_arg_choice convex[] = { - {"wrap", ISL_CONVEX_HULL_WRAP}, - {"fm", ISL_CONVEX_HULL_FM}, - {0} -}; - -static void print_version(void) -{ - printf("%s", isl_version()); -} - -struct isl_arg isl_options_arg[] = { -ISL_ARG_CHOICE(struct isl_options, lp_solver, 0, "lp-solver", \ - isl_lp_solver_choice, ISL_LP_TAB, "lp solver to use") -ISL_ARG_CHOICE(struct isl_options, ilp_solver, 0, "ilp-solver", \ - isl_ilp_solver_choice, ISL_ILP_GBR, "ilp solver to use") -ISL_ARG_CHOICE(struct isl_options, pip, 0, "pip", \ - isl_pip_solver_choice, ISL_PIP_TAB, "pip solver to use") -ISL_ARG_CHOICE(struct isl_options, context, 0, "context", \ - isl_pip_context_choice, ISL_CONTEXT_GBR, - "how to handle the pip context tableau") -ISL_ARG_CHOICE(struct isl_options, gbr, 0, "gbr", \ - isl_gbr_choice, ISL_GBR_ONCE, - "how often to use generalized basis reduction") -ISL_ARG_CHOICE(struct isl_options, closure, 0, "closure", \ - isl_closure_choice, ISL_CLOSURE_ISL, - "closure operation to use") -ISL_ARG_BOOL(struct isl_options, gbr_only_first, 0, "gbr-only-first", 0, - "only perform basis reduction in first direction") -ISL_ARG_CHOICE(struct isl_options, bound, 0, "bound", bound, - ISL_BOUND_BERNSTEIN, "algorithm to use for computing bounds") -ISL_ARG_FLAGS(struct isl_options, bernstein_recurse, 0, - "bernstein-recurse", bernstein_recurse, ISL_BERNSTEIN_FACTORS, NULL) -ISL_ARG_BOOL(struct isl_options, bernstein_triangulate, 0, - "bernstein-triangulate", 1, - "triangulate domains during Bernstein expansion") -ISL_ARG_BOOL(struct isl_options, pip_symmetry, 0, "pip-symmetry", 1, - "detect simple symmetries in PIP input") -ISL_ARG_CHOICE(struct isl_options, convex, 0, "convex-hull", \ - convex, ISL_CONVEX_HULL_WRAP, "convex hull algorithm to use") -ISL_ARG_BOOL(struct isl_options, schedule_parametric, 0, - "schedule-parametric", 1, "construct possibly parametric schedules") -ISL_ARG_BOOL(struct isl_options, schedule_outer_zero_distance, 0, - "schedule-outer-zero-distance", 0, - "try to construct schedules with outer zero distances over " - "proximity dependences") -ISL_ARG_BOOL(struct isl_options, schedule_maximize_band_depth, 0, - "schedule-maximize-band-depth", 0, - "maximize the number of scheduling dimensions in a band") -ISL_ARG_BOOL(struct isl_options, schedule_split_parallel, 0, - "schedule-split-parallel", 1, - "split non-tilable bands with parallel schedules") -ISL_ARG_VERSION(print_version) -ISL_ARG_END -}; - -ISL_ARG_DEF(isl_options, struct isl_options, isl_options_arg) diff --git a/cloog-0.16.3/isl/isl_output.c b/cloog-0.16.3/isl/isl_output.c deleted file mode 100644 index ec2d66456e531f885fce2799c487faaf847fc039..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_output.c +++ /dev/null @@ -1,2465 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static const char *s_to[2] = { " -> ", " \\to " }; -static const char *s_and[2] = { " and ", " \\wedge " }; -static const char *s_or[2] = { " or ", " \\vee " }; -static const char *s_le[2] = { "<=", "\\le" }; -static const char *s_ge[2] = { ">=", "\\ge" }; -static const char *s_open_set[2] = { "{ ", "\\{\\, " }; -static const char *s_close_set[2] = { " }", " \\,\\}" }; -static const char *s_open_list[2] = { "[", "(" }; -static const char *s_close_list[2] = { "]", ")" }; -static const char *s_such_that[2] = { " : ", " \\mid " }; -static const char *s_open_exists[2] = { "exists (", "\\exists \\, " }; -static const char *s_close_exists[2] = { ")", "" }; -static const char *s_div_prefix[2] = { "e", "\\alpha_" }; -static const char *s_param_prefix[2] = { "p", "p_" }; -static const char *s_input_prefix[2] = { "i", "i_" }; -static const char *s_output_prefix[2] = { "o", "o_" }; - -static __isl_give isl_printer *print_constraint_polylib( - struct isl_basic_map *bmap, int ineq, int n, __isl_take isl_printer *p) -{ - int i; - unsigned n_in = isl_basic_map_dim(bmap, isl_dim_in); - unsigned n_out = isl_basic_map_dim(bmap, isl_dim_out); - unsigned nparam = isl_basic_map_dim(bmap, isl_dim_param); - isl_int *c = ineq ? bmap->ineq[n] : bmap->eq[n]; - - p = isl_printer_start_line(p); - p = isl_printer_print_int(p, ineq); - for (i = 0; i < n_out; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+nparam+n_in+i]); - } - for (i = 0; i < n_in; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+nparam+i]); - } - for (i = 0; i < bmap->n_div; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+nparam+n_in+n_out+i]); - } - for (i = 0; i < nparam; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+i]); - } - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[0]); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *print_constraints_polylib( - struct isl_basic_map *bmap, __isl_take isl_printer *p) -{ - int i; - - p = isl_printer_set_isl_int_width(p, 5); - - for (i = 0; i < bmap->n_eq; ++i) - p = print_constraint_polylib(bmap, 0, i, p); - for (i = 0; i < bmap->n_ineq; ++i) - p = print_constraint_polylib(bmap, 1, i, p); - - return p; -} - -static __isl_give isl_printer *bset_print_constraints_polylib( - struct isl_basic_set *bset, __isl_take isl_printer *p) -{ - return print_constraints_polylib((struct isl_basic_map *)bset, p); -} - -static __isl_give isl_printer *isl_basic_map_print_polylib( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, int ext) -{ - unsigned total = isl_basic_map_total_dim(bmap); - p = isl_printer_start_line(p); - p = isl_printer_print_int(p, bmap->n_eq + bmap->n_ineq); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, 1 + total + 1); - if (ext) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_out)); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_in)); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_div)); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_param)); - } - p = isl_printer_end_line(p); - return print_constraints_polylib(bmap, p); -} - -static __isl_give isl_printer *isl_basic_set_print_polylib( - __isl_keep isl_basic_set *bset, __isl_take isl_printer *p, int ext) -{ - return isl_basic_map_print_polylib((struct isl_basic_map *)bset, p, ext); -} - -static __isl_give isl_printer *isl_map_print_polylib(__isl_keep isl_map *map, - __isl_take isl_printer *p, int ext) -{ - int i; - - p = isl_printer_start_line(p); - p = isl_printer_print_int(p, map->n); - p = isl_printer_end_line(p); - for (i = 0; i < map->n; ++i) { - p = isl_printer_start_line(p); - p = isl_printer_end_line(p); - p = isl_basic_map_print_polylib(map->p[i], p, ext); - } - return p; -} - -static __isl_give isl_printer *isl_set_print_polylib(__isl_keep isl_set *set, - __isl_take isl_printer *p, int ext) -{ - return isl_map_print_polylib((struct isl_map *)set, p, ext); -} - -static int count_same_name(__isl_keep isl_dim *dim, - enum isl_dim_type type, unsigned pos, const char *name) -{ - enum isl_dim_type t; - unsigned p, s; - int count = 0; - - for (t = isl_dim_param; t <= type && t <= isl_dim_out; ++t) { - s = t == type ? pos : isl_dim_size(dim, t); - for (p = 0; p < s; ++p) { - const char *n = isl_dim_get_name(dim, t, p); - if (n && !strcmp(n, name)) - count++; - } - } - return count; -} - -static __isl_give isl_printer *print_name(__isl_keep isl_dim *dim, - __isl_take isl_printer *p, enum isl_dim_type type, unsigned pos, - int set, int latex) -{ - const char *name; - char buffer[20]; - int primes; - - name = type == isl_dim_div ? NULL : isl_dim_get_name(dim, type, pos); - - if (!name) { - const char *prefix; - if (type == isl_dim_param) - prefix = s_param_prefix[latex]; - else if (type == isl_dim_div) - prefix = s_div_prefix[latex]; - else if (set || type == isl_dim_in) - prefix = s_input_prefix[latex]; - else - prefix = s_output_prefix[latex]; - snprintf(buffer, sizeof(buffer), "%s%d", prefix, pos); - name = buffer; - } - primes = count_same_name(dim, name == buffer ? isl_dim_div : type, - pos, name); - p = isl_printer_print_str(p, name); - while (primes-- > 0) - p = isl_printer_print_str(p, "'"); - return p; -} - -static enum isl_dim_type pos2type(__isl_keep isl_dim *dim, unsigned *pos) -{ - enum isl_dim_type type; - unsigned n_in = isl_dim_size(dim, isl_dim_in); - unsigned n_out = isl_dim_size(dim, isl_dim_out); - unsigned nparam = isl_dim_size(dim, isl_dim_param); - - if (*pos < 1 + nparam) { - type = isl_dim_param; - *pos -= 1; - } else if (*pos < 1 + nparam + n_in) { - type = isl_dim_in; - *pos -= 1 + nparam; - } else if (*pos < 1 + nparam + n_in + n_out) { - type = isl_dim_out; - *pos -= 1 + nparam + n_in; - } else { - type = isl_dim_div; - *pos -= 1 + nparam + n_in + n_out; - } - - return type; -} - -static __isl_give isl_printer *print_div(__isl_keep isl_dim *dim, - __isl_keep isl_mat *div, int pos, __isl_take isl_printer *p); - -static __isl_give isl_printer *print_term(__isl_keep isl_dim *dim, - __isl_keep isl_mat *div, - isl_int c, unsigned pos, __isl_take isl_printer *p, int set, int latex) -{ - enum isl_dim_type type; - int print_div_def; - - if (pos == 0) - return isl_printer_print_isl_int(p, c); - - type = pos2type(dim, &pos); - print_div_def = type == isl_dim_div && div && - !isl_int_is_zero(div->row[pos][0]); - - if (isl_int_is_one(c)) - ; - else if (isl_int_is_negone(c)) - p = isl_printer_print_str(p, "-"); - else { - p = isl_printer_print_isl_int(p, c); - if (p->output_format == ISL_FORMAT_C || print_div_def) - p = isl_printer_print_str(p, "*"); - } - if (print_div_def) - p = print_div(dim, div, pos, p); - else - p = print_name(dim, p, type, pos, set, latex); - return p; -} - -static __isl_give isl_printer *print_affine_of_len(__isl_keep isl_dim *dim, - __isl_keep isl_mat *div, - __isl_take isl_printer *p, isl_int *c, int len, int set) -{ - int i; - int first; - - for (i = 0, first = 1; i < len; ++i) { - int flip = 0; - if (isl_int_is_zero(c[i])) - continue; - if (!first) { - if (isl_int_is_neg(c[i])) { - flip = 1; - isl_int_neg(c[i], c[i]); - p = isl_printer_print_str(p, " - "); - } else - p = isl_printer_print_str(p, " + "); - } - first = 0; - p = print_term(dim, div, c[i], i, p, set, 0); - if (flip) - isl_int_neg(c[i], c[i]); - } - if (first) - p = isl_printer_print_str(p, "0"); - return p; -} - -static __isl_give isl_printer *print_affine(__isl_keep isl_basic_map *bmap, - __isl_keep isl_dim *dim, __isl_take isl_printer *p, isl_int *c, int set) -{ - unsigned len = 1 + isl_basic_map_total_dim(bmap); - return print_affine_of_len(dim, NULL, p, c, len, set); -} - -static int defining_equality(__isl_keep isl_basic_map *eq, - __isl_keep isl_dim *dim, enum isl_dim_type type, int pos) -{ - int i; - unsigned total; - - if (!eq) - return -1; - - pos += isl_dim_offset(dim, type); - total = isl_basic_map_total_dim(eq); - - for (i = 0; i < eq->n_eq; ++i) { - if (isl_seq_last_non_zero(eq->eq[i] + 1, total) != pos) - continue; - if (isl_int_is_one(eq->eq[i][1 + pos])) - isl_seq_neg(eq->eq[i], eq->eq[i], 1 + total); - return i; - } - - return -1; -} - -/* offset is the offset of local_dim inside global_type of global_dim. - */ -static __isl_give isl_printer *print_nested_var_list(__isl_take isl_printer *p, - __isl_keep isl_dim *global_dim, enum isl_dim_type global_type, - __isl_keep isl_dim *local_dim, enum isl_dim_type local_type, - int set, int latex, __isl_keep isl_basic_map *eq, int offset) -{ - int i, j; - - if (global_dim != local_dim && local_type == isl_dim_out) - offset += local_dim->n_in; - - for (i = 0; i < isl_dim_size(local_dim, local_type); ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - j = defining_equality(eq, global_dim, global_type, offset + i); - if (j >= 0) { - int pos = 1 + isl_dim_offset(global_dim, global_type) - + offset + i; - p = print_affine_of_len(eq->dim, NULL, - p, eq->eq[j], pos, set); - } else { - p = print_name(global_dim, p, global_type, offset + i, - set, latex); - } - } - return p; -} - -static __isl_give isl_printer *print_var_list(__isl_keep isl_dim *dim, - __isl_take isl_printer *p, enum isl_dim_type type, - int set, int latex, __isl_keep isl_basic_map *eq) -{ - return print_nested_var_list(p, dim, type, dim, type, set, latex, eq, 0); -} - -static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p, - __isl_keep isl_dim *global_dim, enum isl_dim_type global_type, - __isl_keep isl_dim *local_dim, - int set, int latex, __isl_keep isl_basic_map *eq, int offset); - -static __isl_give isl_printer *print_nested_tuple(__isl_take isl_printer *p, - __isl_keep isl_dim *global_dim, enum isl_dim_type global_type, - __isl_keep isl_dim *local_dim, enum isl_dim_type local_type, - int set, int latex, __isl_keep isl_basic_map *eq, int offset) -{ - const char *name = NULL; - unsigned n = isl_dim_size(local_dim, local_type); - if ((local_type == isl_dim_in || local_type == isl_dim_out)) { - name = isl_dim_get_tuple_name(local_dim, local_type); - if (name) { - if (latex) - p = isl_printer_print_str(p, "\\mathrm{"); - p = isl_printer_print_str(p, name); - if (latex) - p = isl_printer_print_str(p, "}"); - } - } - if (!latex || n != 1 || name) - p = isl_printer_print_str(p, s_open_list[latex]); - if ((local_type == isl_dim_in || local_type == isl_dim_out) && - local_dim->nested[local_type - isl_dim_in]) { - if (global_dim != local_dim && local_type == isl_dim_out) - offset += local_dim->n_in; - p = print_nested_map_dim(p, global_dim, global_type, - local_dim->nested[local_type - isl_dim_in], - set, latex, eq, offset); - } else - p = print_nested_var_list(p, global_dim, global_type, - local_dim, local_type, set, latex, eq, offset); - if (!latex || n != 1 || name) - p = isl_printer_print_str(p, s_close_list[latex]); - return p; -} - -static __isl_give isl_printer *print_tuple(__isl_keep isl_dim *dim, - __isl_take isl_printer *p, enum isl_dim_type type, - int set, int latex, __isl_keep isl_basic_map *eq) -{ - return print_nested_tuple(p, dim, type, dim, type, set, latex, eq, 0); -} - -static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p, - __isl_keep isl_dim *global_dim, enum isl_dim_type global_type, - __isl_keep isl_dim *local_dim, - int set, int latex, __isl_keep isl_basic_map *eq, int offset) -{ - p = print_nested_tuple(p, global_dim, global_type, - local_dim, isl_dim_in, set, latex, eq, offset); - p = isl_printer_print_str(p, s_to[latex]); - p = print_nested_tuple(p, global_dim, global_type, - local_dim, isl_dim_out, set, latex, eq, offset); - - return p; -} - -static __isl_give isl_printer *print_dim(__isl_keep isl_dim *dim, - __isl_take isl_printer *p, int set, int latex, int rational, - __isl_keep isl_basic_map *eq) -{ - if (rational && !latex) - p = isl_printer_print_str(p, "rat: "); - if (set) - p = print_tuple(dim, p, isl_dim_set, 1, latex, eq); - else { - p = print_tuple(dim, p, isl_dim_in, 0, latex, eq); - p = isl_printer_print_str(p, s_to[latex]); - p = print_tuple(dim, p, isl_dim_out, 0, latex, eq); - } - - return p; -} - -static __isl_give isl_printer *print_omega_parameters(__isl_keep isl_dim *dim, - __isl_take isl_printer *p) -{ - if (isl_dim_size(dim, isl_dim_param) == 0) - return p; - - p = isl_printer_start_line(p); - p = isl_printer_print_str(p, "symbolic "); - p = print_var_list(dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, ";"); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *print_constraint(struct isl_basic_map *bmap, - __isl_keep isl_dim *dim, __isl_take isl_printer *p, - isl_int *c, int last, const char *op, int first_constraint, int set, - int latex) -{ - if (!first_constraint) - p = isl_printer_print_str(p, s_and[latex]); - - isl_int_abs(c[last], c[last]); - - p = print_term(dim, NULL, c[last], last, p, set, latex); - - p = isl_printer_print_str(p, " "); - p = isl_printer_print_str(p, op); - p = isl_printer_print_str(p, " "); - - isl_int_set_si(c[last], 0); - p = print_affine(bmap, dim, p, c, set); - - return p; -} - -static __isl_give isl_printer *print_constraints(__isl_keep isl_basic_map *bmap, - __isl_keep isl_dim *dim, __isl_take isl_printer *p, int set, int latex) -{ - int i; - struct isl_vec *c; - unsigned total = isl_basic_map_total_dim(bmap); - - c = isl_vec_alloc(bmap->ctx, 1 + total); - if (!c) - goto error; - - for (i = bmap->n_eq - 1; i >= 0; --i) { - int l = isl_seq_last_non_zero(bmap->eq[i], 1 + total); - if (l < 0) { - if (i != bmap->n_eq - 1) - p = isl_printer_print_str(p, s_and[latex]); - p = isl_printer_print_str(p, "0 = 0"); - continue; - } - if (isl_int_is_neg(bmap->eq[i][l])) - isl_seq_cpy(c->el, bmap->eq[i], 1 + total); - else - isl_seq_neg(c->el, bmap->eq[i], 1 + total); - p = print_constraint(bmap, dim, p, c->el, l, - "=", i == bmap->n_eq - 1, set, latex); - } - for (i = 0; i < bmap->n_ineq; ++i) { - int l = isl_seq_last_non_zero(bmap->ineq[i], 1 + total); - int s; - const char *op; - if (l < 0) - continue; - s = isl_int_sgn(bmap->ineq[i][l]); - if (s < 0) - isl_seq_cpy(c->el, bmap->ineq[i], 1 + total); - else - isl_seq_neg(c->el, bmap->ineq[i], 1 + total); - op = s < 0 ? s_le[latex] : s_ge[latex]; - p = print_constraint(bmap, dim, p, c->el, l, - op, !bmap->n_eq && !i, set, latex); - } - - isl_vec_free(c); - - return p; -error: - isl_vec_free(c); - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_omega_constraints( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, int set) -{ - if (bmap->n_eq + bmap->n_ineq == 0) - return p; - - p = isl_printer_print_str(p, ": "); - if (bmap->n_div > 0) { - int i; - p = isl_printer_print_str(p, "exists ("); - for (i = 0; i < bmap->n_div; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_name(bmap->dim, p, isl_dim_div, i, 0, 0); - } - p = isl_printer_print_str(p, ": "); - } - p = print_constraints(bmap, bmap->dim, p, set, 0); - if (bmap->n_div > 0) - p = isl_printer_print_str(p, ")"); - return p; -} - -static __isl_give isl_printer *basic_map_print_omega( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p) -{ - p = isl_printer_print_str(p, "{ ["); - p = print_var_list(bmap->dim, p, isl_dim_in, 0, 0, NULL); - p = isl_printer_print_str(p, "] -> ["); - p = print_var_list(bmap->dim, p, isl_dim_out, 0, 0, NULL); - p = isl_printer_print_str(p, "] "); - p = print_omega_constraints(bmap, p, 0); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *isl_basic_map_print_omega( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p) -{ - p = print_omega_parameters(bmap->dim, p); - - p = isl_printer_start_line(p); - p = basic_map_print_omega(bmap, p); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *basic_set_print_omega( - __isl_keep isl_basic_set *bset, __isl_take isl_printer *p) -{ - p = isl_printer_print_str(p, "{ ["); - p = print_var_list(bset->dim, p, isl_dim_set, 1, 0, NULL); - p = isl_printer_print_str(p, "] "); - p = print_omega_constraints((isl_basic_map *)bset, p, 1); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *isl_basic_set_print_omega( - __isl_keep isl_basic_set *bset, __isl_take isl_printer *p) -{ - p = print_omega_parameters(bset->dim, p); - - p = isl_printer_start_line(p); - p = basic_set_print_omega(bset, p); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *isl_map_print_omega(__isl_keep isl_map *map, - __isl_take isl_printer *p) -{ - int i; - - p = print_omega_parameters(map->dim, p); - - p = isl_printer_start_line(p); - for (i = 0; i < map->n; ++i) { - if (i) - p = isl_printer_print_str(p, " union "); - p = basic_map_print_omega(map->p[i], p); - } - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *isl_set_print_omega(__isl_keep isl_set *set, - __isl_take isl_printer *p) -{ - int i; - - p = print_omega_parameters(set->dim, p); - - p = isl_printer_start_line(p); - for (i = 0; i < set->n; ++i) { - if (i) - p = isl_printer_print_str(p, " union "); - p = basic_set_print_omega(set->p[i], p); - } - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *print_disjunct(__isl_keep isl_basic_map *bmap, - __isl_keep isl_dim *dim, __isl_take isl_printer *p, int set, int latex) -{ - if (bmap->n_div > 0) { - int i; - p = isl_printer_print_str(p, s_open_exists[latex]); - for (i = 0; i < bmap->n_div; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_name(dim, p, isl_dim_div, i, 0, latex); - if (latex || isl_int_is_zero(bmap->div[i][0])) - continue; - p = isl_printer_print_str(p, " = [("); - p = print_affine(bmap, dim, p, bmap->div[i] + 1, set); - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, bmap->div[i][0]); - p = isl_printer_print_str(p, "]"); - } - p = isl_printer_print_str(p, ": "); - } - - p = print_constraints(bmap, dim, p, set, latex); - - if (bmap->n_div > 0) - p = isl_printer_print_str(p, s_close_exists[latex]); - return p; -} - -static __isl_give isl_printer *isl_basic_map_print_isl( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, - int set, int latex) -{ - int rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - if (isl_basic_map_dim(bmap, isl_dim_param) > 0) { - p = print_tuple(bmap->dim, p, isl_dim_param, 0, latex, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_dim(bmap->dim, p, set, latex, rational, NULL); - p = isl_printer_print_str(p, " : "); - p = print_disjunct(bmap, bmap->dim, p, set, latex); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *print_disjuncts(__isl_keep isl_map *map, - __isl_take isl_printer *p, int set, int latex) -{ - int i; - - if (isl_map_plain_is_universe(map)) - return p; - - p = isl_printer_print_str(p, s_such_that[latex]); - if (map->n == 0) - p = isl_printer_print_str(p, "1 = 0"); - for (i = 0; i < map->n; ++i) { - if (i) - p = isl_printer_print_str(p, s_or[latex]); - if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1) - p = isl_printer_print_str(p, "("); - p = print_disjunct(map->p[i], map->dim, p, set, latex); - if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1) - p = isl_printer_print_str(p, ")"); - } - return p; -} - -struct isl_aff_split { - isl_basic_map *aff; - isl_map *map; -}; - -static void free_split(__isl_take struct isl_aff_split *split, int n) -{ - int i; - - if (!split) - return; - - for (i = 0; i < n; ++i) { - isl_basic_map_free(split[i].aff); - isl_map_free(split[i].map); - } - - free(split); -} - -static __isl_give isl_basic_map *get_aff(__isl_take isl_basic_map *bmap) -{ - int i, j; - unsigned nparam, n_in, n_out, total; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - if (isl_basic_map_free_inequality(bmap, bmap->n_ineq) < 0) - goto error; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - total = isl_basic_map_dim(bmap, isl_dim_all); - for (i = bmap->n_eq - 1; i >= 0; --i) { - j = isl_seq_last_non_zero(bmap->eq[i] + 1, total); - if (j >= nparam && j < nparam + n_in + n_out && - (isl_int_is_one(bmap->eq[i][1 + j]) || - isl_int_is_negone(bmap->eq[i][1 + j]))) - continue; - if (isl_basic_map_drop_equality(bmap, i) < 0) - goto error; - } - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static int aff_split_cmp(const void *p1, const void *p2) -{ - const struct isl_aff_split *s1, *s2; - s1 = (const struct isl_aff_split *) p1; - s2 = (const struct isl_aff_split *) p2; - - return isl_basic_map_plain_cmp(s1->aff, s2->aff); -} - -static __isl_give isl_basic_map *drop_aff(__isl_take isl_basic_map *bmap, - __isl_keep isl_basic_map *aff) -{ - int i, j; - unsigned total; - - if (!bmap || !aff) - goto error; - - total = isl_dim_total(bmap->dim); - - for (i = bmap->n_eq - 1; i >= 0; --i) { - if (isl_seq_first_non_zero(bmap->eq[i] + 1 + total, - bmap->n_div) != -1) - continue; - for (j = 0; j < aff->n_eq; ++j) { - if (!isl_seq_eq(bmap->eq[i], aff->eq[j], 1 + total) && - !isl_seq_is_neg(bmap->eq[i], aff->eq[j], 1 + total)) - continue; - if (isl_basic_map_drop_equality(bmap, i) < 0) - goto error; - break; - } - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give struct isl_aff_split *split_aff(__isl_keep isl_map *map) -{ - int i, n; - struct isl_aff_split *split; - isl_ctx *ctx; - - ctx = isl_map_get_ctx(map); - split = isl_calloc_array(ctx, struct isl_aff_split, map->n); - if (!split) - return NULL; - - for (i = 0; i < map->n; ++i) { - isl_basic_map *bmap; - split[i].aff = get_aff(isl_basic_map_copy(map->p[i])); - bmap = isl_basic_map_copy(map->p[i]); - bmap = isl_basic_map_cow(bmap); - bmap = drop_aff(bmap, split[i].aff); - split[i].map = isl_map_from_basic_map(bmap); - if (!split[i].aff || !split[i].map) - goto error; - } - - qsort(split, map->n, sizeof(struct isl_aff_split), &aff_split_cmp); - - n = map->n; - for (i = n - 1; i >= 1; --i) { - if (!isl_basic_map_plain_is_equal(split[i - 1].aff, - split[i].aff)) - continue; - isl_basic_map_free(split[i].aff); - split[i - 1].map = isl_map_union(split[i - 1].map, - split[i].map); - if (i != n - 1) - split[i] = split[n - 1]; - split[n - 1].aff = NULL; - split[n - 1].map = NULL; - --n; - } - - return split; -error: - free_split(split, map->n); - return NULL; -} - -static __isl_give isl_printer *print_split_map(__isl_take isl_printer *p, - struct isl_aff_split *split, int n, int set) -{ - int i; - int rational; - - for (i = 0; i < n; ++i) { - isl_dim *dim; - - if (!split[i].map) - break; - dim = split[i].map->dim; - rational = split[i].map->n > 0 && - ISL_F_ISSET(split[i].map->p[0], ISL_BASIC_MAP_RATIONAL); - if (i) - p = isl_printer_print_str(p, "; "); - p = print_dim(dim, p, set, 0, rational, split[i].aff); - p = print_disjuncts(split[i].map, p, set, 0); - } - - return p; -} - -static __isl_give isl_printer *isl_map_print_isl_body(__isl_keep isl_map *map, - __isl_take isl_printer *p, int set) -{ - struct isl_aff_split *split = NULL; - int rational; - - if (map->n > 0) - split = split_aff(map); - if (split) { - p = print_split_map(p, split, map->n, set); - } else { - rational = map->n > 0 && - ISL_F_ISSET(map->p[0], ISL_BASIC_MAP_RATIONAL); - p = print_dim(map->dim, p, set, 0, rational, NULL); - p = print_disjuncts(map, p, set, 0); - } - free_split(split, map->n); - return p; -} - -static __isl_give isl_printer *isl_map_print_isl(__isl_keep isl_map *map, - __isl_take isl_printer *p, int set) -{ - if (isl_map_dim(map, isl_dim_param) > 0) { - p = print_tuple(map->dim, p, isl_dim_param, set, 0, NULL); - p = isl_printer_print_str(p, s_to[0]); - } - p = isl_printer_print_str(p, s_open_set[0]); - p = isl_map_print_isl_body(map, p, set); - p = isl_printer_print_str(p, s_close_set[0]); - return p; -} - -static __isl_give isl_printer *print_latex_map(__isl_keep isl_map *map, - __isl_take isl_printer *p, __isl_keep isl_basic_map *aff, int set) -{ - if (isl_map_dim(map, isl_dim_param) > 0) { - p = print_tuple(map->dim, p, isl_dim_param, set, 1, NULL); - p = isl_printer_print_str(p, s_to[1]); - } - p = isl_printer_print_str(p, s_open_set[1]); - p = print_dim(map->dim, p, set, 1, 0, aff); - p = print_disjuncts(map, p, set, 1); - p = isl_printer_print_str(p, s_close_set[1]); - - return p; -} - -static __isl_give isl_printer *isl_map_print_latex(__isl_keep isl_map *map, - __isl_take isl_printer *p, int set) -{ - int i; - struct isl_aff_split *split = NULL; - - if (map->n > 0) - split = split_aff(map); - - if (!split) - return print_latex_map(map, p, NULL, set); - - for (i = 0; i < map->n; ++i) { - if (!split[i].map) - break; - if (i) - p = isl_printer_print_str(p, " \\cup "); - p = print_latex_map(split[i].map, p, split[i].aff, set); - } - - free_split(split, map->n); - return p; -} - -__isl_give isl_printer *isl_printer_print_basic_map(__isl_take isl_printer *p, - __isl_keep isl_basic_map *bmap) -{ - if (!p || !bmap) - goto error; - if (p->output_format == ISL_FORMAT_ISL) - return isl_basic_map_print_isl(bmap, p, 0, 0); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_basic_map_print_omega(bmap, p); - isl_assert(bmap->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_basic_map_print(__isl_keep isl_basic_map *bmap, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format) -{ - isl_printer *printer; - - if (!bmap) - return; - - printer = isl_printer_to_file(bmap->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_prefix(printer, prefix); - printer = isl_printer_set_suffix(printer, suffix); - printer = isl_printer_set_output_format(printer, output_format); - isl_printer_print_basic_map(printer, bmap); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_basic_set(__isl_take isl_printer *p, - __isl_keep isl_basic_set *bset) -{ - if (!p || !bset) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_basic_map_print_isl(bset, p, 1, 0); - else if (p->output_format == ISL_FORMAT_POLYLIB) - return isl_basic_set_print_polylib(bset, p, 0); - else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) - return isl_basic_set_print_polylib(bset, p, 1); - else if (p->output_format == ISL_FORMAT_POLYLIB_CONSTRAINTS) - return bset_print_constraints_polylib(bset, p); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_basic_set_print_omega(bset, p); - isl_assert(p->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_basic_set_print(struct isl_basic_set *bset, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format) -{ - isl_printer *printer; - - if (!bset) - return; - - printer = isl_printer_to_file(bset->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_prefix(printer, prefix); - printer = isl_printer_set_suffix(printer, suffix); - printer = isl_printer_set_output_format(printer, output_format); - isl_printer_print_basic_set(printer, bset); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *p, - __isl_keep isl_set *set) -{ - if (!p || !set) - goto error; - if (p->output_format == ISL_FORMAT_ISL) - return isl_map_print_isl((isl_map *)set, p, 1); - else if (p->output_format == ISL_FORMAT_POLYLIB) - return isl_set_print_polylib(set, p, 0); - else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) - return isl_set_print_polylib(set, p, 1); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_set_print_omega(set, p); - else if (p->output_format == ISL_FORMAT_LATEX) - return isl_map_print_latex((isl_map *)set, p, 1); - isl_assert(set->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_set_print(struct isl_set *set, FILE *out, int indent, - unsigned output_format) -{ - isl_printer *printer; - - if (!set) - return; - - printer = isl_printer_to_file(set->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_output_format(printer, output_format); - printer = isl_printer_print_set(printer, set); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *p, - __isl_keep isl_map *map) -{ - if (!p || !map) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_map_print_isl(map, p, 0); - else if (p->output_format == ISL_FORMAT_POLYLIB) - return isl_map_print_polylib(map, p, 0); - else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) - return isl_map_print_polylib(map, p, 1); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_map_print_omega(map, p); - else if (p->output_format == ISL_FORMAT_LATEX) - return isl_map_print_latex(map, p, 0); - isl_assert(map->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -struct isl_union_print_data { - isl_printer *p; - int set; - int first; -}; - -static int print_map_body(__isl_take isl_map *map, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, "; "); - data->first = 0; - - data->p = isl_map_print_isl_body(map, data->p, data->set); - isl_map_free(map); - - return 0; -} - -static __isl_give isl_printer *isl_union_map_print_isl( - __isl_keep isl_union_map *umap, __isl_take isl_printer *p, int set) -{ - struct isl_union_print_data data = { p, set, 1 }; - isl_dim *dim; - dim = isl_union_map_get_dim(umap); - if (isl_dim_size(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, set, 0, NULL); - p = isl_printer_print_str(p, s_to[0]); - } - isl_dim_free(dim); - p = isl_printer_print_str(p, s_open_set[0]); - isl_union_map_foreach_map(umap, &print_map_body, &data); - p = data.p; - p = isl_printer_print_str(p, s_close_set[0]); - return p; -} - -static int print_latex_map_body(__isl_take isl_map *map, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, " \\cup "); - data->first = 0; - - data->p = isl_map_print_latex(map, data->p, data->set); - isl_map_free(map); - - return 0; -} - -static __isl_give isl_printer *isl_union_map_print_latex( - __isl_keep isl_union_map *umap, __isl_take isl_printer *p, int set) -{ - struct isl_union_print_data data = { p, set, 1 }; - isl_union_map_foreach_map(umap, &print_latex_map_body, &data); - p = data.p; - return p; -} - -__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p, - __isl_keep isl_union_map *umap) -{ - if (!p || !umap) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_union_map_print_isl(umap, p, 0); - if (p->output_format == ISL_FORMAT_LATEX) - return isl_union_map_print_latex(umap, p, 0); - - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_map", goto error); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p, - __isl_keep isl_union_set *uset) -{ - if (!p || !uset) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_union_map_print_isl((isl_union_map *)uset, p, 1); - if (p->output_format == ISL_FORMAT_LATEX) - return isl_union_map_print_latex((isl_union_map *)uset, p, 1); - - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_set", goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_map_print(__isl_keep isl_map *map, FILE *out, int indent, - unsigned output_format) -{ - isl_printer *printer; - - if (!map) - return; - - printer = isl_printer_to_file(map->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_output_format(printer, output_format); - printer = isl_printer_print_map(printer, map); - - isl_printer_free(printer); -} - -void isl_basic_map_dump(__isl_keep isl_basic_map *bmap) -{ - isl_printer *printer; - - if (!bmap) - return; - - printer = isl_printer_to_file(isl_basic_map_get_ctx(bmap), stderr); - printer = isl_printer_print_basic_map(printer, bmap); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_basic_set_dump(__isl_keep isl_basic_set *bset) -{ - isl_printer *printer; - - if (!bset) - return; - - printer = isl_printer_to_file(isl_basic_set_get_ctx(bset), stderr); - printer = isl_printer_print_basic_set(printer, bset); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_map_dump(__isl_keep isl_map *map) -{ - isl_printer *printer; - - if (!map) - return; - - printer = isl_printer_to_file(isl_map_get_ctx(map), stderr); - printer = isl_printer_print_map(printer, map); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_set_dump(__isl_keep isl_set *set) -{ - isl_printer *printer; - - if (!set) - return; - - printer = isl_printer_to_file(isl_set_get_ctx(set), stderr); - printer = isl_printer_print_set(printer, set); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_union_map_dump(__isl_keep isl_union_map *umap) -{ - isl_printer *printer; - - if (!umap) - return; - - printer = isl_printer_to_file(isl_union_map_get_ctx(umap), stderr); - printer = isl_printer_print_union_map(printer, umap); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_union_set_dump(__isl_keep isl_union_set *uset) -{ - isl_printer *printer; - - if (!uset) - return; - - printer = isl_printer_to_file(isl_union_set_get_ctx(uset), stderr); - printer = isl_printer_print_union_set(printer, uset); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_union_pw_qpolynomial_dump(__isl_keep isl_union_pw_qpolynomial *upwqp) -{ - isl_printer *printer; - - if (!upwqp) - return; - - printer = isl_printer_to_file(isl_union_pw_qpolynomial_get_ctx(upwqp), - stderr); - printer = isl_printer_print_union_pw_qpolynomial(printer, upwqp); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_qpolynomial_dump(__isl_keep isl_qpolynomial *qp) -{ - isl_printer *printer; - - if (!qp) - return; - - printer = isl_printer_to_file(isl_qpolynomial_get_ctx(qp), stderr); - printer = isl_printer_print_qpolynomial(printer, qp); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold *fold) -{ - isl_printer *printer; - - if (!fold) - return; - - printer = isl_printer_to_file(isl_qpolynomial_fold_get_ctx(fold), - stderr); - printer = isl_printer_print_qpolynomial_fold(printer, fold); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial *pwqp) -{ - isl_printer *printer; - - if (!pwqp) - return; - - printer = isl_printer_to_file(isl_pw_qpolynomial_get_ctx(pwqp), stderr); - printer = isl_printer_print_pw_qpolynomial(printer, pwqp); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold *pwf) -{ - isl_printer *printer; - - if (!pwf) - return; - - printer = isl_printer_to_file( - isl_pw_qpolynomial_fold_get_ctx(pwf), stderr); - printer = isl_printer_print_pw_qpolynomial_fold(printer, pwf); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -void isl_union_pw_qpolynomial_fold_dump( - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - isl_printer *printer; - - if (!upwf) - return; - - printer = isl_printer_to_file( - isl_union_pw_qpolynomial_fold_get_ctx(upwf), stderr); - printer = isl_printer_print_union_pw_qpolynomial_fold(printer, upwf); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -static int upoly_rec_n_non_zero(__isl_keep struct isl_upoly_rec *rec) -{ - int i; - int n; - - for (i = 0, n = 0; i < rec->n; ++i) - if (!isl_upoly_is_zero(rec->p[i])) - ++n; - - return n; -} - -static __isl_give isl_printer *print_div(__isl_keep isl_dim *dim, - __isl_keep isl_mat *div, int pos, __isl_take isl_printer *p) -{ - int c = p->output_format == ISL_FORMAT_C; - p = isl_printer_print_str(p, c ? "floord(" : "[("); - p = print_affine_of_len(dim, div, p, - div->row[pos] + 1, div->n_col - 1, 1); - p = isl_printer_print_str(p, c ? ", " : ")/"); - p = isl_printer_print_isl_int(p, div->row[pos][0]); - p = isl_printer_print_str(p, c ? ")" : "]"); - return p; -} - -static __isl_give isl_printer *upoly_print_cst(__isl_keep struct isl_upoly *up, - __isl_take isl_printer *p, int first) -{ - struct isl_upoly_cst *cst; - int neg; - - cst = isl_upoly_as_cst(up); - if (!cst) - goto error; - neg = !first && isl_int_is_neg(cst->n); - if (!first) - p = isl_printer_print_str(p, neg ? " - " : " + "); - if (neg) - isl_int_neg(cst->n, cst->n); - if (isl_int_is_zero(cst->d)) { - int sgn = isl_int_sgn(cst->n); - p = isl_printer_print_str(p, sgn < 0 ? "-infty" : - sgn == 0 ? "NaN" : "infty"); - } else - p = isl_printer_print_isl_int(p, cst->n); - if (neg) - isl_int_neg(cst->n, cst->n); - if (!isl_int_is_zero(cst->d) && !isl_int_is_one(cst->d)) { - p = isl_printer_print_str(p, "/"); - p = isl_printer_print_isl_int(p, cst->d); - } - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_base(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_mat *div, int var) -{ - unsigned total; - - total = isl_dim_total(dim); - if (var < total) - p = print_term(dim, NULL, dim->ctx->one, 1 + var, p, 1, 0); - else - p = print_div(dim, div, var - total, p); - return p; -} - -static __isl_give isl_printer *print_pow(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_mat *div, int var, int exp) -{ - p = print_base(p, dim, div, var); - if (exp == 1) - return p; - if (p->output_format == ISL_FORMAT_C) { - int i; - for (i = 1; i < exp; ++i) { - p = isl_printer_print_str(p, "*"); - p = print_base(p, dim, div, var); - } - } else { - p = isl_printer_print_str(p, "^"); - p = isl_printer_print_int(p, exp); - } - return p; -} - -static __isl_give isl_printer *upoly_print(__isl_keep struct isl_upoly *up, - __isl_keep isl_dim *dim, __isl_keep isl_mat *div, - __isl_take isl_printer *p, int outer) -{ - int i, n, first, print_parens; - struct isl_upoly_rec *rec; - - if (!p || !up || !dim || !div) - goto error; - - if (isl_upoly_is_cst(up)) - return upoly_print_cst(up, p, 1); - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - n = upoly_rec_n_non_zero(rec); - print_parens = n > 1 || (outer && rec->up.var >= isl_dim_total(dim)); - if (print_parens) - p = isl_printer_print_str(p, "("); - for (i = 0, first = 1; i < rec->n; ++i) { - if (isl_upoly_is_zero(rec->p[i])) - continue; - if (isl_upoly_is_negone(rec->p[i])) { - if (!i) - p = isl_printer_print_str(p, "-1"); - else if (first) - p = isl_printer_print_str(p, "-"); - else - p = isl_printer_print_str(p, " - "); - } else if (isl_upoly_is_cst(rec->p[i]) && - !isl_upoly_is_one(rec->p[i])) - p = upoly_print_cst(rec->p[i], p, first); - else { - if (!first) - p = isl_printer_print_str(p, " + "); - if (i == 0 || !isl_upoly_is_one(rec->p[i])) - p = upoly_print(rec->p[i], dim, div, p, 0); - } - first = 0; - if (i == 0) - continue; - if (!isl_upoly_is_one(rec->p[i]) && - !isl_upoly_is_negone(rec->p[i])) - p = isl_printer_print_str(p, " * "); - p = print_pow(p, dim, div, rec->up.var, i); - } - if (print_parens) - p = isl_printer_print_str(p, ")"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial(__isl_take isl_printer *p, - __isl_keep isl_qpolynomial *qp) -{ - if (!p || !qp) - goto error; - p = upoly_print(qp->upoly, qp->dim, qp->div, p, 1); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial_isl(__isl_take isl_printer *p, - __isl_keep isl_qpolynomial *qp) -{ - if (!p || !qp) - goto error; - - if (isl_dim_size(qp->dim, isl_dim_param) > 0) { - p = print_tuple(qp->dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - if (isl_dim_size(qp->dim, isl_dim_set) > 0 || - isl_dim_is_named_or_nested(qp->dim, isl_dim_set)) { - p = print_dim(qp->dim, p, 1, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = print_qpolynomial(p, qp); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_qpolynomial *qp) -{ - isl_int den; - - isl_int_init(den); - isl_qpolynomial_get_den(qp, &den); - if (!isl_int_is_one(den)) { - isl_qpolynomial *f; - p = isl_printer_print_str(p, "("); - qp = isl_qpolynomial_copy(qp); - f = isl_qpolynomial_rat_cst(isl_dim_copy(qp->dim), - den, qp->dim->ctx->one); - qp = isl_qpolynomial_mul(qp, f); - } - if (qp) - p = upoly_print(qp->upoly, dim, qp->div, p, 0); - if (!isl_int_is_one(den)) { - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, den); - isl_qpolynomial_free(qp); - } - isl_int_clear(den); - return p; -} - -__isl_give isl_printer *isl_printer_print_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp) -{ - if (!p || !qp) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_qpolynomial_isl(p, qp); - else if (p->output_format == ISL_FORMAT_C) - return print_qpolynomial_c(p, qp->dim, qp); - else - isl_die(qp->dim->ctx, isl_error_unsupported, - "output format not supported for isl_qpolynomials", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out, - unsigned output_format) -{ - isl_printer *p; - - if (!qp) - return; - - isl_assert(qp->dim->ctx, output_format == ISL_FORMAT_ISL, return); - p = isl_printer_to_file(qp->dim->ctx, out); - p = isl_printer_print_qpolynomial(p, qp); - isl_printer_free(p); -} - -static __isl_give isl_printer *qpolynomial_fold_print( - __isl_keep isl_qpolynomial_fold *fold, __isl_take isl_printer *p) -{ - int i; - - if (fold->type == isl_fold_min) - p = isl_printer_print_str(p, "min"); - else if (fold->type == isl_fold_max) - p = isl_printer_print_str(p, "max"); - p = isl_printer_print_str(p, "("); - for (i = 0; i < fold->n; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_qpolynomial(p, fold->qp[i]); - } - p = isl_printer_print_str(p, ")"); - return p; -} - -void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, - FILE *out, unsigned output_format) -{ - isl_printer *p; - - if (!fold) - return; - - isl_assert(fold->dim->ctx, output_format == ISL_FORMAT_ISL, return); - - p = isl_printer_to_file(fold->dim->ctx, out); - p = isl_printer_print_qpolynomial_fold(p, fold); - - isl_printer_free(p); -} - -static __isl_give isl_printer *isl_pwqp_print_isl_body( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - int i = 0; - - for (i = 0; i < pwqp->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - if (isl_dim_size(pwqp->dim, isl_dim_set) > 0 || - isl_dim_is_named_or_nested(pwqp->dim, isl_dim_set)) { - p = print_dim(pwqp->p[i].set->dim, p, 1, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = print_qpolynomial(p, pwqp->p[i].qp); - p = print_disjuncts((isl_map *)pwqp->p[i].set, p, 1, 0); - } - - return p; -} - -static __isl_give isl_printer *print_pw_qpolynomial_isl( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - if (!p || !pwqp) - goto error; - - if (isl_dim_size(pwqp->dim, isl_dim_param) > 0) { - p = print_tuple(pwqp->dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - if (pwqp->n == 0) { - if (isl_dim_size(pwqp->dim, isl_dim_set) > 0 || - isl_dim_is_named_or_nested(pwqp->dim, isl_dim_set)) { - p = print_dim(pwqp->dim, p, 1, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "0"); - } - p = isl_pwqp_print_isl_body(p, pwqp); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out, - unsigned output_format) -{ - isl_printer *p; - - if (!pwqp) - return; - - p = isl_printer_to_file(pwqp->dim->ctx, out); - p = isl_printer_set_output_format(p, output_format); - p = isl_printer_print_pw_qpolynomial(p, pwqp); - - isl_printer_free(p); -} - -static __isl_give isl_printer *isl_pwf_print_isl_body( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - int i = 0; - - for (i = 0; i < pwf->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - if (isl_dim_size(pwf->dim, isl_dim_set) > 0 || - isl_dim_is_named_or_nested(pwf->dim, isl_dim_set)) { - p = print_dim(pwf->p[i].set->dim, p, 1, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = qpolynomial_fold_print(pwf->p[i].fold, p); - p = print_disjuncts((isl_map *)pwf->p[i].set, p, 1, 0); - } - - return p; -} - -static __isl_give isl_printer *print_pw_qpolynomial_fold_isl( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - if (isl_dim_size(pwf->dim, isl_dim_param) > 0) { - p = print_tuple(pwf->dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - if (pwf->n == 0) { - if (isl_dim_size(pwf->dim, isl_dim_set) > 0 || - isl_dim_is_named_or_nested(pwf->dim, isl_dim_set)) { - p = print_dim(pwf->dim, p, 1, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "0"); - } - p = isl_pwf_print_isl_body(p, pwf); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *print_affine_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_basic_set *bset, isl_int *c); - -static __isl_give isl_printer *print_name_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, - __isl_keep isl_basic_set *bset, enum isl_dim_type type, unsigned pos) -{ - if (type == isl_dim_div) { - p = isl_printer_print_str(p, "floord("); - p = print_affine_c(p, dim, bset, bset->div[pos] + 1); - p = isl_printer_print_str(p, ", "); - p = isl_printer_print_isl_int(p, bset->div[pos][0]); - p = isl_printer_print_str(p, ")"); - } else { - const char *name; - - name = isl_dim_get_name(dim, type, pos); - if (!name) - name = "UNNAMED"; - p = isl_printer_print_str(p, name); - } - return p; -} - -static __isl_give isl_printer *print_term_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, - __isl_keep isl_basic_set *bset, isl_int c, unsigned pos) -{ - enum isl_dim_type type; - - if (pos == 0) - return isl_printer_print_isl_int(p, c); - - if (isl_int_is_one(c)) - ; - else if (isl_int_is_negone(c)) - p = isl_printer_print_str(p, "-"); - else { - p = isl_printer_print_isl_int(p, c); - p = isl_printer_print_str(p, "*"); - } - type = pos2type(dim, &pos); - p = print_name_c(p, dim, bset, type, pos); - return p; -} - -static __isl_give isl_printer *print_partial_affine_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, - __isl_keep isl_basic_set *bset, isl_int *c, unsigned len) -{ - int i; - int first; - - for (i = 0, first = 1; i < len; ++i) { - int flip = 0; - if (isl_int_is_zero(c[i])) - continue; - if (!first) { - if (isl_int_is_neg(c[i])) { - flip = 1; - isl_int_neg(c[i], c[i]); - p = isl_printer_print_str(p, " - "); - } else - p = isl_printer_print_str(p, " + "); - } - first = 0; - p = print_term_c(p, dim, bset, c[i], i); - if (flip) - isl_int_neg(c[i], c[i]); - } - if (first) - p = isl_printer_print_str(p, "0"); - return p; -} - -static __isl_give isl_printer *print_affine_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_basic_set *bset, isl_int *c) -{ - unsigned len = 1 + isl_basic_set_total_dim(bset); - return print_partial_affine_c(p, dim, bset, c, len); -} - -static __isl_give isl_printer *print_constraint_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, - __isl_keep isl_basic_set *bset, isl_int *c, const char *op, int first) -{ - if (!first) - p = isl_printer_print_str(p, " && "); - - p = print_affine_c(p, dim, bset, c); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_str(p, op); - p = isl_printer_print_str(p, " 0"); - return p; -} - -static __isl_give isl_printer *print_basic_set_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_basic_set *bset) -{ - int i, j; - unsigned n_div = isl_basic_set_dim(bset, isl_dim_div); - unsigned total = isl_basic_set_total_dim(bset) - n_div; - - for (i = 0; i < bset->n_eq; ++i) { - j = isl_seq_last_non_zero(bset->eq[i] + 1 + total, n_div); - if (j < 0) - p = print_constraint_c(p, dim, bset, - bset->eq[i], "==", !i); - else { - if (i) - p = isl_printer_print_str(p, " && "); - p = isl_printer_print_str(p, "("); - p = print_partial_affine_c(p, dim, bset, bset->eq[i], - 1 + total + j); - p = isl_printer_print_str(p, ") % "); - p = isl_printer_print_isl_int(p, - bset->eq[i][1 + total + j]); - p = isl_printer_print_str(p, " == 0"); - } - } - for (i = 0; i < bset->n_ineq; ++i) - p = print_constraint_c(p, dim, bset, bset->ineq[i], ">=", - !bset->n_eq && !i); - return p; -} - -static __isl_give isl_printer *print_set_c(__isl_take isl_printer *p, - __isl_keep isl_dim *dim, __isl_keep isl_set *set) -{ - int i; - - if (set->n == 0) - p = isl_printer_print_str(p, "0"); - - for (i = 0; i < set->n; ++i) { - if (i) - p = isl_printer_print_str(p, " || "); - if (set->n > 1) - p = isl_printer_print_str(p, "("); - p = print_basic_set_c(p, dim, set->p[i]); - if (set->n > 1) - p = isl_printer_print_str(p, ")"); - } - return p; -} - -static __isl_give isl_printer *print_pw_qpolynomial_c( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - int i; - - if (pwqp->n == 1 && isl_set_plain_is_universe(pwqp->p[0].set)) - return print_qpolynomial_c(p, pwqp->dim, pwqp->p[0].qp); - - for (i = 0; i < pwqp->n; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwqp->dim, pwqp->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_qpolynomial_c(p, pwqp->dim, pwqp->p[i].qp); - p = isl_printer_print_str(p, ") : "); - } - - p = isl_printer_print_str(p, "0"); - return p; -} - -__isl_give isl_printer *isl_printer_print_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - if (!p || !pwqp) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_qpolynomial_isl(p, pwqp); - else if (p->output_format == ISL_FORMAT_C) - return print_pw_qpolynomial_c(p, pwqp); - isl_assert(p->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -static int print_pwqp_body(__isl_take isl_pw_qpolynomial *pwqp, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, "; "); - data->first = 0; - - data->p = isl_pwqp_print_isl_body(data->p, pwqp); - isl_pw_qpolynomial_free(pwqp); - - return 0; -} - -static __isl_give isl_printer *print_union_pw_qpolynomial_isl( - __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp) -{ - struct isl_union_print_data data = { p, 1, 1 }; - isl_dim *dim; - dim = isl_union_pw_qpolynomial_get_dim(upwqp); - if (isl_dim_size(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 1, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - isl_dim_free(dim); - p = isl_printer_print_str(p, "{ "); - isl_union_pw_qpolynomial_foreach_pw_qpolynomial(upwqp, &print_pwqp_body, - &data); - p = data.p; - p = isl_printer_print_str(p, " }"); - return p; -} - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp) -{ - if (!p || !upwqp) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_union_pw_qpolynomial_isl(p, upwqp); - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_pw_qpolynomial", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial_fold_c( - __isl_take isl_printer *p, __isl_keep isl_dim *dim, - __isl_keep isl_qpolynomial_fold *fold) -{ - int i; - - for (i = 0; i < fold->n - 1; ++i) - if (fold->type == isl_fold_min) - p = isl_printer_print_str(p, "min("); - else if (fold->type == isl_fold_max) - p = isl_printer_print_str(p, "max("); - - for (i = 0; i < fold->n; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_qpolynomial_c(p, dim, fold->qp[i]); - if (i) - p = isl_printer_print_str(p, ")"); - } - return p; -} - -__isl_give isl_printer *isl_printer_print_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold) -{ - if (!p || !fold) - goto error; - if (p->output_format == ISL_FORMAT_ISL) - return qpolynomial_fold_print(fold, p); - else if (p->output_format == ISL_FORMAT_C) - return print_qpolynomial_fold_c(p, fold->dim, fold); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_pw_qpolynomial_fold_c( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - int i; - - if (pwf->n == 1 && isl_set_plain_is_universe(pwf->p[0].set)) - return print_qpolynomial_fold_c(p, pwf->dim, pwf->p[0].fold); - - for (i = 0; i < pwf->n; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwf->dim, pwf->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_qpolynomial_fold_c(p, pwf->dim, pwf->p[i].fold); - p = isl_printer_print_str(p, ") : "); - } - - p = isl_printer_print_str(p, "0"); - return p; -} - -__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - if (!p || !pwf) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_qpolynomial_fold_isl(p, pwf); - else if (p->output_format == ISL_FORMAT_C) - return print_pw_qpolynomial_fold_c(p, pwf); - isl_assert(p->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf, - FILE *out, unsigned output_format) -{ - isl_printer *p; - - if (!pwf) - return; - - p = isl_printer_to_file(pwf->dim->ctx, out); - p = isl_printer_set_output_format(p, output_format); - p = isl_printer_print_pw_qpolynomial_fold(p, pwf); - - isl_printer_free(p); -} - -static int print_pwf_body(__isl_take isl_pw_qpolynomial_fold *pwf, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, "; "); - data->first = 0; - - data->p = isl_pwf_print_isl_body(data->p, pwf); - isl_pw_qpolynomial_fold_free(pwf); - - return 0; -} - -static __isl_give isl_printer *print_union_pw_qpolynomial_fold_isl( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - struct isl_union_print_data data = { p, 1, 1 }; - isl_dim *dim; - dim = isl_union_pw_qpolynomial_fold_get_dim(upwf); - if (isl_dim_size(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 1, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - isl_dim_free(dim); - p = isl_printer_print_str(p, "{ "); - isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(upwf, - &print_pwf_body, &data); - p = data.p; - p = isl_printer_print_str(p, " }"); - return p; -} - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - if (!p || !upwf) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_union_pw_qpolynomial_fold_isl(p, upwf); - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_pw_qpolynomial_fold", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p, - __isl_keep isl_constraint *c) -{ - isl_basic_map *bmap; - - if (!p || !c) - goto error; - - bmap = isl_basic_map_from_constraint(isl_constraint_copy(c)); - p = isl_printer_print_basic_map(p, bmap); - isl_basic_map_free(bmap); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_constraint_dump(__isl_keep isl_constraint *c) -{ - isl_printer *printer; - - if (!c) - return; - - printer = isl_printer_to_file(isl_constraint_get_ctx(c), stderr); - printer = isl_printer_print_constraint(printer, c); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_dim(__isl_take isl_printer *p, - __isl_keep isl_dim *dim) -{ - if (!dim) - goto error; - - if (isl_dim_size(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - - p = isl_printer_print_str(p, "{ "); - p = print_tuple(dim, p, isl_dim_in, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - p = print_tuple(dim, p, isl_dim_out, 0, 0, NULL); - p = isl_printer_print_str(p, " }"); - - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_dim_dump(__isl_keep isl_dim *dim) -{ - isl_printer *printer; - - if (!dim) - return; - - printer = isl_printer_to_file(isl_dim_get_ctx(dim), stderr); - printer = isl_printer_print_dim(printer, dim); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls) -{ - unsigned total; - unsigned n_div; - - if (!ls) - goto error; - - total = isl_local_space_dim(ls, isl_dim_all); - if (isl_local_space_dim(ls, isl_dim_param) > 0) { - p = print_tuple(ls->dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_tuple(ls->dim, p, isl_dim_in, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - p = print_tuple(ls->dim, p, isl_dim_out, 0, 0, NULL); - n_div = isl_local_space_dim(ls, isl_dim_div); - if (n_div > 0) { - int i; - p = isl_printer_print_str(p, " : "); - p = isl_printer_print_str(p, s_open_exists[0]); - for (i = 0; i < n_div; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_name(ls->dim, p, isl_dim_div, i, 0, 0); - if (isl_int_is_zero(ls->div->row[i][0])) - continue; - p = isl_printer_print_str(p, " = [("); - p = print_affine_of_len(ls->dim, ls->div, p, - ls->div->row[i] + 1, 1 + total, 0); - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, ls->div->row[i][0]); - p = isl_printer_print_str(p, "]"); - } - } - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_local_space_dump(__isl_keep isl_local_space *ls) -{ - isl_printer *printer; - - if (!ls) - return; - - printer = isl_printer_to_file(isl_local_space_get_ctx(ls), stderr); - printer = isl_printer_print_local_space(printer, ls); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -static __isl_give isl_printer *print_aff(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - unsigned total; - - total = isl_local_space_dim(aff->ls, isl_dim_all); - p = print_tuple(aff->ls->dim, p, isl_dim_set, 1, 0, NULL); - p = isl_printer_print_str(p, " -> ["); - p = isl_printer_print_str(p, "("); - p = print_affine_of_len(aff->ls->dim, aff->ls->div, p, - aff->v->el + 1, 1 + total, 1); - if (isl_int_is_one(aff->v->el[0])) - p = isl_printer_print_str(p, ")"); - else { - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, aff->v->el[0]); - } - p = isl_printer_print_str(p, "]"); - - return p; -} - -static __isl_give isl_printer *print_aff_isl(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - if (!aff) - goto error; - - if (isl_local_space_dim(aff->ls, isl_dim_param) > 0) { - p = print_tuple(aff->ls->dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_aff(p, aff); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_aff_dump(__isl_keep isl_aff *aff) -{ - isl_printer *printer; - - if (!aff) - return; - - printer = isl_printer_to_file(isl_aff_get_ctx(aff), stderr); - printer = isl_printer_print_aff(printer, aff); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -static __isl_give isl_printer *print_pw_aff_isl(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff) -{ - int i; - - if (!pwaff) - goto error; - - if (isl_dim_size(pwaff->dim, isl_dim_param) > 0) { - p = print_tuple(pwaff->dim, p, isl_dim_param, 0, 0, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - for (i = 0; i < pwaff->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - p = print_aff(p, pwaff->p[i].aff); - p = print_disjuncts((isl_map *)pwaff->p[i].set, p, 1, 0); - } - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, isl_int *c); - -static __isl_give isl_printer *print_ls_name_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, enum isl_dim_type type, unsigned pos) -{ - if (type == isl_dim_div) { - p = isl_printer_print_str(p, "floord("); - p = print_ls_affine_c(p, ls, ls->div->row[pos] + 1); - p = isl_printer_print_str(p, ", "); - p = isl_printer_print_isl_int(p, ls->div->row[pos][0]); - p = isl_printer_print_str(p, ")"); - } else { - const char *name; - - name = isl_dim_get_name(ls->dim, type, pos); - if (!name) - name = "UNNAMED"; - p = isl_printer_print_str(p, name); - } - return p; -} - -static __isl_give isl_printer *print_ls_term_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, isl_int c, unsigned pos) -{ - enum isl_dim_type type; - - if (pos == 0) - return isl_printer_print_isl_int(p, c); - - if (isl_int_is_one(c)) - ; - else if (isl_int_is_negone(c)) - p = isl_printer_print_str(p, "-"); - else { - p = isl_printer_print_isl_int(p, c); - p = isl_printer_print_str(p, "*"); - } - type = pos2type(ls->dim, &pos); - p = print_ls_name_c(p, ls, type, pos); - return p; -} - -static __isl_give isl_printer *print_ls_partial_affine_c( - __isl_take isl_printer *p, __isl_keep isl_local_space *ls, - isl_int *c, unsigned len) -{ - int i; - int first; - - for (i = 0, first = 1; i < len; ++i) { - int flip = 0; - if (isl_int_is_zero(c[i])) - continue; - if (!first) { - if (isl_int_is_neg(c[i])) { - flip = 1; - isl_int_neg(c[i], c[i]); - p = isl_printer_print_str(p, " - "); - } else - p = isl_printer_print_str(p, " + "); - } - first = 0; - p = print_ls_term_c(p, ls, c[i], i); - if (flip) - isl_int_neg(c[i], c[i]); - } - if (first) - p = isl_printer_print_str(p, "0"); - return p; -} - -static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, isl_int *c) -{ - unsigned len = 1 + isl_local_space_dim(ls, isl_dim_all); - return print_ls_partial_affine_c(p, ls, c, len); -} - -static __isl_give isl_printer *print_aff_c(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - unsigned total; - - total = isl_local_space_dim(aff->ls, isl_dim_all); - p = isl_printer_print_str(p, "("); - p = print_ls_partial_affine_c(p, aff->ls, aff->v->el + 1, 1 + total); - if (isl_int_is_one(aff->v->el[0])) - p = isl_printer_print_str(p, ")"); - else { - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, aff->v->el[0]); - } - return p; -} - -static __isl_give isl_printer *print_pw_aff_c(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff) -{ - int i; - - if (pwaff->n < 1) - isl_die(p->ctx, isl_error_unsupported, - "cannot print empty isl_pw_aff in C format", goto error); - - for (i = 0; i < pwaff->n - 1; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwaff->dim, pwaff->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_aff_c(p, pwaff->p[i].aff); - p = isl_printer_print_str(p, ") : "); - } - - return print_aff_c(p, pwaff->p[pwaff->n - 1].aff); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - if (!p || !aff) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_aff_isl(p, aff); - else if (p->output_format == ISL_FORMAT_C) - return print_aff_c(p, aff); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff) -{ - if (!p || !pwaff) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_aff_isl(p, pwaff); - else if (p->output_format == ISL_FORMAT_C) - return print_pw_aff_c(p, pwaff); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff) -{ - isl_printer *printer; - - if (!pwaff) - return; - - printer = isl_printer_to_file(isl_pw_aff_get_ctx(pwaff), stderr); - printer = isl_printer_print_pw_aff(printer, pwaff); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} diff --git a/cloog-0.16.3/isl/isl_piplib.c b/cloog-0.16.3/isl/isl_piplib.c deleted file mode 100644 index e33b9812046a4f7a238a5e9f49ec21497b73c943..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_piplib.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_piplib.h" - -void isl_seq_cpy_to_pip(Entier *dst, isl_int *src, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - entier_assign(dst[i], src[i]); -} - -void isl_seq_cpy_from_pip(isl_int *dst, Entier *src, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - entier_assign(dst[i], src[i]); -} diff --git a/cloog-0.16.3/isl/isl_piplib.h b/cloog-0.16.3/isl/isl_piplib.h deleted file mode 100644 index 8408770aede94fdc49857b798da4743060babbe0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_piplib.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_PIPLIB_H -#define ISL_PIPLIB_H - -#include -#include -#include -#ifndef ISL_PIPLIB -#error "no piplib" -#endif - -#include - -void isl_seq_cpy_to_pip(Entier *dst, isl_int *src, unsigned len); -void isl_seq_cpy_from_pip(isl_int *dst, Entier *src, unsigned len); - -PipMatrix *isl_basic_map_to_pip(struct isl_basic_map *bmap, unsigned pip_param, - unsigned extra_front, unsigned extra_back); - -#endif diff --git a/cloog-0.16.3/isl/isl_point.c b/cloog-0.16.3/isl/isl_point.c deleted file mode 100644 index e840162dd009122bc19c4daa09b5be95eaa502d1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_point.c +++ /dev/null @@ -1,488 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt) -{ - return pnt ? isl_dim_get_ctx(pnt->dim) : NULL; -} - -__isl_give isl_dim *isl_point_get_dim(__isl_keep isl_point *pnt) -{ - return pnt ? isl_dim_copy(pnt->dim) : NULL; -} - -__isl_give isl_point *isl_point_alloc(__isl_take isl_dim *dim, - __isl_take isl_vec *vec) -{ - struct isl_point *pnt; - - if (!dim || !vec) - goto error; - - if (vec->size > 1 + isl_dim_total(dim)) { - vec = isl_vec_cow(vec); - if (!vec) - goto error; - vec->size = 1 + isl_dim_total(dim); - } - - pnt = isl_alloc_type(dim->ctx, struct isl_point); - if (!pnt) - goto error; - - pnt->ref = 1; - pnt->dim = dim; - pnt->vec = vec; - - return pnt; -error: - isl_dim_free(dim); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_point *isl_point_zero(__isl_take isl_dim *dim) -{ - isl_vec *vec; - - if (!dim) - return NULL; - vec = isl_vec_alloc(dim->ctx, 1 + isl_dim_total(dim)); - if (!vec) - goto error; - isl_int_set_si(vec->el[0], 1); - isl_seq_clr(vec->el + 1, vec->size - 1); - return isl_point_alloc(dim, vec); -error: - isl_dim_free(dim); - return NULL; -} - -__isl_give isl_point *isl_point_dup(__isl_keep isl_point *pnt) -{ - struct isl_point *pnt2; - - if (!pnt) - return NULL; - pnt2 = isl_point_alloc(isl_dim_copy(pnt->dim), isl_vec_copy(pnt->vec)); - return pnt2; -} - -__isl_give isl_point *isl_point_cow(__isl_take isl_point *pnt) -{ - struct isl_point *pnt2; - if (!pnt) - return NULL; - - if (pnt->ref == 1) - return pnt; - - pnt2 = isl_point_dup(pnt); - isl_point_free(pnt); - return pnt2; -} - -__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt) -{ - if (!pnt) - return NULL; - - pnt->ref++; - return pnt; -} - -void isl_point_free(__isl_take isl_point *pnt) -{ - if (!pnt) - return; - - if (--pnt->ref > 0) - return; - - isl_dim_free(pnt->dim); - isl_vec_free(pnt->vec); - free(pnt); -} - -__isl_give isl_point *isl_point_void(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - - return isl_point_alloc(dim, isl_vec_alloc(dim->ctx, 0)); -} - -int isl_point_is_void(__isl_keep isl_point *pnt) -{ - if (!pnt) - return -1; - - return pnt->vec->size == 0; -} - -void isl_point_get_coordinate(__isl_keep isl_point *pnt, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!pnt || isl_point_is_void(pnt)) - return; - if (type == isl_dim_set) - pos += isl_dim_size(pnt->dim, isl_dim_param); - isl_int_set(*v, pnt->vec->el[1 + pos]); -} - -__isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!pnt || isl_point_is_void(pnt)) - return pnt; - - pnt = isl_point_cow(pnt); - if (!pnt) - return NULL; - pnt->vec = isl_vec_cow(pnt->vec); - if (!pnt->vec) - goto error; - - if (type == isl_dim_set) - pos += isl_dim_size(pnt->dim, isl_dim_param); - - isl_int_set(pnt->vec->el[1 + pos], v); - - return pnt; -error: - isl_point_free(pnt); - return NULL; -} - -__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val) -{ - if (!pnt || isl_point_is_void(pnt)) - return pnt; - - pnt = isl_point_cow(pnt); - if (!pnt) - return NULL; - pnt->vec = isl_vec_cow(pnt->vec); - if (!pnt->vec) - goto error; - - if (type == isl_dim_set) - pos += isl_dim_size(pnt->dim, isl_dim_param); - - isl_int_add_ui(pnt->vec->el[1 + pos], pnt->vec->el[1 + pos], val); - - return pnt; -error: - isl_point_free(pnt); - return NULL; -} - -__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val) -{ - if (!pnt || isl_point_is_void(pnt)) - return pnt; - - pnt = isl_point_cow(pnt); - if (!pnt) - return NULL; - pnt->vec = isl_vec_cow(pnt->vec); - if (!pnt->vec) - goto error; - - if (type == isl_dim_set) - pos += isl_dim_size(pnt->dim, isl_dim_param); - - isl_int_sub_ui(pnt->vec->el[1 + pos], pnt->vec->el[1 + pos], val); - - return pnt; -error: - isl_point_free(pnt); - return NULL; -} - -struct isl_foreach_point { - struct isl_scan_callback callback; - int (*fn)(__isl_take isl_point *pnt, void *user); - void *user; - isl_dim *dim; -}; - -static int foreach_point(struct isl_scan_callback *cb, __isl_take isl_vec *sample) -{ - struct isl_foreach_point *fp = (struct isl_foreach_point *)cb; - isl_point *pnt; - - pnt = isl_point_alloc(isl_dim_copy(fp->dim), sample); - - return fp->fn(pnt, fp->user); -} - -int isl_set_foreach_point(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user) -{ - struct isl_foreach_point fp = { { &foreach_point }, fn, user }; - int i; - - if (!set) - return -1; - - fp.dim = isl_set_get_dim(set); - if (!fp.dim) - return -1; - - set = isl_set_copy(set); - set = isl_set_cow(set); - set = isl_set_make_disjoint(set); - set = isl_set_compute_divs(set); - if (!set) - goto error; - - for (i = 0; i < set->n; ++i) - if (isl_basic_set_scan(isl_basic_set_copy(set->p[i]), - &fp.callback) < 0) - goto error; - - isl_set_free(set); - isl_dim_free(fp.dim); - - return 0; -error: - isl_set_free(set); - isl_dim_free(fp.dim); - return -1; -} - -/* Return 1 if "bmap" contains the point "point". - * "bmap" is assumed to have known divs. - * The point is first extended with the divs and then passed - * to basic_map_contains. - */ -int isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap, - __isl_keep isl_point *point) -{ - int i; - struct isl_vec *vec; - unsigned dim; - int contains; - - if (!bmap || !point) - return -1; - isl_assert(bmap->ctx, isl_dim_equal(bmap->dim, point->dim), return -1); - if (bmap->n_div == 0) - return isl_basic_map_contains(bmap, point->vec); - - dim = isl_basic_map_total_dim(bmap) - bmap->n_div; - vec = isl_vec_alloc(bmap->ctx, 1 + dim + bmap->n_div); - if (!vec) - return -1; - - isl_seq_cpy(vec->el, point->vec->el, point->vec->size); - for (i = 0; i < bmap->n_div; ++i) { - isl_seq_inner_product(bmap->div[i] + 1, vec->el, - 1 + dim + i, &vec->el[1+dim+i]); - isl_int_fdiv_q(vec->el[1+dim+i], vec->el[1+dim+i], - bmap->div[i][0]); - } - - contains = isl_basic_map_contains(bmap, vec); - - isl_vec_free(vec); - return contains; -} - -int isl_map_contains_point(__isl_keep isl_map *map, __isl_keep isl_point *point) -{ - int i; - int found = 0; - - if (!map || !point) - return -1; - - map = isl_map_copy(map); - map = isl_map_compute_divs(map); - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - found = isl_basic_map_contains_point(map->p[i], point); - if (found < 0) - goto error; - if (found) - break; - } - isl_map_free(map); - - return found; -error: - isl_map_free(map); - return -1; -} - -int isl_set_contains_point(__isl_keep isl_set *set, __isl_keep isl_point *point) -{ - return isl_map_contains_point((isl_map *)set, point); -} - -__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt) -{ - isl_basic_set *bset; - isl_basic_set *model; - - model = isl_basic_set_empty(isl_dim_copy(pnt->dim)); - bset = isl_basic_set_from_vec(isl_vec_copy(pnt->vec)); - bset = isl_basic_set_from_underlying_set(bset, model); - isl_point_free(pnt); - - return bset; -} - -__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt) -{ - isl_basic_set *bset; - bset = isl_basic_set_from_point(pnt); - return isl_set_from_basic_set(bset); -} - -__isl_give isl_basic_set *isl_basic_set_box_from_points( - __isl_take isl_point *pnt1, __isl_take isl_point *pnt2) -{ - isl_basic_set *bset; - unsigned total; - int i; - int k; - isl_int t; - - isl_int_init(t); - - if (!pnt1 || !pnt2) - goto error; - - isl_assert(pnt1->dim->ctx, - isl_dim_equal(pnt1->dim, pnt2->dim), goto error); - - if (isl_point_is_void(pnt1) && isl_point_is_void(pnt2)) { - isl_dim *dim = isl_dim_copy(pnt1->dim); - isl_point_free(pnt1); - isl_point_free(pnt2); - isl_int_clear(t); - return isl_basic_set_empty(dim); - } - if (isl_point_is_void(pnt1)) { - isl_point_free(pnt1); - isl_int_clear(t); - return isl_basic_set_from_point(pnt2); - } - if (isl_point_is_void(pnt2)) { - isl_point_free(pnt2); - isl_int_clear(t); - return isl_basic_set_from_point(pnt1); - } - - total = isl_dim_total(pnt1->dim); - bset = isl_basic_set_alloc_dim(isl_dim_copy(pnt1->dim), 0, 0, 2 * total); - - for (i = 0; i < total; ++i) { - isl_int_mul(t, pnt1->vec->el[1 + i], pnt2->vec->el[0]); - isl_int_submul(t, pnt2->vec->el[1 + i], pnt1->vec->el[0]); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k] + 1, total); - if (isl_int_is_pos(t)) { - isl_int_set_si(bset->ineq[k][1 + i], -1); - isl_int_set(bset->ineq[k][0], pnt1->vec->el[1 + i]); - } else { - isl_int_set_si(bset->ineq[k][1 + i], 1); - isl_int_neg(bset->ineq[k][0], pnt1->vec->el[1 + i]); - } - isl_int_fdiv_q(bset->ineq[k][0], bset->ineq[k][0], pnt1->vec->el[0]); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k] + 1, total); - if (isl_int_is_pos(t)) { - isl_int_set_si(bset->ineq[k][1 + i], 1); - isl_int_neg(bset->ineq[k][0], pnt2->vec->el[1 + i]); - } else { - isl_int_set_si(bset->ineq[k][1 + i], -1); - isl_int_set(bset->ineq[k][0], pnt2->vec->el[1 + i]); - } - isl_int_fdiv_q(bset->ineq[k][0], bset->ineq[k][0], pnt2->vec->el[0]); - } - - bset = isl_basic_set_finalize(bset); - - isl_point_free(pnt1); - isl_point_free(pnt2); - - isl_int_clear(t); - - return bset; -error: - isl_point_free(pnt1); - isl_point_free(pnt2); - isl_int_clear(t); - return NULL; -} - -__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1, - __isl_take isl_point *pnt2) -{ - isl_basic_set *bset; - bset = isl_basic_set_box_from_points(pnt1, pnt2); - return isl_set_from_basic_set(bset); -} - -void isl_point_print(__isl_keep isl_point *pnt, FILE *out) -{ - int i; - unsigned nparam; - unsigned dim; - - if (!pnt) - return; - if (isl_point_is_void(pnt)) { - fprintf(out, "void\n"); - return; - } - - nparam = isl_dim_size(pnt->dim, isl_dim_param); - dim = isl_dim_size(pnt->dim, isl_dim_set); - if (nparam > 0) { - fprintf(out, "["); - for (i = 0; i < nparam; ++i) { - const char *name; - if (i) - fprintf(out, ", "); - name = isl_dim_get_name(pnt->dim, isl_dim_param, i); - if (name) - fprintf(out, "%s = ", name); - isl_int_print(out, pnt->vec->el[1 + i], 0); - if (!isl_int_is_one(pnt->vec->el[0])) { - fprintf(out, "/"); - isl_int_print(out, pnt->vec->el[0], 0); - } - } - fprintf(out, "] -> "); - } - fprintf(out, "["); - for (i = 0; i < dim; ++i) { - if (i) - fprintf(out, ", "); - isl_int_print(out, pnt->vec->el[1 + nparam + i], 0); - if (!isl_int_is_one(pnt->vec->el[0])) { - fprintf(out, "/"); - isl_int_print(out, pnt->vec->el[0], 0); - } - } - fprintf(out, "]\n"); -} diff --git a/cloog-0.16.3/isl/isl_point_private.h b/cloog-0.16.3/isl/isl_point_private.h deleted file mode 100644 index 327f55f5bca2e3ffd86bb20f514ebd85f1b5724c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_point_private.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include -#include - -struct isl_point { - int ref; - struct isl_dim *dim; - struct isl_vec *vec; -}; - -__isl_give isl_point *isl_point_alloc(__isl_take isl_dim *dim, - __isl_take isl_vec *vec); diff --git a/cloog-0.16.3/isl/isl_polynomial.c b/cloog-0.16.3/isl/isl_polynomial.c deleted file mode 100644 index 524aa6fe2649b388df3f82d3f490151d354028eb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_polynomial.c +++ /dev/null @@ -1,4624 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static unsigned pos(__isl_keep isl_dim *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return 0; - case isl_dim_in: return dim->nparam; - case isl_dim_out: return dim->nparam + dim->n_in; - default: return 0; - } -} - -int isl_upoly_is_cst(__isl_keep struct isl_upoly *up) -{ - if (!up) - return -1; - - return up->var < 0; -} - -__isl_keep struct isl_upoly_cst *isl_upoly_as_cst(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - isl_assert(up->ctx, up->var < 0, return NULL); - - return (struct isl_upoly_cst *)up; -} - -__isl_keep struct isl_upoly_rec *isl_upoly_as_rec(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - isl_assert(up->ctx, up->var >= 0, return NULL); - - return (struct isl_upoly_rec *)up; -} - -int isl_upoly_is_equal(__isl_keep struct isl_upoly *up1, - __isl_keep struct isl_upoly *up2) -{ - int i; - struct isl_upoly_rec *rec1, *rec2; - - if (!up1 || !up2) - return -1; - if (up1 == up2) - return 1; - if (up1->var != up2->var) - return 0; - if (isl_upoly_is_cst(up1)) { - struct isl_upoly_cst *cst1, *cst2; - cst1 = isl_upoly_as_cst(up1); - cst2 = isl_upoly_as_cst(up2); - if (!cst1 || !cst2) - return -1; - return isl_int_eq(cst1->n, cst2->n) && - isl_int_eq(cst1->d, cst2->d); - } - - rec1 = isl_upoly_as_rec(up1); - rec2 = isl_upoly_as_rec(up2); - if (!rec1 || !rec2) - return -1; - - if (rec1->n != rec2->n) - return 0; - - for (i = 0; i < rec1->n; ++i) { - int eq = isl_upoly_is_equal(rec1->p[i], rec2->p[i]); - if (eq < 0 || !eq) - return eq; - } - - return 1; -} - -int isl_upoly_is_zero(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_zero(cst->n) && isl_int_is_pos(cst->d); -} - -int isl_upoly_sgn(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return 0; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return 0; - - return isl_int_sgn(cst->n); -} - -int isl_upoly_is_nan(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_zero(cst->n) && isl_int_is_zero(cst->d); -} - -int isl_upoly_is_infty(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_pos(cst->n) && isl_int_is_zero(cst->d); -} - -int isl_upoly_is_neginfty(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_neg(cst->n) && isl_int_is_zero(cst->d); -} - -int isl_upoly_is_one(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_eq(cst->n, cst->d) && isl_int_is_pos(cst->d); -} - -int isl_upoly_is_negone(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_negone(cst->n) && isl_int_is_one(cst->d); -} - -__isl_give struct isl_upoly_cst *isl_upoly_cst_alloc(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_alloc_type(ctx, struct isl_upoly_cst); - if (!cst) - return NULL; - - cst->up.ref = 1; - cst->up.ctx = ctx; - isl_ctx_ref(ctx); - cst->up.var = -1; - - isl_int_init(cst->n); - isl_int_init(cst->d); - - return cst; -} - -__isl_give struct isl_upoly *isl_upoly_zero(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 0); - isl_int_set_si(cst->d, 1); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_one(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 1); - isl_int_set_si(cst->d, 1); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_infty(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 1); - isl_int_set_si(cst->d, 0); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_neginfty(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, -1); - isl_int_set_si(cst->d, 0); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_nan(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 0); - isl_int_set_si(cst->d, 0); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_rat_cst(struct isl_ctx *ctx, - isl_int n, isl_int d) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set(cst->n, n); - isl_int_set(cst->d, d); - - return &cst->up; -} - -__isl_give struct isl_upoly_rec *isl_upoly_alloc_rec(struct isl_ctx *ctx, - int var, int size) -{ - struct isl_upoly_rec *rec; - - isl_assert(ctx, var >= 0, return NULL); - isl_assert(ctx, size >= 0, return NULL); - rec = isl_calloc(ctx, struct isl_upoly_rec, - sizeof(struct isl_upoly_rec) + - size * sizeof(struct isl_upoly *)); - if (!rec) - return NULL; - - rec->up.ref = 1; - rec->up.ctx = ctx; - isl_ctx_ref(ctx); - rec->up.var = var; - - rec->n = 0; - rec->size = size; - - return rec; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_reset_dim( - __isl_take isl_qpolynomial *qp, __isl_take isl_dim *dim) -{ - qp = isl_qpolynomial_cow(qp); - if (!qp || !dim) - goto error; - - isl_dim_free(qp->dim); - qp->dim = dim; - - return qp; -error: - isl_qpolynomial_free(qp); - isl_dim_free(dim); - return NULL; -} - -isl_ctx *isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp) -{ - return qp ? qp->dim->ctx : NULL; -} - -__isl_give isl_dim *isl_qpolynomial_get_dim(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_dim_copy(qp->dim) : NULL; -} - -unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type) -{ - return qp ? isl_dim_size(qp->dim, type) : 0; -} - -int isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_zero(qp->upoly) : -1; -} - -int isl_qpolynomial_is_one(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_one(qp->upoly) : -1; -} - -int isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_nan(qp->upoly) : -1; -} - -int isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_infty(qp->upoly) : -1; -} - -int isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_neginfty(qp->upoly) : -1; -} - -int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_sgn(qp->upoly) : 0; -} - -static void upoly_free_cst(__isl_take struct isl_upoly_cst *cst) -{ - isl_int_clear(cst->n); - isl_int_clear(cst->d); -} - -static void upoly_free_rec(__isl_take struct isl_upoly_rec *rec) -{ - int i; - - for (i = 0; i < rec->n; ++i) - isl_upoly_free(rec->p[i]); -} - -__isl_give struct isl_upoly *isl_upoly_copy(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - up->ref++; - return up; -} - -__isl_give struct isl_upoly *isl_upoly_dup_cst(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - struct isl_upoly_cst *dup; - - cst = isl_upoly_as_cst(up); - if (!cst) - return NULL; - - dup = isl_upoly_as_cst(isl_upoly_zero(up->ctx)); - if (!dup) - return NULL; - isl_int_set(dup->n, cst->n); - isl_int_set(dup->d, cst->d); - - return &dup->up; -} - -__isl_give struct isl_upoly *isl_upoly_dup_rec(__isl_keep struct isl_upoly *up) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly_rec *dup; - - rec = isl_upoly_as_rec(up); - if (!rec) - return NULL; - - dup = isl_upoly_alloc_rec(up->ctx, up->var, rec->n); - if (!dup) - return NULL; - - for (i = 0; i < rec->n; ++i) { - dup->p[i] = isl_upoly_copy(rec->p[i]); - if (!dup->p[i]) - goto error; - dup->n++; - } - - return &dup->up; -error: - isl_upoly_free(&dup->up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_dup(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return isl_upoly_dup_cst(up); - else - return isl_upoly_dup_rec(up); -} - -__isl_give struct isl_upoly *isl_upoly_cow(__isl_take struct isl_upoly *up) -{ - if (!up) - return NULL; - - if (up->ref == 1) - return up; - up->ref--; - return isl_upoly_dup(up); -} - -void isl_upoly_free(__isl_take struct isl_upoly *up) -{ - if (!up) - return; - - if (--up->ref > 0) - return; - - if (up->var < 0) - upoly_free_cst((struct isl_upoly_cst *)up); - else - upoly_free_rec((struct isl_upoly_rec *)up); - - isl_ctx_deref(up->ctx); - free(up); -} - -static void isl_upoly_cst_reduce(__isl_keep struct isl_upoly_cst *cst) -{ - isl_int gcd; - - isl_int_init(gcd); - isl_int_gcd(gcd, cst->n, cst->d); - if (!isl_int_is_zero(gcd) && !isl_int_is_one(gcd)) { - isl_int_divexact(cst->n, cst->n, gcd); - isl_int_divexact(cst->d, cst->d, gcd); - } - isl_int_clear(gcd); -} - -__isl_give struct isl_upoly *isl_upoly_sum_cst(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - struct isl_upoly_cst *cst1; - struct isl_upoly_cst *cst2; - - up1 = isl_upoly_cow(up1); - if (!up1 || !up2) - goto error; - - cst1 = isl_upoly_as_cst(up1); - cst2 = isl_upoly_as_cst(up2); - - if (isl_int_eq(cst1->d, cst2->d)) - isl_int_add(cst1->n, cst1->n, cst2->n); - else { - isl_int_mul(cst1->n, cst1->n, cst2->d); - isl_int_addmul(cst1->n, cst2->n, cst1->d); - isl_int_mul(cst1->d, cst1->d, cst2->d); - } - - isl_upoly_cst_reduce(cst1); - - isl_upoly_free(up2); - return up1; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -static __isl_give struct isl_upoly *replace_by_zero( - __isl_take struct isl_upoly *up) -{ - struct isl_ctx *ctx; - - if (!up) - return NULL; - ctx = up->ctx; - isl_upoly_free(up); - return isl_upoly_zero(ctx); -} - -static __isl_give struct isl_upoly *replace_by_constant_term( - __isl_take struct isl_upoly *up) -{ - struct isl_upoly_rec *rec; - struct isl_upoly *cst; - - if (!up) - return NULL; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - cst = isl_upoly_copy(rec->p[0]); - isl_upoly_free(up); - return cst; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_sum(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - int i; - struct isl_upoly_rec *rec1, *rec2; - - if (!up1 || !up2) - goto error; - - if (isl_upoly_is_nan(up1)) { - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_nan(up2)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_zero(up1)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_zero(up2)) { - isl_upoly_free(up2); - return up1; - } - - if (up1->var < up2->var) - return isl_upoly_sum(up2, up1); - - if (up2->var < up1->var) { - struct isl_upoly_rec *rec; - if (isl_upoly_is_infty(up2) || isl_upoly_is_neginfty(up2)) { - isl_upoly_free(up1); - return up2; - } - up1 = isl_upoly_cow(up1); - rec = isl_upoly_as_rec(up1); - if (!rec) - goto error; - rec->p[0] = isl_upoly_sum(rec->p[0], up2); - if (rec->n == 1) - up1 = replace_by_constant_term(up1); - return up1; - } - - if (isl_upoly_is_cst(up1)) - return isl_upoly_sum_cst(up1, up2); - - rec1 = isl_upoly_as_rec(up1); - rec2 = isl_upoly_as_rec(up2); - if (!rec1 || !rec2) - goto error; - - if (rec1->n < rec2->n) - return isl_upoly_sum(up2, up1); - - up1 = isl_upoly_cow(up1); - rec1 = isl_upoly_as_rec(up1); - if (!rec1) - goto error; - - for (i = rec2->n - 1; i >= 0; --i) { - rec1->p[i] = isl_upoly_sum(rec1->p[i], - isl_upoly_copy(rec2->p[i])); - if (!rec1->p[i]) - goto error; - if (i == rec1->n - 1 && isl_upoly_is_zero(rec1->p[i])) { - isl_upoly_free(rec1->p[i]); - rec1->n--; - } - } - - if (rec1->n == 0) - up1 = replace_by_zero(up1); - else if (rec1->n == 1) - up1 = replace_by_constant_term(up1); - - isl_upoly_free(up2); - - return up1; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_cst_add_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - struct isl_upoly_cst *cst; - - up = isl_upoly_cow(up); - if (!up) - return NULL; - - cst = isl_upoly_as_cst(up); - - isl_int_addmul(cst->n, cst->d, v); - - return up; -} - -__isl_give struct isl_upoly *isl_upoly_add_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return isl_upoly_cst_add_isl_int(up, v); - - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - rec->p[0] = isl_upoly_add_isl_int(rec->p[0], v); - if (!rec->p[0]) - goto error; - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_cst_mul_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - struct isl_upoly_cst *cst; - - if (isl_upoly_is_zero(up)) - return up; - - up = isl_upoly_cow(up); - if (!up) - return NULL; - - cst = isl_upoly_as_cst(up); - - isl_int_mul(cst->n, cst->n, v); - - return up; -} - -__isl_give struct isl_upoly *isl_upoly_mul_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return isl_upoly_cst_mul_isl_int(up, v); - - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = isl_upoly_mul_isl_int(rec->p[i], v); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_mul_cst(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - struct isl_upoly_cst *cst1; - struct isl_upoly_cst *cst2; - - up1 = isl_upoly_cow(up1); - if (!up1 || !up2) - goto error; - - cst1 = isl_upoly_as_cst(up1); - cst2 = isl_upoly_as_cst(up2); - - isl_int_mul(cst1->n, cst1->n, cst2->n); - isl_int_mul(cst1->d, cst1->d, cst2->d); - - isl_upoly_cst_reduce(cst1); - - isl_upoly_free(up2); - return up1; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_mul_rec(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - struct isl_upoly_rec *rec1; - struct isl_upoly_rec *rec2; - struct isl_upoly_rec *res = NULL; - int i, j; - int size; - - rec1 = isl_upoly_as_rec(up1); - rec2 = isl_upoly_as_rec(up2); - if (!rec1 || !rec2) - goto error; - size = rec1->n + rec2->n - 1; - res = isl_upoly_alloc_rec(up1->ctx, up1->var, size); - if (!res) - goto error; - - for (i = 0; i < rec1->n; ++i) { - res->p[i] = isl_upoly_mul(isl_upoly_copy(rec2->p[0]), - isl_upoly_copy(rec1->p[i])); - if (!res->p[i]) - goto error; - res->n++; - } - for (; i < size; ++i) { - res->p[i] = isl_upoly_zero(up1->ctx); - if (!res->p[i]) - goto error; - res->n++; - } - for (i = 0; i < rec1->n; ++i) { - for (j = 1; j < rec2->n; ++j) { - struct isl_upoly *up; - up = isl_upoly_mul(isl_upoly_copy(rec2->p[j]), - isl_upoly_copy(rec1->p[i])); - res->p[i + j] = isl_upoly_sum(res->p[i + j], up); - if (!res->p[i + j]) - goto error; - } - } - - isl_upoly_free(up1); - isl_upoly_free(up2); - - return &res->up; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - isl_upoly_free(&res->up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_mul(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - if (!up1 || !up2) - goto error; - - if (isl_upoly_is_nan(up1)) { - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_nan(up2)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_zero(up1)) { - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_zero(up2)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_one(up1)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_one(up2)) { - isl_upoly_free(up2); - return up1; - } - - if (up1->var < up2->var) - return isl_upoly_mul(up2, up1); - - if (up2->var < up1->var) { - int i; - struct isl_upoly_rec *rec; - if (isl_upoly_is_infty(up2) || isl_upoly_is_neginfty(up2)) { - isl_ctx *ctx = up1->ctx; - isl_upoly_free(up1); - isl_upoly_free(up2); - return isl_upoly_nan(ctx); - } - up1 = isl_upoly_cow(up1); - rec = isl_upoly_as_rec(up1); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = isl_upoly_mul(rec->p[i], - isl_upoly_copy(up2)); - if (!rec->p[i]) - goto error; - } - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_cst(up1)) - return isl_upoly_mul_cst(up1, up2); - - return isl_upoly_mul_rec(up1, up2); -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_pow(__isl_take struct isl_upoly *up, - unsigned power) -{ - struct isl_upoly *res; - - if (!up) - return NULL; - if (power == 1) - return up; - - if (power % 2) - res = isl_upoly_copy(up); - else - res = isl_upoly_one(up->ctx); - - while (power >>= 1) { - up = isl_upoly_mul(up, isl_upoly_copy(up)); - if (power % 2) - res = isl_upoly_mul(res, isl_upoly_copy(up)); - } - - isl_upoly_free(up); - return res; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_alloc(__isl_take isl_dim *dim, - unsigned n_div, __isl_take struct isl_upoly *up) -{ - struct isl_qpolynomial *qp = NULL; - unsigned total; - - if (!dim || !up) - goto error; - - total = isl_dim_total(dim); - - qp = isl_calloc_type(dim->ctx, struct isl_qpolynomial); - if (!qp) - goto error; - - qp->ref = 1; - qp->div = isl_mat_alloc(dim->ctx, n_div, 1 + 1 + total + n_div); - if (!qp->div) - goto error; - - qp->dim = dim; - qp->upoly = up; - - return qp; -error: - isl_dim_free(dim); - isl_upoly_free(up); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - qp->ref++; - return qp; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_dup(__isl_keep isl_qpolynomial *qp) -{ - struct isl_qpolynomial *dup; - - if (!qp) - return NULL; - - dup = isl_qpolynomial_alloc(isl_dim_copy(qp->dim), qp->div->n_row, - isl_upoly_copy(qp->upoly)); - if (!dup) - return NULL; - isl_mat_free(dup->div); - dup->div = isl_mat_copy(qp->div); - if (!dup->div) - goto error; - - return dup; -error: - isl_qpolynomial_free(dup); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_cow(__isl_take isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - if (qp->ref == 1) - return qp; - qp->ref--; - return isl_qpolynomial_dup(qp); -} - -void isl_qpolynomial_free(__isl_take isl_qpolynomial *qp) -{ - if (!qp) - return; - - if (--qp->ref > 0) - return; - - isl_dim_free(qp->dim); - isl_mat_free(qp->div); - isl_upoly_free(qp->upoly); - - free(qp); -} - -__isl_give struct isl_upoly *isl_upoly_var_pow(isl_ctx *ctx, int pos, int power) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly_cst *cst; - - rec = isl_upoly_alloc_rec(ctx, pos, 1 + power); - if (!rec) - return NULL; - for (i = 0; i < 1 + power; ++i) { - rec->p[i] = isl_upoly_zero(ctx); - if (!rec->p[i]) - goto error; - rec->n++; - } - cst = isl_upoly_as_cst(rec->p[power]); - isl_int_set_si(cst->n, 1); - - return &rec->up; -error: - isl_upoly_free(&rec->up); - return NULL; -} - -/* r array maps original positions to new positions. - */ -static __isl_give struct isl_upoly *reorder(__isl_take struct isl_upoly *up, - int *r) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly *base; - struct isl_upoly *res; - - if (isl_upoly_is_cst(up)) - return up; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - isl_assert(up->ctx, rec->n >= 1, goto error); - - base = isl_upoly_var_pow(up->ctx, r[up->var], 1); - res = reorder(isl_upoly_copy(rec->p[rec->n - 1]), r); - - for (i = rec->n - 2; i >= 0; --i) { - res = isl_upoly_mul(res, isl_upoly_copy(base)); - res = isl_upoly_sum(res, reorder(isl_upoly_copy(rec->p[i]), r)); - } - - isl_upoly_free(base); - isl_upoly_free(up); - - return res; -error: - isl_upoly_free(up); - return NULL; -} - -static int compatible_divs(__isl_keep isl_mat *div1, __isl_keep isl_mat *div2) -{ - int n_row, n_col; - int equal; - - isl_assert(div1->ctx, div1->n_row >= div2->n_row && - div1->n_col >= div2->n_col, return -1); - - if (div1->n_row == div2->n_row) - return isl_mat_is_equal(div1, div2); - - n_row = div1->n_row; - n_col = div1->n_col; - div1->n_row = div2->n_row; - div1->n_col = div2->n_col; - - equal = isl_mat_is_equal(div1, div2); - - div1->n_row = n_row; - div1->n_col = n_col; - - return equal; -} - -static int cmp_row(__isl_keep isl_mat *div, int i, int j) -{ - int li, lj; - - li = isl_seq_last_non_zero(div->row[i], div->n_col); - lj = isl_seq_last_non_zero(div->row[j], div->n_col); - - if (li != lj) - return li - lj; - - return isl_seq_cmp(div->row[i], div->row[j], div->n_col); -} - -struct isl_div_sort_info { - isl_mat *div; - int row; -}; - -static int div_sort_cmp(const void *p1, const void *p2) -{ - const struct isl_div_sort_info *i1, *i2; - i1 = (const struct isl_div_sort_info *) p1; - i2 = (const struct isl_div_sort_info *) p2; - - return cmp_row(i1->div, i1->row, i2->row); -} - -/* Sort divs and remove duplicates. - */ -static __isl_give isl_qpolynomial *sort_divs(__isl_take isl_qpolynomial *qp) -{ - int i; - int skip; - int len; - struct isl_div_sort_info *array = NULL; - int *pos = NULL, *at = NULL; - int *reordering = NULL; - unsigned div_pos; - - if (!qp) - return NULL; - if (qp->div->n_row <= 1) - return qp; - - div_pos = isl_dim_total(qp->dim); - - array = isl_alloc_array(qp->div->ctx, struct isl_div_sort_info, - qp->div->n_row); - pos = isl_alloc_array(qp->div->ctx, int, qp->div->n_row); - at = isl_alloc_array(qp->div->ctx, int, qp->div->n_row); - len = qp->div->n_col - 2; - reordering = isl_alloc_array(qp->div->ctx, int, len); - if (!array || !pos || !at || !reordering) - goto error; - - for (i = 0; i < qp->div->n_row; ++i) { - array[i].div = qp->div; - array[i].row = i; - pos[i] = i; - at[i] = i; - } - - qsort(array, qp->div->n_row, sizeof(struct isl_div_sort_info), - div_sort_cmp); - - for (i = 0; i < div_pos; ++i) - reordering[i] = i; - - for (i = 0; i < qp->div->n_row; ++i) { - if (pos[array[i].row] == i) - continue; - qp->div = isl_mat_swap_rows(qp->div, i, pos[array[i].row]); - pos[at[i]] = pos[array[i].row]; - at[pos[array[i].row]] = at[i]; - at[i] = array[i].row; - pos[array[i].row] = i; - } - - skip = 0; - for (i = 0; i < len - div_pos; ++i) { - if (i > 0 && - isl_seq_eq(qp->div->row[i - skip - 1], - qp->div->row[i - skip], qp->div->n_col)) { - qp->div = isl_mat_drop_rows(qp->div, i - skip, 1); - isl_mat_col_add(qp->div, 2 + div_pos + i - skip - 1, - 2 + div_pos + i - skip); - qp->div = isl_mat_drop_cols(qp->div, - 2 + div_pos + i - skip, 1); - skip++; - } - reordering[div_pos + array[i].row] = div_pos + i - skip; - } - - qp->upoly = reorder(qp->upoly, reordering); - - if (!qp->upoly || !qp->div) - goto error; - - free(at); - free(pos); - free(array); - free(reordering); - - return qp; -error: - free(at); - free(pos); - free(array); - free(reordering); - isl_qpolynomial_free(qp); - return NULL; -} - -static __isl_give struct isl_upoly *expand(__isl_take struct isl_upoly *up, - int *exp, int first) -{ - int i; - struct isl_upoly_rec *rec; - - if (isl_upoly_is_cst(up)) - return up; - - if (up->var < first) - return up; - - if (exp[up->var - first] == up->var - first) - return up; - - up = isl_upoly_cow(up); - if (!up) - goto error; - - up->var = exp[up->var - first] + first; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = expand(rec->p[i], exp, first); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -static __isl_give isl_qpolynomial *with_merged_divs( - __isl_give isl_qpolynomial *(*fn)(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2), - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) -{ - int *exp1 = NULL; - int *exp2 = NULL; - isl_mat *div = NULL; - - qp1 = isl_qpolynomial_cow(qp1); - qp2 = isl_qpolynomial_cow(qp2); - - if (!qp1 || !qp2) - goto error; - - isl_assert(qp1->div->ctx, qp1->div->n_row >= qp2->div->n_row && - qp1->div->n_col >= qp2->div->n_col, goto error); - - exp1 = isl_alloc_array(qp1->div->ctx, int, qp1->div->n_row); - exp2 = isl_alloc_array(qp2->div->ctx, int, qp2->div->n_row); - if (!exp1 || !exp2) - goto error; - - div = isl_merge_divs(qp1->div, qp2->div, exp1, exp2); - if (!div) - goto error; - - isl_mat_free(qp1->div); - qp1->div = isl_mat_copy(div); - isl_mat_free(qp2->div); - qp2->div = isl_mat_copy(div); - - qp1->upoly = expand(qp1->upoly, exp1, div->n_col - div->n_row - 2); - qp2->upoly = expand(qp2->upoly, exp2, div->n_col - div->n_row - 2); - - if (!qp1->upoly || !qp2->upoly) - goto error; - - isl_mat_free(div); - free(exp1); - free(exp2); - - return fn(qp1, qp2); -error: - isl_mat_free(div); - free(exp1); - free(exp2); - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - qp1 = isl_qpolynomial_cow(qp1); - - if (!qp1 || !qp2) - goto error; - - if (qp1->div->n_row < qp2->div->n_row) - return isl_qpolynomial_add(qp2, qp1); - - isl_assert(qp1->dim->ctx, isl_dim_equal(qp1->dim, qp2->dim), goto error); - if (!compatible_divs(qp1->div, qp2->div)) - return with_merged_divs(isl_qpolynomial_add, qp1, qp2); - - qp1->upoly = isl_upoly_sum(qp1->upoly, isl_upoly_copy(qp2->upoly)); - if (!qp1->upoly) - goto error; - - isl_qpolynomial_free(qp2); - - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add_on_domain( - __isl_keep isl_set *dom, - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - qp1 = isl_qpolynomial_add(qp1, qp2); - qp1 = isl_qpolynomial_gist(qp1, isl_set_copy(dom)); - return qp1; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_sub(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - return isl_qpolynomial_add(qp1, isl_qpolynomial_neg(qp2)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v) -{ - if (isl_int_is_zero(v)) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - qp->upoly = isl_upoly_add_isl_int(qp->upoly, v); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; - -} - -__isl_give isl_qpolynomial *isl_qpolynomial_neg(__isl_take isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - return isl_qpolynomial_mul_isl_int(qp, qp->dim->ctx->negone); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_mul_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v) -{ - if (isl_int_is_one(v)) - return qp; - - if (qp && isl_int_is_zero(v)) { - isl_qpolynomial *zero; - zero = isl_qpolynomial_zero(isl_dim_copy(qp->dim)); - isl_qpolynomial_free(qp); - return zero; - } - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - qp->upoly = isl_upoly_mul_isl_int(qp->upoly, v); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_scale( - __isl_take isl_qpolynomial *qp, isl_int v) -{ - return isl_qpolynomial_mul_isl_int(qp, v); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - qp1 = isl_qpolynomial_cow(qp1); - - if (!qp1 || !qp2) - goto error; - - if (qp1->div->n_row < qp2->div->n_row) - return isl_qpolynomial_mul(qp2, qp1); - - isl_assert(qp1->dim->ctx, isl_dim_equal(qp1->dim, qp2->dim), goto error); - if (!compatible_divs(qp1->div, qp2->div)) - return with_merged_divs(isl_qpolynomial_mul, qp1, qp2); - - qp1->upoly = isl_upoly_mul(qp1->upoly, isl_upoly_copy(qp2->upoly)); - if (!qp1->upoly) - goto error; - - isl_qpolynomial_free(qp2); - - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_pow(__isl_take isl_qpolynomial *qp, - unsigned power) -{ - qp = isl_qpolynomial_cow(qp); - - if (!qp) - return NULL; - - qp->upoly = isl_upoly_pow(qp->upoly, power); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_zero(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_zero(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_one(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_one(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_infty(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_infty(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_neginfty(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_neginfty(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_nan(__isl_take isl_dim *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_nan(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_cst(__isl_take isl_dim *dim, - isl_int v) -{ - struct isl_qpolynomial *qp; - struct isl_upoly_cst *cst; - - if (!dim) - return NULL; - - qp = isl_qpolynomial_alloc(dim, 0, isl_upoly_zero(dim->ctx)); - if (!qp) - return NULL; - - cst = isl_upoly_as_cst(qp->upoly); - isl_int_set(cst->n, v); - - return qp; -} - -int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp, - isl_int *n, isl_int *d) -{ - struct isl_upoly_cst *cst; - - if (!qp) - return -1; - - if (!isl_upoly_is_cst(qp->upoly)) - return 0; - - cst = isl_upoly_as_cst(qp->upoly); - if (!cst) - return -1; - - if (n) - isl_int_set(*n, cst->n); - if (d) - isl_int_set(*d, cst->d); - - return 1; -} - -int isl_upoly_is_affine(__isl_keep struct isl_upoly *up) -{ - int is_cst; - struct isl_upoly_rec *rec; - - if (!up) - return -1; - - if (up->var < 0) - return 1; - - rec = isl_upoly_as_rec(up); - if (!rec) - return -1; - - if (rec->n > 2) - return 0; - - isl_assert(up->ctx, rec->n > 1, return -1); - - is_cst = isl_upoly_is_cst(rec->p[1]); - if (is_cst < 0) - return -1; - if (!is_cst) - return 0; - - return isl_upoly_is_affine(rec->p[0]); -} - -int isl_qpolynomial_is_affine(__isl_keep isl_qpolynomial *qp) -{ - if (!qp) - return -1; - - if (qp->div->n_row > 0) - return 0; - - return isl_upoly_is_affine(qp->upoly); -} - -static void update_coeff(__isl_keep isl_vec *aff, - __isl_keep struct isl_upoly_cst *cst, int pos) -{ - isl_int gcd; - isl_int f; - - if (isl_int_is_zero(cst->n)) - return; - - isl_int_init(gcd); - isl_int_init(f); - isl_int_gcd(gcd, cst->d, aff->el[0]); - isl_int_divexact(f, cst->d, gcd); - isl_int_divexact(gcd, aff->el[0], gcd); - isl_seq_scale(aff->el, aff->el, f, aff->size); - isl_int_mul(aff->el[1 + pos], gcd, cst->n); - isl_int_clear(gcd); - isl_int_clear(f); -} - -int isl_upoly_update_affine(__isl_keep struct isl_upoly *up, - __isl_keep isl_vec *aff) -{ - struct isl_upoly_cst *cst; - struct isl_upoly_rec *rec; - - if (!up || !aff) - return -1; - - if (up->var < 0) { - struct isl_upoly_cst *cst; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - update_coeff(aff, cst, 0); - return 0; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - return -1; - isl_assert(up->ctx, rec->n == 2, return -1); - - cst = isl_upoly_as_cst(rec->p[1]); - if (!cst) - return -1; - update_coeff(aff, cst, 1 + up->var); - - return isl_upoly_update_affine(rec->p[0], aff); -} - -__isl_give isl_vec *isl_qpolynomial_extract_affine( - __isl_keep isl_qpolynomial *qp) -{ - isl_vec *aff; - unsigned d; - - if (!qp) - return NULL; - - d = isl_dim_total(qp->dim); - aff = isl_vec_alloc(qp->div->ctx, 2 + d + qp->div->n_row); - if (!aff) - return NULL; - - isl_seq_clr(aff->el + 1, 1 + d + qp->div->n_row); - isl_int_set_si(aff->el[0], 1); - - if (isl_upoly_update_affine(qp->upoly, aff) < 0) - goto error; - - return aff; -error: - isl_vec_free(aff); - return NULL; -} - -int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2) -{ - int equal; - - if (!qp1 || !qp2) - return -1; - - equal = isl_dim_equal(qp1->dim, qp2->dim); - if (equal < 0 || !equal) - return equal; - - equal = isl_mat_is_equal(qp1->div, qp2->div); - if (equal < 0 || !equal) - return equal; - - return isl_upoly_is_equal(qp1->upoly, qp2->upoly); -} - -static void upoly_update_den(__isl_keep struct isl_upoly *up, isl_int *d) -{ - int i; - struct isl_upoly_rec *rec; - - if (isl_upoly_is_cst(up)) { - struct isl_upoly_cst *cst; - cst = isl_upoly_as_cst(up); - if (!cst) - return; - isl_int_lcm(*d, *d, cst->d); - return; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - return; - - for (i = 0; i < rec->n; ++i) - upoly_update_den(rec->p[i], d); -} - -void isl_qpolynomial_get_den(__isl_keep isl_qpolynomial *qp, isl_int *d) -{ - isl_int_set_si(*d, 1); - if (!qp) - return; - upoly_update_den(qp->upoly, d); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_var_pow(__isl_take isl_dim *dim, - int pos, int power) -{ - struct isl_ctx *ctx; - - if (!dim) - return NULL; - - ctx = dim->ctx; - - return isl_qpolynomial_alloc(dim, 0, isl_upoly_var_pow(ctx, pos, power)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_var(__isl_take isl_dim *dim, - enum isl_dim_type type, unsigned pos) -{ - if (!dim) - return NULL; - - isl_assert(dim->ctx, isl_dim_size(dim, isl_dim_in) == 0, goto error); - isl_assert(dim->ctx, pos < isl_dim_size(dim, type), goto error); - - if (type == isl_dim_set) - pos += isl_dim_size(dim, isl_dim_param); - - return isl_qpolynomial_var_pow(dim, pos, 1); -error: - isl_dim_free(dim); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_subs(__isl_take struct isl_upoly *up, - unsigned first, unsigned n, __isl_keep struct isl_upoly **subs) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly *base, *res; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return up; - - if (up->var < first) - return up; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - isl_assert(up->ctx, rec->n >= 1, goto error); - - if (up->var >= first + n) - base = isl_upoly_var_pow(up->ctx, up->var, 1); - else - base = isl_upoly_copy(subs[up->var - first]); - - res = isl_upoly_subs(isl_upoly_copy(rec->p[rec->n - 1]), first, n, subs); - for (i = rec->n - 2; i >= 0; --i) { - struct isl_upoly *t; - t = isl_upoly_subs(isl_upoly_copy(rec->p[i]), first, n, subs); - res = isl_upoly_mul(res, isl_upoly_copy(base)); - res = isl_upoly_sum(res, t); - } - - isl_upoly_free(base); - isl_upoly_free(up); - - return res; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_from_affine(isl_ctx *ctx, isl_int *f, - isl_int denom, unsigned len) -{ - int i; - struct isl_upoly *up; - - isl_assert(ctx, len >= 1, return NULL); - - up = isl_upoly_rat_cst(ctx, f[0], denom); - for (i = 0; i < len - 1; ++i) { - struct isl_upoly *t; - struct isl_upoly *c; - - if (isl_int_is_zero(f[1 + i])) - continue; - - c = isl_upoly_rat_cst(ctx, f[1 + i], denom); - t = isl_upoly_var_pow(ctx, i, 1); - t = isl_upoly_mul(c, t); - up = isl_upoly_sum(up, t); - } - - return up; -} - -/* Remove common factor of non-constant terms and denominator. - */ -static void normalize_div(__isl_keep isl_qpolynomial *qp, int div) -{ - isl_ctx *ctx = qp->div->ctx; - unsigned total = qp->div->n_col - 2; - - isl_seq_gcd(qp->div->row[div] + 2, total, &ctx->normalize_gcd); - isl_int_gcd(ctx->normalize_gcd, - ctx->normalize_gcd, qp->div->row[div][0]); - if (isl_int_is_one(ctx->normalize_gcd)) - return; - - isl_seq_scale_down(qp->div->row[div] + 2, qp->div->row[div] + 2, - ctx->normalize_gcd, total); - isl_int_divexact(qp->div->row[div][0], qp->div->row[div][0], - ctx->normalize_gcd); - isl_int_fdiv_q(qp->div->row[div][1], qp->div->row[div][1], - ctx->normalize_gcd); -} - -/* Replace the integer division identified by "div" by the polynomial "s". - * The integer division is assumed not to appear in the definition - * of any other integer divisions. - */ -static __isl_give isl_qpolynomial *substitute_div( - __isl_take isl_qpolynomial *qp, - int div, __isl_take struct isl_upoly *s) -{ - int i; - int total; - int *reordering; - - if (!qp || !s) - goto error; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - - total = isl_dim_total(qp->dim); - qp->upoly = isl_upoly_subs(qp->upoly, total + div, 1, &s); - if (!qp->upoly) - goto error; - - reordering = isl_alloc_array(qp->dim->ctx, int, total + qp->div->n_row); - if (!reordering) - goto error; - for (i = 0; i < total + div; ++i) - reordering[i] = i; - for (i = total + div + 1; i < total + qp->div->n_row; ++i) - reordering[i] = i - 1; - qp->div = isl_mat_drop_rows(qp->div, div, 1); - qp->div = isl_mat_drop_cols(qp->div, 2 + total + div, 1); - qp->upoly = reorder(qp->upoly, reordering); - free(reordering); - - if (!qp->upoly || !qp->div) - goto error; - - isl_upoly_free(s); - return qp; -error: - isl_qpolynomial_free(qp); - isl_upoly_free(s); - return NULL; -} - -/* Replace all integer divisions [e/d] that turn out to not actually be integer - * divisions because d is equal to 1 by their definition, i.e., e. - */ -static __isl_give isl_qpolynomial *substitute_non_divs( - __isl_take isl_qpolynomial *qp) -{ - int i, j; - int total; - struct isl_upoly *s; - - if (!qp) - return NULL; - - total = isl_dim_total(qp->dim); - for (i = 0; qp && i < qp->div->n_row; ++i) { - if (!isl_int_is_one(qp->div->row[i][0])) - continue; - for (j = i + 1; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + total + i])) - continue; - isl_seq_combine(qp->div->row[j] + 1, - qp->div->ctx->one, qp->div->row[j] + 1, - qp->div->row[j][2 + total + i], - qp->div->row[i] + 1, 1 + total + i); - isl_int_set_si(qp->div->row[j][2 + total + i], 0); - normalize_div(qp, j); - } - s = isl_upoly_from_affine(qp->dim->ctx, qp->div->row[i] + 1, - qp->div->row[i][0], qp->div->n_col - 1); - qp = substitute_div(qp, i, s); - --i; - } - - return qp; -} - -/* Reduce the coefficients of div "div" to lie in the interval [0, d-1], - * with d the denominator. When replacing the coefficient e of x by - * d * frac(e/d) = e - d * floor(e/d), we are subtracting d * floor(e/d) * x - * inside the division, so we need to add floor(e/d) * x outside. - * That is, we replace q by q' + floor(e/d) * x and we therefore need - * to adjust the coefficient of x in each later div that depends on the - * current div "div" and also in the affine expression "aff" - * (if it too depends on "div"). - */ -static void reduce_div(__isl_keep isl_qpolynomial *qp, int div, - __isl_keep isl_vec *aff) -{ - int i, j; - isl_int v; - unsigned total = qp->div->n_col - qp->div->n_row - 2; - - isl_int_init(v); - for (i = 0; i < 1 + total + div; ++i) { - if (isl_int_is_nonneg(qp->div->row[div][1 + i]) && - isl_int_lt(qp->div->row[div][1 + i], qp->div->row[div][0])) - continue; - isl_int_fdiv_q(v, qp->div->row[div][1 + i], qp->div->row[div][0]); - isl_int_fdiv_r(qp->div->row[div][1 + i], - qp->div->row[div][1 + i], qp->div->row[div][0]); - if (!isl_int_is_zero(aff->el[1 + total + div])) - isl_int_addmul(aff->el[i], v, aff->el[1 + total + div]); - for (j = div + 1; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + total + div])) - continue; - isl_int_addmul(qp->div->row[j][1 + i], - v, qp->div->row[j][2 + total + div]); - } - } - isl_int_clear(v); -} - -/* Check if the last non-zero coefficient is bigger that half of the - * denominator. If so, we will invert the div to further reduce the number - * of distinct divs that may appear. - * If the last non-zero coefficient is exactly half the denominator, - * then we continue looking for earlier coefficients that are bigger - * than half the denominator. - */ -static int needs_invert(__isl_keep isl_mat *div, int row) -{ - int i; - int cmp; - - for (i = div->n_col - 1; i >= 1; --i) { - if (isl_int_is_zero(div->row[row][i])) - continue; - isl_int_mul_ui(div->row[row][i], div->row[row][i], 2); - cmp = isl_int_cmp(div->row[row][i], div->row[row][0]); - isl_int_divexact_ui(div->row[row][i], div->row[row][i], 2); - if (cmp) - return cmp > 0; - if (i == 1) - return 1; - } - - return 0; -} - -/* Replace div "div" q = [e/d] by -[(-e+(d-1))/d]. - * We only invert the coefficients of e (and the coefficient of q in - * later divs and in "aff"). After calling this function, the - * coefficients of e should be reduced again. - */ -static void invert_div(__isl_keep isl_qpolynomial *qp, int div, - __isl_keep isl_vec *aff) -{ - unsigned total = qp->div->n_col - qp->div->n_row - 2; - - isl_seq_neg(qp->div->row[div] + 1, - qp->div->row[div] + 1, qp->div->n_col - 1); - isl_int_sub_ui(qp->div->row[div][1], qp->div->row[div][1], 1); - isl_int_add(qp->div->row[div][1], - qp->div->row[div][1], qp->div->row[div][0]); - if (!isl_int_is_zero(aff->el[1 + total + div])) - isl_int_neg(aff->el[1 + total + div], aff->el[1 + total + div]); - isl_mat_col_mul(qp->div, 2 + total + div, - qp->div->ctx->negone, 2 + total + div); -} - -/* Assuming "qp" is a monomial, reduce all its divs to have coefficients - * in the interval [0, d-1], with d the denominator and such that the - * last non-zero coefficient that is not equal to d/2 is smaller than d/2. - * - * After the reduction, some divs may have become redundant or identical, - * so we call substitute_non_divs and sort_divs. If these functions - * eliminate divs or merge two or more divs into one, the coefficients - * of the enclosing divs may have to be reduced again, so we call - * ourselves recursively if the number of divs decreases. - */ -static __isl_give isl_qpolynomial *reduce_divs(__isl_take isl_qpolynomial *qp) -{ - int i; - isl_vec *aff = NULL; - struct isl_upoly *s; - unsigned n_div; - - if (!qp) - return NULL; - - aff = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1); - aff = isl_vec_clr(aff); - if (!aff) - goto error; - - isl_int_set_si(aff->el[1 + qp->upoly->var], 1); - - for (i = 0; i < qp->div->n_row; ++i) { - normalize_div(qp, i); - reduce_div(qp, i, aff); - if (needs_invert(qp->div, i)) { - invert_div(qp, i, aff); - reduce_div(qp, i, aff); - } - } - - s = isl_upoly_from_affine(qp->div->ctx, aff->el, - qp->div->ctx->one, aff->size); - qp->upoly = isl_upoly_subs(qp->upoly, qp->upoly->var, 1, &s); - isl_upoly_free(s); - if (!qp->upoly) - goto error; - - isl_vec_free(aff); - - n_div = qp->div->n_row; - qp = substitute_non_divs(qp); - qp = sort_divs(qp); - if (qp && qp->div->n_row < n_div) - return reduce_divs(qp); - - return qp; -error: - isl_qpolynomial_free(qp); - isl_vec_free(aff); - return NULL; -} - -/* Assumes each div only depends on earlier divs. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_div_pow(__isl_take isl_div *div, - int power) -{ - struct isl_qpolynomial *qp = NULL; - struct isl_upoly_rec *rec; - struct isl_upoly_cst *cst; - int i, d; - int pos; - - if (!div) - return NULL; - - d = div->line - div->bmap->div; - - pos = isl_dim_total(div->bmap->dim) + d; - rec = isl_upoly_alloc_rec(div->ctx, pos, 1 + power); - qp = isl_qpolynomial_alloc(isl_basic_map_get_dim(div->bmap), - div->bmap->n_div, &rec->up); - if (!qp) - goto error; - - for (i = 0; i < div->bmap->n_div; ++i) - isl_seq_cpy(qp->div->row[i], div->bmap->div[i], qp->div->n_col); - - for (i = 0; i < 1 + power; ++i) { - rec->p[i] = isl_upoly_zero(div->ctx); - if (!rec->p[i]) - goto error; - rec->n++; - } - cst = isl_upoly_as_cst(rec->p[power]); - isl_int_set_si(cst->n, 1); - - isl_div_free(div); - - qp = reduce_divs(qp); - - return qp; -error: - isl_qpolynomial_free(qp); - isl_div_free(div); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_div(__isl_take isl_div *div) -{ - return isl_qpolynomial_div_pow(div, 1); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_rat_cst(__isl_take isl_dim *dim, - const isl_int n, const isl_int d) -{ - struct isl_qpolynomial *qp; - struct isl_upoly_cst *cst; - - qp = isl_qpolynomial_alloc(dim, 0, isl_upoly_zero(dim->ctx)); - if (!qp) - return NULL; - - cst = isl_upoly_as_cst(qp->upoly); - isl_int_set(cst->n, n); - isl_int_set(cst->d, d); - - return qp; -} - -static int up_set_active(__isl_keep struct isl_upoly *up, int *active, int d) -{ - struct isl_upoly_rec *rec; - int i; - - if (!up) - return -1; - - if (isl_upoly_is_cst(up)) - return 0; - - if (up->var < d) - active[up->var] = 1; - - rec = isl_upoly_as_rec(up); - for (i = 0; i < rec->n; ++i) - if (up_set_active(rec->p[i], active, d) < 0) - return -1; - - return 0; -} - -static int set_active(__isl_keep isl_qpolynomial *qp, int *active) -{ - int i, j; - int d = isl_dim_total(qp->dim); - - if (!qp || !active) - return -1; - - for (i = 0; i < d; ++i) - for (j = 0; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + i])) - continue; - active[i] = 1; - break; - } - - return up_set_active(qp->upoly, active, d); -} - -int isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - int *active = NULL; - int involves = 0; - - if (!qp) - return -1; - if (n == 0) - return 0; - - isl_assert(qp->dim->ctx, first + n <= isl_dim_size(qp->dim, type), - return -1); - isl_assert(qp->dim->ctx, type == isl_dim_param || - type == isl_dim_set, return -1); - - active = isl_calloc_array(qp->dim->ctx, int, isl_dim_total(qp->dim)); - if (set_active(qp, active) < 0) - goto error; - - if (type == isl_dim_set) - first += isl_dim_size(qp->dim, isl_dim_param); - for (i = 0; i < n; ++i) - if (active[first + i]) { - involves = 1; - break; - } - - free(active); - - return involves; -error: - free(active); - return -1; -} - -/* Remove divs that do not appear in the quasi-polynomial, nor in any - * of the divs that do appear in the quasi-polynomial. - */ -static __isl_give isl_qpolynomial *remove_redundant_divs( - __isl_take isl_qpolynomial *qp) -{ - int i, j; - int d; - int len; - int skip; - int *active = NULL; - int *reordering = NULL; - int redundant = 0; - int n_div; - isl_ctx *ctx; - - if (!qp) - return NULL; - if (qp->div->n_row == 0) - return qp; - - d = isl_dim_total(qp->dim); - len = qp->div->n_col - 2; - ctx = isl_qpolynomial_get_ctx(qp); - active = isl_calloc_array(ctx, int, len); - if (!active) - goto error; - - if (up_set_active(qp->upoly, active, len) < 0) - goto error; - - for (i = qp->div->n_row - 1; i >= 0; --i) { - if (!active[d + i]) { - redundant = 1; - continue; - } - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(qp->div->row[i][2 + d + j])) - continue; - active[d + j] = 1; - break; - } - } - - if (!redundant) { - free(active); - return qp; - } - - reordering = isl_alloc_array(qp->div->ctx, int, len); - if (!reordering) - goto error; - - for (i = 0; i < d; ++i) - reordering[i] = i; - - skip = 0; - n_div = qp->div->n_row; - for (i = 0; i < n_div; ++i) { - if (!active[d + i]) { - qp->div = isl_mat_drop_rows(qp->div, i - skip, 1); - qp->div = isl_mat_drop_cols(qp->div, - 2 + d + i - skip, 1); - skip++; - } - reordering[d + i] = d + i - skip; - } - - qp->upoly = reorder(qp->upoly, reordering); - - if (!qp->upoly || !qp->div) - goto error; - - free(active); - free(reordering); - - return qp; -error: - free(active); - free(reordering); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_drop(__isl_take struct isl_upoly *up, - unsigned first, unsigned n) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - if (n == 0 || up->var < 0 || up->var < first) - return up; - if (up->var < first + n) { - up = replace_by_constant_term(up); - return isl_upoly_drop(up, first, n); - } - up = isl_upoly_cow(up); - if (!up) - return NULL; - up->var -= n; - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = isl_upoly_drop(rec->p[i], first, n); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned pos, const char *s) -{ - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - qp->dim = isl_dim_set_name(qp->dim, type, pos, s); - if (!qp->dim) - goto error; - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_drop_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n) -{ - if (!qp) - return NULL; - if (n == 0 && !isl_dim_is_named_or_nested(qp->dim, type)) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - isl_assert(qp->dim->ctx, first + n <= isl_dim_size(qp->dim, type), - goto error); - isl_assert(qp->dim->ctx, type == isl_dim_param || - type == isl_dim_set, goto error); - - qp->dim = isl_dim_drop(qp->dim, type, first, n); - if (!qp->dim) - goto error; - - if (type == isl_dim_set) - first += isl_dim_size(qp->dim, isl_dim_param); - - qp->div = isl_mat_drop_cols(qp->div, 2 + first, n); - if (!qp->div) - goto error; - - qp->upoly = isl_upoly_drop(qp->upoly, first, n); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_substitute_equalities( - __isl_take isl_qpolynomial *qp, __isl_take isl_basic_set *eq) -{ - int i, j, k; - isl_int denom; - unsigned total; - unsigned n_div; - struct isl_upoly *up; - - if (!eq) - goto error; - if (eq->n_eq == 0) { - isl_basic_set_free(eq); - return qp; - } - - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - qp->div = isl_mat_cow(qp->div); - if (!qp->div) - goto error; - - total = 1 + isl_dim_total(eq->dim); - n_div = eq->n_div; - isl_int_init(denom); - for (i = 0; i < eq->n_eq; ++i) { - j = isl_seq_last_non_zero(eq->eq[i], total + n_div); - if (j < 0 || j == 0 || j >= total) - continue; - - for (k = 0; k < qp->div->n_row; ++k) { - if (isl_int_is_zero(qp->div->row[k][1 + j])) - continue; - isl_seq_elim(qp->div->row[k] + 1, eq->eq[i], j, total, - &qp->div->row[k][0]); - normalize_div(qp, k); - } - - if (isl_int_is_pos(eq->eq[i][j])) - isl_seq_neg(eq->eq[i], eq->eq[i], total); - isl_int_abs(denom, eq->eq[i][j]); - isl_int_set_si(eq->eq[i][j], 0); - - up = isl_upoly_from_affine(qp->dim->ctx, - eq->eq[i], denom, total); - qp->upoly = isl_upoly_subs(qp->upoly, j - 1, 1, &up); - isl_upoly_free(up); - } - isl_int_clear(denom); - - if (!qp->upoly) - goto error; - - isl_basic_set_free(eq); - - qp = substitute_non_divs(qp); - qp = sort_divs(qp); - - return qp; -error: - isl_basic_set_free(eq); - isl_qpolynomial_free(qp); - return NULL; -} - -static __isl_give isl_basic_set *add_div_constraints( - __isl_take isl_basic_set *bset, __isl_take isl_mat *div) -{ - int i; - unsigned total; - - if (!bset || !div) - goto error; - - bset = isl_basic_set_extend_constraints(bset, 0, 2 * div->n_row); - if (!bset) - goto error; - total = isl_basic_set_total_dim(bset); - for (i = 0; i < div->n_row; ++i) - if (isl_basic_set_add_div_constraints_var(bset, - total - div->n_row + i, div->row[i]) < 0) - goto error; - - isl_mat_free(div); - return bset; -error: - isl_mat_free(div); - isl_basic_set_free(bset); - return NULL; -} - -/* Look for equalities among the variables shared by context and qp - * and the integer divisions of qp, if any. - * The equalities are then used to eliminate variables and/or integer - * divisions from qp. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_gist( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *context) -{ - isl_basic_set *aff; - - if (!qp) - goto error; - if (qp->div->n_row > 0) { - isl_basic_set *bset; - context = isl_set_add_dims(context, isl_dim_set, - qp->div->n_row); - bset = isl_basic_set_universe(isl_set_get_dim(context)); - bset = add_div_constraints(bset, isl_mat_copy(qp->div)); - context = isl_set_intersect(context, - isl_set_from_basic_set(bset)); - } - - aff = isl_set_affine_hull(context); - return isl_qpolynomial_substitute_equalities(qp, aff); -error: - isl_qpolynomial_free(qp); - isl_set_free(context); - return NULL; -} - -#undef PW -#define PW isl_pw_qpolynomial -#undef EL -#define EL isl_qpolynomial -#undef EL_IS_ZERO -#define EL_IS_ZERO is_zero -#undef ZERO -#define ZERO zero -#undef IS_ZERO -#define IS_ZERO is_zero -#undef FIELD -#define FIELD qp - -#include - -#undef UNION -#define UNION isl_union_pw_qpolynomial -#undef PART -#define PART isl_pw_qpolynomial -#undef PARTS -#define PARTS pw_qpolynomial - -#include - -int isl_pw_qpolynomial_is_one(__isl_keep isl_pw_qpolynomial *pwqp) -{ - if (!pwqp) - return -1; - - if (pwqp->n != -1) - return 0; - - if (!isl_set_plain_is_universe(pwqp->p[0].set)) - return 0; - - return isl_qpolynomial_is_one(pwqp->p[0].qp); -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2) -{ - int i, j, n; - struct isl_pw_qpolynomial *res; - - if (!pwqp1 || !pwqp2) - goto error; - - isl_assert(pwqp1->dim->ctx, isl_dim_equal(pwqp1->dim, pwqp2->dim), - goto error); - - if (isl_pw_qpolynomial_is_zero(pwqp1)) { - isl_pw_qpolynomial_free(pwqp2); - return pwqp1; - } - - if (isl_pw_qpolynomial_is_zero(pwqp2)) { - isl_pw_qpolynomial_free(pwqp1); - return pwqp2; - } - - if (isl_pw_qpolynomial_is_one(pwqp1)) { - isl_pw_qpolynomial_free(pwqp1); - return pwqp2; - } - - if (isl_pw_qpolynomial_is_one(pwqp2)) { - isl_pw_qpolynomial_free(pwqp2); - return pwqp1; - } - - n = pwqp1->n * pwqp2->n; - res = isl_pw_qpolynomial_alloc_(isl_dim_copy(pwqp1->dim), n); - - for (i = 0; i < pwqp1->n; ++i) { - for (j = 0; j < pwqp2->n; ++j) { - struct isl_set *common; - struct isl_qpolynomial *prod; - common = isl_set_intersect(isl_set_copy(pwqp1->p[i].set), - isl_set_copy(pwqp2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - prod = isl_qpolynomial_mul( - isl_qpolynomial_copy(pwqp1->p[i].qp), - isl_qpolynomial_copy(pwqp2->p[j].qp)); - - res = isl_pw_qpolynomial_add_piece(res, common, prod); - } - } - - isl_pw_qpolynomial_free(pwqp1); - isl_pw_qpolynomial_free(pwqp2); - - return res; -error: - isl_pw_qpolynomial_free(pwqp1); - isl_pw_qpolynomial_free(pwqp2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_eval( - __isl_take struct isl_upoly *up, __isl_take isl_vec *vec) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly *res; - struct isl_upoly *base; - - if (isl_upoly_is_cst(up)) { - isl_vec_free(vec); - return up; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - isl_assert(up->ctx, rec->n >= 1, goto error); - - base = isl_upoly_rat_cst(up->ctx, vec->el[1 + up->var], vec->el[0]); - - res = isl_upoly_eval(isl_upoly_copy(rec->p[rec->n - 1]), - isl_vec_copy(vec)); - - for (i = rec->n - 2; i >= 0; --i) { - res = isl_upoly_mul(res, isl_upoly_copy(base)); - res = isl_upoly_sum(res, - isl_upoly_eval(isl_upoly_copy(rec->p[i]), - isl_vec_copy(vec))); - } - - isl_upoly_free(base); - isl_upoly_free(up); - isl_vec_free(vec); - return res; -error: - isl_upoly_free(up); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_eval( - __isl_take isl_qpolynomial *qp, __isl_take isl_point *pnt) -{ - isl_vec *ext; - struct isl_upoly *up; - isl_dim *dim; - - if (!qp || !pnt) - goto error; - isl_assert(pnt->dim->ctx, isl_dim_equal(pnt->dim, qp->dim), goto error); - - if (qp->div->n_row == 0) - ext = isl_vec_copy(pnt->vec); - else { - int i; - unsigned dim = isl_dim_total(qp->dim); - ext = isl_vec_alloc(qp->dim->ctx, 1 + dim + qp->div->n_row); - if (!ext) - goto error; - - isl_seq_cpy(ext->el, pnt->vec->el, pnt->vec->size); - for (i = 0; i < qp->div->n_row; ++i) { - isl_seq_inner_product(qp->div->row[i] + 1, ext->el, - 1 + dim + i, &ext->el[1+dim+i]); - isl_int_fdiv_q(ext->el[1+dim+i], ext->el[1+dim+i], - qp->div->row[i][0]); - } - } - - up = isl_upoly_eval(isl_upoly_copy(qp->upoly), ext); - if (!up) - goto error; - - dim = isl_dim_copy(qp->dim); - isl_qpolynomial_free(qp); - isl_point_free(pnt); - - return isl_qpolynomial_alloc(dim, 0, up); -error: - isl_qpolynomial_free(qp); - isl_point_free(pnt); - return NULL; -} - -int isl_upoly_cmp(__isl_keep struct isl_upoly_cst *cst1, - __isl_keep struct isl_upoly_cst *cst2) -{ - int cmp; - isl_int t; - isl_int_init(t); - isl_int_mul(t, cst1->n, cst2->d); - isl_int_submul(t, cst2->n, cst1->d); - cmp = isl_int_sgn(t); - isl_int_clear(t); - return cmp; -} - -int isl_qpolynomial_le_cst(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2) -{ - struct isl_upoly_cst *cst1, *cst2; - - if (!qp1 || !qp2) - return -1; - isl_assert(qp1->dim->ctx, isl_upoly_is_cst(qp1->upoly), return -1); - isl_assert(qp2->dim->ctx, isl_upoly_is_cst(qp2->upoly), return -1); - if (isl_qpolynomial_is_nan(qp1)) - return -1; - if (isl_qpolynomial_is_nan(qp2)) - return -1; - cst1 = isl_upoly_as_cst(qp1->upoly); - cst2 = isl_upoly_as_cst(qp2->upoly); - - return isl_upoly_cmp(cst1, cst2) <= 0; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_min_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) -{ - struct isl_upoly_cst *cst1, *cst2; - int cmp; - - if (!qp1 || !qp2) - goto error; - isl_assert(qp1->dim->ctx, isl_upoly_is_cst(qp1->upoly), goto error); - isl_assert(qp2->dim->ctx, isl_upoly_is_cst(qp2->upoly), goto error); - cst1 = isl_upoly_as_cst(qp1->upoly); - cst2 = isl_upoly_as_cst(qp2->upoly); - cmp = isl_upoly_cmp(cst1, cst2); - - if (cmp <= 0) { - isl_qpolynomial_free(qp2); - } else { - isl_qpolynomial_free(qp1); - qp1 = qp2; - } - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_max_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) -{ - struct isl_upoly_cst *cst1, *cst2; - int cmp; - - if (!qp1 || !qp2) - goto error; - isl_assert(qp1->dim->ctx, isl_upoly_is_cst(qp1->upoly), goto error); - isl_assert(qp2->dim->ctx, isl_upoly_is_cst(qp2->upoly), goto error); - cst1 = isl_upoly_as_cst(qp1->upoly); - cst2 = isl_upoly_as_cst(qp2->upoly); - cmp = isl_upoly_cmp(cst1, cst2); - - if (cmp >= 0) { - isl_qpolynomial_free(qp2); - } else { - isl_qpolynomial_free(qp1); - qp1 = qp2; - } - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_insert_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, - unsigned first, unsigned n) -{ - unsigned total; - unsigned g_pos; - int *exp; - - if (n == 0 && !isl_dim_is_named_or_nested(qp->dim, type)) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - isl_assert(qp->div->ctx, first <= isl_dim_size(qp->dim, type), - goto error); - - g_pos = pos(qp->dim, type) + first; - - qp->div = isl_mat_insert_zero_cols(qp->div, 2 + g_pos, n); - if (!qp->div) - goto error; - - total = qp->div->n_col - 2; - if (total > g_pos) { - int i; - exp = isl_alloc_array(qp->div->ctx, int, total - g_pos); - if (!exp) - goto error; - for (i = 0; i < total - g_pos; ++i) - exp[i] = i + n; - qp->upoly = expand(qp->upoly, exp, g_pos); - free(exp); - if (!qp->upoly) - goto error; - } - - qp->dim = isl_dim_insert(qp->dim, type, first, n); - if (!qp->dim) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_qpolynomial_dim(qp, type); - - return isl_qpolynomial_insert_dims(qp, type, pos, n); -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_pw_qpolynomial_dim(pwqp, type); - - return isl_pw_qpolynomial_insert_dims(pwqp, type, pos, n); -} - -static int *reordering_move(isl_ctx *ctx, - unsigned len, unsigned dst, unsigned src, unsigned n) -{ - int i; - int *reordering; - - reordering = isl_alloc_array(ctx, int, len); - if (!reordering) - return NULL; - - if (dst <= src) { - for (i = 0; i < dst; ++i) - reordering[i] = i; - for (i = 0; i < n; ++i) - reordering[src + i] = dst + i; - for (i = 0; i < src - dst; ++i) - reordering[dst + i] = dst + n + i; - for (i = 0; i < len - src - n; ++i) - reordering[src + n + i] = src + n + i; - } else { - for (i = 0; i < src; ++i) - reordering[i] = i; - for (i = 0; i < n; ++i) - reordering[src + i] = dst + i; - for (i = 0; i < dst - src; ++i) - reordering[src + n + i] = src + i; - for (i = 0; i < len - dst - n; ++i) - reordering[dst + n + i] = dst + n + i; - } - - return reordering; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_move_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - unsigned g_dst_pos; - unsigned g_src_pos; - int *reordering; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - isl_assert(qp->dim->ctx, src_pos + n <= isl_dim_size(qp->dim, src_type), - goto error); - - g_dst_pos = pos(qp->dim, dst_type) + dst_pos; - g_src_pos = pos(qp->dim, src_type) + src_pos; - if (dst_type > src_type) - g_dst_pos -= n; - - qp->div = isl_mat_move_cols(qp->div, 2 + g_dst_pos, 2 + g_src_pos, n); - if (!qp->div) - goto error; - qp = sort_divs(qp); - if (!qp) - goto error; - - reordering = reordering_move(qp->dim->ctx, - qp->div->n_col - 2, g_dst_pos, g_src_pos, n); - if (!reordering) - goto error; - - qp->upoly = reorder(qp->upoly, reordering); - free(reordering); - if (!qp->upoly) - goto error; - - qp->dim = isl_dim_move(qp->dim, dst_type, dst_pos, src_type, src_pos, n); - if (!qp->dim) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_affine(__isl_take isl_dim *dim, - isl_int *f, isl_int denom) -{ - struct isl_upoly *up; - - if (!dim) - return NULL; - - up = isl_upoly_from_affine(dim->ctx, f, denom, 1 + isl_dim_total(dim)); - - return isl_qpolynomial_alloc(dim, 0, up); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_aff(__isl_take isl_aff *aff) -{ - isl_ctx *ctx; - struct isl_upoly *up; - isl_qpolynomial *qp; - - if (!aff) - return NULL; - - ctx = isl_aff_get_ctx(aff); - up = isl_upoly_from_affine(ctx, aff->v->el + 1, aff->v->el[0], - aff->v->size - 1); - - qp = isl_qpolynomial_alloc(isl_aff_get_dim(aff), - aff->ls->div->n_row, up); - if (!qp) - goto error; - - isl_mat_free(qp->div); - qp->div = isl_mat_copy(aff->ls->div); - qp->div = isl_mat_cow(qp->div); - if (!qp->div) - goto error; - - isl_aff_free(aff); - qp = reduce_divs(qp); - qp = remove_redundant_divs(qp); - return qp; -error: - isl_aff_free(aff); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_constraint( - __isl_take isl_constraint *c, enum isl_dim_type type, unsigned pos) -{ - isl_aff *aff; - - aff = isl_constraint_get_bound(c, type, pos); - isl_constraint_free(c); - return isl_qpolynomial_from_aff(aff); -} - -/* For each 0 <= i < "n", replace variable "first" + i of type "type" - * in "qp" by subs[i]. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_substitute( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs) -{ - int i; - struct isl_upoly **ups; - - if (n == 0) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - for (i = 0; i < n; ++i) - if (!subs[i]) - goto error; - - isl_assert(qp->dim->ctx, first + n <= isl_dim_size(qp->dim, type), - goto error); - - for (i = 0; i < n; ++i) - isl_assert(qp->dim->ctx, isl_dim_equal(qp->dim, subs[i]->dim), - goto error); - - isl_assert(qp->dim->ctx, qp->div->n_row == 0, goto error); - for (i = 0; i < n; ++i) - isl_assert(qp->dim->ctx, subs[i]->div->n_row == 0, goto error); - - first += pos(qp->dim, type); - - ups = isl_alloc_array(qp->dim->ctx, struct isl_upoly *, n); - if (!ups) - goto error; - for (i = 0; i < n; ++i) - ups[i] = subs[i]->upoly; - - qp->upoly = isl_upoly_subs(qp->upoly, first, n, ups); - - free(ups); - - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -/* Extend "bset" with extra set dimensions for each integer division - * in "qp" and then call "fn" with the extended bset and the polynomial - * that results from replacing each of the integer divisions by the - * corresponding extra set dimension. - */ -int isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial *qp, - __isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user), void *user) -{ - isl_dim *dim; - isl_mat *div; - isl_qpolynomial *poly; - - if (!qp || !bset) - goto error; - if (qp->div->n_row == 0) - return fn(isl_basic_set_copy(bset), isl_qpolynomial_copy(qp), - user); - - div = isl_mat_copy(qp->div); - dim = isl_dim_copy(qp->dim); - dim = isl_dim_add(dim, isl_dim_set, qp->div->n_row); - poly = isl_qpolynomial_alloc(dim, 0, isl_upoly_copy(qp->upoly)); - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_add(bset, isl_dim_set, qp->div->n_row); - bset = add_div_constraints(bset, div); - - return fn(bset, poly, user); -error: - return -1; -} - -/* Return total degree in variables first (inclusive) up to last (exclusive). - */ -int isl_upoly_degree(__isl_keep struct isl_upoly *up, int first, int last) -{ - int deg = -1; - int i; - struct isl_upoly_rec *rec; - - if (!up) - return -2; - if (isl_upoly_is_zero(up)) - return -1; - if (isl_upoly_is_cst(up) || up->var < first) - return 0; - - rec = isl_upoly_as_rec(up); - if (!rec) - return -2; - - for (i = 0; i < rec->n; ++i) { - int d; - - if (isl_upoly_is_zero(rec->p[i])) - continue; - d = isl_upoly_degree(rec->p[i], first, last); - if (up->var < last) - d += i; - if (d > deg) - deg = d; - } - - return deg; -} - -/* Return total degree in set variables. - */ -int isl_qpolynomial_degree(__isl_keep isl_qpolynomial *poly) -{ - unsigned ovar; - unsigned nvar; - - if (!poly) - return -2; - - ovar = isl_dim_offset(poly->dim, isl_dim_set); - nvar = isl_dim_size(poly->dim, isl_dim_set); - return isl_upoly_degree(poly->upoly, ovar, ovar + nvar); -} - -__isl_give struct isl_upoly *isl_upoly_coeff(__isl_keep struct isl_upoly *up, - unsigned pos, int deg) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up) || up->var < pos) { - if (deg == 0) - return isl_upoly_copy(up); - else - return isl_upoly_zero(up->ctx); - } - - rec = isl_upoly_as_rec(up); - if (!rec) - return NULL; - - if (up->var == pos) { - if (deg < rec->n) - return isl_upoly_copy(rec->p[deg]); - else - return isl_upoly_zero(up->ctx); - } - - up = isl_upoly_copy(up); - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - struct isl_upoly *t; - t = isl_upoly_coeff(rec->p[i], pos, deg); - if (!t) - goto error; - isl_upoly_free(rec->p[i]); - rec->p[i] = t; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -/* Return coefficient of power "deg" of variable "t_pos" of type "type". - */ -__isl_give isl_qpolynomial *isl_qpolynomial_coeff( - __isl_keep isl_qpolynomial *qp, - enum isl_dim_type type, unsigned t_pos, int deg) -{ - unsigned g_pos; - struct isl_upoly *up; - isl_qpolynomial *c; - - if (!qp) - return NULL; - - isl_assert(qp->div->ctx, t_pos < isl_dim_size(qp->dim, type), - return NULL); - - g_pos = pos(qp->dim, type) + t_pos; - up = isl_upoly_coeff(qp->upoly, g_pos, deg); - - c = isl_qpolynomial_alloc(isl_dim_copy(qp->dim), qp->div->n_row, up); - if (!c) - return NULL; - isl_mat_free(c->div); - c->div = isl_mat_copy(qp->div); - if (!c->div) - goto error; - return c; -error: - isl_qpolynomial_free(c); - return NULL; -} - -/* Homogenize the polynomial in the variables first (inclusive) up to - * last (exclusive) by inserting powers of variable first. - * Variable first is assumed not to appear in the input. - */ -__isl_give struct isl_upoly *isl_upoly_homogenize( - __isl_take struct isl_upoly *up, int deg, int target, - int first, int last) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - if (isl_upoly_is_zero(up)) - return up; - if (deg == target) - return up; - if (isl_upoly_is_cst(up) || up->var < first) { - struct isl_upoly *hom; - - hom = isl_upoly_var_pow(up->ctx, first, target - deg); - if (!hom) - goto error; - rec = isl_upoly_as_rec(hom); - rec->p[target - deg] = isl_upoly_mul(rec->p[target - deg], up); - - return hom; - } - - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - if (isl_upoly_is_zero(rec->p[i])) - continue; - rec->p[i] = isl_upoly_homogenize(rec->p[i], - up->var < last ? deg + i : i, target, - first, last); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -/* Homogenize the polynomial in the set variables by introducing - * powers of an extra set variable at position 0. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_homogenize( - __isl_take isl_qpolynomial *poly) -{ - unsigned ovar; - unsigned nvar; - int deg = isl_qpolynomial_degree(poly); - - if (deg < -1) - goto error; - - poly = isl_qpolynomial_insert_dims(poly, isl_dim_set, 0, 1); - poly = isl_qpolynomial_cow(poly); - if (!poly) - goto error; - - ovar = isl_dim_offset(poly->dim, isl_dim_set); - nvar = isl_dim_size(poly->dim, isl_dim_set); - poly->upoly = isl_upoly_homogenize(poly->upoly, 0, deg, - ovar, ovar + nvar); - if (!poly->upoly) - goto error; - - return poly; -error: - isl_qpolynomial_free(poly); - return NULL; -} - -__isl_give isl_term *isl_term_alloc(__isl_take isl_dim *dim, - __isl_take isl_mat *div) -{ - isl_term *term; - int n; - - if (!dim || !div) - goto error; - - n = isl_dim_total(dim) + div->n_row; - - term = isl_calloc(dim->ctx, struct isl_term, - sizeof(struct isl_term) + (n - 1) * sizeof(int)); - if (!term) - goto error; - - term->ref = 1; - term->dim = dim; - term->div = div; - isl_int_init(term->n); - isl_int_init(term->d); - - return term; -error: - isl_dim_free(dim); - isl_mat_free(div); - return NULL; -} - -__isl_give isl_term *isl_term_copy(__isl_keep isl_term *term) -{ - if (!term) - return NULL; - - term->ref++; - return term; -} - -__isl_give isl_term *isl_term_dup(__isl_keep isl_term *term) -{ - int i; - isl_term *dup; - unsigned total; - - if (term) - return NULL; - - total = isl_dim_total(term->dim) + term->div->n_row; - - dup = isl_term_alloc(isl_dim_copy(term->dim), isl_mat_copy(term->div)); - if (!dup) - return NULL; - - isl_int_set(dup->n, term->n); - isl_int_set(dup->d, term->d); - - for (i = 0; i < total; ++i) - dup->pow[i] = term->pow[i]; - - return dup; -} - -__isl_give isl_term *isl_term_cow(__isl_take isl_term *term) -{ - if (!term) - return NULL; - - if (term->ref == 1) - return term; - term->ref--; - return isl_term_dup(term); -} - -void isl_term_free(__isl_take isl_term *term) -{ - if (!term) - return; - - if (--term->ref > 0) - return; - - isl_dim_free(term->dim); - isl_mat_free(term->div); - isl_int_clear(term->n); - isl_int_clear(term->d); - free(term); -} - -unsigned isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type) -{ - if (!term) - return 0; - - switch (type) { - case isl_dim_param: - case isl_dim_in: - case isl_dim_out: return isl_dim_size(term->dim, type); - case isl_dim_div: return term->div->n_row; - case isl_dim_all: return isl_dim_total(term->dim) + term->div->n_row; - default: return 0; - } -} - -isl_ctx *isl_term_get_ctx(__isl_keep isl_term *term) -{ - return term ? term->dim->ctx : NULL; -} - -void isl_term_get_num(__isl_keep isl_term *term, isl_int *n) -{ - if (!term) - return; - isl_int_set(*n, term->n); -} - -void isl_term_get_den(__isl_keep isl_term *term, isl_int *d) -{ - if (!term) - return; - isl_int_set(*d, term->d); -} - -int isl_term_get_exp(__isl_keep isl_term *term, - enum isl_dim_type type, unsigned pos) -{ - if (!term) - return -1; - - isl_assert(term->dim->ctx, pos < isl_term_dim(term, type), return -1); - - if (type >= isl_dim_set) - pos += isl_dim_size(term->dim, isl_dim_param); - if (type >= isl_dim_div) - pos += isl_dim_size(term->dim, isl_dim_set); - - return term->pow[pos]; -} - -__isl_give isl_div *isl_term_get_div(__isl_keep isl_term *term, unsigned pos) -{ - isl_basic_map *bmap; - unsigned total; - int k; - - if (!term) - return NULL; - - isl_assert(term->dim->ctx, pos < isl_term_dim(term, isl_dim_div), - return NULL); - - total = term->div->n_col - term->div->n_row - 2; - /* No nested divs for now */ - isl_assert(term->dim->ctx, - isl_seq_first_non_zero(term->div->row[pos] + 2 + total, - term->div->n_row) == -1, - return NULL); - - bmap = isl_basic_map_alloc_dim(isl_dim_copy(term->dim), 1, 0, 0); - if ((k = isl_basic_map_alloc_div(bmap)) < 0) - goto error; - - isl_seq_cpy(bmap->div[k], term->div->row[pos], 2 + total); - - return isl_basic_map_div(bmap, k); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_term *isl_upoly_foreach_term(__isl_keep struct isl_upoly *up, - int (*fn)(__isl_take isl_term *term, void *user), - __isl_take isl_term *term, void *user) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up || !term) - goto error; - - if (isl_upoly_is_zero(up)) - return term; - - isl_assert(up->ctx, !isl_upoly_is_nan(up), goto error); - isl_assert(up->ctx, !isl_upoly_is_infty(up), goto error); - isl_assert(up->ctx, !isl_upoly_is_neginfty(up), goto error); - - if (isl_upoly_is_cst(up)) { - struct isl_upoly_cst *cst; - cst = isl_upoly_as_cst(up); - if (!cst) - goto error; - term = isl_term_cow(term); - if (!term) - goto error; - isl_int_set(term->n, cst->n); - isl_int_set(term->d, cst->d); - if (fn(isl_term_copy(term), user) < 0) - goto error; - return term; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - term = isl_term_cow(term); - if (!term) - goto error; - term->pow[up->var] = i; - term = isl_upoly_foreach_term(rec->p[i], fn, term, user); - if (!term) - goto error; - } - term->pow[up->var] = 0; - - return term; -error: - isl_term_free(term); - return NULL; -} - -int isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial *qp, - int (*fn)(__isl_take isl_term *term, void *user), void *user) -{ - isl_term *term; - - if (!qp) - return -1; - - term = isl_term_alloc(isl_dim_copy(qp->dim), isl_mat_copy(qp->div)); - if (!term) - return -1; - - term = isl_upoly_foreach_term(qp->upoly, fn, term, user); - - isl_term_free(term); - - return term ? 0 : -1; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_term(__isl_take isl_term *term) -{ - struct isl_upoly *up; - isl_qpolynomial *qp; - int i, n; - - if (!term) - return NULL; - - n = isl_dim_total(term->dim) + term->div->n_row; - - up = isl_upoly_rat_cst(term->dim->ctx, term->n, term->d); - for (i = 0; i < n; ++i) { - if (!term->pow[i]) - continue; - up = isl_upoly_mul(up, - isl_upoly_var_pow(term->dim->ctx, i, term->pow[i])); - } - - qp = isl_qpolynomial_alloc(isl_dim_copy(term->dim), term->div->n_row, up); - if (!qp) - goto error; - isl_mat_free(qp->div); - qp->div = isl_mat_copy(term->div); - if (!qp->div) - goto error; - - isl_term_free(term); - return qp; -error: - isl_qpolynomial_free(qp); - isl_term_free(term); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_lift(__isl_take isl_qpolynomial *qp, - __isl_take isl_dim *dim) -{ - int i; - int extra; - unsigned total; - - if (!qp || !dim) - goto error; - - if (isl_dim_equal(qp->dim, dim)) { - isl_dim_free(dim); - return qp; - } - - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - - extra = isl_dim_size(dim, isl_dim_set) - - isl_dim_size(qp->dim, isl_dim_set); - total = isl_dim_total(qp->dim); - if (qp->div->n_row) { - int *exp; - - exp = isl_alloc_array(qp->div->ctx, int, qp->div->n_row); - if (!exp) - goto error; - for (i = 0; i < qp->div->n_row; ++i) - exp[i] = extra + i; - qp->upoly = expand(qp->upoly, exp, total); - free(exp); - if (!qp->upoly) - goto error; - } - qp->div = isl_mat_insert_cols(qp->div, 2 + total, extra); - if (!qp->div) - goto error; - for (i = 0; i < qp->div->n_row; ++i) - isl_seq_clr(qp->div->row[i] + 2 + total, extra); - - isl_dim_free(qp->dim); - qp->dim = dim; - - return qp; -error: - isl_dim_free(dim); - isl_qpolynomial_free(qp); - return NULL; -} - -/* For each parameter or variable that does not appear in qp, - * first eliminate the variable from all constraints and then set it to zero. - */ -static __isl_give isl_set *fix_inactive(__isl_take isl_set *set, - __isl_keep isl_qpolynomial *qp) -{ - int *active = NULL; - int i; - int d; - unsigned nparam; - unsigned nvar; - - if (!set || !qp) - goto error; - - d = isl_dim_total(set->dim); - active = isl_calloc_array(set->ctx, int, d); - if (set_active(qp, active) < 0) - goto error; - - for (i = 0; i < d; ++i) - if (!active[i]) - break; - - if (i == d) { - free(active); - return set; - } - - nparam = isl_dim_size(set->dim, isl_dim_param); - nvar = isl_dim_size(set->dim, isl_dim_set); - for (i = 0; i < nparam; ++i) { - if (active[i]) - continue; - set = isl_set_eliminate(set, isl_dim_param, i, 1); - set = isl_set_fix_si(set, isl_dim_param, i, 0); - } - for (i = 0; i < nvar; ++i) { - if (active[nparam + i]) - continue; - set = isl_set_eliminate(set, isl_dim_set, i, 1); - set = isl_set_fix_si(set, isl_dim_set, i, 0); - } - - free(active); - - return set; -error: - free(active); - isl_set_free(set); - return NULL; -} - -struct isl_opt_data { - isl_qpolynomial *qp; - int first; - isl_qpolynomial *opt; - int max; -}; - -static int opt_fn(__isl_take isl_point *pnt, void *user) -{ - struct isl_opt_data *data = (struct isl_opt_data *)user; - isl_qpolynomial *val; - - val = isl_qpolynomial_eval(isl_qpolynomial_copy(data->qp), pnt); - if (data->first) { - data->first = 0; - data->opt = val; - } else if (data->max) { - data->opt = isl_qpolynomial_max_cst(data->opt, val); - } else { - data->opt = isl_qpolynomial_min_cst(data->opt, val); - } - - return 0; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_opt_on_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *set, int max) -{ - struct isl_opt_data data = { NULL, 1, NULL, max }; - - if (!set || !qp) - goto error; - - if (isl_upoly_is_cst(qp->upoly)) { - isl_set_free(set); - return qp; - } - - set = fix_inactive(set, qp); - - data.qp = qp; - if (isl_set_foreach_point(set, opt_fn, &data) < 0) - goto error; - - if (data.first) - data.opt = isl_qpolynomial_zero(isl_qpolynomial_get_dim(qp)); - - isl_set_free(set); - isl_qpolynomial_free(qp); - return data.opt; -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - isl_qpolynomial_free(data.opt); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_morph(__isl_take isl_qpolynomial *qp, - __isl_take isl_morph *morph) -{ - int i; - int n_sub; - isl_ctx *ctx; - struct isl_upoly **subs; - isl_mat *mat; - - qp = isl_qpolynomial_cow(qp); - if (!qp || !morph) - goto error; - - ctx = qp->dim->ctx; - isl_assert(ctx, isl_dim_equal(qp->dim, morph->dom->dim), goto error); - - n_sub = morph->inv->n_row - 1; - if (morph->inv->n_row != morph->inv->n_col) - n_sub += qp->div->n_row; - subs = isl_calloc_array(ctx, struct isl_upoly *, n_sub); - if (!subs) - goto error; - - for (i = 0; 1 + i < morph->inv->n_row; ++i) - subs[i] = isl_upoly_from_affine(ctx, morph->inv->row[1 + i], - morph->inv->row[0][0], morph->inv->n_col); - if (morph->inv->n_row != morph->inv->n_col) - for (i = 0; i < qp->div->n_row; ++i) - subs[morph->inv->n_row - 1 + i] = - isl_upoly_var_pow(ctx, morph->inv->n_col - 1 + i, 1); - - qp->upoly = isl_upoly_subs(qp->upoly, 0, n_sub, subs); - - for (i = 0; i < n_sub; ++i) - isl_upoly_free(subs[i]); - free(subs); - - mat = isl_mat_diagonal(isl_mat_identity(ctx, 1), isl_mat_copy(morph->inv)); - mat = isl_mat_diagonal(mat, isl_mat_identity(ctx, qp->div->n_row)); - qp->div = isl_mat_product(qp->div, mat); - isl_dim_free(qp->dim); - qp->dim = isl_dim_copy(morph->ran->dim); - - if (!qp->upoly || !qp->div || !qp->dim) - goto error; - - isl_morph_free(morph); - - return qp; -error: - isl_qpolynomial_free(qp); - isl_morph_free(morph); - return NULL; -} - -static int neg_entry(void **entry, void *user) -{ - isl_pw_qpolynomial **pwqp = (isl_pw_qpolynomial **)entry; - - *pwqp = isl_pw_qpolynomial_neg(*pwqp); - - return *pwqp ? 0 : -1; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_neg( - __isl_take isl_union_pw_qpolynomial *upwqp) -{ - upwqp = isl_union_pw_qpolynomial_cow(upwqp); - if (!upwqp) - return NULL; - - if (isl_hash_table_foreach(upwqp->dim->ctx, &upwqp->table, - &neg_entry, NULL) < 0) - goto error; - - return upwqp; -error: - isl_union_pw_qpolynomial_free(upwqp); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2) -{ - return isl_union_pw_qpolynomial_add(upwqp1, - isl_union_pw_qpolynomial_neg(upwqp2)); -} - -static int mul_entry(void **entry, void *user) -{ - struct isl_union_pw_qpolynomial_match_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_pw_qpolynomial *pwpq = *entry; - int empty; - - hash = isl_dim_get_hash(pwpq->dim); - entry2 = isl_hash_table_find(data->u2->dim->ctx, &data->u2->table, - hash, &has_dim, pwpq->dim, 0); - if (!entry2) - return 0; - - pwpq = isl_pw_qpolynomial_copy(pwpq); - pwpq = isl_pw_qpolynomial_mul(pwpq, - isl_pw_qpolynomial_copy(entry2->data)); - - empty = isl_pw_qpolynomial_is_zero(pwpq); - if (empty < 0) { - isl_pw_qpolynomial_free(pwpq); - return -1; - } - if (empty) { - isl_pw_qpolynomial_free(pwpq); - return 0; - } - - data->res = isl_union_pw_qpolynomial_add_pw_qpolynomial(data->res, pwpq); - - return 0; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2) -{ - return match_bin_op(upwqp1, upwqp2, &mul_entry); -} - -/* Reorder the columns of the given div definitions according to the - * given reordering. - */ -static __isl_give isl_mat *reorder_divs(__isl_take isl_mat *div, - __isl_take isl_reordering *r) -{ - int i, j; - isl_mat *mat; - int extra; - - if (!div || !r) - goto error; - - extra = isl_dim_total(r->dim) + div->n_row - r->len; - mat = isl_mat_alloc(div->ctx, div->n_row, div->n_col + extra); - if (!mat) - goto error; - - for (i = 0; i < div->n_row; ++i) { - isl_seq_cpy(mat->row[i], div->row[i], 2); - isl_seq_clr(mat->row[i] + 2, mat->n_col - 2); - for (j = 0; j < r->len; ++j) - isl_int_set(mat->row[i][2 + r->pos[j]], - div->row[i][2 + j]); - } - - isl_reordering_free(r); - isl_mat_free(div); - return mat; -error: - isl_reordering_free(r); - isl_mat_free(div); - return NULL; -} - -/* Reorder the dimension of "qp" according to the given reordering. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_realign( - __isl_take isl_qpolynomial *qp, __isl_take isl_reordering *r) -{ - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - - r = isl_reordering_extend(r, qp->div->n_row); - if (!r) - goto error; - - qp->div = reorder_divs(qp->div, isl_reordering_copy(r)); - if (!qp->div) - goto error; - - qp->upoly = reorder(qp->upoly, r->pos); - if (!qp->upoly) - goto error; - - qp = isl_qpolynomial_reset_dim(qp, isl_dim_copy(r->dim)); - - isl_reordering_free(r); - return qp; -error: - isl_qpolynomial_free(qp); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_align_params( - __isl_take isl_qpolynomial *qp, __isl_take isl_dim *model) -{ - if (!qp || !model) - goto error; - - if (!isl_dim_match(qp->dim, isl_dim_param, model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_dim_drop(model, isl_dim_in, - 0, isl_dim_size(model, isl_dim_in)); - model = isl_dim_drop(model, isl_dim_out, - 0, isl_dim_size(model, isl_dim_out)); - exp = isl_parameter_alignment_reordering(qp->dim, model); - exp = isl_reordering_extend_dim(exp, - isl_qpolynomial_get_dim(qp)); - qp = isl_qpolynomial_realign(qp, exp); - } - - isl_dim_free(model); - return qp; -error: - isl_dim_free(model); - isl_qpolynomial_free(qp); - return NULL; -} - -struct isl_split_periods_data { - int max_periods; - isl_pw_qpolynomial *res; -}; - -/* Create a slice where the integer division "div" has the fixed value "v". - * In particular, if "div" refers to floor(f/m), then create a slice - * - * m v <= f <= m v + (m - 1) - * - * or - * - * f - m v >= 0 - * -f + m v + (m - 1) >= 0 - */ -static __isl_give isl_set *set_div_slice(__isl_take isl_dim *dim, - __isl_keep isl_qpolynomial *qp, int div, isl_int v) -{ - int total; - isl_basic_set *bset = NULL; - int k; - - if (!dim || !qp) - goto error; - - total = isl_dim_total(dim); - bset = isl_basic_set_alloc_dim(isl_dim_copy(dim), 0, 0, 2); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->ineq[k], qp->div->row[div] + 1, 1 + total); - isl_int_submul(bset->ineq[k][0], v, qp->div->row[div][0]); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_neg(bset->ineq[k], qp->div->row[div] + 1, 1 + total); - isl_int_addmul(bset->ineq[k][0], v, qp->div->row[div][0]); - isl_int_add(bset->ineq[k][0], bset->ineq[k][0], qp->div->row[div][0]); - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - - isl_dim_free(dim); - return isl_set_from_basic_set(bset); -error: - isl_basic_set_free(bset); - isl_dim_free(dim); - return NULL; -} - -static int split_periods(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, void *user); - -/* Create a slice of the domain "set" such that integer division "div" - * has the fixed value "v" and add the results to data->res, - * replacing the integer division by "v" in "qp". - */ -static int set_div(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, int div, isl_int v, - struct isl_split_periods_data *data) -{ - int i; - int total; - isl_set *slice; - struct isl_upoly *cst; - - slice = set_div_slice(isl_set_get_dim(set), qp, div, v); - set = isl_set_intersect(set, slice); - - if (!qp) - goto error; - - total = isl_dim_total(qp->dim); - - for (i = div + 1; i < qp->div->n_row; ++i) { - if (isl_int_is_zero(qp->div->row[i][2 + total + div])) - continue; - isl_int_addmul(qp->div->row[i][1], - qp->div->row[i][2 + total + div], v); - isl_int_set_si(qp->div->row[i][2 + total + div], 0); - } - - cst = isl_upoly_rat_cst(qp->dim->ctx, v, qp->dim->ctx->one); - qp = substitute_div(qp, div, cst); - - return split_periods(set, qp, data); -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - return -1; -} - -/* Split the domain "set" such that integer division "div" - * has a fixed value (ranging from "min" to "max") on each slice - * and add the results to data->res. - */ -static int split_div(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, int div, isl_int min, isl_int max, - struct isl_split_periods_data *data) -{ - for (; isl_int_le(min, max); isl_int_add_ui(min, min, 1)) { - isl_set *set_i = isl_set_copy(set); - isl_qpolynomial *qp_i = isl_qpolynomial_copy(qp); - - if (set_div(set_i, qp_i, div, min, data) < 0) - goto error; - } - isl_set_free(set); - isl_qpolynomial_free(qp); - return 0; -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - return -1; -} - -/* If "qp" refers to any integer division - * that can only attain "max_periods" distinct values on "set" - * then split the domain along those distinct values. - * Add the results (or the original if no splitting occurs) - * to data->res. - */ -static int split_periods(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, void *user) -{ - int i; - isl_pw_qpolynomial *pwqp; - struct isl_split_periods_data *data; - isl_int min, max; - int total; - int r = 0; - - data = (struct isl_split_periods_data *)user; - - if (!set || !qp) - goto error; - - if (qp->div->n_row == 0) { - pwqp = isl_pw_qpolynomial_alloc(set, qp); - data->res = isl_pw_qpolynomial_add_disjoint(data->res, pwqp); - return 0; - } - - isl_int_init(min); - isl_int_init(max); - total = isl_dim_total(qp->dim); - for (i = 0; i < qp->div->n_row; ++i) { - enum isl_lp_result lp_res; - - if (isl_seq_first_non_zero(qp->div->row[i] + 2 + total, - qp->div->n_row) != -1) - continue; - - lp_res = isl_set_solve_lp(set, 0, qp->div->row[i] + 1, - set->ctx->one, &min, NULL, NULL); - if (lp_res == isl_lp_error) - goto error2; - if (lp_res == isl_lp_unbounded || lp_res == isl_lp_empty) - continue; - isl_int_fdiv_q(min, min, qp->div->row[i][0]); - - lp_res = isl_set_solve_lp(set, 1, qp->div->row[i] + 1, - set->ctx->one, &max, NULL, NULL); - if (lp_res == isl_lp_error) - goto error2; - if (lp_res == isl_lp_unbounded || lp_res == isl_lp_empty) - continue; - isl_int_fdiv_q(max, max, qp->div->row[i][0]); - - isl_int_sub(max, max, min); - if (isl_int_cmp_si(max, data->max_periods) < 0) { - isl_int_add(max, max, min); - break; - } - } - - if (i < qp->div->n_row) { - r = split_div(set, qp, i, min, max, data); - } else { - pwqp = isl_pw_qpolynomial_alloc(set, qp); - data->res = isl_pw_qpolynomial_add_disjoint(data->res, pwqp); - } - - isl_int_clear(max); - isl_int_clear(min); - - return r; -error2: - isl_int_clear(max); - isl_int_clear(min); -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - return -1; -} - -/* If any quasi-polynomial in pwqp refers to any integer division - * that can only attain "max_periods" distinct values on its domain - * then split the domain along those distinct values. - */ -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_periods( - __isl_take isl_pw_qpolynomial *pwqp, int max_periods) -{ - struct isl_split_periods_data data; - - data.max_periods = max_periods; - data.res = isl_pw_qpolynomial_zero(isl_pw_qpolynomial_get_dim(pwqp)); - - if (isl_pw_qpolynomial_foreach_piece(pwqp, &split_periods, &data) < 0) - goto error; - - isl_pw_qpolynomial_free(pwqp); - - return data.res; -error: - isl_pw_qpolynomial_free(data.res); - isl_pw_qpolynomial_free(pwqp); - return NULL; -} - -/* Construct a piecewise quasipolynomial that is constant on the given - * domain. In particular, it is - * 0 if cst == 0 - * 1 if cst == 1 - * infinity if cst == -1 - */ -static __isl_give isl_pw_qpolynomial *constant_on_domain( - __isl_take isl_basic_set *bset, int cst) -{ - isl_dim *dim; - isl_qpolynomial *qp; - - if (!bset) - return NULL; - - bset = isl_basic_map_domain(isl_basic_map_from_range(bset)); - dim = isl_basic_set_get_dim(bset); - if (cst < 0) - qp = isl_qpolynomial_infty(dim); - else if (cst == 0) - qp = isl_qpolynomial_zero(dim); - else - qp = isl_qpolynomial_one(dim); - return isl_pw_qpolynomial_alloc(isl_set_from_basic_set(bset), qp); -} - -/* Factor bset, call fn on each of the factors and return the product. - * - * If no factors can be found, simply call fn on the input. - * Otherwise, construct the factors based on the factorizer, - * call fn on each factor and compute the product. - */ -static __isl_give isl_pw_qpolynomial *compressed_multiplicative_call( - __isl_take isl_basic_set *bset, - __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)) -{ - int i, n; - isl_dim *dim; - isl_set *set; - isl_factorizer *f; - isl_qpolynomial *qp; - isl_pw_qpolynomial *pwqp; - unsigned nparam; - unsigned nvar; - - f = isl_basic_set_factorizer(bset); - if (!f) - goto error; - if (f->n_group == 0) { - isl_factorizer_free(f); - return fn(bset); - } - - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - dim = isl_basic_set_get_dim(bset); - dim = isl_dim_domain(dim); - set = isl_set_universe(isl_dim_copy(dim)); - qp = isl_qpolynomial_one(dim); - pwqp = isl_pw_qpolynomial_alloc(set, qp); - - bset = isl_morph_basic_set(isl_morph_copy(f->morph), bset); - - for (i = 0, n = 0; i < f->n_group; ++i) { - isl_basic_set *bset_i; - isl_pw_qpolynomial *pwqp_i; - - bset_i = isl_basic_set_copy(bset); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam + n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam, n); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, - n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, 0, n); - - pwqp_i = fn(bset_i); - pwqp = isl_pw_qpolynomial_mul(pwqp, pwqp_i); - - n += f->len[i]; - } - - isl_basic_set_free(bset); - isl_factorizer_free(f); - - return pwqp; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Factor bset, call fn on each of the factors and return the product. - * The function is assumed to evaluate to zero on empty domains, - * to one on zero-dimensional domains and to infinity on unbounded domains - * and will not be called explicitly on zero-dimensional or unbounded domains. - * - * We first check for some special cases and remove all equalities. - * Then we hand over control to compressed_multiplicative_call. - */ -__isl_give isl_pw_qpolynomial *isl_basic_set_multiplicative_call( - __isl_take isl_basic_set *bset, - __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)) -{ - int bounded; - isl_morph *morph; - isl_pw_qpolynomial *pwqp; - unsigned orig_nvar, final_nvar; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return constant_on_domain(bset, 0); - - orig_nvar = isl_basic_set_dim(bset, isl_dim_set); - - if (orig_nvar == 0) - return constant_on_domain(bset, 1); - - bounded = isl_basic_set_is_bounded(bset); - if (bounded < 0) - goto error; - if (!bounded) - return constant_on_domain(bset, -1); - - if (bset->n_eq == 0) - return compressed_multiplicative_call(bset, fn); - - morph = isl_basic_set_full_compression(bset); - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - - final_nvar = isl_basic_set_dim(bset, isl_dim_set); - - pwqp = compressed_multiplicative_call(bset, fn); - - morph = isl_morph_remove_dom_dims(morph, isl_dim_set, 0, orig_nvar); - morph = isl_morph_remove_ran_dims(morph, isl_dim_set, 0, final_nvar); - morph = isl_morph_inverse(morph); - - pwqp = isl_pw_qpolynomial_morph(pwqp, morph); - - return pwqp; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Drop all floors in "qp", turning each integer division [a/m] into - * a rational division a/m. If "down" is set, then the integer division - * is replaces by (a-(m-1))/m instead. - */ -static __isl_give isl_qpolynomial *qp_drop_floors( - __isl_take isl_qpolynomial *qp, int down) -{ - int i; - struct isl_upoly *s; - - if (!qp) - return NULL; - if (qp->div->n_row == 0) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - for (i = qp->div->n_row - 1; i >= 0; --i) { - if (down) { - isl_int_sub(qp->div->row[i][1], - qp->div->row[i][1], qp->div->row[i][0]); - isl_int_add_ui(qp->div->row[i][1], - qp->div->row[i][1], 1); - } - s = isl_upoly_from_affine(qp->dim->ctx, qp->div->row[i] + 1, - qp->div->row[i][0], qp->div->n_col - 1); - qp = substitute_div(qp, i, s); - if (!qp) - return NULL; - } - - return qp; -} - -/* Drop all floors in "pwqp", turning each integer division [a/m] into - * a rational division a/m. - */ -static __isl_give isl_pw_qpolynomial *pwqp_drop_floors( - __isl_take isl_pw_qpolynomial *pwqp) -{ - int i; - - if (!pwqp) - return NULL; - - if (isl_pw_qpolynomial_is_zero(pwqp)) - return pwqp; - - pwqp = isl_pw_qpolynomial_cow(pwqp); - if (!pwqp) - return NULL; - - for (i = 0; i < pwqp->n; ++i) { - pwqp->p[i].qp = qp_drop_floors(pwqp->p[i].qp, 0); - if (!pwqp->p[i].qp) - goto error; - } - - return pwqp; -error: - isl_pw_qpolynomial_free(pwqp); - return NULL; -} - -/* Adjust all the integer divisions in "qp" such that they are at least - * one over the given orthant (identified by "signs"). This ensures - * that they will still be non-negative even after subtracting (m-1)/m. - * - * In particular, f is replaced by f' + v, changing f = [a/m] - * to f' = [(a - m v)/m]. - * If the constant term k in a is smaller than m, - * the constant term of v is set to floor(k/m) - 1. - * For any other term, if the coefficient c and the variable x have - * the same sign, then no changes are needed. - * Otherwise, if the variable is positive (and c is negative), - * then the coefficient of x in v is set to floor(c/m). - * If the variable is negative (and c is positive), - * then the coefficient of x in v is set to ceil(c/m). - */ -static __isl_give isl_qpolynomial *make_divs_pos(__isl_take isl_qpolynomial *qp, - int *signs) -{ - int i, j; - int total; - isl_vec *v = NULL; - struct isl_upoly *s; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - qp->div = isl_mat_cow(qp->div); - if (!qp->div) - goto error; - - total = isl_dim_total(qp->dim); - v = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1); - - for (i = 0; i < qp->div->n_row; ++i) { - isl_int *row = qp->div->row[i]; - v = isl_vec_clr(v); - if (!v) - goto error; - if (isl_int_lt(row[1], row[0])) { - isl_int_fdiv_q(v->el[0], row[1], row[0]); - isl_int_sub_ui(v->el[0], v->el[0], 1); - isl_int_submul(row[1], row[0], v->el[0]); - } - for (j = 0; j < total; ++j) { - if (isl_int_sgn(row[2 + j]) * signs[j] >= 0) - continue; - if (signs[j] < 0) - isl_int_cdiv_q(v->el[1 + j], row[2 + j], row[0]); - else - isl_int_fdiv_q(v->el[1 + j], row[2 + j], row[0]); - isl_int_submul(row[2 + j], row[0], v->el[1 + j]); - } - for (j = 0; j < i; ++j) { - if (isl_int_sgn(row[2 + total + j]) >= 0) - continue; - isl_int_fdiv_q(v->el[1 + total + j], - row[2 + total + j], row[0]); - isl_int_submul(row[2 + total + j], - row[0], v->el[1 + total + j]); - } - for (j = i + 1; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + total + i])) - continue; - isl_seq_combine(qp->div->row[j] + 1, - qp->div->ctx->one, qp->div->row[j] + 1, - qp->div->row[j][2 + total + i], v->el, v->size); - } - isl_int_set_si(v->el[1 + total + i], 1); - s = isl_upoly_from_affine(qp->dim->ctx, v->el, - qp->div->ctx->one, v->size); - qp->upoly = isl_upoly_subs(qp->upoly, total + i, 1, &s); - isl_upoly_free(s); - if (!qp->upoly) - goto error; - } - - isl_vec_free(v); - return qp; -error: - isl_vec_free(v); - isl_qpolynomial_free(qp); - return NULL; -} - -struct isl_to_poly_data { - int sign; - isl_pw_qpolynomial *res; - isl_qpolynomial *qp; -}; - -/* Appoximate data->qp by a polynomial on the orthant identified by "signs". - * We first make all integer divisions positive and then split the - * quasipolynomials into terms with sign data->sign (the direction - * of the requested approximation) and terms with the opposite sign. - * In the first set of terms, each integer division [a/m] is - * overapproximated by a/m, while in the second it is underapproximated - * by (a-(m-1))/m. - */ -static int to_polynomial_on_orthant(__isl_take isl_set *orthant, int *signs, - void *user) -{ - struct isl_to_poly_data *data = user; - isl_pw_qpolynomial *t; - isl_qpolynomial *qp, *up, *down; - - qp = isl_qpolynomial_copy(data->qp); - qp = make_divs_pos(qp, signs); - - up = isl_qpolynomial_terms_of_sign(qp, signs, data->sign); - up = qp_drop_floors(up, 0); - down = isl_qpolynomial_terms_of_sign(qp, signs, -data->sign); - down = qp_drop_floors(down, 1); - - isl_qpolynomial_free(qp); - qp = isl_qpolynomial_add(up, down); - - t = isl_pw_qpolynomial_alloc(orthant, qp); - data->res = isl_pw_qpolynomial_add_disjoint(data->res, t); - - return 0; -} - -/* Approximate each quasipolynomial by a polynomial. If "sign" is positive, - * the polynomial will be an overapproximation. If "sign" is negative, - * it will be an underapproximation. If "sign" is zero, the approximation - * will lie somewhere in between. - * - * In particular, is sign == 0, we simply drop the floors, turning - * the integer divisions into rational divisions. - * Otherwise, we split the domains into orthants, make all integer divisions - * positive and then approximate each [a/m] by either a/m or (a-(m-1))/m, - * depending on the requested sign and the sign of the term in which - * the integer division appears. - */ -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( - __isl_take isl_pw_qpolynomial *pwqp, int sign) -{ - int i; - struct isl_to_poly_data data; - - if (sign == 0) - return pwqp_drop_floors(pwqp); - - if (!pwqp) - return NULL; - - data.sign = sign; - data.res = isl_pw_qpolynomial_zero(isl_pw_qpolynomial_get_dim(pwqp)); - - for (i = 0; i < pwqp->n; ++i) { - if (pwqp->p[i].qp->div->n_row == 0) { - isl_pw_qpolynomial *t; - t = isl_pw_qpolynomial_alloc( - isl_set_copy(pwqp->p[i].set), - isl_qpolynomial_copy(pwqp->p[i].qp)); - data.res = isl_pw_qpolynomial_add_disjoint(data.res, t); - continue; - } - data.qp = pwqp->p[i].qp; - if (isl_set_foreach_orthant(pwqp->p[i].set, - &to_polynomial_on_orthant, &data) < 0) - goto error; - } - - isl_pw_qpolynomial_free(pwqp); - - return data.res; -error: - isl_pw_qpolynomial_free(pwqp); - isl_pw_qpolynomial_free(data.res); - return NULL; -} - -static int poly_entry(void **entry, void *user) -{ - int *sign = user; - isl_pw_qpolynomial **pwqp = (isl_pw_qpolynomial **)entry; - - *pwqp = isl_pw_qpolynomial_to_polynomial(*pwqp, *sign); - - return *pwqp ? 0 : -1; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, int sign) -{ - upwqp = isl_union_pw_qpolynomial_cow(upwqp); - if (!upwqp) - return NULL; - - if (isl_hash_table_foreach(upwqp->dim->ctx, &upwqp->table, - &poly_entry, &sign) < 0) - goto error; - - return upwqp; -error: - isl_union_pw_qpolynomial_free(upwqp); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_from_qpolynomial( - __isl_take isl_qpolynomial *qp) -{ - int i, k; - isl_dim *dim; - isl_vec *aff = NULL; - isl_basic_map *bmap = NULL; - unsigned pos; - unsigned n_div; - - if (!qp) - return NULL; - if (!isl_upoly_is_affine(qp->upoly)) - isl_die(qp->dim->ctx, isl_error_invalid, - "input quasi-polynomial not affine", goto error); - aff = isl_qpolynomial_extract_affine(qp); - if (!aff) - goto error; - dim = isl_qpolynomial_get_dim(qp); - dim = isl_dim_from_domain(dim); - pos = 1 + isl_dim_offset(dim, isl_dim_out); - dim = isl_dim_add(dim, isl_dim_out, 1); - n_div = qp->div->n_row; - bmap = isl_basic_map_alloc_dim(dim, n_div, 1, 2 * n_div); - - for (i = 0; i < n_div; ++i) { - k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->div[k], qp->div->row[i], qp->div->n_col); - isl_int_set_si(bmap->div[k][qp->div->n_col], 0); - if (isl_basic_map_add_div_constraints(bmap, k) < 0) - goto error; - } - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_int_neg(bmap->eq[k][pos], aff->el[0]); - isl_seq_cpy(bmap->eq[k], aff->el + 1, pos); - isl_seq_cpy(bmap->eq[k] + pos + 1, aff->el + 1 + pos, n_div); - - isl_vec_free(aff); - isl_qpolynomial_free(qp); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_vec_free(aff); - isl_qpolynomial_free(qp); - isl_basic_map_free(bmap); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_polynomial_private.h b/cloog-0.16.3/isl/isl_polynomial_private.h deleted file mode 100644 index 8f6a7b799689e896dd0c9a6817734070c7be33d6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_polynomial_private.h +++ /dev/null @@ -1,215 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -struct isl_upoly { - int ref; - struct isl_ctx *ctx; - - int var; -}; - -struct isl_upoly_cst { - struct isl_upoly up; - isl_int n; - isl_int d; -}; - -struct isl_upoly_rec { - struct isl_upoly up; - int n; - - size_t size; - struct isl_upoly *p[]; -}; - -struct isl_qpolynomial { - int ref; - - struct isl_dim *dim; - struct isl_mat *div; - struct isl_upoly *upoly; -}; - -struct isl_term { - int ref; - - isl_int n; - isl_int d; - - struct isl_dim *dim; - struct isl_mat *div; - - int pow[1]; -}; - -struct isl_pw_qpolynomial_piece { - struct isl_set *set; - struct isl_qpolynomial *qp; -}; - -struct isl_pw_qpolynomial { - int ref; - - struct isl_dim *dim; - - int n; - - size_t size; - struct isl_pw_qpolynomial_piece p[1]; -}; - -struct isl_qpolynomial_fold { - int ref; - - enum isl_fold type; - struct isl_dim *dim; - - int n; - - size_t size; - struct isl_qpolynomial *qp[1]; -}; - -struct isl_pw_qpolynomial_fold_piece { - struct isl_set *set; - struct isl_qpolynomial_fold *fold; -}; - -struct isl_pw_qpolynomial_fold { - int ref; - - enum isl_fold type; - struct isl_dim *dim; - - int n; - - size_t size; - struct isl_pw_qpolynomial_fold_piece p[1]; -}; - -__isl_give struct isl_upoly *isl_upoly_zero(struct isl_ctx *ctx); -__isl_give struct isl_upoly *isl_upoly_copy(__isl_keep struct isl_upoly *up); -__isl_give struct isl_upoly *isl_upoly_cow(__isl_take struct isl_upoly *up); -__isl_give struct isl_upoly *isl_upoly_dup(__isl_keep struct isl_upoly *up); -void isl_upoly_free(__isl_take struct isl_upoly *up); -__isl_give struct isl_upoly *isl_upoly_mul(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2); - -int isl_upoly_is_cst(__isl_keep struct isl_upoly *up); -int isl_upoly_is_zero(__isl_keep struct isl_upoly *up); -int isl_upoly_is_one(__isl_keep struct isl_upoly *up); -int isl_upoly_is_negone(__isl_keep struct isl_upoly *up); -__isl_keep struct isl_upoly_cst *isl_upoly_as_cst(__isl_keep struct isl_upoly *up); -__isl_keep struct isl_upoly_rec *isl_upoly_as_rec(__isl_keep struct isl_upoly *up); - -__isl_give struct isl_upoly *isl_upoly_sum(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2); -__isl_give struct isl_upoly *isl_upoly_mul_isl_int( - __isl_take struct isl_upoly *up, isl_int v); - -__isl_give isl_qpolynomial *isl_qpolynomial_alloc(__isl_take isl_dim *dim, - unsigned n_div, __isl_take struct isl_upoly *up); -__isl_give isl_qpolynomial *isl_qpolynomial_cow(__isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_dup(__isl_keep isl_qpolynomial *qp); - -__isl_give isl_qpolynomial *isl_qpolynomial_cst(__isl_take isl_dim *dim, - isl_int v); -__isl_give isl_qpolynomial *isl_qpolynomial_var_pow(__isl_take isl_dim *dim, - int pos, int power); -__isl_give isl_qpolynomial *isl_qpolynomial_div_pow(__isl_take isl_div *div, - int power); -int isl_qpolynomial_is_one(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_affine(__isl_keep isl_qpolynomial *qp); - -__isl_give isl_qpolynomial *isl_qpolynomial_add_on_domain( - __isl_keep isl_set *dom, - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - -int isl_qpolynomial_le_cst(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_max_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_min_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2); - -int isl_qpolynomial_degree(__isl_keep isl_qpolynomial *poly); -__isl_give isl_qpolynomial *isl_qpolynomial_coeff( - __isl_keep isl_qpolynomial *poly, - enum isl_dim_type type, unsigned pos, int deg); - -__isl_give isl_vec *isl_qpolynomial_extract_affine( - __isl_keep isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_from_affine(__isl_take isl_dim *dim, - isl_int *f, isl_int denom); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_cow( - __isl_take isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_piece( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_set *set, __isl_take isl_qpolynomial *qp); -int isl_pw_qpolynomial_is_one(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_qpolynomial *isl_qpolynomial_opt_on_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *set, int max); - -enum isl_fold isl_fold_type_negate(enum isl_fold type); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_cow( - __isl_take isl_qpolynomial_fold *fold); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_dup( - __isl_keep isl_qpolynomial_fold *fold); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_cow( - __isl_take isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_add_on_domain( - __isl_keep isl_set *set, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold_on_domain( - __isl_keep isl_set *set, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2); - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_opt_on_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *set, int max); - -int isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2); - -__isl_give isl_qpolynomial *isl_qpolynomial_morph(__isl_take isl_qpolynomial *qp, - __isl_take isl_morph *morph); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_morph( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_morph *morph); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_morph( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_morph *morph); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_morph( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_morph *morph); - -__isl_give isl_qpolynomial *isl_qpolynomial_lift(__isl_take isl_qpolynomial *qp, - __isl_take isl_dim *dim); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_lift( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_dim *dim); - -__isl_give isl_qpolynomial *isl_qpolynomial_substitute_equalities( - __isl_take isl_qpolynomial *qp, __isl_take isl_basic_set *eq); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute_equalities( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_basic_set *eq); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context); - -__isl_give isl_qpolynomial *isl_qpolynomial_realign( - __isl_take isl_qpolynomial *qp, __isl_take isl_reordering *r); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_realign( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_reordering *r); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_realign( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_reordering *r); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_realign( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_reordering *r); diff --git a/cloog-0.16.3/isl/isl_printer.c b/cloog-0.16.3/isl/isl_printer.c deleted file mode 100644 index fe8fab98efc343fd0c7dc2e0029b67451d75ca28..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_printer.c +++ /dev/null @@ -1,366 +0,0 @@ -#include -#include - -static __isl_give isl_printer *file_start_line(__isl_take isl_printer *p) -{ - fprintf(p->file, "%*s%s", p->indent, "", p->prefix ? p->prefix : ""); - return p; -} - -static __isl_give isl_printer *file_end_line(__isl_take isl_printer *p) -{ - fprintf(p->file, "%s\n", p->suffix ? p->suffix : ""); - return p; -} - -static __isl_give isl_printer *file_flush(__isl_take isl_printer *p) -{ - fflush(p->file); - return p; -} - -static __isl_give isl_printer *file_print_str(__isl_take isl_printer *p, - const char *s) -{ - fprintf(p->file, "%s", s); - return p; -} - -static __isl_give isl_printer *file_print_int(__isl_take isl_printer *p, int i) -{ - fprintf(p->file, "%d", i); - return p; -} - -static __isl_give isl_printer *file_print_isl_int(__isl_take isl_printer *p, isl_int i) -{ - isl_int_print(p->file, i, p->width); - return p; -} - -static int grow_buf(__isl_keep isl_printer *p, int extra) -{ - int new_size; - char *new_buf; - - if (p->buf_size == 0) - return -1; - - new_size = ((p->buf_n + extra + 1) * 3) / 2; - new_buf = isl_realloc_array(p->ctx, p->buf, char, new_size); - if (!new_buf) { - p->buf_size = 0; - return -1; - } - p->buf = new_buf; - p->buf_size = new_size; - - return 0; -} - -static __isl_give isl_printer *str_print(__isl_take isl_printer *p, - const char *s, int len) -{ - if (p->buf_n + len + 1 >= p->buf_size && grow_buf(p, len)) - goto error; - memcpy(p->buf + p->buf_n, s, len); - p->buf_n += len; - - p->buf[p->buf_n] = '\0'; - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *str_print_indent(__isl_take isl_printer *p, - int indent) -{ - int i; - - if (p->buf_n + indent + 1 >= p->buf_size && grow_buf(p, indent)) - goto error; - for (i = 0; i < indent; ++i) - p->buf[p->buf_n++] = ' '; - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *str_start_line(__isl_take isl_printer *p) -{ - p = str_print_indent(p, p->indent); - if (p->prefix) - p = str_print(p, p->prefix, strlen(p->prefix)); - return p; -} - -static __isl_give isl_printer *str_end_line(__isl_take isl_printer *p) -{ - if (p->suffix) - p = str_print(p, p->suffix, strlen(p->suffix)); - p = str_print(p, "\n", strlen("\n")); - return p; -} - -static __isl_give isl_printer *str_flush(__isl_take isl_printer *p) -{ - p->buf_n = 0; - return p; -} - -static __isl_give isl_printer *str_print_str(__isl_take isl_printer *p, - const char *s) -{ - return str_print(p, s, strlen(s)); -} - -static __isl_give isl_printer *str_print_int(__isl_take isl_printer *p, int i) -{ - int left = p->buf_size - p->buf_n; - int need = snprintf(p->buf + p->buf_n, left, "%d", i); - if (need >= left) { - if (grow_buf(p, need)) - goto error; - left = p->buf_size - p->buf_n; - need = snprintf(p->buf + p->buf_n, left, "%d", i); - } - p->buf_n += need; - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *str_print_isl_int(__isl_take isl_printer *p, - isl_int i) -{ - char *s; - int len; - isl_int_print_gmp_free_t gmp_free; - - s = isl_int_get_str(i); - len = strlen(s); - if (len < p->width) - p = str_print_indent(p, p->width - len); - p = str_print(p, s, len); - mp_get_memory_functions(NULL, NULL, &gmp_free); - (*gmp_free)(s, len + 1); - return p; -} - -struct isl_printer_ops { - __isl_give isl_printer *(*start_line)(__isl_take isl_printer *p); - __isl_give isl_printer *(*end_line)(__isl_take isl_printer *p); - __isl_give isl_printer *(*print_int)(__isl_take isl_printer *p, int i); - __isl_give isl_printer *(*print_isl_int)(__isl_take isl_printer *p, - isl_int i); - __isl_give isl_printer *(*print_str)(__isl_take isl_printer *p, - const char *s); - __isl_give isl_printer *(*flush)(__isl_take isl_printer *p); -}; - -static struct isl_printer_ops file_ops = { - file_start_line, - file_end_line, - file_print_int, - file_print_isl_int, - file_print_str, - file_flush -}; - -static struct isl_printer_ops str_ops = { - str_start_line, - str_end_line, - str_print_int, - str_print_isl_int, - str_print_str, - str_flush -}; - -__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file) -{ - struct isl_printer *p = isl_alloc_type(ctx, struct isl_printer); - if (!p) - return NULL; - p->ctx = ctx; - isl_ctx_ref(p->ctx); - p->ops = &file_ops; - p->file = file; - p->buf = NULL; - p->buf_n = 0; - p->buf_size = 0; - p->indent = 0; - p->output_format = ISL_FORMAT_ISL; - p->prefix = NULL; - p->suffix = NULL; - p->width = 0; - - return p; -} - -__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx) -{ - struct isl_printer *p = isl_alloc_type(ctx, struct isl_printer); - if (!p) - return NULL; - p->ctx = ctx; - isl_ctx_ref(p->ctx); - p->ops = &str_ops; - p->file = NULL; - p->buf = isl_alloc_array(ctx, char, 256); - if (!p->buf) - goto error; - p->buf_n = 0; - p->buf_size = 256; - p->indent = 0; - p->output_format = ISL_FORMAT_ISL; - p->prefix = NULL; - p->suffix = NULL; - p->width = 0; - - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_printer_free(__isl_take isl_printer *p) -{ - if (!p) - return; - free(p->buf); - isl_ctx_deref(p->ctx); - free(p); -} - -isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer) -{ - return printer ? printer->ctx : NULL; -} - -__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p, - int width) -{ - if (!p) - return NULL; - - p->width = width; - - return p; -} - -__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p, - int indent) -{ - if (!p) - return NULL; - - p->indent = indent; - - return p; -} - -__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p, - int indent) -{ - if (!p) - return NULL; - - p->indent += indent; - if (p->indent < 0) - p->indent = 0; - - return p; -} - -__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p, - const char *prefix) -{ - if (!p) - return NULL; - - p->prefix = prefix; - - return p; -} - -__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p, - const char *suffix) -{ - if (!p) - return NULL; - - p->suffix = suffix; - - return p; -} - -__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p, - int output_format) -{ - if (!p) - return NULL; - - p->output_format = output_format; - - return p; -} - -__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p, - const char *s) -{ - if (!p) - return NULL; - - return p->ops->print_str(p, s); -} - -__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i) -{ - if (!p) - return NULL; - - return p->ops->print_int(p, i); -} - -__isl_give isl_printer *isl_printer_print_isl_int(__isl_take isl_printer *p, - isl_int i) -{ - if (!p) - return NULL; - - return p->ops->print_isl_int(p, i); -} - -__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p) -{ - if (!p) - return NULL; - - return p->ops->start_line(p); -} - -__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p) -{ - if (!p) - return NULL; - - return p->ops->end_line(p); -} - -char *isl_printer_get_str(__isl_keep isl_printer *printer) -{ - if (!printer || !printer->buf) - return NULL; - return strdup(printer->buf); -} - -__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p) -{ - if (!p) - return NULL; - - return p->ops->flush(p); -} diff --git a/cloog-0.16.3/isl/isl_printer_private.h b/cloog-0.16.3/isl/isl_printer_private.h deleted file mode 100644 index 9d76808c987e91c4e7701970b05e409ee49a27d4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_printer_private.h +++ /dev/null @@ -1,17 +0,0 @@ -#include - -struct isl_printer_ops; - -struct isl_printer { - struct isl_ctx *ctx; - struct isl_printer_ops *ops; - FILE *file; - int buf_n; - int buf_size; - char *buf; - int indent; - int output_format; - const char *prefix; - const char *suffix; - int width; -}; diff --git a/cloog-0.16.3/isl/isl_pw_templ.c b/cloog-0.16.3/isl/isl_pw_templ.c deleted file mode 100644 index a446c43c12887610feb2419a6ee0a982393d2891..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_pw_templ.c +++ /dev/null @@ -1,1074 +0,0 @@ -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xS(TYPE,NAME) struct TYPE ## _ ## NAME -#define S(TYPE,NAME) xS(TYPE,NAME) - -#ifdef HAS_TYPE -static __isl_give PW *FN(PW,alloc_)(__isl_take isl_dim *dim, - enum isl_fold type, int n) -#else -static __isl_give PW *FN(PW,alloc_)(__isl_take isl_dim *dim, int n) -#endif -{ - isl_ctx *ctx; - struct PW *pw; - - if (!dim) - return NULL; - ctx = isl_dim_get_ctx(dim); - isl_assert(ctx, n >= 0, goto error); - pw = isl_alloc(ctx, struct PW, - sizeof(struct PW) + (n - 1) * sizeof(S(PW,piece))); - if (!pw) - goto error; - - pw->ref = 1; -#ifdef HAS_TYPE - pw->type = type; -#endif - pw->size = n; - pw->n = 0; - pw->dim = dim; - return pw; -error: - isl_dim_free(dim); - return NULL; -} - -#ifdef HAS_TYPE -__isl_give PW *FN(PW,ZERO)(__isl_take isl_dim *dim, enum isl_fold type) -{ - return FN(PW,alloc_)(dim, type, 0); -} -#else -__isl_give PW *FN(PW,ZERO)(__isl_take isl_dim *dim) -{ - return FN(PW,alloc_)(dim, 0); -} -#endif - -__isl_give PW *FN(PW,add_piece)(__isl_take PW *pw, - __isl_take isl_set *set, __isl_take EL *el) -{ - isl_ctx *ctx; - isl_dim *el_dim = NULL; - - if (!pw || !set || !el) - goto error; - - if (isl_set_plain_is_empty(set) || FN(EL,EL_IS_ZERO)(el)) { - isl_set_free(set); - FN(EL,free)(el); - return pw; - } - - ctx = isl_set_get_ctx(set); -#ifdef HAS_TYPE - if (pw->type != el->type) - isl_die(ctx, isl_error_invalid, "fold types don't match", - goto error); -#endif - el_dim = FN(EL,get_dim(el)); - isl_assert(ctx, isl_dim_equal(pw->dim, el_dim), goto error); - isl_assert(ctx, pw->n < pw->size, goto error); - - pw->p[pw->n].set = set; - pw->p[pw->n].FIELD = el; - pw->n++; - - isl_dim_free(el_dim); - return pw; -error: - isl_dim_free(el_dim); - FN(PW,free)(pw); - isl_set_free(set); - FN(EL,free)(el); - return NULL; -} - -#ifdef HAS_TYPE -__isl_give PW *FN(PW,alloc)(enum isl_fold type, - __isl_take isl_set *set, __isl_take EL *el) -#else -__isl_give PW *FN(PW,alloc)(__isl_take isl_set *set, __isl_take EL *el) -#endif -{ - PW *pw; - - if (!set || !el) - goto error; - -#ifdef HAS_TYPE - pw = FN(PW,alloc_)(isl_set_get_dim(set), type, 1); -#else - pw = FN(PW,alloc_)(isl_set_get_dim(set), 1); -#endif - - return FN(PW,add_piece)(pw, set, el); -error: - isl_set_free(set); - FN(EL,free)(el); - return NULL; -} - -__isl_give PW *FN(PW,dup)(__isl_keep PW *pw) -{ - int i; - PW *dup; - - if (!pw) - return NULL; - -#ifdef HAS_TYPE - dup = FN(PW,alloc_)(isl_dim_copy(pw->dim), pw->type, pw->n); -#else - dup = FN(PW,alloc_)(isl_dim_copy(pw->dim), pw->n); -#endif - if (!dup) - return NULL; - - for (i = 0; i < pw->n; ++i) - dup = FN(PW,add_piece)(dup, isl_set_copy(pw->p[i].set), - FN(EL,copy)(pw->p[i].FIELD)); - - return dup; -} - -__isl_give PW *FN(PW,cow)(__isl_take PW *pw) -{ - if (!pw) - return NULL; - - if (pw->ref == 1) - return pw; - pw->ref--; - return FN(PW,dup)(pw); -} - -__isl_give PW *FN(PW,copy)(__isl_keep PW *pw) -{ - if (!pw) - return NULL; - - pw->ref++; - return pw; -} - -void *FN(PW,free)(__isl_take PW *pw) -{ - int i; - - if (!pw) - return NULL; - if (--pw->ref > 0) - return NULL; - - for (i = 0; i < pw->n; ++i) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - } - isl_dim_free(pw->dim); - free(pw); - - return NULL; -} - -int FN(PW,IS_ZERO)(__isl_keep PW *pw) -{ - if (!pw) - return -1; - - return pw->n == 0; -} - -__isl_give PW *FN(PW,add)(__isl_take PW *pw1, __isl_take PW *pw2) -{ - int i, j, n; - struct PW *res; - isl_ctx *ctx; - isl_set *set; - - if (!pw1 || !pw2) - goto error; - - ctx = isl_dim_get_ctx(pw1->dim); -#ifdef HAS_TYPE - if (pw1->type != pw2->type) - isl_die(ctx, isl_error_invalid, - "fold types don't match", goto error); -#endif - isl_assert(ctx, isl_dim_equal(pw1->dim, pw2->dim), goto error); - - if (FN(PW,IS_ZERO)(pw1)) { - FN(PW,free)(pw1); - return pw2; - } - - if (FN(PW,IS_ZERO)(pw2)) { - FN(PW,free)(pw2); - return pw1; - } - - n = (pw1->n + 1) * (pw2->n + 1); -#ifdef HAS_TYPE - res = FN(PW,alloc_)(isl_dim_copy(pw1->dim), pw1->type, n); -#else - res = FN(PW,alloc_)(isl_dim_copy(pw1->dim), n); -#endif - - for (i = 0; i < pw1->n; ++i) { - set = isl_set_copy(pw1->p[i].set); - for (j = 0; j < pw2->n; ++j) { - struct isl_set *common; - EL *sum; - set = isl_set_subtract(set, - isl_set_copy(pw2->p[j].set)); - common = isl_set_intersect(isl_set_copy(pw1->p[i].set), - isl_set_copy(pw2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - sum = FN(EL,add_on_domain)(common, - FN(EL,copy)(pw1->p[i].FIELD), - FN(EL,copy)(pw2->p[j].FIELD)); - - res = FN(PW,add_piece)(res, common, sum); - } - res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw1->p[i].FIELD)); - } - - for (j = 0; j < pw2->n; ++j) { - set = isl_set_copy(pw2->p[j].set); - for (i = 0; i < pw1->n; ++i) - set = isl_set_subtract(set, - isl_set_copy(pw1->p[i].set)); - res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw2->p[j].FIELD)); - } - - FN(PW,free)(pw1); - FN(PW,free)(pw2); - - return res; -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return NULL; -} - -__isl_give PW *FN(PW,add_disjoint)(__isl_take PW *pw1, __isl_take PW *pw2) -{ - int i; - isl_ctx *ctx; - PW *res; - - if (!pw1 || !pw2) - goto error; - - ctx = isl_dim_get_ctx(pw1->dim); -#ifdef HAS_TYPE - if (pw1->type != pw2->type) - isl_die(ctx, isl_error_invalid, - "fold types don't match", goto error); -#endif - isl_assert(ctx, isl_dim_equal(pw1->dim, pw2->dim), goto error); - - if (FN(PW,IS_ZERO)(pw1)) { - FN(PW,free)(pw1); - return pw2; - } - - if (FN(PW,IS_ZERO)(pw2)) { - FN(PW,free)(pw2); - return pw1; - } - -#ifdef HAS_TYPE - res = FN(PW,alloc_)(isl_dim_copy(pw1->dim), pw1->type, pw1->n + pw2->n); -#else - res = FN(PW,alloc_)(isl_dim_copy(pw1->dim), pw1->n + pw2->n); -#endif - - for (i = 0; i < pw1->n; ++i) - res = FN(PW,add_piece)(res, - isl_set_copy(pw1->p[i].set), - FN(EL,copy)(pw1->p[i].FIELD)); - - for (i = 0; i < pw2->n; ++i) - res = FN(PW,add_piece)(res, - isl_set_copy(pw2->p[i].set), - FN(EL,copy)(pw2->p[i].FIELD)); - - FN(PW,free)(pw1); - FN(PW,free)(pw2); - - return res; -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return NULL; -} - -#ifndef NO_NEG -__isl_give PW *FN(PW,neg)(__isl_take PW *pw) -{ - int i; - - if (!pw) - return NULL; - - if (FN(PW,IS_ZERO)(pw)) - return pw; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].FIELD = FN(EL,neg)(pw->p[i].FIELD); - if (!pw->p[i].FIELD) - return FN(PW,free)(pw); - } - - return pw; -} - -__isl_give PW *FN(PW,sub)(__isl_take PW *pw1, __isl_take PW *pw2) -{ - return FN(PW,add)(pw1, FN(PW,neg)(pw2)); -} -#endif - -#ifndef NO_EVAL -__isl_give isl_qpolynomial *FN(PW,eval)(__isl_take PW *pw, - __isl_take isl_point *pnt) -{ - int i; - int found = 0; - isl_ctx *ctx; - isl_dim *pnt_dim = NULL; - isl_qpolynomial *qp; - - if (!pw || !pnt) - goto error; - ctx = isl_point_get_ctx(pnt); - pnt_dim = isl_point_get_dim(pnt); - isl_assert(ctx, isl_dim_equal(pnt_dim, pw->dim), goto error); - - for (i = 0; i < pw->n; ++i) { - found = isl_set_contains_point(pw->p[i].set, pnt); - if (found < 0) - goto error; - if (found) - break; - } - if (found) - qp = FN(EL,eval)(FN(EL,copy)(pw->p[i].FIELD), - isl_point_copy(pnt)); - else - qp = isl_qpolynomial_zero(isl_dim_copy(pw->dim)); - FN(PW,free)(pw); - isl_dim_free(pnt_dim); - isl_point_free(pnt); - return qp; -error: - FN(PW,free)(pw); - isl_dim_free(pnt_dim); - isl_point_free(pnt); - return NULL; -} -#endif - -__isl_give isl_set *FN(PW,domain)(__isl_take PW *pw) -{ - int i; - isl_set *dom; - - if (!pw) - return NULL; - - dom = isl_set_empty(isl_dim_copy(pw->dim)); - for (i = 0; i < pw->n; ++i) - dom = isl_set_union_disjoint(dom, isl_set_copy(pw->p[i].set)); - - FN(PW,free)(pw); - - return dom; -} - -__isl_give PW *FN(PW,intersect_domain)(__isl_take PW *pw, __isl_take isl_set *set) -{ - int i; - - if (!pw || !set) - goto error; - - if (pw->n == 0) { - isl_set_free(set); - return pw; - } - - pw = FN(PW,cow)(pw); - if (!pw) - goto error; - - for (i = pw->n - 1; i >= 0; --i) { - isl_basic_set *aff; - pw->p[i].set = isl_set_intersect(pw->p[i].set, isl_set_copy(set)); - if (!pw->p[i].set) - goto error; - aff = isl_set_affine_hull(isl_set_copy(pw->p[i].set)); - pw->p[i].FIELD = FN(EL,substitute_equalities)(pw->p[i].FIELD, - aff); - if (isl_set_plain_is_empty(pw->p[i].set)) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - } - } - - isl_set_free(set); - return pw; -error: - isl_set_free(set); - FN(PW,free)(pw); - return NULL; -} - -__isl_give PW *FN(PW,gist)(__isl_take PW *pw, __isl_take isl_set *context) -{ - int i; - isl_basic_set *hull = NULL; - - if (!pw || !context) - goto error; - - if (pw->n == 0) { - isl_set_free(context); - return pw; - } - - context = isl_set_compute_divs(context); - hull = isl_set_simple_hull(isl_set_copy(context)); - - pw = FN(PW,cow)(pw); - if (!pw) - goto error; - - for (i = pw->n - 1; i >= 0; --i) { - pw->p[i].set = isl_set_intersect(pw->p[i].set, - isl_set_copy(context)); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,gist)(pw->p[i].FIELD, - isl_set_copy(pw->p[i].set)); - pw->p[i].set = isl_set_gist_basic_set(pw->p[i].set, - isl_basic_set_copy(hull)); - if (!pw->p[i].set) - goto error; - if (isl_set_plain_is_empty(pw->p[i].set)) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - } - } - - isl_basic_set_free(hull); - isl_set_free(context); - - return pw; -error: - FN(PW,free)(pw); - isl_basic_set_free(hull); - isl_set_free(context); - return NULL; -} - -__isl_give PW *FN(PW,coalesce)(__isl_take PW *pw) -{ - int i, j; - - if (!pw) - return NULL; - if (pw->n == 0) - return pw; - - for (i = pw->n - 1; i >= 0; --i) { - for (j = i - 1; j >= 0; --j) { - if (!FN(EL,plain_is_equal)(pw->p[i].FIELD, - pw->p[j].FIELD)) - continue; - pw->p[j].set = isl_set_union(pw->p[j].set, - pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - break; - } - if (j >= 0) - continue; - pw->p[i].set = isl_set_coalesce(pw->p[i].set); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -isl_ctx *FN(PW,get_ctx)(__isl_keep PW *pw) -{ - return pw ? isl_dim_get_ctx(pw->dim) : NULL; -} - -#ifndef NO_INVOLVES_DIMS -int FN(PW,involves_dims)(__isl_keep PW *pw, enum isl_dim_type type, - unsigned first, unsigned n) -{ - int i; - - if (!pw) - return -1; - if (pw->n == 0 || n == 0) - return 0; - for (i = 0; i < pw->n; ++i) { - int involves = FN(EL,involves_dims)(pw->p[i].FIELD, - type, first, n); - if (involves < 0 || involves) - return involves; - involves = isl_set_involves_dims(pw->p[i].set, type, first, n); - if (involves < 0 || involves) - return involves; - } - return 0; -} -#endif - -__isl_give PW *FN(PW,set_dim_name)(__isl_take PW *pw, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - pw->dim = isl_dim_set_name(pw->dim, type, pos, s); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_set_dim_name(pw->p[i].set, type, pos, s); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,set_dim_name)(pw->p[i].FIELD, type, pos, s); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -#ifndef NO_DROP_DIMS -__isl_give PW *FN(PW,drop_dims)(__isl_take PW *pw, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!pw) - return NULL; - if (n == 0 && !isl_dim_get_tuple_name(pw->dim, type)) - return pw; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - pw->dim = isl_dim_drop(pw->dim, type, first, n); - if (!pw->dim) - goto error; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_drop(pw->p[i].set, type, first, n); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,drop_dims)(pw->p[i].FIELD, type, first, n); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} -#endif - -#ifndef NO_INSERT_DIMS -__isl_give PW *FN(PW,insert_dims)(__isl_take PW *pw, enum isl_dim_type type, - unsigned first, unsigned n) -{ - int i; - - if (!pw) - return NULL; - if (n == 0 && !isl_dim_is_named_or_nested(pw->dim, type)) - return pw; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - pw->dim = isl_dim_insert(pw->dim, type, first, n); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_insert(pw->p[i].set, type, first, n); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,insert_dims)(pw->p[i].FIELD, - type, first, n); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} -#endif - -__isl_give PW *FN(PW,fix_dim)(__isl_take PW *pw, - enum isl_dim_type type, unsigned pos, isl_int v) -{ - int i; - - if (!pw) - return NULL; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_fix(pw->p[i].set, type, pos, v); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -unsigned FN(PW,dim)(__isl_keep PW *pw, enum isl_dim_type type) -{ - return pw ? isl_dim_size(pw->dim, type) : 0; -} - -__isl_give PW *FN(PW,split_dims)(__isl_take PW *pw, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!pw) - return NULL; - if (n == 0) - return pw; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - if (!pw->dim) - goto error; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_split_dims(pw->p[i].set, type, first, n); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -#ifndef NO_OPT -/* Compute the maximal value attained by the piecewise quasipolynomial - * on its domain or zero if the domain is empty. - * In the worst case, the domain is scanned completely, - * so the domain is assumed to be bounded. - */ -__isl_give isl_qpolynomial *FN(PW,opt)(__isl_take PW *pw, int max) -{ - int i; - isl_qpolynomial *opt; - - if (!pw) - return NULL; - - if (pw->n == 0) { - isl_dim *dim = isl_dim_copy(pw->dim); - FN(PW,free)(pw); - return isl_qpolynomial_zero(dim); - } - - opt = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[0].FIELD), - isl_set_copy(pw->p[0].set), max); - for (i = 1; i < pw->n; ++i) { - isl_qpolynomial *opt_i; - opt_i = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[i].FIELD), - isl_set_copy(pw->p[i].set), max); - if (max) - opt = isl_qpolynomial_max_cst(opt, opt_i); - else - opt = isl_qpolynomial_min_cst(opt, opt_i); - } - - FN(PW,free)(pw); - return opt; -} - -__isl_give isl_qpolynomial *FN(PW,max)(__isl_take PW *pw) -{ - return FN(PW,opt)(pw, 1); -} - -__isl_give isl_qpolynomial *FN(PW,min)(__isl_take PW *pw) -{ - return FN(PW,opt)(pw, 0); -} -#endif - -__isl_give isl_dim *FN(PW,get_dim)(__isl_keep PW *pw) -{ - return pw ? isl_dim_copy(pw->dim) : NULL; -} - -#ifndef NO_RESET_DIM -__isl_give PW *FN(PW,reset_dim)(__isl_take PW *pw, __isl_take isl_dim *dim) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw || !dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_reset_dim(pw->p[i].set, - isl_dim_copy(dim)); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,reset_dim)(pw->p[i].FIELD, - isl_dim_copy(dim)); - if (!pw->p[i].FIELD) - goto error; - } - isl_dim_free(pw->dim); - pw->dim = dim; - - return pw; -error: - isl_dim_free(dim); - FN(PW,free)(pw); - return NULL; -} -#endif - -int FN(PW,has_equal_dim)(__isl_keep PW *pw1, __isl_keep PW *pw2) -{ - if (!pw1 || !pw2) - return -1; - - return isl_dim_equal(pw1->dim, pw2->dim); -} - -#ifndef NO_MORPH -__isl_give PW *FN(PW,morph)(__isl_take PW *pw, __isl_take isl_morph *morph) -{ - int i; - isl_ctx *ctx; - - if (!pw || !morph) - goto error; - - ctx = isl_dim_get_ctx(pw->dim); - isl_assert(ctx, isl_dim_equal(pw->dim, morph->dom->dim), - goto error); - - pw = FN(PW,cow)(pw); - if (!pw) - goto error; - isl_dim_free(pw->dim); - pw->dim = isl_dim_copy(morph->ran->dim); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_morph_set(isl_morph_copy(morph), pw->p[i].set); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,morph)(pw->p[i].FIELD, - isl_morph_copy(morph)); - if (!pw->p[i].FIELD) - goto error; - } - - isl_morph_free(morph); - - return pw; -error: - FN(PW,free)(pw); - isl_morph_free(morph); - return NULL; -} -#endif - -int FN(PW,foreach_piece)(__isl_keep PW *pw, - int (*fn)(__isl_take isl_set *set, __isl_take EL *el, void *user), - void *user) -{ - int i; - - if (!pw) - return -1; - - for (i = 0; i < pw->n; ++i) - if (fn(isl_set_copy(pw->p[i].set), - FN(EL,copy)(pw->p[i].FIELD), user) < 0) - return -1; - - return 0; -} - -#ifndef NO_LIFT -static int any_divs(__isl_keep isl_set *set) -{ - int i; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) - if (set->p[i]->n_div > 0) - return 1; - - return 0; -} - -static int foreach_lifted_subset(__isl_take isl_set *set, __isl_take EL *el, - int (*fn)(__isl_take isl_set *set, __isl_take EL *el, - void *user), void *user) -{ - int i; - - if (!set || !el) - goto error; - - for (i = 0; i < set->n; ++i) { - isl_set *lift; - EL *copy; - - lift = isl_set_from_basic_set(isl_basic_set_copy(set->p[i])); - lift = isl_set_lift(lift); - - copy = FN(EL,copy)(el); - copy = FN(EL,lift)(copy, isl_set_get_dim(lift)); - - if (fn(lift, copy, user) < 0) - goto error; - } - - isl_set_free(set); - FN(EL,free)(el); - - return 0; -error: - isl_set_free(set); - FN(EL,free)(el); - return -1; -} - -int FN(PW,foreach_lifted_piece)(__isl_keep PW *pw, - int (*fn)(__isl_take isl_set *set, __isl_take EL *el, - void *user), void *user) -{ - int i; - - if (!pw) - return -1; - - for (i = 0; i < pw->n; ++i) { - isl_set *set; - EL *el; - - set = isl_set_copy(pw->p[i].set); - el = FN(EL,copy)(pw->p[i].FIELD); - if (!any_divs(set)) { - if (fn(set, el, user) < 0) - return -1; - continue; - } - if (foreach_lifted_subset(set, el, fn, user) < 0) - return -1; - } - - return 0; -} -#endif - -#ifndef NO_MOVE_DIMS -__isl_give PW *FN(PW,move_dims)(__isl_take PW *pw, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - pw->dim = isl_dim_move(pw->dim, dst_type, dst_pos, src_type, src_pos, n); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_move_dims(pw->p[i].set, - dst_type, dst_pos, - src_type, src_pos, n); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,move_dims)(pw->p[i].FIELD, - dst_type, dst_pos, src_type, src_pos, n); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} -#endif - -#ifndef NO_REALIGN -__isl_give PW *FN(PW,realign)(__isl_take PW *pw, __isl_take isl_reordering *exp) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw || !exp) - return NULL; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_realign(pw->p[i].set, - isl_reordering_copy(exp)); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,realign)(pw->p[i].FIELD, - isl_reordering_copy(exp)); - if (!pw->p[i].FIELD) - goto error; - } - - pw = FN(PW,reset_dim)(pw, isl_dim_copy(exp->dim)); - - isl_reordering_free(exp); - return pw; -error: - isl_reordering_free(exp); - FN(PW,free)(pw); - return NULL; -} - -/* Align the parameters of "pw" to those of "model". - */ -__isl_give PW *FN(PW,align_params)(__isl_take PW *pw, __isl_take isl_dim *model) -{ - isl_ctx *ctx; - - if (!pw || !model) - goto error; - - ctx = isl_dim_get_ctx(model); - if (!isl_dim_has_named_params(model)) - isl_die(ctx, isl_error_invalid, - "model has unnamed parameters", goto error); - if (!isl_dim_has_named_params(pw->dim)) - isl_die(ctx, isl_error_invalid, - "input has unnamed parameters", goto error); - if (!isl_dim_match(pw->dim, isl_dim_param, model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_dim_drop(model, isl_dim_in, - 0, isl_dim_size(model, isl_dim_in)); - model = isl_dim_drop(model, isl_dim_out, - 0, isl_dim_size(model, isl_dim_out)); - exp = isl_parameter_alignment_reordering(pw->dim, model); - exp = isl_reordering_extend_dim(exp, FN(PW,get_dim)(pw)); - pw = FN(PW,realign)(pw, exp); - } - - isl_dim_free(model); - return pw; -error: - isl_dim_free(model); - FN(PW,free)(pw); - return NULL; -} -#endif - -__isl_give PW *FN(PW,mul_isl_int)(__isl_take PW *pw, isl_int v) -{ - int i; - - if (isl_int_is_one(v)) - return pw; - if (pw && isl_int_is_zero(v)) { - PW *zero; - isl_dim *dim = FN(PW,get_dim)(pw); -#ifdef HAS_TYPE - zero = FN(PW,ZERO)(dim, pw->type); -#else - zero = FN(PW,ZERO)(dim); -#endif - FN(PW,free)(pw); - return zero; - } - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - if (pw->n == 0) - return pw; - -#ifdef HAS_TYPE - if (isl_int_is_neg(v)) - pw->type = isl_fold_type_negate(pw->type); -#endif - for (i = 0; i < pw->n; ++i) { - pw->p[i].FIELD = FN(EL,scale)(pw->p[i].FIELD, v); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -__isl_give PW *FN(PW,scale)(__isl_take PW *pw, isl_int v) -{ - return FN(PW,mul_isl_int)(pw, v); -} diff --git a/cloog-0.16.3/isl/isl_qsort.c b/cloog-0.16.3/isl/isl_qsort.c deleted file mode 100644 index 3183048916c4690018613e2ecea01f879f5e723f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_qsort.c +++ /dev/null @@ -1,249 +0,0 @@ -/* Copyright (C) 1991,1992,1996,1997,1999,2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Douglas C. Schmidt (schmidt@ics.uci.edu). - - The GNU C Library 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 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* If you consider tuning this algorithm, you should consult first: - Engineering a sort function; Jon Bentley and M. Douglas McIlroy; - Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993. */ - -#include -#include -#include -#include - -/* Byte-wise swap two items of size SIZE. */ -#define SWAP(a, b, size) \ - do \ - { \ - register size_t __size = (size); \ - register char *__a = (a), *__b = (b); \ - do \ - { \ - char __tmp = *__a; \ - *__a++ = *__b; \ - *__b++ = __tmp; \ - } while (--__size > 0); \ - } while (0) - -/* Discontinue quicksort algorithm when partition gets below this size. - This particular magic number was chosen to work best on a Sun 4/260. */ -#define MAX_THRESH 4 - -/* Stack node declarations used to store unfulfilled partition obligations. */ -typedef struct - { - char *lo; - char *hi; - } stack_node; - -/* The next 4 #defines implement a very fast in-line stack abstraction. */ -/* The stack needs log (total_elements) entries (we could even subtract - log(MAX_THRESH)). Since total_elements has type size_t, we get as - upper bound for log (total_elements): - bits per byte (CHAR_BIT) * sizeof(size_t). */ -#define STACK_SIZE (CHAR_BIT * sizeof(size_t)) -#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) -#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) -#define STACK_NOT_EMPTY (stack < top) - - -/* Order size using quicksort. This implementation incorporates - four optimizations discussed in Sedgewick: - - 1. Non-recursive, using an explicit stack of pointer that store the - next array partition to sort. To save time, this maximum amount - of space required to store an array of SIZE_MAX is allocated on the - stack. Assuming a 32-bit (64 bit) integer for size_t, this needs - only 32 * sizeof(stack_node) == 256 bytes (for 64 bit: 1024 bytes). - Pretty cheap, actually. - - 2. Chose the pivot element using a median-of-three decision tree. - This reduces the probability of selecting a bad pivot value and - eliminates certain extraneous comparisons. - - 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving - insertion sort to order the MAX_THRESH items within each partition. - This is a big win, since insertion sort is faster for small, mostly - sorted array segments. - - 4. The larger of the two sub-partitions is always pushed onto the - stack first, with the algorithm then concentrating on the - smaller partition. This *guarantees* no more than log (total_elems) - stack size is needed (actually O(1) in this case)! */ - -void isl_quicksort (void *const pbase, size_t total_elems, size_t size, - int (*cmp)(const void *, const void *, void *arg), void *arg) -{ - register char *base_ptr = (char *) pbase; - - const size_t max_thresh = MAX_THRESH * size; - - if (total_elems == 0) - /* Avoid lossage with unsigned arithmetic below. */ - return; - - if (total_elems > MAX_THRESH) - { - char *lo = base_ptr; - char *hi = &lo[size * (total_elems - 1)]; - stack_node stack[STACK_SIZE]; - stack_node *top = stack; - - PUSH (NULL, NULL); - - while (STACK_NOT_EMPTY) - { - char *left_ptr; - char *right_ptr; - - /* Select median value from among LO, MID, and HI. Rearrange - LO and HI so the three values are sorted. This lowers the - probability of picking a pathological pivot value and - skips a comparison for both the LEFT_PTR and RIGHT_PTR in - the while loops. */ - - char *mid = lo + size * ((hi - lo) / size >> 1); - - if ((*cmp) ((void *) mid, (void *) lo, arg) < 0) - SWAP (mid, lo, size); - if ((*cmp) ((void *) hi, (void *) mid, arg) < 0) - SWAP (mid, hi, size); - else - goto jump_over; - if ((*cmp) ((void *) mid, (void *) lo, arg) < 0) - SWAP (mid, lo, size); - jump_over:; - - left_ptr = lo + size; - right_ptr = hi - size; - - /* Here's the famous ``collapse the walls'' section of quicksort. - Gotta like those tight inner loops! They are the main reason - that this algorithm runs much faster than others. */ - do - { - while ((*cmp) ((void *) left_ptr, (void *) mid, arg) < 0) - left_ptr += size; - - while ((*cmp) ((void *) mid, (void *) right_ptr, arg) < 0) - right_ptr -= size; - - if (left_ptr < right_ptr) - { - SWAP (left_ptr, right_ptr, size); - if (mid == left_ptr) - mid = right_ptr; - else if (mid == right_ptr) - mid = left_ptr; - left_ptr += size; - right_ptr -= size; - } - else if (left_ptr == right_ptr) - { - left_ptr += size; - right_ptr -= size; - break; - } - } - while (left_ptr <= right_ptr); - - /* Set up pointers for next iteration. First determine whether - left and right partitions are below the threshold size. If so, - ignore one or both. Otherwise, push the larger partition's - bounds on the stack and continue sorting the smaller one. */ - - if ((size_t) (right_ptr - lo) <= max_thresh) - { - if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore both small partitions. */ - POP (lo, hi); - else - /* Ignore small left partition. */ - lo = left_ptr; - } - else if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore small right partition. */ - hi = right_ptr; - else if ((right_ptr - lo) > (hi - left_ptr)) - { - /* Push larger left partition indices. */ - PUSH (lo, right_ptr); - lo = left_ptr; - } - else - { - /* Push larger right partition indices. */ - PUSH (left_ptr, hi); - hi = right_ptr; - } - } - } - - /* Once the BASE_PTR array is partially sorted by quicksort the rest - is completely sorted using insertion sort, since this is efficient - for partitions below MAX_THRESH size. BASE_PTR points to the beginning - of the array to sort, and END_PTR points at the very last element in - the array (*not* one beyond it!). */ - -#define min(x, y) ((x) < (y) ? (x) : (y)) - - { - char *const end_ptr = &base_ptr[size * (total_elems - 1)]; - char *tmp_ptr = base_ptr; - char *thresh = min(end_ptr, base_ptr + max_thresh); - register char *run_ptr; - - /* Find smallest element in first threshold and place it at the - array's beginning. This is the smallest array element, - and the operation speeds up insertion sort's inner loop. */ - - for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size) - if ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) - tmp_ptr = run_ptr; - - if (tmp_ptr != base_ptr) - SWAP (tmp_ptr, base_ptr, size); - - /* Insertion sort, running from left-hand-side up to right-hand-side. */ - - run_ptr = base_ptr + size; - while ((run_ptr += size) <= end_ptr) - { - tmp_ptr = run_ptr - size; - while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) - tmp_ptr -= size; - - tmp_ptr += size; - if (tmp_ptr != run_ptr) - { - char *trav; - - trav = run_ptr + size; - while (--trav >= run_ptr) - { - char c = *trav; - char *hi, *lo; - - for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo) - *hi = *lo; - *hi = c; - } - } - } - } -} diff --git a/cloog-0.16.3/isl/isl_qsort.h b/cloog-0.16.3/isl/isl_qsort.h deleted file mode 100644 index 5ca1634205921264c2d3418a4074e630162ba7b6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_qsort.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ISL_QSORT_H -#define ISL_QSORT_H - -void isl_quicksort (void *const pbase, size_t total_elems, size_t size, - int (*cmp)(const void *, const void *, void *arg), void *arg); - -#endif diff --git a/cloog-0.16.3/isl/isl_range.c b/cloog-0.16.3/isl/isl_range.c deleted file mode 100644 index d31f277e4a93bb6dcdae165b55cca08416db9d73..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_range.c +++ /dev/null @@ -1,483 +0,0 @@ -#include -#include -#include -#include -#include -#include - -struct range_data { - struct isl_bound *bound; - int *signs; - int sign; - int test_monotonicity; - int monotonicity; - int tight; - isl_qpolynomial *poly; - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *pwf_tight; -}; - -static int propagate_on_domain(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data); - -/* Check whether the polynomial "poly" has sign "sign" over "bset", - * i.e., if sign == 1, check that the lower bound on the polynomial - * is non-negative and if sign == -1, check that the upper bound on - * the polynomial is non-positive. - */ -static int has_sign(__isl_keep isl_basic_set *bset, - __isl_keep isl_qpolynomial *poly, int sign, int *signs) -{ - struct range_data data_m; - unsigned nvar; - unsigned nparam; - isl_dim *dim; - isl_qpolynomial *opt; - int r; - enum isl_fold type; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - bset = isl_basic_set_copy(bset); - poly = isl_qpolynomial_copy(poly); - - bset = isl_basic_set_move_dims(bset, isl_dim_set, 0, - isl_dim_param, 0, nparam); - poly = isl_qpolynomial_move_dims(poly, isl_dim_set, 0, - isl_dim_param, 0, nparam); - - dim = isl_qpolynomial_get_dim(poly); - dim = isl_dim_drop(dim, isl_dim_set, 0, isl_dim_size(dim, isl_dim_set)); - - data_m.test_monotonicity = 0; - data_m.signs = signs; - data_m.sign = -sign; - type = data_m.sign < 0 ? isl_fold_min : isl_fold_max; - data_m.pwf = isl_pw_qpolynomial_fold_zero(dim, type); - data_m.tight = 0; - data_m.pwf_tight = NULL; - - if (propagate_on_domain(bset, poly, &data_m) < 0) - goto error; - - if (sign > 0) - opt = isl_pw_qpolynomial_fold_min(data_m.pwf); - else - opt = isl_pw_qpolynomial_fold_max(data_m.pwf); - - if (!opt) - r = -1; - else if (isl_qpolynomial_is_nan(opt) || - isl_qpolynomial_is_infty(opt) || - isl_qpolynomial_is_neginfty(opt)) - r = 0; - else - r = sign * isl_qpolynomial_sgn(opt) >= 0; - - isl_qpolynomial_free(opt); - - return r; -error: - isl_pw_qpolynomial_fold_free(data_m.pwf); - return -1; -} - -/* Return 1 if poly is monotonically increasing in the last set variable, - * -1 if poly is monotonically decreasing in the last set variable, - * 0 if no conclusion, - * -2 on error. - * - * We simply check the sign of p(x+1)-p(x) - */ -static int monotonicity(__isl_keep isl_basic_set *bset, - __isl_keep isl_qpolynomial *poly, struct range_data *data) -{ - isl_ctx *ctx; - isl_dim *dim; - isl_qpolynomial *sub = NULL; - isl_qpolynomial *diff = NULL; - int result = 0; - int s; - unsigned nvar; - - ctx = isl_qpolynomial_get_ctx(poly); - dim = isl_qpolynomial_get_dim(poly); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - sub = isl_qpolynomial_var(isl_dim_copy(dim), isl_dim_set, nvar - 1); - sub = isl_qpolynomial_add(sub, - isl_qpolynomial_rat_cst(dim, ctx->one, ctx->one)); - - diff = isl_qpolynomial_substitute(isl_qpolynomial_copy(poly), - isl_dim_set, nvar - 1, 1, &sub); - diff = isl_qpolynomial_sub(diff, isl_qpolynomial_copy(poly)); - - s = has_sign(bset, diff, 1, data->signs); - if (s < 0) - goto error; - if (s) - result = 1; - else { - s = has_sign(bset, diff, -1, data->signs); - if (s < 0) - goto error; - if (s) - result = -1; - } - - isl_qpolynomial_free(diff); - isl_qpolynomial_free(sub); - - return result; -error: - isl_qpolynomial_free(diff); - isl_qpolynomial_free(sub); - return -2; -} - -static __isl_give isl_qpolynomial *bound2poly(__isl_take isl_constraint *bound, - __isl_take isl_dim *dim, unsigned pos, int sign) -{ - if (!bound) { - if (sign > 0) - return isl_qpolynomial_infty(dim); - else - return isl_qpolynomial_neginfty(dim); - } - isl_dim_free(dim); - return isl_qpolynomial_from_constraint(bound, isl_dim_set, pos); -} - -static int bound_is_integer(__isl_take isl_constraint *bound, unsigned pos) -{ - isl_int c; - int is_int; - - if (!bound) - return 1; - - isl_int_init(c); - isl_constraint_get_coefficient(bound, isl_dim_set, pos, &c); - is_int = isl_int_is_one(c) || isl_int_is_negone(c); - isl_int_clear(c); - - return is_int; -} - -struct isl_fixed_sign_data { - int *signs; - int sign; - isl_qpolynomial *poly; -}; - -/* Add term "term" to data->poly if it has sign data->sign. - * The sign is determined based on the signs of the parameters - * and variables in data->signs. The integer divisions, if - * any, are assumed to be non-negative. - */ -static int collect_fixed_sign_terms(__isl_take isl_term *term, void *user) -{ - struct isl_fixed_sign_data *data = (struct isl_fixed_sign_data *)user; - isl_int n; - int i; - int sign; - unsigned nparam; - unsigned nvar; - - if (!term) - return -1; - - nparam = isl_term_dim(term, isl_dim_param); - nvar = isl_term_dim(term, isl_dim_set); - - isl_int_init(n); - - isl_term_get_num(term, &n); - - sign = isl_int_sgn(n); - for (i = 0; i < nparam; ++i) { - if (data->signs[i] > 0) - continue; - if (isl_term_get_exp(term, isl_dim_param, i) % 2) - sign = -sign; - } - for (i = 0; i < nvar; ++i) { - if (data->signs[nparam + i] > 0) - continue; - if (isl_term_get_exp(term, isl_dim_set, i) % 2) - sign = -sign; - } - - if (sign == data->sign) { - isl_qpolynomial *t = isl_qpolynomial_from_term(term); - - data->poly = isl_qpolynomial_add(data->poly, t); - } else - isl_term_free(term); - - isl_int_clear(n); - - return 0; -} - -/* Construct and return a polynomial that consists of the terms - * in "poly" that have sign "sign". The integer divisions, if - * any, are assumed to be non-negative. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_terms_of_sign( - __isl_keep isl_qpolynomial *poly, int *signs, int sign) -{ - struct isl_fixed_sign_data data = { signs, sign }; - data.poly = isl_qpolynomial_zero(isl_qpolynomial_get_dim(poly)); - - if (isl_qpolynomial_foreach_term(poly, collect_fixed_sign_terms, &data) < 0) - goto error; - - return data.poly; -error: - isl_qpolynomial_free(data.poly); - return NULL; -} - -/* Helper function to add a guarded polynomial to either pwf_tight or pwf, - * depending on whether the result has been determined to be tight. - */ -static int add_guarded_poly(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data) -{ - enum isl_fold type = data->sign < 0 ? isl_fold_min : isl_fold_max; - isl_set *set; - isl_qpolynomial_fold *fold; - isl_pw_qpolynomial_fold *pwf; - - fold = isl_qpolynomial_fold_alloc(type, poly); - set = isl_set_from_basic_set(bset); - pwf = isl_pw_qpolynomial_fold_alloc(type, set, fold); - if (data->tight) - data->pwf_tight = isl_pw_qpolynomial_fold_fold( - data->pwf_tight, pwf); - else - data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, pwf); - - return 0; -} - -/* Given a lower and upper bound on the final variable and constraints - * on the remaining variables where these bounds are active, - * eliminate the variable from data->poly based on these bounds. - * If the polynomial has been determined to be monotonic - * in the variable, then simply plug in the appropriate bound. - * If the current polynomial is tight and if this bound is integer, - * then the result is still tight. In all other cases, the results - * may not be tight. - * Otherwise, plug in the largest bound (in absolute value) in - * the positive terms (if an upper bound is wanted) or the negative terms - * (if a lower bounded is wanted) and the other bound in the other terms. - * - * If all variables have been eliminated, then record the result. - * Ohterwise, recurse on the next variable. - */ -static int propagate_on_bound_pair(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, __isl_take isl_basic_set *bset, - void *user) -{ - struct range_data *data = (struct range_data *)user; - int save_tight = data->tight; - isl_qpolynomial *poly; - int r; - unsigned nvar; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - if (data->monotonicity) { - isl_qpolynomial *sub; - isl_dim *dim = isl_qpolynomial_get_dim(data->poly); - if (data->monotonicity * data->sign > 0) { - if (data->tight) - data->tight = bound_is_integer(upper, nvar); - sub = bound2poly(upper, dim, nvar, 1); - isl_constraint_free(lower); - } else { - if (data->tight) - data->tight = bound_is_integer(lower, nvar); - sub = bound2poly(lower, dim, nvar, -1); - isl_constraint_free(upper); - } - poly = isl_qpolynomial_copy(data->poly); - poly = isl_qpolynomial_substitute(poly, isl_dim_set, nvar, 1, &sub); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_set, nvar, 1); - - isl_qpolynomial_free(sub); - } else { - isl_qpolynomial *l, *u; - isl_qpolynomial *pos, *neg; - isl_dim *dim = isl_qpolynomial_get_dim(data->poly); - unsigned nparam = isl_basic_set_dim(bset, isl_dim_param); - int sign = data->sign * data->signs[nparam + nvar]; - - data->tight = 0; - - u = bound2poly(upper, isl_dim_copy(dim), nvar, 1); - l = bound2poly(lower, dim, nvar, -1); - - pos = isl_qpolynomial_terms_of_sign(data->poly, data->signs, sign); - neg = isl_qpolynomial_terms_of_sign(data->poly, data->signs, -sign); - - pos = isl_qpolynomial_substitute(pos, isl_dim_set, nvar, 1, &u); - neg = isl_qpolynomial_substitute(neg, isl_dim_set, nvar, 1, &l); - - poly = isl_qpolynomial_add(pos, neg); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_set, nvar, 1); - - isl_qpolynomial_free(u); - isl_qpolynomial_free(l); - } - - if (isl_basic_set_dim(bset, isl_dim_set) == 0) - r = add_guarded_poly(bset, poly, data); - else - r = propagate_on_domain(bset, poly, data); - - data->tight = save_tight; - - return r; -} - -/* Recursively perform range propagation on the polynomial "poly" - * defined over the basic set "bset" and collect the results in "data". - */ -static int propagate_on_domain(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data) -{ - isl_ctx *ctx; - isl_qpolynomial *save_poly = data->poly; - int save_monotonicity = data->monotonicity; - unsigned d; - - if (!bset || !poly) - goto error; - - ctx = isl_basic_set_get_ctx(bset); - d = isl_basic_set_dim(bset, isl_dim_set); - isl_assert(ctx, d >= 1, goto error); - - if (isl_qpolynomial_is_cst(poly, NULL, NULL)) { - bset = isl_basic_set_project_out(bset, isl_dim_set, 0, d); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_set, 0, d); - return add_guarded_poly(bset, poly, data); - } - - if (data->test_monotonicity) - data->monotonicity = monotonicity(bset, poly, data); - else - data->monotonicity = 0; - if (data->monotonicity < -1) - goto error; - - data->poly = poly; - if (isl_basic_set_foreach_bound_pair(bset, isl_dim_set, d - 1, - &propagate_on_bound_pair, data) < 0) - goto error; - - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - data->monotonicity = save_monotonicity; - data->poly = save_poly; - - return 0; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - data->monotonicity = save_monotonicity; - data->poly = save_poly; - return -1; -} - -static int basic_guarded_poly_bound(__isl_take isl_basic_set *bset, void *user) -{ - struct range_data *data = (struct range_data *)user; - isl_ctx *ctx; - unsigned nparam = isl_basic_set_dim(bset, isl_dim_param); - unsigned dim = isl_basic_set_dim(bset, isl_dim_set); - int r; - - data->signs = NULL; - - ctx = isl_basic_set_get_ctx(bset); - data->signs = isl_alloc_array(ctx, int, - isl_basic_set_dim(bset, isl_dim_all)); - - if (isl_basic_set_dims_get_sign(bset, isl_dim_set, 0, dim, - data->signs + nparam) < 0) - goto error; - if (isl_basic_set_dims_get_sign(bset, isl_dim_param, 0, nparam, - data->signs) < 0) - goto error; - - r = propagate_on_domain(bset, isl_qpolynomial_copy(data->poly), data); - - free(data->signs); - - return r; -error: - free(data->signs); - isl_basic_set_free(bset); - return -1; -} - -static int qpolynomial_bound_on_domain_range(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data) -{ - unsigned nparam = isl_basic_set_dim(bset, isl_dim_param); - unsigned nvar = isl_basic_set_dim(bset, isl_dim_set); - isl_set *set; - - if (!bset) - goto error; - - if (nvar == 0) - return add_guarded_poly(bset, poly, data); - - set = isl_set_from_basic_set(bset); - set = isl_set_split_dims(set, isl_dim_param, 0, nparam); - set = isl_set_split_dims(set, isl_dim_set, 0, nvar); - - data->poly = poly; - - data->test_monotonicity = 1; - if (isl_set_foreach_basic_set(set, &basic_guarded_poly_bound, data) < 0) - goto error; - - isl_set_free(set); - isl_qpolynomial_free(poly); - - return 0; -error: - isl_set_free(set); - isl_qpolynomial_free(poly); - return -1; -} - -int isl_qpolynomial_bound_on_domain_range(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound) -{ - struct range_data data; - int r; - - data.pwf = bound->pwf; - data.pwf_tight = bound->pwf_tight; - data.tight = bound->check_tight; - if (bound->type == isl_fold_min) - data.sign = -1; - else - data.sign = 1; - - r = qpolynomial_bound_on_domain_range(bset, poly, &data); - - bound->pwf = data.pwf; - bound->pwf_tight = data.pwf_tight; - - return r; -} diff --git a/cloog-0.16.3/isl/isl_range.h b/cloog-0.16.3/isl/isl_range.h deleted file mode 100644 index c0970790d9e38c29556f9a5382888ae19d7f9cea..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_range.h +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int isl_qpolynomial_bound_on_domain_range(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound); -__isl_give isl_qpolynomial *isl_qpolynomial_terms_of_sign( - __isl_keep isl_qpolynomial *poly, int *signs, int sign); diff --git a/cloog-0.16.3/isl/isl_reordering.c b/cloog-0.16.3/isl/isl_reordering.c deleted file mode 100644 index 392152f92352319915b6af27e5f0664bfb9efd24..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_reordering.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include - -__isl_give isl_reordering *isl_reordering_alloc(isl_ctx *ctx, int len) -{ - isl_reordering *exp; - - exp = isl_alloc(ctx, struct isl_reordering, - sizeof(struct isl_reordering) + (len - 1) * sizeof(int)); - if (!exp) - return NULL; - - exp->ref = 1; - exp->len = len; - exp->dim = NULL; - - return exp; -} - -__isl_give isl_reordering *isl_reordering_copy(__isl_keep isl_reordering *exp) -{ - if (!exp) - return NULL; - - exp->ref++; - return exp; -} - -__isl_give isl_reordering *isl_reordering_dup(__isl_keep isl_reordering *r) -{ - int i; - isl_reordering *dup; - - if (!r) - return NULL; - - dup = isl_reordering_alloc(r->dim->ctx, r->len); - if (!dup) - return NULL; - - dup->dim = isl_dim_copy(r->dim); - if (!dup->dim) - return isl_reordering_free(dup); - for (i = 0; i < dup->len; ++i) - dup->pos[i] = r->pos[i]; - - return dup; -} - -__isl_give isl_reordering *isl_reordering_cow(__isl_take isl_reordering *r) -{ - if (!r) - return NULL; - - if (r->ref == 1) - return r; - r->ref--; - return isl_reordering_dup(r); -} - -void *isl_reordering_free(__isl_take isl_reordering *exp) -{ - if (!exp) - return NULL; - - if (--exp->ref > 0) - return NULL; - - isl_dim_free(exp->dim); - free(exp); - return NULL; -} - -/* Construct a reordering that maps the parameters of "alignee" - * to the corresponding parameters in a new dimension specification - * that has the parameters of "aligner" first, followed by - * any remaining parameters of "alignee" that do not occur in "aligner". - */ -__isl_give isl_reordering *isl_parameter_alignment_reordering( - __isl_keep isl_dim *alignee, __isl_keep isl_dim *aligner) -{ - int i, j; - isl_reordering *exp; - - if (!alignee || !aligner) - return NULL; - - exp = isl_reordering_alloc(alignee->ctx, alignee->nparam); - if (!exp) - return NULL; - - exp->dim = isl_dim_copy(aligner); - - for (i = 0; i < alignee->nparam; ++i) { - const char *name_i; - name_i = isl_dim_get_name(alignee, isl_dim_param, i); - if (!name_i) - isl_die(alignee->ctx, isl_error_invalid, - "cannot align unnamed parameters", goto error); - for (j = 0; j < aligner->nparam; ++j) { - const char *name_j; - name_j = isl_dim_get_name(aligner, isl_dim_param, j); - if (name_i == name_j) - break; - } - if (j < aligner->nparam) - exp->pos[i] = j; - else { - int pos; - pos = isl_dim_size(exp->dim, isl_dim_param); - exp->dim = isl_dim_add(exp->dim, isl_dim_param, 1); - exp->dim = isl_dim_set_name(exp->dim, - isl_dim_param, pos, name_i); - exp->pos[i] = pos; - } - } - - return exp; -error: - isl_reordering_free(exp); - return NULL; -} - -__isl_give isl_reordering *isl_reordering_extend(__isl_take isl_reordering *exp, - unsigned extra) -{ - int i; - isl_reordering *res; - int offset; - - if (!exp) - return NULL; - if (extra == 0) - return exp; - - offset = isl_dim_total(exp->dim) - exp->len; - res = isl_reordering_alloc(exp->dim->ctx, exp->len + extra); - if (!res) - goto error; - res->dim = isl_dim_copy(exp->dim); - for (i = 0; i < exp->len; ++i) - res->pos[i] = exp->pos[i]; - for (i = exp->len; i < res->len; ++i) - res->pos[i] = offset + i; - - isl_reordering_free(exp); - - return res; -error: - isl_reordering_free(exp); - return NULL; -} - -__isl_give isl_reordering *isl_reordering_extend_dim( - __isl_take isl_reordering *exp, __isl_take isl_dim *dim) -{ - isl_reordering *res; - - if (!exp || !dim) - goto error; - - res = isl_reordering_extend(isl_reordering_copy(exp), - isl_dim_total(dim) - exp->len); - res = isl_reordering_cow(res); - if (!res) - goto error; - isl_dim_free(res->dim); - res->dim = isl_dim_replace(dim, isl_dim_param, exp->dim); - - isl_reordering_free(exp); - - return res; -error: - isl_reordering_free(exp); - isl_dim_free(dim); - return NULL; -} - -void isl_reordering_dump(__isl_keep isl_reordering *exp) -{ - int i; - - for (i = 0; i < exp->len; ++i) - fprintf(stderr, "%d -> %d; ", i, exp->pos[i]); - fprintf(stderr, "\n"); -} diff --git a/cloog-0.16.3/isl/isl_reordering.h b/cloog-0.16.3/isl/isl_reordering.h deleted file mode 100644 index 7560d3a7f4a094b369eedb0cb509c52fd979ddf0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_reordering.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef ISL_REORDERING_H -#define ISL_REORDERING_H - -#include - -/* pos maps original dimensions to new dimensions. - * The final dimension is given by dim. - * The number of dimensions (i.e., the range of values) in the result - * may be larger than the number of dimensions in the input. - * In particular, the possible values of the entries in pos ranges from 0 to - * the total dimension of dim - 1, unless isl_reordering_extend - * has been called. - */ -struct isl_reordering { - int ref; - isl_dim *dim; - unsigned len; - int pos[1]; -}; -typedef struct isl_reordering isl_reordering; - -__isl_give isl_reordering *isl_parameter_alignment_reordering( - __isl_keep isl_dim *alignee, __isl_keep isl_dim *aligner); -__isl_give isl_reordering *isl_reordering_copy(__isl_keep isl_reordering *exp); -void *isl_reordering_free(__isl_take isl_reordering *exp); -__isl_give isl_reordering *isl_reordering_extend_dim( - __isl_take isl_reordering *exp, __isl_take isl_dim *dim); -__isl_give isl_reordering *isl_reordering_extend(__isl_take isl_reordering *exp, - unsigned extra); - -#endif diff --git a/cloog-0.16.3/isl/isl_sample.c b/cloog-0.16.3/isl/isl_sample.c deleted file mode 100644 index 9c9fb6d6971de53ec2c7fb377f1960dbf78e98be..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_sample.c +++ /dev/null @@ -1,1357 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_sample.h" -#include "isl_sample_piplib.h" -#include -#include -#include -#include "isl_equalities.h" -#include "isl_tab.h" -#include "isl_basis_reduction.h" -#include -#include - -static struct isl_vec *empty_sample(struct isl_basic_set *bset) -{ - struct isl_vec *vec; - - vec = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - return vec; -} - -/* Construct a zero sample of the same dimension as bset. - * As a special case, if bset is zero-dimensional, this - * function creates a zero-dimensional sample point. - */ -static struct isl_vec *zero_sample(struct isl_basic_set *bset) -{ - unsigned dim; - struct isl_vec *sample; - - dim = isl_basic_set_total_dim(bset); - sample = isl_vec_alloc(bset->ctx, 1 + dim); - if (sample) { - isl_int_set_si(sample->el[0], 1); - isl_seq_clr(sample->el + 1, dim); - } - isl_basic_set_free(bset); - return sample; -} - -static struct isl_vec *interval_sample(struct isl_basic_set *bset) -{ - int i; - isl_int t; - struct isl_vec *sample; - - bset = isl_basic_set_simplify(bset); - if (!bset) - return NULL; - if (isl_basic_set_plain_is_empty(bset)) - return empty_sample(bset); - if (bset->n_eq == 0 && bset->n_ineq == 0) - return zero_sample(bset); - - sample = isl_vec_alloc(bset->ctx, 2); - if (!sample) - goto error; - if (!bset) - return NULL; - isl_int_set_si(sample->block.data[0], 1); - - if (bset->n_eq > 0) { - isl_assert(bset->ctx, bset->n_eq == 1, goto error); - isl_assert(bset->ctx, bset->n_ineq == 0, goto error); - if (isl_int_is_one(bset->eq[0][1])) - isl_int_neg(sample->el[1], bset->eq[0][0]); - else { - isl_assert(bset->ctx, isl_int_is_negone(bset->eq[0][1]), - goto error); - isl_int_set(sample->el[1], bset->eq[0][0]); - } - isl_basic_set_free(bset); - return sample; - } - - isl_int_init(t); - if (isl_int_is_one(bset->ineq[0][1])) - isl_int_neg(sample->block.data[1], bset->ineq[0][0]); - else - isl_int_set(sample->block.data[1], bset->ineq[0][0]); - for (i = 1; i < bset->n_ineq; ++i) { - isl_seq_inner_product(sample->block.data, - bset->ineq[i], 2, &t); - if (isl_int_is_neg(t)) - break; - } - isl_int_clear(t); - if (i < bset->n_ineq) { - isl_vec_free(sample); - return empty_sample(bset); - } - - isl_basic_set_free(bset); - return sample; -error: - isl_basic_set_free(bset); - isl_vec_free(sample); - return NULL; -} - -static struct isl_mat *independent_bounds(struct isl_basic_set *bset) -{ - int i, j, n; - struct isl_mat *dirs = NULL; - struct isl_mat *bounds = NULL; - unsigned dim; - - if (!bset) - return NULL; - - dim = isl_basic_set_n_dim(bset); - bounds = isl_mat_alloc(bset->ctx, 1+dim, 1+dim); - if (!bounds) - return NULL; - - isl_int_set_si(bounds->row[0][0], 1); - isl_seq_clr(bounds->row[0]+1, dim); - bounds->n_row = 1; - - if (bset->n_ineq == 0) - return bounds; - - dirs = isl_mat_alloc(bset->ctx, dim, dim); - if (!dirs) { - isl_mat_free(bounds); - return NULL; - } - isl_seq_cpy(dirs->row[0], bset->ineq[0]+1, dirs->n_col); - isl_seq_cpy(bounds->row[1], bset->ineq[0], bounds->n_col); - for (j = 1, n = 1; n < dim && j < bset->n_ineq; ++j) { - int pos; - - isl_seq_cpy(dirs->row[n], bset->ineq[j]+1, dirs->n_col); - - pos = isl_seq_first_non_zero(dirs->row[n], dirs->n_col); - if (pos < 0) - continue; - for (i = 0; i < n; ++i) { - int pos_i; - pos_i = isl_seq_first_non_zero(dirs->row[i], dirs->n_col); - if (pos_i < pos) - continue; - if (pos_i > pos) - break; - isl_seq_elim(dirs->row[n], dirs->row[i], pos, - dirs->n_col, NULL); - pos = isl_seq_first_non_zero(dirs->row[n], dirs->n_col); - if (pos < 0) - break; - } - if (pos < 0) - continue; - if (i < n) { - int k; - isl_int *t = dirs->row[n]; - for (k = n; k > i; --k) - dirs->row[k] = dirs->row[k-1]; - dirs->row[i] = t; - } - ++n; - isl_seq_cpy(bounds->row[n], bset->ineq[j], bounds->n_col); - } - isl_mat_free(dirs); - bounds->n_row = 1+n; - return bounds; -} - -static void swap_inequality(struct isl_basic_set *bset, int a, int b) -{ - isl_int *t = bset->ineq[a]; - bset->ineq[a] = bset->ineq[b]; - bset->ineq[b] = t; -} - -/* Skew into positive orthant and project out lineality space. - * - * We perform a unimodular transformation that turns a selected - * maximal set of linearly independent bounds into constraints - * on the first dimensions that impose that these first dimensions - * are non-negative. In particular, the constraint matrix is lower - * triangular with positive entries on the diagonal and negative - * entries below. - * If "bset" has a lineality space then these constraints (and therefore - * all constraints in bset) only involve the first dimensions. - * The remaining dimensions then do not appear in any constraints and - * we can select any value for them, say zero. We therefore project - * out this final dimensions and plug in the value zero later. This - * is accomplished by simply dropping the final columns of - * the unimodular transformation. - */ -static struct isl_basic_set *isl_basic_set_skew_to_positive_orthant( - struct isl_basic_set *bset, struct isl_mat **T) -{ - struct isl_mat *U = NULL; - struct isl_mat *bounds = NULL; - int i, j; - unsigned old_dim, new_dim; - - *T = NULL; - if (!bset) - return NULL; - - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(bset->ctx, bset->n_div == 0, goto error); - isl_assert(bset->ctx, bset->n_eq == 0, goto error); - - old_dim = isl_basic_set_n_dim(bset); - /* Try to move (multiples of) unit rows up. */ - for (i = 0, j = 0; i < bset->n_ineq; ++i) { - int pos = isl_seq_first_non_zero(bset->ineq[i]+1, old_dim); - if (pos < 0) - continue; - if (isl_seq_first_non_zero(bset->ineq[i]+1+pos+1, - old_dim-pos-1) >= 0) - continue; - if (i != j) - swap_inequality(bset, i, j); - ++j; - } - bounds = independent_bounds(bset); - if (!bounds) - goto error; - new_dim = bounds->n_row - 1; - bounds = isl_mat_left_hermite(bounds, 1, &U, NULL); - if (!bounds) - goto error; - U = isl_mat_drop_cols(U, 1 + new_dim, old_dim - new_dim); - bset = isl_basic_set_preimage(bset, isl_mat_copy(U)); - if (!bset) - goto error; - *T = U; - isl_mat_free(bounds); - return bset; -error: - isl_mat_free(bounds); - isl_mat_free(U); - isl_basic_set_free(bset); - return NULL; -} - -/* Find a sample integer point, if any, in bset, which is known - * to have equalities. If bset contains no integer points, then - * return a zero-length vector. - * We simply remove the known equalities, compute a sample - * in the resulting bset, using the specified recurse function, - * and then transform the sample back to the original space. - */ -static struct isl_vec *sample_eq(struct isl_basic_set *bset, - struct isl_vec *(*recurse)(struct isl_basic_set *)) -{ - struct isl_mat *T; - struct isl_vec *sample; - - if (!bset) - return NULL; - - bset = isl_basic_set_remove_equalities(bset, &T, NULL); - sample = recurse(bset); - if (!sample || sample->size == 0) - isl_mat_free(T); - else - sample = isl_mat_vec_product(T, sample); - return sample; -} - -/* Return a matrix containing the equalities of the tableau - * in constraint form. The tableau is assumed to have - * an associated bset that has been kept up-to-date. - */ -static struct isl_mat *tab_equalities(struct isl_tab *tab) -{ - int i, j; - int n_eq; - struct isl_mat *eq; - struct isl_basic_set *bset; - - if (!tab) - return NULL; - - bset = isl_tab_peek_bset(tab); - isl_assert(tab->mat->ctx, bset, return NULL); - - n_eq = tab->n_var - tab->n_col + tab->n_dead; - if (tab->empty || n_eq == 0) - return isl_mat_alloc(tab->mat->ctx, 0, tab->n_var); - if (n_eq == tab->n_var) - return isl_mat_identity(tab->mat->ctx, tab->n_var); - - eq = isl_mat_alloc(tab->mat->ctx, n_eq, tab->n_var); - if (!eq) - return NULL; - for (i = 0, j = 0; i < tab->n_con; ++i) { - if (tab->con[i].is_row) - continue; - if (tab->con[i].index >= 0 && tab->con[i].index >= tab->n_dead) - continue; - if (i < bset->n_eq) - isl_seq_cpy(eq->row[j], bset->eq[i] + 1, tab->n_var); - else - isl_seq_cpy(eq->row[j], - bset->ineq[i - bset->n_eq] + 1, tab->n_var); - ++j; - } - isl_assert(bset->ctx, j == n_eq, goto error); - return eq; -error: - isl_mat_free(eq); - return NULL; -} - -/* Compute and return an initial basis for the bounded tableau "tab". - * - * If the tableau is either full-dimensional or zero-dimensional, - * the we simply return an identity matrix. - * Otherwise, we construct a basis whose first directions correspond - * to equalities. - */ -static struct isl_mat *initial_basis(struct isl_tab *tab) -{ - int n_eq; - struct isl_mat *eq; - struct isl_mat *Q; - - tab->n_unbounded = 0; - tab->n_zero = n_eq = tab->n_var - tab->n_col + tab->n_dead; - if (tab->empty || n_eq == 0 || n_eq == tab->n_var) - return isl_mat_identity(tab->mat->ctx, 1 + tab->n_var); - - eq = tab_equalities(tab); - eq = isl_mat_left_hermite(eq, 0, NULL, &Q); - if (!eq) - return NULL; - isl_mat_free(eq); - - Q = isl_mat_lin_to_aff(Q); - return Q; -} - -/* Given a tableau representing a set, find and return - * an integer point in the set, if there is any. - * - * We perform a depth first search - * for an integer point, by scanning all possible values in the range - * attained by a basis vector, where an initial basis may have been set - * by the calling function. Otherwise an initial basis that exploits - * the equalities in the tableau is created. - * tab->n_zero is currently ignored and is clobbered by this function. - * - * The tableau is allowed to have unbounded direction, but then - * the calling function needs to set an initial basis, with the - * unbounded directions last and with tab->n_unbounded set - * to the number of unbounded directions. - * Furthermore, the calling functions needs to add shifted copies - * of all constraints involving unbounded directions to ensure - * that any feasible rational value in these directions can be rounded - * up to yield a feasible integer value. - * In particular, let B define the given basis x' = B x - * and let T be the inverse of B, i.e., X = T x'. - * Let a x + c >= 0 be a constraint of the set represented by the tableau, - * or a T x' + c >= 0 in terms of the given basis. Assume that - * the bounded directions have an integer value, then we can safely - * round up the values for the unbounded directions if we make sure - * that x' not only satisfies the original constraint, but also - * the constraint "a T x' + c + s >= 0" with s the sum of all - * negative values in the last n_unbounded entries of "a T". - * The calling function therefore needs to add the constraint - * a x + c + s >= 0. The current function then scans the first - * directions for an integer value and once those have been found, - * it can compute "T ceil(B x)" to yield an integer point in the set. - * Note that during the search, the first rows of B may be changed - * by a basis reduction, but the last n_unbounded rows of B remain - * unaltered and are also not mixed into the first rows. - * - * The search is implemented iteratively. "level" identifies the current - * basis vector. "init" is true if we want the first value at the current - * level and false if we want the next value. - * - * The initial basis is the identity matrix. If the range in some direction - * contains more than one integer value, we perform basis reduction based - * on the value of ctx->opt->gbr - * - ISL_GBR_NEVER: never perform basis reduction - * - ISL_GBR_ONCE: only perform basis reduction the first - * time such a range is encountered - * - ISL_GBR_ALWAYS: always perform basis reduction when - * such a range is encountered - * - * When ctx->opt->gbr is set to ISL_GBR_ALWAYS, then we allow the basis - * reduction computation to return early. That is, as soon as it - * finds a reasonable first direction. - */ -struct isl_vec *isl_tab_sample(struct isl_tab *tab) -{ - unsigned dim; - unsigned gbr; - struct isl_ctx *ctx; - struct isl_vec *sample; - struct isl_vec *min; - struct isl_vec *max; - enum isl_lp_result res; - int level; - int init; - int reduced; - struct isl_tab_undo **snap; - - if (!tab) - return NULL; - if (tab->empty) - return isl_vec_alloc(tab->mat->ctx, 0); - - if (!tab->basis) - tab->basis = initial_basis(tab); - if (!tab->basis) - return NULL; - isl_assert(tab->mat->ctx, tab->basis->n_row == tab->n_var + 1, - return NULL); - isl_assert(tab->mat->ctx, tab->basis->n_col == tab->n_var + 1, - return NULL); - - ctx = tab->mat->ctx; - dim = tab->n_var; - gbr = ctx->opt->gbr; - - if (tab->n_unbounded == tab->n_var) { - sample = isl_tab_get_sample_value(tab); - sample = isl_mat_vec_product(isl_mat_copy(tab->basis), sample); - sample = isl_vec_ceil(sample); - sample = isl_mat_vec_inverse_product(isl_mat_copy(tab->basis), - sample); - return sample; - } - - if (isl_tab_extend_cons(tab, dim + 1) < 0) - return NULL; - - min = isl_vec_alloc(ctx, dim); - max = isl_vec_alloc(ctx, dim); - snap = isl_alloc_array(ctx, struct isl_tab_undo *, dim); - - if (!min || !max || !snap) - goto error; - - level = 0; - init = 1; - reduced = 0; - - while (level >= 0) { - int empty = 0; - if (init) { - res = isl_tab_min(tab, tab->basis->row[1 + level], - ctx->one, &min->el[level], NULL, 0); - if (res == isl_lp_empty) - empty = 1; - isl_assert(ctx, res != isl_lp_unbounded, goto error); - if (res == isl_lp_error) - goto error; - if (!empty && isl_tab_sample_is_integer(tab)) - break; - isl_seq_neg(tab->basis->row[1 + level] + 1, - tab->basis->row[1 + level] + 1, dim); - res = isl_tab_min(tab, tab->basis->row[1 + level], - ctx->one, &max->el[level], NULL, 0); - isl_seq_neg(tab->basis->row[1 + level] + 1, - tab->basis->row[1 + level] + 1, dim); - isl_int_neg(max->el[level], max->el[level]); - if (res == isl_lp_empty) - empty = 1; - isl_assert(ctx, res != isl_lp_unbounded, goto error); - if (res == isl_lp_error) - goto error; - if (!empty && isl_tab_sample_is_integer(tab)) - break; - if (!empty && !reduced && - ctx->opt->gbr != ISL_GBR_NEVER && - isl_int_lt(min->el[level], max->el[level])) { - unsigned gbr_only_first; - if (ctx->opt->gbr == ISL_GBR_ONCE) - ctx->opt->gbr = ISL_GBR_NEVER; - tab->n_zero = level; - gbr_only_first = ctx->opt->gbr_only_first; - ctx->opt->gbr_only_first = - ctx->opt->gbr == ISL_GBR_ALWAYS; - tab = isl_tab_compute_reduced_basis(tab); - ctx->opt->gbr_only_first = gbr_only_first; - if (!tab || !tab->basis) - goto error; - reduced = 1; - continue; - } - reduced = 0; - snap[level] = isl_tab_snap(tab); - } else - isl_int_add_ui(min->el[level], min->el[level], 1); - - if (empty || isl_int_gt(min->el[level], max->el[level])) { - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - continue; - } - isl_int_neg(tab->basis->row[1 + level][0], min->el[level]); - if (isl_tab_add_valid_eq(tab, tab->basis->row[1 + level]) < 0) - goto error; - isl_int_set_si(tab->basis->row[1 + level][0], 0); - if (level + tab->n_unbounded < dim - 1) { - ++level; - init = 1; - continue; - } - break; - } - - if (level >= 0) { - sample = isl_tab_get_sample_value(tab); - if (!sample) - goto error; - if (tab->n_unbounded && !isl_int_is_one(sample->el[0])) { - sample = isl_mat_vec_product(isl_mat_copy(tab->basis), - sample); - sample = isl_vec_ceil(sample); - sample = isl_mat_vec_inverse_product( - isl_mat_copy(tab->basis), sample); - } - } else - sample = isl_vec_alloc(ctx, 0); - - ctx->opt->gbr = gbr; - isl_vec_free(min); - isl_vec_free(max); - free(snap); - return sample; -error: - ctx->opt->gbr = gbr; - isl_vec_free(min); - isl_vec_free(max); - free(snap); - return NULL; -} - -static struct isl_vec *sample_bounded(struct isl_basic_set *bset); - -/* Compute a sample point of the given basic set, based on the given, - * non-trivial factorization. - */ -static __isl_give isl_vec *factored_sample(__isl_take isl_basic_set *bset, - __isl_take isl_factorizer *f) -{ - int i, n; - isl_vec *sample = NULL; - isl_ctx *ctx; - unsigned nparam; - unsigned nvar; - - ctx = isl_basic_set_get_ctx(bset); - if (!ctx) - goto error; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - sample = isl_vec_alloc(ctx, 1 + isl_basic_set_total_dim(bset)); - if (!sample) - goto error; - isl_int_set_si(sample->el[0], 1); - - bset = isl_morph_basic_set(isl_morph_copy(f->morph), bset); - - for (i = 0, n = 0; i < f->n_group; ++i) { - isl_basic_set *bset_i; - isl_vec *sample_i; - - bset_i = isl_basic_set_copy(bset); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam + n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam, n); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, - n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, 0, n); - - sample_i = sample_bounded(bset_i); - if (!sample_i) - goto error; - if (sample_i->size == 0) { - isl_basic_set_free(bset); - isl_factorizer_free(f); - isl_vec_free(sample); - return sample_i; - } - isl_seq_cpy(sample->el + 1 + nparam + n, - sample_i->el + 1, f->len[i]); - isl_vec_free(sample_i); - - n += f->len[i]; - } - - f->morph = isl_morph_inverse(f->morph); - sample = isl_morph_vec(isl_morph_copy(f->morph), sample); - - isl_basic_set_free(bset); - isl_factorizer_free(f); - return sample; -error: - isl_basic_set_free(bset); - isl_factorizer_free(f); - isl_vec_free(sample); - return NULL; -} - -/* Given a basic set that is known to be bounded, find and return - * an integer point in the basic set, if there is any. - * - * After handling some trivial cases, we construct a tableau - * and then use isl_tab_sample to find a sample, passing it - * the identity matrix as initial basis. - */ -static struct isl_vec *sample_bounded(struct isl_basic_set *bset) -{ - unsigned dim; - struct isl_ctx *ctx; - struct isl_vec *sample; - struct isl_tab *tab = NULL; - isl_factorizer *f; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return empty_sample(bset); - - dim = isl_basic_set_total_dim(bset); - if (dim == 0) - return zero_sample(bset); - if (dim == 1) - return interval_sample(bset); - if (bset->n_eq > 0) - return sample_eq(bset, sample_bounded); - - f = isl_basic_set_factorizer(bset); - if (!f) - goto error; - if (f->n_group != 0) - return factored_sample(bset, f); - isl_factorizer_free(f); - - ctx = bset->ctx; - - tab = isl_tab_from_basic_set(bset); - if (tab && tab->empty) { - isl_tab_free(tab); - ISL_F_SET(bset, ISL_BASIC_SET_EMPTY); - sample = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - return sample; - } - - if (isl_tab_track_bset(tab, isl_basic_set_copy(bset)) < 0) - goto error; - if (!ISL_F_ISSET(bset, ISL_BASIC_SET_NO_IMPLICIT)) - if (isl_tab_detect_implicit_equalities(tab) < 0) - goto error; - - sample = isl_tab_sample(tab); - if (!sample) - goto error; - - if (sample->size > 0) { - isl_vec_free(bset->sample); - bset->sample = isl_vec_copy(sample); - } - - isl_basic_set_free(bset); - isl_tab_free(tab); - return sample; -error: - isl_basic_set_free(bset); - isl_tab_free(tab); - return NULL; -} - -/* Given a basic set "bset" and a value "sample" for the first coordinates - * of bset, plug in these values and drop the corresponding coordinates. - * - * We do this by computing the preimage of the transformation - * - * [ 1 0 ] - * x = [ s 0 ] x' - * [ 0 I ] - * - * where [1 s] is the sample value and I is the identity matrix of the - * appropriate dimension. - */ -static struct isl_basic_set *plug_in(struct isl_basic_set *bset, - struct isl_vec *sample) -{ - int i; - unsigned total; - struct isl_mat *T; - - if (!bset || !sample) - goto error; - - total = isl_basic_set_total_dim(bset); - T = isl_mat_alloc(bset->ctx, 1 + total, 1 + total - (sample->size - 1)); - if (!T) - goto error; - - for (i = 0; i < sample->size; ++i) { - isl_int_set(T->row[i][0], sample->el[i]); - isl_seq_clr(T->row[i] + 1, T->n_col - 1); - } - for (i = 0; i < T->n_col - 1; ++i) { - isl_seq_clr(T->row[sample->size + i], T->n_col); - isl_int_set_si(T->row[sample->size + i][1 + i], 1); - } - isl_vec_free(sample); - - bset = isl_basic_set_preimage(bset, T); - return bset; -error: - isl_basic_set_free(bset); - isl_vec_free(sample); - return NULL; -} - -/* Given a basic set "bset", return any (possibly non-integer) point - * in the basic set. - */ -static struct isl_vec *rational_sample(struct isl_basic_set *bset) -{ - struct isl_tab *tab; - struct isl_vec *sample; - - if (!bset) - return NULL; - - tab = isl_tab_from_basic_set(bset); - sample = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - - isl_basic_set_free(bset); - - return sample; -} - -/* Given a linear cone "cone" and a rational point "vec", - * construct a polyhedron with shifted copies of the constraints in "cone", - * i.e., a polyhedron with "cone" as its recession cone, such that each - * point x in this polyhedron is such that the unit box positioned at x - * lies entirely inside the affine cone 'vec + cone'. - * Any rational point in this polyhedron may therefore be rounded up - * to yield an integer point that lies inside said affine cone. - * - * Denote the constraints of cone by " >= 0" and the rational - * point "vec" by v/d. - * Let b_i = . Then the affine cone 'vec + cone' is given - * by - b/d >= 0. - * The polyhedron - ceil{b/d} >= 0 is a subset of this affine cone. - * We prefer this polyhedron over the actual affine cone because it doesn't - * require a scaling of the constraints. - * If each of the vertices of the unit cube positioned at x lies inside - * this polyhedron, then the whole unit cube at x lies inside the affine cone. - * We therefore impose that x' = x + \sum e_i, for any selection of unit - * vectors lies inside the polyhedron, i.e., - * - * - ceil{b/d} = + sum a_i - ceil{b/d} >= 0 - * - * The most stringent of these constraints is the one that selects - * all negative a_i, so the polyhedron we are looking for has constraints - * - * + sum_{a_i < 0} a_i - ceil{b/d} >= 0 - * - * Note that if cone were known to have only non-negative rays - * (which can be accomplished by a unimodular transformation), - * then we would only have to check the points x' = x + e_i - * and we only have to add the smallest negative a_i (if any) - * instead of the sum of all negative a_i. - */ -static struct isl_basic_set *shift_cone(struct isl_basic_set *cone, - struct isl_vec *vec) -{ - int i, j, k; - unsigned total; - - struct isl_basic_set *shift = NULL; - - if (!cone || !vec) - goto error; - - isl_assert(cone->ctx, cone->n_eq == 0, goto error); - - total = isl_basic_set_total_dim(cone); - - shift = isl_basic_set_alloc_dim(isl_basic_set_get_dim(cone), - 0, 0, cone->n_ineq); - - for (i = 0; i < cone->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(shift); - if (k < 0) - goto error; - isl_seq_cpy(shift->ineq[k] + 1, cone->ineq[i] + 1, total); - isl_seq_inner_product(shift->ineq[k] + 1, vec->el + 1, total, - &shift->ineq[k][0]); - isl_int_cdiv_q(shift->ineq[k][0], - shift->ineq[k][0], vec->el[0]); - isl_int_neg(shift->ineq[k][0], shift->ineq[k][0]); - for (j = 0; j < total; ++j) { - if (isl_int_is_nonneg(shift->ineq[k][1 + j])) - continue; - isl_int_add(shift->ineq[k][0], - shift->ineq[k][0], shift->ineq[k][1 + j]); - } - } - - isl_basic_set_free(cone); - isl_vec_free(vec); - - return isl_basic_set_finalize(shift); -error: - isl_basic_set_free(shift); - isl_basic_set_free(cone); - isl_vec_free(vec); - return NULL; -} - -/* Given a rational point vec in a (transformed) basic set, - * such that cone is the recession cone of the original basic set, - * "round up" the rational point to an integer point. - * - * We first check if the rational point just happens to be integer. - * If not, we transform the cone in the same way as the basic set, - * pick a point x in this cone shifted to the rational point such that - * the whole unit cube at x is also inside this affine cone. - * Then we simply round up the coordinates of x and return the - * resulting integer point. - */ -static struct isl_vec *round_up_in_cone(struct isl_vec *vec, - struct isl_basic_set *cone, struct isl_mat *U) -{ - unsigned total; - - if (!vec || !cone || !U) - goto error; - - isl_assert(vec->ctx, vec->size != 0, goto error); - if (isl_int_is_one(vec->el[0])) { - isl_mat_free(U); - isl_basic_set_free(cone); - return vec; - } - - total = isl_basic_set_total_dim(cone); - cone = isl_basic_set_preimage(cone, U); - cone = isl_basic_set_remove_dims(cone, isl_dim_set, - 0, total - (vec->size - 1)); - - cone = shift_cone(cone, vec); - - vec = rational_sample(cone); - vec = isl_vec_ceil(vec); - return vec; -error: - isl_mat_free(U); - isl_vec_free(vec); - isl_basic_set_free(cone); - return NULL; -} - -/* Concatenate two integer vectors, i.e., two vectors with denominator - * (stored in element 0) equal to 1. - */ -static struct isl_vec *vec_concat(struct isl_vec *vec1, struct isl_vec *vec2) -{ - struct isl_vec *vec; - - if (!vec1 || !vec2) - goto error; - isl_assert(vec1->ctx, vec1->size > 0, goto error); - isl_assert(vec2->ctx, vec2->size > 0, goto error); - isl_assert(vec1->ctx, isl_int_is_one(vec1->el[0]), goto error); - isl_assert(vec2->ctx, isl_int_is_one(vec2->el[0]), goto error); - - vec = isl_vec_alloc(vec1->ctx, vec1->size + vec2->size - 1); - if (!vec) - goto error; - - isl_seq_cpy(vec->el, vec1->el, vec1->size); - isl_seq_cpy(vec->el + vec1->size, vec2->el + 1, vec2->size - 1); - - isl_vec_free(vec1); - isl_vec_free(vec2); - - return vec; -error: - isl_vec_free(vec1); - isl_vec_free(vec2); - return NULL; -} - -/* Give a basic set "bset" with recession cone "cone", compute and - * return an integer point in bset, if any. - * - * If the recession cone is full-dimensional, then we know that - * bset contains an infinite number of integer points and it is - * fairly easy to pick one of them. - * If the recession cone is not full-dimensional, then we first - * transform bset such that the bounded directions appear as - * the first dimensions of the transformed basic set. - * We do this by using a unimodular transformation that transforms - * the equalities in the recession cone to equalities on the first - * dimensions. - * - * The transformed set is then projected onto its bounded dimensions. - * Note that to compute this projection, we can simply drop all constraints - * involving any of the unbounded dimensions since these constraints - * cannot be combined to produce a constraint on the bounded dimensions. - * To see this, assume that there is such a combination of constraints - * that produces a constraint on the bounded dimensions. This means - * that some combination of the unbounded dimensions has both an upper - * bound and a lower bound in terms of the bounded dimensions, but then - * this combination would be a bounded direction too and would have been - * transformed into a bounded dimensions. - * - * We then compute a sample value in the bounded dimensions. - * If no such value can be found, then the original set did not contain - * any integer points and we are done. - * Otherwise, we plug in the value we found in the bounded dimensions, - * project out these bounded dimensions and end up with a set with - * a full-dimensional recession cone. - * A sample point in this set is computed by "rounding up" any - * rational point in the set. - * - * The sample points in the bounded and unbounded dimensions are - * then combined into a single sample point and transformed back - * to the original space. - */ -__isl_give isl_vec *isl_basic_set_sample_with_cone( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone) -{ - unsigned total; - unsigned cone_dim; - struct isl_mat *M, *U; - struct isl_vec *sample; - struct isl_vec *cone_sample; - struct isl_ctx *ctx; - struct isl_basic_set *bounded; - - if (!bset || !cone) - goto error; - - ctx = bset->ctx; - total = isl_basic_set_total_dim(cone); - cone_dim = total - cone->n_eq; - - M = isl_mat_sub_alloc6(bset->ctx, cone->eq, 0, cone->n_eq, 1, total); - M = isl_mat_left_hermite(M, 0, &U, NULL); - if (!M) - goto error; - isl_mat_free(M); - - U = isl_mat_lin_to_aff(U); - bset = isl_basic_set_preimage(bset, isl_mat_copy(U)); - - bounded = isl_basic_set_copy(bset); - bounded = isl_basic_set_drop_constraints_involving(bounded, - total - cone_dim, cone_dim); - bounded = isl_basic_set_drop_dims(bounded, total - cone_dim, cone_dim); - sample = sample_bounded(bounded); - if (!sample || sample->size == 0) { - isl_basic_set_free(bset); - isl_basic_set_free(cone); - isl_mat_free(U); - return sample; - } - bset = plug_in(bset, isl_vec_copy(sample)); - cone_sample = rational_sample(bset); - cone_sample = round_up_in_cone(cone_sample, cone, isl_mat_copy(U)); - sample = vec_concat(sample, cone_sample); - sample = isl_mat_vec_product(U, sample); - return sample; -error: - isl_basic_set_free(cone); - isl_basic_set_free(bset); - return NULL; -} - -static void vec_sum_of_neg(struct isl_vec *v, isl_int *s) -{ - int i; - - isl_int_set_si(*s, 0); - - for (i = 0; i < v->size; ++i) - if (isl_int_is_neg(v->el[i])) - isl_int_add(*s, *s, v->el[i]); -} - -/* Given a tableau "tab", a tableau "tab_cone" that corresponds - * to the recession cone and the inverse of a new basis U = inv(B), - * with the unbounded directions in B last, - * add constraints to "tab" that ensure any rational value - * in the unbounded directions can be rounded up to an integer value. - * - * The new basis is given by x' = B x, i.e., x = U x'. - * For any rational value of the last tab->n_unbounded coordinates - * in the update tableau, the value that is obtained by rounding - * up this value should be contained in the original tableau. - * For any constraint "a x + c >= 0", we therefore need to add - * a constraint "a x + c + s >= 0", with s the sum of all negative - * entries in the last elements of "a U". - * - * Since we are not interested in the first entries of any of the "a U", - * we first drop the columns of U that correpond to bounded directions. - */ -static int tab_shift_cone(struct isl_tab *tab, - struct isl_tab *tab_cone, struct isl_mat *U) -{ - int i; - isl_int v; - struct isl_basic_set *bset = NULL; - - if (tab && tab->n_unbounded == 0) { - isl_mat_free(U); - return 0; - } - isl_int_init(v); - if (!tab || !tab_cone || !U) - goto error; - bset = isl_tab_peek_bset(tab_cone); - U = isl_mat_drop_cols(U, 0, tab->n_var - tab->n_unbounded); - for (i = 0; i < bset->n_ineq; ++i) { - int ok; - struct isl_vec *row = NULL; - if (isl_tab_is_equality(tab_cone, tab_cone->n_eq + i)) - continue; - row = isl_vec_alloc(bset->ctx, tab_cone->n_var); - if (!row) - goto error; - isl_seq_cpy(row->el, bset->ineq[i] + 1, tab_cone->n_var); - row = isl_vec_mat_product(row, isl_mat_copy(U)); - if (!row) - goto error; - vec_sum_of_neg(row, &v); - isl_vec_free(row); - if (isl_int_is_zero(v)) - continue; - tab = isl_tab_extend(tab, 1); - isl_int_add(bset->ineq[i][0], bset->ineq[i][0], v); - ok = isl_tab_add_ineq(tab, bset->ineq[i]) >= 0; - isl_int_sub(bset->ineq[i][0], bset->ineq[i][0], v); - if (!ok) - goto error; - } - - isl_mat_free(U); - isl_int_clear(v); - return 0; -error: - isl_mat_free(U); - isl_int_clear(v); - return -1; -} - -/* Compute and return an initial basis for the possibly - * unbounded tableau "tab". "tab_cone" is a tableau - * for the corresponding recession cone. - * Additionally, add constraints to "tab" that ensure - * that any rational value for the unbounded directions - * can be rounded up to an integer value. - * - * If the tableau is bounded, i.e., if the recession cone - * is zero-dimensional, then we just use inital_basis. - * Otherwise, we construct a basis whose first directions - * correspond to equalities, followed by bounded directions, - * i.e., equalities in the recession cone. - * The remaining directions are then unbounded. - */ -int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, - struct isl_tab *tab_cone) -{ - struct isl_mat *eq; - struct isl_mat *cone_eq; - struct isl_mat *U, *Q; - - if (!tab || !tab_cone) - return -1; - - if (tab_cone->n_col == tab_cone->n_dead) { - tab->basis = initial_basis(tab); - return tab->basis ? 0 : -1; - } - - eq = tab_equalities(tab); - if (!eq) - return -1; - tab->n_zero = eq->n_row; - cone_eq = tab_equalities(tab_cone); - eq = isl_mat_concat(eq, cone_eq); - if (!eq) - return -1; - tab->n_unbounded = tab->n_var - (eq->n_row - tab->n_zero); - eq = isl_mat_left_hermite(eq, 0, &U, &Q); - if (!eq) - return -1; - isl_mat_free(eq); - tab->basis = isl_mat_lin_to_aff(Q); - if (tab_shift_cone(tab, tab_cone, U) < 0) - return -1; - if (!tab->basis) - return -1; - return 0; -} - -/* Compute and return a sample point in bset using generalized basis - * reduction. We first check if the input set has a non-trivial - * recession cone. If so, we perform some extra preprocessing in - * sample_with_cone. Otherwise, we directly perform generalized basis - * reduction. - */ -static struct isl_vec *gbr_sample(struct isl_basic_set *bset) -{ - unsigned dim; - struct isl_basic_set *cone; - - dim = isl_basic_set_total_dim(bset); - - cone = isl_basic_set_recession_cone(isl_basic_set_copy(bset)); - if (!cone) - goto error; - - if (cone->n_eq < dim) - return isl_basic_set_sample_with_cone(bset, cone); - - isl_basic_set_free(cone); - return sample_bounded(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_vec *pip_sample(struct isl_basic_set *bset) -{ - struct isl_mat *T; - struct isl_ctx *ctx; - struct isl_vec *sample; - - bset = isl_basic_set_skew_to_positive_orthant(bset, &T); - if (!bset) - return NULL; - - ctx = bset->ctx; - sample = isl_pip_basic_set_sample(bset); - - if (sample && sample->size != 0) - sample = isl_mat_vec_product(T, sample); - else - isl_mat_free(T); - - return sample; -} - -static struct isl_vec *basic_set_sample(struct isl_basic_set *bset, int bounded) -{ - struct isl_ctx *ctx; - unsigned dim; - if (!bset) - return NULL; - - ctx = bset->ctx; - if (isl_basic_set_plain_is_empty(bset)) - return empty_sample(bset); - - dim = isl_basic_set_n_dim(bset); - isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(ctx, bset->n_div == 0, goto error); - - if (bset->sample && bset->sample->size == 1 + dim) { - int contains = isl_basic_set_contains(bset, bset->sample); - if (contains < 0) - goto error; - if (contains) { - struct isl_vec *sample = isl_vec_copy(bset->sample); - isl_basic_set_free(bset); - return sample; - } - } - isl_vec_free(bset->sample); - bset->sample = NULL; - - if (bset->n_eq > 0) - return sample_eq(bset, bounded ? isl_basic_set_sample_bounded - : isl_basic_set_sample_vec); - if (dim == 0) - return zero_sample(bset); - if (dim == 1) - return interval_sample(bset); - - switch (bset->ctx->opt->ilp_solver) { - case ISL_ILP_PIP: - return pip_sample(bset); - case ISL_ILP_GBR: - return bounded ? sample_bounded(bset) : gbr_sample(bset); - } - isl_assert(bset->ctx, 0, ); -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset) -{ - return basic_set_sample(bset, 0); -} - -/* Compute an integer sample in "bset", where the caller guarantees - * that "bset" is bounded. - */ -struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset) -{ - return basic_set_sample(bset, 1); -} - -__isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec) -{ - int i; - int k; - struct isl_basic_set *bset = NULL; - struct isl_ctx *ctx; - unsigned dim; - - if (!vec) - return NULL; - ctx = vec->ctx; - isl_assert(ctx, vec->size != 0, goto error); - - bset = isl_basic_set_alloc(ctx, 0, vec->size - 1, 0, vec->size - 1, 0); - if (!bset) - goto error; - dim = isl_basic_set_n_dim(bset); - for (i = dim - 1; i >= 0; --i) { - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->eq[k], 1 + dim); - isl_int_neg(bset->eq[k][0], vec->el[1 + i]); - isl_int_set(bset->eq[k][1 + i], vec->el[0]); - } - bset->sample = vec; - - return bset; -error: - isl_basic_set_free(bset); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap) -{ - struct isl_basic_set *bset; - struct isl_vec *sample_vec; - - bset = isl_basic_map_underlying_set(isl_basic_map_copy(bmap)); - sample_vec = isl_basic_set_sample_vec(bset); - if (!sample_vec) - goto error; - if (sample_vec->size == 0) { - struct isl_basic_map *sample; - sample = isl_basic_map_empty_like(bmap); - isl_vec_free(sample_vec); - isl_basic_map_free(bmap); - return sample; - } - bset = isl_basic_set_from_vec(sample_vec); - return isl_basic_map_overlying_set(bset, bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map) -{ - int i; - isl_basic_map *sample = NULL; - - if (!map) - goto error; - - for (i = 0; i < map->n; ++i) { - sample = isl_basic_map_sample(isl_basic_map_copy(map->p[i])); - if (!sample) - goto error; - if (!ISL_F_ISSET(sample, ISL_BASIC_MAP_EMPTY)) - break; - isl_basic_map_free(sample); - } - if (i == map->n) - sample = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return sample; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_set *isl_set_sample(__isl_take isl_set *set) -{ - return (isl_basic_set *) isl_map_sample((isl_map *)set); -} - -__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset) -{ - isl_vec *vec; - isl_dim *dim; - - dim = isl_basic_set_get_dim(bset); - bset = isl_basic_set_underlying_set(bset); - vec = isl_basic_set_sample_vec(bset); - - return isl_point_alloc(dim, vec); -} - -__isl_give isl_point *isl_set_sample_point(__isl_take isl_set *set) -{ - int i; - isl_point *pnt; - - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - pnt = isl_basic_set_sample_point(isl_basic_set_copy(set->p[i])); - if (!pnt) - goto error; - if (!isl_point_is_void(pnt)) - break; - isl_point_free(pnt); - } - if (i == set->n) - pnt = isl_point_void(isl_set_get_dim(set)); - - isl_set_free(set); - return pnt; -error: - isl_set_free(set); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_sample.h b/cloog-0.16.3/isl/isl_sample.h deleted file mode 100644 index b657e6e1cfbbaefbcd0a259a9c61be5ca91429db..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_sample.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SAMPLE_H -#define ISL_SAMPLE - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset); -struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset); -__isl_give isl_vec *isl_basic_set_sample_with_cone( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone); - -__isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec); - -int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, - struct isl_tab *tab_cone); -struct isl_vec *isl_tab_sample(struct isl_tab *tab); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_sample_no_piplib.c b/cloog-0.16.3/isl/isl_sample_no_piplib.c deleted file mode 100644 index e2c7ea40a84f73b10df78da8af22ed0763a4b421..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_sample_no_piplib.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_sample_piplib.h" - -struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset) -{ - isl_basic_set_free(bset); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_sample_piplib.c b/cloog-0.16.3/isl/isl_sample_piplib.c deleted file mode 100644 index 37550080d69d508e57f184592a8dc891ec51bfa0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_sample_piplib.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_piplib.h" -#include "isl_sample_piplib.h" - -struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset) -{ - PipOptions *options = NULL; - PipMatrix *domain = NULL; - PipQuast *sol = NULL; - struct isl_vec *vec = NULL; - unsigned dim; - struct isl_ctx *ctx; - - if (!bset) - goto error; - ctx = isl_basic_set_get_ctx(bset); - isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, goto error); - dim = isl_basic_set_n_dim(bset); - domain = isl_basic_map_to_pip((struct isl_basic_map *)bset, 0, 0, 0); - if (!domain) - goto error; - - options = pip_options_init(); - if (!options) - goto error; - sol = pip_solve(domain, NULL, -1, options); - if (!sol) - goto error; - if (!sol->list) - vec = isl_vec_alloc(ctx, 0); - else { - PipList *l; - int i; - vec = isl_vec_alloc(ctx, 1 + dim); - if (!vec) - goto error; - isl_int_set_si(vec->block.data[0], 1); - for (i = 0, l = sol->list; l && i < dim; ++i, l = l->next) { - isl_seq_cpy_from_pip(&vec->block.data[1+i], - &l->vector->the_vector[0], 1); - isl_assert(ctx, !entier_zero_p(l->vector->the_deno[0]), - goto error); - } - isl_assert(ctx, i == dim, goto error); - } - - pip_quast_free(sol); - pip_options_free(options); - pip_matrix_free(domain); - - isl_basic_set_free(bset); - return vec; -error: - isl_vec_free(vec); - isl_basic_set_free(bset); - if (sol) - pip_quast_free(sol); - if (domain) - pip_matrix_free(domain); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_sample_piplib.h b/cloog-0.16.3/isl/isl_sample_piplib.h deleted file mode 100644 index 52f21561cc48a220b5450eabf4c5054fba758392..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_sample_piplib.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SAMPLE_PIP_H -#define ISL_SAMPLE_PIP - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.16.3/isl/isl_scan.c b/cloog-0.16.3/isl/isl_scan.c deleted file mode 100644 index 64654be4dbf2ae0a702030b8fae69fb4e2db6008..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_scan.c +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_basis_reduction.h" -#include "isl_scan.h" -#include -#include "isl_tab.h" - -struct isl_counter { - struct isl_scan_callback callback; - isl_int count; - isl_int max; -}; - -static int increment_counter(struct isl_scan_callback *cb, - __isl_take isl_vec *sample) -{ - struct isl_counter *cnt = (struct isl_counter *)cb; - - isl_int_add_ui(cnt->count, cnt->count, 1); - - isl_vec_free(sample); - - if (isl_int_is_zero(cnt->max) || isl_int_lt(cnt->count, cnt->max)) - return 0; - return -1; -} - -static int increment_range(struct isl_scan_callback *cb, isl_int min, isl_int max) -{ - struct isl_counter *cnt = (struct isl_counter *)cb; - - isl_int_add(cnt->count, cnt->count, max); - isl_int_sub(cnt->count, cnt->count, min); - isl_int_add_ui(cnt->count, cnt->count, 1); - - if (isl_int_is_zero(cnt->max) || isl_int_lt(cnt->count, cnt->max)) - return 0; - isl_int_set(cnt->count, cnt->max); - return -1; -} - -/* Call callback->add with the current sample value of the tableau "tab". - */ -static int add_solution(struct isl_tab *tab, struct isl_scan_callback *callback) -{ - struct isl_vec *sample; - - if (!tab) - return -1; - sample = isl_tab_get_sample_value(tab); - if (!sample) - return -1; - - return callback->add(callback, sample); -} - -static int scan_0D(struct isl_basic_set *bset, - struct isl_scan_callback *callback) -{ - struct isl_vec *sample; - - sample = isl_vec_alloc(bset->ctx, 1); - isl_basic_set_free(bset); - - if (!sample) - return -1; - - isl_int_set_si(sample->el[0], 1); - - return callback->add(callback, sample); -} - -/* Look for all integer points in "bset", which is assumed to be bounded, - * and call callback->add on each of them. - * - * We first compute a reduced basis for the set and then scan - * the set in the directions of this basis. - * We basically perform a depth first search, where in each level i - * we compute the range in the i-th basis vector direction, given - * fixed values in the directions of the previous basis vector. - * We then add an equality to the tableau fixing the value in the - * direction of the current basis vector to each value in the range - * in turn and then continue to the next level. - * - * The search is implemented iteratively. "level" identifies the current - * basis vector. "init" is true if we want the first value at the current - * level and false if we want the next value. - * Solutions are added in the leaves of the search tree, i.e., after - * we have fixed a value in each direction of the basis. - */ -int isl_basic_set_scan(struct isl_basic_set *bset, - struct isl_scan_callback *callback) -{ - unsigned dim; - struct isl_mat *B = NULL; - struct isl_tab *tab = NULL; - struct isl_vec *min; - struct isl_vec *max; - struct isl_tab_undo **snap; - int level; - int init; - enum isl_lp_result res; - - if (!bset) - return -1; - - dim = isl_basic_set_total_dim(bset); - if (dim == 0) - return scan_0D(bset, callback); - - min = isl_vec_alloc(bset->ctx, dim); - max = isl_vec_alloc(bset->ctx, dim); - snap = isl_alloc_array(bset->ctx, struct isl_tab_undo *, dim); - - if (!min || !max || !snap) - goto error; - - tab = isl_tab_from_basic_set(bset); - if (!tab) - goto error; - if (isl_tab_extend_cons(tab, dim + 1) < 0) - goto error; - - tab->basis = isl_mat_identity(bset->ctx, 1 + dim); - if (1) - tab = isl_tab_compute_reduced_basis(tab); - if (!tab) - goto error; - B = isl_mat_copy(tab->basis); - if (!B) - goto error; - - level = 0; - init = 1; - - while (level >= 0) { - int empty = 0; - if (init) { - res = isl_tab_min(tab, B->row[1 + level], - bset->ctx->one, &min->el[level], NULL, 0); - if (res == isl_lp_empty) - empty = 1; - if (res == isl_lp_error || res == isl_lp_unbounded) - goto error; - isl_seq_neg(B->row[1 + level] + 1, - B->row[1 + level] + 1, dim); - res = isl_tab_min(tab, B->row[1 + level], - bset->ctx->one, &max->el[level], NULL, 0); - isl_seq_neg(B->row[1 + level] + 1, - B->row[1 + level] + 1, dim); - isl_int_neg(max->el[level], max->el[level]); - if (res == isl_lp_empty) - empty = 1; - if (res == isl_lp_error || res == isl_lp_unbounded) - goto error; - snap[level] = isl_tab_snap(tab); - } else - isl_int_add_ui(min->el[level], min->el[level], 1); - - if (empty || isl_int_gt(min->el[level], max->el[level])) { - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - continue; - } - if (level == dim - 1 && callback->add == increment_counter) { - if (increment_range(callback, - min->el[level], max->el[level])) - goto error; - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - continue; - } - isl_int_neg(B->row[1 + level][0], min->el[level]); - if (isl_tab_add_valid_eq(tab, B->row[1 + level]) < 0) - goto error; - isl_int_set_si(B->row[1 + level][0], 0); - if (level < dim - 1) { - ++level; - init = 1; - continue; - } - if (add_solution(tab, callback) < 0) - goto error; - init = 0; - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - } - - isl_tab_free(tab); - free(snap); - isl_vec_free(min); - isl_vec_free(max); - isl_basic_set_free(bset); - isl_mat_free(B); - return 0; -error: - isl_tab_free(tab); - free(snap); - isl_vec_free(min); - isl_vec_free(max); - isl_basic_set_free(bset); - isl_mat_free(B); - return -1; -} - -int isl_set_scan(__isl_take isl_set *set, struct isl_scan_callback *callback) -{ - int i; - - if (!set || !callback) - goto error; - - set = isl_set_cow(set); - set = isl_set_make_disjoint(set); - set = isl_set_compute_divs(set); - if (!set) - goto error; - - for (i = 0; i < set->n; ++i) - if (isl_basic_set_scan(isl_basic_set_copy(set->p[i]), - callback) < 0) - goto error; - - isl_set_free(set); - return 0; -error: - isl_set_free(set); - return -1; -} - -int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset, - isl_int max, isl_int *count) -{ - struct isl_counter cnt = { { &increment_counter } }; - - if (!bset) - return -1; - - isl_int_init(cnt.count); - isl_int_init(cnt.max); - - isl_int_set_si(cnt.count, 0); - isl_int_set(cnt.max, max); - if (isl_basic_set_scan(isl_basic_set_copy(bset), &cnt.callback) < 0 && - isl_int_lt(cnt.count, cnt.max)) - goto error; - - isl_int_set(*count, cnt.count); - isl_int_clear(cnt.max); - isl_int_clear(cnt.count); - - return 0; -error: - isl_int_clear(cnt.count); - return -1; -} - -int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count) -{ - struct isl_counter cnt = { { &increment_counter } }; - - if (!set) - return -1; - - isl_int_init(cnt.count); - isl_int_init(cnt.max); - - isl_int_set_si(cnt.count, 0); - isl_int_set(cnt.max, max); - if (isl_set_scan(isl_set_copy(set), &cnt.callback) < 0 && - isl_int_lt(cnt.count, cnt.max)) - goto error; - - isl_int_set(*count, cnt.count); - isl_int_clear(cnt.max); - isl_int_clear(cnt.count); - - return 0; -error: - isl_int_clear(cnt.count); - return -1; -} - -int isl_set_count(__isl_keep isl_set *set, isl_int *count) -{ - if (!set) - return -1; - return isl_set_count_upto(set, set->ctx->zero, count); -} diff --git a/cloog-0.16.3/isl/isl_scan.h b/cloog-0.16.3/isl/isl_scan.h deleted file mode 100644 index 8e5ad74a85a20a97cb2ff83342c4bb1493616e7a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_scan.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SCAN_H -#define ISL_SCAN_H - -#include -#include - -struct isl_scan_callback { - int (*add)(struct isl_scan_callback *cb, __isl_take isl_vec *sample); -}; - -int isl_basic_set_scan(struct isl_basic_set *bset, - struct isl_scan_callback *callback); -int isl_set_scan(__isl_take isl_set *set, struct isl_scan_callback *callback); - -#endif diff --git a/cloog-0.16.3/isl/isl_schedule.c b/cloog-0.16.3/isl/isl_schedule.c deleted file mode 100644 index 320db6c26232c8b5c9852b360215e46b07801478..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_schedule.c +++ /dev/null @@ -1,2742 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * The scheduling algorithm implemented in this file was inspired by - * Bondhugula et al., "Automatic Transformations for Communication-Minimized - * Parallelization and Locality Optimization in the Polyhedral Model". - */ - - -/* Internal information about a node that is used during the construction - * of a schedule. - * dim represents the space in which the domain lives - * sched is a matrix representation of the schedule being constructed - * for this node - * sched_map is an isl_map representation of the same (partial) schedule - * sched_map may be NULL - * rank is the number of linearly independent rows in the linear part - * of sched - * the columns of cmap represent a change of basis for the schedule - * coefficients; the first rank columns span the linear part of - * the schedule rows - * start is the first variable in the LP problem in the sequences that - * represents the schedule coefficients of this node - * nvar is the dimension of the domain - * nparam is the number of parameters or 0 if we are not constructing - * a parametric schedule - * - * scc is the index of SCC (or WCC) this node belongs to - * - * band contains the band index for each of the rows of the schedule. - * band_id is used to differentiate between separate bands at the same - * level within the same parent band, i.e., bands that are separated - * by the parent band or bands that are independent of each other. - * zero contains a boolean for each of the rows of the schedule, - * indicating whether the corresponding scheduling dimension results - * in zero dependence distances within its band and with respect - * to the proximity edges. - * - * index, min_index and on_stack are used during the SCC detection - * index represents the order in which nodes are visited. - * min_index is the index of the root of a (sub)component. - * on_stack indicates whether the node is currently on the stack. - */ -struct isl_sched_node { - isl_dim *dim; - isl_mat *sched; - isl_map *sched_map; - int rank; - isl_mat *cmap; - int start; - int nvar; - int nparam; - - int scc; - - int *band; - int *band_id; - int *zero; - - /* scc detection */ - int index; - int min_index; - int on_stack; -}; - -static int node_has_dim(const void *entry, const void *val) -{ - struct isl_sched_node *node = (struct isl_sched_node *)entry; - isl_dim *dim = (isl_dim *)val; - - return isl_dim_equal(node->dim, dim); -} - -/* An edge in the dependence graph. An edge may be used to - * ensure validity of the generated schedule, to minimize the dependence - * distance or both - * - * map is the dependence relation - * src is the source node - * dst is the sink node - * validity is set if the edge is used to ensure correctness - * proximity is set if the edge is used to minimize dependence distances - * - * For validity edges, start and end mark the sequence of inequality - * constraints in the LP problem that encode the validity constraint - * corresponding to this edge. - */ -struct isl_sched_edge { - isl_map *map; - - struct isl_sched_node *src; - struct isl_sched_node *dst; - - int validity; - int proximity; - - int start; - int end; -}; - -/* Internal information about the dependence graph used during - * the construction of the schedule. - * - * intra_hmap is a cache, mapping dependence relations to their dual, - * for dependences from a node to itself - * inter_hmap is a cache, mapping dependence relations to their dual, - * for dependences between distinct nodes - * - * n is the number of nodes - * node is the list of nodes - * maxvar is the maximal number of variables over all nodes - * n_row is the current (maximal) number of linearly independent - * rows in the node schedules - * n_total_row is the current number of rows in the node schedules - * n_band is the current number of completed bands - * band_start is the starting row in the node schedules of the current band - * root is set if this graph is the original dependence graph, - * without any splitting - * - * sorted contains a list of node indices sorted according to the - * SCC to which a node belongs - * - * n_edge is the number of edges - * edge is the list of edges - * edge_table contains pointers into the edge array, hashed on the source - * and sink spaces; the table only contains edges that represent - * validity constraints (and that may or may not also represent proximity - * constraints) - * - * node_table contains pointers into the node array, hashed on the space - * - * region contains a list of variable sequences that should be non-trivial - * - * lp contains the (I)LP problem used to obtain new schedule rows - * - * src_scc and dst_scc are the source and sink SCCs of an edge with - * conflicting constraints - * - * scc, sp, index and stack are used during the detection of SCCs - * scc is the number of the next SCC - * stack contains the nodes on the path from the root to the current node - * sp is the stack pointer - * index is the index of the last node visited - */ -struct isl_sched_graph { - isl_hmap_map_basic_set *intra_hmap; - isl_hmap_map_basic_set *inter_hmap; - - struct isl_sched_node *node; - int n; - int maxvar; - int n_row; - - int *sorted; - - int n_band; - int n_total_row; - int band_start; - - int root; - - struct isl_sched_edge *edge; - int n_edge; - struct isl_hash_table *edge_table; - - struct isl_hash_table *node_table; - struct isl_region *region; - - isl_basic_set *lp; - - int src_scc; - int dst_scc; - - /* scc detection */ - int scc; - int sp; - int index; - int *stack; -}; - -/* Initialize node_table based on the list of nodes. - */ -static int graph_init_table(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - - graph->node_table = isl_hash_table_alloc(ctx, graph->n); - if (!graph->node_table) - return -1; - - for (i = 0; i < graph->n; ++i) { - struct isl_hash_table_entry *entry; - uint32_t hash; - - hash = isl_dim_get_hash(graph->node[i].dim); - entry = isl_hash_table_find(ctx, graph->node_table, hash, - &node_has_dim, - graph->node[i].dim, 1); - if (!entry) - return -1; - entry->data = &graph->node[i]; - } - - return 0; -} - -/* Return a pointer to the node that lives within the given space, - * or NULL if there is no such node. - */ -static struct isl_sched_node *graph_find_node(isl_ctx *ctx, - struct isl_sched_graph *graph, __isl_keep isl_dim *dim) -{ - struct isl_hash_table_entry *entry; - uint32_t hash; - - hash = isl_dim_get_hash(dim); - entry = isl_hash_table_find(ctx, graph->node_table, hash, - &node_has_dim, dim, 0); - - return entry ? entry->data : NULL; -} - -static int edge_has_src_and_dst(const void *entry, const void *val) -{ - const struct isl_sched_edge *edge = entry; - const struct isl_sched_edge *temp = val; - - return edge->src == temp->src && edge->dst == temp->dst; -} - -/* Initialize edge_table based on the list of edges. - * Only edges with validity set are added to the table. - */ -static int graph_init_edge_table(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - - graph->edge_table = isl_hash_table_alloc(ctx, graph->n_edge); - if (!graph->edge_table) - return -1; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_hash_table_entry *entry; - uint32_t hash; - - if (!graph->edge[i].validity) - continue; - - hash = isl_hash_init(); - hash = isl_hash_builtin(hash, graph->edge[i].src); - hash = isl_hash_builtin(hash, graph->edge[i].dst); - entry = isl_hash_table_find(ctx, graph->edge_table, hash, - &edge_has_src_and_dst, - &graph->edge[i], 1); - if (!entry) - return -1; - entry->data = &graph->edge[i]; - } - - return 0; -} - -/* Check whether the dependence graph has a (validity) edge - * between the given two nodes. - */ -static int graph_has_edge(struct isl_sched_graph *graph, - struct isl_sched_node *src, struct isl_sched_node *dst) -{ - isl_ctx *ctx = isl_dim_get_ctx(src->dim); - struct isl_hash_table_entry *entry; - uint32_t hash; - struct isl_sched_edge temp = { .src = src, .dst = dst }; - struct isl_sched_edge *edge; - int empty; - - hash = isl_hash_init(); - hash = isl_hash_builtin(hash, temp.src); - hash = isl_hash_builtin(hash, temp.dst); - entry = isl_hash_table_find(ctx, graph->edge_table, hash, - &edge_has_src_and_dst, &temp, 0); - if (!entry) - return 0; - - edge = entry->data; - empty = isl_map_plain_is_empty(edge->map); - if (empty < 0) - return -1; - - return !empty; -} - -static int graph_alloc(isl_ctx *ctx, struct isl_sched_graph *graph, - int n_node, int n_edge) -{ - int i; - - graph->n = n_node; - graph->n_edge = n_edge; - graph->node = isl_calloc_array(ctx, struct isl_sched_node, graph->n); - graph->sorted = isl_calloc_array(ctx, int, graph->n); - graph->region = isl_alloc_array(ctx, struct isl_region, graph->n); - graph->stack = isl_alloc_array(ctx, int, graph->n); - graph->edge = isl_calloc_array(ctx, - struct isl_sched_edge, graph->n_edge); - - graph->intra_hmap = isl_hmap_map_basic_set_alloc(ctx, 2 * n_edge); - graph->inter_hmap = isl_hmap_map_basic_set_alloc(ctx, 2 * n_edge); - - if (!graph->node || !graph->region || !graph->stack || !graph->edge || - !graph->sorted) - return -1; - - for(i = 0; i < graph->n; ++i) - graph->sorted[i] = i; - - return 0; -} - -static void graph_free(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - - isl_hmap_map_basic_set_free(ctx, graph->intra_hmap); - isl_hmap_map_basic_set_free(ctx, graph->inter_hmap); - - for (i = 0; i < graph->n; ++i) { - isl_dim_free(graph->node[i].dim); - isl_mat_free(graph->node[i].sched); - isl_map_free(graph->node[i].sched_map); - isl_mat_free(graph->node[i].cmap); - if (graph->root) { - free(graph->node[i].band); - free(graph->node[i].band_id); - free(graph->node[i].zero); - } - } - free(graph->node); - free(graph->sorted); - for (i = 0; i < graph->n_edge; ++i) - isl_map_free(graph->edge[i].map); - free(graph->edge); - free(graph->region); - free(graph->stack); - isl_hash_table_free(ctx, graph->edge_table); - isl_hash_table_free(ctx, graph->node_table); - isl_basic_set_free(graph->lp); -} - -/* Add a new node to the graph representing the given set. - */ -static int extract_node(__isl_take isl_set *set, void *user) -{ - int nvar, nparam; - isl_ctx *ctx; - isl_dim *dim; - isl_mat *sched; - struct isl_sched_graph *graph = user; - int *band, *band_id, *zero; - - ctx = isl_set_get_ctx(set); - dim = isl_set_get_dim(set); - isl_set_free(set); - nvar = isl_dim_size(dim, isl_dim_set); - nparam = isl_dim_size(dim, isl_dim_param); - if (!ctx->opt->schedule_parametric) - nparam = 0; - sched = isl_mat_alloc(ctx, 0, 1 + nparam + nvar); - graph->node[graph->n].dim = dim; - graph->node[graph->n].nvar = nvar; - graph->node[graph->n].nparam = nparam; - graph->node[graph->n].sched = sched; - graph->node[graph->n].sched_map = NULL; - band = isl_alloc_array(ctx, int, graph->n_edge + nvar); - graph->node[graph->n].band = band; - band_id = isl_calloc_array(ctx, int, graph->n_edge + nvar); - graph->node[graph->n].band_id = band_id; - zero = isl_calloc_array(ctx, int, graph->n_edge + nvar); - graph->node[graph->n].zero = zero; - graph->n++; - - if (!sched || !band || !band_id || !zero) - return -1; - - return 0; -} - -/* Add a new edge to the graph based on the given map. - * Edges are first extracted from the validity dependences, - * from which the edge_table is constructed. - * Afterwards, the proximity dependences are added. If a proximity - * dependence relation happens to be identical to one of the - * validity dependence relations added before, then we don't create - * a new edge, but instead mark the original edge as also representing - * a proximity dependence. - */ -static int extract_edge(__isl_take isl_map *map, void *user) -{ - isl_ctx *ctx = isl_map_get_ctx(map); - struct isl_sched_graph *graph = user; - struct isl_sched_node *src, *dst; - isl_dim *dim; - - dim = isl_dim_domain(isl_map_get_dim(map)); - src = graph_find_node(ctx, graph, dim); - isl_dim_free(dim); - dim = isl_dim_range(isl_map_get_dim(map)); - dst = graph_find_node(ctx, graph, dim); - isl_dim_free(dim); - - if (!src || !dst) { - isl_map_free(map); - return 0; - } - - graph->edge[graph->n_edge].src = src; - graph->edge[graph->n_edge].dst = dst; - graph->edge[graph->n_edge].map = map; - graph->edge[graph->n_edge].validity = !graph->edge_table; - graph->edge[graph->n_edge].proximity = !!graph->edge_table; - graph->n_edge++; - - if (graph->edge_table) { - uint32_t hash; - struct isl_hash_table_entry *entry; - struct isl_sched_edge *edge; - int is_equal; - - hash = isl_hash_init(); - hash = isl_hash_builtin(hash, src); - hash = isl_hash_builtin(hash, dst); - entry = isl_hash_table_find(ctx, graph->edge_table, hash, - &edge_has_src_and_dst, - &graph->edge[graph->n_edge - 1], 0); - if (!entry) - return 0; - edge = entry->data; - is_equal = isl_map_plain_is_equal(map, edge->map); - if (is_equal < 0) - return -1; - if (!is_equal) - return 0; - - graph->n_edge--; - edge->proximity = 1; - isl_map_free(map); - } - - return 0; -} - -/* Check whether there is a validity dependence from src to dst, - * forcing dst to follow src. - */ -static int node_follows(struct isl_sched_graph *graph, - struct isl_sched_node *dst, struct isl_sched_node *src) -{ - return graph_has_edge(graph, src, dst); -} - -/* Perform Tarjan's algorithm for computing the strongly connected components - * in the dependence graph (only validity edges). - * If directed is not set, we consider the graph to be undirected and - * we effectively compute the (weakly) connected components. - */ -static int detect_sccs_tarjan(struct isl_sched_graph *g, int i, int directed) -{ - int j; - - g->node[i].index = g->index; - g->node[i].min_index = g->index; - g->node[i].on_stack = 1; - g->index++; - g->stack[g->sp++] = i; - - for (j = g->n - 1; j >= 0; --j) { - int f; - - if (j == i) - continue; - if (g->node[j].index >= 0 && - (!g->node[j].on_stack || - g->node[j].index > g->node[i].min_index)) - continue; - - f = node_follows(g, &g->node[i], &g->node[j]); - if (f < 0) - return -1; - if (!f && !directed) { - f = node_follows(g, &g->node[j], &g->node[i]); - if (f < 0) - return -1; - } - if (!f) - continue; - if (g->node[j].index < 0) { - detect_sccs_tarjan(g, j, directed); - if (g->node[j].min_index < g->node[i].min_index) - g->node[i].min_index = g->node[j].min_index; - } else if (g->node[j].index < g->node[i].min_index) - g->node[i].min_index = g->node[j].index; - } - - if (g->node[i].index != g->node[i].min_index) - return 0; - - do { - j = g->stack[--g->sp]; - g->node[j].on_stack = 0; - g->node[j].scc = g->scc; - } while (j != i); - g->scc++; - - return 0; -} - -static int detect_ccs(struct isl_sched_graph *graph, int directed) -{ - int i; - - graph->index = 0; - graph->sp = 0; - graph->scc = 0; - for (i = graph->n - 1; i >= 0; --i) - graph->node[i].index = -1; - - for (i = graph->n - 1; i >= 0; --i) { - if (graph->node[i].index >= 0) - continue; - if (detect_sccs_tarjan(graph, i, directed) < 0) - return -1; - } - - return 0; -} - -/* Apply Tarjan's algorithm to detect the strongly connected components - * in the dependence graph. - */ -static int detect_sccs(struct isl_sched_graph *graph) -{ - return detect_ccs(graph, 1); -} - -/* Apply Tarjan's algorithm to detect the (weakly) connected components - * in the dependence graph. - */ -static int detect_wccs(struct isl_sched_graph *graph) -{ - return detect_ccs(graph, 0); -} - -static int cmp_scc(const void *a, const void *b, void *data) -{ - struct isl_sched_graph *graph = data; - const int *i1 = a; - const int *i2 = b; - - return graph->node[*i1].scc - graph->node[*i2].scc; -} - -/* Sort the elements of graph->sorted according to the corresponding SCCs. - */ -static void sort_sccs(struct isl_sched_graph *graph) -{ - isl_quicksort(graph->sorted, graph->n, sizeof(int), &cmp_scc, graph); -} - -/* Given a dependence relation R from a node to itself, - * construct the set of coefficients of valid constraints for elements - * in that dependence relation. - * In particular, the result contains tuples of coefficients - * c_0, c_n, c_x such that - * - * c_0 + c_n n + c_x y - c_x x >= 0 for each (x,y) in R - * - * or, equivalently, - * - * c_0 + c_n n + c_x d >= 0 for each d in delta R = { y - x | (x,y) in R } - * - * We choose here to compute the dual of delta R. - * Alternatively, we could have computed the dual of R, resulting - * in a set of tuples c_0, c_n, c_x, c_y, and then - * plugged in (c_0, c_n, c_x, -c_x). - */ -static __isl_give isl_basic_set *intra_coefficients( - struct isl_sched_graph *graph, __isl_take isl_map *map) -{ - isl_ctx *ctx = isl_map_get_ctx(map); - isl_set *delta; - isl_basic_set *coef; - - if (isl_hmap_map_basic_set_has(ctx, graph->intra_hmap, map)) - return isl_hmap_map_basic_set_get(ctx, graph->intra_hmap, map); - - delta = isl_set_remove_divs(isl_map_deltas(isl_map_copy(map))); - coef = isl_set_coefficients(delta); - isl_hmap_map_basic_set_set(ctx, graph->intra_hmap, map, - isl_basic_set_copy(coef)); - - return coef; -} - -/* Given a dependence relation R, * construct the set of coefficients - * of valid constraints for elements in that dependence relation. - * In particular, the result contains tuples of coefficients - * c_0, c_n, c_x, c_y such that - * - * c_0 + c_n n + c_x x + c_y y >= 0 for each (x,y) in R - * - */ -static __isl_give isl_basic_set *inter_coefficients( - struct isl_sched_graph *graph, __isl_take isl_map *map) -{ - isl_ctx *ctx = isl_map_get_ctx(map); - isl_set *set; - isl_basic_set *coef; - - if (isl_hmap_map_basic_set_has(ctx, graph->inter_hmap, map)) - return isl_hmap_map_basic_set_get(ctx, graph->inter_hmap, map); - - set = isl_map_wrap(isl_map_remove_divs(isl_map_copy(map))); - coef = isl_set_coefficients(set); - isl_hmap_map_basic_set_set(ctx, graph->inter_hmap, map, - isl_basic_set_copy(coef)); - - return coef; -} - -/* Add constraints to graph->lp that force validity for the given - * dependence from a node i to itself. - * That is, add constraints that enforce - * - * (c_i_0 + c_i_n n + c_i_x y) - (c_i_0 + c_i_n n + c_i_x x) - * = c_i_x (y - x) >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for (y - x) and then plug in (0, 0, c_i_x^+ - c_i_x^-), - * where c_i_x = c_i_x^+ - c_i_x^-, with c_i_x^+ and c_i_x^- non-negative. - * In graph->lp, the c_i_x^- appear before their c_i_x^+ counterpart. - * - * Actually, we do not construct constraints for the c_i_x themselves, - * but for the coefficients of c_i_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_intra_validity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge) -{ - unsigned total; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_dim *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *node = edge->src; - - coef = intra_coefficients(graph, map); - - dim = isl_dim_domain(isl_dim_unwrap(isl_basic_set_get_dim(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_dim_size(dim, isl_dim_set), isl_mat_copy(node->cmap)); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set), 1, - node->nvar, -1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set), 1, - node->nvar, 1); - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_dim_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that force validity for the given - * dependence from node i to node j. - * That is, add constraints that enforce - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x) >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x, c_y) - * of valid constraints for R and then plug in - * (c_j_0 - c_i_0, c_j_n^+ - c_j_n^- - (c_i_n^+ - c_i_n^-), - * c_j_x^+ - c_j_x^- - (c_i_x^+ - c_i_x^-)), - * where c_* = c_*^+ - c_*^-, with c_*^+ and c_*^- non-negative. - * In graph->lp, the c_*^- appear before their c_*^+ counterpart. - * - * Actually, we do not construct constraints for the c_*_x themselves, - * but for the coefficients of c_*_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_inter_validity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge) -{ - unsigned total; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_dim *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *src = edge->src; - struct isl_sched_node *dst = edge->dst; - - coef = inter_coefficients(graph, map); - - dim = isl_dim_domain(isl_dim_unwrap(isl_basic_set_get_dim(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_dim_size(dim, isl_dim_set), isl_mat_copy(src->cmap)); - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_dim_size(dim, isl_dim_set) + src->nvar, - isl_mat_copy(dst->cmap)); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - - isl_dim_map_range(dim_map, dst->start, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, dst->start + 1, 2, 1, 1, dst->nparam, -1); - isl_dim_map_range(dim_map, dst->start + 2, 2, 1, 1, dst->nparam, 1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, -1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, 1); - - isl_dim_map_range(dim_map, src->start, 0, 0, 0, 1, -1); - isl_dim_map_range(dim_map, src->start + 1, 2, 1, 1, src->nparam, 1); - isl_dim_map_range(dim_map, src->start + 2, 2, 1, 1, src->nparam, -1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set), 1, - src->nvar, 1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set), 1, - src->nvar, -1); - - edge->start = graph->lp->n_ineq; - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_dim_free(dim); - edge->end = graph->lp->n_ineq; - - return 0; -} - -/* Add constraints to graph->lp that bound the dependence distance for the given - * dependence from a node i to itself. - * If s = 1, we add the constraint - * - * c_i_x (y - x) <= m_0 + m_n n - * - * or - * - * -c_i_x (y - x) + m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * If s = -1, we add the constraint - * - * -c_i_x (y - x) <= m_0 + m_n n - * - * or - * - * c_i_x (y - x) + m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for (y - x) and then plug in (m_0, m_n, -s * c_i_x), - * with each coefficient (except m_0) represented as a pair of non-negative - * coefficients. - * - * Actually, we do not construct constraints for the c_i_x themselves, - * but for the coefficients of c_i_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_intra_proximity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, int s) -{ - unsigned total; - unsigned nparam; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_dim *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *node = edge->src; - - coef = intra_coefficients(graph, map); - - dim = isl_dim_domain(isl_dim_unwrap(isl_basic_set_get_dim(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_dim_size(dim, isl_dim_set), isl_mat_copy(node->cmap)); - - nparam = isl_dim_size(node->dim, isl_dim_param); - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - isl_dim_map_range(dim_map, 1, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, 4, 2, 1, 1, nparam, -1); - isl_dim_map_range(dim_map, 5, 2, 1, 1, nparam, 1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set), 1, - node->nvar, s); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set), 1, - node->nvar, -s); - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_dim_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that bound the dependence distance for the given - * dependence from node i to node j. - * If s = 1, we add the constraint - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x) - * <= m_0 + m_n n - * - * or - * - * -(c_j_0 + c_j_n n + c_j_x y) + (c_i_0 + c_i_n n + c_i_x x) + - * m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * If s = -1, we add the constraint - * - * -((c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x)) - * <= m_0 + m_n n - * - * or - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x) + - * m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x, c_y) - * of valid constraints for R and then plug in - * (m_0 - s*c_j_0 + s*c_i_0, m_n - s*c_j_n + s*c_i_n, - * -s*c_j_x+s*c_i_x) - * with each coefficient (except m_0, c_j_0 and c_i_0) - * represented as a pair of non-negative coefficients. - * - * Actually, we do not construct constraints for the c_*_x themselves, - * but for the coefficients of c_*_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_inter_proximity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, int s) -{ - unsigned total; - unsigned nparam; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_dim *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *src = edge->src; - struct isl_sched_node *dst = edge->dst; - - coef = inter_coefficients(graph, map); - - dim = isl_dim_domain(isl_dim_unwrap(isl_basic_set_get_dim(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_dim_size(dim, isl_dim_set), isl_mat_copy(src->cmap)); - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_dim_size(dim, isl_dim_set) + src->nvar, - isl_mat_copy(dst->cmap)); - - nparam = isl_dim_size(src->dim, isl_dim_param); - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - - isl_dim_map_range(dim_map, 1, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, 4, 2, 1, 1, nparam, -1); - isl_dim_map_range(dim_map, 5, 2, 1, 1, nparam, 1); - - isl_dim_map_range(dim_map, dst->start, 0, 0, 0, 1, -s); - isl_dim_map_range(dim_map, dst->start + 1, 2, 1, 1, dst->nparam, s); - isl_dim_map_range(dim_map, dst->start + 2, 2, 1, 1, dst->nparam, -s); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, s); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, -s); - - isl_dim_map_range(dim_map, src->start, 0, 0, 0, 1, s); - isl_dim_map_range(dim_map, src->start + 1, 2, 1, 1, src->nparam, -s); - isl_dim_map_range(dim_map, src->start + 2, 2, 1, 1, src->nparam, s); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set), 1, - src->nvar, -s); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set), 1, - src->nvar, s); - - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_dim_free(dim); - - return 0; -} - -static int add_all_validity_constraints(struct isl_sched_graph *graph) -{ - int i; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - if (!edge->validity) - continue; - if (edge->src != edge->dst) - continue; - if (add_intra_validity_constraints(graph, edge) < 0) - return -1; - } - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge = &graph->edge[i]; - if (!edge->validity) - continue; - if (edge->src == edge->dst) - continue; - if (add_inter_validity_constraints(graph, edge) < 0) - return -1; - } - - return 0; -} - -/* Add constraints to graph->lp that bound the dependence distance - * for all dependence relations. - * If a given proximity dependence is identical to a validity - * dependence, then the dependence distance is already bounded - * from below (by zero), so we only need to bound the distance - * from above. - * Otherwise, we need to bound the distance both from above and from below. - */ -static int add_all_proximity_constraints(struct isl_sched_graph *graph) -{ - int i; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - if (!edge->proximity) - continue; - if (edge->src == edge->dst && - add_intra_proximity_constraints(graph, edge, 1) < 0) - return -1; - if (edge->src != edge->dst && - add_inter_proximity_constraints(graph, edge, 1) < 0) - return -1; - if (edge->validity) - continue; - if (edge->src == edge->dst && - add_intra_proximity_constraints(graph, edge, -1) < 0) - return -1; - if (edge->src != edge->dst && - add_inter_proximity_constraints(graph, edge, -1) < 0) - return -1; - } - - return 0; -} - -/* Compute a basis for the rows in the linear part of the schedule - * and extend this basis to a full basis. The remaining rows - * can then be used to force linear independence from the rows - * in the schedule. - * - * In particular, given the schedule rows S, we compute - * - * S = H Q - * - * with H the Hermite normal form of S. That is, all but the - * first rank columns of Q are zero and so each row in S is - * a linear combination of the first rank rows of Q. - * The matrix Q is then transposed because we will write the - * coefficients of the next schedule row as a column vector s - * and express this s as a linear combination s = Q c of the - * computed basis. - */ -static int node_update_cmap(struct isl_sched_node *node) -{ - isl_mat *H, *Q; - int n_row = isl_mat_rows(node->sched); - - H = isl_mat_sub_alloc(node->sched, 0, n_row, - 1 + node->nparam, node->nvar); - - H = isl_mat_left_hermite(H, 0, NULL, &Q); - isl_mat_free(node->cmap); - node->cmap = isl_mat_transpose(Q); - node->rank = isl_mat_initial_non_zero_cols(H); - isl_mat_free(H); - - if (!node->cmap || node->rank < 0) - return -1; - return 0; -} - -/* Count the number of equality and inequality constraints - * that will be added. If once is set, then we count - * each edge exactly once. Otherwise, we count as follows - * validity -> 1 (>= 0) - * validity+proximity -> 2 (>= 0 and upper bound) - * proximity -> 2 (lower and upper bound) - */ -static int count_constraints(struct isl_sched_graph *graph, - int *n_eq, int *n_ineq, int once) -{ - int i; - isl_basic_set *coef; - - *n_eq = *n_ineq = 0; - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - isl_map *map = isl_map_copy(edge->map); - int f = once ? 1 : edge->proximity ? 2 : 1; - - if (edge->src == edge->dst) - coef = intra_coefficients(graph, map); - else - coef = inter_coefficients(graph, map); - if (!coef) - return -1; - *n_eq += f * coef->n_eq; - *n_ineq += f * coef->n_ineq; - isl_basic_set_free(coef); - } - - return 0; -} - -/* Construct an ILP problem for finding schedule coefficients - * that result in non-negative, but small dependence distances - * over all dependences. - * In particular, the dependence distances over proximity edges - * are bounded by m_0 + m_n n and we compute schedule coefficients - * with small values (preferably zero) of m_n and m_0. - * - * All variables of the ILP are non-negative. The actual coefficients - * may be negative, so each coefficient is represented as the difference - * of two non-negative variables. The negative part always appears - * immediately before the positive part. - * Other than that, the variables have the following order - * - * - sum of positive and negative parts of m_n coefficients - * - m_0 - * - sum of positive and negative parts of all c_n coefficients - * (unconstrained when computing non-parametric schedules) - * - sum of positive and negative parts of all c_x coefficients - * - positive and negative parts of m_n coefficients - * - for each node - * - c_i_0 - * - positive and negative parts of c_i_n (if parametric) - * - positive and negative parts of c_i_x - * - * The c_i_x are not represented directly, but through the columns of - * node->cmap. That is, the computed values are for variable t_i_x - * such that c_i_x = Q t_i_x with Q equal to node->cmap. - * - * The constraints are those from the edges plus two or three equalities - * to express the sums. - * - * If force_zero is set, then we add equalities to ensure that - * the sum of the m_n coefficients and m_0 are both zero. - */ -static int setup_lp(isl_ctx *ctx, struct isl_sched_graph *graph, - int force_zero) -{ - int i, j; - int k; - unsigned nparam; - unsigned total; - isl_dim *dim; - int parametric; - int param_pos; - int n_eq, n_ineq; - - parametric = ctx->opt->schedule_parametric; - nparam = isl_dim_size(graph->node[0].dim, isl_dim_param); - param_pos = 4; - total = param_pos + 2 * nparam; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[graph->sorted[i]]; - if (node_update_cmap(node) < 0) - return -1; - node->start = total; - total += 1 + 2 * (node->nparam + node->nvar); - } - - if (count_constraints(graph, &n_eq, &n_ineq, 0) < 0) - return -1; - - dim = isl_dim_set_alloc(ctx, 0, total); - isl_basic_set_free(graph->lp); - n_eq += 2 + parametric + force_zero; - graph->lp = isl_basic_set_alloc_dim(dim, 0, n_eq, n_ineq); - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - if (!force_zero) - isl_int_set_si(graph->lp->eq[k][1], -1); - for (i = 0; i < 2 * nparam; ++i) - isl_int_set_si(graph->lp->eq[k][1 + param_pos + i], 1); - - if (force_zero) { - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][2], -1); - } - - if (parametric) { - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][3], -1); - for (i = 0; i < graph->n; ++i) { - int pos = 1 + graph->node[i].start + 1; - - for (j = 0; j < 2 * graph->node[i].nparam; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - } - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][4], -1); - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int pos = 1 + node->start + 1 + 2 * node->nparam; - - for (j = 0; j < 2 * node->nvar; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - - if (add_all_validity_constraints(graph) < 0) - return -1; - if (add_all_proximity_constraints(graph) < 0) - return -1; - - return 0; -} - -/* Analyze the conflicting constraint found by - * isl_tab_basic_set_non_trivial_lexmin. If it corresponds to the validity - * constraint of one of the edges between distinct nodes, living, moreover - * in distinct SCCs, then record the source and sink SCC as this may - * be a good place to cut between SCCs. - */ -static int check_conflict(int con, void *user) -{ - int i; - struct isl_sched_graph *graph = user; - - if (graph->src_scc >= 0) - return 0; - - con -= graph->lp->n_eq; - - if (con >= graph->lp->n_ineq) - return 0; - - for (i = 0; i < graph->n_edge; ++i) { - if (!graph->edge[i].validity) - continue; - if (graph->edge[i].src == graph->edge[i].dst) - continue; - if (graph->edge[i].src->scc == graph->edge[i].dst->scc) - continue; - if (graph->edge[i].start > con) - continue; - if (graph->edge[i].end <= con) - continue; - graph->src_scc = graph->edge[i].src->scc; - graph->dst_scc = graph->edge[i].dst->scc; - } - - return 0; -} - -/* Check whether the next schedule row of the given node needs to be - * non-trivial. Lower-dimensional domains may have some trivial rows, - * but as soon as the number of remaining required non-trivial rows - * is as large as the number or remaining rows to be computed, - * all remaining rows need to be non-trivial. - */ -static int needs_row(struct isl_sched_graph *graph, struct isl_sched_node *node) -{ - return node->nvar - node->rank >= graph->maxvar - graph->n_row; -} - -/* Solve the ILP problem constructed in setup_lp. - * For each node such that all the remaining rows of its schedule - * need to be non-trivial, we construct a non-triviality region. - * This region imposes that the next row is independent of previous rows. - * In particular the coefficients c_i_x are represented by t_i_x - * variables with c_i_x = Q t_i_x and Q a unimodular matrix such that - * its first columns span the rows of the previously computed part - * of the schedule. The non-triviality region enforces that at least - * one of the remaining components of t_i_x is non-zero, i.e., - * that the new schedule row depends on at least one of the remaining - * columns of Q. - */ -static __isl_give isl_vec *solve_lp(struct isl_sched_graph *graph) -{ - int i; - isl_vec *sol; - isl_basic_set *lp; - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int skip = node->rank; - graph->region[i].pos = node->start + 1 + 2*(node->nparam+skip); - if (needs_row(graph, node)) - graph->region[i].len = 2 * (node->nvar - skip); - else - graph->region[i].len = 0; - } - lp = isl_basic_set_copy(graph->lp); - sol = isl_tab_basic_set_non_trivial_lexmin(lp, 2, graph->n, - graph->region, &check_conflict, graph); - return sol; -} - -/* Update the schedules of all nodes based on the given solution - * of the LP problem. - * The new row is added to the current band. - * All possibly negative coefficients are encoded as a difference - * of two non-negative variables, so we need to perform the subtraction - * here. Moreover, if use_cmap is set, then the solution does - * not refer to the actual coefficients c_i_x, but instead to variables - * t_i_x such that c_i_x = Q t_i_x and Q is equal to node->cmap. - * In this case, we then also need to perform this multiplication - * to obtain the values of c_i_x. - * - * If check_zero is set, then the first two coordinates of sol are - * assumed to correspond to the dependence distance. If these two - * coordinates are zero, then the corresponding scheduling dimension - * is marked as being zero distance. - */ -static int update_schedule(struct isl_sched_graph *graph, - __isl_take isl_vec *sol, int use_cmap, int check_zero) -{ - int i, j; - int zero = 0; - isl_vec *csol = NULL; - - if (!sol) - goto error; - if (sol->size == 0) - isl_die(sol->ctx, isl_error_internal, - "no solution found", goto error); - - if (check_zero) - zero = isl_int_is_zero(sol->el[1]) && - isl_int_is_zero(sol->el[2]); - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int pos = node->start; - int row = isl_mat_rows(node->sched); - - isl_vec_free(csol); - csol = isl_vec_alloc(sol->ctx, node->nvar); - if (!csol) - goto error; - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_add_rows(node->sched, 1); - if (!node->sched) - goto error; - node->sched = isl_mat_set_element(node->sched, row, 0, - sol->el[1 + pos]); - for (j = 0; j < node->nparam + node->nvar; ++j) - isl_int_sub(sol->el[1 + pos + 1 + 2 * j + 1], - sol->el[1 + pos + 1 + 2 * j + 1], - sol->el[1 + pos + 1 + 2 * j]); - for (j = 0; j < node->nparam; ++j) - node->sched = isl_mat_set_element(node->sched, - row, 1 + j, sol->el[1+pos+1+2*j+1]); - for (j = 0; j < node->nvar; ++j) - isl_int_set(csol->el[j], - sol->el[1+pos+1+2*(node->nparam+j)+1]); - if (use_cmap) - csol = isl_mat_vec_product(isl_mat_copy(node->cmap), - csol); - if (!csol) - goto error; - for (j = 0; j < node->nvar; ++j) - node->sched = isl_mat_set_element(node->sched, - row, 1 + node->nparam + j, csol->el[j]); - node->band[graph->n_total_row] = graph->n_band; - node->zero[graph->n_total_row] = zero; - } - isl_vec_free(sol); - isl_vec_free(csol); - - graph->n_row++; - graph->n_total_row++; - - return 0; -error: - isl_vec_free(sol); - isl_vec_free(csol); - return -1; -} - -/* Convert node->sched into a map and return this map. - * We simply add equality constraints that express each output variable - * as the affine combination of parameters and input variables specified - * by the schedule matrix. - * - * The result is cached in node->sched_map, which needs to be released - * whenever node->sched is updated. - */ -static __isl_give isl_map *node_extract_schedule(struct isl_sched_node *node) -{ - int i, j; - isl_dim *dim; - isl_basic_map *bmap; - isl_constraint *c; - int nrow, ncol; - isl_int v; - - if (node->sched_map) - return isl_map_copy(node->sched_map); - - nrow = isl_mat_rows(node->sched); - ncol = isl_mat_cols(node->sched) - 1; - dim = isl_dim_from_domain(isl_dim_copy(node->dim)); - dim = isl_dim_add(dim, isl_dim_out, nrow); - bmap = isl_basic_map_universe(isl_dim_copy(dim)); - - isl_int_init(v); - - for (i = 0; i < nrow; ++i) { - c = isl_equality_alloc(isl_dim_copy(dim)); - isl_constraint_set_coefficient_si(c, isl_dim_out, i, -1); - isl_mat_get_element(node->sched, i, 0, &v); - isl_constraint_set_constant(c, v); - for (j = 0; j < node->nparam; ++j) { - isl_mat_get_element(node->sched, i, 1 + j, &v); - isl_constraint_set_coefficient(c, isl_dim_param, j, v); - } - for (j = 0; j < node->nvar; ++j) { - isl_mat_get_element(node->sched, - i, 1 + node->nparam + j, &v); - isl_constraint_set_coefficient(c, isl_dim_in, j, v); - } - bmap = isl_basic_map_add_constraint(bmap, c); - } - - isl_int_clear(v); - - isl_dim_free(dim); - - node->sched_map = isl_map_from_basic_map(bmap); - return isl_map_copy(node->sched_map); -} - -/* Update the given dependence relation based on the current schedule. - * That is, intersect the dependence relation with a map expressing - * that source and sink are executed within the same iteration of - * the current schedule. - * This is not the most efficient way, but this shouldn't be a critical - * operation. - */ -static __isl_give isl_map *specialize(__isl_take isl_map *map, - struct isl_sched_node *src, struct isl_sched_node *dst) -{ - isl_map *src_sched, *dst_sched, *id; - - src_sched = node_extract_schedule(src); - dst_sched = node_extract_schedule(dst); - id = isl_map_apply_range(src_sched, isl_map_reverse(dst_sched)); - return isl_map_intersect(map, id); -} - -/* Update the dependence relations of all edges based on the current schedule. - * If a dependence is carried completely by the current schedule, then - * it is removed and edge_table is updated accordingly. - */ -static int update_edges(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - int reset_table = 0; - - for (i = graph->n_edge - 1; i >= 0; --i) { - struct isl_sched_edge *edge = &graph->edge[i]; - edge->map = specialize(edge->map, edge->src, edge->dst); - if (!edge->map) - return -1; - - if (isl_map_plain_is_empty(edge->map)) { - reset_table = 1; - isl_map_free(edge->map); - if (i != graph->n_edge - 1) - graph->edge[i] = graph->edge[graph->n_edge - 1]; - graph->n_edge--; - } - } - - if (reset_table) { - isl_hash_table_free(ctx, graph->edge_table); - graph->edge_table = NULL; - return graph_init_edge_table(ctx, graph); - } - - return 0; -} - -static void next_band(struct isl_sched_graph *graph) -{ - graph->band_start = graph->n_total_row; - graph->n_band++; -} - -/* Topologically sort statements mapped to same schedule iteration - * and add a row to the schedule corresponding to this order. - */ -static int sort_statements(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i, j; - - if (graph->n <= 1) - return 0; - - if (update_edges(ctx, graph) < 0) - return -1; - - if (graph->n_edge == 0) - return 0; - - if (detect_sccs(graph) < 0) - return -1; - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int row = isl_mat_rows(node->sched); - int cols = isl_mat_cols(node->sched); - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_add_rows(node->sched, 1); - if (!node->sched) - return -1; - node->sched = isl_mat_set_element_si(node->sched, row, 0, - node->scc); - for (j = 1; j < cols; ++j) - node->sched = isl_mat_set_element_si(node->sched, - row, j, 0); - node->band[graph->n_total_row] = graph->n_band; - } - - graph->n_total_row++; - next_band(graph); - - return 0; -} - -/* Construct an isl_schedule based on the computed schedule stored - * in graph and with parameters specified by dim. - */ -static __isl_give isl_schedule *extract_schedule(struct isl_sched_graph *graph, - __isl_take isl_dim *dim) -{ - int i; - isl_ctx *ctx; - isl_schedule *sched = NULL; - - if (!dim) - return NULL; - - ctx = isl_dim_get_ctx(dim); - sched = isl_calloc(ctx, struct isl_schedule, - sizeof(struct isl_schedule) + - (graph->n - 1) * sizeof(struct isl_schedule_node)); - if (!sched) - goto error; - - sched->ref = 1; - sched->n = graph->n; - sched->n_band = graph->n_band; - sched->n_total_row = graph->n_total_row; - - for (i = 0; i < sched->n; ++i) { - int r, b; - int *band_end, *band_id, *zero; - - band_end = isl_alloc_array(ctx, int, graph->n_band); - band_id = isl_alloc_array(ctx, int, graph->n_band); - zero = isl_alloc_array(ctx, int, graph->n_total_row); - sched->node[i].sched = node_extract_schedule(&graph->node[i]); - sched->node[i].band_end = band_end; - sched->node[i].band_id = band_id; - sched->node[i].zero = zero; - if (!band_end || !band_id || !zero) - goto error; - - for (r = 0; r < graph->n_total_row; ++r) - zero[r] = graph->node[i].zero[r]; - for (r = b = 0; r < graph->n_total_row; ++r) { - if (graph->node[i].band[r] == b) - continue; - band_end[b++] = r; - if (graph->node[i].band[r] == -1) - break; - } - if (r == graph->n_total_row) - band_end[b++] = r; - sched->node[i].n_band = b; - for (--b; b >= 0; --b) - band_id[b] = graph->node[i].band_id[b]; - } - - sched->dim = dim; - - return sched; -error: - isl_dim_free(dim); - isl_schedule_free(sched); - return NULL; -} - -/* Copy nodes that satisfy node_pred from the src dependence graph - * to the dst dependence graph. - */ -static int copy_nodes(struct isl_sched_graph *dst, struct isl_sched_graph *src, - int (*node_pred)(struct isl_sched_node *node, int data), int data) -{ - int i; - - dst->n = 0; - for (i = 0; i < src->n; ++i) { - if (!node_pred(&src->node[i], data)) - continue; - dst->node[dst->n].dim = isl_dim_copy(src->node[i].dim); - dst->node[dst->n].nvar = src->node[i].nvar; - dst->node[dst->n].nparam = src->node[i].nparam; - dst->node[dst->n].sched = isl_mat_copy(src->node[i].sched); - dst->node[dst->n].sched_map = - isl_map_copy(src->node[i].sched_map); - dst->node[dst->n].band = src->node[i].band; - dst->node[dst->n].band_id = src->node[i].band_id; - dst->node[dst->n].zero = src->node[i].zero; - dst->n++; - } - - return 0; -} - -/* Copy non-empty edges that satisfy edge_pred from the src dependence graph - * to the dst dependence graph. - */ -static int copy_edges(isl_ctx *ctx, struct isl_sched_graph *dst, - struct isl_sched_graph *src, - int (*edge_pred)(struct isl_sched_edge *edge, int data), int data) -{ - int i; - - dst->n_edge = 0; - for (i = 0; i < src->n_edge; ++i) { - struct isl_sched_edge *edge = &src->edge[i]; - isl_map *map; - - if (!edge_pred(edge, data)) - continue; - - if (isl_map_plain_is_empty(edge->map)) - continue; - - map = isl_map_copy(edge->map); - - dst->edge[dst->n_edge].src = - graph_find_node(ctx, dst, edge->src->dim); - dst->edge[dst->n_edge].dst = - graph_find_node(ctx, dst, edge->dst->dim); - dst->edge[dst->n_edge].map = map; - dst->edge[dst->n_edge].validity = edge->validity; - dst->edge[dst->n_edge].proximity = edge->proximity; - dst->n_edge++; - } - - return 0; -} - -/* Given a "src" dependence graph that contains the nodes from "dst" - * that satisfy node_pred, copy the schedule computed in "src" - * for those nodes back to "dst". - */ -static int copy_schedule(struct isl_sched_graph *dst, - struct isl_sched_graph *src, - int (*node_pred)(struct isl_sched_node *node, int data), int data) -{ - int i; - - src->n = 0; - for (i = 0; i < dst->n; ++i) { - if (!node_pred(&dst->node[i], data)) - continue; - isl_mat_free(dst->node[i].sched); - isl_map_free(dst->node[i].sched_map); - dst->node[i].sched = isl_mat_copy(src->node[src->n].sched); - dst->node[i].sched_map = - isl_map_copy(src->node[src->n].sched_map); - src->n++; - } - - dst->n_total_row = src->n_total_row; - dst->n_band = src->n_band; - - return 0; -} - -/* Compute the maximal number of variables over all nodes. - * This is the maximal number of linearly independent schedule - * rows that we need to compute. - * Just in case we end up in a part of the dependence graph - * with only lower-dimensional domains, we make sure we will - * compute the required amount of extra linearly independent rows. - */ -static int compute_maxvar(struct isl_sched_graph *graph) -{ - int i; - - graph->maxvar = 0; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int nvar; - - if (node_update_cmap(node) < 0) - return -1; - nvar = node->nvar + graph->n_row - node->rank; - if (nvar > graph->maxvar) - graph->maxvar = nvar; - } - - return 0; -} - -static int compute_schedule(isl_ctx *ctx, struct isl_sched_graph *graph); -static int compute_schedule_wcc(isl_ctx *ctx, struct isl_sched_graph *graph); - -/* Compute a schedule for a subgraph of "graph". In particular, for - * the graph composed of nodes that satisfy node_pred and edges that - * that satisfy edge_pred. The caller should precompute the number - * of nodes and edges that satisfy these predicates and pass them along - * as "n" and "n_edge". - * If the subgraph is known to consist of a single component, then wcc should - * be set and then we call compute_schedule_wcc on the constructed subgraph. - * Otherwise, we call compute_schedule, which will check whether the subgraph - * is connected. - */ -static int compute_sub_schedule(isl_ctx *ctx, - struct isl_sched_graph *graph, int n, int n_edge, - int (*node_pred)(struct isl_sched_node *node, int data), - int (*edge_pred)(struct isl_sched_edge *edge, int data), - int data, int wcc) -{ - struct isl_sched_graph split = { 0 }; - - if (graph_alloc(ctx, &split, n, n_edge) < 0) - goto error; - if (copy_nodes(&split, graph, node_pred, data) < 0) - goto error; - if (graph_init_table(ctx, &split) < 0) - goto error; - if (copy_edges(ctx, &split, graph, edge_pred, data) < 0) - goto error; - if (graph_init_edge_table(ctx, &split) < 0) - goto error; - split.n_row = graph->n_row; - split.n_total_row = graph->n_total_row; - split.n_band = graph->n_band; - split.band_start = graph->band_start; - - if (wcc && compute_schedule_wcc(ctx, &split) < 0) - goto error; - if (!wcc && compute_schedule(ctx, &split) < 0) - goto error; - - copy_schedule(graph, &split, node_pred, data); - - graph_free(ctx, &split); - return 0; -error: - graph_free(ctx, &split); - return -1; -} - -static int node_scc_exactly(struct isl_sched_node *node, int scc) -{ - return node->scc == scc; -} - -static int node_scc_at_most(struct isl_sched_node *node, int scc) -{ - return node->scc <= scc; -} - -static int node_scc_at_least(struct isl_sched_node *node, int scc) -{ - return node->scc >= scc; -} - -static int edge_src_scc_exactly(struct isl_sched_edge *edge, int scc) -{ - return edge->src->scc == scc; -} - -static int edge_dst_scc_at_most(struct isl_sched_edge *edge, int scc) -{ - return edge->dst->scc <= scc; -} - -static int edge_src_scc_at_least(struct isl_sched_edge *edge, int scc) -{ - return edge->src->scc >= scc; -} - -/* Pad the schedules of all nodes with zero rows such that in the end - * they all have graph->n_total_row rows. - * The extra rows don't belong to any band, so they get assigned band number -1. - */ -static int pad_schedule(struct isl_sched_graph *graph) -{ - int i, j; - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int row = isl_mat_rows(node->sched); - if (graph->n_total_row > row) { - isl_map_free(node->sched_map); - node->sched_map = NULL; - } - node->sched = isl_mat_add_zero_rows(node->sched, - graph->n_total_row - row); - if (!node->sched) - return -1; - for (j = row; j < graph->n_total_row; ++j) - node->band[j] = -1; - } - - return 0; -} - -/* Split the current graph into two parts and compute a schedule for each - * part individually. In particular, one part consists of all SCCs up - * to and including graph->src_scc, while the other part contains the other - * SCCS. - * - * The split is enforced in the schedule by constant rows with two different - * values (0 and 1). These constant rows replace the previously computed rows - * in the current band. - * It would be possible to reuse them as the first rows in the next - * band, but recomputing them may result in better rows as we are looking - * at a smaller part of the dependence graph. - * - * The band_id of the second group is set to n, where n is the number - * of nodes in the first group. This ensures that the band_ids over - * the two groups remain disjoint, even if either or both of the two - * groups contain independent components. - */ -static int compute_split_schedule(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i, j, n, e1, e2; - int n_total_row, orig_total_row; - int n_band, orig_band; - int drop; - - drop = graph->n_total_row - graph->band_start; - graph->n_total_row -= drop; - graph->n_row -= drop; - - n = 0; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int row = isl_mat_rows(node->sched) - drop; - int cols = isl_mat_cols(node->sched); - int before = node->scc <= graph->src_scc; - - if (before) - n++; - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_drop_rows(node->sched, - graph->band_start, drop); - node->sched = isl_mat_add_rows(node->sched, 1); - if (!node->sched) - return -1; - node->sched = isl_mat_set_element_si(node->sched, row, 0, - !before); - for (j = 1; j < cols; ++j) - node->sched = isl_mat_set_element_si(node->sched, - row, j, 0); - node->band[graph->n_total_row] = graph->n_band; - } - - e1 = e2 = 0; - for (i = 0; i < graph->n_edge; ++i) { - if (graph->edge[i].dst->scc <= graph->src_scc) - e1++; - if (graph->edge[i].src->scc > graph->src_scc) - e2++; - } - - graph->n_total_row++; - next_band(graph); - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - if (node->scc > graph->src_scc) - node->band_id[graph->n_band] = n; - } - - orig_total_row = graph->n_total_row; - orig_band = graph->n_band; - if (compute_sub_schedule(ctx, graph, n, e1, - &node_scc_at_most, &edge_dst_scc_at_most, - graph->src_scc, 0) < 0) - return -1; - n_total_row = graph->n_total_row; - graph->n_total_row = orig_total_row; - n_band = graph->n_band; - graph->n_band = orig_band; - if (compute_sub_schedule(ctx, graph, graph->n - n, e2, - &node_scc_at_least, &edge_src_scc_at_least, - graph->src_scc + 1, 0) < 0) - return -1; - if (n_total_row > graph->n_total_row) - graph->n_total_row = n_total_row; - if (n_band > graph->n_band) - graph->n_band = n_band; - - return pad_schedule(graph); -} - -/* Compute the next band of the schedule after updating the dependence - * relations based on the the current schedule. - */ -static int compute_next_band(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - if (update_edges(ctx, graph) < 0) - return -1; - next_band(graph); - - return compute_schedule(ctx, graph); -} - -/* Add constraints to graph->lp that force the dependence of edge i - * to be respected and attempt to carry it, where edge i is one from - * a node j to itself. - * That is, add constraints that enforce - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_j_0 + c_j_n n + c_j_x x) - * = c_j_x (y - x) >= e_i - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for (y - x) and then plug in (-e_i, 0, c_j_x), - * with each coefficient in c_j_x represented as a pair of non-negative - * coefficients. - */ -static int add_intra_constraints(struct isl_sched_graph *graph, int i) -{ - unsigned total; - struct isl_sched_edge *edge= &graph->edge[i]; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_dim *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *node = edge->src; - - coef = intra_coefficients(graph, map); - - dim = isl_dim_domain(isl_dim_unwrap(isl_basic_set_get_dim(coef))); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - isl_dim_map_range(dim_map, 3 + i, 0, 0, 0, 1, -1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set), 1, - node->nvar, -1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set), 1, - node->nvar, 1); - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_dim_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that force the dependence of edge i - * to be respected and attempt to carry it, where edge i is one from - * node j to node k. - * That is, add constraints that enforce - * - * (c_k_0 + c_k_n n + c_k_x y) - (c_j_0 + c_j_n n + c_j_x x) >= e_i - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for R and then plug in - * (-e_i + c_k_0 - c_j_0, c_k_n - c_j_n, c_k_x - c_j_x) - * with each coefficient (except e_i, c_k_0 and c_j_0) - * represented as a pair of non-negative coefficients. - */ -static int add_inter_constraints(struct isl_sched_graph *graph, int i) -{ - unsigned total; - struct isl_sched_edge *edge= &graph->edge[i]; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_dim *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *src = edge->src; - struct isl_sched_node *dst = edge->dst; - - coef = inter_coefficients(graph, map); - - dim = isl_dim_domain(isl_dim_unwrap(isl_basic_set_get_dim(coef))); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - - isl_dim_map_range(dim_map, 3 + i, 0, 0, 0, 1, -1); - - isl_dim_map_range(dim_map, dst->start, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, dst->start + 1, 2, 1, 1, dst->nparam, -1); - isl_dim_map_range(dim_map, dst->start + 2, 2, 1, 1, dst->nparam, 1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, -1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, 1); - - isl_dim_map_range(dim_map, src->start, 0, 0, 0, 1, -1); - isl_dim_map_range(dim_map, src->start + 1, 2, 1, 1, src->nparam, 1); - isl_dim_map_range(dim_map, src->start + 2, 2, 1, 1, src->nparam, -1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 1, 2, - isl_dim_size(dim, isl_dim_set), 1, - src->nvar, 1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 2, 2, - isl_dim_size(dim, isl_dim_set), 1, - src->nvar, -1); - - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_dim_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that force all dependence - * to be respected and attempt to carry it. - */ -static int add_all_constraints(struct isl_sched_graph *graph) -{ - int i; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - if (edge->src == edge->dst && - add_intra_constraints(graph, i) < 0) - return -1; - if (edge->src != edge->dst && - add_inter_constraints(graph, i) < 0) - return -1; - } - - return 0; -} - -/* Construct an LP problem for finding schedule coefficients - * such that the schedule carries as many dependences as possible. - * In particular, for each dependence i, we bound the dependence distance - * from below by e_i, with 0 <= e_i <= 1 and then maximize the sum - * of all e_i's. Dependence with e_i = 0 in the solution are simply - * respected, while those with e_i > 0 (in practice e_i = 1) are carried. - * - * All variables of the LP are non-negative. The actual coefficients - * may be negative, so each coefficient is represented as the difference - * of two non-negative variables. The negative part always appears - * immediately before the positive part. - * Other than that, the variables have the following order - * - * - sum of (1 - e_i) over all edges - * - sum of positive and negative parts of all c_n coefficients - * (unconstrained when computing non-parametric schedules) - * - sum of positive and negative parts of all c_x coefficients - * - for each edge - * - e_i - * - for each node - * - c_i_0 - * - positive and negative parts of c_i_n (if parametric) - * - positive and negative parts of c_i_x - * - * The constraints are those from the edges plus three equalities - * to express the sums and n_edge inequalities to express e_i <= 1. - */ -static int setup_carry_lp(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i, j; - int k; - isl_dim *dim; - unsigned total; - int n_eq, n_ineq; - - total = 3 + graph->n_edge; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[graph->sorted[i]]; - node->start = total; - total += 1 + 2 * (node->nparam + node->nvar); - } - - if (count_constraints(graph, &n_eq, &n_ineq, 1) < 0) - return -1; - - dim = isl_dim_set_alloc(ctx, 0, total); - isl_basic_set_free(graph->lp); - n_eq += 3; - n_ineq += graph->n_edge; - graph->lp = isl_basic_set_alloc_dim(dim, 0, n_eq, n_ineq); - graph->lp = isl_basic_set_set_rational(graph->lp); - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][0], -graph->n_edge); - isl_int_set_si(graph->lp->eq[k][1], 1); - for (i = 0; i < graph->n_edge; ++i) - isl_int_set_si(graph->lp->eq[k][4 + i], 1); - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][2], -1); - for (i = 0; i < graph->n; ++i) { - int pos = 1 + graph->node[i].start + 1; - - for (j = 0; j < 2 * graph->node[i].nparam; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][3], -1); - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int pos = 1 + node->start + 1 + 2 * node->nparam; - - for (j = 0; j < 2 * node->nvar; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - - for (i = 0; i < graph->n_edge; ++i) { - k = isl_basic_set_alloc_inequality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->ineq[k], 1 + total); - isl_int_set_si(graph->lp->ineq[k][4 + i], -1); - isl_int_set_si(graph->lp->ineq[k][0], 1); - } - - if (add_all_constraints(graph) < 0) - return -1; - - return 0; -} - -/* If the schedule_split_parallel option is set and if the linear - * parts of the scheduling rows for all nodes in the graphs are the same, - * then split off the constant term from the linear part. - * The constant term is then placed in a separate band and - * the linear part is simplified. - */ -static int split_parallel(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - int equal = 1; - int row, cols; - struct isl_sched_node *node0; - - if (!ctx->opt->schedule_split_parallel) - return 0; - if (graph->n <= 1) - return 0; - - node0 = &graph->node[0]; - row = isl_mat_rows(node0->sched) - 1; - cols = isl_mat_cols(node0->sched); - for (i = 1; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - - if (!isl_seq_eq(node0->sched->row[row] + 1, - node->sched->row[row] + 1, cols - 1)) - return 0; - if (equal && - isl_int_ne(node0->sched->row[row][0], - node->sched->row[row][0])) - equal = 0; - } - if (equal) - return 0; - - next_band(graph); - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_add_zero_rows(node->sched, 1); - if (!node->sched) - return -1; - isl_int_set(node->sched->row[row + 1][0], - node->sched->row[row][0]); - isl_int_set_si(node->sched->row[row][0], 0); - node->sched = isl_mat_normalize_row(node->sched, row); - if (!node->sched) - return -1; - node->band[graph->n_total_row] = graph->n_band; - } - - graph->n_total_row++; - - return 0; -} - -/* Construct a schedule row for each node such that as many dependences - * as possible are carried and then continue with the next band. - */ -static int carry_dependences(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - isl_vec *sol; - isl_basic_set *lp; - - if (setup_carry_lp(ctx, graph) < 0) - return -1; - - lp = isl_basic_set_copy(graph->lp); - sol = isl_tab_basic_set_non_neg_lexmin(lp); - if (!sol) - return -1; - - if (sol->size == 0) { - isl_vec_free(sol); - isl_die(ctx, isl_error_internal, - "error in schedule construction", return -1); - } - - if (isl_int_cmp_si(sol->el[1], graph->n_edge) >= 0) { - isl_vec_free(sol); - isl_die(ctx, isl_error_unknown, - "unable to carry dependences", return -1); - } - - if (update_schedule(graph, sol, 0, 0) < 0) - return -1; - - if (split_parallel(ctx, graph) < 0) - return -1; - - return compute_next_band(ctx, graph); -} - -/* Compute a schedule for a connected dependence graph. - * We try to find a sequence of as many schedule rows as possible that result - * in non-negative dependence distances (independent of the previous rows - * in the sequence, i.e., such that the sequence is tilable). - * If we can't find any more rows we either - * - split between SCCs and start over (assuming we found an interesting - * pair of SCCs between which to split) - * - continue with the next band (assuming the current band has at least - * one row) - * - try to carry as many dependences as possible and continue with the next - * band - * - * If we manage to complete the schedule, we finish off by topologically - * sorting the statements based on the remaining dependences. - * - * If ctx->opt->schedule_outer_zero_distance is set, then we force the - * outermost dimension in the current band to be zero distance. If this - * turns out to be impossible, we fall back on the general scheme above - * and try to carry as many dependences as possible. - */ -static int compute_schedule_wcc(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int force_zero = 0; - - if (detect_sccs(graph) < 0) - return -1; - sort_sccs(graph); - - if (compute_maxvar(graph) < 0) - return -1; - - if (ctx->opt->schedule_outer_zero_distance) - force_zero = 1; - - while (graph->n_row < graph->maxvar) { - isl_vec *sol; - - graph->src_scc = -1; - graph->dst_scc = -1; - - if (setup_lp(ctx, graph, force_zero) < 0) - return -1; - sol = solve_lp(graph); - if (!sol) - return -1; - if (sol->size == 0) { - isl_vec_free(sol); - if (!ctx->opt->schedule_maximize_band_depth && - graph->n_total_row > graph->band_start) - return compute_next_band(ctx, graph); - if (graph->src_scc >= 0) - return compute_split_schedule(ctx, graph); - if (graph->n_total_row > graph->band_start) - return compute_next_band(ctx, graph); - return carry_dependences(ctx, graph); - } - if (update_schedule(graph, sol, 1, 1) < 0) - return -1; - force_zero = 0; - } - - if (graph->n_total_row > graph->band_start) - next_band(graph); - return sort_statements(ctx, graph); -} - -/* Compute a schedule for each component (identified by node->scc) - * of the dependence graph separately and then combine the results. - * - * The band_id is adjusted such that each component has a separate id. - * Note that the band_id may have already been set to a value different - * from zero by compute_split_schedule. - */ -static int compute_component_schedule(isl_ctx *ctx, - struct isl_sched_graph *graph) -{ - int wcc, i; - int n, n_edge; - int n_total_row, orig_total_row; - int n_band, orig_band; - - n_total_row = 0; - orig_total_row = graph->n_total_row; - n_band = 0; - orig_band = graph->n_band; - for (i = 0; i < graph->n; ++i) - graph->node[i].band_id[graph->n_band] += graph->node[i].scc; - for (wcc = 0; wcc < graph->scc; ++wcc) { - n = 0; - for (i = 0; i < graph->n; ++i) - if (graph->node[i].scc == wcc) - n++; - n_edge = 0; - for (i = 0; i < graph->n_edge; ++i) - if (graph->edge[i].src->scc == wcc) - n_edge++; - - if (compute_sub_schedule(ctx, graph, n, n_edge, - &node_scc_exactly, - &edge_src_scc_exactly, wcc, 1) < 0) - return -1; - if (graph->n_total_row > n_total_row) - n_total_row = graph->n_total_row; - graph->n_total_row = orig_total_row; - if (graph->n_band > n_band) - n_band = graph->n_band; - graph->n_band = orig_band; - } - - graph->n_total_row = n_total_row; - graph->n_band = n_band; - - return pad_schedule(graph); -} - -/* Compute a schedule for the given dependence graph. - * We first check if the graph is connected (through validity dependences) - * and if so compute a schedule for each component separately. - */ -static int compute_schedule(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - if (detect_wccs(graph) < 0) - return -1; - - if (graph->scc > 1) - return compute_component_schedule(ctx, graph); - - return compute_schedule_wcc(ctx, graph); -} - -/* Compute a schedule for the given union of domains that respects - * all the validity dependences and tries to minimize the dependence - * distances over the proximity dependences. - */ -__isl_give isl_schedule *isl_union_set_compute_schedule( - __isl_take isl_union_set *domain, - __isl_take isl_union_map *validity, - __isl_take isl_union_map *proximity) -{ - isl_ctx *ctx = isl_union_set_get_ctx(domain); - isl_dim *dim; - struct isl_sched_graph graph = { 0 }; - isl_schedule *sched; - - domain = isl_union_set_align_params(domain, - isl_union_map_get_dim(validity)); - domain = isl_union_set_align_params(domain, - isl_union_map_get_dim(proximity)); - dim = isl_union_set_get_dim(domain); - validity = isl_union_map_align_params(validity, isl_dim_copy(dim)); - proximity = isl_union_map_align_params(proximity, dim); - - if (!domain) - goto error; - - graph.n = isl_union_set_n_set(domain); - if (graph.n == 0) - goto empty; - if (graph_alloc(ctx, &graph, graph.n, - isl_union_map_n_map(validity) + isl_union_map_n_map(proximity)) < 0) - goto error; - graph.root = 1; - graph.n = 0; - if (isl_union_set_foreach_set(domain, &extract_node, &graph) < 0) - goto error; - if (graph_init_table(ctx, &graph) < 0) - goto error; - graph.n_edge = 0; - if (isl_union_map_foreach_map(validity, &extract_edge, &graph) < 0) - goto error; - if (graph_init_edge_table(ctx, &graph) < 0) - goto error; - if (isl_union_map_foreach_map(proximity, &extract_edge, &graph) < 0) - goto error; - - if (compute_schedule(ctx, &graph) < 0) - goto error; - -empty: - sched = extract_schedule(&graph, isl_union_set_get_dim(domain)); - - graph_free(ctx, &graph); - isl_union_set_free(domain); - isl_union_map_free(validity); - isl_union_map_free(proximity); - - return sched; -error: - graph_free(ctx, &graph); - isl_union_set_free(domain); - isl_union_map_free(validity); - isl_union_map_free(proximity); - return NULL; -} - -void *isl_schedule_free(__isl_take isl_schedule *sched) -{ - int i; - if (!sched) - return NULL; - - if (--sched->ref > 0) - return NULL; - - for (i = 0; i < sched->n; ++i) { - isl_map_free(sched->node[i].sched); - free(sched->node[i].band_end); - free(sched->node[i].band_id); - free(sched->node[i].zero); - } - isl_dim_free(sched->dim); - isl_band_list_free(sched->band_forest); - free(sched); - return NULL; -} - -isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *schedule) -{ - return schedule ? isl_dim_get_ctx(schedule->dim) : NULL; -} - -__isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched) -{ - int i; - isl_union_map *umap; - - if (!sched) - return NULL; - - umap = isl_union_map_empty(isl_dim_copy(sched->dim)); - for (i = 0; i < sched->n; ++i) - umap = isl_union_map_add_map(umap, - isl_map_copy(sched->node[i].sched)); - - return umap; -} - -static __isl_give isl_band_list *construct_band_list( - __isl_keep isl_schedule *schedule, __isl_keep isl_band *parent, - int band_nr, int *parent_active, int n_active); - -/* Construct an isl_band structure for the band in the given schedule - * with sequence number band_nr for the n_active nodes marked by active. - * If the nodes don't have a band with the given sequence number, - * then a band without members is created. - * - * Because of the way the schedule is constructed, we know that - * the position of the band inside the schedule of a node is the same - * for all active nodes. - */ -static __isl_give isl_band *construct_band(__isl_keep isl_schedule *schedule, - __isl_keep isl_band *parent, - int band_nr, int *active, int n_active) -{ - int i, j; - isl_ctx *ctx = isl_schedule_get_ctx(schedule); - isl_band *band; - unsigned start, end; - - band = isl_calloc_type(ctx, isl_band); - if (!band) - return NULL; - - band->ref = 1; - band->schedule = schedule; - band->parent = parent; - - for (i = 0; i < schedule->n; ++i) - if (active[i] && schedule->node[i].n_band > band_nr + 1) - break; - - if (i < schedule->n) { - band->children = construct_band_list(schedule, band, - band_nr + 1, active, n_active); - if (!band->children) - goto error; - } - - for (i = 0; i < schedule->n; ++i) - if (active[i]) - break; - - if (i >= schedule->n) - isl_die(ctx, isl_error_internal, - "band without active statements", goto error); - - start = band_nr ? schedule->node[i].band_end[band_nr - 1] : 0; - end = band_nr < schedule->node[i].n_band ? - schedule->node[i].band_end[band_nr] : start; - band->n = end - start; - - band->zero = isl_alloc_array(ctx, int, band->n); - if (!band->zero) - goto error; - - for (j = 0; j < band->n; ++j) - band->zero[j] = schedule->node[i].zero[start + j]; - - band->map = isl_union_map_empty(isl_dim_copy(schedule->dim)); - for (i = 0; i < schedule->n; ++i) { - isl_map *map; - unsigned n_out; - - if (!active[i]) - continue; - - map = isl_map_copy(schedule->node[i].sched); - n_out = isl_map_dim(map, isl_dim_out); - map = isl_map_project_out(map, isl_dim_out, end, n_out - end); - map = isl_map_project_out(map, isl_dim_out, 0, start); - band->map = isl_union_map_union(band->map, - isl_union_map_from_map(map)); - } - if (!band->map) - goto error; - - return band; -error: - isl_band_free(band); - return NULL; -} - -/* Construct a list of bands that start at the same position (with - * sequence number band_nr) in the schedules of the nodes that - * were active in the parent band. - * - * A separate isl_band structure is created for each band_id - * and for each node that does not have a band with sequence - * number band_nr. In the latter case, a band without members - * is created. - * This ensures that if a band has any children, then each node - * that was active in the band is active in exactly one of the children. - */ -static __isl_give isl_band_list *construct_band_list( - __isl_keep isl_schedule *schedule, __isl_keep isl_band *parent, - int band_nr, int *parent_active, int n_active) -{ - int i, j; - isl_ctx *ctx = isl_schedule_get_ctx(schedule); - int *active; - int n_band; - isl_band_list *list; - - n_band = 0; - for (i = 0; i < n_active; ++i) { - for (j = 0; j < schedule->n; ++j) { - if (!parent_active[j]) - continue; - if (schedule->node[j].n_band <= band_nr) - continue; - if (schedule->node[j].band_id[band_nr] == i) { - n_band++; - break; - } - } - } - for (j = 0; j < schedule->n; ++j) - if (schedule->node[j].n_band <= band_nr) - n_band++; - - if (n_band == 1) { - isl_band *band; - list = isl_band_list_alloc(ctx, n_band); - band = construct_band(schedule, parent, band_nr, - parent_active, n_active); - return isl_band_list_add(list, band); - } - - active = isl_alloc_array(ctx, int, schedule->n); - if (!active) - return NULL; - - list = isl_band_list_alloc(ctx, n_band); - - for (i = 0; i < n_active; ++i) { - int n = 0; - isl_band *band; - - for (j = 0; j < schedule->n; ++j) { - active[j] = parent_active[j] && - schedule->node[j].n_band > band_nr && - schedule->node[j].band_id[band_nr] == i; - if (active[j]) - n++; - } - if (n == 0) - continue; - - band = construct_band(schedule, parent, band_nr, active, n); - - list = isl_band_list_add(list, band); - } - for (i = 0; i < schedule->n; ++i) { - isl_band *band; - if (!parent_active[i]) - continue; - if (schedule->node[i].n_band > band_nr) - continue; - for (j = 0; j < schedule->n; ++j) - active[j] = j == i; - band = construct_band(schedule, parent, band_nr, active, 1); - list = isl_band_list_add(list, band); - } - - free(active); - - return list; -} - -/* Construct a band forest representation of the schedule and - * return the list of roots. - */ -static __isl_give isl_band_list *construct_forest( - __isl_keep isl_schedule *schedule) -{ - int i; - isl_ctx *ctx = isl_schedule_get_ctx(schedule); - isl_band_list *forest; - int *active; - - active = isl_alloc_array(ctx, int, schedule->n); - if (!active) - return NULL; - - for (i = 0; i < schedule->n; ++i) - active[i] = 1; - - forest = construct_band_list(schedule, NULL, 0, active, schedule->n); - - free(active); - - return forest; -} - -/* Return the roots of a band forest representation of the schedule. - */ -__isl_give isl_band_list *isl_schedule_get_band_forest( - __isl_keep isl_schedule *schedule) -{ - if (!schedule) - return NULL; - if (!schedule->band_forest) - schedule->band_forest = construct_forest(schedule); - return isl_band_list_dup(schedule->band_forest); -} - -static __isl_give isl_printer *print_band_list(__isl_take isl_printer *p, - __isl_keep isl_band_list *list); - -static __isl_give isl_printer *print_band(__isl_take isl_printer *p, - __isl_keep isl_band *band) -{ - isl_band_list *children; - - p = isl_printer_start_line(p); - p = isl_printer_print_union_map(p, band->map); - p = isl_printer_end_line(p); - - if (!isl_band_has_children(band)) - return p; - - children = isl_band_get_children(band); - - p = isl_printer_indent(p, 4); - p = print_band_list(p, children); - p = isl_printer_indent(p, -4); - - isl_band_list_free(children); - - return p; -} - -static __isl_give isl_printer *print_band_list(__isl_take isl_printer *p, - __isl_keep isl_band_list *list) -{ - int i, n; - - n = isl_band_list_n_band(list); - for (i = 0; i < n; ++i) { - isl_band *band; - band = isl_band_list_get_band(list, i); - p = print_band(p, band); - isl_band_free(band); - } - - return p; -} - -__isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p, - __isl_keep isl_schedule *schedule) -{ - isl_band_list *forest; - - forest = isl_schedule_get_band_forest(schedule); - - p = print_band_list(p, forest); - - isl_band_list_free(forest); - - return p; -} - -void isl_schedule_dump(__isl_keep isl_schedule *schedule) -{ - isl_printer *printer; - - if (!schedule) - return; - - printer = isl_printer_to_file(isl_schedule_get_ctx(schedule), stderr); - printer = isl_printer_print_schedule(printer, schedule); - - isl_printer_free(printer); -} diff --git a/cloog-0.16.3/isl/isl_schedule_private.h b/cloog-0.16.3/isl/isl_schedule_private.h deleted file mode 100644 index f5cf7d9566f2086ef6e5d10e94307106c6e8ea03..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_schedule_private.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef ISL_SCHEDLUE_PRIVATE_H -#define ISL_SCHEDLUE_PRIVATE_H - -#include - -/* The schedule for an individual domain, plus information about the bands - * and scheduling dimensions. - * In particular, we keep track of the number of bands and for each - * band, the starting position of the next band. The first band starts at - * position 0. - * For each scheduling dimension, we keep track of whether it result - * in zero dependence distances (within its band) with respect - * to the proximity edges. - */ -struct isl_schedule_node { - isl_map *sched; - int n_band; - int *band_end; - int *band_id; - int *zero; -}; - -/* Information about the computed schedule. - * n is the number of nodes/domains/statements. - * n_band is the maximal number of bands. - * n_total_row is the number of coordinates of the schedule. - * dim contains a description of the parameters. - * band_forest points to a band forest representation of the schedule - * and may be NULL if the forest hasn't been created yet. - */ -struct isl_schedule { - int ref; - - int n; - int n_band; - int n_total_row; - isl_dim *dim; - - isl_band_list *band_forest; - - struct isl_schedule_node node[1]; -}; - -#endif diff --git a/cloog-0.16.3/isl/isl_seq.c b/cloog-0.16.3/isl/isl_seq.c deleted file mode 100644 index dd80c1951cc38adfeceeb968e9a5ad8fb6fe43f6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_seq.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include - -void isl_seq_clr(isl_int *p, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_set_si(p[i], 0); -} - -void isl_seq_set(isl_int *p, isl_int v, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_set(p[i], v); -} - -void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_neg(dst[i], src[i]); -} - -void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_set(dst[i], src[i]); -} - -void isl_seq_submul(isl_int *dst, isl_int f, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_submul(dst[i], f, src[i]); -} - -void isl_seq_addmul(isl_int *dst, isl_int f, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_addmul(dst[i], f, src[i]); -} - -void isl_seq_swp_or_cpy(isl_int *dst, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_swap_or_set(dst[i], src[i]); -} - -void isl_seq_scale(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_mul(dst[i], src[i], m); -} - -void isl_seq_scale_down(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_divexact(dst[i], src[i], m); -} - -void isl_seq_cdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_cdiv_q(dst[i], src[i], m); -} - -void isl_seq_fdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_fdiv_q(dst[i], src[i], m); -} - -void isl_seq_fdiv_r(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_fdiv_r(dst[i], src[i], m); -} - -void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1, - isl_int m2, isl_int *src2, unsigned len) -{ - int i; - isl_int tmp; - - isl_int_init(tmp); - for (i = 0; i < len; ++i) { - isl_int_mul(tmp, m1, src1[i]); - isl_int_addmul(tmp, m2, src2[i]); - isl_int_set(dst[i], tmp); - } - isl_int_clear(tmp); -} - -/* - * Let d = dst[pos] and s = src[pos] - * dst is replaced by |s| dst - sgn(s)d src - */ -void isl_seq_elim(isl_int *dst, isl_int *src, unsigned pos, unsigned len, - isl_int *m) -{ - isl_int a; - isl_int b; - - if (isl_int_is_zero(dst[pos])) - return; - - isl_int_init(a); - isl_int_init(b); - - isl_int_gcd(a, src[pos], dst[pos]); - isl_int_divexact(b, dst[pos], a); - if (isl_int_is_pos(src[pos])) - isl_int_neg(b, b); - isl_int_divexact(a, src[pos], a); - isl_int_abs(a, a); - isl_seq_combine(dst, a, dst, b, src, len); - - if (m) - isl_int_mul(*m, *m, a); - - isl_int_clear(a); - isl_int_clear(b); -} - -int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - if (isl_int_ne(p1[i], p2[i])) - return 0; - return 1; -} - -int isl_seq_cmp(isl_int *p1, isl_int *p2, unsigned len) -{ - int i; - int cmp; - for (i = 0; i < len; ++i) - if ((cmp = isl_int_cmp(p1[i], p2[i])) != 0) - return cmp; - return 0; -} - -int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) { - if (isl_int_abs_ne(p1[i], p2[i])) - return 0; - if (isl_int_is_zero(p1[i])) - continue; - if (isl_int_eq(p1[i], p2[i])) - return 0; - } - return 1; -} - -int isl_seq_first_non_zero(isl_int *p, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - if (!isl_int_is_zero(p[i])) - return i; - return -1; -} - -int isl_seq_last_non_zero(isl_int *p, unsigned len) -{ - int i; - - for (i = len - 1; i >= 0; --i) - if (!isl_int_is_zero(p[i])) - return i; - return -1; -} - -int isl_seq_abs_min_non_zero(isl_int *p, unsigned len) -{ - int i, min = isl_seq_first_non_zero(p, len); - if (min < 0) - return -1; - for (i = min + 1; i < len; ++i) { - if (isl_int_is_zero(p[i])) - continue; - if (isl_int_abs_lt(p[i], p[min])) - min = i; - } - return min; -} - -void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd) -{ - int i, min = isl_seq_abs_min_non_zero(p, len); - - if (min < 0) { - isl_int_set_si(*gcd, 0); - return; - } - isl_int_abs(*gcd, p[min]); - for (i = 0; isl_int_cmp_si(*gcd, 1) > 0 && i < len; ++i) { - if (i == min) - continue; - if (isl_int_is_zero(p[i])) - continue; - isl_int_gcd(*gcd, *gcd, p[i]); - } -} - -void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len) -{ - if (len == 0) - return; - isl_seq_gcd(p, len, &ctx->normalize_gcd); - if (!isl_int_is_zero(ctx->normalize_gcd) && - !isl_int_is_one(ctx->normalize_gcd)) - isl_seq_scale_down(p, p, ctx->normalize_gcd, len); -} - -void isl_seq_lcm(isl_int *p, unsigned len, isl_int *lcm) -{ - int i; - - if (len == 0) { - isl_int_set_si(*lcm, 1); - return; - } - isl_int_set(*lcm, p[0]); - for (i = 1; i < len; ++i) - isl_int_lcm(*lcm, *lcm, p[i]); -} - -void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len, - isl_int *prod) -{ - int i; - if (len == 0) { - isl_int_set_si(*prod, 0); - return; - } - isl_int_mul(*prod, p1[0], p2[0]); - for (i = 1; i < len; ++i) - isl_int_addmul(*prod, p1[i], p2[i]); -} - -uint32_t isl_seq_hash(isl_int *p, unsigned len, uint32_t hash) -{ - int i; - for (i = 0; i < len; ++i) { - if (isl_int_is_zero(p[i])) - continue; - hash *= 16777619; - hash ^= (i & 0xFF); - hash = isl_int_hash(p[i], hash); - } - return hash; -} - -uint32_t isl_seq_get_hash(isl_int *p, unsigned len) -{ - uint32_t hash = isl_hash_init(); - - return isl_seq_hash(p, len, hash); -} - -uint32_t isl_seq_get_hash_bits(isl_int *p, unsigned len, unsigned bits) -{ - uint32_t hash; - - hash = isl_seq_get_hash(p, len); - return isl_hash_bits(hash, bits); -} diff --git a/cloog-0.16.3/isl/isl_stream.c b/cloog-0.16.3/isl/isl_stream.c deleted file mode 100644 index c54414981434b3097c81d25ff572ae388148c9c9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_stream.c +++ /dev/null @@ -1,680 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include - -struct isl_keyword { - char *name; - enum isl_token_type type; -}; - -static int same_name(const void *entry, const void *val) -{ - const struct isl_keyword *keyword = (const struct isl_keyword *)entry; - - return !strcmp(keyword->name, val); -} - -enum isl_token_type isl_stream_register_keyword(struct isl_stream *s, - const char *name) -{ - struct isl_hash_table_entry *entry; - struct isl_keyword *keyword; - uint32_t name_hash; - - if (!s->keywords) { - s->keywords = isl_hash_table_alloc(s->ctx, 10); - if (!s->keywords) - return ISL_TOKEN_ERROR; - s->next_type = ISL_TOKEN_LAST; - } - - name_hash = isl_hash_string(isl_hash_init(), name); - - entry = isl_hash_table_find(s->ctx, s->keywords, name_hash, - same_name, name, 1); - if (!entry) - return ISL_TOKEN_ERROR; - if (entry->data) { - keyword = entry->data; - return keyword->type; - } - - keyword = isl_calloc_type(s->ctx, struct isl_keyword); - if (!keyword) - return ISL_TOKEN_ERROR; - keyword->type = s->next_type++; - keyword->name = strdup(name); - if (!keyword->name) { - free(keyword); - return ISL_TOKEN_ERROR; - } - entry->data = keyword; - - return keyword->type; -} - -static struct isl_token *isl_token_new(struct isl_ctx *ctx, - int line, int col, unsigned on_new_line) -{ - struct isl_token *tok = isl_alloc_type(ctx, struct isl_token); - if (!tok) - return NULL; - tok->line = line; - tok->col = col; - tok->on_new_line = on_new_line; - tok->is_keyword = 0; - tok->u.s = NULL; - return tok; -} - -void isl_token_free(struct isl_token *tok) -{ - if (!tok) - return; - if (tok->type == ISL_TOKEN_VALUE) - isl_int_clear(tok->u.v); - else - free(tok->u.s); - free(tok); -} - -void isl_stream_error(struct isl_stream *s, struct isl_token *tok, char *msg) -{ - int line = tok ? tok->line : s->line; - int col = tok ? tok->col : s->col; - fprintf(stderr, "syntax error (%d, %d): %s\n", line, col, msg); - if (tok) { - if (tok->type < 256) - fprintf(stderr, "got '%c'\n", tok->type); - else if (tok->type == ISL_TOKEN_IDENT) - fprintf(stderr, "got ident '%s'\n", tok->u.s); - else if (tok->is_keyword) - fprintf(stderr, "got keyword '%s'\n", tok->u.s); - else if (tok->type == ISL_TOKEN_VALUE) { - fprintf(stderr, "got value '"); - isl_int_print(stderr, tok->u.v, 0); - fprintf(stderr, "'\n"); - } else if (tok->u.s) - fprintf(stderr, "got token '%s'\n", tok->u.s); - else - fprintf(stderr, "got token type %d\n", tok->type); - } -} - -static struct isl_stream* isl_stream_new(struct isl_ctx *ctx) -{ - int i; - struct isl_stream *s = isl_alloc_type(ctx, struct isl_stream); - if (!s) - return NULL; - s->ctx = ctx; - isl_ctx_ref(s->ctx); - s->file = NULL; - s->str = NULL; - s->len = 0; - s->line = 1; - s->col = 0; - s->eof = 0; - s->c = -1; - s->n_un = 0; - for (i = 0; i < 5; ++i) - s->tokens[i] = NULL; - s->n_token = 0; - s->keywords = NULL; - s->size = 256; - s->buffer = isl_alloc_array(ctx, char, s->size); - if (!s->buffer) - goto error; - return s; -error: - isl_stream_free(s); - return NULL; -} - -struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file) -{ - struct isl_stream *s = isl_stream_new(ctx); - if (!s) - return NULL; - s->file = file; - return s; -} - -struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str) -{ - struct isl_stream *s = isl_stream_new(ctx); - if (!s) - return NULL; - s->str = str; - return s; -} - -static int stream_getc(struct isl_stream *s) -{ - int c; - if (s->eof) - return -1; - if (s->n_un) - return s->c = s->un[--s->n_un]; - if (s->file) - c = fgetc(s->file); - else { - c = *s->str++; - if (c == '\0') - c = -1; - } - if (c == -1) - s->eof = 1; - if (!s->eof) { - if (s->c == '\n') { - s->line++; - s->col = 0; - } else - s->col++; - } - s->c = c; - return c; -} - -static void isl_stream_ungetc(struct isl_stream *s, int c) -{ - isl_assert(s->ctx, s->n_un < 5, return); - s->un[s->n_un++] = c; - s->c = -1; -} - -static int isl_stream_getc(struct isl_stream *s) -{ - int c; - - do { - c = stream_getc(s); - if (c != '\\') - return c; - c = stream_getc(s); - } while (c == '\n'); - - isl_stream_ungetc(s, c); - - return '\\'; -} - -static int isl_stream_push_char(struct isl_stream *s, int c) -{ - if (s->len >= s->size) { - char *buffer; - s->size = (3*s->size)/2; - buffer = isl_realloc_array(s->ctx, s->buffer, char, s->size); - if (!buffer) - return -1; - s->buffer = buffer; - } - s->buffer[s->len++] = c; - return 0; -} - -void isl_stream_push_token(struct isl_stream *s, struct isl_token *tok) -{ - isl_assert(s->ctx, s->n_token < 5, return); - s->tokens[s->n_token++] = tok; -} - -static enum isl_token_type check_keywords(struct isl_stream *s) -{ - struct isl_hash_table_entry *entry; - struct isl_keyword *keyword; - uint32_t name_hash; - - if (!strcasecmp(s->buffer, "exists")) - return ISL_TOKEN_EXISTS; - if (!strcasecmp(s->buffer, "and")) - return ISL_TOKEN_AND; - if (!strcasecmp(s->buffer, "or")) - return ISL_TOKEN_OR; - if (!strcasecmp(s->buffer, "not")) - return ISL_TOKEN_NOT; - if (!strcasecmp(s->buffer, "infty")) - return ISL_TOKEN_INFTY; - if (!strcasecmp(s->buffer, "infinity")) - return ISL_TOKEN_INFTY; - if (!strcasecmp(s->buffer, "NaN")) - return ISL_TOKEN_NAN; - if (!strcasecmp(s->buffer, "min")) - return ISL_TOKEN_MIN; - if (!strcasecmp(s->buffer, "max")) - return ISL_TOKEN_MAX; - if (!strcasecmp(s->buffer, "rat")) - return ISL_TOKEN_RAT; - if (!strcasecmp(s->buffer, "true")) - return ISL_TOKEN_TRUE; - if (!strcasecmp(s->buffer, "false")) - return ISL_TOKEN_FALSE; - if (!strcasecmp(s->buffer, "ceild")) - return ISL_TOKEN_CEILD; - if (!strcasecmp(s->buffer, "floord")) - return ISL_TOKEN_FLOORD; - - if (!s->keywords) - return ISL_TOKEN_IDENT; - - name_hash = isl_hash_string(isl_hash_init(), s->buffer); - entry = isl_hash_table_find(s->ctx, s->keywords, name_hash, same_name, - s->buffer, 0); - if (entry) { - keyword = entry->data; - return keyword->type; - } - - return ISL_TOKEN_IDENT; -} - -int isl_stream_skip_line(struct isl_stream *s) -{ - int c; - - while ((c = isl_stream_getc(s)) != -1 && c != '\n') - /* nothing */ - ; - - return c == -1 ? -1 : 0; -} - -static struct isl_token *next_token(struct isl_stream *s, int same_line) -{ - int c; - struct isl_token *tok = NULL; - int line, col; - int old_line = s->line; - - if (s->n_token) { - if (same_line && s->tokens[s->n_token - 1]->on_new_line) - return NULL; - return s->tokens[--s->n_token]; - } - - if (same_line && s->c == '\n') - return NULL; - - s->len = 0; - - /* skip spaces and comment lines */ - while ((c = isl_stream_getc(s)) != -1) { - if (c == '#') { - if (isl_stream_skip_line(s) < 0) - break; - c = '\n'; - if (same_line) - break; - } else if (!isspace(c) || (same_line && c == '\n')) - break; - } - - line = s->line; - col = s->col; - - if (c == -1 || (same_line && c == '\n')) - return NULL; - if (c == '(' || - c == ')' || - c == '+' || - c == '*' || - c == '%' || - c == '^' || - c == '=' || - c == '@' || - c == '$' || - c == ',' || - c == '.' || - c == ';' || - c == '[' || - c == ']' || - c == '{' || - c == '}') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = (enum isl_token_type)c; - return tok; - } - if (c == '-') { - int c; - if ((c = isl_stream_getc(s)) == '>') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->u.s = strdup("->"); - tok->type = ISL_TOKEN_TO; - return tok; - } - if (c != -1) - isl_stream_ungetc(s, c); - if (!isdigit(c)) { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = (enum isl_token_type) '-'; - return tok; - } - } - if (c == '-' || isdigit(c)) { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_VALUE; - isl_int_init(tok->u.v); - if (isl_stream_push_char(s, c)) - goto error; - while ((c = isl_stream_getc(s)) != -1 && isdigit(c)) - if (isl_stream_push_char(s, c)) - goto error; - if (c != -1) - isl_stream_ungetc(s, c); - isl_stream_push_char(s, '\0'); - isl_int_read(tok->u.v, s->buffer); - return tok; - } - if (isalpha(c) || c == '_') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - isl_stream_push_char(s, c); - while ((c = isl_stream_getc(s)) != -1 && - (isalnum(c) || c == '_')) - isl_stream_push_char(s, c); - if (c != -1) - isl_stream_ungetc(s, c); - while ((c = isl_stream_getc(s)) != -1 && c == '\'') - isl_stream_push_char(s, c); - if (c != -1) - isl_stream_ungetc(s, c); - isl_stream_push_char(s, '\0'); - tok->type = check_keywords(s); - if (tok->type != ISL_TOKEN_IDENT) - tok->is_keyword = 1; - tok->u.s = strdup(s->buffer); - if (!tok->u.s) - goto error; - return tok; - } - if (c == '"') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_STRING; - tok->u.s = NULL; - while ((c = isl_stream_getc(s)) != -1 && c != '"' && c != '\n') - isl_stream_push_char(s, c); - if (c != '"') { - isl_stream_error(s, NULL, "unterminated string"); - goto error; - } - isl_stream_push_char(s, '\0'); - tok->u.s = strdup(s->buffer); - return tok; - } - if (c == ':') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup(":="); - tok->type = ISL_TOKEN_DEF; - return tok; - } - if (c != -1) - isl_stream_ungetc(s, c); - tok->type = (enum isl_token_type) ':'; - return tok; - } - if (c == '>') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup(">="); - tok->type = ISL_TOKEN_GE; - return tok; - } else if (c == '>') { - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup(">>="); - tok->type = ISL_TOKEN_LEX_GE; - return tok; - } - tok->u.s = strdup(">>"); - tok->type = ISL_TOKEN_LEX_GT; - } else { - tok->u.s = strdup(">"); - tok->type = ISL_TOKEN_GT; - } - if (c != -1) - isl_stream_ungetc(s, c); - return tok; - } - if (c == '<') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup("<="); - tok->type = ISL_TOKEN_LE; - return tok; - } else if (c == '<') { - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup("<<="); - tok->type = ISL_TOKEN_LEX_LE; - return tok; - } - tok->u.s = strdup("<<"); - tok->type = ISL_TOKEN_LEX_LT; - } else { - tok->u.s = strdup("<"); - tok->type = ISL_TOKEN_LT; - } - if (c != -1) - isl_stream_ungetc(s, c); - return tok; - } - if (c == '&') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_AND; - if ((c = isl_stream_getc(s)) != '&' && c != -1) { - tok->u.s = strdup("&"); - isl_stream_ungetc(s, c); - } else - tok->u.s = strdup("&&"); - return tok; - } - if (c == '|') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_OR; - if ((c = isl_stream_getc(s)) != '|' && c != -1) { - tok->u.s = strdup("|"); - isl_stream_ungetc(s, c); - } else - tok->u.s = strdup("||"); - return tok; - } - if (c == '/') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) != '\\' && c != -1) { - tok->type = (enum isl_token_type) '/'; - isl_stream_ungetc(s, c); - } else { - tok->u.s = strdup("/\\"); - tok->type = ISL_TOKEN_AND; - } - return tok; - } - if (c == '\\') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) != '/' && c != -1) { - tok->type = (enum isl_token_type) '\\'; - isl_stream_ungetc(s, c); - } else { - tok->u.s = strdup("\\/"); - tok->type = ISL_TOKEN_OR; - } - return tok; - } - if (c == '!') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_NOT; - tok->u.s = strdup("!"); - return tok; - } - - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_UNKNOWN; - return tok; -error: - isl_token_free(tok); - return NULL; -} - -struct isl_token *isl_stream_next_token(struct isl_stream *s) -{ - return next_token(s, 0); -} - -struct isl_token *isl_stream_next_token_on_same_line(struct isl_stream *s) -{ - return next_token(s, 1); -} - -int isl_stream_eat_if_available(struct isl_stream *s, int type) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - if (tok->type == type) { - isl_token_free(tok); - return 1; - } - isl_stream_push_token(s, tok); - return 0; -} - -int isl_stream_next_token_is(struct isl_stream *s, int type) -{ - struct isl_token *tok; - int r; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - r = tok->type == type; - isl_stream_push_token(s, tok); - return r; -} - -char *isl_stream_read_ident_if_available(struct isl_stream *s) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return NULL; - if (tok->type == ISL_TOKEN_IDENT) { - char *ident = strdup(tok->u.s); - isl_token_free(tok); - return ident; - } - isl_stream_push_token(s, tok); - return NULL; -} - -int isl_stream_eat(struct isl_stream *s, int type) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return -1; - if (tok->type == type) { - isl_token_free(tok); - return 0; - } - isl_stream_error(s, tok, "expecting other token"); - isl_stream_push_token(s, tok); - return -1; -} - -int isl_stream_is_empty(struct isl_stream *s) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - - if (!tok) - return 1; - - isl_stream_push_token(s, tok); - return 0; -} - -static int free_keyword(void **p, void *user) -{ - struct isl_keyword *keyword = *p; - - free(keyword->name); - free(keyword); - - return 0; -} - -void isl_stream_flush_tokens(struct isl_stream *s) -{ - int i; - - if (!s) - return; - for (i = 0; i < s->n_token; ++i) - isl_token_free(s->tokens[i]); - s->n_token = 0; -} - -void isl_stream_free(struct isl_stream *s) -{ - if (!s) - return; - free(s->buffer); - if (s->n_token != 0) { - struct isl_token *tok = isl_stream_next_token(s); - isl_stream_error(s, tok, "unexpected token"); - isl_token_free(tok); - } - if (s->keywords) { - isl_hash_table_foreach(s->ctx, s->keywords, &free_keyword, NULL); - isl_hash_table_free(s->ctx, s->keywords); - } - isl_ctx_deref(s->ctx); - free(s); -} diff --git a/cloog-0.16.3/isl/isl_tab.c b/cloog-0.16.3/isl/isl_tab.c deleted file mode 100644 index 5151ab61761b90ef1bf0e38af9148253e7a357a1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_tab.c +++ /dev/null @@ -1,3342 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_map_private.h" -#include "isl_tab.h" -#include -#include - -/* - * The implementation of tableaus in this file was inspired by Section 8 - * of David Detlefs, Greg Nelson and James B. Saxe, "Simplify: a theorem - * prover for program checking". - */ - -struct isl_tab *isl_tab_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_var, unsigned M) -{ - int i; - struct isl_tab *tab; - unsigned off = 2 + M; - - tab = isl_calloc_type(ctx, struct isl_tab); - if (!tab) - return NULL; - tab->mat = isl_mat_alloc(ctx, n_row, off + n_var); - if (!tab->mat) - goto error; - tab->var = isl_alloc_array(ctx, struct isl_tab_var, n_var); - if (!tab->var) - goto error; - tab->con = isl_alloc_array(ctx, struct isl_tab_var, n_row); - if (!tab->con) - goto error; - tab->col_var = isl_alloc_array(ctx, int, n_var); - if (!tab->col_var) - goto error; - tab->row_var = isl_alloc_array(ctx, int, n_row); - if (!tab->row_var) - goto error; - for (i = 0; i < n_var; ++i) { - tab->var[i].index = i; - tab->var[i].is_row = 0; - tab->var[i].is_nonneg = 0; - tab->var[i].is_zero = 0; - tab->var[i].is_redundant = 0; - tab->var[i].frozen = 0; - tab->var[i].negated = 0; - tab->col_var[i] = i; - } - tab->n_row = 0; - tab->n_con = 0; - tab->n_eq = 0; - tab->max_con = n_row; - tab->n_col = n_var; - tab->n_var = n_var; - tab->max_var = n_var; - tab->n_param = 0; - tab->n_div = 0; - tab->n_dead = 0; - tab->n_redundant = 0; - tab->strict_redundant = 0; - tab->need_undo = 0; - tab->rational = 0; - tab->empty = 0; - tab->in_undo = 0; - tab->M = M; - tab->cone = 0; - tab->bottom.type = isl_tab_undo_bottom; - tab->bottom.next = NULL; - tab->top = &tab->bottom; - - tab->n_zero = 0; - tab->n_unbounded = 0; - tab->basis = NULL; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new) -{ - unsigned off; - - if (!tab) - return -1; - - off = 2 + tab->M; - - if (tab->max_con < tab->n_con + n_new) { - struct isl_tab_var *con; - - con = isl_realloc_array(tab->mat->ctx, tab->con, - struct isl_tab_var, tab->max_con + n_new); - if (!con) - return -1; - tab->con = con; - tab->max_con += n_new; - } - if (tab->mat->n_row < tab->n_row + n_new) { - int *row_var; - - tab->mat = isl_mat_extend(tab->mat, - tab->n_row + n_new, off + tab->n_col); - if (!tab->mat) - return -1; - row_var = isl_realloc_array(tab->mat->ctx, tab->row_var, - int, tab->mat->n_row); - if (!row_var) - return -1; - tab->row_var = row_var; - if (tab->row_sign) { - enum isl_tab_row_sign *s; - s = isl_realloc_array(tab->mat->ctx, tab->row_sign, - enum isl_tab_row_sign, tab->mat->n_row); - if (!s) - return -1; - tab->row_sign = s; - } - } - return 0; -} - -/* Make room for at least n_new extra variables. - * Return -1 if anything went wrong. - */ -int isl_tab_extend_vars(struct isl_tab *tab, unsigned n_new) -{ - struct isl_tab_var *var; - unsigned off = 2 + tab->M; - - if (tab->max_var < tab->n_var + n_new) { - var = isl_realloc_array(tab->mat->ctx, tab->var, - struct isl_tab_var, tab->n_var + n_new); - if (!var) - return -1; - tab->var = var; - tab->max_var += n_new; - } - - if (tab->mat->n_col < off + tab->n_col + n_new) { - int *p; - - tab->mat = isl_mat_extend(tab->mat, - tab->mat->n_row, off + tab->n_col + n_new); - if (!tab->mat) - return -1; - p = isl_realloc_array(tab->mat->ctx, tab->col_var, - int, tab->n_col + n_new); - if (!p) - return -1; - tab->col_var = p; - } - - return 0; -} - -struct isl_tab *isl_tab_extend(struct isl_tab *tab, unsigned n_new) -{ - if (isl_tab_extend_cons(tab, n_new) >= 0) - return tab; - - isl_tab_free(tab); - return NULL; -} - -static void free_undo_record(struct isl_tab_undo *undo) -{ - switch (undo->type) { - case isl_tab_undo_saved_basis: - free(undo->u.col_var); - break; - default:; - } - free(undo); -} - -static void free_undo(struct isl_tab *tab) -{ - struct isl_tab_undo *undo, *next; - - for (undo = tab->top; undo && undo != &tab->bottom; undo = next) { - next = undo->next; - free_undo_record(undo); - } - tab->top = undo; -} - -void isl_tab_free(struct isl_tab *tab) -{ - if (!tab) - return; - free_undo(tab); - isl_mat_free(tab->mat); - isl_vec_free(tab->dual); - isl_basic_map_free(tab->bmap); - free(tab->var); - free(tab->con); - free(tab->row_var); - free(tab->col_var); - free(tab->row_sign); - isl_mat_free(tab->samples); - free(tab->sample_index); - isl_mat_free(tab->basis); - free(tab); -} - -struct isl_tab *isl_tab_dup(struct isl_tab *tab) -{ - int i; - struct isl_tab *dup; - unsigned off; - - if (!tab) - return NULL; - - off = 2 + tab->M; - dup = isl_calloc_type(tab->mat->ctx, struct isl_tab); - if (!dup) - return NULL; - dup->mat = isl_mat_dup(tab->mat); - if (!dup->mat) - goto error; - dup->var = isl_alloc_array(tab->mat->ctx, struct isl_tab_var, tab->max_var); - if (!dup->var) - goto error; - for (i = 0; i < tab->n_var; ++i) - dup->var[i] = tab->var[i]; - dup->con = isl_alloc_array(tab->mat->ctx, struct isl_tab_var, tab->max_con); - if (!dup->con) - goto error; - for (i = 0; i < tab->n_con; ++i) - dup->con[i] = tab->con[i]; - dup->col_var = isl_alloc_array(tab->mat->ctx, int, tab->mat->n_col - off); - if (!dup->col_var) - goto error; - for (i = 0; i < tab->n_col; ++i) - dup->col_var[i] = tab->col_var[i]; - dup->row_var = isl_alloc_array(tab->mat->ctx, int, tab->mat->n_row); - if (!dup->row_var) - goto error; - for (i = 0; i < tab->n_row; ++i) - dup->row_var[i] = tab->row_var[i]; - if (tab->row_sign) { - dup->row_sign = isl_alloc_array(tab->mat->ctx, enum isl_tab_row_sign, - tab->mat->n_row); - if (!dup->row_sign) - goto error; - for (i = 0; i < tab->n_row; ++i) - dup->row_sign[i] = tab->row_sign[i]; - } - if (tab->samples) { - dup->samples = isl_mat_dup(tab->samples); - if (!dup->samples) - goto error; - dup->sample_index = isl_alloc_array(tab->mat->ctx, int, - tab->samples->n_row); - if (!dup->sample_index) - goto error; - dup->n_sample = tab->n_sample; - dup->n_outside = tab->n_outside; - } - dup->n_row = tab->n_row; - dup->n_con = tab->n_con; - dup->n_eq = tab->n_eq; - dup->max_con = tab->max_con; - dup->n_col = tab->n_col; - dup->n_var = tab->n_var; - dup->max_var = tab->max_var; - dup->n_param = tab->n_param; - dup->n_div = tab->n_div; - dup->n_dead = tab->n_dead; - dup->n_redundant = tab->n_redundant; - dup->rational = tab->rational; - dup->empty = tab->empty; - dup->strict_redundant = 0; - dup->need_undo = 0; - dup->in_undo = 0; - dup->M = tab->M; - tab->cone = tab->cone; - dup->bottom.type = isl_tab_undo_bottom; - dup->bottom.next = NULL; - dup->top = &dup->bottom; - - dup->n_zero = tab->n_zero; - dup->n_unbounded = tab->n_unbounded; - dup->basis = isl_mat_dup(tab->basis); - - return dup; -error: - isl_tab_free(dup); - return NULL; -} - -/* Construct the coefficient matrix of the product tableau - * of two tableaus. - * mat{1,2} is the coefficient matrix of tableau {1,2} - * row{1,2} is the number of rows in tableau {1,2} - * col{1,2} is the number of columns in tableau {1,2} - * off is the offset to the coefficient column (skipping the - * denominator, the constant term and the big parameter if any) - * r{1,2} is the number of redundant rows in tableau {1,2} - * d{1,2} is the number of dead columns in tableau {1,2} - * - * The order of the rows and columns in the result is as explained - * in isl_tab_product. - */ -static struct isl_mat *tab_mat_product(struct isl_mat *mat1, - struct isl_mat *mat2, unsigned row1, unsigned row2, - unsigned col1, unsigned col2, - unsigned off, unsigned r1, unsigned r2, unsigned d1, unsigned d2) -{ - int i; - struct isl_mat *prod; - unsigned n; - - prod = isl_mat_alloc(mat1->ctx, mat1->n_row + mat2->n_row, - off + col1 + col2); - if (!prod) - return NULL; - - n = 0; - for (i = 0; i < r1; ++i) { - isl_seq_cpy(prod->row[n + i], mat1->row[i], off + d1); - isl_seq_clr(prod->row[n + i] + off + d1, d2); - isl_seq_cpy(prod->row[n + i] + off + d1 + d2, - mat1->row[i] + off + d1, col1 - d1); - isl_seq_clr(prod->row[n + i] + off + col1 + d1, col2 - d2); - } - - n += r1; - for (i = 0; i < r2; ++i) { - isl_seq_cpy(prod->row[n + i], mat2->row[i], off); - isl_seq_clr(prod->row[n + i] + off, d1); - isl_seq_cpy(prod->row[n + i] + off + d1, - mat2->row[i] + off, d2); - isl_seq_clr(prod->row[n + i] + off + d1 + d2, col1 - d1); - isl_seq_cpy(prod->row[n + i] + off + col1 + d1, - mat2->row[i] + off + d2, col2 - d2); - } - - n += r2; - for (i = 0; i < row1 - r1; ++i) { - isl_seq_cpy(prod->row[n + i], mat1->row[r1 + i], off + d1); - isl_seq_clr(prod->row[n + i] + off + d1, d2); - isl_seq_cpy(prod->row[n + i] + off + d1 + d2, - mat1->row[r1 + i] + off + d1, col1 - d1); - isl_seq_clr(prod->row[n + i] + off + col1 + d1, col2 - d2); - } - - n += row1 - r1; - for (i = 0; i < row2 - r2; ++i) { - isl_seq_cpy(prod->row[n + i], mat2->row[r2 + i], off); - isl_seq_clr(prod->row[n + i] + off, d1); - isl_seq_cpy(prod->row[n + i] + off + d1, - mat2->row[r2 + i] + off, d2); - isl_seq_clr(prod->row[n + i] + off + d1 + d2, col1 - d1); - isl_seq_cpy(prod->row[n + i] + off + col1 + d1, - mat2->row[r2 + i] + off + d2, col2 - d2); - } - - return prod; -} - -/* Update the row or column index of a variable that corresponds - * to a variable in the first input tableau. - */ -static void update_index1(struct isl_tab_var *var, - unsigned r1, unsigned r2, unsigned d1, unsigned d2) -{ - if (var->index == -1) - return; - if (var->is_row && var->index >= r1) - var->index += r2; - if (!var->is_row && var->index >= d1) - var->index += d2; -} - -/* Update the row or column index of a variable that corresponds - * to a variable in the second input tableau. - */ -static void update_index2(struct isl_tab_var *var, - unsigned row1, unsigned col1, - unsigned r1, unsigned r2, unsigned d1, unsigned d2) -{ - if (var->index == -1) - return; - if (var->is_row) { - if (var->index < r2) - var->index += r1; - else - var->index += row1; - } else { - if (var->index < d2) - var->index += d1; - else - var->index += col1; - } -} - -/* Create a tableau that represents the Cartesian product of the sets - * represented by tableaus tab1 and tab2. - * The order of the rows in the product is - * - redundant rows of tab1 - * - redundant rows of tab2 - * - non-redundant rows of tab1 - * - non-redundant rows of tab2 - * The order of the columns is - * - denominator - * - constant term - * - coefficient of big parameter, if any - * - dead columns of tab1 - * - dead columns of tab2 - * - live columns of tab1 - * - live columns of tab2 - * The order of the variables and the constraints is a concatenation - * of order in the two input tableaus. - */ -struct isl_tab *isl_tab_product(struct isl_tab *tab1, struct isl_tab *tab2) -{ - int i; - struct isl_tab *prod; - unsigned off; - unsigned r1, r2, d1, d2; - - if (!tab1 || !tab2) - return NULL; - - isl_assert(tab1->mat->ctx, tab1->M == tab2->M, return NULL); - isl_assert(tab1->mat->ctx, tab1->rational == tab2->rational, return NULL); - isl_assert(tab1->mat->ctx, tab1->cone == tab2->cone, return NULL); - isl_assert(tab1->mat->ctx, !tab1->row_sign, return NULL); - isl_assert(tab1->mat->ctx, !tab2->row_sign, return NULL); - isl_assert(tab1->mat->ctx, tab1->n_param == 0, return NULL); - isl_assert(tab1->mat->ctx, tab2->n_param == 0, return NULL); - isl_assert(tab1->mat->ctx, tab1->n_div == 0, return NULL); - isl_assert(tab1->mat->ctx, tab2->n_div == 0, return NULL); - - off = 2 + tab1->M; - r1 = tab1->n_redundant; - r2 = tab2->n_redundant; - d1 = tab1->n_dead; - d2 = tab2->n_dead; - prod = isl_calloc_type(tab1->mat->ctx, struct isl_tab); - if (!prod) - return NULL; - prod->mat = tab_mat_product(tab1->mat, tab2->mat, - tab1->n_row, tab2->n_row, - tab1->n_col, tab2->n_col, off, r1, r2, d1, d2); - if (!prod->mat) - goto error; - prod->var = isl_alloc_array(tab1->mat->ctx, struct isl_tab_var, - tab1->max_var + tab2->max_var); - if (!prod->var) - goto error; - for (i = 0; i < tab1->n_var; ++i) { - prod->var[i] = tab1->var[i]; - update_index1(&prod->var[i], r1, r2, d1, d2); - } - for (i = 0; i < tab2->n_var; ++i) { - prod->var[tab1->n_var + i] = tab2->var[i]; - update_index2(&prod->var[tab1->n_var + i], - tab1->n_row, tab1->n_col, - r1, r2, d1, d2); - } - prod->con = isl_alloc_array(tab1->mat->ctx, struct isl_tab_var, - tab1->max_con + tab2->max_con); - if (!prod->con) - goto error; - for (i = 0; i < tab1->n_con; ++i) { - prod->con[i] = tab1->con[i]; - update_index1(&prod->con[i], r1, r2, d1, d2); - } - for (i = 0; i < tab2->n_con; ++i) { - prod->con[tab1->n_con + i] = tab2->con[i]; - update_index2(&prod->con[tab1->n_con + i], - tab1->n_row, tab1->n_col, - r1, r2, d1, d2); - } - prod->col_var = isl_alloc_array(tab1->mat->ctx, int, - tab1->n_col + tab2->n_col); - if (!prod->col_var) - goto error; - for (i = 0; i < tab1->n_col; ++i) { - int pos = i < d1 ? i : i + d2; - prod->col_var[pos] = tab1->col_var[i]; - } - for (i = 0; i < tab2->n_col; ++i) { - int pos = i < d2 ? d1 + i : tab1->n_col + i; - int t = tab2->col_var[i]; - if (t >= 0) - t += tab1->n_var; - else - t -= tab1->n_con; - prod->col_var[pos] = t; - } - prod->row_var = isl_alloc_array(tab1->mat->ctx, int, - tab1->mat->n_row + tab2->mat->n_row); - if (!prod->row_var) - goto error; - for (i = 0; i < tab1->n_row; ++i) { - int pos = i < r1 ? i : i + r2; - prod->row_var[pos] = tab1->row_var[i]; - } - for (i = 0; i < tab2->n_row; ++i) { - int pos = i < r2 ? r1 + i : tab1->n_row + i; - int t = tab2->row_var[i]; - if (t >= 0) - t += tab1->n_var; - else - t -= tab1->n_con; - prod->row_var[pos] = t; - } - prod->samples = NULL; - prod->sample_index = NULL; - prod->n_row = tab1->n_row + tab2->n_row; - prod->n_con = tab1->n_con + tab2->n_con; - prod->n_eq = 0; - prod->max_con = tab1->max_con + tab2->max_con; - prod->n_col = tab1->n_col + tab2->n_col; - prod->n_var = tab1->n_var + tab2->n_var; - prod->max_var = tab1->max_var + tab2->max_var; - prod->n_param = 0; - prod->n_div = 0; - prod->n_dead = tab1->n_dead + tab2->n_dead; - prod->n_redundant = tab1->n_redundant + tab2->n_redundant; - prod->rational = tab1->rational; - prod->empty = tab1->empty || tab2->empty; - prod->strict_redundant = tab1->strict_redundant || tab2->strict_redundant; - prod->need_undo = 0; - prod->in_undo = 0; - prod->M = tab1->M; - prod->cone = tab1->cone; - prod->bottom.type = isl_tab_undo_bottom; - prod->bottom.next = NULL; - prod->top = &prod->bottom; - - prod->n_zero = 0; - prod->n_unbounded = 0; - prod->basis = NULL; - - return prod; -error: - isl_tab_free(prod); - return NULL; -} - -static struct isl_tab_var *var_from_index(struct isl_tab *tab, int i) -{ - if (i >= 0) - return &tab->var[i]; - else - return &tab->con[~i]; -} - -struct isl_tab_var *isl_tab_var_from_row(struct isl_tab *tab, int i) -{ - return var_from_index(tab, tab->row_var[i]); -} - -static struct isl_tab_var *var_from_col(struct isl_tab *tab, int i) -{ - return var_from_index(tab, tab->col_var[i]); -} - -/* Check if there are any upper bounds on column variable "var", - * i.e., non-negative rows where var appears with a negative coefficient. - * Return 1 if there are no such bounds. - */ -static int max_is_manifestly_unbounded(struct isl_tab *tab, - struct isl_tab_var *var) -{ - int i; - unsigned off = 2 + tab->M; - - if (var->is_row) - return 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - if (!isl_int_is_neg(tab->mat->row[i][off + var->index])) - continue; - if (isl_tab_var_from_row(tab, i)->is_nonneg) - return 0; - } - return 1; -} - -/* Check if there are any lower bounds on column variable "var", - * i.e., non-negative rows where var appears with a positive coefficient. - * Return 1 if there are no such bounds. - */ -static int min_is_manifestly_unbounded(struct isl_tab *tab, - struct isl_tab_var *var) -{ - int i; - unsigned off = 2 + tab->M; - - if (var->is_row) - return 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - if (!isl_int_is_pos(tab->mat->row[i][off + var->index])) - continue; - if (isl_tab_var_from_row(tab, i)->is_nonneg) - return 0; - } - return 1; -} - -static int row_cmp(struct isl_tab *tab, int r1, int r2, int c, isl_int t) -{ - unsigned off = 2 + tab->M; - - if (tab->M) { - int s; - isl_int_mul(t, tab->mat->row[r1][2], tab->mat->row[r2][off+c]); - isl_int_submul(t, tab->mat->row[r2][2], tab->mat->row[r1][off+c]); - s = isl_int_sgn(t); - if (s) - return s; - } - isl_int_mul(t, tab->mat->row[r1][1], tab->mat->row[r2][off + c]); - isl_int_submul(t, tab->mat->row[r2][1], tab->mat->row[r1][off + c]); - return isl_int_sgn(t); -} - -/* Given the index of a column "c", return the index of a row - * that can be used to pivot the column in, with either an increase - * (sgn > 0) or a decrease (sgn < 0) of the corresponding variable. - * If "var" is not NULL, then the row returned will be different from - * the one associated with "var". - * - * Each row in the tableau is of the form - * - * x_r = a_r0 + \sum_i a_ri x_i - * - * Only rows with x_r >= 0 and with the sign of a_ri opposite to "sgn" - * impose any limit on the increase or decrease in the value of x_c - * and this bound is equal to a_r0 / |a_rc|. We are therefore looking - * for the row with the smallest (most stringent) such bound. - * Note that the common denominator of each row drops out of the fraction. - * To check if row j has a smaller bound than row r, i.e., - * a_j0 / |a_jc| < a_r0 / |a_rc| or a_j0 |a_rc| < a_r0 |a_jc|, - * we check if -sign(a_jc) (a_j0 a_rc - a_r0 a_jc) < 0, - * where -sign(a_jc) is equal to "sgn". - */ -static int pivot_row(struct isl_tab *tab, - struct isl_tab_var *var, int sgn, int c) -{ - int j, r, tsgn; - isl_int t; - unsigned off = 2 + tab->M; - - isl_int_init(t); - r = -1; - for (j = tab->n_redundant; j < tab->n_row; ++j) { - if (var && j == var->index) - continue; - if (!isl_tab_var_from_row(tab, j)->is_nonneg) - continue; - if (sgn * isl_int_sgn(tab->mat->row[j][off + c]) >= 0) - continue; - if (r < 0) { - r = j; - continue; - } - tsgn = sgn * row_cmp(tab, r, j, c, t); - if (tsgn < 0 || (tsgn == 0 && - tab->row_var[j] < tab->row_var[r])) - r = j; - } - isl_int_clear(t); - return r; -} - -/* Find a pivot (row and col) that will increase (sgn > 0) or decrease - * (sgn < 0) the value of row variable var. - * If not NULL, then skip_var is a row variable that should be ignored - * while looking for a pivot row. It is usually equal to var. - * - * As the given row in the tableau is of the form - * - * x_r = a_r0 + \sum_i a_ri x_i - * - * we need to find a column such that the sign of a_ri is equal to "sgn" - * (such that an increase in x_i will have the desired effect) or a - * column with a variable that may attain negative values. - * If a_ri is positive, then we need to move x_i in the same direction - * to obtain the desired effect. Otherwise, x_i has to move in the - * opposite direction. - */ -static void find_pivot(struct isl_tab *tab, - struct isl_tab_var *var, struct isl_tab_var *skip_var, - int sgn, int *row, int *col) -{ - int j, r, c; - isl_int *tr; - - *row = *col = -1; - - isl_assert(tab->mat->ctx, var->is_row, return); - tr = tab->mat->row[var->index] + 2 + tab->M; - - c = -1; - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (isl_int_is_zero(tr[j])) - continue; - if (isl_int_sgn(tr[j]) != sgn && - var_from_col(tab, j)->is_nonneg) - continue; - if (c < 0 || tab->col_var[j] < tab->col_var[c]) - c = j; - } - if (c < 0) - return; - - sgn *= isl_int_sgn(tr[c]); - r = pivot_row(tab, skip_var, sgn, c); - *row = r < 0 ? var->index : r; - *col = c; -} - -/* Return 1 if row "row" represents an obviously redundant inequality. - * This means - * - it represents an inequality or a variable - * - that is the sum of a non-negative sample value and a positive - * combination of zero or more non-negative constraints. - */ -int isl_tab_row_is_redundant(struct isl_tab *tab, int row) -{ - int i; - unsigned off = 2 + tab->M; - - if (tab->row_var[row] < 0 && !isl_tab_var_from_row(tab, row)->is_nonneg) - return 0; - - if (isl_int_is_neg(tab->mat->row[row][1])) - return 0; - if (tab->strict_redundant && isl_int_is_zero(tab->mat->row[row][1])) - return 0; - if (tab->M && isl_int_is_neg(tab->mat->row[row][2])) - return 0; - - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (isl_int_is_zero(tab->mat->row[row][off + i])) - continue; - if (tab->col_var[i] >= 0) - return 0; - if (isl_int_is_neg(tab->mat->row[row][off + i])) - return 0; - if (!var_from_col(tab, i)->is_nonneg) - return 0; - } - return 1; -} - -static void swap_rows(struct isl_tab *tab, int row1, int row2) -{ - int t; - enum isl_tab_row_sign s; - - t = tab->row_var[row1]; - tab->row_var[row1] = tab->row_var[row2]; - tab->row_var[row2] = t; - isl_tab_var_from_row(tab, row1)->index = row1; - isl_tab_var_from_row(tab, row2)->index = row2; - tab->mat = isl_mat_swap_rows(tab->mat, row1, row2); - - if (!tab->row_sign) - return; - s = tab->row_sign[row1]; - tab->row_sign[row1] = tab->row_sign[row2]; - tab->row_sign[row2] = s; -} - -static int push_union(struct isl_tab *tab, - enum isl_tab_undo_type type, union isl_tab_undo_val u) WARN_UNUSED; -static int push_union(struct isl_tab *tab, - enum isl_tab_undo_type type, union isl_tab_undo_val u) -{ - struct isl_tab_undo *undo; - - if (!tab->need_undo) - return 0; - - undo = isl_alloc_type(tab->mat->ctx, struct isl_tab_undo); - if (!undo) - return -1; - undo->type = type; - undo->u = u; - undo->next = tab->top; - tab->top = undo; - - return 0; -} - -int isl_tab_push_var(struct isl_tab *tab, - enum isl_tab_undo_type type, struct isl_tab_var *var) -{ - union isl_tab_undo_val u; - if (var->is_row) - u.var_index = tab->row_var[var->index]; - else - u.var_index = tab->col_var[var->index]; - return push_union(tab, type, u); -} - -int isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) -{ - union isl_tab_undo_val u = { 0 }; - return push_union(tab, type, u); -} - -/* Push a record on the undo stack describing the current basic - * variables, so that the this state can be restored during rollback. - */ -int isl_tab_push_basis(struct isl_tab *tab) -{ - int i; - union isl_tab_undo_val u; - - u.col_var = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!u.col_var) - return -1; - for (i = 0; i < tab->n_col; ++i) - u.col_var[i] = tab->col_var[i]; - return push_union(tab, isl_tab_undo_saved_basis, u); -} - -int isl_tab_push_callback(struct isl_tab *tab, struct isl_tab_callback *callback) -{ - union isl_tab_undo_val u; - u.callback = callback; - return push_union(tab, isl_tab_undo_callback, u); -} - -struct isl_tab *isl_tab_init_samples(struct isl_tab *tab) -{ - if (!tab) - return NULL; - - tab->n_sample = 0; - tab->n_outside = 0; - tab->samples = isl_mat_alloc(tab->mat->ctx, 1, 1 + tab->n_var); - if (!tab->samples) - goto error; - tab->sample_index = isl_alloc_array(tab->mat->ctx, int, 1); - if (!tab->sample_index) - goto error; - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -struct isl_tab *isl_tab_add_sample(struct isl_tab *tab, - __isl_take isl_vec *sample) -{ - if (!tab || !sample) - goto error; - - if (tab->n_sample + 1 > tab->samples->n_row) { - int *t = isl_realloc_array(tab->mat->ctx, - tab->sample_index, int, tab->n_sample + 1); - if (!t) - goto error; - tab->sample_index = t; - } - - tab->samples = isl_mat_extend(tab->samples, - tab->n_sample + 1, tab->samples->n_col); - if (!tab->samples) - goto error; - - isl_seq_cpy(tab->samples->row[tab->n_sample], sample->el, sample->size); - isl_vec_free(sample); - tab->sample_index[tab->n_sample] = tab->n_sample; - tab->n_sample++; - - return tab; -error: - isl_vec_free(sample); - isl_tab_free(tab); - return NULL; -} - -struct isl_tab *isl_tab_drop_sample(struct isl_tab *tab, int s) -{ - if (s != tab->n_outside) { - int t = tab->sample_index[tab->n_outside]; - tab->sample_index[tab->n_outside] = tab->sample_index[s]; - tab->sample_index[s] = t; - isl_mat_swap_rows(tab->samples, tab->n_outside, s); - } - tab->n_outside++; - if (isl_tab_push(tab, isl_tab_undo_drop_sample) < 0) { - isl_tab_free(tab); - return NULL; - } - - return tab; -} - -/* Record the current number of samples so that we can remove newer - * samples during a rollback. - */ -int isl_tab_save_samples(struct isl_tab *tab) -{ - union isl_tab_undo_val u; - - if (!tab) - return -1; - - u.n = tab->n_sample; - return push_union(tab, isl_tab_undo_saved_samples, u); -} - -/* Mark row with index "row" as being redundant. - * If we may need to undo the operation or if the row represents - * a variable of the original problem, the row is kept, - * but no longer considered when looking for a pivot row. - * Otherwise, the row is simply removed. - * - * The row may be interchanged with some other row. If it - * is interchanged with a later row, return 1. Otherwise return 0. - * If the rows are checked in order in the calling function, - * then a return value of 1 means that the row with the given - * row number may now contain a different row that hasn't been checked yet. - */ -int isl_tab_mark_redundant(struct isl_tab *tab, int row) -{ - struct isl_tab_var *var = isl_tab_var_from_row(tab, row); - var->is_redundant = 1; - isl_assert(tab->mat->ctx, row >= tab->n_redundant, return -1); - if (tab->need_undo || tab->row_var[row] >= 0) { - if (tab->row_var[row] >= 0 && !var->is_nonneg) { - var->is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, var) < 0) - return -1; - } - if (row != tab->n_redundant) - swap_rows(tab, row, tab->n_redundant); - tab->n_redundant++; - return isl_tab_push_var(tab, isl_tab_undo_redundant, var); - } else { - if (row != tab->n_row - 1) - swap_rows(tab, row, tab->n_row - 1); - isl_tab_var_from_row(tab, tab->n_row - 1)->index = -1; - tab->n_row--; - return 1; - } -} - -int isl_tab_mark_empty(struct isl_tab *tab) -{ - if (!tab) - return -1; - if (!tab->empty && tab->need_undo) - if (isl_tab_push(tab, isl_tab_undo_empty) < 0) - return -1; - tab->empty = 1; - return 0; -} - -int isl_tab_freeze_constraint(struct isl_tab *tab, int con) -{ - struct isl_tab_var *var; - - if (!tab) - return -1; - - var = &tab->con[con]; - if (var->frozen) - return 0; - if (var->index < 0) - return 0; - var->frozen = 1; - - if (tab->need_undo) - return isl_tab_push_var(tab, isl_tab_undo_freeze, var); - - return 0; -} - -/* Update the rows signs after a pivot of "row" and "col", with "row_sgn" - * the original sign of the pivot element. - * We only keep track of row signs during PILP solving and in this case - * we only pivot a row with negative sign (meaning the value is always - * non-positive) using a positive pivot element. - * - * For each row j, the new value of the parametric constant is equal to - * - * a_j0 - a_jc a_r0/a_rc - * - * where a_j0 is the original parametric constant, a_rc is the pivot element, - * a_r0 is the parametric constant of the pivot row and a_jc is the - * pivot column entry of the row j. - * Since a_r0 is non-positive and a_rc is positive, the sign of row j - * remains the same if a_jc has the same sign as the row j or if - * a_jc is zero. In all other cases, we reset the sign to "unknown". - */ -static void update_row_sign(struct isl_tab *tab, int row, int col, int row_sgn) -{ - int i; - struct isl_mat *mat = tab->mat; - unsigned off = 2 + tab->M; - - if (!tab->row_sign) - return; - - if (tab->row_sign[row] == 0) - return; - isl_assert(mat->ctx, row_sgn > 0, return); - isl_assert(mat->ctx, tab->row_sign[row] == isl_tab_row_neg, return); - tab->row_sign[row] = isl_tab_row_pos; - for (i = 0; i < tab->n_row; ++i) { - int s; - if (i == row) - continue; - s = isl_int_sgn(mat->row[i][off + col]); - if (!s) - continue; - if (!tab->row_sign[i]) - continue; - if (s < 0 && tab->row_sign[i] == isl_tab_row_neg) - continue; - if (s > 0 && tab->row_sign[i] == isl_tab_row_pos) - continue; - tab->row_sign[i] = isl_tab_row_unknown; - } -} - -/* Given a row number "row" and a column number "col", pivot the tableau - * such that the associated variables are interchanged. - * The given row in the tableau expresses - * - * x_r = a_r0 + \sum_i a_ri x_i - * - * or - * - * x_c = 1/a_rc x_r - a_r0/a_rc + sum_{i \ne r} -a_ri/a_rc - * - * Substituting this equality into the other rows - * - * x_j = a_j0 + \sum_i a_ji x_i - * - * with a_jc \ne 0, we obtain - * - * x_j = a_jc/a_rc x_r + a_j0 - a_jc a_r0/a_rc + sum a_ji - a_jc a_ri/a_rc - * - * The tableau - * - * n_rc/d_r n_ri/d_r - * n_jc/d_j n_ji/d_j - * - * where i is any other column and j is any other row, - * is therefore transformed into - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * s(n_rc)d_r n_jc/(|n_rc| d_j) (n_ji |n_rc| - s(n_rc)n_jc n_ri)/(|n_rc| d_j) - * - * The transformation is performed along the following steps - * - * d_r/n_rc n_ri/n_rc - * n_jc/d_j n_ji/d_j - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/d_j n_ji/d_j - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/(|n_rc| d_j) n_ji/(|n_rc| d_j) - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/(|n_rc| d_j) (n_ji |n_rc|)/(|n_rc| d_j) - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/(|n_rc| d_j) (n_ji |n_rc| - s(n_rc)n_jc n_ri)/(|n_rc| d_j) - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * s(n_rc)d_r n_jc/(|n_rc| d_j) (n_ji |n_rc| - s(n_rc)n_jc n_ri)/(|n_rc| d_j) - * - */ -int isl_tab_pivot(struct isl_tab *tab, int row, int col) -{ - int i, j; - int sgn; - int t; - struct isl_mat *mat = tab->mat; - struct isl_tab_var *var; - unsigned off = 2 + tab->M; - - if (tab->mat->ctx->abort) { - isl_ctx_set_error(tab->mat->ctx, isl_error_abort); - return -1; - } - - isl_int_swap(mat->row[row][0], mat->row[row][off + col]); - sgn = isl_int_sgn(mat->row[row][0]); - if (sgn < 0) { - isl_int_neg(mat->row[row][0], mat->row[row][0]); - isl_int_neg(mat->row[row][off + col], mat->row[row][off + col]); - } else - for (j = 0; j < off - 1 + tab->n_col; ++j) { - if (j == off - 1 + col) - continue; - isl_int_neg(mat->row[row][1 + j], mat->row[row][1 + j]); - } - if (!isl_int_is_one(mat->row[row][0])) - isl_seq_normalize(mat->ctx, mat->row[row], off + tab->n_col); - for (i = 0; i < tab->n_row; ++i) { - if (i == row) - continue; - if (isl_int_is_zero(mat->row[i][off + col])) - continue; - isl_int_mul(mat->row[i][0], mat->row[i][0], mat->row[row][0]); - for (j = 0; j < off - 1 + tab->n_col; ++j) { - if (j == off - 1 + col) - continue; - isl_int_mul(mat->row[i][1 + j], - mat->row[i][1 + j], mat->row[row][0]); - isl_int_addmul(mat->row[i][1 + j], - mat->row[i][off + col], mat->row[row][1 + j]); - } - isl_int_mul(mat->row[i][off + col], - mat->row[i][off + col], mat->row[row][off + col]); - if (!isl_int_is_one(mat->row[i][0])) - isl_seq_normalize(mat->ctx, mat->row[i], off + tab->n_col); - } - t = tab->row_var[row]; - tab->row_var[row] = tab->col_var[col]; - tab->col_var[col] = t; - var = isl_tab_var_from_row(tab, row); - var->is_row = 1; - var->index = row; - var = var_from_col(tab, col); - var->is_row = 0; - var->index = col; - update_row_sign(tab, row, col, sgn); - if (tab->in_undo) - return 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - if (isl_int_is_zero(mat->row[i][off + col])) - continue; - if (!isl_tab_var_from_row(tab, i)->frozen && - isl_tab_row_is_redundant(tab, i)) { - int redo = isl_tab_mark_redundant(tab, i); - if (redo < 0) - return -1; - if (redo) - --i; - } - } - return 0; -} - -/* If "var" represents a column variable, then pivot is up (sgn > 0) - * or down (sgn < 0) to a row. The variable is assumed not to be - * unbounded in the specified direction. - * If sgn = 0, then the variable is unbounded in both directions, - * and we pivot with any row we can find. - */ -static int to_row(struct isl_tab *tab, struct isl_tab_var *var, int sign) WARN_UNUSED; -static int to_row(struct isl_tab *tab, struct isl_tab_var *var, int sign) -{ - int r; - unsigned off = 2 + tab->M; - - if (var->is_row) - return 0; - - if (sign == 0) { - for (r = tab->n_redundant; r < tab->n_row; ++r) - if (!isl_int_is_zero(tab->mat->row[r][off+var->index])) - break; - isl_assert(tab->mat->ctx, r < tab->n_row, return -1); - } else { - r = pivot_row(tab, NULL, sign, var->index); - isl_assert(tab->mat->ctx, r >= 0, return -1); - } - - return isl_tab_pivot(tab, r, var->index); -} - -/* Check whether all variables that are marked as non-negative - * also have a non-negative sample value. This function is not - * called from the current code but is useful during debugging. - */ -static void check_table(struct isl_tab *tab) __attribute__ ((unused)); -static void check_table(struct isl_tab *tab) -{ - int i; - - if (tab->empty) - return; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var; - var = isl_tab_var_from_row(tab, i); - if (!var->is_nonneg) - continue; - if (tab->M) { - isl_assert(tab->mat->ctx, - !isl_int_is_neg(tab->mat->row[i][2]), abort()); - if (isl_int_is_pos(tab->mat->row[i][2])) - continue; - } - isl_assert(tab->mat->ctx, !isl_int_is_neg(tab->mat->row[i][1]), - abort()); - } -} - -/* Return the sign of the maximal value of "var". - * If the sign is not negative, then on return from this function, - * the sample value will also be non-negative. - * - * If "var" is manifestly unbounded wrt positive values, we are done. - * Otherwise, we pivot the variable up to a row if needed - * Then we continue pivoting down until either - * - no more down pivots can be performed - * - the sample value is positive - * - the variable is pivoted into a manifestly unbounded column - */ -static int sign_of_max(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - - if (max_is_manifestly_unbounded(tab, var)) - return 1; - if (to_row(tab, var, 1) < 0) - return -2; - while (!isl_int_is_pos(tab->mat->row[var->index][1])) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - return isl_int_sgn(tab->mat->row[var->index][1]); - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (!var->is_row) /* manifestly unbounded */ - return 1; - } - return 1; -} - -int isl_tab_sign_of_max(struct isl_tab *tab, int con) -{ - struct isl_tab_var *var; - - if (!tab) - return -2; - - var = &tab->con[con]; - isl_assert(tab->mat->ctx, !var->is_redundant, return -2); - isl_assert(tab->mat->ctx, !var->is_zero, return -2); - - return sign_of_max(tab, var); -} - -static int row_is_neg(struct isl_tab *tab, int row) -{ - if (!tab->M) - return isl_int_is_neg(tab->mat->row[row][1]); - if (isl_int_is_pos(tab->mat->row[row][2])) - return 0; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 1; - return isl_int_is_neg(tab->mat->row[row][1]); -} - -static int row_sgn(struct isl_tab *tab, int row) -{ - if (!tab->M) - return isl_int_sgn(tab->mat->row[row][1]); - if (!isl_int_is_zero(tab->mat->row[row][2])) - return isl_int_sgn(tab->mat->row[row][2]); - else - return isl_int_sgn(tab->mat->row[row][1]); -} - -/* Perform pivots until the row variable "var" has a non-negative - * sample value or until no more upward pivots can be performed. - * Return the sign of the sample value after the pivots have been - * performed. - */ -static int restore_row(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - - while (row_is_neg(tab, var->index)) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - break; - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (!var->is_row) /* manifestly unbounded */ - return 1; - } - return row_sgn(tab, var->index); -} - -/* Perform pivots until we are sure that the row variable "var" - * can attain non-negative values. After return from this - * function, "var" is still a row variable, but its sample - * value may not be non-negative, even if the function returns 1. - */ -static int at_least_zero(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - - while (isl_int_is_neg(tab->mat->row[var->index][1])) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - break; - if (row == var->index) /* manifestly unbounded */ - return 1; - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } - return !isl_int_is_neg(tab->mat->row[var->index][1]); -} - -/* Return a negative value if "var" can attain negative values. - * Return a non-negative value otherwise. - * - * If "var" is manifestly unbounded wrt negative values, we are done. - * Otherwise, if var is in a column, we can pivot it down to a row. - * Then we continue pivoting down until either - * - the pivot would result in a manifestly unbounded column - * => we don't perform the pivot, but simply return -1 - * - no more down pivots can be performed - * - the sample value is negative - * If the sample value becomes negative and the variable is supposed - * to be nonnegative, then we undo the last pivot. - * However, if the last pivot has made the pivoting variable - * obviously redundant, then it may have moved to another row. - * In that case we look for upward pivots until we reach a non-negative - * value again. - */ -static int sign_of_min(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - struct isl_tab_var *pivot_var = NULL; - - if (min_is_manifestly_unbounded(tab, var)) - return -1; - if (!var->is_row) { - col = var->index; - row = pivot_row(tab, NULL, -1, col); - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (var->is_redundant) - return 0; - if (isl_int_is_neg(tab->mat->row[var->index][1])) { - if (var->is_nonneg) { - if (!pivot_var->is_redundant && - pivot_var->index == row) { - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - } else - if (restore_row(tab, var) < -1) - return -2; - } - return -1; - } - } - if (var->is_redundant) - return 0; - while (!isl_int_is_neg(tab->mat->row[var->index][1])) { - find_pivot(tab, var, var, -1, &row, &col); - if (row == var->index) - return -1; - if (row == -1) - return isl_int_sgn(tab->mat->row[var->index][1]); - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (var->is_redundant) - return 0; - } - if (pivot_var && var->is_nonneg) { - /* pivot back to non-negative value */ - if (!pivot_var->is_redundant && pivot_var->index == row) { - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - } else - if (restore_row(tab, var) < -1) - return -2; - } - return -1; -} - -static int row_at_most_neg_one(struct isl_tab *tab, int row) -{ - if (tab->M) { - if (isl_int_is_pos(tab->mat->row[row][2])) - return 0; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 1; - } - return isl_int_is_neg(tab->mat->row[row][1]) && - isl_int_abs_ge(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -/* Return 1 if "var" can attain values <= -1. - * Return 0 otherwise. - * - * The sample value of "var" is assumed to be non-negative when the - * the function is called. If 1 is returned then the constraint - * is not redundant and the sample value is made non-negative again before - * the function returns. - */ -int isl_tab_min_at_most_neg_one(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - struct isl_tab_var *pivot_var; - - if (min_is_manifestly_unbounded(tab, var)) - return 1; - if (!var->is_row) { - col = var->index; - row = pivot_row(tab, NULL, -1, col); - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (var->is_redundant) - return 0; - if (row_at_most_neg_one(tab, var->index)) { - if (var->is_nonneg) { - if (!pivot_var->is_redundant && - pivot_var->index == row) { - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } else - if (restore_row(tab, var) < -1) - return -1; - } - return 1; - } - } - if (var->is_redundant) - return 0; - do { - find_pivot(tab, var, var, -1, &row, &col); - if (row == var->index) { - if (restore_row(tab, var) < -1) - return -1; - return 1; - } - if (row == -1) - return 0; - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (var->is_redundant) - return 0; - } while (!row_at_most_neg_one(tab, var->index)); - if (var->is_nonneg) { - /* pivot back to non-negative value */ - if (!pivot_var->is_redundant && pivot_var->index == row) - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (restore_row(tab, var) < -1) - return -1; - } - return 1; -} - -/* Return 1 if "var" can attain values >= 1. - * Return 0 otherwise. - */ -static int at_least_one(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - isl_int *r; - - if (max_is_manifestly_unbounded(tab, var)) - return 1; - if (to_row(tab, var, 1) < 0) - return -1; - r = tab->mat->row[var->index]; - while (isl_int_lt(r[1], r[0])) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - return isl_int_ge(r[1], r[0]); - if (row == var->index) /* manifestly unbounded */ - return 1; - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } - return 1; -} - -static void swap_cols(struct isl_tab *tab, int col1, int col2) -{ - int t; - unsigned off = 2 + tab->M; - t = tab->col_var[col1]; - tab->col_var[col1] = tab->col_var[col2]; - tab->col_var[col2] = t; - var_from_col(tab, col1)->index = col1; - var_from_col(tab, col2)->index = col2; - tab->mat = isl_mat_swap_cols(tab->mat, off + col1, off + col2); -} - -/* Mark column with index "col" as representing a zero variable. - * If we may need to undo the operation the column is kept, - * but no longer considered. - * Otherwise, the column is simply removed. - * - * The column may be interchanged with some other column. If it - * is interchanged with a later column, return 1. Otherwise return 0. - * If the columns are checked in order in the calling function, - * then a return value of 1 means that the column with the given - * column number may now contain a different column that - * hasn't been checked yet. - */ -int isl_tab_kill_col(struct isl_tab *tab, int col) -{ - var_from_col(tab, col)->is_zero = 1; - if (tab->need_undo) { - if (isl_tab_push_var(tab, isl_tab_undo_zero, - var_from_col(tab, col)) < 0) - return -1; - if (col != tab->n_dead) - swap_cols(tab, col, tab->n_dead); - tab->n_dead++; - return 0; - } else { - if (col != tab->n_col - 1) - swap_cols(tab, col, tab->n_col - 1); - var_from_col(tab, tab->n_col - 1)->index = -1; - tab->n_col--; - return 1; - } -} - -static int row_is_manifestly_non_integral(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - - if (tab->M && !isl_int_eq(tab->mat->row[row][2], - tab->mat->row[row][0])) - return 0; - if (isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) != -1) - return 0; - - return !isl_int_is_divisible_by(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -/* For integer tableaus, check if any of the coordinates are stuck - * at a non-integral value. - */ -static int tab_is_manifestly_empty(struct isl_tab *tab) -{ - int i; - - if (tab->empty) - return 1; - if (tab->rational) - return 0; - - for (i = 0; i < tab->n_var; ++i) { - if (!tab->var[i].is_row) - continue; - if (row_is_manifestly_non_integral(tab, tab->var[i].index)) - return 1; - } - - return 0; -} - -/* Row variable "var" is non-negative and cannot attain any values - * larger than zero. This means that the coefficients of the unrestricted - * column variables are zero and that the coefficients of the non-negative - * column variables are zero or negative. - * Each of the non-negative variables with a negative coefficient can - * then also be written as the negative sum of non-negative variables - * and must therefore also be zero. - */ -static int close_row(struct isl_tab *tab, struct isl_tab_var *var) WARN_UNUSED; -static int close_row(struct isl_tab *tab, struct isl_tab_var *var) -{ - int j; - struct isl_mat *mat = tab->mat; - unsigned off = 2 + tab->M; - - isl_assert(tab->mat->ctx, var->is_nonneg, return -1); - var->is_zero = 1; - if (tab->need_undo) - if (isl_tab_push_var(tab, isl_tab_undo_zero, var) < 0) - return -1; - for (j = tab->n_dead; j < tab->n_col; ++j) { - int recheck; - if (isl_int_is_zero(mat->row[var->index][off + j])) - continue; - isl_assert(tab->mat->ctx, - isl_int_is_neg(mat->row[var->index][off + j]), return -1); - recheck = isl_tab_kill_col(tab, j); - if (recheck < 0) - return -1; - if (recheck) - --j; - } - if (isl_tab_mark_redundant(tab, var->index) < 0) - return -1; - if (tab_is_manifestly_empty(tab) && isl_tab_mark_empty(tab) < 0) - return -1; - return 0; -} - -/* Add a constraint to the tableau and allocate a row for it. - * Return the index into the constraint array "con". - */ -int isl_tab_allocate_con(struct isl_tab *tab) -{ - int r; - - isl_assert(tab->mat->ctx, tab->n_row < tab->mat->n_row, return -1); - isl_assert(tab->mat->ctx, tab->n_con < tab->max_con, return -1); - - r = tab->n_con; - tab->con[r].index = tab->n_row; - tab->con[r].is_row = 1; - tab->con[r].is_nonneg = 0; - tab->con[r].is_zero = 0; - tab->con[r].is_redundant = 0; - tab->con[r].frozen = 0; - tab->con[r].negated = 0; - tab->row_var[tab->n_row] = ~r; - - tab->n_row++; - tab->n_con++; - if (isl_tab_push_var(tab, isl_tab_undo_allocate, &tab->con[r]) < 0) - return -1; - - return r; -} - -/* Add a variable to the tableau and allocate a column for it. - * Return the index into the variable array "var". - */ -int isl_tab_allocate_var(struct isl_tab *tab) -{ - int r; - int i; - unsigned off = 2 + tab->M; - - isl_assert(tab->mat->ctx, tab->n_col < tab->mat->n_col, return -1); - isl_assert(tab->mat->ctx, tab->n_var < tab->max_var, return -1); - - r = tab->n_var; - tab->var[r].index = tab->n_col; - tab->var[r].is_row = 0; - tab->var[r].is_nonneg = 0; - tab->var[r].is_zero = 0; - tab->var[r].is_redundant = 0; - tab->var[r].frozen = 0; - tab->var[r].negated = 0; - tab->col_var[tab->n_col] = r; - - for (i = 0; i < tab->n_row; ++i) - isl_int_set_si(tab->mat->row[i][off + tab->n_col], 0); - - tab->n_var++; - tab->n_col++; - if (isl_tab_push_var(tab, isl_tab_undo_allocate, &tab->var[r]) < 0) - return -1; - - return r; -} - -/* Add a row to the tableau. The row is given as an affine combination - * of the original variables and needs to be expressed in terms of the - * column variables. - * - * We add each term in turn. - * If r = n/d_r is the current sum and we need to add k x, then - * if x is a column variable, we increase the numerator of - * this column by k d_r - * if x = f/d_x is a row variable, then the new representation of r is - * - * n k f d_x/g n + d_r/g k f m/d_r n + m/d_g k f - * --- + --- = ------------------- = ------------------- - * d_r d_r d_r d_x/g m - * - * with g the gcd of d_r and d_x and m the lcm of d_r and d_x. - * - * If tab->M is set, then, internally, each variable x is represented - * as x' - M. We then also need no subtract k d_r from the coefficient of M. - */ -int isl_tab_add_row(struct isl_tab *tab, isl_int *line) -{ - int i; - int r; - isl_int *row; - isl_int a, b; - unsigned off = 2 + tab->M; - - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - isl_int_init(a); - isl_int_init(b); - row = tab->mat->row[tab->con[r].index]; - isl_int_set_si(row[0], 1); - isl_int_set(row[1], line[0]); - isl_seq_clr(row + 2, tab->M + tab->n_col); - for (i = 0; i < tab->n_var; ++i) { - if (tab->var[i].is_zero) - continue; - if (tab->var[i].is_row) { - isl_int_lcm(a, - row[0], tab->mat->row[tab->var[i].index][0]); - isl_int_swap(a, row[0]); - isl_int_divexact(a, row[0], a); - isl_int_divexact(b, - row[0], tab->mat->row[tab->var[i].index][0]); - isl_int_mul(b, b, line[1 + i]); - isl_seq_combine(row + 1, a, row + 1, - b, tab->mat->row[tab->var[i].index] + 1, - 1 + tab->M + tab->n_col); - } else - isl_int_addmul(row[off + tab->var[i].index], - line[1 + i], row[0]); - if (tab->M && i >= tab->n_param && i < tab->n_var - tab->n_div) - isl_int_submul(row[2], line[1 + i], row[0]); - } - isl_seq_normalize(tab->mat->ctx, row, off + tab->n_col); - isl_int_clear(a); - isl_int_clear(b); - - if (tab->row_sign) - tab->row_sign[tab->con[r].index] = isl_tab_row_unknown; - - return r; -} - -static int drop_row(struct isl_tab *tab, int row) -{ - isl_assert(tab->mat->ctx, ~tab->row_var[row] == tab->n_con - 1, return -1); - if (row != tab->n_row - 1) - swap_rows(tab, row, tab->n_row - 1); - tab->n_row--; - tab->n_con--; - return 0; -} - -static int drop_col(struct isl_tab *tab, int col) -{ - isl_assert(tab->mat->ctx, tab->col_var[col] == tab->n_var - 1, return -1); - if (col != tab->n_col - 1) - swap_cols(tab, col, tab->n_col - 1); - tab->n_col--; - tab->n_var--; - return 0; -} - -/* Add inequality "ineq" and check if it conflicts with the - * previously added constraints or if it is obviously redundant. - */ -int isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq) -{ - int r; - int sgn; - isl_int cst; - - if (!tab) - return -1; - if (tab->bmap) { - struct isl_basic_map *bmap = tab->bmap; - - isl_assert(tab->mat->ctx, tab->n_eq == bmap->n_eq, return -1); - isl_assert(tab->mat->ctx, - tab->n_con == bmap->n_eq + bmap->n_ineq, return -1); - tab->bmap = isl_basic_map_add_ineq(tab->bmap, ineq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - if (!tab->bmap) - return -1; - } - if (tab->cone) { - isl_int_init(cst); - isl_int_swap(ineq[0], cst); - } - r = isl_tab_add_row(tab, ineq); - if (tab->cone) { - isl_int_swap(ineq[0], cst); - isl_int_clear(cst); - } - if (r < 0) - return -1; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - if (isl_tab_row_is_redundant(tab, tab->con[r].index)) { - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - return -1; - return 0; - } - - sgn = restore_row(tab, &tab->con[r]); - if (sgn < -1) - return -1; - if (sgn < 0) - return isl_tab_mark_empty(tab); - if (tab->con[r].is_row && isl_tab_row_is_redundant(tab, tab->con[r].index)) - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - return -1; - return 0; -} - -/* Pivot a non-negative variable down until it reaches the value zero - * and then pivot the variable into a column position. - */ -static int to_col(struct isl_tab *tab, struct isl_tab_var *var) WARN_UNUSED; -static int to_col(struct isl_tab *tab, struct isl_tab_var *var) -{ - int i; - int row, col; - unsigned off = 2 + tab->M; - - if (!var->is_row) - return 0; - - while (isl_int_is_pos(tab->mat->row[var->index][1])) { - find_pivot(tab, var, NULL, -1, &row, &col); - isl_assert(tab->mat->ctx, row != -1, return -1); - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (!var->is_row) - return 0; - } - - for (i = tab->n_dead; i < tab->n_col; ++i) - if (!isl_int_is_zero(tab->mat->row[var->index][off + i])) - break; - - isl_assert(tab->mat->ctx, i < tab->n_col, return -1); - if (isl_tab_pivot(tab, var->index, i) < 0) - return -1; - - return 0; -} - -/* We assume Gaussian elimination has been performed on the equalities. - * The equalities can therefore never conflict. - * Adding the equalities is currently only really useful for a later call - * to isl_tab_ineq_type. - */ -static struct isl_tab *add_eq(struct isl_tab *tab, isl_int *eq) -{ - int i; - int r; - - if (!tab) - return NULL; - r = isl_tab_add_row(tab, eq); - if (r < 0) - goto error; - - r = tab->con[r].index; - i = isl_seq_first_non_zero(tab->mat->row[r] + 2 + tab->M + tab->n_dead, - tab->n_col - tab->n_dead); - isl_assert(tab->mat->ctx, i >= 0, goto error); - i += tab->n_dead; - if (isl_tab_pivot(tab, r, i) < 0) - goto error; - if (isl_tab_kill_col(tab, i) < 0) - goto error; - tab->n_eq++; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -static int row_is_manifestly_zero(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - - if (!isl_int_is_zero(tab->mat->row[row][1])) - return 0; - if (tab->M && !isl_int_is_zero(tab->mat->row[row][2])) - return 0; - return isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) == -1; -} - -/* Add an equality that is known to be valid for the given tableau. - */ -int isl_tab_add_valid_eq(struct isl_tab *tab, isl_int *eq) -{ - struct isl_tab_var *var; - int r; - - if (!tab) - return -1; - r = isl_tab_add_row(tab, eq); - if (r < 0) - return -1; - - var = &tab->con[r]; - r = var->index; - if (row_is_manifestly_zero(tab, r)) { - var->is_zero = 1; - if (isl_tab_mark_redundant(tab, r) < 0) - return -1; - return 0; - } - - if (isl_int_is_neg(tab->mat->row[r][1])) { - isl_seq_neg(tab->mat->row[r] + 1, tab->mat->row[r] + 1, - 1 + tab->n_col); - var->negated = 1; - } - var->is_nonneg = 1; - if (to_col(tab, var) < 0) - return -1; - var->is_nonneg = 0; - if (isl_tab_kill_col(tab, var->index) < 0) - return -1; - - return 0; -} - -static int add_zero_row(struct isl_tab *tab) -{ - int r; - isl_int *row; - - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - row = tab->mat->row[tab->con[r].index]; - isl_seq_clr(row + 1, 1 + tab->M + tab->n_col); - isl_int_set_si(row[0], 1); - - return r; -} - -/* Add equality "eq" and check if it conflicts with the - * previously added constraints or if it is obviously redundant. - */ -int isl_tab_add_eq(struct isl_tab *tab, isl_int *eq) -{ - struct isl_tab_undo *snap = NULL; - struct isl_tab_var *var; - int r; - int row; - int sgn; - isl_int cst; - - if (!tab) - return -1; - isl_assert(tab->mat->ctx, !tab->M, return -1); - - if (tab->need_undo) - snap = isl_tab_snap(tab); - - if (tab->cone) { - isl_int_init(cst); - isl_int_swap(eq[0], cst); - } - r = isl_tab_add_row(tab, eq); - if (tab->cone) { - isl_int_swap(eq[0], cst); - isl_int_clear(cst); - } - if (r < 0) - return -1; - - var = &tab->con[r]; - row = var->index; - if (row_is_manifestly_zero(tab, row)) { - if (snap) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - } else - drop_row(tab, row); - return 0; - } - - if (tab->bmap) { - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - isl_seq_neg(eq, eq, 1 + tab->n_var); - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - isl_seq_neg(eq, eq, 1 + tab->n_var); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - if (!tab->bmap) - return -1; - if (add_zero_row(tab) < 0) - return -1; - } - - sgn = isl_int_sgn(tab->mat->row[row][1]); - - if (sgn > 0) { - isl_seq_neg(tab->mat->row[row] + 1, tab->mat->row[row] + 1, - 1 + tab->n_col); - var->negated = 1; - sgn = -1; - } - - if (sgn < 0) { - sgn = sign_of_max(tab, var); - if (sgn < -1) - return -1; - if (sgn < 0) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - } - - var->is_nonneg = 1; - if (to_col(tab, var) < 0) - return -1; - var->is_nonneg = 0; - if (isl_tab_kill_col(tab, var->index) < 0) - return -1; - - return 0; -} - -/* Construct and return an inequality that expresses an upper bound - * on the given div. - * In particular, if the div is given by - * - * d = floor(e/m) - * - * then the inequality expresses - * - * m d <= e - */ -static struct isl_vec *ineq_for_div(struct isl_basic_map *bmap, unsigned div) -{ - unsigned total; - unsigned div_pos; - struct isl_vec *ineq; - - if (!bmap) - return NULL; - - total = isl_basic_map_total_dim(bmap); - div_pos = 1 + total - bmap->n_div + div; - - ineq = isl_vec_alloc(bmap->ctx, 1 + total); - if (!ineq) - return NULL; - - isl_seq_cpy(ineq->el, bmap->div[div] + 1, 1 + total); - isl_int_neg(ineq->el[div_pos], bmap->div[div][0]); - return ineq; -} - -/* For a div d = floor(f/m), add the constraints - * - * f - m d >= 0 - * -(f-(m-1)) + m d >= 0 - * - * Note that the second constraint is the negation of - * - * f - m d >= m - * - * If add_ineq is not NULL, then this function is used - * instead of isl_tab_add_ineq to effectively add the inequalities. - */ -static int add_div_constraints(struct isl_tab *tab, unsigned div, - int (*add_ineq)(void *user, isl_int *), void *user) -{ - unsigned total; - unsigned div_pos; - struct isl_vec *ineq; - - total = isl_basic_map_total_dim(tab->bmap); - div_pos = 1 + total - tab->bmap->n_div + div; - - ineq = ineq_for_div(tab->bmap, div); - if (!ineq) - goto error; - - if (add_ineq) { - if (add_ineq(user, ineq->el) < 0) - goto error; - } else { - if (isl_tab_add_ineq(tab, ineq->el) < 0) - goto error; - } - - isl_seq_neg(ineq->el, tab->bmap->div[div] + 1, 1 + total); - isl_int_set(ineq->el[div_pos], tab->bmap->div[div][0]); - isl_int_add(ineq->el[0], ineq->el[0], ineq->el[div_pos]); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - if (add_ineq) { - if (add_ineq(user, ineq->el) < 0) - goto error; - } else { - if (isl_tab_add_ineq(tab, ineq->el) < 0) - goto error; - } - - isl_vec_free(ineq); - - return 0; -error: - isl_vec_free(ineq); - return -1; -} - -/* Check whether the div described by "div" is obviously non-negative. - * If we are using a big parameter, then we will encode the div - * as div' = M + div, which is always non-negative. - * Otherwise, we check whether div is a non-negative affine combination - * of non-negative variables. - */ -static int div_is_nonneg(struct isl_tab *tab, __isl_keep isl_vec *div) -{ - int i; - - if (tab->M) - return 1; - - if (isl_int_is_neg(div->el[1])) - return 0; - - for (i = 0; i < tab->n_var; ++i) { - if (isl_int_is_neg(div->el[2 + i])) - return 0; - if (isl_int_is_zero(div->el[2 + i])) - continue; - if (!tab->var[i].is_nonneg) - return 0; - } - - return 1; -} - -/* Add an extra div, prescribed by "div" to the tableau and - * the associated bmap (which is assumed to be non-NULL). - * - * If add_ineq is not NULL, then this function is used instead - * of isl_tab_add_ineq to add the div constraints. - * This complication is needed because the code in isl_tab_pip - * wants to perform some extra processing when an inequality - * is added to the tableau. - */ -int isl_tab_add_div(struct isl_tab *tab, __isl_keep isl_vec *div, - int (*add_ineq)(void *user, isl_int *), void *user) -{ - int r; - int k; - int nonneg; - - if (!tab || !div) - return -1; - - isl_assert(tab->mat->ctx, tab->bmap, return -1); - - nonneg = div_is_nonneg(tab, div); - - if (isl_tab_extend_cons(tab, 3) < 0) - return -1; - if (isl_tab_extend_vars(tab, 1) < 0) - return -1; - r = isl_tab_allocate_var(tab); - if (r < 0) - return -1; - - if (nonneg) - tab->var[r].is_nonneg = 1; - - tab->bmap = isl_basic_map_extend_dim(tab->bmap, - isl_basic_map_get_dim(tab->bmap), 1, 0, 2); - k = isl_basic_map_alloc_div(tab->bmap); - if (k < 0) - return -1; - isl_seq_cpy(tab->bmap->div[k], div->el, div->size); - if (isl_tab_push(tab, isl_tab_undo_bmap_div) < 0) - return -1; - - if (add_div_constraints(tab, k, add_ineq, user) < 0) - return -1; - - return r; -} - -struct isl_tab *isl_tab_from_basic_map(struct isl_basic_map *bmap) -{ - int i; - struct isl_tab *tab; - - if (!bmap) - return NULL; - tab = isl_tab_alloc(bmap->ctx, - isl_basic_map_total_dim(bmap) + bmap->n_ineq + 1, - isl_basic_map_total_dim(bmap), 0); - if (!tab) - return NULL; - tab->rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - for (i = 0; i < bmap->n_eq; ++i) { - tab = add_eq(tab, bmap->eq[i]); - if (!tab) - return tab; - } - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_tab_add_ineq(tab, bmap->ineq[i]) < 0) - goto error; - if (tab->empty) - return tab; - } - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -struct isl_tab *isl_tab_from_basic_set(struct isl_basic_set *bset) -{ - return isl_tab_from_basic_map((struct isl_basic_map *)bset); -} - -/* Construct a tableau corresponding to the recession cone of "bset". - */ -struct isl_tab *isl_tab_from_recession_cone(__isl_keep isl_basic_set *bset, - int parametric) -{ - isl_int cst; - int i; - struct isl_tab *tab; - unsigned offset = 0; - - if (!bset) - return NULL; - if (parametric) - offset = isl_basic_set_dim(bset, isl_dim_param); - tab = isl_tab_alloc(bset->ctx, bset->n_eq + bset->n_ineq, - isl_basic_set_total_dim(bset) - offset, 0); - if (!tab) - return NULL; - tab->rational = ISL_F_ISSET(bset, ISL_BASIC_SET_RATIONAL); - tab->cone = 1; - - isl_int_init(cst); - for (i = 0; i < bset->n_eq; ++i) { - isl_int_swap(bset->eq[i][offset], cst); - if (offset > 0) { - if (isl_tab_add_eq(tab, bset->eq[i] + offset) < 0) - goto error; - } else - tab = add_eq(tab, bset->eq[i]); - isl_int_swap(bset->eq[i][offset], cst); - if (!tab) - goto done; - } - for (i = 0; i < bset->n_ineq; ++i) { - int r; - isl_int_swap(bset->ineq[i][offset], cst); - r = isl_tab_add_row(tab, bset->ineq[i] + offset); - isl_int_swap(bset->ineq[i][offset], cst); - if (r < 0) - goto error; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - } -done: - isl_int_clear(cst); - return tab; -error: - isl_int_clear(cst); - isl_tab_free(tab); - return NULL; -} - -/* Assuming "tab" is the tableau of a cone, check if the cone is - * bounded, i.e., if it is empty or only contains the origin. - */ -int isl_tab_cone_is_bounded(struct isl_tab *tab) -{ - int i; - - if (!tab) - return -1; - if (tab->empty) - return 1; - if (tab->n_dead == tab->n_col) - return 1; - - for (;;) { - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var; - int sgn; - var = isl_tab_var_from_row(tab, i); - if (!var->is_nonneg) - continue; - sgn = sign_of_max(tab, var); - if (sgn < -1) - return -1; - if (sgn != 0) - return 0; - if (close_row(tab, var) < 0) - return -1; - break; - } - if (tab->n_dead == tab->n_col) - return 1; - if (i == tab->n_row) - return 0; - } -} - -int isl_tab_sample_is_integer(struct isl_tab *tab) -{ - int i; - - if (!tab) - return -1; - - for (i = 0; i < tab->n_var; ++i) { - int row; - if (!tab->var[i].is_row) - continue; - row = tab->var[i].index; - if (!isl_int_is_divisible_by(tab->mat->row[row][1], - tab->mat->row[row][0])) - return 0; - } - return 1; -} - -static struct isl_vec *extract_integer_sample(struct isl_tab *tab) -{ - int i; - struct isl_vec *vec; - - vec = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!vec) - return NULL; - - isl_int_set_si(vec->block.data[0], 1); - for (i = 0; i < tab->n_var; ++i) { - if (!tab->var[i].is_row) - isl_int_set_si(vec->block.data[1 + i], 0); - else { - int row = tab->var[i].index; - isl_int_divexact(vec->block.data[1 + i], - tab->mat->row[row][1], tab->mat->row[row][0]); - } - } - - return vec; -} - -struct isl_vec *isl_tab_get_sample_value(struct isl_tab *tab) -{ - int i; - struct isl_vec *vec; - isl_int m; - - if (!tab) - return NULL; - - vec = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!vec) - return NULL; - - isl_int_init(m); - - isl_int_set_si(vec->block.data[0], 1); - for (i = 0; i < tab->n_var; ++i) { - int row; - if (!tab->var[i].is_row) { - isl_int_set_si(vec->block.data[1 + i], 0); - continue; - } - row = tab->var[i].index; - isl_int_gcd(m, vec->block.data[0], tab->mat->row[row][0]); - isl_int_divexact(m, tab->mat->row[row][0], m); - isl_seq_scale(vec->block.data, vec->block.data, m, 1 + i); - isl_int_divexact(m, vec->block.data[0], tab->mat->row[row][0]); - isl_int_mul(vec->block.data[1 + i], m, tab->mat->row[row][1]); - } - vec = isl_vec_normalize(vec); - - isl_int_clear(m); - return vec; -} - -/* Update "bmap" based on the results of the tableau "tab". - * In particular, implicit equalities are made explicit, redundant constraints - * are removed and if the sample value happens to be integer, it is stored - * in "bmap" (unless "bmap" already had an integer sample). - * - * The tableau is assumed to have been created from "bmap" using - * isl_tab_from_basic_map. - */ -struct isl_basic_map *isl_basic_map_update_from_tab(struct isl_basic_map *bmap, - struct isl_tab *tab) -{ - int i; - unsigned n_eq; - - if (!bmap) - return NULL; - if (!tab) - return bmap; - - n_eq = tab->n_eq; - if (tab->empty) - bmap = isl_basic_map_set_to_empty(bmap); - else - for (i = bmap->n_ineq - 1; i >= 0; --i) { - if (isl_tab_is_equality(tab, n_eq + i)) - isl_basic_map_inequality_to_equality(bmap, i); - else if (isl_tab_is_redundant(tab, n_eq + i)) - isl_basic_map_drop_inequality(bmap, i); - } - if (bmap->n_eq != n_eq) - isl_basic_map_gauss(bmap, NULL); - if (!tab->rational && - !bmap->sample && isl_tab_sample_is_integer(tab)) - bmap->sample = extract_integer_sample(tab); - return bmap; -} - -struct isl_basic_set *isl_basic_set_update_from_tab(struct isl_basic_set *bset, - struct isl_tab *tab) -{ - return (struct isl_basic_set *)isl_basic_map_update_from_tab( - (struct isl_basic_map *)bset, tab); -} - -/* Given a non-negative variable "var", add a new non-negative variable - * that is the opposite of "var", ensuring that var can only attain the - * value zero. - * If var = n/d is a row variable, then the new variable = -n/d. - * If var is a column variables, then the new variable = -var. - * If the new variable cannot attain non-negative values, then - * the resulting tableau is empty. - * Otherwise, we know the value will be zero and we close the row. - */ -static int cut_to_hyperplane(struct isl_tab *tab, struct isl_tab_var *var) -{ - unsigned r; - isl_int *row; - int sgn; - unsigned off = 2 + tab->M; - - if (var->is_zero) - return 0; - isl_assert(tab->mat->ctx, !var->is_redundant, return -1); - isl_assert(tab->mat->ctx, var->is_nonneg, return -1); - - if (isl_tab_extend_cons(tab, 1) < 0) - return -1; - - r = tab->n_con; - tab->con[r].index = tab->n_row; - tab->con[r].is_row = 1; - tab->con[r].is_nonneg = 0; - tab->con[r].is_zero = 0; - tab->con[r].is_redundant = 0; - tab->con[r].frozen = 0; - tab->con[r].negated = 0; - tab->row_var[tab->n_row] = ~r; - row = tab->mat->row[tab->n_row]; - - if (var->is_row) { - isl_int_set(row[0], tab->mat->row[var->index][0]); - isl_seq_neg(row + 1, - tab->mat->row[var->index] + 1, 1 + tab->n_col); - } else { - isl_int_set_si(row[0], 1); - isl_seq_clr(row + 1, 1 + tab->n_col); - isl_int_set_si(row[off + var->index], -1); - } - - tab->n_row++; - tab->n_con++; - if (isl_tab_push_var(tab, isl_tab_undo_allocate, &tab->con[r]) < 0) - return -1; - - sgn = sign_of_max(tab, &tab->con[r]); - if (sgn < -1) - return -1; - if (sgn < 0) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - /* sgn == 0 */ - if (close_row(tab, &tab->con[r]) < 0) - return -1; - - return 0; -} - -/* Given a tableau "tab" and an inequality constraint "con" of the tableau, - * relax the inequality by one. That is, the inequality r >= 0 is replaced - * by r' = r + 1 >= 0. - * If r is a row variable, we simply increase the constant term by one - * (taking into account the denominator). - * If r is a column variable, then we need to modify each row that - * refers to r = r' - 1 by substituting this equality, effectively - * subtracting the coefficient of the column from the constant. - * We should only do this if the minimum is manifestly unbounded, - * however. Otherwise, we may end up with negative sample values - * for non-negative variables. - * So, if r is a column variable with a minimum that is not - * manifestly unbounded, then we need to move it to a row. - * However, the sample value of this row may be negative, - * even after the relaxation, so we need to restore it. - * We therefore prefer to pivot a column up to a row, if possible. - */ -struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) -{ - struct isl_tab_var *var; - unsigned off = 2 + tab->M; - - if (!tab) - return NULL; - - var = &tab->con[con]; - - if (!var->is_row && !max_is_manifestly_unbounded(tab, var)) - if (to_row(tab, var, 1) < 0) - goto error; - if (!var->is_row && !min_is_manifestly_unbounded(tab, var)) - if (to_row(tab, var, -1) < 0) - goto error; - - if (var->is_row) { - isl_int_add(tab->mat->row[var->index][1], - tab->mat->row[var->index][1], tab->mat->row[var->index][0]); - if (restore_row(tab, var) < 0) - goto error; - } else { - int i; - - for (i = 0; i < tab->n_row; ++i) { - if (isl_int_is_zero(tab->mat->row[i][off + var->index])) - continue; - isl_int_sub(tab->mat->row[i][1], tab->mat->row[i][1], - tab->mat->row[i][off + var->index]); - } - - } - - if (isl_tab_push_var(tab, isl_tab_undo_relax, var) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -int isl_tab_select_facet(struct isl_tab *tab, int con) -{ - if (!tab) - return -1; - - return cut_to_hyperplane(tab, &tab->con[con]); -} - -static int may_be_equality(struct isl_tab *tab, int row) -{ - return tab->rational ? isl_int_is_zero(tab->mat->row[row][1]) - : isl_int_lt(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -/* Check for (near) equalities among the constraints. - * A constraint is an equality if it is non-negative and if - * its maximal value is either - * - zero (in case of rational tableaus), or - * - strictly less than 1 (in case of integer tableaus) - * - * We first mark all non-redundant and non-dead variables that - * are not frozen and not obviously not an equality. - * Then we iterate over all marked variables if they can attain - * any values larger than zero or at least one. - * If the maximal value is zero, we mark any column variables - * that appear in the row as being zero and mark the row as being redundant. - * Otherwise, if the maximal value is strictly less than one (and the - * tableau is integer), then we restrict the value to being zero - * by adding an opposite non-negative variable. - */ -int isl_tab_detect_implicit_equalities(struct isl_tab *tab) -{ - int i; - unsigned n_marked; - - if (!tab) - return -1; - if (tab->empty) - return 0; - if (tab->n_dead == tab->n_col) - return 0; - - n_marked = 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var = isl_tab_var_from_row(tab, i); - var->marked = !var->frozen && var->is_nonneg && - may_be_equality(tab, i); - if (var->marked) - n_marked++; - } - for (i = tab->n_dead; i < tab->n_col; ++i) { - struct isl_tab_var *var = var_from_col(tab, i); - var->marked = !var->frozen && var->is_nonneg; - if (var->marked) - n_marked++; - } - while (n_marked) { - struct isl_tab_var *var; - int sgn; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - var = isl_tab_var_from_row(tab, i); - if (var->marked) - break; - } - if (i == tab->n_row) { - for (i = tab->n_dead; i < tab->n_col; ++i) { - var = var_from_col(tab, i); - if (var->marked) - break; - } - if (i == tab->n_col) - break; - } - var->marked = 0; - n_marked--; - sgn = sign_of_max(tab, var); - if (sgn < 0) - return -1; - if (sgn == 0) { - if (close_row(tab, var) < 0) - return -1; - } else if (!tab->rational && !at_least_one(tab, var)) { - if (cut_to_hyperplane(tab, var) < 0) - return -1; - return isl_tab_detect_implicit_equalities(tab); - } - for (i = tab->n_redundant; i < tab->n_row; ++i) { - var = isl_tab_var_from_row(tab, i); - if (!var->marked) - continue; - if (may_be_equality(tab, i)) - continue; - var->marked = 0; - n_marked--; - } - } - - return 0; -} - -static int con_is_redundant(struct isl_tab *tab, struct isl_tab_var *var) -{ - if (!tab) - return -1; - if (tab->rational) { - int sgn = sign_of_min(tab, var); - if (sgn < -1) - return -1; - return sgn >= 0; - } else { - int irred = isl_tab_min_at_most_neg_one(tab, var); - if (irred < 0) - return -1; - return !irred; - } -} - -/* Check for (near) redundant constraints. - * A constraint is redundant if it is non-negative and if - * its minimal value (temporarily ignoring the non-negativity) is either - * - zero (in case of rational tableaus), or - * - strictly larger than -1 (in case of integer tableaus) - * - * We first mark all non-redundant and non-dead variables that - * are not frozen and not obviously negatively unbounded. - * Then we iterate over all marked variables if they can attain - * any values smaller than zero or at most negative one. - * If not, we mark the row as being redundant (assuming it hasn't - * been detected as being obviously redundant in the mean time). - */ -int isl_tab_detect_redundant(struct isl_tab *tab) -{ - int i; - unsigned n_marked; - - if (!tab) - return -1; - if (tab->empty) - return 0; - if (tab->n_redundant == tab->n_row) - return 0; - - n_marked = 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var = isl_tab_var_from_row(tab, i); - var->marked = !var->frozen && var->is_nonneg; - if (var->marked) - n_marked++; - } - for (i = tab->n_dead; i < tab->n_col; ++i) { - struct isl_tab_var *var = var_from_col(tab, i); - var->marked = !var->frozen && var->is_nonneg && - !min_is_manifestly_unbounded(tab, var); - if (var->marked) - n_marked++; - } - while (n_marked) { - struct isl_tab_var *var; - int red; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - var = isl_tab_var_from_row(tab, i); - if (var->marked) - break; - } - if (i == tab->n_row) { - for (i = tab->n_dead; i < tab->n_col; ++i) { - var = var_from_col(tab, i); - if (var->marked) - break; - } - if (i == tab->n_col) - break; - } - var->marked = 0; - n_marked--; - red = con_is_redundant(tab, var); - if (red < 0) - return -1; - if (red && !var->is_redundant) - if (isl_tab_mark_redundant(tab, var->index) < 0) - return -1; - for (i = tab->n_dead; i < tab->n_col; ++i) { - var = var_from_col(tab, i); - if (!var->marked) - continue; - if (!min_is_manifestly_unbounded(tab, var)) - continue; - var->marked = 0; - n_marked--; - } - } - - return 0; -} - -int isl_tab_is_equality(struct isl_tab *tab, int con) -{ - int row; - unsigned off; - - if (!tab) - return -1; - if (tab->con[con].is_zero) - return 1; - if (tab->con[con].is_redundant) - return 0; - if (!tab->con[con].is_row) - return tab->con[con].index < tab->n_dead; - - row = tab->con[con].index; - - off = 2 + tab->M; - return isl_int_is_zero(tab->mat->row[row][1]) && - (!tab->M || isl_int_is_zero(tab->mat->row[row][2])) && - isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) == -1; -} - -/* Return the minimal value of the affine expression "f" with denominator - * "denom" in *opt, *opt_denom, assuming the tableau is not empty and - * the expression cannot attain arbitrarily small values. - * If opt_denom is NULL, then *opt is rounded up to the nearest integer. - * The return value reflects the nature of the result (empty, unbounded, - * minimal value returned in *opt). - */ -enum isl_lp_result isl_tab_min(struct isl_tab *tab, - isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, - unsigned flags) -{ - int r; - enum isl_lp_result res = isl_lp_ok; - struct isl_tab_var *var; - struct isl_tab_undo *snap; - - if (!tab) - return isl_lp_error; - - if (tab->empty) - return isl_lp_empty; - - snap = isl_tab_snap(tab); - r = isl_tab_add_row(tab, f); - if (r < 0) - return isl_lp_error; - var = &tab->con[r]; - for (;;) { - int row, col; - find_pivot(tab, var, var, -1, &row, &col); - if (row == var->index) { - res = isl_lp_unbounded; - break; - } - if (row == -1) - break; - if (isl_tab_pivot(tab, row, col) < 0) - return isl_lp_error; - } - isl_int_mul(tab->mat->row[var->index][0], - tab->mat->row[var->index][0], denom); - if (ISL_FL_ISSET(flags, ISL_TAB_SAVE_DUAL)) { - int i; - - isl_vec_free(tab->dual); - tab->dual = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_con); - if (!tab->dual) - return isl_lp_error; - isl_int_set(tab->dual->el[0], tab->mat->row[var->index][0]); - for (i = 0; i < tab->n_con; ++i) { - int pos; - if (tab->con[i].is_row) { - isl_int_set_si(tab->dual->el[1 + i], 0); - continue; - } - pos = 2 + tab->M + tab->con[i].index; - if (tab->con[i].negated) - isl_int_neg(tab->dual->el[1 + i], - tab->mat->row[var->index][pos]); - else - isl_int_set(tab->dual->el[1 + i], - tab->mat->row[var->index][pos]); - } - } - if (opt && res == isl_lp_ok) { - if (opt_denom) { - isl_int_set(*opt, tab->mat->row[var->index][1]); - isl_int_set(*opt_denom, tab->mat->row[var->index][0]); - } else - isl_int_cdiv_q(*opt, tab->mat->row[var->index][1], - tab->mat->row[var->index][0]); - } - if (isl_tab_rollback(tab, snap) < 0) - return isl_lp_error; - return res; -} - -int isl_tab_is_redundant(struct isl_tab *tab, int con) -{ - if (!tab) - return -1; - if (tab->con[con].is_zero) - return 0; - if (tab->con[con].is_redundant) - return 1; - return tab->con[con].is_row && tab->con[con].index < tab->n_redundant; -} - -/* Take a snapshot of the tableau that can be restored by s call to - * isl_tab_rollback. - */ -struct isl_tab_undo *isl_tab_snap(struct isl_tab *tab) -{ - if (!tab) - return NULL; - tab->need_undo = 1; - return tab->top; -} - -/* Undo the operation performed by isl_tab_relax. - */ -static int unrelax(struct isl_tab *tab, struct isl_tab_var *var) WARN_UNUSED; -static int unrelax(struct isl_tab *tab, struct isl_tab_var *var) -{ - unsigned off = 2 + tab->M; - - if (!var->is_row && !max_is_manifestly_unbounded(tab, var)) - if (to_row(tab, var, 1) < 0) - return -1; - - if (var->is_row) { - isl_int_sub(tab->mat->row[var->index][1], - tab->mat->row[var->index][1], tab->mat->row[var->index][0]); - if (var->is_nonneg) { - int sgn = restore_row(tab, var); - isl_assert(tab->mat->ctx, sgn >= 0, return -1); - } - } else { - int i; - - for (i = 0; i < tab->n_row; ++i) { - if (isl_int_is_zero(tab->mat->row[i][off + var->index])) - continue; - isl_int_add(tab->mat->row[i][1], tab->mat->row[i][1], - tab->mat->row[i][off + var->index]); - } - - } - - return 0; -} - -static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) WARN_UNUSED; -static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) -{ - struct isl_tab_var *var = var_from_index(tab, undo->u.var_index); - switch (undo->type) { - case isl_tab_undo_nonneg: - var->is_nonneg = 0; - break; - case isl_tab_undo_redundant: - var->is_redundant = 0; - tab->n_redundant--; - restore_row(tab, isl_tab_var_from_row(tab, tab->n_redundant)); - break; - case isl_tab_undo_freeze: - var->frozen = 0; - break; - case isl_tab_undo_zero: - var->is_zero = 0; - if (!var->is_row) - tab->n_dead--; - break; - case isl_tab_undo_allocate: - if (undo->u.var_index >= 0) { - isl_assert(tab->mat->ctx, !var->is_row, return -1); - drop_col(tab, var->index); - break; - } - if (!var->is_row) { - if (!max_is_manifestly_unbounded(tab, var)) { - if (to_row(tab, var, 1) < 0) - return -1; - } else if (!min_is_manifestly_unbounded(tab, var)) { - if (to_row(tab, var, -1) < 0) - return -1; - } else - if (to_row(tab, var, 0) < 0) - return -1; - } - drop_row(tab, var->index); - break; - case isl_tab_undo_relax: - return unrelax(tab, var); - default: - isl_die(tab->mat->ctx, isl_error_internal, - "perform_undo_var called on invalid undo record", - return -1); - } - - return 0; -} - -/* Restore the tableau to the state where the basic variables - * are those in "col_var". - * We first construct a list of variables that are currently in - * the basis, but shouldn't. Then we iterate over all variables - * that should be in the basis and for each one that is currently - * not in the basis, we exchange it with one of the elements of the - * list constructed before. - * We can always find an appropriate variable to pivot with because - * the current basis is mapped to the old basis by a non-singular - * matrix and so we can never end up with a zero row. - */ -static int restore_basis(struct isl_tab *tab, int *col_var) -{ - int i, j; - int n_extra = 0; - int *extra = NULL; /* current columns that contain bad stuff */ - unsigned off = 2 + tab->M; - - extra = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!extra) - goto error; - for (i = 0; i < tab->n_col; ++i) { - for (j = 0; j < tab->n_col; ++j) - if (tab->col_var[i] == col_var[j]) - break; - if (j < tab->n_col) - continue; - extra[n_extra++] = i; - } - for (i = 0; i < tab->n_col && n_extra > 0; ++i) { - struct isl_tab_var *var; - int row; - - for (j = 0; j < tab->n_col; ++j) - if (col_var[i] == tab->col_var[j]) - break; - if (j < tab->n_col) - continue; - var = var_from_index(tab, col_var[i]); - row = var->index; - for (j = 0; j < n_extra; ++j) - if (!isl_int_is_zero(tab->mat->row[row][off+extra[j]])) - break; - isl_assert(tab->mat->ctx, j < n_extra, goto error); - if (isl_tab_pivot(tab, row, extra[j]) < 0) - goto error; - extra[j] = extra[--n_extra]; - } - - free(extra); - return 0; -error: - free(extra); - return -1; -} - -/* Remove all samples with index n or greater, i.e., those samples - * that were added since we saved this number of samples in - * isl_tab_save_samples. - */ -static void drop_samples_since(struct isl_tab *tab, int n) -{ - int i; - - for (i = tab->n_sample - 1; i >= 0 && tab->n_sample > n; --i) { - if (tab->sample_index[i] < n) - continue; - - if (i != tab->n_sample - 1) { - int t = tab->sample_index[tab->n_sample-1]; - tab->sample_index[tab->n_sample-1] = tab->sample_index[i]; - tab->sample_index[i] = t; - isl_mat_swap_rows(tab->samples, tab->n_sample-1, i); - } - tab->n_sample--; - } -} - -static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) WARN_UNUSED; -static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) -{ - switch (undo->type) { - case isl_tab_undo_empty: - tab->empty = 0; - break; - case isl_tab_undo_nonneg: - case isl_tab_undo_redundant: - case isl_tab_undo_freeze: - case isl_tab_undo_zero: - case isl_tab_undo_allocate: - case isl_tab_undo_relax: - return perform_undo_var(tab, undo); - case isl_tab_undo_bmap_eq: - return isl_basic_map_free_equality(tab->bmap, 1); - case isl_tab_undo_bmap_ineq: - return isl_basic_map_free_inequality(tab->bmap, 1); - case isl_tab_undo_bmap_div: - if (isl_basic_map_free_div(tab->bmap, 1) < 0) - return -1; - if (tab->samples) - tab->samples->n_col--; - break; - case isl_tab_undo_saved_basis: - if (restore_basis(tab, undo->u.col_var) < 0) - return -1; - break; - case isl_tab_undo_drop_sample: - tab->n_outside--; - break; - case isl_tab_undo_saved_samples: - drop_samples_since(tab, undo->u.n); - break; - case isl_tab_undo_callback: - return undo->u.callback->run(undo->u.callback); - default: - isl_assert(tab->mat->ctx, 0, return -1); - } - return 0; -} - -/* Return the tableau to the state it was in when the snapshot "snap" - * was taken. - */ -int isl_tab_rollback(struct isl_tab *tab, struct isl_tab_undo *snap) -{ - struct isl_tab_undo *undo, *next; - - if (!tab) - return -1; - - tab->in_undo = 1; - for (undo = tab->top; undo && undo != &tab->bottom; undo = next) { - next = undo->next; - if (undo == snap) - break; - if (perform_undo(tab, undo) < 0) { - tab->top = undo; - free_undo(tab); - tab->in_undo = 0; - return -1; - } - free_undo_record(undo); - } - tab->in_undo = 0; - tab->top = undo; - if (!undo) - return -1; - return 0; -} - -/* The given row "row" represents an inequality violated by all - * points in the tableau. Check for some special cases of such - * separating constraints. - * In particular, if the row has been reduced to the constant -1, - * then we know the inequality is adjacent (but opposite) to - * an equality in the tableau. - * If the row has been reduced to r = c*(-1 -r'), with r' an inequality - * of the tableau and c a positive constant, then the inequality - * is adjacent (but opposite) to the inequality r'. - */ -static enum isl_ineq_type separation_type(struct isl_tab *tab, unsigned row) -{ - int pos; - unsigned off = 2 + tab->M; - - if (tab->rational) - return isl_ineq_separate; - - if (!isl_int_is_one(tab->mat->row[row][0])) - return isl_ineq_separate; - - pos = isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead); - if (pos == -1) { - if (isl_int_is_negone(tab->mat->row[row][1])) - return isl_ineq_adj_eq; - else - return isl_ineq_separate; - } - - if (!isl_int_eq(tab->mat->row[row][1], - tab->mat->row[row][off + tab->n_dead + pos])) - return isl_ineq_separate; - - pos = isl_seq_first_non_zero( - tab->mat->row[row] + off + tab->n_dead + pos + 1, - tab->n_col - tab->n_dead - pos - 1); - - return pos == -1 ? isl_ineq_adj_ineq : isl_ineq_separate; -} - -/* Check the effect of inequality "ineq" on the tableau "tab". - * The result may be - * isl_ineq_redundant: satisfied by all points in the tableau - * isl_ineq_separate: satisfied by no point in the tableau - * isl_ineq_cut: satisfied by some by not all points - * isl_ineq_adj_eq: adjacent to an equality - * isl_ineq_adj_ineq: adjacent to an inequality. - */ -enum isl_ineq_type isl_tab_ineq_type(struct isl_tab *tab, isl_int *ineq) -{ - enum isl_ineq_type type = isl_ineq_error; - struct isl_tab_undo *snap = NULL; - int con; - int row; - - if (!tab) - return isl_ineq_error; - - if (isl_tab_extend_cons(tab, 1) < 0) - return isl_ineq_error; - - snap = isl_tab_snap(tab); - - con = isl_tab_add_row(tab, ineq); - if (con < 0) - goto error; - - row = tab->con[con].index; - if (isl_tab_row_is_redundant(tab, row)) - type = isl_ineq_redundant; - else if (isl_int_is_neg(tab->mat->row[row][1]) && - (tab->rational || - isl_int_abs_ge(tab->mat->row[row][1], - tab->mat->row[row][0]))) { - int nonneg = at_least_zero(tab, &tab->con[con]); - if (nonneg < 0) - goto error; - if (nonneg) - type = isl_ineq_cut; - else - type = separation_type(tab, row); - } else { - int red = con_is_redundant(tab, &tab->con[con]); - if (red < 0) - goto error; - if (!red) - type = isl_ineq_cut; - else - type = isl_ineq_redundant; - } - - if (isl_tab_rollback(tab, snap)) - return isl_ineq_error; - return type; -error: - return isl_ineq_error; -} - -int isl_tab_track_bmap(struct isl_tab *tab, __isl_take isl_basic_map *bmap) -{ - if (!tab || !bmap) - goto error; - - isl_assert(tab->mat->ctx, tab->n_eq == bmap->n_eq, return -1); - isl_assert(tab->mat->ctx, - tab->n_con == bmap->n_eq + bmap->n_ineq, return -1); - - tab->bmap = bmap; - - return 0; -error: - isl_basic_map_free(bmap); - return -1; -} - -int isl_tab_track_bset(struct isl_tab *tab, __isl_take isl_basic_set *bset) -{ - return isl_tab_track_bmap(tab, (isl_basic_map *)bset); -} - -__isl_keep isl_basic_set *isl_tab_peek_bset(struct isl_tab *tab) -{ - if (!tab) - return NULL; - - return (isl_basic_set *)tab->bmap; -} - -static void isl_tab_print_internal(__isl_keep struct isl_tab *tab, - FILE *out, int indent) -{ - unsigned r, c; - int i; - - if (!tab) { - fprintf(out, "%*snull tab\n", indent, ""); - return; - } - fprintf(out, "%*sn_redundant: %d, n_dead: %d", indent, "", - tab->n_redundant, tab->n_dead); - if (tab->rational) - fprintf(out, ", rational"); - if (tab->empty) - fprintf(out, ", empty"); - fprintf(out, "\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_var; ++i) { - if (i) - fprintf(out, (i == tab->n_param || - i == tab->n_var - tab->n_div) ? "; " - : ", "); - fprintf(out, "%c%d%s", tab->var[i].is_row ? 'r' : 'c', - tab->var[i].index, - tab->var[i].is_zero ? " [=0]" : - tab->var[i].is_redundant ? " [R]" : ""); - } - fprintf(out, "]\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_con; ++i) { - if (i) - fprintf(out, ", "); - fprintf(out, "%c%d%s", tab->con[i].is_row ? 'r' : 'c', - tab->con[i].index, - tab->con[i].is_zero ? " [=0]" : - tab->con[i].is_redundant ? " [R]" : ""); - } - fprintf(out, "]\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_row; ++i) { - const char *sign = ""; - if (i) - fprintf(out, ", "); - if (tab->row_sign) { - if (tab->row_sign[i] == isl_tab_row_unknown) - sign = "?"; - else if (tab->row_sign[i] == isl_tab_row_neg) - sign = "-"; - else if (tab->row_sign[i] == isl_tab_row_pos) - sign = "+"; - else - sign = "+-"; - } - fprintf(out, "r%d: %d%s%s", i, tab->row_var[i], - isl_tab_var_from_row(tab, i)->is_nonneg ? " [>=0]" : "", sign); - } - fprintf(out, "]\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_col; ++i) { - if (i) - fprintf(out, ", "); - fprintf(out, "c%d: %d%s", i, tab->col_var[i], - var_from_col(tab, i)->is_nonneg ? " [>=0]" : ""); - } - fprintf(out, "]\n"); - r = tab->mat->n_row; - tab->mat->n_row = tab->n_row; - c = tab->mat->n_col; - tab->mat->n_col = 2 + tab->M + tab->n_col; - isl_mat_print_internal(tab->mat, out, indent); - tab->mat->n_row = r; - tab->mat->n_col = c; - if (tab->bmap) - isl_basic_map_print_internal(tab->bmap, out, indent); -} - -void isl_tab_dump(__isl_keep struct isl_tab *tab) -{ - isl_tab_print_internal(tab, stderr, 0); -} diff --git a/cloog-0.16.3/isl/isl_tab.h b/cloog-0.16.3/isl/isl_tab.h deleted file mode 100644 index 688804400bcbc40b21255f045990bab813ca5c71..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_tab.h +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_TAB_H -#define ISL_TAB_H - -#include -#include -#include -#include - -struct isl_tab_var { - int index; - unsigned is_row : 1; - unsigned is_nonneg : 1; - unsigned is_zero : 1; - unsigned is_redundant : 1; - unsigned marked : 1; - unsigned frozen : 1; - unsigned negated : 1; -}; - -enum isl_tab_undo_type { - isl_tab_undo_bottom, - isl_tab_undo_empty, - isl_tab_undo_nonneg, - isl_tab_undo_redundant, - isl_tab_undo_freeze, - isl_tab_undo_zero, - isl_tab_undo_allocate, - isl_tab_undo_relax, - isl_tab_undo_bmap_ineq, - isl_tab_undo_bmap_eq, - isl_tab_undo_bmap_div, - isl_tab_undo_saved_basis, - isl_tab_undo_drop_sample, - isl_tab_undo_saved_samples, - isl_tab_undo_callback, -}; - -struct isl_tab_callback { - int (*run)(struct isl_tab_callback *cb); -}; - -union isl_tab_undo_val { - int var_index; - int *col_var; - int n; - struct isl_tab_callback *callback; -}; - -struct isl_tab_undo { - enum isl_tab_undo_type type; - union isl_tab_undo_val u; - struct isl_tab_undo *next; -}; - -/* The tableau maintains equality relations. - * Each column and each row is associated to a variable or a constraint. - * The "value" of an inequality constraint is the value of the corresponding - * slack variable. - * The "row_var" and "col_var" arrays map column and row indices - * to indices in the "var" and "con" arrays. The elements of these - * arrays maintain extra information about the variables and the constraints. - * Each row expresses the corresponding row variable as an affine expression - * of the column variables. - * The first two columns in the matrix contain the common denominator of - * the row and the numerator of the constant term. - * If "M" is set, then the third column represents the "big parameter". - * The third (M = 0) or fourth (M = 1) column - * in the matrix is called column 0 with respect to the col_var array. - * The sample value of the tableau is the value that assigns zero - * to all the column variables and the constant term of each affine - * expression to the corresponding row variable. - * The operations on the tableau maintain the property that the sample - * value satisfies the non-negativity constraints (usually on the slack - * variables). - * - * The big parameter represents an arbitrarily big (and divisible) - * positive number. If present, then the sign of a row is determined - * lexicographically, with the sign of the big parameter coefficient - * considered first. The big parameter is only used while - * solving PILP problems. - * - * The first n_dead column variables have their values fixed to zero. - * The corresponding tab_vars are flagged "is_zero". - * Some of the rows that have have zero coefficients in all but - * the dead columns are also flagged "is_zero". - * - * The first n_redundant rows correspond to inequality constraints - * that are always satisfied for any value satisfying the non-redundant - * rows. The corresponding tab_vars are flagged "is_redundant". - * A row variable that is flagged "is_zero" is also flagged "is_redundant" - * since the constraint has been reduced to 0 = 0 and is therefore always - * satisfied. - * - * There are "n_var" variables in total. The first "n_param" of these - * are called parameters and the last "n_div" of these are called divs. - * The basic tableau operations makes no distinction between different - * kinds of variables. These special variables are only used while - * solving PILP problems. - * - * Dead columns and redundant rows are detected on the fly. - * However, the basic operations do not ensure that all dead columns - * or all redundant rows are detected. - * isl_tab_detect_implicit_equalities and isl_tab_detect_redundant can be used - * to perform and exhaustive search for dead columns and redundant rows. - * - * The samples matrix contains "n_sample" integer points that have at some - * point been elements satisfying the tableau. The first "n_outside" - * of them no longer satisfy the tableau. They are kept because they - * can be reinstated during rollback when the constraint that cut them - * out is removed. These samples are only maintained for the context - * tableau while solving PILP problems. - */ -enum isl_tab_row_sign { - isl_tab_row_unknown = 0, - isl_tab_row_pos, - isl_tab_row_neg, - isl_tab_row_any, -}; -struct isl_tab { - struct isl_mat *mat; - - unsigned n_row; - unsigned n_col; - unsigned n_dead; - unsigned n_redundant; - - unsigned n_var; - unsigned n_param; - unsigned n_div; - unsigned max_var; - unsigned n_con; - unsigned n_eq; - unsigned max_con; - struct isl_tab_var *var; - struct isl_tab_var *con; - int *row_var; /* v >= 0 -> var v; v < 0 -> con ~v */ - int *col_var; /* v >= 0 -> var v; v < 0 -> con ~v */ - enum isl_tab_row_sign *row_sign; - - struct isl_tab_undo bottom; - struct isl_tab_undo *top; - - struct isl_vec *dual; - struct isl_basic_map *bmap; - - unsigned n_sample; - unsigned n_outside; - int *sample_index; - struct isl_mat *samples; - - int n_zero; - int n_unbounded; - struct isl_mat *basis; - - int (*conflict)(int con, void *user); - void *conflict_user; - - unsigned strict_redundant : 1; - unsigned need_undo : 1; - unsigned rational : 1; - unsigned empty : 1; - unsigned in_undo : 1; - unsigned M : 1; - unsigned cone : 1; -}; - -struct isl_tab *isl_tab_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_var, unsigned M); -void isl_tab_free(struct isl_tab *tab); - -struct isl_tab *isl_tab_from_basic_map(struct isl_basic_map *bmap); -struct isl_tab *isl_tab_from_basic_set(struct isl_basic_set *bset); -struct isl_tab *isl_tab_from_recession_cone(struct isl_basic_set *bset, - int parametric); -int isl_tab_cone_is_bounded(struct isl_tab *tab); -struct isl_basic_map *isl_basic_map_update_from_tab(struct isl_basic_map *bmap, - struct isl_tab *tab); -struct isl_basic_set *isl_basic_set_update_from_tab(struct isl_basic_set *bset, - struct isl_tab *tab); -int isl_tab_detect_implicit_equalities(struct isl_tab *tab) WARN_UNUSED; -int isl_tab_detect_redundant(struct isl_tab *tab) WARN_UNUSED; -#define ISL_TAB_SAVE_DUAL (1 << 0) -enum isl_lp_result isl_tab_min(struct isl_tab *tab, - isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, - unsigned flags) WARN_UNUSED; - -struct isl_tab *isl_tab_extend(struct isl_tab *tab, unsigned n_new) WARN_UNUSED; -int isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq) WARN_UNUSED; -int isl_tab_add_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED; -int isl_tab_add_valid_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED; - -int isl_tab_freeze_constraint(struct isl_tab *tab, int con) WARN_UNUSED; - -int isl_tab_track_bmap(struct isl_tab *tab, __isl_take isl_basic_map *bmap) WARN_UNUSED; -int isl_tab_track_bset(struct isl_tab *tab, __isl_take isl_basic_set *bset) WARN_UNUSED; -__isl_keep isl_basic_set *isl_tab_peek_bset(struct isl_tab *tab); - -int isl_tab_is_equality(struct isl_tab *tab, int con); -int isl_tab_is_redundant(struct isl_tab *tab, int con); - -int isl_tab_sample_is_integer(struct isl_tab *tab); -struct isl_vec *isl_tab_get_sample_value(struct isl_tab *tab); - -enum isl_ineq_type { - isl_ineq_error = -1, - isl_ineq_redundant, - isl_ineq_separate, - isl_ineq_cut, - isl_ineq_adj_eq, - isl_ineq_adj_ineq, -}; - -enum isl_ineq_type isl_tab_ineq_type(struct isl_tab *tab, isl_int *ineq); - -struct isl_tab_undo *isl_tab_snap(struct isl_tab *tab); -int isl_tab_rollback(struct isl_tab *tab, struct isl_tab_undo *snap) WARN_UNUSED; - -struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) WARN_UNUSED; -int isl_tab_select_facet(struct isl_tab *tab, int con) WARN_UNUSED; - -void isl_tab_dump(__isl_keep struct isl_tab *tab); - -struct isl_map *isl_tab_basic_map_partial_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max); - -/* An isl_region represents a sequence of consecutive variables. - * pos is the location (starting at 0) of the first variable in the sequence. - */ -struct isl_region { - int pos; - int len; -}; - -__isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin( - __isl_take isl_basic_set *bset, int n_op, int n_region, - struct isl_region *region, - int (*conflict)(int con, void *user), void *user); -__isl_give isl_vec *isl_tab_basic_set_non_neg_lexmin( - __isl_take isl_basic_set *bset); - -/* private */ - -struct isl_tab_var *isl_tab_var_from_row(struct isl_tab *tab, int i); -int isl_tab_mark_redundant(struct isl_tab *tab, int row) WARN_UNUSED; -int isl_tab_mark_empty(struct isl_tab *tab) WARN_UNUSED; -struct isl_tab *isl_tab_dup(struct isl_tab *tab); -struct isl_tab *isl_tab_product(struct isl_tab *tab1, struct isl_tab *tab2); -int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new) WARN_UNUSED; -int isl_tab_allocate_con(struct isl_tab *tab) WARN_UNUSED; -int isl_tab_extend_vars(struct isl_tab *tab, unsigned n_new) WARN_UNUSED; -int isl_tab_allocate_var(struct isl_tab *tab) WARN_UNUSED; -int isl_tab_pivot(struct isl_tab *tab, int row, int col) WARN_UNUSED; -int isl_tab_add_row(struct isl_tab *tab, isl_int *line) WARN_UNUSED; -int isl_tab_row_is_redundant(struct isl_tab *tab, int row); -int isl_tab_min_at_most_neg_one(struct isl_tab *tab, struct isl_tab_var *var); -int isl_tab_sign_of_max(struct isl_tab *tab, int con); -int isl_tab_kill_col(struct isl_tab *tab, int col) WARN_UNUSED; - -int isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) WARN_UNUSED; -int isl_tab_push_var(struct isl_tab *tab, - enum isl_tab_undo_type type, struct isl_tab_var *var) WARN_UNUSED; -int isl_tab_push_basis(struct isl_tab *tab) WARN_UNUSED; - -struct isl_tab *isl_tab_init_samples(struct isl_tab *tab) WARN_UNUSED; -struct isl_tab *isl_tab_add_sample(struct isl_tab *tab, - __isl_take isl_vec *sample) WARN_UNUSED; -struct isl_tab *isl_tab_drop_sample(struct isl_tab *tab, int s); -int isl_tab_save_samples(struct isl_tab *tab) WARN_UNUSED; - -struct isl_tab *isl_tab_detect_equalities(struct isl_tab *tab, - struct isl_tab *tab_cone) WARN_UNUSED; - -int isl_tab_push_callback(struct isl_tab *tab, - struct isl_tab_callback *callback) WARN_UNUSED; - -int isl_tab_add_div(struct isl_tab *tab, __isl_keep isl_vec *div, - int (*add_ineq)(void *user, isl_int *), void *user); - -#endif diff --git a/cloog-0.16.3/isl/isl_tab_pip.c b/cloog-0.16.3/isl/isl_tab_pip.c deleted file mode 100644 index 2f39a08f845dc046aa912c74e9b641b79077e69c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_tab_pip.c +++ /dev/null @@ -1,4991 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include "isl_map_private.h" -#include -#include "isl_tab.h" -#include "isl_sample.h" -#include -#include -#include - -/* - * The implementation of parametric integer linear programming in this file - * was inspired by the paper "Parametric Integer Programming" and the - * report "Solving systems of affine (in)equalities" by Paul Feautrier - * (and others). - * - * The strategy used for obtaining a feasible solution is different - * from the one used in isl_tab.c. In particular, in isl_tab.c, - * upon finding a constraint that is not yet satisfied, we pivot - * in a row that increases the constant term of the row holding the - * constraint, making sure the sample solution remains feasible - * for all the constraints it already satisfied. - * Here, we always pivot in the row holding the constraint, - * choosing a column that induces the lexicographically smallest - * increment to the sample solution. - * - * By starting out from a sample value that is lexicographically - * smaller than any integer point in the problem space, the first - * feasible integer sample point we find will also be the lexicographically - * smallest. If all variables can be assumed to be non-negative, - * then the initial sample value may be chosen equal to zero. - * However, we will not make this assumption. Instead, we apply - * the "big parameter" trick. Any variable x is then not directly - * used in the tableau, but instead it is represented by another - * variable x' = M + x, where M is an arbitrarily large (positive) - * value. x' is therefore always non-negative, whatever the value of x. - * Taking as initial sample value x' = 0 corresponds to x = -M, - * which is always smaller than any possible value of x. - * - * The big parameter trick is used in the main tableau and - * also in the context tableau if isl_context_lex is used. - * In this case, each tableaus has its own big parameter. - * Before doing any real work, we check if all the parameters - * happen to be non-negative. If so, we drop the column corresponding - * to M from the initial context tableau. - * If isl_context_gbr is used, then the big parameter trick is only - * used in the main tableau. - */ - -struct isl_context; -struct isl_context_op { - /* detect nonnegative parameters in context and mark them in tab */ - struct isl_tab *(*detect_nonnegative_parameters)( - struct isl_context *context, struct isl_tab *tab); - /* return temporary reference to basic set representation of context */ - struct isl_basic_set *(*peek_basic_set)(struct isl_context *context); - /* return temporary reference to tableau representation of context */ - struct isl_tab *(*peek_tab)(struct isl_context *context); - /* add equality; check is 1 if eq may not be valid; - * update is 1 if we may want to call ineq_sign on context later. - */ - void (*add_eq)(struct isl_context *context, isl_int *eq, - int check, int update); - /* add inequality; check is 1 if ineq may not be valid; - * update is 1 if we may want to call ineq_sign on context later. - */ - void (*add_ineq)(struct isl_context *context, isl_int *ineq, - int check, int update); - /* check sign of ineq based on previous information. - * strict is 1 if saturation should be treated as a positive sign. - */ - enum isl_tab_row_sign (*ineq_sign)(struct isl_context *context, - isl_int *ineq, int strict); - /* check if inequality maintains feasibility */ - int (*test_ineq)(struct isl_context *context, isl_int *ineq); - /* return index of a div that corresponds to "div" */ - int (*get_div)(struct isl_context *context, struct isl_tab *tab, - struct isl_vec *div); - /* add div "div" to context and return non-negativity */ - int (*add_div)(struct isl_context *context, struct isl_vec *div); - int (*detect_equalities)(struct isl_context *context, - struct isl_tab *tab); - /* return row index of "best" split */ - int (*best_split)(struct isl_context *context, struct isl_tab *tab); - /* check if context has already been determined to be empty */ - int (*is_empty)(struct isl_context *context); - /* check if context is still usable */ - int (*is_ok)(struct isl_context *context); - /* save a copy/snapshot of context */ - void *(*save)(struct isl_context *context); - /* restore saved context */ - void (*restore)(struct isl_context *context, void *); - /* invalidate context */ - void (*invalidate)(struct isl_context *context); - /* free context */ - void (*free)(struct isl_context *context); -}; - -struct isl_context { - struct isl_context_op *op; -}; - -struct isl_context_lex { - struct isl_context context; - struct isl_tab *tab; -}; - -struct isl_partial_sol { - int level; - struct isl_basic_set *dom; - struct isl_mat *M; - - struct isl_partial_sol *next; -}; - -struct isl_sol; -struct isl_sol_callback { - struct isl_tab_callback callback; - struct isl_sol *sol; -}; - -/* isl_sol is an interface for constructing a solution to - * a parametric integer linear programming problem. - * Every time the algorithm reaches a state where a solution - * can be read off from the tableau (including cases where the tableau - * is empty), the function "add" is called on the isl_sol passed - * to find_solutions_main. - * - * The context tableau is owned by isl_sol and is updated incrementally. - * - * There are currently two implementations of this interface, - * isl_sol_map, which simply collects the solutions in an isl_map - * and (optionally) the parts of the context where there is no solution - * in an isl_set, and - * isl_sol_for, which calls a user-defined function for each part of - * the solution. - */ -struct isl_sol { - int error; - int rational; - int level; - int max; - int n_out; - struct isl_context *context; - struct isl_partial_sol *partial; - void (*add)(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M); - void (*add_empty)(struct isl_sol *sol, struct isl_basic_set *bset); - void (*free)(struct isl_sol *sol); - struct isl_sol_callback dec_level; -}; - -static void sol_free(struct isl_sol *sol) -{ - struct isl_partial_sol *partial, *next; - if (!sol) - return; - for (partial = sol->partial; partial; partial = next) { - next = partial->next; - isl_basic_set_free(partial->dom); - isl_mat_free(partial->M); - free(partial); - } - sol->free(sol); -} - -/* Push a partial solution represented by a domain and mapping M - * onto the stack of partial solutions. - */ -static void sol_push_sol(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - struct isl_partial_sol *partial; - - if (sol->error || !dom) - goto error; - - partial = isl_alloc_type(dom->ctx, struct isl_partial_sol); - if (!partial) - goto error; - - partial->level = sol->level; - partial->dom = dom; - partial->M = M; - partial->next = sol->partial; - - sol->partial = partial; - - return; -error: - isl_basic_set_free(dom); - sol->error = 1; -} - -/* Pop one partial solution from the partial solution stack and - * pass it on to sol->add or sol->add_empty. - */ -static void sol_pop_one(struct isl_sol *sol) -{ - struct isl_partial_sol *partial; - - partial = sol->partial; - sol->partial = partial->next; - - if (partial->M) - sol->add(sol, partial->dom, partial->M); - else - sol->add_empty(sol, partial->dom); - free(partial); -} - -/* Return a fresh copy of the domain represented by the context tableau. - */ -static struct isl_basic_set *sol_domain(struct isl_sol *sol) -{ - struct isl_basic_set *bset; - - if (sol->error) - return NULL; - - bset = isl_basic_set_dup(sol->context->op->peek_basic_set(sol->context)); - bset = isl_basic_set_update_from_tab(bset, - sol->context->op->peek_tab(sol->context)); - - return bset; -} - -/* Check whether two partial solutions have the same mapping, where n_div - * is the number of divs that the two partial solutions have in common. - */ -static int same_solution(struct isl_partial_sol *s1, struct isl_partial_sol *s2, - unsigned n_div) -{ - int i; - unsigned dim; - - if (!s1->M != !s2->M) - return 0; - if (!s1->M) - return 1; - - dim = isl_basic_set_total_dim(s1->dom) - s1->dom->n_div; - - for (i = 0; i < s1->M->n_row; ++i) { - if (isl_seq_first_non_zero(s1->M->row[i]+1+dim+n_div, - s1->M->n_col-1-dim-n_div) != -1) - return 0; - if (isl_seq_first_non_zero(s2->M->row[i]+1+dim+n_div, - s2->M->n_col-1-dim-n_div) != -1) - return 0; - if (!isl_seq_eq(s1->M->row[i], s2->M->row[i], 1+dim+n_div)) - return 0; - } - return 1; -} - -/* Pop all solutions from the partial solution stack that were pushed onto - * the stack at levels that are deeper than the current level. - * If the two topmost elements on the stack have the same level - * and represent the same solution, then their domains are combined. - * This combined domain is the same as the current context domain - * as sol_pop is called each time we move back to a higher level. - */ -static void sol_pop(struct isl_sol *sol) -{ - struct isl_partial_sol *partial; - unsigned n_div; - - if (sol->error) - return; - - if (sol->level == 0) { - for (partial = sol->partial; partial; partial = sol->partial) - sol_pop_one(sol); - return; - } - - partial = sol->partial; - if (!partial) - return; - - if (partial->level <= sol->level) - return; - - if (partial->next && partial->next->level == partial->level) { - n_div = isl_basic_set_dim( - sol->context->op->peek_basic_set(sol->context), - isl_dim_div); - - if (!same_solution(partial, partial->next, n_div)) { - sol_pop_one(sol); - sol_pop_one(sol); - } else { - struct isl_basic_set *bset; - - bset = sol_domain(sol); - - isl_basic_set_free(partial->next->dom); - partial->next->dom = bset; - partial->next->level = sol->level; - - sol->partial = partial->next; - isl_basic_set_free(partial->dom); - isl_mat_free(partial->M); - free(partial); - } - } else - sol_pop_one(sol); -} - -static void sol_dec_level(struct isl_sol *sol) -{ - if (sol->error) - return; - - sol->level--; - - sol_pop(sol); -} - -static int sol_dec_level_wrap(struct isl_tab_callback *cb) -{ - struct isl_sol_callback *callback = (struct isl_sol_callback *)cb; - - sol_dec_level(callback->sol); - - return callback->sol->error ? -1 : 0; -} - -/* Move down to next level and push callback onto context tableau - * to decrease the level again when it gets rolled back across - * the current state. That is, dec_level will be called with - * the context tableau in the same state as it is when inc_level - * is called. - */ -static void sol_inc_level(struct isl_sol *sol) -{ - struct isl_tab *tab; - - if (sol->error) - return; - - sol->level++; - tab = sol->context->op->peek_tab(sol->context); - if (isl_tab_push_callback(tab, &sol->dec_level.callback) < 0) - sol->error = 1; -} - -static void scale_rows(struct isl_mat *mat, isl_int m, int n_row) -{ - int i; - - if (isl_int_is_one(m)) - return; - - for (i = 0; i < n_row; ++i) - isl_seq_scale(mat->row[i], mat->row[i], m, mat->n_col); -} - -/* Add the solution identified by the tableau and the context tableau. - * - * The layout of the variables is as follows. - * tab->n_var is equal to the total number of variables in the input - * map (including divs that were copied from the context) - * + the number of extra divs constructed - * Of these, the first tab->n_param and the last tab->n_div variables - * correspond to the variables in the context, i.e., - * tab->n_param + tab->n_div = context_tab->n_var - * tab->n_param is equal to the number of parameters and input - * dimensions in the input map - * tab->n_div is equal to the number of divs in the context - * - * If there is no solution, then call add_empty with a basic set - * that corresponds to the context tableau. (If add_empty is NULL, - * then do nothing). - * - * If there is a solution, then first construct a matrix that maps - * all dimensions of the context to the output variables, i.e., - * the output dimensions in the input map. - * The divs in the input map (if any) that do not correspond to any - * div in the context do not appear in the solution. - * The algorithm will make sure that they have an integer value, - * but these values themselves are of no interest. - * We have to be careful not to drop or rearrange any divs in the - * context because that would change the meaning of the matrix. - * - * To extract the value of the output variables, it should be noted - * that we always use a big parameter M in the main tableau and so - * the variable stored in this tableau is not an output variable x itself, but - * x' = M + x (in case of minimization) - * or - * x' = M - x (in case of maximization) - * If x' appears in a column, then its optimal value is zero, - * which means that the optimal value of x is an unbounded number - * (-M for minimization and M for maximization). - * We currently assume that the output dimensions in the original map - * are bounded, so this cannot occur. - * Similarly, when x' appears in a row, then the coefficient of M in that - * row is necessarily 1. - * If the row in the tableau represents - * d x' = c + d M + e(y) - * then, in case of minimization, the corresponding row in the matrix - * will be - * a c + a e(y) - * with a d = m, the (updated) common denominator of the matrix. - * In case of maximization, the row will be - * -a c - a e(y) - */ -static void sol_add(struct isl_sol *sol, struct isl_tab *tab) -{ - struct isl_basic_set *bset = NULL; - struct isl_mat *mat = NULL; - unsigned off; - int row; - isl_int m; - - if (sol->error || !tab) - goto error; - - if (tab->empty && !sol->add_empty) - return; - - bset = sol_domain(sol); - - if (tab->empty) { - sol_push_sol(sol, bset, NULL); - return; - } - - off = 2 + tab->M; - - mat = isl_mat_alloc(tab->mat->ctx, 1 + sol->n_out, - 1 + tab->n_param + tab->n_div); - if (!mat) - goto error; - - isl_int_init(m); - - isl_seq_clr(mat->row[0] + 1, mat->n_col - 1); - isl_int_set_si(mat->row[0][0], 1); - for (row = 0; row < sol->n_out; ++row) { - int i = tab->n_param + row; - int r, j; - - isl_seq_clr(mat->row[1 + row], mat->n_col); - if (!tab->var[i].is_row) { - if (tab->M) - isl_die(mat->ctx, isl_error_invalid, - "unbounded optimum", goto error2); - continue; - } - - r = tab->var[i].index; - if (tab->M && - isl_int_ne(tab->mat->row[r][2], tab->mat->row[r][0])) - isl_die(mat->ctx, isl_error_invalid, - "unbounded optimum", goto error2); - isl_int_gcd(m, mat->row[0][0], tab->mat->row[r][0]); - isl_int_divexact(m, tab->mat->row[r][0], m); - scale_rows(mat, m, 1 + row); - isl_int_divexact(m, mat->row[0][0], tab->mat->row[r][0]); - isl_int_mul(mat->row[1 + row][0], m, tab->mat->row[r][1]); - for (j = 0; j < tab->n_param; ++j) { - int col; - if (tab->var[j].is_row) - continue; - col = tab->var[j].index; - isl_int_mul(mat->row[1 + row][1 + j], m, - tab->mat->row[r][off + col]); - } - for (j = 0; j < tab->n_div; ++j) { - int col; - if (tab->var[tab->n_var - tab->n_div+j].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div+j].index; - isl_int_mul(mat->row[1 + row][1 + tab->n_param + j], m, - tab->mat->row[r][off + col]); - } - if (sol->max) - isl_seq_neg(mat->row[1 + row], mat->row[1 + row], - mat->n_col); - } - - isl_int_clear(m); - - sol_push_sol(sol, bset, mat); - return; -error2: - isl_int_clear(m); -error: - isl_basic_set_free(bset); - isl_mat_free(mat); - sol->error = 1; -} - -struct isl_sol_map { - struct isl_sol sol; - struct isl_map *map; - struct isl_set *empty; -}; - -static void sol_map_free(struct isl_sol_map *sol_map) -{ - if (!sol_map) - return; - if (sol_map->sol.context) - sol_map->sol.context->op->free(sol_map->sol.context); - isl_map_free(sol_map->map); - isl_set_free(sol_map->empty); - free(sol_map); -} - -static void sol_map_free_wrap(struct isl_sol *sol) -{ - sol_map_free((struct isl_sol_map *)sol); -} - -/* This function is called for parts of the context where there is - * no solution, with "bset" corresponding to the context tableau. - * Simply add the basic set to the set "empty". - */ -static void sol_map_add_empty(struct isl_sol_map *sol, - struct isl_basic_set *bset) -{ - if (!bset) - goto error; - isl_assert(bset->ctx, sol->empty, goto error); - - sol->empty = isl_set_grow(sol->empty, 1); - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - sol->empty = isl_set_add_basic_set(sol->empty, isl_basic_set_copy(bset)); - if (!sol->empty) - goto error; - isl_basic_set_free(bset); - return; -error: - isl_basic_set_free(bset); - sol->sol.error = 1; -} - -static void sol_map_add_empty_wrap(struct isl_sol *sol, - struct isl_basic_set *bset) -{ - sol_map_add_empty((struct isl_sol_map *)sol, bset); -} - -/* Add bset to sol's empty, but only if we are actually collecting - * the empty set. - */ -static void sol_map_add_empty_if_needed(struct isl_sol_map *sol, - struct isl_basic_set *bset) -{ - if (sol->empty) - sol_map_add_empty(sol, bset); - else - isl_basic_set_free(bset); -} - -/* Given a basic map "dom" that represents the context and an affine - * matrix "M" that maps the dimensions of the context to the - * output variables, construct a basic map with the same parameters - * and divs as the context, the dimensions of the context as input - * dimensions and a number of output dimensions that is equal to - * the number of output dimensions in the input map. - * - * The constraints and divs of the context are simply copied - * from "dom". For each row - * x = c + e(y) - * an equality - * c + e(y) - d x = 0 - * is added, with d the common denominator of M. - */ -static void sol_map_add(struct isl_sol_map *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - int i; - struct isl_basic_map *bmap = NULL; - unsigned n_eq; - unsigned n_ineq; - unsigned nparam; - unsigned total; - unsigned n_div; - unsigned n_out; - - if (sol->sol.error || !dom || !M) - goto error; - - n_out = sol->sol.n_out; - n_eq = dom->n_eq + n_out; - n_ineq = dom->n_ineq; - n_div = dom->n_div; - nparam = isl_basic_set_total_dim(dom) - n_div; - total = isl_map_dim(sol->map, isl_dim_all); - bmap = isl_basic_map_alloc_dim(isl_map_get_dim(sol->map), - n_div, n_eq, 2 * n_div + n_ineq); - if (!bmap) - goto error; - if (sol->sol.rational) - ISL_F_SET(bmap, ISL_BASIC_MAP_RATIONAL); - for (i = 0; i < dom->n_div; ++i) { - int k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->div[k], dom->div[i], 1 + 1 + nparam); - isl_seq_clr(bmap->div[k] + 1 + 1 + nparam, total - nparam); - isl_seq_cpy(bmap->div[k] + 1 + 1 + total, - dom->div[i] + 1 + 1 + nparam, i); - } - for (i = 0; i < dom->n_eq; ++i) { - int k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], dom->eq[i], 1 + nparam); - isl_seq_clr(bmap->eq[k] + 1 + nparam, total - nparam); - isl_seq_cpy(bmap->eq[k] + 1 + total, - dom->eq[i] + 1 + nparam, n_div); - } - for (i = 0; i < dom->n_ineq; ++i) { - int k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], dom->ineq[i], 1 + nparam); - isl_seq_clr(bmap->ineq[k] + 1 + nparam, total - nparam); - isl_seq_cpy(bmap->ineq[k] + 1 + total, - dom->ineq[i] + 1 + nparam, n_div); - } - for (i = 0; i < M->n_row - 1; ++i) { - int k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], M->row[1 + i], 1 + nparam); - isl_seq_clr(bmap->eq[k] + 1 + nparam, n_out); - isl_int_neg(bmap->eq[k][1 + nparam + i], M->row[0][0]); - isl_seq_cpy(bmap->eq[k] + 1 + nparam + n_out, - M->row[1 + i] + 1 + nparam, n_div); - } - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - sol->map = isl_map_grow(sol->map, 1); - sol->map = isl_map_add_basic_map(sol->map, bmap); - if (!sol->map) - goto error; - isl_basic_set_free(dom); - isl_mat_free(M); - return; -error: - isl_basic_set_free(dom); - isl_mat_free(M); - isl_basic_map_free(bmap); - sol->sol.error = 1; -} - -static void sol_map_add_wrap(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - sol_map_add((struct isl_sol_map *)sol, dom, M); -} - - -/* Store the "parametric constant" of row "row" of tableau "tab" in "line", - * i.e., the constant term and the coefficients of all variables that - * appear in the context tableau. - * Note that the coefficient of the big parameter M is NOT copied. - * The context tableau may not have a big parameter and even when it - * does, it is a different big parameter. - */ -static void get_row_parameter_line(struct isl_tab *tab, int row, isl_int *line) -{ - int i; - unsigned off = 2 + tab->M; - - isl_int_set(line[0], tab->mat->row[row][1]); - for (i = 0; i < tab->n_param; ++i) { - if (tab->var[i].is_row) - isl_int_set_si(line[1 + i], 0); - else { - int col = tab->var[i].index; - isl_int_set(line[1 + i], tab->mat->row[row][off + col]); - } - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - isl_int_set_si(line[1 + tab->n_param + i], 0); - else { - int col = tab->var[tab->n_var - tab->n_div + i].index; - isl_int_set(line[1 + tab->n_param + i], - tab->mat->row[row][off + col]); - } - } -} - -/* Check if rows "row1" and "row2" have identical "parametric constants", - * as explained above. - * In this case, we also insist that the coefficients of the big parameter - * be the same as the values of the constants will only be the same - * if these coefficients are also the same. - */ -static int identical_parameter_line(struct isl_tab *tab, int row1, int row2) -{ - int i; - unsigned off = 2 + tab->M; - - if (isl_int_ne(tab->mat->row[row1][1], tab->mat->row[row2][1])) - return 0; - - if (tab->M && isl_int_ne(tab->mat->row[row1][2], - tab->mat->row[row2][2])) - return 0; - - for (i = 0; i < tab->n_param + tab->n_div; ++i) { - int pos = i < tab->n_param ? i : - tab->n_var - tab->n_div + i - tab->n_param; - int col; - - if (tab->var[pos].is_row) - continue; - col = tab->var[pos].index; - if (isl_int_ne(tab->mat->row[row1][off + col], - tab->mat->row[row2][off + col])) - return 0; - } - return 1; -} - -/* Return an inequality that expresses that the "parametric constant" - * should be non-negative. - * This function is only called when the coefficient of the big parameter - * is equal to zero. - */ -static struct isl_vec *get_row_parameter_ineq(struct isl_tab *tab, int row) -{ - struct isl_vec *ineq; - - ineq = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_param + tab->n_div); - if (!ineq) - return NULL; - - get_row_parameter_line(tab, row, ineq->el); - if (ineq) - ineq = isl_vec_normalize(ineq); - - return ineq; -} - -/* Return a integer division for use in a parametric cut based on the given row. - * In particular, let the parametric constant of the row be - * - * \sum_i a_i y_i - * - * where y_0 = 1, but none of the y_i corresponds to the big parameter M. - * The div returned is equal to - * - * floor(\sum_i {-a_i} y_i) = floor((\sum_i (-a_i mod d) y_i)/d) - */ -static struct isl_vec *get_row_parameter_div(struct isl_tab *tab, int row) -{ - struct isl_vec *div; - - div = isl_vec_alloc(tab->mat->ctx, 1 + 1 + tab->n_param + tab->n_div); - if (!div) - return NULL; - - isl_int_set(div->el[0], tab->mat->row[row][0]); - get_row_parameter_line(tab, row, div->el + 1); - div = isl_vec_normalize(div); - isl_seq_neg(div->el + 1, div->el + 1, div->size - 1); - isl_seq_fdiv_r(div->el + 1, div->el + 1, div->el[0], div->size - 1); - - return div; -} - -/* Return a integer division for use in transferring an integrality constraint - * to the context. - * In particular, let the parametric constant of the row be - * - * \sum_i a_i y_i - * - * where y_0 = 1, but none of the y_i corresponds to the big parameter M. - * The the returned div is equal to - * - * floor(\sum_i {a_i} y_i) = floor((\sum_i (a_i mod d) y_i)/d) - */ -static struct isl_vec *get_row_split_div(struct isl_tab *tab, int row) -{ - struct isl_vec *div; - - div = isl_vec_alloc(tab->mat->ctx, 1 + 1 + tab->n_param + tab->n_div); - if (!div) - return NULL; - - isl_int_set(div->el[0], tab->mat->row[row][0]); - get_row_parameter_line(tab, row, div->el + 1); - div = isl_vec_normalize(div); - isl_seq_fdiv_r(div->el + 1, div->el + 1, div->el[0], div->size - 1); - - return div; -} - -/* Construct and return an inequality that expresses an upper bound - * on the given div. - * In particular, if the div is given by - * - * d = floor(e/m) - * - * then the inequality expresses - * - * m d <= e - */ -static struct isl_vec *ineq_for_div(struct isl_basic_set *bset, unsigned div) -{ - unsigned total; - unsigned div_pos; - struct isl_vec *ineq; - - if (!bset) - return NULL; - - total = isl_basic_set_total_dim(bset); - div_pos = 1 + total - bset->n_div + div; - - ineq = isl_vec_alloc(bset->ctx, 1 + total); - if (!ineq) - return NULL; - - isl_seq_cpy(ineq->el, bset->div[div] + 1, 1 + total); - isl_int_neg(ineq->el[div_pos], bset->div[div][0]); - return ineq; -} - -/* Given a row in the tableau and a div that was created - * using get_row_split_div and that been constrained to equality, i.e., - * - * d = floor(\sum_i {a_i} y_i) = \sum_i {a_i} y_i - * - * replace the expression "\sum_i {a_i} y_i" in the row by d, - * i.e., we subtract "\sum_i {a_i} y_i" and add 1 d. - * The coefficients of the non-parameters in the tableau have been - * verified to be integral. We can therefore simply replace coefficient b - * by floor(b). For the coefficients of the parameters we have - * floor(a_i) = a_i - {a_i}, while for the other coefficients, we have - * floor(b) = b. - */ -static struct isl_tab *set_row_cst_to_div(struct isl_tab *tab, int row, int div) -{ - isl_seq_fdiv_q(tab->mat->row[row] + 1, tab->mat->row[row] + 1, - tab->mat->row[row][0], 1 + tab->M + tab->n_col); - - isl_int_set_si(tab->mat->row[row][0], 1); - - if (tab->var[tab->n_var - tab->n_div + div].is_row) { - int drow = tab->var[tab->n_var - tab->n_div + div].index; - - isl_assert(tab->mat->ctx, - isl_int_is_one(tab->mat->row[drow][0]), goto error); - isl_seq_combine(tab->mat->row[row] + 1, - tab->mat->ctx->one, tab->mat->row[row] + 1, - tab->mat->ctx->one, tab->mat->row[drow] + 1, - 1 + tab->M + tab->n_col); - } else { - int dcol = tab->var[tab->n_var - tab->n_div + div].index; - - isl_int_set_si(tab->mat->row[row][2 + tab->M + dcol], 1); - } - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if the (parametric) constant of the given row is obviously - * negative, meaning that we don't need to consult the context tableau. - * If there is a big parameter and its coefficient is non-zero, - * then this coefficient determines the outcome. - * Otherwise, we check whether the constant is negative and - * all non-zero coefficients of parameters are negative and - * belong to non-negative parameters. - */ -static int is_obviously_neg(struct isl_tab *tab, int row) -{ - int i; - int col; - unsigned off = 2 + tab->M; - - if (tab->M) { - if (isl_int_is_pos(tab->mat->row[row][2])) - return 0; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 1; - } - - if (isl_int_is_nonneg(tab->mat->row[row][1])) - return 0; - for (i = 0; i < tab->n_param; ++i) { - /* Eliminated parameter */ - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[i].is_nonneg) - return 0; - if (isl_int_is_pos(tab->mat->row[row][off + col])) - return 0; - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[tab->n_var - tab->n_div + i].is_nonneg) - return 0; - if (isl_int_is_pos(tab->mat->row[row][off + col])) - return 0; - } - return 1; -} - -/* Check if the (parametric) constant of the given row is obviously - * non-negative, meaning that we don't need to consult the context tableau. - * If there is a big parameter and its coefficient is non-zero, - * then this coefficient determines the outcome. - * Otherwise, we check whether the constant is non-negative and - * all non-zero coefficients of parameters are positive and - * belong to non-negative parameters. - */ -static int is_obviously_nonneg(struct isl_tab *tab, int row) -{ - int i; - int col; - unsigned off = 2 + tab->M; - - if (tab->M) { - if (isl_int_is_pos(tab->mat->row[row][2])) - return 1; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 0; - } - - if (isl_int_is_neg(tab->mat->row[row][1])) - return 0; - for (i = 0; i < tab->n_param; ++i) { - /* Eliminated parameter */ - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[i].is_nonneg) - return 0; - if (isl_int_is_neg(tab->mat->row[row][off + col])) - return 0; - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[tab->n_var - tab->n_div + i].is_nonneg) - return 0; - if (isl_int_is_neg(tab->mat->row[row][off + col])) - return 0; - } - return 1; -} - -/* Given a row r and two columns, return the column that would - * lead to the lexicographically smallest increment in the sample - * solution when leaving the basis in favor of the row. - * Pivoting with column c will increment the sample value by a non-negative - * constant times a_{V,c}/a_{r,c}, with a_{V,c} the elements of column c - * corresponding to the non-parametric variables. - * If variable v appears in a column c_v, the a_{v,c} = 1 iff c = c_v, - * with all other entries in this virtual row equal to zero. - * If variable v appears in a row, then a_{v,c} is the element in column c - * of that row. - * - * Let v be the first variable with a_{v,c1}/a_{r,c1} != a_{v,c2}/a_{r,c2}. - * Then if a_{v,c1}/a_{r,c1} < a_{v,c2}/a_{r,c2}, i.e., - * a_{v,c2} a_{r,c1} - a_{v,c1} a_{r,c2} > 0, c1 results in the minimal - * increment. Otherwise, it's c2. - */ -static int lexmin_col_pair(struct isl_tab *tab, - int row, int col1, int col2, isl_int tmp) -{ - int i; - isl_int *tr; - - tr = tab->mat->row[row] + 2 + tab->M; - - for (i = tab->n_param; i < tab->n_var - tab->n_div; ++i) { - int s1, s2; - isl_int *r; - - if (!tab->var[i].is_row) { - if (tab->var[i].index == col1) - return col2; - if (tab->var[i].index == col2) - return col1; - continue; - } - - if (tab->var[i].index == row) - continue; - - r = tab->mat->row[tab->var[i].index] + 2 + tab->M; - s1 = isl_int_sgn(r[col1]); - s2 = isl_int_sgn(r[col2]); - if (s1 == 0 && s2 == 0) - continue; - if (s1 < s2) - return col1; - if (s2 < s1) - return col2; - - isl_int_mul(tmp, r[col2], tr[col1]); - isl_int_submul(tmp, r[col1], tr[col2]); - if (isl_int_is_pos(tmp)) - return col1; - if (isl_int_is_neg(tmp)) - return col2; - } - return -1; -} - -/* Given a row in the tableau, find and return the column that would - * result in the lexicographically smallest, but positive, increment - * in the sample point. - * If there is no such column, then return tab->n_col. - * If anything goes wrong, return -1. - */ -static int lexmin_pivot_col(struct isl_tab *tab, int row) -{ - int j; - int col = tab->n_col; - isl_int *tr; - isl_int tmp; - - tr = tab->mat->row[row] + 2 + tab->M; - - isl_int_init(tmp); - - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (tab->col_var[j] >= 0 && - (tab->col_var[j] < tab->n_param || - tab->col_var[j] >= tab->n_var - tab->n_div)) - continue; - - if (!isl_int_is_pos(tr[j])) - continue; - - if (col == tab->n_col) - col = j; - else - col = lexmin_col_pair(tab, row, col, j, tmp); - isl_assert(tab->mat->ctx, col >= 0, goto error); - } - - isl_int_clear(tmp); - return col; -error: - isl_int_clear(tmp); - return -1; -} - -/* Return the first known violated constraint, i.e., a non-negative - * constraint that currently has an either obviously negative value - * or a previously determined to be negative value. - * - * If any constraint has a negative coefficient for the big parameter, - * if any, then we return one of these first. - */ -static int first_neg(struct isl_tab *tab) -{ - int row; - - if (tab->M) - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (!isl_int_is_neg(tab->mat->row[row][2])) - continue; - if (tab->row_sign) - tab->row_sign[row] = isl_tab_row_neg; - return row; - } - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (tab->row_sign) { - if (tab->row_sign[row] == 0 && - is_obviously_neg(tab, row)) - tab->row_sign[row] = isl_tab_row_neg; - if (tab->row_sign[row] != isl_tab_row_neg) - continue; - } else if (!is_obviously_neg(tab, row)) - continue; - return row; - } - return -1; -} - -/* Check whether the invariant that all columns are lexico-positive - * is satisfied. This function is not called from the current code - * but is useful during debugging. - */ -static void check_lexpos(struct isl_tab *tab) __attribute__ ((unused)); -static void check_lexpos(struct isl_tab *tab) -{ - unsigned off = 2 + tab->M; - int col; - int var; - int row; - - for (col = tab->n_dead; col < tab->n_col; ++col) { - if (tab->col_var[col] >= 0 && - (tab->col_var[col] < tab->n_param || - tab->col_var[col] >= tab->n_var - tab->n_div)) - continue; - for (var = tab->n_param; var < tab->n_var - tab->n_div; ++var) { - if (!tab->var[var].is_row) { - if (tab->var[var].index == col) - break; - else - continue; - } - row = tab->var[var].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (isl_int_is_pos(tab->mat->row[row][off + col])) - break; - fprintf(stderr, "lexneg column %d (row %d)\n", - col, row); - } - if (var >= tab->n_var - tab->n_div) - fprintf(stderr, "zero column %d\n", col); - } -} - -/* Report to the caller that the given constraint is part of an encountered - * conflict. - */ -static int report_conflicting_constraint(struct isl_tab *tab, int con) -{ - return tab->conflict(con, tab->conflict_user); -} - -/* Given a conflicting row in the tableau, report all constraints - * involved in the row to the caller. That is, the row itself - * (if represents a constraint) and all constraint columns with - * non-zero (and therefore negative) coefficient. - */ -static int report_conflict(struct isl_tab *tab, int row) -{ - int j; - isl_int *tr; - - if (!tab->conflict) - return 0; - - if (tab->row_var[row] < 0 && - report_conflicting_constraint(tab, ~tab->row_var[row]) < 0) - return -1; - - tr = tab->mat->row[row] + 2 + tab->M; - - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (tab->col_var[j] >= 0 && - (tab->col_var[j] < tab->n_param || - tab->col_var[j] >= tab->n_var - tab->n_div)) - continue; - - if (!isl_int_is_neg(tr[j])) - continue; - - if (tab->col_var[j] < 0 && - report_conflicting_constraint(tab, ~tab->col_var[j]) < 0) - return -1; - } - - return 0; -} - -/* Resolve all known or obviously violated constraints through pivoting. - * In particular, as long as we can find any violated constraint, we - * look for a pivoting column that would result in the lexicographically - * smallest increment in the sample point. If there is no such column - * then the tableau is infeasible. - */ -static int restore_lexmin(struct isl_tab *tab) WARN_UNUSED; -static int restore_lexmin(struct isl_tab *tab) -{ - int row, col; - - if (!tab) - return -1; - if (tab->empty) - return 0; - while ((row = first_neg(tab)) != -1) { - col = lexmin_pivot_col(tab, row); - if (col >= tab->n_col) { - if (report_conflict(tab, row) < 0) - return -1; - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - if (col < 0) - return -1; - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } - return 0; -} - -/* Given a row that represents an equality, look for an appropriate - * pivoting column. - * In particular, if there are any non-zero coefficients among - * the non-parameter variables, then we take the last of these - * variables. Eliminating this variable in terms of the other - * variables and/or parameters does not influence the property - * that all column in the initial tableau are lexicographically - * positive. The row corresponding to the eliminated variable - * will only have non-zero entries below the diagonal of the - * initial tableau. That is, we transform - * - * I I - * 1 into a - * I I - * - * If there is no such non-parameter variable, then we are dealing with - * pure parameter equality and we pick any parameter with coefficient 1 or -1 - * for elimination. This will ensure that the eliminated parameter - * always has an integer value whenever all the other parameters are integral. - * If there is no such parameter then we return -1. - */ -static int last_var_col_or_int_par_col(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - int i; - - for (i = tab->n_var - tab->n_div - 1; i >= 0 && i >= tab->n_param; --i) { - int col; - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (col <= tab->n_dead) - continue; - if (!isl_int_is_zero(tab->mat->row[row][off + col])) - return col; - } - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (isl_int_is_one(tab->mat->row[row][off + i])) - return i; - if (isl_int_is_negone(tab->mat->row[row][off + i])) - return i; - } - return -1; -} - -/* Add an equality that is known to be valid to the tableau. - * We first check if we can eliminate a variable or a parameter. - * If not, we add the equality as two inequalities. - * In this case, the equality was a pure parameter equality and there - * is no need to resolve any constraint violations. - */ -static struct isl_tab *add_lexmin_valid_eq(struct isl_tab *tab, isl_int *eq) -{ - int i; - int r; - - if (!tab) - return NULL; - r = isl_tab_add_row(tab, eq); - if (r < 0) - goto error; - - r = tab->con[r].index; - i = last_var_col_or_int_par_col(tab, r); - if (i < 0) { - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - isl_seq_neg(eq, eq, 1 + tab->n_var); - r = isl_tab_add_row(tab, eq); - if (r < 0) - goto error; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - } else { - if (isl_tab_pivot(tab, r, i) < 0) - goto error; - if (isl_tab_kill_col(tab, i) < 0) - goto error; - tab->n_eq++; - } - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if the given row is a pure constant. - */ -static int is_constant(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - - return isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) == -1; -} - -/* Add an equality that may or may not be valid to the tableau. - * If the resulting row is a pure constant, then it must be zero. - * Otherwise, the resulting tableau is empty. - * - * If the row is not a pure constant, then we add two inequalities, - * each time checking that they can be satisfied. - * In the end we try to use one of the two constraints to eliminate - * a column. - */ -static int add_lexmin_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED; -static int add_lexmin_eq(struct isl_tab *tab, isl_int *eq) -{ - int r1, r2; - int row; - struct isl_tab_undo *snap; - - if (!tab) - return -1; - snap = isl_tab_snap(tab); - r1 = isl_tab_add_row(tab, eq); - if (r1 < 0) - return -1; - tab->con[r1].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r1]) < 0) - return -1; - - row = tab->con[r1].index; - if (is_constant(tab, row)) { - if (!isl_int_is_zero(tab->mat->row[row][1]) || - (tab->M && !isl_int_is_zero(tab->mat->row[row][2]))) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - - if (restore_lexmin(tab) < 0) - return -1; - if (tab->empty) - return 0; - - isl_seq_neg(eq, eq, 1 + tab->n_var); - - r2 = isl_tab_add_row(tab, eq); - if (r2 < 0) - return -1; - tab->con[r2].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r2]) < 0) - return -1; - - if (restore_lexmin(tab) < 0) - return -1; - if (tab->empty) - return 0; - - if (!tab->con[r1].is_row) { - if (isl_tab_kill_col(tab, tab->con[r1].index) < 0) - return -1; - } else if (!tab->con[r2].is_row) { - if (isl_tab_kill_col(tab, tab->con[r2].index) < 0) - return -1; - } - - if (tab->bmap) { - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - isl_seq_neg(eq, eq, 1 + tab->n_var); - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - isl_seq_neg(eq, eq, 1 + tab->n_var); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - if (!tab->bmap) - return -1; - } - - return 0; -} - -/* Add an inequality to the tableau, resolving violations using - * restore_lexmin. - */ -static struct isl_tab *add_lexmin_ineq(struct isl_tab *tab, isl_int *ineq) -{ - int r; - - if (!tab) - return NULL; - if (tab->bmap) { - tab->bmap = isl_basic_map_add_ineq(tab->bmap, ineq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - goto error; - if (!tab->bmap) - goto error; - } - r = isl_tab_add_row(tab, ineq); - if (r < 0) - goto error; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - if (isl_tab_row_is_redundant(tab, tab->con[r].index)) { - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - goto error; - return tab; - } - - if (restore_lexmin(tab) < 0) - goto error; - if (!tab->empty && tab->con[r].is_row && - isl_tab_row_is_redundant(tab, tab->con[r].index)) - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - goto error; - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if the coefficients of the parameters are all integral. - */ -static int integer_parameter(struct isl_tab *tab, int row) -{ - int i; - int col; - unsigned off = 2 + tab->M; - - for (i = 0; i < tab->n_param; ++i) { - /* Eliminated parameter */ - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (!isl_int_is_divisible_by(tab->mat->row[row][off + col], - tab->mat->row[row][0])) - return 0; - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - if (!isl_int_is_divisible_by(tab->mat->row[row][off + col], - tab->mat->row[row][0])) - return 0; - } - return 1; -} - -/* Check if the coefficients of the non-parameter variables are all integral. - */ -static int integer_variable(struct isl_tab *tab, int row) -{ - int i; - unsigned off = 2 + tab->M; - - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (tab->col_var[i] >= 0 && - (tab->col_var[i] < tab->n_param || - tab->col_var[i] >= tab->n_var - tab->n_div)) - continue; - if (!isl_int_is_divisible_by(tab->mat->row[row][off + i], - tab->mat->row[row][0])) - return 0; - } - return 1; -} - -/* Check if the constant term is integral. - */ -static int integer_constant(struct isl_tab *tab, int row) -{ - return isl_int_is_divisible_by(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -#define I_CST 1 << 0 -#define I_PAR 1 << 1 -#define I_VAR 1 << 2 - -/* Check for next (non-parameter) variable after "var" (first if var == -1) - * that is non-integer and therefore requires a cut and return - * the index of the variable. - * For parametric tableaus, there are three parts in a row, - * the constant, the coefficients of the parameters and the rest. - * For each part, we check whether the coefficients in that part - * are all integral and if so, set the corresponding flag in *f. - * If the constant and the parameter part are integral, then the - * current sample value is integral and no cut is required - * (irrespective of whether the variable part is integral). - */ -static int next_non_integer_var(struct isl_tab *tab, int var, int *f) -{ - var = var < 0 ? tab->n_param : var + 1; - - for (; var < tab->n_var - tab->n_div; ++var) { - int flags = 0; - int row; - if (!tab->var[var].is_row) - continue; - row = tab->var[var].index; - if (integer_constant(tab, row)) - ISL_FL_SET(flags, I_CST); - if (integer_parameter(tab, row)) - ISL_FL_SET(flags, I_PAR); - if (ISL_FL_ISSET(flags, I_CST) && ISL_FL_ISSET(flags, I_PAR)) - continue; - if (integer_variable(tab, row)) - ISL_FL_SET(flags, I_VAR); - *f = flags; - return var; - } - return -1; -} - -/* Check for first (non-parameter) variable that is non-integer and - * therefore requires a cut and return the corresponding row. - * For parametric tableaus, there are three parts in a row, - * the constant, the coefficients of the parameters and the rest. - * For each part, we check whether the coefficients in that part - * are all integral and if so, set the corresponding flag in *f. - * If the constant and the parameter part are integral, then the - * current sample value is integral and no cut is required - * (irrespective of whether the variable part is integral). - */ -static int first_non_integer_row(struct isl_tab *tab, int *f) -{ - int var = next_non_integer_var(tab, -1, f); - - return var < 0 ? -1 : tab->var[var].index; -} - -/* Add a (non-parametric) cut to cut away the non-integral sample - * value of the given row. - * - * If the row is given by - * - * m r = f + \sum_i a_i y_i - * - * then the cut is - * - * c = - {-f/m} + \sum_i {a_i/m} y_i >= 0 - * - * The big parameter, if any, is ignored, since it is assumed to be big - * enough to be divisible by any integer. - * If the tableau is actually a parametric tableau, then this function - * is only called when all coefficients of the parameters are integral. - * The cut therefore has zero coefficients for the parameters. - * - * The current value is known to be negative, so row_sign, if it - * exists, is set accordingly. - * - * Return the row of the cut or -1. - */ -static int add_cut(struct isl_tab *tab, int row) -{ - int i; - int r; - isl_int *r_row; - unsigned off = 2 + tab->M; - - if (isl_tab_extend_cons(tab, 1) < 0) - return -1; - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - r_row = tab->mat->row[tab->con[r].index]; - isl_int_set(r_row[0], tab->mat->row[row][0]); - isl_int_neg(r_row[1], tab->mat->row[row][1]); - isl_int_fdiv_r(r_row[1], r_row[1], tab->mat->row[row][0]); - isl_int_neg(r_row[1], r_row[1]); - if (tab->M) - isl_int_set_si(r_row[2], 0); - for (i = 0; i < tab->n_col; ++i) - isl_int_fdiv_r(r_row[off + i], - tab->mat->row[row][off + i], tab->mat->row[row][0]); - - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - if (tab->row_sign) - tab->row_sign[tab->con[r].index] = isl_tab_row_neg; - - return tab->con[r].index; -} - -/* Given a non-parametric tableau, add cuts until an integer - * sample point is obtained or until the tableau is determined - * to be integer infeasible. - * As long as there is any non-integer value in the sample point, - * we add appropriate cuts, if possible, for each of these - * non-integer values and then resolve the violated - * cut constraints using restore_lexmin. - * If one of the corresponding rows is equal to an integral - * combination of variables/constraints plus a non-integral constant, - * then there is no way to obtain an integer point and we return - * a tableau that is marked empty. - */ -static struct isl_tab *cut_to_integer_lexmin(struct isl_tab *tab) -{ - int var; - int row; - int flags; - - if (!tab) - return NULL; - if (tab->empty) - return tab; - - while ((var = next_non_integer_var(tab, -1, &flags)) != -1) { - do { - if (ISL_FL_ISSET(flags, I_VAR)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - row = tab->var[var].index; - row = add_cut(tab, row); - if (row < 0) - goto error; - } while ((var = next_non_integer_var(tab, var, &flags)) != -1); - if (restore_lexmin(tab) < 0) - goto error; - if (tab->empty) - break; - } - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check whether all the currently active samples also satisfy the inequality - * "ineq" (treated as an equality if eq is set). - * Remove those samples that do not. - */ -static struct isl_tab *check_samples(struct isl_tab *tab, isl_int *ineq, int eq) -{ - int i; - isl_int v; - - if (!tab) - return NULL; - - isl_assert(tab->mat->ctx, tab->bmap, goto error); - isl_assert(tab->mat->ctx, tab->samples, goto error); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, goto error); - - isl_int_init(v); - for (i = tab->n_outside; i < tab->n_sample; ++i) { - int sgn; - isl_seq_inner_product(ineq, tab->samples->row[i], - 1 + tab->n_var, &v); - sgn = isl_int_sgn(v); - if (eq ? (sgn == 0) : (sgn >= 0)) - continue; - tab = isl_tab_drop_sample(tab, i); - if (!tab) - break; - } - isl_int_clear(v); - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check whether the sample value of the tableau is finite, - * i.e., either the tableau does not use a big parameter, or - * all values of the variables are equal to the big parameter plus - * some constant. This constant is the actual sample value. - */ -static int sample_is_finite(struct isl_tab *tab) -{ - int i; - - if (!tab->M) - return 1; - - for (i = 0; i < tab->n_var; ++i) { - int row; - if (!tab->var[i].is_row) - return 0; - row = tab->var[i].index; - if (isl_int_ne(tab->mat->row[row][0], tab->mat->row[row][2])) - return 0; - } - return 1; -} - -/* Check if the context tableau of sol has any integer points. - * Leave tab in empty state if no integer point can be found. - * If an integer point can be found and if moreover it is finite, - * then it is added to the list of sample values. - * - * This function is only called when none of the currently active sample - * values satisfies the most recently added constraint. - */ -static struct isl_tab *check_integer_feasible(struct isl_tab *tab) -{ - struct isl_tab_undo *snap; - - if (!tab) - return NULL; - - snap = isl_tab_snap(tab); - if (isl_tab_push_basis(tab) < 0) - goto error; - - tab = cut_to_integer_lexmin(tab); - if (!tab) - goto error; - - if (!tab->empty && sample_is_finite(tab)) { - struct isl_vec *sample; - - sample = isl_tab_get_sample_value(tab); - - tab = isl_tab_add_sample(tab, sample); - } - - if (!tab->empty && isl_tab_rollback(tab, snap) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if any of the currently active sample values satisfies - * the inequality "ineq" (an equality if eq is set). - */ -static int tab_has_valid_sample(struct isl_tab *tab, isl_int *ineq, int eq) -{ - int i; - isl_int v; - - if (!tab) - return -1; - - isl_assert(tab->mat->ctx, tab->bmap, return -1); - isl_assert(tab->mat->ctx, tab->samples, return -1); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, return -1); - - isl_int_init(v); - for (i = tab->n_outside; i < tab->n_sample; ++i) { - int sgn; - isl_seq_inner_product(ineq, tab->samples->row[i], - 1 + tab->n_var, &v); - sgn = isl_int_sgn(v); - if (eq ? (sgn == 0) : (sgn >= 0)) - break; - } - isl_int_clear(v); - - return i < tab->n_sample; -} - -/* Add a div specified by "div" to the tableau "tab" and return - * 1 if the div is obviously non-negative. - */ -static int context_tab_add_div(struct isl_tab *tab, struct isl_vec *div, - int (*add_ineq)(void *user, isl_int *), void *user) -{ - int i; - int r; - struct isl_mat *samples; - int nonneg; - - r = isl_tab_add_div(tab, div, add_ineq, user); - if (r < 0) - return -1; - nonneg = tab->var[r].is_nonneg; - tab->var[r].frozen = 1; - - samples = isl_mat_extend(tab->samples, - tab->n_sample, 1 + tab->n_var); - tab->samples = samples; - if (!samples) - return -1; - for (i = tab->n_outside; i < samples->n_row; ++i) { - isl_seq_inner_product(div->el + 1, samples->row[i], - div->size - 1, &samples->row[i][samples->n_col - 1]); - isl_int_fdiv_q(samples->row[i][samples->n_col - 1], - samples->row[i][samples->n_col - 1], div->el[0]); - } - - return nonneg; -} - -/* Add a div specified by "div" to both the main tableau and - * the context tableau. In case of the main tableau, we only - * need to add an extra div. In the context tableau, we also - * need to express the meaning of the div. - * Return the index of the div or -1 if anything went wrong. - */ -static int add_div(struct isl_tab *tab, struct isl_context *context, - struct isl_vec *div) -{ - int r; - int nonneg; - - if ((nonneg = context->op->add_div(context, div)) < 0) - goto error; - - if (!context->op->is_ok(context)) - goto error; - - if (isl_tab_extend_vars(tab, 1) < 0) - goto error; - r = isl_tab_allocate_var(tab); - if (r < 0) - goto error; - if (nonneg) - tab->var[r].is_nonneg = 1; - tab->var[r].frozen = 1; - tab->n_div++; - - return tab->n_div - 1; -error: - context->op->invalidate(context); - return -1; -} - -static int find_div(struct isl_tab *tab, isl_int *div, isl_int denom) -{ - int i; - unsigned total = isl_basic_map_total_dim(tab->bmap); - - for (i = 0; i < tab->bmap->n_div; ++i) { - if (isl_int_ne(tab->bmap->div[i][0], denom)) - continue; - if (!isl_seq_eq(tab->bmap->div[i] + 1, div, 1 + total)) - continue; - return i; - } - return -1; -} - -/* Return the index of a div that corresponds to "div". - * We first check if we already have such a div and if not, we create one. - */ -static int get_div(struct isl_tab *tab, struct isl_context *context, - struct isl_vec *div) -{ - int d; - struct isl_tab *context_tab = context->op->peek_tab(context); - - if (!context_tab) - return -1; - - d = find_div(context_tab, div->el + 1, div->el[0]); - if (d != -1) - return d; - - return add_div(tab, context, div); -} - -/* Add a parametric cut to cut away the non-integral sample value - * of the give row. - * Let a_i be the coefficients of the constant term and the parameters - * and let b_i be the coefficients of the variables or constraints - * in basis of the tableau. - * Let q be the div q = floor(\sum_i {-a_i} y_i). - * - * The cut is expressed as - * - * c = \sum_i -{-a_i} y_i + \sum_i {b_i} x_i + q >= 0 - * - * If q did not already exist in the context tableau, then it is added first. - * If q is in a column of the main tableau then the "+ q" can be accomplished - * by setting the corresponding entry to the denominator of the constraint. - * If q happens to be in a row of the main tableau, then the corresponding - * row needs to be added instead (taking care of the denominators). - * Note that this is very unlikely, but perhaps not entirely impossible. - * - * The current value of the cut is known to be negative (or at least - * non-positive), so row_sign is set accordingly. - * - * Return the row of the cut or -1. - */ -static int add_parametric_cut(struct isl_tab *tab, int row, - struct isl_context *context) -{ - struct isl_vec *div; - int d; - int i; - int r; - isl_int *r_row; - int col; - int n; - unsigned off = 2 + tab->M; - - if (!context) - return -1; - - div = get_row_parameter_div(tab, row); - if (!div) - return -1; - - n = tab->n_div; - d = context->op->get_div(context, tab, div); - if (d < 0) - return -1; - - if (isl_tab_extend_cons(tab, 1) < 0) - return -1; - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - r_row = tab->mat->row[tab->con[r].index]; - isl_int_set(r_row[0], tab->mat->row[row][0]); - isl_int_neg(r_row[1], tab->mat->row[row][1]); - isl_int_fdiv_r(r_row[1], r_row[1], tab->mat->row[row][0]); - isl_int_neg(r_row[1], r_row[1]); - if (tab->M) - isl_int_set_si(r_row[2], 0); - for (i = 0; i < tab->n_param; ++i) { - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - isl_int_neg(r_row[off + col], tab->mat->row[row][off + col]); - isl_int_fdiv_r(r_row[off + col], r_row[off + col], - tab->mat->row[row][0]); - isl_int_neg(r_row[off + col], r_row[off + col]); - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - isl_int_neg(r_row[off + col], tab->mat->row[row][off + col]); - isl_int_fdiv_r(r_row[off + col], r_row[off + col], - tab->mat->row[row][0]); - isl_int_neg(r_row[off + col], r_row[off + col]); - } - for (i = 0; i < tab->n_col; ++i) { - if (tab->col_var[i] >= 0 && - (tab->col_var[i] < tab->n_param || - tab->col_var[i] >= tab->n_var - tab->n_div)) - continue; - isl_int_fdiv_r(r_row[off + i], - tab->mat->row[row][off + i], tab->mat->row[row][0]); - } - if (tab->var[tab->n_var - tab->n_div + d].is_row) { - isl_int gcd; - int d_row = tab->var[tab->n_var - tab->n_div + d].index; - isl_int_init(gcd); - isl_int_gcd(gcd, tab->mat->row[d_row][0], r_row[0]); - isl_int_divexact(r_row[0], r_row[0], gcd); - isl_int_divexact(gcd, tab->mat->row[d_row][0], gcd); - isl_seq_combine(r_row + 1, gcd, r_row + 1, - r_row[0], tab->mat->row[d_row] + 1, - off - 1 + tab->n_col); - isl_int_mul(r_row[0], r_row[0], tab->mat->row[d_row][0]); - isl_int_clear(gcd); - } else { - col = tab->var[tab->n_var - tab->n_div + d].index; - isl_int_set(r_row[off + col], tab->mat->row[row][0]); - } - - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - if (tab->row_sign) - tab->row_sign[tab->con[r].index] = isl_tab_row_neg; - - isl_vec_free(div); - - row = tab->con[r].index; - - if (d >= n && context->op->detect_equalities(context, tab) < 0) - return -1; - - return row; -} - -/* Construct a tableau for bmap that can be used for computing - * the lexicographic minimum (or maximum) of bmap. - * If not NULL, then dom is the domain where the minimum - * should be computed. In this case, we set up a parametric - * tableau with row signs (initialized to "unknown"). - * If M is set, then the tableau will use a big parameter. - * If max is set, then a maximum should be computed instead of a minimum. - * This means that for each variable x, the tableau will contain the variable - * x' = M - x, rather than x' = M + x. This in turn means that the coefficient - * of the variables in all constraints are negated prior to adding them - * to the tableau. - */ -static struct isl_tab *tab_for_lexmin(struct isl_basic_map *bmap, - struct isl_basic_set *dom, unsigned M, int max) -{ - int i; - struct isl_tab *tab; - - tab = isl_tab_alloc(bmap->ctx, 2 * bmap->n_eq + bmap->n_ineq + 1, - isl_basic_map_total_dim(bmap), M); - if (!tab) - return NULL; - - tab->rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - if (dom) { - tab->n_param = isl_basic_set_total_dim(dom) - dom->n_div; - tab->n_div = dom->n_div; - tab->row_sign = isl_calloc_array(bmap->ctx, - enum isl_tab_row_sign, tab->mat->n_row); - if (!tab->row_sign) - goto error; - } - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - - for (i = tab->n_param; i < tab->n_var - tab->n_div; ++i) { - tab->var[i].is_nonneg = 1; - tab->var[i].frozen = 1; - } - for (i = 0; i < bmap->n_eq; ++i) { - if (max) - isl_seq_neg(bmap->eq[i] + 1 + tab->n_param, - bmap->eq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - tab = add_lexmin_valid_eq(tab, bmap->eq[i]); - if (max) - isl_seq_neg(bmap->eq[i] + 1 + tab->n_param, - bmap->eq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - if (!tab || tab->empty) - return tab; - } - if (bmap->n_eq && restore_lexmin(tab) < 0) - goto error; - for (i = 0; i < bmap->n_ineq; ++i) { - if (max) - isl_seq_neg(bmap->ineq[i] + 1 + tab->n_param, - bmap->ineq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - tab = add_lexmin_ineq(tab, bmap->ineq[i]); - if (max) - isl_seq_neg(bmap->ineq[i] + 1 + tab->n_param, - bmap->ineq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - if (!tab || tab->empty) - return tab; - } - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Given a main tableau where more than one row requires a split, - * determine and return the "best" row to split on. - * - * Given two rows in the main tableau, if the inequality corresponding - * to the first row is redundant with respect to that of the second row - * in the current tableau, then it is better to split on the second row, - * since in the positive part, both row will be positive. - * (In the negative part a pivot will have to be performed and just about - * anything can happen to the sign of the other row.) - * - * As a simple heuristic, we therefore select the row that makes the most - * of the other rows redundant. - * - * Perhaps it would also be useful to look at the number of constraints - * that conflict with any given constraint. - */ -static int best_split(struct isl_tab *tab, struct isl_tab *context_tab) -{ - struct isl_tab_undo *snap; - int split; - int row; - int best = -1; - int best_r; - - if (isl_tab_extend_cons(context_tab, 2) < 0) - return -1; - - snap = isl_tab_snap(context_tab); - - for (split = tab->n_redundant; split < tab->n_row; ++split) { - struct isl_tab_undo *snap2; - struct isl_vec *ineq = NULL; - int r = 0; - int ok; - - if (!isl_tab_var_from_row(tab, split)->is_nonneg) - continue; - if (tab->row_sign[split] != isl_tab_row_any) - continue; - - ineq = get_row_parameter_ineq(tab, split); - if (!ineq) - return -1; - ok = isl_tab_add_ineq(context_tab, ineq->el) >= 0; - isl_vec_free(ineq); - if (!ok) - return -1; - - snap2 = isl_tab_snap(context_tab); - - for (row = tab->n_redundant; row < tab->n_row; ++row) { - struct isl_tab_var *var; - - if (row == split) - continue; - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (tab->row_sign[row] != isl_tab_row_any) - continue; - - ineq = get_row_parameter_ineq(tab, row); - if (!ineq) - return -1; - ok = isl_tab_add_ineq(context_tab, ineq->el) >= 0; - isl_vec_free(ineq); - if (!ok) - return -1; - var = &context_tab->con[context_tab->n_con - 1]; - if (!context_tab->empty && - !isl_tab_min_at_most_neg_one(context_tab, var)) - r++; - if (isl_tab_rollback(context_tab, snap2) < 0) - return -1; - } - if (best == -1 || r > best_r) { - best = split; - best_r = r; - } - if (isl_tab_rollback(context_tab, snap) < 0) - return -1; - } - - return best; -} - -static struct isl_basic_set *context_lex_peek_basic_set( - struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (!clex->tab) - return NULL; - return isl_tab_peek_bset(clex->tab); -} - -static struct isl_tab *context_lex_peek_tab(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - return clex->tab; -} - -static void context_lex_add_eq(struct isl_context *context, isl_int *eq, - int check, int update) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (isl_tab_extend_cons(clex->tab, 2) < 0) - goto error; - if (add_lexmin_eq(clex->tab, eq) < 0) - goto error; - if (check) { - int v = tab_has_valid_sample(clex->tab, eq, 1); - if (v < 0) - goto error; - if (!v) - clex->tab = check_integer_feasible(clex->tab); - } - if (update) - clex->tab = check_samples(clex->tab, eq, 1); - return; -error: - isl_tab_free(clex->tab); - clex->tab = NULL; -} - -static void context_lex_add_ineq(struct isl_context *context, isl_int *ineq, - int check, int update) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (isl_tab_extend_cons(clex->tab, 1) < 0) - goto error; - clex->tab = add_lexmin_ineq(clex->tab, ineq); - if (check) { - int v = tab_has_valid_sample(clex->tab, ineq, 0); - if (v < 0) - goto error; - if (!v) - clex->tab = check_integer_feasible(clex->tab); - } - if (update) - clex->tab = check_samples(clex->tab, ineq, 0); - return; -error: - isl_tab_free(clex->tab); - clex->tab = NULL; -} - -static int context_lex_add_ineq_wrap(void *user, isl_int *ineq) -{ - struct isl_context *context = (struct isl_context *)user; - context_lex_add_ineq(context, ineq, 0, 0); - return context->op->is_ok(context) ? 0 : -1; -} - -/* Check which signs can be obtained by "ineq" on all the currently - * active sample values. See row_sign for more information. - */ -static enum isl_tab_row_sign tab_ineq_sign(struct isl_tab *tab, isl_int *ineq, - int strict) -{ - int i; - int sgn; - isl_int tmp; - enum isl_tab_row_sign res = isl_tab_row_unknown; - - isl_assert(tab->mat->ctx, tab->samples, return isl_tab_row_unknown); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, - return isl_tab_row_unknown); - - isl_int_init(tmp); - for (i = tab->n_outside; i < tab->n_sample; ++i) { - isl_seq_inner_product(tab->samples->row[i], ineq, - 1 + tab->n_var, &tmp); - sgn = isl_int_sgn(tmp); - if (sgn > 0 || (sgn == 0 && strict)) { - if (res == isl_tab_row_unknown) - res = isl_tab_row_pos; - if (res == isl_tab_row_neg) - res = isl_tab_row_any; - } - if (sgn < 0) { - if (res == isl_tab_row_unknown) - res = isl_tab_row_neg; - if (res == isl_tab_row_pos) - res = isl_tab_row_any; - } - if (res == isl_tab_row_any) - break; - } - isl_int_clear(tmp); - - return res; -} - -static enum isl_tab_row_sign context_lex_ineq_sign(struct isl_context *context, - isl_int *ineq, int strict) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - return tab_ineq_sign(clex->tab, ineq, strict); -} - -/* Check whether "ineq" can be added to the tableau without rendering - * it infeasible. - */ -static int context_lex_test_ineq(struct isl_context *context, isl_int *ineq) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - int feasible; - - if (!clex->tab) - return -1; - - if (isl_tab_extend_cons(clex->tab, 1) < 0) - return -1; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - return -1; - clex->tab = add_lexmin_ineq(clex->tab, ineq); - clex->tab = check_integer_feasible(clex->tab); - if (!clex->tab) - return -1; - feasible = !clex->tab->empty; - if (isl_tab_rollback(clex->tab, snap) < 0) - return -1; - - return feasible; -} - -static int context_lex_get_div(struct isl_context *context, struct isl_tab *tab, - struct isl_vec *div) -{ - return get_div(tab, context, div); -} - -/* Add a div specified by "div" to the context tableau and return - * 1 if the div is obviously non-negative. - * context_tab_add_div will always return 1, because all variables - * in a isl_context_lex tableau are non-negative. - * However, if we are using a big parameter in the context, then this only - * reflects the non-negativity of the variable used to _encode_ the - * div, i.e., div' = M + div, so we can't draw any conclusions. - */ -static int context_lex_add_div(struct isl_context *context, struct isl_vec *div) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - int nonneg; - nonneg = context_tab_add_div(clex->tab, div, - context_lex_add_ineq_wrap, context); - if (nonneg < 0) - return -1; - if (clex->tab->M) - return 0; - return nonneg; -} - -static int context_lex_detect_equalities(struct isl_context *context, - struct isl_tab *tab) -{ - return 0; -} - -static int context_lex_best_split(struct isl_context *context, - struct isl_tab *tab) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - int r; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - return -1; - r = best_split(tab, clex->tab); - - if (r >= 0 && isl_tab_rollback(clex->tab, snap) < 0) - return -1; - - return r; -} - -static int context_lex_is_empty(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (!clex->tab) - return -1; - return clex->tab->empty; -} - -static void *context_lex_save(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - return NULL; - if (isl_tab_save_samples(clex->tab) < 0) - return NULL; - - return snap; -} - -static void context_lex_restore(struct isl_context *context, void *save) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (isl_tab_rollback(clex->tab, (struct isl_tab_undo *)save) < 0) { - isl_tab_free(clex->tab); - clex->tab = NULL; - } -} - -static int context_lex_is_ok(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - return !!clex->tab; -} - -/* For each variable in the context tableau, check if the variable can - * only attain non-negative values. If so, mark the parameter as non-negative - * in the main tableau. This allows for a more direct identification of some - * cases of violated constraints. - */ -static struct isl_tab *tab_detect_nonnegative_parameters(struct isl_tab *tab, - struct isl_tab *context_tab) -{ - int i; - struct isl_tab_undo *snap; - struct isl_vec *ineq = NULL; - struct isl_tab_var *var; - int n; - - if (context_tab->n_var == 0) - return tab; - - ineq = isl_vec_alloc(tab->mat->ctx, 1 + context_tab->n_var); - if (!ineq) - goto error; - - if (isl_tab_extend_cons(context_tab, 1) < 0) - goto error; - - snap = isl_tab_snap(context_tab); - - n = 0; - isl_seq_clr(ineq->el, ineq->size); - for (i = 0; i < context_tab->n_var; ++i) { - isl_int_set_si(ineq->el[1 + i], 1); - if (isl_tab_add_ineq(context_tab, ineq->el) < 0) - goto error; - var = &context_tab->con[context_tab->n_con - 1]; - if (!context_tab->empty && - !isl_tab_min_at_most_neg_one(context_tab, var)) { - int j = i; - if (i >= tab->n_param) - j = i - tab->n_param + tab->n_var - tab->n_div; - tab->var[j].is_nonneg = 1; - n++; - } - isl_int_set_si(ineq->el[1 + i], 0); - if (isl_tab_rollback(context_tab, snap) < 0) - goto error; - } - - if (context_tab->M && n == context_tab->n_var) { - context_tab->mat = isl_mat_drop_cols(context_tab->mat, 2, 1); - context_tab->M = 0; - } - - isl_vec_free(ineq); - return tab; -error: - isl_vec_free(ineq); - isl_tab_free(tab); - return NULL; -} - -static struct isl_tab *context_lex_detect_nonnegative_parameters( - struct isl_context *context, struct isl_tab *tab) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - - if (!tab) - return NULL; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - goto error; - - tab = tab_detect_nonnegative_parameters(tab, clex->tab); - - if (isl_tab_rollback(clex->tab, snap) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -static void context_lex_invalidate(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - isl_tab_free(clex->tab); - clex->tab = NULL; -} - -static void context_lex_free(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - isl_tab_free(clex->tab); - free(clex); -} - -struct isl_context_op isl_context_lex_op = { - context_lex_detect_nonnegative_parameters, - context_lex_peek_basic_set, - context_lex_peek_tab, - context_lex_add_eq, - context_lex_add_ineq, - context_lex_ineq_sign, - context_lex_test_ineq, - context_lex_get_div, - context_lex_add_div, - context_lex_detect_equalities, - context_lex_best_split, - context_lex_is_empty, - context_lex_is_ok, - context_lex_save, - context_lex_restore, - context_lex_invalidate, - context_lex_free, -}; - -static struct isl_tab *context_tab_for_lexmin(struct isl_basic_set *bset) -{ - struct isl_tab *tab; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - tab = tab_for_lexmin((struct isl_basic_map *)bset, NULL, 1, 0); - if (!tab) - goto error; - if (isl_tab_track_bset(tab, bset) < 0) - goto error; - tab = isl_tab_init_samples(tab); - return tab; -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_context *isl_context_lex_alloc(struct isl_basic_set *dom) -{ - struct isl_context_lex *clex; - - if (!dom) - return NULL; - - clex = isl_alloc_type(dom->ctx, struct isl_context_lex); - if (!clex) - return NULL; - - clex->context.op = &isl_context_lex_op; - - clex->tab = context_tab_for_lexmin(isl_basic_set_copy(dom)); - if (restore_lexmin(clex->tab) < 0) - goto error; - clex->tab = check_integer_feasible(clex->tab); - if (!clex->tab) - goto error; - - return &clex->context; -error: - clex->context.op->free(&clex->context); - return NULL; -} - -struct isl_context_gbr { - struct isl_context context; - struct isl_tab *tab; - struct isl_tab *shifted; - struct isl_tab *cone; -}; - -static struct isl_tab *context_gbr_detect_nonnegative_parameters( - struct isl_context *context, struct isl_tab *tab) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (!tab) - return NULL; - return tab_detect_nonnegative_parameters(tab, cgbr->tab); -} - -static struct isl_basic_set *context_gbr_peek_basic_set( - struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (!cgbr->tab) - return NULL; - return isl_tab_peek_bset(cgbr->tab); -} - -static struct isl_tab *context_gbr_peek_tab(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - return cgbr->tab; -} - -/* Initialize the "shifted" tableau of the context, which - * contains the constraints of the original tableau shifted - * by the sum of all negative coefficients. This ensures - * that any rational point in the shifted tableau can - * be rounded up to yield an integer point in the original tableau. - */ -static void gbr_init_shifted(struct isl_context_gbr *cgbr) -{ - int i, j; - struct isl_vec *cst; - struct isl_basic_set *bset = isl_tab_peek_bset(cgbr->tab); - unsigned dim = isl_basic_set_total_dim(bset); - - cst = isl_vec_alloc(cgbr->tab->mat->ctx, bset->n_ineq); - if (!cst) - return; - - for (i = 0; i < bset->n_ineq; ++i) { - isl_int_set(cst->el[i], bset->ineq[i][0]); - for (j = 0; j < dim; ++j) { - if (!isl_int_is_neg(bset->ineq[i][1 + j])) - continue; - isl_int_add(bset->ineq[i][0], bset->ineq[i][0], - bset->ineq[i][1 + j]); - } - } - - cgbr->shifted = isl_tab_from_basic_set(bset); - - for (i = 0; i < bset->n_ineq; ++i) - isl_int_set(bset->ineq[i][0], cst->el[i]); - - isl_vec_free(cst); -} - -/* Check if the shifted tableau is non-empty, and if so - * use the sample point to construct an integer point - * of the context tableau. - */ -static struct isl_vec *gbr_get_shifted_sample(struct isl_context_gbr *cgbr) -{ - struct isl_vec *sample; - - if (!cgbr->shifted) - gbr_init_shifted(cgbr); - if (!cgbr->shifted) - return NULL; - if (cgbr->shifted->empty) - return isl_vec_alloc(cgbr->tab->mat->ctx, 0); - - sample = isl_tab_get_sample_value(cgbr->shifted); - sample = isl_vec_ceil(sample); - - return sample; -} - -static struct isl_basic_set *drop_constant_terms(struct isl_basic_set *bset) -{ - int i; - - if (!bset) - return NULL; - - for (i = 0; i < bset->n_eq; ++i) - isl_int_set_si(bset->eq[i][0], 0); - - for (i = 0; i < bset->n_ineq; ++i) - isl_int_set_si(bset->ineq[i][0], 0); - - return bset; -} - -static int use_shifted(struct isl_context_gbr *cgbr) -{ - return cgbr->tab->bmap->n_eq == 0 && cgbr->tab->bmap->n_div == 0; -} - -static struct isl_vec *gbr_get_sample(struct isl_context_gbr *cgbr) -{ - struct isl_basic_set *bset; - struct isl_basic_set *cone; - - if (isl_tab_sample_is_integer(cgbr->tab)) - return isl_tab_get_sample_value(cgbr->tab); - - if (use_shifted(cgbr)) { - struct isl_vec *sample; - - sample = gbr_get_shifted_sample(cgbr); - if (!sample || sample->size > 0) - return sample; - - isl_vec_free(sample); - } - - if (!cgbr->cone) { - bset = isl_tab_peek_bset(cgbr->tab); - cgbr->cone = isl_tab_from_recession_cone(bset, 0); - if (!cgbr->cone) - return NULL; - if (isl_tab_track_bset(cgbr->cone, isl_basic_set_dup(bset)) < 0) - return NULL; - } - if (isl_tab_detect_implicit_equalities(cgbr->cone) < 0) - return NULL; - - if (cgbr->cone->n_dead == cgbr->cone->n_col) { - struct isl_vec *sample; - struct isl_tab_undo *snap; - - if (cgbr->tab->basis) { - if (cgbr->tab->basis->n_col != 1 + cgbr->tab->n_var) { - isl_mat_free(cgbr->tab->basis); - cgbr->tab->basis = NULL; - } - cgbr->tab->n_zero = 0; - cgbr->tab->n_unbounded = 0; - } - - snap = isl_tab_snap(cgbr->tab); - - sample = isl_tab_sample(cgbr->tab); - - if (isl_tab_rollback(cgbr->tab, snap) < 0) { - isl_vec_free(sample); - return NULL; - } - - return sample; - } - - cone = isl_basic_set_dup(isl_tab_peek_bset(cgbr->cone)); - cone = drop_constant_terms(cone); - cone = isl_basic_set_update_from_tab(cone, cgbr->cone); - cone = isl_basic_set_underlying_set(cone); - cone = isl_basic_set_gauss(cone, NULL); - - bset = isl_basic_set_dup(isl_tab_peek_bset(cgbr->tab)); - bset = isl_basic_set_update_from_tab(bset, cgbr->tab); - bset = isl_basic_set_underlying_set(bset); - bset = isl_basic_set_gauss(bset, NULL); - - return isl_basic_set_sample_with_cone(bset, cone); -} - -static void check_gbr_integer_feasible(struct isl_context_gbr *cgbr) -{ - struct isl_vec *sample; - - if (!cgbr->tab) - return; - - if (cgbr->tab->empty) - return; - - sample = gbr_get_sample(cgbr); - if (!sample) - goto error; - - if (sample->size == 0) { - isl_vec_free(sample); - if (isl_tab_mark_empty(cgbr->tab) < 0) - goto error; - return; - } - - cgbr->tab = isl_tab_add_sample(cgbr->tab, sample); - - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static struct isl_tab *add_gbr_eq(struct isl_tab *tab, isl_int *eq) -{ - if (!tab) - return NULL; - - if (isl_tab_extend_cons(tab, 2) < 0) - goto error; - - if (isl_tab_add_eq(tab, eq) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -static void context_gbr_add_eq(struct isl_context *context, isl_int *eq, - int check, int update) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - - cgbr->tab = add_gbr_eq(cgbr->tab, eq); - - if (cgbr->cone && cgbr->cone->n_col != cgbr->cone->n_dead) { - if (isl_tab_extend_cons(cgbr->cone, 2) < 0) - goto error; - if (isl_tab_add_eq(cgbr->cone, eq) < 0) - goto error; - } - - if (check) { - int v = tab_has_valid_sample(cgbr->tab, eq, 1); - if (v < 0) - goto error; - if (!v) - check_gbr_integer_feasible(cgbr); - } - if (update) - cgbr->tab = check_samples(cgbr->tab, eq, 1); - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static void add_gbr_ineq(struct isl_context_gbr *cgbr, isl_int *ineq) -{ - if (!cgbr->tab) - return; - - if (isl_tab_extend_cons(cgbr->tab, 1) < 0) - goto error; - - if (isl_tab_add_ineq(cgbr->tab, ineq) < 0) - goto error; - - if (cgbr->shifted && !cgbr->shifted->empty && use_shifted(cgbr)) { - int i; - unsigned dim; - dim = isl_basic_map_total_dim(cgbr->tab->bmap); - - if (isl_tab_extend_cons(cgbr->shifted, 1) < 0) - goto error; - - for (i = 0; i < dim; ++i) { - if (!isl_int_is_neg(ineq[1 + i])) - continue; - isl_int_add(ineq[0], ineq[0], ineq[1 + i]); - } - - if (isl_tab_add_ineq(cgbr->shifted, ineq) < 0) - goto error; - - for (i = 0; i < dim; ++i) { - if (!isl_int_is_neg(ineq[1 + i])) - continue; - isl_int_sub(ineq[0], ineq[0], ineq[1 + i]); - } - } - - if (cgbr->cone && cgbr->cone->n_col != cgbr->cone->n_dead) { - if (isl_tab_extend_cons(cgbr->cone, 1) < 0) - goto error; - if (isl_tab_add_ineq(cgbr->cone, ineq) < 0) - goto error; - } - - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static void context_gbr_add_ineq(struct isl_context *context, isl_int *ineq, - int check, int update) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - - add_gbr_ineq(cgbr, ineq); - if (!cgbr->tab) - return; - - if (check) { - int v = tab_has_valid_sample(cgbr->tab, ineq, 0); - if (v < 0) - goto error; - if (!v) - check_gbr_integer_feasible(cgbr); - } - if (update) - cgbr->tab = check_samples(cgbr->tab, ineq, 0); - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static int context_gbr_add_ineq_wrap(void *user, isl_int *ineq) -{ - struct isl_context *context = (struct isl_context *)user; - context_gbr_add_ineq(context, ineq, 0, 0); - return context->op->is_ok(context) ? 0 : -1; -} - -static enum isl_tab_row_sign context_gbr_ineq_sign(struct isl_context *context, - isl_int *ineq, int strict) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - return tab_ineq_sign(cgbr->tab, ineq, strict); -} - -/* Check whether "ineq" can be added to the tableau without rendering - * it infeasible. - */ -static int context_gbr_test_ineq(struct isl_context *context, isl_int *ineq) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_tab_undo *snap; - struct isl_tab_undo *shifted_snap = NULL; - struct isl_tab_undo *cone_snap = NULL; - int feasible; - - if (!cgbr->tab) - return -1; - - if (isl_tab_extend_cons(cgbr->tab, 1) < 0) - return -1; - - snap = isl_tab_snap(cgbr->tab); - if (cgbr->shifted) - shifted_snap = isl_tab_snap(cgbr->shifted); - if (cgbr->cone) - cone_snap = isl_tab_snap(cgbr->cone); - add_gbr_ineq(cgbr, ineq); - check_gbr_integer_feasible(cgbr); - if (!cgbr->tab) - return -1; - feasible = !cgbr->tab->empty; - if (isl_tab_rollback(cgbr->tab, snap) < 0) - return -1; - if (shifted_snap) { - if (isl_tab_rollback(cgbr->shifted, shifted_snap)) - return -1; - } else if (cgbr->shifted) { - isl_tab_free(cgbr->shifted); - cgbr->shifted = NULL; - } - if (cone_snap) { - if (isl_tab_rollback(cgbr->cone, cone_snap)) - return -1; - } else if (cgbr->cone) { - isl_tab_free(cgbr->cone); - cgbr->cone = NULL; - } - - return feasible; -} - -/* Return the column of the last of the variables associated to - * a column that has a non-zero coefficient. - * This function is called in a context where only coefficients - * of parameters or divs can be non-zero. - */ -static int last_non_zero_var_col(struct isl_tab *tab, isl_int *p) -{ - int i; - int col; - - if (tab->n_var == 0) - return -1; - - for (i = tab->n_var - 1; i >= 0; --i) { - if (i >= tab->n_param && i < tab->n_var - tab->n_div) - continue; - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (!isl_int_is_zero(p[col])) - return col; - } - - return -1; -} - -/* Look through all the recently added equalities in the context - * to see if we can propagate any of them to the main tableau. - * - * The newly added equalities in the context are encoded as pairs - * of inequalities starting at inequality "first". - * - * We tentatively add each of these equalities to the main tableau - * and if this happens to result in a row with a final coefficient - * that is one or negative one, we use it to kill a column - * in the main tableau. Otherwise, we discard the tentatively - * added row. - */ -static void propagate_equalities(struct isl_context_gbr *cgbr, - struct isl_tab *tab, unsigned first) -{ - int i; - struct isl_vec *eq = NULL; - - eq = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!eq) - goto error; - - if (isl_tab_extend_cons(tab, (cgbr->tab->bmap->n_ineq - first)/2) < 0) - goto error; - - isl_seq_clr(eq->el + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - for (i = first; i < cgbr->tab->bmap->n_ineq; i += 2) { - int j; - int r; - struct isl_tab_undo *snap; - snap = isl_tab_snap(tab); - - isl_seq_cpy(eq->el, cgbr->tab->bmap->ineq[i], 1 + tab->n_param); - isl_seq_cpy(eq->el + 1 + tab->n_var - tab->n_div, - cgbr->tab->bmap->ineq[i] + 1 + tab->n_param, - tab->n_div); - - r = isl_tab_add_row(tab, eq->el); - if (r < 0) - goto error; - r = tab->con[r].index; - j = last_non_zero_var_col(tab, tab->mat->row[r] + 2 + tab->M); - if (j < 0 || j < tab->n_dead || - !isl_int_is_one(tab->mat->row[r][0]) || - (!isl_int_is_one(tab->mat->row[r][2 + tab->M + j]) && - !isl_int_is_negone(tab->mat->row[r][2 + tab->M + j]))) { - if (isl_tab_rollback(tab, snap) < 0) - goto error; - continue; - } - if (isl_tab_pivot(tab, r, j) < 0) - goto error; - if (isl_tab_kill_col(tab, j) < 0) - goto error; - - if (restore_lexmin(tab) < 0) - goto error; - } - - isl_vec_free(eq); - - return; -error: - isl_vec_free(eq); - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static int context_gbr_detect_equalities(struct isl_context *context, - struct isl_tab *tab) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_ctx *ctx; - unsigned n_ineq; - - ctx = cgbr->tab->mat->ctx; - - if (!cgbr->cone) { - struct isl_basic_set *bset = isl_tab_peek_bset(cgbr->tab); - cgbr->cone = isl_tab_from_recession_cone(bset, 0); - if (!cgbr->cone) - goto error; - if (isl_tab_track_bset(cgbr->cone, isl_basic_set_dup(bset)) < 0) - goto error; - } - if (isl_tab_detect_implicit_equalities(cgbr->cone) < 0) - goto error; - - n_ineq = cgbr->tab->bmap->n_ineq; - cgbr->tab = isl_tab_detect_equalities(cgbr->tab, cgbr->cone); - if (cgbr->tab && cgbr->tab->bmap->n_ineq > n_ineq) - propagate_equalities(cgbr, tab, n_ineq); - - return 0; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; - return -1; -} - -static int context_gbr_get_div(struct isl_context *context, struct isl_tab *tab, - struct isl_vec *div) -{ - return get_div(tab, context, div); -} - -static int context_gbr_add_div(struct isl_context *context, struct isl_vec *div) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (cgbr->cone) { - int k; - - if (isl_tab_extend_cons(cgbr->cone, 3) < 0) - return -1; - if (isl_tab_extend_vars(cgbr->cone, 1) < 0) - return -1; - if (isl_tab_allocate_var(cgbr->cone) <0) - return -1; - - cgbr->cone->bmap = isl_basic_map_extend_dim(cgbr->cone->bmap, - isl_basic_map_get_dim(cgbr->cone->bmap), 1, 0, 2); - k = isl_basic_map_alloc_div(cgbr->cone->bmap); - if (k < 0) - return -1; - isl_seq_cpy(cgbr->cone->bmap->div[k], div->el, div->size); - if (isl_tab_push(cgbr->cone, isl_tab_undo_bmap_div) < 0) - return -1; - } - return context_tab_add_div(cgbr->tab, div, - context_gbr_add_ineq_wrap, context); -} - -static int context_gbr_best_split(struct isl_context *context, - struct isl_tab *tab) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_tab_undo *snap; - int r; - - snap = isl_tab_snap(cgbr->tab); - r = best_split(tab, cgbr->tab); - - if (r >= 0 && isl_tab_rollback(cgbr->tab, snap) < 0) - return -1; - - return r; -} - -static int context_gbr_is_empty(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (!cgbr->tab) - return -1; - return cgbr->tab->empty; -} - -struct isl_gbr_tab_undo { - struct isl_tab_undo *tab_snap; - struct isl_tab_undo *shifted_snap; - struct isl_tab_undo *cone_snap; -}; - -static void *context_gbr_save(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_gbr_tab_undo *snap; - - snap = isl_alloc_type(cgbr->tab->mat->ctx, struct isl_gbr_tab_undo); - if (!snap) - return NULL; - - snap->tab_snap = isl_tab_snap(cgbr->tab); - if (isl_tab_save_samples(cgbr->tab) < 0) - goto error; - - if (cgbr->shifted) - snap->shifted_snap = isl_tab_snap(cgbr->shifted); - else - snap->shifted_snap = NULL; - - if (cgbr->cone) - snap->cone_snap = isl_tab_snap(cgbr->cone); - else - snap->cone_snap = NULL; - - return snap; -error: - free(snap); - return NULL; -} - -static void context_gbr_restore(struct isl_context *context, void *save) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_gbr_tab_undo *snap = (struct isl_gbr_tab_undo *)save; - if (!snap) - goto error; - if (isl_tab_rollback(cgbr->tab, snap->tab_snap) < 0) { - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; - } - - if (snap->shifted_snap) { - if (isl_tab_rollback(cgbr->shifted, snap->shifted_snap) < 0) - goto error; - } else if (cgbr->shifted) { - isl_tab_free(cgbr->shifted); - cgbr->shifted = NULL; - } - - if (snap->cone_snap) { - if (isl_tab_rollback(cgbr->cone, snap->cone_snap) < 0) - goto error; - } else if (cgbr->cone) { - isl_tab_free(cgbr->cone); - cgbr->cone = NULL; - } - - free(snap); - - return; -error: - free(snap); - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static int context_gbr_is_ok(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - return !!cgbr->tab; -} - -static void context_gbr_invalidate(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static void context_gbr_free(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - isl_tab_free(cgbr->tab); - isl_tab_free(cgbr->shifted); - isl_tab_free(cgbr->cone); - free(cgbr); -} - -struct isl_context_op isl_context_gbr_op = { - context_gbr_detect_nonnegative_parameters, - context_gbr_peek_basic_set, - context_gbr_peek_tab, - context_gbr_add_eq, - context_gbr_add_ineq, - context_gbr_ineq_sign, - context_gbr_test_ineq, - context_gbr_get_div, - context_gbr_add_div, - context_gbr_detect_equalities, - context_gbr_best_split, - context_gbr_is_empty, - context_gbr_is_ok, - context_gbr_save, - context_gbr_restore, - context_gbr_invalidate, - context_gbr_free, -}; - -static struct isl_context *isl_context_gbr_alloc(struct isl_basic_set *dom) -{ - struct isl_context_gbr *cgbr; - - if (!dom) - return NULL; - - cgbr = isl_calloc_type(dom->ctx, struct isl_context_gbr); - if (!cgbr) - return NULL; - - cgbr->context.op = &isl_context_gbr_op; - - cgbr->shifted = NULL; - cgbr->cone = NULL; - cgbr->tab = isl_tab_from_basic_set(dom); - cgbr->tab = isl_tab_init_samples(cgbr->tab); - if (!cgbr->tab) - goto error; - if (isl_tab_track_bset(cgbr->tab, - isl_basic_set_cow(isl_basic_set_copy(dom))) < 0) - goto error; - check_gbr_integer_feasible(cgbr); - - return &cgbr->context; -error: - cgbr->context.op->free(&cgbr->context); - return NULL; -} - -static struct isl_context *isl_context_alloc(struct isl_basic_set *dom) -{ - if (!dom) - return NULL; - - if (dom->ctx->opt->context == ISL_CONTEXT_LEXMIN) - return isl_context_lex_alloc(dom); - else - return isl_context_gbr_alloc(dom); -} - -/* Construct an isl_sol_map structure for accumulating the solution. - * If track_empty is set, then we also keep track of the parts - * of the context where there is no solution. - * If max is set, then we are solving a maximization, rather than - * a minimization problem, which means that the variables in the - * tableau have value "M - x" rather than "M + x". - */ -static struct isl_sol_map *sol_map_init(struct isl_basic_map *bmap, - struct isl_basic_set *dom, int track_empty, int max) -{ - struct isl_sol_map *sol_map = NULL; - - if (!bmap) - goto error; - - sol_map = isl_calloc_type(bmap->ctx, struct isl_sol_map); - if (!sol_map) - goto error; - - sol_map->sol.rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - sol_map->sol.dec_level.callback.run = &sol_dec_level_wrap; - sol_map->sol.dec_level.sol = &sol_map->sol; - sol_map->sol.max = max; - sol_map->sol.n_out = isl_basic_map_dim(bmap, isl_dim_out); - sol_map->sol.add = &sol_map_add_wrap; - sol_map->sol.add_empty = track_empty ? &sol_map_add_empty_wrap : NULL; - sol_map->sol.free = &sol_map_free_wrap; - sol_map->map = isl_map_alloc_dim(isl_basic_map_get_dim(bmap), 1, - ISL_MAP_DISJOINT); - if (!sol_map->map) - goto error; - - sol_map->sol.context = isl_context_alloc(dom); - if (!sol_map->sol.context) - goto error; - - if (track_empty) { - sol_map->empty = isl_set_alloc_dim(isl_basic_set_get_dim(dom), - 1, ISL_SET_DISJOINT); - if (!sol_map->empty) - goto error; - } - - isl_basic_set_free(dom); - return sol_map; -error: - isl_basic_set_free(dom); - sol_map_free(sol_map); - return NULL; -} - -/* Check whether all coefficients of (non-parameter) variables - * are non-positive, meaning that no pivots can be performed on the row. - */ -static int is_critical(struct isl_tab *tab, int row) -{ - int j; - unsigned off = 2 + tab->M; - - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (tab->col_var[j] >= 0 && - (tab->col_var[j] < tab->n_param || - tab->col_var[j] >= tab->n_var - tab->n_div)) - continue; - - if (isl_int_is_pos(tab->mat->row[row][off + j])) - return 0; - } - - return 1; -} - -/* Check whether the inequality represented by vec is strict over the integers, - * i.e., there are no integer values satisfying the constraint with - * equality. This happens if the gcd of the coefficients is not a divisor - * of the constant term. If so, scale the constraint down by the gcd - * of the coefficients. - */ -static int is_strict(struct isl_vec *vec) -{ - isl_int gcd; - int strict = 0; - - isl_int_init(gcd); - isl_seq_gcd(vec->el + 1, vec->size - 1, &gcd); - if (!isl_int_is_one(gcd)) { - strict = !isl_int_is_divisible_by(vec->el[0], gcd); - isl_int_fdiv_q(vec->el[0], vec->el[0], gcd); - isl_seq_scale_down(vec->el + 1, vec->el + 1, gcd, vec->size-1); - } - isl_int_clear(gcd); - - return strict; -} - -/* Determine the sign of the given row of the main tableau. - * The result is one of - * isl_tab_row_pos: always non-negative; no pivot needed - * isl_tab_row_neg: always non-positive; pivot - * isl_tab_row_any: can be both positive and negative; split - * - * We first handle some simple cases - * - the row sign may be known already - * - the row may be obviously non-negative - * - the parametric constant may be equal to that of another row - * for which we know the sign. This sign will be either "pos" or - * "any". If it had been "neg" then we would have pivoted before. - * - * If none of these cases hold, we check the value of the row for each - * of the currently active samples. Based on the signs of these values - * we make an initial determination of the sign of the row. - * - * all zero -> unk(nown) - * all non-negative -> pos - * all non-positive -> neg - * both negative and positive -> all - * - * If we end up with "all", we are done. - * Otherwise, we perform a check for positive and/or negative - * values as follows. - * - * samples neg unk pos - * <0 ? Y N Y N - * pos any pos - * >0 ? Y N Y N - * any neg any neg - * - * There is no special sign for "zero", because we can usually treat zero - * as either non-negative or non-positive, whatever works out best. - * However, if the row is "critical", meaning that pivoting is impossible - * then we don't want to limp zero with the non-positive case, because - * then we we would lose the solution for those values of the parameters - * where the value of the row is zero. Instead, we treat 0 as non-negative - * ensuring a split if the row can attain both zero and negative values. - * The same happens when the original constraint was one that could not - * be satisfied with equality by any integer values of the parameters. - * In this case, we normalize the constraint, but then a value of zero - * for the normalized constraint is actually a positive value for the - * original constraint, so again we need to treat zero as non-negative. - * In both these cases, we have the following decision tree instead: - * - * all non-negative -> pos - * all negative -> neg - * both negative and non-negative -> all - * - * samples neg pos - * <0 ? Y N - * any pos - * >=0 ? Y N - * any neg - */ -static enum isl_tab_row_sign row_sign(struct isl_tab *tab, - struct isl_sol *sol, int row) -{ - struct isl_vec *ineq = NULL; - enum isl_tab_row_sign res = isl_tab_row_unknown; - int critical; - int strict; - int row2; - - if (tab->row_sign[row] != isl_tab_row_unknown) - return tab->row_sign[row]; - if (is_obviously_nonneg(tab, row)) - return isl_tab_row_pos; - for (row2 = tab->n_redundant; row2 < tab->n_row; ++row2) { - if (tab->row_sign[row2] == isl_tab_row_unknown) - continue; - if (identical_parameter_line(tab, row, row2)) - return tab->row_sign[row2]; - } - - critical = is_critical(tab, row); - - ineq = get_row_parameter_ineq(tab, row); - if (!ineq) - goto error; - - strict = is_strict(ineq); - - res = sol->context->op->ineq_sign(sol->context, ineq->el, - critical || strict); - - if (res == isl_tab_row_unknown || res == isl_tab_row_pos) { - /* test for negative values */ - int feasible; - isl_seq_neg(ineq->el, ineq->el, ineq->size); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - feasible = sol->context->op->test_ineq(sol->context, ineq->el); - if (feasible < 0) - goto error; - if (!feasible) - res = isl_tab_row_pos; - else - res = (res == isl_tab_row_unknown) ? isl_tab_row_neg - : isl_tab_row_any; - if (res == isl_tab_row_neg) { - isl_seq_neg(ineq->el, ineq->el, ineq->size); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - } - } - - if (res == isl_tab_row_neg) { - /* test for positive values */ - int feasible; - if (!critical && !strict) - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - feasible = sol->context->op->test_ineq(sol->context, ineq->el); - if (feasible < 0) - goto error; - if (feasible) - res = isl_tab_row_any; - } - - isl_vec_free(ineq); - return res; -error: - isl_vec_free(ineq); - return isl_tab_row_unknown; -} - -static void find_solutions(struct isl_sol *sol, struct isl_tab *tab); - -/* Find solutions for values of the parameters that satisfy the given - * inequality. - * - * We currently take a snapshot of the context tableau that is reset - * when we return from this function, while we make a copy of the main - * tableau, leaving the original main tableau untouched. - * These are fairly arbitrary choices. Making a copy also of the context - * tableau would obviate the need to undo any changes made to it later, - * while taking a snapshot of the main tableau could reduce memory usage. - * If we were to switch to taking a snapshot of the main tableau, - * we would have to keep in mind that we need to save the row signs - * and that we need to do this before saving the current basis - * such that the basis has been restore before we restore the row signs. - */ -static void find_in_pos(struct isl_sol *sol, struct isl_tab *tab, isl_int *ineq) -{ - void *saved; - - if (!sol->context) - goto error; - saved = sol->context->op->save(sol->context); - - tab = isl_tab_dup(tab); - if (!tab) - goto error; - - sol->context->op->add_ineq(sol->context, ineq, 0, 1); - - find_solutions(sol, tab); - - if (!sol->error) - sol->context->op->restore(sol->context, saved); - return; -error: - sol->error = 1; -} - -/* Record the absence of solutions for those values of the parameters - * that do not satisfy the given inequality with equality. - */ -static void no_sol_in_strict(struct isl_sol *sol, - struct isl_tab *tab, struct isl_vec *ineq) -{ - int empty; - void *saved; - - if (!sol->context || sol->error) - goto error; - saved = sol->context->op->save(sol->context); - - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - sol->context->op->add_ineq(sol->context, ineq->el, 1, 0); - if (!sol->context) - goto error; - - empty = tab->empty; - tab->empty = 1; - sol_add(sol, tab); - tab->empty = empty; - - isl_int_add_ui(ineq->el[0], ineq->el[0], 1); - - sol->context->op->restore(sol->context, saved); - return; -error: - sol->error = 1; -} - -/* Compute the lexicographic minimum of the set represented by the main - * tableau "tab" within the context "sol->context_tab". - * On entry the sample value of the main tableau is lexicographically - * less than or equal to this lexicographic minimum. - * Pivots are performed until a feasible point is found, which is then - * necessarily equal to the minimum, or until the tableau is found to - * be infeasible. Some pivots may need to be performed for only some - * feasible values of the context tableau. If so, the context tableau - * is split into a part where the pivot is needed and a part where it is not. - * - * Whenever we enter the main loop, the main tableau is such that no - * "obvious" pivots need to be performed on it, where "obvious" means - * that the given row can be seen to be negative without looking at - * the context tableau. In particular, for non-parametric problems, - * no pivots need to be performed on the main tableau. - * The caller of find_solutions is responsible for making this property - * hold prior to the first iteration of the loop, while restore_lexmin - * is called before every other iteration. - * - * Inside the main loop, we first examine the signs of the rows of - * the main tableau within the context of the context tableau. - * If we find a row that is always non-positive for all values of - * the parameters satisfying the context tableau and negative for at - * least one value of the parameters, we perform the appropriate pivot - * and start over. An exception is the case where no pivot can be - * performed on the row. In this case, we require that the sign of - * the row is negative for all values of the parameters (rather than just - * non-positive). This special case is handled inside row_sign, which - * will say that the row can have any sign if it determines that it can - * attain both negative and zero values. - * - * If we can't find a row that always requires a pivot, but we can find - * one or more rows that require a pivot for some values of the parameters - * (i.e., the row can attain both positive and negative signs), then we split - * the context tableau into two parts, one where we force the sign to be - * non-negative and one where we force is to be negative. - * The non-negative part is handled by a recursive call (through find_in_pos). - * Upon returning from this call, we continue with the negative part and - * perform the required pivot. - * - * If no such rows can be found, all rows are non-negative and we have - * found a (rational) feasible point. If we only wanted a rational point - * then we are done. - * Otherwise, we check if all values of the sample point of the tableau - * are integral for the variables. If so, we have found the minimal - * integral point and we are done. - * If the sample point is not integral, then we need to make a distinction - * based on whether the constant term is non-integral or the coefficients - * of the parameters. Furthermore, in order to decide how to handle - * the non-integrality, we also need to know whether the coefficients - * of the other columns in the tableau are integral. This leads - * to the following table. The first two rows do not correspond - * to a non-integral sample point and are only mentioned for completeness. - * - * constant parameters other - * - * int int int | - * int int rat | -> no problem - * - * rat int int -> fail - * - * rat int rat -> cut - * - * int rat rat | - * rat rat rat | -> parametric cut - * - * int rat int | - * rat rat int | -> split context - * - * If the parametric constant is completely integral, then there is nothing - * to be done. If the constant term is non-integral, but all the other - * coefficient are integral, then there is nothing that can be done - * and the tableau has no integral solution. - * If, on the other hand, one or more of the other columns have rational - * coefficients, but the parameter coefficients are all integral, then - * we can perform a regular (non-parametric) cut. - * Finally, if there is any parameter coefficient that is non-integral, - * then we need to involve the context tableau. There are two cases here. - * If at least one other column has a rational coefficient, then we - * can perform a parametric cut in the main tableau by adding a new - * integer division in the context tableau. - * If all other columns have integral coefficients, then we need to - * enforce that the rational combination of parameters (c + \sum a_i y_i)/m - * is always integral. We do this by introducing an integer division - * q = floor((c + \sum a_i y_i)/m) and stipulating that its argument should - * always be integral in the context tableau, i.e., m q = c + \sum a_i y_i. - * Since q is expressed in the tableau as - * c + \sum a_i y_i - m q >= 0 - * -c - \sum a_i y_i + m q + m - 1 >= 0 - * it is sufficient to add the inequality - * -c - \sum a_i y_i + m q >= 0 - * In the part of the context where this inequality does not hold, the - * main tableau is marked as being empty. - */ -static void find_solutions(struct isl_sol *sol, struct isl_tab *tab) -{ - struct isl_context *context; - int r; - - if (!tab || sol->error) - goto error; - - context = sol->context; - - if (tab->empty) - goto done; - if (context->op->is_empty(context)) - goto done; - - for (r = 0; r >= 0 && tab && !tab->empty; r = restore_lexmin(tab)) { - int flags; - int row; - enum isl_tab_row_sign sgn; - int split = -1; - int n_split = 0; - - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - sgn = row_sign(tab, sol, row); - if (!sgn) - goto error; - tab->row_sign[row] = sgn; - if (sgn == isl_tab_row_any) - n_split++; - if (sgn == isl_tab_row_any && split == -1) - split = row; - if (sgn == isl_tab_row_neg) - break; - } - if (row < tab->n_row) - continue; - if (split != -1) { - struct isl_vec *ineq; - if (n_split != 1) - split = context->op->best_split(context, tab); - if (split < 0) - goto error; - ineq = get_row_parameter_ineq(tab, split); - if (!ineq) - goto error; - is_strict(ineq); - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (tab->row_sign[row] == isl_tab_row_any) - tab->row_sign[row] = isl_tab_row_unknown; - } - tab->row_sign[split] = isl_tab_row_pos; - sol_inc_level(sol); - find_in_pos(sol, tab, ineq->el); - tab->row_sign[split] = isl_tab_row_neg; - row = split; - isl_seq_neg(ineq->el, ineq->el, ineq->size); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - if (!sol->error) - context->op->add_ineq(context, ineq->el, 0, 1); - isl_vec_free(ineq); - if (sol->error) - goto error; - continue; - } - if (tab->rational) - break; - row = first_non_integer_row(tab, &flags); - if (row < 0) - break; - if (ISL_FL_ISSET(flags, I_PAR)) { - if (ISL_FL_ISSET(flags, I_VAR)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - break; - } - row = add_cut(tab, row); - } else if (ISL_FL_ISSET(flags, I_VAR)) { - struct isl_vec *div; - struct isl_vec *ineq; - int d; - div = get_row_split_div(tab, row); - if (!div) - goto error; - d = context->op->get_div(context, tab, div); - isl_vec_free(div); - if (d < 0) - goto error; - ineq = ineq_for_div(context->op->peek_basic_set(context), d); - if (!ineq) - goto error; - sol_inc_level(sol); - no_sol_in_strict(sol, tab, ineq); - isl_seq_neg(ineq->el, ineq->el, ineq->size); - context->op->add_ineq(context, ineq->el, 1, 1); - isl_vec_free(ineq); - if (sol->error || !context->op->is_ok(context)) - goto error; - tab = set_row_cst_to_div(tab, row, d); - if (context->op->is_empty(context)) - break; - } else - row = add_parametric_cut(tab, row, context); - if (row < 0) - goto error; - } - if (r < 0) - goto error; -done: - sol_add(sol, tab); - isl_tab_free(tab); - return; -error: - isl_tab_free(tab); - sol->error = 1; -} - -/* Compute the lexicographic minimum of the set represented by the main - * tableau "tab" within the context "sol->context_tab". - * - * As a preprocessing step, we first transfer all the purely parametric - * equalities from the main tableau to the context tableau, i.e., - * parameters that have been pivoted to a row. - * These equalities are ignored by the main algorithm, because the - * corresponding rows may not be marked as being non-negative. - * In parts of the context where the added equality does not hold, - * the main tableau is marked as being empty. - */ -static void find_solutions_main(struct isl_sol *sol, struct isl_tab *tab) -{ - int row; - - if (!tab) - goto error; - - sol->level = 0; - - for (row = tab->n_redundant; row < tab->n_row; ++row) { - int p; - struct isl_vec *eq; - - if (tab->row_var[row] < 0) - continue; - if (tab->row_var[row] >= tab->n_param && - tab->row_var[row] < tab->n_var - tab->n_div) - continue; - if (tab->row_var[row] < tab->n_param) - p = tab->row_var[row]; - else - p = tab->row_var[row] - + tab->n_param - (tab->n_var - tab->n_div); - - eq = isl_vec_alloc(tab->mat->ctx, 1+tab->n_param+tab->n_div); - if (!eq) - goto error; - get_row_parameter_line(tab, row, eq->el); - isl_int_neg(eq->el[1 + p], tab->mat->row[row][0]); - eq = isl_vec_normalize(eq); - - sol_inc_level(sol); - no_sol_in_strict(sol, tab, eq); - - isl_seq_neg(eq->el, eq->el, eq->size); - sol_inc_level(sol); - no_sol_in_strict(sol, tab, eq); - isl_seq_neg(eq->el, eq->el, eq->size); - - sol->context->op->add_eq(sol->context, eq->el, 1, 1); - - isl_vec_free(eq); - - if (isl_tab_mark_redundant(tab, row) < 0) - goto error; - - if (sol->context->op->is_empty(sol->context)) - break; - - row = tab->n_redundant - 1; - } - - find_solutions(sol, tab); - - sol->level = 0; - sol_pop(sol); - - return; -error: - isl_tab_free(tab); - sol->error = 1; -} - -static void sol_map_find_solutions(struct isl_sol_map *sol_map, - struct isl_tab *tab) -{ - find_solutions_main(&sol_map->sol, tab); -} - -/* Check if integer division "div" of "dom" also occurs in "bmap". - * If so, return its position within the divs. - * If not, return -1. - */ -static int find_context_div(struct isl_basic_map *bmap, - struct isl_basic_set *dom, unsigned div) -{ - int i; - unsigned b_dim = isl_dim_total(bmap->dim); - unsigned d_dim = isl_dim_total(dom->dim); - - if (isl_int_is_zero(dom->div[div][0])) - return -1; - if (isl_seq_first_non_zero(dom->div[div] + 2 + d_dim, dom->n_div) != -1) - return -1; - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_seq_first_non_zero(bmap->div[i] + 2 + d_dim, - (b_dim - d_dim) + bmap->n_div) != -1) - continue; - if (isl_seq_eq(bmap->div[i], dom->div[div], 2 + d_dim)) - return i; - } - return -1; -} - -/* The correspondence between the variables in the main tableau, - * the context tableau, and the input map and domain is as follows. - * The first n_param and the last n_div variables of the main tableau - * form the variables of the context tableau. - * In the basic map, these n_param variables correspond to the - * parameters and the input dimensions. In the domain, they correspond - * to the parameters and the set dimensions. - * The n_div variables correspond to the integer divisions in the domain. - * To ensure that everything lines up, we may need to copy some of the - * integer divisions of the domain to the map. These have to be placed - * in the same order as those in the context and they have to be placed - * after any other integer divisions that the map may have. - * This function performs the required reordering. - */ -static struct isl_basic_map *align_context_divs(struct isl_basic_map *bmap, - struct isl_basic_set *dom) -{ - int i; - int common = 0; - int other; - - for (i = 0; i < dom->n_div; ++i) - if (find_context_div(bmap, dom, i) != -1) - common++; - other = bmap->n_div - common; - if (dom->n_div - common > 0) { - bmap = isl_basic_map_extend_dim(bmap, isl_dim_copy(bmap->dim), - dom->n_div - common, 0, 0); - if (!bmap) - return NULL; - } - for (i = 0; i < dom->n_div; ++i) { - int pos = find_context_div(bmap, dom, i); - if (pos < 0) { - pos = isl_basic_map_alloc_div(bmap); - if (pos < 0) - goto error; - isl_int_set_si(bmap->div[pos][0], 0); - } - if (pos != other + i) - isl_basic_map_swap_div(bmap, pos, other + i); - } - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Base case of isl_tab_basic_map_partial_lexopt, after removing - * some obvious symmetries. - * - * We make sure the divs in the domain are properly ordered, - * because they will be added one by one in the given order - * during the construction of the solution map. - */ -static __isl_give isl_map *basic_map_partial_lexopt_base( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - isl_map *result = NULL; - struct isl_tab *tab; - struct isl_sol_map *sol_map = NULL; - struct isl_context *context; - - if (dom->n_div) { - dom = isl_basic_set_order_divs(dom); - bmap = align_context_divs(bmap, dom); - } - sol_map = sol_map_init(bmap, dom, !!empty, max); - if (!sol_map) - goto error; - - context = sol_map->sol.context; - if (isl_basic_set_plain_is_empty(context->op->peek_basic_set(context))) - /* nothing */; - else if (isl_basic_map_plain_is_empty(bmap)) - sol_map_add_empty_if_needed(sol_map, - isl_basic_set_copy(context->op->peek_basic_set(context))); - else { - tab = tab_for_lexmin(bmap, - context->op->peek_basic_set(context), 1, max); - tab = context->op->detect_nonnegative_parameters(context, tab); - sol_map_find_solutions(sol_map, tab); - } - if (sol_map->sol.error) - goto error; - - result = isl_map_copy(sol_map->map); - if (empty) - *empty = isl_set_copy(sol_map->empty); - sol_free(&sol_map->sol); - isl_basic_map_free(bmap); - return result; -error: - sol_free(&sol_map->sol); - isl_basic_map_free(bmap); - return NULL; -} - -/* Structure used during detection of parallel constraints. - * n_in: number of "input" variables: isl_dim_param + isl_dim_in - * n_out: number of "output" variables: isl_dim_out + isl_dim_div - * val: the coefficients of the output variables - */ -struct isl_constraint_equal_info { - isl_basic_map *bmap; - unsigned n_in; - unsigned n_out; - isl_int *val; -}; - -/* Check whether the coefficients of the output variables - * of the constraint in "entry" are equal to info->val. - */ -static int constraint_equal(const void *entry, const void *val) -{ - isl_int **row = (isl_int **)entry; - const struct isl_constraint_equal_info *info = val; - - return isl_seq_eq((*row) + 1 + info->n_in, info->val, info->n_out); -} - -/* Check whether "bmap" has a pair of constraints that have - * the same coefficients for the output variables. - * Note that the coefficients of the existentially quantified - * variables need to be zero since the existentially quantified - * of the result are usually not the same as those of the input. - * the isl_dim_out and isl_dim_div dimensions. - * If so, return 1 and return the row indices of the two constraints - * in *first and *second. - */ -static int parallel_constraints(__isl_keep isl_basic_map *bmap, - int *first, int *second) -{ - int i; - isl_ctx *ctx = isl_basic_map_get_ctx(bmap); - struct isl_hash_table *table = NULL; - struct isl_hash_table_entry *entry; - struct isl_constraint_equal_info info; - unsigned n_out; - unsigned n_div; - - ctx = isl_basic_map_get_ctx(bmap); - table = isl_hash_table_alloc(ctx, bmap->n_ineq); - if (!table) - goto error; - - info.n_in = isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in); - info.bmap = bmap; - n_out = isl_basic_map_dim(bmap, isl_dim_out); - n_div = isl_basic_map_dim(bmap, isl_dim_div); - info.n_out = n_out + n_div; - for (i = 0; i < bmap->n_ineq; ++i) { - uint32_t hash; - - info.val = bmap->ineq[i] + 1 + info.n_in; - if (isl_seq_first_non_zero(info.val, n_out) < 0) - continue; - if (isl_seq_first_non_zero(info.val + n_out, n_div) >= 0) - continue; - hash = isl_seq_get_hash(info.val, info.n_out); - entry = isl_hash_table_find(ctx, table, hash, - constraint_equal, &info, 1); - if (!entry) - goto error; - if (entry->data) - break; - entry->data = &bmap->ineq[i]; - } - - if (i < bmap->n_ineq) { - *first = ((isl_int **)entry->data) - bmap->ineq; - *second = i; - } - - isl_hash_table_free(ctx, table); - - return i < bmap->n_ineq; -error: - isl_hash_table_free(ctx, table); - return -1; -} - -/* Given a set of upper bounds on the last "input" variable m, - * construct a set that assigns the minimal upper bound to m, i.e., - * construct a set that divides the space into cells where one - * of the upper bounds is smaller than all the others and assign - * this upper bound to m. - * - * In particular, if there are n bounds b_i, then the result - * consists of n basic sets, each one of the form - * - * m = b_i - * b_i <= b_j for j > i - * b_i < b_j for j < i - */ -static __isl_give isl_set *set_minimum(__isl_take isl_dim *dim, - __isl_take isl_mat *var) -{ - int i, j, k; - isl_basic_set *bset = NULL; - isl_ctx *ctx; - isl_set *set = NULL; - - if (!dim || !var) - goto error; - - ctx = isl_dim_get_ctx(dim); - set = isl_set_alloc_dim(isl_dim_copy(dim), - var->n_row, ISL_SET_DISJOINT); - - for (i = 0; i < var->n_row; ++i) { - bset = isl_basic_set_alloc_dim(isl_dim_copy(dim), 0, - 1, var->n_row - 1); - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k], var->row[i], var->n_col); - isl_int_set_si(bset->eq[k][var->n_col], -1); - for (j = 0; j < var->n_row; ++j) { - if (j == i) - continue; - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_combine(bset->ineq[k], ctx->one, var->row[j], - ctx->negone, var->row[i], - var->n_col); - isl_int_set_si(bset->ineq[k][var->n_col], 0); - if (j < i) - isl_int_sub_ui(bset->ineq[k][0], - bset->ineq[k][0], 1); - } - bset = isl_basic_set_finalize(bset); - set = isl_set_add_basic_set(set, bset); - } - - isl_dim_free(dim); - isl_mat_free(var); - return set; -error: - isl_basic_set_free(bset); - isl_set_free(set); - isl_dim_free(dim); - isl_mat_free(var); - return NULL; -} - -/* Given that the last input variable of "bmap" represents the minimum - * of the bounds in "cst", check whether we need to split the domain - * based on which bound attains the minimum. - * - * A split is needed when the minimum appears in an integer division - * or in an equality. Otherwise, it is only needed if it appears in - * an upper bound that is different from the upper bounds on which it - * is defined. - */ -static int need_split_map(__isl_keep isl_basic_map *bmap, - __isl_keep isl_mat *cst) -{ - int i, j; - unsigned total; - unsigned pos; - - pos = cst->n_col - 1; - total = isl_basic_map_dim(bmap, isl_dim_all); - - for (i = 0; i < bmap->n_div; ++i) - if (!isl_int_is_zero(bmap->div[i][2 + pos])) - return 1; - - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][1 + pos])) - return 1; - - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_int_is_nonneg(bmap->ineq[i][1 + pos])) - continue; - if (!isl_int_is_negone(bmap->ineq[i][1 + pos])) - return 1; - if (isl_seq_first_non_zero(bmap->ineq[i] + 1 + pos + 1, - total - pos - 1) >= 0) - return 1; - - for (j = 0; j < cst->n_row; ++j) - if (isl_seq_eq(bmap->ineq[i], cst->row[j], cst->n_col)) - break; - if (j >= cst->n_row) - return 1; - } - - return 0; -} - -static int need_split_set(__isl_keep isl_basic_set *bset, - __isl_keep isl_mat *cst) -{ - return need_split_map((isl_basic_map *)bset, cst); -} - -/* Given a set of which the last set variable is the minimum - * of the bounds in "cst", split each basic set in the set - * in pieces where one of the bounds is (strictly) smaller than the others. - * This subdivision is given in "min_expr". - * The variable is subsequently projected out. - * - * We only do the split when it is needed. - * For example if the last input variable m = min(a,b) and the only - * constraints in the given basic set are lower bounds on m, - * i.e., l <= m = min(a,b), then we can simply project out m - * to obtain l <= a and l <= b, without having to split on whether - * m is equal to a or b. - */ -static __isl_give isl_set *split(__isl_take isl_set *empty, - __isl_take isl_set *min_expr, __isl_take isl_mat *cst) -{ - int n_in; - int i; - isl_dim *dim; - isl_set *res; - - if (!empty || !min_expr || !cst) - goto error; - - n_in = isl_set_dim(empty, isl_dim_set); - dim = isl_set_get_dim(empty); - dim = isl_dim_drop(dim, isl_dim_set, n_in - 1, 1); - res = isl_set_empty(dim); - - for (i = 0; i < empty->n; ++i) { - isl_set *set; - - set = isl_set_from_basic_set(isl_basic_set_copy(empty->p[i])); - if (need_split_set(empty->p[i], cst)) - set = isl_set_intersect(set, isl_set_copy(min_expr)); - set = isl_set_remove_dims(set, isl_dim_set, n_in - 1, 1); - - res = isl_set_union_disjoint(res, set); - } - - isl_set_free(empty); - isl_set_free(min_expr); - isl_mat_free(cst); - return res; -error: - isl_set_free(empty); - isl_set_free(min_expr); - isl_mat_free(cst); - return NULL; -} - -/* Given a map of which the last input variable is the minimum - * of the bounds in "cst", split each basic set in the set - * in pieces where one of the bounds is (strictly) smaller than the others. - * This subdivision is given in "min_expr". - * The variable is subsequently projected out. - * - * The implementation is essentially the same as that of "split". - */ -static __isl_give isl_map *split_domain(__isl_take isl_map *opt, - __isl_take isl_set *min_expr, __isl_take isl_mat *cst) -{ - int n_in; - int i; - isl_dim *dim; - isl_map *res; - - if (!opt || !min_expr || !cst) - goto error; - - n_in = isl_map_dim(opt, isl_dim_in); - dim = isl_map_get_dim(opt); - dim = isl_dim_drop(dim, isl_dim_in, n_in - 1, 1); - res = isl_map_empty(dim); - - for (i = 0; i < opt->n; ++i) { - isl_map *map; - - map = isl_map_from_basic_map(isl_basic_map_copy(opt->p[i])); - if (need_split_map(opt->p[i], cst)) - map = isl_map_intersect_domain(map, - isl_set_copy(min_expr)); - map = isl_map_remove_dims(map, isl_dim_in, n_in - 1, 1); - - res = isl_map_union_disjoint(res, map); - } - - isl_map_free(opt); - isl_set_free(min_expr); - isl_mat_free(cst); - return res; -error: - isl_map_free(opt); - isl_set_free(min_expr); - isl_mat_free(cst); - return NULL; -} - -static __isl_give isl_map *basic_map_partial_lexopt( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max); - -/* Given a basic map with at least two parallel constraints (as found - * by the function parallel_constraints), first look for more constraints - * parallel to the two constraint and replace the found list of parallel - * constraints by a single constraint with as "input" part the minimum - * of the input parts of the list of constraints. Then, recursively call - * basic_map_partial_lexopt (possibly finding more parallel constraints) - * and plug in the definition of the minimum in the result. - * - * More specifically, given a set of constraints - * - * a x + b_i(p) >= 0 - * - * Replace this set by a single constraint - * - * a x + u >= 0 - * - * with u a new parameter with constraints - * - * u <= b_i(p) - * - * Any solution to the new system is also a solution for the original system - * since - * - * a x >= -u >= -b_i(p) - * - * Moreover, m = min_i(b_i(p)) satisfies the constraints on u and can - * therefore be plugged into the solution. - */ -static __isl_give isl_map *basic_map_partial_lexopt_symm( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, int first, int second) -{ - int i, n, k; - int *list = NULL; - unsigned n_in, n_out, n_div; - isl_ctx *ctx; - isl_vec *var = NULL; - isl_mat *cst = NULL; - isl_map *opt; - isl_set *min_expr; - isl_dim *map_dim, *set_dim; - - map_dim = isl_basic_map_get_dim(bmap); - set_dim = empty ? isl_basic_set_get_dim(dom) : NULL; - - n_in = isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_all) - n_in; - - ctx = isl_basic_map_get_ctx(bmap); - list = isl_alloc_array(ctx, int, bmap->n_ineq); - var = isl_vec_alloc(ctx, n_out); - if (!list || !var) - goto error; - - list[0] = first; - list[1] = second; - isl_seq_cpy(var->el, bmap->ineq[first] + 1 + n_in, n_out); - for (i = second + 1, n = 2; i < bmap->n_ineq; ++i) { - if (isl_seq_eq(var->el, bmap->ineq[i] + 1 + n_in, n_out)) - list[n++] = i; - } - - cst = isl_mat_alloc(ctx, n, 1 + n_in); - if (!cst) - goto error; - - for (i = 0; i < n; ++i) - isl_seq_cpy(cst->row[i], bmap->ineq[list[i]], 1 + n_in); - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - for (i = n - 1; i >= 0; --i) - if (isl_basic_map_drop_inequality(bmap, list[i]) < 0) - goto error; - - bmap = isl_basic_map_add(bmap, isl_dim_in, 1); - bmap = isl_basic_map_extend_constraints(bmap, 0, 1); - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], 1 + n_in); - isl_int_set_si(bmap->ineq[k][1 + n_in], 1); - isl_seq_cpy(bmap->ineq[k] + 1 + n_in + 1, var->el, n_out); - bmap = isl_basic_map_finalize(bmap); - - n_div = isl_basic_set_dim(dom, isl_dim_div); - dom = isl_basic_set_add(dom, isl_dim_set, 1); - dom = isl_basic_set_extend_constraints(dom, 0, n); - for (i = 0; i < n; ++i) { - k = isl_basic_set_alloc_inequality(dom); - if (k < 0) - goto error; - isl_seq_cpy(dom->ineq[k], cst->row[i], 1 + n_in); - isl_int_set_si(dom->ineq[k][1 + n_in], -1); - isl_seq_clr(dom->ineq[k] + 1 + n_in + 1, n_div); - } - - min_expr = set_minimum(isl_basic_set_get_dim(dom), isl_mat_copy(cst)); - - isl_vec_free(var); - free(list); - - opt = basic_map_partial_lexopt(bmap, dom, empty, max); - - if (empty) { - *empty = split(*empty, - isl_set_copy(min_expr), isl_mat_copy(cst)); - *empty = isl_set_reset_dim(*empty, set_dim); - } - - opt = split_domain(opt, min_expr, cst); - opt = isl_map_reset_dim(opt, map_dim); - - return opt; -error: - isl_dim_free(map_dim); - isl_dim_free(set_dim); - isl_mat_free(cst); - isl_vec_free(var); - free(list); - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -/* Recursive part of isl_tab_basic_map_partial_lexopt, after detecting - * equalities and removing redundant constraints. - * - * We first check if there are any parallel constraints (left). - * If not, we are in the base case. - * If there are parallel constraints, we replace them by a single - * constraint in basic_map_partial_lexopt_symm and then call - * this function recursively to look for more parallel constraints. - */ -static __isl_give isl_map *basic_map_partial_lexopt( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - int par = 0; - int first, second; - - if (!bmap) - goto error; - - if (bmap->ctx->opt->pip_symmetry) - par = parallel_constraints(bmap, &first, &second); - if (par < 0) - goto error; - if (!par) - return basic_map_partial_lexopt_base(bmap, dom, empty, max); - - return basic_map_partial_lexopt_symm(bmap, dom, empty, max, - first, second); -error: - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -/* Compute the lexicographic minimum (or maximum if "max" is set) - * of "bmap" over the domain "dom" and return the result as a map. - * If "empty" is not NULL, then *empty is assigned a set that - * contains those parts of the domain where there is no solution. - * If "bmap" is marked as rational (ISL_BASIC_MAP_RATIONAL), - * then we compute the rational optimum. Otherwise, we compute - * the integral optimum. - * - * We perform some preprocessing. As the PILP solver does not - * handle implicit equalities very well, we first make sure all - * the equalities are explicitly available. - * - * We also add context constraints to the basic map and remove - * redundant constraints. This is only needed because of the - * way we handle simple symmetries. In particular, we currently look - * for symmetries on the constraints, before we set up the main tableau. - * It is then no good to look for symmetries on possibly redundant constraints. - */ -struct isl_map *isl_tab_basic_map_partial_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - if (empty) - *empty = NULL; - if (!bmap || !dom) - goto error; - - isl_assert(bmap->ctx, - isl_basic_map_compatible_domain(bmap, dom), goto error); - - if (isl_basic_set_dim(dom, isl_dim_all) == 0) - return basic_map_partial_lexopt(bmap, dom, empty, max); - - bmap = isl_basic_map_intersect_domain(bmap, isl_basic_set_copy(dom)); - bmap = isl_basic_map_detect_equalities(bmap); - bmap = isl_basic_map_remove_redundancies(bmap); - - return basic_map_partial_lexopt(bmap, dom, empty, max); -error: - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_sol_for { - struct isl_sol sol; - int (*fn)(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user); - void *user; -}; - -static void sol_for_free(struct isl_sol_for *sol_for) -{ - if (sol_for->sol.context) - sol_for->sol.context->op->free(sol_for->sol.context); - free(sol_for); -} - -static void sol_for_free_wrap(struct isl_sol *sol) -{ - sol_for_free((struct isl_sol_for *)sol); -} - -/* Add the solution identified by the tableau and the context tableau. - * - * See documentation of sol_add for more details. - * - * Instead of constructing a basic map, this function calls a user - * defined function with the current context as a basic set and - * a list of affine expressions representing the relation between - * the input and output. The space over which the affine expressions - * are defined is the same as that of the domain. The number of - * affine expressions in the list is equal to the number of output variables. - */ -static void sol_for_add(struct isl_sol_for *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - int i; - isl_ctx *ctx; - isl_local_space *ls; - isl_aff *aff; - isl_aff_list *list; - - if (sol->sol.error || !dom || !M) - goto error; - - ctx = isl_basic_set_get_ctx(dom); - ls = isl_basic_set_get_local_space(dom); - list = isl_aff_list_alloc(ctx, M->n_row - 1); - for (i = 1; i < M->n_row; ++i) { - aff = isl_aff_alloc(isl_local_space_copy(ls)); - if (aff) { - isl_int_set_si(aff->v->el[0], 1); - isl_seq_cpy(aff->v->el + 1, M->row[i], M->n_col); - } - list = isl_aff_list_add(list, aff); - } - isl_local_space_free(ls); - - dom = isl_basic_set_finalize(dom); - - if (sol->fn(isl_basic_set_copy(dom), list, sol->user) < 0) - goto error; - - isl_basic_set_free(dom); - isl_mat_free(M); - return; -error: - isl_basic_set_free(dom); - isl_mat_free(M); - sol->sol.error = 1; -} - -static void sol_for_add_wrap(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - sol_for_add((struct isl_sol_for *)sol, dom, M); -} - -static struct isl_sol_for *sol_for_init(struct isl_basic_map *bmap, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - struct isl_sol_for *sol_for = NULL; - struct isl_dim *dom_dim; - struct isl_basic_set *dom = NULL; - - sol_for = isl_calloc_type(bmap->ctx, struct isl_sol_for); - if (!sol_for) - goto error; - - dom_dim = isl_dim_domain(isl_dim_copy(bmap->dim)); - dom = isl_basic_set_universe(dom_dim); - - sol_for->sol.rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - sol_for->sol.dec_level.callback.run = &sol_dec_level_wrap; - sol_for->sol.dec_level.sol = &sol_for->sol; - sol_for->fn = fn; - sol_for->user = user; - sol_for->sol.max = max; - sol_for->sol.n_out = isl_basic_map_dim(bmap, isl_dim_out); - sol_for->sol.add = &sol_for_add_wrap; - sol_for->sol.add_empty = NULL; - sol_for->sol.free = &sol_for_free_wrap; - - sol_for->sol.context = isl_context_alloc(dom); - if (!sol_for->sol.context) - goto error; - - isl_basic_set_free(dom); - return sol_for; -error: - isl_basic_set_free(dom); - sol_for_free(sol_for); - return NULL; -} - -static void sol_for_find_solutions(struct isl_sol_for *sol_for, - struct isl_tab *tab) -{ - find_solutions_main(&sol_for->sol, tab); -} - -int isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - struct isl_sol_for *sol_for = NULL; - - bmap = isl_basic_map_copy(bmap); - if (!bmap) - return -1; - - bmap = isl_basic_map_detect_equalities(bmap); - sol_for = sol_for_init(bmap, max, fn, user); - - if (isl_basic_map_plain_is_empty(bmap)) - /* nothing */; - else { - struct isl_tab *tab; - struct isl_context *context = sol_for->sol.context; - tab = tab_for_lexmin(bmap, - context->op->peek_basic_set(context), 1, max); - tab = context->op->detect_nonnegative_parameters(context, tab); - sol_for_find_solutions(sol_for, tab); - if (sol_for->sol.error) - goto error; - } - - sol_free(&sol_for->sol); - isl_basic_map_free(bmap); - return 0; -error: - sol_free(&sol_for->sol); - isl_basic_map_free(bmap); - return -1; -} - -int isl_basic_map_foreach_lexmin(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - return isl_basic_map_foreach_lexopt(bmap, 0, fn, user); -} - -int isl_basic_map_foreach_lexmax(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - return isl_basic_map_foreach_lexopt(bmap, 1, fn, user); -} - -int isl_basic_set_foreach_lexmax(__isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - return isl_basic_map_foreach_lexmax(bset, fn, user); -} - -/* Check if the given sequence of len variables starting at pos - * represents a trivial (i.e., zero) solution. - * The variables are assumed to be non-negative and to come in pairs, - * with each pair representing a variable of unrestricted sign. - * The solution is trivial if each such pair in the sequence consists - * of two identical values, meaning that the variable being represented - * has value zero. - */ -static int region_is_trivial(struct isl_tab *tab, int pos, int len) -{ - int i; - - if (len == 0) - return 0; - - for (i = 0; i < len; i += 2) { - int neg_row; - int pos_row; - - neg_row = tab->var[pos + i].is_row ? - tab->var[pos + i].index : -1; - pos_row = tab->var[pos + i + 1].is_row ? - tab->var[pos + i + 1].index : -1; - - if ((neg_row < 0 || - isl_int_is_zero(tab->mat->row[neg_row][1])) && - (pos_row < 0 || - isl_int_is_zero(tab->mat->row[pos_row][1]))) - continue; - - if (neg_row < 0 || pos_row < 0) - return 0; - if (isl_int_ne(tab->mat->row[neg_row][1], - tab->mat->row[pos_row][1])) - return 0; - } - - return 1; -} - -/* Return the index of the first trivial region or -1 if all regions - * are non-trivial. - */ -static int first_trivial_region(struct isl_tab *tab, - int n_region, struct isl_region *region) -{ - int i; - - for (i = 0; i < n_region; ++i) { - if (region_is_trivial(tab, region[i].pos, region[i].len)) - return i; - } - - return -1; -} - -/* Check if the solution is optimal, i.e., whether the first - * n_op entries are zero. - */ -static int is_optimal(__isl_keep isl_vec *sol, int n_op) -{ - int i; - - for (i = 0; i < n_op; ++i) - if (!isl_int_is_zero(sol->el[1 + i])) - return 0; - return 1; -} - -/* Add constraints to "tab" that ensure that any solution is significantly - * better that that represented by "sol". That is, find the first - * relevant (within first n_op) non-zero coefficient and force it (along - * with all previous coefficients) to be zero. - * If the solution is already optimal (all relevant coefficients are zero), - * then just mark the table as empty. - */ -static int force_better_solution(struct isl_tab *tab, - __isl_keep isl_vec *sol, int n_op) -{ - int i; - isl_ctx *ctx; - isl_vec *v = NULL; - - if (!sol) - return -1; - - for (i = 0; i < n_op; ++i) - if (!isl_int_is_zero(sol->el[1 + i])) - break; - - if (i == n_op) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - - ctx = isl_vec_get_ctx(sol); - v = isl_vec_alloc(ctx, 1 + tab->n_var); - if (!v) - return -1; - - for (; i >= 0; --i) { - v = isl_vec_clr(v); - isl_int_set_si(v->el[1 + i], -1); - if (add_lexmin_eq(tab, v->el) < 0) - goto error; - } - - isl_vec_free(v); - return 0; -error: - isl_vec_free(v); - return -1; -} - -struct isl_trivial { - int update; - int region; - int side; - struct isl_tab_undo *snap; -}; - -/* Return the lexicographically smallest non-trivial solution of the - * given ILP problem. - * - * All variables are assumed to be non-negative. - * - * n_op is the number of initial coordinates to optimize. - * That is, once a solution has been found, we will only continue looking - * for solution that result in significantly better values for those - * initial coordinates. That is, we only continue looking for solutions - * that increase the number of initial zeros in this sequence. - * - * A solution is non-trivial, if it is non-trivial on each of the - * specified regions. Each region represents a sequence of pairs - * of variables. A solution is non-trivial on such a region if - * at least one of these pairs consists of different values, i.e., - * such that the non-negative variable represented by the pair is non-zero. - * - * Whenever a conflict is encountered, all constraints involved are - * reported to the caller through a call to "conflict". - * - * We perform a simple branch-and-bound backtracking search. - * Each level in the search represents initially trivial region that is forced - * to be non-trivial. - * At each level we consider n cases, where n is the length of the region. - * In terms of the n/2 variables of unrestricted signs being encoded by - * the region, we consider the cases - * x_0 >= 1 - * x_0 <= -1 - * x_0 = 0 and x_1 >= 1 - * x_0 = 0 and x_1 <= -1 - * x_0 = 0 and x_1 = 0 and x_2 >= 1 - * x_0 = 0 and x_1 = 0 and x_2 <= -1 - * ... - * The cases are considered in this order, assuming that each pair - * x_i_a x_i_b represents the value x_i_b - x_i_a. - * That is, x_0 >= 1 is enforced by adding the constraint - * x_0_b - x_0_a >= 1 - */ -__isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin( - __isl_take isl_basic_set *bset, int n_op, int n_region, - struct isl_region *region, - int (*conflict)(int con, void *user), void *user) -{ - int i, j; - int r; - isl_ctx *ctx = isl_basic_set_get_ctx(bset); - isl_vec *v = NULL; - isl_vec *sol = isl_vec_alloc(ctx, 0); - struct isl_tab *tab; - struct isl_trivial *triv = NULL; - int level, init; - - tab = tab_for_lexmin(isl_basic_map_from_range(bset), NULL, 0, 0); - if (!tab) - goto error; - tab->conflict = conflict; - tab->conflict_user = user; - - v = isl_vec_alloc(ctx, 1 + tab->n_var); - triv = isl_calloc_array(ctx, struct isl_trivial, n_region); - if (!v || !triv) - goto error; - - level = 0; - init = 1; - - while (level >= 0) { - int side, base; - - if (init) { - tab = cut_to_integer_lexmin(tab); - if (!tab) - goto error; - if (tab->empty) - goto backtrack; - r = first_trivial_region(tab, n_region, region); - if (r < 0) { - for (i = 0; i < level; ++i) - triv[i].update = 1; - isl_vec_free(sol); - sol = isl_tab_get_sample_value(tab); - if (!sol) - goto error; - if (is_optimal(sol, n_op)) - break; - goto backtrack; - } - if (level >= n_region) - isl_die(ctx, isl_error_internal, - "nesting level too deep", goto error); - if (isl_tab_extend_cons(tab, - 2 * region[r].len + 2 * n_op) < 0) - goto error; - triv[level].region = r; - triv[level].side = 0; - } - - r = triv[level].region; - side = triv[level].side; - base = 2 * (side/2); - - if (side >= region[r].len) { -backtrack: - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, triv[level].snap) < 0) - goto error; - continue; - } - - if (triv[level].update) { - if (force_better_solution(tab, sol, n_op) < 0) - goto error; - triv[level].update = 0; - } - - if (side == base && base >= 2) { - for (j = base - 2; j < base; ++j) { - v = isl_vec_clr(v); - isl_int_set_si(v->el[1 + region[r].pos + j], 1); - if (add_lexmin_eq(tab, v->el) < 0) - goto error; - } - } - - triv[level].snap = isl_tab_snap(tab); - if (isl_tab_push_basis(tab) < 0) - goto error; - - v = isl_vec_clr(v); - isl_int_set_si(v->el[0], -1); - isl_int_set_si(v->el[1 + region[r].pos + side], -1); - isl_int_set_si(v->el[1 + region[r].pos + (side ^ 1)], 1); - tab = add_lexmin_ineq(tab, v->el); - - triv[level].side++; - level++; - init = 1; - } - - free(triv); - isl_vec_free(v); - isl_tab_free(tab); - isl_basic_set_free(bset); - - return sol; -error: - free(triv); - isl_vec_free(v); - isl_tab_free(tab); - isl_basic_set_free(bset); - isl_vec_free(sol); - return NULL; -} - -/* Return the lexicographically smallest rational point in "bset", - * assuming that all variables are non-negative. - * If "bset" is empty, then return a zero-length vector. - */ - __isl_give isl_vec *isl_tab_basic_set_non_neg_lexmin( - __isl_take isl_basic_set *bset) -{ - struct isl_tab *tab; - isl_ctx *ctx = isl_basic_set_get_ctx(bset); - isl_vec *sol; - - tab = tab_for_lexmin(isl_basic_map_from_range(bset), NULL, 0, 0); - if (!tab) - goto error; - if (tab->empty) - sol = isl_vec_alloc(ctx, 0); - else - sol = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - isl_basic_set_free(bset); - return sol; -error: - isl_tab_free(tab); - isl_basic_set_free(bset); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_test.c b/cloog-0.16.3/isl/isl_test.c deleted file mode 100644 index d8248a347b10aeab1309c03e81b0040f7c923315..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_test.c +++ /dev/null @@ -1,2386 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static char *srcdir; - -static char *get_filename(isl_ctx *ctx, const char *name, const char *suffix) { - char *filename; - int length; - char *pattern = "%s/test_inputs/%s.%s"; - - length = strlen(pattern) - 6 + strlen(srcdir) + strlen(name) - + strlen(suffix) + 1; - filename = isl_alloc_array(ctx, char, length); - - if (!filename) - return NULL; - - sprintf(filename, pattern, srcdir, name, suffix); - - return filename; -} - -void test_parse_map(isl_ctx *ctx, const char *str) -{ - isl_map *map; - - map = isl_map_read_from_str(ctx, str, -1); - assert(map); - isl_map_free(map); -} - -void test_parse_map_equal(isl_ctx *ctx, const char *str, const char *str2) -{ - isl_map *map, *map2; - - map = isl_map_read_from_str(ctx, str, -1); - map2 = isl_map_read_from_str(ctx, str2, -1); - assert(map && map2 && isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); -} - -void test_parse_pwqp(isl_ctx *ctx, const char *str) -{ - isl_pw_qpolynomial *pwqp; - - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - assert(pwqp); - isl_pw_qpolynomial_free(pwqp); -} - -void test_parse(struct isl_ctx *ctx) -{ - isl_map *map, *map2; - const char *str, *str2; - - str = "{ [i] -> [-i] }"; - map = isl_map_read_from_str(ctx, str, -1); - assert(map); - isl_map_free(map); - - str = "{ A[i] -> L[([i/3])] }"; - map = isl_map_read_from_str(ctx, str, -1); - assert(map); - isl_map_free(map); - - test_parse_map(ctx, "{[[s] -> A[i]] -> [[s+1] -> A[i]]}"); - test_parse_map(ctx, "{ [p1, y1, y2] -> [2, y1, y2] : " - "p1 = 1 && (y1 <= y2 || y2 = 0) }"); - - str = "{ [x,y] : [([x/2]+y)/3] >= 1 }"; - str2 = "{ [x, y] : 2y >= 6 - x }"; - test_parse_map_equal(ctx, str, str2); - - test_parse_map_equal(ctx, "{ [x,y] : x <= min(y, 2*y+3) }", - "{ [x,y] : x <= y, 2*y + 3 }"); - str = "{ [x, y] : (y <= x and y >= -3) or (2y <= -3 + x and y <= -4) }"; - test_parse_map_equal(ctx, "{ [x,y] : x >= min(y, 2*y+3) }", str); - - str = "{[new,old] -> [new+1-2*[(new+1)/2],old+1-2*[(old+1)/2]]}"; - map = isl_map_read_from_str(ctx, str, -1); - str = "{ [new, old] -> [o0, o1] : " - "exists (e0 = [(-1 - new + o0)/2], e1 = [(-1 - old + o1)/2]: " - "2e0 = -1 - new + o0 and 2e1 = -1 - old + o1 and o0 >= 0 and " - "o0 <= 1 and o1 >= 0 and o1 <= 1) }"; - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{[new,old] -> [new+1-2*[(new+1)/2],old+1-2*[(old+1)/2]]}"; - map = isl_map_read_from_str(ctx, str, -1); - str = "{[new,old] -> [(new+1)%2,(old+1)%2]}"; - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n] -> { [c1] : c1>=0 and c1<=floord(n-4,3) }"; - str2 = "[n] -> { [c1] : c1 >= 0 and 3c1 <= -4 + n }"; - test_parse_map_equal(ctx, str, str2); - - test_parse_pwqp(ctx, "{ [i] -> i + [ (i + [i/3])/2 ] }"); - test_parse_map(ctx, "{ S1[i] -> [([i/10]),i%10] : 0 <= i <= 45 }"); -} - -void test_read(struct isl_ctx *ctx) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - const char *str = "{[y]: Exists ( alpha : 2alpha = y)}"; - - filename = get_filename(ctx, "set", "omega"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input, 0); - bset2 = isl_basic_set_read_from_str(ctx, str, 0); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_bounded(struct isl_ctx *ctx) -{ - isl_set *set; - int bounded; - - set = isl_set_read_from_str(ctx, "[n] -> {[i] : 0 <= i <= n }", -1); - bounded = isl_set_is_bounded(set); - assert(bounded); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, "{[n, i] : 0 <= i <= n }", -1); - bounded = isl_set_is_bounded(set); - assert(!bounded); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, "[n] -> {[i] : i <= n }", -1); - bounded = isl_set_is_bounded(set); - assert(!bounded); - isl_set_free(set); -} - -/* Construct the basic set { [i] : 5 <= i <= N } */ -void test_construction(struct isl_ctx *ctx) -{ - isl_int v; - struct isl_dim *dim; - struct isl_basic_set *bset; - struct isl_constraint *c; - - isl_int_init(v); - - dim = isl_dim_set_alloc(ctx, 1, 1); - bset = isl_basic_set_universe(dim); - - c = isl_inequality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_param, 0, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_inequality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -5); - isl_constraint_set_constant(c, v); - bset = isl_basic_set_add_constraint(bset, c); - - isl_basic_set_free(bset); - - isl_int_clear(v); -} - -void test_dim(struct isl_ctx *ctx) -{ - const char *str; - isl_map *map1, *map2; - - map1 = isl_map_read_from_str(ctx, - "[n] -> { [i] -> [j] : exists (a = [i/10] : i - 10a <= n ) }", -1); - map1 = isl_map_add_dims(map1, isl_dim_in, 1); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,k] -> [j] : exists (a = [i/10] : i - 10a <= n ) }", -1); - assert(isl_map_is_equal(map1, map2)); - isl_map_free(map2); - - map1 = isl_map_project_out(map1, isl_dim_in, 0, 1); - map2 = isl_map_read_from_str(ctx, "[n] -> { [i] -> [j] : n >= 0 }", -1); - assert(isl_map_is_equal(map1, map2)); - - isl_map_free(map1); - isl_map_free(map2); - - str = "[n] -> { [i] -> [] : exists a : 0 <= i <= n and i = 2 a }"; - map1 = isl_map_read_from_str(ctx, str, -1); - str = "{ [i] -> [j] : exists a : 0 <= i <= j and i = 2 a }"; - map2 = isl_map_read_from_str(ctx, str, -1); - map1 = isl_map_move_dims(map1, isl_dim_out, 0, isl_dim_param, 0, 1); - assert(isl_map_is_equal(map1, map2)); - - isl_map_free(map1); - isl_map_free(map2); -} - -void test_div(struct isl_ctx *ctx) -{ - isl_int v; - struct isl_dim *dim; - struct isl_basic_set *bset; - struct isl_constraint *c; - - isl_int_init(v); - - /* test 1 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(bset && bset->n_div == 1); - isl_basic_set_free(bset); - - /* test 2 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(bset && bset->n_div == 1); - isl_basic_set_free(bset); - - /* test 3 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -3); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 4); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(bset && bset->n_div == 1); - isl_basic_set_free(bset); - - /* test 4 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 2); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(isl_basic_set_is_empty(bset)); - isl_basic_set_free(bset); - - /* test 5 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 1); - - assert(bset && bset->n_div == 0); - isl_basic_set_free(bset); - - /* test 6 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 1); - - assert(bset && bset->n_div == 1); - isl_basic_set_free(bset); - - /* test 7 */ - /* This test is a bit tricky. We set up an equality - * a + 3b + 3c = 6 e0 - * Normalization of divs creates _two_ divs - * a = 3 e0 - * c - b - e0 = 2 e1 - * Afterwards e0 is removed again because it has coefficient -1 - * and we end up with the original equality and div again. - * Perhaps we can avoid the introduction of this temporary div. - */ - dim = isl_dim_set_alloc(ctx, 0, 4); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 3, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 3, 1); - - /* Test disabled for now */ - /* - assert(bset && bset->n_div == 1); - */ - isl_basic_set_free(bset); - - /* test 8 */ - dim = isl_dim_set_alloc(ctx, 0, 5); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 3, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 4, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 4, 1); - - /* Test disabled for now */ - /* - assert(bset && bset->n_div == 1); - */ - isl_basic_set_free(bset); - - /* test 9 */ - dim = isl_dim_set_alloc(ctx, 0, 4); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - isl_int_set_si(v, -2); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 3, v); - isl_int_set_si(v, 2); - isl_constraint_set_constant(c, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 2); - - bset = isl_basic_set_fix_si(bset, isl_dim_set, 0, 2); - - assert(!isl_basic_set_is_empty(bset)); - - isl_basic_set_free(bset); - - /* test 10 */ - dim = isl_dim_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(dim); - - c = isl_equality_alloc(isl_basic_set_get_dim(bset)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -2); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 1); - - bset = isl_basic_set_fix_si(bset, isl_dim_set, 0, 2); - - isl_basic_set_free(bset); - - isl_int_clear(v); -} - -void test_application_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - struct isl_basic_map *bmap; - - filename = get_filename(ctx, name, "omega"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input, 0); - bmap = isl_basic_map_read_from_file(ctx, input, 0); - - bset1 = isl_basic_set_apply(bset1, bmap); - - bset2 = isl_basic_set_read_from_file(ctx, input, 0); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_application(struct isl_ctx *ctx) -{ - test_application_case(ctx, "application"); - test_application_case(ctx, "application2"); -} - -void test_affine_hull_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - - filename = get_filename(ctx, name, "polylib"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input, 0); - bset2 = isl_basic_set_read_from_file(ctx, input, 0); - - bset1 = isl_basic_set_affine_hull(bset1); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_affine_hull(struct isl_ctx *ctx) -{ - test_affine_hull_case(ctx, "affine2"); - test_affine_hull_case(ctx, "affine"); - test_affine_hull_case(ctx, "affine3"); -} - -void test_convex_hull_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - struct isl_set *set; - - filename = get_filename(ctx, name, "polylib"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input, 0); - bset2 = isl_basic_set_read_from_file(ctx, input, 0); - - set = isl_basic_set_union(bset1, bset2); - bset1 = isl_set_convex_hull(set); - - bset2 = isl_basic_set_read_from_file(ctx, input, 0); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_convex_hull_algo(struct isl_ctx *ctx, int convex) -{ - const char *str1, *str2; - isl_set *set1, *set2; - int orig_convex = ctx->opt->convex; - ctx->opt->convex = convex; - - test_convex_hull_case(ctx, "convex0"); - test_convex_hull_case(ctx, "convex1"); - test_convex_hull_case(ctx, "convex2"); - test_convex_hull_case(ctx, "convex3"); - test_convex_hull_case(ctx, "convex4"); - test_convex_hull_case(ctx, "convex5"); - test_convex_hull_case(ctx, "convex6"); - test_convex_hull_case(ctx, "convex7"); - test_convex_hull_case(ctx, "convex8"); - test_convex_hull_case(ctx, "convex9"); - test_convex_hull_case(ctx, "convex10"); - test_convex_hull_case(ctx, "convex11"); - test_convex_hull_case(ctx, "convex12"); - test_convex_hull_case(ctx, "convex13"); - test_convex_hull_case(ctx, "convex14"); - test_convex_hull_case(ctx, "convex15"); - - str1 = "{ [i0, i1, i2] : (i2 = 1 and i0 = 0 and i1 >= 0) or " - "(i0 = 1 and i1 = 0 and i2 = 1) or " - "(i0 = 0 and i1 = 0 and i2 = 0) }"; - str2 = "{ [i0, i1, i2] : i0 >= 0 and i2 >= i0 and i2 <= 1 and i1 >= 0 }"; - set1 = isl_set_read_from_str(ctx, str1, -1); - set2 = isl_set_read_from_str(ctx, str2, -1); - set1 = isl_set_from_basic_set(isl_set_convex_hull(set1)); - assert(isl_set_is_equal(set1, set2)); - isl_set_free(set1); - isl_set_free(set2); - - ctx->opt->convex = orig_convex; -} - -void test_convex_hull(struct isl_ctx *ctx) -{ - test_convex_hull_algo(ctx, ISL_CONVEX_HULL_FM); - test_convex_hull_algo(ctx, ISL_CONVEX_HULL_WRAP); -} - -void test_gist_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - - filename = get_filename(ctx, name, "polylib"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input, 0); - bset2 = isl_basic_set_read_from_file(ctx, input, 0); - - bset1 = isl_basic_set_gist(bset1, bset2); - - bset2 = isl_basic_set_read_from_file(ctx, input, 0); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_gist(struct isl_ctx *ctx) -{ - const char *str; - isl_basic_set *bset1, *bset2; - - test_gist_case(ctx, "gist1"); - - str = "[p0, p2, p3, p5, p6, p10] -> { [] : " - "exists (e0 = [(15 + p0 + 15p6 + 15p10)/16], e1 = [(p5)/8], " - "e2 = [(p6)/128], e3 = [(8p2 - p5)/128], " - "e4 = [(128p3 - p6)/4096]: 8e1 = p5 and 128e2 = p6 and " - "128e3 = 8p2 - p5 and 4096e4 = 128p3 - p6 and p2 >= 0 and " - "16e0 >= 16 + 16p6 + 15p10 and p2 <= 15 and p3 >= 0 and " - "p3 <= 31 and p6 >= 128p3 and p5 >= 8p2 and p10 >= 0 and " - "16e0 <= 15 + p0 + 15p6 + 15p10 and 16e0 >= p0 + 15p6 + 15p10 and " - "p10 <= 15 and p10 <= -1 + p0 - p6) }"; - bset1 = isl_basic_set_read_from_str(ctx, str, -1); - str = "[p0, p2, p3, p5, p6, p10] -> { [] : exists (e0 = [(p5)/8], " - "e1 = [(p6)/128], e2 = [(8p2 - p5)/128], " - "e3 = [(128p3 - p6)/4096]: 8e0 = p5 and 128e1 = p6 and " - "128e2 = 8p2 - p5 and 4096e3 = 128p3 - p6 and p5 >= -7 and " - "p2 >= 0 and 8p2 <= -1 + p0 and p2 <= 15 and p3 >= 0 and " - "p3 <= 31 and 128p3 <= -1 + p0 and p6 >= -127 and " - "p5 <= -1 + p0 and p6 <= -1 + p0 and p6 >= 128p3 and " - "p0 >= 1 and p5 >= 8p2 and p10 >= 0 and p10 <= 15 ) }"; - bset2 = isl_basic_set_read_from_str(ctx, str, -1); - bset1 = isl_basic_set_gist(bset1, bset2); - assert(bset1 && bset1->n_div == 0); - isl_basic_set_free(bset1); -} - -void test_coalesce_set(isl_ctx *ctx, const char *str, int check_one) -{ - isl_set *set, *set2; - - set = isl_set_read_from_str(ctx, str, -1); - set = isl_set_coalesce(set); - set2 = isl_set_read_from_str(ctx, str, -1); - assert(isl_set_is_equal(set, set2)); - if (check_one) - assert(set && set->n == 1); - isl_set_free(set); - isl_set_free(set2); -} - -void test_coalesce(struct isl_ctx *ctx) -{ - const char *str; - struct isl_set *set, *set2; - struct isl_map *map, *map2; - - set = isl_set_read_from_str(ctx, - "{[x,y]: x >= 0 & x <= 10 & y >= 0 & y <= 10 or " - "y >= x & x >= 2 & 5 >= y }", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " - "x + y >= 10 & y <= x & x + y <= 20 & y >= 0}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " - "x + y >= 10 & y <= x & x + y <= 19 & y >= 0}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 6 & x <= 10 & y <= x}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 7 & x <= 10 & y <= x}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 6 & x <= 10 & y + 1 <= x}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 6}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 7 & y <= 6}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 5}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 5}", -1); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 7}", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }", -1); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}", -1); - set = isl_set_coalesce(set); - set2 = isl_set_read_from_str(ctx, - "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}", -1); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "[n] -> { [i] : 1 <= i and i <= n - 1 or " - "2 <= i and i <= n }", -1); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "[n] -> { [i] : 1 <= i and i <= n - 1 or " - "2 <= i and i <= n }", -1); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - map = isl_map_read_from_str(ctx, - "[n] -> { [i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and i0 >= 8 + 2n and o0 >= 2 + i0 and " - "o0 <= 56 + 2n and o0 <= -12 + 4n and i0 <= 57 + 2n and " - "i0 <= -11 + 4n and o0 >= 6 + 2n and 4e0 <= i0 and " - "4e0 >= -3 + i0 and 4e1 <= o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0);" - "[i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and 2e0 >= 3 + n and e0 <= -4 + n and " - "2e0 <= 27 + n and e1 <= -4 + n and 2e1 <= 27 + n and " - "2e1 >= 2 + n and e1 >= 1 + e0 and i0 >= 7 + 2n and " - "i0 <= -11 + 4n and i0 <= 57 + 2n and 4e0 <= -2 + i0 and " - "4e0 >= -3 + i0 and o0 >= 6 + 2n and o0 <= -11 + 4n and " - "o0 <= 57 + 2n and 4e1 <= -2 + o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }", -1); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and i0 >= 8 + 2n and o0 >= 2 + i0 and " - "o0 <= 56 + 2n and o0 <= -12 + 4n and i0 <= 57 + 2n and " - "i0 <= -11 + 4n and o0 >= 6 + 2n and 4e0 <= i0 and " - "4e0 >= -3 + i0 and 4e1 <= o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0);" - "[i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and 2e0 >= 3 + n and e0 <= -4 + n and " - "2e0 <= 27 + n and e1 <= -4 + n and 2e1 <= 27 + n and " - "2e1 >= 2 + n and e1 >= 1 + e0 and i0 >= 7 + 2n and " - "i0 <= -11 + 4n and i0 <= 57 + 2n and 4e0 <= -2 + i0 and " - "4e0 >= -3 + i0 and o0 >= 6 + 2n and o0 <= -11 + 4n and " - "o0 <= 57 + 2n and 4e1 <= -2 + o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n, m] -> { [] -> [o0, o2, o3] : (o3 = 1 and o0 >= 1 + m and " - "o0 <= n + m and o2 <= m and o0 >= 2 + n and o2 >= 3) or " - "(o0 >= 2 + n and o0 >= 1 + m and o0 <= n + m and n >= 1 and " - "o3 <= -1 + o2 and o3 >= 1 - m + o2 and o3 >= 2 and o3 <= n) }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[M, N] -> { [i0, i1, i2, i3, i4, i5, i6] -> " - "[o0, o1, o2, o3, o4, o5, o6] : " - "(o6 <= -4 + 2M - 2N + i0 + i1 - i2 + i6 - o0 - o1 + o2 and " - "o3 <= -2 + i3 and o6 >= 2 + i0 + i3 + i6 - o0 - o3 and " - "o6 >= 2 - M + N + i3 + i4 + i6 - o3 - o4 and o0 <= -1 + i0 and " - "o4 >= 4 - 3M + 3N - i0 - i1 + i2 + 2i3 + i4 + o0 + o1 - o2 - 2o3 " - "and o6 <= -3 + 2M - 2N + i3 + i4 - i5 + i6 - o3 - o4 + o5 and " - "2o6 <= -5 + 5M - 5N + 2i0 + i1 - i2 - i5 + 2i6 - 2o0 - o1 + o2 + o5 " - "and o6 >= 2i0 + i1 + i6 - 2o0 - o1 and " - "3o6 <= -5 + 4M - 4N + 2i0 + i1 - i2 + 2i3 + i4 - i5 + 3i6 " - "- 2o0 - o1 + o2 - 2o3 - o4 + o5) or " - "(N >= 2 and o3 <= -1 + i3 and o0 <= -1 + i0 and " - "o6 >= i3 + i6 - o3 and M >= 0 and " - "2o6 >= 1 + i0 + i3 + 2i6 - o0 - o3 and " - "o6 >= 1 - M + i0 + i6 - o0 and N >= 2M and o6 >= i0 + i6 - o0) }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[M, N] -> { [] -> [o0] : (o0 = 0 and M >= 1 and N >= 2) or " - "(o0 = 0 and M >= 1 and N >= 2M and N >= 2 + M) or " - "(o0 = 0 and M >= 2 and N >= 3) or " - "(M = 0 and o0 = 0 and N >= 3) }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [i0, i1, i2, i3] : (i1 = 10i0 and i0 >= 1 and 10i0 <= 100 and " - "i3 <= 9 + 10 i2 and i3 >= 1 + 10i2 and i3 >= 0) or " - "(i1 <= 9 + 10i0 and i1 >= 1 + 10i0 and i2 >= 0 and " - "i0 >= 0 and i1 <= 100 and i3 <= 9 + 10i2 and i3 >= 1 + 10i2) }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - test_coalesce_set(ctx, - "[M] -> { [i1] : (i1 >= 2 and i1 <= M) or " - "(i1 = M and M >= 1) }", 0); - test_coalesce_set(ctx, - "{[x,y] : x,y >= 0; [x,y] : 10 <= x <= 20 and y >= -1 }", 0); - test_coalesce_set(ctx, - "{ [x, y] : (x >= 1 and y >= 1 and x <= 2 and y <= 2) or " - "(y = 3 and x = 1) }", 1); - test_coalesce_set(ctx, - "[M] -> { [i0, i1, i2, i3, i4] : (i1 >= 3 and i4 >= 2 + i2 and " - "i2 >= 2 and i0 >= 2 and i3 >= 1 + i2 and i0 <= M and " - "i1 <= M and i3 <= M and i4 <= M) or " - "(i1 >= 2 and i4 >= 1 + i2 and i2 >= 2 and i0 >= 2 and " - "i3 >= 1 + i2 and i0 <= M and i1 <= -1 + M and i3 <= M and " - "i4 <= -1 + M) }", 1); - test_coalesce_set(ctx, - "{ [x, y] : (x >= 0 and y >= 0 and x <= 10 and y <= 10) or " - "(x >= 1 and y >= 1 and x <= 11 and y <= 11) }", 1); - test_coalesce_set(ctx, - "{[x,y,z] : y + 2 >= 0 and x - y + 1 >= 0 and " - "-x - y + 1 >= 0 and -3 <= z <= 3;" - "[x,y,z] : -x+z + 20 >= 0 and -x-z + 20 >= 0 and " - "x-z + 20 >= 0 and x+z + 20 >= 0 and -10 <= y <= 0}", 1); - test_coalesce_set(ctx, - "{[x,y] : 0 <= x,y <= 10; [5,y]: 4 <=y <= 11}", 1); - test_coalesce_set(ctx, "{[x,0] : x >= 0; [x,1] : x <= 20}", 0); - test_coalesce_set(ctx, - "{[x,0,0] : -5 <= x <= 5; [0,y,1] : -5 <= y <= 5 }", 1); - test_coalesce_set(ctx, "{ [x, 1 - x] : 0 <= x <= 1; [0,0] }", 1); - test_coalesce_set(ctx, "{ [0,0]; [i,i] : 1 <= i <= 10 }", 1); - test_coalesce_set(ctx, "{ [0,0]; [i,j] : 1 <= i,j <= 10 }", 0); - test_coalesce_set(ctx, "{ [0,0]; [i,2i] : 1 <= i <= 10 }", 1); - test_coalesce_set(ctx, "{ [0,0]; [i,2i] : 2 <= i <= 10 }", 0); - test_coalesce_set(ctx, "{ [1,0]; [i,2i] : 1 <= i <= 10 }", 0); - test_coalesce_set(ctx, "{ [0,1]; [i,2i] : 1 <= i <= 10 }", 0); -} - -void test_closure(struct isl_ctx *ctx) -{ - const char *str; - isl_set *dom; - isl_map *up, *right; - isl_map *map, *map2; - int exact; - - /* COCOA example 1 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 1 and j2 = j + 1 and " - "1 <= i and i < n and 1 <= j and j < n or " - "i2 = i + 1 and j2 = j - 1 and " - "1 <= i and i < n and 2 <= j and j <= n }", -1); - map = isl_map_power(map, &exact); - assert(exact); - isl_map_free(map); - - /* COCOA example 1 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 1 and j2 = j + 1 and " - "1 <= i and i < n and 1 <= j and j < n or " - "i2 = i + 1 and j2 = j - 1 and " - "1 <= i and i < n and 2 <= j and j <= n }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : exists (k1,k2,k : " - "1 <= i and i < n and 1 <= j and j <= n and " - "2 <= i2 and i2 <= n and 1 <= j2 and j2 <= n and " - "i2 = i + k1 + k2 and j2 = j + k1 - k2 and " - "k1 >= 0 and k2 >= 0 and k1 + k2 = k and k >= 1 )}", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - map = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y] : y = x + 1 and 0 <= x and x <= n and " - " 0 <= y and y <= n }", -1); - map = isl_map_transitive_closure(map, &exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y] : y > x and 0 <= x and x <= n and " - " 0 <= y and y <= n }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* COCOA example 2 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 2 and j2 = j + 2 and " - "1 <= i and i < n - 1 and 1 <= j and j < n - 1 or " - "i2 = i + 2 and j2 = j - 2 and " - "1 <= i and i < n - 1 and 3 <= j and j <= n }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : exists (k1,k2,k : " - "1 <= i and i < n - 1 and 1 <= j and j <= n and " - "3 <= i2 and i2 <= n and 1 <= j2 and j2 <= n and " - "i2 = i + 2 k1 + 2 k2 and j2 = j + 2 k1 - 2 k2 and " - "k1 >= 0 and k2 >= 0 and k1 + k2 = k and k >= 1) }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - /* COCOA Fig.2 left */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 2 and j2 = j and " - "i <= 2 j - 3 and i <= n - 2 and j <= 2 i - 1 and " - "j <= n or " - "i2 = i and j2 = j + 2 and i <= 2 j - 1 and i <= n and " - "j <= 2 i - 3 and j <= n - 2 or " - "i2 = i + 1 and j2 = j + 1 and i <= 2 j - 1 and " - "i <= n - 1 and j <= 2 i - 1 and j <= n - 1 }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - /* COCOA Fig.2 right */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 3 and j2 = j and " - "i <= 2 j - 4 and i <= n - 3 and j <= 2 i - 1 and " - "j <= n or " - "i2 = i and j2 = j + 3 and i <= 2 j - 1 and i <= n and " - "j <= 2 i - 4 and j <= n - 3 or " - "i2 = i + 1 and j2 = j + 1 and i <= 2 j - 1 and " - "i <= n - 1 and j <= 2 i - 1 and j <= n - 1 }", -1); - map = isl_map_power(map, &exact); - assert(exact); - isl_map_free(map); - - /* COCOA Fig.2 right */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 3 and j2 = j and " - "i <= 2 j - 4 and i <= n - 3 and j <= 2 i - 1 and " - "j <= n or " - "i2 = i and j2 = j + 3 and i <= 2 j - 1 and i <= n and " - "j <= 2 i - 4 and j <= n - 3 or " - "i2 = i + 1 and j2 = j + 1 and i <= 2 j - 1 and " - "i <= n - 1 and j <= 2 i - 1 and j <= n - 1 }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : exists (k1,k2,k3,k : " - "i <= 2 j - 1 and i <= n and j <= 2 i - 1 and " - "j <= n and 3 + i + 2 j <= 3 n and " - "3 + 2 i + j <= 3n and i2 <= 2 j2 -1 and i2 <= n and " - "i2 <= 3 j2 - 4 and j2 <= 2 i2 -1 and j2 <= n and " - "13 + 4 j2 <= 11 i2 and i2 = i + 3 k1 + k3 and " - "j2 = j + 3 k2 + k3 and k1 >= 0 and k2 >= 0 and " - "k3 >= 0 and k1 + k2 + k3 = k and k > 0) }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* COCOA Fig.1 right */ - dom = isl_set_read_from_str(ctx, - "{ [x,y] : x >= 0 and -2 x + 3 y >= 0 and x <= 3 and " - "2 x - 3 y + 3 >= 0 }", -1); - right = isl_map_read_from_str(ctx, - "{ [x,y] -> [x2,y2] : x2 = x + 1 and y2 = y }", -1); - up = isl_map_read_from_str(ctx, - "{ [x,y] -> [x2,y2] : x2 = x and y2 = y + 1 }", -1); - right = isl_map_intersect_domain(right, isl_set_copy(dom)); - right = isl_map_intersect_range(right, isl_set_copy(dom)); - up = isl_map_intersect_domain(up, isl_set_copy(dom)); - up = isl_map_intersect_range(up, dom); - map = isl_map_union(up, right); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "{ [0,0] -> [0,1]; [0,0] -> [1,1]; [0,1] -> [1,1]; " - " [2,2] -> [3,2]; [2,2] -> [3,3]; [3,2] -> [3,3] }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* COCOA Theorem 1 counter example */ - map = isl_map_read_from_str(ctx, - "{ [i,j] -> [i2,j2] : i = 0 and 0 <= j and j <= 1 and " - "i2 = 1 and j2 = j or " - "i = 0 and j = 0 and i2 = 0 and j2 = 1 }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - map = isl_map_read_from_str(ctx, - "[m,n] -> { [i,j] -> [i2,j2] : i2 = i and j2 = j + 2 and " - "1 <= i,i2 <= n and 1 <= j,j2 <= m or " - "i2 = i + 1 and 3 <= j2 - j <= 4 and " - "1 <= i,i2 <= n and 1 <= j,j2 <= m }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - /* Kelly et al 1996, fig 12 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i and j2 = j + 1 and " - "1 <= i,j,j+1 <= n or " - "j = n and j2 = 1 and i2 = i + 1 and " - "1 <= i,i+1 <= n }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : 1 <= j < j2 <= n and " - "1 <= i <= n and i = i2 or " - "1 <= i < i2 <= n and 1 <= j <= n and " - "1 <= j2 <= n }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* Omega's closure4 */ - map = isl_map_read_from_str(ctx, - "[m,n] -> { [x,y] -> [x2,y2] : x2 = x and y2 = y + 1 and " - "1 <= x,y <= 10 or " - "x2 = x + 1 and y2 = y and " - "1 <= x <= 20 && 5 <= y <= 15 }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - map = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y]: 1 <= n <= y - x <= 10 }", -1); - map = isl_map_transitive_closure(map, &exact); - assert(!exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y] : 1 <= n <= 10 and y >= n + x }", -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n, m] -> { [i0, i1, i2, i3] -> [o0, o1, o2, o3] : " - "i3 = 1 and o0 = i0 and o1 = -1 + i1 and o2 = -1 + i2 and " - "o3 = -2 + i2 and i1 <= -1 + i0 and i1 >= 1 - m + i0 and " - "i1 >= 2 and i1 <= n and i2 >= 3 and i2 <= 1 + n and i2 <= m }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{[0] -> [1]; [2] -> [3]}"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n] -> { [[i0, i1, 1, 0, i0] -> [i5, 1]] -> " - "[[i0, -1 + i1, 2, 0, i0] -> [-1 + i5, 2]] : " - "exists (e0 = [(3 - n)/3]: i5 >= 2 and i1 >= 2 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); " - "[[i0, i1, 2, 0, i0] -> [i5, 1]] -> " - "[[i0, i1, 1, 0, i0] -> [-1 + i5, 2]] : " - "exists (e0 = [(3 - n)/3]: i5 >= 2 and i1 >= 1 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); " - "[[i0, i1, 1, 0, i0] -> [i5, 2]] -> " - "[[i0, -1 + i1, 2, 0, i0] -> [i5, 1]] : " - "exists (e0 = [(3 - n)/3]: i1 >= 2 and i5 >= 1 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); " - "[[i0, i1, 2, 0, i0] -> [i5, 2]] -> " - "[[i0, i1, 1, 0, i0] -> [i5, 1]] : " - "exists (e0 = [(3 - n)/3]: i5 >= 1 and i1 >= 1 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n) }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_transitive_closure(map, NULL); - assert(map); - isl_map_free(map); -} - -void test_lex(struct isl_ctx *ctx) -{ - isl_dim *dim; - isl_map *map; - - dim = isl_dim_alloc(ctx, 0, 0, 0); - map = isl_map_lex_le(dim); - assert(!isl_map_is_empty(map)); - isl_map_free(map); -} - -static int consume_lexmin(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user) -{ - isl_dim *dim; - isl_basic_map *bmap; - isl_map **map = user; - - dim = isl_basic_set_get_dim(dom); - bmap = isl_basic_map_from_aff_list(dim, list); - bmap = isl_basic_map_intersect_domain(bmap, dom); - - *map = isl_map_union(*map, isl_map_from_basic_map(bmap)); - - return 0; -} - -void test_lexmin(struct isl_ctx *ctx) -{ - const char *str; - isl_basic_map *bmap; - isl_map *map, *map2; - isl_set *set; - isl_set *set2; - - str = "[p0, p1] -> { [] -> [] : " - "exists (e0 = [(2p1)/3], e1, e2, e3 = [(3 - p1 + 3e0)/3], " - "e4 = [(p1)/3], e5 = [(p1 + 3e4)/3]: " - "3e0 >= -2 + 2p1 and 3e0 >= p1 and 3e3 >= 1 - p1 + 3e0 and " - "3e0 <= 2p1 and 3e3 >= -2 + p1 and 3e3 <= -1 + p1 and p1 >= 3 and " - "3e5 >= -2 + 2p1 and 3e5 >= p1 and 3e5 <= -1 + p1 + 3e4 and " - "3e4 <= p1 and 3e4 >= -2 + p1 and e3 <= -1 + e0 and " - "3e4 >= 6 - p1 + 3e1 and 3e1 >= p1 and 3e5 >= -2 + p1 + 3e4 and " - "2e4 >= 3 - p1 + 2e1 and e4 <= e1 and 3e3 <= 2 - p1 + 3e0 and " - "e5 >= 1 + e1 and 3e4 >= 6 - 2p1 + 3e1 and " - "p0 >= 2 and p1 >= p0 and 3e2 >= p1 and 3e4 >= 6 - p1 + 3e2 and " - "e2 <= e1 and e3 >= 1 and e4 <= e2) }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_lexmin(map); - isl_map_free(map); - - str = "[C] -> { [obj,a,b,c] : obj <= 38 a + 7 b + 10 c and " - "a + b <= 1 and c <= 10 b and c <= C and a,b,c,C >= 0 }"; - set = isl_set_read_from_str(ctx, str, -1); - set = isl_set_lexmax(set); - str = "[C] -> { [obj,a,b,c] : C = 8 }"; - set2 = isl_set_read_from_str(ctx, str, -1); - set = isl_set_intersect(set, set2); - assert(!isl_set_is_empty(set)); - isl_set_free(set); - - str = "{ [x] -> [y] : x <= y <= 10; [x] -> [5] : -8 <= x <= 8 }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_lexmin(map); - str = "{ [x] -> [5] : 6 <= x <= 8; " - "[x] -> [x] : x <= 5 or (9 <= x <= 10) }"; - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [x] -> [y] : 4y = x or 4y = -1 + x or 4y = -2 + x }"; - map = isl_map_read_from_str(ctx, str, -1); - map2 = isl_map_copy(map); - map = isl_map_lexmin(map); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [x] -> [y] : x = 4y; [x] -> [y] : x = 2y }"; - map = isl_map_read_from_str(ctx, str, -1); - map = isl_map_lexmin(map); - str = "{ [x] -> [y] : (4y = x and x >= 0) or " - "(exists (e0 = [(x)/4], e1 = [(-2 + x)/4]: 2y = x and " - "4e1 = -2 + x and 4e0 <= -1 + x and 4e0 >= -3 + x)) or " - "(exists (e0 = [(x)/4]: 2y = x and 4e0 = x and x <= -4)) }"; - map2 = isl_map_read_from_str(ctx, str, -1); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [i] -> [i', j] : j = i - 8i' and i' >= 0 and i' <= 7 and " - " 8i' <= i and 8i' >= -7 + i }"; - bmap = isl_basic_map_read_from_str(ctx, str, -1); - map2 = isl_map_empty(isl_basic_map_get_dim(bmap)); - isl_basic_map_foreach_lexmin(bmap, &consume_lexmin, &map2); - map = isl_map_from_basic_map(bmap); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); -} - -struct must_may { - isl_map *must; - isl_map *may; -}; - -static int collect_must_may(__isl_take isl_map *dep, int must, - void *dep_user, void *user) -{ - struct must_may *mm = (struct must_may *)user; - - if (must) - mm->must = isl_map_union(mm->must, dep); - else - mm->may = isl_map_union(mm->may, dep); - - return 0; -} - -static int common_space(void *first, void *second) -{ - int depth = *(int *)first; - return 2 * depth; -} - -static int map_is_equal(__isl_keep isl_map *map, const char *str) -{ - isl_map *map2; - int equal; - - if (!map) - return -1; - - map2 = isl_map_read_from_str(map->ctx, str, -1); - equal = isl_map_is_equal(map, map2); - isl_map_free(map2); - - return equal; -} - -void test_dep(struct isl_ctx *ctx) -{ - const char *str; - isl_dim *dim; - isl_map *map; - isl_access_info *ai; - isl_flow *flow; - int depth; - struct must_may mm; - - depth = 3; - - str = "{ [2,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - str = "{ [1,i,0] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_dim_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_dim_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [2,i,0] : (0 <= i <= 4) or (6 <= i <= 10); " - " [1,10,0] -> [2,5,0] }"; - assert(map_is_equal(mm.must, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.may, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [2,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - str = "{ [1,i,0] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_dim_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_dim_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [2,i,0] : (0 <= i <= 4) or (6 <= i <= 10) }"; - assert(map_is_equal(mm.must, str)); - str = "{ [0,5,0] -> [2,5,0]; [1,i,0] -> [2,5,0] : 0 <= i <= 10 }"; - assert(map_is_equal(mm.may, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [2,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - str = "{ [1,i,0] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_dim_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_dim_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [2,i,0] : 0 <= i <= 10; " - " [1,i,0] -> [2,5,0] : 0 <= i <= 10 }"; - assert(map_is_equal(mm.may, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.must, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [0,i,2] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - str = "{ [0,i,1] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_dim_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_dim_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [0,i,2] : 0 <= i <= 10; " - " [0,i,1] -> [0,5,2] : 0 <= i <= 5 }"; - assert(map_is_equal(mm.may, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.must, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [0,i,1] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - str = "{ [0,i,2] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_dim_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_dim_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [0,i,1] : 0 <= i <= 10; " - " [0,i,2] -> [0,5,1] : 0 <= i <= 4 }"; - assert(map_is_equal(mm.may, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.must, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - depth = 5; - - str = "{ [1,i,0,0,0] -> [i,j] : 0 <= i <= 10 and 0 <= j <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_alloc(map, &depth, &common_space, 1); - - str = "{ [0,i,0,j,0] -> [i,j] : 0 <= i <= 10 and 0 <= j <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_dim_alloc(ctx, 0, 5, 5); - mm.must = isl_map_empty(isl_dim_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0,j,0] -> [1,i,0,0,0] : 0 <= i,j <= 10 }"; - assert(map_is_equal(mm.must, str)); - str = "{ [0,0,0,0,0] -> [0,0,0,0,0] : 1 = 0 }"; - assert(map_is_equal(mm.may, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); -} - -int test_sv(isl_ctx *ctx) -{ - const char *str; - isl_map *map; - isl_union_map *umap; - int sv; - - str = "[N] -> { [i] -> [f] : 0 <= i <= N and 0 <= i - 10 f <= 9 }"; - map = isl_map_read_from_str(ctx, str, -1); - sv = isl_map_is_single_valued(map); - isl_map_free(map); - if (sv < 0) - return -1; - if (!sv) - isl_die(ctx, isl_error_internal, - "map not detected as single valued", return -1); - - str = "[N] -> { [i] -> [f] : 0 <= i <= N and 0 <= i - 10 f <= 10 }"; - map = isl_map_read_from_str(ctx, str, -1); - sv = isl_map_is_single_valued(map); - isl_map_free(map); - if (sv < 0) - return -1; - if (sv) - isl_die(ctx, isl_error_internal, - "map detected as single valued", return -1); - - str = "{ S1[i] -> [i] : 0 <= i <= 9; S2[i] -> [i] : 0 <= i <= 9 }"; - umap = isl_union_map_read_from_str(ctx, str); - sv = isl_union_map_is_single_valued(umap); - isl_union_map_free(umap); - if (sv < 0) - return -1; - if (!sv) - isl_die(ctx, isl_error_internal, - "map not detected as single valued", return -1); - - str = "{ [i] -> S1[i] : 0 <= i <= 9; [i] -> S2[i] : 0 <= i <= 9 }"; - umap = isl_union_map_read_from_str(ctx, str); - sv = isl_union_map_is_single_valued(umap); - isl_union_map_free(umap); - if (sv < 0) - return -1; - if (sv) - isl_die(ctx, isl_error_internal, - "map detected as single valued", return -1); - - return 0; -} - -void test_bijective_case(struct isl_ctx *ctx, const char *str, int bijective) -{ - isl_map *map; - - map = isl_map_read_from_str(ctx, str, -1); - if (bijective) - assert(isl_map_is_bijective(map)); - else - assert(!isl_map_is_bijective(map)); - isl_map_free(map); -} - -void test_bijective(struct isl_ctx *ctx) -{ - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i] : j=i}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i] : j=0}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i] : j=N}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [j,i]}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i+j]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> []}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i,j,N]}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [2i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i,i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [2i,i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [2i,j]}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [x,y] : 2x=i & y =j}", 1); -} - -void test_pwqp(struct isl_ctx *ctx) -{ - const char *str; - isl_set *set; - isl_pw_qpolynomial *pwqp1, *pwqp2; - - str = "{ [i,j,k] -> 1 + 9 * [i/5] + 7 * [j/11] + 4 * [k/13] }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_move_dims(pwqp1, isl_dim_param, 0, - isl_dim_set, 1, 1); - - str = "[j] -> { [i,k] -> 1 + 9 * [i/5] + 7 * [j/11] + 4 * [k/13] }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> i }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [k] : exists a : k = 2a }"; - set = isl_set_read_from_str(ctx, str, 0); - pwqp1 = isl_pw_qpolynomial_gist(pwqp1, set); - str = "{ [i] -> i }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> i + [ (i + [i/3])/2 ] }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [10] }"; - set = isl_set_read_from_str(ctx, str, 0); - pwqp1 = isl_pw_qpolynomial_gist(pwqp1, set); - str = "{ [i] -> 16 }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> ([(i)/2]) }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [k] : exists a : k = 2a+1 }"; - set = isl_set_read_from_str(ctx, str, 0); - pwqp1 = isl_pw_qpolynomial_gist(pwqp1, set); - str = "{ [i] -> -1/2 + 1/2 * i }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> ([([i/2] + [i/2])/5]) }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [i] -> ([(2 * [i/2])/5]) }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [x] -> ([x/2] + [(x+1)/2]) }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [x] -> x }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> ([i/2]) : i >= 0; [i] -> ([i/3]) : i < 0 }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - pwqp1 = isl_pw_qpolynomial_coalesce(pwqp1); - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - isl_pw_qpolynomial_free(pwqp1); -} - -void test_split_periods(isl_ctx *ctx) -{ - const char *str; - isl_pw_qpolynomial *pwqp; - - str = "{ [U,V] -> 1/3 * U + 2/3 * V - [(U + 2V)/3] + [U/2] : " - "U + 2V + 3 >= 0 and - U -2V >= 0 and - U + 10 >= 0 and " - "U >= 0; [U,V] -> U^2 : U >= 100 }"; - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp = isl_pw_qpolynomial_split_periods(pwqp, 2); - assert(pwqp); - - isl_pw_qpolynomial_free(pwqp); -} - -void test_union(isl_ctx *ctx) -{ - const char *str; - isl_union_set *uset1, *uset2; - isl_union_map *umap1, *umap2; - - str = "{ [i] : 0 <= i <= 1 }"; - uset1 = isl_union_set_read_from_str(ctx, str); - str = "{ [1] -> [0] }"; - umap1 = isl_union_map_read_from_str(ctx, str); - - umap2 = isl_union_set_lex_gt_union_set(isl_union_set_copy(uset1), uset1); - assert(isl_union_map_is_equal(umap1, umap2)); - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - - str = "{ A[i] -> B[i]; B[i] -> C[i]; A[0] -> C[1] }"; - umap1 = isl_union_map_read_from_str(ctx, str); - str = "{ A[i]; B[i] }"; - uset1 = isl_union_set_read_from_str(ctx, str); - - uset2 = isl_union_map_domain(umap1); - - assert(isl_union_set_is_equal(uset1, uset2)); - - isl_union_set_free(uset1); - isl_union_set_free(uset2); -} - -void test_bound(isl_ctx *ctx) -{ - const char *str; - isl_pw_qpolynomial *pwqp; - isl_pw_qpolynomial_fold *pwf; - - str = "{ [[a, b, c, d] -> [e]] -> 0 }"; - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - pwf = isl_pw_qpolynomial_bound(pwqp, isl_fold_max, NULL); - assert(isl_pw_qpolynomial_fold_dim(pwf, isl_dim_set) == 4); - isl_pw_qpolynomial_fold_free(pwf); - - str = "{ [[x]->[x]] -> 1 : exists a : x = 2 a }"; - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - pwf = isl_pw_qpolynomial_bound(pwqp, isl_fold_max, NULL); - assert(isl_pw_qpolynomial_fold_dim(pwf, isl_dim_set) == 1); - isl_pw_qpolynomial_fold_free(pwf); -} - -void test_lift(isl_ctx *ctx) -{ - const char *str; - isl_basic_map *bmap; - isl_basic_set *bset; - - str = "{ [i0] : exists e0 : i0 = 4e0 }"; - bset = isl_basic_set_read_from_str(ctx, str, 0); - bset = isl_basic_set_lift(bset); - bmap = isl_basic_map_from_range(bset); - bset = isl_basic_map_domain(bmap); - isl_basic_set_free(bset); -} - -void test_subset(isl_ctx *ctx) -{ - const char *str; - isl_set *set1, *set2; - - str = "{ [112, 0] }"; - set1 = isl_set_read_from_str(ctx, str, 0); - str = "{ [i0, i1] : exists (e0 = [(i0 - i1)/16], e1: " - "16e0 <= i0 - i1 and 16e0 >= -15 + i0 - i1 and " - "16e1 <= i1 and 16e0 >= -i1 and 16e1 >= -i0 + i1) }"; - set2 = isl_set_read_from_str(ctx, str, 0); - assert(isl_set_is_subset(set1, set2)); - isl_set_free(set1); - isl_set_free(set2); -} - -void test_factorize(isl_ctx *ctx) -{ - const char *str; - isl_basic_set *bset; - isl_factorizer *f; - - str = "{ [i0, i1, i2, i3, i4, i5, i6, i7] : 3i5 <= 2 - 2i0 and " - "i0 >= -2 and i6 >= 1 + i3 and i7 >= 0 and 3i5 >= -2i0 and " - "2i4 <= i2 and i6 >= 1 + 2i0 + 3i1 and i4 <= -1 and " - "i6 >= 1 + 2i0 + 3i5 and i6 <= 2 + 2i0 + 3i5 and " - "3i5 <= 2 - 2i0 - i2 + 3i4 and i6 <= 2 + 2i0 + 3i1 and " - "i0 <= -1 and i7 <= i2 + i3 - 3i4 - i6 and " - "3i5 >= -2i0 - i2 + 3i4 }"; - bset = isl_basic_set_read_from_str(ctx, str, 0); - f = isl_basic_set_factorizer(bset); - assert(f); - isl_basic_set_free(bset); - isl_factorizer_free(f); - - str = "{ [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12] : " - "i12 <= 2 + i0 - i11 and 2i8 >= -i4 and i11 >= i1 and " - "3i5 <= -i2 and 2i11 >= -i4 - 2i7 and i11 <= 3 + i0 + 3i9 and " - "i11 <= -i4 - 2i7 and i12 >= -i10 and i2 >= -2 and " - "i11 >= i1 + 3i10 and i11 >= 1 + i0 + 3i9 and " - "i11 <= 1 - i4 - 2i8 and 6i6 <= 6 - i2 and 3i6 >= 1 - i2 and " - "i11 <= 2 + i1 and i12 <= i4 + i11 and i12 >= i0 - i11 and " - "3i5 >= -2 - i2 and i12 >= -1 + i4 + i11 and 3i3 <= 3 - i2 and " - "9i6 <= 11 - i2 + 6i5 and 3i3 >= 1 - i2 and " - "9i6 <= 5 - i2 + 6i3 and i12 <= -1 and i2 <= 0 }"; - bset = isl_basic_set_read_from_str(ctx, str, 0); - f = isl_basic_set_factorizer(bset); - assert(f); - isl_basic_set_free(bset); - isl_factorizer_free(f); -} - -static int check_injective(__isl_take isl_map *map, void *user) -{ - int *injective = user; - - *injective = isl_map_is_injective(map); - isl_map_free(map); - - if (*injective < 0 || !*injective) - return -1; - - return 0; -} - -int test_one_schedule(isl_ctx *ctx, const char *d, const char *w, - const char *r, const char *s, int tilable, int parallel) -{ - int i; - isl_union_set *D; - isl_union_map *W, *R, *S; - isl_union_map *empty; - isl_union_map *dep_raw, *dep_war, *dep_waw, *dep; - isl_union_map *validity, *proximity; - isl_union_map *schedule; - isl_union_map *test; - isl_union_set *delta; - isl_union_set *domain; - isl_set *delta_set; - isl_set *slice; - isl_set *origin; - isl_schedule *sched; - int is_nonneg, is_parallel, is_tilable, is_injection, is_complete; - - D = isl_union_set_read_from_str(ctx, d); - W = isl_union_map_read_from_str(ctx, w); - R = isl_union_map_read_from_str(ctx, r); - S = isl_union_map_read_from_str(ctx, s); - - W = isl_union_map_intersect_domain(W, isl_union_set_copy(D)); - R = isl_union_map_intersect_domain(R, isl_union_set_copy(D)); - - empty = isl_union_map_empty(isl_union_map_get_dim(S)); - isl_union_map_compute_flow(isl_union_map_copy(R), - isl_union_map_copy(W), empty, - isl_union_map_copy(S), - &dep_raw, NULL, NULL, NULL); - isl_union_map_compute_flow(isl_union_map_copy(W), - isl_union_map_copy(W), - isl_union_map_copy(R), - isl_union_map_copy(S), - &dep_waw, &dep_war, NULL, NULL); - - dep = isl_union_map_union(dep_waw, dep_war); - dep = isl_union_map_union(dep, dep_raw); - validity = isl_union_map_copy(dep); - proximity = isl_union_map_copy(dep); - - sched = isl_union_set_compute_schedule(isl_union_set_copy(D), - validity, proximity); - schedule = isl_schedule_get_map(sched); - isl_schedule_free(sched); - isl_union_map_free(W); - isl_union_map_free(R); - isl_union_map_free(S); - - is_injection = 1; - isl_union_map_foreach_map(schedule, &check_injective, &is_injection); - - domain = isl_union_map_domain(isl_union_map_copy(schedule)); - is_complete = isl_union_set_is_subset(D, domain); - isl_union_set_free(D); - isl_union_set_free(domain); - - test = isl_union_map_reverse(isl_union_map_copy(schedule)); - test = isl_union_map_apply_range(test, dep); - test = isl_union_map_apply_range(test, schedule); - - delta = isl_union_map_deltas(test); - if (isl_union_set_n_set(delta) == 0) { - is_tilable = 1; - is_parallel = 1; - is_nonneg = 1; - isl_union_set_free(delta); - } else { - delta_set = isl_set_from_union_set(delta); - - slice = isl_set_universe(isl_set_get_dim(delta_set)); - for (i = 0; i < tilable; ++i) - slice = isl_set_lower_bound_si(slice, isl_dim_set, i, 0); - is_tilable = isl_set_is_subset(delta_set, slice); - isl_set_free(slice); - - slice = isl_set_universe(isl_set_get_dim(delta_set)); - for (i = 0; i < parallel; ++i) - slice = isl_set_fix_si(slice, isl_dim_set, i, 0); - is_parallel = isl_set_is_subset(delta_set, slice); - isl_set_free(slice); - - origin = isl_set_universe(isl_set_get_dim(delta_set)); - for (i = 0; i < isl_set_dim(origin, isl_dim_set); ++i) - origin = isl_set_fix_si(origin, isl_dim_set, i, 0); - - delta_set = isl_set_union(delta_set, isl_set_copy(origin)); - delta_set = isl_set_lexmin(delta_set); - - is_nonneg = isl_set_is_equal(delta_set, origin); - - isl_set_free(origin); - isl_set_free(delta_set); - } - - if (is_nonneg < 0 || is_parallel < 0 || is_tilable < 0 || - is_injection < 0 || is_complete < 0) - return -1; - if (!is_complete) - isl_die(ctx, isl_error_unknown, - "generated schedule incomplete", return -1); - if (!is_injection) - isl_die(ctx, isl_error_unknown, - "generated schedule not injective on each statement", - return -1); - if (!is_nonneg) - isl_die(ctx, isl_error_unknown, - "negative dependences in generated schedule", - return -1); - if (!is_tilable) - isl_die(ctx, isl_error_unknown, - "generated schedule not as tilable as expected", - return -1); - if (!is_parallel) - isl_die(ctx, isl_error_unknown, - "generated schedule not as parallel as expected", - return -1); - - return 0; -} - -int test_special_schedule(isl_ctx *ctx) -{ - const char *str; - isl_union_set *dom; - isl_union_map *empty; - isl_union_map *dep; - isl_union_map *sched1, *sched2; - isl_schedule *schedule; - int equal; - - str = "{ S[i,j] : 0 <= i <= 10 }"; - dom = isl_union_set_read_from_str(ctx, str); - str = "{ S[i,j] -> S[i+1,j] : 0 <= i,j <= 10 }"; - dep = isl_union_map_read_from_str(ctx, str); - empty = isl_union_map_read_from_str(ctx, "{}"); - schedule = isl_union_set_compute_schedule(dom, empty, dep); - sched1 = isl_schedule_get_map(schedule); - isl_schedule_free(schedule); - - str = "{ S[i, j] -> [j, i] }"; - sched2 = isl_union_map_read_from_str(ctx, str); - - equal = isl_union_map_is_equal(sched1, sched2); - isl_union_map_free(sched1); - isl_union_map_free(sched2); - - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected schedule", - return -1); - - return 0; -} - -int test_schedule(isl_ctx *ctx) -{ - const char *D, *W, *R, *S; - - /* Jacobi */ - D = "[T,N] -> { S1[t,i] : 1 <= t <= T and 2 <= i <= N - 1 }"; - W = "{ S1[t,i] -> a[t,i] }"; - R = "{ S1[t,i] -> a[t-1,i]; S1[t,i] -> a[t-1,i-1]; " - "S1[t,i] -> a[t-1,i+1] }"; - S = "{ S1[t,i] -> [t,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 0) < 0) - return -1; - - /* Fig. 5 of CC2008 */ - D = "[N] -> { S_0[i, j] : i >= 0 and i <= -1 + N and j >= 2 and " - "j <= -1 + N }"; - W = "[N] -> { S_0[i, j] -> a[i, j] : i >= 0 and i <= -1 + N and " - "j >= 2 and j <= -1 + N }"; - R = "[N] -> { S_0[i, j] -> a[j, i] : i >= 0 and i <= -1 + N and " - "j >= 2 and j <= -1 + N; " - "S_0[i, j] -> a[i, -1 + j] : i >= 0 and i <= -1 + N and " - "j >= 2 and j <= -1 + N }"; - S = "[N] -> { S_0[i, j] -> [0, i, 0, j, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 0) < 0) - return -1; - - D = "{ S1[i] : 0 <= i <= 10; S2[i] : 0 <= i <= 9 }"; - W = "{ S1[i] -> a[i] }"; - R = "{ S2[i] -> a[i+1] }"; - S = "{ S1[i] -> [0,i]; S2[i] -> [1,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 1) < 0) - return -1; - - D = "{ S1[i] : 0 <= i < 10; S2[i] : 0 <= i < 10 }"; - W = "{ S1[i] -> a[i] }"; - R = "{ S2[i] -> a[9-i] }"; - S = "{ S1[i] -> [0,i]; S2[i] -> [1,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 1) < 0) - return -1; - - D = "[N] -> { S1[i] : 0 <= i < N; S2[i] : 0 <= i < N }"; - W = "{ S1[i] -> a[i] }"; - R = "[N] -> { S2[i] -> a[N-1-i] }"; - S = "{ S1[i] -> [0,i]; S2[i] -> [1,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 1) < 0) - return -1; - - D = "{ S1[i] : 0 < i < 10; S2[i] : 0 <= i < 10 }"; - W = "{ S1[i] -> a[i]; S2[i] -> b[i] }"; - R = "{ S2[i] -> a[i]; S1[i] -> b[i-1] }"; - S = "{ S1[i] -> [i,0]; S2[i] -> [i,1] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "[N] -> { S1[i] : 1 <= i <= N; S2[i,j] : 1 <= i,j <= N }"; - W = "{ S1[i] -> a[0,i]; S2[i,j] -> a[i,j] }"; - R = "{ S2[i,j] -> a[i-1,j] }"; - S = "{ S1[i] -> [0,i,0]; S2[i,j] -> [1,i,j] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 1) < 0) - return -1; - - D = "[N] -> { S1[i] : 1 <= i <= N; S2[i,j] : 1 <= i,j <= N }"; - W = "{ S1[i] -> a[i,0]; S2[i,j] -> a[i,j] }"; - R = "{ S2[i,j] -> a[i,j-1] }"; - S = "{ S1[i] -> [0,i,0]; S2[i,j] -> [1,i,j] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 1) < 0) - return -1; - - D = "[N] -> { S_0[]; S_1[i] : i >= 0 and i <= -1 + N; S_2[] }"; - W = "[N] -> { S_0[] -> a[0]; S_2[] -> b[0]; " - "S_1[i] -> a[1 + i] : i >= 0 and i <= -1 + N }"; - R = "[N] -> { S_2[] -> a[N]; S_1[i] -> a[i] : i >= 0 and i <= -1 + N }"; - S = "[N] -> { S_1[i] -> [1, i, 0]; S_2[] -> [2, 0, 1]; " - "S_0[] -> [0, 0, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 0) < 0) - return -1; - ctx->opt->schedule_parametric = 0; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - ctx->opt->schedule_parametric = 1; - - D = "[N] -> { S1[i] : 1 <= i <= N; S2[i] : 1 <= i <= N; " - "S3[i,j] : 1 <= i,j <= N; S4[i] : 1 <= i <= N }"; - W = "{ S1[i] -> a[i,0]; S2[i] -> a[0,i]; S3[i,j] -> a[i,j] }"; - R = "[N] -> { S3[i,j] -> a[i-1,j]; S3[i,j] -> a[i,j-1]; " - "S4[i] -> a[i,N] }"; - S = "{ S1[i] -> [0,i,0]; S2[i] -> [1,i,0]; S3[i,j] -> [2,i,j]; " - "S4[i] -> [4,i,0] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 0) < 0) - return -1; - - D = "[N] -> { S_0[i, j] : i >= 1 and i <= N and j >= 1 and j <= N }"; - W = "[N] -> { S_0[i, j] -> s[0] : i >= 1 and i <= N and j >= 1 and " - "j <= N }"; - R = "[N] -> { S_0[i, j] -> s[0] : i >= 1 and i <= N and j >= 1 and " - "j <= N; " - "S_0[i, j] -> a[i, j] : i >= 1 and i <= N and j >= 1 and " - "j <= N }"; - S = "[N] -> { S_0[i, j] -> [0, i, 0, j, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "[N] -> { S_0[t] : t >= 0 and t <= -1 + N; " - " S_2[t] : t >= 0 and t <= -1 + N; " - " S_1[t, i] : t >= 0 and t <= -1 + N and i >= 0 and " - "i <= -1 + N }"; - W = "[N] -> { S_0[t] -> a[t, 0] : t >= 0 and t <= -1 + N; " - " S_2[t] -> b[t] : t >= 0 and t <= -1 + N; " - " S_1[t, i] -> a[t, 1 + i] : t >= 0 and t <= -1 + N and " - "i >= 0 and i <= -1 + N }"; - R = "[N] -> { S_1[t, i] -> a[t, i] : t >= 0 and t <= -1 + N and " - "i >= 0 and i <= -1 + N; " - " S_2[t] -> a[t, N] : t >= 0 and t <= -1 + N }"; - S = "[N] -> { S_2[t] -> [0, t, 2]; S_1[t, i] -> [0, t, 1, i, 0]; " - " S_0[t] -> [0, t, 0] }"; - - if (test_one_schedule(ctx, D, W, R, S, 2, 1) < 0) - return -1; - ctx->opt->schedule_parametric = 0; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - ctx->opt->schedule_parametric = 1; - - D = "[N] -> { S1[i,j] : 0 <= i,j < N; S2[i,j] : 0 <= i,j < N }"; - S = "{ S1[i,j] -> [0,i,j]; S2[i,j] -> [1,i,j] }"; - if (test_one_schedule(ctx, D, "{}", "{}", S, 2, 2) < 0) - return -1; - - D = "[M, N] -> { S_1[i] : i >= 0 and i <= -1 + M; " - "S_0[i, j] : i >= 0 and i <= -1 + M and j >= 0 and j <= -1 + N }"; - W = "[M, N] -> { S_0[i, j] -> a[j] : i >= 0 and i <= -1 + M and " - "j >= 0 and j <= -1 + N; " - "S_1[i] -> b[0] : i >= 0 and i <= -1 + M }"; - R = "[M, N] -> { S_0[i, j] -> a[0] : i >= 0 and i <= -1 + M and " - "j >= 0 and j <= -1 + N; " - "S_1[i] -> b[0] : i >= 0 and i <= -1 + M }"; - S = "[M, N] -> { S_1[i] -> [1, i, 0]; S_0[i, j] -> [0, i, 0, j, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "{ S_0[i] : i >= 0 }"; - W = "{ S_0[i] -> a[i] : i >= 0 }"; - R = "{ S_0[i] -> a[0] : i >= 0 }"; - S = "{ S_0[i] -> [0, i, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "{ S_0[i] : i >= 0; S_1[i] : i >= 0 }"; - W = "{ S_0[i] -> a[i] : i >= 0; S_1[i] -> b[i] : i >= 0 }"; - R = "{ S_0[i] -> b[0] : i >= 0; S_1[i] -> a[i] : i >= 0 }"; - S = "{ S_1[i] -> [0, i, 1]; S_0[i] -> [0, i, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - return test_special_schedule(ctx); -} - -int test_plain_injective(isl_ctx *ctx, const char *str, int injective) -{ - isl_union_map *umap; - int test; - - umap = isl_union_map_read_from_str(ctx, str); - test = isl_union_map_plain_is_injective(umap); - isl_union_map_free(umap); - if (test < 0) - return -1; - if (test == injective) - return 0; - if (injective) - isl_die(ctx, isl_error_unknown, - "map not detected as injective", return -1); - else - isl_die(ctx, isl_error_unknown, - "map detected as injective", return -1); -} - -int test_injective(isl_ctx *ctx) -{ - const char *str; - - if (test_plain_injective(ctx, "{S[i,j] -> A[0]; T[i,j] -> B[1]}", 0)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0]; T[] -> B[0]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0]; T[] -> A[1]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0]; T[] -> A[0]}", 0)) - return -1; - if (test_plain_injective(ctx, "{S[i] -> A[i,0]; T[i] -> A[i,1]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[i] -> A[i]; T[i] -> A[i]}", 0)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0,0]; T[] -> A[0,1]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0,0]; T[] -> A[1,0]}", 1)) - return -1; - - str = "{S[] -> A[0,0]; T[] -> A[0,1]; U[] -> A[1,0]}"; - if (test_plain_injective(ctx, str, 1)) - return -1; - str = "{S[] -> A[0,0]; T[] -> A[0,1]; U[] -> A[0,0]}"; - if (test_plain_injective(ctx, str, 0)) - return -1; - - return 0; -} - -int test_aff(isl_ctx *ctx) -{ - const char *str; - isl_set *set; - isl_dim *dim; - isl_local_space *ls; - isl_aff *aff; - int zero; - - dim = isl_dim_set_alloc(ctx, 0, 1); - ls = isl_local_space_from_dim(dim); - aff = isl_aff_zero(ls); - - aff = isl_aff_add_coefficient_si(aff, isl_dim_set, 0, 1); - aff = isl_aff_scale_down_ui(aff, 3); - aff = isl_aff_floor(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_set, 0, 1); - aff = isl_aff_scale_down_ui(aff, 2); - aff = isl_aff_floor(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_set, 0, 1); - - str = "{ [10] }"; - set = isl_set_read_from_str(ctx, str, 0); - aff = isl_aff_gist(aff, set); - - aff = isl_aff_add_constant_si(aff, -16); - zero = isl_aff_plain_is_zero(aff); - isl_aff_free(aff); - - if (zero < 0) - return -1; - if (!zero) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -int test_dim_max(isl_ctx *ctx) -{ - int equal; - const char *str; - isl_map *map, *map2; - isl_set *set; - isl_pw_aff *pwaff; - - str = "[N] -> { [i] : 0 <= i <= min(N,10) }"; - set = isl_set_read_from_str(ctx, str, -1); - pwaff = isl_set_dim_max(set, 0); - map = isl_map_from_pw_aff(pwaff); - str = "[N] -> { [] -> [10] : N >= 10; [] -> [N] : N <= 9 and N >= 0 }"; - map2 = isl_map_read_from_str(ctx, str, -1); - equal = isl_map_is_equal(map, map2); - isl_map_free(map); - isl_map_free(map2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - str = "[N] -> { [i] : 0 <= i <= max(2N,N+6) }"; - set = isl_set_read_from_str(ctx, str, -1); - pwaff = isl_set_dim_max(set, 0); - map = isl_map_from_pw_aff(pwaff); - str = "[N] -> { [] -> [6 + N] : -6 <= N <= 5; [] -> [2N] : N >= 6 }"; - map2 = isl_map_read_from_str(ctx, str, -1); - equal = isl_map_is_equal(map, map2); - isl_map_free(map); - isl_map_free(map2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - str = "[N] -> { [i] : 0 <= i <= 2N or 0 <= i <= N+6 }"; - set = isl_set_read_from_str(ctx, str, -1); - pwaff = isl_set_dim_max(set, 0); - map = isl_map_from_pw_aff(pwaff); - str = "[N] -> { [] -> [6 + N] : -6 <= N <= 5; [] -> [2N] : N >= 6 }"; - map2 = isl_map_read_from_str(ctx, str, -1); - equal = isl_map_is_equal(map, map2); - isl_map_free(map); - isl_map_free(map2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - str = "[N,M] -> { [i,j] -> [([i/16]), i%16, ([j/16]), j%16] : " - "0 <= i < N and 0 <= j < M }"; - map = isl_map_read_from_str(ctx, str, -1); - set = isl_map_range(map); - - pwaff = isl_set_dim_max(isl_set_copy(set), 0); - map = isl_map_from_pw_aff(pwaff); - str = "[N,M] -> { [] -> [([(N-1)/16])] : M,N > 0 }"; - map2 = isl_map_read_from_str(ctx, str, -1); - equal = isl_map_is_equal(map, map2); - isl_map_free(map); - isl_map_free(map2); - - pwaff = isl_set_dim_max(isl_set_copy(set), 3); - map = isl_map_from_pw_aff(pwaff); - str = "[N,M] -> { [] -> [t] : t = min(M-1,15) and M,N > 0 }"; - map2 = isl_map_read_from_str(ctx, str, -1); - if (equal >= 0 && equal) - equal = isl_map_is_equal(map, map2); - isl_map_free(map); - isl_map_free(map2); - - isl_set_free(set); - - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -int main() -{ - struct isl_ctx *ctx; - - srcdir = getenv("srcdir"); - assert(srcdir); - - ctx = isl_ctx_alloc(); - if (test_dim_max(ctx) < 0) - goto error; - if (test_aff(ctx) < 0) - goto error; - if (test_injective(ctx) < 0) - goto error; - if (test_schedule(ctx) < 0) - goto error; - test_factorize(ctx); - test_subset(ctx); - test_lift(ctx); - test_bound(ctx); - test_union(ctx); - test_split_periods(ctx); - test_parse(ctx); - test_pwqp(ctx); - test_lex(ctx); - if (test_sv(ctx) < 0) - goto error; - test_bijective(ctx); - test_dep(ctx); - test_read(ctx); - test_bounded(ctx); - test_construction(ctx); - test_dim(ctx); - test_div(ctx); - test_application(ctx); - test_affine_hull(ctx); - test_convex_hull(ctx); - test_gist(ctx); - test_coalesce(ctx); - test_closure(ctx); - test_lexmin(ctx); - isl_ctx_free(ctx); - return 0; -error: - isl_ctx_free(ctx); - return -1; -} diff --git a/cloog-0.16.3/isl/isl_transitive_closure.c b/cloog-0.16.3/isl/isl_transitive_closure.c deleted file mode 100644 index 53f5d1496e5c3ecf3a7d6eb6faab158ab24617d7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_transitive_closure.c +++ /dev/null @@ -1,3103 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -int isl_map_is_transitively_closed(__isl_keep isl_map *map) -{ - isl_map *map2; - int closed; - - map2 = isl_map_apply_range(isl_map_copy(map), isl_map_copy(map)); - closed = isl_map_is_subset(map2, map); - isl_map_free(map2); - - return closed; -} - -int isl_union_map_is_transitively_closed(__isl_keep isl_union_map *umap) -{ - isl_union_map *umap2; - int closed; - - umap2 = isl_union_map_apply_range(isl_union_map_copy(umap), - isl_union_map_copy(umap)); - closed = isl_union_map_is_subset(umap2, umap); - isl_union_map_free(umap2); - - return closed; -} - -/* Given a map that represents a path with the length of the path - * encoded as the difference between the last output coordindate - * and the last input coordinate, set this length to either - * exactly "length" (if "exactly" is set) or at least "length" - * (if "exactly" is not set). - */ -static __isl_give isl_map *set_path_length(__isl_take isl_map *map, - int exactly, int length) -{ - struct isl_dim *dim; - struct isl_basic_map *bmap; - unsigned d; - unsigned nparam; - int k; - isl_int *c; - - if (!map) - return NULL; - - dim = isl_map_get_dim(map); - d = isl_dim_size(dim, isl_dim_in); - nparam = isl_dim_size(dim, isl_dim_param); - bmap = isl_basic_map_alloc_dim(dim, 0, 1, 1); - if (exactly) { - k = isl_basic_map_alloc_equality(bmap); - c = bmap->eq[k]; - } else { - k = isl_basic_map_alloc_inequality(bmap); - c = bmap->ineq[k]; - } - if (k < 0) - goto error; - isl_seq_clr(c, 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(c[0], -length); - isl_int_set_si(c[1 + nparam + d - 1], -1); - isl_int_set_si(c[1 + nparam + d + d - 1], 1); - - bmap = isl_basic_map_finalize(bmap); - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; -error: - isl_basic_map_free(bmap); - isl_map_free(map); - return NULL; -} - -/* Check whether the overapproximation of the power of "map" is exactly - * the power of "map". Let R be "map" and A_k the overapproximation. - * The approximation is exact if - * - * A_1 = R - * A_k = A_{k-1} \circ R k >= 2 - * - * Since A_k is known to be an overapproximation, we only need to check - * - * A_1 \subset R - * A_k \subset A_{k-1} \circ R k >= 2 - * - * In practice, "app" has an extra input and output coordinate - * to encode the length of the path. So, we first need to add - * this coordinate to "map" and set the length of the path to - * one. - */ -static int check_power_exactness(__isl_take isl_map *map, - __isl_take isl_map *app) -{ - int exact; - isl_map *app_1; - isl_map *app_2; - - map = isl_map_add_dims(map, isl_dim_in, 1); - map = isl_map_add_dims(map, isl_dim_out, 1); - map = set_path_length(map, 1, 1); - - app_1 = set_path_length(isl_map_copy(app), 1, 1); - - exact = isl_map_is_subset(app_1, map); - isl_map_free(app_1); - - if (!exact || exact < 0) { - isl_map_free(app); - isl_map_free(map); - return exact; - } - - app_1 = set_path_length(isl_map_copy(app), 0, 1); - app_2 = set_path_length(app, 0, 2); - app_1 = isl_map_apply_range(map, app_1); - - exact = isl_map_is_subset(app_2, app_1); - - isl_map_free(app_1); - isl_map_free(app_2); - - return exact; -} - -/* Check whether the overapproximation of the power of "map" is exactly - * the power of "map", possibly after projecting out the power (if "project" - * is set). - * - * If "project" is set and if "steps" can only result in acyclic paths, - * then we check - * - * A = R \cup (A \circ R) - * - * where A is the overapproximation with the power projected out, i.e., - * an overapproximation of the transitive closure. - * More specifically, since A is known to be an overapproximation, we check - * - * A \subset R \cup (A \circ R) - * - * Otherwise, we check if the power is exact. - * - * Note that "app" has an extra input and output coordinate to encode - * the length of the part. If we are only interested in the transitive - * closure, then we can simply project out these coordinates first. - */ -static int check_exactness(__isl_take isl_map *map, __isl_take isl_map *app, - int project) -{ - isl_map *test; - int exact; - unsigned d; - - if (!project) - return check_power_exactness(map, app); - - d = isl_map_dim(map, isl_dim_in); - app = set_path_length(app, 0, 1); - app = isl_map_project_out(app, isl_dim_in, d, 1); - app = isl_map_project_out(app, isl_dim_out, d, 1); - - app = isl_map_reset_dim(app, isl_map_get_dim(map)); - - test = isl_map_apply_range(isl_map_copy(map), isl_map_copy(app)); - test = isl_map_union(test, isl_map_copy(map)); - - exact = isl_map_is_subset(app, test); - - isl_map_free(app); - isl_map_free(test); - - isl_map_free(map); - - return exact; -} - -/* - * The transitive closure implementation is based on the paper - * "Computing the Transitive Closure of a Union of Affine Integer - * Tuple Relations" by Anna Beletska, Denis Barthou, Wlodzimierz Bielecki and - * Albert Cohen. - */ - -/* Given a set of n offsets v_i (the rows of "steps"), construct a relation - * of the given dimension specification (Z^{n+1} -> Z^{n+1}) - * that maps an element x to any element that can be reached - * by taking a non-negative number of steps along any of - * the extended offsets v'_i = [v_i 1]. - * That is, construct - * - * { [x] -> [y] : exists k_i >= 0, y = x + \sum_i k_i v'_i } - * - * For any element in this relation, the number of steps taken - * is equal to the difference in the final coordinates. - */ -static __isl_give isl_map *path_along_steps(__isl_take isl_dim *dim, - __isl_keep isl_mat *steps) -{ - int i, j, k; - struct isl_basic_map *path = NULL; - unsigned d; - unsigned n; - unsigned nparam; - - if (!dim || !steps) - goto error; - - d = isl_dim_size(dim, isl_dim_in); - n = steps->n_row; - nparam = isl_dim_size(dim, isl_dim_param); - - path = isl_basic_map_alloc_dim(isl_dim_copy(dim), n, d, n); - - for (i = 0; i < n; ++i) { - k = isl_basic_map_alloc_div(path); - if (k < 0) - goto error; - isl_assert(steps->ctx, i == k, goto error); - isl_int_set_si(path->div[k][0], 0); - } - - for (i = 0; i < d; ++i) { - k = isl_basic_map_alloc_equality(path); - if (k < 0) - goto error; - isl_seq_clr(path->eq[k], 1 + isl_basic_map_total_dim(path)); - isl_int_set_si(path->eq[k][1 + nparam + i], 1); - isl_int_set_si(path->eq[k][1 + nparam + d + i], -1); - if (i == d - 1) - for (j = 0; j < n; ++j) - isl_int_set_si(path->eq[k][1 + nparam + 2 * d + j], 1); - else - for (j = 0; j < n; ++j) - isl_int_set(path->eq[k][1 + nparam + 2 * d + j], - steps->row[j][i]); - } - - for (i = 0; i < n; ++i) { - k = isl_basic_map_alloc_inequality(path); - if (k < 0) - goto error; - isl_seq_clr(path->ineq[k], 1 + isl_basic_map_total_dim(path)); - isl_int_set_si(path->ineq[k][1 + nparam + 2 * d + i], 1); - } - - isl_dim_free(dim); - - path = isl_basic_map_simplify(path); - path = isl_basic_map_finalize(path); - return isl_map_from_basic_map(path); -error: - isl_dim_free(dim); - isl_basic_map_free(path); - return NULL; -} - -#define IMPURE 0 -#define PURE_PARAM 1 -#define PURE_VAR 2 -#define MIXED 3 - -/* Check whether the parametric constant term of constraint c is never - * positive in "bset". - */ -static int parametric_constant_never_positive(__isl_keep isl_basic_set *bset, - isl_int *c, int *div_purity) -{ - unsigned d; - unsigned n_div; - unsigned nparam; - int i; - int k; - int empty; - - n_div = isl_basic_set_dim(bset, isl_dim_div); - d = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_cow(bset); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k], 1 + isl_basic_set_total_dim(bset)); - isl_seq_cpy(bset->ineq[k], c, 1 + nparam); - for (i = 0; i < n_div; ++i) { - if (div_purity[i] != PURE_PARAM) - continue; - isl_int_set(bset->ineq[k][1 + nparam + d + i], - c[1 + nparam + d + i]); - } - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - empty = isl_basic_set_is_empty(bset); - isl_basic_set_free(bset); - - return empty; -error: - isl_basic_set_free(bset); - return -1; -} - -/* Return PURE_PARAM if only the coefficients of the parameters are non-zero. - * Return PURE_VAR if only the coefficients of the set variables are non-zero. - * Return MIXED if only the coefficients of the parameters and the set - * variables are non-zero and if moreover the parametric constant - * can never attain positive values. - * Return IMPURE otherwise. - * - * If div_purity is NULL then we are dealing with a non-parametric set - * and so the constraint is obviously PURE_VAR. - */ -static int purity(__isl_keep isl_basic_set *bset, isl_int *c, int *div_purity, - int eq) -{ - unsigned d; - unsigned n_div; - unsigned nparam; - int empty; - int i; - int p = 0, v = 0; - - if (!div_purity) - return PURE_VAR; - - n_div = isl_basic_set_dim(bset, isl_dim_div); - d = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - for (i = 0; i < n_div; ++i) { - if (isl_int_is_zero(c[1 + nparam + d + i])) - continue; - switch (div_purity[i]) { - case PURE_PARAM: p = 1; break; - case PURE_VAR: v = 1; break; - default: return IMPURE; - } - } - if (!p && isl_seq_first_non_zero(c + 1, nparam) == -1) - return PURE_VAR; - if (!v && isl_seq_first_non_zero(c + 1 + nparam, d) == -1) - return PURE_PARAM; - - empty = parametric_constant_never_positive(bset, c, div_purity); - if (eq && empty >= 0 && !empty) { - isl_seq_neg(c, c, 1 + nparam + d + n_div); - empty = parametric_constant_never_positive(bset, c, div_purity); - } - - return empty < 0 ? -1 : empty ? MIXED : IMPURE; -} - -/* Return an array of integers indicating the type of each div in bset. - * If the div is (recursively) defined in terms of only the parameters, - * then the type is PURE_PARAM. - * If the div is (recursively) defined in terms of only the set variables, - * then the type is PURE_VAR. - * Otherwise, the type is IMPURE. - */ -static __isl_give int *get_div_purity(__isl_keep isl_basic_set *bset) -{ - int i, j; - int *div_purity; - unsigned d; - unsigned n_div; - unsigned nparam; - - if (!bset) - return NULL; - - n_div = isl_basic_set_dim(bset, isl_dim_div); - d = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - div_purity = isl_alloc_array(bset->ctx, int, n_div); - if (!div_purity) - return NULL; - - for (i = 0; i < bset->n_div; ++i) { - int p = 0, v = 0; - if (isl_int_is_zero(bset->div[i][0])) { - div_purity[i] = IMPURE; - continue; - } - if (isl_seq_first_non_zero(bset->div[i] + 2, nparam) != -1) - p = 1; - if (isl_seq_first_non_zero(bset->div[i] + 2 + nparam, d) != -1) - v = 1; - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(bset->div[i][2 + nparam + d + j])) - continue; - switch (div_purity[j]) { - case PURE_PARAM: p = 1; break; - case PURE_VAR: v = 1; break; - default: p = v = 1; break; - } - } - div_purity[i] = v ? p ? IMPURE : PURE_VAR : PURE_PARAM; - } - - return div_purity; -} - -/* Given a path with the as yet unconstrained length at position "pos", - * check if setting the length to zero results in only the identity - * mapping. - */ -static int empty_path_is_identity(__isl_keep isl_basic_map *path, unsigned pos) -{ - isl_basic_map *test = NULL; - isl_basic_map *id = NULL; - int k; - int is_id; - - test = isl_basic_map_copy(path); - test = isl_basic_map_extend_constraints(test, 1, 0); - k = isl_basic_map_alloc_equality(test); - if (k < 0) - goto error; - isl_seq_clr(test->eq[k], 1 + isl_basic_map_total_dim(test)); - isl_int_set_si(test->eq[k][pos], 1); - id = isl_basic_map_identity(isl_basic_map_get_dim(path)); - is_id = isl_basic_map_is_equal(test, id); - isl_basic_map_free(test); - isl_basic_map_free(id); - return is_id; -error: - isl_basic_map_free(test); - return -1; -} - -/* If any of the constraints is found to be impure then this function - * sets *impurity to 1. - */ -static __isl_give isl_basic_map *add_delta_constraints( - __isl_take isl_basic_map *path, - __isl_keep isl_basic_set *delta, unsigned off, unsigned nparam, - unsigned d, int *div_purity, int eq, int *impurity) -{ - int i, k; - int n = eq ? delta->n_eq : delta->n_ineq; - isl_int **delta_c = eq ? delta->eq : delta->ineq; - unsigned n_div; - - n_div = isl_basic_set_dim(delta, isl_dim_div); - - for (i = 0; i < n; ++i) { - isl_int *path_c; - int p = purity(delta, delta_c[i], div_purity, eq); - if (p < 0) - goto error; - if (p != PURE_VAR && p != PURE_PARAM && !*impurity) - *impurity = 1; - if (p == IMPURE) - continue; - if (eq && p != MIXED) { - k = isl_basic_map_alloc_equality(path); - path_c = path->eq[k]; - } else { - k = isl_basic_map_alloc_inequality(path); - path_c = path->ineq[k]; - } - if (k < 0) - goto error; - isl_seq_clr(path_c, 1 + isl_basic_map_total_dim(path)); - if (p == PURE_VAR) { - isl_seq_cpy(path_c + off, - delta_c[i] + 1 + nparam, d); - isl_int_set(path_c[off + d], delta_c[i][0]); - } else if (p == PURE_PARAM) { - isl_seq_cpy(path_c, delta_c[i], 1 + nparam); - } else { - isl_seq_cpy(path_c + off, - delta_c[i] + 1 + nparam, d); - isl_seq_cpy(path_c, delta_c[i], 1 + nparam); - } - isl_seq_cpy(path_c + off - n_div, - delta_c[i] + 1 + nparam + d, n_div); - } - - return path; -error: - isl_basic_map_free(path); - return NULL; -} - -/* Given a set of offsets "delta", construct a relation of the - * given dimension specification (Z^{n+1} -> Z^{n+1}) that - * is an overapproximation of the relations that - * maps an element x to any element that can be reached - * by taking a non-negative number of steps along any of - * the elements in "delta". - * That is, construct an approximation of - * - * { [x] -> [y] : exists f \in \delta, k \in Z : - * y = x + k [f, 1] and k >= 0 } - * - * For any element in this relation, the number of steps taken - * is equal to the difference in the final coordinates. - * - * In particular, let delta be defined as - * - * \delta = [p] -> { [x] : A x + a >= 0 and B p + b >= 0 and - * C x + C'p + c >= 0 and - * D x + D'p + d >= 0 } - * - * where the constraints C x + C'p + c >= 0 are such that the parametric - * constant term of each constraint j, "C_j x + C'_j p + c_j", - * can never attain positive values, then the relation is constructed as - * - * { [x] -> [y] : exists [f, k] \in Z^{n+1} : y = x + f and - * A f + k a >= 0 and B p + b >= 0 and - * C f + C'p + c >= 0 and k >= 1 } - * union { [x] -> [x] } - * - * If the zero-length paths happen to correspond exactly to the identity - * mapping, then we return - * - * { [x] -> [y] : exists [f, k] \in Z^{n+1} : y = x + f and - * A f + k a >= 0 and B p + b >= 0 and - * C f + C'p + c >= 0 and k >= 0 } - * - * instead. - * - * Existentially quantified variables in \delta are handled by - * classifying them as independent of the parameters, purely - * parameter dependent and others. Constraints containing - * any of the other existentially quantified variables are removed. - * This is safe, but leads to an additional overapproximation. - * - * If there are any impure constraints, then we also eliminate - * the parameters from \delta, resulting in a set - * - * \delta' = { [x] : E x + e >= 0 } - * - * and add the constraints - * - * E f + k e >= 0 - * - * to the constructed relation. - */ -static __isl_give isl_map *path_along_delta(__isl_take isl_dim *dim, - __isl_take isl_basic_set *delta) -{ - isl_basic_map *path = NULL; - unsigned d; - unsigned n_div; - unsigned nparam; - unsigned off; - int i, k; - int is_id; - int *div_purity = NULL; - int impurity = 0; - - if (!delta) - goto error; - n_div = isl_basic_set_dim(delta, isl_dim_div); - d = isl_basic_set_dim(delta, isl_dim_set); - nparam = isl_basic_set_dim(delta, isl_dim_param); - path = isl_basic_map_alloc_dim(isl_dim_copy(dim), n_div + d + 1, - d + 1 + delta->n_eq, delta->n_eq + delta->n_ineq + 1); - off = 1 + nparam + 2 * (d + 1) + n_div; - - for (i = 0; i < n_div + d + 1; ++i) { - k = isl_basic_map_alloc_div(path); - if (k < 0) - goto error; - isl_int_set_si(path->div[k][0], 0); - } - - for (i = 0; i < d + 1; ++i) { - k = isl_basic_map_alloc_equality(path); - if (k < 0) - goto error; - isl_seq_clr(path->eq[k], 1 + isl_basic_map_total_dim(path)); - isl_int_set_si(path->eq[k][1 + nparam + i], 1); - isl_int_set_si(path->eq[k][1 + nparam + d + 1 + i], -1); - isl_int_set_si(path->eq[k][off + i], 1); - } - - div_purity = get_div_purity(delta); - if (!div_purity) - goto error; - - path = add_delta_constraints(path, delta, off, nparam, d, - div_purity, 1, &impurity); - path = add_delta_constraints(path, delta, off, nparam, d, - div_purity, 0, &impurity); - if (impurity) { - isl_dim *dim = isl_basic_set_get_dim(delta); - delta = isl_basic_set_project_out(delta, - isl_dim_param, 0, nparam); - delta = isl_basic_set_add(delta, isl_dim_param, nparam); - delta = isl_basic_set_reset_dim(delta, dim); - if (!delta) - goto error; - path = isl_basic_map_extend_constraints(path, delta->n_eq, - delta->n_ineq + 1); - path = add_delta_constraints(path, delta, off, nparam, d, - NULL, 1, &impurity); - path = add_delta_constraints(path, delta, off, nparam, d, - NULL, 0, &impurity); - path = isl_basic_map_gauss(path, NULL); - } - - is_id = empty_path_is_identity(path, off + d); - if (is_id < 0) - goto error; - - k = isl_basic_map_alloc_inequality(path); - if (k < 0) - goto error; - isl_seq_clr(path->ineq[k], 1 + isl_basic_map_total_dim(path)); - if (!is_id) - isl_int_set_si(path->ineq[k][0], -1); - isl_int_set_si(path->ineq[k][off + d], 1); - - free(div_purity); - isl_basic_set_free(delta); - path = isl_basic_map_finalize(path); - if (is_id) { - isl_dim_free(dim); - return isl_map_from_basic_map(path); - } - return isl_basic_map_union(path, isl_basic_map_identity(dim)); -error: - free(div_purity); - isl_dim_free(dim); - isl_basic_set_free(delta); - isl_basic_map_free(path); - return NULL; -} - -/* Given a dimension specification Z^{n+1} -> Z^{n+1} and a parameter "param", - * construct a map that equates the parameter to the difference - * in the final coordinates and imposes that this difference is positive. - * That is, construct - * - * { [x,x_s] -> [y,y_s] : k = y_s - x_s > 0 } - */ -static __isl_give isl_map *equate_parameter_to_length(__isl_take isl_dim *dim, - unsigned param) -{ - struct isl_basic_map *bmap; - unsigned d; - unsigned nparam; - int k; - - d = isl_dim_size(dim, isl_dim_in); - nparam = isl_dim_size(dim, isl_dim_param); - bmap = isl_basic_map_alloc_dim(dim, 0, 1, 1); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[k][1 + param], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + d - 1], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + d + d - 1], 1); - - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[k][1 + param], 1); - isl_int_set_si(bmap->ineq[k][0], -1); - - bmap = isl_basic_map_finalize(bmap); - return isl_map_from_basic_map(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Check whether "path" is acyclic, where the last coordinates of domain - * and range of path encode the number of steps taken. - * That is, check whether - * - * { d | d = y - x and (x,y) in path } - * - * does not contain any element with positive last coordinate (positive length) - * and zero remaining coordinates (cycle). - */ -static int is_acyclic(__isl_take isl_map *path) -{ - int i; - int acyclic; - unsigned dim; - struct isl_set *delta; - - delta = isl_map_deltas(path); - dim = isl_set_dim(delta, isl_dim_set); - for (i = 0; i < dim; ++i) { - if (i == dim -1) - delta = isl_set_lower_bound_si(delta, isl_dim_set, i, 1); - else - delta = isl_set_fix_si(delta, isl_dim_set, i, 0); - } - - acyclic = isl_set_is_empty(delta); - isl_set_free(delta); - - return acyclic; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D - * and a dimension specification (Z^{n+1} -> Z^{n+1}), - * construct a map that is an overapproximation of the map - * that takes an element from the space D \times Z to another - * element from the same space, such that the first n coordinates of the - * difference between them is a sum of differences between images - * and pre-images in one of the R_i and such that the last coordinate - * is equal to the number of steps taken. - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i, \sum_i k_i) } - * - * The elements of the singleton \Delta_i's are collected as the - * rows of the steps matrix. For all these \Delta_i's together, - * a single path is constructed. - * For each of the other \Delta_i's, we compute an overapproximation - * of the paths along elements of \Delta_i. - * Since each of these paths performs an addition, composition is - * symmetric and we can simply compose all resulting paths in any order. - */ -static __isl_give isl_map *construct_extended_path(__isl_take isl_dim *dim, - __isl_keep isl_map *map, int *project) -{ - struct isl_mat *steps = NULL; - struct isl_map *path = NULL; - unsigned d; - int i, j, n; - - d = isl_map_dim(map, isl_dim_in); - - path = isl_map_identity(isl_dim_copy(dim)); - - steps = isl_mat_alloc(map->ctx, map->n, d); - if (!steps) - goto error; - - n = 0; - for (i = 0; i < map->n; ++i) { - struct isl_basic_set *delta; - - delta = isl_basic_map_deltas(isl_basic_map_copy(map->p[i])); - - for (j = 0; j < d; ++j) { - int fixed; - - fixed = isl_basic_set_plain_dim_is_fixed(delta, j, - &steps->row[n][j]); - if (fixed < 0) { - isl_basic_set_free(delta); - goto error; - } - if (!fixed) - break; - } - - - if (j < d) { - path = isl_map_apply_range(path, - path_along_delta(isl_dim_copy(dim), delta)); - path = isl_map_coalesce(path); - } else { - isl_basic_set_free(delta); - ++n; - } - } - - if (n > 0) { - steps->n_row = n; - path = isl_map_apply_range(path, - path_along_steps(isl_dim_copy(dim), steps)); - } - - if (project && *project) { - *project = is_acyclic(isl_map_copy(path)); - if (*project < 0) - goto error; - } - - isl_dim_free(dim); - isl_mat_free(steps); - return path; -error: - isl_dim_free(dim); - isl_mat_free(steps); - isl_map_free(path); - return NULL; -} - -static int isl_set_overlaps(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - isl_set *i; - int no_overlap; - - if (!isl_dim_tuple_match(set1->dim, isl_dim_set, set2->dim, isl_dim_set)) - return 0; - - i = isl_set_intersect(isl_set_copy(set1), isl_set_copy(set2)); - no_overlap = isl_set_is_empty(i); - isl_set_free(i); - - return no_overlap < 0 ? -1 : !no_overlap; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D - * and a dimension specification (Z^{n+1} -> Z^{n+1}), - * construct a map that is an overapproximation of the map - * that takes an element from the dom R \times Z to an - * element from ran R \times Z, such that the first n coordinates of the - * difference between them is a sum of differences between images - * and pre-images in one of the R_i and such that the last coordinate - * is equal to the number of steps taken. - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i, \sum_i k_i) and - * x in dom R and x + d in ran R and - * \sum_i k_i >= 1 } - */ -static __isl_give isl_map *construct_component(__isl_take isl_dim *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - struct isl_set *domain = NULL; - struct isl_set *range = NULL; - struct isl_map *app = NULL; - struct isl_map *path = NULL; - - domain = isl_map_domain(isl_map_copy(map)); - domain = isl_set_coalesce(domain); - range = isl_map_range(isl_map_copy(map)); - range = isl_set_coalesce(range); - if (!isl_set_overlaps(domain, range)) { - isl_set_free(domain); - isl_set_free(range); - isl_dim_free(dim); - - map = isl_map_copy(map); - map = isl_map_add_dims(map, isl_dim_in, 1); - map = isl_map_add_dims(map, isl_dim_out, 1); - map = set_path_length(map, 1, 1); - return map; - } - app = isl_map_from_domain_and_range(domain, range); - app = isl_map_add_dims(app, isl_dim_in, 1); - app = isl_map_add_dims(app, isl_dim_out, 1); - - path = construct_extended_path(isl_dim_copy(dim), map, - exact && *exact ? &project : NULL); - app = isl_map_intersect(app, path); - - if (exact && *exact && - (*exact = check_exactness(isl_map_copy(map), isl_map_copy(app), - project)) < 0) - goto error; - - isl_dim_free(dim); - app = set_path_length(app, 0, 1); - return app; -error: - isl_dim_free(dim); - isl_map_free(app); - return NULL; -} - -/* Call construct_component and, if "project" is set, project out - * the final coordinates. - */ -static __isl_give isl_map *construct_projected_component( - __isl_take isl_dim *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - isl_map *app; - unsigned d; - - if (!dim) - return NULL; - d = isl_dim_size(dim, isl_dim_in); - - app = construct_component(dim, map, exact, project); - if (project) { - app = isl_map_project_out(app, isl_dim_in, d - 1, 1); - app = isl_map_project_out(app, isl_dim_out, d - 1, 1); - } - return app; -} - -/* Compute an extended version, i.e., with path lengths, of - * an overapproximation of the transitive closure of "bmap" - * with path lengths greater than or equal to zero and with - * domain and range equal to "dom". - */ -static __isl_give isl_map *q_closure(__isl_take isl_dim *dim, - __isl_take isl_set *dom, __isl_keep isl_basic_map *bmap, int *exact) -{ - int project = 1; - isl_map *path; - isl_map *map; - isl_map *app; - - dom = isl_set_add_dims(dom, isl_dim_set, 1); - app = isl_map_from_domain_and_range(dom, isl_set_copy(dom)); - map = isl_map_from_basic_map(isl_basic_map_copy(bmap)); - path = construct_extended_path(dim, map, &project); - app = isl_map_intersect(app, path); - - if ((*exact = check_exactness(map, isl_map_copy(app), project)) < 0) - goto error; - - return app; -error: - isl_map_free(app); - return NULL; -} - -/* Check whether qc has any elements of length at least one - * with domain and/or range outside of dom and ran. - */ -static int has_spurious_elements(__isl_keep isl_map *qc, - __isl_keep isl_set *dom, __isl_keep isl_set *ran) -{ - isl_set *s; - int subset; - unsigned d; - - if (!qc || !dom || !ran) - return -1; - - d = isl_map_dim(qc, isl_dim_in); - - qc = isl_map_copy(qc); - qc = set_path_length(qc, 0, 1); - qc = isl_map_project_out(qc, isl_dim_in, d - 1, 1); - qc = isl_map_project_out(qc, isl_dim_out, d - 1, 1); - - s = isl_map_domain(isl_map_copy(qc)); - subset = isl_set_is_subset(s, dom); - isl_set_free(s); - if (subset < 0) - goto error; - if (!subset) { - isl_map_free(qc); - return 1; - } - - s = isl_map_range(qc); - subset = isl_set_is_subset(s, ran); - isl_set_free(s); - - return subset < 0 ? -1 : !subset; -error: - isl_map_free(qc); - return -1; -} - -#define LEFT 2 -#define RIGHT 1 - -/* For each basic map in "map", except i, check whether it combines - * with the transitive closure that is reflexive on C combines - * to the left and to the right. - * - * In particular, if - * - * dom map_j \subseteq C - * - * then right[j] is set to 1. Otherwise, if - * - * ran map_i \cap dom map_j = \emptyset - * - * then right[j] is set to 0. Otherwise, composing to the right - * is impossible. - * - * Similar, for composing to the left, we have if - * - * ran map_j \subseteq C - * - * then left[j] is set to 1. Otherwise, if - * - * dom map_i \cap ran map_j = \emptyset - * - * then left[j] is set to 0. Otherwise, composing to the left - * is impossible. - * - * The return value is or'd with LEFT if composing to the left - * is possible and with RIGHT if composing to the right is possible. - */ -static int composability(__isl_keep isl_set *C, int i, - isl_set **dom, isl_set **ran, int *left, int *right, - __isl_keep isl_map *map) -{ - int j; - int ok; - - ok = LEFT | RIGHT; - for (j = 0; j < map->n && ok; ++j) { - int overlaps, subset; - if (j == i) - continue; - - if (ok & RIGHT) { - if (!dom[j]) - dom[j] = isl_set_from_basic_set( - isl_basic_map_domain( - isl_basic_map_copy(map->p[j]))); - if (!dom[j]) - return -1; - overlaps = isl_set_overlaps(ran[i], dom[j]); - if (overlaps < 0) - return -1; - if (!overlaps) - right[j] = 0; - else { - subset = isl_set_is_subset(dom[j], C); - if (subset < 0) - return -1; - if (subset) - right[j] = 1; - else - ok &= ~RIGHT; - } - } - - if (ok & LEFT) { - if (!ran[j]) - ran[j] = isl_set_from_basic_set( - isl_basic_map_range( - isl_basic_map_copy(map->p[j]))); - if (!ran[j]) - return -1; - overlaps = isl_set_overlaps(dom[i], ran[j]); - if (overlaps < 0) - return -1; - if (!overlaps) - left[j] = 0; - else { - subset = isl_set_is_subset(ran[j], C); - if (subset < 0) - return -1; - if (subset) - left[j] = 1; - else - ok &= ~LEFT; - } - } - } - - return ok; -} - -static __isl_give isl_map *anonymize(__isl_take isl_map *map) -{ - map = isl_map_reset(map, isl_dim_in); - map = isl_map_reset(map, isl_dim_out); - return map; -} - -/* Return a map that is a union of the basic maps in "map", except i, - * composed to left and right with qc based on the entries of "left" - * and "right". - */ -static __isl_give isl_map *compose(__isl_keep isl_map *map, int i, - __isl_take isl_map *qc, int *left, int *right) -{ - int j; - isl_map *comp; - - comp = isl_map_empty(isl_map_get_dim(map)); - for (j = 0; j < map->n; ++j) { - isl_map *map_j; - - if (j == i) - continue; - - map_j = isl_map_from_basic_map(isl_basic_map_copy(map->p[j])); - map_j = anonymize(map_j); - if (left && left[j]) - map_j = isl_map_apply_range(map_j, isl_map_copy(qc)); - if (right && right[j]) - map_j = isl_map_apply_range(isl_map_copy(qc), map_j); - comp = isl_map_union(comp, map_j); - } - - comp = isl_map_compute_divs(comp); - comp = isl_map_coalesce(comp); - - isl_map_free(qc); - - return comp; -} - -/* Compute the transitive closure of "map" incrementally by - * computing - * - * map_i^+ \cup qc^+ - * - * or - * - * map_i^+ \cup ((id \cup map_i^) \circ qc^+) - * - * or - * - * map_i^+ \cup (qc^+ \circ (id \cup map_i^)) - * - * depending on whether left or right are NULL. - */ -static __isl_give isl_map *compute_incremental( - __isl_take isl_dim *dim, __isl_keep isl_map *map, - int i, __isl_take isl_map *qc, int *left, int *right, int *exact) -{ - isl_map *map_i; - isl_map *tc; - isl_map *rtc = NULL; - - if (!map) - goto error; - isl_assert(map->ctx, left || right, goto error); - - map_i = isl_map_from_basic_map(isl_basic_map_copy(map->p[i])); - tc = construct_projected_component(isl_dim_copy(dim), map_i, - exact, 1); - isl_map_free(map_i); - - if (*exact) - qc = isl_map_transitive_closure(qc, exact); - - if (!*exact) { - isl_dim_free(dim); - isl_map_free(tc); - isl_map_free(qc); - return isl_map_universe(isl_map_get_dim(map)); - } - - if (!left || !right) - rtc = isl_map_union(isl_map_copy(tc), - isl_map_identity(isl_map_get_dim(tc))); - if (!right) - qc = isl_map_apply_range(rtc, qc); - if (!left) - qc = isl_map_apply_range(qc, rtc); - qc = isl_map_union(tc, qc); - - isl_dim_free(dim); - - return qc; -error: - isl_dim_free(dim); - isl_map_free(qc); - return NULL; -} - -/* Given a map "map", try to find a basic map such that - * map^+ can be computed as - * - * map^+ = map_i^+ \cup - * \bigcup_j ((map_i^+ \cup Id_C)^+ \circ map_j \circ (map_i^+ \cup Id_C))^+ - * - * with C the simple hull of the domain and range of the input map. - * map_i^ \cup Id_C is computed by allowing the path lengths to be zero - * and by intersecting domain and range with C. - * Of course, we need to check that this is actually equal to map_i^ \cup Id_C. - * Also, we only use the incremental computation if all the transitive - * closures are exact and if the number of basic maps in the union, - * after computing the integer divisions, is smaller than the number - * of basic maps in the input map. - */ -static int incemental_on_entire_domain(__isl_keep isl_dim *dim, - __isl_keep isl_map *map, - isl_set **dom, isl_set **ran, int *left, int *right, - __isl_give isl_map **res) -{ - int i; - isl_set *C; - unsigned d; - - *res = NULL; - - C = isl_set_union(isl_map_domain(isl_map_copy(map)), - isl_map_range(isl_map_copy(map))); - C = isl_set_from_basic_set(isl_set_simple_hull(C)); - if (!C) - return -1; - if (C->n != 1) { - isl_set_free(C); - return 0; - } - - d = isl_map_dim(map, isl_dim_in); - - for (i = 0; i < map->n; ++i) { - isl_map *qc; - int exact_i, spurious; - int j; - dom[i] = isl_set_from_basic_set(isl_basic_map_domain( - isl_basic_map_copy(map->p[i]))); - ran[i] = isl_set_from_basic_set(isl_basic_map_range( - isl_basic_map_copy(map->p[i]))); - qc = q_closure(isl_dim_copy(dim), isl_set_copy(C), - map->p[i], &exact_i); - if (!qc) - goto error; - if (!exact_i) { - isl_map_free(qc); - continue; - } - spurious = has_spurious_elements(qc, dom[i], ran[i]); - if (spurious) { - isl_map_free(qc); - if (spurious < 0) - goto error; - continue; - } - qc = isl_map_project_out(qc, isl_dim_in, d, 1); - qc = isl_map_project_out(qc, isl_dim_out, d, 1); - qc = isl_map_compute_divs(qc); - for (j = 0; j < map->n; ++j) - left[j] = right[j] = 1; - qc = compose(map, i, qc, left, right); - if (!qc) - goto error; - if (qc->n >= map->n) { - isl_map_free(qc); - continue; - } - *res = compute_incremental(isl_dim_copy(dim), map, i, qc, - left, right, &exact_i); - if (!*res) - goto error; - if (exact_i) - break; - isl_map_free(*res); - *res = NULL; - } - - isl_set_free(C); - - return *res != NULL; -error: - isl_set_free(C); - return -1; -} - -/* Try and compute the transitive closure of "map" as - * - * map^+ = map_i^+ \cup - * \bigcup_j ((map_i^+ \cup Id_C)^+ \circ map_j \circ (map_i^+ \cup Id_C))^+ - * - * with C either the simple hull of the domain and range of the entire - * map or the simple hull of domain and range of map_i. - */ -static __isl_give isl_map *incremental_closure(__isl_take isl_dim *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - int i; - isl_set **dom = NULL; - isl_set **ran = NULL; - int *left = NULL; - int *right = NULL; - isl_set *C; - unsigned d; - isl_map *res = NULL; - - if (!project) - return construct_projected_component(dim, map, exact, project); - - if (!map) - goto error; - if (map->n <= 1) - return construct_projected_component(dim, map, exact, project); - - d = isl_map_dim(map, isl_dim_in); - - dom = isl_calloc_array(map->ctx, isl_set *, map->n); - ran = isl_calloc_array(map->ctx, isl_set *, map->n); - left = isl_calloc_array(map->ctx, int, map->n); - right = isl_calloc_array(map->ctx, int, map->n); - if (!ran || !dom || !left || !right) - goto error; - - if (incemental_on_entire_domain(dim, map, dom, ran, left, right, &res) < 0) - goto error; - - for (i = 0; !res && i < map->n; ++i) { - isl_map *qc; - int exact_i, spurious, comp; - if (!dom[i]) - dom[i] = isl_set_from_basic_set( - isl_basic_map_domain( - isl_basic_map_copy(map->p[i]))); - if (!dom[i]) - goto error; - if (!ran[i]) - ran[i] = isl_set_from_basic_set( - isl_basic_map_range( - isl_basic_map_copy(map->p[i]))); - if (!ran[i]) - goto error; - C = isl_set_union(isl_set_copy(dom[i]), - isl_set_copy(ran[i])); - C = isl_set_from_basic_set(isl_set_simple_hull(C)); - if (!C) - goto error; - if (C->n != 1) { - isl_set_free(C); - continue; - } - comp = composability(C, i, dom, ran, left, right, map); - if (!comp || comp < 0) { - isl_set_free(C); - if (comp < 0) - goto error; - continue; - } - qc = q_closure(isl_dim_copy(dim), C, map->p[i], &exact_i); - if (!qc) - goto error; - if (!exact_i) { - isl_map_free(qc); - continue; - } - spurious = has_spurious_elements(qc, dom[i], ran[i]); - if (spurious) { - isl_map_free(qc); - if (spurious < 0) - goto error; - continue; - } - qc = isl_map_project_out(qc, isl_dim_in, d, 1); - qc = isl_map_project_out(qc, isl_dim_out, d, 1); - qc = isl_map_compute_divs(qc); - qc = compose(map, i, qc, (comp & LEFT) ? left : NULL, - (comp & RIGHT) ? right : NULL); - if (!qc) - goto error; - if (qc->n >= map->n) { - isl_map_free(qc); - continue; - } - res = compute_incremental(isl_dim_copy(dim), map, i, qc, - (comp & LEFT) ? left : NULL, - (comp & RIGHT) ? right : NULL, &exact_i); - if (!res) - goto error; - if (exact_i) - break; - isl_map_free(res); - res = NULL; - } - - for (i = 0; i < map->n; ++i) { - isl_set_free(dom[i]); - isl_set_free(ran[i]); - } - free(dom); - free(ran); - free(left); - free(right); - - if (res) { - isl_dim_free(dim); - return res; - } - - return construct_projected_component(dim, map, exact, project); -error: - if (dom) - for (i = 0; i < map->n; ++i) - isl_set_free(dom[i]); - free(dom); - if (ran) - for (i = 0; i < map->n; ++i) - isl_set_free(ran[i]); - free(ran); - free(left); - free(right); - isl_dim_free(dim); - return NULL; -} - -/* Given an array of sets "set", add "dom" at position "pos" - * and search for elements at earlier positions that overlap with "dom". - * If any can be found, then merge all of them, together with "dom", into - * a single set and assign the union to the first in the array, - * which becomes the new group leader for all groups involved in the merge. - * During the search, we only consider group leaders, i.e., those with - * group[i] = i, as the other sets have already been combined - * with one of the group leaders. - */ -static int merge(isl_set **set, int *group, __isl_take isl_set *dom, int pos) -{ - int i; - - group[pos] = pos; - set[pos] = isl_set_copy(dom); - - for (i = pos - 1; i >= 0; --i) { - int o; - - if (group[i] != i) - continue; - - o = isl_set_overlaps(set[i], dom); - if (o < 0) - goto error; - if (!o) - continue; - - set[i] = isl_set_union(set[i], set[group[pos]]); - set[group[pos]] = NULL; - if (!set[i]) - goto error; - group[group[pos]] = i; - group[pos] = i; - } - - isl_set_free(dom); - return 0; -error: - isl_set_free(dom); - return -1; -} - -/* Replace each entry in the n by n grid of maps by the cross product - * with the relation { [i] -> [i + 1] }. - */ -static int add_length(__isl_keep isl_map *map, isl_map ***grid, int n) -{ - int i, j, k; - isl_dim *dim; - isl_basic_map *bstep; - isl_map *step; - unsigned nparam; - - if (!map) - return -1; - - dim = isl_map_get_dim(map); - nparam = isl_dim_size(dim, isl_dim_param); - dim = isl_dim_drop(dim, isl_dim_in, 0, isl_dim_size(dim, isl_dim_in)); - dim = isl_dim_drop(dim, isl_dim_out, 0, isl_dim_size(dim, isl_dim_out)); - dim = isl_dim_add(dim, isl_dim_in, 1); - dim = isl_dim_add(dim, isl_dim_out, 1); - bstep = isl_basic_map_alloc_dim(dim, 0, 1, 0); - k = isl_basic_map_alloc_equality(bstep); - if (k < 0) { - isl_basic_map_free(bstep); - return -1; - } - isl_seq_clr(bstep->eq[k], 1 + isl_basic_map_total_dim(bstep)); - isl_int_set_si(bstep->eq[k][0], 1); - isl_int_set_si(bstep->eq[k][1 + nparam], 1); - isl_int_set_si(bstep->eq[k][1 + nparam + 1], -1); - bstep = isl_basic_map_finalize(bstep); - step = isl_map_from_basic_map(bstep); - - for (i = 0; i < n; ++i) - for (j = 0; j < n; ++j) - grid[i][j] = isl_map_product(grid[i][j], - isl_map_copy(step)); - - isl_map_free(step); - - return 0; -} - -/* The core of the Floyd-Warshall algorithm. - * Updates the given n x x matrix of relations in place. - * - * The algorithm iterates over all vertices. In each step, the whole - * matrix is updated to include all paths that go to the current vertex, - * possibly stay there a while (including passing through earlier vertices) - * and then come back. At the start of each iteration, the diagonal - * element corresponding to the current vertex is replaced by its - * transitive closure to account for all indirect paths that stay - * in the current vertex. - */ -static void floyd_warshall_iterate(isl_map ***grid, int n, int *exact) -{ - int r, p, q; - - for (r = 0; r < n; ++r) { - int r_exact; - grid[r][r] = isl_map_transitive_closure(grid[r][r], - (exact && *exact) ? &r_exact : NULL); - if (exact && *exact && !r_exact) - *exact = 0; - - for (p = 0; p < n; ++p) - for (q = 0; q < n; ++q) { - isl_map *loop; - if (p == r && q == r) - continue; - loop = isl_map_apply_range( - isl_map_copy(grid[p][r]), - isl_map_copy(grid[r][q])); - grid[p][q] = isl_map_union(grid[p][q], loop); - loop = isl_map_apply_range( - isl_map_copy(grid[p][r]), - isl_map_apply_range( - isl_map_copy(grid[r][r]), - isl_map_copy(grid[r][q]))); - grid[p][q] = isl_map_union(grid[p][q], loop); - grid[p][q] = isl_map_coalesce(grid[p][q]); - } - } -} - -/* Given a partition of the domains and ranges of the basic maps in "map", - * apply the Floyd-Warshall algorithm with the elements in the partition - * as vertices. - * - * In particular, there are "n" elements in the partition and "group" is - * an array of length 2 * map->n with entries in [0,n-1]. - * - * We first construct a matrix of relations based on the partition information, - * apply Floyd-Warshall on this matrix of relations and then take the - * union of all entries in the matrix as the final result. - * - * If we are actually computing the power instead of the transitive closure, - * i.e., when "project" is not set, then the result should have the - * path lengths encoded as the difference between an extra pair of - * coordinates. We therefore apply the nested transitive closures - * to relations that include these lengths. In particular, we replace - * the input relation by the cross product with the unit length relation - * { [i] -> [i + 1] }. - */ -static __isl_give isl_map *floyd_warshall_with_groups(__isl_take isl_dim *dim, - __isl_keep isl_map *map, int *exact, int project, int *group, int n) -{ - int i, j, k; - isl_map ***grid = NULL; - isl_map *app; - - if (!map) - goto error; - - if (n == 1) { - free(group); - return incremental_closure(dim, map, exact, project); - } - - grid = isl_calloc_array(map->ctx, isl_map **, n); - if (!grid) - goto error; - for (i = 0; i < n; ++i) { - grid[i] = isl_calloc_array(map->ctx, isl_map *, n); - if (!grid[i]) - goto error; - for (j = 0; j < n; ++j) - grid[i][j] = isl_map_empty(isl_map_get_dim(map)); - } - - for (k = 0; k < map->n; ++k) { - i = group[2 * k]; - j = group[2 * k + 1]; - grid[i][j] = isl_map_union(grid[i][j], - isl_map_from_basic_map( - isl_basic_map_copy(map->p[k]))); - } - - if (!project && add_length(map, grid, n) < 0) - goto error; - - floyd_warshall_iterate(grid, n, exact); - - app = isl_map_empty(isl_map_get_dim(map)); - - for (i = 0; i < n; ++i) { - for (j = 0; j < n; ++j) - app = isl_map_union(app, grid[i][j]); - free(grid[i]); - } - free(grid); - - free(group); - isl_dim_free(dim); - - return app; -error: - if (grid) - for (i = 0; i < n; ++i) { - if (!grid[i]) - continue; - for (j = 0; j < n; ++j) - isl_map_free(grid[i][j]); - free(grid[i]); - } - free(grid); - free(group); - isl_dim_free(dim); - return NULL; -} - -/* Partition the domains and ranges of the n basic relations in list - * into disjoint cells. - * - * To find the partition, we simply consider all of the domains - * and ranges in turn and combine those that overlap. - * "set" contains the partition elements and "group" indicates - * to which partition element a given domain or range belongs. - * The domain of basic map i corresponds to element 2 * i in these arrays, - * while the domain corresponds to element 2 * i + 1. - * During the construction group[k] is either equal to k, - * in which case set[k] contains the union of all the domains and - * ranges in the corresponding group, or is equal to some l < k, - * with l another domain or range in the same group. - */ -static int *setup_groups(isl_ctx *ctx, __isl_keep isl_basic_map **list, int n, - isl_set ***set, int *n_group) -{ - int i; - int *group = NULL; - int g; - - *set = isl_calloc_array(ctx, isl_set *, 2 * n); - group = isl_alloc_array(ctx, int, 2 * n); - - if (!*set || !group) - goto error; - - for (i = 0; i < n; ++i) { - isl_set *dom; - dom = isl_set_from_basic_set(isl_basic_map_domain( - isl_basic_map_copy(list[i]))); - if (merge(*set, group, dom, 2 * i) < 0) - goto error; - dom = isl_set_from_basic_set(isl_basic_map_range( - isl_basic_map_copy(list[i]))); - if (merge(*set, group, dom, 2 * i + 1) < 0) - goto error; - } - - g = 0; - for (i = 0; i < 2 * n; ++i) - if (group[i] == i) { - if (g != i) { - (*set)[g] = (*set)[i]; - (*set)[i] = NULL; - } - group[i] = g++; - } else - group[i] = group[group[i]]; - - *n_group = g; - - return group; -error: - if (*set) { - for (i = 0; i < 2 * n; ++i) - isl_set_free((*set)[i]); - free(*set); - *set = NULL; - } - free(group); - return NULL; -} - -/* Check if the domains and ranges of the basic maps in "map" can - * be partitioned, and if so, apply Floyd-Warshall on the elements - * of the partition. Note that we also apply this algorithm - * if we want to compute the power, i.e., when "project" is not set. - * However, the results are unlikely to be exact since the recursive - * calls inside the Floyd-Warshall algorithm typically result in - * non-linear path lengths quite quickly. - */ -static __isl_give isl_map *floyd_warshall(__isl_take isl_dim *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - int i; - isl_set **set = NULL; - int *group = NULL; - int n; - - if (!map) - goto error; - if (map->n <= 1) - return incremental_closure(dim, map, exact, project); - - group = setup_groups(map->ctx, map->p, map->n, &set, &n); - if (!group) - goto error; - - for (i = 0; i < 2 * map->n; ++i) - isl_set_free(set[i]); - - free(set); - - return floyd_warshall_with_groups(dim, map, exact, project, group, n); -error: - isl_dim_free(dim); - return NULL; -} - -/* Structure for representing the nodes in the graph being traversed - * using Tarjan's algorithm. - * index represents the order in which nodes are visited. - * min_index is the index of the root of a (sub)component. - * on_stack indicates whether the node is currently on the stack. - */ -struct basic_map_sort_node { - int index; - int min_index; - int on_stack; -}; -/* Structure for representing the graph being traversed - * using Tarjan's algorithm. - * len is the number of nodes - * node is an array of nodes - * stack contains the nodes on the path from the root to the current node - * sp is the stack pointer - * index is the index of the last node visited - * order contains the elements of the components separated by -1 - * op represents the current position in order - * - * check_closed is set if we may have used the fact that - * a pair of basic maps can be interchanged - */ -struct basic_map_sort { - int len; - struct basic_map_sort_node *node; - int *stack; - int sp; - int index; - int *order; - int op; - int check_closed; -}; - -static void basic_map_sort_free(struct basic_map_sort *s) -{ - if (!s) - return; - free(s->node); - free(s->stack); - free(s->order); - free(s); -} - -static struct basic_map_sort *basic_map_sort_alloc(struct isl_ctx *ctx, int len) -{ - struct basic_map_sort *s; - int i; - - s = isl_calloc_type(ctx, struct basic_map_sort); - if (!s) - return NULL; - s->len = len; - s->node = isl_alloc_array(ctx, struct basic_map_sort_node, len); - if (!s->node) - goto error; - for (i = 0; i < len; ++i) - s->node[i].index = -1; - s->stack = isl_alloc_array(ctx, int, len); - if (!s->stack) - goto error; - s->order = isl_alloc_array(ctx, int, 2 * len); - if (!s->order) - goto error; - - s->sp = 0; - s->index = 0; - s->op = 0; - - s->check_closed = 0; - - return s; -error: - basic_map_sort_free(s); - return NULL; -} - -/* Check whether in the computation of the transitive closure - * "bmap1" (R_1) should follow (or be part of the same component as) - * "bmap2" (R_2). - * - * That is check whether - * - * R_1 \circ R_2 - * - * is a subset of - * - * R_2 \circ R_1 - * - * If so, then there is no reason for R_1 to immediately follow R_2 - * in any path. - * - * *check_closed is set if the subset relation holds while - * R_1 \circ R_2 is not empty. - */ -static int basic_map_follows(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2, int *check_closed) -{ - struct isl_map *map12 = NULL; - struct isl_map *map21 = NULL; - int subset; - - if (!isl_dim_tuple_match(bmap1->dim, isl_dim_in, bmap2->dim, isl_dim_out)) - return 0; - - map21 = isl_map_from_basic_map( - isl_basic_map_apply_range( - isl_basic_map_copy(bmap2), - isl_basic_map_copy(bmap1))); - subset = isl_map_is_empty(map21); - if (subset < 0) - goto error; - if (subset) { - isl_map_free(map21); - return 0; - } - - if (!isl_dim_tuple_match(bmap1->dim, isl_dim_in, bmap1->dim, isl_dim_out) || - !isl_dim_tuple_match(bmap2->dim, isl_dim_in, bmap2->dim, isl_dim_out)) { - isl_map_free(map21); - return 1; - } - - map12 = isl_map_from_basic_map( - isl_basic_map_apply_range( - isl_basic_map_copy(bmap1), - isl_basic_map_copy(bmap2))); - - subset = isl_map_is_subset(map21, map12); - - isl_map_free(map12); - isl_map_free(map21); - - if (subset) - *check_closed = 1; - - return subset < 0 ? -1 : !subset; -error: - isl_map_free(map21); - return -1; -} - -/* Perform Tarjan's algorithm for computing the strongly connected components - * in the graph with the disjuncts of "map" as vertices and with an - * edge between any pair of disjuncts such that the first has - * to be applied after the second. - */ -static int power_components_tarjan(struct basic_map_sort *s, - __isl_keep isl_basic_map **list, int i) -{ - int j; - - s->node[i].index = s->index; - s->node[i].min_index = s->index; - s->node[i].on_stack = 1; - s->index++; - s->stack[s->sp++] = i; - - for (j = s->len - 1; j >= 0; --j) { - int f; - - if (j == i) - continue; - if (s->node[j].index >= 0 && - (!s->node[j].on_stack || - s->node[j].index > s->node[i].min_index)) - continue; - - f = basic_map_follows(list[i], list[j], &s->check_closed); - if (f < 0) - return -1; - if (!f) - continue; - - if (s->node[j].index < 0) { - power_components_tarjan(s, list, j); - if (s->node[j].min_index < s->node[i].min_index) - s->node[i].min_index = s->node[j].min_index; - } else if (s->node[j].index < s->node[i].min_index) - s->node[i].min_index = s->node[j].index; - } - - if (s->node[i].index != s->node[i].min_index) - return 0; - - do { - j = s->stack[--s->sp]; - s->node[j].on_stack = 0; - s->order[s->op++] = j; - } while (j != i); - s->order[s->op++] = -1; - - return 0; -} - -/* Decompose the "len" basic relations in "list" into strongly connected - * components. - */ -static struct basic_map_sort *basic_map_sort_init(isl_ctx *ctx, int len, - __isl_keep isl_basic_map **list) -{ - int i; - struct basic_map_sort *s = NULL; - - s = basic_map_sort_alloc(ctx, len); - if (!s) - return NULL; - for (i = len - 1; i >= 0; --i) { - if (s->node[i].index >= 0) - continue; - if (power_components_tarjan(s, list, i) < 0) - goto error; - } - - return s; -error: - basic_map_sort_free(s); - return NULL; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D - * and a dimension specification (Z^{n+1} -> Z^{n+1}), - * construct a map that is an overapproximation of the map - * that takes an element from the dom R \times Z to an - * element from ran R \times Z, such that the first n coordinates of the - * difference between them is a sum of differences between images - * and pre-images in one of the R_i and such that the last coordinate - * is equal to the number of steps taken. - * If "project" is set, then these final coordinates are not included, - * i.e., a relation of type Z^n -> Z^n is returned. - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i, \sum_i k_i) and - * x in dom R and x + d in ran R } - * - * or - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i) and - * x in dom R and x + d in ran R } - * - * if "project" is set. - * - * We first split the map into strongly connected components, perform - * the above on each component and then join the results in the correct - * order, at each join also taking in the union of both arguments - * to allow for paths that do not go through one of the two arguments. - */ -static __isl_give isl_map *construct_power_components(__isl_take isl_dim *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - int i, n, c; - struct isl_map *path = NULL; - struct basic_map_sort *s = NULL; - int *orig_exact; - int local_exact; - - if (!map) - goto error; - if (map->n <= 1) - return floyd_warshall(dim, map, exact, project); - - s = basic_map_sort_init(map->ctx, map->n, map->p); - if (!s) - goto error; - - orig_exact = exact; - if (s->check_closed && !exact) - exact = &local_exact; - - c = 0; - i = 0; - n = map->n; - if (project) - path = isl_map_empty(isl_map_get_dim(map)); - else - path = isl_map_empty(isl_dim_copy(dim)); - path = anonymize(path); - while (n) { - struct isl_map *comp; - isl_map *path_comp, *path_comb; - comp = isl_map_alloc_dim(isl_map_get_dim(map), n, 0); - while (s->order[i] != -1) { - comp = isl_map_add_basic_map(comp, - isl_basic_map_copy(map->p[s->order[i]])); - --n; - ++i; - } - path_comp = floyd_warshall(isl_dim_copy(dim), - comp, exact, project); - path_comp = anonymize(path_comp); - path_comb = isl_map_apply_range(isl_map_copy(path), - isl_map_copy(path_comp)); - path = isl_map_union(path, path_comp); - path = isl_map_union(path, path_comb); - isl_map_free(comp); - ++i; - ++c; - } - - if (c > 1 && s->check_closed && !*exact) { - int closed; - - closed = isl_map_is_transitively_closed(path); - if (closed < 0) - goto error; - if (!closed) { - basic_map_sort_free(s); - isl_map_free(path); - return floyd_warshall(dim, map, orig_exact, project); - } - } - - basic_map_sort_free(s); - isl_dim_free(dim); - - return path; -error: - basic_map_sort_free(s); - isl_dim_free(dim); - isl_map_free(path); - return NULL; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D, - * construct a map that is an overapproximation of the map - * that takes an element from the space D to another - * element from the same space, such that the difference between - * them is a strictly positive sum of differences between images - * and pre-images in one of the R_i. - * The number of differences in the sum is equated to parameter "param". - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = \sum_i k_i \delta_i and k = \sum_i k_i > 0 } - * or - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = \sum_i k_i \delta_i and \sum_i k_i > 0 } - * - * if "project" is set. - * - * If "project" is not set, then - * we construct an extended mapping with an extra coordinate - * that indicates the number of steps taken. In particular, - * the difference in the last coordinate is equal to the number - * of steps taken to move from a domain element to the corresponding - * image element(s). - */ -static __isl_give isl_map *construct_power(__isl_keep isl_map *map, - int *exact, int project) -{ - struct isl_map *app = NULL; - struct isl_dim *dim = NULL; - unsigned d; - - if (!map) - return NULL; - - dim = isl_map_get_dim(map); - - d = isl_dim_size(dim, isl_dim_in); - dim = isl_dim_add(dim, isl_dim_in, 1); - dim = isl_dim_add(dim, isl_dim_out, 1); - - app = construct_power_components(isl_dim_copy(dim), map, - exact, project); - - isl_dim_free(dim); - - return app; -} - -/* Compute the positive powers of "map", or an overapproximation. - * If the result is exact, then *exact is set to 1. - * - * If project is set, then we are actually interested in the transitive - * closure, so we can use a more relaxed exactness check. - * The lengths of the paths are also projected out instead of being - * encoded as the difference between an extra pair of final coordinates. - */ -static __isl_give isl_map *map_power(__isl_take isl_map *map, - int *exact, int project) -{ - struct isl_map *app = NULL; - - if (exact) - *exact = 1; - - if (!map) - return NULL; - - isl_assert(map->ctx, - isl_map_dim(map, isl_dim_in) == isl_map_dim(map, isl_dim_out), - goto error); - - app = construct_power(map, exact, project); - - isl_map_free(map); - return app; -error: - isl_map_free(map); - isl_map_free(app); - return NULL; -} - -/* Compute the positive powers of "map", or an overapproximation. - * The result maps the exponent to a nested copy of the corresponding power. - * If the result is exact, then *exact is set to 1. - * map_power constructs an extended relation with the path lengths - * encoded as the difference between the final coordinates. - * In the final step, this difference is equated to an extra parameter - * and made positive. The extra coordinates are subsequently projected out - * and the parameter is turned into the domain of the result. - */ -__isl_give isl_map *isl_map_power(__isl_take isl_map *map, int *exact) -{ - isl_dim *target_dim; - isl_dim *dim; - isl_map *diff; - unsigned d; - unsigned param; - - if (!map) - return NULL; - - d = isl_map_dim(map, isl_dim_in); - param = isl_map_dim(map, isl_dim_param); - - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - - if (isl_map_plain_is_empty(map)) { - map = isl_map_from_range(isl_map_wrap(map)); - map = isl_map_add_dims(map, isl_dim_in, 1); - map = isl_map_set_dim_name(map, isl_dim_in, 0, "k"); - return map; - } - - target_dim = isl_map_get_dim(map); - target_dim = isl_dim_from_range(isl_dim_wrap(target_dim)); - target_dim = isl_dim_add(target_dim, isl_dim_in, 1); - target_dim = isl_dim_set_name(target_dim, isl_dim_in, 0, "k"); - - map = map_power(map, exact, 0); - - map = isl_map_add_dims(map, isl_dim_param, 1); - dim = isl_map_get_dim(map); - diff = equate_parameter_to_length(dim, param); - map = isl_map_intersect(map, diff); - map = isl_map_project_out(map, isl_dim_in, d, 1); - map = isl_map_project_out(map, isl_dim_out, d, 1); - map = isl_map_from_range(isl_map_wrap(map)); - map = isl_map_move_dims(map, isl_dim_in, 0, isl_dim_param, param, 1); - - map = isl_map_reset_dim(map, target_dim); - - return map; -} - -/* Compute a relation that maps each element in the range of the input - * relation to the lengths of all paths composed of edges in the input - * relation that end up in the given range element. - * The result may be an overapproximation, in which case *exact is set to 0. - * The resulting relation is very similar to the power relation. - * The difference are that the domain has been projected out, the - * range has become the domain and the exponent is the range instead - * of a parameter. - */ -__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map, - int *exact) -{ - isl_dim *dim; - isl_map *diff; - unsigned d; - unsigned param; - - if (!map) - return NULL; - - d = isl_map_dim(map, isl_dim_in); - param = isl_map_dim(map, isl_dim_param); - - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - - if (isl_map_plain_is_empty(map)) { - if (exact) - *exact = 1; - map = isl_map_project_out(map, isl_dim_out, 0, d); - map = isl_map_add_dims(map, isl_dim_out, 1); - return map; - } - - map = map_power(map, exact, 0); - - map = isl_map_add_dims(map, isl_dim_param, 1); - dim = isl_map_get_dim(map); - diff = equate_parameter_to_length(dim, param); - map = isl_map_intersect(map, diff); - map = isl_map_project_out(map, isl_dim_in, 0, d + 1); - map = isl_map_project_out(map, isl_dim_out, d, 1); - map = isl_map_reverse(map); - map = isl_map_move_dims(map, isl_dim_out, 0, isl_dim_param, param, 1); - - return map; -} - -/* Check whether equality i of bset is a pure stride constraint - * on a single dimensions, i.e., of the form - * - * v = k e - * - * with k a constant and e an existentially quantified variable. - */ -static int is_eq_stride(__isl_keep isl_basic_set *bset, int i) -{ - unsigned nparam; - unsigned d; - unsigned n_div; - int pos1; - int pos2; - - if (!bset) - return -1; - - if (!isl_int_is_zero(bset->eq[i][0])) - return 0; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - d = isl_basic_set_dim(bset, isl_dim_set); - n_div = isl_basic_set_dim(bset, isl_dim_div); - - if (isl_seq_first_non_zero(bset->eq[i] + 1, nparam) != -1) - return 0; - pos1 = isl_seq_first_non_zero(bset->eq[i] + 1 + nparam, d); - if (pos1 == -1) - return 0; - if (isl_seq_first_non_zero(bset->eq[i] + 1 + nparam + pos1 + 1, - d - pos1 - 1) != -1) - return 0; - - pos2 = isl_seq_first_non_zero(bset->eq[i] + 1 + nparam + d, n_div); - if (pos2 == -1) - return 0; - if (isl_seq_first_non_zero(bset->eq[i] + 1 + nparam + d + pos2 + 1, - n_div - pos2 - 1) != -1) - return 0; - if (!isl_int_is_one(bset->eq[i][1 + nparam + pos1]) && - !isl_int_is_negone(bset->eq[i][1 + nparam + pos1])) - return 0; - - return 1; -} - -/* Given a map, compute the smallest superset of this map that is of the form - * - * { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p } - * - * (where p ranges over the (non-parametric) dimensions), - * compute the transitive closure of this map, i.e., - * - * { i -> j : exists k > 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * and intersect domain and range of this transitive closure with - * the given domain and range. - * - * If with_id is set, then try to include as much of the identity mapping - * as possible, by computing - * - * { i -> j : exists k >= 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * instead (i.e., allow k = 0). - * - * In practice, we compute the difference set - * - * delta = { j - i | i -> j in map }, - * - * look for stride constraint on the individual dimensions and compute - * (constant) lower and upper bounds for each individual dimension, - * adding a constraint for each bound not equal to infinity. - */ -static __isl_give isl_map *box_closure_on_domain(__isl_take isl_map *map, - __isl_take isl_set *dom, __isl_take isl_set *ran, int with_id) -{ - int i; - int k; - unsigned d; - unsigned nparam; - unsigned total; - isl_dim *dim; - isl_set *delta; - isl_map *app = NULL; - isl_basic_set *aff = NULL; - isl_basic_map *bmap = NULL; - isl_vec *obj = NULL; - isl_int opt; - - isl_int_init(opt); - - delta = isl_map_deltas(isl_map_copy(map)); - - aff = isl_set_affine_hull(isl_set_copy(delta)); - if (!aff) - goto error; - dim = isl_map_get_dim(map); - d = isl_dim_size(dim, isl_dim_in); - nparam = isl_dim_size(dim, isl_dim_param); - total = isl_dim_total(dim); - bmap = isl_basic_map_alloc_dim(dim, - aff->n_div + 1, aff->n_div, 2 * d + 1); - for (i = 0; i < aff->n_div + 1; ++i) { - k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_int_set_si(bmap->div[k][0], 0); - } - for (i = 0; i < aff->n_eq; ++i) { - if (!is_eq_stride(aff, i)) - continue; - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + nparam); - isl_seq_cpy(bmap->eq[k] + 1 + nparam + d, - aff->eq[i] + 1 + nparam, d); - isl_seq_neg(bmap->eq[k] + 1 + nparam, - aff->eq[i] + 1 + nparam, d); - isl_seq_cpy(bmap->eq[k] + 1 + nparam + 2 * d, - aff->eq[i] + 1 + nparam + d, aff->n_div); - isl_int_set_si(bmap->eq[k][1 + total + aff->n_div], 0); - } - obj = isl_vec_alloc(map->ctx, 1 + nparam + d); - if (!obj) - goto error; - isl_seq_clr(obj->el, 1 + nparam + d); - for (i = 0; i < d; ++ i) { - enum isl_lp_result res; - - isl_int_set_si(obj->el[1 + nparam + i], 1); - - res = isl_set_solve_lp(delta, 0, obj->el, map->ctx->one, &opt, - NULL, NULL); - if (res == isl_lp_error) - goto error; - if (res == isl_lp_ok) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], - 1 + nparam + 2 * d + bmap->n_div); - isl_int_set_si(bmap->ineq[k][1 + nparam + i], -1); - isl_int_set_si(bmap->ineq[k][1 + nparam + d + i], 1); - isl_int_neg(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], opt); - } - - res = isl_set_solve_lp(delta, 1, obj->el, map->ctx->one, &opt, - NULL, NULL); - if (res == isl_lp_error) - goto error; - if (res == isl_lp_ok) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], - 1 + nparam + 2 * d + bmap->n_div); - isl_int_set_si(bmap->ineq[k][1 + nparam + i], 1); - isl_int_set_si(bmap->ineq[k][1 + nparam + d + i], -1); - isl_int_set(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], opt); - } - - isl_int_set_si(obj->el[1 + nparam + i], 0); - } - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], - 1 + nparam + 2 * d + bmap->n_div); - if (!with_id) - isl_int_set_si(bmap->ineq[k][0], -1); - isl_int_set_si(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], 1); - - app = isl_map_from_domain_and_range(dom, ran); - - isl_vec_free(obj); - isl_basic_set_free(aff); - isl_map_free(map); - bmap = isl_basic_map_finalize(bmap); - isl_set_free(delta); - isl_int_clear(opt); - - map = isl_map_from_basic_map(bmap); - map = isl_map_intersect(map, app); - - return map; -error: - isl_vec_free(obj); - isl_basic_map_free(bmap); - isl_basic_set_free(aff); - isl_set_free(dom); - isl_set_free(ran); - isl_map_free(map); - isl_set_free(delta); - isl_int_clear(opt); - return NULL; -} - -/* Given a map, compute the smallest superset of this map that is of the form - * - * { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p } - * - * (where p ranges over the (non-parametric) dimensions), - * compute the transitive closure of this map, i.e., - * - * { i -> j : exists k > 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * and intersect domain and range of this transitive closure with - * domain and range of the original map. - */ -static __isl_give isl_map *box_closure(__isl_take isl_map *map) -{ - isl_set *domain; - isl_set *range; - - domain = isl_map_domain(isl_map_copy(map)); - domain = isl_set_coalesce(domain); - range = isl_map_range(isl_map_copy(map)); - range = isl_set_coalesce(range); - - return box_closure_on_domain(map, domain, range, 0); -} - -/* Given a map, compute the smallest superset of this map that is of the form - * - * { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p } - * - * (where p ranges over the (non-parametric) dimensions), - * compute the transitive and partially reflexive closure of this map, i.e., - * - * { i -> j : exists k >= 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * and intersect domain and range of this transitive closure with - * the given domain. - */ -static __isl_give isl_map *box_closure_with_identity(__isl_take isl_map *map, - __isl_take isl_set *dom) -{ - return box_closure_on_domain(map, dom, isl_set_copy(dom), 1); -} - -/* Check whether app is the transitive closure of map. - * In particular, check that app is acyclic and, if so, - * check that - * - * app \subset (map \cup (map \circ app)) - */ -static int check_exactness_omega(__isl_keep isl_map *map, - __isl_keep isl_map *app) -{ - isl_set *delta; - int i; - int is_empty, is_exact; - unsigned d; - isl_map *test; - - delta = isl_map_deltas(isl_map_copy(app)); - d = isl_set_dim(delta, isl_dim_set); - for (i = 0; i < d; ++i) - delta = isl_set_fix_si(delta, isl_dim_set, i, 0); - is_empty = isl_set_is_empty(delta); - isl_set_free(delta); - if (is_empty < 0) - return -1; - if (!is_empty) - return 0; - - test = isl_map_apply_range(isl_map_copy(app), isl_map_copy(map)); - test = isl_map_union(test, isl_map_copy(map)); - is_exact = isl_map_is_subset(app, test); - isl_map_free(test); - - return is_exact; -} - -/* Check if basic map M_i can be combined with all the other - * basic maps such that - * - * (\cup_j M_j)^+ - * - * can be computed as - * - * M_i \cup (\cup_{j \ne i} M_i^* \circ M_j \circ M_i^*)^+ - * - * In particular, check if we can compute a compact representation - * of - * - * M_i^* \circ M_j \circ M_i^* - * - * for each j != i. - * Let M_i^? be an extension of M_i^+ that allows paths - * of length zero, i.e., the result of box_closure(., 1). - * The criterion, as proposed by Kelly et al., is that - * id = M_i^? - M_i^+ can be represented as a basic map - * and that - * - * id \circ M_j \circ id = M_j - * - * for each j != i. - * - * If this function returns 1, then tc and qc are set to - * M_i^+ and M_i^?, respectively. - */ -static int can_be_split_off(__isl_keep isl_map *map, int i, - __isl_give isl_map **tc, __isl_give isl_map **qc) -{ - isl_map *map_i, *id = NULL; - int j = -1; - isl_set *C; - - *tc = NULL; - *qc = NULL; - - C = isl_set_union(isl_map_domain(isl_map_copy(map)), - isl_map_range(isl_map_copy(map))); - C = isl_set_from_basic_set(isl_set_simple_hull(C)); - if (!C) - goto error; - - map_i = isl_map_from_basic_map(isl_basic_map_copy(map->p[i])); - *tc = box_closure(isl_map_copy(map_i)); - *qc = box_closure_with_identity(map_i, C); - id = isl_map_subtract(isl_map_copy(*qc), isl_map_copy(*tc)); - - if (!id || !*qc) - goto error; - if (id->n != 1 || (*qc)->n != 1) - goto done; - - for (j = 0; j < map->n; ++j) { - isl_map *map_j, *test; - int is_ok; - - if (i == j) - continue; - map_j = isl_map_from_basic_map( - isl_basic_map_copy(map->p[j])); - test = isl_map_apply_range(isl_map_copy(id), - isl_map_copy(map_j)); - test = isl_map_apply_range(test, isl_map_copy(id)); - is_ok = isl_map_is_equal(test, map_j); - isl_map_free(map_j); - isl_map_free(test); - if (is_ok < 0) - goto error; - if (!is_ok) - break; - } - -done: - isl_map_free(id); - if (j == map->n) - return 1; - - isl_map_free(*qc); - isl_map_free(*tc); - *qc = NULL; - *tc = NULL; - - return 0; -error: - isl_map_free(id); - isl_map_free(*qc); - isl_map_free(*tc); - *qc = NULL; - *tc = NULL; - return -1; -} - -static __isl_give isl_map *box_closure_with_check(__isl_take isl_map *map, - int *exact) -{ - isl_map *app; - - app = box_closure(isl_map_copy(map)); - if (exact) - *exact = check_exactness_omega(map, app); - - isl_map_free(map); - return app; -} - -/* Compute an overapproximation of the transitive closure of "map" - * using a variation of the algorithm from - * "Transitive Closure of Infinite Graphs and its Applications" - * by Kelly et al. - * - * We first check whether we can can split of any basic map M_i and - * compute - * - * (\cup_j M_j)^+ - * - * as - * - * M_i \cup (\cup_{j \ne i} M_i^* \circ M_j \circ M_i^*)^+ - * - * using a recursive call on the remaining map. - * - * If not, we simply call box_closure on the whole map. - */ -static __isl_give isl_map *transitive_closure_omega(__isl_take isl_map *map, - int *exact) -{ - int i, j; - int exact_i; - isl_map *app; - - if (!map) - return NULL; - if (map->n == 1) - return box_closure_with_check(map, exact); - - for (i = 0; i < map->n; ++i) { - int ok; - isl_map *qc, *tc; - ok = can_be_split_off(map, i, &tc, &qc); - if (ok < 0) - goto error; - if (!ok) - continue; - - app = isl_map_alloc_dim(isl_map_get_dim(map), map->n - 1, 0); - - for (j = 0; j < map->n; ++j) { - if (j == i) - continue; - app = isl_map_add_basic_map(app, - isl_basic_map_copy(map->p[j])); - } - - app = isl_map_apply_range(isl_map_copy(qc), app); - app = isl_map_apply_range(app, qc); - - app = isl_map_union(tc, transitive_closure_omega(app, NULL)); - exact_i = check_exactness_omega(map, app); - if (exact_i == 1) { - if (exact) - *exact = exact_i; - isl_map_free(map); - return app; - } - isl_map_free(app); - if (exact_i < 0) - goto error; - } - - return box_closure_with_check(map, exact); -error: - isl_map_free(map); - return NULL; -} - -/* Compute the transitive closure of "map", or an overapproximation. - * If the result is exact, then *exact is set to 1. - * Simply use map_power to compute the powers of map, but tell - * it to project out the lengths of the paths instead of equating - * the length to a parameter. - */ -__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map, - int *exact) -{ - isl_dim *target_dim; - int closed; - - if (!map) - goto error; - - if (map->ctx->opt->closure == ISL_CLOSURE_BOX) - return transitive_closure_omega(map, exact); - - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - closed = isl_map_is_transitively_closed(map); - if (closed < 0) - goto error; - if (closed) { - if (exact) - *exact = 1; - return map; - } - - target_dim = isl_map_get_dim(map); - map = map_power(map, exact, 1); - map = isl_map_reset_dim(map, target_dim); - - return map; -error: - isl_map_free(map); - return NULL; -} - -static int inc_count(__isl_take isl_map *map, void *user) -{ - int *n = user; - - *n += map->n; - - isl_map_free(map); - - return 0; -} - -static int collect_basic_map(__isl_take isl_map *map, void *user) -{ - int i; - isl_basic_map ***next = user; - - for (i = 0; i < map->n; ++i) { - **next = isl_basic_map_copy(map->p[i]); - if (!**next) - goto error; - (*next)++; - } - - isl_map_free(map); - return 0; -error: - isl_map_free(map); - return -1; -} - -/* Perform Floyd-Warshall on the given list of basic relations. - * The basic relations may live in different dimensions, - * but basic relations that get assigned to the diagonal of the - * grid have domains and ranges of the same dimension and so - * the standard algorithm can be used because the nested transitive - * closures are only applied to diagonal elements and because all - * compositions are peformed on relations with compatible domains and ranges. - */ -static __isl_give isl_union_map *union_floyd_warshall_on_list(isl_ctx *ctx, - __isl_keep isl_basic_map **list, int n, int *exact) -{ - int i, j, k; - int n_group; - int *group = NULL; - isl_set **set = NULL; - isl_map ***grid = NULL; - isl_union_map *app; - - group = setup_groups(ctx, list, n, &set, &n_group); - if (!group) - goto error; - - grid = isl_calloc_array(ctx, isl_map **, n_group); - if (!grid) - goto error; - for (i = 0; i < n_group; ++i) { - grid[i] = isl_calloc_array(ctx, isl_map *, n_group); - if (!grid[i]) - goto error; - for (j = 0; j < n_group; ++j) { - isl_dim *dim1, *dim2, *dim; - dim1 = isl_dim_reverse(isl_set_get_dim(set[i])); - dim2 = isl_set_get_dim(set[j]); - dim = isl_dim_join(dim1, dim2); - grid[i][j] = isl_map_empty(dim); - } - } - - for (k = 0; k < n; ++k) { - i = group[2 * k]; - j = group[2 * k + 1]; - grid[i][j] = isl_map_union(grid[i][j], - isl_map_from_basic_map( - isl_basic_map_copy(list[k]))); - } - - floyd_warshall_iterate(grid, n_group, exact); - - app = isl_union_map_empty(isl_map_get_dim(grid[0][0])); - - for (i = 0; i < n_group; ++i) { - for (j = 0; j < n_group; ++j) - app = isl_union_map_add_map(app, grid[i][j]); - free(grid[i]); - } - free(grid); - - for (i = 0; i < 2 * n; ++i) - isl_set_free(set[i]); - free(set); - - free(group); - return app; -error: - if (grid) - for (i = 0; i < n_group; ++i) { - if (!grid[i]) - continue; - for (j = 0; j < n_group; ++j) - isl_map_free(grid[i][j]); - free(grid[i]); - } - free(grid); - if (set) { - for (i = 0; i < 2 * n; ++i) - isl_set_free(set[i]); - free(set); - } - free(group); - return NULL; -} - -/* Perform Floyd-Warshall on the given union relation. - * The implementation is very similar to that for non-unions. - * The main difference is that it is applied unconditionally. - * We first extract a list of basic maps from the union map - * and then perform the algorithm on this list. - */ -static __isl_give isl_union_map *union_floyd_warshall( - __isl_take isl_union_map *umap, int *exact) -{ - int i, n; - isl_ctx *ctx; - isl_basic_map **list = NULL; - isl_basic_map **next; - isl_union_map *res; - - n = 0; - if (isl_union_map_foreach_map(umap, inc_count, &n) < 0) - goto error; - - ctx = isl_union_map_get_ctx(umap); - list = isl_calloc_array(ctx, isl_basic_map *, n); - if (!list) - goto error; - - next = list; - if (isl_union_map_foreach_map(umap, collect_basic_map, &next) < 0) - goto error; - - res = union_floyd_warshall_on_list(ctx, list, n, exact); - - if (list) { - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - } - - isl_union_map_free(umap); - return res; -error: - if (list) { - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - } - isl_union_map_free(umap); - return NULL; -} - -/* Decompose the give union relation into strongly connected components. - * The implementation is essentially the same as that of - * construct_power_components with the major difference that all - * operations are performed on union maps. - */ -static __isl_give isl_union_map *union_components( - __isl_take isl_union_map *umap, int *exact) -{ - int i; - int n; - isl_ctx *ctx; - isl_basic_map **list; - isl_basic_map **next; - isl_union_map *path = NULL; - struct basic_map_sort *s = NULL; - int c, l; - int recheck = 0; - - n = 0; - if (isl_union_map_foreach_map(umap, inc_count, &n) < 0) - goto error; - - if (n <= 1) - return union_floyd_warshall(umap, exact); - - ctx = isl_union_map_get_ctx(umap); - list = isl_calloc_array(ctx, isl_basic_map *, n); - if (!list) - goto error; - - next = list; - if (isl_union_map_foreach_map(umap, collect_basic_map, &next) < 0) - goto error; - - s = basic_map_sort_init(ctx, n, list); - if (!s) - goto error; - - c = 0; - i = 0; - l = n; - path = isl_union_map_empty(isl_union_map_get_dim(umap)); - while (l) { - isl_union_map *comp; - isl_union_map *path_comp, *path_comb; - comp = isl_union_map_empty(isl_union_map_get_dim(umap)); - while (s->order[i] != -1) { - comp = isl_union_map_add_map(comp, - isl_map_from_basic_map( - isl_basic_map_copy(list[s->order[i]]))); - --l; - ++i; - } - path_comp = union_floyd_warshall(comp, exact); - path_comb = isl_union_map_apply_range(isl_union_map_copy(path), - isl_union_map_copy(path_comp)); - path = isl_union_map_union(path, path_comp); - path = isl_union_map_union(path, path_comb); - ++i; - ++c; - } - - if (c > 1 && s->check_closed && !*exact) { - int closed; - - closed = isl_union_map_is_transitively_closed(path); - if (closed < 0) - goto error; - recheck = !closed; - } - - basic_map_sort_free(s); - - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - - if (recheck) { - isl_union_map_free(path); - return union_floyd_warshall(umap, exact); - } - - isl_union_map_free(umap); - - return path; -error: - basic_map_sort_free(s); - if (list) { - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - } - isl_union_map_free(umap); - isl_union_map_free(path); - return NULL; -} - -/* Compute the transitive closure of "umap", or an overapproximation. - * If the result is exact, then *exact is set to 1. - */ -__isl_give isl_union_map *isl_union_map_transitive_closure( - __isl_take isl_union_map *umap, int *exact) -{ - int closed; - - if (!umap) - return NULL; - - if (exact) - *exact = 1; - - umap = isl_union_map_compute_divs(umap); - umap = isl_union_map_coalesce(umap); - closed = isl_union_map_is_transitively_closed(umap); - if (closed < 0) - goto error; - if (closed) - return umap; - umap = union_components(umap, exact); - return umap; -error: - isl_union_map_free(umap); - return NULL; -} - -struct isl_union_power { - isl_union_map *pow; - int *exact; -}; - -static int power(__isl_take isl_map *map, void *user) -{ - struct isl_union_power *up = user; - - map = isl_map_power(map, up->exact); - up->pow = isl_union_map_from_map(map); - - return -1; -} - -/* Construct a map [x] -> [x+1], with parameters prescribed by "dim". - */ -static __isl_give isl_union_map *increment(__isl_take isl_dim *dim) -{ - int k; - isl_basic_map *bmap; - - dim = isl_dim_add(dim, isl_dim_in, 1); - dim = isl_dim_add(dim, isl_dim_out, 1); - bmap = isl_basic_map_alloc_dim(dim, 0, 1, 0); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[k][0], 1); - isl_int_set_si(bmap->eq[k][isl_basic_map_offset(bmap, isl_dim_in)], 1); - isl_int_set_si(bmap->eq[k][isl_basic_map_offset(bmap, isl_dim_out)], -1); - return isl_union_map_from_map(isl_map_from_basic_map(bmap)); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Construct a map [[x]->[y]] -> [y-x], with parameters prescribed by "dim". - */ -static __isl_give isl_union_map *deltas_map(__isl_take isl_dim *dim) -{ - isl_basic_map *bmap; - - dim = isl_dim_add(dim, isl_dim_in, 1); - dim = isl_dim_add(dim, isl_dim_out, 1); - bmap = isl_basic_map_universe(dim); - bmap = isl_basic_map_deltas_map(bmap); - - return isl_union_map_from_map(isl_map_from_basic_map(bmap)); -} - -/* Compute the positive powers of "map", or an overapproximation. - * The result maps the exponent to a nested copy of the corresponding power. - * If the result is exact, then *exact is set to 1. - */ -__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap, - int *exact) -{ - int n; - isl_union_map *inc; - isl_union_map *dm; - - if (!umap) - return NULL; - n = isl_union_map_n_map(umap); - if (n == 0) - return umap; - if (n == 1) { - struct isl_union_power up = { NULL, exact }; - isl_union_map_foreach_map(umap, &power, &up); - isl_union_map_free(umap); - return up.pow; - } - inc = increment(isl_union_map_get_dim(umap)); - umap = isl_union_map_product(inc, umap); - umap = isl_union_map_transitive_closure(umap, exact); - umap = isl_union_map_zip(umap); - dm = deltas_map(isl_union_map_get_dim(umap)); - umap = isl_union_map_apply_domain(umap, dm); - - return umap; -} diff --git a/cloog-0.16.3/isl/isl_union_map.c b/cloog-0.16.3/isl/isl_union_map.c deleted file mode 100644 index a5910fbd5359299dfe887c82675fab2a67e58e97..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_union_map.c +++ /dev/null @@ -1,2042 +0,0 @@ -/* - * Copyright 2010-2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static __isl_give isl_union_map *isl_union_map_alloc(__isl_take isl_dim *dim, - int size) -{ - isl_union_map *umap; - - if (!dim) - return NULL; - - umap = isl_calloc_type(dim->ctx, isl_union_map); - if (!umap) - return NULL; - - umap->ref = 1; - umap->dim = dim; - if (isl_hash_table_init(dim->ctx, &umap->table, size) < 0) - goto error; - - return umap; -error: - isl_dim_free(dim); - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_empty(__isl_take isl_dim *dim) -{ - return isl_union_map_alloc(dim, 16); -} - -__isl_give isl_union_set *isl_union_set_empty(__isl_take isl_dim *dim) -{ - return isl_union_map_empty(dim); -} - -isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap) -{ - return umap ? umap->dim->ctx : NULL; -} - -isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset) -{ - return uset ? uset->dim->ctx : NULL; -} - -__isl_give isl_dim *isl_union_map_get_dim(__isl_keep isl_union_map *umap) -{ - if (!umap) - return NULL; - return isl_dim_copy(umap->dim); -} - -__isl_give isl_dim *isl_union_set_get_dim(__isl_keep isl_union_set *uset) -{ - return isl_union_map_get_dim(uset); -} - -static int free_umap_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_map_free(map); - return 0; -} - -static int add_map(__isl_take isl_map *map, void *user) -{ - isl_union_map **umap = (isl_union_map **)user; - - *umap = isl_union_map_add_map(*umap, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_dup(__isl_keep isl_union_map *umap) -{ - isl_union_map *dup; - - if (!umap) - return NULL; - - dup = isl_union_map_empty(isl_dim_copy(umap->dim)); - if (isl_union_map_foreach_map(umap, &add_map, &dup) < 0) - goto error; - return dup; -error: - isl_union_map_free(dup); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_cow(__isl_take isl_union_map *umap) -{ - if (!umap) - return NULL; - - if (umap->ref == 1) - return umap; - umap->ref--; - return isl_union_map_dup(umap); -} - -struct isl_union_align { - isl_reordering *exp; - isl_union_map *res; -}; - -static int align_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_reordering *exp; - struct isl_union_align *data = user; - - exp = isl_reordering_extend_dim(isl_reordering_copy(data->exp), - isl_map_get_dim(map)); - - data->res = isl_union_map_add_map(data->res, - isl_map_realign(isl_map_copy(map), exp)); - - return 0; -} - -/* Align the parameters of umap along those of model. - * The result has the parameters of model first, in the same order - * as they appear in model, followed by any remaining parameters of - * umap that do not appear in model. - */ -__isl_give isl_union_map *isl_union_map_align_params( - __isl_take isl_union_map *umap, __isl_take isl_dim *model) -{ - struct isl_union_align data = { NULL, NULL }; - - if (!umap || !model) - goto error; - - if (isl_dim_match(umap->dim, isl_dim_param, model, isl_dim_param)) { - isl_dim_free(model); - return umap; - } - - data.exp = isl_parameter_alignment_reordering(umap->dim, model); - if (!data.exp) - goto error; - - data.res = isl_union_map_alloc(isl_dim_copy(data.exp->dim), - umap->table.n); - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &align_entry, &data) < 0) - goto error; - - isl_reordering_free(data.exp); - isl_union_map_free(umap); - isl_dim_free(model); - return data.res; -error: - isl_reordering_free(data.exp); - isl_union_map_free(umap); - isl_union_map_free(data.res); - isl_dim_free(model); - return NULL; -} - -__isl_give isl_union_set *isl_union_set_align_params( - __isl_take isl_union_set *uset, __isl_take isl_dim *model) -{ - return isl_union_map_align_params(uset, model); -} - -__isl_give isl_union_map *isl_union_map_union(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2) -{ - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_dim(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_dim(umap1)); - - umap1 = isl_union_map_cow(umap1); - - if (!umap1 || !umap2) - goto error; - - if (isl_union_map_foreach_map(umap2, &add_map, &umap1) < 0) - goto error; - - isl_union_map_free(umap2); - - return umap1; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return NULL; -} - -__isl_give isl_union_set *isl_union_set_union(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2) -{ - return isl_union_map_union(uset1, uset2); -} - -__isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap) -{ - if (!umap) - return NULL; - - umap->ref++; - return umap; -} - -__isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset) -{ - return isl_union_map_copy(uset); -} - -void *isl_union_map_free(__isl_take isl_union_map *umap) -{ - if (!umap) - return NULL; - - if (--umap->ref > 0) - return NULL; - - isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &free_umap_entry, NULL); - isl_hash_table_clear(&umap->table); - isl_dim_free(umap->dim); - free(umap); - return NULL; -} - -void *isl_union_set_free(__isl_take isl_union_set *uset) -{ - return isl_union_map_free(uset); -} - -static int has_dim(const void *entry, const void *val) -{ - isl_map *map = (isl_map *)entry; - isl_dim *dim = (isl_dim *)val; - - return isl_dim_equal(map->dim, dim); -} - -__isl_give isl_union_map *isl_union_map_add_map(__isl_take isl_union_map *umap, - __isl_take isl_map *map) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (isl_map_plain_is_empty(map)) { - isl_map_free(map); - return umap; - } - - umap = isl_union_map_cow(umap); - - if (!map || !umap) - goto error; - - isl_assert(map->ctx, isl_dim_match(map->dim, isl_dim_param, umap->dim, - isl_dim_param), goto error); - - hash = isl_dim_get_hash(map->dim); - entry = isl_hash_table_find(umap->dim->ctx, &umap->table, hash, - &has_dim, map->dim, 1); - if (!entry) - goto error; - - if (!entry->data) - entry->data = map; - else { - entry->data = isl_map_union(entry->data, isl_map_copy(map)); - if (!entry->data) - goto error; - isl_map_free(map); - } - - return umap; -error: - isl_map_free(map); - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_union_set *isl_union_set_add_set(__isl_take isl_union_set *uset, - __isl_take isl_set *set) -{ - return isl_union_map_add_map(uset, (isl_map *)set); -} - -__isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map) -{ - isl_dim *dim; - isl_union_map *umap; - - if (!map) - return NULL; - - dim = isl_map_get_dim(map); - dim = isl_dim_drop(dim, isl_dim_in, 0, isl_dim_size(dim, isl_dim_in)); - dim = isl_dim_drop(dim, isl_dim_out, 0, isl_dim_size(dim, isl_dim_out)); - umap = isl_union_map_empty(dim); - umap = isl_union_map_add_map(umap, map); - - return umap; -} - -__isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set) -{ - return isl_union_map_from_map((isl_map *)set); -} - -struct isl_union_map_foreach_data -{ - int (*fn)(__isl_take isl_map *map, void *user); - void *user; -}; - -static int call_on_copy(void **entry, void *user) -{ - isl_map *map = *entry; - struct isl_union_map_foreach_data *data; - data = (struct isl_union_map_foreach_data *)user; - - return data->fn(isl_map_copy(map), data->user); -} - -int isl_union_map_n_map(__isl_keep isl_union_map *umap) -{ - return umap ? umap->table.n : 0; -} - -int isl_union_set_n_set(__isl_keep isl_union_set *uset) -{ - return uset ? uset->table.n : 0; -} - -int isl_union_map_foreach_map(__isl_keep isl_union_map *umap, - int (*fn)(__isl_take isl_map *map, void *user), void *user) -{ - struct isl_union_map_foreach_data data = { fn, user }; - - if (!umap) - return -1; - - return isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &call_on_copy, &data); -} - -static int copy_map(void **entry, void *user) -{ - isl_map *map = *entry; - isl_map **map_p = user; - - *map_p = isl_map_copy(map); - - return -1; -} - -__isl_give isl_map *isl_map_from_union_map(__isl_take isl_union_map *umap) -{ - isl_ctx *ctx; - isl_map *map = NULL; - - if (!umap) - return NULL; - ctx = isl_union_map_get_ctx(umap); - if (umap->table.n != 1) - isl_die(ctx, isl_error_invalid, - "union map needs to contain elements in exactly " - "one space", return isl_union_map_free(umap)); - - isl_hash_table_foreach(ctx, &umap->table, ©_map, &map); - - isl_union_map_free(umap); - - return map; -} - -__isl_give isl_set *isl_set_from_union_set(__isl_take isl_union_set *uset) -{ - return isl_map_from_union_map(uset); -} - -__isl_give isl_map *isl_union_map_extract_map(__isl_keep isl_union_map *umap, - __isl_take isl_dim *dim) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!umap || !dim) - goto error; - - hash = isl_dim_get_hash(dim); - entry = isl_hash_table_find(umap->dim->ctx, &umap->table, hash, - &has_dim, dim, 0); - if (!entry) - return isl_map_empty(dim); - isl_dim_free(dim); - return isl_map_copy(entry->data); -error: - isl_dim_free(dim); - return NULL; -} - -__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset, - __isl_take isl_dim *dim) -{ - return (isl_set *)isl_union_map_extract_map(uset, dim); -} - -/* Check if umap contains a map in the given space. - */ -__isl_give int isl_union_map_contains(__isl_keep isl_union_map *umap, - __isl_keep isl_dim *dim) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!umap || !dim) - return -1; - - hash = isl_dim_get_hash(dim); - entry = isl_hash_table_find(umap->dim->ctx, &umap->table, hash, - &has_dim, dim, 0); - return !!entry; -} - -__isl_give int isl_union_set_contains(__isl_keep isl_union_set *uset, - __isl_keep isl_dim *dim) -{ - return isl_union_map_contains(uset, dim); -} - -int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_set *set, void *user), void *user) -{ - return isl_union_map_foreach_map(uset, - (int(*)(__isl_take isl_map *, void*))fn, user); -} - -struct isl_union_set_foreach_point_data { - int (*fn)(__isl_take isl_point *pnt, void *user); - void *user; -}; - -static int foreach_point(__isl_take isl_set *set, void *user) -{ - struct isl_union_set_foreach_point_data *data = user; - int r; - - r = isl_set_foreach_point(set, data->fn, data->user); - isl_set_free(set); - - return r; -} - -int isl_union_set_foreach_point(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user) -{ - struct isl_union_set_foreach_point_data data = { fn, user }; - return isl_union_set_foreach_set(uset, &foreach_point, &data); -} - -struct isl_union_map_gen_bin_data { - isl_union_map *umap2; - isl_union_map *res; -}; - -static int subtract_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_map *map = *entry; - - hash = isl_dim_get_hash(map->dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, map->dim, 0); - map = isl_map_copy(map); - if (entry2) { - int empty; - map = isl_map_subtract(map, isl_map_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - } - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -static __isl_give isl_union_map *gen_bin_op(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2, int (*fn)(void **, void *)) -{ - struct isl_union_map_gen_bin_data data = { NULL, NULL }; - - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_dim(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_dim(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - data.res = isl_union_map_alloc(isl_dim_copy(umap1->dim), - umap1->table.n); - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - fn, &data) < 0) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return data.res; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_subtract( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return gen_bin_op(umap1, umap2, &subtract_entry); -} - -__isl_give isl_union_set *isl_union_set_subtract( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_subtract(uset1, uset2); -} - -struct isl_union_map_match_bin_data { - isl_union_map *umap2; - isl_union_map *res; - __isl_give isl_map *(*fn)(__isl_take isl_map*, __isl_take isl_map*); -}; - -static int match_bin_entry(void **entry, void *user) -{ - struct isl_union_map_match_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_map *map = *entry; - int empty; - - hash = isl_dim_get_hash(map->dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, map->dim, 0); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = data->fn(map, isl_map_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -static __isl_give isl_union_map *match_bin_op(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2, - __isl_give isl_map *(*fn)(__isl_take isl_map*, __isl_take isl_map*)) -{ - struct isl_union_map_match_bin_data data = { NULL, NULL, fn }; - - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_dim(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_dim(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - data.res = isl_union_map_alloc(isl_dim_copy(umap1->dim), - umap1->table.n); - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - &match_bin_entry, &data) < 0) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return data.res; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_intersect( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return match_bin_op(umap1, umap2, &isl_map_intersect); -} - -__isl_give isl_union_set *isl_union_set_intersect( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_intersect(uset1, uset2); -} - -__isl_give isl_union_map *isl_union_map_gist(__isl_take isl_union_map *umap, - __isl_take isl_union_map *context) -{ - return match_bin_op(umap, context, &isl_map_gist); -} - -__isl_give isl_union_set *isl_union_set_gist(__isl_take isl_union_set *uset, - __isl_take isl_union_set *context) -{ - return isl_union_map_gist(uset, context); -} - -static __isl_give isl_map *lex_le_set(__isl_take isl_map *set1, - __isl_take isl_map *set2) -{ - return isl_set_lex_le_set((isl_set *)set1, (isl_set *)set2); -} - -static __isl_give isl_map *lex_lt_set(__isl_take isl_map *set1, - __isl_take isl_map *set2) -{ - return isl_set_lex_lt_set((isl_set *)set1, (isl_set *)set2); -} - -__isl_give isl_union_map *isl_union_set_lex_lt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return match_bin_op(uset1, uset2, &lex_lt_set); -} - -__isl_give isl_union_map *isl_union_set_lex_le_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return match_bin_op(uset1, uset2, &lex_le_set); -} - -__isl_give isl_union_map *isl_union_set_lex_gt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_reverse(isl_union_set_lex_lt_union_set(uset2, uset1)); -} - -__isl_give isl_union_map *isl_union_set_lex_ge_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_reverse(isl_union_set_lex_le_union_set(uset2, uset1)); -} - -__isl_give isl_union_map *isl_union_map_lex_gt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return isl_union_map_reverse(isl_union_map_lex_lt_union_map(umap2, umap1)); -} - -__isl_give isl_union_map *isl_union_map_lex_ge_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return isl_union_map_reverse(isl_union_map_lex_le_union_map(umap2, umap1)); -} - -static int intersect_domain_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_dim *dim; - isl_map *map = *entry; - int empty; - - dim = isl_map_get_dim(map); - dim = isl_dim_domain(dim); - hash = isl_dim_get_hash(dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, dim, 0); - isl_dim_free(dim); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = isl_map_intersect_domain(map, isl_set_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_intersect_domain( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - return gen_bin_op(umap, uset, &intersect_domain_entry); -} - -static int intersect_range_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_dim *dim; - isl_map *map = *entry; - int empty; - - dim = isl_map_get_dim(map); - dim = isl_dim_range(dim); - hash = isl_dim_get_hash(dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, dim, 0); - isl_dim_free(dim); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = isl_map_intersect_range(map, isl_set_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_intersect_range( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - return gen_bin_op(umap, uset, &intersect_range_entry); -} - -struct isl_union_map_bin_data { - isl_union_map *umap2; - isl_union_map *res; - isl_map *map; - int (*fn)(void **entry, void *user); -}; - -static int apply_range_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - int empty; - - if (!isl_dim_tuple_match(data->map->dim, isl_dim_out, - map2->dim, isl_dim_in)) - return 0; - - map2 = isl_map_apply_range(isl_map_copy(data->map), isl_map_copy(map2)); - - empty = isl_map_is_empty(map2); - if (empty < 0) { - isl_map_free(map2); - return -1; - } - if (empty) { - isl_map_free(map2); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -static int bin_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map = *entry; - - data->map = map; - if (isl_hash_table_foreach(data->umap2->dim->ctx, &data->umap2->table, - data->fn, data) < 0) - return -1; - - return 0; -} - -static __isl_give isl_union_map *bin_op(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2, int (*fn)(void **entry, void *user)) -{ - struct isl_union_map_bin_data data = { NULL, NULL, NULL, fn }; - - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_dim(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_dim(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - data.res = isl_union_map_alloc(isl_dim_copy(umap1->dim), - umap1->table.n); - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - &bin_entry, &data) < 0) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return data.res; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_apply_range( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &apply_range_entry); -} - -__isl_give isl_union_map *isl_union_map_apply_domain( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - umap1 = isl_union_map_reverse(umap1); - umap1 = isl_union_map_apply_range(umap1, umap2); - return isl_union_map_reverse(umap1); -} - -__isl_give isl_union_set *isl_union_set_apply( - __isl_take isl_union_set *uset, __isl_take isl_union_map *umap) -{ - return isl_union_map_apply_range(uset, umap); -} - -static int map_lex_lt_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_dim_tuple_match(data->map->dim, isl_dim_out, - map2->dim, isl_dim_out)) - return 0; - - map2 = isl_map_lex_lt_map(isl_map_copy(data->map), isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_lex_lt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &map_lex_lt_entry); -} - -static int map_lex_le_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_dim_tuple_match(data->map->dim, isl_dim_out, - map2->dim, isl_dim_out)) - return 0; - - map2 = isl_map_lex_le_map(isl_map_copy(data->map), isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_lex_le_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &map_lex_le_entry); -} - -static int product_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - map2 = isl_map_product(isl_map_copy(data->map), isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_product(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &product_entry); -} - -__isl_give isl_union_set *isl_union_set_product(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2) -{ - return isl_union_map_product(uset1, uset2); -} - -static int range_product_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_dim_tuple_match(data->map->dim, isl_dim_in, - map2->dim, isl_dim_in)) - return 0; - - map2 = isl_map_range_product(isl_map_copy(data->map), - isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &range_product_entry); -} - -static int flat_range_product_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_dim_tuple_match(data->map->dim, isl_dim_in, - map2->dim, isl_dim_in)) - return 0; - - map2 = isl_map_flat_range_product(isl_map_copy(data->map), - isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_flat_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &flat_range_product_entry); -} - -__isl_give isl_union_map *isl_union_map_from_range( - __isl_take isl_union_set *uset) -{ - return uset; -} - -__isl_give isl_union_map *isl_union_map_from_domain( - __isl_take isl_union_set *uset) -{ - return isl_union_map_reverse(isl_union_map_from_range(uset)); -} - -__isl_give isl_union_map *isl_union_map_from_domain_and_range( - __isl_take isl_union_set *domain, __isl_take isl_union_set *range) -{ - return isl_union_map_apply_range(isl_union_map_from_domain(domain), - isl_union_map_from_range(range)); -} - -static __isl_give isl_union_map *un_op(__isl_take isl_union_map *umap, - int (*fn)(void **, void *)) -{ - umap = isl_union_map_cow(umap); - if (!umap) - return NULL; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, fn, NULL) < 0) - goto error; - - return umap; -error: - isl_union_map_free(umap); - return NULL; -} - -static int affine_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_from_basic_map(isl_map_affine_hull(*map)); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_affine_hull( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &affine_entry); -} - -__isl_give isl_union_set *isl_union_set_affine_hull( - __isl_take isl_union_set *uset) -{ - return isl_union_map_affine_hull(uset); -} - -static int polyhedral_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_from_basic_map(isl_map_polyhedral_hull(*map)); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_polyhedral_hull( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &polyhedral_entry); -} - -__isl_give isl_union_set *isl_union_set_polyhedral_hull( - __isl_take isl_union_set *uset) -{ - return isl_union_map_polyhedral_hull(uset); -} - -static int simple_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_from_basic_map(isl_map_simple_hull(*map)); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_simple_hull( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &simple_entry); -} - -__isl_give isl_union_set *isl_union_set_simple_hull( - __isl_take isl_union_set *uset) -{ - return isl_union_map_simple_hull(uset); -} - -static int inplace_entry(void **entry, void *user) -{ - __isl_give isl_map *(*fn)(__isl_take isl_map *); - isl_map **map = (isl_map **)entry; - isl_map *copy; - - fn = *(__isl_give isl_map *(**)(__isl_take isl_map *)) user; - copy = fn(isl_map_copy(*map)); - if (!copy) - return -1; - - isl_map_free(*map); - *map = copy; - - return 0; -} - -static __isl_give isl_union_map *inplace(__isl_take isl_union_map *umap, - __isl_give isl_map *(*fn)(__isl_take isl_map *)) -{ - if (!umap) - return NULL; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &inplace_entry, &fn) < 0) - goto error; - - return umap; -error: - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_coalesce( - __isl_take isl_union_map *umap) -{ - return inplace(umap, &isl_map_coalesce); -} - -__isl_give isl_union_set *isl_union_set_coalesce( - __isl_take isl_union_set *uset) -{ - return isl_union_map_coalesce(uset); -} - -__isl_give isl_union_map *isl_union_map_detect_equalities( - __isl_take isl_union_map *umap) -{ - return inplace(umap, &isl_map_detect_equalities); -} - -__isl_give isl_union_set *isl_union_set_detect_equalities( - __isl_take isl_union_set *uset) -{ - return isl_union_map_detect_equalities(uset); -} - -__isl_give isl_union_map *isl_union_map_compute_divs( - __isl_take isl_union_map *umap) -{ - return inplace(umap, &isl_map_compute_divs); -} - -__isl_give isl_union_set *isl_union_set_compute_divs( - __isl_take isl_union_set *uset) -{ - return isl_union_map_compute_divs(uset); -} - -static int lexmin_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_lexmin(*map); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_lexmin( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &lexmin_entry); -} - -__isl_give isl_union_set *isl_union_set_lexmin( - __isl_take isl_union_set *uset) -{ - return isl_union_map_lexmin(uset); -} - -static int lexmax_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_lexmax(*map); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_lexmax( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &lexmax_entry); -} - -__isl_give isl_union_set *isl_union_set_lexmax( - __isl_take isl_union_set *uset) -{ - return isl_union_map_lexmax(uset); -} - -static __isl_give isl_union_set *cond_un_op(__isl_take isl_union_map *umap, - int (*fn)(void **, void *)) -{ - isl_union_set *res; - - if (!umap) - return NULL; - - res = isl_union_map_alloc(isl_dim_copy(umap->dim), umap->table.n); - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, fn, &res) < 0) - goto error; - - isl_union_map_free(umap); - return res; -error: - isl_union_map_free(umap); - isl_union_set_free(res); - return NULL; -} - -static int universe_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - map = isl_map_universe(isl_map_get_dim(map)); - *res = isl_union_map_add_map(*res, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_universe(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &universe_entry); -} - -__isl_give isl_union_set *isl_union_set_universe(__isl_take isl_union_set *uset) -{ - return isl_union_map_universe(uset); -} - -static int reverse_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - *res = isl_union_map_add_map(*res, isl_map_reverse(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &reverse_entry); -} - -static int domain_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_domain(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_domain(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &domain_entry); -} - -static int range_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_range(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_range(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &range_entry); -} - -static int domain_map_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_map_add_map(*res, - isl_map_domain_map(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_domain_map( - __isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &domain_map_entry); -} - -static int range_map_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_map_add_map(*res, - isl_map_range_map(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_range_map( - __isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &range_map_entry); -} - -static int deltas_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - if (!isl_dim_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - return 0; - - *res = isl_union_set_add_set(*res, isl_map_deltas(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_deltas(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &deltas_entry); -} - -static int deltas_map_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - if (!isl_dim_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - return 0; - - *res = isl_union_map_add_map(*res, - isl_map_deltas_map(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_deltas_map( - __isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &deltas_map_entry); -} - -static int identity_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_map **res = user; - - *res = isl_union_map_add_map(*res, isl_set_identity(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_map *isl_union_set_identity(__isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &identity_entry); -} - -static int unwrap_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - if (!isl_set_is_wrapping(set)) - return 0; - - *res = isl_union_map_add_map(*res, isl_set_unwrap(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_map *isl_union_set_unwrap(__isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &unwrap_entry); -} - -static int wrap_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_wrap(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_wrap(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &wrap_entry); -} - -struct isl_union_map_is_subset_data { - isl_union_map *umap2; - int is_subset; -}; - -static int is_subset_entry(void **entry, void *user) -{ - struct isl_union_map_is_subset_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_map *map = *entry; - - hash = isl_dim_get_hash(map->dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, map->dim, 0); - if (!entry2) { - data->is_subset = 0; - return -1; - } - - data->is_subset = isl_map_is_subset(map, entry2->data); - if (data->is_subset < 0 || !data->is_subset) - return -1; - - return 0; -} - -int isl_union_map_is_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2) -{ - struct isl_union_map_is_subset_data data = { NULL, 1 }; - - umap1 = isl_union_map_copy(umap1); - umap2 = isl_union_map_copy(umap2); - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_dim(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_dim(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - &is_subset_entry, &data) < 0 && - data.is_subset) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - - return data.is_subset; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return -1; -} - -int isl_union_set_is_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2) -{ - return isl_union_map_is_subset(uset1, uset2); -} - -int isl_union_map_is_equal(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2) -{ - int is_subset; - - if (!umap1 || !umap2) - return -1; - is_subset = isl_union_map_is_subset(umap1, umap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_union_map_is_subset(umap2, umap1); - return is_subset; -} - -int isl_union_set_is_equal(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2) -{ - return isl_union_map_is_equal(uset1, uset2); -} - -int isl_union_map_is_strict_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2) -{ - int is_subset; - - if (!umap1 || !umap2) - return -1; - is_subset = isl_union_map_is_subset(umap1, umap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_union_map_is_subset(umap2, umap1); - if (is_subset == -1) - return is_subset; - return !is_subset; -} - -int isl_union_set_is_strict_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2) -{ - return isl_union_map_is_strict_subset(uset1, uset2); -} - -static int sample_entry(void **entry, void *user) -{ - isl_basic_map **sample = (isl_basic_map **)user; - isl_map *map = *entry; - - *sample = isl_map_sample(isl_map_copy(map)); - if (!*sample) - return -1; - if (!isl_basic_map_plain_is_empty(*sample)) - return -1; - return 0; -} - -__isl_give isl_basic_map *isl_union_map_sample(__isl_take isl_union_map *umap) -{ - isl_basic_map *sample = NULL; - - if (!umap) - return NULL; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &sample_entry, &sample) < 0 && - !sample) - goto error; - - if (!sample) - sample = isl_basic_map_empty(isl_union_map_get_dim(umap)); - - isl_union_map_free(umap); - - return sample; -error: - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_basic_set *isl_union_set_sample(__isl_take isl_union_set *uset) -{ - return (isl_basic_set *)isl_union_map_sample(uset); -} - -struct isl_forall_data { - int res; - int (*fn)(__isl_keep isl_map *map); -}; - -static int forall_entry(void **entry, void *user) -{ - struct isl_forall_data *data = user; - isl_map *map = *entry; - - data->res = data->fn(map); - if (data->res < 0) - return -1; - - if (!data->res) - return -1; - - return 0; -} - -static int union_map_forall(__isl_keep isl_union_map *umap, - int (*fn)(__isl_keep isl_map *map)) -{ - struct isl_forall_data data = { 1, fn }; - - if (!umap) - return -1; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &forall_entry, &data) < 0 && data.res) - return -1; - - return data.res; -} - -struct isl_forall_user_data { - int res; - int (*fn)(__isl_keep isl_map *map, void *user); - void *user; -}; - -static int forall_user_entry(void **entry, void *user) -{ - struct isl_forall_user_data *data = user; - isl_map *map = *entry; - - data->res = data->fn(map, data->user); - if (data->res < 0) - return -1; - - if (!data->res) - return -1; - - return 0; -} - -/* Check if fn(map, user) returns true for all maps "map" in umap. - */ -static int union_map_forall_user(__isl_keep isl_union_map *umap, - int (*fn)(__isl_keep isl_map *map, void *user), void *user) -{ - struct isl_forall_user_data data = { 1, fn, user }; - - if (!umap) - return -1; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &forall_user_entry, &data) < 0 && data.res) - return -1; - - return data.res; -} - -int isl_union_map_is_empty(__isl_keep isl_union_map *umap) -{ - return union_map_forall(umap, &isl_map_is_empty); -} - -int isl_union_set_is_empty(__isl_keep isl_union_set *uset) -{ - return isl_union_map_is_empty(uset); -} - -static int is_subset_of_identity(__isl_keep isl_map *map) -{ - int is_subset; - isl_dim *dim; - isl_map *id; - - if (!map) - return -1; - - if (!isl_dim_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - return 0; - - dim = isl_map_get_dim(map); - id = isl_map_identity(dim); - - is_subset = isl_map_is_subset(map, id); - - isl_map_free(id); - - return is_subset; -} - -/* Check if the given map is single-valued. - * We simply compute - * - * M \circ M^-1 - * - * and check if the result is a subset of the identity mapping. - */ -int isl_union_map_is_single_valued(__isl_keep isl_union_map *umap) -{ - isl_union_map *test; - int sv; - - if (isl_union_map_n_map(umap) == 1) { - isl_map *map; - umap = isl_union_map_copy(umap); - map = isl_map_from_union_map(umap); - sv = isl_map_is_single_valued(map); - isl_map_free(map); - return sv; - } - - test = isl_union_map_reverse(isl_union_map_copy(umap)); - test = isl_union_map_apply_range(test, isl_union_map_copy(umap)); - - sv = union_map_forall(test, &is_subset_of_identity); - - isl_union_map_free(test); - - return sv; -} - -int isl_union_map_is_injective(__isl_keep isl_union_map *umap) -{ - int in; - - umap = isl_union_map_copy(umap); - umap = isl_union_map_reverse(umap); - in = isl_union_map_is_single_valued(umap); - isl_union_map_free(umap); - - return in; -} - -/* Represents a map that has a fixed value (v) for one of its - * range dimensions. - * The map in this structure is not reference counted, so it - * is only valid while the isl_union_map from which it was - * obtained is still alive. - */ -struct isl_fixed_map { - isl_int v; - isl_map *map; -}; - -static struct isl_fixed_map *alloc_isl_fixed_map_array(isl_ctx *ctx, - int n) -{ - int i; - struct isl_fixed_map *v; - - v = isl_calloc_array(ctx, struct isl_fixed_map, n); - if (!v) - return NULL; - for (i = 0; i < n; ++i) - isl_int_init(v[i].v); - return v; -} - -static void free_isl_fixed_map_array(struct isl_fixed_map *v, int n) -{ - int i; - - if (!v) - return; - for (i = 0; i < n; ++i) - isl_int_clear(v[i].v); - free(v); -} - -/* Compare the "v" field of two isl_fixed_map structs. - */ -static int qsort_fixed_map_cmp(const void *p1, const void *p2) -{ - const struct isl_fixed_map *e1 = (const struct isl_fixed_map *) p1; - const struct isl_fixed_map *e2 = (const struct isl_fixed_map *) p2; - - return isl_int_cmp(e1->v, e2->v); -} - -/* Internal data structure used while checking whether all maps - * in a union_map have a fixed value for a given output dimension. - * v is the list of maps, with the fixed value for the dimension - * n is the number of maps considered so far - * pos is the output dimension under investigation - */ -struct isl_fixed_dim_data { - struct isl_fixed_map *v; - int n; - int pos; -}; - -static int fixed_at_pos(__isl_keep isl_map *map, void *user) -{ - struct isl_fixed_dim_data *data = user; - - data->v[data->n].map = map; - return isl_map_plain_is_fixed(map, isl_dim_out, data->pos, - &data->v[data->n++].v); -} - -static int plain_injective_on_range(__isl_take isl_union_map *umap, - int first, int n_range); - -/* Given a list of the maps, with their fixed values at output dimension "pos", - * check whether the ranges of the maps form an obvious partition. - * - * We first sort the maps according to their fixed values. - * If all maps have a different value, then we know the ranges form - * a partition. - * Otherwise, we collect the maps with the same fixed value and - * check whether each such collection is obviously injective - * based on later dimensions. - */ -static int separates(struct isl_fixed_map *v, int n, - __isl_take isl_dim *dim, int pos, int n_range) -{ - int i; - - if (!v) - goto error; - - qsort(v, n, sizeof(*v), &qsort_fixed_map_cmp); - - for (i = 0; i + 1 < n; ++i) { - int j, k; - isl_union_map *part; - int injective; - - for (j = i + 1; j < n; ++j) - if (isl_int_ne(v[i].v, v[j].v)) - break; - - if (j == i + 1) - continue; - - part = isl_union_map_alloc(isl_dim_copy(dim), j - i); - for (k = i; k < j; ++k) - part = isl_union_map_add_map(part, - isl_map_copy(v[k].map)); - - injective = plain_injective_on_range(part, pos + 1, n_range); - if (injective < 0) - goto error; - if (!injective) - break; - - i = j - 1; - } - - isl_dim_free(dim); - free_isl_fixed_map_array(v, n); - return i + 1 >= n; -error: - isl_dim_free(dim); - free_isl_fixed_map_array(v, n); - return -1; -} - -/* Check whether the maps in umap have obviously distinct ranges. - * In particular, check for an output dimension in the range - * [first,n_range) for which all maps have a fixed value - * and then check if these values, possibly along with fixed values - * at later dimensions, entail distinct ranges. - */ -static int plain_injective_on_range(__isl_take isl_union_map *umap, - int first, int n_range) -{ - isl_ctx *ctx; - int n; - struct isl_fixed_dim_data data = { NULL }; - - ctx = isl_union_map_get_ctx(umap); - - if (!umap) - goto error; - - n = isl_union_map_n_map(umap); - if (n <= 1) { - isl_union_map_free(umap); - return 1; - } - - if (first >= n_range) { - isl_union_map_free(umap); - return 0; - } - - data.v = alloc_isl_fixed_map_array(ctx, n); - if (!data.v) - goto error; - - for (data.pos = first; data.pos < n_range; ++data.pos) { - int fixed; - int injective; - isl_dim *dim; - - data.n = 0; - fixed = union_map_forall_user(umap, &fixed_at_pos, &data); - if (fixed < 0) - goto error; - if (!fixed) - continue; - dim = isl_union_map_get_dim(umap); - injective = separates(data.v, n, dim, data.pos, n_range); - isl_union_map_free(umap); - return injective; - } - - free_isl_fixed_map_array(data.v, n); - isl_union_map_free(umap); - - return 0; -error: - free_isl_fixed_map_array(data.v, n); - isl_union_map_free(umap); - return -1; -} - -/* Check whether the maps in umap that map to subsets of "ran" - * have obviously distinct ranges. - */ -static int plain_injective_on_range_wrap(__isl_keep isl_set *ran, void *user) -{ - isl_union_map *umap = user; - - umap = isl_union_map_copy(umap); - umap = isl_union_map_intersect_range(umap, - isl_union_set_from_set(isl_set_copy(ran))); - return plain_injective_on_range(umap, 0, isl_set_dim(ran, isl_dim_set)); -} - -/* Check if the given union_map is obviously injective. - * - * In particular, we first check if all individual maps are obviously - * injective and then check if all the ranges of these maps are - * obviously disjoint. - */ -int isl_union_map_plain_is_injective(__isl_keep isl_union_map *umap) -{ - int in; - isl_union_map *univ; - isl_union_set *ran; - - in = union_map_forall(umap, &isl_map_plain_is_injective); - if (in < 0) - return -1; - if (!in) - return 0; - - univ = isl_union_map_universe(isl_union_map_copy(umap)); - ran = isl_union_map_range(univ); - - in = union_map_forall_user(ran, &plain_injective_on_range_wrap, umap); - - isl_union_set_free(ran); - - return in; -} - -int isl_union_map_is_bijective(__isl_keep isl_union_map *umap) -{ - int sv; - - sv = isl_union_map_is_single_valued(umap); - if (sv < 0 || !sv) - return sv; - - return isl_union_map_is_injective(umap); -} - -static int zip_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - if (!isl_map_can_zip(map)) - return 0; - - *res = isl_union_map_add_map(*res, isl_map_zip(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_zip(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &zip_entry); -} - -static int lift_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_set_lift(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_set *isl_union_set_lift(__isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &lift_entry); -} - -static int coefficients_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - set = isl_set_copy(set); - set = isl_set_from_basic_set(isl_set_coefficients(set)); - *res = isl_union_set_add_set(*res, set); - - return 0; -} - -__isl_give isl_union_set *isl_union_set_coefficients( - __isl_take isl_union_set *uset) -{ - isl_ctx *ctx; - isl_dim *dim; - isl_union_set *res; - - if (!uset) - return NULL; - - ctx = isl_union_set_get_ctx(uset); - dim = isl_dim_set_alloc(ctx, 0, 0); - res = isl_union_map_alloc(dim, uset->table.n); - if (isl_hash_table_foreach(uset->dim->ctx, &uset->table, - &coefficients_entry, &res) < 0) - goto error; - - isl_union_set_free(uset); - return res; -error: - isl_union_set_free(uset); - isl_union_set_free(res); - return NULL; -} - -static int solutions_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - set = isl_set_copy(set); - set = isl_set_from_basic_set(isl_set_solutions(set)); - if (!*res) - *res = isl_union_set_from_set(set); - else - *res = isl_union_set_add_set(*res, set); - - if (!*res) - return -1; - - return 0; -} - -__isl_give isl_union_set *isl_union_set_solutions( - __isl_take isl_union_set *uset) -{ - isl_union_set *res = NULL; - - if (!uset) - return NULL; - - if (uset->table.n == 0) { - res = isl_union_set_empty(isl_union_set_get_dim(uset)); - isl_union_set_free(uset); - return res; - } - - if (isl_hash_table_foreach(uset->dim->ctx, &uset->table, - &solutions_entry, &res) < 0) - goto error; - - isl_union_set_free(uset); - return res; -error: - isl_union_set_free(uset); - isl_union_set_free(res); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_union_map_private.h b/cloog-0.16.3/isl/isl_union_map_private.h deleted file mode 100644 index 2abd4ff9b9793b64f5a987936a0ea089aad3419f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_union_map_private.h +++ /dev/null @@ -1,9 +0,0 @@ -#define isl_union_set isl_union_map -#include - -struct isl_union_map { - int ref; - isl_dim *dim; - - struct isl_hash_table table; -}; diff --git a/cloog-0.16.3/isl/isl_union_templ.c b/cloog-0.16.3/isl/isl_union_templ.c deleted file mode 100644 index c06069db3efdcf0973d8cd48c82f904ba5948050..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_union_templ.c +++ /dev/null @@ -1,614 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xS(TYPE,NAME) struct TYPE ## _ ## NAME -#define S(TYPE,NAME) xS(TYPE,NAME) - -struct UNION { - int ref; -#ifdef HAS_TYPE - enum isl_fold type; -#endif - isl_dim *dim; - - struct isl_hash_table table; -}; - -__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u); - -isl_ctx *FN(UNION,get_ctx)(__isl_keep UNION *u) -{ - return u ? u->dim->ctx : NULL; -} - -__isl_give isl_dim *FN(UNION,get_dim)(__isl_keep UNION *u) -{ - if (!u) - return NULL; - return isl_dim_copy(u->dim); -} - -#ifdef HAS_TYPE -static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_dim *dim, - enum isl_fold type, int size) -#else -static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_dim *dim, int size) -#endif -{ - UNION *u; - - if (!dim) - return NULL; - - u = isl_calloc_type(dim->ctx, UNION); - if (!u) - return NULL; - - u->ref = 1; -#ifdef HAS_TYPE - u->type = type; -#endif - u->dim = dim; - if (isl_hash_table_init(dim->ctx, &u->table, size) < 0) - goto error; - - return u; -error: - isl_dim_free(dim); - FN(UNION,free)(u); - return NULL; -} - -#ifdef HAS_TYPE -__isl_give UNION *FN(UNION,zero)(__isl_take isl_dim *dim, enum isl_fold type) -{ - return FN(UNION,alloc)(dim, type, 16); -} -#else -__isl_give UNION *FN(UNION,zero)(__isl_take isl_dim *dim) -{ - return FN(UNION,alloc)(dim, 16); -} -#endif - -__isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u) -{ - if (!u) - return NULL; - - u->ref++; - return u; -} - -S(UNION,foreach_data) -{ - int (*fn)(__isl_take PART *part, void *user); - void *user; -}; - -static int call_on_copy(void **entry, void *user) -{ - PART *part = *entry; - S(UNION,foreach_data) *data = (S(UNION,foreach_data) *)user; - - return data->fn(FN(PART,copy)(part), data->user); -} - -int FN(FN(UNION,foreach),PARTS)(__isl_keep UNION *u, - int (*fn)(__isl_take PART *part, void *user), void *user) -{ - S(UNION,foreach_data) data = { fn, user }; - - if (!u) - return -1; - - return isl_hash_table_foreach(u->dim->ctx, &u->table, - &call_on_copy, &data); -} - -static int has_dim(const void *entry, const void *val) -{ - PART *part = (PART *)entry; - isl_dim *dim = (isl_dim *)val; - - return isl_dim_equal(part->dim, dim); -} - -__isl_give PART *FN(FN(UNION,extract),PARTS)(__isl_keep UNION *u, - __isl_take isl_dim *dim) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!u || !dim) - goto error; - - hash = isl_dim_get_hash(dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, hash, - &has_dim, dim, 0); - if (!entry) -#ifdef HAS_TYPE - return FN(PART,zero)(dim, u->type); -#else - return FN(PART,zero)(dim); -#endif - isl_dim_free(dim); - return FN(PART,copy)(entry->data); -error: - isl_dim_free(dim); - return NULL; -} - -__isl_give UNION *FN(FN(UNION,add),PARTS)(__isl_take UNION *u, - __isl_take PART *part) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!part) - goto error; - - if (FN(PART,is_zero)(part)) { - FN(PART,free)(part); - return u; - } - - u = FN(UNION,cow)(u); - - if (!u) - goto error; - - isl_assert(u->dim->ctx, isl_dim_match(part->dim, isl_dim_param, u->dim, - isl_dim_param), goto error); - - hash = isl_dim_get_hash(part->dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, hash, - &has_dim, part->dim, 1); - if (!entry) - goto error; - - if (!entry->data) - entry->data = part; - else { - entry->data = FN(PART,add)(entry->data, FN(PART,copy)(part)); - if (!entry->data) - goto error; - FN(PART,free)(part); - if (FN(PART,is_zero)(entry->data)) { - FN(PART,free)(entry->data); - isl_hash_table_remove(u->dim->ctx, &u->table, entry); - } - } - - return u; -error: - FN(PART,free)(part); - FN(UNION,free)(u); - return NULL; -} - -static int add_part(__isl_take PART *part, void *user) -{ - UNION **u = (UNION **)user; - - *u = FN(FN(UNION,add),PARTS)(*u, part); - - return 0; -} - -__isl_give UNION *FN(UNION,dup)(__isl_keep UNION *u) -{ - UNION *dup; - - if (!u) - return NULL; - -#ifdef HAS_TYPE - dup = FN(UNION,zero)(isl_dim_copy(u->dim), u->type); -#else - dup = FN(UNION,zero)(isl_dim_copy(u->dim)); -#endif - if (FN(FN(UNION,foreach),PARTS)(u, &add_part, &dup) < 0) - goto error; - return dup; -error: - FN(UNION,free)(dup); - return NULL; -} - -__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u) -{ - if (!u) - return NULL; - - if (u->ref == 1) - return u; - u->ref--; - return FN(UNION,dup)(u); -} - -static int free_u_entry(void **entry, void *user) -{ - PART *part = *entry; - FN(PART,free)(part); - return 0; -} - -void FN(UNION,free)(__isl_take UNION *u) -{ - if (!u) - return; - - if (--u->ref > 0) - return; - - isl_hash_table_foreach(u->dim->ctx, &u->table, &free_u_entry, NULL); - isl_hash_table_clear(&u->table); - isl_dim_free(u->dim); - free(u); -} - -S(UNION,align) { - isl_reordering *exp; - UNION *res; -}; - -static int align_entry(__isl_take PART *part, void *user) -{ - isl_reordering *exp; - S(UNION,align) *data = user; - - exp = isl_reordering_extend_dim(isl_reordering_copy(data->exp), - FN(PART,get_dim)(part)); - - data->res = FN(FN(UNION,add),PARTS)(data->res, - FN(PART,realign)(part, exp)); - - return 0; -} - -__isl_give UNION *FN(UNION,align_params)(__isl_take UNION *u, - __isl_take isl_dim *model) -{ - S(UNION,align) data = { NULL, NULL }; - - if (!u || !model) - goto error; - - if (isl_dim_match(u->dim, isl_dim_param, model, isl_dim_param)) { - isl_dim_free(model); - return u; - } - - data.exp = isl_parameter_alignment_reordering(u->dim, model); - if (!data.exp) - goto error; - -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_dim_copy(data.exp->dim), - u->type, u->table.n); -#else - data.res = FN(UNION,alloc)(isl_dim_copy(data.exp->dim), u->table.n); -#endif - if (FN(FN(UNION,foreach),PARTS)(u, &align_entry, &data) < 0) - goto error; - - isl_reordering_free(data.exp); - FN(UNION,free)(u); - isl_dim_free(model); - return data.res; -error: - isl_reordering_free(data.exp); - FN(UNION,free)(u); - FN(UNION,free)(data.res); - isl_dim_free(model); - return NULL; -} - -__isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2) -{ - u1 = FN(UNION,align_params)(u1, FN(UNION,get_dim)(u2)); - u2 = FN(UNION,align_params)(u2, FN(UNION,get_dim)(u1)); - - u1 = FN(UNION,cow)(u1); - - if (!u1 || !u2) - goto error; - - if (FN(FN(UNION,foreach),PARTS)(u2, &add_part, &u1) < 0) - goto error; - - FN(UNION,free)(u2); - - return u1; -error: - FN(UNION,free)(u1); - FN(UNION,free)(u2); - return NULL; -} - -__isl_give UNION *FN(FN(UNION,from),PARTS)(__isl_take PART *part) -{ - isl_dim *dim; - UNION *u; - - if (!part) - return NULL; - - dim = FN(PART,get_dim)(part); - dim = isl_dim_drop(dim, isl_dim_in, 0, isl_dim_size(dim, isl_dim_in)); - dim = isl_dim_drop(dim, isl_dim_out, 0, isl_dim_size(dim, isl_dim_out)); -#ifdef HAS_TYPE - u = FN(UNION,zero)(dim, part->type); -#else - u = FN(UNION,zero)(dim); -#endif - u = FN(FN(UNION,add),PARTS)(u, part); - - return u; -} - -S(UNION,match_bin_data) { - UNION *u2; - UNION *res; -}; - -/* This function is currently only used from isl_polynomial.c - * and not from isl_fold.c. - */ -static __isl_give UNION *match_bin_op(__isl_take UNION *u1, - __isl_take UNION *u2, - int (*fn)(void **, void *)) __attribute__ ((unused)); -static __isl_give UNION *match_bin_op(__isl_take UNION *u1, - __isl_take UNION *u2, int (*fn)(void **, void *)) -{ - S(UNION,match_bin_data) data = { NULL, NULL }; - - u1 = FN(UNION,align_params)(u1, FN(UNION,get_dim)(u2)); - u2 = FN(UNION,align_params)(u2, FN(UNION,get_dim)(u1)); - - if (!u1 || !u2) - goto error; - - data.u2 = u2; -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_dim_copy(u1->dim), u1->type, u1->table.n); -#else - data.res = FN(UNION,alloc)(isl_dim_copy(u1->dim), u1->table.n); -#endif - if (isl_hash_table_foreach(u1->dim->ctx, &u1->table, fn, &data) < 0) - goto error; - - FN(UNION,free)(u1); - FN(UNION,free)(u2); - return data.res; -error: - FN(UNION,free)(u1); - FN(UNION,free)(u2); - FN(UNION,free)(data.res); - return NULL; -} - -S(UNION,match_set_data) { - isl_union_set *uset; - UNION *res; - __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*); -}; - -static int set_has_dim(const void *entry, const void *val) -{ - isl_set *set = (isl_set *)entry; - isl_dim *dim = (isl_dim *)val; - - return isl_dim_equal(set->dim, dim); -} - -static int match_set_entry(void **entry, void *user) -{ - S(UNION,match_set_data) *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - PW *pw = *entry; - int empty; - - hash = isl_dim_get_hash(pw->dim); - entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table, - hash, &set_has_dim, pw->dim, 0); - if (!entry2) - return 0; - - pw = FN(PW,copy)(pw); - pw = data->fn(pw, isl_set_copy(entry2->data)); - - empty = FN(PW,is_zero)(pw); - if (empty < 0) { - FN(PW,free)(pw); - return -1; - } - if (empty) { - FN(PW,free)(pw); - return 0; - } - - data->res = FN(FN(UNION,add),PARTS)(data->res, pw); - - return 0; -} - -static __isl_give UNION *match_set_op(__isl_take UNION *u, - __isl_take isl_union_set *uset, - __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*)) -{ - S(UNION,match_set_data) data = { NULL, NULL, fn }; - - u = FN(UNION,align_params)(u, isl_union_set_get_dim(uset)); - uset = isl_union_set_align_params(uset, FN(UNION,get_dim)(u)); - - if (!u || !uset) - goto error; - - data.uset = uset; -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_dim_copy(u->dim), u->type, u->table.n); -#else - data.res = FN(UNION,alloc)(isl_dim_copy(u->dim), u->table.n); -#endif - if (isl_hash_table_foreach(u->dim->ctx, &u->table, - &match_set_entry, &data) < 0) - goto error; - - FN(UNION,free)(u); - isl_union_set_free(uset); - return data.res; -error: - FN(UNION,free)(u); - isl_union_set_free(uset); - FN(UNION,free)(data.res); - return NULL; -} - -__isl_give UNION *FN(UNION,intersect_domain)(__isl_take UNION *u, - __isl_take isl_union_set *uset) -{ - return match_set_op(u, uset, &FN(PW,intersect_domain)); -} - -__isl_give UNION *FN(UNION,gist)(__isl_take UNION *u, - __isl_take isl_union_set *uset) -{ - return match_set_op(u, uset, &FN(PW,gist)); -} - -__isl_give isl_qpolynomial *FN(UNION,eval)(__isl_take UNION *u, - __isl_take isl_point *pnt) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - isl_qpolynomial *qp; - - if (!u || !pnt) - goto error; - - hash = isl_dim_get_hash(pnt->dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, - hash, &has_dim, pnt->dim, 0); - if (!entry) { - qp = isl_qpolynomial_zero(isl_dim_copy(pnt->dim)); - isl_point_free(pnt); - } else { - qp = FN(PART,eval)(FN(PART,copy)(entry->data), pnt); - } - FN(UNION,free)(u); - return qp; -error: - FN(UNION,free)(u); - isl_point_free(pnt); - return NULL; -} - -static int coalesce_entry(void **entry, void *user) -{ - PW **pw = (PW **)entry; - - *pw = FN(PW,coalesce)(*pw); - if (!*pw) - return -1; - - return 0; -} - -__isl_give UNION *FN(UNION,coalesce)(__isl_take UNION *u) -{ - if (!u) - return NULL; - - if (isl_hash_table_foreach(u->dim->ctx, &u->table, - &coalesce_entry, NULL) < 0) - goto error; - - return u; -error: - FN(UNION,free)(u); - return NULL; -} - -static int domain(__isl_take PART *part, void *user) -{ - isl_union_set **uset = (isl_union_set **)user; - - *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part)); - - return 0; -} - -__isl_give isl_union_set *FN(UNION,domain)(__isl_take UNION *u) -{ - isl_union_set *uset; - - uset = isl_union_set_empty(FN(UNION,get_dim)(u)); - if (FN(FN(UNION,foreach),PARTS)(u, &domain, &uset) < 0) - goto error; - - FN(UNION,free)(u); - - return uset; -error: - isl_union_set_free(uset); - FN(UNION,free)(u); - return NULL; -} - -static int mul_isl_int(void **entry, void *user) -{ - PW **pw = (PW **)entry; - isl_int *v = user; - - *pw = FN(PW,mul_isl_int)(*pw, *v); - if (!*pw) - return -1; - - return 0; -} - -__isl_give UNION *FN(UNION,mul_isl_int)(__isl_take UNION *u, isl_int v) -{ - if (isl_int_is_one(v)) - return u; - - if (u && isl_int_is_zero(v)) { - UNION *zero; - isl_dim *dim = FN(UNION,get_dim)(u); -#ifdef HAS_TYPE - zero = FN(UNION,zero)(dim, u->type); -#else - zero = FN(UNION,zero)(dim); -#endif - FN(UNION,free)(u); - return zero; - } - - u = FN(UNION,cow)(u); - if (!u) - return NULL; - -#ifdef HAS_TYPE - if (isl_int_is_neg(v)) - u->type = isl_fold_type_negate(u->type); -#endif - if (isl_hash_table_foreach(u->dim->ctx, &u->table, &mul_isl_int, v) < 0) - goto error; - - return u; -error: - FN(UNION,free)(u); - return NULL; -} diff --git a/cloog-0.16.3/isl/isl_vec.c b/cloog-0.16.3/isl/isl_vec.c deleted file mode 100644 index b0bd1a3a5ca1e17ee968b18cedf59f71e0f954cf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_vec.c +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec) -{ - return vec ? vec->ctx : NULL; -} - -struct isl_vec *isl_vec_alloc(struct isl_ctx *ctx, unsigned size) -{ - struct isl_vec *vec; - - vec = isl_alloc_type(ctx, struct isl_vec); - if (!vec) - return NULL; - - vec->block = isl_blk_alloc(ctx, size); - if (isl_blk_is_error(vec->block)) - goto error; - - vec->ctx = ctx; - isl_ctx_ref(ctx); - vec->ref = 1; - vec->size = size; - vec->el = vec->block.data; - - return vec; -error: - isl_blk_free(ctx, vec->block); - return NULL; -} - -__isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size) -{ - if (!vec) - return NULL; - if (size <= vec->size) - return vec; - - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - vec->block = isl_blk_extend(vec->ctx, vec->block, size); - if (!vec->block.data) - goto error; - - vec->size = size; - vec->el = vec->block.data; - - return vec; -error: - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size) -{ - int extra; - - if (!vec) - return NULL; - if (size <= vec->size) - return vec; - - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - extra = size - vec->size; - vec = isl_vec_extend(vec, size); - if (!vec) - return NULL; - - isl_seq_clr(vec->el + size - extra, extra); - - return vec; -} - -struct isl_vec *isl_vec_copy(struct isl_vec *vec) -{ - if (!vec) - return NULL; - - vec->ref++; - return vec; -} - -struct isl_vec *isl_vec_dup(struct isl_vec *vec) -{ - struct isl_vec *vec2; - - if (!vec) - return NULL; - vec2 = isl_vec_alloc(vec->ctx, vec->size); - isl_seq_cpy(vec2->el, vec->el, vec->size); - return vec2; -} - -struct isl_vec *isl_vec_cow(struct isl_vec *vec) -{ - struct isl_vec *vec2; - if (!vec) - return NULL; - - if (vec->ref == 1) - return vec; - - vec2 = isl_vec_dup(vec); - isl_vec_free(vec); - return vec2; -} - -void isl_vec_free(struct isl_vec *vec) -{ - if (!vec) - return; - - if (--vec->ref > 0) - return; - - isl_ctx_deref(vec->ctx); - isl_blk_free(vec->ctx, vec->block); - free(vec); -} - -int isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2) -{ - if (!vec1 || !vec2) - return -1; - - if (vec1->size != vec2->size) - return 0; - - return isl_seq_eq(vec1->el, vec2->el, vec1->size); -} - -__isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer, - __isl_keep isl_vec *vec) -{ - int i; - - if (!printer || !vec) - goto error; - - printer = isl_printer_print_str(printer, "["); - for (i = 0; i < vec->size; ++i) { - if (i) - printer = isl_printer_print_str(printer, ","); - printer = isl_printer_print_isl_int(printer, vec->el[i]); - } - printer = isl_printer_print_str(printer, "]"); - - return printer; -error: - isl_printer_free(printer); - return NULL; -} - -void isl_vec_dump(struct isl_vec *vec) -{ - isl_printer *printer; - - if (!vec) - return; - - printer = isl_printer_to_file(vec->ctx, stderr); - printer = isl_printer_print_vec(printer, vec); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec) -{ - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - isl_seq_clr(vec->el, vec->size); - return vec; -} - -void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm) -{ - isl_seq_lcm(vec->block.data, vec->size, lcm); -} - -/* Given a rational vector, with the denominator in the first element - * of the vector, round up all coordinates. - */ -struct isl_vec *isl_vec_ceil(struct isl_vec *vec) -{ - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - isl_seq_cdiv_q(vec->el + 1, vec->el + 1, vec->el[0], vec->size - 1); - - isl_int_set_si(vec->el[0], 1); - - return vec; -} - -struct isl_vec *isl_vec_normalize(struct isl_vec *vec) -{ - if (!vec) - return NULL; - isl_seq_normalize(vec->ctx, vec->el, vec->size); - return vec; -} - -__isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m) -{ - if (isl_int_is_one(m)) - return vec; - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - isl_seq_scale(vec->el, vec->el, m, vec->size); - return vec; -} - -__isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1, - __isl_take isl_vec *vec2) -{ - vec1 = isl_vec_cow(vec1); - if (!vec1 || !vec2) - goto error; - - isl_assert(vec1->ctx, vec1->size == vec2->size, goto error); - - isl_seq_combine(vec1->el, vec1->ctx->one, vec1->el, - vec1->ctx->one, vec2->el, vec1->size); - - isl_vec_free(vec2); - return vec1; -error: - isl_vec_free(vec1); - isl_vec_free(vec2); - return NULL; -} - -static int qsort_int_cmp(const void *p1, const void *p2) -{ - const isl_int *i1 = (const isl_int *) p1; - const isl_int *i2 = (const isl_int *) p2; - - return isl_int_cmp(*i1, *i2); -} - -__isl_give isl_vec *isl_vec_sort(__isl_take isl_vec *vec) -{ - if (!vec) - return NULL; - - qsort(vec->el, vec->size, sizeof(*vec->el), &qsort_int_cmp); - - return vec; -} - -__isl_give isl_vec *isl_vec_drop_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n) -{ - if (n == 0) - return vec; - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - if (pos + n > vec->size) - isl_die(vec->ctx, isl_error_invalid, - "range out of bounds", goto error); - - if (pos + n != vec->size) - isl_seq_cpy(vec->el + pos, vec->el + pos + n, - vec->size - pos - n); - - vec->size -= n; - - return vec; -error: - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_vec *isl_vec_insert_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n) -{ - isl_vec *ext = NULL; - - if (n == 0) - return vec; - if (!vec) - return NULL; - - if (pos > vec->size) - isl_die(vec->ctx, isl_error_invalid, - "position out of bounds", goto error); - - ext = isl_vec_alloc(vec->ctx, vec->size + n); - if (!ext) - goto error; - - isl_seq_cpy(ext->el, vec->el, pos); - isl_seq_cpy(ext->el + pos + n, vec->el + pos, vec->size - pos); - - isl_vec_free(vec); - return ext; -error: - isl_vec_free(vec); - isl_vec_free(ext); - return NULL; -} - -__isl_give isl_vec *isl_vec_insert_zero_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n) -{ - vec = isl_vec_insert_els(vec, pos, n); - if (!vec) - return NULL; - - isl_seq_clr(vec->el + pos, n); - - return vec; -} diff --git a/cloog-0.16.3/isl/isl_version.c b/cloog-0.16.3/isl/isl_version.c deleted file mode 100644 index 1a59f55c186e19d5496c9aaedcc4533484412180..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_version.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "gitversion.h" - -const char *isl_version(void) -{ - return GIT_HEAD_ID"\n"; -} diff --git a/cloog-0.16.3/isl/isl_vertices.c b/cloog-0.16.3/isl/isl_vertices.c deleted file mode 100644 index 9611d6b28a4a7047ca427e26ba67e5a6479a080e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_vertices.c +++ /dev/null @@ -1,1571 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define SELECTED 1 -#define DESELECTED -1 -#define UNSELECTED 0 - -static __isl_give isl_vertices *compute_chambers(__isl_take isl_basic_set *bset, - __isl_take isl_vertices *vertices); - -__isl_give isl_vertices *isl_vertices_copy(__isl_keep isl_vertices *vertices) -{ - if (!vertices) - return NULL; - - vertices->ref++; - return vertices; -} - -void isl_vertices_free(__isl_take isl_vertices *vertices) -{ - int i; - - if (!vertices) - return; - - if (--vertices->ref > 0) - return; - - for (i = 0; i < vertices->n_vertices; ++i) { - isl_basic_set_free(vertices->v[i].vertex); - isl_basic_set_free(vertices->v[i].dom); - } - free(vertices->v); - - for (i = 0; i < vertices->n_chambers; ++i) { - free(vertices->c[i].vertices); - isl_basic_set_free(vertices->c[i].dom); - } - free(vertices->c); - - isl_basic_set_free(vertices->bset); - free(vertices); -} - -struct isl_vertex_list { - struct isl_vertex v; - struct isl_vertex_list *next; -}; - -static void free_vertex_list(struct isl_vertex_list *list) -{ - struct isl_vertex_list *next; - - for (; list; list = next) { - next = list->next; - isl_basic_set_free(list->v.vertex); - isl_basic_set_free(list->v.dom); - free(list); - } -} - -static __isl_give isl_vertices *vertices_from_list(__isl_keep isl_basic_set *bset, - int n_vertices, struct isl_vertex_list *list) -{ - int i; - struct isl_vertex_list *next; - isl_vertices *vertices; - - vertices = isl_calloc_type(bset->ctx, isl_vertices); - if (!vertices) - goto error; - vertices->ref = 1; - vertices->bset = isl_basic_set_copy(bset); - vertices->v = isl_alloc_array(bset->ctx, struct isl_vertex, n_vertices); - if (!vertices->v) - goto error; - vertices->n_vertices = n_vertices; - - for (i = 0; list; list = next, i++) { - next = list->next; - vertices->v[i] = list->v; - free(list); - } - - return vertices; -error: - free(vertices); - free_vertex_list(list); - return NULL; -} - -/* Prepend a vertex to the linked list "list" based on the equalities in "tab". - */ -static int add_vertex(struct isl_vertex_list **list, - __isl_keep isl_basic_set *bset, struct isl_tab *tab) -{ - unsigned nvar; - unsigned nparam; - struct isl_vertex_list *v = NULL; - - if (isl_tab_detect_implicit_equalities(tab) < 0) - return -1; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - v = isl_calloc_type(tab->mat->ctx, struct isl_vertex_list); - if (!v) - goto error; - - v->v.vertex = isl_basic_set_copy(bset); - v->v.vertex = isl_basic_set_cow(v->v.vertex); - v->v.vertex = isl_basic_set_update_from_tab(v->v.vertex, tab); - v->v.vertex = isl_basic_set_simplify(v->v.vertex); - v->v.vertex = isl_basic_set_finalize(v->v.vertex); - if (!v->v.vertex) - goto error; - isl_assert(bset->ctx, v->v.vertex->n_eq >= nvar, goto error); - v->v.dom = isl_basic_set_copy(v->v.vertex); - v->v.dom = isl_basic_set_project_out(v->v.dom, isl_dim_set, 0, nvar); - if (!v->v.dom) - goto error; - - v->next = *list; - *list = v; - - return 0; -error: - free_vertex_list(v); - return -1; -} - -/* Compute the parametric vertices and the chamber decomposition - * of an empty parametric polytope. - */ -static __isl_give isl_vertices *vertices_empty(__isl_keep isl_basic_set *bset) -{ - isl_vertices *vertices; - unsigned nparam; - - if (!bset) - return NULL; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - - vertices = isl_calloc_type(bset->ctx, isl_vertices); - if (!vertices) - return NULL; - vertices->bset = isl_basic_set_copy(bset); - vertices->ref = 1; - - vertices->n_vertices = 0; - vertices->n_chambers = 0; - - return vertices; -} - -/* Compute the parametric vertices and the chamber decomposition - * of the parametric polytope defined using the same constraints - * as "bset" in the 0D case. - * There is exactly one 0D vertex and a single chamber containing - * the vertex. - */ -static __isl_give isl_vertices *vertices_0D(__isl_keep isl_basic_set *bset) -{ - isl_vertices *vertices; - unsigned nparam; - - if (!bset) - return NULL; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - - vertices = isl_calloc_type(bset->ctx, isl_vertices); - if (!vertices) - return NULL; - vertices->ref = 1; - vertices->bset = isl_basic_set_copy(bset); - - vertices->v = isl_calloc_array(bset->ctx, struct isl_vertex, 1); - if (!vertices->v) - goto error; - vertices->n_vertices = 1; - vertices->v[0].vertex = isl_basic_set_copy(bset); - if (!vertices->v[0].vertex) - goto error; - - vertices->c = isl_calloc_array(bset->ctx, struct isl_chamber, 1); - if (!vertices->c) - goto error; - vertices->n_chambers = 1; - vertices->c[0].n_vertices = 1; - vertices->c[0].vertices = isl_calloc_array(bset->ctx, int, 1); - if (!vertices->c[0].vertices) - goto error; - vertices->c[0].dom = isl_basic_set_copy(bset); - if (!vertices->c[0].dom) - goto error; - - return vertices; -error: - isl_vertices_free(vertices); - return NULL; -} - -static int isl_mat_rank(__isl_keep isl_mat *mat) -{ - int row, col; - isl_mat *H; - - H = isl_mat_left_hermite(isl_mat_copy(mat), 0, NULL, NULL); - if (!H) - return -1; - - for (col = 0; col < H->n_col; ++col) { - for (row = 0; row < H->n_row; ++row) - if (!isl_int_is_zero(H->row[row][col])) - break; - if (row == H->n_row) - break; - } - - isl_mat_free(H); - - return col; -} - -/* Is the row pointed to by "f" linearly independent of the "n" first - * rows in "facets"? - */ -static int is_independent(__isl_keep isl_mat *facets, int n, isl_int *f) -{ - int rank; - - if (isl_seq_first_non_zero(f, facets->n_col) < 0) - return 0; - - isl_seq_cpy(facets->row[n], f, facets->n_col); - facets->n_row = n + 1; - rank = isl_mat_rank(facets); - if (rank < 0) - return -1; - - return rank == n + 1; -} - -/* Check whether we can select constraint "level", given the current selection - * reflected by facets in "tab", the rows of "facets" and the earlier - * "selected" elements of "selection". - * - * If the constraint is (strictly) redundant in the tableau, selecting it would - * result in an empty tableau, so it can't be selected. - * If the set variable part of the constraint is not linearly indepedent - * of the set variable parts of the already selected constraints, - * the constraint cannot be selected. - * If selecting the constraint results in an empty tableau, the constraint - * cannot be selected. - * Finally, if selecting the constraint results in some explicitly - * deselected constraints turning into equalities, then the corresponding - * vertices have already been generated, so the constraint cannot be selected. - */ -static int can_select(__isl_keep isl_basic_set *bset, int level, - struct isl_tab *tab, __isl_keep isl_mat *facets, int selected, - int *selection) -{ - int i; - int indep; - unsigned ovar; - struct isl_tab_undo *snap; - - if (isl_tab_is_redundant(tab, level)) - return 0; - - ovar = isl_dim_offset(bset->dim, isl_dim_set); - - indep = is_independent(facets, selected, bset->ineq[level] + 1 + ovar); - if (indep < 0) - return -1; - if (!indep) - return 0; - - snap = isl_tab_snap(tab); - if (isl_tab_select_facet(tab, level) < 0) - return -1; - - if (tab->empty) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - - for (i = 0; i < level; ++i) { - int sgn; - - if (selection[i] != DESELECTED) - continue; - - if (isl_tab_is_equality(tab, i)) - sgn = 0; - else if (isl_tab_is_redundant(tab, i)) - sgn = 1; - else - sgn = isl_tab_sign_of_max(tab, i); - if (sgn < -1) - return -1; - if (sgn <= 0) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - } - - return 1; -} - -/* Compute the parametric vertices and the chamber decomposition - * of a parametric polytope that is not full-dimensional. - * - * Simply map the parametric polytope to a lower dimensional space - * and map the resulting vertices back. - */ -static __isl_give isl_vertices *lower_dim_vertices( - __isl_keep isl_basic_set *bset) -{ - isl_morph *morph; - isl_vertices *vertices; - - bset = isl_basic_set_copy(bset); - morph = isl_basic_set_full_compression(bset); - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - - vertices = isl_basic_set_compute_vertices(bset); - isl_basic_set_free(bset); - - morph = isl_morph_inverse(morph); - - vertices = isl_morph_vertices(morph, vertices); - - return vertices; -} - -/* Compute the parametric vertices and the chamber decomposition - * of the parametric polytope defined using the same constraints - * as "bset". "bset" is assumed to have no existentially quantified - * variables. - * - * The vertices themselves are computed in a fairly simplistic way. - * We simply run through all combinations of d constraints, - * with d the number of set variables, and check if those d constraints - * define a vertex. To avoid the generation of duplicate vertices, - * which we may happen if a vertex is defined by more that d constraints, - * we make sure we only generate the vertex for the d constraints with - * smallest index. - * - * We set up a tableau and keep track of which facets have been - * selected. The tableau is marked strict_redundant so that we can be - * sure that any constraint that is marked redundant (and that is not - * also marked zero) is not an equality. - * If a constraint is marked DESELECTED, it means the constraint was - * SELECTED before (in combination with the same selection of earlier - * constraints). If such a deselected constraint turns out to be an - * equality, then any vertex that may still be found with the current - * selection has already been generated when the constraint was selected. - * A constraint is marked UNSELECTED when there is no way selecting - * the constraint could lead to a vertex (in combination with the current - * selection of earlier constraints). - * - * The set variable coefficients of the selected constraints are stored - * in the facets matrix. - */ -__isl_give isl_vertices *isl_basic_set_compute_vertices( - __isl_keep isl_basic_set *bset) -{ - struct isl_tab *tab; - int level; - int init; - unsigned nvar; - int *selection = NULL; - int selected; - struct isl_tab_undo **snap = NULL; - isl_mat *facets = NULL; - struct isl_vertex_list *list = NULL; - int n_vertices = 0; - isl_vertices *vertices; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return vertices_empty(bset); - - if (bset->n_eq != 0) - return lower_dim_vertices(bset); - - isl_assert(bset->ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, - return NULL); - - if (isl_basic_set_dim(bset, isl_dim_set) == 0) - return vertices_0D(bset); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_set_rational(bset); - if (!bset) - return NULL; - - tab = isl_tab_from_basic_set(bset); - if (!tab) - goto error; - tab->strict_redundant = 1; - - if (tab->empty) { - vertices = vertices_empty(bset); - isl_basic_set_free(bset); - isl_tab_free(tab); - return vertices; - } - - selection = isl_alloc_array(bset->ctx, int, bset->n_ineq); - snap = isl_alloc_array(bset->ctx, struct isl_tab_undo *, bset->n_ineq); - facets = isl_mat_alloc(bset->ctx, nvar, nvar); - if (!selection || !snap || !facets) - goto error; - - level = 0; - init = 1; - selected = 0; - - while (level >= 0) { - if (level >= bset->n_ineq || - (!init && selection[level] != SELECTED)) { - --level; - init = 0; - continue; - } - if (init) { - int ok; - snap[level] = isl_tab_snap(tab); - ok = can_select(bset, level, tab, facets, selected, - selection); - if (ok < 0) - goto error; - if (ok) { - selection[level] = SELECTED; - selected++; - } else - selection[level] = UNSELECTED; - } else { - selection[level] = DESELECTED; - selected--; - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - } - if (selected == nvar) { - if (tab->n_dead == nvar) { - if (add_vertex(&list, bset, tab) < 0) - goto error; - n_vertices++; - } - init = 0; - continue; - } - ++level; - init = 1; - } - - isl_mat_free(facets); - free(selection); - free(snap); - - isl_tab_free(tab); - - vertices = vertices_from_list(bset, n_vertices, list); - - vertices = compute_chambers(bset, vertices); - - return vertices; -error: - isl_mat_free(facets); - free(selection); - free(snap); - isl_tab_free(tab); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_chamber_list { - struct isl_chamber c; - struct isl_chamber_list *next; -}; - -static void free_chamber_list(struct isl_chamber_list *list) -{ - struct isl_chamber_list *next; - - for (; list; list = next) { - next = list->next; - isl_basic_set_free(list->c.dom); - free(list->c.vertices); - free(list); - } -} - -/* Check whether the basic set "bset" is a superset of the basic set described - * by "tab", i.e., check whether all constraints of "bset" are redundant. - */ -static int bset_covers_tab(__isl_keep isl_basic_set *bset, struct isl_tab *tab) -{ - int i; - - if (!bset || !tab) - return -1; - - for (i = 0; i < bset->n_ineq; ++i) { - enum isl_ineq_type type = isl_tab_ineq_type(tab, bset->ineq[i]); - switch (type) { - case isl_ineq_error: return -1; - case isl_ineq_redundant: continue; - default: return 0; - } - } - - return 1; -} - -static __isl_give isl_vertices *vertices_add_chambers( - __isl_take isl_vertices *vertices, int n_chambers, - struct isl_chamber_list *list) -{ - int i; - isl_ctx *ctx; - struct isl_chamber_list *next; - - ctx = isl_vertices_get_ctx(vertices); - vertices->c = isl_alloc_array(ctx, struct isl_chamber, n_chambers); - if (!vertices->c) - goto error; - vertices->n_chambers = n_chambers; - - for (i = 0; list; list = next, i++) { - next = list->next; - vertices->c[i] = list->c; - free(list); - } - - return vertices; -error: - isl_vertices_free(vertices); - free_chamber_list(list); - return NULL; -} - -/* Can "tab" be intersected with "bset" without resulting in - * a lower-dimensional set. - */ -static int can_intersect(struct isl_tab *tab, __isl_keep isl_basic_set *bset) -{ - int i; - struct isl_tab_undo *snap; - - if (isl_tab_extend_cons(tab, bset->n_ineq) < 0) - return -1; - - snap = isl_tab_snap(tab); - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_tab_ineq_type(tab, bset->ineq[i]) == isl_ineq_redundant) - continue; - if (isl_tab_add_ineq(tab, bset->ineq[i]) < 0) - return -1; - } - - if (isl_tab_detect_implicit_equalities(tab) < 0) - return -1; - if (tab->n_dead) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - - return 1; -} - -static int add_chamber(struct isl_chamber_list **list, - __isl_keep isl_vertices *vertices, struct isl_tab *tab, int *selection) -{ - int n_frozen; - int i, j; - int n_vertices = 0; - struct isl_tab_undo *snap; - struct isl_chamber_list *c = NULL; - - for (i = 0; i < vertices->n_vertices; ++i) - if (selection[i]) - n_vertices++; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con && tab->con[i].frozen; ++i) - tab->con[i].frozen = 0; - n_frozen = i; - - if (isl_tab_detect_redundant(tab) < 0) - return -1; - - c = isl_calloc_type(tab->mat->ctx, struct isl_chamber_list); - if (!c) - goto error; - c->c.vertices = isl_alloc_array(tab->mat->ctx, int, n_vertices); - if (!c->c.vertices) - goto error; - c->c.dom = isl_basic_set_from_basic_map(isl_basic_map_copy(tab->bmap)); - c->c.dom = isl_basic_set_set_rational(c->c.dom); - c->c.dom = isl_basic_set_cow(c->c.dom); - c->c.dom = isl_basic_set_update_from_tab(c->c.dom, tab); - c->c.dom = isl_basic_set_simplify(c->c.dom); - c->c.dom = isl_basic_set_finalize(c->c.dom); - if (!c->c.dom) - goto error; - - c->c.n_vertices = n_vertices; - - for (i = 0, j = 0; i < vertices->n_vertices; ++i) - if (selection[i]) { - c->c.vertices[j] = i; - j++; - } - - c->next = *list; - *list = c; - - for (i = 0; i < n_frozen; ++i) - tab->con[i].frozen = 1; - - if (isl_tab_rollback(tab, snap) < 0) - return -1; - - return 0; -error: - free_chamber_list(c); - return -1; -} - -struct isl_facet_todo { - struct isl_tab *tab; /* A tableau representation of the facet */ - isl_basic_set *bset; /* A normalized basic set representation */ - isl_vec *constraint; /* Constraint pointing to the other side */ - struct isl_facet_todo *next; -}; - -static void free_todo(struct isl_facet_todo *todo) -{ - while (todo) { - struct isl_facet_todo *next = todo->next; - - isl_tab_free(todo->tab); - isl_basic_set_free(todo->bset); - isl_vec_free(todo->constraint); - free(todo); - - todo = next; - } -} - -static struct isl_facet_todo *create_todo(struct isl_tab *tab, int con) -{ - int i; - int n_frozen; - struct isl_tab_undo *snap; - struct isl_facet_todo *todo; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con && tab->con[i].frozen; ++i) - tab->con[i].frozen = 0; - n_frozen = i; - - if (isl_tab_detect_redundant(tab) < 0) - return NULL; - - todo = isl_calloc_type(tab->mat->ctx, struct isl_facet_todo); - if (!todo) - return NULL; - - todo->constraint = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!todo->constraint) - goto error; - isl_seq_neg(todo->constraint->el, tab->bmap->ineq[con], 1 + tab->n_var); - todo->bset = isl_basic_set_from_basic_map(isl_basic_map_copy(tab->bmap)); - todo->bset = isl_basic_set_set_rational(todo->bset); - todo->bset = isl_basic_set_cow(todo->bset); - todo->bset = isl_basic_set_update_from_tab(todo->bset, tab); - todo->bset = isl_basic_set_simplify(todo->bset); - todo->bset = isl_basic_set_sort_constraints(todo->bset); - if (!todo->bset) - goto error; - ISL_F_SET(todo->bset, ISL_BASIC_SET_NORMALIZED); - todo->tab = isl_tab_dup(tab); - if (!todo->tab) - goto error; - - for (i = 0; i < n_frozen; ++i) - tab->con[i].frozen = 1; - - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - return todo; -error: - free_todo(todo); - return NULL; -} - -/* Create todo items for all interior facets of the chamber represented - * by "tab" and collect them in "next". - */ -static int init_todo(struct isl_facet_todo **next, struct isl_tab *tab) -{ - int i; - struct isl_tab_undo *snap; - struct isl_facet_todo *todo; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con; ++i) { - if (tab->con[i].frozen) - continue; - if (tab->con[i].is_redundant) - continue; - - if (isl_tab_select_facet(tab, i) < 0) - return -1; - - todo = create_todo(tab, i); - if (!todo) - return -1; - - todo->next = *next; - *next = todo; - - if (isl_tab_rollback(tab, snap) < 0) - return -1; - } - - return 0; -} - -/* Does the linked list contain a todo item that is the opposite of "todo". - * If so, return 1 and remove the opposite todo item. - */ -static int has_opposite(struct isl_facet_todo *todo, - struct isl_facet_todo **list) -{ - for (; *list; list = &(*list)->next) { - int eq; - eq = isl_basic_set_plain_is_equal(todo->bset, (*list)->bset); - if (eq < 0) - return -1; - if (!eq) - continue; - todo = *list; - *list = todo->next; - todo->next = NULL; - free_todo(todo); - return 1; - } - - return 0; -} - -/* Create todo items for all interior facets of the chamber represented - * by "tab" and collect them in first->next, taking care to cancel - * opposite todo items. - */ -static int update_todo(struct isl_facet_todo *first, struct isl_tab *tab) -{ - int i; - struct isl_tab_undo *snap; - struct isl_facet_todo *todo; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con; ++i) { - int drop; - - if (tab->con[i].frozen) - continue; - if (tab->con[i].is_redundant) - continue; - - if (isl_tab_select_facet(tab, i) < 0) - return -1; - - todo = create_todo(tab, i); - if (!todo) - return -1; - - drop = has_opposite(todo, &first->next); - if (drop < 0) - return -1; - - if (drop) - free_todo(todo); - else { - todo->next = first->next; - first->next = todo; - } - - if (isl_tab_rollback(tab, snap) < 0) - return -1; - } - - return 0; -} - -/* Compute the chamber decomposition of the parametric polytope respresented - * by "bset" given the parametric vertices and their activity domains. - * - * We are only interested in full-dimensional chambers. - * Each of these chambers is the intersection of the activity domains of - * one or more vertices and the union of all chambers is equal to the - * projection of the entire parametric polytope onto the parameter space. - * - * We first create an initial chamber by intersecting as many activity - * domains as possible without ending up with an empty or lower-dimensional - * set. As a minor optimization, we only consider those activity domains - * that contain some arbitrary point. - * - * For each of interior facets of the chamber, we construct a todo item, - * containing the facet and a constraint containing the other side of the facet, - * for constructing the chamber on the other side. - * While their are any todo items left, we pick a todo item and - * create the required chamber by intersecting all activity domains - * that contain the facet and have a full-dimensional intersection with - * the other side of the facet. For each of the interior facets, we - * again create todo items, taking care to cancel opposite todo items. - */ -static __isl_give isl_vertices *compute_chambers(__isl_take isl_basic_set *bset, - __isl_take isl_vertices *vertices) -{ - int i; - isl_ctx *ctx; - isl_vec *sample = NULL; - struct isl_tab *tab = NULL; - struct isl_tab_undo *snap; - unsigned nvar; - int *selection = NULL; - int n_chambers = 0; - struct isl_chamber_list *list = NULL; - struct isl_facet_todo *todo = NULL; - - if (!bset || !vertices) - goto error; - - ctx = isl_vertices_get_ctx(vertices); - selection = isl_alloc_array(ctx, int, vertices->n_vertices); - if (!selection) - goto error; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - bset = isl_basic_set_project_out(bset, isl_dim_set, 0, nvar); - - tab = isl_tab_from_basic_set(bset); - for (i = 0; i < bset->n_ineq; ++i) - if (isl_tab_freeze_constraint(tab, i) < 0) - goto error; - if (isl_tab_track_bset(tab, bset) < 0) - goto error; - - snap = isl_tab_snap(tab); - - sample = isl_tab_get_sample_value(tab); - - for (i = 0; i < vertices->n_vertices; ++i) { - selection[i] = isl_basic_set_contains(vertices->v[i].dom, sample); - if (selection[i] < 0) - goto error; - if (!selection[i]) - continue; - selection[i] = can_intersect(tab, vertices->v[i].dom); - if (selection[i] < 0) - goto error; - } - - if (isl_tab_detect_redundant(tab) < 0) - goto error; - - if (add_chamber(&list, vertices, tab, selection) < 0) - goto error; - n_chambers++; - - if (init_todo(&todo, tab) < 0) - goto error; - - while (todo) { - struct isl_facet_todo *next; - - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - if (isl_tab_add_ineq(tab, todo->constraint->el) < 0) - goto error; - if (isl_tab_freeze_constraint(tab, tab->n_con - 1) < 0) - goto error; - - for (i = 0; i < vertices->n_vertices; ++i) { - selection[i] = bset_covers_tab(vertices->v[i].dom, - todo->tab); - if (selection[i] < 0) - goto error; - if (!selection[i]) - continue; - selection[i] = can_intersect(tab, vertices->v[i].dom); - if (selection[i] < 0) - goto error; - } - - if (isl_tab_detect_redundant(tab) < 0) - goto error; - - if (add_chamber(&list, vertices, tab, selection) < 0) - goto error; - n_chambers++; - - if (update_todo(todo, tab) < 0) - goto error; - - next = todo->next; - todo->next = NULL; - free_todo(todo); - todo = next; - } - - isl_vec_free(sample); - - isl_tab_free(tab); - free(selection); - - vertices = vertices_add_chambers(vertices, n_chambers, list); - - for (i = 0; vertices && i < vertices->n_vertices; ++i) { - isl_basic_set_free(vertices->v[i].dom); - vertices->v[i].dom = NULL; - } - - return vertices; -error: - free_chamber_list(list); - free_todo(todo); - isl_vec_free(sample); - isl_tab_free(tab); - free(selection); - if (!tab) - isl_basic_set_free(bset); - isl_vertices_free(vertices); - return NULL; -} - -isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex) -{ - return vertex ? isl_vertices_get_ctx(vertex->vertices) : NULL; -} - -int isl_vertex_get_id(__isl_keep isl_vertex *vertex) -{ - return vertex ? vertex->id : -1; -} - -__isl_give isl_basic_set *isl_vertex_get_domain(__isl_keep isl_vertex *vertex) -{ - struct isl_vertex *v; - - if (!vertex) - return NULL; - - v = &vertex->vertices->v[vertex->id]; - if (!v->dom) { - unsigned nvar; - nvar = isl_basic_set_dim(v->vertex, isl_dim_set); - v->dom = isl_basic_set_copy(v->vertex); - v->dom = isl_basic_set_project_out(v->dom, isl_dim_set, 0, nvar); - } - - return isl_basic_set_copy(v->dom); -} - -__isl_give isl_basic_set *isl_vertex_get_expr(__isl_keep isl_vertex *vertex) -{ - struct isl_vertex *v; - - if (!vertex) - return NULL; - - v = &vertex->vertices->v[vertex->id]; - - return isl_basic_set_copy(v->vertex); -} - -static __isl_give isl_vertex *isl_vertex_alloc(__isl_take isl_vertices *vertices, - int id) -{ - isl_ctx *ctx; - isl_vertex *vertex; - - if (!vertices) - return NULL; - - ctx = isl_vertices_get_ctx(vertices); - vertex = isl_alloc_type(ctx, isl_vertex); - if (!vertex) - goto error; - - vertex->vertices = vertices; - vertex->id = id; - - return vertex; -error: - isl_vertices_free(vertices); - return NULL; -} - -void isl_vertex_free(__isl_take isl_vertex *vertex) -{ - if (!vertex) - return; - isl_vertices_free(vertex->vertices); - free(vertex); -} - -__isl_give isl_basic_set *isl_basic_set_set_integral(__isl_take isl_basic_set *bset) -{ - if (!bset) - return NULL; - - if (!ISL_F_ISSET(bset, ISL_BASIC_MAP_RATIONAL)) - return bset; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - ISL_F_CLR(bset, ISL_BASIC_MAP_RATIONAL); - - return isl_basic_set_finalize(bset); -} - -isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell) -{ - return cell ? cell->dom->ctx : NULL; -} - -__isl_give isl_basic_set *isl_cell_get_domain(__isl_keep isl_cell *cell) -{ - return cell ? isl_basic_set_copy(cell->dom) : NULL; -} - -static __isl_give isl_cell *isl_cell_alloc(__isl_take isl_vertices *vertices, - __isl_take isl_basic_set *dom, int id) -{ - int i; - isl_cell *cell = NULL; - - if (!vertices || !dom) - goto error; - - cell = isl_calloc_type(dom->ctx, isl_cell); - if (!cell) - goto error; - - cell->n_vertices = vertices->c[id].n_vertices; - cell->ids = isl_alloc_array(dom->ctx, int, cell->n_vertices); - if (!cell->ids) - goto error; - for (i = 0; i < cell->n_vertices; ++i) - cell->ids[i] = vertices->c[id].vertices[i]; - cell->vertices = vertices; - cell->dom = dom; - - return cell; -error: - isl_cell_free(cell); - isl_vertices_free(vertices); - isl_basic_set_free(dom); - return NULL; -} - -void isl_cell_free(__isl_take isl_cell *cell) -{ - if (!cell) - return; - - isl_vertices_free(cell->vertices); - free(cell->ids); - isl_basic_set_free(cell->dom); - free(cell); -} - -/* Create a tableau of the cone obtained by first homogenizing the given - * polytope and then making all inequalities strict by setting the - * constant term to -1. - */ -static struct isl_tab *tab_for_shifted_cone(__isl_keep isl_basic_set *bset) -{ - int i; - isl_vec *c = NULL; - struct isl_tab *tab; - - if (!bset) - return NULL; - tab = isl_tab_alloc(bset->ctx, bset->n_ineq + 1, - 1 + isl_basic_set_total_dim(bset), 0); - if (!tab) - return NULL; - tab->rational = ISL_F_ISSET(bset, ISL_BASIC_SET_RATIONAL); - if (ISL_F_ISSET(bset, ISL_BASIC_MAP_EMPTY)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - - c = isl_vec_alloc(bset->ctx, 1 + 1 + isl_basic_set_total_dim(bset)); - if (!c) - goto error; - - isl_int_set_si(c->el[0], 0); - for (i = 0; i < bset->n_eq; ++i) { - isl_seq_cpy(c->el + 1, bset->eq[i], c->size - 1); - if (isl_tab_add_eq(tab, c->el) < 0) - goto error; - } - - isl_int_set_si(c->el[0], -1); - for (i = 0; i < bset->n_ineq; ++i) { - isl_seq_cpy(c->el + 1, bset->ineq[i], c->size - 1); - if (isl_tab_add_ineq(tab, c->el) < 0) - goto error; - if (tab->empty) { - isl_vec_free(c); - return tab; - } - } - - isl_seq_clr(c->el + 1, c->size - 1); - isl_int_set_si(c->el[1], 1); - if (isl_tab_add_ineq(tab, c->el) < 0) - goto error; - - isl_vec_free(c); - return tab; -error: - isl_vec_free(c); - isl_tab_free(tab); - return NULL; -} - -/* Compute an interior point of "bset" by selecting an interior - * point in homogeneous space and projecting the point back down. - */ -static __isl_give isl_vec *isl_basic_set_interior_point( - __isl_keep isl_basic_set *bset) -{ - isl_vec *vec; - struct isl_tab *tab; - - tab = tab_for_shifted_cone(bset); - vec = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - if (!vec) - return NULL; - - isl_seq_cpy(vec->el, vec->el + 1, vec->size - 1); - vec->size--; - - return vec; -} - -/* Call "fn" on all chambers of the parametric polytope with the shared - * facets of neighboring chambers only appearing in one of the chambers. - * - * We pick an interior point from one of the chambers and then make - * all constraints that do not satisfy this point strict. - */ -int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user) -{ - int i, j; - isl_vec *vec; - isl_int v; - isl_cell *cell; - - if (!vertices) - return -1; - - if (vertices->n_chambers == 0) - return 0; - - if (vertices->n_chambers == 1) { - isl_basic_set *dom = isl_basic_set_copy(vertices->c[0].dom); - dom = isl_basic_set_set_integral(dom); - cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, 0); - if (!cell) - return -1; - return fn(cell, user); - } - - vec = isl_basic_set_interior_point(vertices->c[0].dom); - if (!vec) - return -1; - - isl_int_init(v); - - for (i = 0; i < vertices->n_chambers; ++i) { - int r; - isl_basic_set *dom = isl_basic_set_copy(vertices->c[i].dom); - dom = isl_basic_set_cow(dom); - if (!dom) - goto error; - for (j = 0; i && j < dom->n_ineq; ++j) { - isl_seq_inner_product(vec->el, dom->ineq[j], vec->size, - &v); - if (!isl_int_is_neg(v)) - continue; - isl_int_sub_ui(dom->ineq[j][0], dom->ineq[j][0], 1); - } - dom = isl_basic_set_set_integral(dom); - cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, i); - if (!cell) - goto error; - r = fn(cell, user); - if (r < 0) - goto error; - } - - isl_int_clear(v); - isl_vec_free(vec); - - return 0; -error: - isl_int_clear(v); - isl_vec_free(vec); - return -1; -} - -int isl_vertices_foreach_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user) -{ - int i; - isl_cell *cell; - - if (!vertices) - return -1; - - if (vertices->n_chambers == 0) - return 0; - - for (i = 0; i < vertices->n_chambers; ++i) { - int r; - isl_basic_set *dom = isl_basic_set_copy(vertices->c[i].dom); - - cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, i); - if (!cell) - return -1; - - r = fn(cell, user); - if (r < 0) - return -1; - } - - return 0; -} - -int isl_vertices_foreach_vertex(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user) -{ - int i; - isl_vertex *vertex; - - if (!vertices) - return -1; - - if (vertices->n_vertices == 0) - return 0; - - for (i = 0; i < vertices->n_vertices; ++i) { - int r; - - vertex = isl_vertex_alloc(isl_vertices_copy(vertices), i); - if (!vertex) - return -1; - - r = fn(vertex, user); - if (r < 0) - return -1; - } - - return 0; -} - -int isl_cell_foreach_vertex(__isl_keep isl_cell *cell, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user) -{ - int i; - isl_vertex *vertex; - - if (!cell) - return -1; - - if (cell->n_vertices == 0) - return 0; - - for (i = 0; i < cell->n_vertices; ++i) { - int r; - - vertex = isl_vertex_alloc(isl_vertices_copy(cell->vertices), - cell->ids[i]); - if (!vertex) - return -1; - - r = fn(vertex, user); - if (r < 0) - return -1; - } - - return 0; -} - -isl_ctx *isl_vertices_get_ctx(__isl_keep isl_vertices *vertices) -{ - return vertices ? vertices->bset->ctx : NULL; -} - -int isl_vertices_get_n_vertices(__isl_keep isl_vertices *vertices) -{ - return vertices ? vertices->n_vertices : -1; -} - -__isl_give isl_vertices *isl_morph_vertices(__isl_take isl_morph *morph, - __isl_take isl_vertices *vertices) -{ - int i; - isl_morph *param_morph = NULL; - - if (!morph || !vertices) - goto error; - - isl_assert(vertices->bset->ctx, vertices->ref == 1, goto error); - - param_morph = isl_morph_copy(morph); - param_morph = isl_morph_remove_dom_dims(param_morph, isl_dim_set, - 0, isl_morph_dom_dim(morph, isl_dim_set)); - param_morph = isl_morph_remove_ran_dims(param_morph, isl_dim_set, - 0, isl_morph_ran_dim(morph, isl_dim_set)); - - for (i = 0; i < vertices->n_vertices; ++i) { - vertices->v[i].dom = isl_morph_basic_set( - isl_morph_copy(param_morph), vertices->v[i].dom); - vertices->v[i].vertex = isl_morph_basic_set( - isl_morph_copy(morph), vertices->v[i].vertex); - if (!vertices->v[i].vertex) - goto error; - } - - for (i = 0; i < vertices->n_chambers; ++i) { - vertices->c[i].dom = isl_morph_basic_set( - isl_morph_copy(param_morph), vertices->c[i].dom); - if (!vertices->c[i].dom) - goto error; - } - - isl_morph_free(param_morph); - isl_morph_free(morph); - return vertices; -error: - isl_morph_free(param_morph); - isl_morph_free(morph); - isl_vertices_free(vertices); - return NULL; -} - -/* Construct a simplex isl_cell spanned by the vertices with indices in - * "simplex_ids" and "other_ids" and call "fn" on this isl_cell. - */ -static int call_on_simplex(__isl_keep isl_cell *cell, - int *simplex_ids, int n_simplex, int *other_ids, int n_other, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user) -{ - int i; - isl_ctx *ctx; - struct isl_cell *simplex; - - ctx = isl_cell_get_ctx(cell); - - simplex = isl_calloc_type(ctx, struct isl_cell); - if (!simplex) - return -1; - simplex->vertices = isl_vertices_copy(cell->vertices); - if (!simplex->vertices) - goto error; - simplex->dom = isl_basic_set_copy(cell->dom); - if (!simplex->dom) - goto error; - simplex->n_vertices = n_simplex + n_other; - simplex->ids = isl_alloc_array(ctx, int, simplex->n_vertices); - if (!simplex->ids) - goto error; - - for (i = 0; i < n_simplex; ++i) - simplex->ids[i] = simplex_ids[i]; - for (i = 0; i < n_other; ++i) - simplex->ids[n_simplex + i] = other_ids[i]; - - return fn(simplex, user); -error: - isl_cell_free(simplex); - return -1; -} - -/* Check whether the parametric vertex described by "vertex" - * lies on the facet corresponding to constraint "facet" of "bset". - * The isl_vec "v" is a temporary vector than can be used by this function. - * - * We eliminate the variables from the facet constraint using the - * equalities defining the vertex and check if the result is identical - * to zero. - * - * It would probably be better to keep track of the constraints defining - * a vertex during the vertex construction so that we could simply look - * it up here. - */ -static int vertex_on_facet(__isl_keep isl_basic_set *vertex, - __isl_keep isl_basic_set *bset, int facet, __isl_keep isl_vec *v) -{ - int i; - isl_int m; - - isl_seq_cpy(v->el, bset->ineq[facet], v->size); - - isl_int_init(m); - for (i = 0; i < vertex->n_eq; ++i) { - int k = isl_seq_last_non_zero(vertex->eq[i], v->size); - isl_seq_elim(v->el, vertex->eq[i], k, v->size, &m); - } - isl_int_clear(m); - - return isl_seq_first_non_zero(v->el, v->size) == -1; -} - -/* Triangulate the polytope spanned by the vertices with ids - * in "simplex_ids" and "other_ids" and call "fn" on each of - * the resulting simplices. - * If the input polytope is already a simplex, we simply call "fn". - * Otherwise, we pick a point from "other_ids" and add it to "simplex_ids". - * Then we consider each facet of "bset" that does not contain the point - * we just picked, but does contain some of the other points in "other_ids" - * and call ourselves recursively on the polytope spanned by the new - * "simplex_ids" and those points in "other_ids" that lie on the facet. - */ -static int triangulate(__isl_keep isl_cell *cell, __isl_keep isl_vec *v, - int *simplex_ids, int n_simplex, int *other_ids, int n_other, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user) -{ - int i, j, k; - int d, nparam; - int *ids; - isl_ctx *ctx; - isl_basic_set *vertex; - isl_basic_set *bset; - - ctx = isl_cell_get_ctx(cell); - d = isl_basic_set_dim(cell->vertices->bset, isl_dim_set); - nparam = isl_basic_set_dim(cell->vertices->bset, isl_dim_param); - - if (n_simplex + n_other == d + 1) - return call_on_simplex(cell, simplex_ids, n_simplex, - other_ids, n_other, fn, user); - - simplex_ids[n_simplex] = other_ids[0]; - vertex = cell->vertices->v[other_ids[0]].vertex; - bset = cell->vertices->bset; - - ids = isl_alloc_array(ctx, int, n_other - 1); - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_seq_first_non_zero(bset->ineq[i] + 1 + nparam, d) == -1) - continue; - if (vertex_on_facet(vertex, bset, i, v)) - continue; - - for (j = 1, k = 0; j < n_other; ++j) { - isl_basic_set *ov; - ov = cell->vertices->v[other_ids[j]].vertex; - if (vertex_on_facet(ov, bset, i, v)) - ids[k++] = other_ids[j]; - } - if (k == 0) - continue; - - if (triangulate(cell, v, simplex_ids, n_simplex + 1, - ids, k, fn, user) < 0) - goto error; - } - free(ids); - - return 0; -error: - free(ids); - return -1; -} - -/* Triangulate the given cell and call "fn" on each of the resulting - * simplices. - */ -int isl_cell_foreach_simplex(__isl_take isl_cell *cell, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user) -{ - int d, total; - int r; - isl_ctx *ctx; - isl_vec *v = NULL; - int *simplex_ids = NULL; - - if (!cell) - return -1; - - d = isl_basic_set_dim(cell->vertices->bset, isl_dim_set); - total = isl_basic_set_total_dim(cell->vertices->bset); - - if (cell->n_vertices == d + 1) - return fn(cell, user); - - ctx = isl_cell_get_ctx(cell); - simplex_ids = isl_alloc_array(ctx, int, d + 1); - if (!simplex_ids) - goto error; - - v = isl_vec_alloc(ctx, 1 + total); - if (!v) - goto error; - - r = triangulate(cell, v, simplex_ids, 0, - cell->ids, cell->n_vertices, fn, user); - - isl_vec_free(v); - free(simplex_ids); - - isl_cell_free(cell); - - return r; -error: - free(simplex_ids); - isl_vec_free(v); - isl_cell_free(cell); - return -1; -} diff --git a/cloog-0.16.3/isl/isl_vertices_private.h b/cloog-0.16.3/isl/isl_vertices_private.h deleted file mode 100644 index 7c707fd54929d6f53c89fc07ea52ab70fc596038..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/isl_vertices_private.h +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_morph; - -/* A parametric vertex. "vertex" contains the actual description - * of the vertex as a singleton parametric set. "dom" is the projection - * of "vertex" onto the parameter space, i.e., the activity domain - * of the vertex. - */ -struct isl_vertex { - isl_basic_set *dom; - isl_basic_set *vertex; -}; - -/* A chamber in the chamber decomposition. The indices of the "n_vertices" - * active vertices are stored in "vertices". - */ -struct isl_chamber { - int n_vertices; - int *vertices; - isl_basic_set *dom; -}; - -struct isl_vertices { - int ref; - - /* The rational basic set spanned by the vertices. */ - isl_basic_set *bset; - - int n_vertices; - struct isl_vertex *v; - - int n_chambers; - struct isl_chamber *c; -}; - -struct isl_cell { - int n_vertices; - int *ids; - isl_vertices *vertices; - isl_basic_set *dom; -}; - -struct isl_external_vertex { - isl_vertices *vertices; - int id; -}; - -int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user); -int isl_cell_foreach_simplex(__isl_take isl_cell *cell, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user); - -__isl_give isl_vertices *isl_morph_vertices(__isl_take struct isl_morph *morph, - __isl_take isl_vertices *vertices); - -#if defined(__cplusplus) -} -#endif diff --git a/cloog-0.16.3/isl/ltmain.sh b/cloog-0.16.3/isl/ltmain.sh deleted file mode 100755 index be43f41885153b038acab15db6d55029061980ef..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/ltmain.sh +++ /dev/null @@ -1,8750 +0,0 @@ -# Generated from ltmain.m4sh. - -# libtool (GNU libtool) 2.2.8 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.8 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.2.8 -TIMESTAMP="" -package_revision=1.3169 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL - -$lt_unset CDPATH - - - - - - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} - -# Generated shell functions inserted here. - -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' - -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# // - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1." - exit_cmd=exit -} - -exit_cmd=: - - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -# $mode is unset -nonopt= -execute_dlfiles= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - opt_verbose=false - ;; - - --no-quiet|--no-silent) - preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - opt_verbose=: - ;; - - --no-verbose) preserve_args="$preserve_args $opt" - opt_verbose=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --help-all) opt_help=': help-all' ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - for mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - install_shared_prog="$install_shared_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - echo >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - echo >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_result=`cygpath -w "$1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result= - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_pathlist_tmp1=$func_stripname_result - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - func_to_host_pathlist_result=` - ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_append func_to_host_pathlist_result ";$func_to_host_path_result" - fi - fi - fi - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result"; then - func_error "Could not determine the host path(s) corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_append func_to_host_pathlist_result ";" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - echo ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/cloog-0.16.3/isl/m4/ax_c___attribute__.m4 b/cloog-0.16.3/isl/m4/ax_c___attribute__.m4 deleted file mode 100644 index cf3d62bbdf4f516178bb78563b7a5a04e51bde42..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_c___attribute__.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_c___attribute__.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_C___ATTRIBUTE__ -# -# DESCRIPTION -# -# Provides a test for the compiler support of __attribute__ extensions. -# Defines HAVE___ATTRIBUTE__ if it is found. -# -# LICENSE -# -# Copyright (c) 2008 Stepan Kasal -# Copyright (c) 2008 Christian Haggstrom -# Copyright (c) 2008 Ryan McCabe -# -# 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 . -# -# 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. - -#serial 8 - -AC_DEFUN([AX_C___ATTRIBUTE__], [ - AC_CACHE_CHECK([for __attribute__], [ax_cv___attribute__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - static void foo(void) __attribute__ ((unused)); - static void - foo(void) { - exit(1); - } - ]], [])], - [ax_cv___attribute__=yes], - [ax_cv___attribute__=no] - ) - ]) - if test "$ax_cv___attribute__" = "yes"; then - AC_DEFINE([HAVE___ATTRIBUTE__], 1, [define if your compiler has __attribute__]) - fi -]) diff --git a/cloog-0.16.3/isl/m4/ax_cc_maxopt.m4 b/cloog-0.16.3/isl/m4/ax_cc_maxopt.m4 deleted file mode 100644 index 92d522d86038dd0d986b6454779c307a4abfc710..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_cc_maxopt.m4 +++ /dev/null @@ -1,188 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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) - - # drop to -O1 for gcc 4.2 - $CC --version | - sed -e 's/.* \(@<:@0-9@:>@@<:@0-9@:>@*\)\.\(@<:@0-9@:>@@<:@0-9@:>@*\).*/\1 \2/' | - (read major minor - if test $major -eq 4 -a $minor -eq 2; then - exit 0 - fi - exit 1 - ) && CFLAGS="-O1" - ;; - 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/cloog-0.16.3/isl/m4/ax_check_compiler_flags.m4 b/cloog-0.16.3/isl/m4/ax_check_compiler_flags.m4 deleted file mode 100644 index 7da8324b70fed482e01a7e5c58673f79fa960093..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_check_compiler_flags.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.16.3/isl/m4/ax_compiler_vendor.m4 b/cloog-0.16.3/isl/m4/ax_compiler_vendor.m4 deleted file mode 100644 index 321470697e30e959cbee3cdb35a144ccd008ba71..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_compiler_vendor.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/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 -# 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 . -# -# 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. - -#serial 9 - -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__ clang:__clang__ 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/cloog-0.16.3/isl/m4/ax_create_pkgconfig_info.m4 b/cloog-0.16.3/isl/m4/ax_create_pkgconfig_info.m4 deleted file mode 100644 index 60ac5485023df99d79529ac33abe547672a27de2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_create_pkgconfig_info.m4 +++ /dev/null @@ -1,349 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])] -# -# DESCRIPTION -# -# Defaults: -# -# $1 = $PACKAGE_NAME.pc -# $2 = (empty) -# $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) -# $4 = $PACKAGE_SUMMARY (or $1 Library) -# $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) -# $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) -# -# PACKAGE_NAME defaults to $PACKAGE if not set. -# PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. -# -# The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc -# -# You will find this macro most useful in conjunction with -# ax_spec_defaults that can read good initializers from the .spec file. In -# consequencd, most of the generatable installable stuff can be made from -# information being updated in a single place for the whole project. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2008 Sven Verdoolaege -# -# 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 . -# -# 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_CREATE_PKGCONFIG_INFO],[dnl -AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl -AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl -AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl -AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl -AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -AC_MSG_CHECKING(our pkgconfig libname) -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)" -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="$PACKAGE" -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -AC_MSG_RESULT($PKGCONFIG_libname) - -AC_MSG_CHECKING(our pkgconfig version) -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="${PACKAGE_VERSION}" -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="$VERSION" -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -AC_MSG_RESULT($PKGCONFIG_version) - -AC_MSG_CHECKING(our pkgconfig_libdir) -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -AC_MSG_RESULT($pkgconfig_libdir) -test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && ( -AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir)) -AC_SUBST([pkgconfig_libdir]) - -AC_MSG_CHECKING(our pkgconfig_libfile) -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)" -PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"` -PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"` -AC_MSG_RESULT($pkgconfig_libfile) -test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && ( -AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile)) -AC_SUBST([pkgconfig_libfile]) - -AC_MSG_CHECKING(our package / suffix) -PKGCONFIG_suffix="$program_suffix" -test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix="" -AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix}) - -AC_MSG_CHECKING(our pkgconfig description) -PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)" -test ".$PKGCONFIG_description" != "." || \ -PKGCONFIG_description="$PKGCONFIG_libname Library" -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -AC_MSG_RESULT($PKGCONFIG_description) - -AC_MSG_CHECKING(our pkgconfig requires) -PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)" -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -AC_MSG_RESULT($PKGCONFIG_requires) - -AC_MSG_CHECKING(our pkgconfig ext libs) -PKGCONFIG_pkglibs="$PACKAGE_LIBS" -test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname" -PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)" -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -AC_MSG_RESULT($PKGCONFIG_libs) - -AC_MSG_CHECKING(our pkgconfig cppflags) -PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -AC_MSG_RESULT($PKGCONFIG_cppflags) - -AC_MSG_CHECKING(our pkgconfig ldflags) -PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -AC_MSG_RESULT($PKGCONFIG_ldflags) - -test ".$PKGCONFIG_generate" != "." || \ -PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)" -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && ( -AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate)) - -if test ".$PKGCONFIG_src_libdir" = "." ; then -PKGCONFIG_src_libdir=`pwd` -PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")` -test ! -d $PKGCONFIG_src_libdir/src || \ -PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src" -case ".$objdir" in -*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac -AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir) -fi - -if test ".$PKGCONFIG_src_headers" = "." ; then -PKGCONFIG_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) PKGCONFIG_src_headers="" ;; esac -PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` -test ! -d $PKGCONFIG_src_headers/incl[]ude || \ -PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" -AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers) -fi - - -dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here... -AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[ -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -AC_MSG_NOTICE(creating $pkgconfig_generate.in) -cat > $pkgconfig_generate.in <conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - AC_MSG_ERROR([$pkgconfig_generate is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled -],[ -dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here... -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' -])dnl -AS_VAR_POPDEF([PKGCONFIG_suffix])dnl -AS_VAR_POPDEF([PKGCONFIG_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_libfile])dnl -AS_VAR_POPDEF([PKGCONFIG_libname])dnl -AS_VAR_POPDEF([PKGCONFIG_version])dnl -AS_VAR_POPDEF([PKGCONFIG_description])dnl -AS_VAR_POPDEF([PKGCONFIG_requires])dnl -AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl -AS_VAR_POPDEF([PKGCONFIG_libs])dnl -AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl -AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl -AS_VAR_POPDEF([PKGCONFIG_generate])dnl -AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl -]) diff --git a/cloog-0.16.3/isl/m4/ax_create_stdint_h.m4 b/cloog-0.16.3/isl/m4/ax_create_stdint_h.m4 deleted file mode 100644 index 7b8216599e7a5239e50ce007f02ed46884bd4016..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_create_stdint_h.m4 +++ /dev/null @@ -1,739 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_create_stdint_h.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] -# -# DESCRIPTION -# -# the "ISO C9X: 7.18 Integer types " section requires the -# existence of an include file that defines a set of typedefs, -# especially uint8_t,int32_t,uintptr_t. Many older installations will not -# provide this file, but some will have the very same definitions in -# . In other enviroments we can use the inet-types in -# which would define the typedefs int8_t and u_int8_t -# respectivly. -# -# This macros will create a local "_stdint.h" or the headerfile given as -# an argument. In many cases that file will just "#include " or -# "#include ", while in other environments it will provide the -# set of basic 'stdint's definitions/typedefs: -# -# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t -# int_least32_t.. int_fast32_t.. intmax_t -# -# which may or may not rely on the definitions of other files, or using -# the AC_CHECK_SIZEOF macro to determine the actual sizeof each type. -# -# if your header files require the stdint-types you will want to create an -# installable file mylib-int.h that all your other installable header may -# include. So if you have a library package named "mylib", just use -# -# AX_CREATE_STDINT_H(mylib-int.h) -# -# in configure.ac and go to install that very header file in Makefile.am -# along with the other headers (mylib.h) - and the mylib-specific headers -# can simply use "#include " to obtain the stdint-types. -# -# Remember, if the system already had a valid , the generated -# file will include it directly. No need for fuzzy HAVE_STDINT_H things... -# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99 -# compilation and the c99-mode is not the default. Therefore this macro -# will not use the compiler's stdint.h - please complain to the GCC -# developers). -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Guido U. Draheim -# -# 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 . -# -# 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 Macro 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_DATA_MODEL],[ - AC_CHECK_SIZEOF(char) - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(void*) - ac_cv_char_data_model="" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" - AC_MSG_CHECKING([data model]) - case "$ac_cv_char_data_model/$ac_cv_long_data_model" in - 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; - 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; - 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; - 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; - 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; - 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; - 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; - 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; - 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; - 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; - 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; - 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; - 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; - 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; - 222/*|333/*|444/*|666/*|888/*) : - ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; - *) ac_cv_data_model="none" ; n="very unusual model" ;; - esac - AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) -]) - -dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) -AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ -AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) - do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - done - AC_MSG_CHECKING([for stdint uintptr_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ -AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) - do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - break; - done - AC_MSG_CHECKING([for stdint uint32_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ -AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - break; - done - AC_MSG_CHECKING([for stdint u_int32_t]) - ]) -]) - -AC_DEFUN([AX_CREATE_STDINT_H], -[# ------ AX CREATE STDINT H ------------------------------------- -AC_MSG_CHECKING([for stdint types]) -ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -AC_CACHE_VAL([ac_cv_header_stdint_t],[ -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; ], -[ac_cv_header_stdint_t=""]) -if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then -CFLAGS="-std=c99" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) -fi -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" ]) - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) -elif test "$ac_stdint_h" = "inttypes.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) -elif test "_$ac_cv_header_stdint_t" = "_" ; then - AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - -dnl .....intro message done, now do a few system checks..... -dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, -dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW -dnl instead that is triggered with 3 or more arguments (see types.m4) - -inttype_headers=`echo $2 | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" -AX_CHECK_HEADER_STDINT_X(dnl - stdint.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") - -if test "_$ac_cv_header_stdint_x" = "_" ; then -AX_CHECK_HEADER_STDINT_O(dnl, - inttypes.h sys/inttypes.h stdint.h $inttype_headers, - ac_cv_stdint_result="(seen uint32_t$and64 in $i)") -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then -AX_CHECK_HEADER_STDINT_U(dnl, - sys/types.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") -fi fi - -dnl if there was no good C99 header file, do some typedef checks... -if test "_$ac_cv_header_stdint_x" = "_" ; then - AC_MSG_CHECKING([for stdint datatype model]) - AC_MSG_RESULT([(..)]) - AX_CHECK_DATA_MODEL -fi - -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_x" -elif test "_$ac_cv_header_stdint_o" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_o" -elif test "_$ac_cv_header_stdint_u" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_u" -else - ac_cv_header_stdint="stddef.h" -fi - -AC_MSG_CHECKING([for extra inttypes in chosen header]) -AC_MSG_RESULT([($ac_cv_header_stdint)]) -dnl see if int_least and int_fast types are present in _this_ header. -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) -AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) -AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) - -fi # shortcircut to system "stdint.h" -# ------------------ PREPARE VARIABLES ------------------------------ -if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` -else -ac_cv_stdint_message="using $CC" -fi - -AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl -$ac_cv_stdint_result]) - -dnl ----------------------------------------------------------------- -# ----------------- DONE inttypes.h checks START header ------------- -AC_CONFIG_COMMANDS([$ac_stdint_h],[ -AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) -ac_stdint=$tmp/_stdint.h - -echo "#ifndef" $_ac_stdint_h >$ac_stdint -echo "#define" $_ac_stdint_h "1" >>$ac_stdint -echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint -echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint -echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint -if test "_$ac_cv_header_stdint_t" != "_" ; then -echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint -echo "#include " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_header="$ac_cv_header_stdint_x" - echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint -fi - -echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_o" != "_" ; then - ac_header="$ac_cv_header_stdint_o" - echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint -fi - -echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint -if test "_$ac_cv_header_stdint_u" != "_" ; then - ac_header="$ac_cv_header_stdint_u" - echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint -fi - -echo "" >>$ac_stdint - -if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then - echo "#include <$ac_header>" >>$ac_stdint - echo "" >>$ac_stdint -fi fi - -echo "/* which 64bit typedef has been found */" >>$ac_stdint -if test "$ac_cv_type_uint64_t" = "yes" ; then -echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint -fi -if test "$ac_cv_type_u_int64_t" = "yes" ; then -echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* which type model has been detected */" >>$ac_stdint -if test "_$ac_cv_char_data_model" != "_" ; then -echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint -echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* whether int_least types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_least32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint -fi -echo "/* whether int_fast types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_fast32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint -fi -echo "/* whether intmax_t type was detected */" >>$ac_stdint -if test "$ac_cv_type_intmax_t" = "yes"; then -echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 199901L -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; - -#elif !defined __STRICT_ANSI__ -#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ -#define _HAVE_UINT64_T -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ -/* note: all ELF-systems seem to have loff-support which needs 64-bit */ -#if !defined _NO_LONGLONG -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; -#endif - -#elif defined __alpha || (defined __mips && defined _ABIN32) -#if !defined _NO_LONGLONG -typedef long int64_t; -typedef unsigned long uint64_t; -#endif - /* compiler/cpu type to define int64_t */ -#endif -#endif -#endif - -#if defined _STDINT_HAVE_U_INT_TYPES -/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ -typedef u_int8_t uint8_t; -typedef u_int16_t uint16_t; -typedef u_int32_t uint32_t; - -/* glibc compatibility */ -#ifndef __int8_t_defined -#define __int8_t_defined -#endif -#endif - -#ifdef _STDINT_NEED_INT_MODEL_T -/* we must guess all the basic types. Apart from byte-adressable system, */ -/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ -/* (btw, those nibble-addressable systems are way off, or so we assume) */ - -dnl /* have a look at "64bit and data size neutrality" at */ -dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ -dnl /* (the shorthand "ILP" types always have a "P" part) */ - -#if defined _STDINT_BYTE_MODEL -#if _STDINT_LONG_MODEL+0 == 242 -/* 2:4:2 = IP16 = a normal 16-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef long int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 -/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ -/* 4:4:4 = ILP32 = a normal 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 -/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ -/* 4:8:8 = LP64 = a normal 64-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* this system has a "long" of 64bit */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -typedef unsigned long uint64_t; -typedef long int64_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 448 -/* LLP64 a 64-bit system derived from a 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* assuming the system has a "long long" */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif -#else -#define _STDINT_NO_INT32_T -#endif -#else -#define _STDINT_NO_INT8_T -#define _STDINT_NO_INT32_T -#endif -#endif - -/* - * quote from SunOS-5.8 sys/inttypes.h: - * Use at your own risk. As of February 1996, the committee is squarely - * behind the fixed sized types; the "least" and "fast" types are still being - * discussed. The probability that the "fast" types may be removed before - * the standard is finalized is high enough that they are not currently - * implemented. - */ - -#if defined _STDINT_NEED_INT_LEAST_T -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_least64_t; -#endif - -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_least64_t; -#endif - /* least types */ -#endif - -#if defined _STDINT_NEED_INT_FAST_T -typedef int8_t int_fast8_t; -typedef int int_fast16_t; -typedef int32_t int_fast32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_fast64_t; -#endif - -typedef uint8_t uint_fast8_t; -typedef unsigned uint_fast16_t; -typedef uint32_t uint_fast32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_fast64_t; -#endif - /* fast types */ -#endif - -#ifdef _STDINT_NEED_INTMAX_T -#ifdef _HAVE_UINT64_T -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; -#else -typedef long intmax_t; -typedef unsigned long uintmax_t; -#endif -#endif - -#ifdef _STDINT_NEED_INTPTR_T -#ifndef __intptr_t_defined -#define __intptr_t_defined -/* we encourage using "long" to store pointer values, never use "int" ! */ -#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 -typedef unsigned int uintptr_t; -typedef int intptr_t; -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 -typedef unsigned long uintptr_t; -typedef long intptr_t; -#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T -typedef uint64_t uintptr_t; -typedef int64_t intptr_t; -#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ -typedef unsigned long uintptr_t; -typedef long intptr_t; -#endif -#endif -#endif - -/* The ISO C99 standard specifies that in C++ implementations these - should only be defined if explicitly requested. */ -#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS -#ifndef UINT32_C - -/* Signed. */ -# define INT8_C(c) c -# define INT16_C(c) c -# define INT32_C(c) c -# ifdef _HAVE_LONGLONG_UINT64_T -# define INT64_C(c) c ## L -# else -# define INT64_C(c) c ## LL -# endif - -/* Unsigned. */ -# define UINT8_C(c) c ## U -# define UINT16_C(c) c ## U -# define UINT32_C(c) c ## U -# ifdef _HAVE_LONGLONG_UINT64_T -# define UINT64_C(c) c ## UL -# else -# define UINT64_C(c) c ## ULL -# endif - -/* Maximal type. */ -# ifdef _HAVE_LONGLONG_UINT64_T -# define INTMAX_C(c) c ## L -# define UINTMAX_C(c) c ## UL -# else -# define INTMAX_C(c) c ## LL -# define UINTMAX_C(c) c ## ULL -# endif - - /* literalnumbers */ -#endif -#endif - -/* These limits are merily those of a two complement byte-oriented system */ - -/* Minimum of signed integral types. */ -# define INT8_MIN (-128) -# define INT16_MIN (-32767-1) -# define INT32_MIN (-2147483647-1) -#ifndef INT64_MIN -# define INT64_MIN (-__INT64_C(9223372036854775807)-1) -#endif -/* Maximum of signed integral types. */ -# define INT8_MAX (127) -# define INT16_MAX (32767) -# define INT32_MAX (2147483647) -#ifndef INT64_MAX -# define INT64_MAX (__INT64_C(9223372036854775807)) -#endif - -/* Maximum of unsigned integral types. */ -#ifndef UINT8_MAX -# define UINT8_MAX (255) -#endif -#ifndef UINT16_MAX -# define UINT16_MAX (65535) -#endif -# define UINT32_MAX (4294967295U) -#ifndef UINT64_MAX -# define UINT64_MAX (__UINT64_C(18446744073709551615)) -#endif - -/* Minimum of signed integral types having a minimum size. */ -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST64_MIN INT64_MIN -/* Maximum of signed integral types having a minimum size. */ -# define INT_LEAST8_MAX INT8_MAX -# define INT_LEAST16_MAX INT16_MAX -# define INT_LEAST32_MAX INT32_MAX -# define INT_LEAST64_MAX INT64_MAX - -/* Maximum of unsigned integral types having a minimum size. */ -# define UINT_LEAST8_MAX UINT8_MAX -# define UINT_LEAST16_MAX UINT16_MAX -# define UINT_LEAST32_MAX UINT32_MAX -# define UINT_LEAST64_MAX UINT64_MAX - - /* shortcircuit*/ -#endif - /* once */ -#endif -#endif -STDINT_EOF -fi - if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then - AC_MSG_NOTICE([$ac_stdint_h is unchanged]) - else - ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi -],[# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) -ac_cv_stdint_message="$ac_cv_stdint_message" -ac_cv_header_stdint_t="$ac_cv_header_stdint_t" -ac_cv_header_stdint_x="$ac_cv_header_stdint_x" -ac_cv_header_stdint_o="$ac_cv_header_stdint_o" -ac_cv_header_stdint_u="$ac_cv_header_stdint_u" -ac_cv_type_uint64_t="$ac_cv_type_uint64_t" -ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" -ac_cv_char_data_model="$ac_cv_char_data_model" -ac_cv_long_data_model="$ac_cv_long_data_model" -ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" -ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" -ac_cv_type_intmax_t="$ac_cv_type_intmax_t" -]) -]) diff --git a/cloog-0.16.3/isl/m4/ax_detect_git_head.m4 b/cloog-0.16.3/isl/m4/ax_detect_git_head.m4 deleted file mode 100644 index d585983510a8bdee5f6163f7f8028942a4ba73d1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_detect_git_head.m4 +++ /dev/null @@ -1,27 +0,0 @@ -AC_DEFUN([AX_DETECT_GIT_HEAD], [ - AC_SUBST(GIT_HEAD_ID) - AC_SUBST(GIT_HEAD) - AC_SUBST(GIT_HEAD_VERSION) - if test -f $srcdir/.git/HEAD; then - GIT_HEAD="$srcdir/.git/index" - GIT_REPO="$srcdir/.git" - GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe` - elif test -f $srcdir/GIT_HEAD_ID; then - GIT_HEAD_ID=`cat $srcdir/GIT_HEAD_ID` - else - mysrcdir=`(cd $srcdir; pwd)` - head=`basename $mysrcdir | sed -e 's/.*-//'` - head2=`echo $head | sed -e 's/[^0-9a-f]//'` - head3=`echo $head2 | sed -e 's/........................................//'` - if test "x$head3" = "x" -a "x$head" = "x$head2"; then - GIT_HEAD_ID="$head" - else - GIT_HEAD_ID="UNKNOWN" - fi - fi - if test -z "$GIT_REPO" ; then - GIT_HEAD_VERSION="$GIT_HEAD_ID" - else - GIT_HEAD_VERSION="\`GIT_DIR=$GIT_REPO git describe\`" - fi -]) diff --git a/cloog-0.16.3/isl/m4/ax_gcc_archflag.m4 b/cloog-0.16.3/isl/m4/ax_gcc_archflag.m4 deleted file mode 100644 index dedeef424e945cbd57dc69f45a7860210c4b7b9c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_gcc_archflag.m4 +++ /dev/null @@ -1,213 +0,0 @@ -# =========================================================================== -# 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= 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 -# 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 . -# -# 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=], [use architecture 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/cloog-0.16.3/isl/m4/ax_gcc_warn_unused_result.m4 b/cloog-0.16.3/isl/m4/ax_gcc_warn_unused_result.m4 deleted file mode 100644 index a957f8f9eaf96bcc2c318f8e22eb3478f412fc57..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_gcc_warn_unused_result.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_gcc_warn_unused_result.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_WARN_UNUSED_RESULT -# -# DESCRIPTION -# -# The macro will compile a test program to see whether the compiler does -# understand the per-function postfix pragma. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# -# 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 . -# -# 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_WARN_UNUSED_RESULT],[dnl -AC_CACHE_CHECK( - [whether the compiler supports function __attribute__((__warn_unused_result__))], - ax_cv_gcc_warn_unused_result,[ - AC_TRY_COMPILE([__attribute__((__warn_unused_result__)) - int f(int i) { return i; }], - [], - ax_cv_gcc_warn_unused_result=yes, ax_cv_gcc_warn_unused_result=no)]) - if test "$ax_cv_gcc_warn_unused_result" = yes; then - AC_DEFINE([GCC_WARN_UNUSED_RESULT],[__attribute__((__warn_unused_result__))], - [most gcc compilers know a function __attribute__((__warn_unused_result__))]) - fi -]) diff --git a/cloog-0.16.3/isl/m4/ax_gcc_x86_cpuid.m4 b/cloog-0.16.3/isl/m4/ax_gcc_x86_cpuid.m4 deleted file mode 100644 index 5420b095900a37f43dd9835934b532e05c6b3f6e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_gcc_x86_cpuid.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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 ], [ - 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/cloog-0.16.3/isl/m4/ax_set_warning_flags.m4 b/cloog-0.16.3/isl/m4/ax_set_warning_flags.m4 deleted file mode 100644 index c64ad7d8478b0cb4340ef8301a75233cbb9c8f94..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_set_warning_flags.m4 +++ /dev/null @@ -1,17 +0,0 @@ -dnl Add a set of flags to WARNING_FLAGS, that enable compiler warnings for -dnl isl. The warnings that are enabled vary with the compiler and only include -dnl warnings that did not trigger at the time of adding these flags. -AC_DEFUN([AX_SET_WARNING_FLAGS],[dnl - AX_COMPILER_VENDOR - - WARNING_FLAGS="" - - if test "${ax_cv_c_compiler_vendor}" = "clang"; then - dnl isl is at the moment clean of -Wall warnings. If clang adds - dnl new warnings to -Wall which cause false positives, the - dnl specific warning types will be disabled explicitally (by - dnl adding for example -Wno-return-type). To temporarily disable - dnl all warnings run configure with CFLAGS=-Wno-all. - WARNING_FLAGS="-Wall" - fi -]) diff --git a/cloog-0.16.3/isl/m4/ax_submodule.m4 b/cloog-0.16.3/isl/m4/ax_submodule.m4 deleted file mode 100644 index 7cf899576d79317e74f3303fd2acbf66e7313840..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ax_submodule.m4 +++ /dev/null @@ -1,71 +0,0 @@ -AC_DEFUN([AX_SUBMODULE], -[ - -m4_if(m4_bregexp($2,|,choice),choice, - [AC_ARG_WITH($1, - [AS_HELP_STRING([--with-$1=$2], - [Which $1 to use [default=$3]])])]) -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 -m4_if(m4_bregexp($2,build,build),build, - [AC_ARG_WITH($1_builddir, - [AS_HELP_STRING([--with-$1-builddir=DIR], - [Location of $1 builddir])])]) -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" != "xyes" -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" != "xyes" -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 -if test "x$with_$1_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_$1_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_$1" in -$2) - ;; -*) - case "$3" in - bundled) - 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; then - with_$1="bundled" - else - with_$1="no" - fi - ;; - *) - with_$1="$3" - ;; - esac - ;; -esac -AC_MSG_CHECKING([which $1 to use]) -AC_MSG_RESULT($with_$1) - -]) diff --git a/cloog-0.16.3/isl/m4/libtool.m4 b/cloog-0.16.3/isl/m4/libtool.m4 deleted file mode 100644 index 22924a86f47d92afd9dd5344b7a5b61a4346f2dc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/libtool.m4 +++ /dev/null @@ -1,7437 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/cloog-0.16.3/isl/m4/ltoptions.m4 b/cloog-0.16.3/isl/m4/ltoptions.m4 deleted file mode 100644 index 17cfd51c0b34ed2f118b8b5d4d28947889eec9c3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ltoptions.m4 +++ /dev/null @@ -1,369 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/cloog-0.16.3/isl/m4/ltsugar.m4 b/cloog-0.16.3/isl/m4/ltsugar.m4 deleted file mode 100644 index 9000a057d31ddf75cb85ccda8757de4493bcdbe7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/cloog-0.16.3/isl/m4/ltversion.m4 b/cloog-0.16.3/isl/m4/ltversion.m4 deleted file mode 100644 index 2e8f9292580e3125c215fbeb3870bee1db80bd2d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3169 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.8]) -m4_define([LT_PACKAGE_REVISION], [1.3169]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.8' -macro_revision='1.3169' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/cloog-0.16.3/isl/m4/lt~obsolete.m4 b/cloog-0.16.3/isl/m4/lt~obsolete.m4 deleted file mode 100644 index c573da90c5ccebffba4dce9a6462036bfa986d5f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/m4/lt~obsolete.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/cloog-0.16.3/isl/missing b/cloog-0.16.3/isl/missing deleted file mode 100755 index 1c8ff7049d8f3aaa9741c53e7f3145d9b76a77d8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/cloog-0.16.3/isl/mp_get_memory_functions.c b/cloog-0.16.3/isl/mp_get_memory_functions.c deleted file mode 100644 index e14e336ceb681ff5518a5ed6806d588109b7a46e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/mp_get_memory_functions.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)) -{ - if (alloc_func_ptr) - *alloc_func_ptr = __gmp_allocate_func; - if (realloc_func_ptr) - *realloc_func_ptr = __gmp_reallocate_func; - if (free_func_ptr) - *free_func_ptr = __gmp_free_func; -} diff --git a/cloog-0.16.3/isl/pip.c b/cloog-0.16.3/isl/pip.c deleted file mode 100644 index 0d85f3a6f0a5a169df29583ba4cadc2a897c6458..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/pip.c +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include "isl_tab.h" -#include "isl_sample.h" -#include "isl_scan.h" -#include -#include -#include - -/* The input of this program is the same as that of the "example" program - * from the PipLib distribution, except that the "big parameter column" - * should always be -1. - * - * Context constraints in PolyLib format - * -1 - * Problem constraints in PolyLib format - * Optional list of options - * - * The options are - * Maximize compute maximum instead of minimum - * Rational compute rational optimum instead of integer optimum - * Urs_parms don't assume parameters are non-negative - * Urs_unknowns don't assume unknowns are non-negative - */ - -struct options { - struct isl_options *isl; - unsigned verify; -}; - -struct isl_arg options_arg[] = { -ISL_ARG_CHILD(struct options, isl, "isl", isl_options_arg, "isl options") -ISL_ARG_BOOL(struct options, verify, 'T', "verify", 0, NULL) -ISL_ARG_END -}; - -ISL_ARG_DEF(options, struct options, options_arg) - -static __isl_give isl_basic_set *set_bounds(__isl_take isl_basic_set *bset) -{ - unsigned nparam; - int i, r; - isl_point *pt, *pt2; - isl_basic_set *box; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - r = nparam >= 8 ? 4 : nparam >= 5 ? 6 : 30; - - pt = isl_basic_set_sample_point(isl_basic_set_copy(bset)); - pt2 = isl_point_copy(pt); - - for (i = 0; i < nparam; ++i) { - pt = isl_point_add_ui(pt, isl_dim_param, i, r); - pt2 = isl_point_sub_ui(pt2, isl_dim_param, i, r); - } - - box = isl_basic_set_box_from_points(pt, pt2); - - return isl_basic_set_intersect(bset, box); -} - -static struct isl_basic_set *to_parameter_domain(struct isl_basic_set *context) -{ - return isl_basic_set_move_dims(context, isl_dim_param, 0, isl_dim_set, 0, - isl_basic_set_dim(context, isl_dim_set)); -} - -isl_basic_set *plug_in_parameters(isl_basic_set *bset, struct isl_vec *params) -{ - int i; - - for (i = 0; i < params->size - 1; ++i) - bset = isl_basic_set_fix(bset, - isl_dim_param, i, params->el[1 + i]); - - bset = isl_basic_set_remove_dims(bset, - isl_dim_param, 0, params->size - 1); - - isl_vec_free(params); - - return bset; -} - -isl_set *set_plug_in_parameters(isl_set *set, struct isl_vec *params) -{ - int i; - - for (i = 0; i < params->size - 1; ++i) - set = isl_set_fix(set, isl_dim_param, i, params->el[1 + i]); - - set = isl_set_remove_dims(set, isl_dim_param, 0, params->size - 1); - - isl_vec_free(params); - - return set; -} - -/* Compute the lexicographically minimal (or maximal if max is set) - * element of bset for the given values of the parameters, by - * successively solving an ilp problem in each direction. - */ -struct isl_vec *opt_at(struct isl_basic_set *bset, - struct isl_vec *params, int max) -{ - unsigned dim; - struct isl_vec *opt; - struct isl_vec *obj; - int i; - - dim = isl_basic_set_dim(bset, isl_dim_set); - - bset = plug_in_parameters(bset, params); - - if (isl_basic_set_plain_is_empty(bset)) { - opt = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - return opt; - } - - opt = isl_vec_alloc(bset->ctx, 1 + dim); - assert(opt); - - obj = isl_vec_alloc(bset->ctx, 1 + dim); - assert(obj); - - isl_int_set_si(opt->el[0], 1); - isl_int_set_si(obj->el[0], 0); - - for (i = 0; i < dim; ++i) { - enum isl_lp_result res; - - isl_seq_clr(obj->el + 1, dim); - isl_int_set_si(obj->el[1 + i], 1); - res = isl_basic_set_solve_ilp(bset, max, obj->el, - &opt->el[1 + i], NULL); - if (res == isl_lp_empty) - goto empty; - assert(res == isl_lp_ok); - bset = isl_basic_set_fix(bset, isl_dim_set, i, opt->el[1 + i]); - } - - isl_basic_set_free(bset); - isl_vec_free(obj); - - return opt; -empty: - isl_vec_free(opt); - opt = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - isl_vec_free(obj); - - return opt; -} - -struct isl_scan_pip { - struct isl_scan_callback callback; - isl_basic_set *bset; - isl_set *sol; - isl_set *empty; - int stride; - int n; - int max; -}; - -/* Check if the "manually" computed optimum of bset at the "sample" - * values of the parameters agrees with the solution of pilp problem - * represented by the pair (sol, empty). - * In particular, if there is no solution for this value of the parameters, - * then it should be an element of the parameter domain "empty". - * Otherwise, the optimal solution, should be equal to the result of - * plugging in the value of the parameters in "sol". - */ -static int scan_one(struct isl_scan_callback *callback, - __isl_take isl_vec *sample) -{ - struct isl_scan_pip *sp = (struct isl_scan_pip *)callback; - struct isl_vec *opt; - - sp->n--; - - opt = opt_at(isl_basic_set_copy(sp->bset), isl_vec_copy(sample), sp->max); - assert(opt); - - if (opt->size == 0) { - isl_point *sample_pnt; - sample_pnt = isl_point_alloc(isl_set_get_dim(sp->empty), sample); - assert(isl_set_contains_point(sp->empty, sample_pnt)); - isl_point_free(sample_pnt); - isl_vec_free(opt); - } else { - isl_set *sol; - isl_set *opt_set; - opt_set = isl_set_from_basic_set(isl_basic_set_from_vec(opt)); - sol = set_plug_in_parameters(isl_set_copy(sp->sol), sample); - assert(isl_set_is_equal(opt_set, sol)); - isl_set_free(sol); - isl_set_free(opt_set); - } - - if (!(sp->n % sp->stride)) { - printf("o"); - fflush(stdout); - } - - return sp->n >= 1 ? 0 : -1; -} - -static void check_solution(isl_basic_set *bset, isl_basic_set *context, - isl_set *sol, isl_set *empty, int max) -{ - struct isl_scan_pip sp; - isl_int count, count_max; - int i, n; - int r; - - context = set_bounds(context); - context = isl_basic_set_underlying_set(context); - - isl_int_init(count); - isl_int_init(count_max); - - isl_int_set_si(count_max, 2000); - r = isl_basic_set_count_upto(context, count_max, &count); - assert(r >= 0); - n = isl_int_get_si(count); - - isl_int_clear(count_max); - isl_int_clear(count); - - sp.callback.add = scan_one; - sp.bset = bset; - sp.sol = sol; - sp.empty = empty; - sp.n = n; - sp.stride = n > 70 ? 1 + (n + 1)/70 : 1; - sp.max = max; - - for (i = 0; i < n; i += sp.stride) - printf("."); - printf("\r"); - fflush(stdout); - - isl_basic_set_scan(context, &sp.callback); - - printf("\n"); - - isl_basic_set_free(bset); -} - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx; - struct isl_basic_set *context, *bset, *copy, *context_copy; - struct isl_set *set; - struct isl_set *empty; - int neg_one; - char s[1024]; - int urs_parms = 0; - int urs_unknowns = 0; - int max = 0; - int rational = 0; - int n; - struct options *options; - - options = options_new_with_defaults(); - assert(options); - argc = options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(options_arg, options); - - context = isl_basic_set_read_from_file(ctx, stdin, 0); - assert(context); - n = fscanf(stdin, "%d", &neg_one); - assert(n == 1); - assert(neg_one == -1); - bset = isl_basic_set_read_from_file(ctx, stdin, - isl_basic_set_dim(context, isl_dim_set)); - - while (fgets(s, sizeof(s), stdin)) { - if (strncasecmp(s, "Maximize", 8) == 0) - max = 1; - if (strncasecmp(s, "Rational", 8) == 0) { - rational = 1; - bset = isl_basic_set_set_rational(bset); - } - if (strncasecmp(s, "Urs_parms", 9) == 0) - urs_parms = 1; - if (strncasecmp(s, "Urs_unknowns", 12) == 0) - urs_unknowns = 1; - } - if (!urs_parms) - context = isl_basic_set_intersect(context, - isl_basic_set_positive_orthant(isl_basic_set_get_dim(context))); - context = to_parameter_domain(context); - if (!urs_unknowns) - bset = isl_basic_set_intersect(bset, - isl_basic_set_positive_orthant(isl_basic_set_get_dim(bset))); - - if (options->verify) { - copy = isl_basic_set_copy(bset); - context_copy = isl_basic_set_copy(context); - } - - if (max) - set = isl_basic_set_partial_lexmax(bset, context, &empty); - else - set = isl_basic_set_partial_lexmin(bset, context, &empty); - - if (options->verify) { - assert(!rational); - check_solution(copy, context_copy, set, empty, max); - } else { - isl_set_print(set, stdout, 0, ISL_FORMAT_ISL); - fprintf(stdout, "\n"); - fprintf(stdout, "no solution: "); - isl_set_print(empty, stdout, 0, ISL_FORMAT_ISL); - fprintf(stdout, "\n"); - } - - isl_set_free(set); - isl_set_free(empty); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.16.3/isl/pip_test.sh.in b/cloog-0.16.3/isl/pip_test.sh.in deleted file mode 100755 index cdc5fb97085e443821d63274bbc00f08fbfa3dd3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/pip_test.sh.in +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -EXEEXT=@EXEEXT@ - -PIP_TESTS="\ - boulet.pip \ - brisebarre.pip \ - cg1.pip \ - esced.pip \ - ex2.pip \ - ex.pip \ - fimmel.pip \ - max.pip \ - negative.pip \ - seghir-vd.pip \ - small.pip \ - sor1d.pip \ - square.pip \ - sven.pip \ - tobi.pip" - -for i in $PIP_TESTS; do - echo $i; - ./isl_pip$EXEEXT --context=gbr -T < $srcdir/test_inputs/$i || exit - ./isl_pip$EXEEXT --context=lexmin -T < $srcdir/test_inputs/$i || exit -done diff --git a/cloog-0.16.3/isl/polyhedron_detect_equalities.c b/cloog-0.16.3/isl/polyhedron_detect_equalities.c deleted file mode 100644 index 9acea325278549007b43f062a6fdb41b86ad3913..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/polyhedron_detect_equalities.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - - bset = isl_basic_set_read_from_file(ctx, stdin, 0); - bset = isl_basic_set_detect_equalities(bset); - isl_basic_set_print(bset, stdout, 0, "", "", ISL_FORMAT_POLYLIB); - isl_basic_set_free(bset); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.16.3/isl/polyhedron_minimize.c b/cloog-0.16.3/isl/polyhedron_minimize.c deleted file mode 100644 index f6c2dc95f33180dc1ef07ea0cd9614aa8ada5e0a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/polyhedron_minimize.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include - -/* The input of this program is the same as that of the "polytope_minimize" - * program from the barvinok distribution. - * - * Constraints of set is PolyLib format. - * Linear or affine objective function in PolyLib format. - */ - -static struct isl_vec *isl_vec_lin_to_aff(struct isl_vec *vec) -{ - struct isl_vec *aff; - - if (!vec) - return NULL; - aff = isl_vec_alloc(vec->ctx, 1 + vec->size); - if (!aff) - goto error; - isl_int_set_si(aff->el[0], 0); - isl_seq_cpy(aff->el + 1, vec->el, vec->size); - isl_vec_free(vec); - return aff; -error: - isl_vec_free(vec); - return NULL; -} - -/* Rotate elements of vector right. - * In particular, move the constant term from the end of the - * vector to the start of the vector. - */ -static struct isl_vec *vec_ror(struct isl_vec *vec) -{ - int i; - - if (!vec) - return NULL; - for (i = vec->size - 2; i >= 0; --i) - isl_int_swap(vec->el[i], vec->el[i + 1]); - return vec; -} - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - struct isl_vec *obj; - struct isl_vec *sol; - isl_int opt; - unsigned dim; - enum isl_lp_result res; - isl_printer *p; - - isl_int_init(opt); - bset = isl_basic_set_read_from_file(ctx, stdin, 0); - assert(bset); - obj = isl_vec_read_from_file(ctx, stdin); - assert(obj); - dim = isl_basic_set_total_dim(bset); - assert(obj->size >= dim && obj->size <= dim + 1); - if (obj->size != dim + 1) - obj = isl_vec_lin_to_aff(obj); - else - obj = vec_ror(obj); - res = isl_basic_set_solve_ilp(bset, 0, obj->el, &opt, &sol); - switch (res) { - case isl_lp_error: - fprintf(stderr, "error\n"); - return -1; - case isl_lp_empty: - fprintf(stdout, "empty\n"); - break; - case isl_lp_unbounded: - fprintf(stdout, "unbounded\n"); - break; - case isl_lp_ok: - p = isl_printer_to_file(ctx, stdout); - p = isl_printer_print_vec(p, sol); - p = isl_printer_end_line(p); - p = isl_printer_print_isl_int(p, opt); - p = isl_printer_end_line(p); - isl_printer_free(p); - } - isl_basic_set_free(bset); - isl_vec_free(obj); - isl_vec_free(sol); - isl_ctx_free(ctx); - isl_int_clear(opt); - - return 0; -} diff --git a/cloog-0.16.3/isl/polyhedron_sample.c b/cloog-0.16.3/isl/polyhedron_sample.c deleted file mode 100644 index 05b343b1c5b37220efab3ee88f6503fd9142f392..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/polyhedron_sample.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_sample.h" -#include - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - struct isl_vec *sample; - isl_printer *p; - - bset = isl_basic_set_read_from_file(ctx, stdin, 0); - sample = isl_basic_set_sample_vec(isl_basic_set_copy(bset)); - p = isl_printer_to_file(ctx, stdout); - p = isl_printer_print_vec(p, sample); - p = isl_printer_end_line(p); - isl_printer_free(p); - assert(sample); - if (sample->size > 0) - assert(isl_basic_set_contains(bset, sample)); - isl_basic_set_free(bset); - isl_vec_free(sample); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.16.3/isl/polytope_scan.c b/cloog-0.16.3/isl/polytope_scan.c deleted file mode 100644 index 60ac3e50e4eaf0912fe36f0a0ac69e39e5eb84e2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/polytope_scan.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_equalities.h" -#include -#include "isl_scan.h" -#include - -/* The input of this program is the same as that of the "polytope_scan" - * program from the barvinok distribution. - * - * Constraints of set is PolyLib format. - * - * The input set is assumed to be bounded. - */ - -struct scan_samples { - struct isl_scan_callback callback; - struct isl_mat *samples; -}; - -static int scan_samples_add_sample(struct isl_scan_callback *cb, - __isl_take isl_vec *sample) -{ - struct scan_samples *ss = (struct scan_samples *)cb; - - ss->samples = isl_mat_extend(ss->samples, ss->samples->n_row + 1, - ss->samples->n_col); - if (!ss->samples) - goto error; - - isl_seq_cpy(ss->samples->row[ss->samples->n_row - 1], - sample->el, sample->size); - - isl_vec_free(sample); - return 0; -error: - isl_vec_free(sample); - return -1; -} - -static struct isl_mat *isl_basic_set_scan_samples(struct isl_basic_set *bset) -{ - isl_ctx *ctx; - unsigned dim; - struct scan_samples ss; - - ctx = isl_basic_set_get_ctx(bset); - dim = isl_basic_set_total_dim(bset); - ss.callback.add = scan_samples_add_sample; - ss.samples = isl_mat_alloc(ctx, 0, 1 + dim); - if (!ss.samples) - goto error; - - if (isl_basic_set_scan(bset, &ss.callback) < 0) { - isl_mat_free(ss.samples); - return NULL; - } - - return ss.samples; -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_mat *isl_basic_set_samples(struct isl_basic_set *bset) -{ - struct isl_mat *T; - struct isl_mat *samples; - - if (!bset) - return NULL; - - if (bset->n_eq == 0) - return isl_basic_set_scan_samples(bset); - - bset = isl_basic_set_remove_equalities(bset, &T, NULL); - samples = isl_basic_set_scan_samples(bset); - return isl_mat_product(samples, isl_mat_transpose(T)); -} - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - struct isl_mat *samples; - - bset = isl_basic_set_read_from_file(ctx, stdin, 0); - samples = isl_basic_set_samples(bset); - isl_mat_print_internal(samples, stdout, 0); - isl_mat_free(samples); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.16.3/isl/test_inputs/affine.polylib b/cloog-0.16.3/isl/test_inputs/affine.polylib deleted file mode 100644 index f14720c0a0ad37cacda5603766b015d0a77106fa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/affine.polylib +++ /dev/null @@ -1,9 +0,0 @@ -# the affine hull of {[a,b] : a=b && 1 <= a <= 163} ... -3 4 -0 1 -1 0 -1 1 0 -1 -1 -1 0 163 - -# ... is {[a,b] : a=b} (and not {[In_1,In_2]}, as Omega 1.2 claims) -1 4 -0 1 -1 0 diff --git a/cloog-0.16.3/isl/test_inputs/affine2.polylib b/cloog-0.16.3/isl/test_inputs/affine2.polylib deleted file mode 100644 index c67db77bb6ee9ef2ebbcddf929c1a007f289f7a3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/affine2.polylib +++ /dev/null @@ -1,9 +0,0 @@ -5 5 -1 -2 0 1 0 -1 2 0 -1 1 -1 0 -2 1 0 -1 0 2 -1 1 -1 0 0 1 -1 - -1 5 -0 1 -1 0 0 diff --git a/cloog-0.16.3/isl/test_inputs/affine3.polylib b/cloog-0.16.3/isl/test_inputs/affine3.polylib deleted file mode 100644 index f2bc9a2db2fd4ab1cb04b67fdb6895df7ec5e9a7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/affine3.polylib +++ /dev/null @@ -1,7 +0,0 @@ -3 4 -1 1 0 0 -1 -7 4 2 -1 5 -4 2 - -1 4 -0 3 -2 0 diff --git a/cloog-0.16.3/isl/test_inputs/application.omega b/cloog-0.16.3/isl/test_inputs/application.omega deleted file mode 100644 index 8f4fd1db39a07cfd6f51ce5810cf79ad06633591..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/application.omega +++ /dev/null @@ -1,3 +0,0 @@ -{[x]} -{[x] -> [y] : y = 2x} -{[y]: Exists ( alpha : 2alpha = y)} diff --git a/cloog-0.16.3/isl/test_inputs/application2.omega b/cloog-0.16.3/isl/test_inputs/application2.omega deleted file mode 100644 index f2af1e86958048dc12441664fc29e7d6c275dc81..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/application2.omega +++ /dev/null @@ -1,3 +0,0 @@ -{[x] : x >= 0 && x <= 20 } -{[x] -> [y] : y = 2x} -{[y]: Exists ( alpha : 2alpha = y && 0 <= y && y <= 40)} diff --git a/cloog-0.16.3/isl/test_inputs/basicLinear.pwqp b/cloog-0.16.3/isl/test_inputs/basicLinear.pwqp deleted file mode 100644 index 0af7fabb53f0a5d5ec67ac924c21f81b293d64d6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/basicLinear.pwqp +++ /dev/null @@ -1 +0,0 @@ -[P, Q] -> { [n, m] -> n : n >= 1 and m >= n and m <= P and m <= Q } diff --git a/cloog-0.16.3/isl/test_inputs/basicLinear2.pwqp b/cloog-0.16.3/isl/test_inputs/basicLinear2.pwqp deleted file mode 100644 index d411a369158c1743500a0d7cc69b673bb90ef219..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/basicLinear2.pwqp +++ /dev/null @@ -1 +0,0 @@ -[P, Q] -> { [n, m] -> n : n >= 1 and m >= n and m <= P and n >= -1 + Q } diff --git a/cloog-0.16.3/isl/test_inputs/basicTest.pwqp b/cloog-0.16.3/isl/test_inputs/basicTest.pwqp deleted file mode 100644 index 52e7fc8e697d833a9d8e348eddae7bdbb4699621..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/basicTest.pwqp +++ /dev/null @@ -1 +0,0 @@ -[p] -> { [n, m] -> (n + n^2) : n >= 1 and m >= n and m <= p } diff --git a/cloog-0.16.3/isl/test_inputs/basicTestParameterPosNeg.pwqp b/cloog-0.16.3/isl/test_inputs/basicTestParameterPosNeg.pwqp deleted file mode 100644 index 6cb4490215cf147a0fd039b4b259c5d591b3ce1f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/basicTestParameterPosNeg.pwqp +++ /dev/null @@ -1 +0,0 @@ -[p] -> { [n, m] -> (n + n^3) : n >= -1 and m >= n and m <= p } diff --git a/cloog-0.16.3/isl/test_inputs/boulet.pip b/cloog-0.16.3/isl/test_inputs/boulet.pip deleted file mode 100644 index 78e90ddf58b5b6a54250cc4a6f414fe2f647a921..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/boulet.pip +++ /dev/null @@ -1,13 +0,0 @@ -0 3 - --1 - -5 6 -1 1 -1 2 0 0 -1 0 1 1 4 20 -1 0 -1 -1 0 0 -1 0 1 -1 2 10 -1 0 -1 1 2 10 - -Urs_parms -Urs_unknowns diff --git a/cloog-0.16.3/isl/test_inputs/brisebarre.pip b/cloog-0.16.3/isl/test_inputs/brisebarre.pip deleted file mode 100644 index 5d25dae309b346ddecc8d30c20bbfe860acdbbd7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/brisebarre.pip +++ /dev/null @@ -1,34 +0,0 @@ -# ---------------------- CONTEXT ---------------------- -1 2 -1 0 - --1 - -# ----------------------- DOMAIN ---------------------- -26 6 -1 3 0 0 0 -98300 -1 -3 0 0 0 98308 -1 432 36 6 1 -14757611 -1 -432 -36 -6 -1 14758510 -1 54 9 3 1 -1923190 -1 -54 -9 -3 -1 1923303 -1 48 12 6 3 -1782238 -1 -48 -12 -6 -3 1782339 -1 27 9 6 4 -1045164 -1 -27 -9 -6 -4 1045221 -1 432 180 150 125 -17434139 -1 -432 -180 -150 -125 17435038 -1 6 3 3 3 -252443 -1 -6 -3 -3 -3 252456 -1 432 252 294 343 -18949275 -1 -432 -252 -294 -343 18950174 -1 27 18 24 32 -1234720 -1 -27 -18 -24 -32 1234777 -1 48 36 54 81 -2288453 -1 -48 -36 -54 -81 2288554 -1 54 45 75 125 -2684050 -1 -54 -45 -75 -125 2684163 -1 432 396 726 1331 -22386005 -1 -432 -396 -726 -1331 22386904 -1 3 3 6 12 -162072 -1 -3 -3 -6 -12 162080 diff --git a/cloog-0.16.3/isl/test_inputs/cg1.pip b/cloog-0.16.3/isl/test_inputs/cg1.pip deleted file mode 100644 index 78e31f187b1d7aa3247067bc4bd31f8e33dc0053..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/cg1.pip +++ /dev/null @@ -1,15 +0,0 @@ -2 4 - 1 1 0 -1 - 1 -1 1 0 - --1 - -8 7 - 1 0 1 0 -1 0 0 - 1 0 -1 0 1 0 0 - 1 1 0 0 0 -1 0 - 1 -1 0 0 0 1 0 - 1 0 1 0 0 0 -1 - 1 0 -1 0 0 1 0 - 1 0 -1 1 0 0 -1 - 1 0 0 -1 0 1 0 diff --git a/cloog-0.16.3/isl/test_inputs/convex0.polylib b/cloog-0.16.3/isl/test_inputs/convex0.polylib deleted file mode 100644 index cbc4d3b6cebef2a537f388bf3c843f6bc0369ec4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex0.polylib +++ /dev/null @@ -1,11 +0,0 @@ -2 3 -1 1 0 -1 -1 1 - -2 3 -1 1 -1 -1 -1 2 - -2 3 -1 1 0 -1 -1 2 diff --git a/cloog-0.16.3/isl/test_inputs/convex1.polylib b/cloog-0.16.3/isl/test_inputs/convex1.polylib deleted file mode 100644 index b563d8de7fff5e83bd068dacd8c06e8256bf761b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex1.polylib +++ /dev/null @@ -1,17 +0,0 @@ -# {j,N | 0<=j<=N-1; 2<=N} -4 4 -1 1 0 0 -1 -1 1 -1 -1 0 1 -2 -1 0 0 1 -# {j, N | 1<=j<=N; 1<=N} -4 4 -1 1 0 -1 -1 -1 1 0 -1 0 1 -1 -1 0 0 1 -# {j,N | 0<=j<=N; 2<=j+N} -3 4 - 1 1 1 -2 - 1 1 0 0 - 1 -1 1 0 diff --git a/cloog-0.16.3/isl/test_inputs/convex10.polylib b/cloog-0.16.3/isl/test_inputs/convex10.polylib deleted file mode 100644 index 3d58cbf70e13d63764e41e1b4a09a66ced6f6c86..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex10.polylib +++ /dev/null @@ -1,17 +0,0 @@ -3 4 -1 54 1 -4 -1 2 -1 58 -1 0 -1 6 - -4 4 -1 54 1 -4 -1 2 -1 58 -1 0 1 -7 -1 -4 1 0 - -4 4 -1 54 1 -4 -1 2 -1 58 -1 0 -1 116 -1 0 0 1 - diff --git a/cloog-0.16.3/isl/test_inputs/convex11.polylib b/cloog-0.16.3/isl/test_inputs/convex11.polylib deleted file mode 100644 index f664114d048765c970ada143c2662679de45d21b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex11.polylib +++ /dev/null @@ -1,14 +0,0 @@ -3 4 -1 0 -1 6 -1 -1 1 1 -1 1 1 -10 - -3 4 -1 1 0 -4 -1 -1 -1 8 -1 -1 1 1 - -3 4 -1 0 -1 6 -1 1 0 -4 -1 -1 1 1 diff --git a/cloog-0.16.3/isl/test_inputs/convex12.polylib b/cloog-0.16.3/isl/test_inputs/convex12.polylib deleted file mode 100644 index e4766307477bfc69bf45959f0be20435205e9c3d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex12.polylib +++ /dev/null @@ -1,12 +0,0 @@ -3 5 -1 0 0 1 1 -1 0 1 0 1 -1 -1 -1 0 -2 - -3 5 -1 0 0 1 2 -1 1 -1 0 0 -1 1 0 0 -1 - -1 5 -1 0 0 1 2 diff --git a/cloog-0.16.3/isl/test_inputs/convex13.polylib b/cloog-0.16.3/isl/test_inputs/convex13.polylib deleted file mode 100644 index 1b3591200f80ee2a7ead8e77e33ecb97e709041f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex13.polylib +++ /dev/null @@ -1,17 +0,0 @@ -3 5 -1 0 0 -1 3 -1 0 -1 0 2 -1 1 1 1 -4 - -3 5 -1 0 0 1 0 -1 1 0 0 -1 -1 1 2 0 1 - -6 5 -1 3 2 0 -1 -1 3 0 2 -3 -1 1 0 1 -1 -1 1 1 1 0 -1 1 1 0 0 -1 1 0 0 1 diff --git a/cloog-0.16.3/isl/test_inputs/convex14.polylib b/cloog-0.16.3/isl/test_inputs/convex14.polylib deleted file mode 100644 index caaa8f5d316912a79c2fa79286453bb684b13b95..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex14.polylib +++ /dev/null @@ -1,14 +0,0 @@ -3 4 -0 1 0 2 -1 0 1 0 -1 0 -1 2 - -3 4 -1 1 0 0 -1 0 1 0 -1 0 -1 2 - -3 4 -1 1 0 2 -1 0 1 0 -1 0 -1 2 diff --git a/cloog-0.16.3/isl/test_inputs/convex15.polylib b/cloog-0.16.3/isl/test_inputs/convex15.polylib deleted file mode 100644 index 0118fa861dbfa4681444f9e78475d389b3adc58b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex15.polylib +++ /dev/null @@ -1,66 +0,0 @@ -17 8 -1 -1 -8 0 16 0 0 37 -1 1 0 -48 0 2 0 -3 -1 0 -16 -32 16 1 0 14 -1 -1 24 0 0 1 0 18 -1 -1 8 16 0 0 1 21 -1 0 0 -16 0 1 1 -2 -1 1 32 16 -32 0 0 -1 -1 -1 16 16 0 0 0 28 -1 1 -8 -32 0 1 0 -1 -1 0 0 0 0 1 0 -1 -1 0 16 16 -16 0 1 -1 -1 1 8 0 -16 0 0 0 -1 0 3 2 -2 0 0 0 -1 0 1 2 -1 0 0 0 -1 0 -1 -1 1 0 0 0 -1 -1 8 0 0 1 2 4 -1 -1 -24 -32 32 1 0 36 - -13 8 -1 -1 0 0 0 1 3 -4 -1 1 0 -48 0 2 0 -2 -1 0 0 0 0 1 0 -1 -1 0 -8 0 0 0 1 -1 -1 0 3 2 -2 0 0 0 -1 1 -16 -16 0 0 0 0 -1 1 -24 0 0 0 0 0 -1 0 1 0 0 0 0 0 -1 0 -3 -2 2 0 0 1 -1 -1 0 16 0 0 2 13 -1 -1 24 0 0 1 0 20 -1 -1 16 16 0 0 0 29 -1 -1 0 48 0 0 0 45 - -31 8 - 1 0 1 0 0 0 0 0 - 1 0 0 -16 0 1 1 -2 - 1 0 0 0 0 1 0 -1 - 1 -1 8 0 0 1 2 4 - 1 0 3 2 -2 0 0 0 - 1 -1 24 0 0 1 0 20 - 1 1 0 -48 0 2 0 -2 - 1 -1 -24 -32 32 1 0 36 - 1 0 0 0 0 0 1 -1 - 1 -1 24 64 -16 0 0 45 - 1 -15 120 112 0 15 38 52 - 1 1 24 32 -32 0 0 0 - 1 0 -2 -2 2 0 0 1 - 1 -1 8 16 0 0 1 21 - 1 -15 120 352 0 0 23 307 - 1 1 -8 -32 0 1 0 -1 - 1 1 -8 0 0 0 0 0 - 1 1 -8 -16 0 0 0 0 - 1 0 16 16 -16 0 1 -1 - 1 -1 16 16 0 0 0 29 - 1 -1 -8 0 16 0 0 37 - 1 -1 8 32 0 0 0 37 - 1 1 8 0 -16 0 0 0 - 1 -15 360 592 -240 0 23 307 - 1 -1 -6 2 14 0 2 20 - 1 -15 360 352 -240 15 38 52 - 1 -1 8 48 0 0 0 45 - 1 0 -16 -32 16 1 0 14 - 1 -1 -6 -14 14 1 3 3 - 1 1 -38 -78 30 2 0 13 - 1 1 -3 -50 2 2 0 -1 diff --git a/cloog-0.16.3/isl/test_inputs/convex2.polylib b/cloog-0.16.3/isl/test_inputs/convex2.polylib deleted file mode 100644 index 0bfd737291c95658200494ed257a7a1e093574ad..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex2.polylib +++ /dev/null @@ -1,24 +0,0 @@ -# {i,j,N | 1<=i<=N; 0<=j<=N-1; 2<=N} -6 5 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 -1 -1 0 0 1 -2 -1 0 0 0 1 -# {i,j,N | 1<=i<=N; 1<=j<=N; 2<=N} -6 5 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 0 -1 1 0 -1 0 0 1 -2 -1 0 0 0 1 -# {i,j,N | 1<=i<=N; 0<=j<=N; 2<=N} -6 5 - 1 0 0 1 -2 - 1 -1 0 1 0 - 1 0 -1 1 0 - 1 1 0 0 -1 - 1 0 1 0 0 - 1 0 0 0 1 diff --git a/cloog-0.16.3/isl/test_inputs/convex3.polylib b/cloog-0.16.3/isl/test_inputs/convex3.polylib deleted file mode 100644 index ea612c6b81f87be012a348dc1b369262711260e5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex3.polylib +++ /dev/null @@ -1,10 +0,0 @@ -1 4 -1 1 1 -6 - -3 4 -1 1 1 -3 -1 1 0 -5 -1 -1 0 10 - -1 4 -1 1 1 -3 diff --git a/cloog-0.16.3/isl/test_inputs/convex4.polylib b/cloog-0.16.3/isl/test_inputs/convex4.polylib deleted file mode 100644 index 0c086538a66d1e32d539def8bc92bc834527e667..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex4.polylib +++ /dev/null @@ -1,9 +0,0 @@ -1 4 -1 1 1 -6 - -2 4 -0 1 0 -1 -0 0 1 -4 - -1 4 -1 1 1 -5 diff --git a/cloog-0.16.3/isl/test_inputs/convex5.polylib b/cloog-0.16.3/isl/test_inputs/convex5.polylib deleted file mode 100644 index 3aae7c26bcfc28c70cfaa9c021fff48db94ed67a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex5.polylib +++ /dev/null @@ -1,12 +0,0 @@ -2 4 -0 1 0 -2 -0 0 1 -6 - -2 4 -0 1 0 -1 -0 0 1 -4 - -3 4 -0 -2 1 -2 -1 1 0 -1 -1 -1 0 2 diff --git a/cloog-0.16.3/isl/test_inputs/convex6.polylib b/cloog-0.16.3/isl/test_inputs/convex6.polylib deleted file mode 100644 index 1bdb4e1c9dd2da2fb981b982db7a4af2e20857b1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex6.polylib +++ /dev/null @@ -1,17 +0,0 @@ -3 4 -1 1 1 -2 -1 -1 1 2 -1 0 -1 2 - -3 4 -1 0 1 -1 -1 1 -1 1 -1 -1 -1 5 - -6 4 -1 -1 0 4 -1 1 0 0 -1 1 2 -2 -1 -1 2 2 -1 1 -2 4 -1 -1 -2 8 diff --git a/cloog-0.16.3/isl/test_inputs/convex7.polylib b/cloog-0.16.3/isl/test_inputs/convex7.polylib deleted file mode 100644 index 70eb483175bc920c8b8c83f2a9b5b65b4f56cceb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex7.polylib +++ /dev/null @@ -1,9 +0,0 @@ -1 4 -0 0 1 0 - -2 4 -1 1 -1 1 -1 -1 -1 1 - -1 4 -1 0 -1 1 diff --git a/cloog-0.16.3/isl/test_inputs/convex8.polylib b/cloog-0.16.3/isl/test_inputs/convex8.polylib deleted file mode 100644 index ea1b757108c44fbb680080e69496c1c9b15726f0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex8.polylib +++ /dev/null @@ -1,24 +0,0 @@ -4 5 -1 1 1 1 0 -1 0 -1 0 0 -1 -1 0 0 2 -1 1 1 -1 0 - -4 5 -1 -1 1 0 2 -1 1 -2 -2 -1 -1 -1 0 2 3 -1 1 0 0 -1 - -10 5 -1 1 0 1 0 -1 1 1 0 0 -1 0 1 1 2 -1 -3 1 -1 8 -1 -3 1 1 8 -1 0 1 -1 2 -1 1 0 -1 0 -1 1 -2 -1 0 -1 -1 -3 2 6 -1 1 -5 -2 2 - diff --git a/cloog-0.16.3/isl/test_inputs/convex9.polylib b/cloog-0.16.3/isl/test_inputs/convex9.polylib deleted file mode 100644 index f68fca097a9a167f710ebef9a1b4cafaccb6c7a9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/convex9.polylib +++ /dev/null @@ -1,14 +0,0 @@ -4 4 -1 1 0 0 -1 -1 0 1 -1 0 1 0 -1 0 -1 10 - -2 4 -1 1 0 -10 -0 0 -1 5 - -3 4 -1 1 0 0 -1 0 1 0 -1 0 -1 10 diff --git a/cloog-0.16.3/isl/test_inputs/devos.pwqp b/cloog-0.16.3/isl/test_inputs/devos.pwqp deleted file mode 100644 index b4525446904b000fa34d84c4a21d80f2894463d7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/devos.pwqp +++ /dev/null @@ -1 +0,0 @@ -[U] -> { [i0] -> ((1/3 * U + 2/3 * i0) - [(U + 2i0)/3]) : 2i0 >= -3 - U and 2i0 <= -U and U >= 0 and U <= 10 } diff --git a/cloog-0.16.3/isl/test_inputs/equality1.pwqp b/cloog-0.16.3/isl/test_inputs/equality1.pwqp deleted file mode 100644 index eb16a4ba7b85f07a938375c582a5081a3e545b3a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/equality1.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [x] -> 1 + [(x+1)/3] : exists a : x = 3a +1 && 0 <= x <= n } diff --git a/cloog-0.16.3/isl/test_inputs/equality2.pwqp b/cloog-0.16.3/isl/test_inputs/equality2.pwqp deleted file mode 100644 index 1629a6549ea90030e7b3781c044ab2c0c2ba80a8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/equality2.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [x,y] -> x^2 * y : n = 2x + 4y and 0 <= x,y <= 10 } diff --git a/cloog-0.16.3/isl/test_inputs/equality3.pwqp b/cloog-0.16.3/isl/test_inputs/equality3.pwqp deleted file mode 100644 index c6f8c3acf19bb469d923bb919c12f3ede2865623..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/equality3.pwqp +++ /dev/null @@ -1 +0,0 @@ -[m,n] -> { [x,y] -> x^2 * y : n = 2x + 4y and 0 <= x,y <= 10 and 3 n = 5 m } diff --git a/cloog-0.16.3/isl/test_inputs/equality4.pwqp b/cloog-0.16.3/isl/test_inputs/equality4.pwqp deleted file mode 100644 index 49da2e7eff63fe985e14f01a94d170df0a955c8a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/equality4.pwqp +++ /dev/null @@ -1 +0,0 @@ -[m,n] -> { [x,y] -> x^2 * y + m + 13 * n: n = 2x + 4y and 0 <= x,y <= 10 and 3 n = 5 m } diff --git a/cloog-0.16.3/isl/test_inputs/equality5.pwqp b/cloog-0.16.3/isl/test_inputs/equality5.pwqp deleted file mode 100644 index 09cb7520113ffb7baa9b9521469aea22c41a9a84..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/equality5.pwqp +++ /dev/null @@ -1 +0,0 @@ -[m,n] -> { [x,y,z] -> x^2 * y + z + m + 13 * n: n = 2x + 4y and 0 <= x,y <= 10 and 3 n = 5 m and z = x + y } diff --git a/cloog-0.16.3/isl/test_inputs/esced.pip b/cloog-0.16.3/isl/test_inputs/esced.pip deleted file mode 100644 index dbf56ffa0fd62c8d1decb8d8197c2a72c154b355..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/esced.pip +++ /dev/null @@ -1,27 +0,0 @@ -0 2 - --1 - -16 18 -1 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 - - -0 0 0 0 -1 0 0 0 0 1 -1 0 0 0 0 0 0 0 -0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 - -0 -1 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 - -0 0 0 0 0 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 -0 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 -0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 - -0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 -0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 - -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 diff --git a/cloog-0.16.3/isl/test_inputs/ex.pip b/cloog-0.16.3/isl/test_inputs/ex.pip deleted file mode 100644 index a405450b2adea18893992b211d8c5eaa02791c71..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/ex.pip +++ /dev/null @@ -1,9 +0,0 @@ -1 5 -1 -1 1 1 0 - --1 - -3 7 -1 0 -1 0 1 0 0 -1 -1 0 0 0 1 0 -1 1 1 -1 0 0 0 diff --git a/cloog-0.16.3/isl/test_inputs/ex2.pip b/cloog-0.16.3/isl/test_inputs/ex2.pip deleted file mode 100644 index bb59848c8f290d3f72a21db995ef6575f9e30745..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/ex2.pip +++ /dev/null @@ -1,9 +0,0 @@ -1 5 -1 -1 1 1 0 - --1 - -3 7 -1 0 -1 0 1 0 0 -1 -1 0 0 0 1 0 -1 1 1 -1 0 0 0 diff --git a/cloog-0.16.3/isl/test_inputs/faddeev.pwqp b/cloog-0.16.3/isl/test_inputs/faddeev.pwqp deleted file mode 100644 index e7db61d1bc5abe74f6a08b396d1203069f31fc20..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/faddeev.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j, k] -> (((4 + 6 * N + 2 * N^2) + (-2 - 2 * N) * j) + ((-2 - N) + j) * k) : j = 1 + i and k = 1 + i and i >= 3 and N <= 100 and i <= N and N >= 10 } diff --git a/cloog-0.16.3/isl/test_inputs/fimmel.pip b/cloog-0.16.3/isl/test_inputs/fimmel.pip deleted file mode 100644 index a6dee417c02d56e968352f4b7005da5d6da391e4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/fimmel.pip +++ /dev/null @@ -1,12 +0,0 @@ -0 4 - --1 - -7 6 -1 2 6 0 0 -9 -1 5 -3 0 0 0 -1 2 -10 0 0 15 -1 -2 6 0 0 -3 -1 -2 -6 0 0 17 -1 0 1 -1 0 0 -1 1 0 0 -1 0 diff --git a/cloog-0.16.3/isl/test_inputs/gist1.polylib b/cloog-0.16.3/isl/test_inputs/gist1.polylib deleted file mode 100644 index 802a4eb6ff2ab0497be6da42dde7ec876e1da29d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/gist1.polylib +++ /dev/null @@ -1,14 +0,0 @@ -4 5 -0 1 0 0 -1 -0 0 1 0 1 -0 0 0 1 -3 -1 0 0 0 1 - -4 5 -0 1 0 0 -1 -0 0 1 1 -2 -1 0 0 1 0 -1 0 0 -1 3 - -1 5 -0 0 1 0 1 diff --git a/cloog-0.16.3/isl/test_inputs/linearExample.pwqp b/cloog-0.16.3/isl/test_inputs/linearExample.pwqp deleted file mode 100644 index 24c53946a0b879fb17e439a07696be9ca9b638a3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/linearExample.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N, M, L] -> { [i, j, k] -> ((1/2 * i + 5 * j) + 1/7 * k) : i >= 0 and k >= -N + i and k >= -M - j and j <= L + i and L >= 0 and L >= -M } diff --git a/cloog-0.16.3/isl/test_inputs/max.pip b/cloog-0.16.3/isl/test_inputs/max.pip deleted file mode 100644 index e8af57b9f518a85f59957d0a91170b8c6fc20c42..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/max.pip +++ /dev/null @@ -1,9 +0,0 @@ -0 3 - --1 - -4 5 -1 -1 0 1 0 -1 0 -1 1 0 -1 -1 3 -2 12 -1 2 -1 -1 3 diff --git a/cloog-0.16.3/isl/test_inputs/neg.pwqp b/cloog-0.16.3/isl/test_inputs/neg.pwqp deleted file mode 100644 index 596a7d77d091c659204944c0c72c5f1ae2f5cbf7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/neg.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [i0] -> i0^2 : i0 >= -20 - n and i0 <= n and i0 <= -1 and n >= 0 } diff --git a/cloog-0.16.3/isl/test_inputs/negative.pip b/cloog-0.16.3/isl/test_inputs/negative.pip deleted file mode 100644 index 45090a59230fbecddb05fe8ec767d3a01060f96f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/negative.pip +++ /dev/null @@ -1,9 +0,0 @@ -1 3 -# n 1 -1 1 -1 # n >= 1 --1 - -2 4 -# i n 1 -1 1 0 1 # i >= -1 -1 -1 1 0 # i <= n diff --git a/cloog-0.16.3/isl/test_inputs/philippe.pwqp b/cloog-0.16.3/isl/test_inputs/philippe.pwqp deleted file mode 100644 index 1c56e7af7077d7f7e09ba60af1efe88e90bde152..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/philippe.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j] -> ((1/2 * i + 1/2 * i^2) + j) : i <= N and j >= 0 and j <= i } diff --git a/cloog-0.16.3/isl/test_inputs/philippe3vars.pwqp b/cloog-0.16.3/isl/test_inputs/philippe3vars.pwqp deleted file mode 100644 index 8d074962578d8bb0567ec78c1a5b9fe08aeaf432..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/philippe3vars.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j, k] -> (((1/2 * i + 1/2 * i^2) + j) + k^3) : i >= 0 and k >= -N + i and k >= -j and j <= i } diff --git a/cloog-0.16.3/isl/test_inputs/philippe3vars3pars.pwqp b/cloog-0.16.3/isl/test_inputs/philippe3vars3pars.pwqp deleted file mode 100644 index f81b8cc5a68ff1e1b1f5ff4823a133e7f1564f1e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/philippe3vars3pars.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N, M, L] -> { [i, j, k] -> (((1/2 * i + 1/2 * i^2) + j) + k^3) : i >= 0 and k >= -N + i and k >= -M - j and j <= L + i and L >= 0 and L >= -M } diff --git a/cloog-0.16.3/isl/test_inputs/philippeNeg.pwqp b/cloog-0.16.3/isl/test_inputs/philippeNeg.pwqp deleted file mode 100644 index 24dc805ed18a5b0f96ed06ddf74f0ff2dad4f7b0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/philippeNeg.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j] -> ((1/2 * i + 1/2 * i^2) + j) : i <= N and j >= -1 and j <= i } diff --git a/cloog-0.16.3/isl/test_inputs/philippePolynomialCoeff.pwqp b/cloog-0.16.3/isl/test_inputs/philippePolynomialCoeff.pwqp deleted file mode 100644 index e6327c78f35597566fad7bd13f301814bf3e89d5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/philippePolynomialCoeff.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N, M] -> { [i, j] -> ((N * i + (1/5 * N + N^2) * i^2) + 5 * j) : i <= N and j >= 0 and j <= i and M >= 0 } diff --git a/cloog-0.16.3/isl/test_inputs/philippePolynomialCoeff1P.pwqp b/cloog-0.16.3/isl/test_inputs/philippePolynomialCoeff1P.pwqp deleted file mode 100644 index ae01d2fcb87460750dc396c5f3fbab836b32d227..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/philippePolynomialCoeff1P.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j] -> ((N * i + (1/5 * N + N^2) * i^2) + 5 * j) : i <= N and j >= 0 and j <= i } diff --git a/cloog-0.16.3/isl/test_inputs/product.pwqp b/cloog-0.16.3/isl/test_inputs/product.pwqp deleted file mode 100644 index ee48b859ee3a4afb5904cdd9d7e6f69452cbecd1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/product.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i0, i1, i2] -> (i0^3 * i1^2 + N * i1 * i2) : i0 >= 0 and i0 <= N and i1 >= 0 and i1 <= N and i2 >= 0 and i2 <= N } diff --git a/cloog-0.16.3/isl/test_inputs/seghir-vd.pip b/cloog-0.16.3/isl/test_inputs/seghir-vd.pip deleted file mode 100644 index b5395fbdb383c7717547e2b4d3187d403a0e7df4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/seghir-vd.pip +++ /dev/null @@ -1,17 +0,0 @@ -0 6 - --1 - -9 8 - 0 0 0 1 1 0 0 2 - 1 2 1 0 0 1 0 0 - 1 0 1 0 -1 0 0 -1 - 1 -2 -1 0 0 0 0 -1 - 1 7 3 0 0 0 0 -1 - 1 -6 -4 0 1 0 3 1 - 1 -7 -3 0 0 1 6 4 - 1 0 0 0 0 0 1 0 - 1 0 0 0 0 0 0 1 - -Urs_parms -Urs_unknowns diff --git a/cloog-0.16.3/isl/test_inputs/set.omega b/cloog-0.16.3/isl/test_inputs/set.omega deleted file mode 100644 index ac8485fb9a4eee36e59e59c2c8611b55dbea956b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/set.omega +++ /dev/null @@ -1 +0,0 @@ -{[y]: Exists ( alpha : 2alpha = y)} diff --git a/cloog-0.16.3/isl/test_inputs/small.pip b/cloog-0.16.3/isl/test_inputs/small.pip deleted file mode 100644 index 59557d262bd373325e8af46ee349e3752cdc022a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/small.pip +++ /dev/null @@ -1,9 +0,0 @@ -0 2 - --1 - -4 4 -1 1 0 0 -1 0 1 0 -1 1 -3 12 -1 -2 1 3 diff --git a/cloog-0.16.3/isl/test_inputs/sor1d.pip b/cloog-0.16.3/isl/test_inputs/sor1d.pip deleted file mode 100644 index 1bef89e5bf1f74df381a915b58adee14eb929d74..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/sor1d.pip +++ /dev/null @@ -1,28 +0,0 @@ -2 4 - 1 1 0 0 - 1 0 1 0 - --1 - -20 8 - - 0 -1 0 0 0 0 0 2 - 0 0 -1 0 0 0 0 1 - 0 0 0 -1 0 0 0 2 - 0 0 0 0 -1 0 0 4 - 1 0 0 0 1 0 0 -2 - 1 -2 0 2 1 0 0 -4 - 1 0 0 0 -1 0 1 -1 - 1 2 0 -2 -1 0 0 5 - 1 0 0 1 0 0 0 -1 - 1 0 -2 1 0 0 0 0 - 1 -2 0 2 0 0 1 -5 - 1 0 0 -1 0 1 0 0 - 1 0 2 -1 0 0 0 1 - 1 2 0 -2 0 0 0 3 - 1 0 1 0 0 0 0 0 - 1 -2 4 0 0 0 1 -3 - 1 0 -2 0 0 1 0 0 - 1 2 -4 0 0 0 0 3 - 1 2 0 0 0 0 0 1 - 1 -2 0 0 0 2 1 -5 diff --git a/cloog-0.16.3/isl/test_inputs/split.pwqp b/cloog-0.16.3/isl/test_inputs/split.pwqp deleted file mode 100644 index 1804563600ce85b350915eef902cb4f64c48dc81..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/split.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [x] -> -1 + [(x+5)/7] : -n - 20 <= x <= n } diff --git a/cloog-0.16.3/isl/test_inputs/square.pip b/cloog-0.16.3/isl/test_inputs/square.pip deleted file mode 100644 index 7bb3f0c90b50b6a736a801c2ac7c0b75aff7be2c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/square.pip +++ /dev/null @@ -1,9 +0,0 @@ -0 3 - --1 - -4 5 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 0 diff --git a/cloog-0.16.3/isl/test_inputs/sven.pip b/cloog-0.16.3/isl/test_inputs/sven.pip deleted file mode 100644 index 86027691036a25deda30cd08e7285ad19e617c82..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/sven.pip +++ /dev/null @@ -1,7 +0,0 @@ -0 3 - --1 - -2 3 -1 1 -4 -1 -1 10 diff --git a/cloog-0.16.3/isl/test_inputs/test3Deg3Var.pwqp b/cloog-0.16.3/isl/test_inputs/test3Deg3Var.pwqp deleted file mode 100644 index d9a9ea9da01d334213306f8457bd527d77613a88..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/test3Deg3Var.pwqp +++ /dev/null @@ -1 +0,0 @@ -[p] -> { [n, m] -> (n + n^3) : n >= 1 and m >= n and m <= p } diff --git a/cloog-0.16.3/isl/test_inputs/tobi.pip b/cloog-0.16.3/isl/test_inputs/tobi.pip deleted file mode 100644 index c31beae1b0f2a9ab0db6a47feb45bc600d8125ab..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/tobi.pip +++ /dev/null @@ -1,15 +0,0 @@ -2 3 -1 1 -281 -1 -1 14000 - --1 - -6 6 -0 -392 0 8 -1 0 -0 392 8 0 1 0 -1 -1 0 0 0 0 -1 1 0 0 0 35 -1 392 0 0 1 0 -1 -392 0 0 -1 280 - -Urs_unknowns diff --git a/cloog-0.16.3/isl/test_inputs/toplas.pwqp b/cloog-0.16.3/isl/test_inputs/toplas.pwqp deleted file mode 100644 index 9c0999540b2e3b7476fac3a05fe7df89eab8f4e6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/toplas.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [i0, i1] -> (((4 * n - n^2) + (-3/2 + 2 * n) * i0 - 1/2 * i0^2) - i1) : i1 >= -1 + 3n - i0 and i1 >= -1 + 2n - i0 and i0 >= 0 and i1 <= -2 + 4n - i0 and i0 <= -2 + 4n and i0 <= -1 + 3n and i1 >= 0 and i1 <= -1 + n } diff --git a/cloog-0.16.3/isl/test_inputs/unexpanded.pwqp b/cloog-0.16.3/isl/test_inputs/unexpanded.pwqp deleted file mode 100644 index 5626d3baa41806cc1bb043f890902de43f1845ca..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/isl/test_inputs/unexpanded.pwqp +++ /dev/null @@ -1 +0,0 @@ -{ [x, y] -> ((x - x^2) * y + (-x + x^2) * y^2) : x >= 0 and x <= 2 and y >= 0 and y <= 2 } diff --git a/cloog-0.16.3/m4/ax_cc_maxopt.m4 b/cloog-0.16.3/m4/ax_cc_maxopt.m4 deleted file mode 100644 index da415be979258ff0fb81a2a711c2ad83522d5871..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_cc_maxopt.m4 +++ /dev/null @@ -1,178 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.16.3/m4/ax_cflags_warn_all.m4 b/cloog-0.16.3/m4/ax_cflags_warn_all.m4 deleted file mode 100644 index 026c6e984150e14b607856f4c63441f47daef14d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_cflags_warn_all.m4 +++ /dev/null @@ -1,149 +0,0 @@ -# =========================================================================== -# 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 -# -# 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 . -# -# 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/cloog-0.16.3/m4/ax_check_compiler_flags.m4 b/cloog-0.16.3/m4/ax_check_compiler_flags.m4 deleted file mode 100644 index 7da8324b70fed482e01a7e5c58673f79fa960093..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_check_compiler_flags.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.16.3/m4/ax_compiler_vendor.m4 b/cloog-0.16.3/m4/ax_compiler_vendor.m4 deleted file mode 100644 index b074260a41c5b69b9038e4bab67a0c1ce767ac74..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_compiler_vendor.m4 +++ /dev/null @@ -1,61 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.16.3/m4/ax_create_pkgconfig_info.m4 b/cloog-0.16.3/m4/ax_create_pkgconfig_info.m4 deleted file mode 100644 index 60ac5485023df99d79529ac33abe547672a27de2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_create_pkgconfig_info.m4 +++ /dev/null @@ -1,349 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])] -# -# DESCRIPTION -# -# Defaults: -# -# $1 = $PACKAGE_NAME.pc -# $2 = (empty) -# $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) -# $4 = $PACKAGE_SUMMARY (or $1 Library) -# $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) -# $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) -# -# PACKAGE_NAME defaults to $PACKAGE if not set. -# PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. -# -# The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc -# -# You will find this macro most useful in conjunction with -# ax_spec_defaults that can read good initializers from the .spec file. In -# consequencd, most of the generatable installable stuff can be made from -# information being updated in a single place for the whole project. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2008 Sven Verdoolaege -# -# 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 . -# -# 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_CREATE_PKGCONFIG_INFO],[dnl -AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl -AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl -AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl -AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl -AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -AC_MSG_CHECKING(our pkgconfig libname) -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)" -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="$PACKAGE" -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -AC_MSG_RESULT($PKGCONFIG_libname) - -AC_MSG_CHECKING(our pkgconfig version) -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="${PACKAGE_VERSION}" -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="$VERSION" -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -AC_MSG_RESULT($PKGCONFIG_version) - -AC_MSG_CHECKING(our pkgconfig_libdir) -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -AC_MSG_RESULT($pkgconfig_libdir) -test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && ( -AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir)) -AC_SUBST([pkgconfig_libdir]) - -AC_MSG_CHECKING(our pkgconfig_libfile) -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)" -PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"` -PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"` -AC_MSG_RESULT($pkgconfig_libfile) -test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && ( -AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile)) -AC_SUBST([pkgconfig_libfile]) - -AC_MSG_CHECKING(our package / suffix) -PKGCONFIG_suffix="$program_suffix" -test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix="" -AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix}) - -AC_MSG_CHECKING(our pkgconfig description) -PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)" -test ".$PKGCONFIG_description" != "." || \ -PKGCONFIG_description="$PKGCONFIG_libname Library" -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -AC_MSG_RESULT($PKGCONFIG_description) - -AC_MSG_CHECKING(our pkgconfig requires) -PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)" -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -AC_MSG_RESULT($PKGCONFIG_requires) - -AC_MSG_CHECKING(our pkgconfig ext libs) -PKGCONFIG_pkglibs="$PACKAGE_LIBS" -test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname" -PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)" -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -AC_MSG_RESULT($PKGCONFIG_libs) - -AC_MSG_CHECKING(our pkgconfig cppflags) -PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -AC_MSG_RESULT($PKGCONFIG_cppflags) - -AC_MSG_CHECKING(our pkgconfig ldflags) -PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -AC_MSG_RESULT($PKGCONFIG_ldflags) - -test ".$PKGCONFIG_generate" != "." || \ -PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)" -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && ( -AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate)) - -if test ".$PKGCONFIG_src_libdir" = "." ; then -PKGCONFIG_src_libdir=`pwd` -PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")` -test ! -d $PKGCONFIG_src_libdir/src || \ -PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src" -case ".$objdir" in -*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac -AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir) -fi - -if test ".$PKGCONFIG_src_headers" = "." ; then -PKGCONFIG_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) PKGCONFIG_src_headers="" ;; esac -PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` -test ! -d $PKGCONFIG_src_headers/incl[]ude || \ -PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" -AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers) -fi - - -dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here... -AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[ -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -AC_MSG_NOTICE(creating $pkgconfig_generate.in) -cat > $pkgconfig_generate.in <conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - AC_MSG_ERROR([$pkgconfig_generate is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled -],[ -dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here... -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' -])dnl -AS_VAR_POPDEF([PKGCONFIG_suffix])dnl -AS_VAR_POPDEF([PKGCONFIG_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_libfile])dnl -AS_VAR_POPDEF([PKGCONFIG_libname])dnl -AS_VAR_POPDEF([PKGCONFIG_version])dnl -AS_VAR_POPDEF([PKGCONFIG_description])dnl -AS_VAR_POPDEF([PKGCONFIG_requires])dnl -AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl -AS_VAR_POPDEF([PKGCONFIG_libs])dnl -AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl -AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl -AS_VAR_POPDEF([PKGCONFIG_generate])dnl -AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl -]) diff --git a/cloog-0.16.3/m4/ax_gcc_archflag.m4 b/cloog-0.16.3/m4/ax_gcc_archflag.m4 deleted file mode 100644 index dedeef424e945cbd57dc69f45a7860210c4b7b9c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_gcc_archflag.m4 +++ /dev/null @@ -1,213 +0,0 @@ -# =========================================================================== -# 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= 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 -# 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 . -# -# 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=], [use architecture 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/cloog-0.16.3/m4/ax_gcc_x86_cpuid.m4 b/cloog-0.16.3/m4/ax_gcc_x86_cpuid.m4 deleted file mode 100644 index 5420b095900a37f43dd9835934b532e05c6b3f6e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_gcc_x86_cpuid.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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 ], [ - 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/cloog-0.16.3/m4/ax_submodule.m4 b/cloog-0.16.3/m4/ax_submodule.m4 deleted file mode 100644 index 57e3a56e0472fb08b112b15c3bb9255ed2869628..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ax_submodule.m4 +++ /dev/null @@ -1,63 +0,0 @@ -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/cloog-0.16.3/m4/libtool.m4 b/cloog-0.16.3/m4/libtool.m4 deleted file mode 100644 index 22924a86f47d92afd9dd5344b7a5b61a4346f2dc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/libtool.m4 +++ /dev/null @@ -1,7437 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); -#endif - -void fnord () { int i=42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/cloog-0.16.3/m4/ltoptions.m4 b/cloog-0.16.3/m4/ltoptions.m4 deleted file mode 100644 index 17cfd51c0b34ed2f118b8b5d4d28947889eec9c3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ltoptions.m4 +++ /dev/null @@ -1,369 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/cloog-0.16.3/m4/ltsugar.m4 b/cloog-0.16.3/m4/ltsugar.m4 deleted file mode 100644 index 9000a057d31ddf75cb85ccda8757de4493bcdbe7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/cloog-0.16.3/m4/ltversion.m4 b/cloog-0.16.3/m4/ltversion.m4 deleted file mode 100644 index 2e8f9292580e3125c215fbeb3870bee1db80bd2d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3169 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.8]) -m4_define([LT_PACKAGE_REVISION], [1.3169]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.8' -macro_revision='1.3169' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/cloog-0.16.3/m4/lt~obsolete.m4 b/cloog-0.16.3/m4/lt~obsolete.m4 deleted file mode 100644 index c573da90c5ccebffba4dce9a6462036bfa986d5f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/m4/lt~obsolete.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/cloog-0.16.3/source/block.c b/cloog-0.16.3/source/block.c deleted file mode 100644 index 08fe8074650eebd12c0ba60425dbf8fa38fab124..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/block.c +++ /dev/null @@ -1,404 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** block.c ** - **-------------------------------------------------------------------** - ** First version: june 11th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - -/** - * These functions and global variables are devoted to memory leaks hunting: we - * want to know at each moment how many CloogBlock structures had been allocated - * (cloog_block_allocated) and how many had been freed (cloog_block_freed). - * Each time a CloogBlock structure is allocated, a call to the function - * cloog_block_leak_up() must be carried out, and respectively - * cloog_block_leak_down() when a CloogBlock structure is freed. The special - * variable cloog_block_max gives the maximal number of CloogBlock structures - * simultaneously alive (i.e. allocated and non-freed) in memory. - * - June 11th 2005: first version. - */ - - -static void cloog_block_leak_up(CloogState *state) -{ - state->block_allocated++; - if ((state->block_allocated - state->block_freed) > state->block_max) - state->block_max = state->block_allocated - state->block_freed; -} - - -static void cloog_block_leak_down(CloogState *state) -{ - state->block_freed++; -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_domain_print_structure : - * this function is a human-friendly way to display the CloogDomain data - * structure, it includes an indentation level (level) in order to work with - * others print_structure functions. - * - June 16th 2005: first version. - */ -void cloog_block_print_structure(FILE * file, CloogBlock * block, int level) -{ int i ; - - /* Go to the right level. */ - for (i=0; istatement,level+1) ; - - /* A blank line. */ - for (i=0; inb_scaldims == 0) - fprintf(file,"No scalar dimensions\n") ; - else - { fprintf(file,"Scalar dimensions (%d):",block->nb_scaldims) ; - for (i = 0; i < block->nb_scaldims; i++) { - fprintf(file, " "); - cloog_int_print(file, block->scaldims[i]); - } - fprintf(file,"\n") ; - } - - /* A blank line. */ - for (i=0; idepth) ; - - /* A blank line. */ - for (i=0; iblock,1) ; - blocklist = blocklist->next ; - i++ ; - } -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_block_free function: - * This function frees the allocated memory for a CloogStatement structure. - * - June 11th 2005: first version. - * - June 30th 2005: scaldims field management. - */ -void cloog_block_free(CloogBlock * block) -{ int i ; - - if (block != NULL) - { block->references -- ; - - if (block->references == 0) { - cloog_block_leak_down(block->state); - if (block->scaldims != NULL) - { for (i=0;inb_scaldims;i++) - cloog_int_clear(block->scaldims[i]); - - free(block->scaldims) ; - } - if (block->statement) - cloog_statement_free(block->statement); - free(block) ; - } - } -} - - -/** - * cloog_block_list_free function: - * This function frees the allocated memory for a CloogBlockList structure. - * - June 11th 2005: first version. - */ -void cloog_block_list_free(CloogBlockList * blocklist) -{ CloogBlockList * temp ; - - while (blocklist != NULL) - { temp = blocklist->next ; - cloog_block_free(blocklist->block) ; - free(blocklist) ; - blocklist = temp ; - } -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - -/** - * cloog_block_malloc function: - * This function allocates the memory space for a CloogBlock structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogBlock *cloog_block_malloc(CloogState *state) -{ CloogBlock * block ; - - /* Memory allocation for the CloogBlock structure. */ - block = (CloogBlock *)malloc(sizeof(CloogBlock)) ; - if (block == NULL) - cloog_die("memory overflow.\n"); - cloog_block_leak_up(state); - - /* We set the various fields with default values. */ - block->state = state; - block->statement = NULL ; - block->nb_scaldims = 0 ; - block->scaldims = NULL ; - block->depth = 0 ; - block->references = 1 ; - block->usr = NULL; - - return block ; -} - - -/** - * cloog_block_alloc function: - * This function allocates the memory space for a CloogBlock structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. The two parameters nb_scaldims and scaldims are for internal - * service, put to respectively 0 and NULL if you don't know what they are - * useful for ! - * - statement is the statement list of the block, - * - scattering is the scattering function for the block (NULL if unsure !), - * - nb_scaldims is the number of scalar dimensions (0 if unsure !), - * - scaldims is the array with the scalar dimensions values (NULL if unsure !), - * - depth is the original block depth (the number of outer loops). - ** - * - June 11th 2005: first version. - * - June 30th 2005: addition of the nb_scaldims and scaldims parameters. - * - November 21th 2005: use of cloog_block_malloc. - */ -CloogBlock *cloog_block_alloc(CloogStatement *statement, int nb_scaldims, - cloog_int_t *scaldims, int depth) -{ CloogBlock * block ; - - /* Block allocation. */ - block = cloog_block_malloc(statement->state); - - block->statement = statement ; - block->nb_scaldims = nb_scaldims ; - block->scaldims = scaldims ; - block->depth = depth ; - block->references = 1 ; - - return block ; -} - - -/** - * cloog_block_list_malloc function: - * This function allocates the memory space for a CloogBlockList structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogBlockList * cloog_block_list_malloc() -{ CloogBlockList * blocklist ; - - /* Memory allocation for the CloogBlock structure. */ - blocklist = (CloogBlockList *)malloc(sizeof(CloogBlockList)) ; - if (blocklist == NULL) - cloog_die("memory overflow.\n"); - - /* We set the various fields with default values. */ - blocklist->block = NULL ; - blocklist->next = NULL ; - - return blocklist ; -} - - -/** - * cloog_block_list_alloc function: - * This function allocates the memory space for a CloogBlockList structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - block is the block element of the list node, - ** - * - June 11th 2005: first version. - * - November 21th 2005: use of cloog_block_list_malloc. - */ -CloogBlockList * cloog_block_list_alloc(CloogBlock * block) -{ CloogBlockList * blocklist ; - - /* Block list node allocation. */ - blocklist = cloog_block_list_malloc() ; - - blocklist->block = block ; - blocklist->block->references ++ ; /* The block has a new reference to it. */ - blocklist->next = NULL ; - - return blocklist ; -} - - -/** - * cloog_block_copy function: - * This function returns a copy of a CloogBlock structure 'block'. To save - * memory this is not a memory copy but we increment a counter of active - * references inside the structure, then return a pointer to that structure. - */ -CloogBlock * cloog_block_copy(CloogBlock * block) -{ if (block == NULL) - return NULL ; - - block->references ++ ; - return block ; -} - - -/** - * cloog_block_merge function: - * this function adds at the end of the statement list of the block 'block', - * the statement list of the block 'merged'. Then the CloogBlock structure - * of 'merged' is freed (obviously not its statement list that is now - * included in 'block'). - * - June 11th 2005: first version. - */ -void cloog_block_merge(CloogBlock * block, CloogBlock * merged) -{ CloogStatement * statement ; - - if ((block == NULL) || (merged == NULL)) - return ; - - if (block->statement != NULL) - { statement = block->statement ; - - while (statement->next != NULL) - statement = statement->next ; - - statement->next = merged->statement ; - } - else - block->statement = merged->statement ; - - merged->statement = NULL; - cloog_block_free(merged); -} - - - - - - - - - - diff --git a/cloog-0.16.3/source/clast.c b/cloog-0.16.3/source/clast.c deleted file mode 100644 index 011c0466c48aaea9932ef84d1960893cfc16303a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/clast.c +++ /dev/null @@ -1,1895 +0,0 @@ -#include -#include -#include -#include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -/** - * CloogInfos structure: - * this structure contains all the informations necessary for pretty printing, - * they come from the original CloogProgram structure (language, names), from - * genereral options (options) or are built only for pretty printing (stride). - * This structure is mainly there to reduce the number of function parameters, - * since most pprint.c functions need most of its field. - */ -struct clooginfos { - CloogState *state; /**< State. */ - CloogStride **stride; - int stride_level; /**< Number of valid entries in stride array. */ - int nb_scattdims ; /**< Scattering dimension number. */ - int * scaldims ; /**< Boolean array saying whether a given - * scattering dimension is scalar or not. - */ - CloogNames * names ; /**< Names of iterators and parameters. */ - CloogOptions * options ; /**< Options on CLooG's behaviour. */ - CloogEqualities *equal; /**< Matrix of equalities. */ -} ; - -typedef struct clooginfos CloogInfos ; - -static int clast_expr_cmp(struct clast_expr *e1, struct clast_expr *e2); -static int clast_term_cmp(struct clast_term *t1, struct clast_term *t2); -static int clast_binary_cmp(struct clast_binary *b1, struct clast_binary *b2); -static int clast_reduction_cmp(struct clast_reduction *r1, - struct clast_reduction *r2); - -static struct clast_expr *clast_expr_copy(struct clast_expr *e); - -static int clast_equal_add(CloogEqualities *equal, - CloogConstraintSet *constraints, - int level, CloogConstraint *constraint, - CloogInfos *infos); - -static struct clast_stmt *clast_equal(int level, CloogInfos *infos); -static struct clast_expr *clast_minmax(CloogConstraintSet *constraints, - int level, int max, int guard, - int lower_bound, int no_earlier, - CloogInfos *infos); -static void insert_guard(CloogConstraintSet *constraints, int level, - struct clast_stmt ***next, CloogInfos *infos); -static int insert_modulo_guard(CloogConstraint *upper, - CloogConstraint *lower, int level, - struct clast_stmt ***next, CloogInfos *infos); -static int insert_equation(CloogDomain *domain, CloogConstraint *upper, - CloogConstraint *lower, int level, - struct clast_stmt ***next, CloogInfos *infos); -static int insert_for(CloogDomain *domain, CloogConstraintSet *constraints, - int level, int otl, struct clast_stmt ***next, - CloogInfos *infos); -static void insert_block(CloogDomain *domain, CloogBlock *block, int level, - struct clast_stmt ***next, CloogInfos *infos); -static void insert_loop(CloogLoop * loop, int level, - struct clast_stmt ***next, CloogInfos *infos); - - -struct clast_name *new_clast_name(const char *name) -{ - struct clast_name *n = malloc(sizeof(struct clast_name)); - n->expr.type = clast_expr_name; - n->name = name; - return n; -} - -struct clast_term *new_clast_term(cloog_int_t c, struct clast_expr *v) -{ - struct clast_term *t = malloc(sizeof(struct clast_term)); - t->expr.type = clast_expr_term; - cloog_int_init(t->val); - cloog_int_set(t->val, c); - t->var = v; - return t; -} - -struct clast_binary *new_clast_binary(enum clast_bin_type t, - struct clast_expr *lhs, cloog_int_t rhs) -{ - struct clast_binary *b = malloc(sizeof(struct clast_binary)); - b->expr.type = clast_expr_bin; - b->type = t; - b->LHS = lhs; - cloog_int_init(b->RHS); - cloog_int_set(b->RHS, rhs); - return b; -} - -struct clast_reduction *new_clast_reduction(enum clast_red_type t, int n) -{ - int i; - struct clast_reduction *r; - r = malloc(sizeof(struct clast_reduction)+(n-1)*sizeof(struct clast_expr *)); - r->expr.type = clast_expr_red; - r->type = t; - r->n = n; - for (i = 0; i < n; ++i) - r->elts[i] = NULL; - return r; -} - -static void free_clast_root(struct clast_stmt *s); - -const struct clast_stmt_op stmt_root = { free_clast_root }; - -static void free_clast_root(struct clast_stmt *s) -{ - struct clast_root *r = (struct clast_root *)s; - assert(CLAST_STMT_IS_A(s, stmt_root)); - cloog_names_free(r->names); - free(r); -} - -struct clast_root *new_clast_root(CloogNames *names) -{ - struct clast_root *r = malloc(sizeof(struct clast_root)); - r->stmt.op = &stmt_root; - r->stmt.next = NULL; - r->names = cloog_names_copy(names); - return r; -} - -static void free_clast_assignment(struct clast_stmt *s); - -const struct clast_stmt_op stmt_ass = { free_clast_assignment }; - -static void free_clast_assignment(struct clast_stmt *s) -{ - struct clast_assignment *a = (struct clast_assignment *)s; - assert(CLAST_STMT_IS_A(s, stmt_ass)); - free_clast_expr(a->RHS); - free(a); -} - -struct clast_assignment *new_clast_assignment(const char *lhs, - struct clast_expr *rhs) -{ - struct clast_assignment *a = malloc(sizeof(struct clast_assignment)); - a->stmt.op = &stmt_ass; - a->stmt.next = NULL; - a->LHS = lhs; - a->RHS = rhs; - return a; -} - -static void free_clast_user_stmt(struct clast_stmt *s); - -const struct clast_stmt_op stmt_user = { free_clast_user_stmt }; - -static void free_clast_user_stmt(struct clast_stmt *s) -{ - struct clast_user_stmt *u = (struct clast_user_stmt *)s; - assert(CLAST_STMT_IS_A(s, stmt_user)); - cloog_domain_free(u->domain); - cloog_statement_free(u->statement); - cloog_clast_free(u->substitutions); - free(u); -} - -struct clast_user_stmt *new_clast_user_stmt(CloogDomain *domain, - CloogStatement *stmt, struct clast_stmt *subs) -{ - struct clast_user_stmt *u = malloc(sizeof(struct clast_user_stmt)); - u->stmt.op = &stmt_user; - u->stmt.next = NULL; - u->domain = cloog_domain_copy(domain); - u->statement = cloog_statement_copy(stmt); - u->substitutions = subs; - return u; -} - -static void free_clast_block(struct clast_stmt *b); - -const struct clast_stmt_op stmt_block = { free_clast_block }; - -static void free_clast_block(struct clast_stmt *s) -{ - struct clast_block *b = (struct clast_block *)s; - assert(CLAST_STMT_IS_A(s, stmt_block)); - cloog_clast_free(b->body); - free(b); -} - -struct clast_block *new_clast_block() -{ - struct clast_block *b = malloc(sizeof(struct clast_block)); - b->stmt.op = &stmt_block; - b->stmt.next = NULL; - b->body = NULL; - return b; -} - -static void free_clast_for(struct clast_stmt *s); - -const struct clast_stmt_op stmt_for = { free_clast_for }; - -static void free_clast_for(struct clast_stmt *s) -{ - struct clast_for *f = (struct clast_for *)s; - assert(CLAST_STMT_IS_A(s, stmt_for)); - cloog_domain_free(f->domain); - free_clast_expr(f->LB); - free_clast_expr(f->UB); - cloog_int_clear(f->stride); - cloog_clast_free(f->body); - free(f); -} - -struct clast_for *new_clast_for(CloogDomain *domain, const char *it, - struct clast_expr *LB, struct clast_expr *UB, - CloogStride *stride) -{ - struct clast_for *f = malloc(sizeof(struct clast_for)); - f->stmt.op = &stmt_for; - f->stmt.next = NULL; - f->domain = cloog_domain_copy(domain); - f->iterator = it; - f->LB = LB; - f->UB = UB; - f->body = NULL; - cloog_int_init(f->stride); - if (stride) - cloog_int_set(f->stride, stride->stride); - else - cloog_int_set_si(f->stride, 1); - return f; -} - -static void free_clast_guard(struct clast_stmt *s); - -const struct clast_stmt_op stmt_guard = { free_clast_guard }; - -static void free_clast_guard(struct clast_stmt *s) -{ - int i; - struct clast_guard *g = (struct clast_guard *)s; - assert(CLAST_STMT_IS_A(s, stmt_guard)); - cloog_clast_free(g->then); - for (i = 0; i < g->n; ++i) { - free_clast_expr(g->eq[i].LHS); - free_clast_expr(g->eq[i].RHS); - } - free(g); -} - -struct clast_guard *new_clast_guard(int n) -{ - int i; - struct clast_guard *g = malloc(sizeof(struct clast_guard) + - (n-1) * sizeof(struct clast_equation)); - g->stmt.op = &stmt_guard; - g->stmt.next = NULL; - g->then = NULL; - g->n = n; - for (i = 0; i < n; ++i) { - g->eq[i].LHS = NULL; - g->eq[i].RHS = NULL; - } - return g; -} - -void free_clast_name(struct clast_name *n) -{ - free(n); -} - -void free_clast_term(struct clast_term *t) -{ - cloog_int_clear(t->val); - free_clast_expr(t->var); - free(t); -} - -void free_clast_binary(struct clast_binary *b) -{ - cloog_int_clear(b->RHS); - free_clast_expr(b->LHS); - free(b); -} - -void free_clast_reduction(struct clast_reduction *r) -{ - int i; - for (i = 0; i < r->n; ++i) - free_clast_expr(r->elts[i]); - free(r); -} - -void free_clast_expr(struct clast_expr *e) -{ - if (!e) - return; - switch (e->type) { - case clast_expr_name: - free_clast_name((struct clast_name*) e); - break; - case clast_expr_term: - free_clast_term((struct clast_term*) e); - break; - case clast_expr_red: - free_clast_reduction((struct clast_reduction*) e); - break; - case clast_expr_bin: - free_clast_binary((struct clast_binary*) e); - break; - default: - assert(0); - } -} - -void free_clast_stmt(struct clast_stmt *s) -{ - assert(s->op); - assert(s->op->free); - s->op->free(s); -} - -void cloog_clast_free(struct clast_stmt *s) -{ - struct clast_stmt *next; - while (s) { - next = s->next; - free_clast_stmt(s); - s = next; - } -} - -static int clast_name_cmp(struct clast_name *n1, struct clast_name *n2) -{ - return n1->name == n2->name ? 0 : strcmp(n1->name, n2->name); -} - -static int clast_term_cmp(struct clast_term *t1, struct clast_term *t2) -{ - int c; - if (!t1->var && t2->var) - return -1; - if (t1->var && !t2->var) - return 1; - c = clast_expr_cmp(t1->var, t2->var); - if (c) - return c; - return cloog_int_cmp(t1->val, t2->val); -} - -static int clast_binary_cmp(struct clast_binary *b1, struct clast_binary *b2) -{ - int c; - - if (b1->type != b2->type) - return b1->type - b2->type; - if ((c = cloog_int_cmp(b1->RHS, b2->RHS))) - return c; - return clast_expr_cmp(b1->LHS, b2->LHS); -} - -static int clast_reduction_cmp(struct clast_reduction *r1, struct clast_reduction *r2) -{ - int i; - int c; - - if (r1->n == 1 && r2->n == 1) - return clast_expr_cmp(r1->elts[0], r2->elts[0]); - if (r1->type != r2->type) - return r1->type - r2->type; - if (r1->n != r2->n) - return r1->n - r2->n; - for (i = 0; i < r1->n; ++i) - if ((c = clast_expr_cmp(r1->elts[i], r2->elts[i]))) - return c; - return 0; -} - -static int clast_expr_cmp(struct clast_expr *e1, struct clast_expr *e2) -{ - if (!e1 && !e2) - return 0; - if (!e1) - return -1; - if (!e2) - return 1; - if (e1->type != e2->type) - return e1->type - e2->type; - switch (e1->type) { - case clast_expr_name: - return clast_name_cmp((struct clast_name*) e1, - (struct clast_name*) e2); - case clast_expr_term: - return clast_term_cmp((struct clast_term*) e1, - (struct clast_term*) e2); - case clast_expr_bin: - return clast_binary_cmp((struct clast_binary*) e1, - (struct clast_binary*) e2); - case clast_expr_red: - return clast_reduction_cmp((struct clast_reduction*) e1, - (struct clast_reduction*) e2); - default: - assert(0); - } -} - -int clast_expr_equal(struct clast_expr *e1, struct clast_expr *e2) -{ - return clast_expr_cmp(e1, e2) == 0; -} - -/** - * Return 1 is both expressions are constant terms and e1 is bigger than e2. - */ -int clast_expr_is_bigger_constant(struct clast_expr *e1, struct clast_expr *e2) -{ - struct clast_term *t1, *t2; - struct clast_reduction *r; - - if (!e1 || !e2) - return 0; - if (e1->type == clast_expr_red) { - r = (struct clast_reduction *)e1; - return r->n == 1 && clast_expr_is_bigger_constant(r->elts[0], e2); - } - if (e2->type == clast_expr_red) { - r = (struct clast_reduction *)e2; - return r->n == 1 && clast_expr_is_bigger_constant(e1, r->elts[0]); - } - if (e1->type != clast_expr_term || e2->type != clast_expr_term) - return 0; - t1 = (struct clast_term *)e1; - t2 = (struct clast_term *)e2; - if (t1->var || t2->var) - return 0; - return cloog_int_gt(t1->val, t2->val); -} - -static int qsort_expr_cmp(const void *p1, const void *p2) -{ - return clast_expr_cmp(*(struct clast_expr **)p1, *(struct clast_expr **)p2); -} - -static void clast_reduction_sort(struct clast_reduction *r) -{ - qsort(&r->elts[0], r->n, sizeof(struct clast_expr *), qsort_expr_cmp); -} - -static int qsort_eq_cmp(const void *p1, const void *p2) -{ - struct clast_equation *eq1 = (struct clast_equation *)p1; - struct clast_equation *eq2 = (struct clast_equation *)p2; - int cmp; - - cmp = clast_expr_cmp(eq1->LHS, eq2->LHS); - if (cmp) - return cmp; - - cmp = clast_expr_cmp(eq1->RHS, eq2->RHS); - if (cmp) - return cmp; - - return eq1->sign - eq2->sign; -} - -/** - * Sort equations in a clast_guard. - */ -static void clast_guard_sort(struct clast_guard *g) -{ - qsort(&g->eq[0], g->n, sizeof(struct clast_equation), qsort_eq_cmp); -} - - -/** - * Construct a (deep) copy of an expression clast. - */ -static struct clast_expr *clast_expr_copy(struct clast_expr *e) -{ - if (!e) - return NULL; - switch (e->type) { - case clast_expr_name: { - struct clast_name* n = (struct clast_name*) e; - return &new_clast_name(n->name)->expr; - } - case clast_expr_term: { - struct clast_term* t = (struct clast_term*) e; - return &new_clast_term(t->val, clast_expr_copy(t->var))->expr; - } - case clast_expr_red: { - int i; - struct clast_reduction *r = (struct clast_reduction*) e; - struct clast_reduction *r2 = new_clast_reduction(r->type, r->n); - for (i = 0; i < r->n; ++i) - r2->elts[i] = clast_expr_copy(r->elts[i]); - return &r2->expr; - } - case clast_expr_bin: { - struct clast_binary *b = (struct clast_binary*) e; - return &new_clast_binary(b->type, clast_expr_copy(b->LHS), b->RHS)->expr; - } - default: - assert(0); - } -} - - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ - - -/** - * clast_equal_allow function: - * This function checks whether the options allow us to spread the equality or - * not. It returns 1 if so, 0 otherwise. - * - equal is the matrix of equalities, - * - level is the column number in equal of the element which is 'equal to', - * - line is the line number in equal of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - ** - * - October 27th 2005: first version (extracted from old pprint_equal_add). - */ -static int clast_equal_allow(CloogEqualities *equal, int level, int line, - CloogInfos *infos) -{ - if (level < infos->options->fsp) - return 0 ; - - if ((cloog_equal_type(equal, level) == EQTYPE_EXAFFINE) && - !infos->options->esp) - return 0 ; - - return 1 ; -} - - -/** - * clast_equal_add function: - * This function updates the row (level-1) of the equality matrix (equal) with - * the row that corresponds to the row (line) of the matrix (matrix). It returns - * 1 if the row can be updated, 0 otherwise. - * - equal is the matrix of equalities, - * - matrix is the matrix of constraints, - * - level is the column number in matrix of the element which is 'equal to', - * - line is the line number in matrix of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - */ -static int clast_equal_add(CloogEqualities *equal, - CloogConstraintSet *constraints, - int level, CloogConstraint *constraint, - CloogInfos *infos) -{ - cloog_equal_add(equal, constraints, level, constraint, - infos->names->nb_parameters); - - return clast_equal_allow(equal, level, level-1, infos); -} - - - -/** - * clast_equal function: - * This function prints the substitution data of a statement into a clast_stmt. - * Using this function instead of pprint_equal is useful for generating - * a compilable pseudo-code by using preprocessor macro for each statement. - * By opposition to pprint_equal, the result is less human-readable. For - * instance this function will print (i,i+3,k,3) where pprint_equal would - * return (j=i+3,l=3). - * - level is the number of loops enclosing the statement, - * - the infos structure gives the user all options on code printing and more. - ** - * - March 12th 2004: first version. - * - November 21th 2005: (debug) now works well with GMP version. - */ -static struct clast_stmt *clast_equal(int level, CloogInfos *infos) -{ - int i ; - struct clast_expr *e; - struct clast_stmt *a = NULL; - struct clast_stmt **next = &a; - CloogEqualities *equal = infos->equal; - CloogConstraint *equal_constraint; - - for (i=infos->names->nb_scattering;inames); - cloog_constraint_release(equal_constraint); - } else { - e = &new_clast_term(infos->state->one, &new_clast_name( - cloog_names_name_at_level(infos->names, i+1))->expr)->expr; - } - *next = &new_clast_assignment(NULL, e)->stmt; - next = &(*next)->next; - } - - return a; -} - - -/** - * clast_bound_from_constraint function: - * This function returns a clast_expr containing the printing of the - * 'right part' of a constraint according to an element. - * For instance, for the constraint -3*i + 2*j - M >=0 and the element j, - * we have j >= (3*i + M)/2. As we are looking for integral solutions, this - * function should return 'ceild(3*i+M,2)'. - * - matrix is the polyhedron containing all the constraints, - * - line_num is the line number in domain of the constraint we want to print, - * - level is the column number in domain of the element we want to use, - * - names structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 2nd 2001: first version. - * - June 27th 2003: 64 bits version ready. - */ -struct clast_expr *clast_bound_from_constraint(CloogConstraint *constraint, - int level, CloogNames *names) -{ - int i, sign, nb_elts=0, len; - cloog_int_t *line, numerator, denominator, temp, division; - struct clast_expr *e = NULL; - struct cloog_vec *line_vector; - - len = cloog_constraint_total_dimension(constraint) + 2; - line_vector = cloog_vec_alloc(len); - line = line_vector->p; - cloog_constraint_copy_coefficients(constraint, line+1); - cloog_int_init(temp); - cloog_int_init(numerator); - cloog_int_init(denominator); - - if (!cloog_int_is_zero(line[level])) { - struct clast_reduction *r; - /* Maybe we need to invert signs in such a way that the element sign is>0.*/ - sign = -cloog_int_sgn(line[level]); - - for (i = 1, nb_elts = 0; i <= len - 1; ++i) - if (i != level && !cloog_int_is_zero(line[i])) - nb_elts++; - r = new_clast_reduction(clast_red_sum, nb_elts); - nb_elts = 0; - - /* First, we have to print the iterators and the parameters. */ - for (i = 1; i <= len - 2; i++) { - struct clast_expr *v; - - if (i == level || cloog_int_is_zero(line[i])) - continue; - - v = cloog_constraint_variable_expr(constraint, i, names); - - if (sign == -1) - cloog_int_neg(temp,line[i]); - else - cloog_int_set(temp,line[i]); - - r->elts[nb_elts++] = &new_clast_term(temp, v)->expr; - } - - if (sign == -1) { - cloog_int_neg(numerator, line[len - 1]); - cloog_int_set(denominator, line[level]); - } - else { - cloog_int_set(numerator, line[len - 1]); - cloog_int_neg(denominator, line[level]); - } - - /* Finally, the constant, and the final printing. */ - if (nb_elts) { - if (!cloog_int_is_zero(numerator)) - r->elts[nb_elts++] = &new_clast_term(numerator, NULL)->expr; - - if (!cloog_int_is_one(line[level]) && !cloog_int_is_neg_one(line[level])) - { if (!cloog_constraint_is_equality(constraint)) - { if (cloog_int_is_pos(line[level])) - e = &new_clast_binary(clast_bin_cdiv, &r->expr, denominator)->expr; - else - e = &new_clast_binary(clast_bin_fdiv, &r->expr, denominator)->expr; - } else - e = &new_clast_binary(clast_bin_div, &r->expr, denominator)->expr; - } - else - e = &r->expr; - } else { - free_clast_reduction(r); - if (cloog_int_is_zero(numerator)) - e = &new_clast_term(numerator, NULL)->expr; - else - { if (!cloog_int_is_one(denominator)) - { if (!cloog_constraint_is_equality(constraint)) { /* useful? */ - if (cloog_int_is_divisible_by(numerator, denominator)) { - cloog_int_divexact(temp, numerator, denominator); - e = &new_clast_term(temp, NULL)->expr; - } - else { - cloog_int_init(division); - cloog_int_tdiv_q(division, numerator, denominator); - if (cloog_int_is_neg(numerator)) { - if (cloog_int_is_pos(line[level])) { - /* nb<0 need max */ - e = &new_clast_term(division, NULL)->expr; - } else { - /* nb<0 need min */ - cloog_int_sub_ui(temp, division, 1); - e = &new_clast_term(temp, NULL)->expr; - } - } - else - { if (cloog_int_is_pos(line[level])) - { /* nb>0 need max */ - cloog_int_add_ui(temp, division, 1); - e = &new_clast_term(temp, NULL)->expr; - } - else - /* nb>0 need min */ - e = &new_clast_term(division, NULL)->expr; - } - cloog_int_clear(division); - } - } - else - e = &new_clast_binary(clast_bin_div, - &new_clast_term(numerator, NULL)->expr, - denominator)->expr; - } - else - e = &new_clast_term(numerator, NULL)->expr; - } - } - } - - cloog_vec_free(line_vector); - - cloog_int_clear(temp); - cloog_int_clear(numerator); - cloog_int_clear(denominator); - - return e; -} - - -/* Temporary structure for communication between clast_minmax and - * its cloog_constraint_set_foreach_constraint callback functions. - */ -struct clast_minmax_data { - int level; - int max; - int guard; - int lower_bound; - int no_earlier; - CloogInfos *infos; - int n; - struct clast_reduction *r; -}; - - -/* Should constraint "c" be considered by clast_minmax? - * - * If d->no_earlier is set, then the constraint may not involve - * any earlier variables. - */ -static int valid_bound(CloogConstraint *c, struct clast_minmax_data *d) -{ - int i; - - if (d->max && !cloog_constraint_is_lower_bound(c, d->level - 1)) - return 0; - if (!d->max && !cloog_constraint_is_upper_bound(c, d->level - 1)) - return 0; - if (cloog_constraint_is_equality(c)) - return 0; - if (d->guard && cloog_constraint_involves(c, d->guard - 1)) - return 0; - - if (d->no_earlier) - for (i = 0; i < d->level - 1; ++i) - if (cloog_constraint_involves(c, i)) - return 0; - - return 1; -} - - -/* Increment n for each bound that should be considered by clast_minmax. - */ -static int count_bounds(CloogConstraint *c, void *user) -{ - struct clast_minmax_data *d = (struct clast_minmax_data *) user; - - if (!valid_bound(c, d)) - return 0; - - d->n++; - - return 0; -} - - -/* Update the given lower bound based on stride information, - * for those cases where the stride offset is represented by - * a constraint. - * Note that cloog_loop_stride may have already performed a - * similar update of the lower bounds, but the updated lower - * bounds may have been eliminated because they are redundant - * by definition. On the other hand, performing the update - * on an already updated constraint is an identity operation - * and is therefore harmless. - */ -static CloogConstraint *update_lower_bound_c(CloogConstraint *c, int level, - CloogStride *stride) -{ - if (!stride->constraint) - return c; - return cloog_constraint_stride_lower_bound(c, level, stride); -} - - -/* Update the given lower bound based on stride information. - * If the stride offset is represented by a constraint, - * then we have already performed the update in update_lower_bound_c. - * Otherwise, the original lower bound is known to be a constant. - * If the bound has already been updated and it just happens - * to be a constant, then this function performs an identity - * operation on the constant. - */ -static void update_lower_bound(struct clast_expr *expr, int level, - CloogStride *stride) -{ - struct clast_term *t; - if (stride->constraint) - return; - if (expr->type != clast_expr_term) - return; - t = (struct clast_term *)expr; - if (t->var) - return; - cloog_int_sub(t->val, t->val, stride->offset); - cloog_int_cdiv_q(t->val, t->val, stride->stride); - cloog_int_mul(t->val, t->val, stride->stride); - cloog_int_add(t->val, t->val, stride->offset); -} - - -/* Add all relevant bounds to r->elts and update lower bounds - * based on stride information. - */ -static int collect_bounds(CloogConstraint *c, void *user) -{ - struct clast_minmax_data *d = (struct clast_minmax_data *) user; - - if (!valid_bound(c, d)) - return 0; - - c = cloog_constraint_copy(c); - - if (d->lower_bound && d->infos->stride[d->level - 1]) - c = update_lower_bound_c(c, d->level, d->infos->stride[d->level - 1]); - - d->r->elts[d->n] = clast_bound_from_constraint(c, d->level, - d->infos->names); - if (d->lower_bound && d->infos->stride[d->level - 1]) { - update_lower_bound(d->r->elts[d->n], d->level, - d->infos->stride[d->level - 1]); - } - - cloog_constraint_release(c); - - d->n++; - - return 0; -} - - -/** - * clast_minmax function: - * This function returns a clast_expr containing the printing of a minimum or a - * maximum of the 'right parts' of all constraints according to an element. - * For instance consider the constraints: - * -3*i +2*j -M >= 0 - * 2*i +j >= 0 - * -i -j +2*M >= 0 - * if we are looking for the minimum for the element j, the function should - * return 'max(ceild(3*i+M,2),-2*i)'. - * - constraints is the constraints, - * - level is the column number in domain of the element we want to use, - * - max is a boolean set to 1 if we are looking for a maximum, 0 for a minimum, - * - guard is set to 0 if there is no guard, and set to the level of the element - * with a guard otherwise (then the function gives the max or the min only - * for the constraint where the guarded coefficient is 0), - * - lower is set to 1 if the maximum is to be used a lower bound on a loop - * - no_earlier is set if no constraints should be used that involve - * earlier dimensions, - * - the infos structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 2nd 2001: first version. - */ -static struct clast_expr *clast_minmax(CloogConstraintSet *constraints, - int level, int max, int guard, - int lower_bound, int no_earlier, - CloogInfos *infos) -{ - struct clast_minmax_data data = { level, max, guard, lower_bound, - no_earlier, infos }; - - data.n = 0; - - cloog_constraint_set_foreach_constraint(constraints, count_bounds, &data); - - if (!data.n) - return NULL; - data.r = new_clast_reduction(max ? clast_red_max : clast_red_min, data.n); - - data.n = 0; - cloog_constraint_set_foreach_constraint(constraints, collect_bounds, &data); - - clast_reduction_sort(data.r); - return &data.r->expr; -} - - -/** - * Insert modulo guards defined by existentially quantified dimensions, - * not involving the given level. - * - * This function is called from within insert_guard. - * Any constraint used in constructing a modulo guard is removed - * from the constraint set to avoid insert_guard - * adding a duplicate (pair of) constraint(s). - * - * Return the updated CloogConstraintSet. - */ -static CloogConstraintSet *insert_extra_modulo_guards( - CloogConstraintSet *constraints, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int i; - int nb_iter; - int total_dim; - CloogConstraint *upper, *lower; - - total_dim = cloog_constraint_set_total_dimension(constraints); - nb_iter = cloog_constraint_set_n_iterators(constraints, - infos->names->nb_parameters); - - for (i = total_dim - infos->names->nb_parameters; i >= nb_iter + 1; i--) { - if (cloog_constraint_is_valid(upper = - cloog_constraint_set_defining_equality(constraints, i))) { - if (!level || (nb_iter < level) || - !cloog_constraint_involves(upper, level-1)) { - insert_modulo_guard(upper, - cloog_constraint_invalid(), i, next, infos); - constraints = cloog_constraint_set_drop_constraint(constraints, - upper); - } - cloog_constraint_release(upper); - } else if (cloog_constraint_is_valid(upper = - cloog_constraint_set_defining_inequalities(constraints, - i, &lower, infos->names->nb_parameters))) { - if (!level || (nb_iter < level) || - !cloog_constraint_involves(upper, level-1)) { - insert_modulo_guard(upper, lower, i, next, infos); - constraints = cloog_constraint_set_drop_constraint(constraints, - upper); - constraints = cloog_constraint_set_drop_constraint(constraints, - lower); - } - cloog_constraint_release(upper); - cloog_constraint_release(lower); - } - } - - return constraints; -} - - -/* Temporary structure for communication between insert_guard and - * its cloog_constraint_set_foreach_constraint callback function. - */ -struct clast_guard_data { - int level; - CloogInfos *infos; - int n; - int i; - int nb_iter; - CloogConstraintSet *copy; - struct clast_guard *g; - - int min; - int max; -}; - - -static int guard_count_bounds(CloogConstraint *c, void *user) -{ - struct clast_guard_data *d = (struct clast_guard_data *) user; - - d->n++; - - return 0; -} - - -/* Insert a guard, if necesessary, for constraint j. - * - * If the constraint involves any earlier dimensions, then we have - * already considered it during a previous iteration over the constraints. - * - * If we have already generated a min [max] for the current level d->i - * and if the current constraint is an upper [lower] bound, then we - * can skip the constraint as it will already have been used - * in that previously generated min [max]. - */ -static int insert_guard_constraint(CloogConstraint *j, void *user) -{ - int i; - struct clast_guard_data *d = (struct clast_guard_data *) user; - int minmax = -1; - int individual_constraint; - struct clast_expr *v; - struct clast_term *t; - - if (!cloog_constraint_involves(j, d->i - 1)) - return 0; - - for (i = 0; i < d->i - 1; ++i) - if (cloog_constraint_involves(j, i)) - return 0; - - if (d->level && d->nb_iter >= d->level && - cloog_constraint_involves(j, d->level - 1)) - return 0; - - individual_constraint = !d->level || cloog_constraint_is_equality(j); - if (!individual_constraint) { - if (d->max && cloog_constraint_is_lower_bound(j, d->i - 1)) - return 0; - if (d->min && cloog_constraint_is_upper_bound(j, d->i - 1)) - return 0; - } - - v = cloog_constraint_variable_expr(j, d->i, d->infos->names); - d->g->eq[d->n].LHS = &(t = new_clast_term(d->infos->state->one, v))->expr; - if (individual_constraint) { - /* put the "denominator" in the LHS */ - cloog_constraint_coefficient_get(j, d->i - 1, &t->val); - cloog_constraint_coefficient_set(j, d->i - 1, d->infos->state->one); - if (cloog_int_is_neg(t->val)) { - cloog_int_neg(t->val, t->val); - cloog_constraint_coefficient_set(j, d->i - 1, d->infos->state->negone); - } - if (d->level || cloog_constraint_is_equality(j)) - d->g->eq[d->n].sign = 0; - else if (cloog_constraint_is_lower_bound(j, d->i - 1)) - d->g->eq[d->n].sign = 1; - else - d->g->eq[d->n].sign = -1; - d->g->eq[d->n].RHS = clast_bound_from_constraint(j, d->i, d->infos->names); - } else { - int guarded; - - if (cloog_constraint_is_lower_bound(j, d->i - 1)) { - minmax = 1; - d->max = 1; - d->g->eq[d->n].sign = 1; - } else { - minmax = 0; - d->min = 1; - d->g->eq[d->n].sign = -1; - } - - guarded = (d->nb_iter >= d->level) ? d->level : 0 ; - d->g->eq[d->n].RHS = clast_minmax(d->copy, d->i, minmax, guarded, 0, 1, - d->infos); - } - d->n++; - - return 0; -} - - -/** - * insert_guard function: - * This function inserts a guard in the clast. - * A guard on an element (level) is : - * -> the conjunction of all the existing constraints where the coefficient of - * this element is 0 if the element is an iterator, - * -> the conjunction of all the existing constraints if the element isn't an - * iterator. - * For instance, considering these constraints and the element j: - * -3*i +2*j -M >= 0 - * 2*i +M >= 0 - * this function should return 'if (2*i+M>=0) {'. - * - matrix is the polyhedron containing all the constraints, - * - level is the column number of the element in matrix we want to use, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 3rd 2001: first version. - * - November 14th 2001: a lot of 'purifications'. - * - July 31th 2002: (debug) some guard parts are no more redundants. - * - August 12th 2002: polyhedra union ('or' conditions) are now supported. - * - October 27th 2005: polyhedra union ('or' conditions) are no more supported - * (the need came from loop_simplify that may result in - * domain unions, now it should be fixed directly in - * cloog_loop_simplify). - */ -static void insert_guard(CloogConstraintSet *constraints, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int total_dim; - struct clast_guard_data data = { level, infos, 0 }; - - if (!constraints) - return; - - data.copy = cloog_constraint_set_copy(constraints); - - data.copy = insert_extra_modulo_guards(data.copy, level, next, infos); - - cloog_constraint_set_foreach_constraint(constraints, - guard_count_bounds, &data); - - data.g = new_clast_guard(data.n); - data.n = 0; - - /* Well, it looks complicated because I wanted to have a particular, more - * readable, ordering, obviously this function may be far much simpler ! - */ - data.nb_iter = cloog_constraint_set_n_iterators(constraints, - infos->names->nb_parameters); - - /* We search for guard parts. */ - total_dim = cloog_constraint_set_total_dimension(constraints); - for (data.i = 1; data.i <= total_dim; data.i++) { - data.min = 0; - data.max = 0; - cloog_constraint_set_foreach_constraint(data.copy, - insert_guard_constraint, &data); - } - - cloog_constraint_set_free(data.copy); - - data.g->n = data.n; - if (data.n) { - clast_guard_sort(data.g); - **next = &data.g->stmt; - *next = &data.g->then; - } else - free_clast_stmt(&data.g->stmt); -} - -/** - * Check if the constant "cst" satisfies the modulo guard that - * would be introduced by insert_computed_modulo_guard. - * The constant is assumed to have been reduced prior to calling - * this function. - */ -static int constant_modulo_guard_is_satisfied(CloogConstraint *lower, - cloog_int_t bound, cloog_int_t cst) -{ - if (cloog_constraint_is_valid(lower)) - return cloog_int_le(cst, bound); - else - return cloog_int_is_zero(cst); -} - -/** - * Insert a modulo guard "r % mod == 0" or "r % mod <= bound", - * depending on whether lower represents a valid constraint. - */ -static void insert_computed_modulo_guard(struct clast_reduction *r, - CloogConstraint *lower, cloog_int_t mod, cloog_int_t bound, - struct clast_stmt ***next) -{ - struct clast_expr *e; - struct clast_guard *g; - - e = &new_clast_binary(clast_bin_mod, &r->expr, mod)->expr; - g = new_clast_guard(1); - if (!cloog_constraint_is_valid(lower)) { - g->eq[0].LHS = e; - cloog_int_set_si(bound, 0); - g->eq[0].RHS = &new_clast_term(bound, NULL)->expr; - g->eq[0].sign = 0; - } else { - g->eq[0].LHS = e; - g->eq[0].RHS = &new_clast_term(bound, NULL)->expr; - g->eq[0].sign = -1; - } - - **next = &g->stmt; - *next = &g->then; -} - - -/* Try and eliminate coefficients from a modulo constraint based on - * stride information of an earlier level. - * The modulo of the constraint being constructed is "m". - * The stride information at level "level" is given by "stride" - * and indicated that the iterator i at level "level" is equal to - * some expression modulo stride->stride. - * If stride->stride is a multiple of "m' then i is also equal to - * the expression modulo m and so we can eliminate the coefficient of i. - * - * If stride->constraint is NULL, then i has a constant value modulo m, stored - * stride->offset. We simply multiply this constant with the coefficient - * of i and add the result to the constant term, reducing it modulo m. - * - * If stride->constraint is not NULL, then it is a constraint of the form - * - * e + k i = s a - * - * with s equal to stride->stride, e an expression in terms of the - * parameters and earlier iterators and a some arbitrary expression - * in terms of existentially quantified variables. - * stride->factor is a value f such that f * k = -1 mod s. - * Adding stride->constraint f * c times to the current modulo constraint, - * with c the coefficient of i eliminates i in favor of parameters and - * earlier variables. - */ -static void eliminate_using_stride_constraint(cloog_int_t *line, int len, - int nb_iter, CloogStride *stride, int level, cloog_int_t m) -{ - if (!stride) - return; - if (!cloog_int_is_divisible_by(stride->stride, m)) - return; - - if (stride->constraint) { - int i, s_len; - cloog_int_t t, v; - - cloog_int_init(t); - cloog_int_init(v); - cloog_int_mul(t, line[level], stride->factor); - for (i = 1; i < level; ++i) { - cloog_constraint_coefficient_get(stride->constraint, - i - 1, &v); - cloog_int_addmul(line[i], t, v); - cloog_int_fdiv_r(line[i], line[i], m); - } - s_len = cloog_constraint_total_dimension(stride->constraint)+2; - for (i = nb_iter + 1; i <= len - 2; ++i) { - cloog_constraint_coefficient_get(stride->constraint, - i - (len - s_len) - 1, &v); - cloog_int_addmul(line[i], t, v); - cloog_int_fdiv_r(line[i], line[i], m); - } - cloog_constraint_constant_get(stride->constraint, &v); - cloog_int_addmul(line[len - 1], t, v); - cloog_int_fdiv_r(line[len - 1], line[len - 1], m); - cloog_int_clear(v); - cloog_int_clear(t); - } else { - cloog_int_addmul(line[len - 1], line[level], stride->offset); - cloog_int_fdiv_r(line[len - 1], line[len - 1], m); - } - - cloog_int_set_si(line[level], 0); -} - - -/* Temporary structure for communication between insert_modulo_guard and - * its cloog_constraint_set_foreach_constraint callback function. - */ -struct clast_modulo_guard_data { - CloogConstraint *lower; - int level; - struct clast_stmt ***next; - CloogInfos *infos; - int empty; - cloog_int_t val, bound; -}; - - -/* Insert a modulo guard for constraint c. - * The constraint may be either an equality or an inequality. - * Since this function returns -1, it is only called on a single constraint. - * In case of an inequality, the constraint is usually an upper bound - * on d->level. However, if this variable is an existentially - * quantified variable, the upper bound constraint may get removed - * as trivially holding and then this function is called with - * a lower bound instead. In this case, we need to adjust the constraint - * based on the sum of the constant terms of the lower and upper bound - * stored in d->bound. - */ -static int insert_modulo_guard_constraint(CloogConstraint *c, void *user) -{ - struct clast_modulo_guard_data *d = (struct clast_modulo_guard_data *) user; - int level = d->level; - CloogInfos *infos = d->infos; - int i, nb_elts = 0, len, len2, nb_iter, nb_par; - int constant; - struct cloog_vec *line_vector; - cloog_int_t *line; - - len = cloog_constraint_total_dimension(c) + 2; - len2 = cloog_equal_total_dimension(infos->equal) + 2; - nb_par = infos->names->nb_parameters; - nb_iter = len - 2 - nb_par; - - line_vector = cloog_vec_alloc(len); - line = line_vector->p; - cloog_constraint_copy_coefficients(c, line + 1); - - if (cloog_int_is_pos(line[level])) { - cloog_seq_neg(line + 1, line + 1, len - 1); - if (!cloog_constraint_is_equality(c)) - cloog_int_add(line[len - 1], line[len - 1], d->bound); - } - cloog_int_neg(line[level], line[level]); - assert(cloog_int_is_pos(line[level])); - - nb_elts = 0; - for (i = 1; i <= len-1; ++i) { - if (i == level) - continue; - cloog_int_fdiv_r(line[i], line[i], line[level]); - if (cloog_int_is_zero(line[i])) - continue; - if (i == len-1) - continue; - - nb_elts++; - } - - if (nb_elts || !cloog_int_is_zero(line[len-1])) { - struct clast_reduction *r; - const char *name; - - r = new_clast_reduction(clast_red_sum, nb_elts + 1); - nb_elts = 0; - - /* First, the modulo guard : the iterators... */ - i = level - 1; - if (i > infos->stride_level) - i = infos->stride_level; - for (; i >= 1; --i) - eliminate_using_stride_constraint(line, len, nb_iter, - infos->stride[i - 1], i, line[level]); - for (i=1;i<=nb_iter;i++) { - if (i == level || cloog_int_is_zero(line[i])) - continue; - - name = cloog_names_name_at_level(infos->names, i); - - r->elts[nb_elts++] = &new_clast_term(line[i], - &new_clast_name(name)->expr)->expr; - } - - /* ...the parameters... */ - for (i=nb_iter+1;i<=len-2;i++) { - if (cloog_int_is_zero(line[i])) - continue; - - name = infos->names->parameters[i-nb_iter-1] ; - r->elts[nb_elts++] = &new_clast_term(line[i], - &new_clast_name(name)->expr)->expr; - } - - constant = nb_elts == 0; - /* ...the constant. */ - if (!cloog_int_is_zero(line[len-1])) - r->elts[nb_elts++] = &new_clast_term(line[len-1], NULL)->expr; - - /* our initial computation may have been an overestimate */ - r->n = nb_elts; - - if (constant) { - d->empty = !constant_modulo_guard_is_satisfied(d->lower, d->bound, - line[len - 1]); - free_clast_reduction(r); - } else - insert_computed_modulo_guard(r, d->lower, line[level], d->bound, - d->next); - } - - cloog_vec_free(line_vector); - - return -1; -} - - -/** - * insert_modulo_guard: - * This function inserts a modulo guard corresponding to an equality - * or a pair of inequalities. - * Returns 0 if the modulo guard is discovered to be unsatisfiable. - * - * See insert_equation. - * - matrix is the polyhedron containing all the constraints, - * - upper and lower are the line numbers of the constraint in matrix - * we want to print; in particular, if we want to print an equality, - * then lower == -1 and upper is the row of the equality; if we want - * to print an inequality, then upper is the row of the upper bound - * and lower in the row of the lower bound - * - level is the column number of the element in matrix we want to use, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - */ -static int insert_modulo_guard(CloogConstraint *upper, - CloogConstraint *lower, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int nb_par; - CloogConstraintSet *set; - struct clast_modulo_guard_data data = { lower, level, next, infos, 0 }; - - cloog_int_init(data.val); - cloog_constraint_coefficient_get(upper, level-1, &data.val); - if (cloog_int_is_one(data.val) || cloog_int_is_neg_one(data.val)) { - cloog_int_clear(data.val); - return 1; - } - - nb_par = infos->names->nb_parameters; - - cloog_int_init(data.bound); - /* Check if would be emitting the redundant constraint mod(e,m) <= m-1 */ - if (cloog_constraint_is_valid(lower)) { - cloog_constraint_constant_get(upper, &data.val); - cloog_constraint_constant_get(lower, &data.bound); - cloog_int_add(data.bound, data.val, data.bound); - cloog_constraint_coefficient_get(lower, level-1, &data.val); - cloog_int_sub_ui(data.val, data.val, 1); - if (cloog_int_eq(data.val, data.bound)) { - cloog_int_clear(data.val); - cloog_int_clear(data.bound); - return 1; - } - } - - if (cloog_constraint_needs_reduction(upper, level)) { - set = cloog_constraint_set_for_reduction(upper, lower); - set = cloog_constraint_set_reduce(set, level, infos->equal, - nb_par, &data.bound); - cloog_constraint_set_foreach_constraint(set, - insert_modulo_guard_constraint, &data); - cloog_constraint_set_free(set); - } else - insert_modulo_guard_constraint(upper, &data); - - cloog_int_clear(data.val); - cloog_int_clear(data.bound); - - return !data.empty; -} - - -/** - * We found an equality or a pair of inequalities identifying - * a loop with a single iteration, but the user wants us to generate - * a loop anyway, so we do it here. - */ -static int insert_equation_as_loop(CloogDomain *domain, CloogConstraint *upper, - CloogConstraint *lower, int level, struct clast_stmt ***next, - CloogInfos *infos) -{ - const char *iterator = cloog_names_name_at_level(infos->names, level); - struct clast_expr *e1, *e2; - struct clast_for *f; - - e2 = clast_bound_from_constraint(upper, level, infos->names); - if (!cloog_constraint_is_valid(lower)) - e1 = clast_expr_copy(e2); - else - e1 = clast_bound_from_constraint(lower, level, infos->names); - - f = new_clast_for(domain, iterator, e1, e2, infos->stride[level-1]); - **next = &f->stmt; - *next = &f->body; - - cloog_constraint_release(lower); - cloog_constraint_release(upper); - return 1; -} - - -/** - * insert_equation function: - * This function inserts an equality - * constraint according to an element in the clast. - * Returns 1 if the calling function should recurse into inner loops. - * - * An equality can be preceded by a 'modulo guard'. - * For instance, consider the constraint i -2*j = 0 and the - * element j: pprint_equality should return 'if(i%2==0) { j = i/2 ;'. - * - matrix is the polyhedron containing all the constraints, - * - num is the line number of the constraint in matrix we want to print, - * - level is the column number of the element in matrix we want to use, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 13th 2001: first version. - * - June 26th 2003: simplification of the modulo guards (remove parts such as - * modulo is 0, compare vivien or vivien2 with a previous - * version for an idea). - * - June 29th 2003: non-unit strides support. - * - July 14th 2003: (debug) no more print the constant in the modulo guard when - * it was previously included in a stride calculation. - */ -static int insert_equation(CloogDomain *domain, CloogConstraint *upper, - CloogConstraint *lower, int level, struct clast_stmt - ***next, CloogInfos *infos) -{ - struct clast_expr *e; - struct clast_assignment *ass; - - if (!infos->options->otl) - return insert_equation_as_loop(domain, upper, lower, level, next, infos); - - if (!insert_modulo_guard(upper, lower, level, next, infos)) { - cloog_constraint_release(lower); - cloog_constraint_release(upper); - - return 0; - } - - if (cloog_constraint_is_valid(lower) || - !clast_equal_add(infos->equal, NULL, level, upper, infos)) - { /* Finally, the equality. */ - - /* If we have to make a block by dimension, we start the block. Function - * pprint knows if there is an equality, if this is the case, it checks - * for the same following condition to close the brace. - */ - if (infos->options->block) { - struct clast_block *b = new_clast_block(); - **next = &b->stmt; - *next = &b->body; - } - - e = clast_bound_from_constraint(upper, level, infos->names); - ass = new_clast_assignment(cloog_names_name_at_level(infos->names, level), e); - - **next = &ass->stmt; - *next = &(**next)->next; - } - - cloog_constraint_release(lower); - cloog_constraint_release(upper); - - return 1; -} - - -/** - * Insert a loop that is executed exactly once as an assignment. - * In particular, the loop - * - * for (i = e; i <= e; ++i) { - * S; - * } - * - * is generated as - * - * i = e; - * S; - * - */ -static void insert_otl_for(CloogConstraintSet *constraints, int level, - struct clast_expr *e, struct clast_stmt ***next, CloogInfos *infos) -{ - const char *iterator; - - iterator = cloog_names_name_at_level(infos->names, level); - - if (!clast_equal_add(infos->equal, constraints, level, - cloog_constraint_invalid(), infos)) { - struct clast_assignment *ass; - if (infos->options->block) { - struct clast_block *b = new_clast_block(); - **next = &b->stmt; - *next = &b->body; - } - ass = new_clast_assignment(iterator, e); - **next = &ass->stmt; - *next = &(**next)->next; - } else { - free_clast_expr(e); - } -} - - -/** - * Insert a loop that is executed at most once as an assignment followed - * by a guard. In particular, the loop - * - * for (i = e1; i <= e2; ++i) { - * S; - * } - * - * is generated as - * - * i = e1; - * if (i <= e2) { - * S; - * } - * - */ -static void insert_guarded_otl_for(CloogConstraintSet *constraints, int level, - struct clast_expr *e1, struct clast_expr *e2, - struct clast_stmt ***next, CloogInfos *infos) -{ - const char *iterator; - struct clast_assignment *ass; - struct clast_guard *guard; - - iterator = cloog_names_name_at_level(infos->names, level); - - if (infos->options->block) { - struct clast_block *b = new_clast_block(); - **next = &b->stmt; - *next = &b->body; - } - ass = new_clast_assignment(iterator, e1); - **next = &ass->stmt; - *next = &(**next)->next; - - guard = new_clast_guard(1); - guard->eq[0].sign = -1; - guard->eq[0].LHS = &new_clast_term(infos->state->one, - &new_clast_name(iterator)->expr)->expr; - guard->eq[0].RHS = e2; - - **next = &guard->stmt; - *next = &guard->then; -} - - -/** - * insert_for function: - * This function inserts a for loop in the clast. - * Returns 1 if the calling function should recurse into inner loops. - * - * A loop header according to an element is the conjunction of a minimum and a - * maximum on a given element (they give the loop bounds). - * For instance, considering these constraints and the element j: - * i + j -9*M >= 0 - * -j +5*M >= 0 - * j -4*M >= 0 - * this function should return 'for (j=max(-i+9*M,4*M),j<=5*M;j++) {'. - * - constraints contains all constraints, - * - level is the column number of the element in matrix we want to use, - * - otl is set if the loop is executed at most once, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - */ -static int insert_for(CloogDomain *domain, CloogConstraintSet *constraints, - int level, int otl, struct clast_stmt ***next, - CloogInfos *infos) -{ - const char *iterator; - struct clast_expr *e1; - struct clast_expr *e2; - - e1 = clast_minmax(constraints, level, 1, 0, 1, 0, infos); - e2 = clast_minmax(constraints, level, 0, 0, 0, 0, infos); - - if (clast_expr_is_bigger_constant(e1, e2)) { - free_clast_expr(e1); - free_clast_expr(e2); - return 0; - } - - /* If min and max are not equal there is a 'for' else, there is a '='. - * In the special case e1 = e2 = NULL, this is an infinite loop - * so this is not a '='. - */ - if (e1 && e2 && infos->options->otl && clast_expr_equal(e1, e2)) { - free_clast_expr(e2); - insert_otl_for(constraints, level, e1, next, infos); - } else if (otl) { - insert_guarded_otl_for(constraints, level, e1, e2, next, infos); - } else { - struct clast_for *f; - iterator = cloog_names_name_at_level(infos->names, level); - - f = new_clast_for(domain, iterator, e1, e2, infos->stride[level-1]); - **next = &f->stmt; - *next = &f->body; - } - - return 1; -} - - -/** - * insert_block function: - * This function inserts a statement block. - * - block is the statement block, - * - level is the number of loops enclosing the statement, - * - the infos structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - September 21th 2003: first version (pick from pprint function). - */ -static void insert_block(CloogDomain *domain, CloogBlock *block, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - CloogStatement * statement ; - struct clast_stmt *subs; - - if (!block) - return; - - for (statement = block->statement; statement; statement = statement->next) { - CloogStatement *s_next = statement->next; - - subs = clast_equal(level,infos); - - statement->next = NULL; - **next = &new_clast_user_stmt(domain, statement, subs)->stmt; - statement->next = s_next; - *next = &(**next)->next; - } -} - - -/** - * insert_loop function: - * This function converts the content of a CloogLoop structure (loop) into a - * clast_stmt (inserted at **next). - * The iterator (level) of - * the current loop is given by 'level': this is the column number of the - * domain corresponding to the current loop iterator. The data of a loop are - * written in this order: - * 1. The guard of the loop, i.e. each constraint in the domain that does not - * depend on the iterator (when the entry in the column 'level' is 0). - * 2. The iteration domain of the iterator, given by the constraints in the - * domain depending on the iterator, i.e.: - * * an equality if the iterator has only one value (possibly preceded by - * a guard verifying if this value is integral), *OR* - * * a loop from the minimum possible value of the iterator to the maximum - * possible value. - * 3. The included statement block. - * 4. The inner loops (recursive call). - * 5. The following loops (recursive call). - * - level is the recursion level or the iteration level that we are printing, - * - the infos structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 2nd 2001: first version. - * - March 6th 2003: infinite domain support. - * - April 19th 2003: (debug) NULL loop support. - * - June 29th 2003: non-unit strides support. - * - April 28th 2005: (debug) level is level+equality when print statement! - * - June 16th 2005: (debug) the N. Vasilache normalization step has been - * added to avoid iteration duplication (see DaeGon Kim - * bug in cloog_program_generate). Try vasilache.cloog - * with and without the call to cloog_polylib_matrix_normalize, - * using -f 8 -l 9 options for an idea. - * - September 15th 2005: (debug) don't close equality braces when unnecessary. - * - October 16th 2005: (debug) scalar value is saved for next loops. - */ -static void insert_loop(CloogLoop * loop, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int equality = 0; - CloogConstraintSet *constraints, *temp; - struct clast_stmt **top = *next; - CloogConstraint *i, *j; - int empty_loop = 0; - - /* It can happen that loop be NULL when an input polyhedron is empty. */ - if (loop == NULL) - return; - - /* The constraints do not always have a shape that allows us to generate code from it, - * thus we normalize it, we also simplify it with the equalities. - */ - temp = cloog_domain_constraints(loop->domain); - cloog_constraint_set_normalize(temp,level); - constraints = cloog_constraint_set_simplify(temp,infos->equal,level, - infos->names->nb_parameters); - cloog_constraint_set_free(temp); - if (level) { - infos->stride[level - 1] = loop->stride; - infos->stride_level++; - } - - /* First of all we have to print the guard. */ - insert_guard(constraints,level, next, infos); - - if (level && cloog_constraint_set_contains_level(constraints, level, - infos->names->nb_parameters)) { - /* We scan all the constraints to know in which case we are : - * [[if] equation] or [for]. - */ - if (cloog_constraint_is_valid(i = - cloog_constraint_set_defining_equality(constraints, level))) { - empty_loop = !insert_equation(loop->unsimplified, i, - cloog_constraint_invalid(), level, next, - infos); - equality = 1 ; - } else if (cloog_constraint_is_valid(i = - cloog_constraint_set_defining_inequalities(constraints, - level, &j, infos->names->nb_parameters))) { - empty_loop = !insert_equation(loop->unsimplified, i, j, level, next, - infos); - } else - empty_loop = !insert_for(loop->unsimplified, constraints, level, - loop->otl, next, infos); - } - - if (!empty_loop) { - /* Finally, if there is an included statement block, print it. */ - insert_block(loop->unsimplified, loop->block, level+equality, next, infos); - - /* Go to the next level. */ - if (loop->inner != NULL) - insert_loop(loop->inner, level+1, next, infos); - } - - if (level) { - cloog_equal_del(infos->equal,level); - infos->stride_level--; - } - cloog_constraint_set_free(constraints); - - /* Go to the next loop on the same level. */ - while (*top) - top = &(*top)->next; - if (loop->next != NULL) - insert_loop(loop->next, level, &top,infos); -} - - -struct clast_stmt *cloog_clast_create(CloogProgram *program, - CloogOptions *options) -{ - CloogInfos *infos = ALLOC(CloogInfos); - int nb_levels; - struct clast_stmt *root = &new_clast_root(program->names)->stmt; - struct clast_stmt **next = &root->next; - - infos->state = options->state; - infos->names = program->names; - infos->options = options; - infos->scaldims = program->scaldims; - infos->nb_scattdims = program->nb_scattdims; - - /* Allocation for the array of strides, there is a +1 since the statement can - * be included inside an external loop without iteration domain. - */ - nb_levels = program->names->nb_scattering+program->names->nb_iterators+1; - infos->stride = ALLOCN(CloogStride *, nb_levels); - infos->stride_level = 0; - - infos->equal = cloog_equal_alloc(nb_levels, - nb_levels, program->names->nb_parameters); - - insert_loop(program->loop, 0, &next, infos); - - cloog_equal_free(infos->equal); - - free(infos->stride); - free(infos); - - return root; -} - - -struct clast_stmt *cloog_clast_create_from_input(CloogInput *input, - CloogOptions *options) -{ - CloogProgram *program; - struct clast_stmt *root; - - program = cloog_program_alloc(input->context, input->ud, options); - free(input); - - program = cloog_program_generate(program, options); - - root = cloog_clast_create(program, options); - cloog_program_free(program); - - return root; -} diff --git a/cloog-0.16.3/source/cloog.c b/cloog-0.16.3/source/cloog.c deleted file mode 100644 index 0a42a6763fd29621dafd935306a030c2327657d2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/cloog.c +++ /dev/null @@ -1,98 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** cloog.c ** - **-------------------------------------------------------------------** - ** First version: october 25th 2001, CLooG's birth date ! ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -# include -# include -# include "../include/cloog/cloog.h" - - -int main(int argv, char * argc[]) -{ CloogProgram * program ; - CloogOptions * options ; - CloogState *state; - FILE * input, * output ; - - state = cloog_state_malloc(); - - /* Options and input/output file setting. */ - cloog_options_read(state, argv, argc, &input, &output, &options); - - /* Reading the program informations. */ - program = cloog_program_read(input,options) ; - fclose(input) ; - - /* Generating and printing the code. */ - program = cloog_program_generate(program,options) ; - if (options->structure) - cloog_program_print(stdout,program) ; - cloog_program_pprint(output,program,options) ; - cloog_program_free(program) ; - - /* Printing the allocation statistics if asked. */ - if (options->leaks) { - fprintf(output,"/* Domains : allocated=%5d, freed=%5d, max=%5d. */\n", - state->domain_allocated, state->domain_freed, state->domain_max); - fprintf(output,"/* Loops : allocated=%5d, freed=%5d, max=%5d. */\n", - state->loop_allocated, state->loop_freed, state->loop_max); - fprintf(output,"/* Statements : allocated=%5d, freed=%5d, max=%5d. */\n", - state->statement_allocated, state->statement_freed, state->statement_max); - fprintf(output,"/* Blocks : allocated=%5d, freed=%5d, max=%5d. */\n", - state->block_allocated, state->block_freed, state->block_max); - } - - /* Inform the user in case of a problem with the allocation statistics. */ - if ((state->domain_allocated != state->domain_freed) || - (state->loop_allocated != state->loop_freed) || - (state->statement_allocated != state->statement_freed) || - (state->block_allocated != state->block_freed)) - { - cloog_msg(options, CLOOG_INFO, - "an internal problem has been detected (it should have" - " no\n consequence on the correctness of the output)." - " Please send (if\n you can) your input file, the first line " - "given by typing 'cloog -v'\n and your full command " - "line call to CLooG including options to\n . Thank you for your participation to get\n" - " CLooG better and safer.\n") ; - } - - cloog_options_free(options) ; - cloog_state_free(state); - fclose(output) ; - return 0; -} - diff --git a/cloog-0.16.3/source/input.c b/cloog-0.16.3/source/input.c deleted file mode 100644 index 1b83a97dfa4a30a56f8932fc4b89741130505a42..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/input.c +++ /dev/null @@ -1,177 +0,0 @@ -#include -#include -#include -#include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) - -static char *next_line(FILE *input, char *line, unsigned len) -{ - char *p; - - do { - if (!(p = fgets(line, len, input))) - return NULL; - while (isspace(*p) && *p != '\n') - ++p; - } while (*p == '#' || *p == '\n'); - - return p; -} - -/** - * Read input from a .cloog file, putting most of the information - * in the returned CloogInput. The chosen language is put in - * options->language. - */ -CloogInput *cloog_input_read(FILE *file, CloogOptions *options) -{ - char line[MAX_STRING]; - char language; - CloogDomain *context; - CloogUnionDomain *ud; - int nb_par; - - /* First of all, we read the language to use. */ - if (!next_line(file, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, "%c", &language) != 1) - cloog_die("Input error.\n"); - - if (language == 'f') - options->language = LANGUAGE_FORTRAN; - else - options->language = LANGUAGE_C; - - /* We then read the context data. */ - context = cloog_domain_read_context(options->state, file); - nb_par = cloog_domain_parameter_dimension(context); - - ud = cloog_union_domain_read(file, nb_par, options); - - return cloog_input_alloc(context, ud); -} - -/** - * Create a CloogInput from a CloogDomain context and a CloogUnionDomain. - */ -CloogInput *cloog_input_alloc(CloogDomain *context, CloogUnionDomain *ud) -{ - CloogInput *input; - - input = ALLOC(CloogInput); - if (!input) - cloog_die("memory overflow.\n"); - - input->context = context; - input->ud = ud; - - return input; -} - -void cloog_input_free(CloogInput *input) -{ - cloog_domain_free(input->context); - cloog_union_domain_free(input->ud); - free(input); -} - -static void print_names(FILE *file, CloogUnionDomain *ud, - enum cloog_dim_type type, const char *name) -{ - int i; - - fprintf(file, "\n%d # %s name(s)\n", ud->name[type] ? 1 : 0, name); - if (!ud->name[type]) - return; - - for (i = 0; i < ud->n_name[type]; i++) - fprintf(file, "%s ", ud->name[type][i]); - - fprintf(file, "\n"); -} - -/** - * Dump the .cloog description of a CloogInput and a CloogOptions data structure - * into a file. The generated .cloog file will contain the same information as - * the data structures. The file can be used to run the cloog program on the - * example. - */ -void cloog_input_dump_cloog(FILE *file, CloogInput *input, CloogOptions *opt) -{ - int i, num_statements; - CloogUnionDomain *ud = input->ud; - CloogNamedDomainList *ndl = ud->domain; - - fprintf(file, - "# CLooG -> CLooG\n" - "# This is an automatic dump of a CLooG input file from a " - "CloogInput data\n" - "# structure.\n\n"); - - /* Language. */ - if (opt->language == LANGUAGE_FORTRAN) { - fprintf(file, "# Language: FORTRAN\n"); - fprintf(file, "f\n\n"); - } else { - fprintf(file, "# Language: C\n"); - fprintf(file, "c\n\n"); - } - - /* Context. */ - fprintf(file, "# Context:\n"); - cloog_domain_print_constraints(file, input->context, 1); - - print_names(file, ud, CLOOG_PARAM, "Parameter"); - - /* Statement number. */ - i = 0; - while (ndl != NULL) { - i++; - ndl = ndl->next; - } - num_statements = i; - fprintf(file, "\n# Statement number:\n%d\n\n", num_statements); - - /* Iteration domains. */ - i = 1; - ndl = ud->domain; - while (ndl != NULL) { - fprintf(file, "# Iteration domain of statement %d (%s).\n", i, - ndl->name); - - cloog_domain_print_constraints(file, ndl->domain, 1); - fprintf(file,"\n0 0 0 # For future options.\n\n"); - - i++; - ndl = ndl->next; - } - - print_names(file, ud, CLOOG_ITER, "Iterator"); - - /* Exit, if no scattering is supplied. */ - if (!ud->domain || !ud->domain->scattering) { - fprintf(file, "# No scattering functions.\n0\n\n"); - return; - } - - /* Scattering relations. */ - fprintf(file, - "# --------------------- SCATTERING --------------------\n"); - - fprintf(file, "%d # Scattering functions\n", num_statements); - - i = 1; - ndl = ud->domain; - while (ndl != NULL) { - fprintf(file, "\n# Scattering of statement %d (%s).\n", i, - ndl->name); - - cloog_scattering_print_constraints(file, ndl->scattering); - - i++; - ndl = ndl->next; - } - - print_names(file, ud, CLOOG_SCAT, "Scattering dimension"); -} diff --git a/cloog-0.16.3/source/int.c b/cloog-0.16.3/source/int.c deleted file mode 100644 index 67f62df077ed39ce34e73808adccf81d6f36536b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/int.c +++ /dev/null @@ -1,177 +0,0 @@ -#include -#include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -#if defined(CLOOG_INT_INT) || \ - defined(CLOOG_INT_LONG) || \ - defined(CLOOG_INT_LONG_LONG) - -cloog_int_t cloog_gcd(cloog_int_t a, cloog_int_t b) -{ - while (a) { - cloog_int_t t = b % a; - b = a; - a = t; - } - if (b < 0) - b = -b; - return b; -} - -#endif - -struct cloog_vec *cloog_vec_alloc(unsigned size) -{ - int i; - struct cloog_vec *vec; - - vec = ALLOC(struct cloog_vec); - if (!vec) - return NULL; - - vec->p = ALLOCN(cloog_int_t, size); - if (!vec->p) - goto error; - vec->size = size; - - for (i = 0; i < size; ++i) - cloog_int_init(vec->p[i]); - - return vec; -error: - free(vec); - return NULL; -} - -void cloog_vec_free(struct cloog_vec *vec) -{ - int i; - - if (!vec) - return; - - for (i = 0; i < vec->size; ++i) - cloog_int_clear(vec->p[i]); - free(vec->p); - free(vec); -} - -void cloog_vec_dump(struct cloog_vec *vec) -{ - int i; - - for (i = 0; i < vec->size; ++i) { - cloog_int_print(stderr, vec->p[i]); - fprintf(stderr, " "); - } - fprintf(stderr, "\n"); -} - -int cloog_seq_first_non_zero(cloog_int_t *p, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - if (!cloog_int_is_zero(p[i])) - return i; - return -1; -} - -void cloog_seq_neg(cloog_int_t *dst, cloog_int_t *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - cloog_int_neg(dst[i], src[i]); -} - -void cloog_seq_cpy(cloog_int_t *dst, cloog_int_t *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - cloog_int_set(dst[i], src[i]); -} - -static void cloog_seq_scale_down(cloog_int_t *dst, cloog_int_t *src, cloog_int_t m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - cloog_int_divexact(dst[i], src[i], m); -} - -void cloog_seq_combine(cloog_int_t *dst, cloog_int_t m1, cloog_int_t *src1, - cloog_int_t m2, cloog_int_t *src2, unsigned len) -{ - int i; - cloog_int_t tmp; - - cloog_int_init(tmp); - for (i = 0; i < len; ++i) { - cloog_int_mul(tmp, m1, src1[i]); - cloog_int_addmul(tmp, m2, src2[i]); - cloog_int_set(dst[i], tmp); - } - cloog_int_clear(tmp); -} - -static int cloog_seq_abs_min_non_zero(cloog_int_t *p, unsigned len) -{ - int i, min = cloog_seq_first_non_zero(p, len); - if (min < 0) - return -1; - for (i = min + 1; i < len; ++i) { - if (cloog_int_is_zero(p[i])) - continue; - if (cloog_int_abs_lt(p[i], p[min])) - min = i; - } - return min; -} - -void cloog_seq_gcd(cloog_int_t *p, unsigned len, cloog_int_t *gcd) -{ - int i, min = cloog_seq_abs_min_non_zero(p, len); - - if (min < 0) { - cloog_int_set_si(*gcd, 0); - return; - } - cloog_int_abs(*gcd, p[min]); - for (i = 0; cloog_int_cmp_si(*gcd, 1) > 0 && i < len; ++i) { - if (i == min) - continue; - if (cloog_int_is_zero(p[i])) - continue; - cloog_int_gcd(*gcd, *gcd, p[i]); - } -} - -int cloog_seq_is_neg(cloog_int_t *p1, cloog_int_t *p2, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) { - if (cloog_int_abs_ne(p1[i], p2[i])) - return 0; - if (cloog_int_is_zero(p1[i])) - continue; - if (cloog_int_eq(p1[i], p2[i])) - return 0; - } - return 1; -} - -void cloog_seq_normalize(cloog_int_t *p, unsigned len) -{ - cloog_int_t gcd; - - if (len == 0) - return; - - cloog_int_init(gcd); - cloog_seq_gcd(p, len, &gcd); - if (!cloog_int_is_zero(gcd) && !cloog_int_is_one(gcd)) - cloog_seq_scale_down(p, p, gcd, len); - cloog_int_clear(gcd); -} diff --git a/cloog-0.16.3/source/isl/backend.c b/cloog-0.16.3/source/isl/backend.c deleted file mode 100644 index 6ddb9f9adcd567014c90a5bd8983724cf4b919fa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/isl/backend.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -/** - * Allocate and initialize full state. - */ -CloogState *cloog_state_malloc(void) -{ - return cloog_isl_state_malloc(NULL); -} - -/** - * Allocate and initialize full state for isl backend. - */ -CloogState *cloog_isl_state_malloc(struct isl_ctx *ctx) -{ - CloogState *state; - int allocated = !ctx; - - state = cloog_core_state_malloc(); - if (!ctx) - ctx = isl_ctx_alloc(); - state->backend = isl_alloc_type(ctx, CloogBackend); - state->backend->ctx = ctx; - state->backend->ctx_allocated = allocated; - return state; -} - -/** - * Free state and backend independent parts. - */ -void cloog_state_free(CloogState *state) -{ - if (state->backend->ctx_allocated) - isl_ctx_free(state->backend->ctx); - free(state->backend); - cloog_core_state_free(state); -} diff --git a/cloog-0.16.3/source/isl/constraints.c b/cloog-0.16.3/source/isl/constraints.c deleted file mode 100644 index 873a0b93e1fc02f45b2b9e57ea82e01d50d7d6a1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/isl/constraints.c +++ /dev/null @@ -1,967 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -CloogConstraintSet *cloog_constraint_set_from_isl_basic_set(struct isl_basic_set *bset) -{ - return (CloogConstraintSet *)bset; -} - -CloogConstraint *cloog_constraint_from_isl_constraint(struct isl_constraint *constraint) -{ - return (CloogConstraint *)constraint; -} - -isl_constraint *cloog_constraint_to_isl(CloogConstraint *constraint) -{ - return (isl_constraint *)constraint; -} - -isl_basic_set *cloog_constraints_set_to_isl(CloogConstraintSet *constraints) -{ - return (isl_basic_set *)constraints; -} - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - - -void cloog_constraint_set_free(CloogConstraintSet *constraints) -{ - isl_basic_set_free(cloog_constraints_set_to_isl(constraints)); -} - - -int cloog_constraint_set_contains_level(CloogConstraintSet *constraints, - int level, int nb_parameters) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_dim(bset, isl_dim_set) >= level; -} - -struct cloog_isl_dim { - enum isl_dim_type type; - int pos; -}; - -static struct cloog_isl_dim basic_set_cloog_dim_to_isl_dim( - __isl_keep isl_basic_set *bset, int pos) -{ - enum isl_dim_type types[] = { isl_dim_set, isl_dim_div, isl_dim_param }; - int i; - struct cloog_isl_dim ci_dim; - - for (i = 0; i < 3; ++i) { - unsigned dim = isl_basic_set_dim(bset, types[i]); - if (pos < dim) { - ci_dim.type = types[i]; - ci_dim.pos = pos; - return ci_dim; - } - pos -= dim; - } - assert(0); -} - -static struct cloog_isl_dim set_cloog_dim_to_isl_dim( - CloogConstraintSet *constraints, int pos) -{ - isl_basic_set *bset; - - bset = cloog_constraints_set_to_isl(constraints); - return basic_set_cloog_dim_to_isl_dim(bset, pos); -} - -/* Check if the variable at position level is defined by an - * equality. If so, return the row number. Otherwise, return -1. - */ -CloogConstraint *cloog_constraint_set_defining_equality( - CloogConstraintSet *constraints, int level) -{ - struct isl_constraint *c; - struct cloog_isl_dim dim; - isl_basic_set *bset; - - bset = cloog_constraints_set_to_isl(constraints); - dim = set_cloog_dim_to_isl_dim(constraints, level - 1); - if (isl_basic_set_has_defining_equality(bset, dim.type, dim.pos, &c)) - return cloog_constraint_from_isl_constraint(c); - else - return NULL; -} - - -struct cloog_isl_other { - int level; - int found; - isl_constraint *u; - isl_constraint *l; -}; - - -/* Set other->found to 1 if the given constraint involves other->level - * and is different from other->u and other->l. - */ -static int check_other_constraint(__isl_take isl_constraint *c, void *user) -{ - struct cloog_isl_other *other = user; - CloogConstraint *cc; - - if (!isl_constraint_is_equal(c, other->l) && - !isl_constraint_is_equal(c, other->u)) { - cc = cloog_constraint_from_isl_constraint(c); - if (cloog_constraint_involves(cc, other->level - 1)) - other->found = 1; - } - - isl_constraint_free(c); - - return other->found ? -1 : 0; -} - - -/* Check if the variable (e) at position level is defined by a - * pair of inequalities - * + -m e + + k1 >= 0 - * <-a, i> + m e + <-b, p> + k2 >= 0 - * with 0 <= k1 + k2 < m - * If so return the row number of the upper bound and set *lower - * to the row number of the lower bound. If not, return -1. - * - * If the variable at position level occurs in any other constraint, - * then we currently return -1. The modulo guard that we would generate - * would still be correct, but we would also need to generate - * guards corresponding to the other constraints, and this has not - * been implemented yet. - */ -CloogConstraint *cloog_constraint_set_defining_inequalities( - CloogConstraintSet *constraints, - int level, CloogConstraint **lower, int nb_par) -{ - struct isl_constraint *u; - struct isl_constraint *l; - struct cloog_isl_dim dim; - struct isl_basic_set *bset; - struct cloog_isl_other other; - - bset = cloog_constraints_set_to_isl(constraints); - dim = set_cloog_dim_to_isl_dim(constraints, level - 1); - if (!isl_basic_set_has_defining_inequalities(bset, dim.type, dim.pos, - &l, &u)) - return cloog_constraint_invalid(); - - other.l = l; - other.u = u; - other.found = 0; - other.level = level; - isl_basic_set_foreach_constraint(bset, &check_other_constraint, &other); - if (other.found) { - isl_constraint_free(l); - isl_constraint_free(u); - *lower = NULL; - return NULL; - } - *lower = cloog_constraint_from_isl_constraint(l); - return cloog_constraint_from_isl_constraint(u); -} - -int cloog_constraint_set_total_dimension(CloogConstraintSet *constraints) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_total_dim(bset); -} - -int cloog_constraint_set_n_iterators(CloogConstraintSet *constraints, int n_par) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_dim(bset, isl_dim_set); -} - - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ - - -/* Equalities are stored inside a Matrix data structure called "equal". - * This matrix has (nb_scattering + nb_iterators + 1) rows (i.e. total - * dimensions + 1, the "+ 1" is because a statement can be included inside an - * external loop without iteration domain), and (nb_scattering + nb_iterators + - * nb_parameters + 2) columns (all unknowns plus the scalar plus the equality - * type). The ith row corresponds to the equality "= 0" for the ith dimension - * iterator. The first column gives the equality type (0: no equality, then - * EQTYPE_* -see pprint.h-). At each recursion of pprint, if an equality for - * the current level is found, the corresponding row is updated. Then the - * equality if it exists is used to simplify expressions (e.g. if we have - * "i+1" while we know that "i=2", we simplify it in "3"). At the end of - * the pprint call, the corresponding row is reset to zero. - */ - -CloogEqualities *cloog_equal_alloc(int n, int nb_levels, int nb_parameters) -{ - int i; - CloogEqualities *equal = ALLOC(CloogEqualities); - - equal->total_dim = nb_levels - 1 + nb_parameters; - equal->n = n; - equal->constraints = ALLOCN(isl_constraint *, n); - equal->types = ALLOCN(int, n); - for (i = 0; i < n; ++i) { - equal->constraints[i] = NULL; - equal->types[i] = EQTYPE_NONE; - } - return equal; -} - -int cloog_equal_total_dimension(CloogEqualities *equal) -{ - return equal->total_dim; -} - -void cloog_equal_free(CloogEqualities *equal) -{ - int i; - - for (i = 0; i < equal->n; ++i) - isl_constraint_free(equal->constraints[i]); - free(equal->constraints); - free(equal->types); - free(equal); -} - -int cloog_equal_count(CloogEqualities *equal) -{ - return equal->n; -} - - -/** - * cloog_constraint_equal_type function : - * This function returns the type of the equality in the constraint (line) of - * (constraints) for the element (level). An equality is 'constant' iff all - * other factors are null except the constant one. It is a 'pure item' iff - * it is equal or opposite to a single variable or parameter. - * Otherwise it is an 'affine expression'. - * For instance: - * i = -13 is constant, i = j, j = -M are pure items, - * j = 2*M, i = j+1, 2*j = M are affine expressions. - * - * - constraints is the matrix of constraints, - * - level is the column number in equal of the element which is 'equal to', - */ -static int cloog_constraint_equal_type(CloogConstraint *cc, int level) -{ - int i; - isl_int c; - int type = EQTYPE_NONE; - struct isl_constraint *constraint = cloog_constraint_to_isl(cc); - - isl_int_init(c); - isl_constraint_get_constant(constraint, &c); - if (!isl_int_is_zero(c)) - type = EQTYPE_CONSTANT; - isl_constraint_get_coefficient(constraint, isl_dim_set, level - 1, &c); - if (!isl_int_is_one(c) && !isl_int_is_negone(c)) - type = EQTYPE_EXAFFINE; - for (i = 0; i < isl_constraint_dim(constraint, isl_dim_param); ++i) { - isl_constraint_get_coefficient(constraint, isl_dim_param, i, &c); - if (isl_int_is_zero(c)) - continue; - if ((!isl_int_is_one(c) && !isl_int_is_negone(c)) || - type != EQTYPE_NONE) { - type = EQTYPE_EXAFFINE; - break; - } - type = EQTYPE_PUREITEM; - } - for (i = 0; i < isl_constraint_dim(constraint, isl_dim_set); ++i) { - if (i == level - 1) - continue; - isl_constraint_get_coefficient(constraint, isl_dim_set, i, &c); - if (isl_int_is_zero(c)) - continue; - if ((!isl_int_is_one(c) && !isl_int_is_negone(c)) || - type != EQTYPE_NONE) { - type = EQTYPE_EXAFFINE; - break; - } - type = EQTYPE_PUREITEM; - } - for (i = 0; i < isl_constraint_dim(constraint, isl_dim_div); ++i) { - isl_constraint_get_coefficient(constraint, isl_dim_div, i, &c); - if (isl_int_is_zero(c)) - continue; - if ((!isl_int_is_one(c) && !isl_int_is_negone(c)) || - type != EQTYPE_NONE) { - type = EQTYPE_EXAFFINE; - break; - } - type = EQTYPE_PUREITEM; - } - isl_int_clear(c); - - if (type == EQTYPE_NONE) - type = EQTYPE_CONSTANT; - - return type; -} - - -int cloog_equal_type(CloogEqualities *equal, int level) -{ - return equal->types[level-1]; -} - - -/** - * cloog_equal_add function: - * This function updates the row (level-1) of the equality matrix (equal) with - * the row that corresponds to the row (line) of the matrix (matrix). - * - equal is the matrix of equalities, - * - matrix is the matrix of constraints, - * - level is the column number in matrix of the element which is 'equal to', - * - line is the line number in matrix of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - ** - * line is set to an invalid constraint for equalities that CLooG itself has - * discovered because the lower and upper bound of a loop happened to be equal. - * This situation shouldn't happen in the isl port since isl should - * have found the equality itself. - */ -void cloog_equal_add(CloogEqualities *equal, CloogConstraintSet *matrix, - int level, CloogConstraint *line, int nb_par) -{ - isl_constraint *c; - assert(cloog_constraint_is_valid(line)); - - equal->types[level-1] = cloog_constraint_equal_type(line, level); - c = cloog_constraint_to_isl(line); - equal->constraints[level - 1] = isl_constraint_copy(c); -} - - -/** - * cloog_equal_del function : - * This function reset the equality corresponding to the iterator (level) - * in the equality matrix (equal). - * - July 2nd 2002: first version. - */ -void cloog_equal_del(CloogEqualities *equal, int level) -{ - equal->types[level-1] = EQTYPE_NONE; - isl_constraint_free(equal->constraints[level - 1]); - equal->constraints[level-1] = NULL; -} - - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - -/** - * Function cloog_constraint_set_normalize: - * This function will modify the constraint system in such a way that when - * there is an equality depending on the element at level 'level', there are - * no more (in)equalities depending on this element. - * - * The simplified form of isl automatically satisfies this condition. - */ -void cloog_constraint_set_normalize(CloogConstraintSet *matrix, int level) -{ -} - - - -/** - * cloog_constraint_set_copy function: - * this functions builds and returns a "hard copy" (not a pointer copy) of a - * CloogConstraintSet data structure. - */ -CloogConstraintSet *cloog_constraint_set_copy(CloogConstraintSet *constraints) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return cloog_constraint_set_from_isl_basic_set(isl_basic_set_dup(bset)); -} - - -/** - * cloog_constraint_set_simplify function: - * this function simplify all constraints inside the matrix "matrix" thanks to - * an equality matrix "equal" that gives for some elements of the affine - * constraint an equality with other elements, preferably constants. - * For instance, if a row of the matrix contains i+j+3>=0 and the equality - * matrix gives i=n and j=2, the constraint is simplified to n+3>=0. The - * simplified constraints are returned back inside a new simplified matrix. - * - matrix is the set of constraints to simplify, - * - equal is the matrix of equalities, - * - level is a level we don't want to simplify (-1 if none), - * - nb_par is the number of parameters of the program. - ** - * isl should have performed these simplifications already in isl_set_gist. - */ -CloogConstraintSet *cloog_constraint_set_simplify(CloogConstraintSet *matrix, - CloogEqualities *equal, int level, int nb_par) -{ - return cloog_constraint_set_copy(matrix); -} - - -static struct cloog_isl_dim constraint_cloog_dim_to_isl_dim( - CloogConstraint *constraint, int pos) -{ - enum isl_dim_type types[] = { isl_dim_set, isl_dim_div, isl_dim_param }; - int i; - struct cloog_isl_dim ci_dim; - - for (i = 0; i < 3; ++i) { - isl_constraint *c = cloog_constraint_to_isl(constraint); - unsigned dim = isl_constraint_dim(c, types[i]); - if (pos < dim) { - ci_dim.type = types[i]; - ci_dim.pos = pos; - return ci_dim; - } - pos -= dim; - } - assert(0); -} - -static struct clast_expr *div_expr(CloogConstraint *constraint, int pos, - CloogNames *names) -{ - int i, nb_elts; - unsigned dim = cloog_constraint_total_dimension(constraint); - cloog_int_t c; - struct clast_reduction *r; - struct clast_expr *e = NULL; - struct isl_div *div; - - div = isl_constraint_div(cloog_constraint_to_isl(constraint), pos); - - cloog_int_init(c); - for (i = 0, nb_elts = 0; i < dim; ++i) { - struct cloog_isl_dim dim; - - dim = constraint_cloog_dim_to_isl_dim(constraint, i); - isl_div_get_coefficient(div, dim.type, dim.pos, &c); - if (!cloog_int_is_zero(c)) - ++nb_elts; - } - isl_div_get_constant(div, &c); - if (!cloog_int_is_zero(c)) - ++nb_elts; - - r = new_clast_reduction(clast_red_sum, nb_elts); - for (i = 0, nb_elts = 0; i < dim; ++i) { - struct clast_expr *v; - struct cloog_isl_dim dim; - - dim = constraint_cloog_dim_to_isl_dim(constraint, i); - isl_div_get_coefficient(div, dim.type, dim.pos, &c); - if (cloog_int_is_zero(c)) - continue; - - v = cloog_constraint_variable_expr(constraint, 1 + i, names); - - r->elts[nb_elts++] = &new_clast_term(c, v)->expr; - } - isl_div_get_constant(div, &c); - if (!cloog_int_is_zero(c)) - r->elts[nb_elts++] = &new_clast_term(c, NULL)->expr; - - isl_div_get_denominator(div, &c); - e = &new_clast_binary(clast_bin_fdiv, &r->expr, c)->expr; - - cloog_int_clear(c); - - isl_div_free(div); - - return e; -} - -/** - * Return clast_expr corresponding to the variable "level" (1 based) in - * the given constraint. - */ -struct clast_expr *cloog_constraint_variable_expr(CloogConstraint *constraint, - int level, CloogNames *names) -{ - struct cloog_isl_dim dim; - const char *name; - - assert(constraint); - - dim = constraint_cloog_dim_to_isl_dim(constraint, level - 1); - if (dim.type == isl_dim_div) - return div_expr(constraint, dim.pos, names); - - if (dim.type == isl_dim_set) - name = cloog_names_name_at_level(names, level); - else - name = names->parameters[dim.pos]; - - return &new_clast_name(name)->expr; -} - - -/** - * Return true if constraint c involves variable v (zero-based). - */ -int cloog_constraint_involves(CloogConstraint *constraint, int v) -{ - isl_int c; - int res; - - isl_int_init(c); - cloog_constraint_coefficient_get(constraint, v, &c); - res = !isl_int_is_zero(c); - isl_int_clear(c); - return res; -} - -int cloog_constraint_is_lower_bound(CloogConstraint *constraint, int v) -{ - isl_int c; - int res; - - isl_int_init(c); - cloog_constraint_coefficient_get(constraint, v, &c); - res = isl_int_is_pos(c); - isl_int_clear(c); - return res; -} - -int cloog_constraint_is_upper_bound(CloogConstraint *constraint, int v) -{ - isl_int c; - int res; - - isl_int_init(c); - cloog_constraint_coefficient_get(constraint, v, &c); - res = isl_int_is_neg(c); - isl_int_clear(c); - return res; -} - -int cloog_constraint_is_equality(CloogConstraint *constraint) -{ - return isl_constraint_is_equality(cloog_constraint_to_isl(constraint)); -} - -CloogConstraintSet *cloog_constraint_set_drop_constraint( - CloogConstraintSet *constraints, CloogConstraint *constraint) -{ - isl_basic_set *bset; - isl_constraint *c; - - bset = cloog_constraints_set_to_isl(constraints); - c = cloog_constraint_to_isl(cloog_constraint_copy(constraint)); - bset = isl_basic_set_drop_constraint(bset, c); - return cloog_constraint_set_from_isl_basic_set(bset); -} - -void cloog_constraint_coefficient_get(CloogConstraint *constraint, - int var, cloog_int_t *val) -{ - struct cloog_isl_dim dim; - isl_constraint *c; - - if (!constraint) - return; - - dim = constraint_cloog_dim_to_isl_dim(constraint, var); - c = cloog_constraint_to_isl(constraint); - isl_constraint_get_coefficient(c, dim.type, dim.pos, val); -} - -void cloog_constraint_coefficient_set(CloogConstraint *constraint, - int var, cloog_int_t val) -{ - struct cloog_isl_dim dim; - isl_constraint *c; - - assert(constraint); - - dim = constraint_cloog_dim_to_isl_dim(constraint, var); - c = cloog_constraint_to_isl(constraint); - isl_constraint_set_coefficient(c, dim.type, dim.pos, val); -} - -void cloog_constraint_constant_get(CloogConstraint *constraint, cloog_int_t *val) -{ - isl_constraint_get_constant(cloog_constraint_to_isl(constraint), val); -} - -/** - * Copy the coefficient of constraint c into dst in PolyLib order, - * i.e., first the coefficients of the variables, then the coefficients - * of the parameters and finally the constant. - */ -void cloog_constraint_copy_coefficients(CloogConstraint *constraint, - cloog_int_t *dst) -{ - int i; - unsigned dim; - - dim = cloog_constraint_total_dimension(constraint); - - for (i = 0; i < dim; ++i) - cloog_constraint_coefficient_get(constraint, i, dst+i); - cloog_constraint_constant_get(constraint, dst+dim); -} - -CloogConstraint *cloog_constraint_invalid(void) -{ - return NULL; -} - -int cloog_constraint_is_valid(CloogConstraint *constraint) -{ - return constraint != NULL; -} - -int cloog_constraint_total_dimension(CloogConstraint *constraint) -{ - isl_constraint *c; - c = cloog_constraint_to_isl(constraint); - return isl_constraint_dim(c, isl_dim_all); -} - - -/** - * Check whether there is any need for the constraint "upper" on - * "level" to get reduced. - * In case of the isl backend, there should be no need to do so - * if the level corresponds to an existentially quantified variable. - * Moreover, the way reduction is performed does not work for such - * variables since its position might chance during the construction - * of a set for reduction. - */ -int cloog_constraint_needs_reduction(CloogConstraint *upper, int level) -{ - isl_basic_set *bset; - isl_constraint *c; - struct cloog_isl_dim dim; - - c = cloog_constraint_to_isl(upper); - bset = isl_basic_set_from_constraint(isl_constraint_copy(c)); - dim = basic_set_cloog_dim_to_isl_dim(bset, level - 1); - isl_basic_set_free(bset); - - return dim.type == isl_dim_set; -} - - -/** - * Create a CloogConstraintSet containing enough information to perform - * a reduction on the upper equality (in this case lower is an invalid - * CloogConstraint) or the pair of inequalities upper and lower - * from within insert_modulo_guard. - * In the isl backend, we return a CloogConstraintSet containing both - * bounds, as the stride may change during the reduction and we may - * need to recompute the bound on the modulo expression. - */ -CloogConstraintSet *cloog_constraint_set_for_reduction(CloogConstraint *upper, - CloogConstraint *lower) -{ - struct isl_basic_set *bset; - isl_constraint *c; - - c = cloog_constraint_to_isl(upper); - bset = isl_basic_set_from_constraint(isl_constraint_copy(c)); - if (cloog_constraint_is_valid(lower)) { - c = cloog_constraint_to_isl(lower); - bset = isl_basic_set_add_constraint(bset, - isl_constraint_copy(c)); - } - return cloog_constraint_set_from_isl_basic_set(bset); -} - - -static int add_constant_term(CloogConstraint *c, void *user) -{ - isl_int *bound = (isl_int *)user; - isl_int v; - - isl_int_init(v); - - cloog_constraint_constant_get(c, &v); - isl_int_add(*bound, *bound, v); - - isl_int_clear(v); - - return 0; -} - - -/* Return an isl_basic_set representation of the equality stored - * at position i in the given CloogEqualities. - */ -static __isl_give isl_basic_set *equality_to_basic_set(CloogEqualities *equal, - int i) -{ - isl_constraint *c; - isl_basic_set *bset; - unsigned nparam; - unsigned nvar; - - c = isl_constraint_copy(equal->constraints[i]); - bset = isl_basic_set_from_constraint(c); - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - bset = isl_basic_set_add(bset, isl_dim_set, - equal->total_dim - (nparam + nvar)); - return bset; -} - -/** - * Reduce the modulo guard expressed by "constraints" using equalities - * found in outer nesting levels (stored in "equal"). - * The modulo guard may be an equality or a pair of inequalities. - * In case of a pair of inequalities, *bound contains the bound on the - * corresponding modulo expression. If any reduction is performed - * then this bound is recomputed. - * - * "level" may not correspond to an existentially quantified variable. - * - * We first check if there are any equalities we can use. If not, - * there is again nothing to reduce. - * For the actual reduction, we use isl_basic_set_gist, but this - * function will only perform the reduction we want here if the - * the variable that imposes the modulo constraint has been projected - * out (i.e., turned into an existentially quantified variable). - * After the call to isl_basic_set_gist, we need to move the - * existential variable back into the position where the calling - * function expects it (assuming there are any constraints left). - * We do this by adding an equality between the given dimension and - * the existentially quantified variable. - * - * If there are no existentially quantified variables left, then - * we don't need to add this equality. - * If, on the other hand, the resulting basic set involves more - * than one existentially quantified variable, then the caller - * will not be able to handle the result, so we just return the - * original input instead. - */ -CloogConstraintSet *cloog_constraint_set_reduce(CloogConstraintSet *constraints, - int level, CloogEqualities *equal, int nb_par, cloog_int_t *bound) -{ - int j; - isl_ctx *ctx; - isl_dim *idim; - struct isl_basic_set *eq; - struct isl_basic_map *id; - struct cloog_isl_dim dim; - struct isl_constraint *c; - struct isl_div *div; - unsigned constraints_dim; - unsigned n_div; - isl_basic_set *bset, *orig; - isl_aff *aff; - - bset = cloog_constraints_set_to_isl(constraints); - orig = isl_basic_set_copy(bset); - ctx = isl_basic_set_get_ctx(bset); - dim = set_cloog_dim_to_isl_dim(constraints, level - 1); - assert(dim.type == isl_dim_set); - - eq = NULL; - for (j = 0; j < level - 1; ++j) { - isl_basic_set *bset_j; - if (equal->types[j] != EQTYPE_EXAFFINE) - continue; - bset_j = equality_to_basic_set(equal, j); - if (!eq) - eq = bset_j; - else - eq = isl_basic_set_intersect(eq, bset_j); - } - if (!eq) { - isl_basic_set_free(orig); - return cloog_constraint_set_from_isl_basic_set(bset); - } - - idim = isl_dim_map_from_set(isl_basic_set_get_dim(bset)); - id = isl_basic_map_identity(idim); - id = isl_basic_map_remove_dims(id, isl_dim_out, dim.pos, 1); - bset = isl_basic_set_apply(bset, isl_basic_map_copy(id)); - bset = isl_basic_set_apply(bset, isl_basic_map_reverse(id)); - - constraints_dim = isl_basic_set_dim(bset, isl_dim_set); - eq = isl_basic_set_remove_dims(eq, isl_dim_set, constraints_dim, - isl_basic_set_dim(eq, isl_dim_set) - constraints_dim); - bset = isl_basic_set_gist(bset, eq); - n_div = isl_basic_set_dim(bset, isl_dim_div); - if (n_div > 1) { - isl_basic_set_free(bset); - return cloog_constraint_set_from_isl_basic_set(orig); - } - if (n_div < 1) { - isl_basic_set_free(orig); - return cloog_constraint_set_from_isl_basic_set(bset); - } - - div = isl_basic_set_div(isl_basic_set_copy(bset), 0); - aff = isl_aff_from_div(div); - aff = isl_aff_add_coefficient_si(aff, isl_dim_set, dim.pos, -1); - c = isl_equality_from_aff(aff); - bset = isl_basic_set_add_constraint(bset, c); - - isl_int_set_si(*bound, 0); - constraints = cloog_constraint_set_from_isl_basic_set(bset); - cloog_constraint_set_foreach_constraint(constraints, - add_constant_term, bound); - - isl_basic_set_free(orig); - return cloog_constraint_set_from_isl_basic_set(bset); -} - -CloogConstraint *cloog_constraint_copy(CloogConstraint *constraint) -{ - return cloog_constraint_from_isl_constraint( - isl_constraint_copy(cloog_constraint_to_isl(constraint))); -} - -void cloog_constraint_release(CloogConstraint *constraint) -{ - isl_constraint_free(cloog_constraint_to_isl(constraint)); -} - -struct cloog_isl_foreach { - int (*fn)(CloogConstraint *constraint, void *user); - void *user; -}; - -static int cloog_isl_foreach_cb(__isl_take isl_constraint *c, void *user) -{ - struct cloog_isl_foreach *data = (struct cloog_isl_foreach *)user; - int ret; - - if (isl_constraint_is_div_constraint(c)) { - isl_constraint_free(c); - return 0; - } - - ret = data->fn(cloog_constraint_from_isl_constraint(c), data->user); - - isl_constraint_free(c); - - return ret; -} - -int cloog_constraint_set_foreach_constraint(CloogConstraintSet *constraints, - int (*fn)(CloogConstraint *constraint, void *user), void *user) -{ - struct cloog_isl_foreach data = { fn, user }; - isl_basic_set *bset; - - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_foreach_constraint(bset, - cloog_isl_foreach_cb, &data); -} - -CloogConstraint *cloog_equal_constraint(CloogEqualities *equal, int j) -{ - isl_constraint *c; - - c = isl_constraint_copy(equal->constraints[j]); - return cloog_constraint_from_isl_constraint(c); -} - -/* Given a stride constraint on iterator i (specified by level) of the form - * - * i = f(outer iterators) + stride * f(existentials) - * - * extract f as an isl_aff. - */ -static isl_aff *extract_stride_offset(__isl_keep isl_constraint *c, - int level, CloogStride *stride) -{ - int i; - isl_dim *dim = isl_constraint_get_dim(c); - isl_local_space *ls = isl_local_space_from_dim(dim); - isl_aff *offset = isl_aff_zero(ls); - isl_int u; - unsigned nparam, nvar; - - isl_int_init(u); - - nparam = isl_constraint_dim(c, isl_dim_param); - nvar = isl_constraint_dim(c, isl_dim_set); - - for (i = 0; i < nparam; ++i) { - isl_constraint_get_coefficient(c, isl_dim_param, i, &u); - isl_int_mul(u, u, stride->factor); - offset = isl_aff_set_coefficient(offset, isl_dim_param, i, u); - } - for (i = 0; i < nvar; ++i) { - if (i == level - 1) - continue; - isl_constraint_get_coefficient(c, isl_dim_set, i, &u); - isl_int_mul(u, u, stride->factor); - offset = isl_aff_set_coefficient(offset, isl_dim_set, i, u); - } - isl_constraint_get_constant(c, &u); - isl_int_mul(u, u, stride->factor); - offset = isl_aff_set_constant(offset, u); - - isl_int_clear(u); - - return offset; -} - -/* Update the given lower bound on level such that it satisfies the stride - * constraint. The computation performed here is essentially the same - * as that performed in constraint_stride_lower_c. - * - * We update the constraint - * - * a i + f >= 0 - * - * to - * - * i >= s * ceil((-f/a - d)/s) + d - * - * with s the stride and d the offset encoded in the stride constraint. - */ -CloogConstraint *cloog_constraint_stride_lower_bound(CloogConstraint *c, - int level, CloogStride *stride) -{ - isl_constraint *stride_c = cloog_constraint_to_isl(stride->constraint); - isl_constraint *bound = cloog_constraint_to_isl(c); - isl_aff *offset; - isl_aff *lower; - - lower = isl_constraint_get_bound(bound, isl_dim_set, level - 1); - isl_constraint_free(bound); - - offset = extract_stride_offset(stride_c, level, stride); - - lower = isl_aff_sub(lower, isl_aff_copy(offset)); - lower = isl_aff_scale_down(lower, stride->stride); - lower = isl_aff_ceil(lower); - lower = isl_aff_scale(lower, stride->stride); - lower = isl_aff_add(lower, offset); - lower = isl_aff_neg(lower); - lower = isl_aff_add_coefficient_si(lower, isl_dim_set, level - 1, 1); - - bound = isl_inequality_from_aff(lower); - - return cloog_constraint_from_isl_constraint(bound); -} diff --git a/cloog-0.16.3/source/isl/domain.c b/cloog-0.16.3/source/isl/domain.c deleted file mode 100644 index f2807c9aac5069e564110308cbbad3d7f336201e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/isl/domain.c +++ /dev/null @@ -1,1836 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -CloogDomain *cloog_domain_from_isl_set(struct isl_set *set) -{ - set = isl_set_detect_equalities(set); - set = isl_set_compute_divs(set); - return (CloogDomain *)set; -} - -__isl_give isl_set *isl_set_from_cloog_domain(CloogDomain *domain) -{ - return (isl_set *)domain; -} - -CloogScattering *cloog_scattering_from_isl_map(struct isl_map *map) -{ - return (CloogScattering *)map; -} - -__isl_give isl_map *isl_map_from_cloog_scattering(CloogScattering *scattering) -{ - return (isl_map *)scattering; -} - - -/** - * Returns true if each scattering dimension is defined in terms - * of the original iterators. - */ -int cloog_scattering_fully_specified(CloogScattering *scattering, - CloogDomain *domain) -{ - isl_map *map = isl_map_from_cloog_scattering(scattering); - return isl_map_is_single_valued(map); -} - - -CloogConstraintSet *cloog_domain_constraints(CloogDomain *domain) -{ - isl_basic_set *bset; - isl_set *set = isl_set_from_cloog_domain(domain); - assert(isl_set_n_basic_set(set) == 1); - bset = isl_set_copy_basic_set(set); - return cloog_constraint_set_from_isl_basic_set(bset); -} - - -void cloog_domain_print_constraints(FILE *foo, CloogDomain *domain, - int print_number) -{ - isl_basic_set *bset; - isl_set *set = isl_set_from_cloog_domain(domain); - - if (print_number) - isl_set_print(set, foo, 0, ISL_FORMAT_EXT_POLYLIB); - else { - assert(isl_set_n_basic_set(set) == 1); - bset = isl_set_copy_basic_set(set); - isl_basic_set_print(bset, foo, - 0, NULL, NULL, ISL_FORMAT_POLYLIB); - isl_basic_set_free(bset); - } -} - - -void cloog_scattering_print_constraints(FILE *foo, CloogScattering *scattering) -{ - isl_map *map = isl_map_from_cloog_scattering(scattering); - isl_map_print(map, foo, 0, ISL_FORMAT_EXT_POLYLIB); -} - - -void cloog_domain_free(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_set_free(set); -} - - -void cloog_scattering_free(CloogScattering *scatt) -{ - isl_map *map = isl_map_from_cloog_scattering(scatt); - isl_map_free(map); -} - - -CloogDomain * cloog_domain_copy(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return cloog_domain_from_isl_set(isl_set_copy(set)); -} - - -/** - * cloog_domain_convex function: - * Computes the convex hull of domain. - */ -CloogDomain *cloog_domain_convex(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - set = isl_set_from_basic_set(isl_set_convex_hull(isl_set_copy(set))); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_simple_convex: - * Given a list (union) of polyhedra, this function returns a "simple" - * convex hull of this union. In particular, the constraints of the - * the returned polyhedron consist of (parametric) lower and upper - * bounds on individual variables and constraints that appear in the - * original polyhedra. - */ -CloogDomain *cloog_domain_simple_convex(CloogDomain *domain) -{ - struct isl_basic_set *hull; - isl_set *set = isl_set_from_cloog_domain(domain); - - if (cloog_domain_isconvex(domain)) - return cloog_domain_copy(domain); - - hull = isl_set_bounded_simple_hull(isl_set_copy(set)); - return cloog_domain_from_isl_set(isl_set_from_basic_set(hull)); -} - - -/** - * cloog_domain_simplify function: - * Given two polyhedral domains (dom1) and (dom2), - * this function finds the largest domain set (or the smallest list - * of non-redundant constraints), that when intersected with polyhedral - * domain (dom2) equals (dom1)intersect(dom2). The output is a new CloogDomain - * structure with a polyhedral domain with the "redundant" constraints removed. - * NB: the second domain is required not to be a union. - */ -CloogDomain *cloog_domain_simplify(CloogDomain *dom1, CloogDomain *dom2) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - set1 = isl_set_gist(isl_set_copy(set1), isl_set_copy(set2)); - return cloog_domain_from_isl_set(set1); -} - - -/** - * cloog_domain_union function: - * This function returns a new polyhedral domain which is the union of - * two polyhedral domains (dom1) U (dom2). - * Frees dom1 and dom2; - */ -CloogDomain *cloog_domain_union(CloogDomain *dom1, CloogDomain *dom2) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - set1 = isl_set_union(set1, set2); - return cloog_domain_from_isl_set(set1); -} - - - -/** - * cloog_domain_intersection function: - * This function returns a new polyhedral domain which is the intersection of - * two polyhedral domains (dom1) \cap (dom2). - */ -CloogDomain *cloog_domain_intersection(CloogDomain *dom1, CloogDomain *dom2) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - set1 = isl_set_intersect(isl_set_copy(set1), isl_set_copy(set2)); - return cloog_domain_from_isl_set(set1); -} - - -/** - * cloog_domain_difference function: - * Returns the set difference domain \ minus. - */ -CloogDomain *cloog_domain_difference(CloogDomain *domain, CloogDomain *minus) -{ - isl_set *set1 = isl_set_from_cloog_domain(domain); - isl_set *set2 = isl_set_from_cloog_domain(minus); - set1 = isl_set_subtract(isl_set_copy(set1), isl_set_copy(set2)); - return cloog_domain_from_isl_set(set1); -} - - -/** - * cloog_domain_sort function: - * This function topologically sorts (nb_doms) domains. Here (doms) is an - * array of pointers to CloogDomains, (nb_doms) is the number of domains, - * (level) is the level to consider for partial ordering (nb_par) is the - * parameter space dimension, (permut) if not NULL, is an array of (nb_doms) - * integers that contains a permutation specification after call in order to - * apply the topological sorting. - */ -void cloog_domain_sort(CloogDomain **doms, unsigned nb_doms, unsigned level, - int *permut) -{ - int i, j, k, cmp; - struct isl_ctx *ctx; - unsigned char **follows; - isl_set *set_i, *set_j; - isl_basic_set *bset_i, *bset_j; - - if (!nb_doms) - return; - set_i = isl_set_from_cloog_domain(doms[0]); - ctx = isl_set_get_ctx(set_i); - for (i = 0; i < nb_doms; i++) { - set_i = isl_set_from_cloog_domain(doms[i]); - assert(isl_set_n_basic_set(set_i) == 1); - } - - follows = isl_alloc_array(ctx, unsigned char *, nb_doms); - assert(follows); - for (i = 0; i < nb_doms; ++i) { - follows[i] = isl_alloc_array(ctx, unsigned char, nb_doms); - assert(follows[i]); - for (j = 0; j < nb_doms; ++j) - follows[i][j] = 0; - } - - for (i = 1; i < nb_doms; ++i) { - for (j = 0; j < i; ++j) { - if (follows[i][j] || follows[j][i]) - continue; - set_i = isl_set_from_cloog_domain(doms[i]); - set_j = isl_set_from_cloog_domain(doms[j]); - bset_i = isl_set_copy_basic_set(set_i); - bset_j = isl_set_copy_basic_set(set_j); - cmp = isl_basic_set_compare_at(bset_i, bset_j, level-1); - isl_basic_set_free(bset_i); - isl_basic_set_free(bset_j); - if (!cmp) - continue; - if (cmp > 0) { - follows[i][j] = 1; - for (k = 0; k < i; ++k) - follows[i][k] |= follows[j][k]; - } else { - follows[j][i] = 1; - for (k = 0; k < i; ++k) - follows[k][i] |= follows[k][j]; - } - } - } - - for (i = 0, j = 0; i < nb_doms; j = (j + 1) % nb_doms) { - for (k = 0; k < nb_doms; ++k) - if (follows[j][k]) - break; - if (k < nb_doms) - continue; - for (k = 0; k < nb_doms; ++k) - follows[k][j] = 0; - follows[j][j] = 1; - permut[i] = 1 + j; - ++i; - } - - for (i = 0; i < nb_doms; ++i) - free(follows[i]); - free(follows); -} - - -/** - * Check whether there is or may be any value of dom1 at the given level - * that is greater than or equal to a value of dom2 at the same level. - * - * Return - * 1 is there is or may be a greater-than pair. - * 0 if there is no greater-than pair, but there may be an equal-to pair - * -1 if there is definitely no such pair - */ -int cloog_domain_follows(CloogDomain *dom1, CloogDomain *dom2, unsigned level) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - int follows; - - follows = isl_set_follows_at(set1, set2, level - 1); - assert(follows >= -1); - - return follows; -} - - -/** - * cloog_domain_empty function: - * Returns an empty domain of the same dimensions as template. - */ -CloogDomain *cloog_domain_empty(CloogDomain *template) -{ - isl_set *set = isl_set_from_cloog_domain(template); - return cloog_domain_from_isl_set(isl_set_empty_like(set)); -} - - -/** - * Return 1 if the specified dimension has both an upper and a lower bound. - */ -int cloog_domain_is_bounded(CloogDomain *dom, unsigned level) -{ - isl_set *set = isl_set_from_cloog_domain(dom); - return isl_set_dim_is_bounded(set, isl_dim_set, level - 1); -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_domain_print_structure : - * this function is a more human-friendly way to display the CloogDomain data - * structure, it only shows the constraint system and includes an indentation - * level (level) in order to work with others print_structure functions. - */ -void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level, - const char *name) -{ - int i ; - isl_set *set = isl_set_from_cloog_domain(domain); - - /* Go to the right level. */ - for (i = 0; i < level; i++) - fprintf(file, "|\t"); - - if (!set) { - fprintf(file, "+-- Null CloogDomain\n"); - return; - } - fprintf(file, "+-- %s\n", name); - for (i = 0; i < level+1; ++i) - fprintf(file, "|\t"); - - isl_set_print(set, file, 0, ISL_FORMAT_ISL); - - fprintf(file, "\n"); -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -void cloog_domain_list_free(CloogDomainList *list) -{ - CloogDomainList *next; - - for ( ; list; list = next) { - next = list->next; - cloog_domain_free(list->domain); - free(list); - } -} - - -/** - * cloog_scattering_list_free function: - * This function frees the allocated memory for a CloogScatteringList structure. - */ -void cloog_scattering_list_free(CloogScatteringList *list) -{ - while (list != NULL) { - CloogScatteringList *temp = list->next; - isl_map *map = isl_map_from_cloog_scattering(list->scatt); - isl_map_free(map); - free(list); - list = temp; - } -} - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ - - -/** - * cloog_domain_read_context function: - * Read parameter domain. - */ -CloogDomain *cloog_domain_read_context(CloogState *state, FILE *input) -{ - struct isl_ctx *ctx = state->backend->ctx; - isl_set *set; - - set = isl_set_read_from_file(ctx, input, 0); - set = isl_set_move_dims(set, isl_dim_param, 0, - isl_dim_set, 0, isl_set_dim(set, isl_dim_set)); - - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_from_context - * Reinterpret context by turning parameters into variables. - */ -CloogDomain *cloog_domain_from_context(CloogDomain *context) -{ - isl_set *set = isl_set_from_cloog_domain(context); - - set = isl_set_move_dims(set, isl_dim_set, 0, - isl_dim_param, 0, isl_set_dim(set, isl_dim_param)); - - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_union_read function: - * This function reads a union of polyhedra into a file (input) and - * returns a pointer to a CloogDomain containing the read information. - */ -CloogDomain *cloog_domain_union_read(CloogState *state, - FILE *input, int nb_parameters) -{ - struct isl_ctx *ctx = state->backend->ctx; - struct isl_set *set; - - set = isl_set_read_from_file(ctx, input, nb_parameters); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_read_scattering function: - * This function reads in a scattering function from the file input. - * - * We try to read the scattering relation as a map, but if it is - * specified in the original PolyLib format, then isl_map_read_from_file - * will treat the input as a set return a map with zero input dimensions. - * In this case, we need to decompose the set into a map from - * scattering dimensions to domain dimensions and then invert the - * resulting map. - */ -CloogScattering *cloog_domain_read_scattering(CloogDomain *domain, FILE *input) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_ctx *ctx = isl_set_get_ctx(set); - struct isl_map *scat; - unsigned nparam; - unsigned dim; - unsigned n_scat; - - dim = isl_set_dim(set, isl_dim_set); - nparam = isl_set_dim(set, isl_dim_param); - scat = isl_map_read_from_file(ctx, input, nparam); - if (isl_map_dim(scat, isl_dim_in) != dim) { - n_scat = isl_map_dim(scat, isl_dim_out) - dim; - scat = isl_map_move_dims(scat, isl_dim_in, 0, - isl_dim_out, n_scat, dim); - } - return cloog_scattering_from_isl_map(scat); -} - -/****************************************************************************** - * CloogMatrix Reading function * - ******************************************************************************/ - -/** - * isl_constraint_read_from_matrix: - * Convert a single line of a matrix to a isl_constraint. - * Returns a pointer to the constraint if successful; NULL otherwise. - */ -static struct isl_constraint *isl_constraint_read_from_matrix( - struct isl_dim *dim, cloog_int_t *row) -{ - struct isl_constraint *constraint; - int j; - int nvariables = isl_dim_size(dim, isl_dim_set); - int nparam = isl_dim_size(dim, isl_dim_param); - - if (cloog_int_is_zero(row[0])) - constraint = isl_equality_alloc(dim); - else - constraint = isl_inequality_alloc(dim); - - for (j = 0; j < nvariables; ++j) - isl_constraint_set_coefficient(constraint, isl_dim_out, j, - row[1 + j]); - - for (j = 0; j < nparam; ++j) - isl_constraint_set_coefficient(constraint, isl_dim_param, j, - row[1 + nvariables + j]); - - isl_constraint_set_constant(constraint, row[1 + nvariables + nparam]); - - return constraint; -} - -/** - * isl_basic_set_read_from_matrix: - * Convert matrix to basic_set. The matrix contains nparam parameter columns. - * Returns a pointer to the basic_set if successful; NULL otherwise. - */ -static struct isl_basic_set *isl_basic_set_read_from_matrix(struct isl_ctx *ctx, - CloogMatrix* matrix, int nparam) -{ - struct isl_dim *dim; - struct isl_basic_set *bset; - int i; - unsigned nrows, ncolumns; - - nrows = matrix->NbRows; - ncolumns = matrix->NbColumns; - int nvariables = ncolumns - 2 - nparam; - - dim = isl_dim_set_alloc(ctx, nparam, nvariables); - - bset = isl_basic_set_universe(isl_dim_copy(dim)); - - for (i = 0; i < nrows; ++i) { - cloog_int_t *row = matrix->p[i]; - struct isl_constraint *constraint = - isl_constraint_read_from_matrix(isl_dim_copy(dim), row); - bset = isl_basic_set_add_constraint(bset, constraint); - } - - isl_dim_free(dim); - - return bset; -} - -/** - * cloog_domain_from_cloog_matrix: - * Create a CloogDomain containing the constraints described in matrix. - * nparam is the number of parameters contained in the domain. - * Returns a pointer to the CloogDomain if successful; NULL otherwise. - */ -CloogDomain *cloog_domain_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nparam) -{ - struct isl_ctx *ctx = state->backend->ctx; - struct isl_basic_set *bset; - - bset = isl_basic_set_read_from_matrix(ctx, matrix, nparam); - - return cloog_domain_from_isl_set(isl_set_from_basic_set(bset)); -} - -/** - * cloog_scattering_from_cloog_matrix: - * Create a CloogScattering containing the constraints described in matrix. - * nparam is the number of parameters contained in the domain. - * Returns a pointer to the CloogScattering if successful; NULL otherwise. - */ -CloogScattering *cloog_scattering_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_scat, int nb_par) -{ - struct isl_ctx *ctx = state->backend->ctx; - struct isl_basic_set *bset; - struct isl_basic_map *scat; - struct isl_dim *dims; - unsigned dim; - - bset = isl_basic_set_read_from_matrix(ctx, matrix, nb_par); - dim = isl_basic_set_n_dim(bset) - nb_scat; - dims = isl_dim_alloc(ctx, nb_par, nb_scat, dim); - - scat = isl_basic_map_from_basic_set(bset, dims); - scat = isl_basic_map_reverse(scat); - return cloog_scattering_from_isl_map(isl_map_from_basic_map(scat)); -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - - -/** - * cloog_domain_isempty function: - */ -int cloog_domain_isempty(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_is_empty(set); -} - - -/** - * cloog_domain_universe function: - * This function returns the complete dim-dimensional space. - */ -CloogDomain *cloog_domain_universe(CloogState *state, unsigned dim) -{ - struct isl_dim *dims; - struct isl_basic_set *bset; - - dims = isl_dim_set_alloc(state->backend->ctx, 0, dim); - bset = isl_basic_set_universe(dims); - return cloog_domain_from_isl_set(isl_set_from_basic_set(bset)); -} - - -/** - * cloog_domain_project function: - * This function returns the projection of - * (domain) on the (level) first dimensions (i.e. outer loops). - */ -CloogDomain *cloog_domain_project(CloogDomain *domain, int level) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - set = isl_set_remove_dims(isl_set_copy(set), isl_dim_set, - level, isl_set_n_dim(set) - level); - set = isl_set_compute_divs(set); - if (level > 0) - set = isl_set_remove_divs_involving_dims(set, - isl_dim_set, level - 1, 1); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_extend function: - * This function returns the (domain) given as input with (dim) - * dimensions and (nb_par) parameters. - * This function does not free (domain), and returns a new CloogDomain. - */ -CloogDomain *cloog_domain_extend(CloogDomain *domain, int dim) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - set = isl_set_extend(isl_set_copy(set), isl_set_n_param(set), dim); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_never_integral function: - * For us, an equality like 3*i -4 = 0 is always false since 4%3 != 0. - * There is no need to check for such constraints explicitly for the isl - * backend. - */ -int cloog_domain_never_integral(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_is_empty(set); -} - - -/** - * Check whether the loop at "level" is executed at most once. - * We construct a map that maps all remaining variables to this iterator - * and check whether this map is single valued. - * - * Alternatively, we could have mapped the domain through a mapping - * [p] -> { [..., i] -> [..., i'] : i' > i } - * and then taken the intersection of the original domain and the transformed - * domain. If this intersection is empty, then the corresponding - * loop is executed at most once. - */ -int cloog_domain_is_otl(CloogDomain *domain, int level) -{ - int otl; - isl_set *set = isl_set_from_cloog_domain(domain); - isl_map *map; - - map = isl_map_from_domain(isl_set_copy(set)); - map = isl_map_move_dims(map, isl_dim_out, 0, isl_dim_in, level - 1, 1); - otl = isl_map_is_single_valued(map); - isl_map_free(map); - - return otl; -} - - -/** - * cloog_domain_stride function: - * This function finds the stride imposed to unknown with the column number - * 'strided_level' in order to be integral. For instance, if we have a - * constraint like -i - 2j + 2k = 0, and we consider k, then k can be integral - * only if (i + 2j)%2 = 0. Then only if i%2 = 0. Then k imposes a stride 2 to - * the unknown i. The function returns the imposed stride in a parameter field. - * - domain is the set of constraint we have to consider, - * - strided_level is the column number of the unknown for which a stride have - * to be found, - * - looking_level is the column number of the unknown that impose a stride to - * the first unknown. - * - stride is the stride that is returned back as a function parameter. - * - offset is the value of the constant c if the condition is of the shape - * (i + c)%s = 0, s being the stride. - */ -void cloog_domain_stride(CloogDomain *domain, int strided_level, - cloog_int_t *stride, cloog_int_t *offset) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_set_dim_residue_class(set, strided_level - 1, stride, offset); - if (!isl_int_is_zero(*offset)) - isl_int_sub(*offset, *stride, *offset); - return; -} - - -struct cloog_can_stride { - int level; - int can_stride; -}; - -static int constraint_can_stride(__isl_take isl_constraint *c, void *user) -{ - struct cloog_can_stride *ccs = (struct cloog_can_stride *)user; - int i; - isl_int v; - unsigned n_div; - - if (isl_constraint_is_equality(c)) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, ccs->level - 1, &v); - if (isl_int_is_pos(v)) { - n_div = isl_constraint_dim(c, isl_dim_div); - for (i = 0; i < n_div; ++i) { - isl_constraint_get_coefficient(c, isl_dim_div, i, &v); - if (!isl_int_is_zero(v)) - break; - } - if (i < n_div) - ccs->can_stride = 0; - } - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - -static int basic_set_can_stride(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_can_stride *ccs = (struct cloog_can_stride *)user; - int r; - - r = isl_basic_set_foreach_constraint(bset, constraint_can_stride, ccs); - isl_basic_set_free(bset); - return r; -} - - -/** - * Return 1 if CLooG is allowed to perform stride detection on level "level" - * and 0 otherwise. - * Currently, stride detection is only allowed when none of the lower - * bound constraints involve any existentially quantified variables. - * The reason is that the current isl interface does not make it - * easy to construct an integer division that depends on other integer - * divisions. - * By not allowing existentially quantified variables in the constraints, - * we can ignore them in cloog_domain_stride_lower_bound. - */ -int cloog_domain_can_stride(CloogDomain *domain, int level) -{ - struct cloog_can_stride ccs = { level, 1 }; - isl_set *set = isl_set_from_cloog_domain(domain); - int r; - r = isl_set_foreach_basic_set(set, basic_set_can_stride, &ccs); - assert(r == 0); - return ccs.can_stride; -} - - -struct cloog_stride_lower { - int level; - CloogStride *stride; - isl_set *set; - isl_basic_set *bounds; -}; - -/* If the given constraint is a lower bound on csl->level, then add - * a lower bound to csl->bounds that makes sure that the remainder - * of the smallest value on division by csl->stride is equal to csl->offset. - * - * In particular, the given lower bound is of the form - * - * a i + f >= 0 - * - * where f may depend on the parameters and other iterators. - * The stride is s and the offset is d. - * The lower bound -f/a may not satisfy the above condition. In fact, - * it may not even be integral. We want to round this value of i up - * to the nearest value that satisfies the condition and add the corresponding - * lower bound constraint. This nearest value is obtained by rounding - * i - d up to the nearest multiple of s. - * That is, we first subtract d - * - * i' = -f/a - d - * - * then we round up to the nearest multiple of s - * - * i'' = s * ceil(i'/s) - * - * and finally, we add d again - * - * i''' = i'' + d - * - * and impose the constraint i >= i'''. - * - * We find - * - * i'' = s * ceil((-f - a * d)/(a * s)) = - s * floor((f + a * d)/(a * s)) - * - * i >= - s * floor((f + a * d)/(a * s)) + d - * - * or - * i + s * floor((f + a * d)/(a * s)) - d >= 0 - */ -static int constraint_stride_lower(__isl_take isl_constraint *c, void *user) -{ - struct cloog_stride_lower *csl = (struct cloog_stride_lower *)user; - isl_int v; - isl_constraint *bound; - isl_aff *b; - - if (isl_constraint_is_equality(c)) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, csl->level - 1, &v); - if (!isl_int_is_pos(v)) { - isl_int_clear(v); - isl_constraint_free(c); - - return 0; - } - - b = isl_constraint_get_bound(c, isl_dim_set, csl->level - 1); - - b = isl_aff_neg(b); - b = isl_aff_add_constant(b, csl->stride->offset); - b = isl_aff_scale_down(b, csl->stride->stride); - b = isl_aff_floor(b); - b = isl_aff_scale(b, csl->stride->stride); - isl_int_neg(v, csl->stride->offset); - b = isl_aff_add_constant(b, v); - b = isl_aff_add_coefficient_si(b, isl_dim_set, csl->level - 1, 1); - - bound = isl_inequality_from_aff(b); - - csl->bounds = isl_basic_set_add_constraint(csl->bounds, bound); - - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - -/* This functions performs essentially the same operation as - * constraint_stride_lower, the only difference being that the offset d - * is not a constant, but an affine expression in terms of the parameters - * and earlier variables. In particular the affine expression is equal - * to the coefficients of stride->constraint multiplied by stride->factor. - * As in constraint_stride_lower, we add an extra bound - * - * i + s * floor((f + a * d)/(a * s)) - d >= 0 - * - * for each lower bound - * - * a i + f >= 0 - * - * where d is not the aforementioned affine expression. - */ -static int constraint_stride_lower_c(__isl_take isl_constraint *c, void *user) -{ - struct cloog_stride_lower *csl = (struct cloog_stride_lower *)user; - isl_int v; - isl_constraint *bound; - isl_constraint *csl_c; - isl_aff *d, *b; - - if (isl_constraint_is_equality(c)) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, csl->level - 1, &v); - if (!isl_int_is_pos(v)) { - isl_int_clear(v); - isl_constraint_free(c); - - return 0; - } - - csl_c = cloog_constraint_to_isl(csl->stride->constraint); - - d = isl_constraint_get_aff(csl_c); - d = isl_aff_drop_dims(d, isl_dim_div, 0, isl_aff_dim(d, isl_dim_div)); - d = isl_aff_set_coefficient_si(d, isl_dim_set, csl->level - 1, 0); - d = isl_aff_scale(d, csl->stride->factor); - - b = isl_constraint_get_bound(c, isl_dim_set, csl->level - 1); - - b = isl_aff_neg(b); - b = isl_aff_add(b, isl_aff_copy(d)); - b = isl_aff_scale_down(b, csl->stride->stride); - b = isl_aff_floor(b); - b = isl_aff_scale(b, csl->stride->stride); - b = isl_aff_sub(b, d); - b = isl_aff_add_coefficient_si(b, isl_dim_set, csl->level - 1, 1); - - bound = isl_inequality_from_aff(b); - - csl->bounds = isl_basic_set_add_constraint(csl->bounds, bound); - - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - -static int basic_set_stride_lower(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_stride_lower *csl = (struct cloog_stride_lower *)user; - int r; - - csl->bounds = isl_basic_set_universe_like(bset); - if (csl->stride->constraint) - r = isl_basic_set_foreach_constraint(bset, - &constraint_stride_lower_c, csl); - else - r = isl_basic_set_foreach_constraint(bset, - &constraint_stride_lower, csl); - bset = isl_basic_set_intersect(bset, csl->bounds); - csl->set = isl_set_union(csl->set, isl_set_from_basic_set(bset)); - - return r; -} - -/** - * Update the lower bounds at level "level" to the given stride information. - * That is, make sure that the remainder on division by "stride" - * is equal to "offset". - */ -CloogDomain *cloog_domain_stride_lower_bound(CloogDomain *domain, int level, - CloogStride *stride) -{ - struct cloog_stride_lower csl; - isl_set *set = isl_set_from_cloog_domain(domain); - int r; - - csl.stride = stride; - csl.level = level; - csl.set = isl_set_empty_like(set); - - r = isl_set_foreach_basic_set(set, basic_set_stride_lower, &csl); - assert(r == 0); - - cloog_domain_free(domain); - return cloog_domain_from_isl_set(csl.set); -} - - -/* Add stride constraint, if any, to domain. - */ -CloogDomain *cloog_domain_add_stride_constraint(CloogDomain *domain, - CloogStride *stride) -{ - isl_constraint *c; - isl_set *set; - - if (!stride || !stride->constraint) - return domain; - - set = isl_set_from_cloog_domain(domain); - c = isl_constraint_copy(cloog_constraint_to_isl(stride->constraint)); - - set = isl_set_add_constraint(set, c); - - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_lazy_equal function: - * This function returns 1 if the domains given as input are the same, 0 if it - * is unable to decide. - */ -int cloog_domain_lazy_equal(CloogDomain *d1, CloogDomain *d2) -{ - isl_set *set1 = isl_set_from_cloog_domain(d1); - isl_set *set2 = isl_set_from_cloog_domain(d2); - return isl_set_fast_is_equal(set1, set2); -} - -struct cloog_bound_split { - isl_set *set; - int level; - int lower; - int upper; -}; - -static int constraint_bound_split(__isl_take isl_constraint *c, void *user) -{ - struct cloog_bound_split *cbs = (struct cloog_bound_split *)user; - isl_int v; - int i; - int handle = 0; - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, cbs->level - 1, &v); - if (!cbs->lower && isl_int_is_pos(v)) - cbs->lower = handle = 1; - else if (!cbs->upper && isl_int_is_neg(v)) - cbs->upper = handle = 1; - if (handle) { - for (i = 0; i < isl_set_dim(cbs->set, isl_dim_param); ++i) { - isl_constraint_get_coefficient(c, isl_dim_param, i, &v); - if (isl_int_is_zero(v)) - continue; - cbs->set = isl_set_split_dims(cbs->set, - isl_dim_param, i, 1); - } - } - isl_int_clear(v); - isl_constraint_free(c); - - return (cbs->lower && cbs->upper) ? -1 : 0; -} - -static int basic_set_bound_split(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_bound_split *cbs = (struct cloog_bound_split *)user; - int r; - - cbs->lower = 0; - cbs->upper = 0; - r = isl_basic_set_foreach_constraint(bset, constraint_bound_split, cbs); - isl_basic_set_free(bset); - return ((!cbs->lower || !cbs->upper) && r < 0) ? -1 : 0; -} - -/** - * Return a union of sets S_i such that the convex hull of "dom", - * when intersected with one the sets S_i, will have an upper and - * lower bound for the dimension at "level" (provided "dom" itself - * has such bounds for the dimensions). - * - * We currently take a very simple approach. For each of the basic - * sets in "dom" we pick a lower and an upper bound and split the - * range of any parameter involved in these two bounds in a - * nonnegative and a negative part. This ensures that the symbolic - * constant in these two constraints are themselves bounded and - * so there will be at least one upper and one lower bound - * in the convex hull. - */ -CloogDomain *cloog_domain_bound_splitter(CloogDomain *dom, int level) -{ - struct cloog_bound_split cbs; - isl_set *set = isl_set_from_cloog_domain(dom); - int r; - cbs.level = level; - cbs.set = isl_set_universe_like(set); - r = isl_set_foreach_basic_set(set, basic_set_bound_split, &cbs); - assert(r == 0); - return cloog_domain_from_isl_set(cbs.set); -} - - -/* Check whether the union of scattering functions over all domains - * is obviously injective. - */ -static int injective_scattering(CloogScatteringList *list) -{ - isl_map *map; - isl_union_map *umap; - int injective; - int i = 0; - char name[30]; - - if (!list) - return 1; - - map = isl_map_copy(isl_map_from_cloog_scattering(list->scatt)); - snprintf(name, sizeof(name), "S%d", i); - map = isl_map_set_tuple_name(map, isl_dim_in, name); - umap = isl_union_map_from_map(map); - - for (list = list->next, ++i; list; list = list->next, ++i) { - map = isl_map_copy(isl_map_from_cloog_scattering(list->scatt)); - snprintf(name, sizeof(name), "S%d", i); - map = isl_map_set_tuple_name(map, isl_dim_in, name); - umap = isl_union_map_add_map(umap, map); - } - - injective = isl_union_map_plain_is_injective(umap); - - isl_union_map_free(umap); - - return injective; -} - - -/** - * cloog_scattering_lazy_block function: - * This function returns 1 if the two scattering functions s1 and s2 given - * as input are the same (except possibly for the final dimension, where we - * allow a difference of 1), assuming that the domains on which this - * scatterings are applied are the same. - * In fact this function answers the question "can I - * safely consider the two domains as only one with two statements (a block) ?". - * A difference of 1 in the final dimension is only allowed if the - * entire scattering function is injective. - * - s1 and s2 are the two domains to check for blocking, - * - scattering is the linked list of all domains, - * - scattdims is the total number of scattering dimentions. - */ -int cloog_scattering_lazy_block(CloogScattering *s1, CloogScattering *s2, - CloogScatteringList *scattering, int scattdims) -{ - int i; - struct isl_dim *dim; - struct isl_map *rel; - struct isl_set *delta; - isl_map *map1 = isl_map_from_cloog_scattering(s1); - isl_map *map2 = isl_map_from_cloog_scattering(s2); - int fixed, block; - isl_int cst; - unsigned n_scat; - - n_scat = isl_map_dim(map1, isl_dim_out); - if (n_scat != isl_map_dim(map2, isl_dim_out)) - return 0; - - dim = isl_map_get_dim(map1); - dim = isl_dim_map_from_set(isl_dim_domain(dim)); - rel = isl_map_identity(dim); - rel = isl_map_apply_domain(rel, isl_map_copy(map1)); - rel = isl_map_apply_range(rel, isl_map_copy(map2)); - delta = isl_map_deltas(rel); - isl_int_init(cst); - for (i = 0; i < n_scat; ++i) { - fixed = isl_set_fast_dim_is_fixed(delta, i, &cst); - if (fixed != 1) - break; - if (isl_int_is_zero(cst)) - continue; - if (i + 1 < n_scat) - break; - if (!isl_int_is_one(cst)) - break; - if (!injective_scattering(scattering)) - break; - } - block = i >= n_scat; - isl_int_clear(cst); - isl_set_free(delta); - return block; -} - - -/** - * cloog_domain_lazy_disjoint function: - * This function returns 1 if the domains given as input are disjoint, 0 if it - * is unable to decide. - */ -int cloog_domain_lazy_disjoint(CloogDomain *d1, CloogDomain *d2) -{ - isl_set *set1 = isl_set_from_cloog_domain(d1); - isl_set *set2 = isl_set_from_cloog_domain(d2); - return isl_set_fast_is_disjoint(set1, set2); -} - - -/** - * cloog_scattering_list_lazy_same function: - * This function returns 1 if two domains in the list are the same, 0 if it - * is unable to decide. - */ -int cloog_scattering_list_lazy_same(CloogScatteringList *list) -{ - CloogScatteringList *one, *other; - isl_map *one_map, *other_map; - - for (one = list; one; one = one->next) { - one_map = isl_map_from_cloog_scattering(one->scatt); - for (other = one->next; other; other = other->next) { - other_map = isl_map_from_cloog_scattering(other->scatt); - if (isl_map_fast_is_equal(one_map, other_map)) - return 1; - } - } - return 0; -} - -int cloog_domain_dimension(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_dim(set, isl_dim_set); -} - -int cloog_domain_parameter_dimension(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_dim(set, isl_dim_param); -} - -int cloog_scattering_dimension(CloogScattering *scatt, CloogDomain *domain) -{ - isl_map *map = isl_map_from_cloog_scattering(scatt); - return isl_map_dim(map, isl_dim_out); -} - -int cloog_domain_isconvex(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_n_basic_set(set) <= 1; -} - - -/** - * cloog_domain_cut_first function: - * This function splits off and returns the first convex set in the - * union "domain". The remainder of the union is returned in rest. - * The original "domain" itself is destroyed and may not be used - * after a call to this function. - */ -CloogDomain *cloog_domain_cut_first(CloogDomain *domain, CloogDomain **rest) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - struct isl_basic_set *first; - - first = isl_set_copy_basic_set(set); - set = isl_set_drop_basic_set(set, first); - *rest = cloog_domain_from_isl_set(set); - - return cloog_domain_from_isl_set(isl_set_from_basic_set(first)); -} - - -/** - * Given a union domain, try to find a simpler representation - * using fewer sets in the union. - * The original "domain" itself is destroyed and may not be used - * after a call to this function. - */ -CloogDomain *cloog_domain_simplify_union(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return cloog_domain_from_isl_set(isl_set_coalesce(set)); -} - - -/** - * cloog_scattering_lazy_isscalar function: - * this function returns 1 if the scattering dimension 'dimension' in the - * scattering 'scatt' is constant. - * If value is not NULL, then it is set to the constant value of dimension. - */ -int cloog_scattering_lazy_isscalar(CloogScattering *scatt, int dimension, - cloog_int_t *value) -{ - isl_map *map = isl_map_from_cloog_scattering(scatt); - return isl_map_fast_is_fixed(map, isl_dim_out, dimension, value); -} - - -/** - * cloog_domain_lazy_isconstant function: - * this function returns 1 if the dimension 'dimension' in the - * domain 'domain' is constant. - * If value is not NULL, then it is set to the constant value of dimension. - */ -int cloog_domain_lazy_isconstant(CloogDomain *domain, int dimension, - cloog_int_t *value) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_fast_dim_is_fixed(set, dimension, value); -} - - -/** - * cloog_scattering_erase_dimension function: - * this function returns a CloogDomain structure builds from 'domain' where - * we removed the dimension 'dimension' and every constraint involving this - * dimension. - */ -CloogScattering *cloog_scattering_erase_dimension(CloogScattering *scattering, - int dimension) -{ - isl_map *map = isl_map_from_cloog_scattering(scattering); - map = isl_map_remove_dims(isl_map_copy(map), isl_dim_out, dimension, 1); - return cloog_scattering_from_isl_map(map); -} - -/** - * cloog_domain_cube: - * Construct and return a dim-dimensional cube, with values ranging - * between min and max in each dimension. - */ -CloogDomain *cloog_domain_cube(CloogState *state, - int dim, cloog_int_t min, cloog_int_t max) -{ - int i; - struct isl_basic_set *cube; - struct isl_basic_set *interval; - struct isl_basic_set_list *list; - - if (dim == 0) - return cloog_domain_universe(state, dim); - - interval = isl_basic_set_interval(state->backend->ctx, min, max); - list = isl_basic_set_list_alloc(state->backend->ctx, dim); - for (i = 0; i < dim; ++i) - list = isl_basic_set_list_add(list, isl_basic_set_copy(interval)); - isl_basic_set_free(interval); - cube = isl_basic_set_list_product(list); - return cloog_domain_from_isl_set(isl_set_from_basic_set(cube)); -} - - -/** - * cloog_domain_scatter function: - * This function add the scattering (scheduling) informations to a domain. - */ -CloogDomain *cloog_domain_scatter(CloogDomain *domain, CloogScattering *scatt) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_map *map = isl_map_from_cloog_scattering(scatt); - - map = isl_map_reverse(isl_map_copy(map)); - map = isl_map_intersect_range(map, set); - set = isl_set_flatten(isl_map_wrap(map)); - return cloog_domain_from_isl_set(set); -} - -static int add_domain_from_map(__isl_take isl_map *map, void *user) -{ - isl_dim *dim; - const char *name; - CloogDomain *domain; - CloogScattering *scat; - CloogUnionDomain **ud = (CloogUnionDomain **)user; - - dim = isl_map_get_dim(map); - name = isl_dim_get_tuple_name(dim, isl_dim_in); - domain = cloog_domain_from_isl_set(isl_map_domain(isl_map_copy(map))); - scat = cloog_scattering_from_isl_map(map); - *ud = cloog_union_domain_add_domain(*ud, name, domain, scat, NULL); - isl_dim_free(dim); - - return 0; -} - -/** - * Construct a CloogUnionDomain from an isl_union_map representing - * a global scattering function. The input is a mapping from different - * spaces (different tuple names and possibly different dimensions) - * to a common space. The iteration domains are set to the domains - * in each space. The statement names are set to the names of the - * spaces. The parameter names of the result are set to those of - * the input, but the iterator and scattering dimension names are - * left unspecified. - */ -CloogUnionDomain *cloog_union_domain_from_isl_union_map( - __isl_take isl_union_map *umap) -{ - int i; - int nparam; - isl_dim *dim; - CloogUnionDomain *ud; - - dim = isl_union_map_get_dim(umap); - nparam = isl_dim_size(dim, isl_dim_param); - - ud = cloog_union_domain_alloc(nparam); - - for (i = 0; i < nparam; ++i) { - const char *s = isl_dim_get_name(dim, isl_dim_param, i); - ud = cloog_union_domain_set_name(ud, CLOOG_PARAM, i, s); - } - isl_dim_free(dim); - - if (isl_union_map_foreach_map(umap, &add_domain_from_map, &ud) < 0) { - isl_union_map_free(umap); - cloog_union_domain_free(ud); - assert(0); - } - - isl_union_map_free(umap); - - return ud; -} - -static int count_same_name(__isl_keep isl_dim *dim, - enum isl_dim_type type, unsigned pos, const char *name) -{ - enum isl_dim_type t; - unsigned p, s; - int count = 0; - int len = strlen(name); - - for (t = isl_dim_param; t <= type && t <= isl_dim_out; ++t) { - s = t == type ? pos : isl_dim_size(dim, t); - for (p = 0; p < s; ++p) { - const char *n = isl_dim_get_name(dim, t, p); - if (n && !strncmp(n, name, len)) - count++; - } - } - return count; -} - -static int add_domain(__isl_take isl_set *set, void *user) -{ - int i, nvar; - isl_ctx *ctx; - isl_dim *dim; - char buffer[20]; - const char *name; - CloogDomain *domain; - CloogUnionDomain **ud = (CloogUnionDomain **)user; - - ctx = isl_set_get_ctx(set); - dim = isl_set_get_dim(set); - name = isl_dim_get_tuple_name(dim, isl_dim_set); - set = isl_set_flatten(set); - set = isl_set_set_tuple_name(set, NULL); - domain = cloog_domain_from_isl_set(set); - *ud = cloog_union_domain_add_domain(*ud, name, domain, NULL, NULL); - - nvar = isl_dim_size(dim, isl_dim_set); - for (i = 0; i < nvar; ++i) { - char *long_name = NULL; - int n; - - name = isl_dim_get_name(dim, isl_dim_set, i); - if (!name) { - snprintf(buffer, sizeof(buffer), "i%d", i); - name = buffer; - } - n = count_same_name(dim, isl_dim_set, i, name); - if (n) { - int size = strlen(name) + 10; - long_name = isl_alloc_array(ctx, char, size); - if (!long_name) - cloog_die("memory overflow.\n"); - snprintf(long_name, size, "%s_%d", name, n); - name = long_name; - } - *ud = cloog_union_domain_set_name(*ud, CLOOG_ITER, i, name); - free(long_name); - } - isl_dim_free(dim); - - return 0; -} - -/** - * Construct a CloogUnionDomain from an isl_union_set. - * The statement names are set to the names of the - * spaces. The parameter and iterator names of the result are set to those of - * the input, but the scattering dimension names are left unspecified. - */ -CloogUnionDomain *cloog_union_domain_from_isl_union_set( - __isl_take isl_union_set *uset) -{ - int i; - int nparam; - isl_dim *dim; - CloogUnionDomain *ud; - - dim = isl_union_set_get_dim(uset); - nparam = isl_dim_size(dim, isl_dim_param); - - ud = cloog_union_domain_alloc(nparam); - - for (i = 0; i < nparam; ++i) { - const char *s = isl_dim_get_name(dim, isl_dim_param, i); - ud = cloog_union_domain_set_name(ud, CLOOG_PARAM, i, s); - } - isl_dim_free(dim); - - if (isl_union_set_foreach_set(uset, &add_domain, &ud) < 0) { - isl_union_set_free(uset); - cloog_union_domain_free(ud); - assert(0); - } - - isl_union_set_free(uset); - - return ud; -} - -/* Computes x, y and g such that g = gcd(a,b) and a*x+b*y = g */ -static void Euclid(cloog_int_t a, cloog_int_t b, - cloog_int_t *x, cloog_int_t *y, cloog_int_t *g) -{ - cloog_int_t c, d, e, f, tmp; - - cloog_int_init(c); - cloog_int_init(d); - cloog_int_init(e); - cloog_int_init(f); - cloog_int_init(tmp); - cloog_int_abs(c, a); - cloog_int_abs(d, b); - cloog_int_set_si(e, 1); - cloog_int_set_si(f, 0); - while (cloog_int_is_pos(d)) { - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, f); - cloog_int_sub(e, e, tmp); - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, d); - cloog_int_sub(c, c, tmp); - cloog_int_swap(c, d); - cloog_int_swap(e, f); - } - cloog_int_set(*g, c); - if (cloog_int_is_zero(a)) - cloog_int_set_si(*x, 0); - else if (cloog_int_is_pos(a)) - cloog_int_set(*x, e); - else cloog_int_neg(*x, e); - if (cloog_int_is_zero(b)) - cloog_int_set_si(*y, 0); - else { - cloog_int_mul(tmp, a, *x); - cloog_int_sub(tmp, c, tmp); - cloog_int_divexact(*y, tmp, b); - } - cloog_int_clear(c); - cloog_int_clear(d); - cloog_int_clear(e); - cloog_int_clear(f); - cloog_int_clear(tmp); -} - -/* Construct a CloogStride from the given constraint for the given level, - * if possible. - * We first compute the gcd of the coefficients of the existentially - * quantified variables and then remove any common factors it has - * with the coefficient at the given level. - * The result is the value of the stride and if it is not one, - * then it is possible to construct a CloogStride. - * The constraint leading to the stride is stored in the CloogStride - * as well a value (factor) such that the product of this value - * and the coefficient at the given level is equal to -1 modulo the stride. - */ -static CloogStride *construct_stride(isl_constraint *c, int level) -{ - int i, n, sign; - isl_int v, m, gcd, stride, factor; - CloogStride *s; - - if (!c) - return NULL; - - isl_int_init(v); - isl_int_init(m); - isl_int_init(gcd); - isl_int_init(factor); - isl_int_init(stride); - - isl_constraint_get_coefficient(c, isl_dim_set, level - 1, &v); - sign = isl_int_sgn(v); - isl_int_abs(m, v); - - isl_int_set_si(gcd, 0); - n = isl_constraint_dim(c, isl_dim_div); - for (i = 0; i < n; ++i) { - isl_constraint_get_coefficient(c, isl_dim_div, i, &v); - isl_int_gcd(gcd, gcd, v); - } - - isl_int_gcd(v, m, gcd); - isl_int_divexact(stride, gcd, v); - - if (isl_int_is_zero(stride) || isl_int_is_one(stride)) - s = NULL; - else { - Euclid(m, stride, &factor, &v, &gcd); - if (sign > 0) - isl_int_neg(factor, factor); - - c = isl_constraint_copy(c); - s = cloog_stride_alloc_from_constraint(stride, - cloog_constraint_from_isl_constraint(c), factor); - } - - isl_int_clear(stride); - isl_int_clear(factor); - isl_int_clear(gcd); - isl_int_clear(m); - isl_int_clear(v); - - return s; -} - -struct cloog_isl_find_stride_data { - int level; - CloogStride *stride; -}; - -/* Check if the given constraint can be used to derive - * a stride on the iterator identified by data->level. - * We first check that there are some existentially quantified variables - * and that the coefficient at data->level is non-zero. - * Then we call construct_stride for further checks and the actual - * construction of the CloogStride. - */ -static int find_stride(__isl_take isl_constraint *c, void *user) -{ - struct cloog_isl_find_stride_data *data; - int n; - isl_int v; - - data = (struct cloog_isl_find_stride_data *)user; - - if (data->stride) { - isl_constraint_free(c); - return 0; - } - - n = isl_constraint_dim(c, isl_dim_div); - if (n == 0) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - - isl_constraint_get_coefficient(c, isl_dim_set, data->level - 1, &v); - if (!isl_int_is_zero(v)) - data->stride = construct_stride(c, data->level); - - isl_int_clear(v); - - isl_constraint_free(c); - - return 0; -} - -/* Check if the given list of domains has a common stride on the given level. - * If so, return a pointer to a CloogStride object. If not, return NULL. - * - * We project out all later variables, take the union and compute - * the affine hull of the union. Then we check the (equality) - * constraints in this affine hull for imposing a stride. - */ -CloogStride *cloog_domain_list_stride(CloogDomainList *list, int level) -{ - struct cloog_isl_find_stride_data data = { level, NULL }; - isl_set *set; - isl_basic_set *aff; - int first = level; - int n; - int r; - - set = isl_set_from_cloog_domain(list->domain); - n = isl_set_dim(set, isl_dim_set) - first; - set = isl_set_project_out(isl_set_copy(set), isl_dim_set, first, n); - - for (list = list->next; list; list = list->next) { - isl_set *set_i = isl_set_from_cloog_domain(list->domain); - n = isl_set_dim(set_i, isl_dim_set) - first; - set_i = isl_set_project_out(isl_set_copy(set_i), - isl_dim_set, first, n); - set = isl_set_union(set, set_i); - } - aff = isl_set_affine_hull(set); - - r = isl_basic_set_foreach_constraint(aff, &find_stride, &data); - assert(r == 0); - - isl_basic_set_free(aff); - - return data.stride; -} - -struct cloog_can_unroll { - int can_unroll; - int level; - isl_constraint *c; - isl_set *set; - isl_int *n; -}; - - -/* - * Check if the given lower bound can be used for unrolling. - * If the lower bound involves any existentially quantified - * variables, we currently punt. - * Otherwise we compute the maximal value of (i - ceil(l) + 1), - * with l the given lower bound and i the iterator identified by level. - */ -static int is_valid_unrolling_lower_bound(struct cloog_can_unroll *ccu, - __isl_keep isl_constraint *c) -{ - unsigned n_div; - isl_aff *aff; - enum isl_lp_result res; - - n_div = isl_constraint_dim(c, isl_dim_div); - if (isl_constraint_involves_dims(c, isl_dim_div, 0, n_div)) - return 0; - - aff = isl_constraint_get_bound(c, isl_dim_set, ccu->level - 1); - aff = isl_aff_ceil(aff); - aff = isl_aff_neg(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_set, ccu->level - 1, 1); - res = isl_set_max(ccu->set, aff, ccu->n); - isl_aff_free(aff); - - if (res == isl_lp_unbounded) - return 0; - - assert(res == isl_lp_ok); - - cloog_int_add_ui(*ccu->n, *ccu->n, 1); - - return 1; -} - - -/* Check if we can unroll based on the given constraint. - * Only lower bounds can be used. - * Record it if it turns out to be usable and if we haven't recorded - * any other constraint already. - */ -static int constraint_can_unroll(__isl_take isl_constraint *c, void *user) -{ - struct cloog_can_unroll *ccu = (struct cloog_can_unroll *)user; - isl_int v; - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, ccu->level - 1, &v); - if (isl_int_is_pos(v)) { - if (!ccu->c && is_valid_unrolling_lower_bound(ccu, c)) - ccu->c = isl_constraint_copy(c); - } - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - - -/* Check if we can unroll the domain at the current level. - * If the domain is a union, we cannot. Otherwise, we check the - * constraints. - */ -static int basic_set_can_unroll(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_can_unroll *ccu = (struct cloog_can_unroll *)user; - int r = 0; - - if (ccu->c || !ccu->can_unroll) - ccu->can_unroll = 0; - else { - bset = isl_basic_set_remove_redundancies(bset); - r = isl_basic_set_foreach_constraint(bset, - &constraint_can_unroll, ccu); - } - isl_basic_set_free(bset); - return r; -} - - -/* Check if we can unroll the given domain at the given level, and - * if so, return the single lower bound in *lb and an upper bound - * on the number of iterations in *n. - * If we cannot unroll, return 0 and set *lb to NULL. - * - * We can unroll, if we can identify a lower bound on level - * such that the number of iterations is bounded by a constant. - */ -int cloog_domain_can_unroll(CloogDomain *domain, int level, cloog_int_t *n, - CloogConstraint **lb) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - struct cloog_can_unroll ccu = { 1, level, NULL, set, n }; - int r; - - *lb = NULL; - r = isl_set_foreach_basic_set(set, &basic_set_can_unroll, &ccu); - assert(r == 0); - if (!ccu.c) - ccu.can_unroll = 0; - if (!ccu.can_unroll) { - isl_constraint_free(ccu.c); - return 0; - } - - *lb = cloog_constraint_from_isl_constraint(ccu.c); - - return ccu.can_unroll; -} - - -/* Fix the iterator i at the given level to l + o, - * where l is prescribed by the constraint lb and o is equal to offset. - * In particular, if lb is the constraint - * - * a i >= f(j) - * - * then l = ceil(f(j)/a). - */ -CloogDomain *cloog_domain_fixed_offset(CloogDomain *domain, - int level, CloogConstraint *lb, cloog_int_t offset) -{ - isl_aff *aff; - isl_set *set = isl_set_from_cloog_domain(domain); - isl_constraint *c; - isl_constraint *eq; - - c = cloog_constraint_to_isl(lb); - aff = isl_constraint_get_bound(c, isl_dim_set, level - 1); - aff = isl_aff_ceil(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_set, level - 1, -1); - aff = isl_aff_add_constant(aff, offset); - eq = isl_equality_from_aff(aff); - set = isl_set_add_constraint(set, eq); - - return cloog_domain_from_isl_set(set); -} diff --git a/cloog-0.16.3/source/loop.c b/cloog-0.16.3/source/loop.c deleted file mode 100644 index f3d0ef9a8d82997fe234e44404db9b2e11b47eba..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/loop.c +++ /dev/null @@ -1,2665 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** loop.c ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -# include -# include -# include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - -/** - * These functions and global variables are devoted to memory leaks hunting: we - * want to know at each moment how many CloogLoop structures had been allocated - * (cloog_loop_allocated) and how many had been freed (cloog_loop_freed). - * Each time a CloogLoog structure is allocated, a call to the function - * cloog_loop_leak_up() must be carried out, and respectively - * cloog_loop_leak_down() when a CloogLoop structure is freed. The special - * variable cloog_loop_max gives the maximal number of CloogLoop structures - * simultaneously alive (i.e. allocated and non-freed) in memory. - * - July 3rd->11th 2003: first version (memory leaks hunt and correction). - */ - - -static void cloog_loop_leak_up(CloogState *state) -{ - state->loop_allocated++; - if ((state->loop_allocated - state->loop_freed) > state->loop_max) - state->loop_max = state->loop_allocated - state->loop_freed; -} - - -static void cloog_loop_leak_down(CloogState *state) -{ - state->loop_freed++; -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_loop_print_structure function: - * Displays a loop structure in a way that trends to be understandable without - * falling in a deep depression or, for the lucky ones, getting a headache... - * Written by Olivier Chorier, Luc Marchaud, Pierre Martin and Romain Tartiere. - * - April 24th 2005: Initial version. - * - May 21rd 2005: - New parameter `F' for destination file (ie stdout), - * - Minor tweaks. - * - May 26th 2005: Memory leak hunt. - * - June 2nd 2005: (Ced) Integration and minor fixes. - * -June 22nd 2005: (Ced) Adaptation for GMP. - */ -void cloog_loop_print_structure(FILE * file, CloogLoop * loop, int level) -{ int i, j, first=1 ; - - if (loop) - { /* Go to the right level. */ - for (i=0; idomain, level+1, "CloogDomain"); - - /* Print the stride. */ - for(j=0; j<=level; j++) - fprintf(file,"|\t") ; - if (loop->stride) { - fprintf(file, "Stride: "); - cloog_int_print(file, loop->stride->stride); - fprintf(file, "\n"); - fprintf(file, "Offset: "); - cloog_int_print(file, loop->stride->offset); - fprintf(file, "\n"); - } - - /* A blank line. */ - for(j=0; j<=level+1; j++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the block. */ - cloog_block_print_structure(file,loop->block,level+1) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print inner if any. */ - if (loop->inner) - cloog_loop_print_structure(file,loop->inner,level+1) ; - - /* And let's go for the next one. */ - loop = loop->next ; - - /* One more time something that is here only for a better look. */ - if (!loop) - { /* Two blank lines if this is the end of the linked list. */ - for (j=0; j<2; j++) - { for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - - fprintf(file,"\n") ; - } - } - else - { /* A special blank line if the is a next loop. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"V\n") ; - } - } -} - - -/** - * cloog_loop_print function: - * This function prints the content of a CloogLoop structure (start) into a - * file (file, possibly stdout). - * - June 2nd 2005: Now this very old function (probably as old as CLooG) is - * only a frontend to cloog_loop_print_structure, with a quite - * better human-readable representation. - */ -void cloog_loop_print(FILE * file, CloogLoop * loop) -{ cloog_loop_print_structure(file,loop,0) ; -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_loop_free function: - * This function frees the allocated memory for a CloogLoop structure (loop), - * and frees its inner loops and its next loops. - * - June 22nd 2005: Adaptation for GMP. - */ -void cloog_loop_free(CloogLoop * loop) -{ CloogLoop * next ; - - while (loop != NULL) { - cloog_loop_leak_down(loop->state); - - next = loop->next ; - cloog_domain_free(loop->domain) ; - cloog_domain_free(loop->unsimplified); - cloog_block_free(loop->block) ; - if (loop->inner != NULL) - cloog_loop_free(loop->inner) ; - - cloog_stride_free(loop->stride); - free(loop) ; - loop = next ; - } -} - - -/** - * cloog_loop_free_parts function: - * This function frees the allocated memory for some parts of a CloogLoop - * structure (loop), each other argument is a boolean having to be set to 1 if - * we want to free the corresponding part, 0 otherwise. This function applies - * the same freeing policy to its inner ans next loops recursively. - * - July 3rd 2003: first version. - * - June 22nd 2005: Adaptation for GMP. - */ -void cloog_loop_free_parts(loop, domain, block, inner, next) -CloogLoop * loop ; -int domain, block, inner, next ; -{ CloogLoop * follow ; - - while (loop != NULL) { - cloog_loop_leak_down(loop->state); - follow = loop->next ; - - if (domain) - cloog_domain_free(loop->domain) ; - - if (block) - cloog_block_free(loop->block) ; - - if ((inner) && (loop->inner != NULL)) - cloog_loop_free_parts(loop->inner,domain,block,inner,1) ; - - cloog_domain_free(loop->unsimplified); - cloog_stride_free(loop->stride); - free(loop) ; - if (next) - loop = follow ; - else - loop = NULL ; - } -} - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ - - -/** - * Construct a CloogLoop structure from a given iteration domain - * and statement number. - */ -CloogLoop *cloog_loop_from_domain(CloogState *state, CloogDomain *domain, - int number) -{ - int nb_iterators; - CloogLoop * loop ; - CloogStatement * statement ; - - /* Memory allocation and information reading for the first domain: */ - loop = cloog_loop_malloc(state); - /* domain. */ - loop->domain = domain; - if (loop->domain != NULL) - nb_iterators = cloog_domain_dimension(loop->domain); - else - nb_iterators = 0 ; - /* included statement block. */ - statement = cloog_statement_alloc(state, number + 1); - loop->block = cloog_block_alloc(statement, 0, NULL, nb_iterators); - - return loop ; -} - - -/** - * cloog_loop_read function: - * This function reads loop data from a file (foo, possibly stdin) and - * returns a pointer to a CloogLoop structure containing the read information. - * This function can be used only for input file reading, when one loop is - * associated with one statement. - * - number is the statement block number carried by the loop (-1 if none). - * - nb_parameters is the number of parameters. - ** - * - September 9th 2002: first version. - * - April 16th 2005: adaptation to new CloogStatement struct (with number). - * - June 11th 2005: adaptation to new CloogBlock structure. - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop *cloog_loop_read(CloogState *state, - FILE *foo, int number, int nb_parameters) -{ - int op1, op2, op3; - char s[MAX_STRING]; - CloogDomain *domain; - - domain = cloog_domain_union_read(state, foo, nb_parameters); - - /* To read that stupid "0 0 0" line. */ - while (fgets(s,MAX_STRING,foo) == 0) ; - while ((*s=='#' || *s=='\n') || (sscanf(s," %d %d %d",&op1,&op2,&op3)<3)) - fgets(s,MAX_STRING,foo) ; - - return cloog_loop_from_domain(state, domain, number); -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_loop_malloc function: - * This function allocates the memory space for a CloogLoop structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogLoop *cloog_loop_malloc(CloogState *state) -{ CloogLoop * loop ; - - /* Memory allocation for the CloogLoop structure. */ - loop = (CloogLoop *)malloc(sizeof(CloogLoop)) ; - if (loop == NULL) - cloog_die("memory overflow.\n"); - cloog_loop_leak_up(state); - - - /* We set the various fields with default values. */ - loop->state = state; - loop->domain = NULL ; - loop->unsimplified = NULL; - loop->block = NULL ; - loop->usr = NULL; - loop->inner = NULL ; - loop->next = NULL ; - loop->otl = 0; - loop->stride = NULL; - - return loop ; -} - - -/** - * cloog_loop_alloc function: - * This function allocates the memory space for a CloogLoop structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - October 27th 2001: first version. - * - June 22nd 2005: Adaptation for GMP. - * - November 21th 2005: use of cloog_loop_malloc. - */ -CloogLoop *cloog_loop_alloc(CloogState *state, - CloogDomain *domain, int otl, CloogStride *stride, - CloogBlock *block, CloogLoop *inner, CloogLoop *next) -{ CloogLoop * loop ; - - loop = cloog_loop_malloc(state); - - loop->domain = domain ; - loop->block = block ; - loop->inner = inner ; - loop->next = next ; - loop->otl = otl; - loop->stride = cloog_stride_copy(stride); - - return(loop) ; -} - - -/** - * cloog_loop_add function: - * This function adds a CloogLoop structure (loop) at a given place (now) of a - * NULL terminated list of CloogLoop structures. The beginning of this list - * is (start). This function updates (now) to (loop), and updates (start) if the - * added element is the first one -that is when (start) is NULL-. - * - October 28th 2001: first version. - */ -void cloog_loop_add(CloogLoop ** start, CloogLoop ** now, CloogLoop * loop) -{ if (*start == NULL) - { *start = loop ; - *now = *start ; - } - else - { (*now)->next = loop ; - *now = (*now)->next ; - } -} - - -/** - * cloog_loop_add function: - * This function adds a CloogLoop structure (loop) at a given place (now) of a - * NULL terminated list of CloogLoop structures. The beginning of this list - * is (start). This function updates (now) to the end of the loop list (loop), - * and updates (start) if the added element is the first one -that is when - * (start) is NULL-. - * - September 9th 2005: first version. - */ -void cloog_loop_add_list(CloogLoop ** start, CloogLoop ** now, CloogLoop * loop) -{ if (*start == NULL) - { *start = loop ; - *now = *start ; - } - else - { (*now)->next = loop ; - *now = (*now)->next ; - } - - while ((*now)->next != NULL) - *now = (*now)->next ; -} - - -/** - * cloog_loop_copy function: - * This function returns a copy of the CloogLoop structure given as input. In - * fact, there is just new allocations for the CloogLoop structures, but their - * contents are the same. - * - October 28th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - */ -CloogLoop * cloog_loop_copy(CloogLoop * source) -{ CloogLoop * loop ; - CloogBlock * block ; - CloogDomain * domain ; - - loop = NULL ; - if (source != NULL) - { domain = cloog_domain_copy(source->domain) ; - block = cloog_block_copy(source->block) ; - loop = cloog_loop_alloc(source->state, domain, source->otl, - source->stride, block, NULL, NULL); - loop->usr = source->usr; - loop->inner = cloog_loop_copy(source->inner) ; - loop->next = cloog_loop_copy(source->next) ; - } - return(loop) ; -} - - -/** - * cloog_loop_add_disjoint function: - * This function adds some CloogLoop structures at a given place (now) of a - * NULL terminated list of CloogLoop structures. The beginning of this list - * is (start). (loop) can be an union of polyhedra, this function separates the - * union into a list of *disjoint* polyhedra then adds the list. This function - * updates (now) to the end of the list and updates (start) if first added - * element is the first of the principal list -that is when (start) is NULL-. - * (loop) can be freed by this function, basically when its domain is actually - * a union of polyhedra, but don't worry, all the useful data are now stored - * inside the list (start). We do not use PolyLib's Domain_Disjoint function, - * since the number of union components is often higher (thus code size too). - * - October 28th 2001: first version. - * - November 14th 2001: bug correction (this one was hard to find !). - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - October 27th 2005: (debug) included blocks were not copied for new loops. - */ -void cloog_loop_add_disjoint(start, now, loop) -CloogLoop ** start, ** now, * loop ; -{ - CloogLoop * sep, * inner ; - CloogDomain *domain, *seen, *temp, *rest; - CloogBlock * block ; - - if (cloog_domain_isconvex(loop->domain)) - cloog_loop_add(start,now,loop) ; - else { - domain = cloog_domain_simplify_union(loop->domain); - loop->domain = NULL ; - - /* We separate the first element of the rest of the union. */ - domain = cloog_domain_cut_first(domain, &rest); - - /* This first element is the first of the list of disjoint polyhedra. */ - sep = cloog_loop_alloc(loop->state, domain, 0, NULL, - loop->block, loop->inner, NULL); - cloog_loop_add(start,now,sep) ; - - seen = cloog_domain_copy(domain); - while (!cloog_domain_isempty(domain = rest)) { - temp = cloog_domain_cut_first(domain, &rest); - domain = cloog_domain_difference(temp, seen); - cloog_domain_free(temp); - - if (cloog_domain_isempty(domain)) { - cloog_domain_free(domain); - continue; - } - - /* Each new loop will have its own life, for instance we can free its - * inner loop and included block. Then each one must have its own copy - * of both 'inner' and 'block'. - */ - inner = cloog_loop_copy(loop->inner) ; - block = cloog_block_copy(loop->block) ; - - sep = cloog_loop_alloc(loop->state, cloog_domain_copy(domain), - 0, NULL, block, inner, NULL); - /* domain can be an union too. If so: recursion. */ - if (cloog_domain_isconvex(domain)) - cloog_loop_add(start,now,sep) ; - else - cloog_loop_add_disjoint(start,now,sep) ; - - if (cloog_domain_isempty(rest)) { - cloog_domain_free(domain); - break; - } - - seen = cloog_domain_union(seen, domain); - } - cloog_domain_free(rest); - cloog_domain_free(seen); - cloog_loop_free_parts(loop,0,0,0,0) ; - } -} - - -/** - * cloog_loop_disjoint function: - * This function returns a list of loops such that each loop with non-convex - * domain in the input list (loop) is separated into several loops where the - * domains are the components of the union of *disjoint* polyhedra equivalent - * to the original non-convex domain. See cloog_loop_add_disjoint comments - * for more details. - * - September 16th 2005: first version. - */ -CloogLoop * cloog_loop_disjoint(CloogLoop * loop) -{ CloogLoop *res=NULL, * now=NULL, * next ; - - /* Because this is often the case, don't waste time ! */ - if (loop && !loop->next && cloog_domain_isconvex(loop->domain)) - return loop ; - - while (loop != NULL) - { next = loop->next ; - loop->next = NULL ; - cloog_loop_add_disjoint(&res,&now,loop) ; - loop = next ; - } - - return res ; -} - - -/** - * cloog_loop_restrict function: - * This function returns the (loop) in the context of (context): it makes the - * intersection between the (loop) domain and the (context), then it returns - * a pointer to a new loop, with this intersection as domain. - ** - * - October 27th 2001: first version. - * - June 15th 2005: a memory leak fixed (domain was not freed when empty). - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop *cloog_loop_restrict(CloogLoop *loop, CloogDomain *context) -{ int new_dimension ; - CloogDomain * domain, * extended_context, * new_domain ; - CloogLoop * new_loop ; - - domain = loop->domain ; - if (cloog_domain_dimension(domain) > cloog_domain_dimension(context)) - { - new_dimension = cloog_domain_dimension(domain); - extended_context = cloog_domain_extend(context, new_dimension); - new_domain = cloog_domain_intersection(extended_context,loop->domain) ; - cloog_domain_free(extended_context) ; - } - else - new_domain = cloog_domain_intersection(context,loop->domain) ; - - if (cloog_domain_isempty(new_domain)) - { cloog_domain_free(new_domain) ; - return(NULL) ; - } - else { - new_loop = cloog_loop_alloc(loop->state, new_domain, - 0, NULL, loop->block, loop->inner, NULL); - return(new_loop) ; - } -} - - -/** - * Call cloog_loop_restrict on each loop in the list "loop" and return - * the concatenated result. - */ -CloogLoop *cloog_loop_restrict_all(CloogLoop *loop, CloogDomain *context) -{ - CloogLoop *next; - CloogLoop *res = NULL; - CloogLoop **res_next = &res; - - for (; loop; loop = next) { - next = loop->next; - - *res_next = cloog_loop_restrict(loop, context); - if (*res_next) { - res_next = &(*res_next)->next; - cloog_loop_free_parts(loop, 1, 0, 0, 0); - } else { - loop->next = NULL; - cloog_loop_free(loop); - } - } - - return res; -} - - -/** - * Restrict the domains of the inner loops of each loop l in the given - * list of loops to the domain of the loop l. If the domains of all - * inner loops of a given loop l turn out to be empty, then remove l - * from the list. - */ -CloogLoop *cloog_loop_restrict_inner(CloogLoop *loop) -{ - CloogLoop *next; - CloogLoop *res; - CloogLoop **res_next = &res; - - for (; loop; loop = next) { - next = loop->next; - - loop->inner = cloog_loop_restrict_all(loop->inner, loop->domain); - if (loop->inner) { - *res_next = loop; - res_next = &(*res_next)->next; - } else { - loop->next = NULL; - cloog_loop_free(loop); - } - } - - *res_next = NULL; - - return res; -} - -/** - * cloog_loop_project function: - * This function returns the projection of (loop) on the (level) first - * dimensions (outer loops). It makes the projection of the (loop) domain, - * then it returns a pointer to a new loop, with this projection as domain. - ** - * - October 27th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop * cloog_loop_project(CloogLoop * loop, int level) -{ - CloogDomain * new_domain ; - CloogLoop * new_loop, * copy ; - - copy = cloog_loop_alloc(loop->state, loop->domain, loop->otl, loop->stride, - loop->block, loop->inner, NULL); - - if (cloog_domain_dimension(loop->domain) == level) - new_domain = cloog_domain_copy(loop->domain) ; - else - new_domain = cloog_domain_project(loop->domain, level); - - new_loop = cloog_loop_alloc(loop->state, new_domain, 0, NULL, - NULL, copy, NULL); - - return(new_loop) ; -} - - -/** - * Call cloog_loop_project on each loop in the list "loop" and return - * the concatenated result. - */ -CloogLoop *cloog_loop_project_all(CloogLoop *loop, int level) -{ - CloogLoop *next; - CloogLoop *res = NULL; - CloogLoop **res_next = &res; - - for (; loop; loop = next) { - next = loop->next; - - *res_next = cloog_loop_project(loop, level); - res_next = &(*res_next)->next; - cloog_loop_free_parts(loop, 0, 0, 0, 0); - } - - return res; -} - - -/** - * cloog_loop_concat function: - * This function returns a pointer to the concatenation of the - * CloogLoop lists given as input. - * - October 28th 2001: first version. - */ -CloogLoop * cloog_loop_concat(CloogLoop * a, CloogLoop * b) -{ CloogLoop * loop, * temp ; - - loop = a ; - temp = loop ; - if (loop != NULL) - { while (temp->next != NULL) - temp = temp->next ; - temp->next = b ; - } - else - loop = b ; - - return(loop) ; -} - - -/** - * cloog_loop_combine: - * Combine consecutive loops with identical domains into - * a single loop with the concatenation of their inner loops - * as inner loop. - */ -CloogLoop *cloog_loop_combine(CloogLoop *loop) -{ - CloogLoop *first, *second; - - for (first = loop; first; first = first->next) { - while (first->next) { - if (!cloog_domain_lazy_equal(first->domain, first->next->domain)) - break; - second = first->next; - first->inner = cloog_loop_concat(first->inner, second->inner); - first->next = second->next; - cloog_loop_free_parts(second, 1, 0, 0, 0); - } - } - - return loop; -} - -/** - * Remove loops from list that have an empty domain. - */ -CloogLoop *cloog_loop_remove_empty_domain_loops(CloogLoop *loop) -{ - CloogLoop *l, *res, *next, **res_next; - - res = NULL; - res_next = &res; - for (l = loop; l; l = next) { - next = l->next; - if (cloog_domain_isempty(l->domain)) - cloog_loop_free_parts(l, 1, 1, 1, 0); - else { - *res_next = l; - res_next = &(*res_next)->next; - } - } - *res_next = NULL; - - return res; -} - -CloogLoop *cloog_loop_decompose_inner(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims); - -/* For each loop with only one inner loop, replace the domain - * of the loop with the projection of the domain of the inner - * loop. To increase the number of loops with a single inner - * we first decompose the inner loops into strongly connected - * components. - */ -CloogLoop *cloog_loop_specialize(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims) -{ - int dim; - CloogDomain *domain; - CloogLoop *l; - - loop = cloog_loop_decompose_inner(loop, level, scalar, - scaldims, nb_scattdims); - - for (l = loop; l; l = l->next) { - if (l->inner->next) - continue; - if (!cloog_domain_isconvex(l->inner->domain)) - continue; - - dim = cloog_domain_dimension(l->domain); - domain = cloog_domain_project(l->inner->domain, dim); - if (cloog_domain_isconvex(domain)) { - cloog_domain_free(l->domain); - l->domain = domain; - } else { - cloog_domain_free(domain); - } - } - - return cloog_loop_remove_empty_domain_loops(loop); -} - -/* For each loop with only one inner loop, propagate the bounds from - * the inner loop domain to the outer loop domain. This is especially - * useful if the inner loop domain has a non-trivial stride which - * results in an update of the lower bound. - */ -CloogLoop *cloog_loop_propagate_lower_bound(CloogLoop *loop, int level) -{ - int dim; - CloogDomain *domain, *t; - CloogLoop *l; - - for (l = loop; l; l = l->next) { - if (l->inner->next) - continue; - if (!cloog_domain_isconvex(l->inner->domain)) - continue; - - dim = cloog_domain_dimension(l->domain); - domain = cloog_domain_project(l->inner->domain, dim); - if (cloog_domain_isconvex(domain)) { - t = cloog_domain_intersection(domain, l->domain); - cloog_domain_free(l->domain); - l->domain = t; - } - cloog_domain_free(domain); - } - - return loop; -} - -/** - * cloog_loop_separate function: - * This function implements the Quillere algorithm for separation of multiple - * loops: for a given set of polyhedra (loop), it computes a set of disjoint - * polyhedra such that the unions of these sets are equal, and returns this set. - * - October 28th 2001: first version. - * - November 14th 2001: elimination of some unused blocks. - * - August 13th 2002: (debug) in the case of union of polyhedra for one - * loop, redundant constraints are fired. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - October 16th 2005: Removal of the non-shared constraint elimination when - * there is only one loop in the list (seems to work - * without now, DomainSimplify may have been improved). - * The problem was visible with test/iftest2.cloog. - */ -CloogLoop * cloog_loop_separate(CloogLoop * loop) -{ int lazy_equal=0, disjoint = 0; - CloogLoop * new_loop, * new_inner, * res, * now, * temp, * Q, - * inner, * old /*, * previous, * next*/ ; - CloogDomain *UQ, *domain; - - if (loop == NULL) - return NULL ; - - loop = cloog_loop_combine(loop); - - if (loop->next == NULL) - return cloog_loop_disjoint(loop) ; - - UQ = cloog_domain_copy(loop->domain) ; - domain = cloog_domain_copy(loop->domain) ; - res = cloog_loop_alloc(loop->state, domain, 0, NULL, - loop->block, loop->inner, NULL); - - old = loop ; - while((loop = loop->next) != NULL) - { temp = NULL ; - - /* For all Q, add Q-loop associated with the blocks of Q alone, - * and Q inter loop associated with the blocks of Q and loop. - */ - for (Q = res; Q; Q = Q->next) { - /* Add (Q inter loop). */ - if ((disjoint = cloog_domain_lazy_disjoint(Q->domain,loop->domain))) - domain = NULL ; - else - { if ((lazy_equal = cloog_domain_lazy_equal(Q->domain,loop->domain))) - domain = cloog_domain_copy(Q->domain) ; - else - domain = cloog_domain_intersection(Q->domain,loop->domain) ; - - if (!cloog_domain_isempty(domain)) - { new_inner = cloog_loop_concat(cloog_loop_copy(Q->inner), - cloog_loop_copy(loop->inner)) ; - new_loop = cloog_loop_alloc(loop->state, domain, 0, NULL, - NULL, new_inner, NULL); - cloog_loop_add_disjoint(&temp,&now,new_loop) ; - } - else { - disjoint = 1; - cloog_domain_free(domain); - } - } - - /* Add (Q - loop). */ - if (disjoint) - domain = cloog_domain_copy(Q->domain) ; - else - { if (lazy_equal) - domain = cloog_domain_empty(Q->domain); - else - domain = cloog_domain_difference(Q->domain,loop->domain) ; - } - - if (!cloog_domain_isempty(domain)) { - new_loop = cloog_loop_alloc(loop->state, domain, 0, NULL, - NULL, Q->inner, NULL); - cloog_loop_add_disjoint(&temp,&now,new_loop) ; - } - else - { cloog_domain_free(domain) ; - /* If Q->inner is no more useful, we can free it. */ - inner = Q->inner ; - Q->inner = NULL ; - cloog_loop_free(inner) ; - } - } - - /* Add loop-UQ associated with the blocks of loop alone.*/ - if (cloog_domain_lazy_disjoint(loop->domain,UQ)) - domain = cloog_domain_copy(loop->domain) ; - else - { if (cloog_domain_lazy_equal(loop->domain,UQ)) - domain = cloog_domain_empty(UQ); - else - domain = cloog_domain_difference(loop->domain,UQ) ; - } - - if (!cloog_domain_isempty(domain)) { - new_loop = cloog_loop_alloc(loop->state, domain, 0, NULL, - NULL, loop->inner, NULL); - cloog_loop_add_disjoint(&temp,&now,new_loop) ; - } - else - { cloog_domain_free(domain) ; - /* If loop->inner is no more useful, we can free it. */ - cloog_loop_free(loop->inner) ; - } - - loop->inner = NULL ; - - if (loop->next != NULL) - UQ = cloog_domain_union(UQ, cloog_domain_copy(loop->domain)); - else - cloog_domain_free(UQ); - - cloog_loop_free_parts(res,1,0,0,1) ; - - res = temp ; - } - cloog_loop_free_parts(old,1,0,0,1) ; - - return(res) ; -} - - -static CloogDomain *bounding_domain(CloogDomain *dom, CloogOptions *options) -{ - if (options->sh) - return cloog_domain_simple_convex(dom); - else - return cloog_domain_convex(dom); -} - - -/** - * cloog_loop_merge function: - * This function is the 'soft' version of loop_separate if we are looking for - * a code much simpler (and less efficicient). This function returns the new - * CloogLoop list. - * - October 29th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop *cloog_loop_merge(CloogLoop *loop, int level, CloogOptions *options) -{ - CloogLoop *res, *new_inner, *old; - CloogDomain *new_domain, *temp; - - if (loop == NULL) - return loop; - - if (loop->next == NULL && cloog_domain_isconvex(loop->domain)) - return loop; - - old = loop; - temp = loop->domain; - loop->domain = NULL; - new_inner = loop->inner; - - for (loop = loop->next; loop; loop = loop->next) { - temp = cloog_domain_union(temp, loop->domain); - loop->domain = NULL; - new_inner = cloog_loop_concat(new_inner, loop->inner); - } - - new_domain = bounding_domain(temp, options); - - if (level > 0 && !cloog_domain_is_bounded(new_domain, level) && - cloog_domain_is_bounded(temp, level)) { - CloogDomain *splitter, *t2; - - cloog_domain_free(new_domain); - splitter = cloog_domain_bound_splitter(temp, level); - - res = NULL; - while (!cloog_domain_isconvex(splitter)) { - CloogDomain *first, *rest; - first = cloog_domain_cut_first(splitter, &rest); - splitter = rest; - t2 = cloog_domain_intersection(first, temp); - cloog_domain_free(first); - - new_domain = bounding_domain(t2, options); - cloog_domain_free(t2); - - if (cloog_domain_isempty(new_domain)) { - cloog_domain_free(new_domain); - continue; - } - res = cloog_loop_alloc(old->state, new_domain, 0, NULL, - NULL, cloog_loop_copy(new_inner), res); - } - - t2 = cloog_domain_intersection(splitter, temp); - cloog_domain_free(splitter); - - new_domain = bounding_domain(t2, options); - cloog_domain_free(t2); - - if (cloog_domain_isempty(new_domain)) { - cloog_domain_free(new_domain); - cloog_loop_free(new_inner); - } else - res = cloog_loop_alloc(old->state, new_domain, 0, NULL, - NULL, new_inner, res); - } else { - res = cloog_loop_alloc(old->state, new_domain, 0, NULL, - NULL, new_inner, NULL); - } - cloog_domain_free(temp); - - cloog_loop_free_parts(old, 0, 0, 0, 1); - - return res; -} - - -static int cloog_loop_count(CloogLoop *loop) -{ - int nb_loops; - - for (nb_loops = 0; loop; loop = loop->next) - nb_loops++; - - return nb_loops; -} - - -/** - * cloog_loop_sort function: - * Adaptation from LoopGen 0.4 by F. Quillere. This function sorts a list of - * parameterized disjoint polyhedra, in order to not have lexicographic order - * violation (see Quillere paper). - * - September 16th 2005: inclusion of cloog_loop_number (October 29th 2001). - */ -CloogLoop *cloog_loop_sort(CloogLoop *loop, int level) -{ - CloogLoop *res, *now, **loop_array; - CloogDomain **doms; - int i, nb_loops=0, * permut ; - - /* There is no need to sort the parameter domains. */ - if (!level) - return loop; - - /* We will need to know how many loops are in the list. */ - nb_loops = cloog_loop_count(loop); - - /* If there is only one loop, it's the end. */ - if (nb_loops == 1) - return(loop) ; - - /* We have to allocate memory for some useful components: - * - loop_array: the loop array, - * - doms: the array of domains to sort, - * - permut: will give us a possible sort (maybe not the only one). - */ - loop_array = (CloogLoop **)malloc(nb_loops*sizeof(CloogLoop *)) ; - doms = (CloogDomain **)malloc(nb_loops*sizeof(CloogDomain *)); - permut = (int *)malloc(nb_loops*sizeof(int)) ; - - /* We fill up the loop and domain arrays. */ - for (i=0;inext) - { loop_array[i] = loop ; - doms[i] = loop_array[i]->domain; - } - - /* cloog_domain_sort will fill up permut. */ - cloog_domain_sort(doms, nb_loops, level, permut); - - /* With permut and loop_array we build the sorted list. */ - res = NULL ; - for (i=0;inext = NULL ; - cloog_loop_add(&res,&now,loop_array[permut[i]-1]) ; - } - - free(permut) ; - free(doms); - free(loop_array) ; - - return res; -} - - -/** - * cloog_loop_nest function: - * This function changes the loop list in such a way that we have no more than - * one dimension added by level. It returns an equivalent loop list with - * this property. - * - October 29th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - November 21th 2005: (debug) now OK when cloog_loop_restrict returns NULL. - */ -CloogLoop *cloog_loop_nest(CloogLoop *loop, CloogDomain *context, int level) -{ int l ; - CloogLoop * p, * temp, * res, * now, * next ; - CloogDomain * new_domain ; - - loop = cloog_loop_disjoint(loop); - - res = NULL ; - /* Each domain is changed by its intersection with the context. */ - while (loop != NULL) - { p = cloog_loop_restrict(loop, context); - next = loop->next ; - - if (p != NULL) - { cloog_loop_free_parts(loop,1,0,0,0) ; - - temp = cloog_loop_alloc(p->state, p->domain, 0, NULL, - p->block, p->inner, NULL); - - /* If the intersection dimension is too big, we make projections smaller - * and smaller, and each projection includes the preceding projection - * (thus, in the target list, dimensions are added one by one). - */ - if (cloog_domain_dimension(p->domain) >= level) - for (l = cloog_domain_dimension(p->domain); l >= level; l--) { - new_domain = cloog_domain_project(p->domain, l); - temp = cloog_loop_alloc(p->state, new_domain, 0, NULL, - NULL, temp, NULL); - } - - /* p is no more useful (but its content yes !). */ - cloog_loop_free_parts(p,0,0,0,0) ; - - cloog_loop_add(&res,&now,temp) ; - } - else - cloog_loop_free_parts(loop,1,1,1,0) ; - - loop = next ; - } - - return(res) ; -} - - -/* Check if the domains of the inner loops impose a stride constraint - * on the given level. - * The core of the search is implemented in cloog_domain_list_stride. - * Here, we simply construct a list of domains to pass to this function - * and if a stride is found, we adjust the lower bounds by calling - * cloog_domain_stride_lower_bound. - */ -static int cloog_loop_variable_offset_stride(CloogLoop *loop, int level) -{ - CloogDomainList *list = NULL; - CloogLoop *inner; - CloogStride *stride; - - for (inner = loop->inner; inner; inner = inner->next) { - CloogDomainList *entry = ALLOC(CloogDomainList); - entry->domain = cloog_domain_copy(inner->domain); - entry->next = list; - list = entry; - } - - stride = cloog_domain_list_stride(list, level); - - cloog_domain_list_free(list); - - if (!stride) - return 0; - - loop->stride = stride; - loop->domain = cloog_domain_stride_lower_bound(loop->domain, level, stride); - - return 1; -} - - -/** - * cloog_loop_stride function: - * This function will find the stride of a loop for the iterator at the column - * number 'level' in the constraint matrix. It will update the lower bound of - * the iterator accordingly. Basically, the function will try to find in the - * inner loops a common condition on this iterator for the inner loop iterators - * to be integral. For instance, let us consider a loop with the iterator i, - * the iteration domain -4<=i<=n, and its two inner loops with the iterator j. - * The first inner loop has the constraint 3j=i, and the second one has the - * constraint 6j=i. Then the common constraint on i for j to be integral is - * i%3=0, the stride for i is 3. Lastly, we have to find the new lower bound - * for i: the first value satisfying the common constraint: -3. At the end, the - * iteration domain for i is -3<=i<=n and the stride for i is 3. - * - * The algorithm implemented in this function only allows for strides - * on loops with a lower bound that has a constant remainder on division - * by the stride. Before initiating this procedure, we first check - * if we can find a stride with a lower bound with a variable offset in - * cloog_loop_variable_offset_stride. - * - * - loop is the loop including the iteration domain of the considered iterator, - * - level is the column number of the iterator in the matrix of contraints. - ** - * - June 29th 2003: first version (work in progress since June 26th 2003). - * - July 14th 2003: simpler version. - * - June 22nd 2005: Adaptation for GMP (from S. Verdoolaege's 0.12.1 version). - */ -void cloog_loop_stride(CloogLoop * loop, int level) -{ int first_search ; - cloog_int_t stride, ref_offset, offset, potential; - CloogLoop * inner ; - - if (!cloog_domain_can_stride(loop->domain, level)) - return; - - if (cloog_loop_variable_offset_stride(loop, level)) - return; - - cloog_int_init(stride); - cloog_int_init(ref_offset); - cloog_int_init(offset); - cloog_int_init(potential); - - cloog_int_set_si(ref_offset, 0); - cloog_int_set_si(offset, 0); - - /* Default stride. */ - cloog_int_set_si(stride, 1); - first_search = 1 ; - inner = loop->inner ; - - while (inner != NULL) - { /* If the minimun stride has not been found yet, find the stride. */ - if ((first_search) || (!cloog_int_is_one(stride))) - { - cloog_domain_stride(inner->domain, level, &potential, &offset); - if (!cloog_int_is_one(potential) && (!first_search)) - { /* Offsets must be the same for common stride. */ - cloog_int_gcd(stride, potential, stride); - if (!cloog_int_is_zero(stride)) { - cloog_int_fdiv_r(offset, offset, stride); - cloog_int_fdiv_r(ref_offset, ref_offset, stride); - } - if (cloog_int_ne(offset,ref_offset)) - cloog_int_set_si(stride, 1); - } - else { - cloog_int_set(stride, potential); - cloog_int_set(ref_offset, offset); - } - - first_search = 0 ; - } - - inner = inner->next ; - } - - if (cloog_int_is_zero(stride)) - cloog_int_set_si(stride, 1); - - /* Update the values if necessary. */ - if (!cloog_int_is_one(stride)) - { /* Update the stride value. */ - if (!cloog_int_is_zero(offset)) - cloog_int_sub(offset, stride, offset); - loop->stride = cloog_stride_alloc(stride, offset); - loop->domain = cloog_domain_stride_lower_bound(loop->domain, level, - loop->stride); - } - - cloog_int_clear(stride); - cloog_int_clear(ref_offset); - cloog_int_clear(offset); - cloog_int_clear(potential); -} - - -void cloog_loop_otl(CloogLoop *loop, int level) -{ - if (cloog_domain_is_otl(loop->domain, level)) - loop->otl = 1; -} - - -/** - * cloog_loop_stop function: - * This function implements the 'stop' option : each domain of each loop - * in the list 'loop' is replaced by 'context'. 'context' should be the - * domain of the outer loop. By using this method, there are no more dimensions - * to scan and the simplification step will automaticaly remove the domains - * since they are the same as the corresponding contexts. The effect of this - * function is to stop the code generation at the level this function is called, - * the resulting code do not consider the next dimensions. - * - January 11th 2005: first version. - */ -CloogLoop * cloog_loop_stop(CloogLoop * loop, CloogDomain * context) -{ if (loop == NULL) - return NULL ; - else - { cloog_domain_free(loop->domain) ; - loop->domain = cloog_domain_copy(context) ; - loop->next = cloog_loop_stop(loop->next, context) ; - } - - return loop ; -} - - -static int level_is_constant(int level, int scalar, int *scaldims, int nb_scattdims) -{ - return level && (level+scalar <= nb_scattdims) && (scaldims[level+scalar-1]); -} - - -/** - * Compare the constant dimensions of loops 'l1' and 'l2' starting at 'scalar' - * and return -1 if the vector of constant dimensions of 'l1' is smaller - * than that of 'l2', 0 if they are the same and +1 if that of 'l1' is - * greater than that of 'l2'. - * This function should be called on the innermost loop (the loop - * containing a block). - * \param l1 Loop to be compared with l2. - * \param l2 Loop to be compared with l1. - * \param level Current non-scalar dimension. - * \param scaldims Boolean array saying whether a dimension is scalar or not. - * \param nb_scattdims Size of the scaldims array. - * \param scalar Current scalar dimension. - * \return -1 if (l1 < l2), 0 if (l1 == l2) and +1 if (l1 > l2) - */ -int cloog_loop_constant_cmp(CloogLoop *l1, CloogLoop *l2, int level, - int *scaldims, int nb_scattdims, int scalar) -{ - CloogBlock *b1, *b2; - b1 = l1->block; - b2 = l2->block; - while (level_is_constant(level, scalar, scaldims, nb_scattdims)) { - int cmp = cloog_int_cmp(b1->scaldims[scalar], b2->scaldims[scalar]); - if (cmp) - return cmp; - scalar++; - } - return 0; -} - - -/** - * cloog_loop_scalar_gt function: - * This function returns 1 if loop 'l1' is greater than loop 'l2' for the - * scalar dimension vector that begins at dimension 'scalar', 0 otherwise. What - * we want to know is whether a loop is scheduled before another one or not. - * This function solves the problem when the considered dimension for scheduling - * is a scalar dimension. Since there may be a succession of scalar dimensions, - * this function will reason about the vector of scalar dimension that begins - * at dimension 'level+scalar' and finish to the first non-scalar dimension. - * \param l1 Loop to be compared with l2. - * \param l2 Loop to be compared with l1. - * \param level Current non-scalar dimension. - * \param scaldims Boolean array saying whether a dimension is scalar or not. - * \param nb_scattdims Size of the scaldims array. - * \param scalar Current scalar dimension. - * \return 1 if (l1 > l2), 0 otherwise. - ** - * - September 9th 2005: first version. - * - October 15nd 2007: now "greater than" instead of "greater or equal". - */ -int cloog_loop_scalar_gt(l1, l2, level, scaldims, nb_scattdims, scalar) -CloogLoop * l1, * l2 ; -int level, * scaldims, nb_scattdims, scalar ; -{ - return cloog_loop_constant_cmp(l1, l2, level, scaldims, nb_scattdims, scalar) > 0; -} - - -/** - * cloog_loop_scalar_eq function: - * This function returns 1 if loop 'l1' is equal to loop 'l2' for the scalar - * dimension vector that begins at dimension 'scalar', 0 otherwise. What we want - * to know is whether two loops are scheduled for the same time or not. - * This function solves the problem when the considered dimension for scheduling - * is a scalar dimension. Since there may be a succession of scalar dimensions, - * this function will reason about the vector of scalar dimension that begins - * at dimension 'level+scalar' and finish to the first non-scalar dimension. - * - l1 and l2 are the loops to compare, - * - level is the current non-scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - scalar is the current scalar dimension. - ** - * - September 9th 2005 : first version. - */ -int cloog_loop_scalar_eq(l1, l2, level, scaldims, nb_scattdims, scalar) -CloogLoop * l1, * l2 ; -int level, * scaldims, nb_scattdims, scalar ; -{ - return cloog_loop_constant_cmp(l1, l2, level, scaldims, nb_scattdims, scalar) == 0; -} - - -/** - * cloog_loop_scalar_sort function: - * This function sorts a linked list of loops (loop) with respect to the - * scalar dimension vector that begins at dimension 'scalar'. Since there may - * be a succession of scalar dimensions, this function will reason about the - * vector of scalar dimension that begins at dimension 'level+scalar' and - * finish to the first non-scalar dimension. - * \param loop Loop list to sort. - * \param level Current non-scalar dimension. - * \param scaldims Boolean array saying whether a dimension is scalar or not. - * \param nb_scattdims Size of the scaldims array. - * \param scalar Current scalar dimension. - * \return A pointer to the sorted list. - ** - * - July 2nd 2005: first developments. - * - September 2nd 2005: first version. - * - October 15nd 2007: complete rewrite to remove bugs, now a bubble sort. - */ -CloogLoop * cloog_loop_scalar_sort(loop, level, scaldims, nb_scattdims, scalar) -CloogLoop * loop ; -int level, * scaldims, nb_scattdims, scalar ; -{ int ok ; - CloogLoop **current; - - do { - ok = 1; - for (current = &loop; (*current)->next; current = &(*current)->next) { - CloogLoop *next = (*current)->next; - if (cloog_loop_scalar_gt(*current,next,level,scaldims,nb_scattdims,scalar)) { - ok = 0; - (*current)->next = next->next; - next->next = *current; - *current = next; - } - } - } while (!ok); - - return loop ; -} - - -/** - * cloog_loop_generate_backtrack function: - * adaptation from LoopGen 0.4 by F. Quillere. This function implements the - * backtrack of the Quillere et al. algorithm (see the Quillere paper). - * It eliminates unused iterations of the current level for the new one. See the - * example called linearity-1-1 example with and without this part for an idea. - * - October 26th 2001: first version in cloog_loop_generate_general. - * - July 31th 2002: (debug) no more parasite loops (REALLY hard !). - * - October 30th 2005: extraction from cloog_loop_generate_general. - */ -CloogLoop *cloog_loop_generate_backtrack(CloogLoop *loop, - int level, CloogOptions *options) -{ - CloogDomain * domain ; - CloogLoop * now, * now2, * next, * next2, * end, * temp, * l, * inner, - * new_loop ; - - temp = loop ; - loop = NULL ; - - while (temp != NULL) - { l = NULL ; - inner = temp->inner ; - - while (inner != NULL) - { next = inner->next ; - /* This 'if' and its first part is the debug of july 31th 2002. */ - if (inner->block != NULL) { - end = cloog_loop_alloc(temp->state, inner->domain, 0, NULL, - inner->block, NULL, NULL); - domain = cloog_domain_copy(temp->domain) ; - new_loop = cloog_loop_alloc(temp->state, domain, 0, NULL, - NULL, end, NULL); - } - else - new_loop = cloog_loop_project(inner, level); - - cloog_loop_free_parts(inner,0,0,0,0) ; - cloog_loop_add(&l,&now2,new_loop) ; - inner = next ; - } - - temp->inner = NULL ; - - if (l != NULL) - { l = cloog_loop_separate(l) ; - l = cloog_loop_sort(l, level); - while (l != NULL) { - l->stride = cloog_stride_copy(l->stride); - cloog_loop_add(&loop,&now,l) ; - l = l->next ; - } - } - next2 = temp->next ; - cloog_loop_free_parts(temp,1,0,0,0) ; - temp = next2 ; - } - - return loop ; -} - - -/** - * Return 1 if we need to continue recursing to the specified level. - */ -int cloog_loop_more(CloogLoop *loop, int level, int scalar, int nb_scattdims) -{ - return level + scalar <= nb_scattdims || - cloog_domain_dimension(loop->domain) >= level; -} - -/** - * Return 1 if the domains of all loops in the given linked list - * have a fixed value at the given level. - * In principle, there would be no need to check that the fixed value is - * the same for each of these loops because this function is only - * called on a component. However, not all backends perform a proper - * decomposition into components. - */ -int cloog_loop_is_constant(CloogLoop *loop, int level) -{ - cloog_int_t c1, c2; - int r = 1; - - cloog_int_init(c1); - cloog_int_init(c2); - - if (!cloog_domain_lazy_isconstant(loop->domain, level - 1, &c1)) - r = 0; - - for (loop = loop->next; r && loop; loop = loop->next) { - if (!cloog_domain_lazy_isconstant(loop->domain, level - 1, &c2)) - r = 0; - else if (cloog_int_ne(c1, c2)) - r = 0; - } - - cloog_int_clear(c1); - cloog_int_clear(c2); - - return r; -} - -/** - * Assuming all domains in the given linked list of loop - * have a fixed values at level, return a single loop with - * a domain corresponding to this fixed value and with as - * list of inner loops the concatenation of all inner loops - * in the original list. - */ -CloogLoop *cloog_loop_constant(CloogLoop *loop, int level) -{ - CloogLoop *res, *inner, *tmp; - CloogDomain *domain, *t; - - if (!loop) - return loop; - - inner = loop->inner; - domain = loop->domain; - for (tmp = loop->next; tmp; tmp = tmp->next) { - inner = cloog_loop_concat(inner, tmp->inner); - domain = cloog_domain_union(domain, tmp->domain); - } - - domain = cloog_domain_simple_convex(t = domain); - cloog_domain_free(t); - - res = cloog_loop_alloc(loop->state, domain, 0, NULL, NULL, inner, NULL); - - cloog_loop_free_parts(loop, 0, 0, 0, 1); - - return res; -} - - -/* Unroll the given loop at the given level, provided it is allowed - * by cloog_domain_can_unroll. - * If so, we return a list of loops, one for each iteration of the original - * loop. Otherwise, we simply return the original loop. - */ -static CloogLoop *loop_unroll(CloogLoop *loop, int level) -{ - int can_unroll; - cloog_int_t i; - cloog_int_t n; - CloogConstraint *lb; - CloogLoop *res = NULL; - CloogLoop **next_res = &res; - CloogDomain *domain; - CloogLoop *inner; - - cloog_int_init(n); - can_unroll = cloog_domain_can_unroll(loop->domain, level, &n, &lb); - if (!can_unroll) { - cloog_int_clear(n); - return loop; - } - - cloog_int_init(i); - - for (cloog_int_set_si(i, 0); cloog_int_lt(i, n); cloog_int_add_ui(i, i, 1)) { - domain = cloog_domain_copy(loop->domain); - domain = cloog_domain_fixed_offset(domain, level, lb, i); - inner = cloog_loop_copy(loop->inner); - inner = cloog_loop_restrict_all(inner, domain); - if (!inner) { - cloog_domain_free(domain); - continue; - } - *next_res = cloog_loop_alloc(loop->state, domain, 1, NULL, NULL, - inner, NULL); - next_res = &(*next_res)->next; - } - - cloog_int_clear(i); - cloog_int_clear(n); - cloog_constraint_release(lb); - - cloog_loop_free(loop); - - return res; -} - - -/* Unroll all loops in the given list at the given level, provided - * they can be unrolled. - */ -CloogLoop *cloog_loop_unroll(CloogLoop *loop, int level) -{ - CloogLoop *now, *next; - CloogLoop *res = NULL; - CloogLoop **next_res = &res; - - for (now = loop; now; now = next) { - next = now->next; - now->next = NULL; - - *next_res = loop_unroll(now, level); - - while (*next_res) - next_res = &(*next_res)->next; - } - - return res; -} - -CloogLoop *cloog_loop_generate_restricted_or_stop(CloogLoop *loop, - CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options); - -CloogLoop *cloog_loop_recurse(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - int constant, CloogOptions *options); - - -/** - * Recurse on the inner loops of the given single loop. - * - * - loop is the loop for which we have to generate scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - constant is true if the loop is known to be executed at most once - * - options are the general code generation options. - */ -static CloogLoop *loop_recurse(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - int constant, CloogOptions *options) -{ - CloogLoop *inner, *into, *end, *next, *l, *now; - CloogDomain *domain; - - if (level && options->strides && !constant) - cloog_loop_stride(loop, level); - - if (!constant && - options->first_unroll >= 0 && level + scalar >= options->first_unroll) { - loop = cloog_loop_unroll(loop, level); - if (loop->next) - return cloog_loop_recurse(loop, level, scalar, scaldims, - nb_scattdims, 1, options); - } - - if (level && options->otl) - cloog_loop_otl(loop, level); - inner = loop->inner; - domain = cloog_domain_copy(loop->domain); - domain = cloog_domain_add_stride_constraint(domain, loop->stride); - into = NULL ; - while (inner != NULL) - { /* 4b. -ced- recurse for each sub-list of non terminal loops. */ - if (cloog_loop_more(inner, level + 1, scalar, nb_scattdims)) { - end = inner; - while ((end->next != NULL) && - cloog_loop_more(end->next, level + 1, scalar, nb_scattdims)) - end = end->next ; - - next = end->next ; - end->next = NULL ; - - l = cloog_loop_generate_restricted_or_stop(inner, domain, - level + 1, scalar, scaldims, nb_scattdims, options); - - if (l != NULL) - cloog_loop_add_list(&into,&now,l) ; - - inner = next ; - } - else - { cloog_loop_add(&into,&now,inner) ; - inner = inner->next ; - } - } - - cloog_domain_free(domain); - loop->inner = into; - return loop; -} - - -/** - * Recurse on the inner loops of each of the loops in the loop list. - * - * - loop is the loop list for which we have to generate scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - constant is true if the loop is known to be executed at most once - * - options are the general code generation options. - */ -CloogLoop *cloog_loop_recurse(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - int constant, CloogOptions *options) -{ - CloogLoop *now, *next; - CloogLoop *res = NULL; - CloogLoop **next_res = &res; - - for (now = loop; now; now = next) { - next = now->next; - now->next = NULL; - - *next_res = loop_recurse(now, level, scalar, scaldims, nb_scattdims, - constant, options); - - while (*next_res) - next_res = &(*next_res)->next; - } - - return res; -} - -/** - * cloog_loop_generate_general function: - * Adaptation from LoopGen 0.4 by F. Quillere. This function implements the - * Quillere algorithm for polyhedron scanning from step 3 to 5. - * (see the Quillere paper). - * - loop is the loop for which we have to generate a scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - options are the general code generation options. - ** - * - October 26th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - September 2nd 2005: The function have been cutted out in two pieces: - * cloog_loop_generate and this one, in order to handle - * the scalar dimension case more efficiently with - * cloog_loop_generate_scalar. - * - November 15th 2005: (debug) the result of the cloog_loop_generate call may - * be a list of polyhedra (especially if stop option is - * used): cloog_loop_add_list instead of cloog_loop_add. - */ -CloogLoop *cloog_loop_generate_general(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - CloogLoop *res, *now, *temp, *l, *new_loop, *next; - int separate = 0; - int constant = 0; - - /* 3. Separate all projections into disjoint polyhedra. */ - if (level > 0 && cloog_loop_is_constant(loop, level)) { - res = cloog_loop_constant(loop, level); - constant = 1; - } else if ((options->f > level+scalar) || (options->f < 0)) - res = cloog_loop_merge(loop, level, options); - else { - res = cloog_loop_separate(loop); - separate = 1; - } - - /* 3b. -correction- sort the loops to determine their textual order. */ - res = cloog_loop_sort(res, level); - - res = cloog_loop_restrict_inner(res); - - if (separate) - res = cloog_loop_specialize(res, level, scalar, scaldims, nb_scattdims); - - /* 4. Recurse for each loop with the current domain as context. */ - temp = res ; - res = NULL ; - if (!level || (level+scalar < options->l) || (options->l < 0)) - res = cloog_loop_recurse(temp, level, scalar, scaldims, nb_scattdims, - constant, options); - else - while (temp != NULL) - { next = temp->next ; - l = cloog_loop_nest(temp->inner, temp->domain, level+1); - new_loop = cloog_loop_alloc(temp->state, temp->domain, 0, NULL, - NULL, l, NULL); - temp->inner = NULL ; - temp->next = NULL ; - cloog_loop_free_parts(temp,0,0,0,0) ; - cloog_loop_add(&res,&now,new_loop) ; - temp = next ; - } - - if (options->strides) - res = cloog_loop_propagate_lower_bound(res, level); - - /* 5. eliminate unused iterations of the current level for the new one. See - * the example called linearity-1-1 example with and without this part - * for an idea. - */ - if (options->backtrack && level && - ((level+scalar < options->l) || (options->l < 0)) && - ((options->f <= level+scalar) && !(options->f < 0))) - res = cloog_loop_generate_backtrack(res, level, options); - - /* Pray for my new paper to be accepted somewhere since the following stuff - * is really amazing :-) ! - * Far long later: The paper has been accepted to PACT 2004 :-))). But there - * are still some bugs and I have no time to fix them. Thus now you have to - * pray for me to get an academic position for that really amazing stuff :-) ! - * Later again: OK, I get my academic position, but still I have not enough - * time to fix and clean this part... Pray again :-) !!! - */ - /* res = cloog_loop_unisolate(res,level) ;*/ - - return(res) ; -} - - -CloogLoop *cloog_loop_generate_restricted(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options); - - -/** - * cloog_loop_generate_scalar function: - * This function applies the simplified code generation scheme in the trivial - * case of scalar dimensions. When dealing with scalar dimensions, there is - * no need of costly polyhedral operations for separation or sorting: sorting - * is a question of comparing scalar vectors and separation amounts to consider - * only loops with the same scalar vector for the next step of the code - * generation process. This function achieves the separation/sorting process - * for the vector of scalar dimension that begins at dimension 'level+scalar' - * and finish to the first non-scalar dimension. - * - loop is the loop for which we have to generate a scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - options are the general code generation options. - ** - * - September 2nd 2005: First version. - */ -CloogLoop *cloog_loop_generate_scalar(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ CloogLoop * res, * now, * temp, * l, * end, * next, * ref ; - int scalar_new; - - /* We sort the loop list with respect to the current scalar vector. */ - res = cloog_loop_scalar_sort(loop,level,scaldims,nb_scattdims,scalar) ; - - scalar_new = scalar + scaldims[level + scalar - 1]; - - temp = res ; - res = NULL ; - while (temp != NULL) - { /* Then we will appy the general code generation process to each sub-list - * of loops with the same scalar vector. - */ - end = temp ; - ref = temp ; - - while((end->next != NULL) && - cloog_loop_more(end->next, level, scalar_new, nb_scattdims) && - cloog_loop_scalar_eq(ref,end->next,level,scaldims,nb_scattdims,scalar)) - end = end->next ; - - next = end->next ; - end->next = NULL ; - - /* For the next dimension, scalar value is updated by adding the scalar - * vector size, which is stored at scaldims[level+scalar-1]. - */ - if (cloog_loop_more(temp, level, scalar_new, nb_scattdims)) { - l = cloog_loop_generate_restricted(temp, level, scalar_new, - scaldims, nb_scattdims, options); - - if (l != NULL) - cloog_loop_add_list(&res, &now, l); - } else - cloog_loop_add(&res, &now, temp); - - temp = next ; - } - - return res ; -} - - -/* Compare loop with the next loop based on their constant dimensions. - * The result is < 0, == 0 or > 0 depending on whether the constant - * dimensions of loop are lexicographically smaller, equal or greater - * than those of loop->next. - * If loop is the last in the list, then it is assumed to be smaller - * than the "next" one. - */ -static int cloog_loop_next_scal_cmp(CloogLoop *loop) -{ - int i; - int nb_scaldims; - - if (!loop->next) - return -1; - - nb_scaldims = loop->block->nb_scaldims; - if (loop->next->block->nb_scaldims < nb_scaldims) - nb_scaldims = loop->next->block->nb_scaldims; - - for (i = 0; i < nb_scaldims; ++i) { - int cmp = cloog_int_cmp(loop->block->scaldims[i], - loop->next->block->scaldims[i]); - if (cmp) - return cmp; - } - return loop->block->nb_scaldims - loop->next->block->nb_scaldims; -} - - -/* Check whether the globally constant dimensions of a and b - * have the same value for all globally constant dimensions - * that are situated before any (locally) non-constant dimension. - */ -static int cloog_loop_equal_prefix(CloogLoop *a, CloogLoop *b, - int *scaldims, int nb_scattdims) -{ - int i; - int cst = 0; - int dim = 0; - - for (i = 0; i < nb_scattdims; ++i) { - if (!scaldims[i]) { - dim++; - continue; - } - if (!cloog_int_eq(a->block->scaldims[cst], b->block->scaldims[cst])) - break; - cst++; - } - for (i = i + 1; i < nb_scattdims; ++i) { - if (scaldims[i]) - continue; - if (!cloog_domain_lazy_isconstant(a->domain, dim, NULL)) - return 0; - /* No need to check that dim is also constant in b and that the - * constant values are equal. That will happen during the check - * whether the two domains are equal. - */ - dim++; - } - return 1; -} - - -/* Try to block adjacent loops in the loop list "loop". - * We only attempt blocking if the constant dimensions of the loops - * in the least are (not necessarily strictly) increasing. - * Then we look for a sublist such that the first (begin) has constant - * dimensions strictly larger than the previous loop in the complete - * list and such that the loop (end) after the last loop in the sublist - * has constant dimensions strictly larger than the last loop in the sublist. - * Furthermore, all loops in the sublist should have the same domain - * (with globally constant dimensions removed) and the difference - * (if any) in constant dimensions may only occur after all the - * (locally) constant dimensions. - * If we find such a sublist, then the blocks of all but the first - * are merged into the block of the first. - * - * Note that this function can only be called before the global - * blocklist has been created because it may otherwise modify and destroy - * elements on that list. - */ -CloogLoop *cloog_loop_block(CloogLoop *loop, int *scaldims, int nb_scattdims) -{ - CloogLoop *begin, *end, *l; - int begin_after_previous; - int end_after_previous; - - if (!loop->next) - return loop; - for (begin = loop; begin; begin = begin->next) { - if (!begin->block || !begin->block->scaldims) - return loop; - if (cloog_loop_next_scal_cmp(begin) > 0) - return loop; - } - - begin_after_previous = 1; - for (begin = loop; begin; begin = begin->next) { - if (!begin_after_previous) { - begin_after_previous = cloog_loop_next_scal_cmp(begin) < 0; - continue; - } - - end_after_previous = cloog_loop_next_scal_cmp(begin) < 0; - for (end = begin->next; end; end = end->next) { - if (!cloog_loop_equal_prefix(begin, end, scaldims, nb_scattdims)) - break; - if (!cloog_domain_lazy_equal(begin->domain, end->domain)) - break; - end_after_previous = cloog_loop_next_scal_cmp(end) < 0; - } - if (end != begin->next && end_after_previous) { - for (l = begin->next; l != end; l = begin->next) { - cloog_block_merge(begin->block, l->block); - begin->next = l->next; - cloog_loop_free_parts(l, 1, 0, 1, 0); - } - } - - begin_after_previous = cloog_loop_next_scal_cmp(begin) < 0; - } - - return loop; -} - - -/** - * Check whether for any fixed iteration of the outer loops, - * there is an iteration of loop1 that is lexicographically greater - * than an iteration of loop2. - * Return 1 if there exists (or may exist) such a pair. - * Return 0 if all iterations of loop1 are lexicographically smaller - * than the iterations of loop2. - * If no iteration is lexicographically greater, but if there are - * iterations that are equal to iterations of loop2, then return "def". - * This is useful for ensuring that such statements are not reordered. - * Some users, including the test_run target in test, expect - * the statements at a given point to be run in the original order. - * Passing the value "0" for "def" would allow such statements to be reordered - * and would allow for the detection of more components. - */ -int cloog_loop_follows(CloogLoop *loop1, CloogLoop *loop2, - int level, int scalar, int *scaldims, int nb_scattdims, int def) -{ - int dim1, dim2; - - dim1 = cloog_domain_dimension(loop1->domain); - dim2 = cloog_domain_dimension(loop2->domain); - while ((level <= dim1 && level <= dim2) || - level_is_constant(level, scalar, scaldims, nb_scattdims)) { - if (level_is_constant(level, scalar, scaldims, nb_scattdims)) { - int cmp = cloog_loop_constant_cmp(loop1, loop2, level, scaldims, - nb_scattdims, scalar); - if (cmp > 0) - return 1; - if (cmp < 0) - return 0; - scalar += scaldims[level + scalar - 1]; - } else { - int follows = cloog_domain_follows(loop1->domain, loop2->domain, - level); - if (follows > 0) - return 1; - if (follows < 0) - return 0; - level++; - } - } - - return def; -} - - -/* Structure for representing the nodes in the graph being traversed - * using Tarjan's algorithm. - * index represents the order in which nodes are visited. - * min_index is the index of the root of a (sub)component. - * on_stack indicates whether the node is currently on the stack. - */ -struct cloog_loop_sort_node { - int index; - int min_index; - int on_stack; -}; -/* Structure for representing the graph being traversed - * using Tarjan's algorithm. - * len is the number of nodes - * node is an array of nodes - * stack contains the nodes on the path from the root to the current node - * sp is the stack pointer - * index is the index of the last node visited - * order contains the elements of the components separated by -1 - * op represents the current position in order - */ -struct cloog_loop_sort { - int len; - struct cloog_loop_sort_node *node; - int *stack; - int sp; - int index; - int *order; - int op; -}; - -/* Allocate and initialize cloog_loop_sort structure. - */ -static struct cloog_loop_sort *cloog_loop_sort_alloc(int len) -{ - struct cloog_loop_sort *s; - int i; - - s = (struct cloog_loop_sort *)malloc(sizeof(struct cloog_loop_sort)); - assert(s); - s->len = len; - s->node = (struct cloog_loop_sort_node *) - malloc(len * sizeof(struct cloog_loop_sort_node)); - assert(s->node); - for (i = 0; i < len; ++i) - s->node[i].index = -1; - s->stack = (int *)malloc(len * sizeof(int)); - assert(s->stack); - s->order = (int *)malloc(2 * len * sizeof(int)); - assert(s->order); - - s->sp = 0; - s->index = 0; - s->op = 0; - - return s; -} - -/* Free cloog_loop_sort structure. - */ -static void cloog_loop_sort_free(struct cloog_loop_sort *s) -{ - free(s->node); - free(s->stack); - free(s->order); - free(s); -} - - -/* Check whether for any fixed iteration of the outer loops, - * there is an iteration of loop1 that is lexicographically greater - * than an iteration of loop2, where the iteration domains are - * available in the inner loops of the arguments. - * - * By using this functions to detect components, we ensure that - * two CloogLoops appear in the same component if some iterations of - * each loop should be executed before some iterations of the other loop. - * Since we also want two CloogLoops that have exactly the same - * iteration domain at the current level to be placed in the same component, - * we first check if these domains are indeed the same. - */ -static int inner_loop_follows(CloogLoop *loop1, CloogLoop *loop2, - int level, int scalar, int *scaldims, int nb_scattdims, int def) -{ - int f; - - f = cloog_domain_lazy_equal(loop1->domain, loop2->domain); - if (!f) - f = cloog_loop_follows(loop1->inner, loop2->inner, - level, scalar, scaldims, nb_scattdims, def); - - return f; -} - - -/* Perform Tarjan's algorithm for computing the strongly connected components - * in the graph with the individual CloogLoops as vertices. - * Two CloopLoops appear in the same component if they both (indirectly) - * "follow" each other, where the following relation is determined - * by the follows function. - */ -static void cloog_loop_components_tarjan(struct cloog_loop_sort *s, - CloogLoop **loop_array, int i, int level, int scalar, int *scaldims, - int nb_scattdims, - int (*follows)(CloogLoop *loop1, CloogLoop *loop2, - int level, int scalar, int *scaldims, int nb_scattdims, int def)) -{ - int j; - - s->node[i].index = s->index; - s->node[i].min_index = s->index; - s->node[i].on_stack = 1; - s->index++; - s->stack[s->sp++] = i; - - for (j = s->len - 1; j >= 0; --j) { - int f; - - if (j == i) - continue; - if (s->node[j].index >= 0 && - (!s->node[j].on_stack || - s->node[j].index > s->node[i].min_index)) - continue; - - f = follows(loop_array[i], loop_array[j], - level, scalar, scaldims, nb_scattdims, i > j); - if (!f) - continue; - - if (s->node[j].index < 0) { - cloog_loop_components_tarjan(s, loop_array, j, level, scalar, - scaldims, nb_scattdims, follows); - if (s->node[j].min_index < s->node[i].min_index) - s->node[i].min_index = s->node[j].min_index; - } else if (s->node[j].index < s->node[i].min_index) - s->node[i].min_index = s->node[j].index; - } - - if (s->node[i].index != s->node[i].min_index) - return; - - do { - j = s->stack[--s->sp]; - s->node[j].on_stack = 0; - s->order[s->op++] = j; - } while (j != i); - s->order[s->op++] = -1; -} - - -static int qsort_index_cmp(const void *p1, const void *p2) -{ - return *(int *)p1 - *(int *)p2; -} - -/* Sort the elements of the component starting at list. - * The list is terminated by a -1. - */ -static void sort_component(int *list) -{ - int len; - - for (len = 0; list[len] != -1; ++len) - ; - - qsort(list, len, sizeof(int), qsort_index_cmp); -} - -/* Given an array of indices "list" into the "loop_array" array, - * terminated by -1, construct a linked list of the corresponding - * entries and put the result in *res. - * The value returned is the number of CloogLoops in the (linked) list - */ -static int extract_component(CloogLoop **loop_array, int *list, CloogLoop **res) -{ - int i = 0; - - sort_component(list); - while (list[i] != -1) { - *res = loop_array[list[i]]; - res = &(*res)->next; - ++i; - } - *res = NULL; - - return i; -} - - -/** - * Call cloog_loop_generate_scalar or cloog_loop_generate_general - * on each of the strongly connected components in the list of CloogLoops - * pointed to by "loop". - * - * We use Tarjan's algorithm to find the strongly connected components. - * Note that this algorithm also topologically sorts the components. - * - * The components are treated separately to avoid spurious separations. - * The concatentation of the results may contain successive loops - * with the same bounds, so we try to combine such loops. - */ -CloogLoop *cloog_loop_generate_components(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - int i, nb_loops; - CloogLoop *tmp; - CloogLoop *res, **res_next; - CloogLoop **loop_array; - struct cloog_loop_sort *s; - - if (level == 0 || !loop->next) - return cloog_loop_generate_general(loop, level, scalar, - scaldims, nb_scattdims, options); - - nb_loops = cloog_loop_count(loop); - - loop_array = (CloogLoop **)malloc(nb_loops * sizeof(CloogLoop *)); - assert(loop_array); - - for (i = 0, tmp = loop; i < nb_loops; i++, tmp = tmp->next) - loop_array[i] = tmp; - - s = cloog_loop_sort_alloc(nb_loops); - for (i = nb_loops - 1; i >= 0; --i) { - if (s->node[i].index >= 0) - continue; - cloog_loop_components_tarjan(s, loop_array, i, level, scalar, scaldims, - nb_scattdims, &inner_loop_follows); - } - - i = 0; - res = NULL; - res_next = &res; - while (nb_loops) { - int n = extract_component(loop_array, &s->order[i], &tmp); - i += n + 1; - nb_loops -= n; - *res_next = cloog_loop_generate_general(tmp, level, scalar, - scaldims, nb_scattdims, options); - while (*res_next) - res_next = &(*res_next)->next; - } - - cloog_loop_sort_free(s); - - free(loop_array); - - res = cloog_loop_combine(res); - - return res; -} - - -/* For each loop in the list "loop", decompose the list of - * inner loops into strongly connected components and put - * the components into separate loops at the top level. - */ -CloogLoop *cloog_loop_decompose_inner(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims) -{ - CloogLoop *l, *tmp; - CloogLoop **loop_array; - int i, n_loops, max_loops = 0; - struct cloog_loop_sort *s; - - for (l = loop; l; l = l->next) { - n_loops = cloog_loop_count(l->inner); - if (max_loops < n_loops) - max_loops = n_loops; - } - - if (max_loops <= 1) - return loop; - - loop_array = (CloogLoop **)malloc(max_loops * sizeof(CloogLoop *)); - assert(loop_array); - - for (l = loop; l; l = l->next) { - int n; - - for (i = 0, tmp = l->inner; tmp; i++, tmp = tmp->next) - loop_array[i] = tmp; - n_loops = i; - if (n_loops <= 1) - continue; - - s = cloog_loop_sort_alloc(n_loops); - for (i = n_loops - 1; i >= 0; --i) { - if (s->node[i].index >= 0) - continue; - cloog_loop_components_tarjan(s, loop_array, i, level, scalar, - scaldims, nb_scattdims, &cloog_loop_follows); - } - - n = extract_component(loop_array, s->order, &l->inner); - n_loops -= n; - i = n + 1; - while (n_loops) { - CloogLoop *inner; - - n = extract_component(loop_array, &s->order[i], &inner); - n_loops -= n; - i += n + 1; - tmp = cloog_loop_alloc(l->state, cloog_domain_copy(l->domain), - l->otl, l->stride, l->block, inner, l->next); - l->next = tmp; - l = tmp; - } - - cloog_loop_sort_free(s); - } - - free(loop_array); - - return loop; -} - - -CloogLoop *cloog_loop_generate_restricted(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - /* To save both time and memory, we switch here depending on whether the - * current dimension is scalar (simplified processing) or not (general - * processing). - */ - if (level_is_constant(level, scalar, scaldims, nb_scattdims)) - return cloog_loop_generate_scalar(loop, level, scalar, - scaldims, nb_scattdims, options); - /* - * 2. Compute the projection of each polyhedron onto the outermost - * loop variable and the parameters. - */ - loop = cloog_loop_project_all(loop, level); - - return cloog_loop_generate_components(loop, level, scalar, scaldims, - nb_scattdims, options); -} - - -CloogLoop *cloog_loop_generate_restricted_or_stop(CloogLoop *loop, - CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - /* If the user asked to stop code generation at this level, let's stop. */ - if ((options->stop >= 0) && (level+scalar >= options->stop+1)) - return cloog_loop_stop(loop,context) ; - - return cloog_loop_generate_restricted(loop, level, scalar, scaldims, - nb_scattdims, options); -} - - -/** - * cloog_loop_generate function: - * Adaptation from LoopGen 0.4 by F. Quillere. This function implements the - * Quillere algorithm for polyhedron scanning from step 1 to 2. - * (see the Quillere paper). - * - loop is the loop for which we have to generate a scanning code, - * - context is the context of the current loop (constraints on parameter and/or - * on outer loop counters), - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - options are the general code generation options. - ** - * - October 26th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 15th 2005: a memory leak fixed (loop was not entirely freed when - * the result of cloog_loop_restrict was NULL). - * - June 22nd 2005: Adaptation for GMP. - * - September 2nd 2005: The function have been cutted out in two pieces: - * cloog_loop_generate and this one, in order to handle - * the scalar dimension case more efficiently with - * cloog_loop_generate_scalar. - * - November 15th 2005: (debug) Condition for stop option no more take care of - * further scalar dimensions. - */ -CloogLoop *cloog_loop_generate(CloogLoop *loop, CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - /* 1. Replace each polyhedron by its intersection with the context. - */ - loop = cloog_loop_restrict_all(loop, context); - if (!loop) - return NULL; - - return cloog_loop_generate_restricted_or_stop(loop, context, - level, scalar, scaldims, nb_scattdims, options); -} - - -/* - * Internal function for simplifying a single loop in a list of loops. - * See cloog_loop_simplify. - */ -static CloogLoop *loop_simplify(CloogLoop *loop, CloogDomain *context, - int level, int nb_scattdims, CloogOptions *options) -{ - int domain_dim; - CloogBlock * new_block ; - CloogLoop *simplified, *inner; - CloogDomain * domain, * simp, * inter, * extended_context ; - - domain = loop->domain ; - - domain_dim = cloog_domain_dimension(domain); - extended_context = cloog_domain_extend(context, domain_dim); - inter = cloog_domain_intersection(domain,extended_context) ; - simp = cloog_domain_simplify(domain, extended_context); - cloog_domain_free(extended_context) ; - - /* If the constraint system is never true, go to the next one. */ - if (cloog_domain_never_integral(simp)) { - cloog_loop_free(loop->inner); - cloog_domain_free(inter); - cloog_domain_free(simp); - return NULL; - } - - inner = cloog_loop_simplify(loop->inner, inter, level+1, nb_scattdims, - options); - - if ((inner == NULL) && (loop->block == NULL)) { - cloog_domain_free(inter); - cloog_domain_free(simp); - return NULL; - } - - new_block = cloog_block_copy(loop->block) ; - - simplified = cloog_loop_alloc(loop->state, simp, loop->otl, loop->stride, - new_block, inner, NULL); - - /* Only save the domains, if it involves only scattering dimensions. */ - if (options->save_domains) { - if (domain_dim > nb_scattdims) { - CloogDomain *t; - inter = cloog_domain_project(t = inter, nb_scattdims); - cloog_domain_free(t); - } - inter = cloog_domain_add_stride_constraint(inter, loop->stride); - simplified->unsimplified = inter; - } else - cloog_domain_free(inter); - - return(simplified) ; -} - - -/** - * cloog_loop_simplify function: - * This function implements the part 6. of the Quillere algorithm, it - * recursively simplifies each loop in the context of the preceding loop domain. - * It returns a pointer to the simplified loop list. - * The cloog_domain_simplify (DomainSimplify) behaviour is really bad with - * polyhedra union and some really awful sidesteppings were written, I plan - * to solve that... - * - October 31th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - April 16th 2005: a memory leak fixed (extended_context was not freed). - * - June 15th 2005: a memory leak fixed (loop was not conveniently freed - * when the constraint system is never true). - * - October 27th 2005: - this function called before cloog_loop_fast_simplify - * is now the official cloog_loop_simplify function in - * replacement of a slower and more complex one (after - * deep changes in the pretty printer). - * - we use cloog_loop_disjoint to fix the problem when - * simplifying gives a union of polyhedra (before, it - * was under the responsibility of the pretty printer). - */ -CloogLoop *cloog_loop_simplify(CloogLoop *loop, CloogDomain *context, int level, - int nb_scattdims, CloogOptions *options) -{ - CloogLoop *now; - CloogLoop *res = NULL; - CloogLoop **next = &res; - int need_split = 0; - - for (now = loop; now; now = now->next) - if (!cloog_domain_isconvex(now->domain)) { - now->domain = cloog_domain_simplify_union(now->domain); - if (!cloog_domain_isconvex(now->domain)) - need_split = 1; - } - - /* If the input of CLooG contains any union domains, then they - * may not have been split yet at this point. Do so now as the - * clast construction assumes there are no union domains. - */ - if (need_split) - loop = cloog_loop_disjoint(loop); - - for (now = loop; now; now = now->next) { - *next = loop_simplify(now, context, level, nb_scattdims, options); - - now->inner = NULL; /* For loop integrity. */ - cloog_domain_free(now->domain); - now->domain = NULL; - - if (*next) - next = &(*next)->next; - } - cloog_loop_free(loop); - - return res; -} - - -/** - * cloog_loop_scatter function: - * This function add the scattering (scheduling) informations in a loop. - */ -void cloog_loop_scatter(CloogLoop * loop, CloogScattering *scatt) -{ - loop->domain = cloog_domain_scatter(loop->domain, scatt); -} - diff --git a/cloog-0.16.3/source/matrix.c b/cloog-0.16.3/source/matrix.c deleted file mode 100644 index 43c238024c596f5cea918dbed2eb9a2e6eac97d0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/matrix.c +++ /dev/null @@ -1,213 +0,0 @@ - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** cloogmatrix.c ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - -#include -#include -#include -#include "../include/cloog/cloog.h" - -/** - * cloog_matrix_alloc: - * Allocate a CloogMatrix data structure with NbRows rows and NbColumns columns. - * All values are initialized to 0. - * This method returns a pointer to the data structure if successful or a NULL - * pointer otherwise. - */ -CloogMatrix *cloog_matrix_alloc(unsigned NbRows, unsigned NbColumns) -{ - CloogMatrix *matrix; - cloog_int_t **p, *q; - int i, j; - - matrix = (CloogMatrix *)malloc(sizeof(CloogMatrix)); - - if (!matrix) - return NULL; - - matrix->NbRows = NbRows; - matrix->NbColumns = NbColumns; - - if (!NbRows || !NbColumns) { - matrix->p = NULL; - matrix->p_Init = NULL; - return matrix; - } - - p = (cloog_int_t **)malloc(NbRows * sizeof(cloog_int_t *)); - - if (p == NULL) { - free (matrix); - return NULL; - } - - q = (cloog_int_t *)malloc(NbRows * NbColumns * sizeof(cloog_int_t)); - - if (q == NULL) { - free (matrix); - free (p); - return NULL; - } - - matrix->p = p; - matrix->p_Init = q; - - for (i = 0; i < NbRows; i++) { - *p++ = q; - for (j = 0; j < NbColumns; j++) { - cloog_int_init(*(q+j)); - cloog_int_set_si(*(q+j), 0); - } - q += NbColumns; - } - - return matrix; -} - -/** - * cloog_matrix_free: - * Free matrix. - */ -void cloog_matrix_free(CloogMatrix * matrix) -{ - int i; - cloog_int_t *p; - int size = matrix->NbRows * matrix->NbColumns; - - p = matrix->p_Init; - - for (i = 0; i < size; i++) - cloog_int_clear(*p++); - - if (matrix) { - free(matrix->p_Init); - free(matrix->p); - free(matrix); - } -} - - -/** - * Print the elements of CloogMatrix M to file, with each row prefixed - * by prefix and suffixed by suffix. - */ -void cloog_matrix_print_structure(FILE *file, CloogMatrix *M, - const char *prefix, const char *suffix) -{ - int i, j; - - for (i = 0; i < M->NbRows; ++i) { - fprintf(file, "%s", prefix); - for (j = 0; j < M->NbColumns; ++j) { - cloog_int_print(file, M->p[i][j]); - fprintf(file, " "); - } - fprintf(file, "%s\n", suffix); - } -} - -/** - * cloog_matrix_print function: - * This function prints the content of a CloogMatrix structure (matrix) into a - * file (foo, possibly stdout). - */ -void cloog_matrix_print(FILE* foo, CloogMatrix* m) -{ - if (!m) - fprintf(foo, "(null)\n"); - - fprintf(foo, "%d %d\n", m->NbRows, m->NbColumns); - cloog_matrix_print_structure(foo, m, "", ""); - fflush(foo); -} - - -static char *next_line(FILE *input, char *line, unsigned len) -{ - char *p; - - do { - if (!(p = fgets(line, len, input))) - return NULL; - while (isspace(*p) && *p != '\n') - ++p; - } while (*p == '#' || *p == '\n'); - - return p; -} - -CloogMatrix *cloog_matrix_read(FILE *input) -{ - unsigned n_row, n_col; - char line[1024]; - - if (!next_line(input, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, "%u %u", &n_row, &n_col) != 2) - cloog_die("Input error.\n"); - - return cloog_matrix_read_of_size(input, n_row, n_col); -} - -/** - * Read a matrix in PolyLib format from input. - */ -CloogMatrix *cloog_matrix_read_of_size(FILE *input, - unsigned n_row, unsigned n_col) -{ - CloogMatrix *M; - int i, j; - char line[1024]; - char val[1024]; - char *p; - - M = cloog_matrix_alloc(n_row, n_col); - if (!M) - cloog_die("memory overflow.\n"); - for (i = 0; i < n_row; ++i) { - int offset; - int n; - - p = next_line(input, line, sizeof(line)); - if (!p) - cloog_die("Input error.\n"); - for (j = 0; j < n_col; ++j) { - n = sscanf(p, "%s%n", val, &offset); - if (!n) - cloog_die("Input error.\n"); - cloog_int_read(M->p[i][j], val); - p += offset; - } - } - - return M; -} diff --git a/cloog-0.16.3/source/matrix/constraintset.c b/cloog-0.16.3/source/matrix/constraintset.c deleted file mode 100644 index 78025f88a73ab35a951c0a12167595d56b869101..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/matrix/constraintset.c +++ /dev/null @@ -1,1056 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** constraintset.c ** - **-------------------------------------------------------------------** - ** First version: april 17th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - - -# include -# include -# include -#include -#include - - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - - -CloogConstraint *cloog_constraint_first(CloogConstraintSet *constraints); -CloogConstraint *cloog_constraint_next(CloogConstraint *constraint); - - -CloogConstraintSet *cloog_constraint_set_from_cloog_matrix(CloogMatrix *M) -{ - return (CloogConstraintSet *)M; -} - - -void cloog_constraint_set_free(CloogConstraintSet *constraints) -{ - cloog_matrix_free(&constraints->M); -} - -int cloog_constraint_set_contains_level(CloogConstraintSet *constraints, - int level, int nb_parameters) -{ - return constraints->M.NbColumns - 2 - nb_parameters >= level; -} - -/* Check if the variable at position level is defined by an - * equality. If so, return the row number. Otherwise, return -1. - * - * If there is an equality, we can print it directly -no ambiguity-. - * PolyLib can give more than one equality, we use just the first one - * (this is a PolyLib problem, but all equalities are equivalent). - */ -CloogConstraint *cloog_constraint_set_defining_equality(CloogConstraintSet *constraints, int level) -{ - CloogConstraint *constraint = ALLOC(CloogConstraint); - int i; - - constraint->set = constraints; - for (i = 0; i < constraints->M.NbRows; i++) - if (cloog_int_is_zero(constraints->M.p[i][0]) && - !cloog_int_is_zero(constraints->M.p[i][level])) { - constraint->line = &constraints->M.p[i]; - return constraint; - } - free(constraint); - return cloog_constraint_invalid(); -} - -/* Check if the variable (e) at position level is defined by a - * pair of inequalities - * + -m e + + k1 >= 0 - * <-a, i> + m e + <-b, p> + k2 >= 0 - * with 0 <= k1 + k2 < m - * If so return the row number of the upper bound and set *lower - * to the row number of the lower bound. If not, return -1. - * - * If the variable at position level occurs in any other constraint, - * then we currently return -1. The modulo guard that we would generate - * would still be correct, but we would also need to generate - * guards corresponding to the other constraints, and this has not - * been implemented yet. - */ -CloogConstraint *cloog_constraint_set_defining_inequalities(CloogConstraintSet *constraints, - int level, CloogConstraint **lower, int nb_par) -{ - int i, j, k; - cloog_int_t m; - CloogMatrix *matrix = &constraints->M; - unsigned len = matrix->NbColumns - 2; - unsigned nb_iter = len - nb_par; - CloogConstraint *constraint; - - for (i = 0; i < matrix->NbRows; i++) { - if (cloog_int_is_zero(matrix->p[i][level])) - continue; - if (cloog_int_is_zero(matrix->p[i][0])) - return cloog_constraint_invalid(); - if (cloog_int_is_one(matrix->p[i][level])) - return cloog_constraint_invalid(); - if (cloog_int_is_neg_one(matrix->p[i][level])) - return cloog_constraint_invalid(); - if (cloog_seq_first_non_zero(matrix->p[i]+level+1, - (1+nb_iter)-(level+1)) != -1) - return cloog_constraint_invalid(); - for (j = i+1; j < matrix->NbRows; ++j) { - if (cloog_int_is_zero(matrix->p[j][level])) - continue; - if (cloog_int_is_zero(matrix->p[j][0])) - return cloog_constraint_invalid(); - if (cloog_int_is_one(matrix->p[j][level])) - return cloog_constraint_invalid(); - if (cloog_int_is_neg_one(matrix->p[j][level])) - return cloog_constraint_invalid(); - if (cloog_seq_first_non_zero(matrix->p[j]+level+1, - (1+nb_iter)-(level+1)) != -1) - return cloog_constraint_invalid(); - - cloog_int_init(m); - cloog_int_add(m, matrix->p[i][1+len], matrix->p[j][1+len]); - if (cloog_int_is_neg(m) || - cloog_int_abs_ge(m, matrix->p[i][level])) { - cloog_int_clear(m); - return cloog_constraint_invalid(); - } - cloog_int_clear(m); - - if (!cloog_seq_is_neg(matrix->p[i]+1, matrix->p[j]+1, - len)) - return cloog_constraint_invalid(); - for (k = j+1; k < matrix->NbRows; ++k) - if (!cloog_int_is_zero(matrix->p[k][level])) - return cloog_constraint_invalid(); - *lower = ALLOC(CloogConstraint); - constraint = ALLOC(CloogConstraint); - (*lower)->set = constraints; - constraint->set = constraints; - if (cloog_int_is_pos(matrix->p[i][level])) { - (*lower)->line = &matrix->p[i]; - constraint->line = &matrix->p[j]; - } else { - (*lower)->line = &matrix->p[j]; - constraint->line = &matrix->p[i]; - } - return constraint; - } - } - return cloog_constraint_invalid(); -} - -int cloog_constraint_set_total_dimension(CloogConstraintSet *constraints) -{ - return constraints->M.NbColumns - 2; -} - -int cloog_constraint_set_n_iterators(CloogConstraintSet *constraint, int nb_par) -{ - return cloog_constraint_set_total_dimension(constraint) - nb_par; -} - -int cloog_equal_total_dimension(CloogEqualities *equal) -{ - return cloog_constraint_set_total_dimension(equal->constraints); -} - -int cloog_constraint_total_dimension(CloogConstraint *constraint) -{ - return cloog_constraint_set_total_dimension(constraint->set); -} - - - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ - - -/* Equalities are stored inside a CloogMatrix data structure called "equal". - * This matrix has (nb_scattering + nb_iterators + 1) rows (i.e. total - * dimensions + 1, the "+ 1" is because a statement can be included inside an - * external loop without iteration domain), and (nb_scattering + nb_iterators + - * nb_parameters + 2) columns (all unknowns plus the scalar plus the equality - * type). The ith row corresponds to the equality "= 0" for the ith dimension - * iterator. The first column gives the equality type (0: no equality, then - * EQTYPE_* -see pprint.h-). At each recursion of pprint, if an equality for - * the current level is found, the corresponding row is updated. Then the - * equality if it exists is used to simplify expressions (e.g. if we have - * "i+1" while we know that "i=2", we simplify it in "3"). At the end of - * the pprint call, the corresponding row is reset to zero. - */ - -CloogEqualities *cloog_equal_alloc(int n, int nb_levels, - int nb_parameters) -{ - int i; - CloogEqualities *equal = ALLOC(CloogEqualities); - - equal->constraints = cloog_constraint_set_from_cloog_matrix( - cloog_matrix_alloc(n, nb_levels + nb_parameters + 1)); - equal->types = ALLOCN(int, n); - for (i = 0; i < n; ++i) - equal->types[i] = EQTYPE_NONE; - return equal; -} - -void cloog_equal_free(CloogEqualities *equal) -{ - cloog_matrix_free(&equal->constraints->M); - free(equal->types); - free(equal); -} - -int cloog_equal_count(CloogEqualities *equal) -{ - return equal->constraints->M.NbRows; -} - -CloogConstraintSet *cloog_equal_constraints(CloogEqualities *equal) -{ - return equal->constraints; -} - - -/** - * cloog_constraint_equal_type function : - * This function returns the type of the equality in the constraint (line) of - * (constraints) for the element (level). An equality is 'constant' iff all - * other factors are null except the constant one. It is a 'pure item' iff - * it is equal or opposite to a single variable or parameter. - * Otherwise it is an 'affine expression'. - * For instance: - * i = -13 is constant, i = j, j = -M are pure items, - * j = 2*M, i = j+1, 2*j = M are affine expressions. - * - * - constraints is the matrix of constraints, - * - level is the column number in equal of the element which is 'equal to', - ** - * - July 3rd 2002: first version, called pprint_equal_isconstant. - * - July 6th 2002: adaptation for the 3 types. - * - June 15th 2005: (debug) expr = domain->Constraint[line] was evaluated - * before checking if line != ONE_TIME_LOOP. Since - * ONE_TIME_LOOP is -1, an invalid read was possible. - * - October 19th 2005: Removal of the once-time-loop specific processing. - */ -static int cloog_constraint_equal_type(CloogConstraint *constraint, int level) -{ - int i, one=0 ; - cloog_int_t *expr; - - expr = *constraint->line; - - if (!cloog_int_is_one(expr[level]) && !cloog_int_is_neg_one(expr[level])) - return EQTYPE_EXAFFINE; - - /* There is only one non null factor, and it must be +1 or -1 for - * iterators or parameters. - */ - for (i = 1;i <= constraint->set->M.NbColumns-2; i++) - if (!cloog_int_is_zero(expr[i]) && (i != level)) { - if ((!cloog_int_is_one(expr[i]) && !cloog_int_is_neg_one(expr[i])) || (one != 0)) - return EQTYPE_EXAFFINE ; - else - one = 1 ; - } - /* if the constant factor is non null, it must be alone. */ - if (one != 0) { - if (!cloog_int_is_zero(expr[constraint->set->M.NbColumns-1])) - return EQTYPE_EXAFFINE ; - } - else - return EQTYPE_CONSTANT ; - - return EQTYPE_PUREITEM ; -} - - -int cloog_equal_type(CloogEqualities *equal, int level) -{ - return equal->types[level-1]; -} - - -/** - * cloog_equal_update function: - * this function updates a matrix of equalities where each row corresponds to - * the equality "=0" of an affine expression such that the entry at column - * "row" (="level") is not zero. This matrix is upper-triangular, except the - * row number "level-1" which has to be updated for the matrix to be triangular. - * This function achieves the processing. - * - equal is the matrix to be updated, - * - level gives the row that has to be updated (it is actually row "level-1"), - * - nb_par is the number of parameters of the program. - ** - * - September 20th 2005: first version. - */ -static void cloog_equal_update(CloogEqualities *equal, int level, int nb_par) -{ int i, j ; - cloog_int_t gcd, factor_level, factor_outer, temp_level, temp_outer; - - cloog_int_init(gcd); - cloog_int_init(temp_level); - cloog_int_init(temp_outer); - cloog_int_init(factor_level); - cloog_int_init(factor_outer); - - /* For each previous level, */ - for (i=level-2;i>=0;i--) - { /* if the corresponding iterator is inside the current equality and is equal - * to something, - */ - if (!cloog_int_is_zero(equal->constraints->M.p[level-1][i+1]) && equal->types[i]) - { /* Compute the Greatest Common Divisor. */ - cloog_int_gcd(gcd, equal->constraints->M.p[level-1][i+1], - equal->constraints->M.p[i][i+1]); - - /* Compute the factors to apply to each row vector element. */ - cloog_int_divexact(factor_level, equal->constraints->M.p[i][i+1], gcd); - cloog_int_divexact(factor_outer, equal->constraints->M.p[level-1][i+1], gcd); - - /* Now update the row 'level'. */ - /* - the iterators, up to level, */ - for (j = 1; j <= level; j++) { - cloog_int_mul(temp_level, factor_level, - equal->constraints->M.p[level-1][j]); - cloog_int_mul(temp_outer, factor_outer, equal->constraints->M.p[i][j]); - cloog_int_sub(equal->constraints->M.p[level-1][j], temp_level, temp_outer); - } - /* - between last useful iterator (level) and the first parameter, the - * matrix is sparse (full of zeroes), we just do nothing there. - * - the parameters and the scalar. - */ - for (j = 0; j < nb_par + 1; j++) { - cloog_int_mul(temp_level,factor_level, - equal->constraints->M.p[level-1] - [equal->constraints->M.NbColumns-j-1]); - cloog_int_mul(temp_outer,factor_outer, - equal->constraints->M.p[i][equal->constraints->M.NbColumns-j-1]); - cloog_int_sub(equal->constraints->M.p[level-1] - [equal->constraints->M.NbColumns-j-1], - temp_level,temp_outer) ; - } - } - } - - /* Normalize (divide by GCD of all elements) the updated equality. */ - cloog_seq_normalize(&(equal->constraints->M.p[level-1][1]), - equal->constraints->M.NbColumns-1); - - cloog_int_clear(gcd); - cloog_int_clear(temp_level); - cloog_int_clear(temp_outer); - cloog_int_clear(factor_level); - cloog_int_clear(factor_outer); -} - - -/** - * cloog_equal_add function: - * This function updates the row (level-1) of the equality matrix (equal) with - * the row that corresponds to the row (line) of the matrix (matrix). - * - equal is the matrix of equalities, - * - matrix is the matrix of constraints, - * - level is the column number in matrix of the element which is 'equal to', - * - line is the line number in matrix of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - ** - * - July 2nd 2002: first version. - * - October 19th 2005: Addition of the once-time-loop specific processing. - */ -void cloog_equal_add(CloogEqualities *equal, CloogConstraintSet *constraints, - int level, CloogConstraint *line, int nb_par) -{ - int j; - CloogConstraint *i = cloog_constraint_invalid(); - CloogMatrix *matrix = &constraints->M; - - /* If we are in the case of a loop running once, this means that the equality - * comes from an inequality. Here we find this inequality. - */ - if (!cloog_constraint_is_valid(line)) - { for (i = cloog_constraint_first(constraints); - cloog_constraint_is_valid(i); i = cloog_constraint_next(i)) - if ((!cloog_int_is_zero(i->line[0][0]))&& (!cloog_int_is_zero(i->line[0][level]))) - { line = i ; - - /* Since in once-time-loops, equalities derive from inequalities, we - * may have to offset the values. For instance if we have 2i>=3, the - * equality is in fact i=2. This may happen when the level coefficient is - * not 1 or -1 and the scalar value is not zero. In any other case (e.g., - * if the inequality is an expression including outer loop counters or - * parameters) the once time loop would not have been detected - * because of floord and ceild functions. - */ - if (cloog_int_ne_si(i->line[0][level],1) && - cloog_int_ne_si(i->line[0][level],-1) && - !cloog_int_is_zero(i->line[0][matrix->NbColumns-1])) { - cloog_int_t denominator; - - cloog_int_init(denominator); - cloog_int_abs(denominator, i->line[0][level]); - cloog_int_fdiv_q(i->line[0][matrix->NbColumns-1], - i->line[0][matrix->NbColumns-1], denominator); - cloog_int_set_si(i->line[0][level], cloog_int_sgn(i->line[0][level])); - cloog_int_clear(denominator); - } - - break ; - } - } - assert(cloog_constraint_is_valid(line)); - - /* We update the line of equal corresponding to level: - * - the first element gives the equality type, - */ - equal->types[level-1] = cloog_constraint_equal_type(line, level); - /* - the other elements corresponding to the equality itself - * (the iterators up to level, then the parameters and the scalar). - */ - for (j=1;j<=level;j++) - cloog_int_set(equal->constraints->M.p[level-1][j], line->line[0][j]); - for (j = 0; j < nb_par + 1; j++) - cloog_int_set(equal->constraints->M.p[level-1][equal->constraints->M.NbColumns-j-1], - line->line[0][line->set->M.NbColumns-j-1]); - - if (cloog_constraint_is_valid(i)) - cloog_constraint_release(line); - cloog_equal_update(equal, level, nb_par); -} - - -/** - * cloog_equal_del function : - * This function reset the equality corresponding to the iterator (level) - * in the equality matrix (equal). - * - July 2nd 2002: first version. - */ -void cloog_equal_del(CloogEqualities *equal, int level) -{ - equal->types[level-1] = EQTYPE_NONE; -} - - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - -/** - * Function cloog_constraint_set_normalize: - * This function will modify the constraint system in such a way that when - * there is an equality depending on the element at level 'level', there are - * no more (in)equalities depending on this element. For instance, try - * test/valilache.cloog with options -f 8 -l 9, with and without the call - * to this function. At a given moment, for the level L we will have - * 32*P=L && L>=1 (P is a lower level), this constraint system cannot be - * translated directly into a source code. Thus, we normalize the domain to - * remove L from the inequalities. In our example, this leads to - * 32*P=L && 32*P>=1, that can be transated to the code - * if (P>=1) { L=32*P ; ... }. This function solves the DaeGon Kim bug. - * WARNING: Remember that if there is another call to Polylib after a call to - * this function, we have to recall this function. - * -June 16th 2005: first version (adaptation from URGent June-7th-2005 by - * N. Vasilache). - * - June 21rd 2005: Adaptation for GMP. - * - November 4th 2005: Complete rewriting, simpler and faster. It is no more an - * adaptation from URGent. - */ -void cloog_constraint_set_normalize(CloogConstraintSet *constraints, int level) -{ int ref, i, j ; - cloog_int_t factor_i, factor_ref, temp_i, temp_ref, gcd; - CloogMatrix *matrix = &constraints->M; - - if (matrix == NULL) - return ; - - /* Don't "normalize" the constant term. */ - if (level == matrix->NbColumns-1) - return; - - /* Let us find an equality for the current level that can be propagated. */ - for (ref=0;refNbRows;ref++) - if (cloog_int_is_zero(matrix->p[ref][0]) && !cloog_int_is_zero(matrix->p[ref][level])) { - cloog_int_init(gcd); - cloog_int_init(temp_i); - cloog_int_init(temp_ref); - cloog_int_init(factor_i); - cloog_int_init(factor_ref); - - /* Row "ref" is the reference equality, now let us find a row to simplify.*/ - for (i=ref+1;iNbRows;i++) - if (!cloog_int_is_zero(matrix->p[i][level])) { - /* Now let us set to 0 the "level" coefficient of row "j" using "ref". - * First we compute the factors to apply to each row vector element. - */ - cloog_int_gcd(gcd, matrix->p[ref][level], matrix->p[i][level]); - cloog_int_divexact(factor_i, matrix->p[ref][level], gcd); - cloog_int_divexact(factor_ref, matrix->p[i][level], gcd); - - /* Maybe we are simplifying an inequality: factor_i must not be <0. */ - if (cloog_int_is_neg(factor_i)) { - cloog_int_abs(factor_i, factor_i); - cloog_int_neg(factor_ref, factor_ref); - } - - /* Now update the vector. */ - for (j=1;jNbColumns;j++) { - cloog_int_mul(temp_i, factor_i, matrix->p[i][j]); - cloog_int_mul(temp_ref, factor_ref, matrix->p[ref][j]); - cloog_int_sub(matrix->p[i][j], temp_i, temp_ref); - } - - /* Normalize (divide by GCD of all elements) the updated vector. */ - cloog_seq_normalize(&(matrix->p[i][1]), matrix->NbColumns-1); - } - - cloog_int_clear(gcd); - cloog_int_clear(temp_i); - cloog_int_clear(temp_ref); - cloog_int_clear(factor_i); - cloog_int_clear(factor_ref); - break ; - } -} - - - -/** - * cloog_constraint_set_copy function: - * this functions builds and returns a "hard copy" (not a pointer copy) of a - * CloogMatrix data structure. - * - October 26th 2005: first version. - */ -CloogConstraintSet *cloog_constraint_set_copy(CloogConstraintSet *constraints) -{ int i, j ; - CloogMatrix *copy; - CloogMatrix *matrix = &constraints->M; - - copy = cloog_matrix_alloc(matrix->NbRows, matrix->NbColumns); - - for (i=0;iNbRows;i++) - for (j=0;jNbColumns;j++) - cloog_int_set(copy->p[i][j], matrix->p[i][j]); - - return cloog_constraint_set_from_cloog_matrix(copy); -} - - -/** - * cloog_equal_vector_simplify function: - * this function simplify an affine expression with its coefficients in - * "vector" of length "length" thanks to an equality matrix "equal" that gives - * for some elements of the affine expression an equality with other elements, - * preferably constants. For instance, if the vector contains i+j+3 and the - * equality matrix gives i=n and j=2, the vector is simplified to n+3 and is - * returned in a new vector. - * - vector is the array of affine expression coefficients - * - equal is the matrix of equalities, - * - length is the vector length, - * - level is a level we don't want to simplify (-1 if none), - * - nb_par is the number of parameters of the program. - ** - * - September 20th 2005: first version. - * - November 2nd 2005: (debug) we are simplifying inequalities, thus we are - * not allowed to multiply the vector by a negative - * constant.Problem found after a report of Michael - * Classen. - */ -struct cloog_vec *cloog_equal_vector_simplify(CloogEqualities *equal, cloog_int_t *vector, - int length, int level, int nb_par) -{ int i, j ; - cloog_int_t gcd, factor_vector, factor_equal, temp_vector, temp_equal; - struct cloog_vec *simplified; - - simplified = cloog_vec_alloc(length); - cloog_seq_cpy(simplified->p, vector, length); - - cloog_int_init(gcd); - cloog_int_init(temp_vector); - cloog_int_init(temp_equal); - cloog_int_init(factor_vector); - cloog_int_init(factor_equal); - - /* For each non-null coefficient in the vector, */ - for (i=length-nb_par-2;i>0;i--) - if (i != level) - { /* if the coefficient in not null, and there exists a useful equality */ - if ((!cloog_int_is_zero(simplified->p[i])) && equal->types[i-1]) - { /* Compute the Greatest Common Divisor. */ - cloog_int_gcd(gcd, simplified->p[i], equal->constraints->M.p[i-1][i]); - - /* Compute the factors to apply to each row vector element. */ - cloog_int_divexact(factor_vector, equal->constraints->M.p[i-1][i], gcd); - cloog_int_divexact(factor_equal, simplified->p[i], gcd); - - /* We are simplifying an inequality: factor_vector must not be <0. */ - if (cloog_int_is_neg(factor_vector)) { - cloog_int_abs(factor_vector, factor_vector); - cloog_int_neg(factor_equal, factor_equal); - } - - /* Now update the vector. */ - /* - the iterators, up to the current level, */ - for (j=1;j<=length-nb_par-2;j++) { - cloog_int_mul(temp_vector, factor_vector, simplified->p[j]); - cloog_int_mul(temp_equal, factor_equal, equal->constraints->M.p[i-1][j]); - cloog_int_sub(simplified->p[j], temp_vector, temp_equal); - } - /* - between last useful iterator (i) and the first parameter, the equal - * matrix is sparse (full of zeroes), we just do nothing there. - * - the parameters and the scalar. - */ - for (j = 0; j < nb_par + 1; j++) { - cloog_int_mul(temp_vector, factor_vector, simplified->p[length-1-j]); - cloog_int_mul(temp_equal,factor_equal, - equal->constraints->M.p[i-1][equal->constraints->M.NbColumns-j-1]); - cloog_int_sub(simplified->p[length-1-j],temp_vector,temp_equal) ; - } - } - } - - /* Normalize (divide by GCD of all elements) the updated vector. */ - cloog_seq_normalize(&simplified->p[1], length - 1); - - cloog_int_clear(gcd); - cloog_int_clear(temp_vector); - cloog_int_clear(temp_equal); - cloog_int_clear(factor_vector); - cloog_int_clear(factor_equal); - - return simplified ; -} - - -/** - * cloog_constraint_set_simplify function: - * this function simplify all constraints inside the matrix "matrix" thanks to - * an equality matrix "equal" that gives for some elements of the affine - * constraint an equality with other elements, preferably constants. - * For instance, if a row of the matrix contains i+j+3>=0 and the equality - * matrix gives i=n and j=2, the constraint is simplified to n+3>=0. The - * simplified constraints are returned back inside a new simplified matrix. - * - matrix is the set of constraints to simplify, - * - equal is the matrix of equalities, - * - level is a level we don't want to simplify (-1 if none), - * - nb_par is the number of parameters of the program. - ** - * - November 4th 2005: first version. - */ -CloogConstraintSet *cloog_constraint_set_simplify(CloogConstraintSet *constraints, - CloogEqualities *equal, int level, int nb_par) -{ int i, j, k ; - struct cloog_vec *vector; - CloogMatrix *simplified; - CloogMatrix *matrix = &constraints->M; - - if (matrix == NULL) - return NULL ; - - /* The simplified matrix is such that each row has been simplified thanks - * tho the "equal" matrix. We allocate the memory for the simplified matrix, - * then for each row of the original matrix, we compute the simplified - * vector and we copy its content into the according simplified row. - */ - simplified = cloog_matrix_alloc(matrix->NbRows, matrix->NbColumns); - for (i=0;iNbRows;i++) - { vector = cloog_equal_vector_simplify(equal, matrix->p[i], - matrix->NbColumns, level, nb_par); - for (j=0;jNbColumns;j++) - cloog_int_set(simplified->p[i][j], vector->p[j]); - - cloog_vec_free(vector); - } - - /* After simplification, it may happen that few constraints are the same, - * we remove them here by replacing them with 0=0 constraints. - */ - for (i=0;iNbRows;i++) - for (j=i+1;jNbRows;j++) - { for (k=0;kNbColumns;k++) - if (cloog_int_ne(simplified->p[i][k],simplified->p[j][k])) - break ; - - if (k == matrix->NbColumns) - { for (k=0;kNbColumns;k++) - cloog_int_set_si(simplified->p[j][k],0); - } - } - - return cloog_constraint_set_from_cloog_matrix(simplified); -} - - -/** - * Return clast_expr corresponding to the variable "level" (1 based) in - * the given constraint. - */ -struct clast_expr *cloog_constraint_variable_expr(CloogConstraint *constraint, - int level, CloogNames *names) -{ - int total_dim, nb_iter; - const char *name; - - total_dim = cloog_constraint_total_dimension(constraint); - nb_iter = total_dim - names->nb_parameters; - - if (level <= nb_iter) - name = cloog_names_name_at_level(names, level); - else - name = names->parameters[level - (nb_iter+1)] ; - - return &new_clast_name(name)->expr; -} - - -/** - * Return true if constraint c involves variable v (zero-based). - */ -int cloog_constraint_involves(CloogConstraint *constraint, int v) -{ - return !cloog_int_is_zero(constraint->line[0][1+v]); -} - -int cloog_constraint_is_lower_bound(CloogConstraint *constraint, int v) -{ - return cloog_int_is_pos(constraint->line[0][1+v]); -} - -int cloog_constraint_is_upper_bound(CloogConstraint *constraint, int v) -{ - return cloog_int_is_neg(constraint->line[0][1+v]); -} - -int cloog_constraint_is_equality(CloogConstraint *constraint) -{ - return cloog_int_is_zero(constraint->line[0][0]); -} - -void cloog_constraint_clear(CloogConstraint *constraint) -{ - int k; - - for (k = 1; k <= constraint->set->M.NbColumns - 2; k++) - cloog_int_set_si(constraint->line[0][k], 0); -} - -CloogConstraintSet *cloog_constraint_set_drop_constraint( - CloogConstraintSet *constraints, CloogConstraint *constraint) -{ - cloog_constraint_clear(constraint); - return constraints; -} - -void cloog_constraint_coefficient_get(CloogConstraint *constraint, - int var, cloog_int_t *val) -{ - cloog_int_set(*val, constraint->line[0][1+var]); -} - -void cloog_constraint_coefficient_set(CloogConstraint *constraint, - int var, cloog_int_t val) -{ - cloog_int_set(constraint->line[0][1+var], val); -} - -void cloog_constraint_constant_get(CloogConstraint *constraint, cloog_int_t *val) -{ - cloog_int_set(*val, constraint->line[0][constraint->set->M.NbColumns-1]); -} - -/** - * Copy the coefficient of constraint c into dst in PolyLib order, - * i.e., first the coefficients of the variables, then the coefficients - * of the parameters and finally the constant. - */ -void cloog_constraint_copy_coefficients(CloogConstraint *constraint, - cloog_int_t *dst) -{ - cloog_seq_cpy(dst, constraint->line[0]+1, constraint->set->M.NbColumns-1); -} - -CloogConstraint *cloog_constraint_invalid(void) -{ - return NULL; -} - -int cloog_constraint_is_valid(CloogConstraint *constraint) -{ - return constraint != NULL; -} - - -/** - * Check whether there is any need for the constraint "upper" on - * "level" to get reduced. - * Yes. - */ -int cloog_constraint_needs_reduction(CloogConstraint *upper, int level) -{ - return 1; -} - - -/** - * Create a CloogConstraintSet containing enough information to perform - * a reduction on the upper equality (in this case lower is an invalid - * CloogConstraint) or the pair of inequalities upper and lower - * from within insert_modulo_guard. - * In the PolyLib backend, we return a CloogConstraintSet containting only - * the upper bound. The reduction will not change the stride so there - * will be no need to recompute the bound on the modulo expression. - */ -CloogConstraintSet *cloog_constraint_set_for_reduction(CloogConstraint *upper, - CloogConstraint *lower) -{ - CloogConstraintSet *set; - - set = cloog_constraint_set_from_cloog_matrix( - cloog_matrix_alloc(1, upper->set->M.NbColumns)); - cloog_seq_cpy(set->M.p[0], upper->line[0], set->M.NbColumns); - return set; -} - - -/* Computes x, y and g such that g = gcd(a,b) and a*x+b*y = g */ -static void Euclid(cloog_int_t a, cloog_int_t b, - cloog_int_t *x, cloog_int_t *y, cloog_int_t *g) -{ - cloog_int_t c, d, e, f, tmp; - - cloog_int_init(c); - cloog_int_init(d); - cloog_int_init(e); - cloog_int_init(f); - cloog_int_init(tmp); - cloog_int_abs(c, a); - cloog_int_abs(d, b); - cloog_int_set_si(e, 1); - cloog_int_set_si(f, 0); - while (cloog_int_is_pos(d)) { - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, f); - cloog_int_sub(e, e, tmp); - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, d); - cloog_int_sub(c, c, tmp); - cloog_int_swap(c, d); - cloog_int_swap(e, f); - } - cloog_int_set(*g, c); - if (cloog_int_is_zero(a)) - cloog_int_set_si(*x, 0); - else if (cloog_int_is_pos(a)) - cloog_int_set(*x, e); - else cloog_int_neg(*x, e); - if (cloog_int_is_zero(b)) - cloog_int_set_si(*y, 0); - else { - cloog_int_mul(tmp, a, *x); - cloog_int_sub(tmp, c, tmp); - cloog_int_divexact(*y, tmp, b); - } - cloog_int_clear(c); - cloog_int_clear(d); - cloog_int_clear(e); - cloog_int_clear(f); - cloog_int_clear(tmp); -} - -/** - * Reduce the modulo guard expressed by "contraints" using equalities - * found in outer nesting levels (stored in "equal"). - * The modulo guard may be an equality or a pair of inequalities. - * In case of a pair of inequalities, "constraints" only contains the - * upper bound and *bound contains the bound on the - * corresponding modulo expression. The bound is left untouched by - * this function. - */ -CloogConstraintSet *cloog_constraint_set_reduce(CloogConstraintSet *constraints, - int level, CloogEqualities *equal, int nb_par, cloog_int_t *bound) -{ - int i, j, k, len, len2, nb_iter; - struct cloog_vec *line_vector2; - cloog_int_t *line, *line2, val, x, y, g; - - len = constraints->M.NbColumns; - len2 = cloog_equal_total_dimension(equal) + 2; - nb_iter = len - 2 - nb_par; - - cloog_int_init(val); - cloog_int_init(x); - cloog_int_init(y); - cloog_int_init(g); - - line_vector2 = cloog_vec_alloc(len2); - line2 = line_vector2->p; - - line = constraints->M.p[0]; - if (cloog_int_is_pos(line[level])) - cloog_seq_neg(line+1, line+1, len-1); - cloog_int_neg(line[level], line[level]); - assert(cloog_int_is_pos(line[level])); - - for (i = nb_iter; i >= 1; --i) { - if (i == level) - continue; - cloog_int_fdiv_r(line[i], line[i], line[level]); - if (cloog_int_is_zero(line[i])) - continue; - - /* Look for an earlier variable that is also a multiple of line[level] - * and check whether we can use the corresponding affine expression - * to "reduce" the modulo guard, where reduction means that we eliminate - * a variable, possibly at the expense of introducing other variables - * with smaller index. - */ - for (j = level-1; j >= 0; --j) { - CloogConstraint *equal_constraint; - if (cloog_equal_type(equal, j+1) != EQTYPE_EXAFFINE) - continue; - equal_constraint = cloog_equal_constraint(equal, j); - cloog_constraint_coefficient_get(equal_constraint, j, &val); - if (!cloog_int_is_divisible_by(val, line[level])) { - cloog_constraint_release(equal_constraint); - continue; - } - cloog_constraint_coefficient_get(equal_constraint, i-1, &val); - if (cloog_int_is_divisible_by(val, line[level])) { - cloog_constraint_release(equal_constraint); - continue; - } - for (k = j; k > i; --k) { - cloog_constraint_coefficient_get(equal_constraint, k-1, &val); - if (cloog_int_is_zero(val)) - continue; - if (!cloog_int_is_divisible_by(val, line[level])) - break; - } - if (k > i) { - cloog_constraint_release(equal_constraint); - continue; - } - cloog_constraint_coefficient_get(equal_constraint, i-1, &val); - Euclid(val, line[level], &x, &y, &g); - if (!cloog_int_is_divisible_by(val, line[i])) { - cloog_constraint_release(equal_constraint); - continue; - } - cloog_int_divexact(val, line[i], g); - cloog_int_neg(val, val); - cloog_int_mul(val, val, x); - cloog_int_set_si(y, 1); - /* Add (equal->p[j][i])^{-1} * line[i] times the equality */ - cloog_constraint_copy_coefficients(equal_constraint, line2+1); - cloog_seq_combine(line+1, y, line+1, val, line2+1, i); - cloog_seq_combine(line+len-nb_par-1, y, line+len-nb_par-1, - val, line2+len2-nb_par-1, nb_par+1); - cloog_constraint_release(equal_constraint); - break; - } - } - - cloog_vec_free(line_vector2); - - cloog_int_clear(val); - cloog_int_clear(x); - cloog_int_clear(y); - cloog_int_clear(g); - - /* Make sure the line is not inverted again in the calling function. */ - cloog_int_neg(line[level], line[level]); - - return constraints; -} - -CloogConstraint *cloog_constraint_first(CloogConstraintSet *constraints) -{ - CloogConstraint *c; - if (constraints->M.NbRows == 0) - return cloog_constraint_invalid(); - c = ALLOC(CloogConstraint); - c->set = constraints; - c->line = &constraints->M.p[0]; - return c; -} - -CloogConstraint *cloog_constraint_next(CloogConstraint *constraint) -{ - constraint->line++; - if (constraint->line == constraint->set->M.p + constraint->set->M.NbRows) { - cloog_constraint_release(constraint); - return NULL; - } - return constraint; -} - -CloogConstraint *cloog_constraint_copy(CloogConstraint *constraint) -{ - CloogConstraint *c = ALLOC(CloogConstraint); - c->set = constraint->set; - c->line = constraint->line; - return c; -} - -void cloog_constraint_release(CloogConstraint *constraint) -{ - free(constraint); -} - -int cloog_constraint_set_foreach_constraint(CloogConstraintSet *constraints, - int (*fn)(CloogConstraint *constraint, void *user), void *user) -{ - CloogConstraint *c; - - for (c = cloog_constraint_first(constraints); - cloog_constraint_is_valid(c); c = cloog_constraint_next(c)) - if (fn(c, user) < 0) { - cloog_constraint_release(c); - return -1; - } - - return 0; -} - -CloogConstraint *cloog_equal_constraint(CloogEqualities *equal, int j) -{ - CloogConstraint *c = ALLOC(CloogConstraint); - c->set = equal->constraints; - c->line = &equal->constraints->M.p[j]; - return c; -} diff --git a/cloog-0.16.3/source/mp_get_memory_functions.c b/cloog-0.16.3/source/mp_get_memory_functions.c deleted file mode 100644 index e14e336ceb681ff5518a5ed6806d588109b7a46e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/mp_get_memory_functions.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)) -{ - if (alloc_func_ptr) - *alloc_func_ptr = __gmp_allocate_func; - if (realloc_func_ptr) - *realloc_func_ptr = __gmp_reallocate_func; - if (free_func_ptr) - *free_func_ptr = __gmp_free_func; -} diff --git a/cloog-0.16.3/source/names.c b/cloog-0.16.3/source/names.c deleted file mode 100644 index 53e39b2ac1b4b120a60fdaa322bf7043f4c445c3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/names.c +++ /dev/null @@ -1,528 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** names.c ** - **-------------------------------------------------------------------** - ** First version: august 1st 2002 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2002-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - - -# include -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_names_print function: - * this function is a human-friendly way to display the CloogNames data - * structure, it shows all the different fields and includes an indentation - * level (level) in order to work with others print_structure functions. - * - July 1st 2005: first version based on the old cloog_names_print function, - * it was the first modification in this file since two years ! - */ -void cloog_names_print_structure(FILE * file, CloogNames * names, int level) -{ int i ; - - /* Go to the right level. */ - for (i=0; inb_scalars) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scalar iterators. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_scalars > 0) - { fprintf(file,"+-- Scalar iterator strings:") ; - for (i=0;inb_scalars;i++) - fprintf(file," %s",names->scalars[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"+-- No scalar string\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scattering dimension number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Scattering dimension number: %d\n",names->nb_scattering) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scattering iterators. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_scattering > 0) - { fprintf(file,"+-- Scattering strings ----:") ; - for (i=0;inb_scattering;i++) - fprintf(file," %s",names->scattering[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"+-- No scattering string\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the iterator number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Iterator number -----------: %d\n",names->nb_iterators) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the iterators. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_iterators > 0) - { fprintf(file,"+-- Iterator strings ------:") ; - for (i=0;inb_iterators;i++) - fprintf(file," %s",names->iterators[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"+-- No iterators\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the parameter number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Parameter number ----------: %d\n",names->nb_parameters) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the parameters. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_parameters > 0) - { fprintf(file,"+-- Parameter strings -----:") ; - for (i=0;inb_parameters;i++) - fprintf(file," %s",names->parameters[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"No parameters\n") ; - - } - else - fprintf(file,"+-- No CloogNames\n") ; - fprintf(file, "Number of active references: %d\n", names->references); -} - - -/** - * cloog_names_print function: - * This function prints the content of a CloogNames structure (names) into a - * file (file, possibly stdout). - * - July 1st 2005: Now this function is only a frontend to - * cloog_program_print_structure, with a quite better - * human-readable representation. - */ -void cloog_names_print(FILE * file, CloogNames * names) -{ cloog_names_print_structure(file,names,0) ; -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_names_free function: - * This function decrements the number of active references to - * a CloogNames structure and frees the allocated memory for this structure - * if the count drops to zero. - */ -void cloog_names_free(CloogNames * names) -{ int i ; - - if (--names->references) - return; - - if (names->scalars != NULL) - { for (i=0;inb_scalars;i++) - free(names->scalars[i]) ; - free(names->scalars) ; - } - - if (names->scattering != NULL) - { for (i=0;inb_scattering;i++) - free(names->scattering[i]) ; - free(names->scattering) ; - } - - if (names->iterators != NULL) - { for (i=0;inb_iterators;i++) - free(names->iterators[i]) ; - free(names->iterators) ; - } - - if (names->parameters != NULL) - { for (i=0;inb_parameters;i++) - free(names->parameters[i]) ; - free(names->parameters) ; - } - free(names) ; -} - - -/** - * cloog_names_copy function: - * As usual in CLooG, "copy" means incrementing the reference count. - */ -CloogNames *cloog_names_copy(CloogNames *names) -{ - names->references++; - return names; -} - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ - - -/** - * cloog_names_read_strings function: - * This function reads names data from a file (file, possibly stdin). It first - * reads the naming option to know if whether it can read the names from the - * file. If not, NULL is returned. Otherwise, the names are stored - * into an array of strings, and a pointer to this array is returned. - * - nb_items is the number of names the function will have to read if the - * naming option is set to read. - */ -char ** cloog_names_read_strings(FILE *file, int nb_items) -{ int i, option, n ; - char s[MAX_STRING], str[MAX_STRING], * c, **names = NULL; - - /* We first read name option. */ - while (fgets(s,MAX_STRING,file) == 0) ; - while ((*s=='#' || *s=='\n') || (sscanf(s," %d",&option)<1)) - fgets(s,MAX_STRING,file) ; - - /* If there is no item to read, then return NULL. */ - if (nb_items == 0) - return NULL ; - - /* If option is to read them in the file, then we do it and put them into - * the array. - */ - if (option) - { /* Memory allocation. */ - names = (char **)malloc(nb_items*sizeof(char *)) ; - if (names == NULL) - cloog_die("memory overflow.\n"); - for (i=0;inb_scalars = 0 ; - names->nb_scattering = 0 ; - names->nb_iterators = 0 ; - names->nb_parameters = 0 ; - names->scalars = NULL ; - names->scattering = NULL ; - names->iterators = NULL ; - names->parameters = NULL ; - names->references = 1; - - return names ; -} - - -/** - * cloog_names_alloc function: - * This function allocates the memory space for a CloogNames structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - July 7th 2005: first version. - * - September 11th 2005: addition of both scalar and scattering informations. - * - November 21th 2005: use of cloog_names_malloc. - */ -CloogNames * cloog_names_alloc() -{ CloogNames * names ; - - /* Memory allocation for the CloogNames structure. */ - names = cloog_names_malloc() ; - - names->nb_scalars = 0; - names->nb_scattering = 0; - names->nb_iterators = 0; - names->nb_parameters = 0; - names->scalars = NULL; - names->scattering = NULL; - names->iterators = NULL; - names->parameters = NULL; - - return names ; -} - - -/** - * cloog_names_generate_items function: - * This function returns a pointer to an array of strings with entries set - * based on the function's parameters. - * - nb_items will be the number of entries in the string array. - * - prefix is the name prefix of each item or NULL. - * If not NULL, then the remainder of the name will be an integer - * in the range [0, nb_items-1]. - * - first_item is the name of the first item (if prefix == NULL), - * the nb_items-1 following items will be the nb_items-1 - * following letters in ASCII code. - ** - * - September 9th 2002 : first version, extracted from cloog_names_generate. - */ -char ** cloog_names_generate_items(int nb_items, char * prefix, char first_item) -{ int i ; - char ** names ; - - if (nb_items == 0) - return NULL ; - - names = (char **)malloc(nb_items*sizeof(char *)) ; - if (names == NULL) - cloog_die("memory overflow.\n"); - for (i=0;inb_scalars = nb_scalars ; - names->nb_scattering = nb_scattering ; - names->nb_parameters = nb_parameters ; - names->nb_iterators = nb_iterators ; - names->scalars = cloog_names_generate_items(nb_scalars, NULL,first_s); - names->scattering = cloog_names_generate_items(nb_scattering,NULL,first_t); - names->parameters = cloog_names_generate_items(nb_parameters,NULL,first_p); - names->iterators = cloog_names_generate_items(nb_iterators, NULL,first_i); - - return names ; -} - - -/* Lastly we update the CLoogNames structure: the iterators corresponding to - * scalar dimensions have to be removed since these dimensions have been - * erased and do not need to be print. We copy all the iterator names except - * the scalar ones in a new string array. - * - September 12th 2005: first version. - */ -void cloog_names_scalarize(CloogNames * names, int nb_scattdims, int * scaldims) -{ int nb_scalars, nb_scattering, i, current_scalar, current_scattering ; - char ** scalars, ** scattering ; - - if (!nb_scattdims || (scaldims == NULL)) - return ; - - nb_scalars = 0 ; - for (i=0;inb_scattering - nb_scalars ; - scattering = (char **)malloc(nb_scattering * sizeof(char *)) ; - if (scattering == NULL) - cloog_die("memory overflow.\n"); - scalars = (char **)malloc(nb_scalars * sizeof(char *)) ; - if (scalars == NULL) - cloog_die("memory overflow.\n"); - - current_scalar = 0 ; - current_scattering = 0 ; - for (i=0;iscattering[i] ; - current_scattering ++ ; - } - else - { scalars[current_scalar] = names->scattering[i] ; - current_scalar ++ ; - } - } - - free(names->scattering) ; - names->scattering = scattering ; - names->scalars = scalars ; - names->nb_scattering = nb_scattering ; - names->nb_scalars = nb_scalars ; -} - -/** - * Return the name at a given level (starting at one). - * May be a scattering dimension or an iterator of the original domain. - */ -const char *cloog_names_name_at_level(CloogNames *names, int level) -{ - if (level <= names->nb_scattering) - return names->scattering[level - 1]; - else - return names->iterators[level - names->nb_scattering - 1]; -} diff --git a/cloog-0.16.3/source/options.c b/cloog-0.16.3/source/options.c deleted file mode 100644 index 561b4f6df4a6ea68b4b48050bc3b1e2845ff525c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/options.c +++ /dev/null @@ -1,464 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** options.c ** - **-------------------------------------------------------------------** - ** First version: april 19th 2003 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#include -# include -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Error reporting functions * - ******************************************************************************/ - -void cloog_vmsg(CloogOptions *options, enum cloog_msg_type type, - const char *msg, va_list ap) -{ - const char *type_msg; - - if (options && options->quiet && - (type == CLOOG_WARNING || type == CLOOG_INFO)) - return; - - switch(type) { - case CLOOG_WARNING: - type_msg = "WARNING"; - break; - case CLOOG_INFO: - type_msg = "INFO"; - break; - case CLOOG_ERROR: - default: - type_msg = "ERROR"; - break; - } - fprintf(stderr, "[CLooG] %s: ", type_msg); - vfprintf(stderr, msg, ap); -} - -/** - * Print message to stderr. - * @param msg printf format string - */ -void cloog_msg(CloogOptions *options, enum cloog_msg_type type, - const char *msg, ...) -{ - va_list args; - - va_start(args, msg); - cloog_vmsg(options, type, msg, args); - va_end(args); -} - -/** - * Print error message to stderr and exit. - * @param msg printf format string - */ -void cloog_die(const char *msg, ...) -{ - va_list args; - - va_start(args, msg); - cloog_vmsg(NULL, CLOOG_ERROR, msg, args); - va_end(args); - exit(1); -} - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_option_print function: - * This function prints the content of a CloogOptions structure (program) into - * a file (foo, possibly stdout). - * - April 19th 2003: first version. - */ -void cloog_options_print(FILE * foo, CloogOptions * options) -{ fprintf(foo,"Options:\n") ; - fprintf(foo,"OPTIONS FOR LOOP GENERATION\n") ; - fprintf(foo,"l = %3d,\n",options->l) ; - fprintf(foo,"f = %3d,\n",options->f) ; - fprintf(foo,"stop = %3d,\n",options->stop) ; - fprintf(foo,"strides = %3d,\n",options->strides) ; - fprintf(foo,"sh = %3d,\n",options->sh); - fprintf(foo,"OPTIONS FOR PRETTY PRINTING\n") ; - fprintf(foo,"esp = %3d,\n",options->esp) ; - fprintf(foo,"fsp = %3d,\n",options->fsp) ; - fprintf(foo,"otl = %3d.\n",options->otl) ; - fprintf(foo,"block = %3d.\n",options->block) ; - fprintf(foo,"compilable = %3d.\n",options->compilable) ; - fprintf(foo,"callable = %3d.\n",options->callable) ; - fprintf(foo,"UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY\n") ; - fprintf(foo,"leaks = %3d.\n",options->leaks) ; - fprintf(foo,"backtrack = %3d.\n",options->backtrack); - fprintf(foo,"override = %3d.\n",options->override) ; - fprintf(foo,"structure = %3d.\n",options->structure) ; - fprintf(foo,"noscalars = %3d.\n",options->noscalars) ; - fprintf(foo,"noblocks = %3d.\n",options->noblocks) ; - fprintf(foo,"nosimplify = %3d.\n",options->nosimplify) ; -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_options_free function: - * This function frees the allocated memory for a CloogOptions structure. - * - April 19th 2003: first version. - */ -void cloog_options_free(CloogOptions *options) -{ - free(options); -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_options_help function: - * This function displays the quick help when the user set the option -help - * while calling cloog. Prints are cutted to respect the 509 characters - * limitation of the ISO C 89 compilers. - * - August 5th 2002: first version. - */ -void cloog_options_help() -{ printf( - "Usage: cloog [ options | file ] ...\n" - "Options for code generation:\n" - " -l Last loop depth to optimize (-1: infinity)\n" - " (default setting: -1).\n" - " -f First loop depth to start loop separation (-1: " - "infinity)\n (default setting: 1).\n") ; - printf( - " -stop Loop depth to stop code generation (-1: infinity)" - "\n (default setting: -1).\n" - " -strides Handle non-unit strides (1) or not (0)\n" - " (default setting: 0).\n") ; - printf( - "\nOptions for pretty printing:\n" - " -otl Simplify loops running one time (1) or not (0)\n" - " (default setting: 1).\n") ; - printf( - " -esp Allow complex equalities spreading (1) or not (0)\n" - " (default setting: 0).\n"); - printf( - " -fsp First level to begin the spreading\n" - " (default setting: 1).\n" - " -block Make a new statement block per iterator in C\n" - " programs (1) or not (0) (default setting: 0).\n") ; - printf( - " -compilable Compilable code by using preprocessor (not 0) or" - "\n not (0), number being the value of the parameters" - "\n (default setting: 0).\n" - " -callable Testable code by using preprocessor (not 0) or" - "\n not (0) (default setting: 0).\n"); - printf( - "\nGeneral options:\n" - " -o Name of the output file; 'stdout' is a special\n" - " value: when used, output is standard output\n" - " (default setting: stdout).\n" - " -v, --version Display the version information (and more).\n" - " -q, --quiet Don't print any informational messages.\n" - " -h, --help Display this information.\n\n") ; - printf( - "The special value 'stdin' for 'file' makes CLooG to read data on\n" - "standard input.\n\n" - "For bug reporting or any suggestions, please send an email to the author\n" - ".\n") ; -} - - -/** - * cloog_options_version function: - * This function displays some version informations when the user set the - * option -version while calling cloog. Prints are cutted to respect the 509 - * characters limitation of the ISO C 89 compilers. - * - August 5th 2002: first version. - */ -void cloog_options_version() -{ printf("%s The Chunky Loop Generator\n", cloog_version()); - printf( - "-----\n" - "This is a loop generator for scanning Z-polyhedra. It is based on the " - "work of\nF. Quillere and C. Bastoul on high level code generation and of " - "the PolyLib Team\non polyhedral computation. This program is distributed " - "under the terms of the\nGNU Lesser General Public License " - "(details at http://www.gnu.org/licenses/lgpl-2.1.html).\n" - "-----\n") ; - printf( - "It would be fair to refer the following paper in any publication " - "resulting from\nthe use of this software or its library:\n" - "@InProceedings{Bas04,\n" - "author = {Cedric Bastoul},\n" - "title = {Code Generation in the Polyhedral Model Is Easier Than You " - "Think},\n" - "booktitle = {PACT'13 IEEE International Conference on Parallel " - "Architecture\n and Compilation Techniques},\n" - "pages = {7--16},\n" - "month = {september},\n" - "year = 2004,\n" - "address = {Juan-les-Pins}\n" - "}\n" - "-----\n" - "For any information, please ask the author at " - ".\n") ; -} - - -/** - * cloog_options_set function: - * This function sets the value of an option thanks to the user's calling line. - * - option is the value to set, - * - argc are the elements of the user's calling line, - * - number is the number of the element corresponding to the considered option, - * this function adds 1 to number to pass away the option value. - ** - * - August 5th 2002: first version. - * - June 29th 2003: (debug) lack of argument now detected. - */ -void cloog_options_set(int * option, int argv, char ** argc, int * number) -{ char ** endptr ; - - if (*number+1 >= argv) - cloog_die("an option lacks of argument.\n"); - - endptr = NULL ; - *option = strtol(argc[*number+1],endptr,10) ; - if (endptr != NULL) - cloog_die("value '%s' for option '%s' is not valid.\n", - argc[*number+1], argc[*number]); - *number = *number + 1 ; -} - - -/** - * cloog_options_malloc function: - * This functions allocate the memory space for a CLoogOptions structure and - * fill its fields with the defaults values. It returns a pointer to the - * allocated CloogOptions structure. - * - April 19th 2003: first version. - * - November 21th 2005: name changed (before it was cloog_options_init). - */ -CloogOptions *cloog_options_malloc(CloogState *state) -{ CloogOptions * options ; - - /* Memory allocation for the CloogOptions structure. */ - options = (CloogOptions *)malloc(sizeof(CloogOptions)) ; - if (options == NULL) - cloog_die("memory overflow.\n"); - - options->state = state; - - /* We set the various fields with default values. */ - /* OPTIONS FOR LOOP GENERATION */ - options->l = -1 ; /* Last level to optimize: infinity. */ - options->f = 1 ; /* First level to optimize: the first. */ - options->stop = -1 ; /* Generate all the code. */ - options->strides = 0 ; /* Generate a code with unit strides. */ - options->sh = 0; /* Compute actual convex hull. */ - options->first_unroll = -1; /* First level to unroll: none. */ - options->name = ""; - /* OPTIONS FOR PRETTY PRINTING */ - options->esp = 1 ; /* We want Equality SPreading.*/ - options->fsp = 1 ; /* The First level to SPread is the first. */ - options->otl = 1 ; /* We want to fire One Time Loops. */ - options->block = 0 ; /* We don't want to force statement blocks. */ - options->compilable = 0 ; /* No compilable code. */ - options->callable = 0 ; /* No callable code. */ - options->quiet = 0; /* Do print informational messages. */ - options->language = LANGUAGE_C; /* The default output language is C. */ - options->save_domains = 0; /* Don't save domains. */ - /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */ - options->leaks = 0 ; /* I don't want to print allocation statistics.*/ - options->backtrack = 0; /* Perform backtrack in Quillere's algorithm.*/ - options->override = 0 ; /* I don't want to override CLooG decisions.*/ - options->structure = 0 ; /* I don't want to print internal structure.*/ - options->noblocks = 0 ; /* I do want to make statement blocks.*/ - options->noscalars = 0 ; /* I do want to use scalar dimensions.*/ - options->nosimplify = 0 ; /* I do want to simplify polyhedra.*/ - - return options ; -} - - - -/** - * cloog_options_read function: - * This functions reads all the options and the input/output files thanks - * the the user's calling line elements (in argc). It fills a CloogOptions - * structure and the FILE structure corresponding to input and output files. - * - August 5th 2002: first version. - * - April 19th 2003: now in options.c and support of the CloogOptions structure. - */ -void cloog_options_read(CloogState *state, int argc, char **argv, - FILE **input, FILE **output, CloogOptions **options) -{ int i, infos=0, input_is_set=0 ; - - /* CloogOptions structure allocation and initialization. */ - *options = cloog_options_malloc(state); - - /* The default output is the standard output. */ - *output = stdout ; - - for (i=1;il,argc,argv,&i) ; - else - if (strcmp(argv[i],"-f") == 0) - cloog_options_set(&(*options)->f,argc,argv,&i) ; - else - if (strcmp(argv[i],"-stop") == 0) - cloog_options_set(&(*options)->stop,argc,argv,&i) ; - else - if (strcmp(argv[i],"-strides") == 0) - cloog_options_set(&(*options)->strides,argc,argv,&i) ; - else if (strcmp(argv[i],"-sh") == 0) - cloog_options_set(&(*options)->sh,argc,argv,&i) ; - else if (!strcmp(argv[i], "-first-unroll")) - cloog_options_set(&(*options)->first_unroll, argc, argv, &i); - else - if (strcmp(argv[i],"-otl") == 0) - cloog_options_set(&(*options)->otl,argc,argv,&i) ; - else - if (strcmp(argv[i],"-esp") == 0) - cloog_options_set(&(*options)->esp,argc,argv,&i) ; - else - if (strcmp(argv[i],"-fsp") == 0) - cloog_options_set(&(*options)->fsp,argc,argv,&i) ; - else - if (strcmp(argv[i],"-block") == 0) - cloog_options_set(&(*options)->block,argc,argv,&i) ; - else - if (strcmp(argv[i],"-compilable") == 0) - cloog_options_set(&(*options)->compilable, argc, argv, &i); - else if (strcmp(argv[i], "-callable") == 0) - cloog_options_set(&(*options)->callable, argc, argv, &i); - else - if (strcmp(argv[i],"-loopo") == 0) /* Special option for the LooPo team ! */ - { (*options)->esp = 0 ; - (*options)->block = 1 ; - } - else - if (strcmp(argv[i],"-bipbip") == 0)/* Special option for the author only !*/ - (*options)->backtrack = 0; - else - if (strcmp(argv[i],"-leaks") == 0) - (*options)->leaks = 1 ; - else - if (strcmp(argv[i],"-nobacktrack") == 0) - (*options)->backtrack = 0; - else if (strcmp(argv[i], "-backtrack") == 0) - (*options)->backtrack = 1; - else - if (strcmp(argv[i],"-override") == 0) - (*options)->override = 1 ; - else - if (strcmp(argv[i],"-noblocks") == 0) - (*options)->noblocks = 1 ; - else - if (strcmp(argv[i],"-noscalars") == 0) - (*options)->noscalars = 1 ; - else - if (strcmp(argv[i],"-nosimplify") == 0) - (*options)->nosimplify = 1 ; - else - if ((strcmp(argv[i],"-struct") == 0) || (strcmp(argv[i],"-structure") == 0)) - (*options)->structure = 1 ; - else - if ((strcmp(argv[i],"--help") == 0) || (strcmp(argv[i],"-h") == 0)) - { cloog_options_help() ; - infos = 1 ; - } - else - if ((strcmp(argv[i],"--version") == 0) || (strcmp(argv[i],"-v") == 0)) - { cloog_options_version() ; - infos = 1 ; - } else if ((strcmp(argv[i],"--quiet") == 0) || (strcmp(argv[i],"-q") == 0)) - (*options)->quiet = 1; - else - if (strcmp(argv[i],"-o") == 0) - { if (i+1 >= argc) - cloog_die("no output name for -o option.\n"); - - /* stdout is a special value, when used, we set output to standard - * output. - */ - if (strcmp(argv[i+1],"stdout") == 0) - *output = stdout ; - else - { *output = fopen(argv[i+1],"w") ; - if (*output == NULL) - cloog_die("can't create output file %s.\n", argv[i+1]); - } - i ++ ; - } - else - cloog_msg(*options, CLOOG_WARNING, "unknown %s option.\n", argv[i]); - } - else - { if (!input_is_set) - { input_is_set = 1 ; - (*options)->name = argv[i] ; - /* stdin is a special value, when used, we set input to standard input. */ - if (strcmp(argv[i],"stdin") == 0) - *input = stdin ; - else - { *input = fopen(argv[i],"r") ; - if (*input == NULL) - cloog_die("%s file does not exist.\n", argv[i]); - } - } - else - cloog_die("multiple input files.\n"); - } - if (!input_is_set) - { if (!infos) - cloog_die("no input file (-h for help).\n"); - exit(1) ; - } -} - diff --git a/cloog-0.16.3/source/pprint.c b/cloog-0.16.3/source/pprint.c deleted file mode 100644 index 3dacec207dbd55dcbea72b134a8582c503974e73..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/pprint.c +++ /dev/null @@ -1,423 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** pprint.c ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -/* June 22nd 2005: General adaptation for GMP. - * October 26th 2005: General adaptation from CloogDomain to Matrix data - * structure for all constraint systems. - * October 27th 2005: General adaptation from CloogEqual to Matrix data - * structure for equality spreading. - */ - -# include -# include -# include -#include -# include "../include/cloog/cloog.h" - - -static void pprint_name(FILE *dst, struct clast_name *n); -static void pprint_term(struct cloogoptions *i, FILE *dst, struct clast_term *t); -static void pprint_sum(struct cloogoptions *opt, - FILE *dst, struct clast_reduction *r); -static void pprint_binary(struct cloogoptions *i, - FILE *dst, struct clast_binary *b); -static void pprint_minmax_f(struct cloogoptions *info, - FILE *dst, struct clast_reduction *r); -static void pprint_minmax_c(struct cloogoptions *info, - FILE *dst, struct clast_reduction *r); -static void pprint_reduction(struct cloogoptions *i, - FILE *dst, struct clast_reduction *r); -static void pprint_expr(struct cloogoptions *i, FILE *dst, struct clast_expr *e); -static void pprint_equation(struct cloogoptions *i, - FILE *dst, struct clast_equation *eq); -static void pprint_assignment(struct cloogoptions *i, FILE *dst, - struct clast_assignment *a); -static void pprint_user_stmt(struct cloogoptions *options, FILE *dst, - struct clast_user_stmt *u); -static void pprint_guard(struct cloogoptions *options, FILE *dst, int indent, - struct clast_guard *g); -static void pprint_for(struct cloogoptions *options, FILE *dst, int indent, - struct clast_for *f); -static void pprint_stmt_list(struct cloogoptions *options, FILE *dst, int indent, - struct clast_stmt *s); - - -void pprint_name(FILE *dst, struct clast_name *n) -{ - fprintf(dst, "%s", n->name); -} - -/** - * This function returns a string containing the printing of a value (possibly - * an iterator or a parameter with its coefficient or a constant). - * - val is the coefficient or constant value, - * - name is a string containing the name of the iterator or of the parameter, - */ -void pprint_term(struct cloogoptions *i, FILE *dst, struct clast_term *t) -{ - if (t->var) { - int group = t->var->type == clast_expr_red && - ((struct clast_reduction*) t->var)->n > 1; - if (cloog_int_is_one(t->val)) - ; - else if (cloog_int_is_neg_one(t->val)) - fprintf(dst, "-"); - else { - cloog_int_print(dst, t->val); - fprintf(dst, "*"); - } - if (group) - fprintf(dst, "("); - pprint_expr(i, dst, t->var); - if (group) - fprintf(dst, ")"); - } else - cloog_int_print(dst, t->val); -} - -void pprint_sum(struct cloogoptions *opt, FILE *dst, struct clast_reduction *r) -{ - int i; - struct clast_term *t; - - assert(r->n >= 1); - assert(r->elts[0]->type == clast_expr_term); - t = (struct clast_term *) r->elts[0]; - pprint_term(opt, dst, t); - - for (i = 1; i < r->n; ++i) { - assert(r->elts[i]->type == clast_expr_term); - t = (struct clast_term *) r->elts[i]; - if (cloog_int_is_pos(t->val)) - fprintf(dst, "+"); - pprint_term(opt, dst, t); - } -} - -void pprint_binary(struct cloogoptions *i, FILE *dst, struct clast_binary *b) -{ - const char *s1 = NULL, *s2 = NULL, *s3 = NULL; - int group = b->LHS->type == clast_expr_red && - ((struct clast_reduction*) b->LHS)->n > 1; - if (i->language == LANGUAGE_FORTRAN) { - switch (b->type) { - case clast_bin_fdiv: - s1 = "FLOOR(REAL(", s2 = ")/REAL(", s3 = "))"; - break; - case clast_bin_cdiv: - s1 = "CEILING(REAL(", s2 = ")/REAL(", s3 = "))"; - break; - case clast_bin_div: - if (group) - s1 = "(", s2 = ")/", s3 = ""; - else - s1 = "", s2 = "/", s3 = ""; - break; - case clast_bin_mod: - s1 = "MOD(", s2 = ", ", s3 = ")"; - break; - } - } else { - switch (b->type) { - case clast_bin_fdiv: - s1 = "floord(", s2 = ",", s3 = ")"; - break; - case clast_bin_cdiv: - s1 = "ceild(", s2 = ",", s3 = ")"; - break; - case clast_bin_div: - if (group) - s1 = "(", s2 = ")/", s3 = ""; - else - s1 = "", s2 = "/", s3 = ""; - break; - case clast_bin_mod: - if (group) - s1 = "(", s2 = ")%", s3 = ""; - else - s1 = "", s2 = "%", s3 = ""; - break; - } - } - fprintf(dst, "%s", s1); - pprint_expr(i, dst, b->LHS); - fprintf(dst, "%s", s2); - cloog_int_print(dst, b->RHS); - fprintf(dst, "%s", s3); -} - -void pprint_minmax_f(struct cloogoptions *info, FILE *dst, struct clast_reduction *r) -{ - int i; - if (r->n == 0) - return; - fprintf(dst, r->type == clast_red_max ? "MAX(" : "MIN("); - pprint_expr(info, dst, r->elts[0]); - for (i = 1; i < r->n; ++i) { - fprintf(dst, ","); - pprint_expr(info, dst, r->elts[i]); - } - fprintf(dst, ")"); -} - -void pprint_minmax_c(struct cloogoptions *info, FILE *dst, struct clast_reduction *r) -{ - int i; - for (i = 1; i < r->n; ++i) - fprintf(dst, r->type == clast_red_max ? "max(" : "min("); - if (r->n > 0) - pprint_expr(info, dst, r->elts[0]); - for (i = 1; i < r->n; ++i) { - fprintf(dst, ","); - pprint_expr(info, dst, r->elts[i]); - fprintf(dst, ")"); - } -} - -void pprint_reduction(struct cloogoptions *i, FILE *dst, struct clast_reduction *r) -{ - switch (r->type) { - case clast_red_sum: - pprint_sum(i, dst, r); - break; - case clast_red_min: - case clast_red_max: - if (r->n == 1) { - pprint_expr(i, dst, r->elts[0]); - break; - } - if (i->language == LANGUAGE_FORTRAN) - pprint_minmax_f(i, dst, r); - else - pprint_minmax_c(i, dst, r); - break; - default: - assert(0); - } -} - -void pprint_expr(struct cloogoptions *i, FILE *dst, struct clast_expr *e) -{ - if (!e) - return; - switch (e->type) { - case clast_expr_name: - pprint_name(dst, (struct clast_name*) e); - break; - case clast_expr_term: - pprint_term(i, dst, (struct clast_term*) e); - break; - case clast_expr_red: - pprint_reduction(i, dst, (struct clast_reduction*) e); - break; - case clast_expr_bin: - pprint_binary(i, dst, (struct clast_binary*) e); - break; - default: - assert(0); - } -} - -void pprint_equation(struct cloogoptions *i, FILE *dst, struct clast_equation *eq) -{ - pprint_expr(i, dst, eq->LHS); - if (eq->sign == 0) - fprintf(dst, " == "); - else if (eq->sign > 0) - fprintf(dst, " >= "); - else - fprintf(dst, " <= "); - pprint_expr(i, dst, eq->RHS); -} - -void pprint_assignment(struct cloogoptions *i, FILE *dst, - struct clast_assignment *a) -{ - if (a->LHS) - fprintf(dst, "%s = ", a->LHS); - pprint_expr(i, dst, a->RHS); -} - -void pprint_user_stmt(struct cloogoptions *options, FILE *dst, - struct clast_user_stmt *u) -{ - struct clast_stmt *t; - if (u->statement->name) - fprintf(dst, "%s", u->statement->name); - else - fprintf(dst, "S%d", u->statement->number); - fprintf(dst, "("); - for (t = u->substitutions; t; t = t->next) { - assert(CLAST_STMT_IS_A(t, stmt_ass)); - pprint_assignment(options, dst, (struct clast_assignment *)t); - if (t->next) - fprintf(dst, ","); - } - fprintf(dst, ")"); - if (options->language != LANGUAGE_FORTRAN) - fprintf(dst, ";"); - fprintf(dst, "\n"); -} - -void pprint_guard(struct cloogoptions *options, FILE *dst, int indent, - struct clast_guard *g) -{ - int k; - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst,"IF "); - else - fprintf(dst,"if "); - if (g->n > 1) - fprintf(dst,"("); - for (k = 0; k < g->n; ++k) { - if (k > 0) { - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst," .AND. "); - else - fprintf(dst," && "); - } - fprintf(dst,"("); - pprint_equation(options, dst, &g->eq[k]); - fprintf(dst,")"); - } - if (g->n > 1) - fprintf(dst,")"); - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst," THEN\n"); - else - fprintf(dst," {\n"); - - pprint_stmt_list(options, dst, indent + INDENT_STEP, g->then); - - fprintf(dst, "%*s", indent, ""); - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst,"END IF\n"); - else - fprintf(dst,"}\n"); -} - -void pprint_for(struct cloogoptions *options, FILE *dst, int indent, - struct clast_for *f) -{ - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst, "DO "); - else - fprintf(dst, "for ("); - - if (f->LB) { - fprintf(dst, "%s=", f->iterator); - pprint_expr(options, dst, f->LB); - } else if (options->language == LANGUAGE_FORTRAN) - cloog_die("unbounded loops not allowed in FORTRAN.\n"); - - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst,", "); - else - fprintf(dst,";"); - - if (f->UB) { - if (options->language != LANGUAGE_FORTRAN) - fprintf(dst,"%s<=", f->iterator); - pprint_expr(options, dst, f->UB); - } else if (options->language == LANGUAGE_FORTRAN) - cloog_die("unbounded loops not allowed in FORTRAN.\n"); - - if (options->language == LANGUAGE_FORTRAN) { - if (cloog_int_gt_si(f->stride, 1)) - cloog_int_print(dst, f->stride); - fprintf(dst,"\n"); - } - else { - if (cloog_int_gt_si(f->stride, 1)) { - fprintf(dst,";%s+=", f->iterator); - cloog_int_print(dst, f->stride); - fprintf(dst, ") {\n"); - } else - fprintf(dst, ";%s++) {\n", f->iterator); - } - - pprint_stmt_list(options, dst, indent + INDENT_STEP, f->body); - - fprintf(dst, "%*s", indent, ""); - if (options->language == LANGUAGE_FORTRAN) - fprintf(dst,"END DO\n") ; - else - fprintf(dst,"}\n") ; -} - -void pprint_stmt_list(struct cloogoptions *options, FILE *dst, int indent, - struct clast_stmt *s) -{ - for ( ; s; s = s->next) { - if (CLAST_STMT_IS_A(s, stmt_root)) - continue; - fprintf(dst, "%*s", indent, ""); - if (CLAST_STMT_IS_A(s, stmt_ass)) { - pprint_assignment(options, dst, (struct clast_assignment *) s); - if (options->language != LANGUAGE_FORTRAN) - fprintf(dst, ";"); - fprintf(dst, "\n"); - } else if (CLAST_STMT_IS_A(s, stmt_user)) { - pprint_user_stmt(options, dst, (struct clast_user_stmt *) s); - } else if (CLAST_STMT_IS_A(s, stmt_for)) { - pprint_for(options, dst, indent, (struct clast_for *) s); - } else if (CLAST_STMT_IS_A(s, stmt_guard)) { - pprint_guard(options, dst, indent, (struct clast_guard *) s); - } else if (CLAST_STMT_IS_A(s, stmt_block)) { - fprintf(dst, "{\n"); - pprint_stmt_list(options, dst, indent + INDENT_STEP, - ((struct clast_block *)s)->body); - fprintf(dst, "%*s", indent, ""); - fprintf(dst, "}\n"); - } else { - assert(0); - } - } -} - - -/****************************************************************************** - * Pretty Printing (dirty) functions * - ******************************************************************************/ - -void clast_pprint(FILE *foo, struct clast_stmt *root, - int indent, CloogOptions *options) -{ - pprint_stmt_list(options, foo, indent, root); -} diff --git a/cloog-0.16.3/source/program.c b/cloog-0.16.3/source/program.c deleted file mode 100644 index e5aa4fcdf4108a57b384b2c34a16d450aedc15a9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/program.c +++ /dev/null @@ -1,1077 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** program.c ** - **-------------------------------------------------------------------** - ** First version: october 25th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - - -# include -# include -#include -# include -# include -# include -# include -# include -# include "../include/cloog/cloog.h" -#ifdef CLOOG_RUSAGE -# include -#endif - -#define ALLOC(type) (type*)malloc(sizeof(type)) - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_program_print function: - * this function is a human-friendly way to display the CloogProgram data - * structure, it shows all the different fields and includes an indentation - * level (level) in order to work with others print_structure functions. - * - July 1st 2005: first version based on the old cloog_program_print function. - */ -void cloog_program_print_structure(file, program, level) -FILE * file ; -CloogProgram * program ; -int level ; -{ int i, j ; - - /* Go to the right level. */ - for (i=0; ilanguage) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scattering dimension number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Scattering dimension number: %d\n",program->nb_scattdims) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scalar scattering dimension informations. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (program->scaldims != NULL) - { fprintf(file,"Scalar dimensions:") ; - for (i=0;inb_scattdims;i++) - fprintf(file," %d:%d ",i,program->scaldims[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"No scalar scattering dimensions\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the parameter and the iterator names. */ - cloog_names_print_structure(file,program->names,level+1) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the context. */ - cloog_domain_print_structure(file, program->context, level+1, "Context"); - - /* Print the loop. */ - cloog_loop_print_structure(file,program->loop,level+1) ; - - /* One more time something that is here only for a better look. */ - for (j=0; j<2; j++) - { for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - - fprintf(file,"\n") ; - } -} - - -/** - * cloog_program_dump_cloog function: - * This function dumps a CloogProgram structure supposed to be completely - * filled in a CLooG input file (foo possibly stdout) such as CLooG can - * rebuild almost exactly the data structure from the input file. - * - * If the scattering is already applied, the scattering parameter is supposed to - * be NULL. In this case the number of scattering functions is lost, since they - * are included inside the iteration domains. This can only lead to a less - * beautiful pretty printing. - * - * In case the scattering is not yet applied it can be passed to this function - * and will be included in the CLooG input file dump. - */ -void cloog_program_dump_cloog(FILE * foo, CloogProgram * program, - CloogScatteringList *scattering) -{ - int i; - CloogLoop * loop ; - CloogScatteringList *tmp_scatt; - - fprintf(foo, - "# CLooG -> CLooG\n" - "# This is an automatic dump of a CLooG input file from a CloogProgram data\n" - "# structure. WARNING: it is highly dangerous and MAY be correct ONLY if\n" - "# - it has been dumped before loop generation.\n" - "# - option -noscalars is used (it removes scalar dimensions otherwise)\n" - "# - option -l is at least the original scattering dimension number\n" - "# ASK THE AUTHOR IF YOU *NEED* SOMETHING MORE ROBUST\n") ; - - /* Language. */ - if (program->language == 'c') - fprintf(foo,"# Language: C\n") ; - else - fprintf(foo,"# Language: FORTRAN\n") ; - fprintf(foo,"%c\n\n",program->language) ; - - /* Context. */ - fprintf(foo, "# Context (%d parameter(s)):\n", program->names->nb_parameters); - cloog_domain_print_constraints(foo, program->context, 0); - fprintf(foo,"1 # Parameter name(s)\n") ; - for (i=0;inames->nb_parameters;i++) - fprintf(foo,"%s ",program->names->parameters[i]) ; - - /* Statement number. */ - i = 0 ; - loop = program->loop ; - while (loop != NULL) - { i++ ; - loop = loop->next ; - } - fprintf(foo,"\n\n# Statement number:\n%d\n\n",i) ; - - /* Iteration domains. */ - i = 1 ; - loop = program->loop ; - while (loop != NULL) - { /* Name of the domain. */ - fprintf(foo,"# Iteration domain of statement %d.\n",i) ; - - cloog_domain_print_constraints(foo, loop->domain, 1); - fprintf(foo,"0 0 0 # For future options.\n\n") ; - - i++ ; - loop = loop->next ; - } - fprintf(foo,"\n1 # Iterator name(s)\n") ; - - /* Scattering already applied? In this case print the scattering names as - * additional iterator names. */ - if (!scattering) - for (i = 0; i < program->names->nb_scattering; i++) - fprintf(foo, "%s ", program->names->scattering[i]); - for (i=0;inames->nb_iterators;i++) - fprintf(foo,"%s ",program->names->iterators[i]); - fprintf(foo,"\n\n") ; - - /* Exit, if scattering is already applied. */ - if (!scattering) { - fprintf(foo, "# No scattering functions.\n0\n\n"); - return; - } - - /* Scattering relations. */ - fprintf(foo, "# --------------------- SCATTERING --------------------\n"); - - i = 0; - for (tmp_scatt = scattering; tmp_scatt; tmp_scatt = tmp_scatt->next) - i++; - - fprintf(foo, "%d # Scattering functions", i); - - for (tmp_scatt = scattering; tmp_scatt; tmp_scatt = tmp_scatt->next) - cloog_scattering_print_constraints(foo, tmp_scatt->scatt); - - fprintf(foo, "\n1 # Scattering dimension name(s)\n"); - - for (i = 0; i < program->names->nb_scattering; i++) - fprintf(foo, "%s ", program->names->scattering[i]); -} - - -/** - * cloog_program_print function: - * This function prints the content of a CloogProgram structure (program) into a - * file (file, possibly stdout). - * - July 1st 2005: Now this very old function (probably as old as CLooG) is - * only a frontend to cloog_program_print_structure, with a - * quite better human-readable representation. - */ -void cloog_program_print(FILE * file, CloogProgram * program) -{ cloog_program_print_structure(file,program,0) ; -} - - -static void print_comment(FILE *file, CloogOptions *options, - const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - if (options->language == LANGUAGE_FORTRAN) { - fprintf(file, "! "); - vfprintf(file, fmt, args); - fprintf(file, "\n"); - } else { - fprintf(file, "/* "); - vfprintf(file, fmt, args); - fprintf(file, " */\n"); - } -} - -static void print_macros(FILE *file) -{ - fprintf(file, "/* Useful macros. */\n") ; - fprintf(file, - "#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))\n"); - fprintf(file, - "#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))\n"); - fprintf(file, "#define max(x,y) ((x) > (y) ? (x) : (y))\n") ; - fprintf(file, "#define min(x,y) ((x) < (y) ? (x) : (y))\n\n") ; -} - -static void print_declarations(FILE *file, int n, char **names) -{ - int i; - - fprintf(file, " int %s", names[0]); - for (i = 1; i < n; i++) - fprintf(file, ", %s", names[i]); - - fprintf(file, ";\n"); -} - -static void print_iterator_declarations(FILE *file, CloogProgram *program, - CloogOptions *options) -{ - CloogNames *names = program->names; - - if (names->nb_scattering) { - fprintf(file, " /* Scattering iterators. */\n"); - print_declarations(file, names->nb_scattering, names->scattering); - } - if (names->nb_iterators) { - fprintf(file, " /* Original iterators. */\n"); - print_declarations(file, names->nb_iterators, names->iterators); - } -} - -static void print_callable_preamble(FILE *file, CloogProgram *program, - CloogOptions *options) -{ - int j; - CloogBlockList *blocklist; - CloogBlock *block; - CloogStatement *statement; - - fprintf(file, "extern void hash(int);\n\n"); - - print_macros(file); - - for (blocklist = program->blocklist; blocklist; blocklist = blocklist->next) { - block = blocklist->block; - for (statement = block->statement; statement; statement = statement->next) { - fprintf(file, "#define S%d(", statement->number); - if (block->depth > 0) { - fprintf(file, "%s", program->names->iterators[0]); - for(j = 1; j < block->depth; j++) - fprintf(file, ",%s", program->names->iterators[j]); - } - fprintf(file,") { hash(%d);", statement->number); - for(j = 0; j < block->depth; j++) - fprintf(file, " hash(%s);", program->names->iterators[j]); - fprintf(file, " }\n"); - } - } - fprintf(file, "\nvoid test("); - if (program->names->nb_parameters > 0) { - fprintf(file, "int %s", program->names->parameters[0]); - for(j = 1; j < program->names->nb_parameters; j++) - fprintf(file, ", int %s", program->names->parameters[j]); - } - fprintf(file, ")\n{\n"); - print_iterator_declarations(file, program, options); -} - -static void print_callable_postamble(FILE *file, CloogProgram *program) -{ - fprintf(file, "}\n"); -} - -/** - * cloog_program_pprint function: - * This function prints the content of a CloogProgram structure (program) into a - * file (file, possibly stdout), in a C-like language. - * - June 22nd 2005: Adaptation for GMP. - */ -void cloog_program_pprint(file, program, options) -FILE * file ; -CloogProgram * program ; -CloogOptions * options ; -{ int i, j, nb_scattering, indentation=0 ; - CloogStatement * statement ; - CloogBlockList * blocklist ; - CloogBlock * block ; - struct clast_stmt *root; - - if (program->language == 'f') - options->language = LANGUAGE_FORTRAN ; - else - options->language = LANGUAGE_C ; - -#ifdef CLOOG_RUSAGE - print_comment(file, options, "Generated from %s by %s in %.2fs.", - options->name, cloog_version(), options->time); -#else - print_comment(file, options, "Generated from %s by %s.", - options->name, cloog_version()); -#endif -#ifdef CLOOG_MEMORY - print_comment(file, options, "CLooG asked for %d KBytes.", options->memory); - cloog_msg(CLOOG_INFO, "%.2fs and %dKB used for code generation.\n", - options->time,options->memory); -#endif - - /* If the option "compilable" is set, we provide the whole stuff to generate - * a compilable code. This code just do nothing, but now the user can edit - * the source and set the statement macros and parameters values. - */ - nb_scattering = program->nb_scattdims ; - if (options->compilable && (program->language == 'c')) - { /* The headers. */ - fprintf(file,"/* DON'T FORGET TO USE -lm OPTION TO COMPILE. */\n\n") ; - fprintf(file,"/* Useful headers. */\n") ; - fprintf(file,"#include \n") ; - fprintf(file,"#include \n") ; - fprintf(file,"#include \n\n") ; - - /* The value of parameters. */ - fprintf(file,"/* Parameter value. */\n") ; - for (i = 1; i <= program->names->nb_parameters; i++) - fprintf(file, "#define PARVAL%d %d\n", i, options->compilable); - - /* The macros. */ - print_macros(file); - - /* The statement macros. */ - fprintf(file,"/* Statement macros (please set). */\n") ; - blocklist = program->blocklist ; - while (blocklist != NULL) - { block = blocklist->block ; - statement = block->statement ; - while (statement != NULL) - { fprintf(file,"#define S%d(",statement->number) ; - if (block->depth > 0) - { fprintf(file,"%s",program->names->iterators[0]) ; - for(j=1;jdepth;j++) - fprintf(file,",%s",program->names->iterators[j]) ; - } - fprintf(file,") {total++;") ; - if (block->depth > 0) { - fprintf(file, " printf(\"S%d %%d", statement->number); - for(j=1;jdepth;j++) - fprintf(file, " %%d"); - - fprintf(file,"\\n\",%s",program->names->iterators[0]) ; - for(j=1;jdepth;j++) - fprintf(file,",%s",program->names->iterators[j]) ; - fprintf(file,");") ; - } - fprintf(file,"}\n") ; - - statement = statement->next ; - } - blocklist = blocklist->next ; - } - - /* The iterator and parameter declaration. */ - fprintf(file,"\nint main() {\n") ; - print_iterator_declarations(file, program, options); - if (program->names->nb_parameters > 0) - { fprintf(file," /* Parameters. */\n") ; - fprintf(file, " int %s=PARVAL1",program->names->parameters[0]); - for(i=2;i<=program->names->nb_parameters;i++) - fprintf(file, ", %s=PARVAL%d", program->names->parameters[i-1], i); - - fprintf(file,";\n"); - } - fprintf(file," int total=0;\n"); - fprintf(file,"\n") ; - - /* And we adapt the identation. */ - indentation += 2 ; - } else if (options->callable && program->language == 'c') { - print_callable_preamble(file, program, options); - indentation += 2; - } - - root = cloog_clast_create(program, options); - clast_pprint(file, root, indentation, options); - cloog_clast_free(root); - - /* The end of the compilable code in case of 'compilable' option. */ - if (options->compilable && (program->language == 'c')) - { - fprintf(file, "\n printf(\"Number of integral points: %%d.\\n\",total);"); - fprintf(file, "\n return 0;\n}\n"); - } else if (options->callable && program->language == 'c') - print_callable_postamble(file, program); -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_program_free function: - * This function frees the allocated memory for a CloogProgram structure. - */ -void cloog_program_free(CloogProgram * program) -{ cloog_names_free(program->names) ; - cloog_loop_free(program->loop) ; - cloog_domain_free(program->context) ; - cloog_block_list_free(program->blocklist) ; - if (program->scaldims != NULL) - free(program->scaldims) ; - - free(program) ; -} - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ - - -static void cloog_program_construct_block_list(CloogProgram *p) -{ - CloogLoop *loop; - CloogBlockList **next = &p->blocklist; - - for (loop = p->loop; loop; loop = loop->next) { - *next = cloog_block_list_alloc(loop->block); - next = &(*next)->next; - } -} - - -/** - * Construct a CloogProgram structure from a given context and - * union domain representing the iteration domains and scattering functions. - */ -CloogProgram *cloog_program_alloc(CloogDomain *context, CloogUnionDomain *ud, - CloogOptions *options) -{ - int i; - char prefix[] = "c"; - CloogScatteringList * scatteringl; - CloogNames *n; - CloogProgram * p ; - - /* Memory allocation for the CloogProgram structure. */ - p = cloog_program_malloc() ; - - if (options->language == LANGUAGE_FORTRAN) - p->language = 'f'; - else - p->language = 'c'; - - p->names = n = cloog_names_alloc(); - - /* We then read the context data. */ - p->context = context; - n->nb_parameters = ud->n_name[CLOOG_PARAM]; - - /* First part of the CloogNames structure: the parameter names. */ - if (ud->name[CLOOG_PARAM]) { - n->parameters = ud->name[CLOOG_PARAM]; - ud->name[CLOOG_PARAM] = NULL; - } else - n->parameters = cloog_names_generate_items(n->nb_parameters, NULL, - FIRST_PARAMETER); - - n->nb_iterators = ud->n_name[CLOOG_ITER]; - if (ud->name[CLOOG_ITER]) { - n->iterators = ud->name[CLOOG_ITER]; - ud->name[CLOOG_ITER] = NULL; - } else - n->iterators = cloog_names_generate_items(n->nb_iterators, NULL, - FIRST_ITERATOR); - - if (ud->domain) { - CloogNamedDomainList *l; - CloogLoop **next = &p->loop; - CloogScatteringList **next_scat = &scatteringl; - - scatteringl = NULL; - for (i = 0, l = ud->domain; l; ++i, l = l->next) { - *next = cloog_loop_from_domain(options->state, l->domain, i); - l->domain = NULL; - (*next)->block->statement->name = l->name; - (*next)->block->statement->usr = l->usr; - l->name = NULL; - - if (l->scattering) { - *next_scat = ALLOC(CloogScatteringList); - (*next_scat)->scatt = l->scattering; - l->scattering = NULL; - (*next_scat)->next = NULL; - - next_scat = &(*next_scat)->next; - } - - next = &(*next)->next; - } - - if (scatteringl != NULL) { - p->nb_scattdims = cloog_scattering_dimension(scatteringl->scatt, - p->loop->domain); - n->nb_scattering = p->nb_scattdims; - if (ud->name[CLOOG_SCAT]) { - n->scattering = ud->name[CLOOG_SCAT]; - ud->name[CLOOG_SCAT] = NULL; - } else - n->scattering = cloog_names_generate_items(n->nb_scattering, prefix, -1); - - /* The boolean array for scalar dimensions is created and set to 0. */ - p->scaldims = (int *)malloc(p->nb_scattdims*(sizeof(int))) ; - if (p->scaldims == NULL) - cloog_die("memory overflow.\n"); - for (i=0;inb_scattdims;i++) - p->scaldims[i] = 0 ; - - /* We try to find blocks in the input problem to reduce complexity. */ - if (!options->noblocks) - cloog_program_block(p, scatteringl, options); - if (!options->noscalars) - cloog_program_extract_scalars(p, scatteringl, options); - - cloog_program_scatter(p, scatteringl, options); - cloog_scattering_list_free(scatteringl); - - if (!options->noblocks) - p->loop = cloog_loop_block(p->loop, p->scaldims, p->nb_scattdims); - } - else - { p->nb_scattdims = 0 ; - p->scaldims = NULL ; - } - - cloog_names_scalarize(p->names,p->nb_scattdims,p->scaldims) ; - - cloog_program_construct_block_list(p); - } - else - { p->loop = NULL ; - p->blocklist = NULL ; - p->scaldims = NULL ; - } - - cloog_union_domain_free(ud); - - return(p) ; -} - - -/** - * cloog_program_read function: - * This function read the informations to put in a CloogProgram structure from - * a file (file, possibly stdin). It returns a pointer to a CloogProgram - * structure containing the read informations. - * - October 25th 2001: first version. - * - September 9th 2002: - the big reading function is now split in several - * functions (one per read data structure). - * - adaptation to the new file format with naming. - */ -CloogProgram *cloog_program_read(FILE *file, CloogOptions *options) -{ - CloogInput *input; - CloogProgram *p; - - input = cloog_input_read(file, options); - p = cloog_program_alloc(input->context, input->ud, options); - free(input); - - return p; -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_program_malloc function: - * This function allocates the memory space for a CloogProgram structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogProgram * cloog_program_malloc() -{ CloogProgram * program ; - - /* Memory allocation for the CloogProgram structure. */ - program = (CloogProgram *)malloc(sizeof(CloogProgram)) ; - if (program == NULL) - cloog_die("memory overflow.\n"); - - /* We set the various fields with default values. */ - program->language = 'c' ; - program->nb_scattdims = 0 ; - program->context = NULL ; - program->loop = NULL ; - program->names = NULL ; - program->blocklist = NULL ; - program->scaldims = NULL ; - program->usr = NULL; - - return program ; -} - - -/** - * cloog_program_generate function: - * This function calls the Quillere algorithm for loop scanning. (see the - * Quillere paper) and calls the loop simplification function. - * - depth is the loop depth we want to optimize (guard free as possible), - * the first loop depth is 1 and anegative value is the infinity depth. - * - sep_level is the level number where we want to start loop separation. - ** - * - October 26th 2001: first version. - * - April 19th 2005: some basic fixes and memory usage feature. - * - April 29th 2005: (bug fix, bug found by DaeGon Kim) see case 2 below. - */ -CloogProgram * cloog_program_generate(program, options) -CloogProgram * program ; -CloogOptions * options ; -{ -#ifdef CLOOG_RUSAGE - float time; - struct rusage start, end ; -#endif - CloogLoop * loop ; -#ifdef CLOOG_MEMORY - char status_path[MAX_STRING_VAL] ; - FILE * status ; - - /* We initialize the memory need to 0. */ - options->memory = 0 ; -#endif - - if (options->override) - { - cloog_msg(options, CLOOG_WARNING, - "you are using -override option, be aware that the " - "generated\n code may be incorrect.\n") ; - } - else - { /* Playing with options may be dangerous, here are two possible issues : - * 1. Using -l option less than scattering dimension number may lead to - * an illegal target code (since the scattering is not respected), if - * it is the case, we set -l depth to the first acceptable value. - */ - if ((program->nb_scattdims > options->l) && (options->l >= 0)) - { - cloog_msg(options, CLOOG_WARNING, - "-l depth is less than the scattering dimension number " - "(the \n generated code may be incorrect), it has been " - "automaticaly set\n to this value (use option -override " - "to override).\n") ; - options->l = program->nb_scattdims ; - } - - /* 2. Using -f option greater than one while -l depth is greater than the - * scattering dimension number may lead to iteration duplication (try - * test/daegon_lu_osp.cloog with '-f 3' to test) because of the step 4b - * of the cloog_loop_generate function, if it is the case, we set -l to - * the first acceptable value. - */ - if (((options->f > 1) || (options->f < 0)) && - ((options->l > program->nb_scattdims) || (options->l < 0))) - { - cloog_msg(options, CLOOG_WARNING, - "-f depth is more than one, -l depth has been " - "automaticaly set\n to the scattering dimension number " - "(target code may have\n duplicated iterations), -l depth " - "has been automaticaly set to\n this value (use option " - "-override to override).\n") ; - options->l = program->nb_scattdims ; - } - } - -#ifdef CLOOG_RUSAGE - getrusage(RUSAGE_SELF, &start) ; -#endif - if (program->loop != NULL) - { loop = program->loop ; - - /* Here we go ! */ - loop = cloog_loop_generate(loop, program->context, 0, 0, - program->scaldims, - program->nb_scattdims, - options); - -#ifdef CLOOG_MEMORY - /* We read into the status file of the process how many memory it uses. */ - sprintf(status_path,"/proc/%d/status",getpid()) ; - status = fopen(status_path, "r") ; - while (fscanf(status,"%s",status_path) && strcmp(status_path,"VmData:")!=0); - fscanf(status,"%d",&(options->memory)) ; - fclose(status) ; -#endif - - if ((!options->nosimplify) && (program->loop != NULL)) - loop = cloog_loop_simplify(loop, program->context, 0, - program->nb_scattdims, options); - - program->loop = loop ; - } - -#ifdef CLOOG_RUSAGE - getrusage(RUSAGE_SELF, &end) ; - /* We calculate the time spent in code generation. */ - time = (end.ru_utime.tv_usec - start.ru_utime.tv_usec)/(float)(MEGA) ; - time += (float)(end.ru_utime.tv_sec - start.ru_utime.tv_sec) ; - options->time = time ; -#endif - - return program ; -} - - -/** - * cloog_program_block function: - * this function gives a last chance to the lazy user to consider statement - * blocks instead of some statement lists where the whole list may be - * considered as a single statement from a code generation point of view. - * For instance two statements with the same iteration domain and the same - * scattering functions may be considered as a block. This function is lazy - * and can only find very simple forms of trivial blocks (see - * cloog_domain_lazy_block function for more details). The useless loops and - * scattering functions are removed and freed while the statement list of - * according blocks are filled. - * - program is the whole program structure (befaore applying scattering), - * - scattering is the list of scattering functions. - ** - * - April 30th 2005: first attempt. - * - June 10-11th 2005: first working version. - */ -void cloog_program_block(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options) -{ int blocked_reference=0, blocked=0, nb_blocked=0 ; - CloogLoop * reference, * start, * loop ; - CloogScatteringList * scatt_reference, * scatt_loop, * scatt_start; - - if ((program->loop == NULL) || (program->loop->next == NULL)) - return ; - - /* The process will use three variables for the linked list : - * - 'start' is the starting point of a new block, - * - 'reference' is the node of the block used for the block checking, - * - 'loop' is the candidate to be inserted inside the block. - * At the beginning of the process, the linked lists are as follow: - * O------>O------>O------>O------>NULL - * | | - * start loop - * reference - */ - - reference = program->loop ; - start = program->loop ; - loop = reference->next ; - scatt_reference = scattering ; - scatt_start = scattering ; - scatt_loop = scattering->next ; - - while (loop != NULL) - { if (cloog_domain_lazy_equal(reference->domain,loop->domain) && - cloog_scattering_lazy_block(scatt_reference->scatt, scatt_loop->scatt, - scattering,program->nb_scattdims)) - { /* If we find a block we update the links: - * +---------------+ - * | v - * O O------>O------>O------>NULL - * | | - * start loop - * reference - */ - blocked = 1 ; - nb_blocked ++ ; - cloog_block_merge(start->block,loop->block); /* merge frees loop->block */ - loop->block = NULL ; - start->next = loop->next ; - scatt_start->next = scatt_loop->next ; - } - else - { /* If we didn't find a block, the next start of a block is updated: - * O------>O------>O------>O------>NULL - * | | - * reference start - * loop - */ - blocked= 0 ; - start = loop ; - scatt_start = scatt_loop ; - } - - /* If the reference node has been included into a block, we can free it. */ - if (blocked_reference) - { reference->next = NULL ; - cloog_loop_free(reference) ; - cloog_scattering_free(scatt_reference->scatt); - free(scatt_reference) ; - } - - /* The reference and the loop are now updated for the next try, the - * starting position depends on the previous step. - * O ? O------>O------>O------>NULL - * | | - * reference loop - */ - reference = loop ; - loop = loop->next ; - scatt_reference = scatt_loop ; - scatt_loop = scatt_loop->next ; - - /* We mark the new reference as being blocked or not, if will be freed - * during the next while loop execution. - */ - if (blocked) - blocked_reference = 1 ; - else - blocked_reference = 0 ; - } - - /* We free the last blocked reference if any (since in the while loop it was - * freed during the next loop execution, it was not possible to free the - * last one inside). - */ - if (blocked_reference) - { reference->next = NULL ; - cloog_loop_free(reference) ; - cloog_scattering_free(scatt_reference->scatt); - free(scatt_reference) ; - } - - if (nb_blocked != 0) - cloog_msg(options, CLOOG_INFO, "%d domains have been blocked.\n", nb_blocked); -} - - -/** - * cloog_program_extract_scalars function: - * this functions finds and removes the dimensions of the scattering functions - * when they are scalar (i.e. of the shape "dim + scalar = 0") for all - * scattering functions. The reason is that the processing of such dimensions - * is trivial and do not need neither a row and a column in the matrix - * representation of the domain (this will save memory) neither the full - * Quillere processing (this will save time). The scalar dimensions data are - * dispatched in the CloogProgram structure (the boolean vector scaldims will - * say which original dimensions are scalar or not) and to the CloogBlock - * structures (each one has a scaldims vector that contains the scalar values). - * - June 14th 2005: first developments. - * - June 30th 2005: first version. - */ -void cloog_program_extract_scalars(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options) -{ int i, j, scalar, current, nb_scaldims=0 ; - CloogScatteringList *start; - CloogScattering *old; - CloogLoop *loop; - CloogBlock * block ; - - start = scattering ; - - for (i=0;inb_scattdims;i++) - { scalar = 1 ; - scattering = start ; - while (scattering != NULL) - { if (!cloog_scattering_lazy_isscalar(scattering->scatt, i, NULL)) - { scalar = 0 ; - break ; - } - scattering = scattering->next ; - } - - if (scalar) - { nb_scaldims ++ ; - program->scaldims[i] = 1 ; - } - } - - /* If there are no scalar dimensions, we can continue directly. */ - if (!nb_scaldims) - return ; - - /* Otherwise, in each block, we have to put the number of scalar dimensions, - * and to allocate the memory for the scalar values. - */ - for (loop = program->loop; loop; loop = loop->next) { - block = loop->block; - block->nb_scaldims = nb_scaldims ; - block->scaldims = (cloog_int_t *)malloc(nb_scaldims*sizeof(cloog_int_t)); - for (i=0;iscaldims[i]); - } - - /* Then we have to fill these scalar values, so we can erase those dimensions - * from the scattering functions. It's easier to begin with the last one, - * since there would be an offset otherwise (if we remove the i^th dimension, - * then the next one is not the (i+1)^th but still the i^th...). - */ - current = nb_scaldims - 1 ; - for (i=program->nb_scattdims-1;i>=0;i--) - if (program->scaldims[i]) - { - scattering = start ; - for (loop = program->loop; loop; loop = loop->next) { - block = loop->block; - if (!cloog_scattering_lazy_isscalar(scattering->scatt, i, - &block->scaldims[current])) { - /* We should have found a scalar value: if not, there is an error. */ - cloog_die("dimension %d is not scalar as expected.\n", i); - } - scattering = scattering->next ; - } - - scattering = start ; - while (scattering != NULL) { - old = scattering->scatt; - scattering->scatt = cloog_scattering_erase_dimension(old, i); - cloog_scattering_free(old); - scattering = scattering->next ; - } - current-- ; - } - - /* We postprocess the scaldims array in such a way that each entry is how - * many scalar dimensions follows + 1 (the current one). This will make - * some other processing easier (e.g. knowledge of some offsets). - */ - for (i=0;inb_scattdims-1;i++) - { if (program->scaldims[i]) - { j = i + 1 ; - while ((j < program->nb_scattdims) && program->scaldims[j]) - { program->scaldims[i] ++ ; - j ++ ; - } - } - } - - if (nb_scaldims != 0) - cloog_msg(options, CLOOG_INFO, "%d dimensions (over %d) are scalar.\n", - nb_scaldims,program->nb_scattdims) ; -} - - -/** - * cloog_program_scatter function: - * This function adds the scattering (scheduling) informations in a program. - * If names is NULL, this function create names itself such that the i^th - * name is ci. - * - November 6th 2001: first version. - */ -void cloog_program_scatter(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options) -{ int scattering_dim, scattering_dim2, not_enough_constraints=0 ; - CloogLoop * loop ; - - if ((program != NULL) && (scattering != NULL)) - { loop = program->loop ; - - /* We compute the scattering dimension and check it is >=0. */ - scattering_dim = cloog_scattering_dimension(scattering->scatt, loop->domain); - if (scattering_dim < 0) - cloog_die("scattering has not enough dimensions.\n"); - if (!cloog_scattering_fully_specified(scattering->scatt, loop->domain)) - not_enough_constraints ++ ; - - /* The scattering dimension may have been modified by scalar extraction. */ - scattering_dim = cloog_scattering_dimension(scattering->scatt, loop->domain); - - /* Finally we scatter all loops. */ - cloog_loop_scatter(loop, scattering->scatt); - loop = loop->next ; - scattering = scattering->next ; - - while ((loop != NULL) && (scattering != NULL)) - { scattering_dim2 = cloog_scattering_dimension(scattering->scatt, - loop->domain); - if (scattering_dim2 != scattering_dim) - cloog_die("scattering dimensions are not the same.\n") ; - if (!cloog_scattering_fully_specified(scattering->scatt, loop->domain)) - not_enough_constraints ++ ; - - cloog_loop_scatter(loop, scattering->scatt); - loop = loop->next ; - scattering = scattering->next ; - } - if ((loop != NULL) || (scattering != NULL)) - cloog_msg(options, CLOOG_WARNING, - "there is not a scattering for each statement.\n"); - - if (not_enough_constraints) - cloog_msg(options, CLOOG_WARNING, "not enough constraints for " - "%d scattering function(s).\n",not_enough_constraints) ; - } -} diff --git a/cloog-0.16.3/source/state.c b/cloog-0.16.3/source/state.c deleted file mode 100644 index 7f3fff8494852e677affea4d3a650c4973d9287e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/state.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include "../include/cloog/cloog.h" - -/** - * Allocate state and initialize backend independent part. - */ -CloogState *cloog_core_state_malloc(void) -{ - CloogState *state; - - state = (CloogState *)malloc(sizeof(CloogState)); - if (!state) - cloog_die("memory overflow.\n"); - - state->backend = NULL; - - cloog_int_init(state->zero); - cloog_int_set_si(state->zero, 0); - cloog_int_init(state->one); - cloog_int_set_si(state->one, 1); - cloog_int_init(state->negone); - cloog_int_set_si(state->negone, -1); - - state->block_allocated = 0; - state->block_freed = 0; - state->block_max = 0; - - state->domain_allocated = 0; - state->domain_freed = 0; - state->domain_max = 0; - - state->loop_allocated = 0; - state->loop_freed = 0; - state->loop_max = 0; - - state->statement_allocated = 0; - state->statement_freed = 0; - state->statement_max = 0; - - return state; -} - -/** - * Free state. - */ -void cloog_core_state_free(CloogState *state) -{ - cloog_int_clear(state->zero); - cloog_int_clear(state->one); - cloog_int_clear(state->negone); - free(state); -} diff --git a/cloog-0.16.3/source/statement.c b/cloog-0.16.3/source/statement.c deleted file mode 100644 index 1c6af4ede13be46f16c64d24590cb85731189670..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/statement.c +++ /dev/null @@ -1,280 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** statement.c ** - **-------------------------------------------------------------------** - ** First version: november 4th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -# include -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - -/** - * These functions and global variables are devoted to memory leaks hunting: we - * want to know at each moment how many CloogStatement structures had been - * allocated (cloog_statement_allocated) and how many had been freed - * (cloog_statement_freed). Each time a CloogStatement structure is allocated, - * a call to the function cloog_statement_leak_up() must be carried out, and - * respectively cloog_statement_leak_down() when a CloogStatement structure is - * freed. The special variable cloog_statement_max gives the maximal number of - * CloogStatement structures simultaneously alive (i.e. allocated and - * non-freed) in memory. - * - July 3rd->11th 2003: first version (memory leaks hunt and correction). - */ - - -static void cloog_statement_leak_up(CloogState *state) -{ - state->statement_allocated++; - if ((state->statement_allocated - state->statement_freed) > state->statement_max) - state->statement_max = state->statement_allocated - state->statement_freed ; -} - - -static void cloog_statement_leak_down(CloogState *state) -{ - state->statement_freed++; -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_domain_print_structure : - * this function is a human-friendly way to display the CloogDomain data - * structure, it includes an indentation level (level) in order to work with - * others print_structure functions. - * - June 16th 2005: first version. - */ -void cloog_statement_print_structure(file, statement, level) -FILE * file ; -CloogStatement * statement ; -int level ; -{ int i ; - - if (statement != NULL) - { /* Go to the right level. */ - for (i=0; inumber) ; - - statement = statement->next ; - - while (statement != NULL) - { for (i=0; inumber) ; - statement = statement->next ; - } - } - else - { for (i=0; istate); - - next = statement->next ; - /* free(statement->usr) ; Actually, this is user's job ! */ - free(statement->name); - free(statement) ; - statement = next ; - } -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_statement_malloc function: - * This function allocates the memory space for a CloogStatement structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogStatement *cloog_statement_malloc(CloogState *state) -{ CloogStatement * statement ; - - /* Memory allocation for the CloogStatement structure. */ - statement = (CloogStatement *)malloc(sizeof(CloogStatement)) ; - if (statement == NULL) - cloog_die("memory overflow.\n"); - cloog_statement_leak_up(state); - - /* We set the various fields with default values. */ - statement->state = state; - statement->number = 0; - statement->name = NULL; - statement->usr = NULL ; /* To fill it is actually user's job ! */ - statement->next = NULL ; - - return statement ; -} - - -/** - * cloog_statement_alloc function: - * This function allocates the memory space for a CloogStatement structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - number is the statement number. - ** - * - September 9th 2002: first version. - * - March 17th 2003: fix for the usr field in CloogStatement structure. - * - April 16th 2005: adaptation to new CloogStatement structure (with - * number), cloog_statement_read becomes - * cloog_statement_alloc sincethere is nothing more to - * read on a file. - * - November 21th 2005: use of cloog_statement_malloc. - */ -CloogStatement *cloog_statement_alloc(CloogState *state, int number) -{ CloogStatement * statement ; - - /* Memory allocation and initialization of the structure. */ - statement = cloog_statement_malloc(state); - - statement->number = number ; - - return statement ; -} - - -/** - * cloog_statement_copy function: - * This function returns a copy of the CloogStatement structure given as input. - * - October 28th 2001: first version (in loop.c). - * - March 17th 2003: fix for the usr field in CloogStatement structure. - * - April 16th 2005: adaptation to new CloogStatement struct (with number). - */ -CloogStatement * cloog_statement_copy(CloogStatement * source) -{ CloogStatement * statement, * temp, * now = NULL ; - - statement = NULL ; - - while (source != NULL) { - cloog_statement_leak_up(source->state); - - temp = (CloogStatement *)malloc(sizeof(CloogStatement)) ; - if (temp == NULL) - cloog_die("memory overflow.\n"); - - temp->state = source->state; - temp->number = source->number ; - temp->name = source->name ? strdup(source->name) : NULL; - temp->usr = source->usr ; - temp->next = NULL ; - - if (statement == NULL) - { statement = temp ; - now = statement ; - } - else - { now->next = temp ; - now = now->next ; - } - source = source->next ; - } - return(statement) ; -} - - -/** - * cloog_statement_add function: - * This function adds a CloogStatement structure (statement) at a given place - * (now) of a NULL terminated list of CloogStatement structures. The beginning - * of this list is (start). This function updates (now) to (loop), and - * updates (start) if the added element is the first one -that is when (start) - * is NULL-. - * - March 27th 2004: first version. - */ -void cloog_statement_add(start, now, statement) -CloogStatement ** start, ** now, * statement ; -{ if (*start == NULL) - { *start = statement ; - *now = *start ; - } - else - { (*now)->next = statement ; - *now = (*now)->next ; - } -} - diff --git a/cloog-0.16.3/source/stride.c b/cloog-0.16.3/source/stride.c deleted file mode 100644 index d7358a08f3d6c21b871764de0de5d9d0d93cab51..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/stride.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include - -#define ALLOC(type) (type*)malloc(sizeof(type)) - -CloogStride *cloog_stride_malloc() -{ - CloogStride *s; - - s = ALLOC(CloogStride); - if (!s) - cloog_die("memory overflow.\n"); - - s->references = 1; - cloog_int_init(s->stride); - cloog_int_init(s->offset); - cloog_int_init(s->factor); - s->constraint = cloog_constraint_invalid(); - - return s; -} - -CloogStride *cloog_stride_alloc(cloog_int_t stride, cloog_int_t offset) -{ - CloogStride *s = cloog_stride_malloc(); - - cloog_int_set(s->stride, stride); - cloog_int_set(s->offset, offset); - cloog_int_set_si(s->factor, 0); - - return s; -} - -CloogStride *cloog_stride_alloc_from_constraint(cloog_int_t stride, - CloogConstraint *constraint, cloog_int_t factor) -{ - CloogStride *s = cloog_stride_malloc(); - - cloog_int_set(s->stride, stride); - cloog_int_set(s->factor, factor); - cloog_int_set_si(s->offset, -1); - s->constraint = constraint; - - return s; -} - -CloogStride *cloog_stride_copy(CloogStride *stride) -{ - if (!stride) - return stride; - - stride->references++; - return stride; -} - -void cloog_stride_free(CloogStride *stride) -{ - if (!stride) - return; - - stride->references--; - if (stride->references > 0) - return; - - cloog_int_clear(stride->stride); - cloog_int_clear(stride->offset); - cloog_int_clear(stride->factor); - cloog_constraint_release(stride->constraint); - free(stride); -} diff --git a/cloog-0.16.3/source/union_domain.c b/cloog-0.16.3/source/union_domain.c deleted file mode 100644 index 32b00876efdaad9f50bdd7579e5743908827b335..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/union_domain.c +++ /dev/null @@ -1,298 +0,0 @@ -#include -#include -#include -#include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -void cloog_named_domain_list_free(CloogNamedDomainList *list) -{ - while (list != NULL) { - CloogNamedDomainList *temp = list->next; - cloog_domain_free(list->domain); - cloog_scattering_free(list->scattering); - free(list->name); - free(list); - list = temp; - } -} - -CloogUnionDomain *cloog_union_domain_alloc(int nb_par) -{ - CloogUnionDomain *ud; - - ud = ALLOC(CloogUnionDomain); - if (!ud) - cloog_die("memory overflow.\n"); - - ud->domain = NULL; - ud->next_domain = &ud->domain; - - ud->n_name[CLOOG_PARAM] = nb_par; - ud->n_name[CLOOG_ITER] = 0; - ud->n_name[CLOOG_SCAT] = 0; - - ud->name[CLOOG_PARAM] = NULL; - ud->name[CLOOG_ITER] = NULL; - ud->name[CLOOG_SCAT] = NULL; - - return ud; -} - -void cloog_union_domain_free(CloogUnionDomain *ud) -{ - int i; - int j; - - if (!ud) - return; - - for (i = 0; i < 3; ++i) { - if (!ud->name[i]) - continue; - for (j = 0; j < ud->n_name[i]; ++i) - free(ud->name[i][j]); - free(ud->name[i]); - } - - cloog_named_domain_list_free(ud->domain); - - free(ud); -} - -/** - * Add a domain with scattering function to the union of domains. - * name may be NULL and is duplicated if it is not. - * domain and scattering are taken over by the CloogUnionDomain. - * scattering may be NULL. - */ -CloogUnionDomain *cloog_union_domain_add_domain(CloogUnionDomain *ud, - const char *name, CloogDomain *domain, CloogScattering *scattering, - void *usr) -{ - CloogNamedDomainList *named; - int n; - - if (!ud) - return NULL; - - named = ALLOC(CloogNamedDomainList); - if (!named) - cloog_die("memory overflow.\n"); - - if (ud->name[CLOOG_ITER]) - cloog_die("iterator names must be set after adding domains.\n"); - if (ud->name[CLOOG_SCAT]) - cloog_die("scattering names must be set after adding domains.\n"); - - n = cloog_domain_dimension(domain); - if (n > ud->n_name[CLOOG_ITER]) - ud->n_name[CLOOG_ITER] = n; - - if (scattering) { - n = cloog_scattering_dimension(scattering, domain); - if (n > ud->n_name[CLOOG_SCAT]) - ud->n_name[CLOOG_SCAT] = n; - } - - named->domain = domain; - named->scattering = scattering; - named->name = name ? strdup(name) : NULL; - named->usr = usr; - named->next = NULL; - - *ud->next_domain = named; - ud->next_domain = &named->next; - - return ud; -} - -/** - * Set the name of parameter, iterator or scattering dimension - * at the specified position. The name is duplicated. - */ -CloogUnionDomain *cloog_union_domain_set_name(CloogUnionDomain *ud, - enum cloog_dim_type type, int index, const char *name) -{ - int i; - - if (!ud) - return ud; - - if (type != CLOOG_PARAM && - type != CLOOG_ITER && - type != CLOOG_SCAT) - cloog_die("invalid dim type\n"); - - if (index < 0 || index >= ud->n_name[type]) - cloog_die("index out of range\n"); - - if (!ud->name[type]) { - ud->name[type] = ALLOCN(char *, ud->n_name[type]); - if (!ud->name[type]) - cloog_die("memory overflow.\n"); - for (i = 0; i < ud->n_name[type]; ++i) - ud->name[type][i] = NULL; - } - - free(ud->name[type][index]); - ud->name[type][index] = strdup(name); - if (!ud->name[type][index]) - cloog_die("memory overflow.\n"); - - return ud; -} - -static char *next_line(FILE *input, char *line, unsigned len) -{ - char *p; - - do { - if (!(p = fgets(line, len, input))) - return NULL; - while (isspace(*p) && *p != '\n') - ++p; - } while (*p == '#' || *p == '\n'); - - return p; -} - -/** - * cloog_scattering_list_read - * Read in a list of scattering functions for the nb_statements - * domains in loop. - */ -static CloogScatteringList *cloog_scattering_list_read(FILE * foo, - CloogDomain **domain, int nb_statements, int nb_parameters) -{ - int nb_scat = 0; - char s[MAX_STRING]; - CloogScatteringList *list = NULL, **next = &list; - - /* We read first the number of scattering functions in the list. */ - do { - if (!fgets(s, MAX_STRING, foo)) - break; - } while ((*s=='#' || *s=='\n') || (sscanf(s, " %d", &nb_scat) < 1)); - - if (nb_scat == 0) - return NULL; - - if (nb_scat != nb_statements) - cloog_die("wrong number of scattering functions.\n"); - - while (nb_scat--) { - *next = (CloogScatteringList *)malloc(sizeof(CloogScatteringList)); - (*next)->scatt = cloog_domain_read_scattering(*domain, foo); - (*next)->next = NULL; - - next = &(*next)->next; - domain++; - } - return list; -} - -static CloogUnionDomain *set_names_from_list(CloogUnionDomain *ud, - enum cloog_dim_type type, int n, char **names) -{ - int i; - - if (!names) - return ud; - - for (i = 0; i < n; ++i) { - ud = cloog_union_domain_set_name(ud, type, i, names[i]); - free(names[i]); - } - free(names); - - return ud; -} - -/** - * Fill up a CloogUnionDomain from information in a CLooG input file. - * The language and the context are assumed to have been read from - * the input file already. - */ -CloogUnionDomain *cloog_union_domain_read(FILE *file, int nb_par, - CloogOptions *options) -{ - int op1, op2, op3; - char line[MAX_STRING]; - CloogDomain **domain; - CloogUnionDomain *ud; - CloogScatteringList *scatteringl; - int i; - int n_iter = -1; - int n_dom; - char **names; - - ud = cloog_union_domain_alloc(nb_par); - - names = cloog_names_read_strings(file, nb_par); - ud = set_names_from_list(ud, CLOOG_PARAM, nb_par, names); - - /* We read the number of statements. */ - if (!next_line(file, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, "%d", &n_dom) != 1) - cloog_die("Input error.\n"); - - domain = ALLOCN(CloogDomain *, n_dom); - if (!domain) - cloog_die("memory overflow.\n"); - - for (i = 0; i < n_dom; ++i) { - int dim; - - domain[i] = cloog_domain_union_read(options->state, file, - nb_par); - dim = cloog_domain_dimension(domain[i]); - if (dim > n_iter) - n_iter = dim; - - /* To read that stupid "0 0 0" line. */ - if (!next_line(file, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, " %d %d %d", &op1, &op2, &op3) != 3) - cloog_die("Input error.\n"); - } - - /* Reading of the iterator names. */ - names = cloog_names_read_strings(file, n_iter); - - /* Reading and putting the scattering data in program structure. */ - scatteringl = cloog_scattering_list_read(file, domain, n_dom, nb_par); - - if (scatteringl) { - CloogScatteringList *is, *next; - - if (cloog_scattering_list_lazy_same(scatteringl)) - cloog_msg(options, CLOOG_WARNING, - "some scattering functions are similar.\n"); - - for (i = 0, is = scatteringl; i < n_dom; ++i, is = next) { - next = is->next; - ud = cloog_union_domain_add_domain(ud, NULL, domain[i], - is->scatt, NULL); - free(is); - } - } else { - for (i = 0; i < n_dom; ++i) - ud = cloog_union_domain_add_domain(ud, NULL, domain[i], - NULL, NULL); - } - - ud = set_names_from_list(ud, CLOOG_ITER, n_iter, names); - - if (scatteringl) { - int n_scat = ud->n_name[CLOOG_SCAT]; - names = cloog_names_read_strings(file, n_scat); - ud = set_names_from_list(ud, CLOOG_SCAT, n_scat, names); - } - - free(domain); - - return ud; -} diff --git a/cloog-0.16.3/source/version.c b/cloog-0.16.3/source/version.c deleted file mode 100644 index f1b86e2009c58f545b03834f4beb3538f5d056fe..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/version.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "version.h" -#include "cloog/version.h" - -#define CLOOG_BITS "gmp" - -const char *cloog_version(void) -{ - return "CLooG "CLOOG_HEAD" "CLOOG_BITS" bits"; -} - -int cloog_version_major(void) -{ - return CLOOG_VERSION_MAJOR; -} - -int cloog_version_minor(void) -{ - return CLOOG_VERSION_MINOR; -} - -int cloog_version_revision(void) -{ - return CLOOG_VERSION_REVISION; -} diff --git a/cloog-0.16.3/source/version.c.in b/cloog-0.16.3/source/version.c.in deleted file mode 100644 index f5d026e2d25486867be21d82a762d3d3e921aec7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/source/version.c.in +++ /dev/null @@ -1,24 +0,0 @@ -#include "version.h" -#include "cloog/version.h" - -#define CLOOG_BITS "@BITS@" - -const char *cloog_version(void) -{ - return "CLooG "CLOOG_HEAD" "CLOOG_BITS" bits"; -} - -int cloog_version_major(void) -{ - return CLOOG_VERSION_MAJOR; -} - -int cloog_version_minor(void) -{ - return CLOOG_VERSION_MINOR; -} - -int cloog_version_revision(void) -{ - return CLOOG_VERSION_REVISION; -} diff --git a/cloog-0.16.3/test/0D-1.c b/cloog-0.16.3/test/0D-1.c deleted file mode 100644 index 7f24623dea64aeffb1f33b6df3df9c0b87090cd0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-1.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1() ; diff --git a/cloog-0.16.3/test/0D-1.cloog b/cloog-0.16.3/test/0D-1.cloog deleted file mode 100644 index 226e7cb06a6fdf30c34d3d46a03ead280bbd4058..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-1.cloog +++ /dev/null @@ -1,13 +0,0 @@ -c - -0 2 -0 - -1 - -1 -0 2 -0 0 0 -0 - -0 diff --git a/cloog-0.16.3/test/0D-1.good.c b/cloog-0.16.3/test/0D-1.good.c deleted file mode 100644 index 0a37a569e623f7d2a6562aae26332a544c694a10..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-1.good.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-1.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } - -void test() -{ - S1() ; -} diff --git a/cloog-0.16.3/test/0D-2.c b/cloog-0.16.3/test/0D-2.c deleted file mode 100644 index 4aa9c17b3a541d58c845218aaca875fd0f4f8a53..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-2.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 0) { - S1() ; -} diff --git a/cloog-0.16.3/test/0D-2.cloog b/cloog-0.16.3/test/0D-2.cloog deleted file mode 100644 index 69f2015b0bba6907ceee35d6c8c0800306990fa8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-2.cloog +++ /dev/null @@ -1,14 +0,0 @@ -c - -0 3 -0 - -1 - -1 -1 3 -1 1 0 -0 0 0 -0 - -0 diff --git a/cloog-0.16.3/test/0D-2.good.c b/cloog-0.16.3/test/0D-2.good.c deleted file mode 100644 index 65a12c69a5c148cea0023f7ecb0e574dece15164..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-2.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-2.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } - -void test(int M) -{ - if (M >= 0) { - S1() ; - } -} diff --git a/cloog-0.16.3/test/0D-3.c b/cloog-0.16.3/test/0D-3.c deleted file mode 100644 index 62b42691cf29a3090a0f5904b1b28c38c97ac394..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-3.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1() ; diff --git a/cloog-0.16.3/test/0D-3.cloog b/cloog-0.16.3/test/0D-3.cloog deleted file mode 100644 index ab4d59c0570b5acd27309cf4521b11126be3ef13..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-3.cloog +++ /dev/null @@ -1,15 +0,0 @@ -c - -1 3 -1 1 0 -0 - -1 - -1 -1 3 -1 1 0 -0 0 0 -0 - -0 diff --git a/cloog-0.16.3/test/0D-3.good.c b/cloog-0.16.3/test/0D-3.good.c deleted file mode 100644 index 10150eb1d5993c67ef74838d0583ef55b90eb6e8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/0D-3.good.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-3.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } - -void test(int M) -{ - S1() ; -} diff --git a/cloog-0.16.3/test/1point-1.c b/cloog-0.16.3/test/1point-1.c deleted file mode 100644 index 7c0106b64d076f0c2a99532092735409bb106e2f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/1point-1.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(2*M,M) ; diff --git a/cloog-0.16.3/test/1point-1.cloog b/cloog-0.16.3/test/1point-1.cloog deleted file mode 100644 index 318d89b777630a4c5086f288f3bdf6083ac28343..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/1point-1.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -#{M | } -1 3 -# M 1 -1 0 1 -0 - -1 # Number of statements - -1 -#{i, j | i=2N; i=2j} -3 5 -# i j M 1 -0 1 0 -2 0 -0 1 -2 0 0 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/1point-1.good.c b/cloog-0.16.3/test/1point-1.good.c deleted file mode 100644 index 196f8a9d783fa6940a05f059316bc904d956d73d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/1point-1.good.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - i = 2*M ; - S1(2*M,M) ; -} diff --git a/cloog-0.16.3/test/1point-2.c b/cloog-0.16.3/test/1point-2.c deleted file mode 100644 index 48f6ad4adc4a170415d6d1f668dff1d614657682..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/1point-2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -S1(2*M,N+2) ; diff --git a/cloog-0.16.3/test/1point-2.cloog b/cloog-0.16.3/test/1point-2.cloog deleted file mode 100644 index 66eec58029a6bbe21c496e65a255d34390bd7d86..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/1point-2.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -#{M,N | } -1 4 -# M N 1 -1 0 0 1 -0 - -1 # Number of statements - -1 -# -3 6 -# i j M N 1 -0 1 0 -2 0 0 -0 2 -2 -4 2 4 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/1point-2.good.c b/cloog-0.16.3/test/1point-2.good.c deleted file mode 100644 index 98805040993d2eb8afc98a38ac47965c15bdd816..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/1point-2.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - i = 2*M ; - j = N+2 ; - S1(2*M,N+2) ; -} diff --git a/cloog-0.16.3/test/4-param.c b/cloog-0.16.3/test/4-param.c deleted file mode 100644 index b5427967eaff7d054f780090430045366bea85b6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/4-param.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/4-param.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.18s. */ -for (i=m;i<=min(n,p-1);i++) { - S1(i) ; -} -for (i=p;i<=min(q,m-1);i++) { - S2(i) ; -} -for (i=max(m,p);i<=min(n,q);i++) { - S1(i) ; - S2(i) ; -} -for (i=max(max(m,p),q+1);i<=n;i++) { - S1(i) ; -} -for (i=max(max(m,p),n+1);i<=q;i++) { - S2(i) ; -} diff --git a/cloog-0.16.3/test/4-param.cloog b/cloog-0.16.3/test/4-param.cloog deleted file mode 100644 index a19ba086981a6de3de3aaf87e840c239d7db76ca..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/4-param.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# Context -# parameters m n p q -1 6 -# m n p q 1 -1 0 0 0 0 1 -1 -m n p q - -2 # Number of statements - -1 -# S1 i,... -3 7 -# i m n p q 1 -1 1 -1 0 0 0 0 -1 -1 0 1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 -# -3 7 -# i m n p q 1 -1 1 0 0 -1 0 0 -1 -1 0 0 0 1 0 -1 0 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/4-param.good.c b/cloog-0.16.3/test/4-param.good.c deleted file mode 100644 index 563b90b8ef559e8799601668fe6dc3d88a0a0ae7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/4-param.good.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/4-param.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int m, int n, int p, int q) -{ - /* Original iterators. */ - int i; - for (i=m;i<=min(min(n,p-1),q);i++) { - S1(i) ; - } - for (i=p;i<=min(min(q,m-1),n);i++) { - S2(i) ; - } - for (i=max(m,p);i<=min(n,q);i++) { - S1(i) ; - S2(i) ; - } - for (i=max(m,q+1);i<=n;i++) { - S1(i) ; - } - for (i=max(p,n+1);i<=q;i++) { - S2(i) ; - } -} diff --git a/cloog-0.16.3/test/Makefile.am b/cloog-0.16.3/test/Makefile.am deleted file mode 100644 index be6995dc2ce11787f008c4688a7cdccb5f246dcc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/Makefile.am +++ /dev/null @@ -1,424 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile ** -# **-------------------------------------------------------------------** -# ** First version: march 6th 2003 ** -# **-------------------------------------------------------------------**/ -# -# makefile for checking. - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * This file has been written with the help of the Bart Kienhuis's checking * -# * makefile for PipLib. * -# * * -# *****************************************************************************/ - -if NO_ISL -GENERATE_TEST = -else -GENERATE_TEST = generate_test -endif -noinst_PROGRAMS = $(GENERATE_TEST) -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -LDADD = ../libcloog-isl.la -generate_test_SOURCES = generate_test.c - -FORCE: -../libcloog-isl.la: FORCE - cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la - -ROOT = .. - -FINITE_CLOOGTEST_C = \ - 0D-1 \ - 0D-2 \ - 0D-3 \ - 1point-1 \ - 1point-2 \ - 4-param \ - basic-bounds-1 \ - basic-bounds-2 \ - basic-bounds-3 \ - basic-bounds-4 \ - basic-bounds-5 \ - basic-bounds-6 \ - block \ - block2 \ - block3 \ - byu98-1-2-3 \ - cholesky \ - cholesky2 \ - christian \ - classen \ - classen2 \ - constant \ - constbound \ - darte \ - dealII \ - donotsimp \ - dot \ - dot2 \ - double \ - durbin_e_s \ - emploi \ - esced \ - ex1 \ - forwardsub-1-1-2 \ - forwardsub-2-1-2-3 \ - forwardsub-3-1-2 \ - gauss \ - gesced \ - gesced2 \ - gesced3 \ - guide \ - iftest \ - iftest2 \ - largeur \ - levenshtein-1-2-3 \ - lex \ - lineality-1-2 \ - lineality-2-1-2 \ - logo \ - logopar \ - lu \ - lu2 \ - lub \ - lux \ - min-1-1 \ - min-2-1 \ - min-3-1 \ - min-4-1 \ - mode \ - multi-mm-1 \ - no_lindep \ - orc \ - rectangle \ - singleton \ - square+triangle-1-1-2-3 \ - swim \ - test \ - thomasset \ - tiling \ - uday_scalars \ - union \ - vivien \ - vivien2 \ - walters \ - walters2 \ - walters3 \ - wavefront \ - yosr \ - yosr2 \ - ./non_optimal/nul_complex1 \ - ./non_optimal/usvd_e_t \ - ./non_optimal/youcef \ - ./reservoir/cholesky2 \ - ./reservoir/fusion1 \ - ./reservoir/fusion2 \ - ./reservoir/jacobi2 \ - ./reservoir/jacobi3 \ - ./reservoir/lim-lam1 \ - ./reservoir/lim-lam2 \ - ./reservoir/lim-lam3 \ - ./reservoir/lim-lam4 \ - ./reservoir/lim-lam5 \ - ./reservoir/lim-lam6 \ - ./reservoir/liu-zhuge1 \ - ./reservoir/loechner3 \ - ./reservoir/loechner4 \ - ./reservoir/loechner5 \ - ./reservoir/mg-interp2 \ - ./reservoir/mg-interp \ - ./reservoir/mg-psinv \ - ./reservoir/mg-resid \ - ./reservoir/mg-rprj3 \ - ./reservoir/pingali1 \ - ./reservoir/pingali2 \ - ./reservoir/pingali3 \ - ./reservoir/pingali4 \ - ./reservoir/pingali5 \ - ./reservoir/pingali6 \ - ./reservoir/QR \ - ./reservoir/tang-xue1 \ - ./reservoir/two - -CLOOG_ISL_TEST_C = \ - isl/mod \ - isl/mod2 \ - isl/mod3 \ - isl/mod4 - -CLOOGTEST_C = \ - infinite \ - infinite2 \ - infinite3 \ - infinite4 \ - $(FINITE_CLOOGTEST_C) \ - $(CLOOG_ISL_TEST_C) - -# ./reservoir/long \ -# faber - -CLOOGTEST_FORTRAN = \ - dartef \ - iftestf \ - levenshtein-1-2-3f \ - yosrf - -CLOOG_ISL_TEST_STRIDED = \ - isl/mxm-shared - -CLOOGTEST_STRIDED = \ - basic-bounds-2 \ - mod4 \ - nul_basic1 \ - nul_basic2 \ - nul_lcpc \ - multi-stride \ - multi-stride2 \ - stride3 \ - stride4 \ - reservoir/bastoul3 \ - reservoir/stride \ - reservoir/stride2 \ - $(CLOOG_ISL_TEST_STRIDED) - -SPECIAL_TESTS = \ - isl/jacobi-shared \ - backtrack \ - vasilache \ - merge \ - equality \ - equality2 \ - otl \ - param-split \ - pouchet \ - stride \ - stride2 \ - sor1d -SPECIAL_OPTIONS = \ - 'isl/jacobi-shared -f 4 -l -1 -override -strides 1 -sh 1' \ - 'backtrack -f 1 -backtrack' \ - 'vasilache -f 8 -l 9' \ - 'merge -f -1' \ - 'equality -f -1 -l 2 -override' \ - 'equality2 -f -1 -l 4 -esp 1 -override' \ - 'otl -block 1 -esp 0 -otl 0' \ - 'param-split -f -1' \ - 'pouchet -f 3 -l 7' \ - 'stride -f -1 -strides 1' \ - 'stride2 -f -1 -strides 1' \ - 'sor1d -f -1' - -EXTRA_DIST = \ - $(CLOOGTEST_C:%=%.cloog) \ - $(CLOOGTEST_C:%=%.c) \ - $(FINITE_CLOOGTEST_C:%=%.good.c) \ - $(CLOOGTEST_FORTRAN:%=%.cloog) \ - $(CLOOGTEST_FORTRAN:%=%.f) \ - $(CLOOGTEST_STRIDED:%=%.cloog) \ - $(CLOOGTEST_STRIDED:%=%.c) \ - $(SPECIAL_TESTS:%=%.cloog) \ - $(SPECIAL_TESTS:%=%.c) \ - $(SPECIAL_TESTS:%=%.good.c) - -generate: - @echo " /*-----------------------------------------------*" - @echo " * Generate files *" - @echo " *-----------------------------------------------*/" - @for x in $(CLOOGTEST_C) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Generate $$x.f" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \ - done ; \ - for x in $(CLOOGTEST_STRIDED) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog \ - -strides 1 -o $(srcdir)/$$x.c ; \ - done ; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Generate file $$x ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - $$options > $(srcdir)/$$x.c ; \ - done; done - -generate_good: - @for x in $(FINITE_CLOOGTEST_C) ; do \ - echo "Generate $$x.good.c" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Generate $$x.good.c ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; done - -valgrind: - @echo " /*-----------------------------------------------*" - @echo " * Checking files by Valgrind *" - @echo " *-----------------------------------------------*/" - for x in $(CLOOGTEST_C) ; do \ - echo "Valgrinding $$x.c" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Valgrinding $$x.f" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done - -test_run: generate_test$(EXEEXT) - @echo " /*-----------------------------------------------*" - @echo " * Testing CLooG *" - @echo " *-----------------------------------------------*/" - @failedtest=0 ; \ - echo "--- Testing C files... (correct output)" ; \ - for x in $(FINITE_CLOOGTEST_C) ; do \ - echo -n "Verify file $$x... " ; \ - echo -n "generating... " ; \ - $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $(srcdir)/$$x.cloog > test_test.c ; \ - ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ - echo -n "compiling... " ; \ - $(COMPILE) -c test_test.c; \ - $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ - $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ - echo -n "comparing... " ; \ - ./test_run$(EXEEXT); \ - result=$$?; \ - if test "$$result" -ne "0" ; then \ - failedtest=`expr $$failedtest + 1` ; \ - fi; \ - $(RM) $@; \ - echo; \ - done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo -n "Verify file $$x ($$options)... " ; \ - echo -n "generating... " ; \ - $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options $(srcdir)/$$x.cloog > test_test.c ; \ - ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ - echo -n "compiling... " ; \ - $(COMPILE) -c test_test.c; \ - $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ - $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ - echo -n "comparing... " ; \ - ./test_run$(EXEEXT); \ - result=$$?; \ - if test "$$result" -ne "0" ; then \ - failedtest=`expr $$failedtest + 1` ; \ - fi; \ - $(RM) $@; \ - echo; \ - done; done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo -n "Verify file $$x ($$options -sh 1)... " ; \ - echo -n "generating... " ; \ - $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options -sh 1 $(srcdir)/$$x.cloog > test_test.c ; \ - ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ - echo -n "compiling... " ; \ - $(COMPILE) -c test_test.c; \ - $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ - $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ - echo -n "comparing... " ; \ - ./test_run$(EXEEXT); \ - result=$$?; \ - if test "$$result" -ne "0" ; then \ - failedtest=`expr $$failedtest + 1` ; \ - fi; \ - $(RM) $@; \ - echo; \ - done; done; \ - if [ $$failedtest != 0 ] ; then \ - echo "$$failedtest tests failed" ; \ - else \ - echo "CLooG works correctly :-) !" ; \ - fi -test: - @echo " /*-----------------------------------------------*" - @echo " * Testing CLooG *" - @echo " *-----------------------------------------------*/" - @failedtest=0 ; \ - echo "--- Testing C files... (expected output)" ; \ - for x in $(CLOOGTEST_C) ; do \ - echo "Verify file $$x" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done ; \ - echo "--- Testing FORTRAN files..." ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Verify file $$x" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.f ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done ; \ - echo "--- Testing STRIDED files..." ; \ - for x in $(CLOOGTEST_STRIDED) ; do \ - echo "Verify file $$x" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - -strides 1 > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done ; \ - echo "--- Testing SPECIAL OPTIONS files..." ; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Verify file $$x ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - $$options > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done; done; \ - rm ttemp ; \ - if [ $$failedtest != 0 ] ; then \ - echo "$$failedtest tests failed" ; \ - else \ - echo "CLooG works correctly :-) !" ; \ - fi diff --git a/cloog-0.16.3/test/Makefile.in b/cloog-0.16.3/test/Makefile.in deleted file mode 100644 index e0ec24285117ab3d2d783b6726500071636a977f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/Makefile.in +++ /dev/null @@ -1,929 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile ** -# **-------------------------------------------------------------------** -# ** First version: march 6th 2003 ** -# **-------------------------------------------------------------------**/ -# -# makefile for checking. - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * This file has been written with the help of the Bart Kienhuis's checking * -# * makefile for PipLib. * -# * * -# *****************************************************************************/ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = $(am__EXEEXT_1) -subdir = test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -@NO_ISL_FALSE@am__EXEEXT_1 = generate_test$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_generate_test_OBJECTS = generate_test.$(OBJEXT) -generate_test_OBJECTS = $(am_generate_test_OBJECTS) -generate_test_LDADD = $(LDADD) -generate_test_DEPENDENCIES = ../libcloog-isl.la -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(generate_test_SOURCES) -DIST_SOURCES = $(generate_test_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITS = @BITS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CFLAGS_WARN = @CFLAGS_WARN@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_INDEX = @GIT_INDEX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -ISL_CPPFLAGS = @ISL_CPPFLAGS@ -ISL_LDFLAGS = @ISL_LDFLAGS@ -ISL_LIBS = @ISL_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TEXI2DVI = @TEXI2DVI@ -VERSION = @VERSION@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_REVISION = @VERSION_REVISION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -@NO_ISL_FALSE@GENERATE_TEST = generate_test -@NO_ISL_TRUE@GENERATE_TEST = -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -LDADD = ../libcloog-isl.la -generate_test_SOURCES = generate_test.c -ROOT = .. -FINITE_CLOOGTEST_C = \ - 0D-1 \ - 0D-2 \ - 0D-3 \ - 1point-1 \ - 1point-2 \ - 4-param \ - basic-bounds-1 \ - basic-bounds-2 \ - basic-bounds-3 \ - basic-bounds-4 \ - basic-bounds-5 \ - basic-bounds-6 \ - block \ - block2 \ - block3 \ - byu98-1-2-3 \ - cholesky \ - cholesky2 \ - christian \ - classen \ - classen2 \ - constant \ - constbound \ - darte \ - dealII \ - donotsimp \ - dot \ - dot2 \ - double \ - durbin_e_s \ - emploi \ - esced \ - ex1 \ - forwardsub-1-1-2 \ - forwardsub-2-1-2-3 \ - forwardsub-3-1-2 \ - gauss \ - gesced \ - gesced2 \ - gesced3 \ - guide \ - iftest \ - iftest2 \ - largeur \ - levenshtein-1-2-3 \ - lex \ - lineality-1-2 \ - lineality-2-1-2 \ - logo \ - logopar \ - lu \ - lu2 \ - lub \ - lux \ - min-1-1 \ - min-2-1 \ - min-3-1 \ - min-4-1 \ - mode \ - multi-mm-1 \ - no_lindep \ - orc \ - rectangle \ - singleton \ - square+triangle-1-1-2-3 \ - swim \ - test \ - thomasset \ - tiling \ - uday_scalars \ - union \ - vivien \ - vivien2 \ - walters \ - walters2 \ - walters3 \ - wavefront \ - yosr \ - yosr2 \ - ./non_optimal/nul_complex1 \ - ./non_optimal/usvd_e_t \ - ./non_optimal/youcef \ - ./reservoir/cholesky2 \ - ./reservoir/fusion1 \ - ./reservoir/fusion2 \ - ./reservoir/jacobi2 \ - ./reservoir/jacobi3 \ - ./reservoir/lim-lam1 \ - ./reservoir/lim-lam2 \ - ./reservoir/lim-lam3 \ - ./reservoir/lim-lam4 \ - ./reservoir/lim-lam5 \ - ./reservoir/lim-lam6 \ - ./reservoir/liu-zhuge1 \ - ./reservoir/loechner3 \ - ./reservoir/loechner4 \ - ./reservoir/loechner5 \ - ./reservoir/mg-interp2 \ - ./reservoir/mg-interp \ - ./reservoir/mg-psinv \ - ./reservoir/mg-resid \ - ./reservoir/mg-rprj3 \ - ./reservoir/pingali1 \ - ./reservoir/pingali2 \ - ./reservoir/pingali3 \ - ./reservoir/pingali4 \ - ./reservoir/pingali5 \ - ./reservoir/pingali6 \ - ./reservoir/QR \ - ./reservoir/tang-xue1 \ - ./reservoir/two - -CLOOG_ISL_TEST_C = \ - isl/mod \ - isl/mod2 \ - isl/mod3 \ - isl/mod4 - -CLOOGTEST_C = \ - infinite \ - infinite2 \ - infinite3 \ - infinite4 \ - $(FINITE_CLOOGTEST_C) \ - $(CLOOG_ISL_TEST_C) - - -# ./reservoir/long \ -# faber -CLOOGTEST_FORTRAN = \ - dartef \ - iftestf \ - levenshtein-1-2-3f \ - yosrf - -CLOOG_ISL_TEST_STRIDED = \ - isl/mxm-shared - -CLOOGTEST_STRIDED = \ - basic-bounds-2 \ - mod4 \ - nul_basic1 \ - nul_basic2 \ - nul_lcpc \ - multi-stride \ - multi-stride2 \ - stride3 \ - stride4 \ - reservoir/bastoul3 \ - reservoir/stride \ - reservoir/stride2 \ - $(CLOOG_ISL_TEST_STRIDED) - -SPECIAL_TESTS = \ - isl/jacobi-shared \ - backtrack \ - vasilache \ - merge \ - equality \ - equality2 \ - otl \ - param-split \ - pouchet \ - stride \ - stride2 \ - sor1d - -SPECIAL_OPTIONS = \ - 'isl/jacobi-shared -f 4 -l -1 -override -strides 1 -sh 1' \ - 'backtrack -f 1 -backtrack' \ - 'vasilache -f 8 -l 9' \ - 'merge -f -1' \ - 'equality -f -1 -l 2 -override' \ - 'equality2 -f -1 -l 4 -esp 1 -override' \ - 'otl -block 1 -esp 0 -otl 0' \ - 'param-split -f -1' \ - 'pouchet -f 3 -l 7' \ - 'stride -f -1 -strides 1' \ - 'stride2 -f -1 -strides 1' \ - 'sor1d -f -1' - -EXTRA_DIST = \ - $(CLOOGTEST_C:%=%.cloog) \ - $(CLOOGTEST_C:%=%.c) \ - $(FINITE_CLOOGTEST_C:%=%.good.c) \ - $(CLOOGTEST_FORTRAN:%=%.cloog) \ - $(CLOOGTEST_FORTRAN:%=%.f) \ - $(CLOOGTEST_STRIDED:%=%.cloog) \ - $(CLOOGTEST_STRIDED:%=%.c) \ - $(SPECIAL_TESTS:%=%.cloog) \ - $(SPECIAL_TESTS:%=%.c) \ - $(SPECIAL_TESTS:%=%.good.c) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -generate_test$(EXEEXT): $(generate_test_OBJECTS) $(generate_test_DEPENDENCIES) - @rm -f generate_test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(generate_test_OBJECTS) $(generate_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_test.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -FORCE: -../libcloog-isl.la: FORCE - cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la - -generate: - @echo " /*-----------------------------------------------*" - @echo " * Generate files *" - @echo " *-----------------------------------------------*/" - @for x in $(CLOOGTEST_C) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Generate $$x.f" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \ - done ; \ - for x in $(CLOOGTEST_STRIDED) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog \ - -strides 1 -o $(srcdir)/$$x.c ; \ - done ; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Generate file $$x ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - $$options > $(srcdir)/$$x.c ; \ - done; done - -generate_good: - @for x in $(FINITE_CLOOGTEST_C) ; do \ - echo "Generate $$x.good.c" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Generate $$x.good.c ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; done - -valgrind: - @echo " /*-----------------------------------------------*" - @echo " * Checking files by Valgrind *" - @echo " *-----------------------------------------------*/" - for x in $(CLOOGTEST_C) ; do \ - echo "Valgrinding $$x.c" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Valgrinding $$x.f" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done - -test_run: generate_test$(EXEEXT) - @echo " /*-----------------------------------------------*" - @echo " * Testing CLooG *" - @echo " *-----------------------------------------------*/" - @failedtest=0 ; \ - echo "--- Testing C files... (correct output)" ; \ - for x in $(FINITE_CLOOGTEST_C) ; do \ - echo -n "Verify file $$x... " ; \ - echo -n "generating... " ; \ - $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $(srcdir)/$$x.cloog > test_test.c ; \ - ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ - echo -n "compiling... " ; \ - $(COMPILE) -c test_test.c; \ - $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ - $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ - echo -n "comparing... " ; \ - ./test_run$(EXEEXT); \ - result=$$?; \ - if test "$$result" -ne "0" ; then \ - failedtest=`expr $$failedtest + 1` ; \ - fi; \ - $(RM) $@; \ - echo; \ - done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo -n "Verify file $$x ($$options)... " ; \ - echo -n "generating... " ; \ - $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options $(srcdir)/$$x.cloog > test_test.c ; \ - ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ - echo -n "compiling... " ; \ - $(COMPILE) -c test_test.c; \ - $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ - $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ - echo -n "comparing... " ; \ - ./test_run$(EXEEXT); \ - result=$$?; \ - if test "$$result" -ne "0" ; then \ - failedtest=`expr $$failedtest + 1` ; \ - fi; \ - $(RM) $@; \ - echo; \ - done; done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo -n "Verify file $$x ($$options -sh 1)... " ; \ - echo -n "generating... " ; \ - $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options -sh 1 $(srcdir)/$$x.cloog > test_test.c ; \ - ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ - echo -n "compiling... " ; \ - $(COMPILE) -c test_test.c; \ - $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ - $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ - echo -n "comparing... " ; \ - ./test_run$(EXEEXT); \ - result=$$?; \ - if test "$$result" -ne "0" ; then \ - failedtest=`expr $$failedtest + 1` ; \ - fi; \ - $(RM) $@; \ - echo; \ - done; done; \ - if [ $$failedtest != 0 ] ; then \ - echo "$$failedtest tests failed" ; \ - else \ - echo "CLooG works correctly :-) !" ; \ - fi -test: - @echo " /*-----------------------------------------------*" - @echo " * Testing CLooG *" - @echo " *-----------------------------------------------*/" - @failedtest=0 ; \ - echo "--- Testing C files... (expected output)" ; \ - for x in $(CLOOGTEST_C) ; do \ - echo "Verify file $$x" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done ; \ - echo "--- Testing FORTRAN files..." ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Verify file $$x" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.f ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done ; \ - echo "--- Testing STRIDED files..." ; \ - for x in $(CLOOGTEST_STRIDED) ; do \ - echo "Verify file $$x" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - -strides 1 > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done ; \ - echo "--- Testing SPECIAL OPTIONS files..." ; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Verify file $$x ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - $$options > ttemp ; \ - diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ - result=$$?; \ - if [ "$$result" -ne "0" ] ; then \ - echo "!!! Error: $$x is not the same" ; \ - failedtest=`expr $$failedtest + 1` ; \ - else \ - echo "$$x passed" ; \ - fi ; \ - done; done; \ - rm ttemp ; \ - if [ $$failedtest != 0 ] ; then \ - echo "$$failedtest tests failed" ; \ - else \ - echo "CLooG works correctly :-) !" ; \ - fi - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.16.3/test/backtrack.c b/cloog-0.16.3/test/backtrack.c deleted file mode 100644 index 9895d83e5a507f96fe86a6771332cb7abc359fb4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/backtrack.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/backtrack.cloog by CLooG 0.14.0-367-gf043665 gmp bits in 0.00s. */ -S1(0); diff --git a/cloog-0.16.3/test/backtrack.cloog b/cloog-0.16.3/test/backtrack.cloog deleted file mode 100644 index f8d978eb450f56ea2920f0bd1ac28fae7dd1df77..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/backtrack.cloog +++ /dev/null @@ -1,24 +0,0 @@ -c - -0 2 - -0 - -# Number of statements -1 - -1 # of domains -1 3 -0 1 0 -0 0 0 - -0 - -# of scattering functions -1 - -2 5 -0 1 0 -1 0 -0 0 1 0 0 - -0 diff --git a/cloog-0.16.3/test/backtrack.good.c b/cloog-0.16.3/test/backtrack.good.c deleted file mode 100644 index 5cb04a3958312c26c8b0b4e3e2bc1ea371681231..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/backtrack.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/backtrack.cloog by CLooG 0.14.0-367-gf043665 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - S1(0); -} diff --git a/cloog-0.16.3/test/basic-bounds-1.c b/cloog-0.16.3/test/basic-bounds-1.c deleted file mode 100644 index 1ddede115929aeffb80f3998ac4d06fb4a2cd0b6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-1.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=2;i++) { - S1(i) ; -} diff --git a/cloog-0.16.3/test/basic-bounds-1.cloog b/cloog-0.16.3/test/basic-bounds-1.cloog deleted file mode 100644 index 1c3ac40c8817acb4a98b1ca88ef82c293c5dbd93..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-1.cloog +++ /dev/null @@ -1,21 +0,0 @@ -# language: C -c - -# Context -1 2 -1 1 -0 - -1 # Number of statements - -1 -# -3 3 -# i 1 -1 1 0 -1 -1 2 -1 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/basic-bounds-1.good.c b/cloog-0.16.3/test/basic-bounds-1.good.c deleted file mode 100644 index ab53e94339b6189fa007cbd13416a320a51a7d90..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-1.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Original iterators. */ - int i; - for (i=0;i<=2;i++) { - S1(i) ; - } -} diff --git a/cloog-0.16.3/test/basic-bounds-2.c b/cloog-0.16.3/test/basic-bounds-2.c deleted file mode 100644 index 38780ff83e744fd76717f808971716febbf5eaa3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(0) ; diff --git a/cloog-0.16.3/test/basic-bounds-2.cloog b/cloog-0.16.3/test/basic-bounds-2.cloog deleted file mode 100644 index 45a51ba86916c6e561e3023b66914e93919fcb58..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-2.cloog +++ /dev/null @@ -1,21 +0,0 @@ -# language: C -c - -# Context -1 2 -1 1 -0 - -1 # Number of statements - -1 -# -3 3 -# i 1 -1 3 0 -1 -3 2 -1 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/basic-bounds-2.good.c b/cloog-0.16.3/test/basic-bounds-2.good.c deleted file mode 100644 index 48544ff60a673669ad459dcb0c7daa67162ae9af..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-2.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Original iterators. */ - int i; - S1(0) ; -} diff --git a/cloog-0.16.3/test/basic-bounds-3.c b/cloog-0.16.3/test/basic-bounds-3.c deleted file mode 100644 index f5fdaf8ecd1211b2ee1b3582773849e94fd08f4a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-3.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=M;i++) { - S1(i) ; -} diff --git a/cloog-0.16.3/test/basic-bounds-3.cloog b/cloog-0.16.3/test/basic-bounds-3.cloog deleted file mode 100644 index f3ad8bc4e6e3ea27478654c56fe9a8182e350a88..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-3.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -2 3 -# M 1 -1 1 0 -1 0 1 -0 - -1 # Number of statements - -1 -# -3 4 -# i M 1 -1 1 0 0 -1 -1 1 0 -1 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/basic-bounds-3.good.c b/cloog-0.16.3/test/basic-bounds-3.good.c deleted file mode 100644 index c5c0f7c22e9f67153bc4b6f7f3a8c04619a45895..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-3.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - for (i=0;i<=M;i++) { - S1(i) ; - } -} diff --git a/cloog-0.16.3/test/basic-bounds-4.c b/cloog-0.16.3/test/basic-bounds-4.c deleted file mode 100644 index 1f15c42e829dc7314eecac2feee872d1c60ac8b5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-4.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=M+1;i++) { - S1(i) ; -} diff --git a/cloog-0.16.3/test/basic-bounds-4.cloog b/cloog-0.16.3/test/basic-bounds-4.cloog deleted file mode 100644 index 5e766872bba289b15143c8f4fd0dea03930647eb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-4.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -2 3 -# M 1 -1 1 0 -1 0 1 -0 - -1 # Number of statements - -1 -# -3 4 -# i M 1 -1 1 0 0 -1 -1 1 1 -1 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/basic-bounds-4.good.c b/cloog-0.16.3/test/basic-bounds-4.good.c deleted file mode 100644 index 310c9482fa8775913692396f2e00666355869620..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-4.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - for (i=0;i<=M+1;i++) { - S1(i) ; - } -} diff --git a/cloog-0.16.3/test/basic-bounds-5.c b/cloog-0.16.3/test/basic-bounds-5.c deleted file mode 100644 index 1761b56ae8224558f5c2910318b76f927c7d42b3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-5.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -j = floord(M+1,2) ; -S1(1,j) ; diff --git a/cloog-0.16.3/test/basic-bounds-5.cloog b/cloog-0.16.3/test/basic-bounds-5.cloog deleted file mode 100644 index 855a9bbcb9652f45e9007cfc3e73b8ea4b8e348d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-5.cloog +++ /dev/null @@ -1,22 +0,0 @@ -# language: C -c - -# Context -1 3 -# M 1 -1 0 1 -0 - -1 # Number of statements - -1 -# {i,j,N | i=1; 2j-1<=N<=2j} -3 5 -# i j M 1 -0 1 0 0 -1 -1 0 2 -1 0 -1 0 -2 1 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/basic-bounds-5.good.c b/cloog-0.16.3/test/basic-bounds-5.good.c deleted file mode 100644 index 3e669c01b5b1f36b687ba4846fb076d4a67f41a8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-5.good.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - j = floord(M+1,2) ; - S1(1,j) ; -} diff --git a/cloog-0.16.3/test/basic-bounds-6.c b/cloog-0.16.3/test/basic-bounds-6.c deleted file mode 100644 index 449ad375ec01108043fa6917012e9f70c1827eac..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-6.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(-1) ; diff --git a/cloog-0.16.3/test/basic-bounds-6.cloog b/cloog-0.16.3/test/basic-bounds-6.cloog deleted file mode 100644 index 2acc2ab4da53abf67339182ad552e9966d22deaa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-6.cloog +++ /dev/null @@ -1,20 +0,0 @@ -# language: C -c - -# Context -1 2 -1 1 -0 - -1 # Number of statements - -1 -3 3 -# i 1 -1 2 3 -1 -2 -1 -1 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/basic-bounds-6.good.c b/cloog-0.16.3/test/basic-bounds-6.good.c deleted file mode 100644 index a993e2f30c5936d5a484e2bd36ced3e2b86bd599..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/basic-bounds-6.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Original iterators. */ - int i; - S1(-1) ; -} diff --git a/cloog-0.16.3/test/block.c b/cloog-0.16.3/test/block.c deleted file mode 100644 index 2ba5668726e02fa6d0e85fc55c333cb049f98097..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.00s. */ -S1(); -S3(0); -S2(); -S3(1); diff --git a/cloog-0.16.3/test/block.cloog b/cloog-0.16.3/test/block.cloog deleted file mode 100644 index 9913b74de7f58b7ed443954134be53bea3d8c884..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block.cloog +++ /dev/null @@ -1,42 +0,0 @@ -c - -0 2 - -0 - -3 - -1 -0 2 - -0 0 0 - -1 -0 2 - -0 0 0 - -1 -2 3 -1 1 0 -1 -1 1 - -0 0 0 - -0 - -3 - -2 4 -0 -1 0 0 # c1 = 0 -0 0 -1 0 # c2 = 0 - -2 4 -0 -1 0 1 # c1 = 1 -0 0 -1 0 # c2 = 0 - -2 5 -0 -1 0 1 0 # c1 = i -0 0 -1 0 1 # c2 = 1 - -0 diff --git a/cloog-0.16.3/test/block.good.c b/cloog-0.16.3/test/block.good.c deleted file mode 100644 index b2f280f9cf96fe6086a83e3ded3fa85858fa7294..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3(i) { hash(3); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - S1(); - S3(0); - S2(); - S3(1); -} diff --git a/cloog-0.16.3/test/block2.c b/cloog-0.16.3/test/block2.c deleted file mode 100644 index 7209a1047a03d0403e4953c3b8edde0c8c2a83b1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block2.cloog by CLooG 0.14.0-302-g309b32c gmp bits in 0.01s. */ -for (c0=0;c0<=9;c0++) { - S1(c0,1); - S3(c0,1); - S2(c0,1); -} diff --git a/cloog-0.16.3/test/block2.cloog b/cloog-0.16.3/test/block2.cloog deleted file mode 100644 index 866c6346e38c1c9454f17fe0e9d388ae5173964b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block2.cloog +++ /dev/null @@ -1,77 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -0 2 - -0 # Parameter name(s) - -# Statement number: -3 - -# Iteration domain of statement 5 (ND_1IP_ED_0_0_V_0). -1 - -3 4 -0 0 1 -1 -1 1 0 0 -1 -1 0 9 - -0 0 0 # For future options. - -# Iteration domain of statement 6 (ND_1OP_ED_3_0_V_1). -1 - -3 4 -0 0 1 -1 -1 1 0 0 -1 -1 0 9 - -0 0 0 # For future options. - -# Iteration domain of statement 7 (ND_1). -1 - -3 4 -0 0 1 -1 -1 1 0 0 -1 -1 0 9 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# --------------------- SCATTERING -------------------- -3 # Scattering functions - -# Scattering of statement 5 (ND_1IP_ED_0_0_V_0). -1 - -3 7 -0 0 0 1 0 0 -6 -0 0 1 0 0 -1 0 -0 1 0 0 -1 0 0 - -# Scattering of statement 6 (ND_1OP_ED_3_0_V_1). -1 - -3 7 -0 0 0 1 0 0 -11 -0 0 1 0 0 -1 0 -0 1 0 0 -1 0 0 - -# Scattering of statement 7 (ND_1). -1 - -3 7 -0 0 0 1 0 0 -8 -0 0 1 0 0 -1 0 -0 1 0 0 -1 0 0 - -1 # Scattering dimension name(s) -c0 c1 c2 diff --git a/cloog-0.16.3/test/block2.good.c b/cloog-0.16.3/test/block2.good.c deleted file mode 100644 index 23a49428cb42a369249b6a35e29e23ddbad2c354..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block2.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block2.cloog by CLooG 0.14.0-302-g309b32c gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c0, c1; - /* Original iterators. */ - int i, j; - for (c0=0;c0<=9;c0++) { - S1(c0,1); - S3(c0,1); - S2(c0,1); - } -} diff --git a/cloog-0.16.3/test/block3.c b/cloog-0.16.3/test/block3.c deleted file mode 100644 index 2c701e906951f79bb40ec850c8af79d588e5b101..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block3.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Generated from ../../../git/cloog/test/block3.cloog by CLooG 0.16.2-4-gba4e834 gmp bits in 0.00s. */ -S1(); -S3(0); -S2(); -S3(1); diff --git a/cloog-0.16.3/test/block3.cloog b/cloog-0.16.3/test/block3.cloog deleted file mode 100644 index fd9997d64b5f221d37c47d6b2e9b687c70ab485b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block3.cloog +++ /dev/null @@ -1,36 +0,0 @@ -C - -0 2 - -0 - -3 - -1 -0 2 -0 0 0 - -1 -0 2 -0 0 0 - -1 -2 3 -1 1 0 -1 -1 1 -0 0 0 - -0 - -3 - -1 3 -0 -1 0 - -1 3 -0 -1 1 - -1 4 -0 -1 1 0 - -0 diff --git a/cloog-0.16.3/test/block3.good.c b/cloog-0.16.3/test/block3.good.c deleted file mode 100644 index b4bdf6de9db8227d86f3666ff379cc8aaa385d7e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/block3.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/block3.cloog by CLooG 0.16.2-4-gba4e834 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3(i) { hash(3); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - S1(); - S3(0); - S2(); - S3(1); -} diff --git a/cloog-0.16.3/test/byu98-1-2-3.c b/cloog-0.16.3/test/byu98-1-2-3.c deleted file mode 100644 index 2a1e151bb3d0b6291b30f94a3b83d845eece60ab..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/byu98-1-2-3.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/byu98-1-2-3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -for (i=2;i<=3;i++) { - for (j=-i+6;j<=6;j++) { - S1(i,j); - } -} -for (i=4;i<=7;i++) { - if (i == 4) { - for (j=3;j<=4;j++) { - S1(i,j); - } - } - if (i >= 6) { - S2(i,-i+9); - } - if (i <= 5) { - S1(i,-i+9); - S2(i,-i+9); - } - for (j=max(-i+10,i-1);j<=6;j++) { - S1(i,j); - } -} -S2(8,1); diff --git a/cloog-0.16.3/test/byu98-1-2-3.cloog b/cloog-0.16.3/test/byu98-1-2-3.cloog deleted file mode 100644 index 76d16ab805edebd1e9d627c4a7a07c98ad64f170..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/byu98-1-2-3.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# Here is the result given by an old CLooG (the same was given up to 0.12.2), -# the difference with the new constant spreading technique of 0.14.0 is -# one of the most beautiful. -# -# /* Generated by CLooG v0.10.7 */ -# for (i=2;i<=3;i++) { -# for (j=-i+6;j<=6;j++) { -# S1 ; -# } -# } -# for (j=4-1;j<=-(4)+8;j++) { -# S1(i = 4) ; -# } -# j = -(4)+9 ; -# S1(i = 4) ; -# S2(i = 4) ; -# for (j=-(4)+10;j<=6;j++) { -# S1(i = 4) ; -# } -# S1(i = 5,j = 4) ; -# S2(i = 5,j = 4) ; -# for (j=5;j<=6;j++) { -# S1(i = 5) ; -# } -# for (i=6;i<=7;i++) { -# j = -i+9 ; -# S2 ; -# for (j=i-1;j<=6;j++) { -# S1 ; -# } -# } -# S2(i = 8,j = 1) ; - -# language: C -c - -# Context -#{ | 1>=0} -1 2 -1 1 -0 - -2 # Number of statements - -1 -# {i,j | (-j+6,2)<=i<=j+1; 3<=j<=6} -5 4 -# i j 1 -1 1 1 -6 -1 1 0 -2 -1 0 1 -3 -1 0 -1 6 -1 -1 1 1 -0 0 0 - -1 -# {i,j | i=-j+9; 1<=j<=5} -3 4 -0 1 1 -9 -1 0 1 -1 -1 0 -1 5 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/byu98-1-2-3.good.c b/cloog-0.16.3/test/byu98-1-2-3.good.c deleted file mode 100644 index d1ad1568c57043764de02a9b0d7a576d5e73cb35..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/byu98-1-2-3.good.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generated from ../../../git/cloog/test/byu98-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Original iterators. */ - int i, j; - for (i=2;i<=3;i++) { - for (j=-i+6;j<=6;j++) { - S1(i,j) ; - } - } - for (j=3;j<=4;j++) { - S1(4,j) ; - } - S1(4,5) ; - S2(4,5) ; - S1(4,6) ; - S1(5,4) ; - S2(5,4) ; - for (j=5;j<=6;j++) { - S1(5,j) ; - } - for (i=6;i<=7;i++) { - j = -i+9 ; - S2(i,-i+9) ; - for (j=i-1;j<=6;j++) { - S1(i,j) ; - } - } - S2(8,1) ; -} diff --git a/cloog-0.16.3/test/cholesky.c b/cloog-0.16.3/test/cholesky.c deleted file mode 100644 index a0d08fcaf6690c50db239daf96cbccefecaf2c11..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/cholesky.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ -if (n >= 1) { - if (n >= 2) { - S1(1) ; - S3(1) ; - for (c3=2;c3<=n;c3++) { - S4(1,c3) ; - S6(1,c3) ; - } - } - if (n == 1) { - S1(1) ; - S3(1) ; - } - for (c1=2;c1<=n-1;c1++) { - S1(c1) ; - for (c3=1;c3<=c1-1;c3++) { - S2(c1,c3) ; - } - S3(c1) ; - for (c3=c1+1;c3<=n;c3++) { - S4(c1,c3) ; - for (c5=1;c5<=c1-1;c5++) { - S5(c1,c3,c5) ; - } - S6(c1,c3) ; - } - } - if (n >= 2) { - S1(n) ; - for (c3=1;c3<=n-1;c3++) { - S2(n,c3) ; - } - S3(n) ; - } -} diff --git a/cloog-0.16.3/test/cholesky.cloog b/cloog-0.16.3/test/cholesky.cloog deleted file mode 100644 index a3eadeade989e7047b52229cd0e329512ab86034..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/cholesky.cloog +++ /dev/null @@ -1,129 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -1 -n - -6 # Number of statements - -1 -# S1 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S2 {i, j | 1<=i<=n; 1<=j<=i-1} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 1 -1 0 -1 -0 0 0 - -1 -# S3 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S4 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# S5 {i, j, k | 1<=i<=n; i+1<=j<=n 1<=k<=i-1} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 1 0 -1 0 -1 -0 0 0 - -1 -# S6 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - -6 # Scattering functions -# Et les instructions de chunking (prog init)... -6 10 -# c1 c2 c3 c4 c5 c6 i n 1 -0 1 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 0 -1 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 - -6 11 -# c1 c2 c3 c4 c5 c6 i j n 1 -0 1 0 0 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 0 -2 -0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 1 0 0 0 0 0 -1 -0 0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 0 - -6 10 -# c1 c2 c3 c4 c5 c6 i n 1 -0 1 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 0 -3 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 - -6 11 -# c1 c2 c3 c4 c5 c6 i j n 1 -0 1 0 0 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 0 -4 -0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 1 0 0 0 0 0 -1 -0 0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 0 - -6 12 -# c1 c2 c3 c4 c5 c6 i j k n 1 -0 1 0 0 0 0 0 -1 0 0 0 0 -0 0 1 0 0 0 0 0 0 0 0 -4 -0 0 0 1 0 0 0 0 -1 0 0 0 -0 0 0 0 1 0 0 0 0 0 0 -2 -0 0 0 0 0 1 0 0 0 -1 0 0 -0 0 0 0 0 0 1 0 0 0 0 -1 - -6 11 -# c1 c2 c3 c4 c5 c6 i j n 1 -0 1 0 0 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 0 -4 -0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 1 0 0 0 0 0 -3 -0 0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 0 -0 - - diff --git a/cloog-0.16.3/test/cholesky.good.c b/cloog-0.16.3/test/cholesky.good.c deleted file mode 100644 index 7619b7e996cf0f50ea386f92f931507331c20646..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/cholesky.good.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c3, c5; - /* Original iterators. */ - int i, j, k; - if (n >= 2) { - S1(1) ; - S3(1) ; - for (c3=2;c3<=n;c3++) { - S4(1,c3) ; - S6(1,c3) ; - } - } - if (n == 1) { - S1(1) ; - S3(1) ; - } - for (c1=2;c1<=n-1;c1++) { - S1(c1) ; - for (c3=1;c3<=c1-1;c3++) { - S2(c1,c3) ; - } - S3(c1) ; - for (c3=c1+1;c3<=n;c3++) { - S4(c1,c3) ; - for (c5=1;c5<=c1-1;c5++) { - S5(c1,c3,c5) ; - } - S6(c1,c3) ; - } - } - if (n >= 2) { - S1(n) ; - for (c3=1;c3<=n-1;c3++) { - S2(n,c3) ; - } - S3(n) ; - } -} diff --git a/cloog-0.16.3/test/cholesky2.c b/cloog-0.16.3/test/cholesky2.c deleted file mode 100644 index 3141bdc8393491793abe1ca03e6c07a59089061b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/cholesky2.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky2.cloog by CLooG 0.16.1-2-g33ac553 gmp bits in 0.02s. */ -if (M >= 1) { - for (c2=1;c2<=M-1;c2++) { - S1(c2); - for (c3=c2+1;c3<=M;c3++) { - S4(c2,c3); - } - } - S1(M); - S3(1); - if (M >= 3) { - S6(1,2); - for (c2=3;c2<=M;c2++) { - S6(1,c2); - for (i=2;i<=c2-1;i++) { - S5(i,c2,1); - } - } - } - if (M == 2) { - S6(1,2); - } - for (c1=3;c1<=3*M-7;c1++) { - if ((c1+2)%3 == 0) { - S3((c1+2)/3); - } - if (c1%3 == 0) { - S2((c1+3)/3,c1/3); - } - if ((c1+1)%3 == 0) { - S6((c1+1)/3,(c1+4)/3); - } - if (c1%3 == 0) { - S2((c1+6)/3,c1/3); - } - for (c2=ceild(c1+7,3);c2<=M;c2++) { - if ((c1+1)%3 == 0) { - S6((c1+1)/3,c2); - } - if (c1%3 == 0) { - S2(c2,c1/3); - } - if ((c1+1)%3 == 0) { - for (i=ceild(c1+4,3);i<=c2-1;i++) { - S5(i,c2,(c1+1)/3); - } - } - } - } - if (M >= 3) { - for (c2=M-1;c2<=M;c2++) { - S2(c2,M-2); - } - } - if (M >= 3) { - S3(M-1); - } - if (M >= 3) { - S6(M-1,M); - } - if (M >= 2) { - S2(M,M-1); - } - if (M >= 2) { - S3(M); - } -} diff --git a/cloog-0.16.3/test/cholesky2.cloog b/cloog-0.16.3/test/cholesky2.cloog deleted file mode 100644 index 6c0a81a0d3965f40f66ade42e1fd94551af6dd0c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/cholesky2.cloog +++ /dev/null @@ -1,108 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -6 # Number of statements - -1 -# S1 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S2 {i, j | 1<=i<=n; 1<=j<=i-1} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 1 -1 0 -1 -0 0 0 - -1 -# S3 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S4 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# S5 {i, j, k | 1<=i<=n; i+1<=j<=n 1<=k<=i-1} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 1 0 -1 0 -1 -0 0 0 - -1 -# S6 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - -6 # Scattering functions -# Et les instructions de chunking (parallele)... -3 7 -# c1 c2 c3 i n 1 -0 1 0 0 0 0 0 -0 0 1 0 -1 0 0 -0 0 0 1 0 0 0 - -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 0 -3 0 0 -0 0 1 0 -1 0 0 0 -0 0 0 1 0 0 0 0 - -3 7 -# c1 c2 c3 i n 1 -0 1 0 0 -3 0 2 -0 0 1 0 0 0 0 -0 0 0 1 0 0 0 - -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 0 0 0 0 -0 0 1 0 -1 0 0 0 -0 0 0 1 0 -1 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 0 0 -3 0 1 -0 0 1 0 0 -1 0 0 0 -0 0 0 1 0 0 -1 0 0 - -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 -3 0 0 1 -0 0 1 0 0 -1 0 0 -0 0 0 1 0 0 0 0 -0 diff --git a/cloog-0.16.3/test/cholesky2.good.c b/cloog-0.16.3/test/cholesky2.good.c deleted file mode 100644 index ee4b344bb1fa918c663dcf71aba920ac42c6d07f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/cholesky2.good.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.11s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2, c3; - /* Original iterators. */ - int i, j, k; - if (M >= 2) { - for (c2=1;c2<=M-1;c2++) { - S1(c2) ; - for (c3=c2+1;c3<=M;c3++) { - S4(c2,c3) ; - } - } - S1(M) ; - } - if (M == 1) { - S1(1) ; - } - if (M >= 2) { - S3(1) ; - } - if (M >= 3) { - S6(1,2) ; - for (c2=3;c2<=M;c2++) { - S6(1,c2) ; - for (i=2;i<=c2-1;i++) { - S5(i,c2,1) ; - } - } - } - if (M == 2) { - S6(1,2) ; - } - for (c1=3;c1<=3*M-7;c1++) { - if ((c1+2)%3 == 0) { - i = (c1+2)/3 ; - S3((c1+2)/3) ; - } - if (c1%3 == 0) { - c2 = (c1+3)/3 ; - i = (c1+3)/3 ; - S2((c1+3)/3,c1/3) ; - } - c2 = floord(c1+6,3) ; - if ((c1+1)%3 == 0) { - i = (c1+1)/3 ; - S6((c1+1)/3,c2) ; - } - if (c1%3 == 0) { - S2(c2,c1/3) ; - } - for (c2=ceild(c1+7,3);c2<=M;c2++) { - if ((c1+1)%3 == 0) { - i = (c1+1)/3 ; - S6((c1+1)/3,c2) ; - } - if (c1%3 == 0) { - S2(c2,c1/3) ; - } - if ((c1+1)%3 == 0) { - c3 = (c1+1)/3 ; - for (i=ceild(c1+4,3);i<=c2-1;i++) { - k = (c1+1)/3 ; - S5(i,c2,(c1+1)/3) ; - } - } - } - } - for (c1=max(3*M-6,3);c1<=3*M-4;c1++) { - if ((c1+2)%3 == 0) { - i = (c1+2)/3 ; - S3((c1+2)/3) ; - } - if (c1%3 == 0) { - c2 = (c1+3)/3 ; - i = (c1+3)/3 ; - S2((c1+3)/3,c1/3) ; - } - for (c2=ceild(c1+4,3);c2<=M;c2++) { - if ((c1+1)%3 == 0) { - i = (c1+1)/3 ; - S6((c1+1)/3,c2) ; - } - if (c1%3 == 0) { - S2(c2,c1/3) ; - } - } - } - if (M >= 2) { - c1 = 3*M-3 ; - j = M-1 ; - S2(M,M-1) ; - } - if (M >= 1) { - c1 = 3*M-2 ; - S3(M) ; - } -} diff --git a/cloog-0.16.3/test/christian.c b/cloog-0.16.3/test/christian.c deleted file mode 100644 index cc3c5d3974ae021b351a31c17c1ec0446188d6cf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/christian.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/christian.cloog by CLooG 0.16.2-5-g3b3bf96 gmp bits in 0.01s. */ -if (N >= 1) { - S1(0,N-1); - for (p=-N+2;p<=N-1;p++) { - if (p >= 1) { - S2(p-1,0); - } - for (i=max(0,p);i<=min(N-1,p+N-2);i++) { - S1(i,-p+i); - S2(i,-p+i+1); - } - if (p <= 0) { - S1(p+N-1,N-1); - } - } - S2(N-1,0); -} diff --git a/cloog-0.16.3/test/christian.cloog b/cloog-0.16.3/test/christian.cloog deleted file mode 100644 index 088977e07de4734b425d2ab24477c83f0e018aa4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/christian.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# =============================================== Global -# Language -C - -# Context -0 3 - -# Parameter names are provided -1 -# Parameter names -N - -# Number of statements -2 - -# =============================================== Statement 1 -# ---------------------------------------------- 1.1 Domain -# Iteration domain -1 -4 5 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 -0 0 0 - -# =============================================== Statement 2 -# ---------------------------------------------- 2.1 Domain -# Iteration domain -1 -4 5 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 -0 0 0 - -#naming for domains -0 - -# ---------------------------------------------- Scatterings -# of Scattering functions -2 - -# Scattering function -1 6 - 0 1 -1 1 0 0 ## p = i-j - -# Scattering function -1 6 - 0 1 -1 1 0 -1 ## p = i-j+1 - - -# we will set the scattering dimension names -1 -p - diff --git a/cloog-0.16.3/test/christian.good.c b/cloog-0.16.3/test/christian.good.c deleted file mode 100644 index 28f578c42a82efee2806ceebbea80aa95612c8f2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/christian.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/christian.cloog by CLooG 0.16.2-5-g3b3bf96 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int N) -{ - /* Scattering iterators. */ - int p; - /* Original iterators. */ - int i, j; - if (N >= 1) { - S1(0,N-1); - for (p=-N+2;p<=N-1;p++) { - if (p >= 1) { - S2(p-1,0); - } - for (i=max(0,p);i<=min(N-1,p+N-2);i++) { - S1(i,-p+i); - S2(i,-p+i+1); - } - if (p <= 0) { - S1(p+N-1,N-1); - } - } - S2(N-1,0); - } -} diff --git a/cloog-0.16.3/test/classen.c b/cloog-0.16.3/test/classen.c deleted file mode 100644 index 3b5b05e800bfc2da6c7db5f3b290673d9b3f5be3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/classen.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/classen.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.45s. */ -if (m >= 1) { - if (m >= 2) { - S1(0,1,1,1); - S2(0,1,1,1,1,1,2,1); - S3(0,1,1,2,1,1,1,2); - S4(0,1,2,2,1,1,2,2); - S8(0,1); - } - if (m == 1) { - S1(0,1,1,1); - S8(0,1); - } - for (glT1=1;glT1<=2*m-4;glT1++) { - if (glT1 <= m-2) { - S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1); - S1(glT1,1,glT1+1,1); - S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1); - S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2); - S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2); - } - if (glT1 >= m) { - S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2); - S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2); - S1(glT1,glT1-m+2,m,glT1-m+2); - S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3); - } - if (glT1 == m-1) { - S5(m-2,1,m-1,1,m-1,1,m,1); - S1(m-1,1,m,1); - S3(m-1,1,m,2,m,1,m,2); - } - for (rp1=max(2,glT1-m+3);rp1<=min(glT1,m-1);rp1++) { - S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1); - S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1); - S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1); - S1(glT1,rp1,glT1-rp1+2,rp1); - S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1); - S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1); - S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1); - } - if (glT1 <= m-2) { - S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1); - S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1); - S1(glT1,glT1+1,1,glT1+1); - S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1); - S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2); - S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2); - } - if (glT1 >= m) { - S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m); - S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m); - S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m); - S1(glT1,m,glT1-m+2,m); - S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m); - } - if (glT1 == m-1) { - S6(m-2,m-1,m-1,m,1,m-1,1,m); - S7(m-2,m-1,m,m,1,m-1,2,m); - S1(m-1,m,1,m); - S2(m-1,m,m,m,1,m,2,m); - } - for (coordP1=max(1,glT1-m+2);coordP1<=min(m,glT1+1);coordP1++) { - S8(glT1,coordP1); - } - } - if (m >= 2) { - if (m >= 3) { - S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1); - S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1); - S1(2*m-3,m-1,m,m-1); - S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m); - } - if (m == 2) { - S5(0,1,1,1,1,1,2,1); - S1(1,1,2,1); - S3(1,1,2,2,2,1,2,2); - } - if (m >= 3) { - S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m); - S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m); - S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m); - S1(2*m-3,m,m-1,m); - } - if (m == 2) { - S6(0,1,1,2,1,1,1,2); - S7(0,1,2,2,1,1,2,2); - S1(1,2,1,2); - } - S2(2*m-3,m,2*m-2,m,m-1,m,m,m); - for (coordP1=m-1;coordP1<=m;coordP1++) { - S8(2*m-3,coordP1); - } - } - if (m >= 2) { - S5(2*m-3,m,2*m-2,m,m-1,m,m,m); - S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m); - S1(2*m-2,m,m,m); - S8(2*m-2,m); - } -} diff --git a/cloog-0.16.3/test/classen.cloog b/cloog-0.16.3/test/classen.cloog deleted file mode 100644 index 06fe3b09d4c509abe6abb2b9a2b059c316c5c354..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/classen.cloog +++ /dev/null @@ -1,233 +0,0 @@ -# created: Fri Mar 4 11:37:56 CET 2005 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context -1 3 - 1 1 0 - - -1 # set parameter names -m - -# --------------------- STATEMENTS -------------------- -8 - -# 1 computation stmts: -1 # one domain per statement -7 7 - 1 0 0 0 0 1 -1 - 1 0 0 -1 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 0 0 -1 1 0 - 1 0 0 0 1 0 -1 - 0 0 -1 0 1 0 0 - 0 -1 0 1 1 0 -2 -0 0 0 # for future options... - - -# 3 prepare-send stmts: -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 0 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 0 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -2 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -4 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -2 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -# 3 prepare-receive stmts: -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 0 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 0 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -2 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -4 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -2 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -# communication statement: -1 # number of domains for communication statement -6 5 - 1 -1 0 2 -2 - 1 1 0 0 0 - 1 1 -1 0 1 - 1 0 -1 1 0 - 1 -1 1 1 -2 - 1 0 1 0 -1 - - -0 0 0 # for future options... - - -1 # set the iterator names -coordT1 coordP1 other1 other2 other3 other4 other5 other6 - -# --------------------- SCATTERING -------------------- -8 # Scattering functions -7 14 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 12 - 0 1 0 0 0 0 0 0 -1 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - - -1 # we set the scattering dimension names -glT1 bl rp1 stmtType local1 local2 local3 - diff --git a/cloog-0.16.3/test/classen.good.c b/cloog-0.16.3/test/classen.good.c deleted file mode 100644 index 5c97c50c594a5a6736caf9599f4e0ffd802ec141..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/classen.good.c +++ /dev/null @@ -1,396 +0,0 @@ -/* Generated from ../../../git/cloog/test/classen.cloog by CLooG 0.14.0-76-gfd78716 gmp bits in 1.73s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(coordT1,coordP1,other1,other2) { hash(1); hash(coordT1); hash(coordP1); hash(other1); hash(other2); } -#define S2(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(2); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S3(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(3); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S4(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(4); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S5(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(5); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S6(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(6); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S7(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(7); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S8(coordT1,coordP1) { hash(8); hash(coordT1); hash(coordP1); } - -void test(int m) -{ - /* Scattering iterators. */ - int glT1, rp1, local1, local2; - /* Original iterators. */ - int coordT1, coordP1, other1, other2, other3, other4, other5, other6; - if (m >= 2) { - S1(0,1,1,1) ; - S2(0,1,1,1,1,1,2,1) ; - S3(0,1,1,2,1,1,1,2) ; - S4(0,1,2,2,1,1,2,2) ; - S8(0,1) ; - } - if (m == 1) { - S1(0,1,1,1) ; - S8(0,1) ; - } - if (m >= 3) { - S5(0,1,1,1,1,1,2,1) ; - S1(1,1,2,1) ; - S2(1,1,2,1,2,1,3,1) ; - S3(1,1,2,2,2,1,2,2) ; - S4(1,1,3,2,2,1,3,2) ; - S6(0,1,1,2,1,1,1,2) ; - S7(0,1,2,2,1,1,2,2) ; - S1(1,2,1,2) ; - S2(1,2,2,2,1,2,2,2) ; - S3(1,2,2,3,1,2,1,3) ; - S4(1,2,3,3,1,2,2,3) ; - for (coordP1=1;coordP1<=2;coordP1++) { - S8(1,coordP1) ; - } - } - for (glT1=2;glT1<=m-2;glT1++) { - coordT1 = glT1-1 ; - other5 = glT1+1 ; - S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1) ; - other1 = glT1+1 ; - S1(glT1,1,glT1+1,1) ; - local1 = glT1+1 ; - other1 = glT1+1 ; - other3 = glT1+1 ; - other5 = glT1+2 ; - S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1) ; - other3 = glT1+1 ; - other5 = glT1+1 ; - S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2) ; - other1 = glT1+2 ; - other3 = glT1+1 ; - other5 = glT1+2 ; - S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2) ; - for (rp1=2;rp1<=glT1;rp1++) { - local1 = glT1-rp1+1 ; - coordT1 = glT1-1 ; - other3 = glT1-rp1+1 ; - other5 = glT1-rp1+2 ; - S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - local2 = rp1-1 ; - coordT1 = glT1-1 ; - coordP1 = rp1-1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+2 ; - S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+3 ; - S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ; - other1 = glT1-rp1+2 ; - S1(glT1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+2 ; - other6 = rp1+1 ; - S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ; - other1 = glT1+2 ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - other6 = rp1+1 ; - S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ; - } - rp1 = glT1+1 ; - coordT1 = glT1-1 ; - other2 = glT1+1 ; - other6 = glT1+1 ; - S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1) ; - other1 = glT1+1 ; - other2 = glT1+1 ; - other6 = glT1+1 ; - S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1) ; - coordP1 = glT1+1 ; - other2 = glT1+1 ; - S1(glT1,glT1+1,1,glT1+1) ; - local2 = glT1+1 ; - coordP1 = glT1+1 ; - other1 = glT1+1 ; - other2 = glT1+1 ; - other4 = glT1+1 ; - other6 = glT1+1 ; - S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1) ; - other2 = glT1+2 ; - other4 = glT1+1 ; - other6 = glT1+2 ; - S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2) ; - other1 = glT1+2 ; - other2 = glT1+2 ; - other4 = glT1+1 ; - other6 = glT1+2 ; - S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2) ; - for (coordP1=1;coordP1<=glT1+1;coordP1++) { - S8(glT1,coordP1) ; - } - } - if (m >= 3) { - glT1 = m-1 ; - local1 = m-1 ; - coordT1 = m-2 ; - other1 = m-1 ; - other3 = m-1 ; - S5(m-2,1,m-1,1,m-1,1,m,1) ; - coordT1 = m-1 ; - S1(m-1,1,m,1) ; - coordT1 = m-1 ; - S3(m-1,1,m,2,m,1,m,2) ; - for (rp1=2;rp1<=m-1;rp1++) { - local1 = -rp1+m ; - coordT1 = m-2 ; - other1 = m-1 ; - other3 = -rp1+m ; - other5 = -rp1+m+1 ; - S5(m-2,rp1,m-1,rp1,-rp1+m,rp1,-rp1+m+1,rp1) ; - local1 = -rp1+m+1 ; - local2 = rp1-1 ; - coordT1 = m-2 ; - coordP1 = rp1-1 ; - other1 = m-1 ; - other3 = -rp1+m+1 ; - other4 = rp1-1 ; - other5 = -rp1+m+1 ; - S6(m-2,rp1-1,m-1,rp1,-rp1+m+1,rp1-1,-rp1+m+1,rp1) ; - other3 = -rp1+m+1 ; - other4 = rp1-1 ; - other5 = -rp1+m+2 ; - S7(m-2,rp1-1,m,rp1,-rp1+m+1,rp1-1,-rp1+m+2,rp1) ; - coordT1 = m-1 ; - other1 = -rp1+m+1 ; - S1(m-1,rp1,-rp1+m+1,rp1) ; - local1 = -rp1+m+1 ; - coordT1 = m-1 ; - other3 = -rp1+m+1 ; - other5 = -rp1+m+2 ; - S2(m-1,rp1,m,rp1,-rp1+m+1,rp1,-rp1+m+2,rp1) ; - other2 = rp1+1 ; - other3 = -rp1+m+1 ; - other5 = -rp1+m+1 ; - other6 = rp1+1 ; - S3(m-1,rp1,m,rp1+1,-rp1+m+1,rp1,-rp1+m+1,rp1+1) ; - other1 = m+1 ; - other2 = rp1+1 ; - other3 = -rp1+m+1 ; - other5 = -rp1+m+2 ; - other6 = rp1+1 ; - S4(m-1,rp1,m+1,rp1+1,-rp1+m+1,rp1,-rp1+m+2,rp1+1) ; - } - local2 = m-1 ; - coordT1 = m-2 ; - coordP1 = m-1 ; - other1 = m-1 ; - other4 = m-1 ; - S6(m-2,m-1,m-1,m,1,m-1,1,m) ; - other4 = m-1 ; - S7(m-2,m-1,m,m,1,m-1,2,m) ; - coordT1 = m-1 ; - S1(m-1,m,1,m) ; - coordT1 = m-1 ; - S2(m-1,m,m,m,1,m,2,m) ; - coordT1 = m-1 ; - for (coordP1=1;coordP1<=m;coordP1++) { - S8(m-1,coordP1) ; - } - } - for (glT1=m;glT1<=2*m-4;glT1++) { - rp1 = glT1-m+2 ; - local1 = m-1 ; - local2 = glT1-m+2 ; - coordT1 = glT1-1 ; - coordP1 = glT1-m+2 ; - other2 = glT1-m+2 ; - other3 = m-1 ; - other4 = glT1-m+2 ; - other6 = glT1-m+2 ; - S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2) ; - local2 = glT1-m+1 ; - coordT1 = glT1-1 ; - coordP1 = glT1-m+1 ; - other2 = glT1-m+2 ; - other4 = glT1-m+1 ; - other6 = glT1-m+2 ; - S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2) ; - coordP1 = glT1-m+2 ; - other2 = glT1-m+2 ; - S1(glT1,glT1-m+2,m,glT1-m+2) ; - local2 = glT1-m+2 ; - coordP1 = glT1-m+2 ; - other1 = glT1+1 ; - other2 = glT1-m+3 ; - other4 = glT1-m+2 ; - other6 = glT1-m+3 ; - S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3) ; - for (rp1=glT1-m+3;rp1<=m-1;rp1++) { - local1 = glT1-rp1+1 ; - coordT1 = glT1-1 ; - other3 = glT1-rp1+1 ; - other5 = glT1-rp1+2 ; - S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - local2 = rp1-1 ; - coordT1 = glT1-1 ; - coordP1 = rp1-1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+2 ; - S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+3 ; - S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ; - other1 = glT1-rp1+2 ; - S1(glT1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+2 ; - other6 = rp1+1 ; - S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ; - other1 = glT1+2 ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - other6 = rp1+1 ; - S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ; - } - local1 = glT1-m+1 ; - coordT1 = glT1-1 ; - other3 = glT1-m+1 ; - other5 = glT1-m+2 ; - S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m) ; - local1 = glT1-m+2 ; - local2 = m-1 ; - coordT1 = glT1-1 ; - coordP1 = m-1 ; - other3 = glT1-m+2 ; - other4 = m-1 ; - other5 = glT1-m+2 ; - S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m) ; - other1 = glT1+1 ; - other3 = glT1-m+2 ; - other4 = m-1 ; - other5 = glT1-m+3 ; - S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m) ; - other1 = glT1-m+2 ; - S1(glT1,m,glT1-m+2,m) ; - local1 = glT1-m+2 ; - other1 = glT1+1 ; - other3 = glT1-m+2 ; - other5 = glT1-m+3 ; - S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m) ; - for (coordP1=glT1-m+2;coordP1<=m;coordP1++) { - S8(glT1,coordP1) ; - } - } - if (m >= 3) { - glT1 = 2*m-3 ; - rp1 = m-1 ; - local1 = m-1 ; - local2 = m-1 ; - coordT1 = 2*m-4 ; - coordP1 = m-1 ; - other1 = 2*m-3 ; - other2 = m-1 ; - other3 = m-1 ; - other4 = m-1 ; - other6 = m-1 ; - S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1) ; - local2 = m-2 ; - coordT1 = 2*m-4 ; - coordP1 = m-2 ; - other1 = 2*m-3 ; - other2 = m-1 ; - other4 = m-2 ; - other6 = m-1 ; - S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1) ; - coordT1 = 2*m-3 ; - coordP1 = m-1 ; - other2 = m-1 ; - S1(2*m-3,m-1,m,m-1) ; - local2 = m-1 ; - coordT1 = 2*m-3 ; - coordP1 = m-1 ; - other1 = 2*m-2 ; - other4 = m-1 ; - S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ; - local1 = m-2 ; - coordT1 = 2*m-4 ; - other1 = 2*m-3 ; - other3 = m-2 ; - other5 = m-1 ; - S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m) ; - local1 = m-1 ; - local2 = m-1 ; - coordT1 = 2*m-4 ; - coordP1 = m-1 ; - other1 = 2*m-3 ; - other3 = m-1 ; - other4 = m-1 ; - other5 = m-1 ; - S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m) ; - other1 = 2*m-2 ; - other3 = m-1 ; - other4 = m-1 ; - S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m) ; - coordT1 = 2*m-3 ; - other1 = m-1 ; - S1(2*m-3,m,m-1,m) ; - local1 = m-1 ; - coordT1 = 2*m-3 ; - other1 = 2*m-2 ; - other3 = m-1 ; - S2(2*m-3,m,2*m-2,m,m-1,m,m,m) ; - coordT1 = 2*m-3 ; - for (coordP1=m-1;coordP1<=m;coordP1++) { - S8(2*m-3,coordP1) ; - } - } - if (m == 2) { - S5(0,1,1,1,1,1,2,1) ; - S1(1,1,2,1) ; - S3(1,1,2,2,2,1,2,2) ; - S6(0,1,1,2,1,1,1,2) ; - S7(0,1,2,2,1,1,2,2) ; - S1(1,2,1,2) ; - S2(1,2,2,2,1,2,2,2) ; - for (coordP1=1;coordP1<=2;coordP1++) { - S8(1,coordP1) ; - } - } - if (m >= 2) { - glT1 = 2*m-2 ; - local1 = m-1 ; - coordT1 = 2*m-3 ; - other1 = 2*m-2 ; - other3 = m-1 ; - S5(2*m-3,m,2*m-2,m,m-1,m,m,m) ; - local2 = m-1 ; - coordT1 = 2*m-3 ; - coordP1 = m-1 ; - other1 = 2*m-2 ; - other4 = m-1 ; - S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ; - coordT1 = 2*m-2 ; - S1(2*m-2,m,m,m) ; - coordT1 = 2*m-2 ; - S8(2*m-2,m) ; - } -} diff --git a/cloog-0.16.3/test/classen2.c b/cloog-0.16.3/test/classen2.c deleted file mode 100644 index 2afd378e6b0c10ddd1e468453f80b84fb627bef5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/classen2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/classen2.cloog by CLooG 0.14.0-271-gaa1e292 gmp bits in 0.14s. */ -if ((M >= 2) && (N >= 3) && (outerProcTileScatter1 >= outerProcTileScatter2) && (5*outerProcTileScatter1 <= M+2*N-4) && (5*outerProcTileScatter1 <= 5*outerProcTileScatter2+N+2) && (outerProcTileScatter2 >= 0) && (5*outerProcTileScatter2 <= M+N-2) && (outerTimeTileScatter >= outerProcTileScatter1) && (outerTimeTileScatter <= 2*outerProcTileScatter1) && (outerTimeTileScatter <= outerProcTileScatter1+outerProcTileScatter2+1) && (5*outerTimeTileScatter <= 2*M+2*N-6) && (5*outerTimeTileScatter <= 5*outerProcTileScatter1+M+2) && (5*outerTimeTileScatter >= 10*outerProcTileScatter1-2*N-2) && (5*outerTimeTileScatter <= 5*outerProcTileScatter2+M+N) && (5*outerTimeTileScatter >= 10*outerProcTileScatter2-N-3) && (5*outerTimeTileScatter <= 10*outerProcTileScatter2+N+3) && (5*outerTimeTileScatter >= 5*outerProcTileScatter1+5*outerProcTileScatter2-N-4)) { - for (compScatter1=max(max(max(max(max(4,5*outerTimeTileScatter),5*outerProcTileScatter2+1),5*outerProcTileScatter1+5*outerProcTileScatter2-N),10*outerProcTileScatter1-2*N+2),10*outerProcTileScatter2-N+1);compScatter1<=min(min(min(min(min(5*outerTimeTileScatter+4,2*M+2*N-6),5*outerProcTileScatter1+M+2),5*outerProcTileScatter1+5*outerProcTileScatter2+5),5*outerProcTileScatter2+M+N),10*outerProcTileScatter2+N+3);compScatter1++) { - for (compScatter2=max(max(max(max(ceild(compScatter1+4,2),5*outerProcTileScatter1),5*outerProcTileScatter2+1),compScatter1-M+2),compScatter1-5*outerProcTileScatter2-1);compScatter2<=min(min(min(min(floord(compScatter1+2*N-2,2),compScatter1),5*outerProcTileScatter1+4),compScatter1-5*outerProcTileScatter2+N),5*outerProcTileScatter2+N+2);compScatter2++) { - for (compScatter3=max(max(5*outerProcTileScatter2,compScatter1-compScatter2+3),compScatter2-N+2);compScatter3<=min(min(compScatter2-1,5*outerProcTileScatter2+4),compScatter1-compScatter2+N);compScatter3++) { - S1(compScatter1-compScatter2+1,-compScatter1+compScatter2+compScatter3-2,compScatter2-compScatter3,compScatter1,compScatter2,compScatter3); - } - } - } -} diff --git a/cloog-0.16.3/test/classen2.cloog b/cloog-0.16.3/test/classen2.cloog deleted file mode 100644 index dc12884b48a18c64ea5327421cf993bd40723c10..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/classen2.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# created: Wed Mar 17 17:37:13 CET 2010 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no parameter, so always true) -1 7 - 1 0 0 0 0 0 0 - - -1 # set parameter names -outerTimeTileScatter outerProcTileScatter1 outerProcTileScatter2 M N - -# --------------------- STATEMENTS -------------------- -1 - -1 # domains per statement -20 13 - 1 2 1 1 -1 0 0 0 0 0 0 0 0 - 1 1 1 1 0 -1 0 0 0 0 0 0 1 - 1 1 1 0 0 0 -1 0 0 0 0 0 1 - 1 -2 -1 -1 1 0 0 0 0 0 0 0 0 - 1 -1 -1 -1 0 1 0 0 0 0 0 0 -1 - 1 -1 -1 0 0 0 1 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 0 0 0 0 0 0 0 1 -2 - 1 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 0 0 0 0 0 0 1 -2 - 1 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 0 0 0 0 1 0 -1 - 1 0 0 0 1 0 0 -5 0 0 0 0 0 - 1 0 0 0 0 1 0 0 -5 0 0 0 0 - 1 0 0 0 0 0 1 0 0 -5 0 0 0 - 1 0 0 0 0 0 -1 0 0 5 0 0 4 - 1 0 0 0 0 -1 0 0 5 0 0 0 4 - 1 0 0 0 -1 0 0 5 0 0 0 0 4 - 1 0 0 0 0 0 0 0 0 0 0 1 -3 - 1 0 0 0 0 0 0 0 0 0 1 0 -2 - - -0 0 0 # for future options... - - - -1 # set the iterator names -compIter1 compIter2 compIter3 compIter4 compIter5 compIter6 - -# --------------------- SCATTERING -------------------- -1 # Scattering functions -3 16 - 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - - -1 # we set the scattering dimension names -compScatter1 compScatter2 compScatter3 - diff --git a/cloog-0.16.3/test/classen2.good.c b/cloog-0.16.3/test/classen2.good.c deleted file mode 100644 index 6aa11e4c06b09ceb3248c86b77cb1567ed6cdea9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/classen2.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/classen2.cloog by CLooG 0.14.0-271-gaa1e292 gmp bits in 0.13s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(compIter1,compIter2,compIter3,compIter4,compIter5,compIter6) { hash(1); hash(compIter1); hash(compIter2); hash(compIter3); hash(compIter4); hash(compIter5); hash(compIter6); } - -void test(int outerTimeTileScatter, int outerProcTileScatter1, int outerProcTileScatter2, int M, int N) -{ - /* Scattering iterators. */ - int compScatter1, compScatter2, compScatter3; - /* Original iterators. */ - int compIter1, compIter2, compIter3, compIter4, compIter5, compIter6; - if ((M >= 2) && (N >= 3) && (outerProcTileScatter1 >= outerProcTileScatter2) && (5*outerProcTileScatter1 <= M+2*N-4) && (5*outerProcTileScatter1 <= 5*outerProcTileScatter2+N+2) && (outerProcTileScatter2 >= 0) && (5*outerProcTileScatter2 <= M+N-2) && (outerTimeTileScatter >= outerProcTileScatter1) && (outerTimeTileScatter <= 2*outerProcTileScatter1) && (outerTimeTileScatter <= outerProcTileScatter1+outerProcTileScatter2+1) && (5*outerTimeTileScatter <= 2*M+2*N-6) && (5*outerTimeTileScatter <= 5*outerProcTileScatter1+M+2) && (5*outerTimeTileScatter >= 10*outerProcTileScatter1-2*N-2) && (5*outerTimeTileScatter <= 5*outerProcTileScatter2+M+N) && (5*outerTimeTileScatter >= 10*outerProcTileScatter2-N-3) && (5*outerTimeTileScatter <= 10*outerProcTileScatter2+N+3) && (5*outerTimeTileScatter >= 5*outerProcTileScatter1+5*outerProcTileScatter2-N-4)) { - for (compScatter1=max(max(max(max(max(4,5*outerTimeTileScatter),5*outerProcTileScatter2+1),5*outerProcTileScatter1+5*outerProcTileScatter2-N),10*outerProcTileScatter1-2*N+2),10*outerProcTileScatter2-N+1);compScatter1<=min(min(min(min(min(5*outerTimeTileScatter+4,2*M+2*N-6),5*outerProcTileScatter1+M+2),5*outerProcTileScatter1+5*outerProcTileScatter2+5),5*outerProcTileScatter2+M+N),10*outerProcTileScatter2+N+3);compScatter1++) { - for (compScatter2=max(max(max(max(ceild(compScatter1+4,2),5*outerProcTileScatter1),5*outerProcTileScatter2+1),compScatter1-M+2),compScatter1-5*outerProcTileScatter2-1);compScatter2<=min(min(min(min(floord(compScatter1+2*N-2,2),compScatter1),5*outerProcTileScatter1+4),compScatter1-5*outerProcTileScatter2+N),5*outerProcTileScatter2+N+2);compScatter2++) { - for (compScatter3=max(max(5*outerProcTileScatter2,compScatter1-compScatter2+3),compScatter2-N+2);compScatter3<=min(min(compScatter2-1,5*outerProcTileScatter2+4),compScatter1-compScatter2+N);compScatter3++) { - S1(compScatter1-compScatter2+1,-compScatter1+compScatter2+compScatter3-2,compScatter2-compScatter3,compScatter1,compScatter2,compScatter3); - } - } - } - } -} diff --git a/cloog-0.16.3/test/constant.c b/cloog-0.16.3/test/constant.c deleted file mode 100644 index 3a6378ec263e8a8e12e0d247c51694d371bfc7de..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/constant.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/constant.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.01s. */ -for (c2=0;c2<=min(1023,M+1024);c2++) { - S1(c2); - S3(c2); -} -for (c2=max(0,M+1025);c2<=1023;c2++) { - S2(c2); - S3(c2); -} -for (c1=0;c1<=min(1023,M+1024);c1++) { - S4(c1); - S6(c1); -} -for (c1=max(0,M+1025);c1<=1023;c1++) { - S5(c1); - S6(c1); -} diff --git a/cloog-0.16.3/test/constant.cloog b/cloog-0.16.3/test/constant.cloog deleted file mode 100644 index d251b1b73332535c5b2a3790e1b2d22c8d25aebb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/constant.cloog +++ /dev/null @@ -1,128 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -0 3 - -0 # Parameter name(s) - -# Statement number: -6 - -# Iteration domain of statement 1 (Stmt_if.then). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 -1 1 1024 - -0 0 0 # For future options. - -# Iteration domain of statement 2 (Stmt_if.else). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 1 -1 -1025 - -0 0 0 # For future options. - -# Iteration domain of statement 3 (Stmt_if.end). -1 - -2 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 - -0 0 0 # For future options. - -# Iteration domain of statement 1 (Stmt_if.then). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 -1 1 1024 - -0 0 0 # For future options. - -# Iteration domain of statement 2 (Stmt_if.else). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 1 -1 -1025 - -0 0 0 # For future options. - -# Iteration domain of statement 3 (Stmt_if.end). -1 - -2 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# --------------------- SCATTERING -------------------- -6 # Scattering functions - -# Scattering of statement 1 (Stmt_if.then). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 0 -0 0 1 0 -1 0 0 -0 1 0 0 0 0 1 - -# Scattering of statement 2 (Stmt_if.else). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -1 -0 0 1 0 -1 0 0 -0 1 0 0 0 0 1 - -# Scattering of statement 3 (Stmt_if.end). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -2 -0 0 1 0 -1 0 0 -0 1 0 0 0 0 1 - -# Scattering of statement 1 (Stmt_if.then). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 0 -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 - -# Scattering of statement 2 (Stmt_if.else). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -1 -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 - -# Scattering of statement 3 (Stmt_if.end). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -2 -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 - -0 # Scattering dimension name(s) diff --git a/cloog-0.16.3/test/constant.good.c b/cloog-0.16.3/test/constant.good.c deleted file mode 100644 index c94fc44de141b2efa618796f8cac4b9c79def5f8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/constant.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/constant.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } -#define S3(i) { hash(3); hash(i); } -#define S4(i) { hash(4); hash(i); } -#define S5(i) { hash(5); hash(i); } -#define S6(i) { hash(6); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i; - for (c2=0;c2<=min(1023,M+1024);c2++) { - S1(c2); - S3(c2); - } - for (c2=max(0,M+1025);c2<=1023;c2++) { - S2(c2); - S3(c2); - } - for (c1=0;c1<=min(1023,M+1024);c1++) { - S4(c1); - S6(c1); - } - for (c1=max(0,M+1025);c1<=1023;c1++) { - S5(c1); - S6(c1); - } -} diff --git a/cloog-0.16.3/test/constbound.c b/cloog-0.16.3/test/constbound.c deleted file mode 100644 index c68b1c9350781e27700799b42dcc928b3c648912..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/constbound.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/constbound.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.01s. */ -for (t0=0;t0<=199;t0++) { - for (t2=50*t0;t2<=50*t0+24;t2++) { - for (t3=0;t3<=t2;t3++) { - S1(t0,t2,t3); - } - } - for (t2=50*t0+25;t2<=50*t0+49;t2++) { - for (t3=0;t3<=t2;t3++) { - S2(t0,t2,t3); - } - } -} diff --git a/cloog-0.16.3/test/constbound.cloog b/cloog-0.16.3/test/constbound.cloog deleted file mode 100644 index 78ac9635d0ad7218de68b3aba5ab23051181426c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/constbound.cloog +++ /dev/null @@ -1,53 +0,0 @@ -# CLooG script generated automatically by PLUTO -# language: C -c - -# Context -0 2 - -1 - - -# Number of statements -2 - -1 # of domains -6 5 -1 0 1 0 0 -1 0 -1 0 9999 -1 0 0 1 0 -1 0 1 -1 0 -1 -50 1 0 0 -1 50 -1 0 24 -0 0 0 - -1 -6 5 -1 0 1 0 0 -1 0 -1 0 9999 -1 0 0 1 0 -1 0 1 -1 0 -1 -50 1 0 -25 -1 50 -1 0 49 -0 0 0 - -0 - -# of scattering functions -2 - -4 9 -0 1 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 -0 0 0 1 0 0 -1 0 0 -0 0 0 0 1 0 0 -1 0 - -4 9 -0 1 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 -1 -0 0 0 1 0 0 -1 0 0 -0 0 0 0 1 0 0 -1 0 - -# we will set the scattering dimension names -4 -t0 t1 t2 t3 diff --git a/cloog-0.16.3/test/constbound.good.c b/cloog-0.16.3/test/constbound.good.c deleted file mode 100644 index 30704dd3052002abaad6802c03c10a0ce5e23f30..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/constbound.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/constbound.cloog by CLooG 0.14.0-170-g72daac3 64 bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test() -{ - /* Scattering iterators. */ - int t0, t2, t3; - /* Original iterators. */ - int i, j, k; - for (t0=0;t0<=199;t0++) { - for (t2=max(0,50*t0);t2<=50*t0+24;t2++) { - for (t3=0;t3<=t2;t3++) { - S1(t0,t2,t3); - } - } - for (t2=50*t0+25;t2<=min(9999,50*t0+49);t2++) { - for (t3=0;t3<=t2;t3++) { - S2(t0,t2,t3); - } - } - } -} diff --git a/cloog-0.16.3/test/darte.c b/cloog-0.16.3/test/darte.c deleted file mode 100644 index e185b7af6545855c42827fdec8231a08fe1ce85e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/darte.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/darte.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.05s. */ -if (n >= 1) { - for (t3=n+3;t3<=3*n+1;t3++) { - if ((t3+n+1)%2 == 0) { - S1(1,n,(t3-n-1)/2); - } - } - for (t1=-n+2;t1<=n-1;t1++) { - if (t1 >= 2) { - for (t3=t1+4;t3<=t1+2*n+2;t3++) { - if ((t1+t3)%2 == 0) { - S1(t1+1,1,(-t1+t3-2)/2); - } - } - } - for (t2=max(-t1+2,t1+2);t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - if ((t1+t3)%2 == 0) { - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); - } - } - } - } - for (t2=max(-t1+5,t1+3);t2<=min(-t1+2*n,t1+2*n);t2++) { - for (t3=1;t3<=min(n,t2+1);t3++) { - if ((t1+t2+1)%2 == 0) { - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); - } - if ((t1+t2)%2 == 0) { - if ((t1+t3)%2 == 0) { - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); - } - } - } - for (t3=max(n+1,t2+2);t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - if ((t1+t3)%2 == 0) { - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); - } - } - } - } - if (t1 <= -1) { - for (t3=1;t3<=n;t3++) { - S2(t1+n-1,n,t3); - } - } - for (t2=-t1+2*n+1;t2<=min(-t1+2*n+3,t1+2*n+1);t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); - } - } - } - } - for (t3=1;t3<=n;t3++) { - S2(n,1,t3); - } -} diff --git a/cloog-0.16.3/test/darte.cloog b/cloog-0.16.3/test/darte.cloog deleted file mode 100644 index a853691d7e6678122b1d8964eb1a00ee2679227e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/darte.cloog +++ /dev/null @@ -1,52 +0,0 @@ -# language: C -c - -# parameters n m -1 3 -# n 1 -1 0 0 -1 -n - -2 # Number of statements - -1 -# S1 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# S2 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 -# Scattering functions -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 0 -0 0 1 0 -1 -1 0 0 0 -0 0 0 1 -1 -1 -2 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 -1 -0 0 1 0 -1 -1 0 0 -2 -0 0 0 1 0 0 -1 0 0 -1 -t1 t2 t3 diff --git a/cloog-0.16.3/test/darte.good.c b/cloog-0.16.3/test/darte.good.c deleted file mode 100644 index 298c24fe5e55b54f8184cc4bea40a79bb43d4e40..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/darte.good.c +++ /dev/null @@ -1,449 +0,0 @@ -/* Generated from ../../../git/cloog/test/darte.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int n) -{ - /* Scattering iterators. */ - int t1, t2, t3; - /* Original iterators. */ - int i, j, k; - if (n >= 1) { - t1 = -n+1 ; - t2 = n+1 ; - for (t3=n+3;t3<=3*n+1;t3++) { - if ((t3+n+1)%2 == 0) { - k = (t3-n-1)/2 ; - S1(1,n,(t3-n-1)/2) ; - } - } - } - if ((n >= 2) && (n <= 2)) { - t1 = -n+2 ; - for (t2=-n+4;t2<=3*n-2;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t2+n)%2 == 0) { - i = (t2-n+2)/2 ; - j = (t2+n-2)/2 ; - if ((t3+n)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = n+3 ; - for (t3=1;t3<=n;t3++) { - S2(1,n,t3) ; - } - } - if (n >= 3) { - t1 = -n+2 ; - for (t2=n;t2<=n+2;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t2+n)%2 == 0) { - i = (t2-n+2)/2 ; - j = (t2+n-2)/2 ; - if ((t3+n)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = n+3 ; - for (t3=1;t3<=n;t3++) { - S2(1,n,t3) ; - } - } - for (t1=ceild(-2*n+5,2);t1<=min(-n+6,-1);t1++) { - for (t2=-t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = t1+2*n+1 ; - for (t3=1;t3<=n;t3++) { - i = t1+n-1 ; - S2(t1+n-1,n,t3) ; - } - } - if (n == 2) { - for (t3=5;t3<=7;t3++) { - if ((t3+1)%2 == 0) { - k = (t3-3)/2 ; - S1(2,1,(t3-3)/2) ; - } - } - for (t2=4;t2<=6;t2++) { - for (t3=1;t3<=2;t3++) { - if (t2%2 == 0) { - i = (t2-2)/2 ; - j = (t2-2)/2 ; - S2((t2-2)/2,(t2-2)/2,t3) ; - } - } - } - } - for (t1=-n+7;t1<=-1;t1++) { - for (t2=-t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=n-2;t2++) { - for (t3=1;t3<=t2+1;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - for (t3=n+1;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=n-1;t2<=t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = t1+2*n+1 ; - for (t3=1;t3<=n;t3++) { - i = t1+n-1 ; - S2(t1+n-1,n,t3) ; - } - } - if (n >= 3) { - for (t1=0;t1<=min(1,-n+6);t1++) { - for (t2=t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - } - for (t1=max(-n+7,0);t1<=1;t1++) { - for (t2=t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=n-2;t2++) { - for (t3=1;t3<=t2+1;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - for (t3=n+1;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=n-1;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - for (t1=2;t1<=n-5;t1++) { - t2 = t1+2 ; - for (t3=t1+4;t3<=t1+2*n+2;t3++) { - i = t1+1 ; - if ((t1+t3)%2 == 0) { - k = (-t1+t3-2)/2 ; - S1(t1+1,1,(-t1+t3-2)/2) ; - } - } - for (t2=t1+3;t2<=n-2;t2++) { - for (t3=1;t3<=t2+1;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - for (t3=n+1;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=n-1;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - for (t1=max(2,n-4);t1<=floord(2*n-3,2);t1++) { - t2 = t1+2 ; - for (t3=t1+4;t3<=t1+2*n+2;t3++) { - i = t1+1 ; - if ((t1+t3)%2 == 0) { - k = (-t1+t3-2)/2 ; - S1(t1+1,1,(-t1+t3-2)/2) ; - } - } - for (t2=t1+3;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - if (n >= 3) { - t1 = n-1 ; - t2 = n+1 ; - for (t3=n+3;t3<=3*n+1;t3++) { - if ((t3+n+1)%2 == 0) { - k = (t3-n-1)/2 ; - S1(n,1,(t3-n-1)/2) ; - } - } - for (t2=n+2;t2<=n+4;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t2+n)%2 == 0) { - i = (t2+n-4)/2 ; - j = (t2-n)/2 ; - S2((t2+n-4)/2,(t2-n)/2,t3) ; - } - } - } - } - if (n >= 1) { - t2 = n+3 ; - for (t3=1;t3<=n;t3++) { - S2(n,1,t3) ; - } - } -} diff --git a/cloog-0.16.3/test/dartef.cloog b/cloog-0.16.3/test/dartef.cloog deleted file mode 100644 index 14454e28101b9803d457804debde9bd777efb6c2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dartef.cloog +++ /dev/null @@ -1,52 +0,0 @@ -# language: FORTRAN -f - -# parameters n m -1 3 -# n 1 -1 0 0 -1 -n - -2 # Number of statements - -1 -# S1 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# S2 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 -# Scattering functions -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 0 -0 0 1 0 -1 -1 0 0 0 -0 0 0 1 -1 -1 -2 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 -1 -0 0 1 0 -1 -1 0 0 -2 -0 0 0 1 0 0 -1 0 0 -1 -t1 t2 t3 diff --git a/cloog-0.16.3/test/dartef.f b/cloog-0.16.3/test/dartef.f deleted file mode 100644 index 50e107377485c3fe936d8bb0d1e79ecc2b6dccd5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dartef.f +++ /dev/null @@ -1,65 +0,0 @@ -! Generated from /home/skimo/git/cloog/test/dartef.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.08s. -IF (n >= 1) THEN - DO t3=n+3, 3*n+1 - IF (MOD(t3+n+1, 2) == 0) THEN - S1(1,n,(t3-n-1)/2) - END IF - END DO - DO t1=-n+2, n-1 - IF (t1 >= 2) THEN - DO t3=t1+4, t1+2*n+2 - IF (MOD(t1+t3, 2) == 0) THEN - S1(t1+1,1,(-t1+t3-2)/2) - END IF - END DO - END IF - DO t2=MAX(-t1+2,t1+2), -t1+4 - DO t3=t2+2, t2+2*n - IF (MOD(t1+t2, 2) == 0) THEN - IF (MOD(t1+t3, 2) == 0) THEN - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) - END IF - END IF - END DO - END DO - DO t2=MAX(-t1+5,t1+3), MIN(-t1+2*n,t1+2*n) - DO t3=1, MIN(n,t2+1) - IF (MOD(t1+t2+1, 2) == 0) THEN - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) - END IF - END DO - DO t3=t2+2, n - IF (MOD(t1+t2+1, 2) == 0) THEN - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) - END IF - IF (MOD(t1+t2, 2) == 0) THEN - IF (MOD(t1+t3, 2) == 0) THEN - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) - END IF - END IF - END DO - DO t3=MAX(n+1,t2+2), t2+2*n - IF (MOD(t1+t2, 2) == 0) THEN - IF (MOD(t1+t3, 2) == 0) THEN - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) - END IF - END IF - END DO - END DO - IF (t1 <= -1) THEN - DO t3=1, n - S2(t1+n-1,n,t3) - END DO - END IF - DO t2=-t1+2*n+1, MIN(-t1+2*n+3,t1+2*n+1) - DO t3=1, n - IF (MOD(t1+t2+1, 2) == 0) THEN - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) - END IF - END DO - END DO - END DO - DO t3=1, n - S2(n,1,t3) - END DO -END IF diff --git a/cloog-0.16.3/test/dealII.c b/cloog-0.16.3/test/dealII.c deleted file mode 100644 index 200b257745bec2a5b4370c0115fd1b2b899a86ba..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dealII.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from ../../../git/cloog/test/dealII.cloog by CLooG 0.14.0-270-g7ee1261 gmp bits in 0.01s. */ -for (scat_0=0;scat_0<=min(T_66,T_2-1);scat_0++) { - S1(scat_0); - S2(scat_0); -} -if ((T_2 == 0) && (T_67 == 0)) { - S1(0); -} -for (scat_0=max(0,T_66+1);scat_0<=T_2-1;scat_0++) { - S1(scat_0); -} -for (scat_0=T_2;scat_0<=min(T_66,T_67-1);scat_0++) { - S2(scat_0); -} diff --git a/cloog-0.16.3/test/dealII.cloog b/cloog-0.16.3/test/dealII.cloog deleted file mode 100644 index 1c648f4142bdbb8fae74b7b244f5a25c14c8ddc0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dealII.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogProgram data -# structure. WARNING: it is highly dangerous and MAY be correct ONLY if -# - it has been dumped before loop generation. -# - option -noscalars is used (it removes scalar dimensions otherwise) -# - option -l is at least the original scattering dimension number -# ASK THE AUTHOR IF YOU *NEED* SOMETHING MORE ROBUST -# Language: C -c - -# Context (3 parameter(s)): -4 5 -1 -1 0 0 4 -1 1 0 0 0 -1 0 -1 0 4 -1 0 1 0 0 -1 # Parameter name(s) -T_2 T_67 T_66 - -# Statement number: -2 - -# Iteration domain of statement 1. -2 - -2 6 -1 -1 1 0 0 -1 -1 1 0 0 0 0 - -2 6 -1 -1 0 -1 0 0 -1 1 0 0 0 0 -0 0 0 # For future options. - -# Iteration domain of statement 2. -2 - -3 6 -1 -1 1 0 0 -1 -1 1 0 0 0 0 -1 -1 0 0 1 0 - -3 6 -1 -1 0 1 0 -1 -1 1 0 0 0 0 -1 -1 0 0 1 0 -0 0 0 # For future options. - -1 # Iterator name(s) -scat_0 scat_1 scat_2 git_0 - -# No scattering functions. -0 - diff --git a/cloog-0.16.3/test/dealII.good.c b/cloog-0.16.3/test/dealII.good.c deleted file mode 100644 index 9a220ffd3bcec1145b821fc34ad9ed039d386443..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dealII.good.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated from ../../../git/cloog/test/dealII.cloog by CLooG 0.14.0-270-g7ee1261 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(scat_0) { hash(1); hash(scat_0); } -#define S2(scat_0) { hash(2); hash(scat_0); } - -void test(int T_2, int T_67, int T_66) -{ - /* Original iterators. */ - int scat_0; - for (scat_0=0;scat_0<=min(T_66,T_2-1);scat_0++) { - S1(scat_0); - S2(scat_0); - } - if ((T_2 == 0) && (T_67 == 0)) { - S1(0); - } - for (scat_0=max(0,T_66+1);scat_0<=T_2-1;scat_0++) { - S1(scat_0); - } - for (scat_0=T_2;scat_0<=min(T_66,T_67-1);scat_0++) { - S2(scat_0); - } -} diff --git a/cloog-0.16.3/test/donotsimp.c b/cloog-0.16.3/test/donotsimp.c deleted file mode 100644 index bccb8b43d31383687f502afb9aedde32e7ab61f3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/donotsimp.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/donotsimp.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (c2=1;c2<=10;c2++) { - for (c4=1;c4<=c2;c4++) { - S1(c2,c4) ; - } - for (c4=11;c4<=M;c4++) { - S2(c2,c4) ; - } -} diff --git a/cloog-0.16.3/test/donotsimp.cloog b/cloog-0.16.3/test/donotsimp.cloog deleted file mode 100644 index 6450917e4ce99e58e58a79832befc7bb942fccb1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/donotsimp.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# Language -c - -# Context - -# {n>=20} - 1 3 - 1 1 -20 -0 - -# Number of statments -2 - -1 -# {i,j | 0<=i<=10 1<=j<=i} - - 4 5 - 1 1 0 0 -1 - 1 -1 0 0 10 - 1 0 1 0 -1 - 1 1 -1 0 0 -0 0 0 - -1 -# {i,j | 0<=i<=10 11<=j<=n} - - 4 5 - 1 1 0 0 -1 - 1 -1 0 0 10 - 1 0 1 0 -11 - 1 0 -1 1 0 -0 0 0 - -0 -# Scattering functions -2 - - 5 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - - 5 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - - -0 - diff --git a/cloog-0.16.3/test/donotsimp.good.c b/cloog-0.16.3/test/donotsimp.good.c deleted file mode 100644 index 8e45ab82a6541e0340b3a57ff733d9933a3fa587..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/donotsimp.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/donotsimp.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=10;c2++) { - for (c4=1;c4<=c2;c4++) { - S1(c2,c4) ; - } - for (c4=11;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/dot.c b/cloog-0.16.3/test/dot.c deleted file mode 100644 index 5114ef18fe6643d3347a3a6e85d40140e7506777..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dot.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (j=1;j<=M;j++) { - S1(0,j) ; -} -for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.16.3/test/dot.cloog b/cloog-0.16.3/test/dot.cloog deleted file mode 100644 index 112816e0c9186a4f947e2c057c0ad1c52a54cae1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dot.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# parameters {M, N | M>=1 N >=1} -2 4 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i, j | i=0 0<=i<=N 1<=j<=M} -5 6 -0 1 0 0 0 0 -1 1 0 0 0 0 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 - -1 -# {i, j | i>=1 0<=i<=N 1<=j<=M} -5 6 -1 1 0 0 0 -1 -1 1 0 0 0 0 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/dot.good.c b/cloog-0.16.3/test/dot.good.c deleted file mode 100644 index 9cb7b96d6f7a9d78871a5a4ad9d97a0e11edc7fa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dot.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (j=1;j<=M;j++) { - S1(0,j) ; - } - for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/dot2.c b/cloog-0.16.3/test/dot2.c deleted file mode 100644 index 3b6eb5d240d81e101b16fba3443d88f597b778d5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dot2.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i=1;i<=min(M,N);i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;i<=M;i++) { - S1(i) ; -} -for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.16.3/test/dot2.cloog b/cloog-0.16.3/test/dot2.cloog deleted file mode 100644 index 71f471a7490d99884979cae934351e800a1e34ce..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dot2.cloog +++ /dev/null @@ -1,29 +0,0 @@ -# language: C -c - -# parameters {M, N | M>=1 N >=1} -2 4 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -2 5 -1 1 0 0 -1 -1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/dot2.good.c b/cloog-0.16.3/test/dot2.good.c deleted file mode 100644 index 9b7805cb7425053cd79fc191f29107c98dad8c5d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/dot2.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=1;i<=min(M,N);i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } - } - for (i=N+1;i<=M;i++) { - S1(i) ; - } - for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/double.c b/cloog-0.16.3/test/double.c deleted file mode 100644 index b8e5e59f5dea5a9dfaa3d29b742c4f9db7dfdf64..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/double.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/double.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 0) { - for (i=0;i<=M;i++) { - S1(i) ; - for (j=0;j<=N;j++) { - S2(i,j) ; - S3(i,j) ; - } - S4(i) ; - } -} diff --git a/cloog-0.16.3/test/double.cloog b/cloog-0.16.3/test/double.cloog deleted file mode 100644 index a9db60d864f2e269194964368bab2605fbb99f27..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/double.cloog +++ /dev/null @@ -1,69 +0,0 @@ -# language: C -c - -# parameters n m -1 4 -# n m 1 -1 0 1 0 -0 - -4 # Number of statements - -1 -# S1 {i | 0<=i<=n} -2 5 -# i n m 1 -1 1 0 0 0 -1 -1 1 0 0 -0 0 0 - -1 -# S2 {i, j | 0<=i<=n; 0<=j<=m} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 0 -1 0 1 0 -0 0 0 - -1 -# S3 {i, j | 0<=i<=n; 0<=j<=m} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 0 -1 0 1 0 -0 0 0 - -1 -# S4 {i | 0<=i<=n} -2 5 -# i n m 1 -1 1 0 0 0 -1 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions -2 7 -# c1 C2 i n m 1 -0 1 0 -1 0 0 0 -0 0 1 0 0 0 -1 - -2 8 -# c1 C2 i j n m 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 0 0 -2 - -2 8 -# c1 C2 i j n m 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 0 0 -3 - -2 7 -# c1 C2 i n m 1 -0 1 0 -1 0 0 0 -0 0 1 0 0 0 -4 -0 diff --git a/cloog-0.16.3/test/double.good.c b/cloog-0.16.3/test/double.good.c deleted file mode 100644 index 7aa0eb3d7dc3738ad37857ffc8faca1283677a89..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/double.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/double.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i) { hash(4); hash(i); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=M;i++) { - S1(i) ; - for (j=0;j<=N;j++) { - S2(i,j) ; - S3(i,j) ; - } - S4(i) ; - } -} diff --git a/cloog-0.16.3/test/durbin_e_s.c b/cloog-0.16.3/test/durbin_e_s.c deleted file mode 100644 index d0301c8ff7ef037ca97ae83c9244d522b09d931c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/durbin_e_s.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/durbin_e_s.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ -S4(1,0,0); -S7(1,0,0); -S8(1,0,3); -for (i=2;i<=9;i++) { - S2(i,-7,0); - for (j=-7;j<=i-9;j++) { - S3(i,j,1); - } - S6(i,i-9,2); - S8(i,0,3); - for (j=1;j<=i-1;j++) { - S5(i,j,3); - } -} -S2(10,-7,0); -for (j=-7;j<=1;j++) { - S3(10,j,1); -} -S6(10,1,2); -for (j=1;j<=9;j++) { - S5(10,j,3); - S1(10,j,4); -} -S1(10,10,4); diff --git a/cloog-0.16.3/test/durbin_e_s.cloog b/cloog-0.16.3/test/durbin_e_s.cloog deleted file mode 100644 index 55c08590b42b934559e6fe8c5a202ad5925b0837..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/durbin_e_s.cloog +++ /dev/null @@ -1,71 +0,0 @@ -# language: C -c - -# Context -0 2 - -0 # parameter names - - -8 # Number of statements - -1 -4 5 - 0 1 0 0 -10 - 0 0 0 1 -4 - 1 0 1 0 -1 - 1 0 -1 0 10 -0 0 0 -1 -4 5 - 0 0 1 0 7 - 0 0 0 1 0 - 1 1 0 0 -2 - 1 -1 0 0 10 -0 0 0 -1 -4 5 - 0 0 0 1 -1 - 1 0 1 0 7 - 1 -1 0 0 10 - 1 1 -1 0 -9 -0 0 0 -1 -4 5 - 0 1 0 0 -1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 0 0 0 1 -0 0 0 -1 -4 5 - 0 0 0 1 -3 - 1 1 -1 0 -1 - 1 -1 0 0 10 - 1 0 1 0 -1 -0 0 0 -1 -4 5 - 0 1 -1 0 -9 - 0 0 0 1 -2 - 1 0 1 0 7 - 1 0 -1 0 1 -0 0 0 -1 -4 5 - 0 1 0 0 -1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 0 0 0 1 -0 0 0 -1 -4 5 - 0 0 1 0 0 - 0 0 0 1 -3 - 1 1 0 0 -1 - 1 -1 0 0 9 -0 0 0 -0 # iterator names -0 # scattering functions -0 # scattering dimension names - diff --git a/cloog-0.16.3/test/durbin_e_s.good.c b/cloog-0.16.3/test/durbin_e_s.good.c deleted file mode 100644 index f96d006b7d55f096f89c433ed71af3cdd16e35b2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/durbin_e_s.good.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Generated from ../../../git/cloog/test/durbin_e_s.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } - -void test() -{ - /* Original iterators. */ - int i, j, k; - S4(1,0,0) ; - S7(1,0,0) ; - S8(1,0,3) ; - S2(2,-7,0) ; - S3(2,-7,1) ; - S6(2,-7,2) ; - S8(2,0,3) ; - S5(2,1,3) ; - S2(3,-7,0) ; - S3(3,-7,1) ; - S3(3,-6,1) ; - S6(3,-6,2) ; - S8(3,0,3) ; - for (j=1;j<=2;j++) { - S5(3,j,3) ; - } - for (i=4;i<=8;i++) { - S2(i,-7,0) ; - S3(i,-7,1) ; - for (j=-6;j<=i-10;j++) { - S3(i,j,1) ; - } - j = i-9 ; - S3(i,i-9,1) ; - S6(i,i-9,2) ; - S8(i,0,3) ; - for (j=1;j<=i-1;j++) { - S5(i,j,3) ; - } - } - S2(9,-7,0) ; - S3(9,-7,1) ; - for (j=-6;j<=-1;j++) { - S3(9,j,1) ; - } - S3(9,0,1) ; - S6(9,0,2) ; - S8(9,0,3) ; - for (j=1;j<=8;j++) { - S5(9,j,3) ; - } - S2(10,-7,0) ; - S3(10,-7,1) ; - for (j=-6;j<=0;j++) { - S3(10,j,1) ; - } - S3(10,1,1) ; - S6(10,1,2) ; - S5(10,1,3) ; - S1(10,1,4) ; - for (j=2;j<=9;j++) { - S5(10,j,3) ; - S1(10,j,4) ; - } - S1(10,10,4) ; -} diff --git a/cloog-0.16.3/test/emploi.c b/cloog-0.16.3/test/emploi.c deleted file mode 100644 index 1716721e90b00fbd3a538f856d4280984cfc52ea..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/emploi.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from ../../../git/cloog/test/emploi.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.01s. */ -if (n >= 1) { - if (m >= 1) { - for (i=1;i<=n;i++) { - S1(i); - for (j=1;j<=m;j++) { - S2(i,j); - } - } - } - if (m <= 0) { - for (i=1;i<=n;i++) { - S1(i); - } - } -} diff --git a/cloog-0.16.3/test/emploi.cloog b/cloog-0.16.3/test/emploi.cloog deleted file mode 100644 index 0dd7a26967e8887f1c3f692c46c25c25008a438f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/emploi.cloog +++ /dev/null @@ -1,49 +0,0 @@ -# language: C -c - -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 # 0 >= 0, always true -1 # We want to set the parameter names -m n - -2 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -0 0 0 - -1 # Second statement -4 6 # 4 lines and 6 columns -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # i <= n -1 0 1 0 0 -1 # j >= 1 -1 0 -1 1 0 0 # j <= m -0 0 0 -0 - -0 # Scattering functions -# The first function -2 7 # 2 lines and 7 columns -# c1 c2 i m n 1 -0 1 0 -1 0 0 0 # c1 = i -0 0 1 0 0 0 0 # c2 = 0 -# The second function -2 8 # 2 lines and 8 columns -# c1 c2 i j m n 1 -0 1 0 0 0 0 -1 0 # c1 = n -0 0 1 -1 -1 0 0 0 # c2 = i+j -0 diff --git a/cloog-0.16.3/test/emploi.good.c b/cloog-0.16.3/test/emploi.good.c deleted file mode 100644 index ad812d8111643266e6bdc771c8be2d2dd9170e02..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/emploi.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/emploi.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int m, int n) -{ - /* Original iterators. */ - int i, j; - if (m >= 1) { - for (i=1;i<=n;i++) { - if (i >= m) { - S1(i) ; - } - if (i <= min(2*m,m-1)) { - S1(i) ; - } - for (j=1;j<=m;j++) { - S2(i,j) ; - } - } - } - if (m <= 0) { - for (i=1;i<=n;i++) { - S1(i) ; - } - } -} diff --git a/cloog-0.16.3/test/equality.c b/cloog-0.16.3/test/equality.c deleted file mode 100644 index 86b024dabc20ed8c5f95e6527a38602210fd3e8c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/equality.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i0=0;i0<=5;i0++) { - for (i1=ceild(4*i0,5);i1<=floord(6*i0+20,5);i1++) { - if (2*i0 == i1) { - S1(i0,i1) ; - } - if (i1 == 4) { - S2(i0,i1) ; - } - } -} diff --git a/cloog-0.16.3/test/equality.cloog b/cloog-0.16.3/test/equality.cloog deleted file mode 100644 index da83671838b8ce6a2010ea627da073e3effdf144..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/equality.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# Language: C -c - -# Context (0 parameter(s)): -1 2 - 1 1 -1 # Parameter name(s) - - -# Statement number: -2 - -# Iteration domain of statement 1. -1 -3 4 -0 2 -1 0 -1 1 0 0 -1 -1 0 5 -0 0 0 # For future options. - -# Iteration domain of statement 2. -1 -3 4 -0 0 -1 4 -1 1 0 0 -1 -1 0 5 -0 0 0 # For future options. - -1 # Iterator name(s) -i0 i1 - -# No scattering functions. -0 diff --git a/cloog-0.16.3/test/equality.good.c b/cloog-0.16.3/test/equality.good.c deleted file mode 100644 index 371f48b340656ccac1f2d7852cfe9dc195c405b1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/equality.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i0,i1) { hash(1); hash(i0); hash(i1); } -#define S2(i0,i1) { hash(2); hash(i0); hash(i1); } - -void test() -{ - /* Original iterators. */ - int i0, i1; - for (i0=0;i0<=5;i0++) { - for (i1=ceild(4*i0,5);i1<=floord(6*i0+20,5);i1++) { - if (2*i0 == i1) { - S1(i0,i1) ; - } - if (i1 == 4) { - S2(i0,i1) ; - } - } - } -} diff --git a/cloog-0.16.3/test/equality2.c b/cloog-0.16.3/test/equality2.c deleted file mode 100644 index ea28ab2e9bc75eaccef4bf934460191041aaccad..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/equality2.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.07s. */ -for (i0=1;i0<=10000;i0++) { - for (i1=1000;i1<=1016;i1++) { - for (i2=1;i2<=min(-2*i1+2033,2*i1-1999);i2++) { - if (2*i1 == i2+1999) { - S2(i0,i1,i2,1,i0,2*i1-1000,1,2,i0,i1-499,2*i1-1999,i0,2*i1-1999,i1-999,i1-999) ; - } - if (i2 == 1) { - if (i1%2 == 0) { - S1(i0,i1,i2,2,i0,(i1+2)/2,i1-999,i0,i1-999,(i1-998)/2,(i1-998)/2) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/equality2.cloog b/cloog-0.16.3/test/equality2.cloog deleted file mode 100644 index c62469cc850d7fa244b89af94bc436bae21cdfb5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/equality2.cloog +++ /dev/null @@ -1,57 +0,0 @@ -c - -# Context (0 parameter(s)): -1 2 - 1 1 -1 # Parameter name(s) - - -# Statement number: -2 - -# Iteration domain of statement 2. -1 -13 13 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 -2 -998 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 -1 -500 - 0 0 0 0 0 0 0 1 0 0 0 -2 1 - 0 0 0 0 0 0 0 0 0 1 0 -2 1 - 0 0 0 0 0 0 0 0 0 0 1 -1 0 - 1 0 0 0 0 0 0 0 1 0 0 0 -1 - 1 0 0 0 0 0 0 0 -1 0 0 0 10000 - 1 0 0 0 0 0 0 0 0 0 0 1 -1 - 1 0 0 0 0 0 0 0 0 0 0 -1 9 -0 0 0 # For future options. - -# Iteration domain of statement 3. -1 -17 17 - 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 -999 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -2 1 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -998 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 -500 - 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -2 1 - 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -2 1 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 10000 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 9 -0 0 0 # For future options. - - -1 # Iterator name(s) -i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 - -# No scattering functions. -0 diff --git a/cloog-0.16.3/test/equality2.good.c b/cloog-0.16.3/test/equality2.good.c deleted file mode 100644 index 74bf88b44d32b3cc4affdeb22a75031a96edb8f0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/equality2.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10) { hash(1); hash(i0); hash(i1); hash(i2); hash(i3); hash(i4); hash(i5); hash(i6); hash(i7); hash(i8); hash(i9); hash(i10); } -#define S2(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14) { hash(2); hash(i0); hash(i1); hash(i2); hash(i3); hash(i4); hash(i5); hash(i6); hash(i7); hash(i8); hash(i9); hash(i10); hash(i11); hash(i12); hash(i13); hash(i14); } - -void test() -{ - /* Original iterators. */ - int i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14; - for (i0=1;i0<=10000;i0++) { - for (i1=1000;i1<=1016;i1++) { - for (i2=1;i2<=min(-2*i1+2033,2*i1-1999);i2++) { - if (2*i1 == i2+1999) { - S2(i0,i1,i2,1,i0,2*i1-1000,1,2,i0,i1-499,2*i1-1999,i0,2*i1-1999,i1-999,i1-999) ; - } - if (i2 == 1) { - if (i1%2 == 0) { - S1(i0,i1,i2,2,i0,(i1+2)/2,i1-999,i0,i1-999,(i1-998)/2,(i1-998)/2) ; - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/esced.c b/cloog-0.16.3/test/esced.c deleted file mode 100644 index d26d395de2698c93bd36aec24e11078903791630..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/esced.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from ../../../git/cloog/test/esced.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (m >= 1) { - if (n >= 1) { - for (i=1;i<=m;i++) { - S1(i) ; - for (j=1;j<=n;j++) { - S2(i,j) ; - } - } - } - if (n <= 0) { - for (i=1;i<=m;i++) { - S1(i) ; - } - } -} diff --git a/cloog-0.16.3/test/esced.cloog b/cloog-0.16.3/test/esced.cloog deleted file mode 100644 index 9caba0151673d79522ce1e6031e74f76c8f86ab6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/esced.cloog +++ /dev/null @@ -1,30 +0,0 @@ -# language: C -c - -# parameters {n, m | n<=m} -1 4 -#1 1 -1 0 -1 0 0 1 -1 -n m - -2 # Number of statements - -1 -# {i | 1<=i<=n} -2 5 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/esced.good.c b/cloog-0.16.3/test/esced.good.c deleted file mode 100644 index cab5f347a695e89d139ba6f0d745831f5ef0afe2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/esced.good.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated from ../../../git/cloog/test/esced.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int n, int m) -{ - /* Original iterators. */ - int i, j; - if (n >= 1) { - for (i=1;i<=m;i++) { - S1(i) ; - for (j=1;j<=n;j++) { - S2(i,j) ; - } - } - } - if (n <= 0) { - for (i=1;i<=m;i++) { - S1(i) ; - } - } -} diff --git a/cloog-0.16.3/test/ex1.c b/cloog-0.16.3/test/ex1.c deleted file mode 100644 index b5584c047ca6ddd61376c86c2af4105f4f099522..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/ex1.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/ex1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i=0;i<=14;i++) { - for (j=0;j<=n-15;j++) { - S1(i,j) ; - } -} -for (i=15;i<=n;i++) { - for (j=0;j<=9;j++) { - S1(i,j) ; - } - for (j=10;j<=n-15;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=n-14;j<=n;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.16.3/test/ex1.cloog b/cloog-0.16.3/test/ex1.cloog deleted file mode 100644 index 6a85398882f3370201659c4616743fe617f7d35c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/ex1.cloog +++ /dev/null @@ -1,34 +0,0 @@ -# language: C -c - -# parameters {n} -1 3 -# n 1 -1 1 -25 -1 -n - -2 # Number of statements - -1 -# {i | 0<=i<=n, 0<=j<=n-15} -4 5 -# i j n 1 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 -15 -0 0 0 - -1 -# {i | 15<=i<=n, 10<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -15 -1 -1 0 1 0 -1 0 1 0 -10 -1 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/ex1.good.c b/cloog-0.16.3/test/ex1.good.c deleted file mode 100644 index b73fd946882a4f70c80ed181e10a690e30f5f92d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/ex1.good.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Generated from ../../../git/cloog/test/ex1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int n) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=14;i++) { - for (j=0;j<=n-15;j++) { - S1(i,j) ; - } - } - for (i=15;i<=n;i++) { - for (j=0;j<=9;j++) { - S1(i,j) ; - } - for (j=10;j<=n-15;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=n-14;j<=n;j++) { - S2(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/forwardsub-1-1-2.c b/cloog-0.16.3/test/forwardsub-1-1-2.c deleted file mode 100644 index 58ce5c829888216fd6359111f9497202d05a1c02..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-1-1-2.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-1-1-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -S3(1,1) ; -S1(2,1) ; -S4(2,2) ; -for (i=3;i<=M;i++) { - S1(i,1) ; - for (j=2;j<=i-1;j++) { - S2(i,j) ; - } - S4(i,i) ; -} diff --git a/cloog-0.16.3/test/forwardsub-1-1-2.cloog b/cloog-0.16.3/test/forwardsub-1-1-2.cloog deleted file mode 100644 index 38986f996701fe019c001d5e0dc43cbad7a4a44a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-1-1-2.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# language: C -c - -# Context -#{N | 3<=N} -2 3 -# M 1 -1 1 -3 -1 0 1 -0 - -4 # Number of statements - -1 -#{t1,t2 | 2<=t1<=N; t2=1; 3<=N} -5 5 -# i j M 1 -0 0 1 0 -1 -1 0 0 1 -3 -1 -1 0 1 0 -1 1 0 0 -2 -1 0 0 0 1 -0 0 0 - -1 -#{t1,t2 | t2+1<=t1<=N; 2<=t2} -4 5 -# i j M 1 -1 1 -1 0 -1 -1 0 1 0 -2 -1 -1 0 1 0 -1 0 0 0 1 -0 0 0 - -1 -#{t1,t2 | t1=1; t2=1; 3<=N} -4 5 -# i j M 1 -0 1 0 0 -1 -0 0 1 0 -1 -1 0 0 1 -3 -1 0 0 0 1 -0 0 0 - -1 -#{t1,t2 | t1=t2; 2<=t2<=N; 3<=N} -4 5 -# i j M 1 -0 1 -1 0 0 -1 0 0 1 -3 -1 0 -1 1 0 -1 0 1 0 -2 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/forwardsub-1-1-2.good.c b/cloog-0.16.3/test/forwardsub-1-1-2.good.c deleted file mode 100644 index cebe2395572a37430a595a9e5e74a6c4752902e5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-1-1-2.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-1-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - S3(1,1) ; - S1(2,1) ; - S4(2,2) ; - for (i=3;i<=M;i++) { - S1(i,1) ; - for (j=2;j<=i-1;j++) { - S2(i,j) ; - } - S4(i,i) ; - } -} diff --git a/cloog-0.16.3/test/forwardsub-2-1-2-3.c b/cloog-0.16.3/test/forwardsub-2-1-2-3.c deleted file mode 100644 index 7c4bc22c8cd49ab3020c2e12579d5d2cc7205928..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-2-1-2-3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-2-1-2-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -S3(1,0) ; -for (k=2;k<=M;k++) { - S1(1,1,k) ; -} -for (i=2;i<=M-1;i++) { - S4(i,0) ; - for (k=i+1;k<=M;k++) { - S2(i,1,k) ; - } -} -S4(M,0) ; diff --git a/cloog-0.16.3/test/forwardsub-2-1-2-3.cloog b/cloog-0.16.3/test/forwardsub-2-1-2-3.cloog deleted file mode 100644 index 33d29f3c093b3b18c474f67731b10c9aa80fff4a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-2-1-2-3.cloog +++ /dev/null @@ -1,58 +0,0 @@ -# language: C -c - -# Context -#{M | 3<=M} -2 3 -# M 1 -1 1 -3 -1 0 1 -0 - -4 # Number of statements - -1 -#{i,j,k | i=1; j=1; 2<=k<=M; 3<=M} -6 6 -# i j k M 1 -0 1 0 0 0 -1 -0 0 1 0 0 -1 -1 0 0 0 1 -3 -1 0 0 -1 1 0 -1 0 0 1 0 -2 -1 0 0 0 0 1 -0 0 0 - -1 -#{i,j,k | 2<=i<=k-1; j=1; k<=M} -5 6 -# i j k M 1 -0 0 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 0 0 -2 -1 0 0 -1 1 0 -1 0 0 0 0 1 -0 0 0 - -1 -#{i,j | i=1; j=0; 3<=M} -4 5 -# i j M 1 -0 1 0 0 -1 -0 0 1 0 0 -1 0 0 1 -3 -1 0 0 0 1 -0 0 0 - -1 -#{i,j | 2<=i<=M; j=0; 3<=M} -4 5 -# i j M 1 -0 0 1 0 0 -1 1 0 0 -2 -1 0 0 1 -3 -1 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/forwardsub-2-1-2-3.good.c b/cloog-0.16.3/test/forwardsub-2-1-2-3.good.c deleted file mode 100644 index 69ff99cdea6f9c0f2fa2924b3cb7d7ccd2066062..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-2-1-2-3.good.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-2-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j, k; - S3(1,0) ; - for (k=2;k<=M;k++) { - S1(1,1,k) ; - } - for (i=2;i<=M-1;i++) { - S4(i,0) ; - for (k=i+1;k<=M;k++) { - S2(i,1,k) ; - } - } - S4(M,0) ; -} diff --git a/cloog-0.16.3/test/forwardsub-3-1-2.c b/cloog-0.16.3/test/forwardsub-3-1-2.c deleted file mode 100644 index 0f398edb560c8ee6fbce27047d8795fd4c8b8578..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-3-1-2.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-3-1-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -S3(2,1) ; -S1(3,1) ; -S1(4,1) ; -S4(4,2) ; -for (i=5;i<=M+1;i++) { - S1(i,1) ; - for (j=2;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } -} -for (i=M+2;i<=2*M-1;i++) { - for (j=i-M;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } -} -S4(2*M,M) ; diff --git a/cloog-0.16.3/test/forwardsub-3-1-2.cloog b/cloog-0.16.3/test/forwardsub-3-1-2.cloog deleted file mode 100644 index 6e41e750745cd8d781d2415d1031ee8496d6d0c8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-3-1-2.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# language: C -c - -# Context -#{N | 3<=N} -2 3 -# M 1 -1 1 -3 -1 0 1 -0 - -4 # Number of statements - -1 -#{t1,i | 3<=t1<=N+1; i=1; 3<=N} -5 5 -# i j M 1 -0 0 1 0 -1 -1 0 0 1 -3 -1 -1 0 1 1 -1 1 0 0 -3 -1 0 0 0 1 -0 0 0 - -1 -#{t1,i | 2i+1<=t1<=i+N; 2<=i} -4 5 -# i j M 1 -1 1 -2 0 -1 -1 0 1 0 -2 -1 -1 1 1 0 -1 0 0 0 1 -0 0 0 - -1 -#{t1,i | t1=2; i=1; 3<=N} -4 5 -# i j M 1 -0 1 0 0 -2 -0 0 1 0 -1 -1 0 0 1 -3 -1 0 0 0 1 -0 0 0 - -1 -#{t1,i | t1=2i; 2<=i<=N; 3<=N} -5 5 -# i j M 1 -0 1 -2 0 0 -1 0 0 1 -3 -1 0 -1 1 0 -1 0 1 0 -2 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/forwardsub-3-1-2.good.c b/cloog-0.16.3/test/forwardsub-3-1-2.good.c deleted file mode 100644 index 2969ae81359212c3c218b016c81d4b7e2f41d1fa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/forwardsub-3-1-2.good.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-3-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - S3(2,1) ; - S1(3,1) ; - S1(4,1) ; - S4(4,2) ; - for (i=5;i<=M+1;i++) { - S1(i,1) ; - for (j=2;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } - } - for (i=M+2;i<=2*M-1;i++) { - for (j=i-M;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } - } - i = 2*M ; - S4(2*M,M) ; -} diff --git a/cloog-0.16.3/test/gauss.c b/cloog-0.16.3/test/gauss.c deleted file mode 100644 index 341c2aa6929389117f20718c086ca5391ff7d43c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gauss.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/gauss.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ -if (M >= 2) { - for (c2=2;c2<=M;c2++) { - for (j=2;j<=M;j++) { - S2(1,j,c2) ; - } - } - for (c1=2;c1<=M-1;c1++) { - for (c2=c1+1;c2<=M;c2++) { - for (j=1;j<=c1-1;j++) { - S1(c1,j,c2) ; - } - for (j=c1+1;j<=M;j++) { - S2(c1,j,c2) ; - } - } - } -} diff --git a/cloog-0.16.3/test/gauss.cloog b/cloog-0.16.3/test/gauss.cloog deleted file mode 100644 index 0a84b0107d6ce4142c4540a6ac12cf3aa626ba53..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gauss.cloog +++ /dev/null @@ -1,72 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -2 # Number of statements - -1 -# {i, j, k | 1<=i<=n; 1<=j<=i-1 i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 1 -1 0 0 -1 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 # Scattering functions -# Et les instructions de chunking... -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 - -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 -0 - -2 -# Et les instructions de chunking... -1 7 -# c1 i j k n 1 -0 1 0 0 0 -1 2 - -1 7 -# c1 i j k n 1 -0 1 -1 0 0 0 1 -0 - -2 -# Et les instructions de chunking... -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 - -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 -0 diff --git a/cloog-0.16.3/test/gauss.good.c b/cloog-0.16.3/test/gauss.good.c deleted file mode 100644 index fb1939d93478dac236be94c93fdf29666d70c66f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gauss.good.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Generated from ../../../git/cloog/test/gauss.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j, k; - if (M >= 2) { - for (c2=2;c2<=M;c2++) { - for (j=2;j<=M;j++) { - S2(1,j,c2) ; - } - } - } - for (c1=2;c1<=M-1;c1++) { - for (c2=c1+1;c2<=M;c2++) { - for (j=1;j<=c1-1;j++) { - S1(c1,j,c2) ; - } - for (j=c1+1;j<=M;j++) { - S2(c1,j,c2) ; - } - } - } -} diff --git a/cloog-0.16.3/test/generate_test.c b/cloog-0.16.3/test/generate_test.c deleted file mode 100644 index 40a8dbdac3e9f0bf6fe19a1c288df950cbbe60d9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/generate_test.c +++ /dev/null @@ -1,153 +0,0 @@ -#include -#include - -/* Generate code that scans part of the parameter domain of - * a given cloog problem, running both a function called "good" - * and a function called "test" for each value of the parameters. - * These functions are assumed to call the "hash" function, - * which is also generated by this program. - * If for any given value of the parameters, the final hash - * value computed by test is different from that computed by - * good, then an error is reported. - */ - -CloogDomain *get_param_domain(CloogOptions *options) -{ - CloogDomain *domain; - CloogProgram *program; - - program = cloog_program_read(stdin, options); - - domain = cloog_domain_copy(program->context); - - cloog_program_free(program); - - return cloog_domain_from_context(domain); -} - -static const char preamble[] = -"#include \n" -"#include \n" -"\n" -"static unsigned h;\n" -"\n" -"void hash(int v)\n" -"{\n" -" int i;\n" -" union u {\n" -" int v;\n" -" unsigned char c[1];\n" -" } u;\n" -" u.v = v;\n" -" for (i = 0; i < sizeof(int); ++i) {\n" -" h *= 16777619;\n" -" h ^= u.c[i];\n" -" }\n" -"}\n" -"\n" -"int main()\n" -"{\n" -" unsigned h_good, h_test;\n"; -; - -static const char postamble[] = -" return 0;\n" -"}\n" -; - -static const char *call[] = {"good", "test"}; - -static void print_macros(FILE *file) -{ - fprintf(file, "/* Useful macros. */\n") ; - fprintf(file, - "#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))\n"); - fprintf(file, - "#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))\n"); - fprintf(file, "#define max(x,y) ((x) > (y) ? (x) : (y))\n") ; - fprintf(file, "#define min(x,y) ((x) < (y) ? (x) : (y))\n\n") ; -} - -int main() -{ - int dim; - int range; - int i, j; - CloogState *state = cloog_state_malloc(); - CloogOptions *options = cloog_options_malloc(state); - CloogDomain *domain; - CloogDomain *cube, *tmp; - CloogProgram *p; - CloogStatement *statement; - cloog_int_t m, M; - - options->quiet = 1; - domain = get_param_domain(options); - dim = cloog_domain_dimension(domain); - - if (dim >= 8) - range = 4; - else if (dim >= 5) - range = 6; - else - range = 30; - - cloog_int_init(m); - cloog_int_init(M); - cloog_int_set_si(m, 0); - cloog_int_set_si(M, range); - cube = cloog_domain_cube(state, dim, m, M); - domain = cloog_domain_intersection(tmp = domain, cube); - cloog_domain_free(tmp); - cloog_domain_free(cube); - - p = cloog_program_malloc(); - assert(p); - p->names = cloog_names_malloc(); - assert(p->names); - p->names->nb_iterators = dim; - p->names->iterators = cloog_names_generate_items(dim, "p", 0); - p->language = 'c'; - p->context = cloog_domain_universe(state, 0); - statement = cloog_statement_alloc(state, 1); - p->loop = cloog_loop_malloc(state); - p->loop->domain = domain; - p->loop->block = cloog_block_alloc(statement, 0, NULL, dim); - p->blocklist = cloog_block_list_alloc(p->loop->block); - p = cloog_program_generate(p, options); - - printf("%s", preamble); - for (i = 0; i < dim; ++i) - printf("\tint %s;\n", p->names->iterators[i]); - printf("#define S1("); - for (i = 0; i < dim; ++i) { - if (i) - printf(","); - printf("p%d", i); - } - printf(") do {"); - for (j = 0; j < 2; ++j) { - printf(" h = 2166136261u;"); - printf(" %s(", call[j]); - for (i = 0; i < dim; ++i) { - if (i) - printf(", "); - printf("p%d", i); - } - printf(");"); - printf(" h_%s = h;", call[j]); - } - printf(" assert(h_good == h_test);"); - printf(" } while (0)\n"); - print_macros(stdout); - cloog_program_pprint(stdout, p, options); - printf("%s", postamble); - - cloog_int_clear(m); - cloog_int_clear(M); - cloog_program_free(p); - cloog_options_free(options); - cloog_state_free(state); - - return 0; -} diff --git a/cloog-0.16.3/test/gesced.c b/cloog-0.16.3/test/gesced.c deleted file mode 100644 index 6b69507daa3b90140884b920f120afdb1cdc72a3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.05s. */ -for (c1=1;c1<=N;c1++) { - S1(c1) ; -} -for (c1=N+1;c1<=2*N;c1++) { - for (i=1;i<=N;i++) { - S2(i,c1-N) ; - } -} -for (c1=2*N+1;c1<=M+N;c1++) { - for (i=1;i<=N;i++) { - S3(i,c1-2*N) ; - S2(i,c1-N) ; - } -} -for (c1=M+N+1;c1<=M+2*N;c1++) { - for (i=1;i<=N;i++) { - S3(i,c1-2*N) ; - } -} diff --git a/cloog-0.16.3/test/gesced.cloog b/cloog-0.16.3/test/gesced.cloog deleted file mode 100644 index 5f3704658f20ee92dc09d12128bb82158c74a9ad..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# language: C -c - -# parameters {n, m | n<=m n>=2 m>=2} -3 4 -# m n 1 -1 1 -1 0 -1 1 0 -2 -1 0 1 -2 -0 - -3 # Number of statements - -1 -# {i | 1<=i<=n} -2 5 -# i m n 1 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -# i j m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -# i j m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -3 # Scattering functions -# Et les instructions de chunking (prog init)... -1 6 -# c1 i m n 1 -0 1 -1 0 0 0 - -1 7 -# c1 i j m n 1 -0 1 0 -1 0 -1 0 - -1 7 -# c1 i j m n 1 -0 1 0 -1 0 -2 0 -0 diff --git a/cloog-0.16.3/test/gesced.good.c b/cloog-0.16.3/test/gesced.good.c deleted file mode 100644 index bae55dd60030bfce9e63600dd05af92ee87b29eb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i, j; - for (c1=1;c1<=N;c1++) { - S1(c1) ; - } - for (c1=N+1;c1<=2*N;c1++) { - for (i=1;i<=N;i++) { - j = c1-N ; - S2(i,c1-N) ; - } - } - for (c1=2*N+1;c1<=M+N;c1++) { - for (i=1;i<=N;i++) { - j = c1-2*N ; - S3(i,c1-2*N) ; - j = c1-N ; - S2(i,c1-N) ; - } - } - for (c1=M+N+1;c1<=M+2*N;c1++) { - for (i=1;i<=N;i++) { - j = c1-2*N ; - S3(i,c1-2*N) ; - } - } -} diff --git a/cloog-0.16.3/test/gesced2.c b/cloog-0.16.3/test/gesced2.c deleted file mode 100644 index 5cebdb591d574e7f4a3be7a20661480ca4cffd52..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced2.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/gesced2.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.03s. */ -for (c1=1;c1<=4;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2); - } -} -for (c1=5;c1<=M-10;c1++) { - for (c2=-c1+1;c2<=4;c2++) { - S2(c1+c2,c1); - } - for (c2=5;c2<=min(M-10,-c1+M);c2++) { - S1(c1,c2); - S2(c1+c2,c1); - } - for (c2=-c1+M+1;c2<=M-10;c2++) { - S1(c1,c2); - } - for (c2=M-9;c2<=-c1+M;c2++) { - S2(c1+c2,c1); - } -} -for (c1=M-9;c1<=M;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2); - } -} diff --git a/cloog-0.16.3/test/gesced2.cloog b/cloog-0.16.3/test/gesced2.cloog deleted file mode 100644 index 982368b4e3d50a8a4f82d424c0bd1c9b956b25c4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced2.cloog +++ /dev/null @@ -1,82 +0,0 @@ -# language: C -c - -# parameters {n | n>=16} -1 3 -# n 1 -1 1 -16 -0 - -2 # Number of statements - -1 -# {i, j | 1<=i<=n 5<=j<=n-10} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -5 -1 0 -1 1 -10 -0 0 0 - -1 -# {i, j | 1<=i<=n 5<=j<=n-10} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -5 -1 0 -1 1 -10 -0 0 0 -0 - -2 # Scattering functions -# Et les instructions de chunking (sol triviale)... -2 7 -# c1 c2 i j n 1 -0 1 0 -1 0 0 0 -0 0 1 0 -1 0 0 - -2 7 -# c1 c2 i j n 1 -0 1 0 0 -1 0 0 -0 0 1 -1 1 0 0 -0 - -# Et les instructions de chunking (sol aux inverse)... -2 7 -# c1 c2 i j n 1 -0 1 0 -10 -3 0 -5 -0 0 1 -4 -1 0 5 - -2 7 -# c1 c2 i j n 1 -0 1 0 -9 -4 0 -15 -0 0 1 -5 0 0 0 -0 - -2 -# Et les instructions de chunking (sol aux egalites)... -2 7 -# c1 c2 i j n 1 -0 1 0 1 -2 0 -30 -0 0 1 -1 1 0 30 - -2 7 -# c1 c2 i j n 1 -0 1 0 -1 1 0 15 -0 0 1 1 -2 0 -30 -0 - -# Et les instructions de chunking (sol triviale)... -2 7 -# c1 c2 i j n 1 -0 1 0 -1 0 0 0 -0 0 1 0 -1 0 5 - -2 7 -# c1 c2 i j n 1 -0 1 0 0 -1 0 -10 -0 0 1 -1 0 0 0 -0 - diff --git a/cloog-0.16.3/test/gesced2.good.c b/cloog-0.16.3/test/gesced2.good.c deleted file mode 100644 index 669093acec05cbe7905418de9143a21b5f00fd6b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced2.good.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=1;c1<=4;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2) ; - } - } - for (c1=5;c1<=min(M-10,9);c1++) { - for (c2=-c1+1;c2<=4;c2++) { - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2) ; - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=M-9;c2<=-c1+M;c2++) { - i = c1+c2 ; - S2(c1+c2,c1) ; - } - } - if (M >= 20) { - for (c2=-9;c2<=4;c2++) { - i = c2+10 ; - S2(c2+10,10) ; - } - for (c2=5;c2<=M-10;c2++) { - S1(10,c2) ; - i = c2+10 ; - S2(c2+10,10) ; - } - } - for (c1=11;c1<=M-10;c1++) { - for (c2=-c1+1;c2<=4;c2++) { - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=5;c2<=-c1+M;c2++) { - S1(c1,c2) ; - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=-c1+M+1;c2<=M-10;c2++) { - S1(c1,c2) ; - } - } - for (c1=M-9;c1<=M;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2) ; - } - } -} diff --git a/cloog-0.16.3/test/gesced3.c b/cloog-0.16.3/test/gesced3.c deleted file mode 100644 index 8d2119d28a2f22dc405118b0a2ab08c1a4128fb0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced3.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -for (c1=M+1;c1<=2*M;c1++) { - S1(c1-M) ; -} -for (c1=2*M+1;c1<=M+N;c1++) { - S2(c1-2*M) ; - S1(c1-M) ; -} -for (c1=M+N+1;c1<=2*M+N;c1++) { - S2(c1-2*M) ; -} diff --git a/cloog-0.16.3/test/gesced3.cloog b/cloog-0.16.3/test/gesced3.cloog deleted file mode 100644 index 758924c4f6765602416a40da016773445f70c544..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced3.cloog +++ /dev/null @@ -1,39 +0,0 @@ -# language: C -c - -# parametres {n | n>=m m>=2} -2 4 -# m n 1 -1 -1 1 0 -1 1 0 -2 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=n} -2 5 -# i m n 1 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i | 1<=i<=n} -2 5 -# i m n 1 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 -0 - -2 -# Et les instructions de chunking (sol triviale)... -1 6 -# c1 i m n 1 -0 1 -1 -1 0 0 - -1 6 -# c1 i m n 1 -0 1 -1 -2 0 0 -0 diff --git a/cloog-0.16.3/test/gesced3.good.c b/cloog-0.16.3/test/gesced3.good.c deleted file mode 100644 index 43708fc32540d8de9c68801075bff3831c37d0dc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/gesced3.good.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - for (c1=M+1;c1<=2*M;c1++) { - i = c1-M ; - S1(c1-M) ; - } - for (c1=2*M+1;c1<=M+N;c1++) { - i = c1-2*M ; - S2(c1-2*M) ; - i = c1-M ; - S1(c1-M) ; - } - for (c1=M+N+1;c1<=2*M+N;c1++) { - i = c1-2*M ; - S2(c1-2*M) ; - } -} diff --git a/cloog-0.16.3/test/guide.c b/cloog-0.16.3/test/guide.c deleted file mode 100644 index 31e9db11ed557d434cf4c906b0c673edbe97f222..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/guide.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/guide.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ -if (N >= 1) { - for (i=1;i<=N;i++) { - S1(i); - } - for (i=N+1;i<=2*N;i++) { - S2(i); - } -} diff --git a/cloog-0.16.3/test/guide.cloog b/cloog-0.16.3/test/guide.cloog deleted file mode 100644 index 5a355827a9dfb314fcb5a3ea2134372cd245255e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/guide.cloog +++ /dev/null @@ -1,35 +0,0 @@ -# Language is C -c - -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 # 0 >= 0, always true -0 # CLooG will set parameters names automatically - -2 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -0 0 0 - -1 # Second statement -2 5 # 4 lines and 6 columns -# i m n 1 -1 1 0 -1 -1 # i >= 1 -1 -1 0 2 0 # i <= n -0 0 0 -0 # CLooG will set iterators names automatically - -0 diff --git a/cloog-0.16.3/test/guide.good.c b/cloog-0.16.3/test/guide.good.c deleted file mode 100644 index 31e03468f04f21507cfe82bb19de9f2ea93eb8f7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/guide.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/guide.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i; - for (i=1;i<=N;i++) { - if (i >= M) { - S1(i) ; - } - if (i <= min(2*M,M-1)) { - S1(i) ; - } - } - for (i=N+1;i<=2*N;i++) { - S2(i) ; - } -} diff --git a/cloog-0.16.3/test/iftest.c b/cloog-0.16.3/test/iftest.c deleted file mode 100644 index 8f95ef8065b059eba43cb29b8815dfa56fe25330..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftest.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ -if (n >= 1) { - for (i=1;i<=n;i++) { - S1(i); - } -} diff --git a/cloog-0.16.3/test/iftest.cloog b/cloog-0.16.3/test/iftest.cloog deleted file mode 100644 index 0adbc8d4195a20d75f3e85909f3d00640c4502c3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftest.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# language: C -c -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 -1 -m n - -1 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -0 0 0 -0 - -0 diff --git a/cloog-0.16.3/test/iftest.good.c b/cloog-0.16.3/test/iftest.good.c deleted file mode 100644 index 4ce26e440fb9fbfb03aaf4c34405bcd7480e47d5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftest.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int m, int n) -{ - /* Original iterators. */ - int i; - for (i=1;i<=n;i++) { - if (i <= 2*m) { - S1(i) ; - } - if (i >= max(m,2*m+1)) { - S1(i) ; - } - } -} diff --git a/cloog-0.16.3/test/iftest2.c b/cloog-0.16.3/test/iftest2.c deleted file mode 100644 index 355aa74d845db3828d7b34cb920a61d3d00234e7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftest2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest2.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ -if ((M >= 1) && (N >= 1)) { - for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - S1(i,j); - } - } -} diff --git a/cloog-0.16.3/test/iftest2.cloog b/cloog-0.16.3/test/iftest2.cloog deleted file mode 100644 index 2bd73366774709ae29718e8502f27db7ef40a97e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftest2.cloog +++ /dev/null @@ -1,31 +0,0 @@ -# language: C -c -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 -0 - -1 # The number of statements - -2 # First statement -# The first domain -5 6 # 3 lines and 5 columns -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # i <= n -1 1 0 -1 0 0 # i >= m -1 0 1 0 0 -1 -1 0 -1 1 0 0 -# The second domain -5 6 # 3 lines and 5 columns -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # i <= n -1 -1 0 2 0 0 # i <= 2*m -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 diff --git a/cloog-0.16.3/test/iftest2.good.c b/cloog-0.16.3/test/iftest2.good.c deleted file mode 100644 index 9e7f51474163fd9abf766618ddbc23d152c76292..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftest2.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - if (M >= 1) { - for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - if (i <= 2*M) { - S1(i,j) ; - } - if (i >= max(M,2*M+1)) { - S1(i,j) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/iftestf.cloog b/cloog-0.16.3/test/iftestf.cloog deleted file mode 100644 index 1f0d6a9ba251833ffd92fb8f2699eb09c59e6d06..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftestf.cloog +++ /dev/null @@ -1,29 +0,0 @@ -# language: FORTRAN -f - -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 -1 -m n - -1 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -0 0 0 -0 - -0 diff --git a/cloog-0.16.3/test/iftestf.f b/cloog-0.16.3/test/iftestf.f deleted file mode 100644 index 65685b904eb3b07d883d61bcead2136a6816e8f6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/iftestf.f +++ /dev/null @@ -1,6 +0,0 @@ -! Generated from ../../../git/cloog/test/iftestf.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. -IF (n >= 1) THEN - DO i=1, n - S1(i) - END DO -END IF diff --git a/cloog-0.16.3/test/infinite.c b/cloog-0.16.3/test/infinite.c deleted file mode 100644 index 10f35f2d9f312baace492da7f1ba151301edac75..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -for (;i<=0;i++) { - S1(i) ; -} -for (i=1;i<=N;i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;;i++) { - S1(i) ; -} diff --git a/cloog-0.16.3/test/infinite.cloog b/cloog-0.16.3/test/infinite.cloog deleted file mode 100644 index dacc187065765443e88ab660fea7969d96d012b9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite.cloog +++ /dev/null @@ -1,32 +0,0 @@ -# langage -c - -# parametres {M, N | M>=1 N >=1} -2 4 -# M N 1 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -0 5 -# i M N 1 -#1 1 0 0 -1 -#1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -# i j M N 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/infinite2.c b/cloog-0.16.3/test/infinite2.c deleted file mode 100644 index 80a0b35c32d8adf1ef4ffdd066809dbce4cba908..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=1;i<=N;i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;;i++) { - S1(i) ; -} diff --git a/cloog-0.16.3/test/infinite2.cloog b/cloog-0.16.3/test/infinite2.cloog deleted file mode 100644 index 2d7cf9706da7a8d33543193d2fb2257fdc05fac2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite2.cloog +++ /dev/null @@ -1,32 +0,0 @@ -# langage -c - -# parametres {M, N | M>=1 N >=1} -2 4 -# M N 1 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -1 5 -# i M N 1 -1 1 0 0 -1 -#1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -# i j M N 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/infinite3.c b/cloog-0.16.3/test/infinite3.c deleted file mode 100644 index 9e4292c17ba82e36a5c6bc8affa6add6c8096b61..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite3.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ -for (;i<=0;i++) { - S1(i) ; -} -for (i=1;i<=min(M,N);i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;i<=M;i++) { - S1(i) ; -} -for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.16.3/test/infinite3.cloog b/cloog-0.16.3/test/infinite3.cloog deleted file mode 100644 index 9154a0ebbecff8659a33e672bfaa7a5be30f6e69..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite3.cloog +++ /dev/null @@ -1,32 +0,0 @@ -# langage -c - -# parametres {M, N | M>=1 N >=1} -2 4 -# M N 1 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -1 5 -# i M N 1 -#1 1 0 0 -1 -1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -# i j M N 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/infinite4.c b/cloog-0.16.3/test/infinite4.c deleted file mode 100644 index fff00ed772bd36c7bc700c3f16fa6a4f06a46f96..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite4.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (;;i++) { - S1(i) ; -} diff --git a/cloog-0.16.3/test/infinite4.cloog b/cloog-0.16.3/test/infinite4.cloog deleted file mode 100644 index 550245395c2a53a8a9f5e204c10741b14820adbe..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/infinite4.cloog +++ /dev/null @@ -1,16 +0,0 @@ -# langage -c - -# Context -0 2 -0 - -1 # Number of statements - -1 -# {i | 1<=i<=M} -0 3 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/isl/jacobi-shared.c b/cloog-0.16.3/test/isl/jacobi-shared.c deleted file mode 100644 index 32462278d6aec2c3a62f0842a1615125f1079112..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/jacobi-shared.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/jacobi-shared.cloog by CLooG 0.16.2-19-gfcd8fdc gmp bits in 1.65s. */ -if ((h0+1)%2 == 0) { - if ((16*floord(g1+t0-3,16) >= -N+g1+t0+1) && (16*floord(N+15*g1+15*t0+15,16) >= 16*g1+15*t0+17) && (floord(t1-1,32) <= floord(g2+t1-3,32)) && (32*floord(t1-1,32) >= -N+g2+t1+1)) { - for (c0=max(-16*floord(t0-1,16)+t0,-16*floord(g1+t0-3,16)+t0);c0<=min(32,N-g1-1);c0+=16) { - c1 = -32*floord(t1-1,32)+t1; - if (c1 <= 32) { - S1(c0+g1-1,c1+g2-1); - } - } - } -} diff --git a/cloog-0.16.3/test/isl/jacobi-shared.cloog b/cloog-0.16.3/test/isl/jacobi-shared.cloog deleted file mode 100644 index 25e4903d877e3fee2f630c2e045128794c5377bb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/jacobi-shared.cloog +++ /dev/null @@ -1,129 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -1 - -22 16 0 0 2 12 -0 0 1024 0 0 0 0 32 0 0 -1 0 0 0 0 0 -0 2048 0 0 0 0 32 0 0 -1 0 0 0 0 0 0 -0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 29 -1 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 29 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 63 -1 0 0 0 1 0 0 -32 0 0 0 0 0 0 0 -2 -1 0 0 0 1 0 -32 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 2 0 -1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 31 - -1 # Parameter name(s) -T N h0 b0 b1 g0 g1 g2 g3 g4 t0 t1 - -# Statement number: -1 - -# Iteration domain of statement 1 (write_shared_A). -1 - -33 21 2 0 5 12 -0 0 1 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 1 -0 1 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 -0 0 0 0 0 1024 0 0 0 0 0 0 992 0 0 1 0 0 0 0 0 -0 0 0 0 2048 0 0 0 0 0 0 2016 0 0 1 0 0 0 0 0 0 -0 0 0 2 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 -0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 2 0 -1 0 0 0 0 0 0 0 0 0 -1 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 63 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 31 -1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 -32 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 1 0 0 -32 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 31 - -0 0 0 # For future options. - - -0 # Iterator name(s) -# --------------------- SCATTERING -------------------- -1 # Scattering functions - -# Scattering of statement 1 (write_shared_A). -1 - -37 25 4 2 5 12 -0 0 0 0 0 0 1 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 1 -0 0 0 0 0 1 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 -0 0 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 992 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 0 0 2048 0 0 0 0 0 0 2016 0 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 2 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 -0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 2 0 -1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 63 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 31 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -32 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -32 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 31 - -1 # Scattering dimension name(s) -c0 c1 c2 c3 diff --git a/cloog-0.16.3/test/isl/jacobi-shared.good.c b/cloog-0.16.3/test/isl/jacobi-shared.good.c deleted file mode 100644 index fcd67dc9316e499fdfaa0d878691c89806893c60..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/jacobi-shared.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/jacobi-shared.cloog by CLooG 0.16.2-19-gfcd8fdc gmp bits in 1.65s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int T, int N, int h0, int b0, int b1, int g0, int g1, int g2, int g3, int g4, int t0, int t1) -{ - /* Scattering iterators. */ - int c0, c1, c2, c3; - /* Original iterators. */ - int i, j; - if ((h0+1)%2 == 0) { - if ((16*floord(g1+t0-3,16) >= -N+g1+t0+1) && (16*floord(N+15*g1+15*t0+15,16) >= 16*g1+15*t0+17) && (floord(t1-1,32) <= floord(g2+t1-3,32)) && (32*floord(t1-1,32) >= -N+g2+t1+1)) { - for (c0=max(-16*floord(t0-1,16)+t0,-16*floord(g1+t0-3,16)+t0);c0<=min(32,N-g1-1);c0+=16) { - c1 = -32*floord(t1-1,32)+t1; - if (c1 <= 32) { - S1(c0+g1-1,c1+g2-1); - } - } - } - } -} diff --git a/cloog-0.16.3/test/isl/mod.c b/cloog-0.16.3/test/isl/mod.c deleted file mode 100644 index 4f6a15e327781333b7663bbc095a17e93496829f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod.cloog by CLooG 0.14.0-325-g71fa959 gmp bits in 0.00s. */ -for (i=0;i<=3;i++) { - if (i%3 <= 1) { - S1(i); - } -} diff --git a/cloog-0.16.3/test/isl/mod.cloog b/cloog-0.16.3/test/isl/mod.cloog deleted file mode 100644 index e12de40ce7597d2fb589520610ffb3d9888c5031..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod.cloog +++ /dev/null @@ -1,23 +0,0 @@ -c - -# Context: -0 2 - -0 # Parameter name(s) -# Statement number: -1 - -# Iteration domain of statement 1 -4 4 1 0 1 0 -1 1 0 0 -1 -1 0 3 -1 1 -3 0 -1 -1 3 1 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# No scattering functions. -0 diff --git a/cloog-0.16.3/test/isl/mod2.c b/cloog-0.16.3/test/isl/mod2.c deleted file mode 100644 index 4f6a15e327781333b7663bbc095a17e93496829f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod.cloog by CLooG 0.14.0-325-g71fa959 gmp bits in 0.00s. */ -for (i=0;i<=3;i++) { - if (i%3 <= 1) { - S1(i); - } -} diff --git a/cloog-0.16.3/test/isl/mod2.cloog b/cloog-0.16.3/test/isl/mod2.cloog deleted file mode 100644 index 1b09d5f510b14ea7ac75af39f41cc8093be0d42f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod2.cloog +++ /dev/null @@ -1,20 +0,0 @@ -# Language: C -c - -# Context: -0 2 - -0 # Parameter name(s) -# Statement number: -1 - -# Iteration domain of statement 1 -{ [i] : 0 <= i <= 3 and 0 <= i - 3*[i/3] <= 1 } - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# No scattering functions. -0 diff --git a/cloog-0.16.3/test/isl/mod3.c b/cloog-0.16.3/test/isl/mod3.c deleted file mode 100644 index 3fa291bac07868066fe752c7c5dba8de9303f557..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod3.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod3.cloog by CLooG 0.14.0-325-g62da9f7 gmp bits in 0.02s. */ -for (i=max(0,32*h0-1991);i<=min(999,32*h0+31);i++) { - if ((63*i+32*h0+31)%64 <= 62) { - for (j=0;j<=999;j++) { - S1(i,j); - } - } -} diff --git a/cloog-0.16.3/test/isl/mod3.cloog b/cloog-0.16.3/test/isl/mod3.cloog deleted file mode 100644 index 16370803c5ad33bb812f6c6e3b5829cea0713183..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod3.cloog +++ /dev/null @@ -1,34 +0,0 @@ -# Language: C -c - -# Context: -2 3 -1 -1 93 -1 1 0 - -1 # Parameter name(s) -h0 -# Statement number: -1 - -# Iteration domain of statement 1 -1 - -9 6 2 0 1 1 -1 1 0 0 0 0 -1 -1 0 0 0 999 -1 0 0 -1 0 31 -1 1 0 32 -32 999 -1 0 1 0 0 0 -1 0 -1 0 0 999 -1 1 0 64 -32 31 -1 -1 0 -64 32 31 -1 0 0 1 0 0 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# No scattering functions. -0 diff --git a/cloog-0.16.3/test/isl/mod4.c b/cloog-0.16.3/test/isl/mod4.c deleted file mode 100644 index 9a30f3c49d1f4be21b510b1d3e8a5686f8b5cf54..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod4.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod4.cloog by CLooG 0.16.0-9-g188dbd4 gmp bits in 0.00s. */ -if (M%11 <= 6) { - if (N%5 <= 2) { - if (M >= -N) { - for (i=0;i<=M+N;i++) { - S1(i); - } - } - } -} diff --git a/cloog-0.16.3/test/isl/mod4.cloog b/cloog-0.16.3/test/isl/mod4.cloog deleted file mode 100644 index d5837aed9f245d10909408aa1a633b25b4c5a4db..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mod4.cloog +++ /dev/null @@ -1,23 +0,0 @@ -c - -1 - -0 4 - -0 - -1 - -6 7 1 0 2 2 -1 0 -5 0 0 1 0 -1 0 5 0 0 -1 2 -1 0 0 -11 1 0 0 -1 0 0 11 -1 0 6 -1 1 0 0 0 0 0 -1 -1 0 0 1 1 0 - -0 0 0 - -0 - -0 diff --git a/cloog-0.16.3/test/isl/mxm-shared.c b/cloog-0.16.3/test/isl/mxm-shared.c deleted file mode 100644 index e5f4c662a93d3545c90ff593f457ef2ab58e4faf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mxm-shared.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mxm-shared.cloog by CLooG 0.16.1-5-gcba2a9f gmp bits in 0.34s. */ -if (g4%4 == 0) { - if ((N >= g0+t1+1) && (N >= g1+t0+1) && (t1 <= 7)) { - for (c0=t0;c0<=min(127,N-g1-1);c0+=16) { - S1(g0+t1,c0+g1); - } - } -} diff --git a/cloog-0.16.3/test/isl/mxm-shared.cloog b/cloog-0.16.3/test/isl/mxm-shared.cloog deleted file mode 100644 index f82b2ddf3348ef67b6d66a83a10bd3914cd0526c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/isl/mxm-shared.cloog +++ /dev/null @@ -1,162 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -1 - -19 15 0 0 3 10 -0 0 0 128 0 -8 0 1 0 0 0 0 0 0 0 -0 0 4096 0 0 0 128 0 -1 0 0 0 0 0 0 -0 8 0 0 0 0 0 -1 0 0 0 0 0 0 0 -0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 0 -1 0 0 -1 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 1 0 0 -1 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 15 - -1 # Parameter name(s) -N b0 b1 g0 g1 g2 g3 g4 t0 t1 - -# Statement number: -1 - -# Iteration domain of statement 1 (write_shared_C). -2 - -22 18 2 0 4 10 -0 0 -1 0 0 0 16 0 0 0 0 0 0 0 0 1 0 0 -0 0 0 0 0 128 0 0 8 0 -1 0 0 0 0 0 0 0 -0 0 0 0 4096 0 0 0 0 -128 0 1 0 0 0 0 0 0 -0 0 0 128 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 7 -1 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 - -24 19 2 0 5 10 -0 0 -1 0 0 0 0 16 0 0 0 0 0 0 0 0 1 0 0 -0 0 0 0 0 0 128 0 0 8 0 -1 0 0 0 0 0 0 0 -0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 -1 0 0 0 -0 0 0 0 4096 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -0 0 0 128 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 -0 0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 7 -1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 - -0 0 0 # For future options. - - -0 # Iterator name(s) -# --------------------- SCATTERING -------------------- -1 # Scattering functions - -# Scattering of statement 1 (write_shared_C). -2 - -27 22 4 2 4 10 -0 0 0 0 0 1 0 0 0 0 16 0 8 0 0 0 0 0 0 0 -1 0 -0 0 0 0 0 0 1 0 0 16 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 0 0 0 0 0 0 128 0 0 0 120 0 1 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 4096 0 0 0 0 0 3968 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 7 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 15 - -29 23 4 2 5 10 -0 0 0 0 0 1 0 0 0 0 0 16 0 8 0 0 0 0 0 0 0 -1 0 -0 0 0 0 0 0 1 0 0 0 16 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 0 0 0 0 0 0 0 128 0 0 0 120 0 1 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 4096 0 0 0 0 0 3968 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 -1 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 7 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 15 - -1 # Scattering dimension name(s) -c0 c1 c2 c3 diff --git a/cloog-0.16.3/test/largeur.c b/cloog-0.16.3/test/largeur.c deleted file mode 100644 index ff49b940355ad49b943db270793a508fc7d6a2dc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/largeur.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/largeur.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 1) { - for (c1=1;c1<=M;c1++) { - for (c2=1;c2<=c1;c2++) { - S1(c2,c1) ; - } - } -} diff --git a/cloog-0.16.3/test/largeur.cloog b/cloog-0.16.3/test/largeur.cloog deleted file mode 100644 index fe372da4b15b348370da587c606b1af9e3fbd4c7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/largeur.cloog +++ /dev/null @@ -1,26 +0,0 @@ -# language: C -c - -# parameters {n | n>= 0} -1 3 -1 1 0 -0 - -1 # Number of statements - -1 -# {i, j | 1<=i<=n i<=j<=n} -4 5 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 0 -1 0 -1 1 0 -0 0 0 -0 - -1 # Scattering functions -# Et les instructions de chunking... -2 7 -0 1 0 0 -1 0 0 -0 0 1 -1 0 0 0 -0 diff --git a/cloog-0.16.3/test/largeur.good.c b/cloog-0.16.3/test/largeur.good.c deleted file mode 100644 index 10f63edb30dce455cd4a1e0982fce3c1bf804e4f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/largeur.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/largeur.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=1;c1<=M;c1++) { - for (c2=1;c2<=c1;c2++) { - S1(c2,c1) ; - } - } -} diff --git a/cloog-0.16.3/test/levenshtein-1-2-3.c b/cloog-0.16.3/test/levenshtein-1-2-3.c deleted file mode 100644 index 224bd294c1cd2bd620a6d4546536f1094edce8ea..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/levenshtein-1-2-3.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.12s. */ -S1(0,0) ; -S2(1,0) ; -S3(1,1) ; -for (i=2;i<=N;i++) { - S2(i,0) ; - for (j=1;j<=i-1;j++) { - S6(i,j) ; - } - S3(i,i) ; -} -S7(N+1,0) ; -for (j=1;j<=N;j++) { - S6(N+1,j) ; - S8(N+1,j) ; -} -for (i=N+2;i<=2*M-N-2;i++) { - j = floord(i-N-1,2) ; - S7(i,j) ; - if ((i+N)%2 == 0) { - S5(i,(i-N)/2) ; - S8(i,(i-N)/2) ; - } - for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) { - S6(i,j) ; - S8(i,j) ; - } - if ((i+N)%2 == 0) { - S4(i,(i+N)/2) ; - S8(i,(i+N)/2) ; - } -} -for (i=2*M-N-1;i<=2*M-2;i++) { - for (j=i-M+1;j<=M-1;j++) { - S6(i,j) ; - } -} diff --git a/cloog-0.16.3/test/levenshtein-1-2-3.cloog b/cloog-0.16.3/test/levenshtein-1-2-3.cloog deleted file mode 100644 index acc6522e8686d73a5fbffd2baef7a6b02fed3fc9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/levenshtein-1-2-3.cloog +++ /dev/null @@ -1,110 +0,0 @@ -# language: C -c - -# Context -# {length,width | width+2<=length; 1<=width} -3 4 -# M N 1 -1 1 -1 -2 -1 0 1 -1 -1 0 0 1 -0 - -8 # Number of statements - -1 -# {t1,t2,length,width | t1=0; t2=0; width+2<=length; 1<=width} -5 6 -# i j M N 1 -0 1 0 0 0 0 -0 0 1 0 0 0 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | 1<=t1<=width; t2=0; width+2<=length} -5 6 -# i j M N 1 -0 0 1 0 0 0 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=t2; 1<=t2<=width; width+2<=length} -5 6 -# i j M N 1 -0 1 -1 0 0 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2-width; width+1<=t2<=length-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 1 0 -1 0 1 0 -1 -1 -1 0 -1 1 0 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2+width; 1<=t2<=length-width-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 -1 0 -1 0 1 0 0 -1 -1 0 -1 1 -1 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (2t2-width+1,t2+1)<=t1<=(t2+length-1,2t2+width-1); 1<=t2<=length-1; width+2<=length} -8 6 -# i j M N 1 -1 1 -2 0 1 -1 -1 1 -1 0 0 -1 -1 -1 1 1 0 -1 -1 -1 2 0 1 -1 -1 0 1 0 0 -1 -1 0 -1 1 0 -1 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2+width+1)<=t1<=(2length-width-2,2t2+width+2); width+2<=length; 1<=width} -6 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 -1 -1 -1 -1 0 2 -1 -2 -1 -1 2 0 1 2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2-width)<=t1<=(2t2+width,2length-width-2); width+2<=length; 1<=width} -7 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 1 0 -1 -1 2 0 1 0 -1 -1 0 2 -1 -2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/levenshtein-1-2-3.good.c b/cloog-0.16.3/test/levenshtein-1-2-3.good.c deleted file mode 100644 index 76548ea2ed3153f4c219c2623eb01a6db6cef2b0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/levenshtein-1-2-3.good.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j) { hash(5); hash(i); hash(j); } -#define S6(i,j) { hash(6); hash(i); hash(j); } -#define S7(i,j) { hash(7); hash(i); hash(j); } -#define S8(i,j) { hash(8); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - S1(0,0) ; - S2(1,0) ; - S3(1,1) ; - for (i=2;i<=N;i++) { - S2(i,0) ; - for (j=1;j<=i-1;j++) { - S6(i,j) ; - } - S3(i,i) ; - } - i = N+1 ; - S7(N+1,0) ; - for (j=1;j<=N;j++) { - S6(N+1,j) ; - S8(N+1,j) ; - } - for (i=N+2;i<=2*M-N-2;i++) { - j = floord(i-N-1,2) ; - S7(i,j) ; - if ((i+N)%2 == 0) { - j = (i-N)/2 ; - S5(i,(i-N)/2) ; - S8(i,(i-N)/2) ; - } - for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) { - S6(i,j) ; - S8(i,j) ; - } - if ((i+N)%2 == 0) { - j = (i+N)/2 ; - S4(i,(i+N)/2) ; - S8(i,(i+N)/2) ; - } - } - for (i=2*M-N-1;i<=2*M-2;i++) { - for (j=i-M+1;j<=M-1;j++) { - S6(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/levenshtein-1-2-3f.cloog b/cloog-0.16.3/test/levenshtein-1-2-3f.cloog deleted file mode 100644 index c78bc1955590757ec9e64a8a32df455796e983a2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/levenshtein-1-2-3f.cloog +++ /dev/null @@ -1,110 +0,0 @@ -# language: FORTRAN -f - -# Context -# {length,width | width+2<=length; 1<=width} -3 4 -# M N 1 -1 1 -1 -2 -1 0 1 -1 -1 0 0 1 -0 - -8 # Number of statements - -1 -# {t1,t2,length,width | t1=0; t2=0; width+2<=length; 1<=width} -5 6 -# i j M N 1 -0 1 0 0 0 0 -0 0 1 0 0 0 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | 1<=t1<=width; t2=0; width+2<=length} -5 6 -# i j M N 1 -0 0 1 0 0 0 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=t2; 1<=t2<=width; width+2<=length} -5 6 -# i j M N 1 -0 1 -1 0 0 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2-width; width+1<=t2<=length-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 1 0 -1 0 1 0 -1 -1 -1 0 -1 1 0 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2+width; 1<=t2<=length-width-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 -1 0 -1 0 1 0 0 -1 -1 0 -1 1 -1 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (2t2-width+1,t2+1)<=t1<=(t2+length-1,2t2+width-1); 1<=t2<=length-1; width+2<=length} -8 6 -# i j M N 1 -1 1 -2 0 1 -1 -1 1 -1 0 0 -1 -1 -1 1 1 0 -1 -1 -1 2 0 1 -1 -1 0 1 0 0 -1 -1 0 -1 1 0 -1 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2+width+1)<=t1<=(2length-width-2,2t2+width+2); width+2<=length; 1<=width} -6 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 -1 -1 -1 -1 0 2 -1 -2 -1 -1 2 0 1 2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2-width)<=t1<=(2t2+width,2length-width-2); width+2<=length; 1<=width} -7 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 1 0 -1 -1 2 0 1 0 -1 -1 0 2 -1 -2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/levenshtein-1-2-3f.f b/cloog-0.16.3/test/levenshtein-1-2-3f.f deleted file mode 100644 index 5a579501fa43537772ed39b634b8fb4463d93b13..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/levenshtein-1-2-3f.f +++ /dev/null @@ -1,37 +0,0 @@ -! Generated from ../../../git/cloog/test/levenshtein-1-2-3f.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.11s. -S1(0,0) -S2(1,0) -S3(1,1) -DO i=2, N - S2(i,0) - DO j=1, i-1 - S6(i,j) - END DO - S3(i,i) -END DO -S7(N+1,0) -DO j=1, N - S6(N+1,j) - S8(N+1,j) -END DO -DO i=N+2, 2*M-N-2 - j = FLOOR(REAL(i-N-1)/REAL(2)) - S7(i,j) - IF (MOD(i+N, 2) == 0) THEN - S5(i,(i-N)/2) - S8(i,(i-N)/2) - END IF - DO j=CEILING(REAL(i-N+1)/REAL(2)), FLOOR(REAL(i+N-1)/REAL(2)) - S6(i,j) - S8(i,j) - END DO - IF (MOD(i+N, 2) == 0) THEN - S4(i,(i+N)/2) - S8(i,(i+N)/2) - END IF -END DO -DO i=2*M-N-1, 2*M-2 - DO j=i-M+1, M-1 - S6(i,j) - END DO -END DO diff --git a/cloog-0.16.3/test/lex.c b/cloog-0.16.3/test/lex.c deleted file mode 100644 index 52df96d233ed55c910bbc8042f89830e1f8140e7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lex.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lex.cloog by CLooG 0.14.0-234-g330f397 gmp bits in 0.00s. */ -for (c1=0;c1<=10;c1++) { - S2(c1); - S1(c1); -} diff --git a/cloog-0.16.3/test/lex.cloog b/cloog-0.16.3/test/lex.cloog deleted file mode 100644 index a7e2b8876fdd448659c6df07a21fc77d30baa3ba..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lex.cloog +++ /dev/null @@ -1,35 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -2 3 -1 1 0 -1 -1 10 -0 0 0 - -1 -2 3 -1 1 0 -1 -1 10 -0 0 0 - -0 - -2 - -3 6 -0 -1 0 0 1 0 -0 0 -1 0 0 0 -0 0 0 -1 0 0 - -3 6 -0 -1 0 0 1 0 -0 0 -1 0 0 -1 -0 0 0 -1 0 0 - -0 diff --git a/cloog-0.16.3/test/lex.good.c b/cloog-0.16.3/test/lex.good.c deleted file mode 100644 index 4769fb106758a693259940710d622461057d70da..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lex.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lex.cloog by CLooG 0.14.0-234-g330f397 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - for (c1=0;c1<=10;c1++) { - S2(c1); - S1(c1); - } -} diff --git a/cloog-0.16.3/test/lineality-1-2.c b/cloog-0.16.3/test/lineality-1-2.c deleted file mode 100644 index 9bd902e9571e0e1716584887f3157fc91bf25691..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lineality-1-2.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lineality-1-2.cloog by CLooG 0.14.0-284-g5c046c9 gmp bits in 0.00s. */ -for (i=1;i<=M;i++) { - for (j=1;j<=i-1;j++) { - S1(i,j); - } - S1(i,i); - S2(i,i); - for (j=i+1;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/lineality-1-2.cloog b/cloog-0.16.3/test/lineality-1-2.cloog deleted file mode 100644 index 7629fd8deaa6a3df6fa5e3032dc68c1ac55e7873..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lineality-1-2.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# Context -# {M | 2<=M} -2 3 -# M 1 -1 1 -2 -1 0 1 -0 - -2 # Number of statements - -1 -# {i,j,M | 1<=i<=M; 1<=j<=M} -5 5 -# i j M 1 -1 1 0 0 -1 -1 0 1 0 -1 -1 -1 0 1 0 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 - -1 -# {i,j,M | i=j; 1<=j<=M} -4 5 -# i j M 1 -0 1 -1 0 0 -1 0 1 0 -1 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/lineality-1-2.good.c b/cloog-0.16.3/test/lineality-1-2.good.c deleted file mode 100644 index d28268f23f07b92d4bb819cb0ce5959ac6db0678..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lineality-1-2.good.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/lineality-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - S1(1,1) ; - S2(1,1) ; - for (j=2;j<=M;j++) { - S1(1,j) ; - } - for (i=2;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - S1(i,j) ; - } - S1(i,i) ; - S2(i,i) ; - for (j=i+1;j<=M;j++) { - S1(i,j) ; - } - } - for (j=1;j<=M-1;j++) { - S1(M,j) ; - } - S1(M,M) ; - S2(M,M) ; -} diff --git a/cloog-0.16.3/test/lineality-2-1-2.c b/cloog-0.16.3/test/lineality-2-1-2.c deleted file mode 100644 index 37a7e2a7f200f6f2d030232c51c6d38299dd042a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lineality-2-1-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lineality-2-1-2.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -for (i=1;i<=M;i++) { - for (j=1;j<=min(M,i+1);j++) { - S1(i,j); - } - if (i >= M-1) { - S2(i,i+2); - } - if (i <= M-2) { - S1(i,i+2); - S2(i,i+2); - } - for (j=i+3;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/lineality-2-1-2.cloog b/cloog-0.16.3/test/lineality-2-1-2.cloog deleted file mode 100644 index a6ae5e1a249d4e352d8ae3ab750afccf280c0b9f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lineality-2-1-2.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# Context -# {M | 2<=M} -2 3 -# M 1 -1 1 -2 -1 0 1 -0 - -2 # Number of statements - -1 -# {i,j,M | 1<=i<=M; 1<=j<=M} -5 5 -# i j M 1 -1 1 0 0 -1 -1 0 1 0 -1 -1 -1 0 1 0 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 - -1 -# {i,j,M | i=j-2; 3<=j<=M+2} -4 5 -# i j M 1 -0 1 -1 0 2 -1 0 1 0 -3 -1 0 -1 1 2 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/lineality-2-1-2.good.c b/cloog-0.16.3/test/lineality-2-1-2.good.c deleted file mode 100644 index 78d812669e1dd2cdb18f407a32bb9c04546a5417..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lineality-2-1-2.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/lineality-2-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (i=1;i<=M-3;i++) { - for (j=1;j<=i+1;j++) { - S1(i,j) ; - } - j = i+2 ; - S1(i,i+2) ; - S2(i,i+2) ; - for (j=i+3;j<=M;j++) { - S1(i,j) ; - } - } - if (M >= 3) { - i = M-2 ; - for (j=1;j<=M-1;j++) { - S1(M-2,j) ; - } - S1(M-2,M) ; - S2(M-2,M) ; - } - for (i=M-1;i<=M;i++) { - for (j=1;j<=M;j++) { - S1(i,j) ; - } - j = i+2 ; - S2(i,i+2) ; - } -} diff --git a/cloog-0.16.3/test/logo.c b/cloog-0.16.3/test/logo.c deleted file mode 100644 index 54d229ded1fef0a23028b12f9ee8b3d401831f7f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/logo.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/logo.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -for (j=0;j<=7;j++) { - S1(1,j); -} -for (i=2;i<=6;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j); - } - for (j=i-1;j<=4;j++) { - S1(i,j); - S2(i,j); - } - for (j=5;j<=7;j++) { - S1(i,j); - } -} -for (i=7;i<=8;i++) { - for (j=i-1;j<=7;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/logo.cloog b/cloog-0.16.3/test/logo.cloog deleted file mode 100644 index 5583c29fda0744d734e5b99faa3e7cac7fd58313..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/logo.cloog +++ /dev/null @@ -1,30 +0,0 @@ -# language: C -c - -# Context -1 3 -# n 1 -1 0 1 -0 - -2 # Number of statements - -1 -3 5 -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 0 -1 0 7 # j <= 7 -1 -1 1 0 1 # j >= i-1 -0 0 0 - -1 -4 5 -# i j n 1 -1 1 0 0 -2 # i >= 2 -1 -1 0 0 6 # i <= 6 -1 0 1 0 0 # j >= 0 -1 0 -1 0 4 # j <= 4 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/logo.good.c b/cloog-0.16.3/test/logo.good.c deleted file mode 100644 index 203e5ac5087846ed7744bfcd3ee3dc63cc3ba51b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/logo.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/logo.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (j=0;j<=7;j++) { - S1(1,j) ; - } - for (i=2;i<=5;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j) ; - } - for (j=i-1;j<=4;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=5;j<=7;j++) { - S1(i,j) ; - } - } - for (j=0;j<=4;j++) { - S2(6,j) ; - } - for (j=5;j<=7;j++) { - S1(6,j) ; - } - for (i=7;i<=8;i++) { - for (j=i-1;j<=7;j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/logopar.c b/cloog-0.16.3/test/logopar.c deleted file mode 100644 index 0b2c8f9f4d6219fc0d933c14287d665f94e54012..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/logopar.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/logopar.cloog by CLooG 0.14.0-284-g5c046c9 gmp bits in 0.00s. */ -for (j=0;j<=m;j++) { - S1(1,j); -} -for (i=2;i<=n;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j); - } - for (j=i-1;j<=n;j++) { - S1(i,j); - S2(i,j); - } - for (j=n+1;j<=m;j++) { - S1(i,j); - } -} -for (i=n+1;i<=m+1;i++) { - for (j=i-1;j<=m;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/logopar.cloog b/cloog-0.16.3/test/logopar.cloog deleted file mode 100644 index 37114ae7940e04cca785fa9fb81d2c25485add5c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/logopar.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# Context -3 4 -# m n 1 -1 1 -1 0 # m > n -1 1 0 0 # m >= 0 -1 0 1 -2 # n >= 2 -1 -m n - -2 # Number of statements - -1 -3 6 -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 0 -1 1 0 0 # j <= m -1 -1 1 0 0 1 # j >= i-1 -0 0 0 - -1 -4 6 -# i j m n 1 -1 1 0 0 0 -2 # i >= 2 -1 -1 0 0 1 0 # i <= n -1 0 1 0 0 0 # j >= 0 -1 0 -1 0 1 0 # j <= n -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/logopar.good.c b/cloog-0.16.3/test/logopar.good.c deleted file mode 100644 index 2b03ca284947e5dcebdb1c434a42817d214988c9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/logopar.good.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Generated from ../../../git/cloog/test/logopar.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int m, int n) -{ - /* Original iterators. */ - int i, j; - for (j=0;j<=m;j++) { - S1(1,j) ; - } - if (m >= n+1) { - for (i=2;i<=n;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j) ; - } - for (j=i-1;j<=n;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=n+1;j<=m;j++) { - S1(i,j) ; - } - } - } - if (m == n) { - for (i=2;i<=n;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j) ; - } - for (j=i-1;j<=n;j++) { - S1(i,j) ; - S2(i,j) ; - } - } - } - for (i=n+1;i<=m+1;i++) { - for (j=i-1;j<=m;j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/lu.c b/cloog-0.16.3/test/lu.c deleted file mode 100644 index 74ec81f82f080abfd74ff5b0eb3addcfffe1ac5a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lu.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ -if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j); - } - for (c1=2;c1<=n-1;c1++) { - for (c2=2;c2<=n;c2++) { - for (i=1;i<=min(c1-1,c2-1);i++) { - S2(i,c2,c1); - } - } - for (j=c1+1;j<=n;j++) { - S1(c1,j); - } - } - for (c2=2;c2<=n;c2++) { - for (i=1;i<=c2-1;i++) { - S2(i,c2,n); - } - } -} diff --git a/cloog-0.16.3/test/lu.cloog b/cloog-0.16.3/test/lu.cloog deleted file mode 100644 index 77530069cedea210e4d185d97340b19298c13792..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lu.cloog +++ /dev/null @@ -1,47 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -1 -n - -2 # Number of statements - -1 -# {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 # Scattering functions -# Et les instructions de chunking... -2 7 -# c1 c2 i j n 1 -0 1 0 -1 0 0 0 -0 0 1 0 0 -1 0 - -2 8 -# c1 c2 i j k n 1 -0 1 0 0 0 -1 0 0 -0 0 1 0 -1 0 0 0 -0 diff --git a/cloog-0.16.3/test/lu.good.c b/cloog-0.16.3/test/lu.good.c deleted file mode 100644 index 5e9d3d2fc48a015236bd30b41a0f2ef10340a737..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lu.good.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j, k; - if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j) ; - } - } - for (c1=2;c1<=n-1;c1++) { - for (c2=2;c2<=n-1;c2++) { - for (i=1;i<=min(c2-1,c1-1);i++) { - S2(i,c2,c1) ; - } - } - for (i=1;i<=c1-1;i++) { - S2(i,n,c1) ; - } - for (j=c1+1;j<=n;j++) { - S1(c1,j) ; - } - } - if (n >= 2) { - for (c2=2;c2<=n;c2++) { - for (i=1;i<=c2-1;i++) { - S2(i,c2,n) ; - } - } - } -} diff --git a/cloog-0.16.3/test/lu2.c b/cloog-0.16.3/test/lu2.c deleted file mode 100644 index 2f3b34bf7d1458df4fe3c1982b4cf1237402eb6d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lu2.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu2.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ -if (n >= 2) { - for (l=2;l<=n;l++) { - S1(1,n,1,l); - } - for (i=2;i<=n-1;i++) { - for (j=2;j<=n;j++) { - for (k=1;k<=min(i-1,j-1);k++) { - S2(i,j,k,j,i); - } - } - for (l=i+1;l<=n;l++) { - S1(i,n,i,l); - } - } - for (j=2;j<=n;j++) { - for (k=1;k<=j-1;k++) { - S2(n,j,k,j,n); - } - } -} diff --git a/cloog-0.16.3/test/lu2.cloog b/cloog-0.16.3/test/lu2.cloog deleted file mode 100644 index 5775e4939896c7404769c362c07512b6097aeb45..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lu2.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# language: C -c - -# parameter n -1 3 -1 0 1 -1 -n - -2 # Number of statements - -1 -# {c1, c2, i, j | c1=i, c2=n, 1<=i<=n; i+1<=j<=n} -6 7 -0 1 0 -1 0 0 0 -0 0 1 0 0 -1 0 -1 0 0 1 0 0 -1 -1 0 0 -1 0 1 0 -1 0 0 -1 1 0 -1 -1 0 0 0 -1 1 0 -0 0 0 - -1 -# {c1, c2, i, j, k | c1=k, c2=j, 1<=i<=n; i+1<=j<=n i+1<=k<=n} -8 8 -0 1 0 0 0 -1 0 0 -0 0 1 0 -1 0 0 0 -1 0 0 1 0 0 0 -1 -1 0 0 -1 0 0 1 0 -1 0 0 -1 1 0 0 -1 -1 0 0 0 -1 0 1 0 -1 0 0 -1 0 1 0 -1 -1 0 0 0 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/lu2.good.c b/cloog-0.16.3/test/lu2.good.c deleted file mode 100644 index 56418569262198b46aba5fa93e67d87b36edc29d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lu2.good.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } -#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } - -void test(int n) -{ - /* Original iterators. */ - int i, j, k, l, m; - if (n >= 2) { - for (l=2;l<=n;l++) { - S1(1,n,1,l) ; - } - } - for (i=2;i<=n-1;i++) { - for (j=2;j<=n-1;j++) { - for (k=1;k<=min(j-1,i-1);k++) { - S2(i,j,k,j,i) ; - } - } - for (k=1;k<=i-1;k++) { - S2(i,n,k,n,i) ; - } - for (l=i+1;l<=n;l++) { - S1(i,n,i,l) ; - } - } - if (n >= 2) { - for (j=2;j<=n;j++) { - for (k=1;k<=j-1;k++) { - S2(n,j,k,j,n) ; - } - } - } -} diff --git a/cloog-0.16.3/test/lub.c b/cloog-0.16.3/test/lub.c deleted file mode 100644 index 43269a4f20d7f763d9b939cfbd7728a7cc55ba1e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lub.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/lub.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 2) { - for (i=1;i<=M-1;i++) { - for (j=i+1;j<=M;j++) { - S1(i,j) ; - for (k=i+1;k<=M;k++) { - S2(i,j,k) ; - S3(i,j,k) ; - } - S4(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/lub.cloog b/cloog-0.16.3/test/lub.cloog deleted file mode 100644 index fcab9b59f658added2bc1f4785803aa10f9ee674..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lub.cloog +++ /dev/null @@ -1,58 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -4 # Number of statements - -1 -# {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions - diff --git a/cloog-0.16.3/test/lub.good.c b/cloog-0.16.3/test/lub.good.c deleted file mode 100644 index 3122a3cbe277a1263675373b3fdcca61d39e662f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lub.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/lub.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j, k; - for (i=1;i<=M-1;i++) { - for (j=i+1;j<=M;j++) { - S1(i,j) ; - for (k=i+1;k<=M;k++) { - S2(i,j,k) ; - S3(i,j,k) ; - } - S4(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/lux.c b/cloog-0.16.3/test/lux.c deleted file mode 100644 index d313e3a90e9d7d027df8fcc0638fd9dcbcd830ba..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lux.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/lux.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 2) { - for (l=2;l<=M;l++) { - S1(1,1,M,l) ; - } - for (i=2;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - for (k=j+1;k<=M;k++) { - S2(i,j,k,k,i) ; - } - } - for (l=i+1;l<=M;l++) { - S1(i,i,M,l) ; - } - } - for (j=1;j<=M-1;j++) { - for (k=j+1;k<=M;k++) { - S2(M,j,k,k,M) ; - } - } -} diff --git a/cloog-0.16.3/test/lux.cloog b/cloog-0.16.3/test/lux.cloog deleted file mode 100644 index 1687e32c82cbb49b84f68ca0650d5839a077e0e5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lux.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# parameter n -1 3 -1 0 1 -0 - -2 # Number of statements - -1 -# {c1, c2, i, j | c1=i, c2=n, 1<=i<=n; i+1<=j<=n} -6 7 -0 1 -1 0 0 0 0 -0 0 0 1 0 -1 0 -1 0 1 0 0 0 -1 -1 0 -1 0 0 1 0 -1 0 -1 0 1 0 -1 -1 0 0 0 -1 1 0 -0 0 0 - -1 -# {c1, c2, i, j, k | c1=k, c2=j, 1<=i<=n; i+1<=j<=n i+1<=k<=n} -8 8 -0 1 0 0 0 -1 0 0 -0 0 0 -1 1 0 0 0 -1 0 1 0 0 0 0 -1 -1 0 -1 0 0 0 1 0 -1 0 -1 1 0 0 0 -1 -1 0 0 -1 0 0 1 0 -1 0 -1 0 0 1 0 -1 -1 0 0 0 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/lux.good.c b/cloog-0.16.3/test/lux.good.c deleted file mode 100644 index e30289c16f3c64a6e080a70636ca08ce2dc8c6fc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/lux.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/lux.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } -#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } - -void test(int M) -{ - /* Original iterators. */ - int i, j, k, l, m; - if (M >= 2) { - for (l=2;l<=M;l++) { - S1(1,1,M,l) ; - } - } - for (i=2;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - for (k=j+1;k<=M;k++) { - S2(i,j,k,k,i) ; - } - } - for (l=i+1;l<=M;l++) { - S1(i,i,M,l) ; - } - } - if (M >= 2) { - for (j=1;j<=M-1;j++) { - for (k=j+1;k<=M;k++) { - S2(M,j,k,k,M) ; - } - } - } -} diff --git a/cloog-0.16.3/test/merge.c b/cloog-0.16.3/test/merge.c deleted file mode 100644 index b85ca1c2e1392deeaea93fe203a4a1b44adb9aa0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/merge.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/merge.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.00s. */ -S1(0); -for (c1=0;c1<=10;c1++) { - if (c1 >= 2) { - S2(c1); - } - S3(c1); -} diff --git a/cloog-0.16.3/test/merge.cloog b/cloog-0.16.3/test/merge.cloog deleted file mode 100644 index d98c1d0b8a3b0b39a2c06cd416717add4ee861e6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/merge.cloog +++ /dev/null @@ -1,42 +0,0 @@ -c - -0 2 - -0 - -3 - -1 -1 3 -0 -1 0 -0 0 0 - -1 -2 3 -1 1 -2 -1 -1 10 -0 0 0 - -1 -2 3 -1 1 0 -1 -1 10 -0 0 0 - -0 - -3 - -2 5 -0 1 0 -1 0 -0 0 1 0 0 - -2 5 -0 1 0 -1 0 -0 0 1 0 -1 - -2 5 -0 1 0 -1 0 -0 0 1 0 -2 - -0 diff --git a/cloog-0.16.3/test/merge.good.c b/cloog-0.16.3/test/merge.good.c deleted file mode 100644 index 283dc4b753667d64c06db28abb60c6794038513a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/merge.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/merge.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } -#define S3(i) { hash(3); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - for (c1=0;c1<=10;c1++) { - if (c1 == 0) { - S1(0) ; - } - if (c1 >= 2) { - S2(c1) ; - } - S3(c1) ; - } -} diff --git a/cloog-0.16.3/test/min-1-1.c b/cloog-0.16.3/test/min-1-1.c deleted file mode 100644 index 896fea083e3046e9854d39eeff1a0e133bc45273..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-1-1.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-1-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((M >= 0) && (N >= 1)) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(M,i),-i+N);j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/min-1-1.cloog b/cloog-0.16.3/test/min-1-1.cloog deleted file mode 100644 index a15cdbd44ac2e6b507b025cd2754a45babc54b3d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-1-1.cloog +++ /dev/null @@ -1,27 +0,0 @@ -# language: C -c - -# Context -# {M,N | 1>=0} -1 4 -# M N 1 -1 0 0 1 -0 - -1 # Number of statements - -1 -# {i,j |1<=i<=N; 0<=j<=M; j<=i; j+i<=N}, i.e. -# {i,j | (1,j)<=i<=-j+N; 0<=j<=M} -6 6 -# i j M N 1 -1 1 0 0 0 -1 -1 0 1 0 0 0 -1 0 -1 1 0 0 -1 1 -1 0 0 0 -1 -1 -1 0 1 0 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/min-1-1.good.c b/cloog-0.16.3/test/min-1-1.good.c deleted file mode 100644 index ff0d5fc7ffd1f7f677de8ae70aca25292937185f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-1-1.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-1-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - if (M >= 0) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(i,-i+N),M);j++) { - S1(i,j) ; - } - } - } -} diff --git a/cloog-0.16.3/test/min-2-1.c b/cloog-0.16.3/test/min-2-1.c deleted file mode 100644 index f7161bcbaf9ccdb576ee77cc5ce7b0eee2e6e3d1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-2-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-2-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((M >= 0) && (N >= 1)) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(M,i),-i+N);j++) { - for (k=0;k<=min(min(M,i),-i+N);k++) { - S1(i,j,k) ; - } - } - } -} diff --git a/cloog-0.16.3/test/min-2-1.cloog b/cloog-0.16.3/test/min-2-1.cloog deleted file mode 100644 index 0c1ed371b25bcdcea1015e65a309424de74898aa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-2-1.cloog +++ /dev/null @@ -1,31 +0,0 @@ -# language: C -c - -# Context -# {M,N | 1>=0} -1 4 -# M N 1 -1 0 0 1 -0 - -1 # Number of statements - -1 -# {i,j |1<=i<=N; 0<=j<=M; j<=i; j+i<=N}, i.e. -# {i,j | (1,j)<=i<=-j+N; 0<=j<=M} -10 7 -# i j k M N 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 0 0 -1 0 -1 0 1 0 0 -1 1 -1 0 0 0 0 -1 -1 -1 0 0 1 0 -1 0 0 1 0 0 0 -1 0 0 -1 1 0 0 -1 1 0 -1 0 0 0 -1 -1 0 -1 0 1 0 -1 0 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/min-2-1.good.c b/cloog-0.16.3/test/min-2-1.good.c deleted file mode 100644 index e052a0c00bb8a071ce842560c078fba30fbef0ed..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-2-1.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-2-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j, k; - if (M >= 0) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(i,M),-i+N);j++) { - for (k=0;k<=min(min(M,i),-i+N);k++) { - S1(i,j,k) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/min-3-1.c b/cloog-0.16.3/test/min-3-1.c deleted file mode 100644 index 5736a3cd08a189a1581c7316276ff9a12df7a62e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-3-1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-3-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=min(10,M);i++) { - for (j=0;j<=min(10,M);j++) { - S1(i,j) ; - } -} diff --git a/cloog-0.16.3/test/min-3-1.cloog b/cloog-0.16.3/test/min-3-1.cloog deleted file mode 100644 index f1a3c125bb62c1ffa19d08bc99038e2727a73488..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-3-1.cloog +++ /dev/null @@ -1,27 +0,0 @@ -# language: C -c - -# Context -2 3 -# M 1 -1 1 0 -1 0 1 -0 - -1 # Number of statements - -1 -# -7 5 -# i j M 1 -1 1 0 0 0 -1 -1 0 1 0 -1 -1 0 0 10 -1 0 1 0 0 -1 0 -1 1 0 -1 0 -1 0 10 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/min-3-1.good.c b/cloog-0.16.3/test/min-3-1.good.c deleted file mode 100644 index ec50b387994a81f78cafa26bedc67b887b1ccc8c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-3-1.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-3-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=min(10,M);i++) { - for (j=0;j<=min(10,M);j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/min-4-1.c b/cloog-0.16.3/test/min-4-1.c deleted file mode 100644 index 91e5e657967bd5d7bfe96e6339809c1b1ffa9850..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-4-1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-4-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((M >= -N) && (M >= -O) && (N >= 0) && (N >= -O)) { - for (i=max(-M,-N);i<=min(N,O);i++) { - S1(i) ; - } -} diff --git a/cloog-0.16.3/test/min-4-1.cloog b/cloog-0.16.3/test/min-4-1.cloog deleted file mode 100644 index 5cce62fceb7234ed0e5bb01ea6416108af27bddf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-4-1.cloog +++ /dev/null @@ -1,25 +0,0 @@ -# language: C -c - -# Context -# {L,M,N|} -1 5 -# L M N 1 -1 0 0 0 1 -0 - -1 # Number of statements - -1 -# {i|-L,-M <= i <= M, N} -5 6 -# i L M N 1 -1 1 1 0 0 0 -1 1 0 1 0 0 -1 -1 0 1 0 0 -1 -1 0 0 1 0 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/min-4-1.good.c b/cloog-0.16.3/test/min-4-1.good.c deleted file mode 100644 index a04831fea85e439ddaffbf01244cb8bb7f4707a8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/min-4-1.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-4-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M, int N, int O) -{ - /* Original iterators. */ - int i; - for (i=max(-M,-N);i<=min(O,N);i++) { - S1(i) ; - } -} diff --git a/cloog-0.16.3/test/mod4.c b/cloog-0.16.3/test/mod4.c deleted file mode 100644 index 6a1ad6ab1b2ebe6905f687faefc0657996cf8c97..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/mod4.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/mod4.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.00s. */ -for (j=2;j<=10;j+=3) { - S1(j,(j+1)/3,(j+1)/3,2,(j-2)/3); - S2(j,(j+1)/3,(j+1)/3,2,(j-2)/3); - S3(j,(j+1)/3,(j+1)/3,2,(j-2)/3); -} diff --git a/cloog-0.16.3/test/mod4.cloog b/cloog-0.16.3/test/mod4.cloog deleted file mode 100644 index 6f3eecd560b003948df3b30b79a27cca5cd11824..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/mod4.cloog +++ /dev/null @@ -1,72 +0,0 @@ -# language: C -c - -# parameters -1 2 -1 1 - 0 - - -3 - - - -# S1: ND_4IP_3 -1 -11 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 0 10 - 0 0 0 0 1 0 -2 - 1 -1 0 0 0 3 2 - 1 -1 0 0 0 3 2 - 1 1 0 0 0 -3 0 - 0 1 0 0 -1 -3 0 - 1 1 -3 0 0 0 2 - 1 -1 3 0 0 0 0 - 1 1 0 -3 0 0 1 - 1 -1 0 3 0 0 1 - 0 0 0 - - - -# S2: W:ND_4OP_1 -1 -13 7 - 1 0 1 0 0 -1 -1 - 1 0 0 3 0 -3 -2 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 0 10 - 0 0 0 0 1 0 -2 - 1 -1 0 0 0 3 2 - 1 -1 0 0 0 3 2 - 1 1 0 0 0 -3 0 - 0 1 0 0 -1 -3 0 - 1 1 -3 0 0 0 2 - 1 -1 3 0 0 0 0 - 1 1 0 -3 0 0 1 - 1 -1 0 3 0 0 1 - 0 0 0 - - - -# S3: ND_4 -1 -11 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 0 10 - 0 0 0 0 1 0 -2 - 1 -1 0 0 0 3 2 - 1 -1 0 0 0 3 2 - 1 1 0 0 0 -3 0 - 0 1 0 0 -1 -3 0 - 1 1 -3 0 0 0 2 - 1 -1 3 0 0 0 0 - 1 1 0 -3 0 0 1 - 1 -1 0 3 0 0 1 - 0 0 0 - - - 1 - j div41 div42 mod6 mod6_a - 0 - 0 diff --git a/cloog-0.16.3/test/mode.c b/cloog-0.16.3/test/mode.c deleted file mode 100644 index c527eedffe55d970ca2fe0bd5703f9299de24e9b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/mode.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/mode.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -if (M >= 0) { - if (N >= 0) { - for (i=0;i<=M;i++) { - for (j=0;j<=min(N,i);j++) { - S1(i,j); - S2(i,j); - } - for (j=N+1;j<=i;j++) { - S1(i,j); - } - for (j=i+1;j<=N;j++) { - S2(i,j); - } - } - } - if (N <= -1) { - for (i=0;i<=M;i++) { - for (j=0;j<=i;j++) { - S1(i,j); - } - } - } -} diff --git a/cloog-0.16.3/test/mode.cloog b/cloog-0.16.3/test/mode.cloog deleted file mode 100644 index caeecb85928c2caa4d6fb91518ef11aa4102ff67..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/mode.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# parameters n m -1 4 -# n m 1 -1 0 0 1 -0 - -2 # Number of statements - -1 -# S2 {i, j | 0<=i<=n; 0<=j<=i} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 1 -1 0 0 0 -0 0 0 - -1 -# S2 {i, j | 0<=i<=n; 0<=j<=m} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 0 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/mode.good.c b/cloog-0.16.3/test/mode.good.c deleted file mode 100644 index 07147573a1e4fcdd2c2e7047724a22fc030f95e8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/mode.good.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Generated from ../../../git/cloog/test/mode.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=min(M,N-1);i++) { - for (j=0;j<=i;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=i+1;j<=N;j++) { - S2(i,j) ; - } - } - if ((M >= N) && (N >= 0)) { - for (j=0;j<=N;j++) { - S1(N,j) ; - S2(N,j) ; - } - } - if (N >= 0) { - for (i=N+1;i<=M;i++) { - for (j=0;j<=N;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=N+1;j<=i;j++) { - S1(i,j) ; - } - } - } - if (N <= -1) { - for (i=0;i<=M;i++) { - for (j=0;j<=i;j++) { - S1(i,j) ; - } - } - } -} diff --git a/cloog-0.16.3/test/multi-mm-1.c b/cloog-0.16.3/test/multi-mm-1.c deleted file mode 100644 index 646395c8ef3d9dc56f12e1f897c36dd5a221c535..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-mm-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/multi-mm-1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -for (i=0;i<=M;i++) { - for (j=0;j<=min(N,i);j++) { - S1(i,j); - S2(i,j); - } - for (j=N+1;j<=i;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/multi-mm-1.cloog b/cloog-0.16.3/test/multi-mm-1.cloog deleted file mode 100644 index 58f4ce879dc1ed4a14e2a5423bdbd54f211be8ff..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-mm-1.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# language: C -c - -# Context -#{M,N|M>N} -3 4 -# M N 1 -1 1 -1 0 -1 0 1 -1 -1 0 0 1 -0 - -2 # Number of statements - -1 -# -4 6 -# i j M N 1 -1 0 1 0 0 0 -1 1 -1 0 0 0 -1 -1 0 1 0 0 -1 0 0 0 0 1 -0 0 0 - -1 -# -5 6 -# i j M N 1 -1 0 1 0 0 0 -1 1 -1 0 0 0 -1 -1 0 1 0 0 -1 0 -1 0 1 0 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/multi-mm-1.good.c b/cloog-0.16.3/test/multi-mm-1.good.c deleted file mode 100644 index 6bfcc3c9d1c2c39f0d5f7b204062b0d264728b1f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-mm-1.good.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Generated from ../../../git/cloog/test/multi-mm-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=N;i++) { - for (j=0;j<=i;j++) { - S1(i,j) ; - S2(i,j) ; - } - } - for (i=N+1;i<=M;i++) { - for (j=0;j<=N;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=N+1;j<=i;j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.16.3/test/multi-stride.c b/cloog-0.16.3/test/multi-stride.c deleted file mode 100644 index 51b20611120931df217b62faa1a7ca18d2c69110..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-stride.c +++ /dev/null @@ -1 +0,0 @@ -/* Generated from ../../../git/cloog/test/multi-stride.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ diff --git a/cloog-0.16.3/test/multi-stride.cloog b/cloog-0.16.3/test/multi-stride.cloog deleted file mode 100644 index 8f858da4f9cfb954e50df739c25ec81d01684679..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-stride.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statements -1 - -1 - -# i' i j 1 - 4 5 - 0 1 -2 0 -1 - 0 1 0 -6 -2 - 1 1 0 0 0 - 1 -1 0 0 100 - -0 0 0 - -0 -0 - - - diff --git a/cloog-0.16.3/test/multi-stride2.c b/cloog-0.16.3/test/multi-stride2.c deleted file mode 100644 index 443107b3e929c6031d8375cefc0aa68ef10f9973..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-stride2.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/multi-stride2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i=5;i<=100;i+=6) { - S1(i,(i-1)/2,(i-2)/3) ; -} diff --git a/cloog-0.16.3/test/multi-stride2.cloog b/cloog-0.16.3/test/multi-stride2.cloog deleted file mode 100644 index db1afd444b3cebd2830245944c259b101f63644a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/multi-stride2.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statements -1 - -1 - -# i' i j 1 - 4 5 - 0 1 -2 0 -1 - 0 1 0 -3 -2 - 1 1 0 0 0 - 1 -1 0 0 100 - -0 0 0 - -0 -0 - - - diff --git a/cloog-0.16.3/test/no_lindep.c b/cloog-0.16.3/test/no_lindep.c deleted file mode 100644 index 3c7c5747e47efc272f334c7f1578a6037c67f5d5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/no_lindep.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/no_lindep.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(N+2) ; diff --git a/cloog-0.16.3/test/no_lindep.cloog b/cloog-0.16.3/test/no_lindep.cloog deleted file mode 100644 index ab0cb7d0eb2625bd50baea1bf3a81c0098e11257..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/no_lindep.cloog +++ /dev/null @@ -1,34 +0,0 @@ -# language C -c - -# 2 parameters -1 4 -1 0 0 0 - -0 - -# 1 statement -1 - -# 1 domain -# i=n+2 -1 -1 5 -0 -1 0 1 2 - -0 0 0 - -0 - -# 1 scattering function -# c1=M+1 -# c2=N -1 -2 7 -0 -1 0 0 1 0 1 -0 0 -1 0 0 1 0 - -0 - - - diff --git a/cloog-0.16.3/test/no_lindep.good.c b/cloog-0.16.3/test/no_lindep.good.c deleted file mode 100644 index 5db6759c65494f87dd39a5c9854fce69d820ca6c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/no_lindep.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/no_lindep.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i; - c1 = M+1 ; - i = N+2 ; - S1(N+2) ; -} diff --git a/cloog-0.16.3/test/non_optimal/nul_complex1.c b/cloog-0.16.3/test/non_optimal/nul_complex1.c deleted file mode 100644 index ff7814503d8d2c0dff70dbb420a108b455753e94..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/nul_complex1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/nul_complex1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (n >= 0) { - for (c1=0;c1<=5*n;c1++) { - for (c2=max(ceild(2*c1,3),c1-n);c2<=min(floord(2*c1+2*n,3),c1);c2++) { - if (c2%2 == 0) { - S1((-2*c1+3*c2)/2,c1-c2) ; - } - } - } -} diff --git a/cloog-0.16.3/test/non_optimal/nul_complex1.cloog b/cloog-0.16.3/test/non_optimal/nul_complex1.cloog deleted file mode 100644 index 4b4d45a85f641a29e5e80c4712eb0ca30d9ec15d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/nul_complex1.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i+=2) { -# S1 ; -# } - -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -1 -n - -1 # Number of statements - -1 -# {i | 0<=i<=n} -4 5 -# i j n 1 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 0 -0 0 0 -0 - -1 # Scattering functions - -2 7 -# c1 c2 i j n 1 -0 1 0 -2 -3 0 0 -0 0 1 -2 -2 0 0 - -0 diff --git a/cloog-0.16.3/test/non_optimal/nul_complex1.good.c b/cloog-0.16.3/test/non_optimal/nul_complex1.good.c deleted file mode 100644 index 79694f1a903883b9e69ddf15c4eb994afb40c300..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/nul_complex1.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/nul_complex1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=0;c1<=5*n;c1++) { - for (c2=max(c1-n,ceild(2*c1,3));c2<=min(c1,floord(2*c1+2*n,3));c2++) { - if (c2%2 == 0) { - i = (-2*c1+3*c2)/2 ; - j = c1-c2 ; - S1((-2*c1+3*c2)/2,c1-c2) ; - } - } - } -} diff --git a/cloog-0.16.3/test/non_optimal/usvd_e_t.c b/cloog-0.16.3/test/non_optimal/usvd_e_t.c deleted file mode 100644 index 6d253f6acecca435777d2a1d72b24b09076971ea..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/usvd_e_t.c +++ /dev/null @@ -1,375 +0,0 @@ -/* Generated from ../../../git/cloog/test/non_optimal/usvd_e_t.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.11s. */ -for (i=0;i<=2;i++) { - S1(i,0,0); - for (j=0;j<=4;j++) { - S2(i,j,0); - } -} -S1(3,0,0); -for (j=0;j<=4;j++) { - S2(3,j,0); -} -for (j=7;j<=11;j++) { - S8(3,j,0); -} -S1(4,0,0); -S2(4,0,0); -S3(4,0,0); -S5(4,0,0); -for (j=1;j<=4;j++) { - S2(4,j,0); - S5(4,j,0); -} -for (j=7;j<=11;j++) { - S8(4,j,0); -} -for (i=5;i<=6;i++) { - for (j=-4;j<=i-9;j++) { - S6(i,j,0); - } - for (j=i-9;j<=-1;j++) { - S7(i,j,0); - } - S3(i,0,0); - S7(i,0,0); - for (j=1;j<=i-4;j++) { - S4(i,j,-1); - } - for (j=i-4;j<=4;j++) { - S5(i,j,0); - } - for (j=7;j<=11;j++) { - S8(i,j,0); - } -} -for (j=-4;j<=-2;j++) { - S6(7,j,0); -} -for (j=-2;j<=-1;j++) { - S7(7,j,0); -} -S3(7,0,0); -S7(7,0,0); -for (j=1;j<=3;j++) { - S4(7,j,-1); -} -for (j=3;j<=4;j++) { - S5(7,j,0); -} -S9(7,4,0); -S10(7,4,0); -S11(7,4,0); -S21(7,4,0); -S23(7,4,0); -S11(7,4,1); -S16(7,4,1); -S17(7,4,1); -for (k=2;k<=4;k++) { - S11(7,4,k); -} -S12(7,5,0); -S21(7,5,0); -S22(7,5,0); -S23(7,5,0); -S12(7,5,1); -S16(7,5,1); -S17(7,5,1); -for (k=2;k<=4;k++) { - S12(7,5,k); -} -S21(7,6,0); -S22(7,6,0); -S23(7,6,0); -for (j=7;j<=8;j++) { - S8(7,j,0); - S21(7,j,0); - S22(7,j,0); - S23(7,j,0); -} -S8(7,9,0); -S22(7,9,0); -for (j=10;j<=11;j++) { - S8(7,j,0); -} -for (j=-4;j<=-1;j++) { - S6(8,j,0); -} -S7(8,-1,0); -S3(8,0,0); -S7(8,0,0); -S19(8,1,-2); -S4(8,1,-1); -S19(8,1,-1); -S19(8,1,0); -S15(8,1,4); -S18(8,1,4); -for (k=-4;k<=-3;k++) { - S14(8,2,k); - S20(8,2,k); -} -S14(8,2,-2); -S19(8,2,-2); -S20(8,2,-2); -S4(8,2,-1); -S14(8,2,-1); -S19(8,2,-1); -S20(8,2,-1); -S14(8,2,0); -S19(8,2,0); -S20(8,2,0); -S15(8,2,4); -S18(8,2,4); -for (k=-4;k<=-2;k++) { - S14(8,3,k); - S20(8,3,k); -} -S4(8,3,-1); -S14(8,3,-1); -S20(8,3,-1); -S14(8,3,0); -S20(8,3,0); -S15(8,3,4); -S18(8,3,4); -for (k=-4;k<=-2;k++) { - S14(8,4,k); - S20(8,4,k); -} -S4(8,4,-1); -S14(8,4,-1); -S20(8,4,-1); -S5(8,4,0); -S9(8,4,0); -S10(8,4,0); -S14(8,4,0); -S20(8,4,0); -S23(8,4,0); -S13(8,4,1); -S21(8,4,1); -S23(8,4,1); -S24(8,4,1); -S13(8,4,2); -S16(8,4,2); -S17(8,4,2); -S24(8,4,2); -S13(8,4,3); -S24(8,4,3); -S13(8,4,4); -S15(8,4,4); -S23(8,5,0); -S11(8,5,1); -S21(8,5,1); -S22(8,5,1); -S23(8,5,1); -S24(8,5,1); -S11(8,5,2); -S16(8,5,2); -S17(8,5,2); -S24(8,5,2); -S11(8,5,3); -S24(8,5,3); -S11(8,5,4); -S15(8,5,4); -S23(8,6,0); -S12(8,6,1); -S21(8,6,1); -S22(8,6,1); -S23(8,6,1); -S24(8,6,1); -S12(8,6,2); -S16(8,6,2); -S17(8,6,2); -S24(8,6,2); -S12(8,6,3); -S24(8,6,3); -S12(8,6,4); -for (j=7;j<=8;j++) { - S23(8,j,0); - S21(8,j,1); - S22(8,j,1); - S23(8,j,1); - for (k=1;k<=3;k++) { - S24(8,j,k); - } -} -S22(8,9,1); -S7(9,0,0); -for (j=1;j<=2;j++) { - for (k=-1;k<=0;k++) { - S19(9,j,k); - } - for (k=4;k<=5;k++) { - S15(9,j,k); - S18(9,j,k); - } -} -S20(9,3,-4); -for (k=-3;k<=-2;k++) { - S14(9,3,k); - S20(9,3,k); -} -for (k=-1;k<=0;k++) { - S14(9,3,k); - S19(9,3,k); - S20(9,3,k); -} -for (k=4;k<=5;k++) { - S15(9,3,k); - S18(9,3,k); -} -S20(9,4,-4); -for (k=-3;k<=-1;k++) { - S14(9,4,k); - S20(9,4,k); -} -S9(9,4,0); -S10(9,4,0); -S14(9,4,0); -S20(9,4,0); -for (k=0;k<=1;k++) { - S23(9,4,k); -} -S13(9,4,2); -S21(9,4,2); -S23(9,4,2); -S24(9,4,2); -S13(9,4,3); -S16(9,4,3); -S17(9,4,3); -S24(9,4,3); -S13(9,4,4); -for (k=4;k<=5;k++) { - S15(9,4,k); - S18(9,4,k); -} -for (k=0;k<=1;k++) { - S23(9,5,k); -} -S13(9,5,2); -S21(9,5,2); -S22(9,5,2); -S23(9,5,2); -S24(9,5,2); -S13(9,5,3); -S16(9,5,3); -S17(9,5,3); -S24(9,5,3); -S13(9,5,4); -for (k=4;k<=5;k++) { - S15(9,5,k); -} -for (k=0;k<=1;k++) { - S23(9,6,k); -} -S11(9,6,2); -S21(9,6,2); -S22(9,6,2); -S23(9,6,2); -S24(9,6,2); -S11(9,6,3); -S16(9,6,3); -S17(9,6,3); -S24(9,6,3); -S11(9,6,4); -for (k=0;k<=1;k++) { - S23(9,7,k); -} -S12(9,7,2); -S21(9,7,2); -S22(9,7,2); -S23(9,7,2); -S24(9,7,2); -S12(9,7,3); -S16(9,7,3); -S17(9,7,3); -S24(9,7,3); -S12(9,7,4); -for (k=0;k<=1;k++) { - S23(9,8,k); -} -S21(9,8,2); -S22(9,8,2); -S23(9,8,2); -for (k=2;k<=3;k++) { - S24(9,8,k); -} -S22(9,9,2); -for (j=1;j<=3;j++) { - S19(10,j,0); - S26(10,j,3); - S15(10,j,4); - S18(10,j,4); - S25(10,j,4); - for (k=5;k<=6;k++) { - S15(10,j,k); - S18(10,j,k); - } -} -for (k=-4;k<=-3;k++) { - S20(10,4,k); -} -for (k=-2;k<=-1;k++) { - S14(10,4,k); - S20(10,4,k); -} -S9(10,4,0); -S10(10,4,0); -S14(10,4,0); -S19(10,4,0); -S20(10,4,0); -S13(10,4,3); -S21(10,4,3); -S24(10,4,3); -S26(10,4,3); -S13(10,4,4); -S15(10,4,4); -S16(10,4,4); -S17(10,4,4); -S18(10,4,4); -S25(10,4,4); -for (k=5;k<=6;k++) { - S15(10,4,k); - S18(10,4,k); -} -S13(10,5,3); -S21(10,5,3); -S22(10,5,3); -S24(10,5,3); -S26(10,5,3); -S13(10,5,4); -S15(10,5,4); -S16(10,5,4); -S17(10,5,4); -S18(10,5,4); -S25(10,5,4); -for (k=5;k<=6;k++) { - S15(10,5,k); - S18(10,5,k); -} -S13(10,6,3); -S21(10,6,3); -S22(10,6,3); -S24(10,6,3); -S13(10,6,4); -S16(10,6,4); -S17(10,6,4); -S11(10,7,3); -S21(10,7,3); -S22(10,7,3); -S24(10,7,3); -S11(10,7,4); -S16(10,7,4); -S17(10,7,4); -S12(10,8,3); -S21(10,8,3); -S22(10,8,3); -S24(10,8,3); -S12(10,8,4); -S16(10,8,4); -S17(10,8,4); -S22(10,9,3); -for (i=11;i<=14;i++) { - for (j=1;j<=5;j++) { - S26(i,j,3); - S25(i,j,4); - } -} diff --git a/cloog-0.16.3/test/non_optimal/usvd_e_t.cloog b/cloog-0.16.3/test/non_optimal/usvd_e_t.cloog deleted file mode 100644 index a8d8510da4b7bffef2251ccb4a506882c0b750c9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/usvd_e_t.cloog +++ /dev/null @@ -1,240 +0,0 @@ -# language: C -c - -# Context -0 2 - -0 # parameter names - -26 # Number of statements - -1 -4 5 -# i j k 1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 1 0 0 0 - 1 -1 0 0 4 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 0 - 1 -1 0 0 4 - 1 0 1 0 0 - 1 0 -1 0 4 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 1 0 0 -4 - 1 -1 0 0 8 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 1 - 1 -1 0 0 8 - 1 0 1 0 -1 - 1 1 -1 0 -4 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 -4 - 1 0 -1 0 4 - 1 -1 1 0 4 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 0 - 1 -1 0 0 8 - 1 0 1 0 4 - 1 1 -1 0 -9 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 -5 - 1 0 -1 0 0 - 1 -1 1 0 9 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 -3 - 1 -1 0 0 7 - 1 0 1 0 -7 - 1 0 -1 0 11 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 1 0 -4 - 0 0 0 1 0 - 1 1 0 0 -7 - 1 -1 0 0 10 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 1 0 -4 - 0 0 0 1 0 - 1 1 0 0 -7 - 1 -1 0 0 10 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 -1 0 -3 - 1 0 -1 0 7 - 1 0 1 0 -4 - 1 0 0 -1 4 - 1 0 -1 1 4 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 -1 0 -2 - 1 0 1 0 -5 - 1 0 -1 0 8 - 1 0 0 -1 4 - 1 0 -1 1 5 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 10 - 1 0 1 0 -4 - 1 0 0 -1 4 - 1 -1 0 1 7 - 1 1 -1 0 -4 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 -1 0 4 - 1 0 0 -1 0 - 1 -1 0 1 12 - 1 -1 1 0 6 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 10 - 1 0 1 0 -1 - 1 0 -1 0 5 - 1 0 0 1 -4 - 1 1 0 -1 -4 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -6 - 1 0 0 -1 4 - 1 0 1 0 -4 - 1 0 0 1 -1 - 1 0 -1 1 4 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -6 - 1 0 0 1 -1 - 1 0 1 0 -4 - 1 0 0 -1 4 - 1 0 -1 1 4 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 10 - 1 0 1 0 -1 - 1 0 0 1 -4 - 1 1 0 -1 -4 - 1 1 -1 0 -5 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 1 0 -1 - 1 0 0 -1 0 - 1 -1 0 1 10 - 1 1 -1 0 -6 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 -1 0 4 - 1 0 0 1 4 - 1 0 0 -1 0 - 1 -1 1 0 6 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -7 - 1 0 0 -1 3 - 1 0 1 0 -4 - 1 0 -1 0 8 - 1 0 0 1 0 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -7 - 1 0 0 1 0 - 1 0 1 0 -5 - 1 0 -1 0 9 - 1 0 0 -1 3 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 9 - 1 0 1 0 -4 - 1 0 -1 0 8 - 1 0 0 1 0 - 1 1 0 -1 -7 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 1 0 -4 - 1 0 -1 0 8 - 1 0 0 -1 3 - 1 -1 0 1 7 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 -4 - 1 1 0 0 -10 - 1 -1 0 0 14 - 1 0 1 0 -1 - 1 0 -1 0 5 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 -3 - 1 1 0 0 -10 - 1 -1 0 0 14 - 1 0 1 0 -1 - 1 0 -1 0 5 -0 0 0 -0 # iterator names -0 # scattering functions -0 # scattering dimension names - diff --git a/cloog-0.16.3/test/non_optimal/usvd_e_t.good.c b/cloog-0.16.3/test/non_optimal/usvd_e_t.good.c deleted file mode 100644 index f54c11c8c23cd3e1dc81c39e3d6198531c290a89..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/usvd_e_t.good.c +++ /dev/null @@ -1,429 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/usvd_e_t.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.36s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } -#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } -#define S10(i,j,k) { hash(10); hash(i); hash(j); hash(k); } -#define S11(i,j,k) { hash(11); hash(i); hash(j); hash(k); } -#define S12(i,j,k) { hash(12); hash(i); hash(j); hash(k); } -#define S13(i,j,k) { hash(13); hash(i); hash(j); hash(k); } -#define S14(i,j,k) { hash(14); hash(i); hash(j); hash(k); } -#define S15(i,j,k) { hash(15); hash(i); hash(j); hash(k); } -#define S16(i,j,k) { hash(16); hash(i); hash(j); hash(k); } -#define S17(i,j,k) { hash(17); hash(i); hash(j); hash(k); } -#define S18(i,j,k) { hash(18); hash(i); hash(j); hash(k); } -#define S19(i,j,k) { hash(19); hash(i); hash(j); hash(k); } -#define S20(i,j,k) { hash(20); hash(i); hash(j); hash(k); } -#define S21(i,j,k) { hash(21); hash(i); hash(j); hash(k); } -#define S22(i,j,k) { hash(22); hash(i); hash(j); hash(k); } -#define S23(i,j,k) { hash(23); hash(i); hash(j); hash(k); } -#define S24(i,j,k) { hash(24); hash(i); hash(j); hash(k); } -#define S25(i,j,k) { hash(25); hash(i); hash(j); hash(k); } -#define S26(i,j,k) { hash(26); hash(i); hash(j); hash(k); } - -void test() -{ - /* Original iterators. */ - int i, j, k; - for (i=0;i<=2;i++) { - S1(i,0,0) ; - S2(i,0,0) ; - for (j=1;j<=4;j++) { - S2(i,j,0) ; - } - } - S1(3,0,0) ; - S2(3,0,0) ; - for (j=1;j<=4;j++) { - S2(3,j,0) ; - } - for (j=7;j<=11;j++) { - S8(3,j,0) ; - } - S1(4,0,0) ; - S2(4,0,0) ; - S3(4,0,0) ; - S5(4,0,0) ; - for (j=1;j<=4;j++) { - S2(4,j,0) ; - S5(4,j,0) ; - } - for (j=7;j<=11;j++) { - S8(4,j,0) ; - } - S6(5,-4,0) ; - S7(5,-4,0) ; - for (j=-3;j<=-1;j++) { - S7(5,j,0) ; - } - S3(5,0,0) ; - S7(5,0,0) ; - S4(5,1,-1) ; - S5(5,1,0) ; - for (j=2;j<=4;j++) { - S5(5,j,0) ; - } - for (j=7;j<=11;j++) { - S8(5,j,0) ; - } - S6(6,-4,0) ; - S6(6,-3,0) ; - S7(6,-3,0) ; - for (j=-2;j<=-1;j++) { - S7(6,j,0) ; - } - S3(6,0,0) ; - S7(6,0,0) ; - S4(6,1,-1) ; - S4(6,2,-1) ; - S5(6,2,0) ; - for (j=3;j<=4;j++) { - S5(6,j,0) ; - } - for (j=7;j<=11;j++) { - S8(6,j,0) ; - } - for (j=-4;j<=-3;j++) { - S6(7,j,0) ; - } - S6(7,-2,0) ; - S7(7,-2,0) ; - S7(7,-1,0) ; - S3(7,0,0) ; - S7(7,0,0) ; - for (j=1;j<=2;j++) { - S4(7,j,-1) ; - } - S4(7,3,-1) ; - S5(7,3,0) ; - S5(7,4,0) ; - S9(7,4,0) ; - S10(7,4,0) ; - S11(7,4,0) ; - S21(7,4,0) ; - S23(7,4,0) ; - S11(7,4,1) ; - S16(7,4,1) ; - S17(7,4,1) ; - for (k=2;k<=4;k++) { - S11(7,4,k) ; - } - S12(7,5,0) ; - S21(7,5,0) ; - S22(7,5,0) ; - S23(7,5,0) ; - S12(7,5,1) ; - S16(7,5,1) ; - S17(7,5,1) ; - for (k=2;k<=4;k++) { - S12(7,5,k) ; - } - S21(7,6,0) ; - S22(7,6,0) ; - S23(7,6,0) ; - for (j=7;j<=8;j++) { - S8(7,j,0) ; - S21(7,j,0) ; - S22(7,j,0) ; - S23(7,j,0) ; - } - S8(7,9,0) ; - S22(7,9,0) ; - for (j=10;j<=11;j++) { - S8(7,j,0) ; - } - for (j=-4;j<=-2;j++) { - S6(8,j,0) ; - } - S6(8,-1,0) ; - S7(8,-1,0) ; - S3(8,0,0) ; - S7(8,0,0) ; - S19(8,1,-2) ; - S4(8,1,-1) ; - S19(8,1,-1) ; - S19(8,1,0) ; - S15(8,1,4) ; - S18(8,1,4) ; - for (k=-4;k<=-3;k++) { - S14(8,2,k) ; - S20(8,2,k) ; - } - S14(8,2,-2) ; - S19(8,2,-2) ; - S20(8,2,-2) ; - S4(8,2,-1) ; - S14(8,2,-1) ; - S19(8,2,-1) ; - S20(8,2,-1) ; - S14(8,2,0) ; - S19(8,2,0) ; - S20(8,2,0) ; - S15(8,2,4) ; - S18(8,2,4) ; - for (k=-4;k<=-2;k++) { - S14(8,3,k) ; - S20(8,3,k) ; - } - S4(8,3,-1) ; - S14(8,3,-1) ; - S20(8,3,-1) ; - S14(8,3,0) ; - S20(8,3,0) ; - S15(8,3,4) ; - S18(8,3,4) ; - for (k=-4;k<=-2;k++) { - S14(8,4,k) ; - S20(8,4,k) ; - } - S4(8,4,-1) ; - S14(8,4,-1) ; - S20(8,4,-1) ; - S5(8,4,0) ; - S9(8,4,0) ; - S10(8,4,0) ; - S14(8,4,0) ; - S20(8,4,0) ; - S23(8,4,0) ; - S13(8,4,1) ; - S21(8,4,1) ; - S23(8,4,1) ; - S24(8,4,1) ; - S13(8,4,2) ; - S16(8,4,2) ; - S17(8,4,2) ; - S24(8,4,2) ; - S13(8,4,3) ; - S24(8,4,3) ; - S13(8,4,4) ; - S15(8,4,4) ; - S23(8,5,0) ; - S11(8,5,1) ; - S21(8,5,1) ; - S22(8,5,1) ; - S23(8,5,1) ; - S24(8,5,1) ; - S11(8,5,2) ; - S16(8,5,2) ; - S17(8,5,2) ; - S24(8,5,2) ; - S11(8,5,3) ; - S24(8,5,3) ; - S11(8,5,4) ; - S15(8,5,4) ; - S23(8,6,0) ; - S12(8,6,1) ; - S21(8,6,1) ; - S22(8,6,1) ; - S23(8,6,1) ; - S24(8,6,1) ; - S12(8,6,2) ; - S16(8,6,2) ; - S17(8,6,2) ; - S24(8,6,2) ; - S12(8,6,3) ; - S24(8,6,3) ; - S12(8,6,4) ; - for (j=7;j<=8;j++) { - S23(8,j,0) ; - S21(8,j,1) ; - S22(8,j,1) ; - S23(8,j,1) ; - S24(8,j,1) ; - for (k=2;k<=3;k++) { - S24(8,j,k) ; - } - } - S22(8,9,1) ; - S7(9,0,0) ; - for (j=1;j<=2;j++) { - for (k=-1;k<=0;k++) { - S19(9,j,k) ; - } - for (k=4;k<=5;k++) { - S15(9,j,k) ; - S18(9,j,k) ; - } - } - S20(9,3,-4) ; - for (k=-3;k<=-2;k++) { - S14(9,3,k) ; - S20(9,3,k) ; - } - for (k=-1;k<=0;k++) { - S14(9,3,k) ; - S19(9,3,k) ; - S20(9,3,k) ; - } - for (k=4;k<=5;k++) { - S15(9,3,k) ; - S18(9,3,k) ; - } - S20(9,4,-4) ; - for (k=-3;k<=-1;k++) { - S14(9,4,k) ; - S20(9,4,k) ; - } - S9(9,4,0) ; - S10(9,4,0) ; - S14(9,4,0) ; - S20(9,4,0) ; - S23(9,4,0) ; - S23(9,4,1) ; - S13(9,4,2) ; - S21(9,4,2) ; - S23(9,4,2) ; - S24(9,4,2) ; - S13(9,4,3) ; - S16(9,4,3) ; - S17(9,4,3) ; - S24(9,4,3) ; - S13(9,4,4) ; - S15(9,4,4) ; - S18(9,4,4) ; - S15(9,4,5) ; - S18(9,4,5) ; - for (k=0;k<=1;k++) { - S23(9,5,k) ; - } - S13(9,5,2) ; - S21(9,5,2) ; - S22(9,5,2) ; - S23(9,5,2) ; - S24(9,5,2) ; - S13(9,5,3) ; - S16(9,5,3) ; - S17(9,5,3) ; - S24(9,5,3) ; - S13(9,5,4) ; - S15(9,5,4) ; - S15(9,5,5) ; - for (k=0;k<=1;k++) { - S23(9,6,k) ; - } - S11(9,6,2) ; - S21(9,6,2) ; - S22(9,6,2) ; - S23(9,6,2) ; - S24(9,6,2) ; - S11(9,6,3) ; - S16(9,6,3) ; - S17(9,6,3) ; - S24(9,6,3) ; - S11(9,6,4) ; - for (k=0;k<=1;k++) { - S23(9,7,k) ; - } - S12(9,7,2) ; - S21(9,7,2) ; - S22(9,7,2) ; - S23(9,7,2) ; - S24(9,7,2) ; - S12(9,7,3) ; - S16(9,7,3) ; - S17(9,7,3) ; - S24(9,7,3) ; - S12(9,7,4) ; - for (k=0;k<=1;k++) { - S23(9,8,k) ; - } - S21(9,8,2) ; - S22(9,8,2) ; - S23(9,8,2) ; - S24(9,8,2) ; - S24(9,8,3) ; - S22(9,9,2) ; - for (j=1;j<=3;j++) { - S19(10,j,0) ; - S26(10,j,3) ; - S15(10,j,4) ; - S18(10,j,4) ; - S25(10,j,4) ; - for (k=5;k<=6;k++) { - S15(10,j,k) ; - S18(10,j,k) ; - } - } - for (k=-4;k<=-3;k++) { - S20(10,4,k) ; - } - for (k=-2;k<=-1;k++) { - S14(10,4,k) ; - S20(10,4,k) ; - } - S9(10,4,0) ; - S10(10,4,0) ; - S14(10,4,0) ; - S19(10,4,0) ; - S20(10,4,0) ; - S13(10,4,3) ; - S21(10,4,3) ; - S24(10,4,3) ; - S26(10,4,3) ; - S13(10,4,4) ; - S15(10,4,4) ; - S16(10,4,4) ; - S17(10,4,4) ; - S18(10,4,4) ; - S25(10,4,4) ; - for (k=5;k<=6;k++) { - S15(10,4,k) ; - S18(10,4,k) ; - } - S13(10,5,3) ; - S21(10,5,3) ; - S22(10,5,3) ; - S24(10,5,3) ; - S26(10,5,3) ; - S13(10,5,4) ; - S15(10,5,4) ; - S16(10,5,4) ; - S17(10,5,4) ; - S18(10,5,4) ; - S25(10,5,4) ; - for (k=5;k<=6;k++) { - S15(10,5,k) ; - S18(10,5,k) ; - } - S13(10,6,3) ; - S21(10,6,3) ; - S22(10,6,3) ; - S24(10,6,3) ; - S13(10,6,4) ; - S16(10,6,4) ; - S17(10,6,4) ; - S11(10,7,3) ; - S21(10,7,3) ; - S22(10,7,3) ; - S24(10,7,3) ; - S11(10,7,4) ; - S16(10,7,4) ; - S17(10,7,4) ; - S12(10,8,3) ; - S21(10,8,3) ; - S22(10,8,3) ; - S24(10,8,3) ; - S12(10,8,4) ; - S16(10,8,4) ; - S17(10,8,4) ; - S22(10,9,3) ; - for (i=11;i<=14;i++) { - for (j=1;j<=5;j++) { - S26(i,j,3) ; - S25(i,j,4) ; - } - } -} diff --git a/cloog-0.16.3/test/non_optimal/youcef.c b/cloog-0.16.3/test/non_optimal/youcef.c deleted file mode 100644 index 386cea2aed89d7daff51f16a34a53e28700494f6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/youcef.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/non_optimal/youcef.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.00s. */ -for (i=0;i<=5;i++) { - S1(i,i); - for (j=i;j<=5;j++) { - S2(i,j); - } - S3(i,5); -} diff --git a/cloog-0.16.3/test/non_optimal/youcef.cloog b/cloog-0.16.3/test/non_optimal/youcef.cloog deleted file mode 100644 index 297bf79c016d425549f84516cac71216b89308b4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/youcef.cloog +++ /dev/null @@ -1,46 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i++) { -# S1 ; -# for (j=0;j<=N;j++) { -# S2 ; -# } -# S3 ; -# } - -# language: C -c - -# parameters {M, N | M>=1 N >=1} -0 2 -0 - -3 # Number of statements - -1 -# {i | 0<=i<=5 i==j} -3 4 -1 1 0 0 -1 -1 0 5 -0 1 -1 0 -0 0 0 - -1 -# {i | 0<=i<=5 i<=j<=5} -4 4 -1 1 0 0 -1 -1 0 5 -1 -1 1 0 -1 0 -1 5 -0 0 0 - -1 -# {i | 0<=i<=5 j==5} -3 4 -1 1 0 0 -1 -1 0 5 -0 0 1 -5 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/non_optimal/youcef.good.c b/cloog-0.16.3/test/non_optimal/youcef.good.c deleted file mode 100644 index 9fe1d312f835885c4e29f60aef15011ff164b6fc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/non_optimal/youcef.good.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/youcef.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test() -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=3;i++) { - S1(i,i) ; - S2(i,i) ; - for (j=i+1;j<=4;j++) { - S2(i,j) ; - } - S2(i,5) ; - S3(i,5) ; - } - S1(4,4) ; - S2(4,4) ; - S2(4,5) ; - S3(4,5) ; - S1(5,5) ; - S2(5,5) ; - S3(5,5) ; -} diff --git a/cloog-0.16.3/test/nul_basic1.c b/cloog-0.16.3/test/nul_basic1.c deleted file mode 100644 index d6b0cf024bd6a53cf6f904f82380cfd96f5eda31..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/nul_basic1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/nul_basic1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 0) { - for (i=0;i<=M;i+=2) { - S1(i,i/2) ; - } -} diff --git a/cloog-0.16.3/test/nul_basic1.cloog b/cloog-0.16.3/test/nul_basic1.cloog deleted file mode 100644 index 878bd89c5ec0937db39e1e84a47844f5e3cc2e50..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/nul_basic1.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i+=2) { -# S1 ; -# } - -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -1 # Number of statements - -1 -# {i, j | i=2*j; 0<=i<=n} -3 5 -# i j n 1 -0 1 -2 0 0 -1 1 0 0 0 -1 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/nul_basic2.c b/cloog-0.16.3/test/nul_basic2.c deleted file mode 100644 index 6231f0ebcc3d52932000be0795d91e7ed9a3dd48..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/nul_basic2.c +++ /dev/null @@ -1,7 +0,0 @@ -/* Generated from ../../../git/cloog/test/nul_basic2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=2;i<=n;i+=2) { - if (i%4 == 0) { - S2(i,i/4) ; - } - S1(i,i/2) ; -} diff --git a/cloog-0.16.3/test/nul_basic2.cloog b/cloog-0.16.3/test/nul_basic2.cloog deleted file mode 100644 index bf3c78c169ae7d20f105eb5b3eee312e88fd7ba7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/nul_basic2.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i+=2) { -# S1 ; -# } - -# language: C -c - -# parameter n -1 3 -# n 1 -1 1 -2 -1 -n - -2 # Number of statements - -1 -# {i, j | i=2*j; 1<=i<=n} -3 5 -# i j n 1 -0 1 -2 0 0 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i, j | i=4*j; 1<=i<=n} -3 5 -# i j n 1 -0 1 -4 0 0 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions -5 10 -# t1 t2 t3 t4 t5 i j n 1 -0 1 0 0 0 0 0 0 0 0 -0 0 1 0 0 0 -1 0 0 0 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 -1 0 0 -0 0 0 0 0 1 0 0 0 0 - -5 10 -# t1 t2 t3 t4 t5 i j n 1 -0 1 0 0 0 0 0 0 0 0 -0 0 1 0 0 0 -1 0 0 0 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 -1 0 0 -0 0 0 0 0 1 0 0 0 0 -0 diff --git a/cloog-0.16.3/test/nul_lcpc.c b/cloog-0.16.3/test/nul_lcpc.c deleted file mode 100644 index b9592f563a080e3a6f7fb34bfc94da26dd479727..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/nul_lcpc.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/nul_lcpc.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ -for (i=1;i<=6;i+=2) { - for (j=1;j<=i;j++) { - S1(i,(i-1)/2,j) ; - S2(i,(i-1)/2,j) ; - } - for (j=i+1;j<=p;j++) { - S1(i,(i-1)/2,j) ; - } -} -for (i=7;i<=m;i+=2) { - for (j=1;j<=p;j++) { - S1(i,(i-1)/2,j) ; - } -} diff --git a/cloog-0.16.3/test/nul_lcpc.cloog b/cloog-0.16.3/test/nul_lcpc.cloog deleted file mode 100644 index 263e1eafba0efd2c676c7134b72d692baf4a5ed8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/nul_lcpc.cloog +++ /dev/null @@ -1,39 +0,0 @@ -# language: C -c - -# parameter n -3 5 -# m n p 1 -1 1 -1 0 -1 -1 0 -1 1 -1 -0 0 1 0 -6 -1 -m n p - -2 # Number of statements - -1 -# {i, j, k | i=2*k+1; 1<=i<=m; 1<=j<=p} -5 8 -# i k j m n p 1 -0 1 -2 0 0 0 0 -1 # i=2*k+1 -1 1 0 0 0 0 0 -1 # 1<=i -1 -1 0 0 1 0 0 0 # i<=m -1 0 0 1 0 0 0 -1 # 1<=j -1 0 0 -1 0 0 1 0 # j<=p -0 0 0 - -1 -# {i, j, k | i=2*k+1; 1<=i<=n; 1<=j<=i} -5 8 -# i k j m n p 1 -0 1 -2 0 0 0 0 -1 # i=2*k+1 -1 1 0 0 0 0 0 -1 # 1<=i -1 -1 0 0 0 1 0 0 # i<=n -1 0 0 1 0 0 0 -1 # 1<=j -1 1 0 -1 0 0 0 0 # j<=i -0 0 0 -1 -i k j - -0 # Scattering functions diff --git a/cloog-0.16.3/test/orc.c b/cloog-0.16.3/test/orc.c deleted file mode 100644 index 7ed15476cbfa715c06f92f7b6f1655d93221aa4c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/orc.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Generated from ../../../git/cloog/test/orc.cloog by CLooG 0.16.2-5-g590827b gmp bits in 0.03s. */ -S1(0); -S2(0,0); -for (p2=1;p2<=22;p2++) { - if ((p2+1)%2 == 0) { - S3(0,(p2-1)/2); - } - if (p2%2 == 0) { - S2(0,p2/2); - } -} -S3(0,11); -for (p1=2;p1<=6;p1++) { - if ((p1+1)%3 == 0) { - S4((p1-2)/3); - } - if (p1%3 == 0) { - S1(p1/3); - } - if (p1 == 4) { - S2(1,0); - } - if (p1 == 4) { - for (p2=1;p2<=20;p2++) { - if ((p2+1)%2 == 0) { - S3(1,(p2-1)/2); - } - if (p2%2 == 0) { - S2(1,p2/2); - } - } - } - if (p1 == 4) { - S3(1,10); - } -} -S2(2,0); -for (p2=1;p2<=18;p2++) { - if ((p2+1)%2 == 0) { - S3(2,(p2-1)/2); - } - if (p2%2 == 0) { - S2(2,p2/2); - } -} -S3(2,9); -S4(2); -S5(0); -for (p2=0;p2<=9;p2++) { - S6(0,p2); -} -for (p1=2;p1<=42;p1++) { - if ((p1+1)%3 == 0) { - S7((p1-2)/3); - } - if (p1%3 == 0) { - S5(p1/3); - } - for (p2=0;p2<=9;p2++) { - if ((p1+2)%3 == 0) { - S6((p1-1)/3,p2); - } - } -} -for (p2=0;p2<=9;p2++) { - S6(14,p2); -} -S7(14); diff --git a/cloog-0.16.3/test/orc.cloog b/cloog-0.16.3/test/orc.cloog deleted file mode 100644 index 18c7cf20dfabf7bc3bd93b719c9e5e4238f758f4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/orc.cloog +++ /dev/null @@ -1,133 +0,0 @@ - - -#-------------------CONTEXT------------------------ - c # language is c - # Context (no constarints on parameters) - 1 2 # 1 lines and 2 coloumns - # 1 - 1 0 - - 1 # We want to set manually the parameter names - -#---------------------STATEMENTS-------------------- - 7 #Number of Statements - - 1 #STMT 1 at line no. 12 has 1 domain - - # Domain 1 - 2 3 - # i 1 - 1 1 0 - 1 -1 2 -0 0 0 - 1 #STMT 2 at line no. 15 has 1 domain - - # Domain 1 - 4 4 - # i j 1 - 1 1 0 0 - 1 -1 0 2 - 1 0 1 0 - 1 -1 -1 11 -0 0 0 - 1 #STMT 3 at line no. 16 has 1 domain - - # Domain 1 - 4 4 - # i j 1 - 1 1 0 0 - 1 -1 0 2 - 1 0 1 0 - 1 -1 -1 11 -0 0 0 - 1 #STMT 4 at line no. 20 has 1 domain - - # Domain 1 - 2 3 - # i 1 - 1 1 0 - 1 -1 2 -0 0 0 - 1 #STMT 1 at line no. 32 has 1 domain - - # Domain 1 - 2 3 - # l 1 - 1 1 0 - 1 -1 14 -0 0 0 - 1 #STMT 2 at line no. 37 has 1 domain - - # Domain 1 - 4 4 - # l m 1 - 1 1 0 0 - 1 -1 0 14 - 1 0 1 0 - 1 0 -1 9 -0 0 0 - 1 #STMT 3 at line no. 41 has 1 domain - - # Domain 1 - 2 3 - # l 1 - 1 1 0 - 1 -1 14 -0 0 0 - 1 # Set Iterator Names - i j #Iterator Names - -#---------------------SCATTERING FUNCTIONS-------------------- - 7 #Scattering functions - -# Scattering Matrix for stmt at line no.12 - 3 6 - # p0 p1 p2 i 1 - 0 1 0 0 0 0 - 0 0 1 0 -3 0 - 0 0 0 1 0 0 - -# Scattering Matrix for stmt at line no.15 - 3 7 - # p0 p1 p2 i j 1 - 0 1 0 0 0 0 0 - 0 0 1 0 -3 0 -1 - 0 0 0 1 0 -2 0 - -# Scattering Matrix for stmt at line no.16 - 3 7 - # p0 p1 p2 i j 1 - 0 1 0 0 0 0 0 - 0 0 1 0 -3 0 -1 - 0 0 0 1 0 -2 -1 - -# Scattering Matrix for stmt at line no.20 - 3 6 - # p0 p1 p2 i 1 - 0 1 0 0 0 0 - 0 0 1 0 -3 -2 - 0 0 0 1 0 0 - -# Scattering Matrix for stmt at line no.32 - 3 6 - # p0 p1 p2 l 1 - 0 1 0 0 0 -2 - 0 0 1 0 -3 0 - 0 0 0 1 0 0 - -# Scattering Matrix for stmt at line no.37 - 3 7 - # p0 p1 p2 l m 1 - 0 1 0 0 0 0 -2 - 0 0 1 0 -3 0 -1 - 0 0 0 1 0 -1 0 - -# Scattering Matrix for stmt at line no.41 - 3 6 - # p0 p1 p2 l 1 - 0 1 0 0 0 -2 - 0 0 1 0 -3 -2 - 0 0 0 1 0 0 - - 1 # Set manually the scattering dimension names - p0 p1 p2 #Scattering dimension names diff --git a/cloog-0.16.3/test/orc.good.c b/cloog-0.16.3/test/orc.good.c deleted file mode 100644 index 2b2b7e7a8c766afaf31f75e242a69cb719a3a25c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/orc.good.c +++ /dev/null @@ -1,110 +0,0 @@ -/* Generated from ../../../git/cloog/test/orc.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.06s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i) { hash(4); hash(i); } -#define S5(i) { hash(5); hash(i); } -#define S6(i,j) { hash(6); hash(i); hash(j); } -#define S7(i) { hash(7); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int p1, p2; - /* Original iterators. */ - int i, j; - S1(0) ; - S2(0,0) ; - for (p2=1;p2<=22;p2++) { - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3(0,(p2-1)/2) ; - } - if (p2%2 == 0) { - S2(0,p2/2) ; - } - } - S3(0,11) ; - for (p1=2;p1<=6;p1++) { - if ((p1+1)%3 == 0) { - i = (p1-2)/3 ; - S4((p1-2)/3) ; - } - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - S2((p1-1)/3,0) ; - } - if (p1%3 == 0) { - S1(p1/3) ; - } - for (p2=1;p2<=floord(-2*p1+68,3);p2++) { - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3((p1-1)/3,(p2-1)/2) ; - } - if (p2%2 == 0) { - S2((p1-1)/3,p2/2) ; - } - } - } - p2 = floord(-2*p1+71,3) ; - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3((p1-1)/3,(p2-1)/2) ; - } - } - } - S2(2,0) ; - for (p2=1;p2<=18;p2++) { - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3(2,(p2-1)/2) ; - } - if (p2%2 == 0) { - S2(2,p2/2) ; - } - } - S3(2,9) ; - S4(2) ; - S5(0) ; - S6(0,0) ; - for (p2=1;p2<=9;p2++) { - S6(0,p2) ; - } - for (p1=2;p1<=42;p1++) { - if ((p1+1)%3 == 0) { - i = (p1-2)/3 ; - S7((p1-2)/3) ; - } - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - S6((p1-1)/3,0) ; - } - if (p1%3 == 0) { - S5(p1/3) ; - } - for (p2=1;p2<=9;p2++) { - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - S6((p1-1)/3,p2) ; - } - } - } - S6(14,0) ; - for (p2=1;p2<=9;p2++) { - S6(14,p2) ; - } - S7(14) ; -} diff --git a/cloog-0.16.3/test/otl.c b/cloog-0.16.3/test/otl.c deleted file mode 100644 index 93bd830c62566a8d953997f50b89f0083f6e94fa..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/otl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/otl.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.26s. */ -if ((M >= 3) && (N >= 4)) { - for (outerTimeTileScatter=1;outerTimeTileScatter<=floord(2*M+2*N-7,5);outerTimeTileScatter++) { - for (outerProcTileScatter1=max(ceild(outerTimeTileScatter,2),ceild(5*outerTimeTileScatter-M-2,5));outerProcTileScatter1<=min(min(floord(M+2*N-5,5),floord(5*outerTimeTileScatter+2*N+1,10)),outerTimeTileScatter);outerProcTileScatter1++) { - for (outerProcTileScatter2=max(max(max(max(ceild(outerTimeTileScatter-outerProcTileScatter1-1,2),ceild(5*outerProcTileScatter1-N-1,5)),ceild(5*outerTimeTileScatter-M-N+1,5)),ceild(5*outerTimeTileScatter-N-2,10)),outerTimeTileScatter-outerProcTileScatter1-1);outerProcTileScatter2<=min(min(min(floord(M+N-2,5),floord(5*outerTimeTileScatter-5*outerProcTileScatter1+N+4,5)),floord(5*outerTimeTileScatter+N+3,10)),outerProcTileScatter1);outerProcTileScatter2++) { - for (innerTimeTileScatter=max(max(max(ceild(10*outerProcTileScatter1-2*N,5),ceild(10*outerProcTileScatter2-N-2,5)),ceild(5*outerProcTileScatter1+5*outerProcTileScatter2-N-3,5)),outerTimeTileScatter);innerTimeTileScatter<=min(min(min(min(min(floord(2*M+2*N-6,5),floord(5*outerProcTileScatter1+M+3,5)),floord(5*outerProcTileScatter2+M+N,5)),floord(10*outerProcTileScatter2+N+3,5)),outerTimeTileScatter+1),outerProcTileScatter1+outerProcTileScatter2+1);innerTimeTileScatter++) { - for (innerProcTileScatter1=max(max(max(max(ceild(innerTimeTileScatter,2),ceild(5*innerTimeTileScatter-M-2,5)),ceild(5*outerTimeTileScatter-M-1,5)),outerProcTileScatter1),outerTimeTileScatter-outerProcTileScatter2);innerProcTileScatter1<=min(min(min(min(min(min(min(floord(M+2*N-4,5),floord(5*outerProcTileScatter2+N+2,5)),floord(-5*outerProcTileScatter2+5*innerTimeTileScatter+N+4,5)),floord(5*outerTimeTileScatter-5*outerProcTileScatter2+N+5,5)),floord(5*innerTimeTileScatter+2*N+2,10)),floord(5*outerTimeTileScatter+2*N+3,10)),outerTimeTileScatter),outerProcTileScatter1+1);innerProcTileScatter1++) { - for (innerProcTileScatter2=outerProcTileScatter2;innerProcTileScatter2<=outerProcTileScatter2;innerProcTileScatter2++) { - for (outerTimeTileIter=outerTimeTileScatter;outerTimeTileIter<=outerTimeTileScatter;outerTimeTileIter++) { - for (outerProcTileIter1=outerProcTileScatter1;outerProcTileIter1<=outerProcTileScatter1;outerProcTileIter1++) { - for (outerProcTileIter2=outerProcTileScatter2;outerProcTileIter2<=outerProcTileScatter2;outerProcTileIter2++) { - for (innerTimeTileIter=innerTimeTileScatter;innerTimeTileIter<=innerTimeTileScatter;innerTimeTileIter++) { - for (innerProcTileIter1=innerProcTileScatter1;innerProcTileIter1<=innerProcTileScatter1;innerProcTileIter1++) { - for (innerProcTileIter2=outerProcTileScatter2;innerProcTileIter2<=outerProcTileScatter2;innerProcTileIter2++) { - S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2); - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/otl.cloog b/cloog-0.16.3/test/otl.cloog deleted file mode 100644 index 5f9b7831346a453673dc2a67c397e82b3ac3d914..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/otl.cloog +++ /dev/null @@ -1,117 +0,0 @@ -# created: Tue Mar 23 01:51:15 CET 2010 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context -2 4 - 1 1 0 -1 - 1 0 1 -1 - - -1 # set parameter names -M N - -# --------------------- STATEMENTS -------------------- -1 - -1 # domains per statement -76 10 - 1 -5 0 0 0 0 0 2 2 -7 - 1 -20 0 0 0 20 20 0 0 16 - 1 -40 0 0 0 0 80 0 8 16 - 1 -4 4 0 0 0 4 0 0 4 - 1 -20 0 0 0 40 0 0 0 8 - 1 -20 0 20 0 20 0 0 0 16 - 1 -20 0 40 0 0 0 0 4 8 - 1 -20 40 0 0 0 0 0 0 16 - 1 -4 4 4 0 0 0 0 0 4 - 1 -20 0 0 0 0 20 4 4 -4 - 1 -10 0 0 0 10 0 2 0 2 - 1 -5 0 0 5 0 0 0 0 3 - 1 -5 5 0 0 0 0 1 0 2 - 1 -10 0 10 0 0 0 2 2 -2 - 1 0 -10 -10 10 0 0 0 2 6 - 1 20 -20 -20 0 0 0 0 4 16 - 1 0 -10 0 10 0 -10 0 2 6 - 1 40 -40 0 0 0 -40 0 8 32 - 1 0 -20 0 10 0 0 0 4 0 - 1 0 -10 0 0 0 0 2 4 -10 - 1 40 -80 0 0 0 0 0 16 8 - 1 0 -10 0 0 0 10 0 2 2 - 1 0 -5 0 0 5 0 0 0 3 - 1 0 -10 0 10 0 0 0 0 4 - 1 0 -5 5 0 0 0 0 1 1 - 1 20 -20 0 0 0 0 0 0 12 - 1 0 0 -10 10 -10 0 0 2 8 - 1 40 0 -40 0 -40 0 0 8 40 - 1 0 0 -20 10 0 0 0 2 4 - 1 0 0 -5 0 0 0 1 1 -2 - 1 40 0 -80 0 0 0 0 8 24 - 1 0 0 -5 0 0 5 0 0 4 - 1 0 0 -10 0 10 0 0 0 4 - 1 0 0 -10 10 0 0 0 0 2 - 1 0 5 -5 0 0 0 0 0 3 - 1 40 0 -40 0 0 0 0 0 16 - 1 0 0 0 -5 0 0 2 2 -6 - 1 0 0 0 -20 20 20 0 0 20 - 1 0 0 0 -40 0 80 0 8 24 - 1 0 20 0 -20 0 20 0 0 24 - 1 0 0 20 -20 20 0 0 0 20 - 1 0 0 0 -20 40 0 0 0 12 - 1 0 0 40 -20 0 0 0 4 12 - 1 0 40 0 -20 0 0 0 0 20 - 1 0 20 20 -20 0 0 0 0 24 - 1 0 0 0 -40 0 40 8 8 0 - 1 0 0 0 -20 20 0 4 0 8 - 1 0 0 20 -20 0 0 4 4 0 - 1 2 0 0 -2 0 0 0 0 2 - 1 0 10 0 -10 0 0 2 0 6 - 1 0 0 0 10 -10 -10 0 2 8 - 1 80 0 0 0 -80 -80 0 16 80 - 1 0 0 0 10 -20 0 0 4 4 - 1 0 0 0 0 -10 0 2 4 -8 - 1 120 0 0 0 -240 0 0 48 72 - 1 0 0 0 0 -20 20 0 4 8 - 1 0 0 0 10 -10 0 0 0 6 - 1 0 0 10 0 -10 0 0 2 4 - 1 0 1 0 0 -1 0 0 0 1 - 1 40 0 0 0 -40 0 0 0 32 - 1 0 0 0 10 0 -20 0 2 4 - 1 0 0 0 0 0 -5 1 1 -2 - 1 80 0 0 0 0 -160 0 16 48 - 1 0 0 0 0 10 -10 0 0 4 - 1 0 0 0 10 0 -10 0 0 2 - 1 0 0 5 0 0 -5 0 0 4 - 1 0 10 0 0 0 -10 0 0 6 - 1 40 0 0 0 0 -40 0 0 16 - 1 0 0 0 0 0 4 0 0 0 - 1 0 0 0 0 20 0 0 0 -8 - 1 0 0 0 20 0 0 0 0 -12 - 1 0 0 4 0 0 0 0 0 0 - 1 0 20 0 0 0 0 0 0 -4 - 1 80 0 0 0 0 0 0 0 -32 - 1 0 0 0 0 0 0 0 1 -4 - 1 0 0 0 0 0 0 1 0 -3 - - -0 0 0 # for future options... - - - -1 # set the iterator names -outerTimeTileIter outerProcTileIter1 outerProcTileIter2 innerTimeTileIter innerProcTileIter1 innerProcTileIter2 - -# --------------------- SCATTERING -------------------- -1 # Scattering functions -6 16 - 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 - - -1 # we set the scattering dimension names -outerTimeTileScatter outerProcTileScatter1 outerProcTileScatter2 innerTimeTileScatter innerProcTileScatter1 innerProcTileScatter2 - diff --git a/cloog-0.16.3/test/otl.good.c b/cloog-0.16.3/test/otl.good.c deleted file mode 100644 index 3004d8e72a2c37323e02c9a34f2f70a417ba35f8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/otl.good.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Generated from ../../../git/cloog/test/otl.cloog by CLooG 0.14.0-273-gfe7416f gmp bits in 0.24s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2) { hash(1); hash(outerTimeTileIter); hash(outerProcTileIter1); hash(outerProcTileIter2); hash(innerTimeTileIter); hash(innerProcTileIter1); hash(innerProcTileIter2); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int outerTimeTileScatter, outerProcTileScatter1, outerProcTileScatter2, innerTimeTileScatter, innerProcTileScatter1, innerProcTileScatter2; - /* Original iterators. */ - int outerTimeTileIter, outerProcTileIter1, outerProcTileIter2, innerTimeTileIter, innerProcTileIter1, innerProcTileIter2; - if ((M >= 3) && (N >= 4)) { - for (outerTimeTileScatter=1;outerTimeTileScatter<=floord(2*M+2*N-7,5);outerTimeTileScatter++) { - for (outerProcTileScatter1=max(ceild(outerTimeTileScatter,2),ceild(5*outerTimeTileScatter-M-2,5));outerProcTileScatter1<=min(min(floord(M+2*N-5,5),floord(5*outerTimeTileScatter+2*N+1,10)),outerTimeTileScatter);outerProcTileScatter1++) { - for (outerProcTileScatter2=max(max(max(max(max(ceild(outerTimeTileScatter-outerProcTileScatter1-1,2),ceild(5*outerProcTileScatter1-N-1,5)),ceild(5*outerTimeTileScatter-M-N+1,5)),ceild(5*outerTimeTileScatter-N-2,10)),ceild(5*outerTimeTileScatter-N-3,15)),outerTimeTileScatter-outerProcTileScatter1-1);outerProcTileScatter2<=min(min(min(floord(M+N-2,5),floord(5*outerTimeTileScatter-5*outerProcTileScatter1+N+4,5)),floord(5*outerTimeTileScatter+N+3,10)),outerProcTileScatter1);outerProcTileScatter2++) { - for (innerTimeTileScatter=max(max(max(ceild(10*outerProcTileScatter1-2*N,5),ceild(10*outerProcTileScatter2-N-2,5)),ceild(5*outerProcTileScatter1+5*outerProcTileScatter2-N-3,5)),outerTimeTileScatter);innerTimeTileScatter<=min(min(min(min(min(floord(2*M+2*N-6,5),floord(5*outerProcTileScatter1+M+3,5)),floord(5*outerProcTileScatter2+M+N,5)),floord(10*outerProcTileScatter2+N+3,5)),outerTimeTileScatter+1),outerProcTileScatter1+outerProcTileScatter2+1);innerTimeTileScatter++) { - for (innerProcTileScatter1=max(max(max(max(ceild(innerTimeTileScatter,2),ceild(5*innerTimeTileScatter-M-2,5)),ceild(5*outerTimeTileScatter-M-1,5)),outerProcTileScatter1),outerTimeTileScatter-outerProcTileScatter2);innerProcTileScatter1<=min(min(min(min(min(min(min(floord(M+2*N-4,5),floord(5*outerProcTileScatter2+N+2,5)),floord(-5*outerProcTileScatter2+5*innerTimeTileScatter+N+4,5)),floord(5*outerTimeTileScatter-5*outerProcTileScatter2+N+5,5)),floord(5*innerTimeTileScatter+2*N+2,10)),floord(5*outerTimeTileScatter+2*N+3,10)),outerTimeTileScatter),outerProcTileScatter1+1);innerProcTileScatter1++) { - for (innerProcTileScatter2=outerProcTileScatter2;innerProcTileScatter2<=outerProcTileScatter2;innerProcTileScatter2++) { - for (outerTimeTileIter=outerTimeTileScatter;outerTimeTileIter<=outerTimeTileScatter;outerTimeTileIter++) { - for (outerProcTileIter1=outerProcTileScatter1;outerProcTileIter1<=outerProcTileScatter1;outerProcTileIter1++) { - for (outerProcTileIter2=outerProcTileScatter2;outerProcTileIter2<=outerProcTileScatter2;outerProcTileIter2++) { - for (innerTimeTileIter=innerTimeTileScatter;innerTimeTileIter<=innerTimeTileScatter;innerTimeTileIter++) { - for (innerProcTileIter1=innerProcTileScatter1;innerProcTileIter1<=innerProcTileScatter1;innerProcTileIter1++) { - for (innerProcTileIter2=outerProcTileScatter2;innerProcTileIter2<=outerProcTileScatter2;innerProcTileIter2++) { - S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2); - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/param-split.c b/cloog-0.16.3/test/param-split.c deleted file mode 100644 index 97c75b10de0ccbce81f449a2fd2db58b704a50ea..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/param-split.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/param-split.cloog by CLooG 0.14.0-277-gce2ba57 gmp bits in 0.00s. */ -for (i=0;i<=M;i++) { - S1(i); - if (i == 0) { - S2(i); - } -} -if (M <= -1) { - S2(0); -} diff --git a/cloog-0.16.3/test/param-split.cloog b/cloog-0.16.3/test/param-split.cloog deleted file mode 100644 index 6f9e58fe8389dc69c60039678f407c0fc3aeb013..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/param-split.cloog +++ /dev/null @@ -1,24 +0,0 @@ -c - -0 3 - -0 - -2 - -1 -2 4 -1 1 0 0 -1 -1 1 0 - -0 0 0 - -1 -1 4 -0 1 0 0 - -0 0 0 - -0 - -0 diff --git a/cloog-0.16.3/test/param-split.good.c b/cloog-0.16.3/test/param-split.good.c deleted file mode 100644 index 25b3bc6c5637cc1e57a30c069b4697bf978fc89d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/param-split.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/param-split.cloog by CLooG 0.14.0-277-gce2ba57 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - if (M >= 0) { - S1(0); - S2(0); - } - for (i=1;i<=M;i++) { - S1(i); - } - if (M <= -1) { - S2(0); - } -} diff --git a/cloog-0.16.3/test/pouchet.c b/cloog-0.16.3/test/pouchet.c deleted file mode 100644 index 3eb887fe5a9fa730bbee69ecebbde693dfc6a18f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/pouchet.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Generated from ../../../git/cloog/test/pouchet.cloog by CLooG 0.16.2-3-gc1aebd7 gmp bits in 0.03s. */ -if (Ny >= 2) { - for (c0=1;c0<=floord(Ny+4,2);c0++) { - for (c1=max(ceild(c0+1,2),c0-1);c1<=min(floord(2*c0+Ny,4),c0);c1++) { - if (c0 >= ceild(4*c1-Ny+1,2)) { - for (c2=1;c2<=2;c2++) { - S1(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1,c2); - S2(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1-1,c2); - } - } - if (2*c0 == 4*c1-Ny) { - for (c2=1;c2<=2;c2++) { - if (Ny%2 == 0) { - if ((2*c0+3*Ny)%4 == 0) { - S2((2*c0-Ny)/4,(2*c0+Ny)/4,(2*c0-Ny)/2,Ny-1,c2); - } - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/pouchet.cloog b/cloog-0.16.3/test/pouchet.cloog deleted file mode 100644 index bef72937dcebb28b85873361911e3c26e7a99115..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/pouchet.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -1 - -0 3 0 0 0 1 - -1 # Parameter name(s) -Ny - -# Statement number: -2 - -# Iteration domain of statement 2 ((null)). -1 - -8 8 5 0 0 1 -1 0 0 1 0 0 0 0 -1 0 0 -1 0 0 0 2 -1 0 0 0 1 0 0 -1 -1 0 0 0 -1 0 1 -1 -1 0 0 0 0 1 0 -1 -1 0 0 0 0 -1 0 2 -0 -2 0 1 0 0 0 0 -0 0 -2 1 1 0 0 0 - -0 0 0 # For future options. - -# Iteration domain of statement 4 ((null)). -1 - -8 8 5 0 0 1 -1 0 0 1 0 0 0 0 -1 0 0 -1 0 0 0 2 -1 0 0 0 1 0 0 -1 -1 0 0 0 -1 0 1 -1 -1 0 0 0 0 1 0 -1 -1 0 0 0 0 -1 0 2 -0 -2 0 1 0 0 0 0 -0 0 -2 1 1 0 0 1 - -0 0 0 # For future options. - -0 # Iterator name(s) -# --------------------- SCATTERING -------------------- -2 # Scattering functions - -# Scattering of statement 2 ((null)). -1 - -6 14 6 5 0 1 -0 0 0 0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 0 1 0 0 0 0 -1 0 0 0 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 -0 0 0 1 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -0 1 0 0 0 0 0 -1 -1 0 0 0 0 0 - -# Scattering of statement 4 ((null)). -1 - -6 14 6 5 0 1 -0 0 0 0 0 0 1 0 0 0 0 -1 0 -1 -0 0 0 0 0 1 0 0 0 0 -1 0 0 -1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 -0 0 0 1 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -0 1 0 0 0 0 0 -1 -1 0 0 0 0 0 - -1 # Scattering dimension name(s) -c0 c1 c2 c3 c4 c5 diff --git a/cloog-0.16.3/test/pouchet.good.c b/cloog-0.16.3/test/pouchet.good.c deleted file mode 100644 index 43009f57b58b5b46c17000c81abdc6b01ade3b84..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/pouchet.good.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Generated from ../../../git/cloog/test/pouchet.cloog by CLooG 0.16.2-3-gc1aebd7 gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l,m) { hash(1); hash(i); hash(j); hash(k); hash(l); hash(m); } -#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } - -void test(int Ny) -{ - /* Scattering iterators. */ - int c0, c1, c2, c3, c4, c5; - /* Original iterators. */ - int i, j, k, l, m; - if (Ny >= 2) { - for (c0=1;c0<=floord(Ny+4,2);c0++) { - for (c1=max(ceild(c0+1,2),c0-1);c1<=min(floord(2*c0+Ny,4),c0);c1++) { - if (c0 >= ceild(4*c1-Ny+1,2)) { - for (c2=1;c2<=2;c2++) { - S1(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1,c2); - S2(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1-1,c2); - } - } - if (2*c0 == 4*c1-Ny) { - for (c2=1;c2<=2;c2++) { - if (Ny%2 == 0) { - if ((2*c0+3*Ny)%4 == 0) { - S2((2*c0-Ny)/4,(2*c0+Ny)/4,(2*c0-Ny)/2,Ny-1,c2); - } - } - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/rectangle.c b/cloog-0.16.3/test/rectangle.c deleted file mode 100644 index dba226abad7c6560da9339e44d43b7d91bfb938d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/rectangle.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/rectangle.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c1=0;c1<=2*n;c1++) { - for (i=max(0,c1-n);i<=min(c1,n);i++) { - S1(i,c1-i) ; - } -} diff --git a/cloog-0.16.3/test/rectangle.cloog b/cloog-0.16.3/test/rectangle.cloog deleted file mode 100644 index 9f639aba964907f1efdd7f967e348030d1094af5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/rectangle.cloog +++ /dev/null @@ -1,29 +0,0 @@ -# language: C -c - -# parameter {n | n>= 0} -1 3 -# n 1 -1 1 0 -1 -n - -1 # Number of statements: - -1 -# {ii, i | 0<=i<=n 0<=j<=n} -4 5 -# i j n 1 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 0 -0 0 0 -0 - -1 # Scattering functions - -1 6 -# c1 j i n 1 -0 1 -1 -1 0 0 -0 diff --git a/cloog-0.16.3/test/rectangle.good.c b/cloog-0.16.3/test/rectangle.good.c deleted file mode 100644 index b977e28ffb8554e21650a9fbb59f2262d3fbad82..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/rectangle.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/rectangle.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i, j; - for (c1=0;c1<=2*n;c1++) { - for (i=max(c1-n,0);i<=min(c1,n);i++) { - j = c1-i ; - S1(i,c1-i) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/QR.c b/cloog-0.16.3/test/reservoir/QR.c deleted file mode 100644 index 5a8c26f1e4bfe554a4e9a5420c286054f1e7a253..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/QR.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/QR.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.21s. */ -if (N >= 1) { - S1(0) ; - if ((M >= 1) && (N == 1)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S5(0) ; - } - if ((M <= 0) && (N == 1)) { - S3(0) ; - S10(0) ; - S5(0) ; - } - if ((M >= 1) && (N >= 2)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S1(1) ; - S5(0) ; - } - if ((M <= 0) && (N >= 2)) { - S3(0) ; - S10(0) ; - S1(1) ; - S5(0) ; - } - for (c2=2;c2<=min(M,N-1);c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - S6(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - S7(c2-2,c4,c6) ; - } - S8(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - S9(c2-2,c4,c6) ; - } - } - for (c4=c2-1;c4<=M-1;c4++) { - S2(c2-1,c4) ; - } - S3(c2-1) ; - for (c4=c2-1;c4<=M-1;c4++) { - S4(c2-1,c4) ; - } - S10(c2-1) ; - S1(c2) ; - S5(c2-1) ; - } - if ((M >= 1) && (M <= N-2)) { - for (c4=M;c4<=N-1;c4++) { - S6(M-1,c4) ; - S7(M-1,c4,M-1) ; - S8(M-1,c4) ; - S9(M-1,c4,M-1) ; - } - S3(M) ; - S10(M) ; - S1(M+1) ; - S5(M) ; - } - for (c2=max(2,M+2);c2<=N-1;c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - S6(c2-2,c4) ; - S8(c2-2,c4) ; - } - S3(c2-1) ; - S10(c2-1) ; - S1(c2) ; - S5(c2-1) ; - } - if ((M >= N) && (N >= 2)) { - S6(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - S7(N-2,N-1,c6) ; - } - S8(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - S9(N-2,N-1,c6) ; - } - for (c4=N-1;c4<=M-1;c4++) { - S2(N-1,c4) ; - } - S3(N-1) ; - for (c4=N-1;c4<=M-1;c4++) { - S4(N-1,c4) ; - } - S10(N-1) ; - S5(N-1) ; - } - if ((M == N-1) && (M >= 1)) { - S6(M-1,M) ; - S7(M-1,M,M-1) ; - S8(M-1,M) ; - S9(M-1,M,M-1) ; - S3(M) ; - S10(M) ; - S5(M) ; - } - if ((M <= N-2) && (N >= 2)) { - S6(N-2,N-1) ; - S8(N-2,N-1) ; - S3(N-1) ; - S10(N-1) ; - S5(N-1) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/QR.cloog b/cloog-0.16.3/test/reservoir/QR.cloog deleted file mode 100755 index 8baed208c680fb29d5c238a337dce43e14003202..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/QR.cloog +++ /dev/null @@ -1,228 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -10 - -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+l-1 >= 0, -i+j >= 0, -j+k-1 >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 0 1 -1 - 1 -1 1 0 0 0 - 1 0 -1 1 0 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+l-1 >= 0, -i+j >= 0, -j+k-1 >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 0 1 -1 - 1 -1 1 0 0 0 - 1 0 -1 1 0 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } - - 4 6 - 1 1 0 0 0 0 - 1 -1 1 0 0 -1 - 1 0 -1 0 1 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i >= 0, -i+j-1 >= 0, -j+m-1 >= 0, -i+k >= 0, -k+l-1 >= 0, 1 >= 0 } - - 6 7 - 1 1 0 0 0 0 0 - 1 -1 1 0 0 0 -1 - 1 0 -1 0 0 1 -1 - 1 -1 0 1 0 0 0 - 1 0 0 -1 1 0 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } - - 4 6 - 1 1 0 0 0 0 - 1 -1 1 0 0 -1 - 1 0 -1 0 1 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i >= 0, -i+j-1 >= 0, -j+m-1 >= 0, -i+k >= 0, -k+l-1 >= 0, 1 >= 0 } - - 6 7 - 1 1 0 0 0 0 0 - 1 -1 1 0 0 0 -1 - 1 0 -1 0 0 1 -1 - 1 -1 0 1 0 0 0 - 1 0 0 -1 1 0 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -10 - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -5 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 -3 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -6 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -3 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -4 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/QR.good.c b/cloog-0.16.3/test/reservoir/QR.good.c deleted file mode 100644 index facd21404de7eb6e08e5e6794cd65fc8e32cc532..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/QR.good.c +++ /dev/null @@ -1,208 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/QR.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i) { hash(5); hash(i); } -#define S6(i,j) { hash(6); hash(i); hash(j); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j) { hash(8); hash(i); hash(j); } -#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } -#define S10(i) { hash(10); hash(i); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M <= -1) && (N >= 1)) { - S1(0) ; - } - if ((M >= 0) && (N >= 1)) { - S1(0) ; - } - if ((M >= 1) && (N >= 2)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S1(1) ; - S5(0) ; - } - if ((M <= 0) && (N >= 2)) { - S3(0) ; - S10(0) ; - S1(1) ; - S5(0) ; - } - if ((M >= 1) && (N == 1)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S5(0) ; - } - if ((M <= 0) && (N == 1)) { - S3(0) ; - S10(0) ; - S5(0) ; - } - for (c2=2;c2<=min(N-1,M);c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - i = c2-2 ; - S6(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - i = c2-2 ; - S7(c2-2,c4,c6) ; - } - i = c2-2 ; - S8(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - i = c2-2 ; - S9(c2-2,c4,c6) ; - } - } - for (c4=c2-1;c4<=M-1;c4++) { - i = c2-1 ; - S2(c2-1,c4) ; - } - i = c2-1 ; - S3(c2-1) ; - for (c4=c2-1;c4<=M-1;c4++) { - i = c2-1 ; - S4(c2-1,c4) ; - } - i = c2-1 ; - S10(c2-1) ; - S1(c2) ; - i = c2-1 ; - S5(c2-1) ; - } - if ((M >= 1) && (M <= N-2)) { - c2 = M+1 ; - for (c4=M;c4<=N-1;c4++) { - i = M-1 ; - S6(M-1,c4) ; - c6 = M-1 ; - i = M-1 ; - k = M-1 ; - S7(M-1,c4,M-1) ; - i = M-1 ; - S8(M-1,c4) ; - c6 = M-1 ; - i = M-1 ; - k = M-1 ; - S9(M-1,c4,M-1) ; - } - S3(M) ; - S10(M) ; - i = M+1 ; - S1(M+1) ; - S5(M) ; - } - if ((M >= N) && (N >= 2)) { - c4 = N-1 ; - i = N-2 ; - j = N-1 ; - S6(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - i = N-2 ; - j = N-1 ; - S7(N-2,N-1,c6) ; - } - i = N-2 ; - j = N-1 ; - S8(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - i = N-2 ; - j = N-1 ; - S9(N-2,N-1,c6) ; - } - for (c4=N-1;c4<=M-1;c4++) { - i = N-1 ; - S2(N-1,c4) ; - } - i = N-1 ; - S3(N-1) ; - for (c4=N-1;c4<=M-1;c4++) { - i = N-1 ; - S4(N-1,c4) ; - } - i = N-1 ; - S10(N-1) ; - i = N-1 ; - S5(N-1) ; - } - if ((M == N-1) && (N >= 2)) { - c4 = N-1 ; - i = N-2 ; - j = N-1 ; - S6(N-2,N-1) ; - c6 = N-2 ; - i = N-2 ; - j = N-1 ; - k = N-2 ; - S7(N-2,N-1,N-2) ; - i = N-2 ; - j = N-1 ; - S8(N-2,N-1) ; - c6 = N-2 ; - i = N-2 ; - j = N-1 ; - k = N-2 ; - S9(N-2,N-1,N-2) ; - i = N-1 ; - S3(N-1) ; - i = N-1 ; - S10(N-1) ; - i = N-1 ; - S5(N-1) ; - } - for (c2=max(M+2,2);c2<=N-1;c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - i = c2-2 ; - S6(c2-2,c4) ; - i = c2-2 ; - S8(c2-2,c4) ; - } - i = c2-1 ; - S3(c2-1) ; - i = c2-1 ; - S10(c2-1) ; - S1(c2) ; - i = c2-1 ; - S5(c2-1) ; - } - if ((M <= N-2) && (N >= 2)) { - c4 = N-1 ; - i = N-2 ; - j = N-1 ; - S6(N-2,N-1) ; - i = N-2 ; - j = N-1 ; - S8(N-2,N-1) ; - i = N-1 ; - S3(N-1) ; - i = N-1 ; - S10(N-1) ; - i = N-1 ; - S5(N-1) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/bastoul3.c b/cloog-0.16.3/test/reservoir/bastoul3.c deleted file mode 100644 index a89d28eb08b73d9923b27f546943725537ee469e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/bastoul3.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/bastoul3.cloog by CLooG 0.14.0-308-g2713b64 gmp bits in 0.01s. */ -for (i=3;i<=9;i++) { - for (j=max(i-6,i-2*floord(i-1,2));j<=min(3,i-2);j+=2) { - S1(i,j,(i-j)/2); - } -} diff --git a/cloog-0.16.3/test/reservoir/bastoul3.cloog b/cloog-0.16.3/test/reservoir/bastoul3.cloog deleted file mode 100644 index 8437226f1b79829f6109a318151e148b61e00a64..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/bastoul3.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# Figure 4 from "Efficient code generation for automatic parallelization -# and optimization". -# -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statements -1 - -1 - -# i' i j 1 - 6 5 - 0 1 -1 -2 0 - 1 0 1 0 -1 - 1 0 -1 0 3 - 1 0 0 1 -1 - 1 0 0 -1 3 - 1 0 0 0 1 - -0 0 0 - -0 -0 - - - diff --git a/cloog-0.16.3/test/reservoir/cholesky2.c b/cloog-0.16.3/test/reservoir/cholesky2.c deleted file mode 100644 index ee3c52e0bfa8ad502dfb178734b7e0bafbe1895a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/cholesky2.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/cholesky2.cloog by CLooG 0.14.0-283-g7c18f7a gmp bits in 0.04s. */ -if (M >= 1) { - if (M >= 2) { - S1(1); - } - for (c2=2;c2<=min(3,M);c2++) { - S2(1,c2); - } - if (M == 1) { - S1(1); - } - for (c2=4;c2<=3*M-4;c2++) { - if ((c2+1)%3 == 0) { - S1((c2+1)/3); - } - for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) { - for (c6=ceild(c2-c4+2,2);c6<=min(c4,c2-c4);c6++) { - S3(c2-c4-c6+1,c4,c6); - } - } - for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) { - if ((c2+c4)%2 == 0) { - S2((c2-c4+2)/2,c4); - } - } - } - for (c2=max(2*M,3*M-3);c2<=3*M-2;c2++) { - S3(c2-2*M+1,M,M); - } - if (M >= 2) { - S1(M); - } -} diff --git a/cloog-0.16.3/test/reservoir/cholesky2.cloog b/cloog-0.16.3/test/reservoir/cholesky2.cloog deleted file mode 100755 index 7317c6ade21b07995925d94c149f16ba829c994e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/cholesky2.cloog +++ /dev/null @@ -1,79 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 -1 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 4 5 - 1 1 0 0 -1 - 1 -1 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -j+l >= 0, -i+k-1 >= 0, j-k >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 0 -1 0 1 0 - 1 -1 0 1 0 -1 - 1 0 1 -1 0 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -3 0 1 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 -1 0 2 - 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 -1 0 1 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/cholesky2.good.c b/cloog-0.16.3/test/reservoir/cholesky2.good.c deleted file mode 100644 index 36efcde3bfd72a09ca6cfe35cdb0399f60cfd564..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/cholesky2.good.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=2;c2<=min(3,3*M-4);c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - for (c4=ceild(c2+4,3);c4<=min(c2,M);c4++) { - if ((c2+c4)%2 == 0) { - i = (c2-c4+2)/2 ; - S2((c2-c4+2)/2,c4) ; - } - } - } - for (c2=4;c2<=3*M-4;c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - for (c4=ceild(c2+2,3);c4<=min(c2-2,M);c4++) { - for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) { - i = c2-c4-c6+1 ; - S3(c2-c4-c6+1,c4,c6) ; - } - } - for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) { - if ((c2+c4)%2 == 0) { - i = (c2-c4+2)/2 ; - S2((c2-c4+2)/2,c4) ; - } - } - } - for (c2=max(2,3*M-3);c2<=min(3,3*M-2);c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - } - for (c2=max(3*M-3,4);c2<=3*M-2;c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) { - for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) { - i = c2-c4-c6+1 ; - S3(c2-c4-c6+1,c4,c6) ; - } - } - } - if (M >= 1) { - c2 = 3*M-1 ; - S1(M) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/fusion1.c b/cloog-0.16.3/test/reservoir/fusion1.c deleted file mode 100644 index c2c0adfd0b8d7cedbe4698569fd09f0b0983c9f5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/fusion1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c2=0;c2<=M;c2++) { - S1(c2) ; -} -for (c2=1;c2<=M;c2++) { - S2(c2) ; -} -for (c2=0;c2<=M;c2++) { - S3(c2) ; -} diff --git a/cloog-0.16.3/test/reservoir/fusion1.cloog b/cloog-0.16.3/test/reservoir/fusion1.cloog deleted file mode 100755 index 3aea33418c6a495d78683cda4a525d2534ae810b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/fusion1.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -1 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j) | i >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 0 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -1 -# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 -1 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -1 -# { (i,j) | i >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 0 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 4 7 - 0 1 0 0 0 0 0 - 0 0 1 0 -1 0 0 - 0 0 0 1 0 0 0 - 1 0 0 0 0 0 1 - - - 4 7 - 0 1 0 0 0 0 -1 - 0 0 1 0 -1 0 0 - 0 0 0 1 0 0 0 - 1 0 0 0 0 0 1 - - - 4 7 - 0 1 0 0 0 0 -2 - 0 0 1 0 -1 0 0 - 0 0 0 1 0 0 0 - 1 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/fusion1.good.c b/cloog-0.16.3/test/reservoir/fusion1.good.c deleted file mode 100644 index ba28eba7e47bc4d2dd71ac4aa9f152d8513598ac..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/fusion1.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } -#define S3(i) { hash(3); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2; - /* Original iterators. */ - int i; - for (c2=0;c2<=M;c2++) { - S1(c2) ; - } - for (c2=1;c2<=M;c2++) { - S2(c2) ; - } - for (c2=0;c2<=M;c2++) { - S3(c2) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/fusion2.c b/cloog-0.16.3/test/reservoir/fusion2.c deleted file mode 100644 index d9d02d633d69af5f88728684f63105b356bbb434..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/fusion2.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if ((M >= 1) && (N >= 1)) { - for (c4=1;c4<=M;c4++) { - S1(1,c4) ; - } - for (c2=2;c2<=N;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2-1,c4) ; - } - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c4=1;c4<=M;c4++) { - S2(N,c4) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/fusion2.cloog b/cloog-0.16.3/test/reservoir/fusion2.cloog deleted file mode 100755 index dad835303e1fb9b6d0156e74f23eba859326ec9c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/fusion2.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 1 0 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 1 0 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/fusion2.good.c b/cloog-0.16.3/test/reservoir/fusion2.good.c deleted file mode 100644 index b4b8f1ccae4a72f282eba39de9a2d6aa1669a0d7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/fusion2.good.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - if ((M >= 1) && (N >= 1)) { - for (c4=1;c4<=M;c4++) { - S1(1,c4) ; - } - } - if (M >= 1) { - for (c2=2;c2<=N;c2++) { - for (c4=1;c4<=M;c4++) { - i = c2-1 ; - S2(c2-1,c4) ; - } - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - } - if ((M >= 1) && (N >= 1)) { - c2 = N+1 ; - for (c4=1;c4<=M;c4++) { - S2(N,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/jacobi2.c b/cloog-0.16.3/test/reservoir/jacobi2.c deleted file mode 100644 index 421e8a9e786bceb7e6596059ede49bc112eba3d7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/jacobi2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c2=0;c2<=M-1;c2++) { - for (c4=0;c4<=M-1;c4++) { - S1(c2,c4) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/jacobi2.cloog b/cloog-0.16.3/test/reservoir/jacobi2.cloog deleted file mode 100755 index 73523629383618f5a94c86bf15755f46859150f7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/jacobi2.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -1 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, j >= 0, -j+k-1 >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 1 0 0 - 1 0 -1 1 -1 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/jacobi2.good.c b/cloog-0.16.3/test/reservoir/jacobi2.good.c deleted file mode 100644 index 8c6ea0e3331da4de8b20c7de59e2cf3ed810f8f3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/jacobi2.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=0;c2<=M-1;c2++) { - for (c4=0;c4<=M-1;c4++) { - S1(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/jacobi3.c b/cloog-0.16.3/test/reservoir/jacobi3.c deleted file mode 100644 index 0182c158fe52e44bdb2d1faec2beb7d47fe80312..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/jacobi3.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if ((M >= 1) && (N >= 3)) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - S2((c2-1)/2,c4,c6) ; - } - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/jacobi3.cloog b/cloog-0.16.3/test/reservoir/jacobi3.cloog deleted file mode 100755 index dff32ff21fcafc202178dab1e473f56aac744600..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/jacobi3.cloog +++ /dev/null @@ -1,64 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/jacobi3.good.c b/cloog-0.16.3/test/reservoir/jacobi3.good.c deleted file mode 100644 index 39cfce35998df32d7cb78b4387b58e664142e45f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/jacobi3.good.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 1) && (N >= 3)) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - } - if (N >= 3) { - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - i = (c2-1)/2 ; - S2((c2-1)/2,c4,c6) ; - } - } - } - } - } - if ((M >= 1) && (N >= 3)) { - c2 = 2*M+1 ; - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam1.c b/cloog-0.16.3/test/reservoir/lim-lam1.c deleted file mode 100644 index 469117cb5dd2fe7eda3eab0e91dfd8dbe9108ff7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam1.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/lim-lam1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -S1(1,100); -for (c2=-98;c2<=99;c2++) { - if (c2 <= 0) { - S1(1,-c2+1); - } - if (c2 >= 1) { - S2(c2,1); - } - for (c4=max(2,-2*c2+3);c4<=min(199,-2*c2+200);c4++) { - if (c4%2 == 0) { - S1((2*c2+c4)/2,c4/2); - } - if ((c4+1)%2 == 0) { - S2((2*c2+c4-1)/2,(c4+1)/2); - } - } - if (c2 <= 0) { - S1(c2+100,100); - } - if (c2 >= 1) { - S2(100,-c2+101); - } -} -S2(100,1); diff --git a/cloog-0.16.3/test/reservoir/lim-lam1.cloog b/cloog-0.16.3/test/reservoir/lim-lam1.cloog deleted file mode 100644 index 7a7c684f44e24fc19c9b703f86b4f98290cc50cb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam1.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statments -2 - -1 -# { (i,j) | i-1 >= 0, -i+100 >= 0, j-1 >= 0, -j+100 >= 0 } - - 4 4 - 1 1 0 -1 - 1 -1 0 100 - 1 0 1 -1 - 1 0 -1 100 - -0 0 0 -1 -# { (i,j) | i-1 >= 0, -i+100 >= 0, j-1 >= 0, -j+100 >= 0 } - - 4 4 - 1 1 0 -1 - 1 -1 0 100 - 1 0 1 -1 - 1 0 -1 100 - -0 0 0 -0 -# Scattering functions -2 - - 6 9 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 1 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 -2 0 - 0 0 0 0 0 1 0 0 0 - 1 0 0 0 0 0 0 0 1 - - - 6 9 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 1 -1 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 -2 1 - 0 0 0 0 0 1 0 0 -1 - 1 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/lim-lam1.good.c b/cloog-0.16.3/test/reservoir/lim-lam1.good.c deleted file mode 100644 index cd6faf722ac6806bb8b580fceceda1d55bec0a43..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam1.good.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - S1(1,100) ; - for (c2=-98;c2<=0;c2++) { - c4 = -2*c2+2 ; - j = -c2+1 ; - S1(1,-c2+1) ; - for (c4=-2*c2+3;c4<=199;c4++) { - if (c4%2 == 0) { - i = (2*c2+c4)/2 ; - S1((2*c2+c4)/2,c4/2) ; - } - if ((c4+1)%2 == 0) { - i = (2*c2+c4-1)/2 ; - j = (c4+1)/2 ; - S2((2*c2+c4-1)/2,(c4+1)/2) ; - } - } - i = c2+100 ; - S1(c2+100,100) ; - } - for (c2=1;c2<=99;c2++) { - S2(c2,1) ; - for (c4=2;c4<=-2*c2+200;c4++) { - if (c4%2 == 0) { - i = (2*c2+c4)/2 ; - S1((2*c2+c4)/2,c4/2) ; - } - if ((c4+1)%2 == 0) { - i = (2*c2+c4-1)/2 ; - j = (c4+1)/2 ; - S2((2*c2+c4-1)/2,(c4+1)/2) ; - } - } - c4 = -2*c2+201 ; - j = -c2+101 ; - S2(100,-c2+101) ; - } - S2(100,1) ; -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam2.c b/cloog-0.16.3/test/reservoir/lim-lam2.c deleted file mode 100644 index ab1a32fc4e961b495444d203a42e8f4c103afdc9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam2.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (c2=1;c2<=M;c2++) { - S1(c2) ; -} -if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=N;c4++) { - S2(c2,c4) ; - } - } -} -if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=N-1;c4++) { - S3(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam2.cloog b/cloog-0.16.3/test/reservoir/lim-lam2.cloog deleted file mode 100755 index db50b74696d68e635901584dca9478e8e1b23869..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam2.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# Language -c - -# Context - - 3 4 - 1 1 0 -1 - 1 0 1 -1 - 1 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 -1 - 1 -1 1 0 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-2 >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 1 0 0 - 1 0 1 0 0 -2 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 1 0 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 -1 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/lim-lam2.good.c b/cloog-0.16.3/test/reservoir/lim-lam2.good.c deleted file mode 100644 index 0ea3332d4040c080def5c046e7a388774b6b3c73..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam2.good.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - S1(c2) ; - } - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=N;c4++) { - S2(c2,c4) ; - } - } - } - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=N-1;c4++) { - S3(c2,c4) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam3.c b/cloog-0.16.3/test/reservoir/lim-lam3.c deleted file mode 100644 index c68a6295fcc2cd9e8c045817908b46d55546baf5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam3.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/lim-lam3.cloog by CLooG 0.16.2-8-g1421b58 gmp bits in 0.03s. */ -S4(1); -for (c2=9;c2<=min(13,5*M-1);c2++) { - if (c2 <= M+7) { - S2(c2-7,1); - } - if (c2 == 10) { - S4(2); - } - if (c2 <= 3*M+3) { - if (c2%3 == 0) { - S3((c2-3)/3,1); - } - } -} -for (c2=14;c2<=5*M-1;c2++) { - for (c4=max(2,ceild(c2-M-3,4));c4<=min(floord(c2-8,3),M-1);c4++) { - for (c6=max(1,ceild(c2-2*c4-M-5,2));c6<=min(floord(c2-3*c4-6,2),c4-1);c6++) { - S1(c2-2*c4-2*c6-5,c4,c6); - } - } - for (c4=max(1,ceild(c2-M-3,4));c4<=floord(c2-4,5);c4++) { - S2(c2-4*c4-3,c4); - } - if (c2%5 == 0) { - S4(c2/5); - } - for (c4=max(1,ceild(c2-3*M-1,2));c4<=floord(c2-4,5);c4++) { - if ((c2+c4+2)%3 == 0) { - S3((c2-2*c4-1)/3,c4); - } - } -} -if (M >= 2) { - S4(M); -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam3.cloog b/cloog-0.16.3/test/reservoir/lim-lam3.cloog deleted file mode 100755 index 0d3d4a5aa63abc3d4083ead42c65337ace154957..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam3.cloog +++ /dev/null @@ -1,101 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -1 - 1 0 1 -0 - -# Number of statments -4 - -1 -# { (i,j,k,l) | -i+l >= 0, i-j-1 >= 0, k-1 >= 0, j-k-1 >= 0, 1 >= 0 } - - 5 6 - 1 -1 0 0 1 0 - 1 1 -1 0 0 -1 - 1 0 0 1 0 -1 - 1 0 1 -1 0 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } - - 4 5 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 1 -1 0 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } - - 4 5 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 1 -1 0 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 -1 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -0 -# Scattering functions -4 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -2 -2 0 -5 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -4 0 -3 - 0 0 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -3 -2 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -5 0 0 - 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/lim-lam3.good.c b/cloog-0.16.3/test/reservoir/lim-lam3.good.c deleted file mode 100644 index 0cddca9a1f2c7b447f3b7e77e42f640aeb200e43..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam3.good.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i) { hash(4); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=5;c2<=min(5*M,8);c2++) { - if (c2%5 == 0) { - S4(c2/5) ; - } - } - for (c2=9;c2<=min(13,5*M-1);c2++) { - for (c4=max(1,ceild(c2-M-3,4));c4<=floord(c2-4,5);c4++) { - i = c2-4*c4-3 ; - S2(c2-4*c4-3,c4) ; - } - if (c2%5 == 0) { - S4(c2/5) ; - } - for (c4=max(1,ceild(c2-3*M-1,2));c4<=floord(c2-4,5);c4++) { - if ((c2+c4+2)%3 == 0) { - i = (c2-2*c4-1)/3 ; - S3((c2-2*c4-1)/3,c4) ; - } - } - } - for (c2=14;c2<=5*M-1;c2++) { - for (c4=max(2,ceild(c2-M-3,4));c4<=min(M-1,floord(c2-8,3));c4++) { - for (c6=max(1,ceild(c2-2*c4-M-5,2));c6<=min(c4-1,floord(c2-3*c4-6,2));c6++) { - i = c2-2*c4-2*c6-5 ; - S1(c2-2*c4-2*c6-5,c4,c6) ; - } - } - for (c4=max(ceild(c2-M-3,4),1);c4<=floord(c2-4,5);c4++) { - i = c2-4*c4-3 ; - S2(c2-4*c4-3,c4) ; - } - if (c2%5 == 0) { - S4(c2/5) ; - } - for (c4=max(ceild(c2-3*M-1,2),1);c4<=floord(c2-4,5);c4++) { - if ((c2+c4+2)%3 == 0) { - i = (c2-2*c4-1)/3 ; - S3((c2-2*c4-1)/3,c4) ; - } - } - } - if (M >= 2) { - c2 = 5*M ; - S4(M) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam4.c b/cloog-0.16.3/test/reservoir/lim-lam4.c deleted file mode 100644 index b2c0845a95419227fefb6b37265ac92468ab890f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam4.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ -if (M >= 2) { - S1(1,0,0) ; - for (c2=2;c2<=2*M-2;c2++) { - for (c4=max(-M+1,-c2+1);c4<=-1;c4++) { - for (i=max(1,c2-M+1);i<=min(M-1,c2+c4);i++) { - S1(i,c2+c4-i,-c4) ; - } - for (c6=max(-c4,c2-M+1);c6<=min(M-1,c2-1);c6++) { - S2(c2-c6,c4+c6,c6) ; - } - } - for (i=max(1,c2-M+1);i<=min(c2,M-1);i++) { - S1(i,c2-i,0) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam4.cloog b/cloog-0.16.3/test/reservoir/lim-lam4.cloog deleted file mode 100755 index 0aa66e31561d5fba8247dbaa030cea9fc3bb33ee..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam4.cloog +++ /dev/null @@ -1,62 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l) | i-1 >= 0, -i+l-1 >= 0, j >= 0, k >= 0, -j-k+l-1 >= 0, 1 >= 0 } - - 6 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 -1 - 1 0 1 0 0 0 - 1 0 0 1 0 0 - 1 0 -1 -1 1 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+l-1 >= 0, j >= 0, -j+k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 6 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 -1 - 1 0 1 0 0 0 - 1 0 -1 1 0 -1 - 1 0 0 -1 1 -1 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/lim-lam4.good.c b/cloog-0.16.3/test/reservoir/lim-lam4.good.c deleted file mode 100644 index afb05ec7bd649f56f4a4cfadd639ade13932c231..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam4.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if (M >= 2) { - S1(1,0,0) ; - } - for (c2=2;c2<=2*M-2;c2++) { - for (c4=max(-M+1,-c2+1);c4<=-1;c4++) { - for (i=max(1,c2-M+1);i<=min(c2+c4,M-1);i++) { - j = c2+c4-i ; - S1(i,c2+c4-i,-c4) ; - } - for (c6=max(-c4,c2-M+1);c6<=min(c2-1,M-1);c6++) { - i = c2-c6 ; - j = c4+c6 ; - S2(c2-c6,c4+c6,c6) ; - } - } - for (i=max(1,c2-M+1);i<=min(M-1,c2);i++) { - j = c2-i ; - S1(i,c2-i,0) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam5.c b/cloog-0.16.3/test/reservoir/lim-lam5.c deleted file mode 100644 index e6b0a57113a847cc909176f9e9e3fccbd6aa088b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam5.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S3(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam5.cloog b/cloog-0.16.3/test/reservoir/lim-lam5.cloog deleted file mode 100755 index c5d6ef9f4adc236bfa855a548c3c1dd9c264a695..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam5.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/lim-lam5.good.c b/cloog-0.16.3/test/reservoir/lim-lam5.good.c deleted file mode 100644 index 69d8805f80d527f6c01de8d62b17a0d4980ce5c9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam5.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S3(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam6.c b/cloog-0.16.3/test/reservoir/lim-lam6.c deleted file mode 100644 index 05baff17c8d03b76e2abe5ad4fb57072ac7a6401..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam6.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c4,c2) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/lim-lam6.cloog b/cloog-0.16.3/test/reservoir/lim-lam6.cloog deleted file mode 100755 index a1bf181a99c07b7e3ffe4d6331707066f46d4330..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam6.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 0 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 0 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/lim-lam6.good.c b/cloog-0.16.3/test/reservoir/lim-lam6.good.c deleted file mode 100644 index f49ab57149bc288022904002531c6e6b5302a6de..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/lim-lam6.good.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - if (M >= 1) { - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - } - if (M >= 1) { - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c4,c2) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/liu-zhuge1.c b/cloog-0.16.3/test/reservoir/liu-zhuge1.c deleted file mode 100644 index b0f86022e1840bba69761403f14633a21a04e4e4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/liu-zhuge1.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/liu-zhuge1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ -if ((M >= 0) && (N >= 0)) { - for (c2=-4;c2<=min(-1,3*M+N-4);c2++) { - for (c4=max(0,c2-3*M+4);c4<=min(N,c2+4);c4++) { - if ((c2+2*c4+1)%3 == 0) { - S1((c2-c4+4)/3,c4); - } - } - } - for (c2=0;c2<=3*M+N-4;c2++) { - for (c4=max(0,c2-3*M);c4<=min(c2,c2-3*M+3);c4++) { - if ((c2+2*c4)%3 == 0) { - S2((c2-c4)/3,c4); - } - } - for (c4=max(0,c2-3*M+4);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S2((c2-c4)/3,c4); - } - if ((c2+2*c4+1)%3 == 0) { - S1((c2-c4+4)/3,c4); - } - } - for (c4=max(c2+1,c2-3*M+4);c4<=min(N,c2+4);c4++) { - if ((c2+2*c4+1)%3 == 0) { - S1((c2-c4+4)/3,c4); - } - } - for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S3((c2-c4)/3,c4); - } - } - } - for (c2=max(0,3*M+N-3);c2<=3*M+N;c2++) { - for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S2((c2-c4)/3,c4); - } - } - for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S3((c2-c4)/3,c4); - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/liu-zhuge1.cloog b/cloog-0.16.3/test/reservoir/liu-zhuge1.cloog deleted file mode 100755 index e28cb4bf8271cc583dd9a4ea0dcd93b888add7c0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/liu-zhuge1.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 1 0 0 - 1 0 1 0 0 0 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 1 0 0 - 1 0 1 0 0 0 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 1 0 0 - 1 0 1 0 0 0 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -3 -1 0 0 4 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -3 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -3 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/liu-zhuge1.good.c b/cloog-0.16.3/test/reservoir/liu-zhuge1.good.c deleted file mode 100644 index 2b07aded62fb62f2ecb729ffc29218b80f82542d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/liu-zhuge1.good.c +++ /dev/null @@ -1,168 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/liu-zhuge1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - if ((M >= 0) && (N >= 0)) { - for (c2=-4;c2<=min(-1,3*M+N-4);c2++) { - for (c4=max(0,c2-3*M+4);c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - } - } - if ((M <= 1) && (M >= 0)) { - for (c2=0;c2<=3*M+N-4;c2++) { - for (c4=max(c2-3*M,0);c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=c2-3*M+4;c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } - for (c2=0;c2<=min(3*M-4,N-1);c2++) { - for (c4=0;c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=c2+1;c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=0;c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - if (M >= 2) { - for (c2=3*M-3;c2<=N-1;c2++) { - for (c4=max(c2-3*M,0);c4<=c2-3*M+3;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=c2-3*M+4;c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=c2+1;c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } - if (N >= 0) { - for (c2=N;c2<=3*M-4;c2++) { - for (c4=0;c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=0;c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } - for (c2=max(3*M-3,N);c2<=3*M+N-4;c2++) { - for (c4=max(c2-3*M,0);c4<=c2-3*M+3;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=c2-3*M+4;c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - if ((M >= 0) && (N >= 0)) { - for (c2=max(3*M+N-3,0);c2<=3*M+N;c2++) { - for (c4=max(0,c2-3*M);c4<=min(c2,N);c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=min(c2,N);c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/loechner3.c b/cloog-0.16.3/test/reservoir/loechner3.c deleted file mode 100644 index c3967b8577164d332e056ce5bc6e10010f618c8b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=c2+M;c4++) { - for (c6=max(1,-c2+c4);c6<=min(M,c4-1);c6++) { - S1(c2,c6,c4-c6) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/loechner3.cloog b/cloog-0.16.3/test/reservoir/loechner3.cloog deleted file mode 100755 index 04b34cb5c86397983167df9b7f801cc3aefb1e6e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner3.cloog +++ /dev/null @@ -1,39 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k,l) | -i+l >= 0, j-1 >= 0, -j+l >= 0, k-1 >= 0, i-k >= 0, 1 >= 0 } - - 6 6 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 0 - 1 0 0 1 0 -1 - 1 1 0 -1 0 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/loechner3.good.c b/cloog-0.16.3/test/reservoir/loechner3.good.c deleted file mode 100644 index 377fb462859ddeab7ebbfa9b3eff8d2e69f2bbce..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner3.good.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=c2+M;c4++) { - for (c6=max(1,-c2+c4);c6<=min(M,c4-1);c6++) { - k = c4-c6 ; - S1(c2,c6,c4-c6) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/loechner4.c b/cloog-0.16.3/test/reservoir/loechner4.c deleted file mode 100644 index 8c4b9c7c71536c6b9ccdb53c7b9b215037bbd93c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner4.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 1) { - for (c2=2;c2<=2*M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=max(1,c2-M);c8<=min(M,c2-1);c8++) { - S1(c6,c4,c8,c2-c8) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/loechner4.cloog b/cloog-0.16.3/test/reservoir/loechner4.cloog deleted file mode 100755 index 503f56a8fed88232da901c7222a1fea1c98ef2cf..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner4.cloog +++ /dev/null @@ -1,44 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+m >= 0, j-1 >= 0, -j+m >= 0, k-1 >= 0, -k+m >= 0, l-1 >= 0, -l+m >= 0, 1 >= 0 } - - 9 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 1 0 - 1 0 1 0 0 0 -1 - 1 0 -1 0 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 0 -1 0 1 0 - 1 0 0 0 1 0 -1 - 1 0 0 0 -1 1 0 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 10 16 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/loechner4.good.c b/cloog-0.16.3/test/reservoir/loechner4.good.c deleted file mode 100644 index ecd109eb878049be0e8c085252e87172ae6d2cb1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner4.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6, c8; - /* Original iterators. */ - int i, j, k, l; - for (c2=2;c2<=2*M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=max(1,c2-M);c8<=min(c2-1,M);c8++) { - l = c2-c8 ; - S1(c6,c4,c8,c2-c8) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/loechner5.c b/cloog-0.16.3/test/reservoir/loechner5.c deleted file mode 100644 index 3ba1f5b80ccc5dd810234f6ddce7727d17ef2d25..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner5.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=1;c8<=M;c8++) { - S1(c4,c6,c2,c8) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/loechner5.cloog b/cloog-0.16.3/test/reservoir/loechner5.cloog deleted file mode 100755 index f208435011c1cf6538fac90578f24a04ab56019f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner5.cloog +++ /dev/null @@ -1,44 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+m >= 0, j-1 >= 0, -j+m >= 0, k-1 >= 0, -k+m >= 0, l-1 >= 0, -l+m >= 0, 1 >= 0 } - - 9 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 1 0 - 1 0 1 0 0 0 -1 - 1 0 -1 0 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 0 -1 0 1 0 - 1 0 0 0 1 0 -1 - 1 0 0 0 -1 1 0 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 10 16 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/loechner5.good.c b/cloog-0.16.3/test/reservoir/loechner5.good.c deleted file mode 100644 index 937c11815f423ff850c1f198349b0c72eba2bb05..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/loechner5.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6, c8; - /* Original iterators. */ - int i, j, k, l; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=1;c8<=M;c8++) { - S1(c4,c6,c2,c8) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-interp.c b/cloog-0.16.3/test/reservoir/mg-interp.c deleted file mode 100644 index 3ed1fcf6d16acec087a85ee3bdb71b4ab0178afb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-interp.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/mg-interp.cloog by CLooG 0.16.2-5-g590827b gmp bits in 0.29s. */ -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6); - } - if (N == 2) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6); - S7(c2,1,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6); - S7(c2,1,c6); - } - } - if (N == 2) { - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6); - } - } - if (N == 2) { - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6); - } - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6); - } - } - if (N == 3) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6); - S7(c2,2,c6); - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6); - } - } - if (N >= 4) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6); - S7(c2,2,c6); - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6); - } - } - for (c4=3;c4<=2*N-5;c4++) { - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - S10(c2,(c4-1)/2,c6); - } - } - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S3(c2,(c4+1)/2,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S6(c2,(c4+2)/2,c6); - } - if ((c4+1)%2 == 0) { - S1(c2,(c4+3)/2,c6); - } - if (c4%2 == 0) { - S7(c2,(c4+2)/2,c6); - } - } - if ((c4+1)%2 == 0) { - S1(c2,(c4+3)/2,M); - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S11(c2,c4/2,c6); - } - } - } - if (N >= 4) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,N-1,c6); - S7(c2,N-1,c6); - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,N-2,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M-1;c6++) { - S10(c2,N-2,c6); - } - for (c6=1;c6<=M;c6++) { - S3(c2,N-1,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M-1;c6++) { - S11(c2,N-1,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,N-1,c6); - } - } -} -if ((M == 1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - S1(c2,1,1); - for (c4=1;c4<=2*N-5;c4++) { - if ((c4+1)%2 == 0) { - S3(c2,(c4+1)/2,1); - } - if ((c4+1)%2 == 0) { - S1(c2,(c4+3)/2,1); - } - } - S3(c2,N-1,1); - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S2(c2,1,c6); - } - for (c6=1;c6<=M-1;c6++) { - S8(c2,1,c6); - } - for (c4=3;c4<=2*N-2;c4++) { - for (c6=1;c6<=M;c6++) { - if (c4%2 == 0) { - S2(c2,c4/2,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S8(c2,c4/2,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - S9(c2,(c4-1)/2,c6); - } - } - } - for (c6=1;c6<=M-1;c6++) { - S9(c2,N-1,c6); - } - } -} -if ((M == 1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=2;c4<=2*N-2;c4++) { - if (c4%2 == 0) { - S2(c2,c4/2,1); - } - } - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6); - } - } - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S5(c2,c4,c6); - } - } - } -} -if ((M >= P+1) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S12(c2,c4,c6); - } - } - } -} -if ((M >= 2) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S13(c2,c4,c6); - } - } - } -} -if ((M >= P+1) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S14(c2,c4,c6); - } - } - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S15(c2,c4,c6); - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-interp.cloog b/cloog-0.16.3/test/reservoir/mg-interp.cloog deleted file mode 100755 index 9d084635f5ac456fbf3139e39049021c0ea76116..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-interp.cloog +++ /dev/null @@ -1,376 +0,0 @@ -# Language -c - -# Context - - 1 11 - 1 0 0 0 0 0 0 0 0 0 1 -0 - -# Number of statments -15 - -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -15 - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 3 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 2 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 2 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -5 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -6 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -7 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/mg-interp.good.c b/cloog-0.16.3/test/reservoir/mg-interp.good.c deleted file mode 100644 index 7f919c8355806faecf15db3b83d5b276b56dacbc..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-interp.good.c +++ /dev/null @@ -1,318 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-interp.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 1.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } -#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } -#define S10(i,j,k) { hash(10); hash(i); hash(j); hash(k); } -#define S11(i,j,k) { hash(11); hash(i); hash(j); hash(k); } -#define S12(i,j,k) { hash(12); hash(i); hash(j); hash(k); } -#define S13(i,j,k) { hash(13); hash(i); hash(j); hash(k); } -#define S14(i,j,k) { hash(14); hash(i); hash(j); hash(k); } -#define S15(i,j,k) { hash(15); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 2) && (N >= 4)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6) ; - S7(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S1(c2,2,c6) ; - } - S1(c2,2,M) ; - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6) ; - S7(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6) ; - } - for (c4=3;c4<=2*N-5;c4++) { - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - j = (c4-1)/2 ; - S10(c2,(c4-1)/2,c6) ; - } - } - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S3(c2,(c4+1)/2,c6) ; - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - j = (c4+2)/2 ; - S6(c2,(c4+2)/2,c6) ; - S7(c2,(c4+2)/2,c6) ; - } - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,c6) ; - } - } - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,M) ; - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S11(c2,c4/2,c6) ; - } - } - } - c4 = 2*N-4 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S6(c2,N-1,c6) ; - S7(c2,N-1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - j = N-2 ; - S11(c2,N-2,c6) ; - } - c4 = 2*N-3 ; - for (c6=1;c6<=M-1;c6++) { - j = N-2 ; - S10(c2,N-2,c6) ; - } - for (c6=1;c6<=M;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - } - c4 = 2*N-2 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S11(c2,N-1,c6) ; - } - c4 = 2*N-1 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S10(c2,N-1,c6) ; - } - } - } - if ((M >= 2) && (N == 3)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6) ; - S7(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S1(c2,2,c6) ; - } - S1(c2,2,M) ; - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6) ; - S7(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,2,c6) ; - } - } - } - if ((M >= 2) && (N == 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6) ; - S7(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,1,c6) ; - } - } - } - if ((M == 1) && (N >= 3)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=-1;c4<=0;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,1) ; - } - } - for (c4=1;c4<=2*N-5;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S3(c2,(c4+1)/2,1) ; - } - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,1) ; - } - } - for (c4=2*N-4;c4<=2*N-3;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S3(c2,(c4+1)/2,1) ; - } - } - } - } - if ((M == 1) && (N == 2)) { - for (c2=1;c2<=O-1;c2++) { - S1(c2,1,1) ; - S3(c2,1,1) ; - } - } - if ((M >= 2) && (N >= 3)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S2(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S8(c2,1,c6) ; - } - for (c4=3;c4<=2*N-2;c4++) { - for (c6=1;c6<=M;c6++) { - if (c4%2 == 0) { - S2(c2,c4/2,c6) ; - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S8(c2,c4/2,c6) ; - } - } - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - j = (c4-1)/2 ; - S9(c2,(c4-1)/2,c6) ; - } - } - } - c4 = 2*N-1 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S9(c2,N-1,c6) ; - } - } - } - if ((M >= 2) && (N == 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S2(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S8(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S9(c2,1,c6) ; - } - } - } - if ((M == 1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=2;c4<=2*N-2;c4++) { - if (c4%2 == 0) { - S2(c2,c4/2,1) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S5(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S12(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S13(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S14(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S15(c2,c4,c6) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-interp2.c b/cloog-0.16.3/test/reservoir/mg-interp2.c deleted file mode 100644 index 688cc911bc35030e8dcfeb7d5457416fbdefdb56..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-interp2.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-interp2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.11s. */ -if (O >= 2) { - if ((M >= P+1) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S1(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S2(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S3(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-interp2.cloog b/cloog-0.16.3/test/reservoir/mg-interp2.cloog deleted file mode 100755 index d1218bc782a75430f32eae6dd423733208e31a51..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-interp2.cloog +++ /dev/null @@ -1,112 +0,0 @@ -# Language -c - -# Context - - 1 11 - 1 0 0 0 0 0 0 0 0 0 1 -0 - -# Number of statments -4 - -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -4 - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/mg-interp2.good.c b/cloog-0.16.3/test/reservoir/mg-interp2.good.c deleted file mode 100644 index 2e1f3652d39f0beec3dff7a4a447fde60c394aeb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-interp2.good.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-interp2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.07s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= P+1) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S1(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S2(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S3(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6) ; - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-psinv.c b/cloog-0.16.3/test/reservoir/mg-psinv.c deleted file mode 100644 index a0447e1b8a3adb0eda542cf2543fa911bc90e89c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-psinv.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-psinv.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ -if ((M >= 1) && (N >= 3) && (O >= 3)) { - if (M >= 3) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6); - S2(c2,2,c6); - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6); - } - } - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,N-1,c6); - } - } - } - if (M <= 2) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-psinv.cloog b/cloog-0.16.3/test/reservoir/mg-psinv.cloog deleted file mode 100755 index 7f0dd2c3c2a518b711bc613c03d29f4fe64cf278..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-psinv.cloog +++ /dev/null @@ -1,88 +0,0 @@ -# Language -c - -# Context - - 1 5 - 1 0 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -2 - 1 0 0 -1 1 0 0 -1 - 1 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/mg-psinv.good.c b/cloog-0.16.3/test/reservoir/mg-psinv.good.c deleted file mode 100644 index cb5b57c9a9bc3ad3dc7b5de78045c88fc6dd2856..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-psinv.good.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-psinv.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 3) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6) ; - } - } - } - c4 = 2*N-2 ; - for (c6=2;c6<=M-1;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - } - } - } - if ((M >= 3) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,2,c6) ; - } - } - } - if ((M >= 1) && (M <= 2) && (N >= 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-resid.c b/cloog-0.16.3/test/reservoir/mg-resid.c deleted file mode 100644 index 89a3cdaf1a65d39c1db3b0c76895dda179dd8af1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-resid.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-resid.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.03s. */ -if ((M >= 1) && (N >= 3) && (O >= 3)) { - if (M >= 3) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6); - S2(c2,2,c6); - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6); - } - } - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,N-1,c6); - } - } - } - if (M <= 2) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-resid.cloog b/cloog-0.16.3/test/reservoir/mg-resid.cloog deleted file mode 100755 index 7f0dd2c3c2a518b711bc613c03d29f4fe64cf278..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-resid.cloog +++ /dev/null @@ -1,88 +0,0 @@ -# Language -c - -# Context - - 1 5 - 1 0 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -2 - 1 0 0 -1 1 0 0 -1 - 1 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/mg-resid.good.c b/cloog-0.16.3/test/reservoir/mg-resid.good.c deleted file mode 100644 index 4056aab9bb457c0004dc0e981cbbff10afb7f33e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-resid.good.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-resid.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 3) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6) ; - } - } - } - c4 = 2*N-2 ; - for (c6=2;c6<=M-1;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - } - } - } - if ((M >= 3) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,2,c6) ; - } - } - } - if ((M >= 1) && (M <= 2) && (N >= 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-rprj3.c b/cloog-0.16.3/test/reservoir/mg-rprj3.c deleted file mode 100644 index f7f7a4d01d6bc98a50306276d0210ffc987410fd..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-rprj3.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-rprj3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.10s. */ -if ((M >= 2) && (N >= 3) && (O >= 3)) { - if (M >= 3) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=M;c6++) { - S1(c2,2,c6); - } - for (c4=3;c4<=N-1;c4++) { - for (c6=2;c6<=M;c6++) { - S2(c2,c4-1,c6); - } - S4(c2,c4-1,2); - for (c6=2;c6<=M-2;c6++) { - S3(c2,c4-1,c6); - S5(c2,c4-1,c6); - S4(c2,c4-1,c6+1); - } - S3(c2,c4-1,M-1); - S5(c2,c4-1,M-1); - for (c6=2;c6<=M;c6++) { - S1(c2,c4,c6); - } - } - for (c6=2;c6<=M;c6++) { - S2(c2,N-1,c6); - } - S4(c2,N-1,2); - for (c6=2;c6<=M-2;c6++) { - S3(c2,N-1,c6); - S5(c2,N-1,c6); - S4(c2,N-1,c6+1); - } - S3(c2,N-1,M-1); - S5(c2,N-1,M-1); - } - } - if (M == 2) { - for (c2=2;c2<=O-1;c2++) { - S1(c2,2,2); - for (c4=3;c4<=N-1;c4++) { - S2(c2,c4-1,2); - S1(c2,c4,2); - } - S2(c2,N-1,2); - } - } -} diff --git a/cloog-0.16.3/test/reservoir/mg-rprj3.cloog b/cloog-0.16.3/test/reservoir/mg-rprj3.cloog deleted file mode 100755 index adf72fd9deaaf56ee2376567042ac0c3269caafd..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-rprj3.cloog +++ /dev/null @@ -1,136 +0,0 @@ -# Language -c - -# Context - - 1 8 - 1 0 0 0 0 0 0 1 -0 - -# Number of statments -5 - -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -5 - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 1 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/mg-rprj3.good.c b/cloog-0.16.3/test/reservoir/mg-rprj3.good.c deleted file mode 100644 index 38ac53e4c2b21a3c49b880457661f23bc8cef604..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/mg-rprj3.good.c +++ /dev/null @@ -1,163 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-rprj3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.39s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O, int P, int Q, int R) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 4) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=M;c6++) { - S1(c2,2,c6) ; - } - for (c4=3;c4<=N-1;c4++) { - for (c6=2;c6<=M;c6++) { - j = c4-1 ; - S2(c2,c4-1,c6) ; - } - j = c4-1 ; - S4(c2,c4-1,2) ; - for (c6=2;c6<=M-2;c6++) { - j = c4-1 ; - S3(c2,c4-1,c6) ; - j = c4-1 ; - S5(c2,c4-1,c6) ; - j = c4-1 ; - k = c6+1 ; - S4(c2,c4-1,c6+1) ; - } - c6 = M-1 ; - j = c4-1 ; - k = M-1 ; - S3(c2,c4-1,M-1) ; - j = c4-1 ; - k = M-1 ; - S5(c2,c4-1,M-1) ; - for (c6=2;c6<=M;c6++) { - S1(c2,c4,c6) ; - } - } - for (c6=2;c6<=M;c6++) { - j = N-1 ; - S2(c2,N-1,c6) ; - } - j = N-1 ; - S4(c2,N-1,2) ; - for (c6=2;c6<=M-2;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - j = N-1 ; - S5(c2,N-1,c6) ; - j = N-1 ; - k = c6+1 ; - S4(c2,N-1,c6+1) ; - } - c6 = M-1 ; - j = N-1 ; - k = M-1 ; - S3(c2,N-1,M-1) ; - j = N-1 ; - k = M-1 ; - S5(c2,N-1,M-1) ; - } - } - if ((M >= 4) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=M;c6++) { - S1(c2,2,c6) ; - } - for (c6=2;c6<=M;c6++) { - S2(c2,2,c6) ; - } - S4(c2,2,2) ; - for (c6=2;c6<=M-2;c6++) { - S3(c2,2,c6) ; - S5(c2,2,c6) ; - k = c6+1 ; - S4(c2,2,c6+1) ; - } - c6 = M-1 ; - k = M-1 ; - S3(c2,2,M-1) ; - k = M-1 ; - S5(c2,2,M-1) ; - } - } - if ((M == 3) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=3;c6++) { - S1(c2,2,c6) ; - } - for (c6=2;c6<=3;c6++) { - S2(c2,2,c6) ; - } - S4(c2,2,2) ; - S3(c2,2,2) ; - S5(c2,2,2) ; - } - } - if ((M == 3) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=3;c6++) { - S1(c2,2,c6) ; - } - for (c4=3;c4<=N-1;c4++) { - for (c6=2;c6<=3;c6++) { - j = c4-1 ; - S2(c2,c4-1,c6) ; - } - j = c4-1 ; - S4(c2,c4-1,2) ; - j = c4-1 ; - S3(c2,c4-1,2) ; - j = c4-1 ; - S5(c2,c4-1,2) ; - for (c6=2;c6<=3;c6++) { - S1(c2,c4,c6) ; - } - } - for (c6=2;c6<=3;c6++) { - j = N-1 ; - S2(c2,N-1,c6) ; - } - j = N-1 ; - S4(c2,N-1,2) ; - j = N-1 ; - S3(c2,N-1,2) ; - j = N-1 ; - S5(c2,N-1,2) ; - } - } - if ((M == 2) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - S1(c2,2,2) ; - for (c4=3;c4<=N-1;c4++) { - j = c4-1 ; - S2(c2,c4-1,2) ; - S1(c2,c4,2) ; - } - j = N-1 ; - S2(c2,N-1,2) ; - } - } - if ((M == 2) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - S1(c2,2,2) ; - S2(c2,2,2) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali1.c b/cloog-0.16.3/test/reservoir/pingali1.c deleted file mode 100644 index 505df8d566d25a92c8a86c57c611348f117eb3cb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali1.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/pingali1.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.01s. */ -if ((M >= 1) && (N >= 1)) { - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - S2(c2,1); - for (c4=3;c4<=2*N-1;c4++) { - for (c6=max(1,c4-N);c6<=floord(c4-1,2);c6++) { - S1(c2,c4-c6,c6); - } - if ((c4+1)%2 == 0) { - S2(c2,(c4+1)/2); - } - } - } - } - if (N == 1) { - for (c2=1;c2<=M;c2++) { - S2(c2,1); - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali1.cloog b/cloog-0.16.3/test/reservoir/pingali1.cloog deleted file mode 100755 index 0be0a2a18ca3f55956e68e4d44efa7ca7192ac12..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali1.cloog +++ /dev/null @@ -1,61 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, -j+m >= 0, k-1 >= 0, j-k-1 >= 0, 1 >= 0 } - - 6 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 -1 0 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 1 -1 0 0 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 1 0 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/pingali1.good.c b/cloog-0.16.3/test/reservoir/pingali1.good.c deleted file mode 100644 index b72eb17ddcb1be5a0ac20c6a98fbd0ad9d3fac5b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali1.good.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=2;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S2(c2,(c4+1)/2) ; - } - } - for (c4=3;c4<=2*N-1;c4++) { - for (c6=max(1,c4-N);c6<=floord(c4-1,2);c6++) { - j = c4-c6 ; - S1(c2,c4-c6,c6) ; - } - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S2(c2,(c4+1)/2) ; - } - } - } - } - if (N == 1) { - for (c2=1;c2<=M;c2++) { - S2(c2,1) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali2.c b/cloog-0.16.3/test/reservoir/pingali2.c deleted file mode 100644 index b09c4f93d71f16c7a950c33790f9bb0fd0a76d71..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali2.cloog b/cloog-0.16.3/test/reservoir/pingali2.cloog deleted file mode 100755 index 0f890386e1a50b334af5d9714f3f4bbe877fc6e6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali2.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/pingali2.good.c b/cloog-0.16.3/test/reservoir/pingali2.good.c deleted file mode 100644 index 93417319b8f795f54d2a8ca9974bf47d37152bb0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali2.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali3.c b/cloog-0.16.3/test/reservoir/pingali3.c deleted file mode 100644 index b53542a09202931ed0700aa2333bb70799142918..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali3.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - S2(c2,c4,c6) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali3.cloog b/cloog-0.16.3/test/reservoir/pingali3.cloog deleted file mode 100755 index 8f345c0eb839c743c466c76312ded23cea04f417..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali3.cloog +++ /dev/null @@ -1,62 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+l >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 0 - 1 0 0 1 0 -1 - 1 0 0 -1 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/pingali3.good.c b/cloog-0.16.3/test/reservoir/pingali3.good.c deleted file mode 100644 index 5b5e4a9177e800f45a34c873eeb739a835513151..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali3.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - S2(c2,c4,c6) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali4.c b/cloog-0.16.3/test/reservoir/pingali4.c deleted file mode 100644 index 99056994a1fdaf860678e1899d2889212ed7e103..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali4.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } -} -for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali4.cloog b/cloog-0.16.3/test/reservoir/pingali4.cloog deleted file mode 100755 index 46f4e07f643896cc82929e9e66758eb4d512fa98..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali4.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -2 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/pingali4.good.c b/cloog-0.16.3/test/reservoir/pingali4.good.c deleted file mode 100644 index 5b617071e38983272a04665b5161f250993ef325..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali4.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali5.c b/cloog-0.16.3/test/reservoir/pingali5.c deleted file mode 100644 index 1b2c415184cc7f858ebfa57138580fa1d2e1bc51..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali5.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/pingali5.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.02s. */ -if (M >= 2) { - for (c2=3;c2<=2*M-3;c2++) { - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c2-1,c4-1);i++) { - S1(i,c2-i,c4); - } - } - for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { - S2(c2-c4,c4); - } - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c2-1,c4-1);i++) { - S3(i,c2-i,c4); - } - } - } - for (c2=max(M+1,2*M-2);c2<=2*M-1;c2++) { - S2(M,c2-M); - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali5.cloog b/cloog-0.16.3/test/reservoir/pingali5.cloog deleted file mode 100755 index 2933d75bd8c67f4c39b5f89e9c0687fc3b79a54e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali5.cloog +++ /dev/null @@ -1,81 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l) | j-1 >= 0, i-j-1 >= 0, -i+k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 5 6 - 1 0 1 0 0 -1 - 1 1 -1 0 0 -1 - 1 -1 0 1 0 -1 - 1 0 0 -1 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } - - 4 5 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 1 -1 0 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | j-1 >= 0, i-j-1 >= 0, -i+k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 5 6 - 1 0 1 0 0 -1 - 1 1 -1 0 0 -1 - 1 -1 0 1 0 -1 - 1 0 0 -1 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/pingali5.good.c b/cloog-0.16.3/test/reservoir/pingali5.good.c deleted file mode 100644 index 351e5d39256c5ad7705ce5ea7d6b5d7193a696ac..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali5.good.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=3;c2<=2*M-3;c2++) { - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c4-1,c2-1);i++) { - j = c2-i ; - S1(i,c2-i,c4) ; - } - } - for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { - i = c2-c4 ; - S2(c2-c4,c4) ; - } - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c4-1,c2-1);i++) { - j = c2-i ; - S3(i,c2-i,c4) ; - } - } - } - for (c2=max(2*M-2,3);c2<=2*M-1;c2++) { - for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { - i = c2-c4 ; - S2(c2-c4,c4) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali6.c b/cloog-0.16.3/test/reservoir/pingali6.c deleted file mode 100644 index 5ce4a8530d833a947a6bd0ca7821b3150664662e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali6.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ -if (N >= 3) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - S2((c2-1)/2,c4,c6) ; - } - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } -} diff --git a/cloog-0.16.3/test/reservoir/pingali6.cloog b/cloog-0.16.3/test/reservoir/pingali6.cloog deleted file mode 100755 index 93726ec93b8bd84fcdd98178a5cc45777e549e08..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali6.cloog +++ /dev/null @@ -1,66 +0,0 @@ -# Language -c - -# Context - - 3 4 - 1 1 0 -1 - 1 0 1 -1 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/pingali6.good.c b/cloog-0.16.3/test/reservoir/pingali6.good.c deleted file mode 100644 index 26e98317a9398e961b084e338800fbaba72a32c7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/pingali6.good.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if (N >= 3) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - } - if (N >= 3) { - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - i = (c2-1)/2 ; - S2((c2-1)/2,c4,c6) ; - } - } - } - } - } - if (N >= 3) { - c2 = 2*M+1 ; - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/stride.c b/cloog-0.16.3/test/reservoir/stride.c deleted file mode 100644 index e22c74b5f0700082cc73423e3136cb3737e883d7..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/stride.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/stride.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 2) { - for (c2=2;c2<=M;c2+=7) { - S1(c2,(c2-2)/7) ; - } -} diff --git a/cloog-0.16.3/test/reservoir/stride.cloog b/cloog-0.16.3/test/reservoir/stride.cloog deleted file mode 100644 index 760a1a622f2546aafcbf162f1de2c264cf66ff4c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/stride.cloog +++ /dev/null @@ -1,45 +0,0 @@ -# -# Stride-bug: -# -# for (i = 2; i <= N; i+=7) { -# S(i); -# -# becomes: -# -# for (i = 5; i <= N; i+=7) { -# S(i); - -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statements -1 - -1 - - 4 5 - 0 1 -7 0 -2 - 1 1 0 0 -2 - 1 -1 0 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/stride2.c b/cloog-0.16.3/test/reservoir/stride2.c deleted file mode 100644 index 8c2b7bf7d5b3647504dbec749bbf40e34eae6d5d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/stride2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/stride2.cloog by CLooG 0.16.1-2-g0ae5c85 gmp bits in 0.00s. */ -if (M >= 2) { - for (c2=2;c2<=M;c2+=7) { - S1(c2,(c2-2)/7); - } -} diff --git a/cloog-0.16.3/test/reservoir/stride2.cloog b/cloog-0.16.3/test/reservoir/stride2.cloog deleted file mode 100644 index 5fb9b14c7e25fd35861a9d42da38c3226ea9d411..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/stride2.cloog +++ /dev/null @@ -1,45 +0,0 @@ -# -# Stride-bug: -# -# for (i = 2; i <= N; i+=7) { -# S(i); -# -# becomes: -# -# for (i = 5; i <= N; i+=7) { -# S(i); - -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statements -1 - -1 - - 4 5 - 0 1 -7 0 -2 # i - 7j = 2 - 1 1 0 0 0 # i >= 0 - 1 -1 0 1 0 # i <= n - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.16.3/test/reservoir/tang-xue1.c b/cloog-0.16.3/test/reservoir/tang-xue1.c deleted file mode 100644 index 7dd06101276f81b24b88c900dc21792e236f03c0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/tang-xue1.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/tang-xue1.cloog by CLooG 0.14.0-165-g01eb246 gmp bits in 0.01s. */ -for (c2=0;c2<=9;c2++) { - for (c4=max(-1,c2-9);c4<=min(4,c2+3);c4++) { - for (c6=max(max(1,c2),c2-c4);c6<=min(min(9,c2+1),c2-c4+4);c6++) { - for (c8=max(1,-c2+c4+c6);c8<=min(4,-c2+c4+c6+1);c8++) { - if (c2%2 == 0) { - if (c4%2 == 0) { - S1(c2/2,(-c2+c4)/2,-c2+c6,-c4+c8); - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/tang-xue1.cloog b/cloog-0.16.3/test/reservoir/tang-xue1.cloog deleted file mode 100644 index bf9b92b9ff2696e3949fc31146ff9846aa78d59b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/tang-xue1.cloog +++ /dev/null @@ -1,80 +0,0 @@ -# -# Example 1 in "Generating Efficient Tiled Code for Distributed Memory -# Machines", Peiyi Tang and Jingling Xue. -# - -# for (int i = 1; i <= 9; i++) { -# for (int j = 1; j <= 4; j++) { -# A[i,2*j] = A[i,2*j-2] + A[i-1,2*j-2]; -# } -# } -# -# We tile it with a tiling matrix H = [1/2 0] -# [-1/2 1/2] -# -# We get: -# -# for (int i = 0; i <= 9; i += 2) { -# for (int j = max(-1, -9 + i); j <= min(4, 3 + i); j++) { -# for (int k = max(1, i, i-j); k <= min(4 + i -j, 1 + i, 9); k++) { -# for (int l = max(-i + j + k, 1); l <= min(4, 1 -i + j + k); l++) { -# if (i % 2 == 0) { -# if ((i + j) % 2 == 0) { -# A[k, 2 * l] = A[k, -2 + 2 * l] + A[-1 + k, -2 + 2 * l]; -# } -# } -# } -# } -# } -# } -# - -# language: C -c - -# parameter (none) -1 2 -# 1 -1 1 -0 - -1 # number of statements - -1 -# -2i-2j -l +4 >= 0 -# -k +l >= 0 -# -2i -k +9 >= 0 -# k >= 0 -# 2i +k -1 >= 0 -# k -l +1 >= 0 -# -k +1 >= 0 -# 2i+2j +l-1 >= 0 -8 6 -# i j k l 1 -1 -2 -2 0 -1 4 -1 0 0 -1 1 0 -1 -2 0 -1 0 9 -1 0 0 1 0 0 -1 2 0 1 0 -1 -1 0 0 1 -1 1 -1 0 0 -1 0 1 -1 2 2 0 1 -1 -0 0 0 -0 - -1 - -# Scattering functions -9 15 -# alpha=[2i, 2i+2j, 2i+k, 2i+2j+l] gamma=[0, 0, 0, 0] beta=[0, 0, 0, 0, 0, 0] -# c1 c2 c3 c4 c5 c6 c7 c8 c9 i j k l 1 -0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 -1 0 0 0 0 0 0 0 2 0 0 0 0 -0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 -1 0 0 0 0 0 2 2 0 0 0 -0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 -1 0 0 0 2 0 1 0 0 -0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 -1 0 2 2 0 1 0 -0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -0 diff --git a/cloog-0.16.3/test/reservoir/tang-xue1.good.c b/cloog-0.16.3/test/reservoir/tang-xue1.good.c deleted file mode 100644 index 1c4215cb46b969c1fd72e58ddd2942f8719620da..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/tang-xue1.good.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/tang-xue1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } - -void test() -{ - /* Scattering iterators. */ - int c2, c4, c6, c8; - /* Original iterators. */ - int i, j, k, l; - for (c2=0;c2<=9;c2++) { - for (c4=max(-1,c2-9);c4<=min(4,c2+3);c4++) { - for (c6=max(max(c2,1),c2-c4);c6<=min(min(c2+1,9),c2-c4+4);c6++) { - for (c8=max(1,-c2+c4+c6);c8<=min(4,-c2+c4+c6+1);c8++) { - if (c2%2 == 0) { - if ((c2+c4)%2 == 0) { - j = (-c2+c4)/2 ; - k = -c2+c6 ; - l = -c4+c8 ; - S1(c2/2,(-c2+c4)/2,-c2+c6,-c4+c8) ; - } - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/reservoir/two.c b/cloog-0.16.3/test/reservoir/two.c deleted file mode 100644 index 374e75423932d2cca93f2eda345ed93e7aa301a6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/two.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/two.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.00s. */ -S1(1,1,5); diff --git a/cloog-0.16.3/test/reservoir/two.cloog b/cloog-0.16.3/test/reservoir/two.cloog deleted file mode 100644 index 60b259f3e690c92cb1c712e8c2f1fabd74c967e6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/two.cloog +++ /dev/null @@ -1,26 +0,0 @@ -# Scan -# D = { (i, j, k) | 0 <= i < 10, 1 <= j < 20, 2i + 3j = k, i + j + 3 = 3k } -# -# language: C -c - -# parameter (none) -1 2 -1 1 -0 - -1 # Number of statements - -1 -6 5 -# i j k 1 -1 1 0 0 0 -1 -1 0 0 10 -1 0 1 0 -1 -1 0 -1 0 20 -0 2 3 -1 0 -0 1 1 -1 3 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/reservoir/two.good.c b/cloog-0.16.3/test/reservoir/two.good.c deleted file mode 100644 index a80671f3e9cd9c82eb1ee6ad3b13339cd0f26ad1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/reservoir/two.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/two.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } - -void test() -{ - /* Original iterators. */ - int i, j, k; - for (i=0;i<=1;i++) { - if ((i+1)%2 == 0) { - j = (-i+3)/2 ; - k = (i+9)/2 ; - S1(i,(-i+3)/2,(i+9)/2) ; - } - } -} diff --git a/cloog-0.16.3/test/singleton.c b/cloog-0.16.3/test/singleton.c deleted file mode 100644 index ad14ebe447e691e55d502110150fbfcf52d03a31..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/singleton.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/singleton.cloog by CLooG 0.14.0-242-g720faff gmp bits in 0.00s. */ -S2(); -S1(); diff --git a/cloog-0.16.3/test/singleton.cloog b/cloog-0.16.3/test/singleton.cloog deleted file mode 100644 index 8636efb9b16a70ed6ddce93a3ff601af6e14c219..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/singleton.cloog +++ /dev/null @@ -1,27 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -0 2 -0 0 0 - -1 -0 2 -0 0 0 - -0 - -2 - -1 3 -0 -1 0 - -1 3 -0 -1 -1 - -0 diff --git a/cloog-0.16.3/test/singleton.good.c b/cloog-0.16.3/test/singleton.good.c deleted file mode 100644 index 40106ed26edb64ff1f50fbfd583d02b6771a6cc9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/singleton.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/singleton.cloog by CLooG 0.14.0-242-g720faff gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } - -void test() -{ - S2(); - S1(); -} diff --git a/cloog-0.16.3/test/sor1d.c b/cloog-0.16.3/test/sor1d.c deleted file mode 100644 index da1b5ece5682223e2683d8479f4dcdac7d5a73de..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/sor1d.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/sor1d.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.11s. */ -if ((M >= 1) && (N >= 3)) { - for (glT1=-1;glT1<=floord(3*M+N-5,100);glT1++) { - for (rp1=max(max(0,ceild(100*glT1-2*M-N+5,100)),ceild(100*glT1-N-193,300));rp1<=min(min(floord(glT1+1,3),floord(M,100)),glT1);rp1++) { - for (vT1=max(max(100*glT1-100*rp1,200*rp1-3),200*rp1-N+1);vT1<=min(min(min(2*M+N-5,100*glT1-100*rp1+99),200*rp1+N+193),100*glT1-100*rp1+N+95);vT1++) { - if (rp1 >= max(1,ceild(vT1-N+7,200))) { - S3(glT1-rp1,rp1-1,rp1,100*rp1-1,-200*rp1+vT1+6); - } - for (vP1=max(max(1,ceild(vT1-N+5,2)),100*rp1);vP1<=min(min(floord(vT1+2,2),M),100*rp1+99);vP1++) { - S1(glT1-rp1,rp1,vP1,vT1-2*vP1+4); - } - if (rp1 <= min(floord(M-100,100),floord(vT1-197,200))) { - S2(glT1-rp1,rp1,rp1+1,100*rp1+99,-200*rp1+vT1-194); - } - } - } - S4(glT1); - } -} diff --git a/cloog-0.16.3/test/sor1d.cloog b/cloog-0.16.3/test/sor1d.cloog deleted file mode 100644 index ba1ca706d9978bc721e15b525a40000a9332bcef..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/sor1d.cloog +++ /dev/null @@ -1,256 +0,0 @@ -# created: Thu Dec 17 16:41:33 CET 2009 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context -2 4 - 1 1 0 0 - 1 0 1 0 - - -1 # set parameter names -M N - -# --------------------- STATEMENTS -------------------- -4 - -# 1 computation stmts: -1 # domains per statement -19 8 - 1 -100 0 2 1 0 0 -4 - 1 0 0 0 1 0 0 -2 - 1 100 0 -2 -1 0 0 103 - 1 0 0 0 -1 0 1 -1 - 1 0 0 1 0 0 0 -1 - 1 0 -100 1 0 0 0 0 - 1 -100 0 2 0 0 1 -5 - 1 0 0 -1 0 1 0 0 - 1 0 100 -1 0 0 0 99 - 1 100 0 -2 0 0 0 101 - 1 0 50 0 0 0 0 49 - 1 -100 200 0 0 0 1 193 - 1 0 -100 0 0 1 0 0 - 1 100 -200 0 0 0 0 101 - 1 100 0 0 0 0 0 99 - 1 -100 0 0 0 2 1 -5 - 1 0 0 0 0 0 1 -3 - 1 0 0 0 0 2 1 94 - 1 0 0 0 0 1 0 -1 - - -0 0 0 # for future options... - - -# 1 prepare-send stmts: -1 # domains per statement -57 9 - 1 0 -200 0 2 1 0 0 -3 - 1 0 0 0 2 1 0 0 -5 - 1 -100 0 0 2 1 0 0 -4 - 1 0 0 0 0 1 0 0 -3 - 1 0 200 0 -2 -1 0 1 197 - 1 0 0 0 -2 -1 2 1 -3 - 1 100 0 0 -2 -1 0 0 103 - 1 0 0 0 0 -1 0 1 -1 - 1 0 0 -100 1 0 0 0 1 - 1 0 -100 0 1 0 0 0 0 - 1 0 0 0 1 0 0 0 -1 - 1 0 -200 0 2 0 0 1 -4 - 1 0 0 0 2 0 0 1 -6 - 1 -100 0 0 2 0 0 1 -5 - 1 0 0 100 -1 0 0 0 98 - 1 0 100 0 -1 0 0 0 99 - 1 0 0 0 -1 0 1 0 -1 - 1 0 200 0 -2 0 0 1 194 - 1 0 0 0 -2 0 2 1 -6 - 1 50 0 0 -1 0 0 0 50 - 1 0 -1 1 0 0 0 0 -1 - 1 0 0 100 0 0 0 0 97 - 1 0 -200 200 0 0 0 1 192 - 1 0 0 200 0 0 0 1 190 - 1 -100 0 200 0 0 0 1 191 - 1 0 1 -1 0 0 0 0 1 - 1 0 0 -100 0 0 1 0 0 - 1 0 200 -200 0 0 0 1 196 - 1 0 0 -200 0 0 2 1 -4 - 1 50 0 -100 0 0 0 0 51 - 1 -100 200 0 0 0 0 2 189 - 1 -100 200 0 0 0 0 1 193 - 1 0 100 0 0 0 0 1 94 - 1 0 200 0 0 0 0 1 192 - 1 0 50 0 0 0 0 0 49 - 1 100 -200 0 0 0 0 1 96 - 1 0 -100 0 0 0 1 1 -5 - 1 0 -100 0 0 0 1 0 -100 - 1 0 -200 0 0 0 2 1 -204 - 1 50 -100 0 0 0 0 0 -49 - 1 50 0 0 0 0 0 0 49 - 1 100 0 0 0 0 0 1 94 - 1 100 0 0 0 0 0 3 284 - 1 50 0 0 0 0 0 1 45 - 1 -100 0 0 0 0 2 1 -7 - 1 -100 0 0 0 0 2 2 -11 - 1 -100 0 0 0 0 2 4 179 - 1 -100 0 0 0 0 2 3 -15 - 1 0 0 0 0 0 2 1 -8 - 1 0 0 0 0 0 2 3 -16 - 1 0 0 0 0 0 1 1 -6 - 1 0 0 0 0 0 0 1 -4 - 1 0 0 0 0 0 2 4 79 - 1 0 0 0 0 0 2 7 463 - 1 0 0 0 0 0 2 6 269 - 1 0 0 0 0 0 2 5 75 - 1 0 0 0 0 0 1 0 -2 - - -0 0 0 # for future options... - - -# 1 prepare-receive stmts: -1 # domains per statement -57 9 - 1 0 -200 0 2 1 0 0 -3 - 1 0 0 0 2 1 0 0 -5 - 1 -100 0 0 2 1 0 0 -4 - 1 0 0 0 0 1 0 0 -3 - 1 0 200 0 -2 -1 0 1 197 - 1 0 0 0 -2 -1 2 1 -3 - 1 100 0 0 -2 -1 0 0 103 - 1 0 0 0 0 -1 0 1 -1 - 1 0 0 -100 1 0 0 0 1 - 1 0 -100 0 1 0 0 0 0 - 1 0 0 0 1 0 0 0 -1 - 1 0 -200 0 2 0 0 1 -4 - 1 0 0 0 2 0 0 1 -6 - 1 -100 0 0 2 0 0 1 -5 - 1 0 0 100 -1 0 0 0 98 - 1 0 100 0 -1 0 0 0 99 - 1 0 0 0 -1 0 1 0 -1 - 1 0 200 0 -2 0 0 1 194 - 1 0 0 0 -2 0 2 1 -6 - 1 50 0 0 -1 0 0 0 50 - 1 0 -1 1 0 0 0 0 -1 - 1 0 0 100 0 0 0 0 97 - 1 0 -200 200 0 0 0 1 192 - 1 0 0 200 0 0 0 1 190 - 1 -100 0 200 0 0 0 1 191 - 1 0 1 -1 0 0 0 0 1 - 1 0 0 -100 0 0 1 0 0 - 1 0 200 -200 0 0 0 1 196 - 1 0 0 -200 0 0 2 1 -4 - 1 50 0 -100 0 0 0 0 51 - 1 -100 200 0 0 0 0 2 189 - 1 -100 200 0 0 0 0 1 193 - 1 0 100 0 0 0 0 1 94 - 1 0 200 0 0 0 0 1 192 - 1 0 50 0 0 0 0 0 49 - 1 100 -200 0 0 0 0 1 96 - 1 0 -100 0 0 0 1 1 -5 - 1 0 -100 0 0 0 1 0 -100 - 1 0 -200 0 0 0 2 1 -204 - 1 50 -100 0 0 0 0 0 -49 - 1 50 0 0 0 0 0 0 49 - 1 100 0 0 0 0 0 1 94 - 1 100 0 0 0 0 0 3 284 - 1 50 0 0 0 0 0 1 45 - 1 -100 0 0 0 0 2 1 -7 - 1 -100 0 0 0 0 2 2 -11 - 1 -100 0 0 0 0 2 4 179 - 1 -100 0 0 0 0 2 3 -15 - 1 0 0 0 0 0 2 1 -8 - 1 0 0 0 0 0 2 3 -16 - 1 0 0 0 0 0 1 1 -6 - 1 0 0 0 0 0 0 1 -4 - 1 0 0 0 0 0 2 4 79 - 1 0 0 0 0 0 2 7 463 - 1 0 0 0 0 0 2 6 269 - 1 0 0 0 0 0 2 5 75 - 1 0 0 0 0 0 1 0 -2 - - -0 0 0 # for future options... - - -# 1 communication stmts: -1 # domains per statement -21 5 - 1 200 0 3 781 - 1 200 0 1 391 - 1 200 0 4 1075 - 1 100 0 1 392 - 1 100 0 0 197 - 1 -200 6 5 377 - 1 -200 6 6 671 - 1 -100 3 2 190 - 1 -200 6 3 -13 - 1 -100 3 1 -5 - 1 0 2 3 484 - 1 0 1 1 95 - 1 0 3 1 192 - 1 0 3 5 873 - 1 0 3 2 189 - 1 0 6 7 1062 - 1 0 6 5 771 - 1 0 3 4 579 - 1 0 0 1 -3 - 1 0 2 1 -5 - 1 0 1 0 -1 - - -0 0 0 # for future options... - - - -1 # set the iterator names -tileT1 tileP1 other1 other2 other3 other4 other5 - -# --------------------- SCATTERING -------------------- -4 # Scattering functions -9 17 - 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 -2 -1 0 0 4 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - -9 18 - 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -1 0 0 4 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 - -9 18 - 0 1 0 0 0 0 0 -1 0 0 -1 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -1 0 0 4 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 - -9 14 - 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 - - -1 # we set the scattering dimension names -glT1 bl rp1 vT1 vP1 stmtType otherP1 arrAcc1 arrNr1 - diff --git a/cloog-0.16.3/test/sor1d.good.c b/cloog-0.16.3/test/sor1d.good.c deleted file mode 100644 index bb5d643a57f660fad2828085d4c7f5c78b464fc3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/sor1d.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/sor1d.cloog by CLooG 0.14.0-226-g3fc65ac gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(tileT1,tileP1,other1,other2) { hash(1); hash(tileT1); hash(tileP1); hash(other1); hash(other2); } -#define S2(tileT1,tileP1,other1,other2,other3) { hash(2); hash(tileT1); hash(tileP1); hash(other1); hash(other2); hash(other3); } -#define S3(tileT1,tileP1,other1,other2,other3) { hash(3); hash(tileT1); hash(tileP1); hash(other1); hash(other2); hash(other3); } -#define S4(tileT1) { hash(4); hash(tileT1); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int glT1, rp1, vT1, vP1, otherP1, arrAcc1; - /* Original iterators. */ - int tileT1, tileP1, other1, other2, other3; - if ((M >= 1) && (N >= 3)) { - for (glT1=-1;glT1<=floord(3*M+N-5,100);glT1++) { - for (rp1=max(max(0,ceild(100*glT1-2*M-N+5,100)),ceild(100*glT1-N-193,300));rp1<=min(min(min(min(floord(glT1+1,2),floord(M,100)),floord(100*glT1+99,100)),floord(50*glT1+51,150)),floord(100*glT1+N+98,300));rp1++) { - for (vT1=max(max(max(max(0,100*glT1-100*rp1),100*rp1-1),200*rp1-3),200*rp1-N+1);vT1<=min(min(2*M+N-5,100*glT1-100*rp1+99),200*rp1+N+193);vT1++) { - if (rp1 >= max(1,ceild(vT1-N+7,200))) { - S3(glT1-rp1,rp1-1,rp1,100*rp1-1,-200*rp1+vT1+6); - } - for (vP1=max(max(1,ceild(vT1-N+5,2)),100*rp1);vP1<=min(min(floord(vT1+2,2),M),100*rp1+99);vP1++) { - S1(glT1-rp1,rp1,vP1,vT1-2*vP1+4); - if ((rp1 <= min(floord(M-100,100),floord(vT1-197,200))) && (100*rp1 == vP1-99)) { - S2(glT1-rp1,rp1,rp1+1,100*rp1+99,-200*rp1+vT1-194); - } - } - } - } - S4(glT1); - } - } -} diff --git a/cloog-0.16.3/test/square+triangle-1-1-2-3.c b/cloog-0.16.3/test/square+triangle-1-1-2-3.c deleted file mode 100644 index c30b4e2b8e93585102705e24427aa05cac9c11c4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/square+triangle-1-1-2-3.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/square+triangle-1-1-2-3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -for (j=1;j<=M;j++) { - S1(1,j); -} -for (i=2;i<=M;i++) { - S1(i,1); - for (j=2;j<=i;j++) { - S1(i,j); - S2(i,j); - } - for (j=i+1;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/square+triangle-1-1-2-3.cloog b/cloog-0.16.3/test/square+triangle-1-1-2-3.cloog deleted file mode 100644 index ce8f5471b508fe63be96c0135716eb2cfb69af04..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/square+triangle-1-1-2-3.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# Context -# {M | M >= 1} -2 3 -# M 1 -1 1 -1 -1 0 1 -0 - -2 # Number of statements - -1 -# {i, j | 1<=i<=M; 1<=j<=M} -5 5 -# i j M 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 - -1 -# {i, j | 2<=j<=i<=M} -4 5 -# i j M 1 -1 0 1 0 -2 -1 1 -1 0 0 -1 -1 0 1 0 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/square+triangle-1-1-2-3.good.c b/cloog-0.16.3/test/square+triangle-1-1-2-3.good.c deleted file mode 100644 index ea68a7f5939cd74af09193f01b461aa8b880dbb9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/square+triangle-1-1-2-3.good.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/square+triangle-1-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (j=1;j<=M;j++) { - S1(1,j) ; - } - for (i=2;i<=M-1;i++) { - S1(i,1) ; - for (j=2;j<=i;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=i+1;j<=M;j++) { - S1(i,j) ; - } - } - if (M >= 2) { - S1(M,1) ; - for (j=2;j<=M;j++) { - S1(M,j) ; - S2(M,j) ; - } - } -} diff --git a/cloog-0.16.3/test/stride.c b/cloog-0.16.3/test/stride.c deleted file mode 100644 index d2cf8fe337e922db6927fdcead024c55318ac328..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from stride.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.01s. */ -for (c1=3;c1<=100;c1++) { - if (c1 == 25) { - S1(25); - } - if (c1%3 == 0) { - S2(c1,c1/3); - } -} diff --git a/cloog-0.16.3/test/stride.cloog b/cloog-0.16.3/test/stride.cloog deleted file mode 100644 index 152637776fa7478b3c958b8d6caa9bd5cb531170..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride.cloog +++ /dev/null @@ -1,32 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -1 3 -0 -1 25 --1 0 0 - -1 -3 4 -1 1 0 -3 -1 -1 0 100 -0 1 -3 0 -0 0 0 - -0 - -2 -2 5 -0 -1 0 1 0 -0 0 -1 0 0 - -2 6 -0 -1 0 1 0 0 -0 0 -1 0 1 0 - -0 diff --git a/cloog-0.16.3/test/stride.good.c b/cloog-0.16.3/test/stride.good.c deleted file mode 100644 index 73807234c9e62c4221f894ebcfdf2dd0e5b0bdbe..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from stride.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=3;c1<=100;c1++) { - if (c1 == 25) { - S1(25); - } - if (c1%3 == 0) { - S2(c1,c1/3); - } - } -} diff --git a/cloog-0.16.3/test/stride2.c b/cloog-0.16.3/test/stride2.c deleted file mode 100644 index 320a2fb37142e6e41893e3406ae25b9c5cadf946..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride2.c +++ /dev/null @@ -1,7 +0,0 @@ -/* Generated from stride2.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ -for (c1=3;c1<=100;c1+=3) { - if (c1 == 27) { - S1(27); - } - S2(c1,c1/3); -} diff --git a/cloog-0.16.3/test/stride2.cloog b/cloog-0.16.3/test/stride2.cloog deleted file mode 100644 index 72a597a584c9491a65c8be168481faea592af73b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride2.cloog +++ /dev/null @@ -1,32 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -1 3 -0 -1 27 --1 0 0 - -1 -3 4 -1 1 0 -3 -1 -1 0 100 -0 1 -3 0 -0 0 0 - -0 - -2 -2 5 -0 -1 0 1 0 -0 0 -1 0 0 - -2 6 -0 -1 0 1 0 0 -0 0 -1 0 1 0 - -0 diff --git a/cloog-0.16.3/test/stride2.good.c b/cloog-0.16.3/test/stride2.good.c deleted file mode 100644 index 4cf8b60ddef39d244333494d8697316f3b24da92..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride2.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from stride2.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=3;c1<=100;c1+=3) { - if (c1 == 27) { - S1(27); - } - S2(c1,c1/3); - } -} diff --git a/cloog-0.16.3/test/stride3.c b/cloog-0.16.3/test/stride3.c deleted file mode 100644 index c228cb6b490b5b2be5dc0a0f45262aae0779f8b6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride3.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/stride3.cloog by CLooG 0.14.0-291-g5879c32 gmp bits in 0.00s. */ -if ((m <= n) && (n >= 1)) { - for (p1=max(50,50*m);p1<=50*n;p1+=50) { - S1(p1/50); - } -} diff --git a/cloog-0.16.3/test/stride3.cloog b/cloog-0.16.3/test/stride3.cloog deleted file mode 100644 index bd5d6b03196199b9e685210d72fa5362adf3bf69..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride3.cloog +++ /dev/null @@ -1,41 +0,0 @@ - - -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no constraints on two parameters) -1 4 # 1 lines and 4 columns -# eq/in m n 1 -1 0 0 0 # 0 >= 0, always true - -1 # We want to set manually the parameter names -m n # parameter names - -# --------------------- STATEMENTS -------------------- -1 # Number of statements - -1 # First statement: two domains -# First domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -# Second domain -0 0 0 # for future options - - -1 # We want to set manually the iterator names -i j # iterator names - -# --------------------- SCATTERING -------------------- -1 # Scattering functions -# First function -2 7 # 2 lines and 7 columns -# eq/in p1 p2 i m n 1 -0 1 0 -50 0 0 0 # p1 = i -0 0 1 0 0 0 0 # p2 = 0 - -1 # We want to set manually the scattering dimension names -p1 p2 # scattering dimension names - diff --git a/cloog-0.16.3/test/stride4.c b/cloog-0.16.3/test/stride4.c deleted file mode 100644 index 2e874bec97cd76f9696870a2a5086917626495d2..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride4.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/stride4.cloog by CLooG 0.16.0-10-g13c6274 gmp bits in 0.00s. */ -if ((t >= 0) && (t <= 15)) { - for (i0=t;i0<=99;i0+=16) { - S1(i0,t); - } -} diff --git a/cloog-0.16.3/test/stride4.cloog b/cloog-0.16.3/test/stride4.cloog deleted file mode 100644 index 0271d97030542d2ce6d6aea599ddf4ccc9c39153..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/stride4.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# Language: C -c - -# Context: -1 - -0 3 0 0 0 1 - -1 # Parameter name(s) -t -# Statement number: -1 - -# Iteration domain of statement 1. -1 - -6 6 2 0 1 1 -0 1 0 16 -1 0 -0 0 1 0 -1 0 -1 1 0 0 0 0 -1 -1 0 0 0 99 -1 0 0 0 1 0 -1 0 0 0 -1 15 - -0 0 0 # For future options. - - -1 # Iterator name(s) - -i0 i1 - -# No scattering functions. -0 diff --git a/cloog-0.16.3/test/swim.c b/cloog-0.16.3/test/swim.c deleted file mode 100644 index 0a0046a6e6fec3973be4ecfe1370cd87e61fc49b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/swim.c +++ /dev/null @@ -1,672 +0,0 @@ -/* Generated from ../../../git/cloog/test/swim.cloog by CLooG 0.16.1-3-g277eafa gmp bits in 0.20s. */ -if (M == 1) { - S1(); - S2(); - S3(); - S4(); - S5(); - S6(); - S7(); - S8(); - S9(); - S10(); - S11(); - S12(); - S13(); - S14(); - S15(); - S16(); - S17(); - S18(); - S19(); - S20(); - S21(); - S22(); - S23(); - S24(); - S25(); - S26(); - S27(); - for (p1=1;p1<=N;p1++) { - for (p3=1;p3<=N;p3++) { - S28(p1,p3); - S29(p1,p3); - S30(p1,p3); - } - S31(p1); - } - S32(); - S33(); - S34(); - if (O <= 1) { - S35(); - } - S36(); - S37(); - if ((N >= 1) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5); - S41(p1,p3,p5); - S42(p1,p3,p5); - S43(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5); - S60(p1,p3,p5); - S61(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5); - S103(p1,p3,p5); - S104(p1,p3,p5); - S105(p1,p3,p5); - S106(p1,p3,p5); - S107(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5); - S41(p1,p3,p5); - S42(p1,p3,p5); - S43(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5); - S60(p1,p3,p5); - S61(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5); - S103(p1,p3,p5); - S104(p1,p3,p5); - S105(p1,p3,p5); - S106(p1,p3,p5); - S107(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N >= 1) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N >= 1) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N >= 1) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } -} diff --git a/cloog-0.16.3/test/swim.cloog b/cloog-0.16.3/test/swim.cloog deleted file mode 100644 index 9216e463938f4aed10830fb40acfe2ef8753d39f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/swim.cloog +++ /dev/null @@ -1,2453 +0,0 @@ -c # language is C -# ---------- CONTEXT ---------- -# Context (no constraints on parameters) -1 8 # 1 lines, 8 columns -0 0 0 0 0 0 0 0 - -0 # Automatically find parameter names - -# ---------- STATEMENTS ---------- -125 # Number of statements - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -1 -1 -1 0 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -1 -1 -1 0 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -1 -1 -1 0 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -1 -1 -1 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -4 8 -1 0 0 -1 0 0 0 1 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -0 # Automatically find iterator names. - -# ---------- SCATTERING FUNCTIONS ---------- -125 # Number of scattering functions - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -5 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -6 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -7 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -8 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -9 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -10 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -11 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -15 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -16 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -17 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -18 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -19 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -20 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -21 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -22 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -23 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -24 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -25 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -26 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -28 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -29 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -30 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -31 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -32 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -33 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -3 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -5 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -6 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -7 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -8 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -9 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -10 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -11 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -15 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -16 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -17 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -18 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -19 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -20 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -21 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -22 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -23 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -24 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -25 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -26 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -28 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -29 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -30 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -31 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -32 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -33 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -35 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -36 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -37 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -38 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -39 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -40 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -41 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -43 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -44 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -45 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -3 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -4 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -5 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -49 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -50 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -51 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -52 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -53 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -54 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -1 # Set the scattering parameter names. -p0 p1 p2 p3 p4 p5 p6 - diff --git a/cloog-0.16.3/test/swim.good.c b/cloog-0.16.3/test/swim.good.c deleted file mode 100644 index 80f0de1b223c92ea47eb8be22e155ef8ddd6e2e0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/swim.good.c +++ /dev/null @@ -1,819 +0,0 @@ -/* Generated from ../../../git/cloog/test/swim.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.70s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3() { hash(3); } -#define S4() { hash(4); } -#define S5() { hash(5); } -#define S6() { hash(6); } -#define S7() { hash(7); } -#define S8() { hash(8); } -#define S9() { hash(9); } -#define S10() { hash(10); } -#define S11() { hash(11); } -#define S12() { hash(12); } -#define S13() { hash(13); } -#define S14() { hash(14); } -#define S15() { hash(15); } -#define S16() { hash(16); } -#define S17() { hash(17); } -#define S18() { hash(18); } -#define S19() { hash(19); } -#define S20() { hash(20); } -#define S21() { hash(21); } -#define S22() { hash(22); } -#define S23() { hash(23); } -#define S24() { hash(24); } -#define S25() { hash(25); } -#define S26() { hash(26); } -#define S27() { hash(27); } -#define S28(i,j) { hash(28); hash(i); hash(j); } -#define S29(i,j) { hash(29); hash(i); hash(j); } -#define S30(i,j) { hash(30); hash(i); hash(j); } -#define S31(i) { hash(31); hash(i); } -#define S32() { hash(32); } -#define S33() { hash(33); } -#define S34() { hash(34); } -#define S35() { hash(35); } -#define S36() { hash(36); } -#define S37() { hash(37); } -#define S38(i) { hash(38); hash(i); } -#define S39(i) { hash(39); hash(i); } -#define S40(i,j,k) { hash(40); hash(i); hash(j); hash(k); } -#define S41(i,j,k) { hash(41); hash(i); hash(j); hash(k); } -#define S42(i,j,k) { hash(42); hash(i); hash(j); hash(k); } -#define S43(i,j,k) { hash(43); hash(i); hash(j); hash(k); } -#define S44(i,j) { hash(44); hash(i); hash(j); } -#define S45(i,j) { hash(45); hash(i); hash(j); } -#define S46(i,j) { hash(46); hash(i); hash(j); } -#define S47(i,j) { hash(47); hash(i); hash(j); } -#define S48(i,j) { hash(48); hash(i); hash(j); } -#define S49(i,j) { hash(49); hash(i); hash(j); } -#define S50(i,j) { hash(50); hash(i); hash(j); } -#define S51(i,j) { hash(51); hash(i); hash(j); } -#define S52(i) { hash(52); hash(i); } -#define S53(i) { hash(53); hash(i); } -#define S54(i) { hash(54); hash(i); } -#define S55(i) { hash(55); hash(i); } -#define S56(i) { hash(56); hash(i); } -#define S57(i) { hash(57); hash(i); } -#define S58(i) { hash(58); hash(i); } -#define S59(i,j,k) { hash(59); hash(i); hash(j); hash(k); } -#define S60(i,j,k) { hash(60); hash(i); hash(j); hash(k); } -#define S61(i,j,k) { hash(61); hash(i); hash(j); hash(k); } -#define S62(i,j) { hash(62); hash(i); hash(j); } -#define S63(i,j) { hash(63); hash(i); hash(j); } -#define S64(i,j) { hash(64); hash(i); hash(j); } -#define S65(i,j) { hash(65); hash(i); hash(j); } -#define S66(i,j) { hash(66); hash(i); hash(j); } -#define S67(i,j) { hash(67); hash(i); hash(j); } -#define S68(i) { hash(68); hash(i); } -#define S69(i) { hash(69); hash(i); } -#define S70(i) { hash(70); hash(i); } -#define S71(i) { hash(71); hash(i); } -#define S72(i) { hash(72); hash(i); } -#define S73(i) { hash(73); hash(i); } -#define S74(i) { hash(74); hash(i); } -#define S75(i) { hash(75); hash(i); } -#define S76(i) { hash(76); hash(i); } -#define S77(i) { hash(77); hash(i); } -#define S78(i) { hash(78); hash(i); } -#define S79(i) { hash(79); hash(i); } -#define S80(i) { hash(80); hash(i); } -#define S81(i) { hash(81); hash(i); } -#define S82(i) { hash(82); hash(i); } -#define S83(i) { hash(83); hash(i); } -#define S84(i) { hash(84); hash(i); } -#define S85(i) { hash(85); hash(i); } -#define S86(i) { hash(86); hash(i); } -#define S87(i) { hash(87); hash(i); } -#define S88(i) { hash(88); hash(i); } -#define S89(i) { hash(89); hash(i); } -#define S90(i) { hash(90); hash(i); } -#define S91(i) { hash(91); hash(i); } -#define S92(i) { hash(92); hash(i); } -#define S93(i) { hash(93); hash(i); } -#define S94(i) { hash(94); hash(i); } -#define S95(i,j,k) { hash(95); hash(i); hash(j); hash(k); } -#define S96(i,j,k) { hash(96); hash(i); hash(j); hash(k); } -#define S97(i,j,k) { hash(97); hash(i); hash(j); hash(k); } -#define S98(i,j) { hash(98); hash(i); hash(j); } -#define S99(i) { hash(99); hash(i); } -#define S100(i) { hash(100); hash(i); } -#define S101(i) { hash(101); hash(i); } -#define S102(i,j,k) { hash(102); hash(i); hash(j); hash(k); } -#define S103(i,j,k) { hash(103); hash(i); hash(j); hash(k); } -#define S104(i,j,k) { hash(104); hash(i); hash(j); hash(k); } -#define S105(i,j,k) { hash(105); hash(i); hash(j); hash(k); } -#define S106(i,j,k) { hash(106); hash(i); hash(j); hash(k); } -#define S107(i,j,k) { hash(107); hash(i); hash(j); hash(k); } -#define S108(i,j) { hash(108); hash(i); hash(j); } -#define S109(i,j) { hash(109); hash(i); hash(j); } -#define S110(i,j) { hash(110); hash(i); hash(j); } -#define S111(i,j) { hash(111); hash(i); hash(j); } -#define S112(i,j) { hash(112); hash(i); hash(j); } -#define S113(i,j) { hash(113); hash(i); hash(j); } -#define S114(i,j) { hash(114); hash(i); hash(j); } -#define S115(i,j) { hash(115); hash(i); hash(j); } -#define S116(i,j) { hash(116); hash(i); hash(j); } -#define S117(i,j) { hash(117); hash(i); hash(j); } -#define S118(i,j) { hash(118); hash(i); hash(j); } -#define S119(i,j) { hash(119); hash(i); hash(j); } -#define S120(i) { hash(120); hash(i); } -#define S121(i) { hash(121); hash(i); } -#define S122(i) { hash(122); hash(i); } -#define S123(i) { hash(123); hash(i); } -#define S124(i) { hash(124); hash(i); } -#define S125(i) { hash(125); hash(i); } - -void test(int M, int N, int O, int P, int Q, int R) -{ - /* Scattering iterators. */ - int p1, p3, p5; - /* Original iterators. */ - int i, j, k; - if (M == 1) { - S1() ; - S2() ; - S3() ; - S4() ; - S5() ; - S6() ; - S7() ; - S8() ; - S9() ; - S10() ; - S11() ; - S12() ; - S13() ; - S14() ; - S15() ; - S16() ; - S17() ; - S18() ; - S19() ; - S20() ; - S21() ; - S22() ; - S23() ; - S24() ; - S25() ; - S26() ; - S27() ; - } - if (M == 1) { - for (p1=1;p1<=N;p1++) { - for (p3=1;p3<=N;p3++) { - S28(p1,p3) ; - S29(p1,p3) ; - S30(p1,p3) ; - } - S31(p1) ; - } - } - if (M == 1) { - S32() ; - S33() ; - S34() ; - } - if ((M == 1) && (O <= 1)) { - S35() ; - } - if (M == 1) { - S36() ; - S37() ; - } - if ((M == 1) && (N >= 1) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5) ; - S41(p1,p3,p5) ; - S42(p1,p3,p5) ; - S43(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5) ; - S60(p1,p3,p5) ; - S61(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5) ; - S103(p1,p3,p5) ; - S104(p1,p3,p5) ; - S105(p1,p3,p5) ; - S106(p1,p3,p5) ; - S107(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5) ; - S41(p1,p3,p5) ; - S42(p1,p3,p5) ; - S43(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5) ; - S60(p1,p3,p5) ; - S61(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5) ; - S103(p1,p3,p5) ; - S104(p1,p3,p5) ; - S105(p1,p3,p5) ; - S106(p1,p3,p5) ; - S107(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N >= 1) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N >= 1) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N >= 1) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } -} diff --git a/cloog-0.16.3/test/test.c b/cloog-0.16.3/test/test.c deleted file mode 100644 index a3d0711ce5bced19672394bc732711091bcc454e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/test.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/test.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -for (i=1;i<=2;i++) { - for (j=1;j<=M;j++) { - S1(i,j); - } -} -for (i=3;i<=N;i++) { - for (j=1;j<=min(M,i-1);j++) { - S1(i,j); - } - if (i >= M+1) { - S2(i,i); - } - if (i <= M) { - S1(i,i); - S2(i,i); - } - for (j=i+1;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.16.3/test/test.cloog b/cloog-0.16.3/test/test.cloog deleted file mode 100644 index 78bd336fb7287c4a9cd2bded69aac248fd48470d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/test.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# parameters {m, n | 4<=m<=n} -2 4 -# m n 1 -1 -1 1 0 -1 1 0 -4 -0 - -2 # Number of statements - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -# i j m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 - -1 -# {i, j | i=j 3<=j<=N} -3 6 -# i j m n 1 -0 1 -1 0 0 0 -1 0 1 0 0 -3 -1 0 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.16.3/test/test.good.c b/cloog-0.16.3/test/test.good.c deleted file mode 100644 index 3a786f8517f5c7368f6ad0dfb1b6dca04c1af78b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/test.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/test.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=1;i<=2;i++) { - for (j=1;j<=M;j++) { - S1(i,j) ; - } - } - for (i=3;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - S1(i,j) ; - } - S1(i,i) ; - S2(i,i) ; - for (j=i+1;j<=M;j++) { - S1(i,j) ; - } - } - for (j=1;j<=M-1;j++) { - S1(M,j) ; - } - S1(M,M) ; - S2(M,M) ; - for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S1(i,j) ; - } - S2(i,i) ; - } -} diff --git a/cloog-0.16.3/test/thomasset.c b/cloog-0.16.3/test/thomasset.c deleted file mode 100644 index f201f6f8d562d8ca3ab6f650c8afd272b33e1f7a..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/thomasset.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/thomasset.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.04s. */ -if (n >= 1) { - for (c1=0;c1<=floord(n-4,3);c1++) { - for (i=3*c1+1;i<=3*c1+3;i++) { - S1(i,c1); - } - } - c1 = floord(n-1,3); - if (c1 >= ceild(n-2,3)) { - if (c1 == 0) { - S1(1,0); - for (j=1;j<=n;j++) { - S2(1,j,0,0,0); - } - } - if (c1 >= 1) { - for (j=1;j<=2;j++) { - S2(1,j,0,c1,0); - } - } - for (i=max(2,3*c1+1);i<=n;i++) { - S1(i,c1); - } - } - if (3*c1 == n-3) { - for (i=n-2;i<=n;i++) { - if (n%3 == 0) { - S1(i,(n-3)/3); - } - } - } - if (c1 >= ceild(n-2,3)) { - for (c2=1;c2<=n-1;c2++) { - for (j=1;j<=2;j++) { - S2(c2+1,j,0,c1,0); - } - } - } - for (c1=ceild(n,3);c1<=floord(2*n,3);c1++) { - for (c2=0;c2<=n-1;c2++) { - for (j=max(1,3*c1-n);j<=min(n,3*c1-n+4);j++) { - p = max(ceild(3*c1-j,3),ceild(n-2,3)); - if (p <= min(floord(n,3),floord(3*c1-j+2,3))) { - S2(c2+1,j,0,p,c1-p); - } - } - } - } -} diff --git a/cloog-0.16.3/test/thomasset.cloog b/cloog-0.16.3/test/thomasset.cloog deleted file mode 100644 index 24c30ebb3aaa6e2d9d0a79d4bfb1188801b42104..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/thomasset.cloog +++ /dev/null @@ -1,51 +0,0 @@ -# language: C -c -1 3 -1 0 0 # 0 >= 0 -1 -n - -# ------------- STATEMENTS ------------- -2 # Number of statements - -# ax:Z -1 # The domain is made of one polyhedron -4 5 # 4 lines and 5 columns -# i j n -1 -1 0 1 0 -1 1 0 0 -1 -1 1 -3 0 -1 -1 -1 3 0 3 -0 0 0 # future options - -# ax:P -1 # The domain is made of one polyhedron -10 8 # 10 lines and 8 columns -# i j k p q n -1 -1 0 0 0 0 1 0 -1 0 -1 0 0 0 1 0 -1 0 1 0 0 0 0 -1 -1 1 0 0 0 0 0 -1 -1 0 1 0 0 -3 0 0 -1 0 -1 0 0 3 0 2 -1 0 0 0 -3 0 1 0 -1 0 0 0 3 0 -1 2 -1 0 0 -3 0 0 0 1 -1 0 0 3 0 0 0 1 -0 0 0 # future options -1 # Iterator Names -i j k p q - -# ------------- SCATTERING ------------- -2 # nb scattering functions -# Scattering for ax:Z -2 7 # 2 lines and 7 columns -# c1 c2 i j n -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 -# Scattering for ax:P -2 10 # 2 lines and 10 columns -# c1 c2 i j k p q n -0 1 0 0 0 -1 -1 -1 0 0 -0 0 1 -1 0 0 0 0 0 1 -0 # Scattering Function Names diff --git a/cloog-0.16.3/test/thomasset.good.c b/cloog-0.16.3/test/thomasset.good.c deleted file mode 100644 index f9ca01649ea106588b714c46680548b54a3d24e0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/thomasset.good.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Generated from ../../../git/cloog/test/thomasset.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.10s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k,p,q) { hash(2); hash(i); hash(j); hash(k); hash(p); hash(q); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j, k, p, q; - for (c1=0;c1<=floord(n-5,3);c1++) { - for (i=max(3*c1+1,1);i<=3*c1+3;i++) { - S1(i,c1) ; - } - } - if (n == 1) { - S1(1,0) ; - for (k=0;k<=min(0,0);k++) { - for (p=max(0,ceild(-3*k-1,3));p<=min(floord(-3*k+1,3),0);p++) { - q = -k-p ; - S2(1,1,k,p,-k-p) ; - } - } - } - if (n >= 2) { - for (c1=max(0,ceild(n-4,3));c1<=0;c1++) { - S1(1,c1) ; - for (j=1;j<=min(n,3*c1-n+5);j++) { - for (k=0;k<=floord(3*c1-j-n+4,3);k++) { - for (p=ceild(n-2,3);p<=floord(3*c1-j-3*k+2,3);p++) { - q = c1-k-p ; - S2(1,j,k,p,c1-k-p) ; - } - } - } - for (i=2;i<=min(n,3*c1+3);i++) { - S1(i,c1) ; - } - for (c2=1;c2<=n-1;c2++) { - i = c2+1 ; - for (j=1;j<=min(3*c1-n+5,n);j++) { - for (k=0;k<=floord(3*c1-j-n+4,3);k++) { - for (p=ceild(n-2,3);p<=floord(3*c1-j-3*k+2,3);p++) { - q = c1-k-p ; - S2(c2+1,j,k,p,c1-k-p) ; - } - } - } - } - } - } - for (c1=max(1,ceild(n-4,3));c1<=floord(n-1,3);c1++) { - for (j=1;j<=3*c1-n+5;j++) { - for (k=0;k<=min(floord(3*c1-j-n+4,3),0);k++) { - for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { - q = c1-k-p ; - S2(1,j,k,p,c1-k-p) ; - } - } - } - for (i=3*c1+1;i<=min(n,3*c1+3);i++) { - S1(i,c1) ; - } - for (c2=1;c2<=n-1;c2++) { - i = c2+1 ; - for (j=1;j<=3*c1-n+5;j++) { - for (k=0;k<=min(floord(3*c1-j-n+4,3),0);k++) { - for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { - q = c1-k-p ; - S2(c2+1,j,k,p,c1-k-p) ; - } - } - } - } - } - if (n >= 1) { - for (c1=ceild(n,3);c1<=floord(2*n+1,3);c1++) { - for (c2=0;c2<=n-1;c2++) { - i = c2+1 ; - for (j=max(1,3*c1-n-1);j<=min(n,3*c1-n+5);j++) { - for (k=max(ceild(3*c1-j-n,3),0);k<=min(floord(3*c1-j-n+4,3),0);k++) { - for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { - q = c1-k-p ; - S2(c2+1,j,k,p,c1-k-p) ; - } - } - } - } - } - } -} diff --git a/cloog-0.16.3/test/tiling.c b/cloog-0.16.3/test/tiling.c deleted file mode 100644 index 86f2a2e343fc0d25572e093803ec7650543bd484..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/tiling.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/tiling.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (ii=0;ii<=floord(n,10);ii++) { - for (i=10*ii;i<=min(n,10*ii+9);i++) { - S1(ii,i) ; - } -} diff --git a/cloog-0.16.3/test/tiling.cloog b/cloog-0.16.3/test/tiling.cloog deleted file mode 100644 index fa2b6764f849e83d72bb85f5c429b6370021a5d3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/tiling.cloog +++ /dev/null @@ -1,30 +0,0 @@ -# language: C -c - -# parameter {n | n>= 0} -1 3 -# n 1 -1 1 0 -1 -n - -1 # Number of statements: - -1 -# {ii, i | t*ii<=i<=t*ii+t-1 0<=i<=n} -4 5 -# ii i n 1 -1 0 1 0 0 -1 0 -1 1 0 -1 10 -1 0 9 -1 -10 1 0 0 -0 0 0 -1 -ii i - -0 # Scattering functions - -1 6 -# c1 ii i n 1 -0 1 -1 -2 0 0 -0 diff --git a/cloog-0.16.3/test/tiling.good.c b/cloog-0.16.3/test/tiling.good.c deleted file mode 100644 index b7362867fed2e2145942b6dd582ae1b623aecd8d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/tiling.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/tiling.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(ii,i) { hash(1); hash(ii); hash(i); } - -void test(int n) -{ - /* Original iterators. */ - int ii, i; - for (ii=0;ii<=floord(n,10);ii++) { - for (i=max(10*ii,0);i<=min(10*ii+9,n);i++) { - S1(ii,i) ; - } - } -} diff --git a/cloog-0.16.3/test/uday_scalars.c b/cloog-0.16.3/test/uday_scalars.c deleted file mode 100644 index 6c8564c84a4bb37ac99e59286f1776493ec01ee0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/uday_scalars.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/uday_scalars.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (n >= 0) { - for (p3=0;p3<=n;p3++) { - S1(p3,0,0) ; - } - for (p3=0;p3<=n;p3++) { - S2(0,p3,0) ; - } -} diff --git a/cloog-0.16.3/test/uday_scalars.cloog b/cloog-0.16.3/test/uday_scalars.cloog deleted file mode 100644 index 8da09d441c159612a72e3503034829dd40f002ca..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/uday_scalars.cloog +++ /dev/null @@ -1,58 +0,0 @@ -# Langage: C -c - -# Context (1 parameter) -# no constraints on parameters: -1 3 - 1 0 1 -1 # Parameter name(s) -n - -# Statement number: -2 - -# Iteration domain of statement 1. -1 # 1 domain -4 6 # 4 lines and 6 columns -# j l m n cst - 1 1 0 0 0 0 # j >= 0 - 1 -1 0 0 1 0 # j <= N - 0 0 1 0 0 0 # l = 0 - 0 0 0 1 0 0 # m = 0 -0 0 0 # For future options. - -# Iteration domain of statement 2. -1 # 1 domain -4 6 # 4 lines and 6 columns -# j l m n cst - 1 0 1 0 0 0 # l >= 0 - 1 0 -1 0 1 0 # l <= N - 0 1 0 0 0 0 # j = 0 - 0 0 0 1 0 0 # m = 0 -0 0 0 # For future options. - - -1 # Iterator name(s) -j l m - -# 1 scattering functions. -2 -# First function -4 10 -# p1 p2 p3 p4 j l m n cst - 0 1 0 0 0 0 0 0 0 0 # p1 = 0 - 0 0 1 0 0 0 0 0 0 -1 # p2 = 1 - 0 0 0 1 0 -1 0 0 0 0 # p3 = j - 0 0 0 0 1 0 0 0 0 0 # p4 = 0 - -# Second function -4 10 -# p1 p2 p3 p4 j l m n cst - 0 1 0 0 0 0 0 0 0 -1 # p1 = 1 - 0 0 1 0 0 0 0 0 0 0 # p2 = 0 - 0 0 0 1 0 0 -1 0 0 0 # p3 = l - 0 0 0 0 1 0 0 0 0 -1 # p4 = 1 - -1 # set scattering dimension names manually -p1 p2 p3 p4 - diff --git a/cloog-0.16.3/test/uday_scalars.good.c b/cloog-0.16.3/test/uday_scalars.good.c deleted file mode 100644 index e4969dafb8bda6356cb3660e4779b77d3096f73e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/uday_scalars.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/uday_scalars.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(j,l,m) { hash(1); hash(j); hash(l); hash(m); } -#define S2(j,l,m) { hash(2); hash(j); hash(l); hash(m); } - -void test(int n) -{ - /* Scattering iterators. */ - int p3; - /* Original iterators. */ - int j, l, m; - for (p3=0;p3<=n;p3++) { - S1(p3,0,0) ; - } - for (p3=0;p3<=n;p3++) { - S2(0,p3,0) ; - } -} diff --git a/cloog-0.16.3/test/union.c b/cloog-0.16.3/test/union.c deleted file mode 100644 index f65b26f01177236f870e48473a000ffad004138c..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/union.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from ../../../git/cloog/test/union.cloog by CLooG 0.16.0-3-g7eee03c gmp bits in 0.00s. */ -if (M <= -1) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } -} -if (M >= 11) { - for (c1=-100;c1<=0;c1++) { - S1(-c1); - } -} -if ((M >= 1) && (M <= 10)) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } -} diff --git a/cloog-0.16.3/test/union.cloog b/cloog-0.16.3/test/union.cloog deleted file mode 100644 index 33e8425960caef10af5e2b9bbd6c9a9019df13e8..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/union.cloog +++ /dev/null @@ -1,33 +0,0 @@ -c - -2 -1 3 -1 1 -1 - -1 3 -1 -1 -1 - -0 - -1 - -1 -2 4 -1 1 0 0 -1 -1 0 100 - -0 0 0 - -0 - -1 -2 -2 5 -0 -1 1 0 0 -1 0 0 -1 10 - -2 5 -0 -1 -1 0 0 -1 0 0 1 -11 - -0 diff --git a/cloog-0.16.3/test/union.good.c b/cloog-0.16.3/test/union.good.c deleted file mode 100644 index 70b4537d3a31bf51165391edd86f16b863b7e3b6..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/union.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/union.cloog by CLooG 0.14.0-277-g62f7d82 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - if (M <= -1) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } - } - if (M >= 1) { - if (M >= 11) { - for (c1=-100;c1<=0;c1++) { - S1(-c1); - } - } - if (M <= 10) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } - } - } -} diff --git a/cloog-0.16.3/test/vasilache.c b/cloog-0.16.3/test/vasilache.c deleted file mode 100644 index 5a00a3363b3a408b3f76937ec61bcb2ec98e79a1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vasilache.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/vasilache.cloog by CLooG 0.14.0-162-g1e599e0 gmp bits in 0.03s. */ -S1(); -S2(); -for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - S4(p1,p3); - S5(p1,p3); - } -} -for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - for (p5=0;p5<=floord(N-1,32);p5++) { - S7(p1,p3,p5,32*p5); - for (p7=32*p5+1;p7<=min(N-1,32*p5+31);p7++) { - S6(p1,p3,p5,p7-1); - S7(p1,p3,p5,p7); - } - if (p5 <= floord(N-33,32)) { - S6(p1,p3,p5,32*p5+31); - } - if (p5 >= ceild(N-32,32)) { - S6(p1,p3,p5,N-1); - } - } - } -} -S8(); diff --git a/cloog-0.16.3/test/vasilache.cloog b/cloog-0.16.3/test/vasilache.cloog deleted file mode 100644 index 29f9598a733e6b1b8a6ae9178bcaf21b5ee38a46..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vasilache.cloog +++ /dev/null @@ -1,248 +0,0 @@ -# A SCoP from matmul (matmul.B.main.scop1.cloog) to check normalization -# -# Options: -# cloog -f 8 -l 9 vasilache.cloog -# -# Correct: -# S1; -# S2; -# for (p0=0;p0<=N-1;p0++) { -# for (p1=0;p1<=N-1;p1++) { -# S4(i = p0,j = p1); -# S5(i = p0,j = p1); -# } -# } -# for (p0=0;p0<=N-1;p0++) { -# for (p1=0;p1<=N-1;p1++) { -# for (p2=0;p2<=floord(N-1,32);p2++) { -# S7(i = p0,j = p1,k = p2,l = 32*p2); -# for (p3=32*p2+1;p3<=min(N-1,32*p2+31);p3++) { -# S6(i = p0,j = p1,k = p2,l = p3-1); -# S7(i = p0,j = p1,k = p2,l = p3); -# } -# if (p2 >= ceild(N-32,32)) { -# S6(i = p0,j = p1,k = p2,l = N-1); -# } -# if (p2 <= floord(N-33,32)) { -# S6(i = p0,j = p1,k = p2,l = 32*p2+31); -# } -# } -# } -# } -# S8; -# -# -# NOT correct: -# S1 ; -# S2 ; -# for (p1=0;p1<=N-1;p1++) { -# for (p3=0;p3<=N-1;p3++) { -# S4(i = p1,j = p3) ; -# S5(i = p1,j = p3) ; -# } -# } -# for (p1=0;p1<=N-1;p1++) { -# for (p3=0;p3<=N-1;p3++) { -# for (p5=0;p5<=floord(N-1,32);p5++) { -# if (p5 <= 0) { -# S7(i = p1,j = p3,k = p5,l = 0) ; -# } -# p7 = 32*p5 ; -# l = 32*p5 ; -# S7(i = p1,j = p3,k = p5) ; -# for (p7=max(32*p5+1,1);p7<=min(32*p5+31,N-1);p7++) { -# l = p7-1 ; -# S6(i = p1,j = p3,k = p5) ; -# S7(i = p1,j = p3,k = p5,l = p7) ; -# } -# if (p5 >= ceild(N-32,32)) { -# l = N-1 ; -# S6(i = p1,j = p3,k = p5) ; -# } -# p7 = 32*p5+32 ; -# l = 32*p5+31 ; -# S6(i = p1,j = p3,k = p5) ; -# } -# } -# } -# S8 ; - - - -c # language is C -# ---------- CONTEXT ---------- -# Context (constraints on parameters) -2 4 # 1 lines, 4 columns -1 -1 0 3 -1 0 1 -100 - - -0 # Automatically find parameter names - -# ---------- STATEMENTS ---------- -8 # Number of statements - -1 # Statement has a non resticted domain -1 4 -1 0 0 0 -0 0 0 - -1 # Statement has a non resticted domain -1 4 -1 0 0 0 -0 0 0 - -1 # Statement has 1 domain -1 4 -1 1 0 -79 -0 0 0 - -1 # Statement has 1 domain -4 6 -1 1 0 0 0 0 -1 -1 0 0 1 -1 -1 0 1 0 0 0 -1 0 -1 0 1 -1 -0 0 0 - -1 # Statement has 1 domain -4 6 -1 1 0 0 0 0 -1 -1 0 0 1 -1 -1 0 1 0 0 0 -1 0 -1 0 1 -1 -0 0 0 - -1 # Statement has 1 domain -8 8 -1 1 0 0 0 0 0 0 -1 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 0 -1 0 -1 0 0 0 1 -1 -1 0 0 0 1 0 0 0 -1 0 0 0 -1 0 1 -1 -1 0 0 -32 1 0 0 0 -1 0 0 32 -1 0 0 31 -0 0 0 - -1 # Statement has 1 domain -8 8 -1 1 0 0 0 0 0 0 -1 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 0 -1 0 -1 0 0 0 1 -1 -1 0 0 0 1 0 0 0 -1 0 0 0 -1 0 1 -1 -1 0 0 -32 1 0 0 0 -1 0 0 32 -1 0 0 31 -0 0 0 - -1 # Statement has a non resticted domain -1 4 -1 0 0 0 -0 0 0 - -0 # Automatically find iterator names. - -# ---------- SCATTERING FUNCTIONS ---------- -8 # Number of scattering functions - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -9 15 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 4 - -9 15 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 4 - -9 17 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 -1 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 4 - -9 17 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 # Beta 4 - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -1 # Set the scattering parameter names. -p0 p1 p2 p3 p4 p5 p6 p7 p8 - diff --git a/cloog-0.16.3/test/vasilache.good.c b/cloog-0.16.3/test/vasilache.good.c deleted file mode 100644 index f12f3faffd169e142feb6562c86357fe38ff708d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vasilache.good.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Generated from ../../../git/cloog/test/vasilache.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.15s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3() { hash(3); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j) { hash(5); hash(i); hash(j); } -#define S6(i,j,k,l) { hash(6); hash(i); hash(j); hash(k); hash(l); } -#define S7(i,j,k,l) { hash(7); hash(i); hash(j); hash(k); hash(l); } -#define S8() { hash(8); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int p1, p3, p5, p7; - /* Original iterators. */ - int i, j, k, l; - S1() ; - S2() ; - for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - S4(p1,p3) ; - S5(p1,p3) ; - } - } - for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - for (p5=0;p5<=floord(N-1,32);p5++) { - if (p5 >= 0) { - p7 = 32*p5 ; - l = 32*p5 ; - S7(p1,p3,p5,32*p5) ; - } - if (p5 <= -1) { - S7(p1,p3,p5,0) ; - } - for (p7=max(32*p5+1,1);p7<=min(N-1,32*p5+31);p7++) { - l = p7-1 ; - S6(p1,p3,p5,p7-1) ; - S7(p1,p3,p5,p7) ; - } - if (p5 >= ceild(N-32,32)) { - l = N-1 ; - S6(p1,p3,p5,N-1) ; - } - if (p5 <= floord(N-33,32)) { - p7 = 32*p5+32 ; - l = 32*p5+31 ; - S6(p1,p3,p5,32*p5+31) ; - } - } - } - } - S8() ; -} diff --git a/cloog-0.16.3/test/vivien.c b/cloog-0.16.3/test/vivien.c deleted file mode 100644 index d364046017d62192c0571fd1554f0f7d14b70fab..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vivien.c +++ /dev/null @@ -1,195 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/vivien.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.12s. */ -if (n >= 0) { - for (p1=-54*n+4;p1<=4;p1++) { - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (n >= 1) { - S3(1); - } - if (n <= 1) { - S1(2); - } - if (n >= 2) { - S4(1,2); - S1(2); - S6(1,2); - } - for (p1=7;p1<=min(9,4*n-2);p1++) { - if (p1 == 8) { - S4(1,3); - } - if (p1 == 8) { - S1(3); - } - if (p1 == 8) { - S6(1,3); - } - if (p1 == 9) { - S3(2); - } - if ((p1+1)%2 == 0) { - S2((p1-3)/2,1); - } - } - for (p1=10;p1<=min(2*n+58,4*n-2);p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=min(-1,floord(-p1+2*n,2));p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if ((p1 >= 2*n+4) && (p1 <= 4*n-6)) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1 >= 2*n+6) { - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - } - if (p1 <= 2*n+4) { - if (p1%2 == 0) { - S6(2,(p1-4)/2); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 >= 2*n+5) { - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 <= 2*n+2) { - if (p1%2 == 0) { - S6(1,(p1-2)/2); - } - } - for (p2=max(1,ceild(p1-2*n-1,2));p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } - } - if ((n >= 2) && (n <= 29)) { - S2(n,n-1); - } - if ((n >= 2) && (n <= 29)) { - S1(2*n-1); - } - if ((n >= 2) && (n <= 28)) { - S3(n); - } - for (p1=max(7,4*n+2);p1<=2*n+58;p1++) { - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - for (p1=2*n+59;p1<=4*n-2;p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if (p1 <= 4*n-6) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } - } - if (n >= 30) { - S2(n,n-1); - } - if (n >= 29) { - S3(n); - } -} diff --git a/cloog-0.16.3/test/vivien.cloog b/cloog-0.16.3/test/vivien.cloog deleted file mode 100644 index 3db4103b185f93959faf9e449d0310bdbdf0eeb9..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vivien.cloog +++ /dev/null @@ -1,156 +0,0 @@ -# Context -c # output in language C - -# no constraints on parameters -1 3 # 1 line and 3 columns - -# n 1 -1 0 0 # 0 >= 0 always true - -1 # Setting manually the parameter' sname -n # The name - - - -# -------------------- Statements ------------------ -6 # Number of statements - - -1 # First statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 27 -1 # i >= 1 -1 -1 1 28 # n >= i -0 0 0 - -1 # Second statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i k n 1 -1 1 29 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 0 1 0 -1 # k >= 1 -1 1 -1 0 -1 # k <= i-1 -0 0 0 - - -1 # Third statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 0 -1 # i >= 1 -1 -1 1 0 # n >= i -0 0 0 - - -1 # Fourth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - -1 # Fifth statement: 1 domain - -# First domain - -6 6 # 6 lines and 6 columns -# i j k n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # n >= i -1 -1 1 0 0 -1 # j >= i+1 -1 0 -1 0 1 0 # j <= n -1 0 0 1 0 -1 # k >= 1 -1 1 0 -1 0 -1 # k <= i-1 -0 0 0 - -1 # Sixth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - - -1 # We manually set the iterator names -i j k - - -# ------------------------ Scattering ------------------- - -6 # Number of scattering functions - - -# First function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -2 0 -2 # p1 = 2i+2 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Second function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 -1 # p1 = 2i+2j+1 -0 0 1 0 0 -1 0 0 # p2 = j -0 0 0 1 0 0 0 0 # p3 = 0 - -# Third function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -4 0 -1 # p1 = 4i+1 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Fourth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 # p2 = -i -0 0 0 1 0 0 0 0 # p3 = 0 - - -# Fifth function -3 9 # 3 lines and 9 columns -# p1 p2 p3 i j k n 1 -0 1 0 0 -2 -2 0 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 -1 # p2 = -i+1 -0 0 0 1 0 0 -1 0 0 # p3 = k - -# Sixth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 -2 # p2 = -i+2 -0 0 0 1 0 0 0 0 # p3 = 0 - -1 # Manually set the scattering dimensions -p1 p2 p3 - - - - - - - - - - - diff --git a/cloog-0.16.3/test/vivien.good.c b/cloog-0.16.3/test/vivien.good.c deleted file mode 100644 index 8d2c9d388473bffbbf1f596f1d3a67fe3ccc59f4..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vivien.good.c +++ /dev/null @@ -1,831 +0,0 @@ -/* Generated from ../../../git/cloog/test/vivien.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.78s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int p1, p2, p3; - /* Original iterators. */ - int i, j, k; - for (p1=-54*n+4;p1<=min(4,4*n+1);p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - if (n >= 1) { - S3(1) ; - } - if (n >= 2) { - S4(1,2) ; - S1(2) ; - S6(1,2) ; - } - for (p1=max(-54*n+4,4*n+2);p1<=6;p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - for (p1=7;p1<=min(min(2*n+2,9),floord(4*n+12,3));p1++) { - for (p2=ceild(-p1+2,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - } - for (p1=2*n+3;p1<=min(9,4*n-2);p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if (n >= 4) { - S4(2,3) ; - S4(1,4) ; - S5(2,3,1) ; - S6(2,3) ; - S1(4) ; - S6(1,4) ; - } - if (n == 3) { - S4(2,3) ; - S5(2,3,1) ; - S6(2,3) ; - S1(4) ; - } - for (p1=11;p1<=min(12,2*n+2);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if (n == 4) { - S2(4,1) ; - S2(3,2) ; - } - if (n == 5) { - S3(3) ; - S2(5,1) ; - S2(4,2) ; - } - if (n >= 6) { - S3(3) ; - S2(5,1) ; - S2(4,2) ; - } - if ((n <= 4) && (n >= 4)) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=-1;p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - for (p1=14;p1<=2*n+2;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if ((n <= 4) && (n >= 4)) { - S3(3) ; - for (p2=-n+6;p2<=2;p2++) { - i = -p2+6 ; - S2(-p2+6,p2) ; - } - } - if (n >= 7) { - p1 = 2*n+3 ; - if ((n+1)%2 == 0) { - i = (n+1)/2 ; - S3((n+1)/2) ; - } - S2(n,1) ; - for (p2=2;p2<=floord(n,2);p2++) { - i = -p2+n+1 ; - S2(-p2+n+1,p2) ; - } - } - if ((n <= 6) && (n >= 6)) { - p1 = 2*n+3 ; - if ((n+1)%2 == 0) { - i = (n+1)/2 ; - S3((n+1)/2) ; - } - S2(n,1) ; - for (p2=2;p2<=floord(n,2);p2++) { - i = -p2+n+1 ; - S2(-p2+n+1,p2) ; - } - } - if (n >= 7) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=ceild(-n+3,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - i = -p2+2 ; - j = p2+n ; - S6(-p2+2,p2+n) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - j = n-1 ; - S6(3,n-1) ; - S5(2,n,1) ; - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - if ((n <= 5) && (n >= 5)) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=-1;p2<=floord(-2*n+5,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=ceild(-n+3,2);p2<=-1;p2++) { - i = -p2+2 ; - j = p2+n ; - S6(-p2+2,p2+n) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - if ((n <= 6) && (n >= 6)) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - j = n-1 ; - S6(3,n-1) ; - S5(2,n,1) ; - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-9,2*n+5);p1<=min(4*n-8,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-7,2*n+5);p1<=min(4*n-6,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(max(4*n-5,14),2*n+5);p1<=min(4*n-2,2*n+58);p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if ((n >= 2) && (n <= 29)) { - p1 = 4*n-1 ; - p2 = n-1 ; - j = n-1 ; - S2(n,n-1) ; - } - for (p1=2*n+59;p1<=4*n-10;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n,7);p1<=min(4*n+1,2*n+58);p1++) { - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - if (n >= 30) { - p1 = 4*n-1 ; - p2 = n-1 ; - j = n-1 ; - S2(n,n-1) ; - } - for (p1=max(max(-54*n+4,4*n+2),7);p1<=2*n+58;p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - for (p1=max(4*n,2*n+59);p1<=4*n+1;p1++) { - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - } -} diff --git a/cloog-0.16.3/test/vivien2.c b/cloog-0.16.3/test/vivien2.c deleted file mode 100644 index d4f1f0442c28efdf3015b91dbe786bf6e13d627f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vivien2.c +++ /dev/null @@ -1,168 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/vivien2.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.10s. */ -for (p1=-54*n+4;p1<=4;p1++) { - if (p1%2 == 0) { - S1((p1-2)/2); - } -} -S3(1); -S4(1,2); -S1(2); -S6(1,2); -for (p1=7;p1<=9;p1++) { - if (p1 == 8) { - S4(1,3); - } - if (p1 == 8) { - S1(3); - } - if (p1 == 8) { - S6(1,3); - } - if (p1 == 9) { - S3(2); - } - if ((p1+1)%2 == 0) { - S2((p1-3)/2,1); - } -} -for (p1=10;p1<=2*n+58;p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=min(-1,floord(-p1+2*n,2));p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if ((p1 >= 2*n+4) && (p1 <= 4*n-6)) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1 >= 2*n+6) { - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - } - if (p1 <= 2*n+4) { - if (p1%2 == 0) { - S6(2,(p1-4)/2); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 >= 2*n+5) { - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 <= 2*n+2) { - if (p1%2 == 0) { - S6(1,(p1-2)/2); - } - } - for (p2=max(1,ceild(p1-2*n-1,2));p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } -} -for (p1=2*n+59;p1<=4*n-2;p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if (p1 <= 4*n-6) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } -} -S2(n,n-1); -S3(n); diff --git a/cloog-0.16.3/test/vivien2.cloog b/cloog-0.16.3/test/vivien2.cloog deleted file mode 100644 index 42e7fb7b971b40c8cfae8faa487e9659796ca39b..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vivien2.cloog +++ /dev/null @@ -1,156 +0,0 @@ -# Context -c # output in language C - -# no constraints on parameters -1 3 # 1 line and 3 columns - -# n 1 -1 1 -30 # 0 >= 0 always true - -1 # Setting manually the parameter' sname -n # The name - - - -# -------------------- Statements ------------------ -6 # Number of statements - - -1 # First statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 27 -1 # i >= 1 -1 -1 1 28 # n >= i -0 0 0 - -1 # Second statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i k n 1 -1 1 29 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 0 1 0 -1 # k >= 1 -1 1 -1 0 -1 # k <= i-1 -0 0 0 - - -1 # Third statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 0 -1 # i >= 1 -1 -1 1 0 # n >= i -0 0 0 - - -1 # Fourth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - -1 # Fifth statement: 1 domain - -# First domain - -6 6 # 6 lines and 6 columns -# i j k n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # n >= i -1 -1 1 0 0 -1 # j >= i+1 -1 0 -1 0 1 0 # j <= n -1 0 0 1 0 -1 # k >= 1 -1 1 0 -1 0 -1 # k <= i-1 -0 0 0 - -1 # Sixth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - - -1 # We manually set the iterator names -i j k - - -# ------------------------ Scattering ------------------- - -6 # Number of scattering functions - - -# First function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -2 0 -2 # p1 = 2i+2 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Second function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 -1 # p1 = 2i+2j+1 -0 0 1 0 0 -1 0 0 # p2 = j -0 0 0 1 0 0 0 0 # p3 = 0 - -# Third function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -4 0 -1 # p1 = 4i+1 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Fourth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 # p2 = -i -0 0 0 1 0 0 0 0 # p3 = 0 - - -# Fifth function -3 9 # 3 lines and 9 columns -# p1 p2 p3 i j k n 1 -0 1 0 0 -2 -2 0 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 -1 # p2 = -i+1 -0 0 0 1 0 0 -1 0 0 # p3 = k - -# Sixth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 -2 # p2 = -i+2 -0 0 0 1 0 0 0 0 # p3 = 0 - -1 # Manually set the scattering dimensions -p1 p2 p3 - - - - - - - - - - - diff --git a/cloog-0.16.3/test/vivien2.good.c b/cloog-0.16.3/test/vivien2.good.c deleted file mode 100644 index 32f1fff503a063098e69c7c23ff343228189626e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/vivien2.good.c +++ /dev/null @@ -1,656 +0,0 @@ -/* Generated from ../../../git/cloog/test/vivien2.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.58s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int p1, p2, p3; - /* Original iterators. */ - int i, j, k; - for (p1=-54*n+4;p1<=4;p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - S3(1) ; - S4(1,2) ; - S1(2) ; - S6(1,2) ; - for (p1=7;p1<=9;p1++) { - for (p2=ceild(-p1+2,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - } - S4(2,3) ; - S4(1,4) ; - S5(2,3,1) ; - S6(2,3) ; - S1(4) ; - S6(1,4) ; - for (p1=11;p1<=12;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - S3(3) ; - S2(5,1) ; - S2(4,2) ; - for (p1=14;p1<=2*n+2;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - p1 = 2*n+3 ; - if ((n+1)%2 == 0) { - i = (n+1)/2 ; - S3((n+1)/2) ; - } - S2(n,1) ; - for (p2=2;p2<=floord(n,2);p2++) { - i = -p2+n+1 ; - S2(-p2+n+1,p2) ; - } - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=ceild(-n+3,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - i = -p2+2 ; - j = p2+n ; - S6(-p2+2,p2+n) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - j = n-1 ; - S6(3,n-1) ; - S5(2,n,1) ; - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=4*n-9;p1<=min(4*n-8,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=4*n-7;p1<=min(4*n-6,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=4*n-5;p1<=2*n+58;p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+2*n+3,2),ceild(-p1+10,4));p2<=floord(-p1+2*n+4,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=2*n+59;p1<=4*n-10;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - p1 = 4*n-1 ; - p2 = n-1 ; - j = n-1 ; - S2(n,n-1) ; - for (p1=4*n;p1<=4*n+1;p1++) { - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - } -} diff --git a/cloog-0.16.3/test/walters.c b/cloog-0.16.3/test/walters.c deleted file mode 100644 index fdb218347f7e6784053df27b14708fa45b8c9014..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters.cloog by CLooG 0.16.1-3-g354eed5 gmp bits in 0.01s. */ -S2(1,0,1,0); -S4(1,0,1,0); -S3(2,0,1,1); -S4(2,0,1,1); -for (i=3;i<=10;i++) { - if ((i+1)%3 == 0) { - S3(i,(i-2)/3,(i+1)/3,(i+1)/3); - } - if ((i+2)%3 == 0) { - S2(i,(i-1)/3,(i+2)/3,(i-1)/3); - } - if (i%3 == 0) { - S1(i,i/3,i/3,i/3); - } - div36 = floord(i,3); - div37 = ceild(2*i-3*div36-1,3); - if (div37 <= floord(i+2,3)) { - S4(i,div36,div37,i-div36-div37); - } -} diff --git a/cloog-0.16.3/test/walters.cloog b/cloog-0.16.3/test/walters.cloog deleted file mode 100644 index 9a3ba81926bb13a80c33ded5a3eb12abd1b25f7f..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters.cloog +++ /dev/null @@ -1,189 +0,0 @@ -# language: C - -c - - - -# parameters - -1 2 - -1 1 - - 1 - - - -4 - - - -# S1: sub1 - -1 - -18 6 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 -1 3 0 0 2 - - 1 1 -3 0 0 0 - - 1 0 1 0 0 -1 - - 1 -1 3 0 0 0 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - -# S2: sub2 - -1 - -17 6 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 -1 0 3 0 0 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 -2 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - -# S3: sub3 - -1 - -18 6 - - 1 -1 0 0 0 10 - - 1 1 0 0 0 -1 - - 1 -1 0 0 3 1 - - 1 1 0 0 -3 1 - - 1 0 0 0 1 -1 - - 1 -1 0 0 3 -1 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - -# S4: enclosing - -1 - -8 6 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - - 1 - - i div36 div37 div38 - - 0 - - 0 diff --git a/cloog-0.16.3/test/walters.good.c b/cloog-0.16.3/test/walters.good.c deleted file mode 100644 index 0e1c2b7f4180f9f325c97268447e84b5b0ab7b9d..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters.good.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/walters.cloog by CLooG 0.14.0-223-gad1f0a0 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,div36,div37,div38) { hash(1); hash(i); hash(div36); hash(div37); hash(div38); } -#define S2(i,div36,div37,div38) { hash(2); hash(i); hash(div36); hash(div37); hash(div38); } -#define S3(i,div36,div37,div38) { hash(3); hash(i); hash(div36); hash(div37); hash(div38); } -#define S4(i,div36,div37,div38) { hash(4); hash(i); hash(div36); hash(div37); hash(div38); } - -void test() -{ - /* Original iterators. */ - int i, div36, div37, div38; - S2(1,0,1,0); - S4(1,0,1,0); - S3(2,0,1,1); - S4(2,0,1,1); - for (i=3;i<=10;i++) { - if ((i+2)%3 <= 1) { - div36 = floord(i-1,3); - if ((i+1)%3 <= 1) { - div37 = floord(i+1,3); - if ((i+1)%3 == 0) { - S3(i,div36,div37,(i+1)/3); - S4(i,div36,div37,(i+1)/3); - } - } - if ((i+2)%3 == 0) { - div38 = floord(i+1,3); - S2(i,div36,(i+2)/3,div38); - S4(i,div36,(i+2)/3,div38); - } - } - if (i%3 == 0) { - div37 = floord(i+2,3); - div38 = floord(i+1,3); - S1(i,i/3,div37,div38); - S4(i,i/3,div37,div38); - } - } -} diff --git a/cloog-0.16.3/test/walters2.c b/cloog-0.16.3/test/walters2.c deleted file mode 100644 index bc31d9ec7d8176f12bd75b6fa735ebe54a733ec0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters2.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters2.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.01s. */ -for (i=0;i<=51;i++) { - S2(0,i); -} -for (j=1;j<=24;j++) { - S2(j,0); - for (i=1;i<=50;i++) { - S1(j,i); - } - S2(j,51); -} -for (i=0;i<=51;i++) { - S2(25,i); -} diff --git a/cloog-0.16.3/test/walters2.cloog b/cloog-0.16.3/test/walters2.cloog deleted file mode 100644 index efdf2f6da123412014a8c111fc2955c2cbcd3ebb..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters2.cloog +++ /dev/null @@ -1,90 +0,0 @@ -# language: C -c - -# parameters -1 2 -1 1 - 1 - -2 - - -# S1 -1 -12 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 1 -1 - 1 -1 0 24 - 1 0 -1 50 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 0 0 0 - - - - - - -# S2 -4 -11 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 1 -1 - 1 1 0 -25 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 -12 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 1 -1 - 1 -1 0 24 - 1 0 1 -51 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 -10 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 -1 0 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 -9 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 -1 0 0 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 0 0 0 - - - - 1 - j i - 0 - 0 - diff --git a/cloog-0.16.3/test/walters2.good.c b/cloog-0.16.3/test/walters2.good.c deleted file mode 100644 index 2b8990f5686c2ad912230628f65a7ae7c92a706e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters2.good.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/walters2.cloog by CLooG 0.14.0-227-g08f253a gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(j,i) { hash(1); hash(j); hash(i); } -#define S2(j,i) { hash(2); hash(j); hash(i); } - -void test() -{ - /* Original iterators. */ - int j, i; - for (i=0;i<=51;i++) { - S2(0,i); - } - for (j=1;j<=24;j++) { - S2(j,0); - for (i=1;i<=50;i++) { - S1(j,i); - } - S2(j,51); - } - for (i=0;i<=51;i++) { - if (i >= 0) { - S2(25,i); - } - } -} diff --git a/cloog-0.16.3/test/walters3.c b/cloog-0.16.3/test/walters3.c deleted file mode 100644 index fc922d69505785bb733c08f6494325dfaae9ea6e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters3.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters3.cloog by CLooG 0.14.0-338-g99c7504 gmp bits in 0.00s. */ -for (j=2;j<=8;j++) { - if (j%2 == 0) { - S1(j,j/2,j/2); - S2(j,j/2,j/2); - } -} -S2(10,5,5); diff --git a/cloog-0.16.3/test/walters3.cloog b/cloog-0.16.3/test/walters3.cloog deleted file mode 100644 index fb45ab0db628ccb29cbae77f05125fee9f16c147..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters3.cloog +++ /dev/null @@ -1,49 +0,0 @@ -# language: C -c - -# parameters -1 2 -1 1 - 1 - - -2 - -1 -15 5 - 1 -1 0 0 10 - 1 -1 0 0 8 - 1 -1 0 2 1 - 1 1 0 -2 0 - 1 -1 0 2 0 - 1 0 0 1 -1 - 1 1 -2 0 0 - 1 -1 2 0 1 - 1 1 0 0 -1 - 1 -1 0 0 10 - 0 1 -2 0 0 - 1 1 -2 0 0 - 1 -1 2 0 1 - 1 1 0 -2 0 - 1 -1 0 2 1 - 0 0 0 - - - -1 -7 5 - 1 1 0 0 -1 - 1 -1 0 0 10 - 0 1 -2 0 0 - 1 1 -2 0 0 - 1 -1 2 0 1 - 1 1 0 -2 0 - 1 -1 0 2 1 - 0 0 0 - - - 1 - j a b - #-------- SCATTERING ------------- - 0 # no scattering function - diff --git a/cloog-0.16.3/test/walters3.good.c b/cloog-0.16.3/test/walters3.good.c deleted file mode 100644 index 45a1b3338d46637705622a7ea730fa12f16845c1..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/walters3.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters3.cloog by CLooG 0.14.0-338-g99c7504 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(j,a,b) { hash(1); hash(j); hash(a); hash(b); } -#define S2(j,a,b) { hash(2); hash(j); hash(a); hash(b); } - -void test() -{ - /* Original iterators. */ - int j, a, b; - for (j=2;j<=8;j++) { - if (j%2 == 0) { - S1(j,j/2,j/2); - S2(j,j/2,j/2); - } - } - S2(10,5,5); -} diff --git a/cloog-0.16.3/test/wavefront.c b/cloog-0.16.3/test/wavefront.c deleted file mode 100644 index c6d28685dde6eeb9eb855e2e58c1b08c0e898364..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/wavefront.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/wavefront.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((m >= 1) && (n >= 1)) { - for (c1=2;c1<=n+m;c1++) { - for (c2=max(1,c1-m);c2<=min(n,c1-1);c2++) { - S1(c2,c1-c2) ; - } - } -} diff --git a/cloog-0.16.3/test/wavefront.cloog b/cloog-0.16.3/test/wavefront.cloog deleted file mode 100644 index 845b368902cc1bfb8514123178c77ca0cfb81270..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/wavefront.cloog +++ /dev/null @@ -1,27 +0,0 @@ -c - -1 4 -# n m 1 -1 0 0 1 -1 -n m - -1 - -1 -4 6 -# i j n m 1 -1 1 0 0 0 -1 -1 -1 0 1 0 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -0 0 0 - -0 - -1 -2 8 -# c1 c2 i j n m 1 -0 1 0 -1 -1 0 0 0 -0 0 1 -1 0 0 0 0 -0 diff --git a/cloog-0.16.3/test/wavefront.good.c b/cloog-0.16.3/test/wavefront.good.c deleted file mode 100644 index c6e721fb75ec8499caeedac30837887eb12ea995..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/wavefront.good.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated from ../../../git/cloog/test/wavefront.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int n, int m) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - if ((n >= 1) && (m >= 1)) { - for (c1=2;c1<=n+m;c1++) { - for (c2=max(1,c1-m);c2<=min(n,c1-1);c2++) { - j = c1-c2 ; - S1(c2,c1-c2) ; - } - } - } -} diff --git a/cloog-0.16.3/test/yosr.c b/cloog-0.16.3/test/yosr.c deleted file mode 100644 index 341c7871634566c8bc2f0292fed25da778fbb857..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosr.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j) ; - } - for (proc=2;proc<=n-1;proc++) { - for (i=1;i<=proc-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,proc) ; - } - } - for (j=proc+1;j<=n;j++) { - S1(proc,j) ; - } - } - for (i=1;i<=n-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,n) ; - } - } -} diff --git a/cloog-0.16.3/test/yosr.cloog b/cloog-0.16.3/test/yosr.cloog deleted file mode 100644 index cefa03569a7de1bd4843cf2ed698ada2510fdf98..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosr.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# language: C -c - -# One parameter : n -1 3 -# n 1 -1 0 1 -# We want to set the parameter names... -1 -# and 'n' is the name of the unique parameter -n - -2 # Number of statements: 2. - -1 -# {i, j | 1<=i<=n-1; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 -1 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n-1; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 -1 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -# We want to let CLooG set the iterator names. -0 - -2 -# Scattering functions -1 6 -# c1 i j n 1 -0 1 -1 0 0 0 - -1 7 -# c1 i j k n 1 -0 1 0 0 -1 0 0 -1 -proc - -2 -# Scattering functions -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 -0 0 0 1 0 0 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 -0 0 0 1 0 0 -1 0 0 -0 - diff --git a/cloog-0.16.3/test/yosr.good.c b/cloog-0.16.3/test/yosr.good.c deleted file mode 100644 index 8845a2c5c9aa17e888131aef4eaa2da93407340e..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosr.good.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int n) -{ - /* Scattering iterators. */ - int proc; - /* Original iterators. */ - int i, j, k; - if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j) ; - } - } - for (proc=2;proc<=n-1;proc++) { - for (i=1;i<=proc-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,proc) ; - } - } - for (j=proc+1;j<=n;j++) { - S1(proc,j) ; - } - } - if (n >= 2) { - for (i=1;i<=n-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,n) ; - } - } - } -} diff --git a/cloog-0.16.3/test/yosr2.c b/cloog-0.16.3/test/yosr2.c deleted file mode 100644 index 999eb41265afafecdf4aa56fccadda6701c69fc3..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosr2.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -for (i=1;i<=M;i++) { - S2(i) ; -} -for (proc=2;proc<=M-1;proc++) { - for (i=1;i<=proc-1;i++) { - S4(i,proc) ; - } - for (j=1;j<=proc-1;j++) { - S1(proc,j) ; - } - for (j=proc+1;j<=M;j++) { - for (k=1;k<=proc-1;k++) { - S3(proc,j,k) ; - } - } -} -for (i=1;i<=M-1;i++) { - S4(i,M) ; -} -for (j=1;j<=M-1;j++) { - S1(M,j) ; -} diff --git a/cloog-0.16.3/test/yosr2.cloog b/cloog-0.16.3/test/yosr2.cloog deleted file mode 100644 index e9dea4a2bf2599684a067e78206fdff4048f92c0..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosr2.cloog +++ /dev/null @@ -1,71 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 1 -2 -0 - -4 # Number of statements - -1 -# S2 {k, l | 1<=k<=n; 1<=l<=k-1} -4 5 -# k l n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 1 -1 0 -1 -0 0 0 - -1 -# S3 {k | 1<=k<=n} -2 4 -# k n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S5 {k, i, m | 1<=k<=n; k+1<=i<=n 1<=m<=k-1} -6 6 -# k i m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 1 0 -1 0 -1 -0 0 0 - -1 -# S4 {k, i | 1<=k<=n; k+1<=i<=n} -4 5 -# k i n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - - -4 # Scattering functions -1 6 -# c1 k l n 1 -0 1 -1 0 0 0 - -1 5 -# c1 k n 1 -0 1 0 0 0 - -1 7 -# c1 k i m n 1 -0 1 -1 0 0 0 0 - -1 6 -# c1 k i n 1 -0 1 0 -1 0 0 -1 -proc diff --git a/cloog-0.16.3/test/yosr2.good.c b/cloog-0.16.3/test/yosr2.good.c deleted file mode 100644 index 7608db8a842607139cba0f411130f7672d03e3a5..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosr2.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i) { hash(2); hash(i); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int proc; - /* Original iterators. */ - int i, j, k; - for (i=1;i<=M;i++) { - S2(i) ; - } - for (proc=2;proc<=M-1;proc++) { - for (i=1;i<=proc-1;i++) { - S4(i,proc) ; - } - for (j=1;j<=proc-1;j++) { - S1(proc,j) ; - } - for (j=proc+1;j<=M;j++) { - for (k=1;k<=proc-1;k++) { - S3(proc,j,k) ; - } - } - } - for (i=1;i<=M-1;i++) { - S4(i,M) ; - } - for (j=1;j<=M-1;j++) { - S1(M,j) ; - } -} diff --git a/cloog-0.16.3/test/yosrf.cloog b/cloog-0.16.3/test/yosrf.cloog deleted file mode 100644 index 1661ef71931df295267aa754882eb4e1fa9eee02..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosrf.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# language: FORTRAN -f - -# One parameter : n -1 3 -# n 1 -1 0 1 -# We want to set the parameter names... -1 -# and 'n' is the name of the unique parameter -n - -2 # Number of statements: 2. - -1 -# {i, j | 1<=i<=n-1; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 -1 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n-1; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 -1 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -# We want to let CLooG set the iterator names. -0 - -2 -# Scattering functions -1 6 -# c1 i j n 1 -0 1 -1 0 0 0 - -1 7 -# c1 i j k n 1 -0 1 0 0 -1 0 0 -1 -proc - -2 -# Scattering functions -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 -0 0 0 1 0 0 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 -0 0 0 1 0 0 -1 0 0 -0 - diff --git a/cloog-0.16.3/test/yosrf.f b/cloog-0.16.3/test/yosrf.f deleted file mode 100644 index 2d8efad9ecd79c786f972442bb990ae34893d261..0000000000000000000000000000000000000000 --- a/cloog-0.16.3/test/yosrf.f +++ /dev/null @@ -1,21 +0,0 @@ -! Generated from ../../../git/cloog/test/yosrf.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. -IF (n >= 2) THEN - DO j=2, n - S1(1,j) - END DO - DO proc=2, n-1 - DO i=1, proc-1 - DO j=i+1, n - S2(i,j,proc) - END DO - END DO - DO j=proc+1, n - S1(proc,j) - END DO - END DO - DO i=1, n-1 - DO j=i+1, n - S2(i,j,n) - END DO - END DO -END IF diff --git a/cloog-0.17.0/CLOOG_HEAD b/cloog-0.17.0/CLOOG_HEAD deleted file mode 100644 index c5523bd09b187d88eb8caeb979852a301d6c2728..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/CLOOG_HEAD +++ /dev/null @@ -1 +0,0 @@ -0.17.0 diff --git a/cloog-0.17.0/ChangeLog b/cloog-0.17.0/ChangeLog deleted file mode 100644 index 9767b375a8e86ab138f439978152890492a3391d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/ChangeLog +++ /dev/null @@ -1,22 +0,0 @@ -version: 0.17.0 -date: Mon Dec 12 00:51:44 CET 2011 -changes: - - Support openscop as input format - - update isl backend to changes in isl 0.08 - - Add CLOOG_ prefix to LANGUAGE defines in public header files - - Replace cloog_union_domain_from_isl_union_set() with - cloog_union_domain_from_isl_set() - - Allow to build CLooG from gmp build directory - - Smaller improvements - -version: 0.16.3 -date: Wed Jul 13 18:18:19 CEST 2011 -changes: - - update isl backend to recent changes in isl - - add support for unrolling ---- -version: 0.16.2 -date: Sun Mar 20 15:51:13 CET 2011 -changes: - - update isl backend to recent changes in isl - - improved output in case of stride detection diff --git a/cloog-0.17.0/Makefile.am b/cloog-0.17.0/Makefile.am deleted file mode 100644 index 80bfc431d5b580e76df2e879081a5274e89806ca..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/Makefile.am +++ /dev/null @@ -1,179 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile.in ** -# **-------------------------------------------------------------------** -# ** First version: october 25th 2001 ** -# **-------------------------------------------------------------------**/ -# -# makefile.in (or makefile if generated) of CLooG, the Chunky LOOp Generator. -# makefile.in is not a makefile, you must run the 'configure' shellscript to -# generate the makefile thanks to this file. - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2001 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ -if BUNDLED_ISL - MAYBE_ISL = isl - ISL_LA = $(top_builddir)/isl/libisl.la -endif - -if BUNDLED_OSL - MAYBE_OSL = osl - OSL_LA = $(top_builddir)/osl/source/libosl.la -endif - -SUBDIRS = $(MAYBE_ISL) $(MAYBE_OSL) . doc test -DIST_SUBDIRS = $(MAYBE_ISL) $(MAYBE_OSL) . doc test - -ACLOCAL_AMFLAGS = -I m4 - -FORCE: -isl/libisl.la: FORCE - cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la - -if NO_ISL -CLOOG = -LIBCLOOG = -else -CLOOG = cloog -LIBCLOOG = libcloog-isl.la -endif -bin_PROGRAMS = $(CLOOG) -lib_LTLIBRARIES = $(LIBCLOOG) - -if NEED_GET_MEMORY_FUNCTIONS -GET_MEMORY_FUNCTIONS=source/mp_get_memory_functions.c -endif - -SOURCES_CORE = \ - $(GET_MEMORY_FUNCTIONS) \ - source/block.c \ - source/clast.c \ - source/matrix.c \ - source/state.c \ - source/input.c \ - source/int.c \ - source/loop.c \ - source/names.c \ - source/options.c \ - source/pprint.c \ - source/program.c \ - source/statement.c \ - source/stride.c \ - source/union_domain.c \ - source/version.c - -DEFAULT_INCLUDES = -I. -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CFLAGS = $(CFLAGS_WARN) -libcloog_isl_la_CPPFLAGS = @ISL_CPPFLAGS@ @OSL_CPPFLAGS@ -libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \ - -rpath $(libdir) @ISL_LDFLAGS@ @OSL_LDFLAGS@ -libcloog_isl_la_LIBADD = @ISL_LIBS@ @OSL_LIBS@ $(ISL_LA) $(OSL_LA) -libcloog_isl_la_SOURCES = \ - $(SOURCES_CORE) \ - source/isl/domain.c \ - source/isl/constraints.c \ - source/isl/backend.c -LDADD = libcloog-isl.la -cloog_DEPENDENCIES = libcloog-isl.la -cloog_SOURCES = source/cloog.c - -pkginclude_HEADERS = \ - include/cloog/block.h \ - include/cloog/clast.h \ - include/cloog/cloog.h \ - include/cloog/input.h \ - include/cloog/int.h \ - include/cloog/matrix.h \ - include/cloog/state.h \ - include/cloog/domain.h \ - include/cloog/loop.h \ - include/cloog/constraints.h \ - include/cloog/names.h \ - include/cloog/options.h \ - include/cloog/pprint.h \ - include/cloog/program.h \ - include/cloog/statement.h \ - include/cloog/stride.h \ - include/cloog/union_domain.h \ - include/cloog/version.h - -pkgmatrixincludedir = $(pkgincludedir)/matrix -pkgmatrixinclude_HEADERS = \ - include/cloog/matrix/constraintset.h - -pkgislincludedir = $(pkgincludedir)/isl -pkgislinclude_HEADERS = \ - include/cloog/isl/backend.h \ - include/cloog/isl/cloog.h \ - include/cloog/isl/domain.h \ - include/cloog/isl/constraintset.h - -version.h: @GIT_INDEX@ - echo '#define CLOOG_HEAD "'`$(top_builddir)/genversion.sh`'"' > $@ - -EXTRA_DIST = \ - autoconf/Doxyfile.in \ - source/matrix/constraintset.c \ - doc/cloog.texi \ - doc/images \ - examples - -install-data-local: - @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)" - $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -uninstall-local: - rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -dist-hook: - rm -f $(distdir)/test/Makefile - $(top_builddir)/genversion.sh > $(distdir)/CLOOG_HEAD - (cd doc; make cloog.pdf) && cp doc/cloog.pdf $(distdir)/doc/ - -#/***************************************************************************** -# * Rules * -# *****************************************************************************/ - -valcheck: - $(MAKE) valgrind -C test - -total: - @echo " /*-----------------------------------------------*" - @echo " * CLooG *" - @echo " *-----------------------------------------------*/" - $(MAKE) uninstall - $(MAKE) clean - $(MAKE) - $(MAKE) install - -doc: - @echo " /*-----------------------------------------------*" - @echo " * Generating CLooG's documentation *" - @echo " *-----------------------------------------------*/" - doxygen ./autoconf/Doxyfile diff --git a/cloog-0.17.0/Makefile.in b/cloog-0.17.0/Makefile.in deleted file mode 100644 index 162b97dd69e7494cbbd31bef058386ba5413abb9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/Makefile.in +++ /dev/null @@ -1,1375 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile.in ** -# **-------------------------------------------------------------------** -# ** First version: october 25th 2001 ** -# **-------------------------------------------------------------------**/ -# -# makefile.in (or makefile if generated) of CLooG, the Chunky LOOp Generator. -# makefile.in is not a makefile, you must run the 'configure' shellscript to -# generate the makefile thanks to this file. - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = $(am__EXEEXT_1) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \ - $(pkgislinclude_HEADERS) $(pkgmatrixinclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/genversion.sh.in $(top_srcdir)/autoconf/Doxyfile.in \ - $(top_srcdir)/configure \ - $(top_srcdir)/include/cloog/version.h.in \ - $(top_srcdir)/source/version.c.in ChangeLog \ - autoconf/config.guess autoconf/config.sub autoconf/depcomp \ - autoconf/install-sh autoconf/ltmain.sh autoconf/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = autoconf/Doxyfile source/version.c \ - include/cloog/version.h genversion.sh -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgislincludedir)" \ - "$(DESTDIR)$(pkgmatrixincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libcloog_isl_la_DEPENDENCIES = $(ISL_LA) $(OSL_LA) -am__libcloog_isl_la_SOURCES_DIST = source/mp_get_memory_functions.c \ - source/block.c source/clast.c source/matrix.c source/state.c \ - source/input.c source/int.c source/loop.c source/names.c \ - source/options.c source/pprint.c source/program.c \ - source/statement.c source/stride.c source/union_domain.c \ - source/version.c source/isl/domain.c source/isl/constraints.c \ - source/isl/backend.c -@NEED_GET_MEMORY_FUNCTIONS_TRUE@am__objects_1 = libcloog_isl_la-mp_get_memory_functions.lo -am__objects_2 = $(am__objects_1) libcloog_isl_la-block.lo \ - libcloog_isl_la-clast.lo libcloog_isl_la-matrix.lo \ - libcloog_isl_la-state.lo libcloog_isl_la-input.lo \ - libcloog_isl_la-int.lo libcloog_isl_la-loop.lo \ - libcloog_isl_la-names.lo libcloog_isl_la-options.lo \ - libcloog_isl_la-pprint.lo libcloog_isl_la-program.lo \ - libcloog_isl_la-statement.lo libcloog_isl_la-stride.lo \ - libcloog_isl_la-union_domain.lo libcloog_isl_la-version.lo -am_libcloog_isl_la_OBJECTS = $(am__objects_2) \ - libcloog_isl_la-domain.lo libcloog_isl_la-constraints.lo \ - libcloog_isl_la-backend.lo -libcloog_isl_la_OBJECTS = $(am_libcloog_isl_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libcloog_isl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libcloog_isl_la_LDFLAGS) $(LDFLAGS) \ - -o $@ -@NO_ISL_FALSE@am_libcloog_isl_la_rpath = -rpath $(libdir) -@NO_ISL_FALSE@am__EXEEXT_1 = cloog$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) -am_cloog_OBJECTS = cloog.$(OBJEXT) -cloog_OBJECTS = $(am_cloog_OBJECTS) -cloog_LDADD = $(LDADD) -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libcloog_isl_la_SOURCES) $(cloog_SOURCES) -DIST_SOURCES = $(am__libcloog_isl_la_SOURCES_DIST) $(cloog_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -HEADERS = $(pkginclude_HEADERS) $(pkgislinclude_HEADERS) \ - $(pkgmatrixinclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITS = @BITS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CFLAGS_WARN = @CFLAGS_WARN@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_INDEX = @GIT_INDEX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -ISL_CPPFLAGS = @ISL_CPPFLAGS@ -ISL_LDFLAGS = @ISL_LDFLAGS@ -ISL_LIBS = @ISL_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OSL_CPPFLAGS = @OSL_CPPFLAGS@ -OSL_LDFLAGS = @OSL_LDFLAGS@ -OSL_LIBS = @OSL_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TEXI2DVI = @TEXI2DVI@ -VERSION = @VERSION@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_REVISION = @VERSION_REVISION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2001 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ -@BUNDLED_ISL_TRUE@MAYBE_ISL = isl -@BUNDLED_ISL_TRUE@ISL_LA = $(top_builddir)/isl/libisl.la -@BUNDLED_OSL_TRUE@MAYBE_OSL = osl -@BUNDLED_OSL_TRUE@OSL_LA = $(top_builddir)/osl/source/libosl.la -SUBDIRS = $(MAYBE_ISL) $(MAYBE_OSL) . doc test -DIST_SUBDIRS = $(MAYBE_ISL) $(MAYBE_OSL) . doc test -ACLOCAL_AMFLAGS = -I m4 -@NO_ISL_FALSE@CLOOG = cloog -@NO_ISL_TRUE@CLOOG = -@NO_ISL_FALSE@LIBCLOOG = libcloog-isl.la -@NO_ISL_TRUE@LIBCLOOG = -lib_LTLIBRARIES = $(LIBCLOOG) -@NEED_GET_MEMORY_FUNCTIONS_TRUE@GET_MEMORY_FUNCTIONS = source/mp_get_memory_functions.c -SOURCES_CORE = \ - $(GET_MEMORY_FUNCTIONS) \ - source/block.c \ - source/clast.c \ - source/matrix.c \ - source/state.c \ - source/input.c \ - source/int.c \ - source/loop.c \ - source/names.c \ - source/options.c \ - source/pprint.c \ - source/program.c \ - source/statement.c \ - source/stride.c \ - source/union_domain.c \ - source/version.c - -DEFAULT_INCLUDES = -I. -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CFLAGS = $(CFLAGS_WARN) -libcloog_isl_la_CPPFLAGS = @ISL_CPPFLAGS@ @OSL_CPPFLAGS@ -libcloog_isl_la_LDFLAGS = -version-info @versioninfo@ \ - -rpath $(libdir) @ISL_LDFLAGS@ @OSL_LDFLAGS@ - -libcloog_isl_la_LIBADD = @ISL_LIBS@ @OSL_LIBS@ $(ISL_LA) $(OSL_LA) -libcloog_isl_la_SOURCES = \ - $(SOURCES_CORE) \ - source/isl/domain.c \ - source/isl/constraints.c \ - source/isl/backend.c - -LDADD = libcloog-isl.la -cloog_DEPENDENCIES = libcloog-isl.la -cloog_SOURCES = source/cloog.c -pkginclude_HEADERS = \ - include/cloog/block.h \ - include/cloog/clast.h \ - include/cloog/cloog.h \ - include/cloog/input.h \ - include/cloog/int.h \ - include/cloog/matrix.h \ - include/cloog/state.h \ - include/cloog/domain.h \ - include/cloog/loop.h \ - include/cloog/constraints.h \ - include/cloog/names.h \ - include/cloog/options.h \ - include/cloog/pprint.h \ - include/cloog/program.h \ - include/cloog/statement.h \ - include/cloog/stride.h \ - include/cloog/union_domain.h \ - include/cloog/version.h - -pkgmatrixincludedir = $(pkgincludedir)/matrix -pkgmatrixinclude_HEADERS = \ - include/cloog/matrix/constraintset.h - -pkgislincludedir = $(pkgincludedir)/isl -pkgislinclude_HEADERS = \ - include/cloog/isl/backend.h \ - include/cloog/isl/cloog.h \ - include/cloog/isl/domain.h \ - include/cloog/isl/constraintset.h - -EXTRA_DIST = \ - autoconf/Doxyfile.in \ - source/matrix/constraintset.c \ - doc/cloog.texi \ - doc/images \ - examples - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): -autoconf/Doxyfile: $(top_builddir)/config.status $(top_srcdir)/autoconf/Doxyfile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -source/version.c: $(top_builddir)/config.status $(top_srcdir)/source/version.c.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -include/cloog/version.h: $(top_builddir)/config.status $(top_srcdir)/include/cloog/version.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -genversion.sh: $(top_builddir)/config.status $(srcdir)/genversion.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libcloog-isl.la: $(libcloog_isl_la_OBJECTS) $(libcloog_isl_la_DEPENDENCIES) - $(AM_V_CCLD)$(libcloog_isl_la_LINK) $(am_libcloog_isl_la_rpath) $(libcloog_isl_la_OBJECTS) $(libcloog_isl_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -cloog$(EXEEXT): $(cloog_OBJECTS) $(cloog_DEPENDENCIES) - @rm -f cloog$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(cloog_OBJECTS) $(cloog_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-backend.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-block.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-clast.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-constraints.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-domain.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-input.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-int.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-loop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-matrix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-names.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-options.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-pprint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-program.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-state.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-statement.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-stride.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-union_domain.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcloog_isl_la-version.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libcloog_isl_la-mp_get_memory_functions.lo: source/mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-mp_get_memory_functions.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Tpo -c -o libcloog_isl_la-mp_get_memory_functions.lo `test -f 'source/mp_get_memory_functions.c' || echo '$(srcdir)/'`source/mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Tpo $(DEPDIR)/libcloog_isl_la-mp_get_memory_functions.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/mp_get_memory_functions.c' object='libcloog_isl_la-mp_get_memory_functions.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-mp_get_memory_functions.lo `test -f 'source/mp_get_memory_functions.c' || echo '$(srcdir)/'`source/mp_get_memory_functions.c - -libcloog_isl_la-block.lo: source/block.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-block.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-block.Tpo -c -o libcloog_isl_la-block.lo `test -f 'source/block.c' || echo '$(srcdir)/'`source/block.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-block.Tpo $(DEPDIR)/libcloog_isl_la-block.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/block.c' object='libcloog_isl_la-block.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-block.lo `test -f 'source/block.c' || echo '$(srcdir)/'`source/block.c - -libcloog_isl_la-clast.lo: source/clast.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-clast.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-clast.Tpo -c -o libcloog_isl_la-clast.lo `test -f 'source/clast.c' || echo '$(srcdir)/'`source/clast.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-clast.Tpo $(DEPDIR)/libcloog_isl_la-clast.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/clast.c' object='libcloog_isl_la-clast.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-clast.lo `test -f 'source/clast.c' || echo '$(srcdir)/'`source/clast.c - -libcloog_isl_la-matrix.lo: source/matrix.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-matrix.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-matrix.Tpo -c -o libcloog_isl_la-matrix.lo `test -f 'source/matrix.c' || echo '$(srcdir)/'`source/matrix.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-matrix.Tpo $(DEPDIR)/libcloog_isl_la-matrix.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/matrix.c' object='libcloog_isl_la-matrix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-matrix.lo `test -f 'source/matrix.c' || echo '$(srcdir)/'`source/matrix.c - -libcloog_isl_la-state.lo: source/state.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-state.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-state.Tpo -c -o libcloog_isl_la-state.lo `test -f 'source/state.c' || echo '$(srcdir)/'`source/state.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-state.Tpo $(DEPDIR)/libcloog_isl_la-state.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/state.c' object='libcloog_isl_la-state.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-state.lo `test -f 'source/state.c' || echo '$(srcdir)/'`source/state.c - -libcloog_isl_la-input.lo: source/input.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-input.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-input.Tpo -c -o libcloog_isl_la-input.lo `test -f 'source/input.c' || echo '$(srcdir)/'`source/input.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-input.Tpo $(DEPDIR)/libcloog_isl_la-input.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/input.c' object='libcloog_isl_la-input.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-input.lo `test -f 'source/input.c' || echo '$(srcdir)/'`source/input.c - -libcloog_isl_la-int.lo: source/int.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-int.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-int.Tpo -c -o libcloog_isl_la-int.lo `test -f 'source/int.c' || echo '$(srcdir)/'`source/int.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-int.Tpo $(DEPDIR)/libcloog_isl_la-int.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/int.c' object='libcloog_isl_la-int.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-int.lo `test -f 'source/int.c' || echo '$(srcdir)/'`source/int.c - -libcloog_isl_la-loop.lo: source/loop.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-loop.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-loop.Tpo -c -o libcloog_isl_la-loop.lo `test -f 'source/loop.c' || echo '$(srcdir)/'`source/loop.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-loop.Tpo $(DEPDIR)/libcloog_isl_la-loop.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/loop.c' object='libcloog_isl_la-loop.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-loop.lo `test -f 'source/loop.c' || echo '$(srcdir)/'`source/loop.c - -libcloog_isl_la-names.lo: source/names.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-names.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-names.Tpo -c -o libcloog_isl_la-names.lo `test -f 'source/names.c' || echo '$(srcdir)/'`source/names.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-names.Tpo $(DEPDIR)/libcloog_isl_la-names.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/names.c' object='libcloog_isl_la-names.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-names.lo `test -f 'source/names.c' || echo '$(srcdir)/'`source/names.c - -libcloog_isl_la-options.lo: source/options.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-options.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-options.Tpo -c -o libcloog_isl_la-options.lo `test -f 'source/options.c' || echo '$(srcdir)/'`source/options.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-options.Tpo $(DEPDIR)/libcloog_isl_la-options.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/options.c' object='libcloog_isl_la-options.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-options.lo `test -f 'source/options.c' || echo '$(srcdir)/'`source/options.c - -libcloog_isl_la-pprint.lo: source/pprint.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-pprint.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-pprint.Tpo -c -o libcloog_isl_la-pprint.lo `test -f 'source/pprint.c' || echo '$(srcdir)/'`source/pprint.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-pprint.Tpo $(DEPDIR)/libcloog_isl_la-pprint.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/pprint.c' object='libcloog_isl_la-pprint.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-pprint.lo `test -f 'source/pprint.c' || echo '$(srcdir)/'`source/pprint.c - -libcloog_isl_la-program.lo: source/program.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-program.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-program.Tpo -c -o libcloog_isl_la-program.lo `test -f 'source/program.c' || echo '$(srcdir)/'`source/program.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-program.Tpo $(DEPDIR)/libcloog_isl_la-program.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/program.c' object='libcloog_isl_la-program.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-program.lo `test -f 'source/program.c' || echo '$(srcdir)/'`source/program.c - -libcloog_isl_la-statement.lo: source/statement.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-statement.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-statement.Tpo -c -o libcloog_isl_la-statement.lo `test -f 'source/statement.c' || echo '$(srcdir)/'`source/statement.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-statement.Tpo $(DEPDIR)/libcloog_isl_la-statement.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/statement.c' object='libcloog_isl_la-statement.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-statement.lo `test -f 'source/statement.c' || echo '$(srcdir)/'`source/statement.c - -libcloog_isl_la-stride.lo: source/stride.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-stride.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-stride.Tpo -c -o libcloog_isl_la-stride.lo `test -f 'source/stride.c' || echo '$(srcdir)/'`source/stride.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-stride.Tpo $(DEPDIR)/libcloog_isl_la-stride.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/stride.c' object='libcloog_isl_la-stride.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-stride.lo `test -f 'source/stride.c' || echo '$(srcdir)/'`source/stride.c - -libcloog_isl_la-union_domain.lo: source/union_domain.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-union_domain.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-union_domain.Tpo -c -o libcloog_isl_la-union_domain.lo `test -f 'source/union_domain.c' || echo '$(srcdir)/'`source/union_domain.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-union_domain.Tpo $(DEPDIR)/libcloog_isl_la-union_domain.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/union_domain.c' object='libcloog_isl_la-union_domain.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-union_domain.lo `test -f 'source/union_domain.c' || echo '$(srcdir)/'`source/union_domain.c - -libcloog_isl_la-version.lo: source/version.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-version.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-version.Tpo -c -o libcloog_isl_la-version.lo `test -f 'source/version.c' || echo '$(srcdir)/'`source/version.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-version.Tpo $(DEPDIR)/libcloog_isl_la-version.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/version.c' object='libcloog_isl_la-version.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-version.lo `test -f 'source/version.c' || echo '$(srcdir)/'`source/version.c - -libcloog_isl_la-domain.lo: source/isl/domain.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-domain.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-domain.Tpo -c -o libcloog_isl_la-domain.lo `test -f 'source/isl/domain.c' || echo '$(srcdir)/'`source/isl/domain.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-domain.Tpo $(DEPDIR)/libcloog_isl_la-domain.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/isl/domain.c' object='libcloog_isl_la-domain.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-domain.lo `test -f 'source/isl/domain.c' || echo '$(srcdir)/'`source/isl/domain.c - -libcloog_isl_la-constraints.lo: source/isl/constraints.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-constraints.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-constraints.Tpo -c -o libcloog_isl_la-constraints.lo `test -f 'source/isl/constraints.c' || echo '$(srcdir)/'`source/isl/constraints.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-constraints.Tpo $(DEPDIR)/libcloog_isl_la-constraints.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/isl/constraints.c' object='libcloog_isl_la-constraints.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-constraints.lo `test -f 'source/isl/constraints.c' || echo '$(srcdir)/'`source/isl/constraints.c - -libcloog_isl_la-backend.lo: source/isl/backend.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcloog_isl_la-backend.lo -MD -MP -MF $(DEPDIR)/libcloog_isl_la-backend.Tpo -c -o libcloog_isl_la-backend.lo `test -f 'source/isl/backend.c' || echo '$(srcdir)/'`source/isl/backend.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcloog_isl_la-backend.Tpo $(DEPDIR)/libcloog_isl_la-backend.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/isl/backend.c' object='libcloog_isl_la-backend.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcloog_isl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcloog_isl_la-backend.lo `test -f 'source/isl/backend.c' || echo '$(srcdir)/'`source/isl/backend.c - -cloog.o: source/cloog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cloog.o -MD -MP -MF $(DEPDIR)/cloog.Tpo -c -o cloog.o `test -f 'source/cloog.c' || echo '$(srcdir)/'`source/cloog.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cloog.Tpo $(DEPDIR)/cloog.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/cloog.c' object='cloog.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cloog.o `test -f 'source/cloog.c' || echo '$(srcdir)/'`source/cloog.c - -cloog.obj: source/cloog.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cloog.obj -MD -MP -MF $(DEPDIR)/cloog.Tpo -c -o cloog.obj `if test -f 'source/cloog.c'; then $(CYGPATH_W) 'source/cloog.c'; else $(CYGPATH_W) '$(srcdir)/source/cloog.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cloog.Tpo $(DEPDIR)/cloog.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='source/cloog.c' object='cloog.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cloog.obj `if test -f 'source/cloog.c'; then $(CYGPATH_W) 'source/cloog.c'; else $(CYGPATH_W) '$(srcdir)/source/cloog.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files -install-pkgislincludeHEADERS: $(pkgislinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgislincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgislincludedir)" - @list='$(pkgislinclude_HEADERS)'; test -n "$(pkgislincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgislincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgislincludedir)" || exit $$?; \ - done - -uninstall-pkgislincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkgislinclude_HEADERS)'; test -n "$(pkgislincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgislincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgislincludedir)" && rm -f $$files -install-pkgmatrixincludeHEADERS: $(pkgmatrixinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgmatrixincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgmatrixincludedir)" - @list='$(pkgmatrixinclude_HEADERS)'; test -n "$(pkgmatrixincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgmatrixincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgmatrixincludedir)" || exit $$?; \ - done - -uninstall-pkgmatrixincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkgmatrixinclude_HEADERS)'; test -n "$(pkgmatrixincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgmatrixincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgmatrixincludedir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgislincludedir)" "$(DESTDIR)$(pkgmatrixincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-data-local install-pkgincludeHEADERS \ - install-pkgislincludeHEADERS install-pkgmatrixincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ - uninstall-local uninstall-pkgincludeHEADERS \ - uninstall-pkgislincludeHEADERS \ - uninstall-pkgmatrixincludeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am \ - install-pkgincludeHEADERS install-pkgislincludeHEADERS \ - install-pkgmatrixincludeHEADERS install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-libLTLIBRARIES uninstall-local \ - uninstall-pkgincludeHEADERS uninstall-pkgislincludeHEADERS \ - uninstall-pkgmatrixincludeHEADERS - - -FORCE: -isl/libisl.la: FORCE - cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la - -version.h: @GIT_INDEX@ - echo '#define CLOOG_HEAD "'`$(top_builddir)/genversion.sh`'"' > $@ - -install-data-local: - @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)" - $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -uninstall-local: - rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)" - -dist-hook: - rm -f $(distdir)/test/Makefile - $(top_builddir)/genversion.sh > $(distdir)/CLOOG_HEAD - (cd doc; make cloog.pdf) && cp doc/cloog.pdf $(distdir)/doc/ - -#/***************************************************************************** -# * Rules * -# *****************************************************************************/ - -valcheck: - $(MAKE) valgrind -C test - -total: - @echo " /*-----------------------------------------------*" - @echo " * CLooG *" - @echo " *-----------------------------------------------*/" - $(MAKE) uninstall - $(MAKE) clean - $(MAKE) - $(MAKE) install - -doc: - @echo " /*-----------------------------------------------*" - @echo " * Generating CLooG's documentation *" - @echo " *-----------------------------------------------*/" - doxygen ./autoconf/Doxyfile - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/README b/cloog-0.17.0/README deleted file mode 100644 index 7003a2b3e9a01c9d42378d8074f3c96ce73a3162..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/README +++ /dev/null @@ -1,203 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** The Chunky Loop Generator ** -# **-------------------------------------------------------------------** -# ** First version of this file: january 22th 2002 ** -# **-------------------------------------------------------------------**/ -# - -For complete informations about this software, how to build and use it, -please see the postscript file in the ./doc subdirectory (a pdf version -is available in the web site). - -Overview : -I. Description -II. Building CLooG -III. Options -IV. Running CLooG -V. General Questions - -# **-------------------------------------------------------------------** -# ** I. Description ** -# **-------------------------------------------------------------------**/ - -CLooG is a software which generates loops for scanning Z-polyhedra. That is, -CLooG finds the code or pseudo-code where each integral point of one or more -parametrized polyhedron or parametrized polyhedra union is reached. CLooG is -designed to avoid control overhead and to produce a very efficient code. - -Its input is some data on the polyhedra to scan, basically the system of -affine inequalities that define them, and a context that defines some -properties known on the parameters if any. The output is the pseudo scanning -code. Many facilities are provided to generate a near-to-be-compileable code, -and every useful functions to generate the code may be called from the CLooG -library. - - INPUT | OUTPUT -(fortunately not exactly the input, | (the real one, with default options) - check test/readme.cloog for the | - real input for that problem !) | - | - j^ i>=2 | - | | j<=n+2-i | - | |\ | i<=n | - | | \ | | - m-+-****---+-j<=m | for (i=2;i<=n;i++) { - | ***** | | for (j=2;j<=min(m,-i+n+2);j++) { - | ****** | ==> S1 ; - | *******| | } - 2-+-********-j>=2 | } - | | |\ | - 0-+-+------+--->i | - | | | | - 0 2 n | - | - Context : n>=2 | - m>=2 | - System : 2<=i<=n | - 2<=j<=m | - j<=n+2-i | - -# **-------------------------------------------------------------------** -# ** II. Building CLooG ** -# **-------------------------------------------------------------------**/ - -If you obtained CLooG from the git repository, then you first -need to obtain the submodules and create a configure script. - - ./get_submodules.sh - ./autogen.sh - -The first step is only needed if you plan on using the isl backend. - -The configure shell script attempts to guess correct values for various -system-dependent variables used during compilation. It uses those values to -create a Makefile. The file configure.ac is used to create configure by a -program called autoconf. You only need configure.ac if you want to change -it or regenerate configure using a newer version of autoconf. - -The simplest way to compile this package is: -cd to the directory containing the package's source code and type - - ./configure - -to configure the package for your system (while running, configure prints -some messages telling which features it is checking for). To compile the -package, type - - make - - -to install the program and/or the library, type - - make install - -you can remove the program binaries and object files from the source code -directory by typing - - make clean - -To also remove the files that configure created (so you can compile the -package for a different kind of computer) type - - make distclean - -# **-------------------------------------------------------------------** -# ** III. Options ** -# **-------------------------------------------------------------------**/ - -By default, make will install the package's files in /usr/local/bin, -/usr/local/lib, etc. You can specify an installation prefix other than -/usr/local by giving onfigure the option --prefix=PATH. - -By default, configure will use the isl that comes bundled with CLooG. -Using the --with-isl option of configure the user can specify that "no" isl, -a previously installed ("system") isl or a "build" isl should be used. -In the latter case, the user should also specify the build location -using --with-isl-builddir=PATH. In case of an installed isl, -the installation location can be specified using the ---with-isl-prefix=PATH and --with-isl-exec-prefix=PATH options of configure. - -By default, configure will seek the PolyLib in standard locations. -If necessary, you can specify the PolyLib's path by giving configure the -option --with-polylib-prefix=PATH and/or --with-polylib-exec-prefix=PATH. - -By default, configure will seek the GMP library in standard locations. -If necessary, you can specify the GMP's path by giving configure the -option --with-gmp-prefix=PATH and/or --with-gmp-exec-prefix=PATH. - -By default, when using the PolyLib backend, -CLooG and its library are built using 64 bits integer -representation. You can choose to specify explicitly others integer -representations by using: ---with-bits=32 for 32 bits integers, ---with-bits=64 for 64 bits integers (default), ---with-bits=gmp for multiple precision integers. - -# **-------------------------------------------------------------------** -# ** IV. Running CLooG ** -# **-------------------------------------------------------------------**/ - -To run CLooG, simply type 'cloog', optionally followed by the name of an -input file. You can type 'cloog -h' or 'cloog --help' for some help. -For more informations, please check the ./doc subdirectory. - -# **-------------------------------------------------------------------** -# ** V. General Questions ** -# **-------------------------------------------------------------------**/ - -1. What does CLooG means ? - -CLooG is the Chunky LOOp Generator, Chunky is an automatic loop optimizer for -data locality. CLooG is a completely independent part of the Chunky project. -Pronounce 'CLooG' as 'klug', which means 'sly' in german :-). - -2. CLooG do not compile, what should I do ? - -CLooG should compile everywhere (assuming that PolyLib is still there), thus -there is a problem or the documentation is not clear, in both case it is -necessary to ask the author(s) ! - -3. I need a feature that CLooG do not implement, what should I do ? - -There are two ways. First, CLooG is a LGPL software and library. So you -are welcome to improve it yourself ;-) ! Many project have been successful, it -is -maybe- a sign that this is not too hard to put your hands inside the -source. Second, just ask the author(s) :-) ! Maybe a lot of people would be -interessed by such feature, maybe many people asked for it before, maybe it's -trivial to implement (and even)... Please just never hesitate to ask the -author(s) ! - -4. I implemented a cool feature, can I submit it ? - -Obviously you are welcome to send the author(s) any improvement. But obviously -we are quite careful with readability, correctness and stability, and the -author(s) will read, check and check again any contribution before including it. -Thus, it can take time... There are few basic rules to write contributions: -- (1) Do never change the indentation of any part of the code that is not yours. -- (2) Do never send codes that use more than 80 columns. -- (3) Do never send codes without a lot of comments in (bad or good) english. -- (4) Do never send codes with obscure and/or non-english variable names. -- (5) Use C89, just C, only C (note: "//" comments are not C89, - variable declaration elsewhere than at the beginning of a block, is not C89). -- (6) Read doc/SubmittingPatches -Please understand that in order to live for a long time, and to be used in many -projects the very first priority for CLooG is to be readable and documented. - -5. Is CLooG bug free ? - -No, who can ? ClooG is a complex program, and we do not pretend it to be bug -free. Nevertheless because it has been tested and tested, we are fairly sure -that CLooG results with default options have good chances to be satisfactory. -If you find a result that looks strange, inadequate or incorrect, please send: -- (1) The input file to the author(s). -- (2) The output. -- (3) The first line given by typing 'cloog -v'. -- (4) All your command line options to achieve the result. -We will try to explain the result or to fix the problem as soon as possible. - -6. How can I contact the author(s) ? - -Just send a mail to cloog-development@googlegroups.com diff --git a/cloog-0.17.0/aclocal.m4 b/cloog-0.17.0/aclocal.m4 deleted file mode 100644 index 884385e12f7f4dd7507222bbbe69ab8ce3bd8985..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/aclocal.m4 +++ /dev/null @@ -1,991 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/ax_cc_maxopt.m4]) -m4_include([m4/ax_cflags_warn_all.m4]) -m4_include([m4/ax_check_compiler_flags.m4]) -m4_include([m4/ax_compiler_vendor.m4]) -m4_include([m4/ax_create_pkgconfig_info.m4]) -m4_include([m4/ax_gcc_archflag.m4]) -m4_include([m4/ax_gcc_x86_cpuid.m4]) -m4_include([m4/ax_submodule.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) diff --git a/cloog-0.17.0/autoconf/Doxyfile.in b/cloog-0.17.0/autoconf/Doxyfile.in deleted file mode 100644 index fa02ac7c7e1b3cf985505b447c8603ab3253fa62..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/Doxyfile.in +++ /dev/null @@ -1,1101 +0,0 @@ -# Doxyfile 1.3.5 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = CLooG - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @RELEASE@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/source - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = YES - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = -#WARN_LOGFILE = doc/doxygen.log - - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = source \ - include/cloog - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = YES - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = /usr/bin/ - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -# DOTFILE_DIRS = src - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/cloog-0.17.0/autoconf/config.guess b/cloog-0.17.0/autoconf/config.guess deleted file mode 100755 index c2246a4f7f4c78281ccfc4238a54cf7d83c4f421..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/config.guess +++ /dev/null @@ -1,1502 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2009-12-30' - -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.17.0/autoconf/config.sub b/cloog-0.17.0/autoconf/config.sub deleted file mode 100755 index c2d125724c0ed2d2c6da5308c54567649554e5f3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/config.sub +++ /dev/null @@ -1,1714 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-01-22' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.17.0/autoconf/depcomp b/cloog-0.17.0/autoconf/depcomp deleted file mode 100755 index df8eea7e4ce8862105fcd7929b20bdb45488048b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# 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, 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 . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/autoconf/install-sh b/cloog-0.17.0/autoconf/install-sh deleted file mode 100755 index 6781b987bdbcbc23efe6bbe1654a1e3637b9af07..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/autoconf/ltmain.sh b/cloog-0.17.0/autoconf/ltmain.sh deleted file mode 100755 index fa4b1e1f8ae4378e5bc1119d65ac20337f2445fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/ltmain.sh +++ /dev/null @@ -1,8413 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/cloog-0.17.0/autoconf/missing b/cloog-0.17.0/autoconf/missing deleted file mode 100755 index 28055d2ae6f2a2c584afcd769d7881e11f62ecd9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/autoconf/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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 . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/configure b/cloog-0.17.0/configure deleted file mode 100755 index 9f2f7a5b21c58ef857af2d1e06ad6b4cdd4795aa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/configure +++ /dev/null @@ -1,15080 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for cloog 0.17.0. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: cloog-development@googlegroups.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='cloog' -PACKAGE_TARNAME='cloog' -PACKAGE_VERSION='0.17.0' -PACKAGE_STRING='cloog 0.17.0' -PACKAGE_BUGREPORT='cloog-development@googlegroups.com' -PACKAGE_URL='' - -ac_unique_file="source/cloog.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -enable_option_checking=no -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -subdirs -pkgconfig_libfile -pkgconfig_libdir -VERSION_REVISION -VERSION_MINOR -VERSION_MAJOR -BITS -INSTALL -GIT_INDEX -NO_OSL_FALSE -NO_OSL_TRUE -BUNDLED_OSL_FALSE -BUNDLED_OSL_TRUE -OSL_LIBS -OSL_LDFLAGS -OSL_CPPFLAGS -NO_ISL_FALSE -NO_ISL_TRUE -BUNDLED_ISL_FALSE -BUNDLED_ISL_TRUE -ISL_LIBS -ISL_LDFLAGS -ISL_CPPFLAGS -NEED_GET_MEMORY_FUNCTIONS_FALSE -NEED_GET_MEMORY_FUNCTIONS_TRUE -CFLAGS_WARN -PRTDIAG -HAVE_TEXI2DVI_FALSE -HAVE_TEXI2DVI_TRUE -TEXI2DVI -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -CD -LN_S -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -versioninfo -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -enable_portable_binary -with_gcc_arch -with_isl -with_isl_prefix -with_isl_exec_prefix -with_isl_builddir -with_gmp -with_gmp_prefix -with_gmp_exec_prefix -with_gmp_builddir -with_osl -with_osl_prefix -with_osl_exec_prefix -with_osl_builddir -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' -ac_subdirs_all='isl -osl' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures cloog 0.17.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/cloog] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of cloog 0.17.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-portable-binary - disable compiler optimizations that would produce - unportable binaries - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-gcc-arch= use architecture for gcc -march/-mtune, - instead of guessing - --with-isl=no|system|build|bundled - Which isl to use - --with-isl-prefix=DIR Prefix of isl installation - --with-isl-exec-prefix=DIR - Exec prefix of isl installation - --with-isl-builddir=DIR Location of isl builddir - --with-gmp=system|build Which gmp to use - --with-gmp-prefix=DIR Prefix of gmp installation - --with-gmp-exec-prefix=DIR - Exec prefix of gmp installation - --with-gmp-builddir=DIR Location of gmp builddir - --with-osl=no|system|build|bundled - Which osl to use - --with-osl-prefix=DIR Prefix of osl installation - --with-osl-exec-prefix=DIR - Exec prefix of osl installation - --with-osl-builddir=DIR Location of osl builddir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -cloog configure 0.17.0 -generated by GNU Autoconf 2.67 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------- ## -## Report this to cloog-development@googlegroups.com ## -## ------------------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by cloog $as_me 0.17.0, which was -generated by GNU Autoconf 2.67. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -for ac_dir in autoconf "$srcdir"/autoconf; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - - -VERSION_MAJOR=0 -VERSION_MINOR=17 -VERSION_REVISION=0 - -versioninfo=3:0:0 - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='cloog' - VERSION='0.17.0' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -# Extract the first word of "cd", so it can be a program name with args. -set dummy cd; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CD"; then - ac_cv_prog_CD="$CD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CD="" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CD=$ac_cv_prog_CD -if test -n "$CD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CD" >&5 -$as_echo "$CD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4747: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:4750: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:4753: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 5948 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7477: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7481: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7816: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7820: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7921: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7925: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7976: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7980: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 10360 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 10456 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -# Extract the first word of "texi2dvi", so it can be a program name with args. -set dummy texi2dvi; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_TEXI2DVI+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$TEXI2DVI"; then - ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_TEXI2DVI="texi2dvi" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -TEXI2DVI=$ac_cv_prog_TEXI2DVI -if test -n "$TEXI2DVI"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2DVI" >&5 -$as_echo "$TEXI2DVI" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test -n "$TEXI2DVI"; then - HAVE_TEXI2DVI_TRUE= - HAVE_TEXI2DVI_FALSE='#' -else - HAVE_TEXI2DVI_TRUE='#' - HAVE_TEXI2DVI_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 -$as_echo_n "checking for C compiler vendor... " >&6; } -if test "${ax_cv_c_compiler_vendor+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_c_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'`")" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !($vencpp) - thisisanerror; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 -$as_echo "$ax_cv_c_compiler_vendor" >&6; } - - - - - - -# Check whether --enable-portable-binary was given. -if test "${enable_portable_binary+set}" = set; then : - enableval=$enable_portable_binary; acx_maxopt_portable=$withval -else - acx_maxopt_portable=no -fi - - -# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $xlc_opt" >&5 -$as_echo_n "checking whether C compiler accepts $xlc_opt... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$xlc_opt" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="-O3 -qansialias -w $xlc_opt" -else - 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 "******************************************************" -fi - - ;; - - 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: - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - icc_archflag=$flag; break -else - : -fi - - done - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc architecture flag" >&5 -$as_echo_n "checking for icc architecture flag... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $icc_archflag" >&5 -$as_echo "$icc_archflag" >&6; } - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5 -$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; } -if test "${ax_cv_c_flags__malign_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-malign-double" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__malign_double=yes -else - ax_cv_c_flags__malign_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -malign-double" -else - : -fi - - - # -fstrict-aliasing for gcc-2.95+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5 -$as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; } -if test "${ax_cv_c_flags__fstrict_aliasing+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-fstrict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__fstrict_aliasing=yes -else - ax_cv_c_flags__fstrict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__fstrict_aliasing -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -fstrict-aliasing" -else - : -fi - - - # note that we enable "unsafe" fp optimization with other compilers, too - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5 -$as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; } -if test "${ax_cv_c_flags__ffast_math+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-ffast-math" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__ffast_math=yes -else - ax_cv_c_flags__ffast_math=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__ffast_math -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -ffast-math" -else - : -fi - - - - - - -# Check whether --with-gcc-arch was given. -if test "${with_gcc_arch+set}" = set; then : - withval=$with_gcc_arch; ax_gcc_arch=$withval -else - ax_gcc_arch=yes -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -if test "${ax_cv_gcc_archflag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -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 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) - 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]?:*:*:*) - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x80000006 output" >&5 -$as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0x80000006=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0x80000006, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # 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*) - # Extract the first word of "prtdiag", so it can be a program name with args. -set dummy prtdiag; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PRTDIAG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PRTDIAG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag" - ;; -esac -fi -PRTDIAG=$ac_cv_path_PRTDIAG -if test -n "$PRTDIAG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRTDIAG" >&5 -$as_echo "$PRTDIAG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - 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$acx_maxopt_portable" = 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - ax_cv_gcc_archflag=$flag; break -else - : -fi - - done - test "x$ax_cv_gcc_archflag" = xunknown || break -done -fi - -fi # $GCC=yes - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_archflag" >&5 -$as_echo "$ax_cv_gcc_archflag" >&6; } -if test "x$ax_cv_gcc_archflag" = xunknown; then - : -else - CFLAGS="$CFLAGS $ax_cv_gcc_archflag" -fi - - ;; - 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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS" >&5 -$as_echo_n "checking whether C compiler accepts $CFLAGS... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - : -else - - 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 - - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS_WARN for maximum warnings" >&5 -$as_echo_n "checking CFLAGS_WARN for maximum warnings... " >&6; } -if test "${ac_cv_cflags_warn_all+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_cflags_warn_all="no, unknown" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_save_CFLAGS="$CFLAGS" -for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" # -do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done - CFLAGS="$ac_save_CFLAGS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags_warn_all" >&5 -$as_echo "$ac_cv_cflags_warn_all" >&6; } -case ".$ac_cv_cflags_warn_all" in - .ok|.ok,*) ;; - .|.no|.no,*) - ;; - *) - if echo " $CFLAGS_WARN " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null - then { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS_WARN does contain \$ac_cv_cflags_warn_all"; } >&5 - (: CFLAGS_WARN does contain $ac_cv_cflags_warn_all) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - else { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS_WARN=\"\$CFLAGS_WARN \$ac_cv_cflags_warn_all\""; } >&5 - (: CFLAGS_WARN="$CFLAGS_WARN $ac_cv_cflags_warn_all") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - CFLAGS_WARN="$CFLAGS_WARN $ac_cv_cflags_warn_all" - fi - ;; -esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - - -for ac_func in strtol -do : - ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOL 1 -_ACEOF - -fi -done - - - - -for ac_func in getrusage -do : - ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" -if test "x$ac_cv_func_getrusage" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETRUSAGE 1 -_ACEOF - -$as_echo "#define CLOOG_RUSAGE /**/" >>confdefs.h - -fi -done - - - - - -# Check whether --with-isl was given. -if test "${with_isl+set}" = set; then : - withval=$with_isl; -fi - -case "system" in -no|system|build|bundled) - -# Check whether --with-isl_prefix was given. -if test "${with_isl_prefix+set}" = set; then : - withval=$with_isl_prefix; -fi - - -# Check whether --with-isl_exec_prefix was given. -if test "${with_isl_exec_prefix+set}" = set; then : - withval=$with_isl_exec_prefix; -fi - -esac -case "build" in -no|system|build|bundled) - -# Check whether --with-isl_builddir was given. -if test "${with_isl_builddir+set}" = set; then : - withval=$with_isl_builddir; -fi - -esac -if test "x$with_isl_prefix" != "x" -a "x$with_isl_exec_prefix" = "x"; then - with_isl_exec_prefix=$with_isl_prefix -fi -if test "x$with_isl_prefix" != "x" -o "x$with_isl_exec_prefix" != "x"; then - if test "x$with_isl" != "x" -a "x$with_isl" != "xsystem"; then - as_fn_error $? "Setting $with_isl_prefix implies use of system isl" "$LINENO" 5 - fi - with_isl="system" -fi -if test "x$with_isl_builddir" != "x"; then - if test "x$with_isl" != "x" -a "x$with_isl" != "xbuild"; then - as_fn_error $? "Setting $with_isl_builddir implies use of build isl" "$LINENO" 5 - fi - with_isl="build" - isl_srcdir=`echo @abs_srcdir@ | $with_isl_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: isl sources in $isl_srcdir" >&5 -$as_echo "$as_me: isl sources in $isl_srcdir" >&6;} -fi -case "$with_isl" in -no|system|build|bundled) - ;; -*) - if test -d $srcdir/.git -a \ - -d $srcdir/isl -a \ - ! -d $srcdir/isl/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule isl not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule isl not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/isl/configure -a "bundled" != "no"; then - with_isl="bundled" - else - with_isl="bundled" - fi - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which isl to use" >&5 -$as_echo_n "checking which isl to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_isl" >&5 -$as_echo "$with_isl" >&6; } - - -BITS="gmp" - - - - - -# Check whether --with-gmp was given. -if test "${with_gmp+set}" = set; then : - withval=$with_gmp; -fi - -case "system" in -system|build) - -# Check whether --with-gmp_prefix was given. -if test "${with_gmp_prefix+set}" = set; then : - withval=$with_gmp_prefix; -fi - - -# Check whether --with-gmp_exec_prefix was given. -if test "${with_gmp_exec_prefix+set}" = set; then : - withval=$with_gmp_exec_prefix; -fi - -esac -case "build" in -system|build) - -# Check whether --with-gmp_builddir was given. -if test "${with_gmp_builddir+set}" = set; then : - withval=$with_gmp_builddir; -fi - -esac -if test "x$with_gmp_prefix" != "x" -a "x$with_gmp_exec_prefix" = "x"; then - with_gmp_exec_prefix=$with_gmp_prefix -fi -if test "x$with_gmp_prefix" != "x" -o "x$with_gmp_exec_prefix" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xsystem"; then - as_fn_error $? "Setting $with_gmp_prefix implies use of system gmp" "$LINENO" 5 - fi - with_gmp="system" -fi -if test "x$with_gmp_builddir" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xbuild"; then - as_fn_error $? "Setting $with_gmp_builddir implies use of build gmp" "$LINENO" 5 - fi - with_gmp="build" - gmp_srcdir=`echo @abs_srcdir@ | $with_gmp_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: gmp sources in $gmp_srcdir" >&5 -$as_echo "$as_me: gmp sources in $gmp_srcdir" >&6;} -fi -case "$with_gmp" in -system|build) - ;; -*) - if test -d $srcdir/.git -a \ - -d $srcdir/gmp -a \ - ! -d $srcdir/gmp/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule gmp not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule gmp not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/gmp/configure -a "system" != "no"; then - with_gmp="bundled" - else - with_gmp="system" - fi - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which gmp to use" >&5 -$as_echo_n "checking which gmp to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gmp" >&5 -$as_echo "$with_gmp" >&6; } - - - -need_get_memory_functions=false -case "$with_gmp" in -build) - CPPFLAGS="-I$with_gmp_builddir $CPPFLAGS" - LDFLAGS="-L$with_gmp_builddir/$lt_cv_objdir $LDFLAGS" - ;; -system) - if test "x$with_gmp_prefix" != "x"; then - CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS" - fi - - if test "$with_gmp_exec_prefix" != "yes" ; then - LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS" - fi - ;; -esac -case "$with_gmp" in -build|system) - ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" -if test "x$ac_cv_header_gmp_h" = x""yes; then : - -else - as_fn_error $? "Can't find gmp headers." "$LINENO" 5 -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 -$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } -if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __gmpz_init (); -int -main () -{ -return __gmpz_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gmp___gmpz_init=yes -else - ac_cv_lib_gmp___gmpz_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 -$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } -if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then : - LIBS="$LIBS -lgmp" -else - as_fn_error $? "Can't find gmp library." "$LINENO" 5 -fi - - ac_fn_c_check_decl "$LINENO" "mp_get_memory_functions" "ac_cv_have_decl_mp_get_memory_functions" "#include -" -if test "x$ac_cv_have_decl_mp_get_memory_functions" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MP_GET_MEMORY_FUNCTIONS $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - - need_get_memory_functions=true - -fi - - ;; -esac - if test x$need_get_memory_functions = xtrue; then - NEED_GET_MEMORY_FUNCTIONS_TRUE= - NEED_GET_MEMORY_FUNCTIONS_FALSE='#' -else - NEED_GET_MEMORY_FUNCTIONS_TRUE='#' - NEED_GET_MEMORY_FUNCTIONS_FALSE= -fi - - - - - - -case "$with_isl" in -bundled) - ISL_CPPFLAGS="-I$srcdir/isl/include -Iisl/include" - ;; -build) - ISL_CPPFLAGS="-I$isl_srcdir/include -I$with_isl_builddir/include" - ISL_LIBS="$with_isl_builddir/libisl.la" - ;; -system) - if test "x$with_isl_prefix" != "x"; then - ISL_CPPFLAGS="-I$with_isl_prefix/include" - fi - if test "x$with_isl_exec_prefix" != "x"; then - ISL_LDFLAGS="-L$with_isl_exec_prefix/lib" - fi - ISL_LIBS="-lisl" -esac - if test $with_isl = bundled; then - BUNDLED_ISL_TRUE= - BUNDLED_ISL_FALSE='#' -else - BUNDLED_ISL_TRUE='#' - BUNDLED_ISL_FALSE= -fi - - if test $with_isl = no; then - NO_ISL_TRUE= - NO_ISL_FALSE='#' -else - NO_ISL_TRUE='#' - NO_ISL_FALSE= -fi - - - - - - - -# Check whether --with-osl was given. -if test "${with_osl+set}" = set; then : - withval=$with_osl; -fi - -case "system" in -no|system|build|bundled) - -# Check whether --with-osl_prefix was given. -if test "${with_osl_prefix+set}" = set; then : - withval=$with_osl_prefix; -fi - - -# Check whether --with-osl_exec_prefix was given. -if test "${with_osl_exec_prefix+set}" = set; then : - withval=$with_osl_exec_prefix; -fi - -esac -case "build" in -no|system|build|bundled) - -# Check whether --with-osl_builddir was given. -if test "${with_osl_builddir+set}" = set; then : - withval=$with_osl_builddir; -fi - -esac -if test "x$with_osl_prefix" != "x" -a "x$with_osl_exec_prefix" = "x"; then - with_osl_exec_prefix=$with_osl_prefix -fi -if test "x$with_osl_prefix" != "x" -o "x$with_osl_exec_prefix" != "x"; then - if test "x$with_osl" != "x" -a "x$with_osl" != "xsystem"; then - as_fn_error $? "Setting $with_osl_prefix implies use of system osl" "$LINENO" 5 - fi - with_osl="system" -fi -if test "x$with_osl_builddir" != "x"; then - if test "x$with_osl" != "x" -a "x$with_osl" != "xbuild"; then - as_fn_error $? "Setting $with_osl_builddir implies use of build osl" "$LINENO" 5 - fi - with_osl="build" - osl_srcdir=`echo @abs_srcdir@ | $with_osl_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: osl sources in $osl_srcdir" >&5 -$as_echo "$as_me: osl sources in $osl_srcdir" >&6;} -fi -case "$with_osl" in -no|system|build|bundled) - ;; -*) - if test -d $srcdir/.git -a \ - -d $srcdir/osl -a \ - ! -d $srcdir/osl/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule osl not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule osl not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/osl/configure -a "no" != "no"; then - with_osl="bundled" - else - with_osl="no" - fi - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which osl to use" >&5 -$as_echo_n "checking which osl to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_osl" >&5 -$as_echo "$with_osl" >&6; } - - -osl_flag="OSL_SUPPORT" - - - - -case "$with_osl" in -bundled) - OSL_CPPFLAGS="-D$osl_flag -I$srcdir/osl/include -Iosl/include" - ;; -build) - OSL_CPPFLAGS="-D$osl_flag -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="-D$osl_flag -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="-losl" -esac - if test $with_osl = bundled; then - BUNDLED_OSL_TRUE= - BUNDLED_OSL_FALSE='#' -else - BUNDLED_OSL_TRUE='#' - BUNDLED_OSL_FALSE= -fi - - if test $with_osl = no; then - NO_OSL_TRUE= - NO_OSL_FALSE='#' -else - NO_OSL_TRUE='#' - NO_OSL_FALSE= -fi - - - - -$as_echo "#define CLOOG_INT_GMP 1" >>confdefs.h - - - -if test -f $srcdir/.git/HEAD; then - GIT_INDEX="\$(top_srcdir)/.git/index" -fi - - - - - - - - - - - - - - - - - -PACKAGE_NAME="cloog-isl" -PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1" - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig libname" >&5 -$as_echo_n "checking our pkgconfig libname... " >&6; } -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="${PACKAGE_NAME}" -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="$PACKAGE" -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libname" >&5 -$as_echo "$ax_create_pkgconfig_libname" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig version" >&5 -$as_echo_n "checking our pkgconfig version... " >&6; } -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="${PACKAGE_VERSION}" -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="$VERSION" -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_version" >&5 -$as_echo "$ax_create_pkgconfig_version" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libdir" >&5 -$as_echo_n "checking our pkgconfig_libdir... " >&6; } -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -ax_create_pkgconfig_libdir=`eval echo "$pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libdir" >&5 -$as_echo "$pkgconfig_libdir" >&6; } -test "$pkgconfig_libdir" != "$ax_create_pkgconfig_libdir" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&5 -$as_echo "expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libfile" >&5 -$as_echo_n "checking our pkgconfig_libfile... " >&6; } -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_libfile=`eval echo "$pkgconfig_libfile"` -ax_create_pkgconfig_libfile=`eval echo "$ax_create_pkgconfig_libfile"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libfile" >&5 -$as_echo "$pkgconfig_libfile" >&6; } -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_libfile" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&5 -$as_echo "expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our package / suffix" >&5 -$as_echo_n "checking our package / suffix... " >&6; } -ax_create_pkgconfig_suffix="$program_suffix" -test ".$ax_create_pkgconfig_suffix" != .NONE || ax_create_pkgconfig_suffix="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&5 -$as_echo "${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig description" >&5 -$as_echo_n "checking our pkgconfig description... " >&6; } -ax_create_pkgconfig_description="$PACKAGE_SUMMARY" -test ".$ax_create_pkgconfig_description" != "." || \ -ax_create_pkgconfig_description="$ax_create_pkgconfig_libname Library" -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_description" >&5 -$as_echo "$ax_create_pkgconfig_description" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig requires" >&5 -$as_echo_n "checking our pkgconfig requires... " >&6; } -ax_create_pkgconfig_requires="$PACKAGE_REQUIRES" -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_requires" >&5 -$as_echo "$ax_create_pkgconfig_requires" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ext libs" >&5 -$as_echo_n "checking our pkgconfig ext libs... " >&6; } -ax_create_pkgconfig_pkglibs="$PACKAGE_LIBS" -test ".$ax_create_pkgconfig_pkglibs" != "." || ax_create_pkgconfig_pkglibs="-l$ax_create_pkgconfig_libname" -ax_create_pkgconfig_libs="$ax_create_pkgconfig_pkglibs $LIBS" -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libs" >&5 -$as_echo "$ax_create_pkgconfig_libs" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig cppflags" >&5 -$as_echo_n "checking our pkgconfig cppflags... " >&6; } -ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_cppflags" >&5 -$as_echo "$ax_create_pkgconfig_cppflags" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ldflags" >&5 -$as_echo_n "checking our pkgconfig ldflags... " >&6; } -ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_ldflags" >&5 -$as_echo "$ax_create_pkgconfig_ldflags" >&6; } - -test ".$ax_create_pkgconfig_generate" != "." || \ -ax_create_pkgconfig_generate="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_generate" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: generate the pkgconfig later... $ax_create_pkgconfig_generate" >&5 -$as_echo "generate the pkgconfig later... $ax_create_pkgconfig_generate" >&6; }) - -if test ".$ax_create_pkgconfig_src_libdir" = "." ; then -ax_create_pkgconfig_src_libdir=`pwd` -ax_create_pkgconfig_src_libdir=`$as_dirname -- "$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" || -$as_expr X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_libdir/src || \ -ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/src" -case ".$objdir" in -*libs) ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/$objdir" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&5 -$as_echo "noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&6; } -fi - -if test ".$ax_create_pkgconfig_src_headers" = "." ; then -ax_create_pkgconfig_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) ax_create_pkgconfig_src_headers="" ;; esac -ax_create_pkgconfig_src_headers=`$as_dirname -- "$ax_create_pkgconfig_src_headers/$v/x" || -$as_expr X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_headers/$v/x" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_headers/include || \ -ax_create_pkgconfig_src_headers="$ax_create_pkgconfig_src_headers/include" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&5 -$as_echo "noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&6; } -fi - - -ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate" - - -ac_config_files="$ac_config_files Makefile test/Makefile" - -ac_config_files="$ac_config_files autoconf/Doxyfile" - -ac_config_files="$ac_config_files doc/Makefile" - -ac_config_files="$ac_config_files source/version.c" - -ac_config_files="$ac_config_files include/cloog/version.h" - -ac_config_files="$ac_config_files genversion.sh" - -ac_config_commands="$ac_config_commands version.h" - -ac_config_commands="$ac_config_commands doc/gitversion.texi" - -if test $with_isl = bundled; then - - -subdirs="$subdirs isl" - -fi -if test $with_osl = bundled; then - subdirs="$subdirs osl" - -fi - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_TEXI2DVI_TRUE}" && test -z "${HAVE_TEXI2DVI_FALSE}"; then - as_fn_error $? "conditional \"HAVE_TEXI2DVI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NEED_GET_MEMORY_FUNCTIONS_TRUE}" && test -z "${NEED_GET_MEMORY_FUNCTIONS_FALSE}"; then - as_fn_error $? "conditional \"NEED_GET_MEMORY_FUNCTIONS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUNDLED_ISL_TRUE}" && test -z "${BUNDLED_ISL_FALSE}"; then - as_fn_error $? "conditional \"BUNDLED_ISL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NO_ISL_TRUE}" && test -z "${NO_ISL_FALSE}"; then - as_fn_error $? "conditional \"NO_ISL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUNDLED_OSL_TRUE}" && test -z "${BUNDLED_OSL_FALSE}"; then - as_fn_error $? "conditional \"BUNDLED_OSL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NO_OSL_TRUE}" && test -z "${NO_OSL_FALSE}"; then - as_fn_error $? "conditional \"NO_OSL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by cloog $as_me 0.17.0, which was -generated by GNU Autoconf 2.67. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -cloog config.status 0.17.0 -configured by $0, generated by GNU Autoconf 2.67, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "$ax_create_pkgconfig_generate") CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "autoconf/Doxyfile") CONFIG_FILES="$CONFIG_FILES autoconf/Doxyfile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "source/version.c") CONFIG_FILES="$CONFIG_FILES source/version.c" ;; - "include/cloog/version.h") CONFIG_FILES="$CONFIG_FILES include/cloog/version.h" ;; - "genversion.sh") CONFIG_FILES="$CONFIG_FILES genversion.sh" ;; - "version.h") CONFIG_COMMANDS="$CONFIG_COMMANDS version.h" ;; - "doc/gitversion.texi") CONFIG_COMMANDS="$CONFIG_COMMANDS doc/gitversion.texi" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "$ax_create_pkgconfig_generate":C) -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_generate.in" >&5 -$as_echo "$as_me: creating $pkgconfig_generate.in" >&6;} -cat > $pkgconfig_generate.in <&5 -$as_echo "$as_me: creating $pkgconfig_generate" >&6;} -cat >conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - as_fn_error $? "$pkgconfig_generate is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error $? "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error $? "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - ;; - "genversion.sh":F) chmod +x genversion.sh ;; - "version.h":C) echo '#define CLOOG_HEAD "'`./genversion.sh`'"' > version.h ;; - "doc/gitversion.texi":C) echo '@set VERSION '`./genversion.sh`'' > doc/gitversion.texi ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - - ac_configure_args="$ac_configure_args $cloog_configure_args" - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi - -# -# CONFIG_SUBDIRS section. -# -if test "$no_recursion" != yes; then - - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ac_sub_configure_args= - ac_prev= - eval "set x $ac_configure_args" - shift - for ac_arg - do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case $ac_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - ;; - --disable-option-checking) - ;; - *) - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_sub_configure_args " '$ac_arg'" ;; - esac - done - - # Always prepend --prefix to ensure using the same prefix - # in subdir configurations. - ac_arg="--prefix=$prefix" - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" - - ac_popdir=`pwd` - for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - test -d "$srcdir/$ac_dir" || continue - - ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - cd "$ac_dir" - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f "$ac_srcdir/configure.gnu"; then - ac_sub_configure=$ac_srcdir/configure.gnu - elif test -f "$ac_srcdir/configure"; then - ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - # Make the cache file name correct relative to the subdirectory. - case $cache_file in - [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; - *) # Relative name. - ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} - # The eval makes quoting arguments work. - eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 - fi - - cd "$ac_popdir" - done -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -echo " /*-----------------------------------------------*" -echo " * CLooG configuration is OK *" -echo " *-----------------------------------------------*/" -echo "It appears that your system is OK to start CLooG compilation. You need" -echo "now to type \"make\". After compilation, you should check CLooG by typing" -echo "\"make check\". If no problem occur, you can type \"make uninstall\" if" -echo "you are upgrading an old version. Lastly type \"make install\" to install" -echo "CLooG on your system (log as root if necessary)." diff --git a/cloog-0.17.0/configure.ac b/cloog-0.17.0/configure.ac deleted file mode 100644 index e7001d367de0603d589ebb5ba52a89d4b82dcb58..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/configure.ac +++ /dev/null @@ -1,263 +0,0 @@ - -dnl /**-------------------------------------------------------------------** -dnl ** CLooG ** -dnl **-------------------------------------------------------------------** -dnl ** configure.ac ** -dnl **-------------------------------------------------------------------** -dnl ** First version: august 7th 2002 ** -dnl **-------------------------------------------------------------------**/ -dnl -dnl Input file for autoconf to build a configuration shellscript. -dnl To build the configure script from the CLooG's top-level directory, use -dnl autoconf -l autoconf autoconf/configure.in > configure -dnl if it doesn't work (invalid option -l) try -I instead -dnl autoconf -I autoconf autoconf/configure.in > configure - -dnl /************************************************************************** -dnl * CLooG : the Chunky Loop Generator (experimental) * -dnl *************************************************************************** -dnl * * -dnl * Copyright (C) 2001 Cedric Bastoul * -dnl * * -dnl * This library is free software; you can redistribute it and/or * -dnl * modify it under the terms of the GNU Lesser General Public * -dnl * License as published by the Free Software Foundation; either * -dnl * version 2.1 of the License, or (at your option) any later version. * -dnl * * -dnl * This library is distributed in the hope that it will be useful, * -dnl * but WITHOUT ANY WARRANTY; without even the implied warranty of * -dnl * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -dnl * Lesser General Public License for more details. * -dnl * * -dnl * You should have received a copy of the GNU Lesser General Public * -dnl * License along with this library; if not, write to the Free Software * -dnl * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -dnl * Boston, MA 02110-1301 USA * -dnl * * -dnl * CLooG, the Chunky Loop Generator * -dnl * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -dnl * * -dnl ***************************************************************************/ - -m4_define([version_major], [0]) -m4_define([version_minor], [17]) -m4_define([version_revision], [0]) - -AC_PREREQ(2.53) -AC_INIT([cloog], [version_major.version_minor.version_revision], - [cloog-development@googlegroups.com]) -AC_CONFIG_SRCDIR(source/cloog.c) -AC_CONFIG_AUX_DIR(autoconf) -AC_CONFIG_MACRO_DIR([m4]) - -VERSION_MAJOR=version_major -VERSION_MINOR=version_minor -VERSION_REVISION=version_revision -AC_SUBST(versioninfo) -versioninfo=3:0:0 - -AM_INIT_AUTOMAKE([foreign]) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -dnl /************************************************************************** -dnl * Checking * -dnl **************************************************************************/ - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_CHECK_PROG(CD, cd) -dnl Configure needs an empty install.sh file with this, i HATE that... -AC_PROG_INSTALL -AC_PROG_LIBTOOL -AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, []) -AM_CONDITIONAL(HAVE_TEXI2DVI, test -n "$TEXI2DVI") - -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 - - -dnl Checks for library functions. -AC_CHECK_FUNCS(strtol) - - -dnl /************************************************************************** -dnl * Option setting * -dnl **************************************************************************/ - -AC_CHECK_FUNCS([getrusage], - [AC_DEFINE([CLOOG_RUSAGE], [], [Print time required to generate code])]) - -AX_SUBMODULE(isl,no|system|build|bundled,bundled) -BITS="gmp" - -dnl /************************************************************************** -dnl * Where is GMP? * -dnl **************************************************************************/ - -AX_SUBMODULE(gmp,system|build,system) - -need_get_memory_functions=false -case "$with_gmp" in -build) - CPPFLAGS="-I$with_gmp_builddir $CPPFLAGS" - LDFLAGS="-L$with_gmp_builddir/$lt_cv_objdir $LDFLAGS" - ;; -system) - if test "x$with_gmp_prefix" != "x"; then - CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS" - fi - - if test "$with_gmp_exec_prefix" != "yes" ; then - LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS" - fi - ;; -esac -case "$with_gmp" in -build|system) - AC_CHECK_HEADER(gmp.h, - [], - [AC_MSG_ERROR(Can't find gmp headers.)]) - AC_CHECK_LIB(gmp, - __gmpz_init, - [LIBS="$LIBS -lgmp"], - [AC_MSG_ERROR(Can't find gmp library.)]) - AC_CHECK_DECLS(mp_get_memory_functions,[],[ - need_get_memory_functions=true - ],[#include ]) - ;; -esac -AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, - test x$need_get_memory_functions = xtrue) - -dnl /************************************************************************** -dnl * Where is isl? * -dnl **************************************************************************/ - -AC_SUBST(ISL_CPPFLAGS) -AC_SUBST(ISL_LDFLAGS) -AC_SUBST(ISL_LIBS) -case "$with_isl" in -bundled) - ISL_CPPFLAGS="-I$srcdir/isl/include -Iisl/include" - ;; -build) - ISL_CPPFLAGS="-I$isl_srcdir/include -I$with_isl_builddir/include" - ISL_LIBS="$with_isl_builddir/libisl.la" - ;; -system) - if test "x$with_isl_prefix" != "x"; then - ISL_CPPFLAGS="-I$with_isl_prefix/include" - fi - if test "x$with_isl_exec_prefix" != "x"; then - ISL_LDFLAGS="-L$with_isl_exec_prefix/lib" - fi - ISL_LIBS="-lisl" -esac -AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled) -AM_CONDITIONAL(NO_ISL, test $with_isl = no) - - -dnl /************************************************************************** -dnl * Where is the OpenScop Library? * -dnl **************************************************************************/ - -AX_SUBMODULE(osl,no|system|build|bundled,no) -osl_flag="OSL_SUPPORT" - -AC_SUBST(OSL_CPPFLAGS) -AC_SUBST(OSL_LDFLAGS) -AC_SUBST(OSL_LIBS) -case "$with_osl" in -bundled) - OSL_CPPFLAGS="-D$osl_flag -I$srcdir/osl/include -Iosl/include" - ;; -build) - OSL_CPPFLAGS="-D$osl_flag -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="-D$osl_flag -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="-losl" -esac -AM_CONDITIONAL(BUNDLED_OSL, test $with_osl = bundled) -AM_CONDITIONAL(NO_OSL, test $with_osl = no) - - -AC_DEFINE([CLOOG_INT_GMP], 1, [Use arbitrary precision integers]) - -AC_SUBST(GIT_INDEX) -if test -f $srcdir/.git/HEAD; then - GIT_INDEX="\$(top_srcdir)/.git/index" -fi - - -dnl /************************************************************************** -dnl * Substitutions * -dnl **************************************************************************/ - - -dnl Substitutions to do in Makefile.in. -AC_SUBST(CC) -AC_SUBST(LN_S) - -AC_SUBST(prefix) -AC_SUBST(exec_prefix) -AC_SUBST(INSTALL) - -AC_SUBST(BITS) - -AC_SUBST(VERSION_MAJOR) -AC_SUBST(VERSION_MINOR) -AC_SUBST(VERSION_REVISION) - -PACKAGE_NAME="cloog-isl" -PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1" -AX_CREATE_PKGCONFIG_INFO - -AC_CONFIG_FILES(Makefile test/Makefile) -AC_CONFIG_FILES(autoconf/Doxyfile) -AC_CONFIG_FILES(doc/Makefile) -AC_CONFIG_FILES(source/version.c) -AC_CONFIG_FILES(include/cloog/version.h) -AC_CONFIG_FILES([genversion.sh], [chmod +x genversion.sh]) -AC_CONFIG_COMMANDS([version.h], - [echo '#define CLOOG_HEAD "'`./genversion.sh`'"' > version.h]) -AC_CONFIG_COMMANDS([doc/gitversion.texi], - [echo '@set VERSION '`./genversion.sh`'' > doc/gitversion.texi]) -if test $with_isl = bundled; then - AC_CONFIG_SUBDIRS(isl) -fi -if test $with_osl = bundled; then - AC_CONFIG_SUBDIRS(osl) -fi -AC_CONFIG_COMMANDS_POST([ - ac_configure_args="$ac_configure_args $cloog_configure_args" -]) -AC_OUTPUT - - -echo " /*-----------------------------------------------*" -echo " * CLooG configuration is OK *" -echo " *-----------------------------------------------*/" -echo "It appears that your system is OK to start CLooG compilation. You need" -echo "now to type \"make\". After compilation, you should check CLooG by typing" -echo "\"make check\". If no problem occur, you can type \"make uninstall\" if" -echo "you are upgrading an old version. Lastly type \"make install\" to install" -echo "CLooG on your system (log as root if necessary)." diff --git a/cloog-0.17.0/doc/Makefile.am b/cloog-0.17.0/doc/Makefile.am deleted file mode 100644 index 160dfd11d0d7d17690164b7cfe8785551f1ffb96..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -if HAVE_TEXI2DVI -cloog.pdf: cloog.texi gitversion.texi - $(TEXI2DVI) --pdf $< -endif - -gitversion.texi: @GIT_INDEX@ - echo '@set VERSION '`$(top_builddir)/genversion.sh`'' > $@ diff --git a/cloog-0.17.0/doc/Makefile.in b/cloog-0.17.0/doc/Makefile.in deleted file mode 100644 index 7eae5d68d02a217b9a7266308f1a0621245cf562..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/Makefile.in +++ /dev/null @@ -1,387 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITS = @BITS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CFLAGS_WARN = @CFLAGS_WARN@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_INDEX = @GIT_INDEX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -ISL_CPPFLAGS = @ISL_CPPFLAGS@ -ISL_LDFLAGS = @ISL_LDFLAGS@ -ISL_LIBS = @ISL_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OSL_CPPFLAGS = @OSL_CPPFLAGS@ -OSL_LDFLAGS = @OSL_LDFLAGS@ -OSL_LIBS = @OSL_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TEXI2DVI = @TEXI2DVI@ -VERSION = @VERSION@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_REVISION = @VERSION_REVISION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - -@HAVE_TEXI2DVI_TRUE@cloog.pdf: cloog.texi gitversion.texi -@HAVE_TEXI2DVI_TRUE@ $(TEXI2DVI) --pdf $< - -gitversion.texi: @GIT_INDEX@ - echo '@set VERSION '`$(top_builddir)/genversion.sh`'' > $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/doc/TODO b/cloog-0.17.0/doc/TODO deleted file mode 100644 index 152c82d32d31bbe5f83b1c0f6e299da2b9d57d87..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/TODO +++ /dev/null @@ -1,58 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** The Chunky Loop Generator ** -# **-------------------------------------------------------------------** -# ** First version of this file: april 29th 2005 ** -# **-------------------------------------------------------------------**/ -# - -This file is mainly for the authors, in order to put ideas, requests, and -work-in-progress notes. - -# **-------------------------------------------------------------------** -# ** I. Requested features ** -# **-------------------------------------------------------------------**/ - -1. GMP !!! (LooPo Team). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -2. Set the statement prefix (Michael Classen). - -3. Do not fuse the iterators/scattering dimension names lists (Hadda Cheroun). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -4. Exploit URUK transformation properties (WRAP-IT Team). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - - -# **-------------------------------------------------------------------** -# ** II. Known bugs ** -# **-------------------------------------------------------------------**/ - -1. Lead to segfault : -cloog ./test/daegon_lu_osp.cloog -f 3 -l 6 -nobacktrack -override -(while every other -l values do not !) -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -2. -strides gives bad result for a dreamup or interpolation-duration file in -test/non_optimal (I don't remember which one) - -3. Various configure problems (check Sylvain Girbal mails in the mailbox !). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -4. With GMP, try test/emploi.cloog (with valgrind): a memory leak... -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -5. With GMP, option -cpp do not write all the statement internal stuff -(e.g., S1(,,) ; instead of S1(i,j,k) ;). -DOOOOOOOOOOOOOOOOOOOOOOOOONE !!!!!!!!!!!!!!!!! - -# **-------------------------------------------------------------------** -# ** III. Various notes ** -# **-------------------------------------------------------------------**/ - -Kill the cat. - - diff --git a/cloog-0.17.0/doc/cloog.pdf b/cloog-0.17.0/doc/cloog.pdf deleted file mode 100644 index af0750fc99f2b75032dd08c3e7c88008719af21e..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/doc/cloog.pdf and /dev/null differ diff --git a/cloog-0.17.0/doc/cloog.texi b/cloog-0.17.0/doc/cloog.texi deleted file mode 100644 index 4dd2f7aad86f56ca99e6c3fc606b1ef4c1518911..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/cloog.texi +++ /dev/null @@ -1,2571 +0,0 @@ -\input texinfo -@c % -@c % /**-----------------------------------------------------------------** -@c % ** CLooG ** -@c % **-----------------------------------------------------------------** -@c % ** cloog.texi ** -@c % **-----------------------------------------------------------------** -@c % ** First version: july 6th 2002 ** -@c % **-----------------------------------------------------------------**/ -@c % -@c % release 1.0: September 17th 2002 -@c % release 1.1: December 5th 2002 -@c % release 1.2: April 22th 2003 -@c % release 2.0: November 21th 2005 (and now in texinfo instead of LaTeX) -@c % release 2.1: October 15th 2007 -@c % -@c %/************************************************************************** -@c % * CLooG : the Chunky Loop Generator (experimental) * -@c % **************************************************************************/ -@c %/* CAUTION: the English used is probably the worst you ever read, please -@c % * feel free to correct and improve it ! -@c % */ - -@c %\textit{"I found the ultimate transformation functions, optimization for -@c %static control programs is now a closed problem, I have \textnormal{just} -@c %to generate the target code !"} - - - -@c % /************************************************************************* -@c % * PART I: HEADER * -@c % *************************************************************************/ -@c %**start of header -@setfilename cloog.info -@settitle CLooG - a loop generator for scanning polyhedra - -@set EDITION 2.1 -@include gitversion.texi -@set UPDATED October 15th 2007 -@setchapternewpage odd - -@c %**end of header - -@c % /************************************************************************* -@c % * PART II: SUMMARY DESCRIPTION AND COPYRIGHT * -@c % *************************************************************************/ - -@copying -This manual is for CLooG version @value{VERSION}, a software -which generates loops for scanning Z-polyhedra. That is, CLooG produces a -code visiting each integral point of a union of parametrized -polyhedra. CLooG is designed to avoid control overhead and to produce a very -efficient code. - -It would be quite kind to refer the following paper in any publication that -results from the use of the CLooG software or its library: - -@example -@@InProceedings@{Bas04, -@ @ author =@ @ @ @ @{C. Bastoul@}, -@ @ title =@ @ @ @ @ @{Code Generation in the Polyhedral Model -@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Is Easier Than You Think@}, -@ @ booktitle = @{PACT'13 IEEE International Conference on -@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Parallel Architecture and Compilation Techniques@}, -@ @ year =@ @ @ @ @ @ 2004, -@ @ pages =@ @ @ @ @ @{7--16@}, -@ @ month =@ @ @ @ @ @{september@}, -@ @ address =@ @ @ @{Juan-les-Pins@} -@} -@end example - -Copyright @copyright{} 2002-2005 C@'edric Bastoul. - -@c quotation -Permission is granted to copy, distribute and/or modify this document under -the terms of the GNU Free Documentation License, Version 1.2 -published by the Free Software Foundation. To receive a copy of the -GNU Free Documentation License, write to the Free Software Foundation, Inc., -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -@c end quotation -@end copying - -@c % /************************************************************************* -@c % * PART III: TITLEPAGE, CONTENTS, COPYRIGHT * -@c % *************************************************************************/ -@titlepage -@title CLooG -@subtitle A Loop Generator For Scanning Polyhedra -@subtitle Edition @value{EDITION}, for CLooG @value{VERSION} -@subtitle @value{UPDATED} -@author C@'edric Bastoul - -@c The following two commands start the copyright page. -@page -@noindent (September 2001) -@table @code -@item C@'edric Bastoul -SCHEDULES GENERATE !!! I just need to apply them now, where can I find -a good code generator ?! - -@item Paul Feautrier -Hmmm. I fear that if you want something powerful enough, you'll have to -write it yourself ! -@end table - -@vskip 0pt plus 1filll -@insertcopying -@end titlepage - -@c Output the table of contents at the beginning. -@contents - -@c % /************************************************************************* -@c % * PART IV: TOP NODE AND MASTER MENU * -@c % *************************************************************************/ -@ifnottex -@node Top -@top CLooG - -@insertcopying -@end ifnottex - -@menu -* Introduction:: -* CLooG Software:: -* CLooG Library:: -@c * Hacking:: -* Installing:: -* Documentation:: -* References:: -@end menu - - - -@c % /************************************************************************* -@c % * PART V: BODY OF THE DOCUMENT * -@c % *************************************************************************/ - -@c % ****************************** INTRODUCTION ****************************** -@node Introduction -@chapter Introduction -CLooG is a free software and library generating loops for scanning Z-polyhedra. -That is, it finds a code (e.g. in C, FORTRAN...) that reaches each integral -point of one or more parameterized polyhedra. CLooG has been originally -written to solve the code generation problem for optimizing compilers based on -the polytope model. Nevertheless it is used now in various area, e.g., to build -control automata for high-level synthesis or to find the best polynomial -approximation of a function. CLooG may help in any situation where scanning -polyhedra matters. It uses the best state-of-the-art code generation -algorithm known as the Quiller@'e et al. algorithm (@pxref{Qui00}) -with our own improvements and extensions (@pxref{Bas04}). -The user has full control on generated code quality. -On one hand, generated code size has to be tuned for sake of -readability or instruction cache use. On the other hand, we must ensure that -a bad control management does not hamper performance of the generated code, -for instance by producing redundant guards or complex loop bounds. -CLooG is specially designed to avoid control overhead and to produce a very -efficient code. - -CLooG stands for @emph{Chunky Loop Generator}: it is a part of the Chunky -project, a research tool for data locality improvement (@pxref{Bas03a}). -It is designed -also to be the back-end of automatic parallelizers like LooPo (@pxref{Gri04}). -Thus it is very -compilable code oriented and provides powerful program transformation -facilities. Mainly, it allows the user to specify very general schedules where, -e.g., unimodularity or invertibility of the transformation doesn't matter. - -The current version is still under -evaluation, and there is no guarantee that the upward compatibility -will be respected (but the previous API has been stable for two years, -we hope this one will be as successful -and we believe it-). -A lot of reports are necessary to freeze the library -API and the input file shape. Most API changes from 0.12.x to 0.14.x -have been requested by the users themselves. -Thus you are very welcome and encouraged -to post reports on bugs, wishes, critics, comments, suggestions or -successful experiences in the forum of @code{http://www.CLooG.org} -or to send them to cedric.bastoul@@inria.fr directly. - -@menu -* Basics:: -* Scattering:: -@end menu - -@node Basics -@section Basically, what's the point ? -If you want to use CLooG, this is because you want to scan or to find -something inside the integral points of a set of polyhedra. There are many -reasons for that. Maybe you need the generated code itself because it -actually implements a very smart program transformation you found. -Maybe you want to use the generated code -because you know that the solution of your problem belongs to the integral -points of those damned polyhedra and you don't know which one. Maybe you just -want to know if a polyhedron has integral points depending on some parameters, -which is the lexicographic minimum, maximum, the third on the basis of the -left etc. Probably you have your own reasons to use CLooG. - -Let us illustrate a basic use of CLooG. Suppose we have a set of affine -constraints that describes a part of a whatever-dimensional space, -called a @strong{domain}, and we -want to scan it. Let us consider for instance the following set of constraints -where @samp{i} -and @samp{j} are the unknown (the two dimensions of the space) and -@samp{m} and @samp{n} are the parameters (some symbolic constants): -@example -@group -2<=i<=n -2<=j<=m -j<=n+2-i -@end group -@end example -Let us also consider that we have a partial knowledge of the parameter values, -called the @strong{context}, expressed as affine constraints as well, -for instance: -@example -@group -m>=2 -n>=2 -@end group -@end example -Note that using parameters is optional, if you are not comfortable with -parameter manipulation, just replace them with any scalar value that fits -@code{m>=2} and @code{n>=2}. -A graphical representation of this part of the 2-dimensional space, where -the integral points are represented using heavy dots would be for instance: - -@image{images/basic,6cm} - -The affine constraints of both the domain and the context are what we will -provide to CLooG as input (in a particular shape that will be described later). -The output of CLooG is a pseudo-code to scan the integral points of the -input domain according to the context: -@example -@group -for (i=2;i<=n;i++) @{ - for (j=2;j<=min(m,-i+n+2);j++) @{ - S1(i,j) ; - @} -@} -@end group -@end example -If you felt such a basic example is yet interesting, there is a good chance -that CLooG is appropriate for you. CLooG can do much more: scanning several -polyhedra or unions of polyhedra at the same time, applying general affine -transformations to the polyhedra, generate compilable code etc. Welcome -to the CLooG's user's guide ! - -@node Scattering -@section Defining a Scanning Order: Scattering Functions -In CLooG, domains only define the set of integral points to scan and their -coordinates. In particular, CLooG is free to choose the scanning order for -generating the most efficient code. This means, for optimizing/parallelizing -compiler people, that CLooG doesn't make any speculation on dependences on and -between statements (by the way, it's not its job !). -For instance, if an user give to -CLooG only two domains @code{S1:1<=i<=n}, @code{S2:1<=i<=n} and the context -@code{n>=1}, the following pseudo-codes are considered to be equivalent: - -@example -@group -/* A convenient target pseudo-code. */ -for (i=1;i<=N;i++) @{ - S1(i) ; -@} -for (i=1;i<=N;i++) @{ - S2(i) ; -@} -@end group -@end example - -@example -@group -/* Another convenient target pseudo-code. */ -for (i=1;i<=N;i++) @{ - S1(i) ; - S2(i) ; -@} -@end group -@end example - -The default behaviour -of CLooG is to generate the second one, since it is optimized in control. -It is right if there are no data dependences -between @code{S1} and @code{S2}, but wrong otherwise. - -Thus it is often useful to force scanning to respect a given order. This can be -done in CLooG by using @strong{scattering functions}. Scattering is a -shortcut for scheduling, allocation, chunking functions and the like we can -find in the restructuring compilation literature. There are a lot of reasons -to scatter the integral points of the domains (i.e. the statement instances -of a program, for compilation people), parallelization or optimization are good -examples. For instance, if the user wants for any reason to set some -precedence constraints between the statements of our example above -in order to force the generation of the -first code, he can do it easily by setting (for example) the following -scheduling functions: - -@tex -$$\theta _{S1}(i) = (1)$$ -$$\theta _{S2}(j) = (2)$$ -@end tex - -@ifnottex -@example -@group -T_S1(i) = (1) -T_S2(j) = (2) -@end group -@end example -@end ifnottex - -This scattering means that each integral point of the domain @code{S1} -is scanned at logical date @code{1} while each integral point of the domain -@code{S2} is scanned at logical date @code{2}. As a result, the whole -domain @code{S1} is scanned before domain @code{S2} and the first code in our -example is generated. - -The user can set every kind of affine scanning order thanks to the -scattering functions. Each domain has its own scattering function and -each scattering function may be multi-dimensional. A multi-dimensional logical -date may be seen as classical date (year,month,day,hour,minute,etc.) where -the first dimensions are the most significant. Each scattering dimension -may depend linearly on the original dimensions (e.g., @code{i}), the -parameters (e.g., @code{n}) ans scalars (e.g., @code{2}). - -A very useful example of multi-dimensional scattering functions is, for -compilation people, the scheduling of the original program. -The basic data to use for code generation are statement iteration domains. -As we saw, these data are not sufficient to rebuild the original -program (what is the ordering between instances of different statements ?). -The missing data can be put in the scattering functions as the original -scheduling. The method to compute it is quite simple (@pxref{Fea92}). The idea is to -build an abstract syntax tree of the program and to read the scheduling for -each statement. For instance, let us consider the following implementation of -a Cholesky factorization: - -@example -@group -/* A Cholesky factorization kernel. */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=i-1;j++) @{ - a[i][i] -= a[i][j] ; /* S1 */ - @} - a[i][i] = sqrt(a[i][i]) ; /* S2 */ - for (j=i+1;j<=N;j++) @{ - for (k=1;k<=i-1;k++) @{ - a[j][i] -= a[j][k]*a[i][k] ; /* S3 */ - @} - a[j][i] /= a[i][i] ; /* S4 */ - @} - @} -@} -@end group -@end example - -The corresponding abstract syntax tree is given in the following figure. -It directly gives the scattering functions (schedules) for all the -statements of the program. - -@image{images/tree,6cm} - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (0,i,0,j,0)^T$\cr - \theta _{S2}(i) &$= (0,i,1)^T$\cr - \theta _{S3}(i,j,k)^T &$= (0,i,2,j,0,k,0)^T$\cr - \theta _{S4}(i,j)^T &$= (0,i,2,j,1)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (0,i,0,j,0)^T -T_S2(i) = (0,i,1)^T -T_S3(i,j,k)^T = (0,i,2,j,0,k,0)^T -T_S4(i,j)^T = (0,i,2,j,1)^T -@end group -@end example -@end ifnottex - -These schedules depend on the iterators and give for each instance of each -statement a unique execution date. Using such scattering functions allow -CLooG to re-generate the input code. - - - - - -@c % ***********************Using the CLooG Software ************************** -@node CLooG Software -@chapter Using the CLooG Software - - -@menu -* A First Example:: -* Writing The Input File:: -* Calling CLooG:: -* CLooG Options:: -* Full Example:: -@end menu - -@c %/************************************************************************* -@c % * A FIRST EXAMPLE * -@c % *************************************************************************/ -@node A First Example -@section A First Example -CLooG takes as input a file that must be written accordingly to a grammar -described in depth in a further section (@pxref{Writing The Input File}). -Moreover it supports many options to tune the target code presentation or -quality as discussed in a dedicated section (@pxref{Calling CLooG}). -However, a basic use -of CLooG is not very complex and we present in this section how to generate the -code corresponding to a basic example discussed earlier (@pxref{Basics}). - -The problem is to find the code that scans a 2-dimensional polyhedron -where @samp{i} and @samp{j} are the unknown (the two dimensions of the space) -and @samp{m} and @samp{n} are the parameters (the symbolic constants), -defined by the following set of constraints: -@example -@group -2<=i<=n -2<=j<=m -j<=n+2-i -@end group -@end example -@noindent We also consider a partial knowledge of the parameter values, -expressed thanks to the following affine constraints: -@example -@group -m>=2 -n>=2 -@end group -@end example - -An input file that corresponds to this problem, and asks for a generated -code in C, may be the following. Note that we do not describe here precisely -the structure and the components of this file (@pxref{Writing The Input File} - for such information, if you feel it necessary): - -@example -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (constraints on two parameters) -2 4 # 2 lines and 4 columns -# eq/in m n 1 eq/in: 1 for inequality >=0, 0 for equality =0 - 1 1 0 -2 # 1*m + 0*n -2*1 >= 0, i.e. m>=2 - 1 0 1 -2 # 0*m + 1*n -2*1 >= 0, i.e. n>=2 - -1 # We want to set manually the parameter names -m n # parameter names - -# --------------------- STATEMENTS -------------------- -1 # Number of statements - -1 # First statement: one domain -# First domain -5 6 # 5 lines and 6 columns -# eq/in i j m n 1 - 1 1 0 0 0 -2 # i >= 2 - 1 -1 0 0 1 0 # i <= n - 1 0 1 0 0 -2 # j >= 2 - 1 0 -1 1 0 0 # j <= m - 1 -1 -1 0 1 2 # n+2-i>=j -0 0 0 # for future options - -1 # We want to set manually the iterator names -i j # iterator names - -# --------------------- SCATTERING -------------------- -0 # No scattering functions -@end example - -This file may be called @samp{basic.cloog} -(this example is provided in the CLooG distribution as -@code{test/manual_basic.cloog}) and we can ask CLooG to process it -and to generate the code by a simple calling to CLooG with this file as input: -@samp{cloog basic.cloog}. By default, CLooG will print the generated code in -the standard output: - -@example -@group -/* Generated by CLooG v@value{VERSION} in 0.00s. */ -for (i=2;i<=n;i++) @{ - for (j=2;j<=min(m,-i+n+2);j++) @{ - S1(i,j) ; - @} -@} -@end group -@end example - -@c %/************************************************************************* -@c % * Input file * -@c % *************************************************************************/ -@node Writing The Input File -@section Writing The Input File -The input text file contains a problem description, i.e. the context, -the domains and the scattering functions. -Because CLooG is very 'compilable code generation oriented', we can associate -some additional informations to each domain. We call this association a -@emph{statement}. The set of all informations is -called a @emph{program}. The input file respects the grammar below -(terminals are preceded by "_"): - -@example -File ::= Program -Program ::= Context Statements Scattering -Context ::= Language Domain_union Naming -Statements ::= Nb_statements Statement_list Naming -Scatterings ::= Nb_functions Scattering_list Naming -Naming ::= Option Name_list -Name_list ::= _String Name_list | (void) -Statement_list ::= Statement Statement_list | (void) -Domain_list ::= _Domain Domain_list | (void) -Scattering_list ::= Domain_union Scattering_list | (void) -Statement ::= Iteration_domain 0 0 0 -Iteration_domain ::= Domain_union -Domain_union ::= Nb_domains Domain_list -Option ::= 0 | 1 -Language ::= c | f -Nb_statements ::= _Integer -Nb_domains ::= _Integer -Nb_functions ::= _Integer -@end example - -Note: if there is only one domain in a @samp{Domain_union}, -i.e., if @samp{Nb_domains} is 1, then this 1 may be omitted. - -@itemize @bullet -@item @samp{Context} represents the informations that are - shared by all the statements. It consists on - the language used (which can be @samp{c} for C or @samp{f} for FORTRAN 90) - and the global constraints on parameters. - These constraints are essential - since they give to CLooG the number of parameters. If there is no - parameter or no constraints on parameters, just give a constraint - always satisfied like @math{1 \geq 0}. @samp{Naming} sets the parameter - names. - If the naming option @samp{Option} is 1, parameter names will be read - on the next line. There must be exactly as many names as parameters. - If the naming option @samp{Option} is 0, parameter names are - automatically generated. The name of the first parameter will - be @samp{M}, and the name of the @math{(n+1)^{th}} parameter directly - follows the name of the @math{n^{th}} parameter in ASCII code. - It is the user responsibility to ensure that parameter names, - iterators and scattering dimension names are different. -@item @samp{Statements} represents the informations on the statements. - @samp{Nb_statements} is the number of statements in the program, - i.e. the number of @samp{Statement} items in the @samp{Statement_list}. - @samp{Statement} represents the informations on a given statement. - To each statement is associated a domain - (the statement iteration domain: @samp{Iteration_domain}) and three - zeroes that represents future options. - @samp{Naming} sets the iterator names. If the naming option - @samp{Option} is 1, the iterator names - will be read on the next line. There must be exactly as many names as - nesting level in the deepest iteration domain. If the naming option - @samp{Option} is 0, iterator names are automatically generated. - The iterator name of the outermost loop will be @samp{i}, and the - iterator name of the loop at level @math{n+1} directly follows the - iterator name of the loop at level @math{n} in ASCII code. -@item @samp{Scatterings} represents the informations on scattering functions. - @samp{Nb_functions} is the number of functions (it must be - equal to the number of statements or 0 if there is no scattering - function). The functions themselves are represented through - @samp{Scattering_list}. - @samp{Naming} sets the scattering dimension names. If the naming option - @samp{Option} is 1, the scattering dimension names will be read on the - next line. - There must be exactly as many names as scattering dimensions. If the - naming option @samp{Option} is 0, scattering dimension names are automatically - generated. The name of the @math{n^{th}} scattering dimension - will be @samp{cn}. -@end itemize - -@menu -* Domain Representation:: -* Scattering Representation:: -@end menu - -@node Domain Representation -@subsection Domain Representation -As shown by the grammar, the input file describes the various informations -thanks to characters, integers and domains. Each domain is defined by a set of -constraints in the PolyLib format (@pxref{Wil93}). They have the -following syntax: -@enumerate -@item some optional comment lines beginning with @samp{#}, -@item the row and column numbers, possibly followed by comments, -@item the constraint rows, each row corresponds to a constraint the - domain have to satisfy. Each row must be on a single line and is possibly - followed by comments. The constraint is an equality @math{p(x) = 0} if the - first element is 0, an inequality @math{p(x) \geq 0} if the first element - is 1. The next elements are the unknown coefficients, followed by - the parameter coefficients. The last element is the constant factor. -@end enumerate -For instance, assuming that @samp{i}, @samp{j} and @samp{k} are iterators and -@samp{m} and @samp{n} are parameters, the domain defined by the following -constraints : - -@tex -$$ -\hbox{$ \cases{ -i + m &$\geq 0$\cr - -j + n &$\geq 0$\cr - i + j - k &$\geq 0$}$} -$$ -@end tex - -@ifnottex -@example -@group - -i + m >= 0 - -j + n >= 0 -i + j - k >= 0 -@end group -@end example -@end ifnottex - -@noindent can be written in the input file as follows : - -@example -@group -# This is the domain -3 7 # 3 lines and 7 columns -# eq/in i j k m n 1 - 1 -1 0 0 1 0 0 # -i + m >= 0 - 1 0 -1 0 0 1 0 # -j + n >= 0 - 1 1 1 -1 0 0 0 # i + j - k >= 0 -@end group -@end example - -Each iteration domain @samp{Iteration_domain} of a given statement -is a union of polyhedra -@samp{Domain_union}. A union is defined by its number of elements -@samp{Nb_domains} and the elements themselves @samp{Domain_list}. -For instance, let us consider the following pseudo-code: - -@example -@group -for (i=1;i<=n;i++) @{ - if ((i >= m) || (i <= 2*m)) - S1 ; - for (j=i+1;j<=m;j++) - S2 ; -@} -@end group -@end example - -@noindent The iteration domain of @samp{S1} can be divided into two -polyhedra and written in the input file as follows: - -@example -@group -2 # Number of polyhedra in the union -# First domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 1 -1 0 0 # i >= m -# Second domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 -1 2 0 0 # i <= 2*m -@end group -@end example - -@node Scattering Representation -@subsection Scattering Function Representation -Scattering functions are depicted in the input file thanks a representation -very close to the domain one. -An integer gives the number of functions @samp{Nb_functions} and each function -is represented by a domain. Each line of the domain corresponds to an equality -defining a dimension of the function. Note that at present -(CLooG @value{VERSION}) -@strong{all functions must have the same scattering dimension number}. If a -user wants to set scattering functions with different dimensionality, he has -to complete the smaller one with zeroes to reach the maximum dimensionality. -For instance, let us consider the following code and -scheduling functions: - -@example -@group -for (i=1;i<=n;i++) @{ - if ((i >= m) || (i <= 2*m)) - S1 ; - for (j=i+1;j<=m;j++) - S2 ; -@} -@end group -@end example - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i) &$= (i,0)^T$\cr - \theta _{S2}(i,j)^T &$= (n,i+j)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i) = (i,0)^T -T_S2(i,j)^T = (n,i+j)^T -@end group -@end example -@end ifnottex - - -@noindent This scheduling can be written in the input file as follows: - -@example -@group -2 # Number of scattering functions -# First function -2 7 # 2 lines and 7 columns -# eq/in c1 c2 i m n 1 - 0 1 0 -1 0 0 0 # c1 = i - 0 0 1 0 0 0 0 # c2 = 0 -# Second function -2 8 # 2 lines and 8 columns -# eq/in c1 c2 i j m n 1 - 0 1 0 0 0 0 -1 0 # c1 = n - 0 0 1 -1 -1 0 0 0 # c2 = i+j -@end group -@end example -The complete input file for the user who wants to generate the code for this -example with the preceding scheduling would be -(this file is provided in the CLooG distribution -as @code{test/manual_scattering.cloog}: - -@example -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no constraints on two parameters) -1 4 # 1 lines and 4 columns -# eq/in m n 1 - 1 0 0 0 # 0 >= 0, always true - -1 # We want to set manually the parameter names -m n # parameter names - -# --------------------- STATEMENTS -------------------- -2 # Number of statements - -2 # First statement: two domains -# First domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 1 -1 0 0 # i >= m -# Second domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= n - 1 -1 2 0 0 # i <= 2*m -0 0 0 # for future options - -1 # Second statement: one domain -4 6 # 4 lines and 6 columns -# eq/in i j m n 1 - 1 1 0 0 0 -1 # i >= 1 - 1 -1 0 0 1 0 # i <= n - 1 -1 1 0 0 -1 # j >= i+1 - 1 0 -1 1 0 0 # j <= m -0 0 0 # for future options - -1 # We want to set manually the iterator names -i j # iterator names - -# --------------------- SCATTERING -------------------- -2 # Scattering functions -# First function -2 7 # 2 lines and 7 columns -# eq/in p1 p2 i m n 1 - 0 1 0 -1 0 0 0 # p1 = i - 0 0 1 0 0 0 0 # p2 = 0 -# Second function -2 8 # 2 lines and 8 columns -# eq/in p1 p2 i j m n 1 - 0 1 0 0 0 0 -1 0 # p1 = n - 0 0 1 -1 -1 0 0 0 # p2 = i+j - -1 # We want to set manually the scattering dimension names -p1 p2 # scattering dimension names -@end example - - -@c %/************************************************************************* -@c % * Calling CLooG * -@c % *************************************************************************/ -@node Calling CLooG -@section Calling CLooG -CLooG is called by the following command: -@example - cloog [ options | file ] -@end example -The default behavior of CLooG is to read the input informations from a file and -to print the generated code or pseudo-code on the standard output. -CLooG's behavior and the output code shape is under the user control thanks -to many options which are detailed a further section (@pxref{CLooG Options}). -@code{file} is the input file. @code{stdin} is a special value: when used, -input is standard input. For instance, we can call CLooG to treat the -input file @code{basic.cloog} with default options by typing: -@code{cloog basic.cloog} or @code{more basic.cloog | cloog stdin}. - -@c %/************************************************************************* -@c % * CLooG Options * -@c % *************************************************************************/ -@node CLooG Options -@section CLooG Options - -@menu -* Last Depth to Optimize Control:: -* First Depth to Optimize Control:: -* Simplify Convex Hull:: -* Once Time Loop Elimination:: -* Equality Spreading:: -* First Level for Spreading:: -* Statement Block:: -* Loop Strides:: -* Unrolling:: -* Compilable Code:: -* Output:: -* OpenScop:: -* Help:: -* Version :: -* Quiet :: -@end menu - -@node Last Depth to Optimize Control -@subsection Last Depth to Optimize Control @code{-l } - -@code{-l }: this option sets the last loop depth to be optimized in -control. The higher this depth, the less control overhead. -For instance, with some input file, a user can generate -different pseudo-codes with different @code{depth} values as shown below. -@example -@group -/* Generated using a given input file and @strong{option -l 1} */ -for (i=0;i<=M;i++) @{ - S1 ; - for (j=0;j<=N;j++) @{ - S2 ; - @} - for (j=0;j<=N;j++) @{ - S3 ; - @} - S4 ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -l 2} */ -for (i=0;i<=M;i++) @{ - S1 ; - for (j=0;j<=N;j++) @{ - S2 ; - S3 ; - @} - S4 ; -@} -@end group -@end example - In this example we can see that this option can change the operation - execution order between statements. Let us remind that CLooG does not - make any speculation on dependences between statements - (@pxref{Scattering}). Thus if nothing (i.e. scattering functions) - forbids this, CLooG considers the above codes to be equivalent. - If there is no scattering functions, the minimum value for @code{depth} - is 1 (in the case of 0, the user doesn't really need a loop generator !), - and the number of scattering dimensions otherwise (CLooG will warn the - user if he doesn't respect such constraint). - The maximum value for depth is -1 (infinity). - Default value is infinity. - -@node First Depth to Optimize Control -@subsection First Depth to Optimize Control @code{-f } - - @code{-f }: this option sets the first loop depth to be optimized - in control. The lower this depth, the less control overhead (and the longer - the generated code). For instance, with some input file, a user - can generate different pseudo-codes with different @code{depth} values - as shown below. - The minimum value for @code{depth} is 1, and the - maximum value is -1 (infinity). - Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -f 3} */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=M;j++) @{ - S1 ; - if (j >= 10) @{ - S2 ; - @} - @} -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -f 2} */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=9;j++) @{ - S1 ; - @} - for (j=10;j<=M;j++) @{ - S1 ; - S2 ; - @} -@} -@end group -@end example - -@node Simple Convex Hull -@subsection Simple Convex Hull @code{-sh } - - @code{-sh }: this option enables (@code{boolean=1}) - or forbids (@code{boolean=0}) the use of an overapproximation - of the convex hull that may be easier to compute - (especially in the isl backend) and that may result in - simpler bounds. - This option works only for generated code without - code duplication (it means, you have to tune @code{-f} and - @code{-l} options first to generate only a loop nest with internal - guards). For instance, with the input file @code{test/union.cloog}, a user - can generate different pseudo-codes as shown below. - Default value is 0. -@example -@group -/* Generated using test/union.cloog and @strong{option -f -1 -l 2 -override} */ -for (i=0;i<=11;i++) @{ - for (j=max(0,5*i-50);j<=min(15,5*i+10);j++) @{ - if ((i <= 10) && (j <= 10)) @{ - S1 ; - @} - if ((i >= 1) && (j >= 5)) @{ - S2 ; - @} - @} -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -sh 1 -f -1 -l 2 -override} */ -for (i=0;i<=11;i++) @{ - for (j=0;j<=15;j++) @{ - if ((i <= 10) && (j <= 10)) @{ - S1 ; - @} - if ((i >= 1) && (j >= 5)) @{ - S2 ; - @} - @} -@} -@end group -@end example - -@node Once Time Loop Elimination -@subsection Once Time Loop Elimination @code{-otl } - - @code{-otl }: this option allows (@code{boolean=1}) or - forbids (@code{boolean=0}) the simplification of loops running - once. Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -otl 0} */ -for (j=i+1;j<=i+1;j++) @{ - S1 ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -otl 1} */ -j = i+1 ; -S1 ; -@end group -@end example - - -@node Equality Spreading -@subsection Equality Spreading @code{-esp } - - @code{-esp }: this option allows (@code{boolean=1}) or - forbids (@code{boolean=0}) values spreading when there - are equalities. Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -esp 0} */ -i = M+2 ; -j = N ; -for (k=i;k<=j+M;k++) @{ - S1 ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -esp 1} */ -for (k=M+2;k<=N+M;k++) @{ - S1(i = M+2, j = N) ; -@} -@end group -@end example - - -@node First Level for Spreading -@subsection First Level for Spreading @code{-fsp } - - @code{-fsp }: it can be useful to set a - first level to begin equality spreading. Particularly when using - scattering functions, the user may want to see the scattering dimension - values instead of spreading or hiding them. If user has set a - spreading, @code{level} is - the first level to start it. Default value is 1. -@example -@group -/* Generated using a given input file and @strong{option -fsp 1} */ -for (j=0;j<=N+M;j++) @{ - S1(i = N) ; -@} -for (j=0;j<=N+M;j++) @{ - S1(i = M) ; -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -fsp 2} */ -c1 = N ; -for (j=0;j<=c1+M;j++) @{ - S1(i = c1) ; -@} -c1 = M ; -for (j=0;j<=N+c1;j++) @{ - S1(i = c1) ; -@} -@end group -@end example - - -@node Statement Block -@subsection Statement Block @code{-block } - - @code{-block }: this option allows (@code{boolean=1}) to - create a statement block for each new iterator, even if there is only - an equality. This can be useful in order to parse the generated - pseudo-code. When @code{boolean} is set to 0 or when the generation - language is FORTRAN, this feature is disabled. Default value is 0. -@example -@group -/* Generated using a given input file and @strong{option -block 0} */ -i = M+2 ; -j = N ; -S1 ; -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -block 1} */ -@{ i = M+2 ; - @{ j = N ; - S1 ; - @} -@} -@end group -@end example - - -@node Loop Strides -@subsection Loop Strides @code{-strides } - - @code{-strides }: this options allows (@code{boolean=1}) to - handle non-unit strides for loop increments. This can remove a lot of - guards and make the generated code more efficient. Default value is 0. -@example -@group -/* Generated using a given input file and @strong{option -strides 0} */ -for (i=1;i<=n;i++) @{ - if (i%2 == 0) @{ - S1(j = i/2) ; - @} - if (i%4 == 0) @{ - S2(j = i/4) ; - @} -@} -@end group -@end example -@example -@group -/* Generated using the same input file but @strong{option -strides 1} */ -for (i=2;i<=n;i+=2) @{ - S1(j = i/2) ; - if (i%4 == 0) @{ - S2(j = i/4) ; - @} -@} -@end group -@end example - - -@node Unrolling -@subsection First Depth to Unroll @code{-first-unroll } - - @code{-first-unroll }: this option sets the first loop depth - to unroll. Note that a loop is only unrolled when it is supported - by the backend. In case of the isl backend, a loop is unrolled - if it has a lower bound that can only be incremented - a fixed (non-parametric) amount of times. - - -@node Compilable Code -@subsection Compilable Code @code{-compilable } - - @code{-compilable }: this options allows (@code{value} is not 0) - to generate a compilable code where all parameters have the integral value - @code{value}. This option creates a macro for each statement. Since - CLooG do not know anything about the statement sources, it fills the - macros with a basic increment that computes the total number of - scanned integral points. The user may change easily the macros according - to his own needs. This option is possible only if the generated code is - in C. Default value is 0. -@example -@group -/* Generated using a given input file and @strong{option -compilable 0} */ -for (i=0;i<=n;i++) @{ - for (j=0;j<=n;j++) @{ - S1 ; - S2 ; - @} - S3 ; -@} -@end group -@end example -@example -/* Generated using the same input file but @strong{option -compilable 10} */ -/* DON'T FORGET TO USE -lm OPTION TO COMPILE. */ - -/* Useful headers. */ -#include -#include -#include - -/* Parameter value. */ -#define PARVAL 10 - -/* Statement macros (please set). */ -#define S1(i,j) @{total++;@} -#define S2(i,j) @{total++;@} -#define S3(i) @{total++;@} - -int main() @{ - /* Original iterators. */ - int i, j ; - /* Parameters. */ - int n=PARVAL, total=0 ; - - for (i=0;i<=n;i++) @{ - for (j=0;j<=n;j++) @{ - S1(i,j) ; - S2(i,j) ; - @} - S3(i) ; - @} - - printf("Number of integral points: %d.\n",total) ; - return 0 ; -@} -@end example - -@node Callable Code -@subsection Callable Code @code{-callable } - - @code{-callable }: if @code{boolean=1}, then a @code{test} - function will be generated that has the parameters as arguments. - Similarly to the @code{-compilable} option, - a macro for each statement is generated. The generated definitions of - these macros are as used during the correctness testing, but they - can easily be changed by the user to suit her own needs. - This option is only available if the target language is C. - The default value is 0. - -@example -/* Generated from double.cloog with @strong{option -callable 0} */ -for (i=0;i<=M;i++) @{ - S1 ; - for (j=0;j<=N;j++) @{ - S2 ; - S3 ; - @} - S4 ; -@} -@end example -@example -/* Generated from double.cloog with @strong{option -callable 1} */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? ((n)-(d)+1)/(d) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? (n)/(d) : ((n)+(d)+1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) @{ hash(1); hash(i); @} -#define S2(i,j) @{ hash(2); hash(i); hash(j); @} -#define S3(i,j) @{ hash(3); hash(i); hash(j); @} -#define S4(i) @{ hash(4); hash(i); @} - -void test(int M, int N) -@{ - /* Original iterators. */ - int i, j; - for (i=0;i<=M;i++) @{ - S1(i) ; - for (j=0;j<=N;j++) @{ - S2(i,j) ; - S3(i,j) ; - @} - S4(i) ; - @} -@} -@end example - -@node Output -@subsection Output @code{-o } - - @code{-o }: this option sets the output file. @code{stdout} is a - special value: when used, output is standard output. - Default value is @code{stdout}. - -@node OpenScop -@subsection OpenScop @code{-openscop} - - @code{-openscop}: this option states that the input file complies to - the OpenScop specification instead of the native file format - (@pxref{Bas11}). This option is available only if the OpenScop - support has been enabled at compile time (@pxref{Optional Features}). - -@node Help -@subsection Help @code{--help} or @code{-h} - - @code{--help} or @code{-h}: this option ask CLooG to print a short help. - -@node Version -@subsection Version @code{--version} or @code{-v} - - @code{--version} or @code{-v}: this option ask CLooG to print some version - informations. - -@node Quiet -@subsection Quiet @code{--quiet} or @code{-q} - - @code{--quiet} or @code{-q}: this option tells CLooG not to print - any informational messages. - - -@c %/************************************************************************* -@c % * A Full Example * -@c % *************************************************************************/ -@node Full Example -@section A Full Example - -Let us consider the allocation problem of a Gaussian elimination, i.e. we want -to distribute the various statement instances of the compute kernel onto -different processors. The original code is the following: -@example -@group -for (i=1;j<=N-1;i++) @{ - for (j=i+1;j<=N;j++) @{ - c[i][j] = a[j][i]/a[i][i] ; /* S1 */ - for (k=i+1;k<=N;k++) @{ - a[j][k] -= c[i][j]*a[i][k] ; /* S2 */ - @} - @} -@} -@end group -@end example - -@noindent The best affine allocation functions can be found by any good automatic -parallelizer like LooPo (@pxref{Gri04}): - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (i)$\cr - \theta _{S2}(i,j,k)^T &$= (k)$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (i) -T_S2(i,j,k)^T = (k) -@end group -@end example -@end ifnottex - -@noindent To ensure that on each processor, the set of statement instances is -executed according to the original ordering, we add as minor scattering -dimensions the original scheduling (@pxref{Scattering}): - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (i,0,i,0,j,0)^T$\cr - \theta _{S2}(i,j,k)^T &$= (k,0,i,0,j,1,k,0)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (i,0,i,0,j,0)^T -T_S2(i,j,k)^T = (k,0,i,0,j,1,k,0)^T -@end group -@end example -@end ifnottex - -@noindent To ensure that the scattering functions have the same dimensionality, we -complete the first function with zeroes -(this is a CLooG @value{VERSION} and previous versions requirement, -it should be removed in a future version, don't worry it's absolutely legal !): - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j)^T &$= (i,0,i,0,j,0,0,0)^T$\cr - \theta _{S2}(i,j,k)^T &$= (k,0,i,0,j,1,k,0)^T$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j)^T = (i,0,i,0,j,0,0,0)^T -T_S2(i,j,k)^T = (k,0,i,0,j,1,k,0)^T -@end group -@end example -@end ifnottex - -@noindent The input file corresponding to this code generation problem -could be (this file is provided in the CLooG distribution -as @code{test/manual_gauss.cloog}: - -@example -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no constraints on one parameter) -1 3 # 1 line and 3 columns -# eq/in n 1 - 1 0 0 # 0 >= 0, always true - -1 # We want to set manually the parameter name -n # parameter name - -# --------------------- STATEMENTS -------------------- -2 # Number of statements - -1 # First statement: one domain -4 5 # 4 lines and 3 columns -# eq/in i j n 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 -1 # i <= n-1 - 1 -1 1 0 -1 # j >= i+1 - 1 0 -1 1 0 # j <= n -0 0 0 # for future options - -1 -# Second statement: one domain -6 6 # 6 lines and 3 columns -# eq/in i j k n 1 - 1 1 0 0 0 -1 # i >= 1 - 1 -1 0 0 1 -1 # i <= n-1 - 1 -1 1 0 0 -1 # j >= i+1 - 1 0 -1 0 1 0 # j <= n - 1 -1 0 1 0 -1 # k >= i+1 - 1 0 0 -1 1 0 # k <= n -0 0 0 # for future options - -0 # We let CLooG set the iterator names - -# --------------------- SCATTERING -------------------- -2 # Scattering functions -# First function -8 13 # 3 lines and 3 columns -# eq/in p1 p2 p3 p4 p5 p6 p7 p8 i j n 1 - 0 1 0 0 0 0 0 0 0 -1 0 0 0 # p1 = i - 0 0 1 0 0 0 0 0 0 0 0 0 0 # p2 = 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 # p3 = i - 0 0 0 0 1 0 0 0 0 0 0 0 0 # p4 = 0 - 0 0 0 0 0 1 0 0 0 0 -1 0 0 # p5 = j - 0 0 0 0 0 0 1 0 0 0 0 0 0 # p6 = 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 # p7 = 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 # p8 = 0 -# Second function -8 14 # 3 lines and 3 columns -# eq/in p1 p2 p3 p4 p5 p6 p7 p8 i j k n 1 - 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 # p1 = k - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # p2 = 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # p3 = i - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # p4 = 0 - 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 # p5 = j - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 # p6 = 1 - 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 # p7 = k - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # p8 = 0 - -1 # We want to set manually the scattering dimension names -p1 p2 p3 p4 p5 p6 p7 p8 # scattering dimension names -@end example - -Calling CLooG, with for instance the command line -@code{cloog -fsp 2 gauss.cloog} for a better view -of the allocation (the processor number is given by @code{p1}), -will result on the following target code that actually implements -the transformation. A minor processing on the dimension @code{p1} -to implement, e.g., MPI calls, which is not shown here may -result in dramatic speedups ! - -@example -if (n >= 2) @{ - p1 = 1 ; - for (p5=2;p5<=n;p5++) @{ - S1(i = 1,j = p5) ; - @} -@} -for (p1=2;p1<=n-1;p1++) @{ - for (p3=1;p3<=p1-1;p3++) @{ - for (p5=p3+1;p5<=n;p5++) @{ - S2(i = p3,j = p5,k = p1) ; - @} - @} - for (p5=p1+1;p5<=n;p5++) @{ - S1(i = p1,j = p5) ; - @} -@} -if (n >= 2) @{ - p1 = n ; - for (p3=1;p3<=n-1;p3++) @{ - for (p5=p3+1;p5<=n;p5++) @{ - S2(i = p3,j = p5,k = n) ; - @} - @} -@} -@end example - - -@c %/************************************************************************* -@c % * A Full Example * -@c % *************************************************************************/ -@node CLooG Library -@chapter Using the CLooG Library -The CLooG Library was implemented to allow the user to call CLooG -directly from his programs, without file accesses or system calls. The -user only needs to link his programs with C libraries. The CLooG -library mainly provides one function (@code{cloog_clast_create_from_input}) -which takes as input the problem -description with some options, and returns the data structure corresponding -to the generated code (a @code{struct clast_stmt} structure) -which is more or less an abstract syntax tree. -The user can work with this data structure and/or use -our pretty printing function to write the final code in either C or FORTRAN. -Some other functions are provided for convenience reasons. -These functions as well as the data structures are described in this section. - -@menu -* CLooG Data Structures:: -* CLooG Output:: -* Retrieving version information:: -* Example of Library Utilization:: -@end menu - - -@node CLooG Data Structures -@section CLooG Data Structures Description -In this section, we describe the data structures used by the loop -generator to represent and to process a code generation problem. - -@menu -* CloogState:: -* CloogMatrix:: -* CloogDomain:: -* CloogScattering:: -* CloogUnionDomain:: -* CloogStatement:: -* CloogOptions:: -* CloogInput:: -@end menu - - -@node CloogState -@subsection CloogState -@example -@group -CloogState *cloog_state_malloc(void); -void cloog_state_free(CloogState *state); -@end group -@end example - -@noindent The @code{CloogState} structure is (implicitly) needed to perform -any CLooG operation. It should be created using @code{cloog_state_malloc} -before any other CLooG objects are created and destroyed using -@code{cloog_state_free} after all objects have been freed. -It is allowed to use more than one @code{CloogState} structure at -the same time, but an object created within the state of a one -@code{CloogState} structure is not allowed to interact with an object -created within the state of an other @code{CloogState} structure. - - -@node CloogMatrix -@subsection CloogMatrix - -@noindent The @code{CloogMatrix} structure is equivalent to the PolyLib -@code{Matrix} data structure (@pxref{Wil93}). This structure is devoted to -represent a set of constraints. - -@example -@group -struct cloogmatrix -@{ unsigned NbRows ; /* Number of rows. */ - unsigned NbColumns ; /* Number of columns. */ - cloog_int_t **p; /* Array of pointers to the matrix rows. */ - cloog_int_t *p_Init; /* Matrix rows contiguously in memory. */ -@}; -typedef struct cloogmatrix CloogMatrix; - -CloogMatrix *cloog_matrix_alloc(unsigned NbRows, unsigned NbColumns); -void cloog_matrix_print(FILE *foo, CloogMatrix *m); -void cloog_matrix_free(CloogMatrix *matrix); -@end group -@end example - -@noindent The whole matrix is stored in memory row after row at the -@code{p_Init} address. @code{p} is an array of pointers where -@code{p[i]} points to the first element of the @math{i^{th}} row. -@code{NbRows} and @code{NbColumns} are respectively the number of -rows and columns of the matrix. -Each row corresponds to a constraint. The first element of each row is an -equality/inequality tag. The -constraint is an equality @math{p(x) = 0} if the first element is 0, but it is -an inequality @math{p(x) \geq 0} if the first element is 1. -The next elements are the coefficients of the unknowns, -followed by the coefficients of the parameters, and finally the constant term. -For instance, the following three constraints: - -@tex -$$ -\hbox{$ \cases{ -i + m &$= 0$\cr - -j + n &$\geq 0$\cr - j + i - k &$\geq 0$}$} -$$ -@end tex - -@ifnottex -@example -@group - -i + m = 0 - -j + n >= 0 - i + j - k >= 0 -@end group -@end example -@end ifnottex - -@noindent would be represented by the following rows: - -@example -@group -# eq/in i j k m n cst - 0 0 -1 0 1 0 0 - 1 -1 0 0 0 1 0 - 1 1 1 -1 0 0 0 -@end group -@end example - -@noindent To be able to provide different precision version (CLooG -supports 32 bits, 64 bits and arbitrary precision through the GMP library), -the @code{cloog_int_t} type depends on the configuration options (it may be -@code{long int} for 32 bits version, @code{long long int} for 64 bits version, -and @code{mpz_t} for multiple precision version). - -@node CloogDomain -@subsection CloogDomain -@example -@group -CloogDomain *cloog_domain_union_read(CloogState *state, - FILE *input, int nb_parameters); -CloogDomain *cloog_domain_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_par); -void cloog_domain_free(CloogDomain *domain); -@end group -@end example - -@noindent @code{CloogDomain} is an opaque type representing a polyhedral -domain (a union of polyhedra). -A @code{CloogDomain} can be read -from a file using @code{cloog_domain_union_read} or -converted from a @code{CloogMatrix}. -The input format for @code{cloog_domain_union_read} -is that of @ref{Domain Representation}. -The function @code{cloog_domain_from_cloog_matrix} takes a @code{CloogState}, a -@code{CloogMatrix} and @code{int} as input and returns a pointer to a -@code{CloogDomain}. @code{matrix} describes the domain and @code{nb_par} is the -number of parameters in this domain. The input data structures are neither -modified nor freed. -The @code{CloogDomain} can be freed using @code{cloog_domain_free}. -There are also some backend dependent functions for creating -@code{CloogDomain}s. - -@menu -* CloogDomain/PolyLib:: -* CloogDomain/isl:: -@end menu - -@node CloogDomain/PolyLib -@subsubsection PolyLib - -@example -#include -CloogDomain *cloog_domain_from_polylib_polyhedron(CloogState *state, - Polyhedron *, int nb_par); -@end example -@noindent -The function @code{cloog_domain_from_polylib_polyhedron} takes a PolyLib -@code{Polyhedron} as input and returns a pointer to a @code{CloogDomain}. -The @code{nb_par} parameter indicates the number of parameters -in the domain. The input data structure if neither modified nor freed. - -@node CloogDomain/isl -@subsubsection isl - -@example -#include -CloogDomain *cloog_domain_from_isl_set(struct isl_set *set); -__isl_give isl_set *isl_set_from_cloog_domain(CloogDomain *domain); -@end example -@noindent -The function @code{cloog_domain_from_isl_set} takes a -@code{struct isl_set} as input and returns a pointer to a @code{CloogDomain}. -The function consumes a reference to the given @code{struct isl_set}. -Similarly, @code{isl_set_from_cloog_domain} consumes a reference -to a @code{CloogDomain} and returns an @code{isl_set}. - - -@node CloogScattering -@subsection CloogScattering -@example -@group -CloogScattering *cloog_domain_read_scattering(CloogDomain *domain, - FILE *foo); -CloogScattering *cloog_scattering_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_scat, int nb_par); -void cloog_scattering_free(CloogScattering *); -@end group -@end example - -@noindent -The @code{CloogScattering} type represents a scattering function. -A @code{CloogScattering} for a given @code{CloogDomain} can be read -from a file using @code{cloog_scattering_read} or converted -from a @code{CloogMatrix} using @code{cloog_scattering_from_cloog_matrix}. -The function @code{cloog_scattering_from_cloog_matrix} takes a -@code{CloogState}, a @code{CloogMatrix} and two @code{int}s as input and -returns a -pointer to a @code{CloogScattering}. -@code{matrix} describes the scattering, while @code{nb_scat} and -@code{nb_par} are the number of scattering dimensions and -the number of parameters, respectively. The input data structures are -neither modified nor freed. -A @code{CloogScattering} can be freed using @code{cloog_scattering_free}. -There are also some backend dependent functions for creating -@code{CloogScattering}s. - -@menu -* CloogScattering/PolyLib:: -* CloogScattering/isl:: -@end menu - -@node CloogScattering/PolyLib -@subsubsection PolyLib - -@example -#include -CloogScattering *cloog_scattering_from_polylib_polyhedron( - CloogState *state, Polyhedron *polyhedron, int nb_par); -@end example -@noindent -The function @code{cloog_scattering_from_polylib_polyhedron} takes a PolyLib -@code{Polyhedron} as input and returns a pointer to a @code{CloogScattering}. -The @code{nb_par} parameter indicates the number of parameters -in the domain. The input data structure if neither modified nor freed. - -@node CloogScattering/isl -@subsubsection isl - -@example -#include -CloogScattering *cloog_scattering_from_isl_map(struct isl_map *map); -@end example -@noindent -The function @code{cloog_scattering_from_isl_map} takes a -@code{struct isl_map} as input and returns a pointer to a @code{CloogScattering}. -The output dimensions of the @code{struct isl_map} correspond to the -scattering dimensions, while the input dimensions correspond to the -domain dimensions. -The function consumes a reference to the given @code{struct isl_map}. - - -@node CloogUnionDomain -@subsection CloogUnionDomain -@example -@group -enum cloog_dim_type @{ CLOOG_PARAM, CLOOG_ITER, CLOOG_SCAT @}; - -CloogUnionDomain *cloog_union_domain_alloc(int nb_par); -CloogUnionDomain *cloog_union_domain_add_domain(CloogUnionDomain *ud, - const char *name, CloogDomain *domain, - CloogScattering *scattering, void *usr); -CloogUnionDomain *cloog_union_domain_set_name(CloogUnionDomain *ud, - enum cloog_dim_type type, int index, const char *name); -void cloog_union_domain_free(CloogUnionDomain *ud); -@end group -@end example - -@noindent A @code{CloogUnionDomain} structure represents a union -of scattered named domains. A @code{CloogUnionDomain} is -initialized by a call to @code{cloog_union_domain_alloc}, -after which domains can be added using @code{cloog_union_domain_add_domain}. - -@code{cloog_union_domain_alloc} takes the number of parameters as input. -@code{cloog_union_domain_add_domain} takes a previously created -@code{CloogUnionDomain} as input along with an optional name, -a domain, an optional scattering function and a user pointer. -The name may be @code{NULL} and is duplicated if it is not. -If no name is specified, then the statements will be named according -to the order in which they were added. -@code{domain} and @code{scattering} are taken over -by the @code{CloogUnionDomain}. @code{scattering} may be @code{NULL}, -but it must be consistently @code{NULL} or not over all calls -to @code{cloog_union_domain_add_domain}. -@code{cloog_union_domain_set_name} can be used to set the names -of parameters, iterators and scattering dimensions. -The names of iterators and scattering dimensions can only be set -after all domains have been added. - -There is also a backend dependent function for creating -@code{CloogUnionDomain}s. - -@menu -* CloogUnionDomain/isl:: -@end menu - -@node CloogUnionDomain/isl -@subsubsection isl - -@example -#include -CloogUnionDomain *cloog_union_domain_from_isl_union_map( - __isl_take isl_union_map *umap); -CloogUnionDomain *cloog_union_domain_from_isl_set( - __isl_take isl_set *set); -@end example -@noindent -The function @code{cloog_union_domain_from_isl_union_map} takes a -@code{isl_union_map} as input and returns a pointer -to a @code{CloogUnionDomain}. -The input is a mapping from different -spaces (different tuple names and possibly different dimensions) -to a common space. The iteration domains are set to the domains -in each space. The statement names are set to the names of the -spaces. The parameter names of the result are set to those of -the input, but the iterator and scattering dimension names are -left unspecified. -The function consumes a reference to the given @code{isl_union_map}. The -function @code{cloog_union_domain_from_isl_set} is similar, but takes an -unscattered domain as input. It is not defined for an union_set, because the -order of iterations from two different isl_sets is undefined, if no scattering -is provided. - - -@node CloogStatement -@subsection CloogStatement -@example -@group -struct cloogstatement -@{ int number ; /* The statement unique number. */ - char *name; /* Name of the statement. */ - void * usr ; /* Pointer for user's convenience. */ - struct cloogstatement * next ;/* Next element of the linked list. */ -@} ; -typedef struct cloogstatement CloogStatement ; - -CloogStatement *cloog_statement_malloc(CloogState *state); -void cloog_statement_print(FILE *, CloogStatement *); -void cloog_statement_free(CloogStatement *); -@end group -@end example - -@noindent The @code{CloogStatement} structure represents a @code{NULL} -terminated linked -list of statements. In CLooG, a statement is only defined by its unique -number (@code{number}). The user can use the pointer @code{usr} for his -own convenience to link his own statement representation to the -corresponding @code{CloogStatement} structure. The whole management of the -@code{usr} pointer is under the responsibility of the user, in particular, -CLooG never tries to print, to allocate or to free a memory block pointed -by @code{usr}. - - - -@node CloogOptions -@subsection CloogOptions -@example -@group -struct cloogoptions -@{ int l; /* -l option. */ - int f; /* -f option. */ - int strides; /* -strides option. */ - int sh; /* -sh option. */ - int first_unroll; /* -first-unroll option. */ - int esp; /* -esp option. */ - int fsp; /* -fsp option. */ - int otl; /* -otl option. */ - int block; /* -block option. */ - int compilable; /* -compilable option. */ - int language; /* CLOOG_LANGUAGE_C or CLOOG_LANGUAGE_FORTRAN */ - int save_domains; /* Save unsimplified copy of domain. */ -@} ; -typedef struct cloogoptions CloogOptions ; - -CloogOptions *cloog_options_malloc(CloogState *state); -void cloog_options_print(FILE *foo, CloogOptions *options); -void cloog_options_free(CloogOptions *options); -@end group -@end example - -@noindent The @code{CloogOptions} structure contains all the possible options to -rule CLooG's behaviour (@pxref{Calling CLooG}). -As a reminder, the default values are: -@itemize @bullet -@item @math{l = -1} (optimize control until the innermost loops), -@item @math{f = 1} (optimize control from the outermost loops), -@item @math{strides = 0} (use only unit strides), -@item @math{sh = 0} (do not compute simple convex hulls), -@item @math{first\_unroll = -1} (do not perform unrolling), -@item @math{esp = 1} (spread complex equalities), -@item @math{fsp = 1} (start to spread from the first iterators), -@item @math{otl = 1} (simplify loops running only once). -@item @math{block = 0} (do not make statement blocks when not necessary). -@item @math{compilable = 0} (do not generate a compilable code). -@end itemize - -The @code{save_domains} option is only useful for users of the CLooG -library. This option defaults to 0, but when it is set, the @code{domain} -field of each @code{clast_user_stmt} will be set to the set of values for the -scattering dimensions for which this instance of the user statement is executed. -The @code{domain} field of each @code{clast_for} contains the set of values for -the scattering dimensions for which an instance of a user statement is executed -inside the @code{clast_for}. It is only available if the @code{clast_for} -enumerates a scattering dimension. - -@node CloogInput -@subsection CloogInput -@example -@group -CloogInput *cloog_input_read(FILE *file, CloogOptions *options); -CloogInput *cloog_input_alloc(CloogDomain *context, - CloogUnionDomain *ud); -void cloog_input_free(CloogInput *input); - -void cloog_input_dump_cloog(FILE *, CloogInput *, CloogOptions *); -@end group -@end example - -@noindent A @code{CloogInput} structure represents the input to CLooG. -It is essentially a @code{CloogUnionDomain} along with a context -@code{CloogDomain}. A @code{CloogInput} can be created from -a @code{CloogDomain} and a @code{CloogUnionDomains} using -@code{cloog_input_alloc}, or it can be read from a CLooG input -file using @code{cloog_input_read}. The latter also modifies -the @code{language} field of the @code{CloogOptions} structure. -The constructed @code{CloogInput} can be used as input -to a @code{cloog_clast_create_from_input} call. - -A @code{CloogInput} data structure and a @code{CloogOptions} contain -the same information as a .cloog file. This function dumps the .cloog -description of the given data structures into a file. - -@node Dump CLooG Input File Function -@subsection Dump CLooG Input File Function -@example -@end example - -@node CLooG Output -@section CLooG Output - -@noindent -Given a description of the input, -an AST corresponding to the @code{CloogInput} can be constructed -using @code{cloog_clast_create_from_input} and destroyed using -@code{free_clast_stmt}. -@example -struct clast_stmt *cloog_clast_create_from_input(CloogInput *input, - CloogOptions *options); -void free_clast_stmt(struct clast_stmt *s); -@end example -@noindent -@code{clast_stmt} represents a linked list of ``statements''. -@example -struct clast_stmt @{ - const struct clast_stmt_op *op; - struct clast_stmt *next; -@}; -@end example -@noindent -The entries in the list are not of type @code{clast_stmt} itself, -but of some larger type. The following statement types are defined -by CLooG. - -@example -struct clast_root @{ - struct clast_stmt stmt; - CloogNames * names; -@}; -struct clast_root *new_clast_root(CloogNames *names); - -struct clast_assignment @{ - struct clast_stmt stmt; - const char * LHS; - struct clast_expr * RHS; -@}; -struct clast_assignment *new_clast_assignment(const char *lhs, - struct clast_expr *rhs); - -struct clast_block @{ - struct clast_stmt stmt; - struct clast_stmt * body; -@}; -struct clast_block *new_clast_block(void); - -struct clast_user_stmt @{ - struct clast_stmt stmt; - CloogDomain * domain; - CloogStatement * statement; - struct clast_stmt * substitutions; -@}; -struct clast_user_stmt *new_clast_user_stmt(CloogDomain *domain, - CloogStatement *stmt, struct clast_stmt *subs); - -struct clast_for @{ - struct clast_stmt stmt; - CloogDomain * domain; - const char * iterator; - struct clast_expr * LB; - struct clast_expr * UB; - cloog_int_t stride; - struct clast_stmt * body; -@}; -struct clast_for *new_clast_for(CloogDomain *domain, const char *it, - struct clast_expr *LB, struct clast_expr *UB, - cloog_int_t stride); - -struct clast_guard @{ - struct clast_stmt stmt; - struct clast_stmt * then; - int n; - struct clast_equation eq[1]; -@}; -struct clast_guard *new_clast_guard(int n); -@end example -@noindent -The @code{clast_stmt} returned by @code{cloog_clast_create} -is a @code{clast_root}. -It contains a placeholder for all the variable names that appear -in the AST and a (list of) nested statement(s). - -@noindent -A @code{clast_assignment} assigns the value given by -the @code{clast_expr} @code{RHS} to a variable named @code{LHS}. - -@noindent -A @code{clast_block} groups a list of statements into one statement. -These statements are only generated if the @code{block} option is set, -@pxref{Statement Block} and @ref{CloogOptions}. - -@noindent -A @code{clast_user_stmt} represents a call to a statement specified -by the user, @pxref{CloogStatement}. -@code{substitutions} is a list of @code{clast_assignment} statements -assigning an expression in terms of the scattering dimensions to -each of the original iterators in the original order. -The @code{LHS}s of these assignments are left blank (@code{NULL}). -The @code{domain} is set to @code{NULL} if the @code{save_domains} option -is not set. Otherwise, it is set to the set -of values for the scattering dimensions -for which this instance of the user statement is executed. -Note that unless the @code{noscalars} option has been set, the -constant scattering dimensions may have been removed from this set. - -@noindent -A @code{clast_for} represents a for loop, iterating @code{body} for each -value of @code{iterator} between @code{LB} and @code{UB} in steps -of size @code{stride}. -The @code{domain} is set to @code{NULL} if the @code{save_domains} option is not -set. Otherwise, it is set to the set of values for the scattering dimensions -for which a user statement is executed inside this @code{clast_for}. Note that -unless the @code{noscalars} option has been set, the constant scattering -dimensions may have been removed from this set. - -@noindent -A @code{clast_guard} represents the guarded execution of the @code{then} -(list of) statement(s) by a conjunction of @code{n} (in)equalities. -Each (in)equality is represented by a @code{clast_equation}. -@example -struct clast_equation @{ - struct clast_expr * LHS; - struct clast_expr * RHS; - int sign; -@}; -@end example -@noindent -The condition expressed by a @code{clast_equation} is -@code{LHS <= RHS}, @code{LHS == RHS} or @code{LHS >= RHS} -depending on whether @code{sign} is less than zero, equal -to zero, or greater than zero. - -The dynamic type of a @code{clast_stmt} can be determined -using the macro @code{CLAST_STMT_IS_A(stmt,type)}, -where @code{stmt} is a pointer to a @code{clast_stmt} -and @code{type} is one of @code{stmt_root}, @code{stmt_ass}, -@code{stmt_user}, @code{stmt_block}, @code{stmt_for} or -@code{stmt_guard}. -Users are allowed to define their own statement types by -assigning the @code{op} field of the statements a pointer -to a @code{clast_stmt_op} structure. -@example -struct clast_stmt_op @{ - void (*free)(struct clast_stmt *); -@}; -@end example -@noindent -The @code{free} field of this structure should point -to a function that frees the user defined statement. - -@noindent -A @code{clast_expr} can be an identifier, a term, -a binary expression or a reduction. -@example -enum clast_expr_type @{ - clast_expr_name, - clast_expr_term, - clast_expr_bin, - clast_expr_red -@}; -struct clast_expr @{ - enum clast_expr_type type; -@}; -void free_clast_expr(struct clast_expr *e); -@end example - -@noindent -Identifiers are of subtype @code{clast_name}. -@example -struct clast_name @{ - struct clast_expr expr; - const char * name; -@}; -struct clast_name *new_clast_name(const char *name); -void free_clast_name(struct clast_name *t); -@end example -@noindent -The character string pointed to by @code{name} is -assumed to be part of the @code{CloogNames} structure -in the root of the clast as is therefore not copied. - -@noindent -Terms are of type @code{clast_term}. -@example -struct clast_term @{ - struct clast_expr expr; - cloog_int_t val; - struct clast_expr *var; -@}; -struct clast_term *new_clast_term(cloog_int_t c, struct clast_expr *v); -void free_clast_term(struct clast_term *t); -@end example -@noindent -If @code{var} is set to @code{NULL}, then the term represents -the integer value @code{val}. Otherwise, it represents -the term @code{val * var}. -@code{new_clast_term} simply copies the @code{v} pointer -without copying the underlying @code{clast_expr}. -@code{free_clast_term}, on the other hand, recursively frees -@code{var}. - -@noindent -Binary expressions are of type @code{clast_bin_type} and -represent either the floor of a division (fdiv), -the ceil of a division (cdiv), an exact division or -the remainder of an fdiv. -@example -enum clast_bin_type @{ clast_bin_fdiv, clast_bin_cdiv, - clast_bin_div, clast_bin_mod @}; -struct clast_binary @{ - struct clast_expr expr; - enum clast_bin_type type; - struct clast_expr* LHS; - cloog_int_t RHS; -@}; -struct clast_binary *new_clast_binary(enum clast_bin_type t, - struct clast_expr *lhs, cloog_int_t rhs); -void free_clast_binary(struct clast_binary *b); -@end example - -@noindent -Reductions are of type @code{clast_reduction} and -can represent either the sum, the minimum or the maximum -of its elements. -@example -enum clast_red_type @{ clast_red_sum, clast_red_min, clast_red_max @}; -struct clast_reduction @{ - struct clast_expr expr; - enum clast_red_type type; - int n; - struct clast_expr* elts[1]; -@}; -struct clast_reduction *new_clast_reduction(enum clast_red_type t, - int n); -void free_clast_reduction(struct clast_reduction *r); -@end example - -@node Retrieving version information -@section Retrieving version information -CLooG provides static and dynamic version checks to assist on -including a compatible version of the library. -A static version check at compile time can be achieved by -querying the version constants defined in @code{version.h}: - -@itemize @bullet -@item @code{CLOOG_VERSION_MAJOR} -@item @code{CLOOG_VERSION_MINOR} -@item @code{CLOOG_VERSION_REVISION} -@end itemize - -This way it is possible to ensure the included headers are of the -correct version. It is still possible that the installed CLooG -library version differs from the installed headers. -In order to avoid this, a dynamic version check is provided with -the functions: - -@example -@group -int cloog_version_major(void); -int cloog_version_minor(void); -int cloog_version_revision(void); -@end group -@end example - -By using both the static and the dynamic version check, it is possible -to match CLooG's header version with the library's version. - -@node Example of Library Utilization -@section Example of Library Utilization -Here is a basic example showing how it is possible to use the CLooG library, -assuming that a standard installation has been done. -The following C program reads a CLooG input file on the standard input, -then prints the solution on the standard output. -Options are preselected to the default values of the CLooG software. -This example is provided in the @code{example} directory of the -CLooG distribution. -@example -/* example.c */ -# include -# include - -int main() -@{ - CloogState *state; - CloogInput *input; - CloogOptions * options ; - struct clast_stmt *root; - - /* Setting options and reading program informations. */ - state = cloog_state_malloc(); - options = cloog_options_malloc(state); - input = cloog_input_read(stdin, options); - - /* Generating and printing the code. */ - root = cloog_clast_create_from_input(input, options); - clast_pprint(stdout, root, 0, options); - - cloog_clast_free(root); - cloog_options_free(options) ; - cloog_state_free(state); - return 0; -@} -@end example - -@noindent The compilation command could be: -@example -gcc example.c -lcloog -o example -@end example -@noindent A calling command with the input file test.cloog could be: -@example -more test.cloog | ./example -@end example - - -@c % ******************************** HACKING ********************************* -@c @node Hacking -@c @chapter Hacking CLooG - -@c @menu -@c * Program organization:: -@c * Special Options:: -@c * CLooG Coding Standards:: -@c @end menu - -@c @node Program organization -@c @section Program organization - -@c @node Special Options -@c @section Special Options - -@c @node CLooG Coding Standards -@c @section CLooG Coding Standards - - -@c % ****************************** INSTALLING ******************************** -@node Installing -@chapter Installing CLooG - -@menu -* License:: -* Requirements:: -* Basic Installation:: -* Optional Features:: -* Uninstallation:: -@end menu - -@node License -@section License -First of all, it would be very kind to refer the following paper in any -publication that result from the use of the CLooG software or its library, -@pxref{Bas04} (a bibtex entry is provided behind the title page of this -manual, along with copyright notice, and in the CLooG home -@code{http://www.CLooG.org}. - -This library 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 2.1 of the License, or (at your option) any later version. -This library 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 -Lesser General Public License for more details. -@code{http://www.gnu.org/licenses/lgpl-2.1.html} - -Note, though, that if you link CLooG against a GPL library such -as the PolyLib backend, then the combination becomes GPL too. -In particular, a CLooG library based on the PolyLib backend -is GPL version 2 only. -Since the isl backend is LGPL, linking against it does not affect -the license of CLooG. - - -@node Requirements -@section Requirements - -CLooG can be used with one of two possible backends, -one using isl and one using PolyLib. -The isl library is included in the CLooG distribution, -while the PolyLib library needs to be obtained separately. -On the other hand, isl requires GMP, while PolyLib can be -compiled with or without the use of GMP. -The user therefore needs to install at least one of -PolyLib or GMP. - -@menu -* PolyLib:: -* GMP Library:: -@end menu - - -@node PolyLib -@subsection PolyLib (optional) -To successfully install CLooG with the PolyLib backend, -the user first needs to install PolyLib -version 5.22.1 or above (default 64 bits version is satisfying -as well as 32 bits or GMP multiple precision version). -Polylib can be downloaded freely -at @code{http://icps.u-strasbg.fr/PolyLib/} or -@code{http://www.irisa.fr/polylib/}. Once downloaded and unpacked -(e.g. using the @samp{tar -zxvf polylib-5.22.3.tar.gz} command), -the user can compile -it by typing the following commands on the PolyLib's root directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -Alternatively, the latest development version can be obtained from the -git repository: -@itemize @bullet -@item @code{git clone git://repo.or.cz/polylib.git} -@item @code{cd polylib} -@item @code{./autogen.sh} -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -The PolyLib default installation is @code{/usr/local}. This directory may -not be inside your library path. To fix the problem, the user should set -@example -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib -@end example -@noindent if your shell is, e.g., bash or -@example -setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib -@end example -@noindent if your shell is, e.g., tcsh. Add the line to your .bashrc or .tcshrc (or -whatever convenient file) to make this change permanent. Another solution -is to ask PolyLib to install in the standard path by using the prefix -option of the configure script: -@samp{./configure --prefix=/usr}. - -CLooG makes intensive calls to polyhedral operations, and PolyLib -functions do the job. Polylib is a free library written in C for the -manipulation of polyhedra. The library is operating on objects like -vectors, matrices, lattices, polyhedra, Z-polyhedra, unions of -polyhedra and a lot of other intermediary structures. It provides -functions for all the important operations on these structures. - -@node GMP Library -@subsection GMP Library (optional) - -To be able to deal with insanely large coefficient, the user will need to -install the GNU Multiple Precision Library (GMP for short) version 4.1.4 -or above. It can be freely downloaded from @code{http://www.swox.com/gmp}. -Note that the isl backend currently requires GMP. -The user can compile GMP by typing the following commands on the GMP root -directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -The GMP default installation is @code{/usr/local}, the same method to -fix a library path problem applies as with PolyLib (@pxref{PolyLib}). - -If you want to use the PolyLib backend, then -PolyLib has to be built using the GMP library by specifying the option -@samp{--with-libgmp=PATH_TO_GMP} to the PolyLib configure script -(where @code{PATH_TO_GMP} is @code{/usr/local} if you did not change the GMP -installation directory). Then you have to set the convenient CLooG configure -script options to build the GMP version (@pxref{Optional Features}). - - -@node Basic Installation -@section CLooG Basic Installation - -Once downloaded and unpacked -(e.g. using the @samp{tar -zxvf cloog-@value{VERSION}.tar.gz} command), -you can compile CLooG by typing the following commands on the CLooG's root -directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -Alternatively, the latest development version can be obtained from the -git repository: -@itemize @bullet -@item @code{git clone git://repo.or.cz/cloog.git} -@item @code{cd cloog} -@item @code{./get_submodules.sh} -@item @code{./autogen.sh} -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -Depending on which backend you want to use and where they -are located, you may need to pass some -options to the configure script, @pxref{Optional Features}. - -The program binaries and object files can be removed from the -source code directory by typing @code{make clean}. To also remove the -files that the @code{configure} script created (so you can compile the -package for a different kind of computer) type @code{make distclean}. - -Both the CLooG software and library have been successfully compiled -on the following systems: -@itemize @bullet -@item PC's under Linux, with the @code{gcc} compiler, -@item PC's under Windows (Cygwin), with the @code{gcc} compiler, -@item Sparc and UltraSparc Stations, with the @code{gcc} compiler. -@end itemize - -@node Optional Features -@section Optional Features -The @code{configure} shell script attempts to guess correct values for -various system-dependent variables and user options used during compilation. -It uses those values to create the @code{Makefile}. Various user options -are provided by the CLooG's configure script. They are summarized in the -following list and may be printed by typing @code{./configure --help} in the -CLooG top-level directory. - -@itemize @bullet -@item By default, the installation directory is @code{/usr/local}: -@code{make install} will install the package's files in -@code{/usr/local/bin}, @code{/usr/local/lib} and @code{/usr/local/include}. -The user can specify an installation prefix other than @code{/usr/local} by -giving @code{configure} the option @code{--prefix=PATH}. - -@item By default, the isl backend will use the version of isl -that is @code{bundled} together with CLooG. -Using the @code{--with-isl} option of @code{configure} -the user can specify that @code{no} isl, -a previously installed (@code{system}) isl or a @code{build} isl -should be used. -In the latter case, the user should also specify the build location -using @code{--with-isl-builddir=PATH}. -In case of an installed isl, -the installation location can be specified using the -@code{--with-isl-prefix=PATH} and -@code{--with-isl-exec-prefix=PATH} options of @code{configure}. - -@item By default, the PolyLib backend will use an installed -(@code{system}) PolyLib, if any. -The installation location can be specified using the -@code{--with-polylib-prefix=PATH} and -@code{--with-polylib-exec-prefix=PATH} options of @code{configure}. -Using the @code{--with-polylib} option of @code{configure} -the user can specify that @code{no} PolyLib or a @code{build} PolyLib -should be used. -In the latter case, the user should also specify the build location -using @code{--with-polylib-builddir=PATH}. - -@item By default, the PolyLib backend of CLooG is built -in 64bits version if such version of the -PolyLib is found by @code{configure}. If the only existing version of the -PolyLib is the 32bits or if the user give to @code{configure} the option -@code{--with-bits=32}, the 32bits version of CLooG will be compiled. In the -same way, the option @code{--with-bits=gmp} have to be used to build -the multiple precision version. - -@item By default, @code{configure} will look for the GMP library -(necessary to build the multiple precision version) in standard -locations. If necessary, the user can specify the GMP path by giving -@code{configure} the option @code{--with-gmp-prefix=PATH} and/or -@code{--with-gmp-exec-prefix=PATH}. - -@item By default, the OpenScop Library (osl) support is not enabled. -@c @code{configure} will use the bundled OpenScop Library (osl). -Using the @code{--with-osl} option of @code{configure} -the user can specify that @code{no} osl, -a previously installed (@code{system}) osl, a @code{bundled} osl, or a -@code{build} osl should be used. -In the latter case, the user should also specify the build location -using @code{--with-osl-builddir=PATH}. -In case of an installed osl, -the installation location can be specified using the -@code{--with-osl-prefix=PATH} and -@code{--with-osl-exec-prefix=PATH} options of @code{configure}. -@end itemize - -@node Uninstallation -@section Uninstallation -The user can easily remove the CLooG software and library from his system -by typing (as root if necessary) from the CLooG top-level directory -@code{make uninstall}. - -@c % **************************** DOCUMENTATION ****************************** -@node Documentation -@chapter Documentation -The CLooG distribution provides several documentation sources. First, the -source code itself is as documented as possible. The code comments use a -Doxygen-compatible presentation (something similar to what JavaDoc does for -JAVA). The user may install Doxygen -(see @code{http://www.stack.nl/~dimitri/doxygen}) to automatically -generate a technical documentation by typing @code{make doc} or -@code{doxygen ./autoconf/Doxyfile} at the CLooG top-level directory after -running the configure script (@pxref{Installing}). Doxygen will generate -documentation sources (in HTML, LaTeX and man) in the @code{doc/source} -directory of the CLooG distribution. - -The Texinfo sources of the present document are also provided in the @code{doc} -directory. You can build it in either DVI format (by typing -@code{texi2dvi cloog.texi}) or PDF format -(by typing @code{texi2pdf cloog.texi}) or HTML format -(by typing @code{makeinfo --html cloog.texi}, using @code{--no-split} -option to generate a single HTML file) or info format -(by typing @code{makeinfo cloog.texi}). - -@c % ****************************** REFERENCES ******************************** -@node References -@chapter References - -@itemize -@item -@anchor{Bas03a}[Bas03a] C. Bastoul, P. Feautrier. Improving data locality -by chunking. CC'12 International Conference on Compiler Construction, -LNCS 2622, pages 320-335, Warsaw, april 2003. - -@item -@anchor{Bas03b}[Bas03b] C. Bastoul. Efficient code generation for automatic -parallelization and optimization. ISPDC'03 IEEE International Symposium on -Parallel and Distributed Computing, pages 23-30, Ljubljana, october 2003. - -@item -@anchor{Bas04}[Bas04] C. Bastoul. Code Generation in the Polyhedral Model -Is Easier Than You Think. PACT'13 IEEE International Conference on Parallel -Architecture and Compilation Techniques, pages 7-16, Juan-les-Pins, -september 2004. - -@item -@anchor{Bas11}[Bas11] C. Bastoul. A Specification and a Library for Data -Exchange in Polyhedral Compilation Tools. Technical Report, -Paris-Sud University, France, September 2011. - -@item -@anchor{Fea92}[Fea92] P. Feautrier Some efficient solutions to the affine -scheduling problem, part II: multidimensional time. -International Journal of Parallel Programming, 21(6):389--420, December 1992. - -@item -@anchor{Gri04}[Gri04] M. Griebl. Automatic parallelization of loop programs -for distributed memory architectures. Habilitation Thesis. Facult@"at f@"ur -Mathematik und Informatik, Universit@"at Passau, 2004. -@emph{http://www.infosun.fmi.uni-passau.de/cl/loopo/} - -@item -@anchor{Qui00}[Qui00] F. Quiller@'e, S. Rajopadhye, and D. Wilde. -Generation of efficient nested loops from polyhedra. -International Journal of Parallel Programming, 28(5):469-498, -october 2000. - -@item -@anchor{Wil93}[Wil93] Doran K. Wilde. -A library for doing polyhedral operations. -Technical Report 785, IRISA, Rennes, France, 1993. - -@end itemize - - - - -@c % /************************************************************************* -@c % * PART VI: END OF THE DOCUMENT * -@c % *************************************************************************/ -@c @unnumbered Index - -@c @printindex cp - -@bye diff --git a/cloog-0.17.0/doc/images/basic.eps b/cloog-0.17.0/doc/images/basic.eps deleted file mode 100644 index 0cc049736ce9920a33a8db6edb294966b970fc4e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/images/basic.eps +++ /dev/null @@ -1,402 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: basic.fig -%%Creator: fig2dev Version 3.2 Patchlevel 4 -%%CreationDate: Thu Nov 17 16:54:54 2005 -%%For: bastoul@ulysse.futurs.inria.fr (Cedric Bastoul) -%%BoundingBox: 0 0 445 301 -%%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 301 moveto 0 0 lineto 445 0 lineto 445 301 lineto closepath clip newpath --153.0 333.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def -/reencdict 12 dict def /ReEncode { reencdict begin -/newcodesandnames exch def /newfontname exch def /basefontname exch def -/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def -basefontdict { exch dup /FID ne { dup /Encoding eq -{ exch dup length array copy newfont 3 1 roll put } -{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall -newfont /FontName newfontname put newcodesandnames aload pop -128 1 255 { newfont /Encoding get exch /.notdef put } for -newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat -newfontname newfont definefont pop end } def -/isovec [ -8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde -8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis -8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron -8#220 /dotlessi 8#230 /oe 8#231 /OE -8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling -8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis -8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot -8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus -8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph -8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine -8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf -8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute -8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring -8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute -8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute -8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve -8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply -8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex -8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave -8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring -8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute -8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute -8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve -8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide -8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex -8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def -/Times-Bold /Times-Bold-iso isovec ReEncode -/Times-Roman /Times-Roman-iso isovec ReEncode - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -10 setmiterlimit -0 slj 0 slc - 0.06000 0.06000 sc -% -% Fig objects follow -% -% -% here starts figure with depth 51 -% Polyline -n 4200 1500 m 4200 3900 l 8400 3900 l 6000 1500 l - cp gs col7 0.75 shd ef gr -% Ellipse -7.500 slw - [15 45] 45 sd -1 slc -n 5400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 8400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Polyline -0 slc -gs clippath -9615 5160 m 9615 5040 l 9395 5040 l 9575 5100 l 9395 5160 l cp -eoclip -n 3000 5100 m - 9600 5100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 9395 5160 m 9575 5100 l 9395 5040 l 9395 5160 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -3060 885 m 2940 885 l 2940 1105 l 3000 925 l 3060 1105 l cp -eoclip -n 3000 5100 m - 3000 900 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3060 1105 m 3000 925 l 2940 1105 l 3060 1105 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -n 3000 4500 m - 2925 4500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3900 m - 2925 3900 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3300 m - 2925 3300 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3600 5100 m - 3600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4200 5100 m - 4200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 5400 5100 m - 5400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4800 5100 m - 4800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6000 5100 m - 6000 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6600 5100 m - 6600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2700 m - 2925 2700 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 1500 m - 2925 1500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2100 m - 2925 2100 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 1500 m - 9000 1500 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 8400 5100 m - 8400 900 l gs col0 s gr [] 0 sd -% Polyline -n 7200 5100 m - 7200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 7800 5100 m - 7800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 8400 5100 m - 8400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 3900 m - 9000 3900 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 5400 900 m - 9600 5100 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 4200 5100 m - 4200 900 l gs col0 s gr [] 0 sd -/Times-Bold-iso ff 390.00 scf sf -2625 4650 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2625 4050 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -3525 5550 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2700 1050 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -8025 825 m -gs 1 -1 sc (i<=n) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -4125 5550 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -8325 5550 m -gs 1 -1 sc (n) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2550 1575 m -gs 1 -1 sc (m) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -9075 3975 m -gs 1 -1 sc (j>=2) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -9075 1575 m -gs 1 -1 sc (j<=m) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -9450 5475 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -3825 825 m -gs 1 -1 sc (i>=2) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -4875 825 m -gs 1 -1 sc (j<=n+2-i) col0 sh gr -% here ends figure; -$F2psEnd -rs -showpage diff --git a/cloog-0.17.0/doc/images/basic.fig b/cloog-0.17.0/doc/images/basic.fig deleted file mode 100644 index 7fe0a9745f860ee30aa2d0e7a98d2eb0d92d6fce..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/images/basic.fig +++ /dev/null @@ -1,100 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3900 75 75 5400 3900 5400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3900 75 75 4800 3900 4800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3300 75 75 4200 3300 4200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3300 75 75 4800 3300 4800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2700 75 75 4200 2700 4200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3900 75 75 4200 3900 4200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3900 75 75 6000 3900 6000 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3900 75 75 6600 3900 6600 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 3900 75 75 7200 3900 7200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7800 3900 75 75 7800 3900 7800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 3300 75 75 7200 3300 7200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3300 75 75 6600 3300 6600 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3300 75 75 6000 3300 6000 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3300 75 75 5400 3300 5400 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2700 75 75 4800 2700 4800 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2700 75 75 5400 2700 5400 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2700 75 75 6000 2700 6000 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2700 75 75 6600 2700 6600 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2100 75 75 6000 2100 6000 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2100 75 75 5400 2100 5400 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2100 75 75 4800 2100 4800 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2100 75 75 4200 2100 4200 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 1500 75 75 4200 1500 4200 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 1500 75 75 4800 1500 4800 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 1500 75 75 5400 1500 5400 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7800 3300 75 75 7800 3300 7800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 8400 3900 75 75 8400 3900 8400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 2700 75 75 7200 2700 7200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2100 75 75 6600 2100 6600 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 1500 75 75 6000 1500 6000 1575 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 9600 5100 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 3000 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 4500 2925 4500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3900 2925 3900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3300 2925 3300 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3600 5100 3600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4200 5100 4200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 5400 5100 5400 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4800 5100 4800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6000 5100 6000 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6600 5100 6600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2700 2925 2700 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 1500 2925 1500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2100 2925 2100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 1500 9000 1500 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 8400 5100 8400 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 7200 5100 7200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 7800 5100 7800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 8400 5100 8400 5175 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 3900 9000 3900 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 5400 900 9600 5100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 4200 5100 4200 900 -2 3 0 0 0 7 51 -1 15 0.000 0 0 -1 0 0 5 - 4200 1500 4200 3900 8400 3900 6000 1500 4200 1500 -4 0 0 50 -1 2 26 0.0000 0 270 195 2625 4650 1\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 2625 4050 2\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 3525 5550 1\001 -4 0 0 50 -1 2 26 0.0000 0 345 135 2700 1050 j\001 -4 0 0 50 -1 0 26 0.0000 0 270 750 8025 825 i<=n\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 4125 5550 2\001 -4 0 0 50 -1 2 26 0.0000 0 180 225 8325 5550 n\001 -4 0 0 50 -1 2 26 0.0000 0 180 330 2550 1575 m\001 -4 0 0 50 -1 0 26 0.0000 0 360 750 9075 3975 j>=2\001 -4 0 0 50 -1 0 26 0.0000 0 360 855 9075 1575 j<=m\001 -4 0 0 50 -1 2 26 0.0000 0 270 105 9450 5475 i\001 -4 0 0 50 -1 0 26 0.0000 0 270 750 3825 825 i>=2\001 -4 0 0 50 -1 0 26 0.0000 0 360 1410 4875 825 j<=n+2-i\001 diff --git a/cloog-0.17.0/doc/images/basic.jpg b/cloog-0.17.0/doc/images/basic.jpg deleted file mode 100644 index 995b1d816207e6585df9c61ea65745d38e0db845..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/doc/images/basic.jpg and /dev/null differ diff --git a/cloog-0.17.0/doc/images/basic.pdf b/cloog-0.17.0/doc/images/basic.pdf deleted file mode 100644 index d15d42b4145419f03f56fde14b10e2e983e8dbb0..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/doc/images/basic.pdf and /dev/null differ diff --git a/cloog-0.17.0/doc/images/basic.txt b/cloog-0.17.0/doc/images/basic.txt deleted file mode 100644 index e40913a6b6ec17394b5950ab170f10460e219791..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/images/basic.txt +++ /dev/null @@ -1,13 +0,0 @@ - j^ i>=2 - | | j<=n+2-i - | |\ | i<=n - | | \ | -m-+-****---+-j<=m - | ***** | - | ****** | - | *******| -2-+-********-j>=2 - | | |\ -0-+-+------+--->i - | | | - 0 2 n diff --git a/cloog-0.17.0/doc/images/tree.eps b/cloog-0.17.0/doc/images/tree.eps deleted file mode 100644 index d80f6e93a8401479b391745adbb401fb5bdafea8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/images/tree.eps +++ /dev/null @@ -1,258 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: tree.eps -%%Creator: fig2dev Version 3.2 Patchlevel 3c -%%CreationDate: Fri Sep 6 10:09:40 2002 -%%For: bastoul@whisky (Cedric Bastoul) -%%BoundingBox: 0 0 388 312 -%%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 312 moveto 0 0 lineto 388 0 lineto 388 312 lineto closepath clip newpath --165.0 369.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -%%Page: 1 1 -10 setmiterlimit - 0.06000 0.06000 sc -% -% Fig objects follow -% -7.500 slw -% Ellipse -n 5400 1200 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 3000 3600 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 7800 3600 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 6600 4800 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 5400 2325 237 237 0 360 DrawEllipse gs col0 s gr - -% Polyline -gs clippath -5355 2115 m 5445 2115 l 5445 1888 l 5400 2068 l 5355 1888 l cp -eoclip -n 5400 1425 m - 5400 2100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5355 1888 m 5400 2068 l 5445 1888 l 5355 1888 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -5355 3390 m 5445 3390 l 5445 3163 l 5400 3343 l 5355 3163 l cp -eoclip -n 5400 2550 m - 5400 3375 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5355 3163 m 5400 3343 l 5445 3163 l 5355 3163 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -2955 4590 m 3045 4590 l 3045 4363 l 3000 4543 l 2955 4363 l cp -eoclip -n 3000 3825 m - 3000 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 2955 4363 m 3000 4543 l 3045 4363 l 2955 4363 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -6563 4544 m 6611 4621 l 6803 4500 l 6627 4558 l 6755 4424 l cp -eoclip -n 7800 3825 m - 6600 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6755 4424 m 6627 4558 l 6803 4500 l 6755 4424 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -8988 4621 m 9036 4544 l 8844 4424 l 8973 4558 l 8796 4500 l cp -eoclip -n 7800 3825 m - 9000 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 8796 4500 m 8973 4558 l 8844 4424 l 8796 4500 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -6555 5790 m 6645 5790 l 6645 5563 l 6600 5743 l 6555 5563 l cp -eoclip -n 6600 5025 m - 6600 5775 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6555 5563 m 6600 5743 l 6645 5563 l 6555 5563 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -7802 3411 m 7831 3326 l 7615 3253 l 7772 3354 l 7587 3338 l cp -eoclip -n 5400 2550 m - 7803 3364 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 7587 3338 m 7772 3354 l 7615 3253 l 7587 3338 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -2971 3337 m 3000 3422 l 3215 3348 l 3031 3364 l 3186 3262 l cp -eoclip -n 5400 2550 m - 3000 3375 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3186 3262 m 3031 3364 l 3215 3348 l 3186 3262 l cp gs 0.00 setgray ef gr col0 s -/Times-Roman ff 330.00 scf sf -3075 4200 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -6675 5400 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -5475 3000 m -gs 1 -1 sc (1) col0 sh gr -/Times-Roman ff 330.00 scf sf -3825 3000 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -6900 3000 m -gs 1 -1 sc (2) col0 sh gr -/Times-Roman ff 330.00 scf sf -6975 4200 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -8475 4200 m -gs 1 -1 sc (1) col0 sh gr -/Times-Roman ff 330.00 scf sf -5475 1800 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -2850 4950 m -gs 1 -1 sc (S1) col0 sh gr -/Times-Roman ff 330.00 scf sf -5250 3750 m -gs 1 -1 sc (S2) col0 sh gr -/Times-Roman ff 330.00 scf sf -6450 6150 m -gs 1 -1 sc (S3) col0 sh gr -/Times-Roman ff 330.00 scf sf -8850 4950 m -gs 1 -1 sc (S4) col0 sh gr -/Times-Roman ff 330.00 scf sf -5355 2430 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman ff 330.00 scf sf -2963 3667 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 330.00 scf sf -7763 3675 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 330.00 scf sf -6533 4890 m -gs 1 -1 sc (k) col0 sh gr -$F2psEnd -rs diff --git a/cloog-0.17.0/doc/images/tree.fig b/cloog-0.17.0/doc/images/tree.fig deleted file mode 100644 index 9c202bbb3f7ecb9f2dc1065d2d82346ead4aa5a9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/images/tree.fig +++ /dev/null @@ -1,54 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 1200 237 237 5400 1200 5625 1275 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 3000 3600 237 237 3000 3600 3225 3675 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 7800 3600 237 237 7800 3600 8025 3675 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6600 4800 237 237 6600 4800 6825 4875 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 2325 237 237 5400 2325 5625 2400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 1425 5400 2100 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 5400 3375 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 3000 3825 3000 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 7800 3825 6600 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 7800 3825 9000 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 6600 5025 6600 5775 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 7803 3364 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 3000 3375 -4 0 0 50 0 0 22 0.0000 0 225 150 3075 4200 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6675 5400 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 5475 3000 1\001 -4 0 0 50 0 0 22 0.0000 0 225 150 3825 3000 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6900 3000 2\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6975 4200 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 8475 4200 1\001 -4 0 0 50 0 0 22 0.0000 0 225 150 5475 1800 0\001 -4 0 0 50 0 0 22 0.0000 0 225 345 2850 4950 S1\001 -4 0 0 50 0 0 22 0.0000 0 225 345 5250 3750 S2\001 -4 0 0 50 0 0 22 0.0000 0 225 345 6450 6150 S3\001 -4 0 0 50 0 0 22 0.0000 0 225 345 8850 4950 S4\001 -4 0 0 50 0 0 22 0.0000 0 225 90 5355 2430 i\001 -4 0 0 50 0 0 22 0.0000 0 300 90 2963 3667 j\001 -4 0 0 50 0 0 22 0.0000 0 300 90 7763 3675 j\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6533 4890 k\001 diff --git a/cloog-0.17.0/doc/images/tree.jpg b/cloog-0.17.0/doc/images/tree.jpg deleted file mode 100644 index 7329268b65736eafa7d05bbd39135092db60da2d..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/doc/images/tree.jpg and /dev/null differ diff --git a/cloog-0.17.0/doc/images/tree.pdf b/cloog-0.17.0/doc/images/tree.pdf deleted file mode 100644 index 7569edebb461590b8208c320a8e109fd4a44c25c..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/doc/images/tree.pdf and /dev/null differ diff --git a/cloog-0.17.0/doc/images/tree.txt b/cloog-0.17.0/doc/images/tree.txt deleted file mode 100644 index 7bcfef2882193fa78830ff5ad0c9f469b7af2e87..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/doc/images/tree.txt +++ /dev/null @@ -1,25 +0,0 @@ - * - | - |0 - | - V - i - | - +-----+-----+ - | | | - |0 |1 |2 - | | | - V V V - j S2 j - | | - |0 +--+--+ - | | | - V |0 |1 - S1 | | - V V - k S4 - | - |0 - | - V - S3 diff --git a/cloog-0.17.0/examples/README b/cloog-0.17.0/examples/README deleted file mode 100644 index 1a9881e8f89eafba23d491d952f30c056d833a69..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/examples/README +++ /dev/null @@ -1,58 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** Library use examples ** -# **-------------------------------------------------------------------** -# ** First version of this file: july 15th 2003 ** -# **-------------------------------------------------------------------**/ -# - - -In this directory are presented various examples of how to use the CLooG -library. For each case, you will need to edit the makefile file according to -your system, in particular you will have to set where your CLooG library has -been installed, and where are the CLooG header files. Don't forget to update -your LD_LIBRARY_PATH environment variable to reach the CLooG library. If you -performed the default installation of CLooG, the library is in /usr/local/lib -thus you need to set LD_LIBRARY_PATH thanks to one of the following command: -'setenv LD_LIBRARY_PATH /usr/local/lib' for tcsh-like shells, or -'export LD_LIBRARY_PATH=/usr/local/lib' for bash-like shells. - -For any problem: . - - -# **-------------------------------------------------------------------** -# ** I. Example ** -# **-------------------------------------------------------------------**/ - - -This example program creates a simple CLooG-like loop generation program in a -few lines. The input problem has to be given on standard input. We can test it -for instance by typing 'more FILE.cloog | ./example' (or example.exe under -Cygwin). - - -# **-------------------------------------------------------------------** -# ** II. cloog2loopgen ** -# **-------------------------------------------------------------------**/ - -NO MORE EXISTS ! - -This example creates a program converting a CLooG input file to a LoopGen input -file. This can be useful to compare the two tools (I do not support LoopGen, -don't ask me if you find some bugs !). The usage of the created tool is: -'cloog2loopgen input_file output_file'. - - -# **-------------------------------------------------------------------** -# ** III. cloog2Omega ** -# **-------------------------------------------------------------------**/ - - -NO MORE EXISTS ! - -This example creates a program converting a CLooG input file to an Omega -CodeGen input file. This can be useful to compare the two tools (I do not -support CodeGen, don't ask me if you find some bugs !). The usage of the -created tool is: 'cloog2omega input_file output_file'. diff --git a/cloog-0.17.0/examples/example/Makefile b/cloog-0.17.0/examples/example/Makefile deleted file mode 100644 index 9b6150b7e2ba6735637b260e81f98dff2fd5d81a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/examples/example/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Please enter here the locations for CloogLib include and libraries if they -# aren't the default values (/usr/lib and /usr/include). -CLOOG_INC = $(HOME)/progs/linux/include -CLOOG_LIB = $(HOME)/progs/linux/lib - -CC = gcc -LDLIBS= -lcloog -CFLAGS= -I $(CLOOG_INC) -L $(CLOOG_LIB) - - -example: example.c - @echo " /*-----------------------------------------------*" - @echo " * Making example *" - @echo " *-----------------------------------------------*/" - $(CC) example.c -o example $(CFLAGS) $(LDLIBS) - -clean: - @echo " /*-----------------------------------------------*" - @echo " * Cleaning example *" - @echo " *-----------------------------------------------*/" - -rm -f example example.exe core diff --git a/cloog-0.17.0/examples/example/example.c b/cloog-0.17.0/examples/example/example.c deleted file mode 100644 index 403d213674c1e10127ab80eeafc0e8e59f949ca1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/examples/example/example.c +++ /dev/null @@ -1,29 +0,0 @@ -/* This is a very simple example of how to use the CLooGLib inside your - * programs. You should compile it by typing 'make' (after edition of the - * makefile), then test it for instance by typing - * 'more FILE.cloog | ./example' (or example.exe under Cygwin). - */ - -# include -# include - -int main() -{ - CloogState *state; - CloogInput *input; - CloogOptions * options ; - struct clast_stmt *root; - - state = cloog_state_malloc(); - options = cloog_options_malloc(state); - input = cloog_input_read(stdin, options); - - root = cloog_clast_create_from_input(input, options); - clast_pprint(stdout, root, 0, options); - - cloog_clast_free(root); - cloog_options_free(options) ; - cloog_state_free(state); - - return 0 ; -} diff --git a/cloog-0.17.0/genversion.sh.in b/cloog-0.17.0/genversion.sh.in deleted file mode 100755 index 77c04d70478a9439adc369152ea7fd43bab4f60f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/genversion.sh.in +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/sh -srcdir=@abs_srcdir@ -PACKAGE=@PACKAGE@ -VERSION=@VERSION@ - -if test -f $srcdir/.git/HEAD; then - GIT_REPO="$srcdir/.git" - GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe` -elif test -f $srcdir/CLOOG_HEAD; then - GIT_HEAD_ID=`cat $srcdir/CLOOG_HEAD` -else - GIT_HEAD_ID="$PACKAGE-$VERSION-UNKNOWN" -fi - -echo $GIT_HEAD_ID | sed -e 's/cloog-//' diff --git a/cloog-0.17.0/include/cloog/block.h b/cloog-0.17.0/include/cloog/block.h deleted file mode 100644 index 95f2a443454380b878e8a3288f8c3c7174593246..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/block.h +++ /dev/null @@ -1,117 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** block.h ** - **-------------------------------------------------------------------** - ** First version: June 11th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_BLOCK_H -#define CLOOG_BLOCK_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -/** - * CloogBlock structure: - * this structure contains the informations of a statement block. It may happen - * that users are lazy enough to ask CLooG to generate the code for statements - * with exactly the same domain/scattering pair (possibly differing by only one - * constant) instead of giving only one pair. CLooG provides them a last chance - * to save time and memory by trying to find these blocks itself. The block - * contains the statement list and the common informations of the statements. - * This structure contains also the number of existing active references to it: - * because CLooG uses many copies of blocks there is no need to actually copy - * these blocks but just to return a pointer to them and to increment the number - * of active references. Each time a CloogBlock will be freed, we will decrement - * the active reference counter and actually free it if its value is zero. - */ -struct cloogblock -{ - CloogState *state; /**< State. */ - CloogStatement * statement ; /**< The list of statements in the block. */ - int nb_scaldims ; /**< Number of scalar dimensions. */ - cloog_int_t *scaldims; /**< Scalar dimension values. */ - int depth ; /**< Original block depth (outer loop number).*/ - int references ; /**< Number of references to this structure. */ - void * usr; /**< User field, for library user convenience. - * This pointer is not freed when the - * CloogBlock structure is freed. - */ -} ; -typedef struct cloogblock CloogBlock ; - - -/** - * CloogBlockList structure: - * this structure reprensents a node of a linked list of CloogBlock structures. - */ -struct cloogblocklist -{ CloogBlock * block ; /**< An element of the list. */ - struct cloogblocklist * next ;/**< Pointer to the next element of the list.*/ -} ; -typedef struct cloogblocklist CloogBlockList ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_block_print_structure(FILE *, CloogBlock *, int) ; -void cloog_block_print(FILE *, CloogBlock *) ; -void cloog_block_list_print(FILE *, CloogBlockList *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_block_free(CloogBlock *) ; -void cloog_block_list_free(CloogBlockList *) ; - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogBlock * cloog_block_malloc(CloogState *state); -CloogBlock * cloog_block_alloc(CloogStatement *statement, int nb_scaldims, - cloog_int_t *scaldims, int depth); -CloogBlockList * cloog_block_list_malloc(void); -CloogBlockList * cloog_block_list_alloc(CloogBlock *) ; -CloogBlock * cloog_block_copy(CloogBlock * block) ; -void cloog_block_merge(CloogBlock *, CloogBlock *) ; - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ - diff --git a/cloog-0.17.0/include/cloog/clast.h b/cloog-0.17.0/include/cloog/clast.h deleted file mode 100644 index b4553695b2799e576a890fb6fda8f5ca10c019e3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/clast.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef CLOOG_CLAST_H -#define CLOOG_CLAST_H -#if defined(__cplusplus) -extern "C" - { -#endif - -enum clast_expr_type { - clast_expr_name, - clast_expr_term, - clast_expr_bin, - clast_expr_red -}; -struct clast_expr { - enum clast_expr_type type; -}; - -struct clast_name { - struct clast_expr expr; - const char * name; -}; - -/* Represents the term - * val * var (if var != NULL) - * or - * val (if var == NULL) - */ -struct clast_term { - struct clast_expr expr; - cloog_int_t val; - struct clast_expr *var; -}; - -enum clast_red_type { clast_red_sum, clast_red_min, clast_red_max }; -struct clast_reduction { - struct clast_expr expr; - enum clast_red_type type; - int n; - struct clast_expr* elts[1]; -}; - -enum clast_bin_type { clast_bin_fdiv, clast_bin_cdiv, - clast_bin_div, clast_bin_mod }; -struct clast_binary { - struct clast_expr expr; - enum clast_bin_type type; - struct clast_expr* LHS; - cloog_int_t RHS; -}; - -struct clast_stmt; -struct clast_stmt_op { - void (*free)(struct clast_stmt *); -}; - -#define CLAST_STMT_IS_A(stmt, type) ((stmt)->op == &(type)) - -extern const struct clast_stmt_op stmt_root; -extern const struct clast_stmt_op stmt_ass; -extern const struct clast_stmt_op stmt_user; -extern const struct clast_stmt_op stmt_block; -extern const struct clast_stmt_op stmt_for; -extern const struct clast_stmt_op stmt_guard; - -struct clast_stmt { - const struct clast_stmt_op *op; - struct clast_stmt *next; -}; - -struct clast_root { - struct clast_stmt stmt; - CloogNames * names; /**< Names of iterators and parameters. */ -}; - -struct clast_assignment { - struct clast_stmt stmt; - const char * LHS; - struct clast_expr * RHS; -}; - -struct clast_block { - struct clast_stmt stmt; - struct clast_stmt * body; -}; - -struct clast_user_stmt { - struct clast_stmt stmt; - CloogDomain * domain; - CloogStatement * statement; - struct clast_stmt * substitutions; -}; - -struct clast_for { - struct clast_stmt stmt; - CloogDomain * domain; - const char * iterator; - struct clast_expr * LB; - struct clast_expr * UB; - cloog_int_t stride; - struct clast_stmt * body; -}; - -struct clast_equation { - struct clast_expr * LHS; - struct clast_expr * RHS; - int sign; -}; - -struct clast_guard { - struct clast_stmt stmt; - struct clast_stmt * then; - int n; - struct clast_equation eq[1]; -}; - - -struct clast_stmt *cloog_clast_create_from_input(CloogInput *input, - CloogOptions *options); -struct clast_stmt *cloog_clast_create(CloogProgram *program, - CloogOptions *options); -void cloog_clast_free(struct clast_stmt *s); - -struct clast_name *new_clast_name(const char *name); -struct clast_term *new_clast_term(cloog_int_t c, struct clast_expr *v); -struct clast_binary *new_clast_binary(enum clast_bin_type t, - struct clast_expr *lhs, cloog_int_t rhs); -struct clast_reduction *new_clast_reduction(enum clast_red_type t, int n); -struct clast_root *new_clast_root(CloogNames *names); -struct clast_assignment *new_clast_assignment(const char *lhs, - struct clast_expr *rhs); -struct clast_user_stmt *new_clast_user_stmt(CloogDomain *domain, - CloogStatement *stmt, struct clast_stmt *subs); -struct clast_block *new_clast_block(void); -struct clast_for *new_clast_for(CloogDomain *domain, const char *it, - struct clast_expr *LB, struct clast_expr *UB, - CloogStride *stride); -struct clast_guard *new_clast_guard(int n); - -void free_clast_name(struct clast_name *t); -void free_clast_term(struct clast_term *t); -void free_clast_binary(struct clast_binary *b); -void free_clast_reduction(struct clast_reduction *r); -void free_clast_expr(struct clast_expr *e); -void free_clast_stmt(struct clast_stmt *s); - -int clast_expr_equal(struct clast_expr *e1, struct clast_expr *e2); - -struct clast_expr *clast_bound_from_constraint(CloogConstraint *constraint, - int level, CloogNames *names); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/cloog.h b/cloog-0.17.0/include/cloog/cloog.h deleted file mode 100644 index a8c3f28204eba16eabdf7fcabfd1458bced3c67d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/cloog.h +++ /dev/null @@ -1,62 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** cloog.h ** - **-------------------------------------------------------------------** - ** First version: july 25th 2002 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - -/****************************************************************************** - * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM clooh.h.in BY configure * - ******************************************************************************/ - -#ifndef CLOOG_H -#define CLOOG_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* !CLOOG_H */ diff --git a/cloog-0.17.0/include/cloog/constraints.h b/cloog-0.17.0/include/cloog/constraints.h deleted file mode 100644 index 4818c4c184880d7ae6140fafbe3c2bc6f30cda90..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/constraints.h +++ /dev/null @@ -1,121 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** constraints.h ** - **-------------------------------------------------------------------** - ** First version: april 17th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_CONSTRAINTS_H -#define CLOOG_CONSTRAINTS_H - -struct cloogconstraint; -typedef struct cloogconstraint CloogConstraint; -struct cloogconstraintset; -typedef struct cloogconstraintset CloogConstraintSet; -struct cloogequalities; -typedef struct cloogequalities CloogEqualities; - -#if defined(__cplusplus) -extern "C" - { -#endif - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ -CloogEqualities *cloog_equal_alloc(int n, int nb_levels, - int nb_parameters); -void cloog_equal_free(CloogEqualities *equal); -int cloog_equal_count(CloogEqualities *equal); -int cloog_equal_type(CloogEqualities *equal, int level); -void cloog_equal_del(CloogEqualities *equal, int level); -int cloog_equal_total_dimension(CloogEqualities *equal); - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -void cloog_constraint_set_normalize(CloogConstraintSet *, int); -void cloog_constraint_set_free(CloogConstraintSet *); -int cloog_constraint_set_contains_level(CloogConstraintSet *constraints, - int level, int nb_parameters); -int cloog_constraint_set_total_dimension(CloogConstraintSet *constraints); -int cloog_constraint_set_n_iterators(CloogConstraintSet *constraints, - int nb_parameters); -CloogConstraintSet *cloog_constraint_set_copy(CloogConstraintSet *); -CloogConstraintSet *cloog_constraint_set_simplify(CloogConstraintSet *, CloogEqualities *, int, int); - -int cloog_constraint_needs_reduction(CloogConstraint *upper, int level); -CloogConstraintSet *cloog_constraint_set_for_reduction(CloogConstraint *upper, - CloogConstraint *lower); -CloogConstraintSet *cloog_constraint_set_reduce(CloogConstraintSet *constraints, - int level, CloogEqualities *equal, int nb_par, cloog_int_t *bound); -int cloog_constraint_set_foreach_constraint(CloogConstraintSet *constraints, - int (*fn)(CloogConstraint *constraint, void *user), void *user); -int cloog_constraint_is_valid(CloogConstraint *constraint); -CloogConstraint *cloog_constraint_copy(CloogConstraint *constraint); -void cloog_constraint_release(CloogConstraint *constraint); -CloogConstraint *cloog_constraint_invalid(void); -int cloog_constraint_total_dimension(CloogConstraint *constraint); - -CloogConstraint *cloog_equal_constraint(CloogEqualities *equal, int j); -void cloog_equal_add(CloogEqualities *equal, - CloogConstraintSet *constraints, - int level, CloogConstraint *line, int nb_par); - -CloogConstraint *cloog_constraint_set_defining_equality( - CloogConstraintSet *constraints, int level); -CloogConstraint *cloog_constraint_set_defining_inequalities( - CloogConstraintSet *constraints, - int level, CloogConstraint **lower, int nb_parameters); -int cloog_constraint_involves(CloogConstraint *constraint, int v); -int cloog_constraint_is_lower_bound(CloogConstraint *constraint, int v); -int cloog_constraint_is_upper_bound(CloogConstraint *constraint, int v); -int cloog_constraint_is_equality(CloogConstraint *constraint); -void cloog_constraint_constant_get(CloogConstraint *constraint, - cloog_int_t *val); -void cloog_constraint_coefficient_get(CloogConstraint *constraint, - int var, cloog_int_t *val); -void cloog_constraint_coefficient_set(CloogConstraint *constraint, - int var, cloog_int_t val); -void cloog_constraint_copy_coefficients(CloogConstraint *constraint, - cloog_int_t *dst); -CloogConstraintSet *cloog_constraint_set_drop_constraint( - CloogConstraintSet *constraints, CloogConstraint *constraint); - -struct clast_expr *cloog_constraint_variable_expr(CloogConstraint *constraint, - int level, CloogNames *names); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/domain.h b/cloog-0.17.0/include/cloog/domain.h deleted file mode 100644 index 767771ba3a57e5cc85a4182188c99cee71419e13..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/domain.h +++ /dev/null @@ -1,177 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** domain.h ** - **-------------------------------------------------------------------** - ** First version: october 28th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_DOMAIN_H -#define CLOOG_DOMAIN_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -struct cloogdomain; -typedef struct cloogdomain CloogDomain ; -struct cloogscattering; -typedef struct cloogscattering CloogScattering; -struct osl_relation; - - -/** - * CloogDomainList structure: - * this structure reprensents a node of a linked list of CloogDomain structures. - */ -struct cloogdomainlist { - CloogDomain *domain; /**< An element of the list. */ - struct cloogdomainlist *next;/**< Pointer to the next element of the list.*/ -} ; -typedef struct cloogdomainlist CloogDomainList; - - -/** - * CloogScatteringList structure: - * this structure reprensents a node of a linked list of CloogScattering structures. - */ -struct cloogscatteringlist { - CloogScattering *scatt; /**< An element of the list. */ - struct cloogscatteringlist *next;/**< Pointer to the next element of the list.*/ -} ; -typedef struct cloogscatteringlist CloogScatteringList; - - -/****************************************************************************** - * PolyLib interface * - ******************************************************************************/ -void cloog_domain_print_constraints(FILE *, CloogDomain *, - int print_number); -void cloog_scattering_print_constraints(FILE *, CloogScattering *); -void cloog_domain_free(CloogDomain *) ; -void cloog_scattering_free(CloogScattering *); -CloogDomain * cloog_domain_copy(CloogDomain *) ; -CloogDomain * cloog_domain_convex(CloogDomain * Pol) ; -CloogDomain * cloog_domain_simple_convex(CloogDomain * domain); -CloogDomain * cloog_domain_simplify(CloogDomain *, CloogDomain *) ; -CloogDomain * cloog_domain_union(CloogDomain *, CloogDomain *) ; -CloogDomain * cloog_domain_intersection(CloogDomain *, CloogDomain *) ; -CloogDomain * cloog_domain_difference(CloogDomain *, CloogDomain *) ; -void cloog_domain_sort(CloogDomain**,unsigned,unsigned,int *); -int cloog_domain_follows(CloogDomain *dom1, CloogDomain *dom2, unsigned level); -CloogDomain * cloog_domain_empty(CloogDomain *model); -int cloog_domain_is_bounded(CloogDomain *dim, unsigned level); -CloogDomain *cloog_domain_bound_splitter(CloogDomain *dom, int level); - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level, - const char *name); - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_domain_list_free(CloogDomainList *); -void cloog_scattering_list_free(CloogScatteringList *); - - -/*+**************************************************************************** - * Reading function * - ******************************************************************************/ -CloogDomain * cloog_domain_read_context(CloogState *state, FILE * foo); -CloogDomain * cloog_domain_union_read(CloogState *state, FILE *foo, int nb_par); -CloogScattering *cloog_domain_read_scattering(CloogDomain *domain, FILE *foo); - -CloogDomain * cloog_domain_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_par); -CloogScattering * cloog_scattering_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_scat, int nb_par); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogDomain *cloog_domain_from_osl_relation(CloogState *, - struct osl_relation *); -CloogScattering *cloog_scattering_from_osl_relation(CloogState *, - struct osl_relation *); -CloogConstraintSet *cloog_domain_constraints(CloogDomain *); -int cloog_domain_isempty(CloogDomain *) ; -CloogDomain * cloog_domain_universe(CloogState *state, unsigned dim); -CloogDomain * cloog_domain_project(CloogDomain *, int); -CloogDomain * cloog_domain_extend(CloogDomain *, int); -int cloog_domain_never_integral(CloogDomain *) ; -void cloog_domain_stride(CloogDomain *, int, cloog_int_t *, cloog_int_t *); -int cloog_domain_can_stride(CloogDomain *domain, int level); -int cloog_domain_is_otl(CloogDomain *domain, int level); -CloogDomain * cloog_domain_stride_lower_bound(CloogDomain *domain, int level, - CloogStride *stride); -CloogDomain * cloog_domain_add_stride_constraint(CloogDomain *domain, - CloogStride *stride); -int cloog_domain_can_unroll(CloogDomain *domain, int level, - cloog_int_t *n, CloogConstraint **lb); -CloogDomain * cloog_domain_fixed_offset(CloogDomain *domain, int level, - CloogConstraint *lb, cloog_int_t offset); -int cloog_domain_lazy_disjoint(CloogDomain *, CloogDomain *) ; -int cloog_domain_lazy_equal(CloogDomain *, CloogDomain *) ; -int cloog_scattering_lazy_block(CloogScattering *, CloogScattering *, - CloogScatteringList *, int); -int cloog_scattering_lazy_isscalar(CloogScattering *, int, - cloog_int_t *); -int cloog_domain_lazy_isconstant(CloogDomain *domain, int dimension, - cloog_int_t *value); -int cloog_scattering_list_lazy_same(CloogScatteringList *); -CloogDomain * cloog_domain_cut_first(CloogDomain *domain, CloogDomain **rest); -CloogDomain * cloog_domain_simplify_union(CloogDomain *domain); -CloogScattering * cloog_scattering_erase_dimension(CloogScattering *, int); - -int cloog_domain_dimension(CloogDomain *) ; -int cloog_domain_parameter_dimension(CloogDomain *domain); -int cloog_scattering_dimension(CloogScattering *, CloogDomain *); -int cloog_domain_isconvex(CloogDomain *) ; -CloogDomain * cloog_domain_cube(CloogState *state, - int dim, cloog_int_t min, cloog_int_t max); -CloogDomain * cloog_domain_from_context(CloogDomain *context); -CloogDomain * cloog_domain_scatter(CloogDomain *domain, CloogScattering *scatt); -int cloog_scattering_fully_specified(CloogScattering *scattering, - CloogDomain *domain); - -CloogStride *cloog_domain_list_stride(CloogDomainList *list, int level); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/input.h b/cloog-0.17.0/include/cloog/input.h deleted file mode 100644 index b3d3c533c4a3da97d71122a13b5066167d5424ce..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/input.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CLOOG_INPUT_H -#define CLOOG_INPUT_H - -#if defined(__cplusplus) -extern "C" { -#endif - -struct osl_scop; - -struct clooginput { - CloogDomain *context; - CloogUnionDomain *ud; -}; -typedef struct clooginput CloogInput; - -CloogInput *cloog_input_from_osl_scop(CloogState *, struct osl_scop *); -CloogInput *cloog_input_read(FILE *file, CloogOptions *options); -CloogInput *cloog_input_alloc(CloogDomain *context, CloogUnionDomain *ud); -void cloog_input_free(CloogInput *input); - -void cloog_input_dump_cloog(FILE *file, CloogInput *input, CloogOptions *opt); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/include/cloog/int.h b/cloog-0.17.0/include/cloog/int.h deleted file mode 100644 index 623a1cb646d92b8c85cd5469694d8adef65d25bd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/int.h +++ /dev/null @@ -1,174 +0,0 @@ -#ifndef CLOOG_INT_H -#define CLOOG_INT_H - -#include -#include -#if defined(CLOOG_INT_GMP) -#include -#include -#ifndef mp_get_memory_functions -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)); -#endif -#endif - -#if defined(__cplusplus) -extern "C" - { -#endif - -#if defined(CLOOG_INT_INT) -typedef int cloog_int_t; -#define CLOOG_INT_FORMAT "%d" -#elif defined(CLOOG_INT_LONG) -typedef long cloog_int_t; -#define CLOOG_INT_FORMAT "%ld" -#elif defined(CLOOG_INT_LONG_LONG) -typedef long long cloog_int_t; -#define CLOOG_INT_FORMAT "%lld" -#elif defined(CLOOG_INT_GMP) -typedef mpz_t cloog_int_t; -#else -#error "No integer type defined" -#endif - -#if defined(CLOOG_INT_GMP) - -#define cloog_int_init(i) mpz_init(i) -#define cloog_int_clear(i) mpz_clear(i); - -#define cloog_int_set(r,i) mpz_set(r,i) -#define cloog_int_set_si(r,i) mpz_set_si(r,i) -#define cloog_int_abs(r,i) mpz_abs(r,i) -#define cloog_int_neg(r,i) mpz_neg(r,i) -#define cloog_int_swap(i,j) mpz_swap(i,j) - -#define cloog_int_add(r,i,j) mpz_add(r,i,j) -#define cloog_int_add_ui(r,i,j) mpz_add_ui(r,i,j) -#define cloog_int_sub(r,i,j) mpz_sub(r,i,j) -#define cloog_int_sub_ui(r,i,j) mpz_sub_ui(r,i,j) -#define cloog_int_mul(r,i,j) mpz_mul(r,i,j) -#define cloog_int_addmul(r,i,j) mpz_addmul(r,i,j) -#define cloog_int_divexact(r,i,j) mpz_divexact(r,i,j) -#define cloog_int_tdiv_q(r,i,j) mpz_tdiv_q(r,i,j) -#define cloog_int_fdiv_q(r,i,j) mpz_fdiv_q(r,i,j) -#define cloog_int_fdiv_r(r,i,j) mpz_fdiv_r(r,i,j) -#define cloog_int_cdiv_q(r,i,j) mpz_cdiv_q(r,i,j) -#define cloog_int_gcd(r,i,j) mpz_gcd(r,i,j) - -#define cloog_int_sgn(i) mpz_sgn(i) -#define cloog_int_cmp(i,j) mpz_cmp(i,j) -#define cloog_int_abs_cmp(i,j) mpz_cmpabs(i,j) -#define cloog_int_cmp_si(i,si) mpz_cmp_si(i,si) -#define cloog_int_eq(i,j) (mpz_cmp(i,j) == 0) -#define cloog_int_ne(i,j) (mpz_cmp(i,j) != 0) -#define cloog_int_gt(i,j) (mpz_cmp(i,j) > 0) - -#define cloog_int_is_divisible_by(i,j) mpz_divisible_p(i,j) - -#define cloog_int_read(r,s) mpz_set_str(r,s,10) -typedef void (*cloog_int_print_gmp_free_t)(void *, size_t); -#define cloog_int_print(out,i) \ - do { \ - char *s; \ - cloog_int_print_gmp_free_t gmp_free; \ - s = mpz_get_str(0, 10, i); \ - fprintf(out, "%s", s); \ - mp_get_memory_functions(NULL, NULL, &gmp_free); \ - (*gmp_free)(s, strlen(s)+1); \ - } while (0) - -#else - -#define cloog_int_init(i) ((i) = 0) -#define cloog_int_clear(i) do { } while (0) - -#define cloog_int_set(r,i) ((r) = (i)) -#define cloog_int_set_si(r,i) ((r) = (i)) -#define cloog_int_abs(r,i) ((r) = (i) > 0 ? (i) : -(i)) -#define cloog_int_neg(r,i) ((r) = -(i)) -#define cloog_int_swap(i,j) do { \ - cloog_int_t _t = i; \ - i = j; \ - j = _t; \ - } while (0) - -#define cloog_int_add(r,i,j) ((r) = (i) + (j)) -#define cloog_int_add_ui(r,i,j) ((r) = (i) + (j)) -#define cloog_int_sub(r,i,j) ((r) = (i) - (j)) -#define cloog_int_sub_ui(r,i,j) ((r) = (i) - (j)) -#define cloog_int_mul(r,i,j) ((r) = (i) * (j)) -#define cloog_int_addmul(r,i,j) ((r) += (i) * (j)) -#define cloog_int_divexact(r,i,j) ((r) = (i) / (j)) -#define cloog_int_tdiv_q(r,i,j) ((r) = (i) / (j)) -#define cloog_int_fdiv_q(r,i,j) do { \ - assert((j) > 0); \ - (r) = (i) >= 0 ? (i) / (j) : \ - -((-(i)+(j)-1)/(j)); \ - } while (0) -#define cloog_int_fdiv_r(r,i,j) do { \ - assert((j) > 0); \ - (r) = (i) >= 0 ? (i) % (j) : \ - (j)-1 - ((-(i)+(j)-1)%(j)); \ - } while (0) -#define cloog_int_cdiv_q(r,i,j) do { \ - assert((j) > 0); \ - (r) = (i) >= 0 ? \ - ((i)+(j)-1) / (j) : \ - -(-(i)/(j)); \ - } while (0) -cloog_int_t cloog_gcd(cloog_int_t a, cloog_int_t b); -#define cloog_int_gcd(r,i,j) (r) = cloog_gcd(i,j) - -#define cloog_int_sgn(i) ((i) > 0 ? 1 : (i) < 0 ? -1 : 0) -#define cloog_int_cmp(i,j) (i - j) -#define cloog_int_abs_cmp(i,j) (((i) > 0 ? (i) : -(i)) - ((j) > 0 ? (j) : -(j))) -#define cloog_int_cmp_si(i,si) (i - si) -#define cloog_int_eq(i,j) ((i) == (j)) -#define cloog_int_ne(i,j) ((i) != (j)) -#define cloog_int_gt(i,j) ((i) > (j)) - -#define cloog_int_is_divisible_by(i,j) ((i) % (j) == 0) - -#define cloog_int_read(i,s) sscanf(s, CLOOG_INT_FORMAT, &i) -#define cloog_int_print(out,i) fprintf(out, CLOOG_INT_FORMAT, i) - -#endif - -#define cloog_int_is_pos(i) (cloog_int_sgn(i) > 0) -#define cloog_int_is_neg(i) (cloog_int_sgn(i) < 0) -#define cloog_int_is_zero(i) (cloog_int_sgn(i) == 0) -#define cloog_int_is_one(i) (cloog_int_cmp_si(i,1) == 0) -#define cloog_int_is_neg_one(i) (cloog_int_cmp_si(i,-1) == 0) -#define cloog_int_gt_si(i,si) (cloog_int_cmp_si(i,si) > 0) -#define cloog_int_ne_si(i,j) (cloog_int_cmp_si(i,j) != 0) -#define cloog_int_lt(i,j) (cloog_int_cmp(i,j) < 0) -#define cloog_int_le(i,j) (cloog_int_cmp(i,j) <= 0) -#define cloog_int_abs_ne(i,j) (cloog_int_abs_cmp(i,j) != 0) -#define cloog_int_abs_ge(i,j) (cloog_int_abs_cmp(i,j) >= 0) -#define cloog_int_abs_lt(i,j) (cloog_int_abs_cmp(i,j) < 0) - -struct cloog_vec { - unsigned size; - cloog_int_t *p; -}; - -struct cloog_vec *cloog_vec_alloc(unsigned size); -void cloog_vec_free(struct cloog_vec *vec); - -int cloog_seq_first_non_zero(cloog_int_t *p, unsigned len); -void cloog_seq_cpy(cloog_int_t *dst, cloog_int_t *src, unsigned len); -void cloog_seq_neg(cloog_int_t *dst, cloog_int_t *src, unsigned len); -void cloog_seq_combine(cloog_int_t *dst, cloog_int_t m1, cloog_int_t *src1, - cloog_int_t m2, cloog_int_t *src2, unsigned len); -void cloog_seq_gcd(cloog_int_t *p, unsigned len, cloog_int_t *gcd); -int cloog_seq_is_neg(cloog_int_t *p1, cloog_int_t *p2, unsigned len); -void cloog_seq_normalize(cloog_int_t *p, unsigned len); - -#if defined(__cplusplus) - } -#endif - -#endif diff --git a/cloog-0.17.0/include/cloog/isl/backend.h b/cloog-0.17.0/include/cloog/isl/backend.h deleted file mode 100644 index e4576d9eb98fc3e8ec732fe7c12295aedf122151..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/isl/backend.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CLOOG_ISL_BACKEND_H -#define CLOOG_ISL_BACKEND_H - -#include - -struct cloogbackend { - struct isl_ctx *ctx; - unsigned ctx_allocated : 1; -}; - -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/isl/cloog.h b/cloog-0.17.0/include/cloog/isl/cloog.h deleted file mode 100644 index 9379054e9bbdb1431e6ce1b65ea30d00ddffe448..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/isl/cloog.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CLOOG_ISL_H -#define CLOOG_ISL_H - -#ifndef CLOOG_INT_GMP -#define CLOOG_INT_GMP -#endif - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -CloogState *cloog_isl_state_malloc(struct isl_ctx *ctx); - -#if defined(__cplusplus) -} -#endif - -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/isl/constraintset.h b/cloog-0.17.0/include/cloog/isl/constraintset.h deleted file mode 100644 index c3c2eed77c084ce0f5b56fb6c6148970925e9a10..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/isl/constraintset.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef CLOOG_ISL_CONSTRAINTSET_H -#define CLOOG_ISL_CONSTRAINTSET_H - -#include - -#if defined(__cplusplus) -extern "C" - { -#endif - -struct cloogconstraintset { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -struct cloogequalities { - int n; - unsigned total_dim; - isl_constraint **constraints; - int *types; -}; - -struct cloogconstraint { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -CloogConstraintSet *cloog_constraint_set_from_isl_basic_set(struct isl_basic_set *bset); -CloogConstraint *cloog_constraint_from_isl_constraint(struct isl_constraint *constraint); -isl_constraint *cloog_constraint_to_isl(CloogConstraint *constraint); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/isl/domain.h b/cloog-0.17.0/include/cloog/isl/domain.h deleted file mode 100644 index 427d8472c0a5b07fbdb62e953ef141bd54d93555..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/isl/domain.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef CLOOG_ISL_DOMAIN_H -#define CLOOG_ISL_DOMAIN_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" - { -#endif - - -struct cloogdomain { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -struct cloogscattering { - int dummy; /* Solaris cc doesn't like zero-sized structs */ -}; - -CloogDomain *cloog_domain_from_isl_set(struct isl_set *set); -CloogScattering *cloog_scattering_from_isl_map(struct isl_map *map); -CloogUnionDomain *cloog_union_domain_from_isl_union_map( - __isl_take isl_union_map *umap); -CloogUnionDomain *cloog_union_domain_from_isl_set( - __isl_take isl_set *set); - -__isl_give isl_set *isl_set_from_cloog_domain(CloogDomain *domain); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/loop.h b/cloog-0.17.0/include/cloog/loop.h deleted file mode 100644 index b62a274529dab2193380c44566d1f5f0300eb0fd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/loop.h +++ /dev/null @@ -1,120 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** loop.h ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_LOOP_H -#define CLOOG_LOOP_H -#if defined(__cplusplus) -extern "C" - { -#endif - -/** - * CloogLoop structure: - * this structure contains all the informations of a loop generated or to be - * generated. - * - if the loop has not been processed yet (it is not a result of a call to - * cloog_loop_generate), the domain is the whole iteration domain of a given - * block, the stride is 1 (i.e. there is no stride), block is necessarily not - * NULL and inner is NULL. - * - if the loop comes as a result of a cloog_loop_generate call, the domain - * describes the constraints (guards and loop bounds) for only one dimension - * (the last one: outer dimensions being considered as parameters), the stride - * may differ from one (this means that on the considered dimension, a step of - * 'stride' must be considered between integral point, the first integral - * point to be considered being the lower bound of the loop), inner may differ - * from NULL, meaning that there are further dimensions and nesting levels in - * the loop. - */ -struct cloogloop -{ - CloogState *state; /**< State. */ - CloogDomain * domain ; /**< The iteration domain. */ - CloogDomain *unsimplified; /**< Unsimplified version of domain. */ - int otl; /**< Loop is executed at most once. */ - CloogStride *stride; /**< If not NULL, stride information on iterator - * (filled only after loop generation). - */ - CloogBlock * block ; /**< The included statement block, NULL if none.*/ - void * usr; /**< User field, for library user convenience. - * This pointer is not freed when the - * CloogLoop structure is freed. - */ - struct cloogloop * inner ; /**< Loops at the next level. */ - struct cloogloop * next ; /**< Next loop at the same level. */ -} ; -typedef struct cloogloop CloogLoop ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_loop_print_structure(FILE *, CloogLoop *, int) ; -void cloog_loop_print(FILE *, CloogLoop *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_loop_free(CloogLoop *) ; - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ -CloogLoop *cloog_loop_from_domain(CloogState *state, CloogDomain *domain, - int number); -CloogLoop * cloog_loop_read(CloogState *state, - FILE * foo, int number, int nb_parameters); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogLoop * cloog_loop_block(CloogLoop *loop, int *scaldims, int nb_scattdims); -CloogLoop * cloog_loop_malloc(CloogState *state); -CloogLoop *cloog_loop_generate(CloogLoop *loop, CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options); -CloogLoop *cloog_loop_simplify(CloogLoop *loop, CloogDomain *context, int level, - int nb_scattdims, CloogOptions *options); -void cloog_loop_scatter(CloogLoop *, CloogScattering *); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/matrix.h b/cloog-0.17.0/include/cloog/matrix.h deleted file mode 100644 index 2b73039e126083090be4e79d8935b2d19d9938f3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/matrix.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef CLOOG_MATRIX_H -#define CLOOG_MATRIX_H -#if defined(__cplusplus) -extern "C" - { -#endif - -/* The CloogMatrix structure is equivalent to the PolyLib Matrix data structure - * (see Wil93). This structure is devoted to represent a set of constraints. - * - * The whole matrix is stored in memory row after row at the p_Init address. p - * is an array of pointers where p[i] points to the first element of the i^{th - * row. NbRows and NbColumns are respectively the number of rows and columns of - * the matrix. Each row corresponds to a constraint. The first element of each - * row is an equality/inequality tag. The constraint is an equality p(x) = 0 if - * the first element is 0, but it is an inequality p(x) \geq 0 if the first - * element is 1. The next elements are the unknown coefficients, followed by - * the parameter coefficients, then the constant term. For instance, the - * following three constraints: - * - * -i + m = 0 - * -j + n >= 0 - * i + j - k >= 0 - * - * would be represented by the following rows: - * - * # eq/in i j k m n cst - * 0 0 -1 0 1 0 0 - * 1 -1 0 0 0 1 0 - * 1 1 1 -1 0 0 0 - * - * To be able to provide different precision version (CLooG supports 32 bits, - * 64 bits and arbitrary precision through the GMP library), the cloog_int_t - * type depends on the configuration options (it may be long int for 32 bits - * version, long long int for 64 bits version, and mpz_t for multiple precision - * version). */ - -struct cloogmatrix -{ unsigned NbRows; /* Number of rows. */ - unsigned NbColumns; /* Number of columns. */ - cloog_int_t ** p; /* Array of pointers to the matrix rows. */ - cloog_int_t * p_Init; /* Matrix rows contiguously in memory. */ -}; - -typedef struct cloogmatrix CloogMatrix; - -CloogMatrix *cloog_matrix_alloc (unsigned, unsigned); -void cloog_matrix_free (CloogMatrix *); -void cloog_matrix_print_structure(FILE *file, CloogMatrix *M, - const char *prefix, const char *suffix); -CloogMatrix *cloog_matrix_read(FILE *input); -CloogMatrix *cloog_matrix_read_of_size(FILE *input, - unsigned n_row, unsigned n_col); -void cloog_matrix_print(FILE*, CloogMatrix*); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/matrix/constraintset.h b/cloog-0.17.0/include/cloog/matrix/constraintset.h deleted file mode 100644 index 50231629f905b63efa6fff8708881d51daca21ca..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/matrix/constraintset.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef CLOOG_MATRIX_CONSTRAINTSET_H -#define CLOOG_MATRIX_CONSTRAINTSET_H - -#if defined(__cplusplus) -extern "C" - { -#endif - -struct cloogconstraintset { - CloogMatrix M; -}; - -struct cloogequalities { - CloogConstraintSet *constraints; - int *types; -}; - -struct cloogconstraint { - CloogConstraintSet *set; - cloog_int_t **line; -}; - -CloogConstraintSet *cloog_constraint_set_from_cloog_matrix(CloogMatrix *M); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/names.h b/cloog-0.17.0/include/cloog/names.h deleted file mode 100644 index 7f566f1ed6436973da7a2a227aeddb2620bb62c7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/names.h +++ /dev/null @@ -1,103 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** names.h ** - **-------------------------------------------------------------------** - ** First version: august 1st 2002 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_NAMES_H -#define CLOOG_NAMES_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -# define MAX_NAME 50 -# define FIRST_PARAMETER 'M' -# define FIRST_ITERATOR 'i' - - -/** - * CloogNames structure: - * this structure contains all the informations about parameter and iterator - * names (as strings). - */ -struct cloognames -{ int nb_scalars ; /**< Scalar dimension number. */ - int nb_scattering ; /**< Scattering iterator number. */ - int nb_iterators ; /**< Iterator number. */ - int nb_parameters ; /**< Parameter number. */ - char ** scalars ; /**< The scalar names (an array of strings). */ - char ** scattering ; /**< The scattering names (an array of strings). */ - char ** iterators ; /**< The iterator names (an array of strings). */ - char ** parameters ; /**< The parameter names (an array of strings). */ - int references; /**< Number of references to this structure. */ -} ; -typedef struct cloognames CloogNames ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_names_print_structure(FILE *, CloogNames *, int) ; -void cloog_names_print(FILE *, CloogNames *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_names_free(CloogNames *) ; - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ -char ** cloog_names_read_strings(FILE *file, int nb_items); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogNames * cloog_names_malloc(void); -CloogNames * cloog_names_copy(CloogNames *names); -CloogNames * cloog_names_alloc(void); -char ** cloog_names_generate_items(int, char *, char) ; -CloogNames * cloog_names_generate(int, int, int, int, char, char, char, char) ; -void cloog_names_scalarize(CloogNames *, int, int *) ; -const char * cloog_names_name_at_level(CloogNames *names, int level); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/options.h b/cloog-0.17.0/include/cloog/options.h deleted file mode 100644 index 223357905d2dce705933e0359a92cc52cefb5caa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/options.h +++ /dev/null @@ -1,165 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** options.h ** - **-------------------------------------------------------------------** - ** First version: april 19th 2003 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - -#include - -#ifndef CLOOG_OPTIONS_H -#define CLOOG_OPTIONS_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -/* Uncomment the following line if you want some information about - * maximum total allocated memory for code generation. -#define CLOOG_MEMORY - */ -#define CLOOG_SCALARS - -struct osl_scop; - -struct cloogoptions; -typedef struct cloogoptions CloogOptions; -struct osl_scop; - -struct cloogoptions -{ - CloogState *state; /* State. */ - /* OPTIONS FOR LOOP GENERATION */ - int l ; /* Last level to optimize. */ - int f ; /* First level to optimize. */ - int stop ; /* Level to stop code generation. */ - int strides ; /* 1 if user wants to handle non-unit strides (then loop - * increment can be something else than one), 0 otherwise. - */ - int sh; /* 1 for computing simple hulls */ - int first_unroll; /* The first dimension to unroll */ - - /* OPTIONS FOR PRETTY PRINTING */ - int esp ; /* 1 if user wants to spread all equalities, i.e. when there - * is something like "i = 3*j + 1 ; A[i] = 0 ;" the generator - * will write "A[3*j + 1] = 0 ;", 0 otherwise. - */ - int fsp ; /* The iteration level where equalities spreading can begin - * (it might happen that the user wants not to spread values - * of scattering iterators). - */ - int otl ; /* 1 for eliminate loops running just one time and write them - * as an affectation of the iterator, 0 otherwise. - */ - int block ; /* 1 to make one new block {...} per new dimension, - * 0 otherwise. - */ - int compilable; /* 1 to generate a compilable code by using - * preprocessing, 0 otherwise. - */ - int callable; /* 1 to generate callable code by using - * preprocessing, 0 otherwise. - */ - int language; /* 1 to generate FORTRAN, 0 for C otherwise. */ - - int save_domains;/* Save unsimplified copy of domain. */ - - /* MISC OPTIONS */ - char * name ; /* Name of the input file. */ - float time ; /* Time spent for code generation in seconds. */ - int openscop; /* 1 if the input file has OpenScop format, 0 otherwise. */ - struct osl_scop *scop; /* Input OpenScop scop if any, NULL otherwise. */ -#ifdef CLOOG_MEMORY - int memory ; /* Memory spent for code generation in kilobytes. */ -#endif - int quiet; /* Don't print any informational messages. */ - /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */ - int leaks ; /* 1 if I want to print the allocation statistics, - * 0 otherwise. - */ - int backtrack; /* 1 to perform backtracking in - * Quillere's algorithm, 0 otherwise. - */ - int override ; /* 1 if I want to bypass CLooG decisions on option correctness - * (generated code may be incorrect), 0 otherwise. - */ - int structure ; /* 1 if I want to print the CloogProgram structure before the - * pretty printed code, 0 otherwise. - */ - int noblocks ; /* 1 if I don't want to make statement blocks, 0 otherwise. */ - int noscalars ; /* 1 if I don't want to use scalar dimensions, 0 otherwise. */ - int nosimplify; /* 1 if I don't want to simplify polyhedra, 0 otherwise. */ -} ; - - -/****************************************************************************** - * Error reporting functions * - ******************************************************************************/ - -enum cloog_msg_type { CLOOG_ERROR, CLOOG_WARNING, CLOOG_INFO }; - -void cloog_msg(CloogOptions *options, enum cloog_msg_type type, - const char *msg, ...); -void cloog_die(const char *msg, ...); - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_options_print(FILE *, CloogOptions *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_options_free(CloogOptions *) ; - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ -void cloog_options_read(CloogState *state, int argc, char **argv, - FILE **input, FILE **output, CloogOptions **options); - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogOptions *cloog_options_malloc(CloogState *state); -void cloog_options_copy_from_osl_scop(struct osl_scop *, CloogOptions *); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/pprint.h b/cloog-0.17.0/include/cloog/pprint.h deleted file mode 100644 index 55e2b5e14560e88d5ee16b47bdaf1c61a6181c20..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/pprint.h +++ /dev/null @@ -1,67 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** pprint.h ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_PPRINT_H -#define CLOOG_PPRINT_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -# define MAX_STRING_VAL 32 -# define INDENT_STEP 2 - -# define EQTYPE_NONE 0 -# define EQTYPE_CONSTANT 1 -# define EQTYPE_PUREITEM 2 -# define EQTYPE_EXAFFINE 3 - -#define CLOOG_LANGUAGE_C 0 -#define CLOOG_LANGUAGE_FORTRAN 1 - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void clast_pprint(FILE *foo, struct clast_stmt *root, int indent, - CloogOptions *options); - - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/program.h b/cloog-0.17.0/include/cloog/program.h deleted file mode 100644 index 530d21f2e0959a7b18824cd3f7399351b36a8461..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/program.h +++ /dev/null @@ -1,116 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** program.h ** - **-------------------------------------------------------------------** - ** First version: october 25th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_PROGRAM_H -#define CLOOG_PROGRAM_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -# define MAX_STRING 1024 -# define MEGA 1000000 /* One million. */ - - -/** - * CloogProgram structure: - * this structure contains all the informations of a program generated or to be - * generated. - */ -struct cloogprogram -{ /* Basic program description fields. */ - char language ; /**< The language of the program. */ - int nb_scattdims ; /**< Scattering dimension number. */ - CloogDomain * context ; /**< The context of the program. */ - CloogLoop * loop ; /**< The loops of the program. */ - CloogNames * names ; /**< Iterators and parameters names. */ - CloogBlockList * blocklist ; /**< The statement block list. */ - - /* Internal service fields, filled up by cloog_program_scatter function. */ - int * scaldims ; /**< Boolean array saying whether a given - * scattering dimension is scalar or not. - */ - /* Library user reserved field. */ - void * usr; /**< User field, for library user convenience. - * This pointer is not freed when the - * CloogProgram structure is freed. - */ -} ; -typedef struct cloogprogram CloogProgram ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_program_print_structure(FILE *, CloogProgram *, int) ; -void cloog_program_print(FILE *, CloogProgram *) ; -void cloog_program_pprint(FILE *, CloogProgram *, CloogOptions *) ; -void cloog_program_dump_cloog(FILE *, CloogProgram *, CloogScatteringList *); - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_program_free(CloogProgram *) ; - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ -CloogProgram * cloog_program_read(FILE *, CloogOptions *) ; - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogProgram * cloog_program_malloc(void); -CloogProgram * cloog_program_alloc(CloogDomain *context, CloogUnionDomain *ud, - CloogOptions *options); -CloogProgram * cloog_program_generate(CloogProgram *, CloogOptions *) ; -void cloog_program_block(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options); -void cloog_program_extract_scalars(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options); -void cloog_program_scatter(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ - diff --git a/cloog-0.17.0/include/cloog/state.h b/cloog-0.17.0/include/cloog/state.h deleted file mode 100644 index ebc3272507d5de76ac45845649682931ff88b23f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/state.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef CLOOG_STATE_H -#define CLOOG_STATE_H - -struct cloogbackend; -typedef struct cloogbackend CloogBackend; - -#if defined(__cplusplus) -extern "C" { -#endif - -struct cloogstate { - CloogBackend *backend; - - cloog_int_t zero; - cloog_int_t one; - cloog_int_t negone; - - int block_allocated; - int block_freed; - int block_max; - - int domain_allocated; - int domain_freed; - int domain_max; - - int loop_allocated; - int loop_freed; - int loop_max; - - int statement_allocated; - int statement_freed; - int statement_max; -}; -typedef struct cloogstate CloogState; - -CloogState *cloog_core_state_malloc(void); -CloogState *cloog_state_malloc(void); - -void cloog_core_state_free(CloogState *state); -void cloog_state_free(CloogState *state); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/include/cloog/statement.h b/cloog-0.17.0/include/cloog/statement.h deleted file mode 100644 index abc505e10ed4eac1d9d9ddc0512b589ee50410ed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/statement.h +++ /dev/null @@ -1,85 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** statement.h ** - **-------------------------------------------------------------------** - ** First version: november 4th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_STATEMENT_H -#define CLOOG_STATEMENT_H -#if defined(__cplusplus) -extern "C" - { -#endif - - -struct cloogstatement -{ - CloogState *state; /* State. */ - char *name; /* Name of the statement. */ - int number; /* The statement unique number. */ - void * usr ; /* A pointer for library users convenience. */ - struct cloogstatement * next ; /* Pointer to the next statement with the - * same original domain and the same - * scattering function. - */ -} ; -typedef struct cloogstatement CloogStatement ; - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ -void cloog_statement_print_structure(FILE *, CloogStatement *, int) ; -void cloog_statement_print(FILE *, CloogStatement *) ; - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ -void cloog_statement_free(CloogStatement *) ; - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ -CloogStatement * cloog_statement_malloc(CloogState *state); -CloogStatement * cloog_statement_alloc(CloogState *state, int); -CloogStatement * cloog_statement_copy(CloogStatement *) ; -void cloog_statement_add(CloogStatement**, CloogStatement**, CloogStatement*) ; - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ - diff --git a/cloog-0.17.0/include/cloog/stride.h b/cloog-0.17.0/include/cloog/stride.h deleted file mode 100644 index f93dc4e3f867c724c7b47c097f7c2894387853da..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/stride.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef CLOOG_STRIDE_H -#define CLOOG_STRIDE_H - -#if defined(__cplusplus) -extern "C" { -#endif - -/** - * Information about strides. - */ -struct cloogstride { - int references; - cloog_int_t stride; /**< The actual stride. */ - cloog_int_t offset; /**< Offset of strided loop. */ - cloog_int_t factor; - CloogConstraint *constraint; -}; -typedef struct cloogstride CloogStride; - -CloogStride *cloog_stride_alloc(cloog_int_t stride, cloog_int_t offset); -CloogStride *cloog_stride_alloc_from_constraint(cloog_int_t stride, - CloogConstraint *constraint, cloog_int_t factor); -CloogStride *cloog_stride_copy(CloogStride *stride); -void cloog_stride_free(CloogStride *stride); - -CloogConstraint *cloog_constraint_stride_lower_bound(CloogConstraint *c, - int level, CloogStride *stride); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/include/cloog/union_domain.h b/cloog-0.17.0/include/cloog/union_domain.h deleted file mode 100644 index 5c6ff86fdca688bfa35bda3ecc6ab1699de37398..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/union_domain.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef CLOOG_UNION_DOMAIN_H -#define CLOOG_UNION_DOMAIN_H - -#if defined(__cplusplus) -extern "C" { -#endif - -struct osl_scop; - -/** - * CloogNamedDomainList structure: - * this structure reprensents a node of a linked list of CloogDomain structures. - */ -struct cloognameddomainlist { - CloogDomain *domain; /**< An element of the list. */ - CloogScattering *scattering; /**< Scattering function for domain. */ - char *name; /**< Name of the domain. */ - void *usr; /**< A pointer for library user's convenience. */ - struct cloognameddomainlist *next;/**< Pointer to the next element of the list.*/ -}; -typedef struct cloognameddomainlist CloogNamedDomainList; - -/** - * A structure representing the input domains and scattering functions. - */ -struct clooguniondomain { - int n_name[3]; - char **name[3]; - CloogNamedDomainList *domain; - CloogNamedDomainList **next_domain; -}; -typedef struct clooguniondomain CloogUnionDomain; - -enum cloog_dim_type { CLOOG_PARAM, CLOOG_ITER, CLOOG_SCAT }; - -CloogUnionDomain *cloog_union_domain_read(FILE *file, int nb_par, - CloogOptions *options); -CloogUnionDomain *cloog_union_domain_alloc(int nb_par); -CloogUnionDomain *cloog_union_domain_add_domain(CloogUnionDomain *ud, - const char *name, CloogDomain *domain, CloogScattering *scattering, - void *usr); -CloogUnionDomain *cloog_union_domain_set_name(CloogUnionDomain *ud, - enum cloog_dim_type type, int index, const char *name); -void cloog_union_domain_free(CloogUnionDomain *ud); -CloogUnionDomain *cloog_union_domain_from_osl_scop(CloogState *, - struct osl_scop *); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/include/cloog/version.h b/cloog-0.17.0/include/cloog/version.h deleted file mode 100644 index 18a0db9efa9b9eec337ac83f993118846c6f984b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/version.h +++ /dev/null @@ -1,50 +0,0 @@ -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_VERSION_H -#define CLOOG_VERSION_H -#if defined(__cplusplus) -extern "C" - { -#endif - -#define CLOOG_VERSION_MAJOR 0 -#define CLOOG_VERSION_MINOR 17 -#define CLOOG_VERSION_REVISION 0 - -const char *cloog_version(void); - -int cloog_version_major(void); - -int cloog_version_minor(void); - -int cloog_version_revision(void); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/include/cloog/version.h.in b/cloog-0.17.0/include/cloog/version.h.in deleted file mode 100644 index cee91a04debce3511c7336276ee6f206a76e7b4f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/include/cloog/version.h.in +++ /dev/null @@ -1,50 +0,0 @@ -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#ifndef CLOOG_VERSION_H -#define CLOOG_VERSION_H -#if defined(__cplusplus) -extern "C" - { -#endif - -#define CLOOG_VERSION_MAJOR @VERSION_MAJOR@ -#define CLOOG_VERSION_MINOR @VERSION_MINOR@ -#define CLOOG_VERSION_REVISION @VERSION_REVISION@ - -const char *cloog_version(void); - -int cloog_version_major(void); - -int cloog_version_minor(void); - -int cloog_version_revision(void); - -#if defined(__cplusplus) - } -#endif -#endif /* define _H */ diff --git a/cloog-0.17.0/isl/AUTHORS b/cloog-0.17.0/isl/AUTHORS deleted file mode 100644 index 965ed119ef497a5205910e7539565b4338ba766b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/AUTHORS +++ /dev/null @@ -1,19 +0,0 @@ -isl was written by - - Sven Verdoolaege -2006-2007 Leiden Institute of Advanced Computer Science - Universiteit Leiden - Niels Bohrweg 1 - 2333 CA Leiden - The Netherlands -2008-2009 K.U.Leuven - Departement Computerwetenschappen - Celestijnenlaan 200A - B-3001 Leuven - Belgium -2010 INRIA Saclay - Ile-de-France - Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod - 91893 Orsay - France - -The quicksort implementation was written by Douglas C. Schmidt. diff --git a/cloog-0.17.0/isl/ChangeLog b/cloog-0.17.0/isl/ChangeLog deleted file mode 100644 index 506e95d9e4bf9d33613e261735715f1a540a7fe7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/ChangeLog +++ /dev/null @@ -1,64 +0,0 @@ -version: 0.08 -date: Fri Oct 21 12:36:20 CEST 2011 -changes: - - improved parsing - - drop isl_div abstraction - - rename isl_dim to isl_space - - |- - explicitly differentiate between spaces of maps, - sets and parameter sets - - add support for identifiers - - add support for (piecewise) multi quasi-affine expressions - - preliminary Python bindings ---- -version: 0.07 -date: Tue Jul 12 19:34:51 CEST 2011 -changes: - - hide internal structures of isl_div and isl_constraint - - preliminary scheduling - - add support for local spaces and (piecewise) quasi-affine expressions ---- -version: 0.06 -date: Fri Mar 18 15:59:16 CET 2011 -changes: - - improved parsing - - consistency changes in API - - hide internal structure of isl_ctx ---- -version: 0.05.1 -date: Wed Jan 5 10:21:42 CET 2011 -changes: - - fix simple symmetry detection in parametric integer programming ---- -version: 0.05 -date: Thu Dec 23 17:03:14 CET 2010 -changes: - - rename header files from isl_header.h to isl/header.h - - add higher level interface for dependence analysis - - improved argument parsing - - optionally triangulate domains during Bernstein expansion - - support extended PolyLib format - - hide internal structure of some data types - - improved coalescing - - add simple symmetry detection in parametric integer programming ---- -version: 0.04 -date: Fri Sep 10 12:57:50 CEST 2010 -changes: - - rename isl_pw_qpolynomial_fold_add - - add isl_map_apply_pw_qpolynomial_fold - - support named and nested spaces - - support union sets and maps - - add public API for matrices ---- -version: 0.03 -date: Tue Jun 29 13:16:46 CEST 2010 -changes: - - new printing functions - - support for "may" accesses in dependence analysis - - improved coalescing - - improved transitive closure - - fix several hard to trigger bugs - - improved argument parsing - - support parametric vertex enumeration for barvinok - - optionally use Bernstein expansion to compute bounds diff --git a/cloog-0.17.0/isl/GIT_HEAD_ID b/cloog-0.17.0/isl/GIT_HEAD_ID deleted file mode 100644 index eb4dbb1cf360245d2cefe95c1d23bea595c9e108..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/GIT_HEAD_ID +++ /dev/null @@ -1 +0,0 @@ -isl-0.08-60-g60518c5 diff --git a/cloog-0.17.0/isl/Makefile.am b/cloog-0.17.0/isl/Makefile.am deleted file mode 100644 index 5a8d307c36d7f8242e74a548488ff815b81e9d14..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/Makefile.am +++ /dev/null @@ -1,274 +0,0 @@ -if HAVE_CLANG - MAYBE_INTERFACE = interface -endif -SUBDIRS = . $(MAYBE_INTERFACE) doc -DIST_SUBDIRS = $(MAYBE_INTERFACE) doc - -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = nostdinc - -lib_LTLIBRARIES = libisl.la -noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \ - isl_polyhedron_minimize isl_polytope_scan \ - isl_polyhedron_detect_equalities isl_cat \ - isl_closure isl_bound -TESTS = isl_test pip_test.sh bound_test.sh - -if HAVE_PIPLIB -ISL_PIPLIB = \ - isl_lp_piplib.c \ - isl_map_piplib.c \ - isl_sample_piplib.c \ - isl_sample_piplib.h \ - isl_piplib.c -else -ISL_PIPLIB = \ - isl_lp_no_piplib.c \ - isl_map_no_piplib.c \ - isl_sample_no_piplib.c -endif - -if NEED_GET_MEMORY_FUNCTIONS -GET_MEMORY_FUNCTIONS=mp_get_memory_functions.c -endif - -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/ -AM_CFLAGS = @WARNING_FLAGS@ - -libisl_la_SOURCES = \ - $(ISL_PIPLIB) \ - $(GET_MEMORY_FUNCTIONS) \ - isl_aff.c \ - isl_aff_private.h \ - isl_affine_hull.c \ - isl_arg.c \ - isl_band.c \ - isl_band_private.h \ - isl_basis_reduction.h \ - basis_reduction_tab.c \ - isl_bernstein.c \ - isl_bernstein.h \ - isl_blk.c \ - isl_bound.c \ - isl_bound.h \ - isl_coalesce.c \ - isl_constraint.c \ - isl_constraint_private.h \ - isl_convex_hull.c \ - isl_ctx.c \ - isl_ctx_private.h \ - isl_dim.c \ - isl_dim_map.h \ - isl_dim_map.c \ - isl_equalities.c \ - isl_equalities.h \ - isl_factorization.c \ - isl_factorization.h \ - isl_farkas.c \ - isl_flow.c \ - isl_fold.c \ - isl_gmp.c \ - isl_hash.c \ - isl_hmap_map_basic_set.c \ - isl_hmap_map_basic_set.h \ - isl_ilp.c \ - isl_input.c \ - isl_list.c \ - isl_list_private.h \ - isl_local_space_private.h \ - isl_local_space.c \ - isl_lp.c \ - isl_lp_piplib.h \ - isl_map.c \ - isl_map_simplify.c \ - isl_map_subtract.c \ - isl_map_private.h \ - isl_map_piplib.h \ - isl_mat.c \ - isl_mat_private.h \ - isl_morph.c \ - isl_morph.h \ - isl_id.c \ - isl_id_private.h \ - isl_obj.c \ - isl_options.c \ - isl_options_private.h \ - isl_output.c \ - isl_qsort.c \ - isl_qsort.h \ - isl_piplib.h \ - isl_point_private.h \ - isl_point.c \ - isl_polynomial_private.h \ - isl_polynomial.c \ - isl_printer_private.h \ - isl_printer.c \ - print.c \ - isl_range.c \ - isl_range.h \ - isl_reordering.c \ - isl_reordering.h \ - isl_sample.h \ - isl_sample.c \ - isl_scan.c \ - isl_scan.h \ - isl_schedule.c \ - isl_schedule_private.h \ - isl_space.c \ - isl_space_private.h \ - isl_stream.c \ - isl_stream_private.h \ - isl_seq.c \ - isl_tab.c \ - isl_tab.h \ - isl_tab_pip.c \ - isl_transitive_closure.c \ - isl_union_map.c \ - isl_union_map_private.h \ - isl_vec.c \ - isl_version.c \ - isl_vertices_private.h \ - isl_vertices.c -EXTRA_libisl_la_SOURCES = \ - isl_lp_piplib.c \ - isl_lp_no_piplib.c \ - isl_map_piplib.c \ - isl_map_no_piplib.c \ - isl_sample_no_piplib.c \ - isl_sample_piplib.c \ - isl_sample_piplib.h \ - isl_piplib.c -libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@ -libisl_la_LDFLAGS = -version-info @versioninfo@ \ - @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@ -libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@ - -isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_test_LDFLAGS = @GMP_LDFLAGS@ -isl_test_LDADD = libisl.la @GMP_LIBS@ - -isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_sample_LDADD = libisl.la -isl_polyhedron_sample_SOURCES = \ - polyhedron_sample.c - -isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_pip_LDFLAGS = @GMP_LDFLAGS@ -isl_pip_LDADD = libisl.la @GMP_LIBS@ -isl_pip_SOURCES = \ - pip.c - -isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_bound_LDFLAGS = @GMP_LDFLAGS@ -isl_bound_LDADD = libisl.la @GMP_LIBS@ -isl_bound_SOURCES = \ - bound.c - -isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_minimize_LDFLAGS = @GMP_LDFLAGS@ -isl_polyhedron_minimize_LDADD = libisl.la @GMP_LIBS@ -isl_polyhedron_minimize_SOURCES = \ - polyhedron_minimize.c - -isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polytope_scan_LDADD = libisl.la -isl_polytope_scan_SOURCES = \ - polytope_scan.c - -isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_detect_equalities_LDADD = libisl.la -isl_polyhedron_detect_equalities_SOURCES = \ - polyhedron_detect_equalities.c - -isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_cat_LDADD = libisl.la -isl_cat_SOURCES = \ - cat.c - -isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_closure_LDADD = libisl.la -isl_closure_SOURCES = \ - closure.c - -nodist_pkginclude_HEADERS = \ - include/isl/config.h \ - include/isl/stdint.h -pkginclude_HEADERS = \ - include/isl/aff.h \ - include/isl/aff_type.h \ - include/isl/arg.h \ - include/isl/band.h \ - include/isl/blk.h \ - include/isl/constraint.h \ - include/isl/ctx.h \ - include/isl/dim.h \ - include/isl/flow.h \ - include/isl/id.h \ - include/isl/ilp.h \ - include/isl/int.h \ - include/isl/hash.h \ - include/isl/list.h \ - include/isl/local_space.h \ - include/isl/lp.h \ - include/isl/mat.h \ - include/isl/map.h \ - include/isl/map_type.h \ - include/isl/multi.h \ - include/isl/obj.h \ - include/isl/options.h \ - include/isl/point.h \ - include/isl/polynomial.h \ - include/isl/polynomial_type.h \ - include/isl/printer.h \ - include/isl/schedule.h \ - include/isl/seq.h \ - include/isl/set.h \ - include/isl/set_type.h \ - include/isl/space.h \ - include/isl/stream.h \ - include/isl/union_map.h \ - include/isl/union_set.h \ - include/isl/vec.h \ - include/isl/version.h \ - include/isl/vertices.h - -EXTRA_DIST = \ - isl_config_post.h \ - basis_reduction_templ.c \ - isl_list_templ.c \ - isl_list_templ.h \ - isl_multi_templ.c \ - isl_multi_templ.h \ - print_templ.c \ - isl_pw_templ.c \ - isl_union_templ.c \ - isl.py \ - doc/chicago.bst \ - doc/chicago.sty \ - doc/implementation.tex \ - doc/isl.bib \ - doc/mypod2latex \ - doc/manual.tex \ - doc/user.pod \ - test_inputs - -dist-hook: - echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID - (cd doc; make manual.pdf) - cp doc/manual.pdf $(distdir)/doc/ - -pkgconfigdir=$(pkgconfig_libdir) -pkgconfig_DATA = $(pkgconfig_libfile) - -gitversion.h: @GIT_HEAD@ - $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@ - -install-data-local: $(srcdir)/isl.py - @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \ - $(builddir)/libisl.la`; \ - case $$libisl in \ - '') echo Cannot find isl library name. GDB bindings not installed.;; \ - *) echo $(INSTALL_DATA) $(srcdir)/isl.py \ - $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ - $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac diff --git a/cloog-0.17.0/isl/Makefile.in b/cloog-0.17.0/isl/Makefile.in deleted file mode 100644 index 0a62eeea134131d56ee3eed8fe7bd3c4ba109646..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/Makefile.in +++ /dev/null @@ -1,2227 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = isl_test$(EXEEXT) isl_polyhedron_sample$(EXEEXT) \ - isl_pip$(EXEEXT) isl_polyhedron_minimize$(EXEEXT) \ - isl_polytope_scan$(EXEEXT) \ - isl_polyhedron_detect_equalities$(EXEEXT) isl_cat$(EXEEXT) \ - isl_closure$(EXEEXT) isl_bound$(EXEEXT) -TESTS = isl_test$(EXEEXT) pip_test.sh bound_test.sh -subdir = . -DIST_COMMON = $(am__configure_deps) $(pkginclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/bound_test.sh.in $(srcdir)/isl_config.h.in \ - $(srcdir)/pip_test.sh.in $(top_srcdir)/configure \ - $(top_srcdir)/include/isl/config.h.in AUTHORS ChangeLog \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/m4/ax_detect_git_head.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_warn_unused_result.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_set_warning_flags.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = isl_config.h $(top_builddir)/include/isl/config.h -CONFIG_CLEAN_FILES = bound_test.sh pip_test.sh -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libisl_la_DEPENDENCIES = -am__libisl_la_SOURCES_DIST = isl_lp_no_piplib.c isl_map_no_piplib.c \ - isl_sample_no_piplib.c isl_lp_piplib.c isl_map_piplib.c \ - isl_sample_piplib.c isl_sample_piplib.h isl_piplib.c \ - mp_get_memory_functions.c isl_aff.c isl_aff_private.h \ - isl_affine_hull.c isl_arg.c isl_band.c isl_band_private.h \ - isl_basis_reduction.h basis_reduction_tab.c isl_bernstein.c \ - isl_bernstein.h isl_blk.c isl_bound.c isl_bound.h \ - isl_coalesce.c isl_constraint.c isl_constraint_private.h \ - isl_convex_hull.c isl_ctx.c isl_ctx_private.h isl_dim.c \ - isl_dim_map.h isl_dim_map.c isl_equalities.c isl_equalities.h \ - isl_factorization.c isl_factorization.h isl_farkas.c \ - isl_flow.c isl_fold.c isl_gmp.c isl_hash.c \ - isl_hmap_map_basic_set.c isl_hmap_map_basic_set.h isl_ilp.c \ - isl_input.c isl_list.c isl_list_private.h \ - isl_local_space_private.h isl_local_space.c isl_lp.c \ - isl_lp_piplib.h isl_map.c isl_map_simplify.c \ - isl_map_subtract.c isl_map_private.h isl_map_piplib.h \ - isl_mat.c isl_mat_private.h isl_morph.c isl_morph.h isl_id.c \ - isl_id_private.h isl_obj.c isl_options.c isl_options_private.h \ - isl_output.c isl_qsort.c isl_qsort.h isl_piplib.h \ - isl_point_private.h isl_point.c isl_polynomial_private.h \ - isl_polynomial.c isl_printer_private.h isl_printer.c print.c \ - isl_range.c isl_range.h isl_reordering.c isl_reordering.h \ - isl_sample.h isl_sample.c isl_scan.c isl_scan.h isl_schedule.c \ - isl_schedule_private.h isl_space.c isl_space_private.h \ - isl_stream.c isl_stream_private.h isl_seq.c isl_tab.c \ - isl_tab.h isl_tab_pip.c isl_transitive_closure.c \ - isl_union_map.c isl_union_map_private.h isl_vec.c \ - isl_version.c isl_vertices_private.h isl_vertices.c -@HAVE_PIPLIB_FALSE@am__objects_1 = libisl_la-isl_lp_no_piplib.lo \ -@HAVE_PIPLIB_FALSE@ libisl_la-isl_map_no_piplib.lo \ -@HAVE_PIPLIB_FALSE@ libisl_la-isl_sample_no_piplib.lo -@HAVE_PIPLIB_TRUE@am__objects_1 = libisl_la-isl_lp_piplib.lo \ -@HAVE_PIPLIB_TRUE@ libisl_la-isl_map_piplib.lo \ -@HAVE_PIPLIB_TRUE@ libisl_la-isl_sample_piplib.lo \ -@HAVE_PIPLIB_TRUE@ libisl_la-isl_piplib.lo -@NEED_GET_MEMORY_FUNCTIONS_TRUE@am__objects_2 = libisl_la-mp_get_memory_functions.lo -am_libisl_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ - libisl_la-isl_aff.lo libisl_la-isl_affine_hull.lo \ - libisl_la-isl_arg.lo libisl_la-isl_band.lo \ - libisl_la-basis_reduction_tab.lo libisl_la-isl_bernstein.lo \ - libisl_la-isl_blk.lo libisl_la-isl_bound.lo \ - libisl_la-isl_coalesce.lo libisl_la-isl_constraint.lo \ - libisl_la-isl_convex_hull.lo libisl_la-isl_ctx.lo \ - libisl_la-isl_dim.lo libisl_la-isl_dim_map.lo \ - libisl_la-isl_equalities.lo libisl_la-isl_factorization.lo \ - libisl_la-isl_farkas.lo libisl_la-isl_flow.lo \ - libisl_la-isl_fold.lo libisl_la-isl_gmp.lo \ - libisl_la-isl_hash.lo libisl_la-isl_hmap_map_basic_set.lo \ - libisl_la-isl_ilp.lo libisl_la-isl_input.lo \ - libisl_la-isl_list.lo libisl_la-isl_local_space.lo \ - libisl_la-isl_lp.lo libisl_la-isl_map.lo \ - libisl_la-isl_map_simplify.lo libisl_la-isl_map_subtract.lo \ - libisl_la-isl_mat.lo libisl_la-isl_morph.lo \ - libisl_la-isl_id.lo libisl_la-isl_obj.lo \ - libisl_la-isl_options.lo libisl_la-isl_output.lo \ - libisl_la-isl_qsort.lo libisl_la-isl_point.lo \ - libisl_la-isl_polynomial.lo libisl_la-isl_printer.lo \ - libisl_la-print.lo libisl_la-isl_range.lo \ - libisl_la-isl_reordering.lo libisl_la-isl_sample.lo \ - libisl_la-isl_scan.lo libisl_la-isl_schedule.lo \ - libisl_la-isl_space.lo libisl_la-isl_stream.lo \ - libisl_la-isl_seq.lo libisl_la-isl_tab.lo \ - libisl_la-isl_tab_pip.lo libisl_la-isl_transitive_closure.lo \ - libisl_la-isl_union_map.lo libisl_la-isl_vec.lo \ - libisl_la-isl_version.lo libisl_la-isl_vertices.lo -libisl_la_OBJECTS = $(am_libisl_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libisl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libisl_la_LDFLAGS) $(LDFLAGS) -o $@ -PROGRAMS = $(noinst_PROGRAMS) -am_isl_bound_OBJECTS = isl_bound-bound.$(OBJEXT) -isl_bound_OBJECTS = $(am_isl_bound_OBJECTS) -isl_bound_DEPENDENCIES = libisl.la -isl_bound_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(isl_bound_LDFLAGS) $(LDFLAGS) -o $@ -am_isl_cat_OBJECTS = isl_cat-cat.$(OBJEXT) -isl_cat_OBJECTS = $(am_isl_cat_OBJECTS) -isl_cat_DEPENDENCIES = libisl.la -am_isl_closure_OBJECTS = isl_closure-closure.$(OBJEXT) -isl_closure_OBJECTS = $(am_isl_closure_OBJECTS) -isl_closure_DEPENDENCIES = libisl.la -am_isl_pip_OBJECTS = isl_pip-pip.$(OBJEXT) -isl_pip_OBJECTS = $(am_isl_pip_OBJECTS) -isl_pip_DEPENDENCIES = libisl.la -isl_pip_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(isl_pip_LDFLAGS) $(LDFLAGS) -o $@ -am_isl_polyhedron_detect_equalities_OBJECTS = isl_polyhedron_detect_equalities-polyhedron_detect_equalities.$(OBJEXT) -isl_polyhedron_detect_equalities_OBJECTS = \ - $(am_isl_polyhedron_detect_equalities_OBJECTS) -isl_polyhedron_detect_equalities_DEPENDENCIES = libisl.la -am_isl_polyhedron_minimize_OBJECTS = \ - isl_polyhedron_minimize-polyhedron_minimize.$(OBJEXT) -isl_polyhedron_minimize_OBJECTS = \ - $(am_isl_polyhedron_minimize_OBJECTS) -isl_polyhedron_minimize_DEPENDENCIES = libisl.la -isl_polyhedron_minimize_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(isl_polyhedron_minimize_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_isl_polyhedron_sample_OBJECTS = \ - isl_polyhedron_sample-polyhedron_sample.$(OBJEXT) -isl_polyhedron_sample_OBJECTS = $(am_isl_polyhedron_sample_OBJECTS) -isl_polyhedron_sample_DEPENDENCIES = libisl.la -am_isl_polytope_scan_OBJECTS = \ - isl_polytope_scan-polytope_scan.$(OBJEXT) -isl_polytope_scan_OBJECTS = $(am_isl_polytope_scan_OBJECTS) -isl_polytope_scan_DEPENDENCIES = libisl.la -isl_test_SOURCES = isl_test.c -isl_test_OBJECTS = isl_test-isl_test.$(OBJEXT) -isl_test_DEPENDENCIES = libisl.la -isl_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(isl_test_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libisl_la_SOURCES) $(EXTRA_libisl_la_SOURCES) \ - $(isl_bound_SOURCES) $(isl_cat_SOURCES) $(isl_closure_SOURCES) \ - $(isl_pip_SOURCES) $(isl_polyhedron_detect_equalities_SOURCES) \ - $(isl_polyhedron_minimize_SOURCES) \ - $(isl_polyhedron_sample_SOURCES) $(isl_polytope_scan_SOURCES) \ - isl_test.c -DIST_SOURCES = $(am__libisl_la_SOURCES_DIST) \ - $(EXTRA_libisl_la_SOURCES) $(isl_bound_SOURCES) \ - $(isl_cat_SOURCES) $(isl_closure_SOURCES) $(isl_pip_SOURCES) \ - $(isl_polyhedron_detect_equalities_SOURCES) \ - $(isl_polyhedron_minimize_SOURCES) \ - $(isl_polyhedron_sample_SOURCES) $(isl_polytope_scan_SOURCES) \ - isl_test.c -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -DATA = $(pkgconfig_DATA) -HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CLANG_CXXFLAGS = @CLANG_CXXFLAGS@ -CLANG_LDFLAGS = @CLANG_LDFLAGS@ -CLANG_LIBS = @CLANG_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_HEAD = @GIT_HEAD@ -GIT_HEAD_ID = @GIT_HEAD_ID@ -GIT_HEAD_VERSION = @GIT_HEAD_VERSION@ -GMP_CPPFLAGS = @GMP_CPPFLAGS@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIBS = @GMP_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFLATEX = @PDFLATEX@ -PERL = @PERL@ -PIPLIB_CPPFLAGS = @PIPLIB_CPPFLAGS@ -PIPLIB_LDFLAGS = @PIPLIB_LDFLAGS@ -PIPLIB_LIBS = @PIPLIB_LIBS@ -POD2HTML = @POD2HTML@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -WARNING_FLAGS = @WARNING_FLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -llvm_config_found = @llvm_config_found@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -@HAVE_CLANG_TRUE@MAYBE_INTERFACE = interface -SUBDIRS = . $(MAYBE_INTERFACE) doc -DIST_SUBDIRS = $(MAYBE_INTERFACE) doc -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = nostdinc -lib_LTLIBRARIES = libisl.la -@HAVE_PIPLIB_FALSE@ISL_PIPLIB = \ -@HAVE_PIPLIB_FALSE@ isl_lp_no_piplib.c \ -@HAVE_PIPLIB_FALSE@ isl_map_no_piplib.c \ -@HAVE_PIPLIB_FALSE@ isl_sample_no_piplib.c - -@HAVE_PIPLIB_TRUE@ISL_PIPLIB = \ -@HAVE_PIPLIB_TRUE@ isl_lp_piplib.c \ -@HAVE_PIPLIB_TRUE@ isl_map_piplib.c \ -@HAVE_PIPLIB_TRUE@ isl_sample_piplib.c \ -@HAVE_PIPLIB_TRUE@ isl_sample_piplib.h \ -@HAVE_PIPLIB_TRUE@ isl_piplib.c - -@NEED_GET_MEMORY_FUNCTIONS_TRUE@GET_MEMORY_FUNCTIONS = mp_get_memory_functions.c -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/ -AM_CFLAGS = @WARNING_FLAGS@ -libisl_la_SOURCES = \ - $(ISL_PIPLIB) \ - $(GET_MEMORY_FUNCTIONS) \ - isl_aff.c \ - isl_aff_private.h \ - isl_affine_hull.c \ - isl_arg.c \ - isl_band.c \ - isl_band_private.h \ - isl_basis_reduction.h \ - basis_reduction_tab.c \ - isl_bernstein.c \ - isl_bernstein.h \ - isl_blk.c \ - isl_bound.c \ - isl_bound.h \ - isl_coalesce.c \ - isl_constraint.c \ - isl_constraint_private.h \ - isl_convex_hull.c \ - isl_ctx.c \ - isl_ctx_private.h \ - isl_dim.c \ - isl_dim_map.h \ - isl_dim_map.c \ - isl_equalities.c \ - isl_equalities.h \ - isl_factorization.c \ - isl_factorization.h \ - isl_farkas.c \ - isl_flow.c \ - isl_fold.c \ - isl_gmp.c \ - isl_hash.c \ - isl_hmap_map_basic_set.c \ - isl_hmap_map_basic_set.h \ - isl_ilp.c \ - isl_input.c \ - isl_list.c \ - isl_list_private.h \ - isl_local_space_private.h \ - isl_local_space.c \ - isl_lp.c \ - isl_lp_piplib.h \ - isl_map.c \ - isl_map_simplify.c \ - isl_map_subtract.c \ - isl_map_private.h \ - isl_map_piplib.h \ - isl_mat.c \ - isl_mat_private.h \ - isl_morph.c \ - isl_morph.h \ - isl_id.c \ - isl_id_private.h \ - isl_obj.c \ - isl_options.c \ - isl_options_private.h \ - isl_output.c \ - isl_qsort.c \ - isl_qsort.h \ - isl_piplib.h \ - isl_point_private.h \ - isl_point.c \ - isl_polynomial_private.h \ - isl_polynomial.c \ - isl_printer_private.h \ - isl_printer.c \ - print.c \ - isl_range.c \ - isl_range.h \ - isl_reordering.c \ - isl_reordering.h \ - isl_sample.h \ - isl_sample.c \ - isl_scan.c \ - isl_scan.h \ - isl_schedule.c \ - isl_schedule_private.h \ - isl_space.c \ - isl_space_private.h \ - isl_stream.c \ - isl_stream_private.h \ - isl_seq.c \ - isl_tab.c \ - isl_tab.h \ - isl_tab_pip.c \ - isl_transitive_closure.c \ - isl_union_map.c \ - isl_union_map_private.h \ - isl_vec.c \ - isl_version.c \ - isl_vertices_private.h \ - isl_vertices.c - -EXTRA_libisl_la_SOURCES = \ - isl_lp_piplib.c \ - isl_lp_no_piplib.c \ - isl_map_piplib.c \ - isl_map_no_piplib.c \ - isl_sample_no_piplib.c \ - isl_sample_piplib.c \ - isl_sample_piplib.h \ - isl_piplib.c - -libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@ -libisl_la_LDFLAGS = -version-info @versioninfo@ \ - @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@ - -libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@ -isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_test_LDFLAGS = @GMP_LDFLAGS@ -isl_test_LDADD = libisl.la @GMP_LIBS@ -isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_sample_LDADD = libisl.la -isl_polyhedron_sample_SOURCES = \ - polyhedron_sample.c - -isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_pip_LDFLAGS = @GMP_LDFLAGS@ -isl_pip_LDADD = libisl.la @GMP_LIBS@ -isl_pip_SOURCES = \ - pip.c - -isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_bound_LDFLAGS = @GMP_LDFLAGS@ -isl_bound_LDADD = libisl.la @GMP_LIBS@ -isl_bound_SOURCES = \ - bound.c - -isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_minimize_LDFLAGS = @GMP_LDFLAGS@ -isl_polyhedron_minimize_LDADD = libisl.la @GMP_LIBS@ -isl_polyhedron_minimize_SOURCES = \ - polyhedron_minimize.c - -isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polytope_scan_LDADD = libisl.la -isl_polytope_scan_SOURCES = \ - polytope_scan.c - -isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_polyhedron_detect_equalities_LDADD = libisl.la -isl_polyhedron_detect_equalities_SOURCES = \ - polyhedron_detect_equalities.c - -isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_cat_LDADD = libisl.la -isl_cat_SOURCES = \ - cat.c - -isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@ -isl_closure_LDADD = libisl.la -isl_closure_SOURCES = \ - closure.c - -nodist_pkginclude_HEADERS = \ - include/isl/config.h \ - include/isl/stdint.h - -pkginclude_HEADERS = \ - include/isl/aff.h \ - include/isl/aff_type.h \ - include/isl/arg.h \ - include/isl/band.h \ - include/isl/blk.h \ - include/isl/constraint.h \ - include/isl/ctx.h \ - include/isl/dim.h \ - include/isl/flow.h \ - include/isl/id.h \ - include/isl/ilp.h \ - include/isl/int.h \ - include/isl/hash.h \ - include/isl/list.h \ - include/isl/local_space.h \ - include/isl/lp.h \ - include/isl/mat.h \ - include/isl/map.h \ - include/isl/map_type.h \ - include/isl/multi.h \ - include/isl/obj.h \ - include/isl/options.h \ - include/isl/point.h \ - include/isl/polynomial.h \ - include/isl/polynomial_type.h \ - include/isl/printer.h \ - include/isl/schedule.h \ - include/isl/seq.h \ - include/isl/set.h \ - include/isl/set_type.h \ - include/isl/space.h \ - include/isl/stream.h \ - include/isl/union_map.h \ - include/isl/union_set.h \ - include/isl/vec.h \ - include/isl/version.h \ - include/isl/vertices.h - -EXTRA_DIST = \ - isl_config_post.h \ - basis_reduction_templ.c \ - isl_list_templ.c \ - isl_list_templ.h \ - isl_multi_templ.c \ - isl_multi_templ.h \ - print_templ.c \ - isl_pw_templ.c \ - isl_union_templ.c \ - isl.py \ - doc/chicago.bst \ - doc/chicago.sty \ - doc/implementation.tex \ - doc/isl.bib \ - doc/mypod2latex \ - doc/manual.tex \ - doc/user.pod \ - test_inputs - -pkgconfigdir = $(pkgconfig_libdir) -pkgconfig_DATA = $(pkgconfig_libfile) -all: isl_config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -isl_config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/isl_config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status isl_config.h -$(srcdir)/isl_config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -include/isl/config.h: include/isl/stamp-h2 - @if test ! -f $@; then \ - rm -f include/isl/stamp-h2; \ - $(MAKE) $(AM_MAKEFLAGS) include/isl/stamp-h2; \ - else :; fi - -include/isl/stamp-h2: $(top_srcdir)/include/isl/config.h.in $(top_builddir)/config.status - @rm -f include/isl/stamp-h2 - cd $(top_builddir) && $(SHELL) ./config.status include/isl/config.h - -distclean-hdr: - -rm -f isl_config.h stamp-h1 include/isl/config.h include/isl/stamp-h2 -bound_test.sh: $(top_builddir)/config.status $(srcdir)/bound_test.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -pip_test.sh: $(top_builddir)/config.status $(srcdir)/pip_test.sh.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libisl.la: $(libisl_la_OBJECTS) $(libisl_la_DEPENDENCIES) - $(AM_V_CCLD)$(libisl_la_LINK) -rpath $(libdir) $(libisl_la_OBJECTS) $(libisl_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -isl_bound$(EXEEXT): $(isl_bound_OBJECTS) $(isl_bound_DEPENDENCIES) - @rm -f isl_bound$(EXEEXT) - $(AM_V_CCLD)$(isl_bound_LINK) $(isl_bound_OBJECTS) $(isl_bound_LDADD) $(LIBS) -isl_cat$(EXEEXT): $(isl_cat_OBJECTS) $(isl_cat_DEPENDENCIES) - @rm -f isl_cat$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_cat_OBJECTS) $(isl_cat_LDADD) $(LIBS) -isl_closure$(EXEEXT): $(isl_closure_OBJECTS) $(isl_closure_DEPENDENCIES) - @rm -f isl_closure$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_closure_OBJECTS) $(isl_closure_LDADD) $(LIBS) -isl_pip$(EXEEXT): $(isl_pip_OBJECTS) $(isl_pip_DEPENDENCIES) - @rm -f isl_pip$(EXEEXT) - $(AM_V_CCLD)$(isl_pip_LINK) $(isl_pip_OBJECTS) $(isl_pip_LDADD) $(LIBS) -isl_polyhedron_detect_equalities$(EXEEXT): $(isl_polyhedron_detect_equalities_OBJECTS) $(isl_polyhedron_detect_equalities_DEPENDENCIES) - @rm -f isl_polyhedron_detect_equalities$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_polyhedron_detect_equalities_OBJECTS) $(isl_polyhedron_detect_equalities_LDADD) $(LIBS) -isl_polyhedron_minimize$(EXEEXT): $(isl_polyhedron_minimize_OBJECTS) $(isl_polyhedron_minimize_DEPENDENCIES) - @rm -f isl_polyhedron_minimize$(EXEEXT) - $(AM_V_CCLD)$(isl_polyhedron_minimize_LINK) $(isl_polyhedron_minimize_OBJECTS) $(isl_polyhedron_minimize_LDADD) $(LIBS) -isl_polyhedron_sample$(EXEEXT): $(isl_polyhedron_sample_OBJECTS) $(isl_polyhedron_sample_DEPENDENCIES) - @rm -f isl_polyhedron_sample$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_polyhedron_sample_OBJECTS) $(isl_polyhedron_sample_LDADD) $(LIBS) -isl_polytope_scan$(EXEEXT): $(isl_polytope_scan_OBJECTS) $(isl_polytope_scan_DEPENDENCIES) - @rm -f isl_polytope_scan$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(isl_polytope_scan_OBJECTS) $(isl_polytope_scan_LDADD) $(LIBS) -isl_test$(EXEEXT): $(isl_test_OBJECTS) $(isl_test_DEPENDENCIES) - @rm -f isl_test$(EXEEXT) - $(AM_V_CCLD)$(isl_test_LINK) $(isl_test_OBJECTS) $(isl_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_bound-bound.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_cat-cat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_closure-closure.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_pip-pip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_polytope_scan-polytope_scan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isl_test-isl_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-basis_reduction_tab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_aff.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_affine_hull.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_arg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_band.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_bernstein.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_blk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_bound.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_coalesce.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_constraint.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_convex_hull.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_ctx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_dim.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_dim_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_equalities.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_factorization.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_farkas.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_flow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_fold.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_gmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_hash.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_id.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_ilp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_input.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_local_space.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp_no_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_no_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_simplify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_map_subtract.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_mat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_morph.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_obj.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_options.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_output.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_point.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_polynomial.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_printer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_qsort.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_range.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_reordering.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sample.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sample_no_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sample_piplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_scan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_schedule.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_seq.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_space.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_stream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_tab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_tab_pip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_transitive_closure.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_union_map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_vec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_vertices.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-mp_get_memory_functions.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-print.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libisl_la-isl_lp_no_piplib.lo: isl_lp_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_lp_no_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_lp_no_piplib.Tpo -c -o libisl_la-isl_lp_no_piplib.lo `test -f 'isl_lp_no_piplib.c' || echo '$(srcdir)/'`isl_lp_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_lp_no_piplib.Tpo $(DEPDIR)/libisl_la-isl_lp_no_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_lp_no_piplib.c' object='libisl_la-isl_lp_no_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_lp_no_piplib.lo `test -f 'isl_lp_no_piplib.c' || echo '$(srcdir)/'`isl_lp_no_piplib.c - -libisl_la-isl_map_no_piplib.lo: isl_map_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_no_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_no_piplib.Tpo -c -o libisl_la-isl_map_no_piplib.lo `test -f 'isl_map_no_piplib.c' || echo '$(srcdir)/'`isl_map_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_no_piplib.Tpo $(DEPDIR)/libisl_la-isl_map_no_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_no_piplib.c' object='libisl_la-isl_map_no_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_no_piplib.lo `test -f 'isl_map_no_piplib.c' || echo '$(srcdir)/'`isl_map_no_piplib.c - -libisl_la-isl_sample_no_piplib.lo: isl_sample_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sample_no_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sample_no_piplib.Tpo -c -o libisl_la-isl_sample_no_piplib.lo `test -f 'isl_sample_no_piplib.c' || echo '$(srcdir)/'`isl_sample_no_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sample_no_piplib.Tpo $(DEPDIR)/libisl_la-isl_sample_no_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_sample_no_piplib.c' object='libisl_la-isl_sample_no_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_sample_no_piplib.lo `test -f 'isl_sample_no_piplib.c' || echo '$(srcdir)/'`isl_sample_no_piplib.c - -libisl_la-isl_lp_piplib.lo: isl_lp_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_lp_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_lp_piplib.Tpo -c -o libisl_la-isl_lp_piplib.lo `test -f 'isl_lp_piplib.c' || echo '$(srcdir)/'`isl_lp_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_lp_piplib.Tpo $(DEPDIR)/libisl_la-isl_lp_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_lp_piplib.c' object='libisl_la-isl_lp_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_lp_piplib.lo `test -f 'isl_lp_piplib.c' || echo '$(srcdir)/'`isl_lp_piplib.c - -libisl_la-isl_map_piplib.lo: isl_map_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_piplib.Tpo -c -o libisl_la-isl_map_piplib.lo `test -f 'isl_map_piplib.c' || echo '$(srcdir)/'`isl_map_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_piplib.Tpo $(DEPDIR)/libisl_la-isl_map_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_piplib.c' object='libisl_la-isl_map_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_piplib.lo `test -f 'isl_map_piplib.c' || echo '$(srcdir)/'`isl_map_piplib.c - -libisl_la-isl_sample_piplib.lo: isl_sample_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sample_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sample_piplib.Tpo -c -o libisl_la-isl_sample_piplib.lo `test -f 'isl_sample_piplib.c' || echo '$(srcdir)/'`isl_sample_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sample_piplib.Tpo $(DEPDIR)/libisl_la-isl_sample_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_sample_piplib.c' object='libisl_la-isl_sample_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_sample_piplib.lo `test -f 'isl_sample_piplib.c' || echo '$(srcdir)/'`isl_sample_piplib.c - -libisl_la-isl_piplib.lo: isl_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_piplib.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_piplib.Tpo -c -o libisl_la-isl_piplib.lo `test -f 'isl_piplib.c' || echo '$(srcdir)/'`isl_piplib.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_piplib.Tpo $(DEPDIR)/libisl_la-isl_piplib.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_piplib.c' object='libisl_la-isl_piplib.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_piplib.lo `test -f 'isl_piplib.c' || echo '$(srcdir)/'`isl_piplib.c - -libisl_la-mp_get_memory_functions.lo: mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-mp_get_memory_functions.lo -MD -MP -MF $(DEPDIR)/libisl_la-mp_get_memory_functions.Tpo -c -o libisl_la-mp_get_memory_functions.lo `test -f 'mp_get_memory_functions.c' || echo '$(srcdir)/'`mp_get_memory_functions.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-mp_get_memory_functions.Tpo $(DEPDIR)/libisl_la-mp_get_memory_functions.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mp_get_memory_functions.c' object='libisl_la-mp_get_memory_functions.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-mp_get_memory_functions.lo `test -f 'mp_get_memory_functions.c' || echo '$(srcdir)/'`mp_get_memory_functions.c - -libisl_la-isl_aff.lo: isl_aff.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_aff.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_aff.Tpo -c -o libisl_la-isl_aff.lo `test -f 'isl_aff.c' || echo '$(srcdir)/'`isl_aff.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_aff.Tpo $(DEPDIR)/libisl_la-isl_aff.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_aff.c' object='libisl_la-isl_aff.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_aff.lo `test -f 'isl_aff.c' || echo '$(srcdir)/'`isl_aff.c - -libisl_la-isl_affine_hull.lo: isl_affine_hull.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_affine_hull.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_affine_hull.Tpo -c -o libisl_la-isl_affine_hull.lo `test -f 'isl_affine_hull.c' || echo '$(srcdir)/'`isl_affine_hull.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_affine_hull.Tpo $(DEPDIR)/libisl_la-isl_affine_hull.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_affine_hull.c' object='libisl_la-isl_affine_hull.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_affine_hull.lo `test -f 'isl_affine_hull.c' || echo '$(srcdir)/'`isl_affine_hull.c - -libisl_la-isl_arg.lo: isl_arg.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_arg.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_arg.Tpo -c -o libisl_la-isl_arg.lo `test -f 'isl_arg.c' || echo '$(srcdir)/'`isl_arg.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_arg.Tpo $(DEPDIR)/libisl_la-isl_arg.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_arg.c' object='libisl_la-isl_arg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_arg.lo `test -f 'isl_arg.c' || echo '$(srcdir)/'`isl_arg.c - -libisl_la-isl_band.lo: isl_band.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_band.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_band.Tpo -c -o libisl_la-isl_band.lo `test -f 'isl_band.c' || echo '$(srcdir)/'`isl_band.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_band.Tpo $(DEPDIR)/libisl_la-isl_band.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_band.c' object='libisl_la-isl_band.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_band.lo `test -f 'isl_band.c' || echo '$(srcdir)/'`isl_band.c - -libisl_la-basis_reduction_tab.lo: basis_reduction_tab.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-basis_reduction_tab.lo -MD -MP -MF $(DEPDIR)/libisl_la-basis_reduction_tab.Tpo -c -o libisl_la-basis_reduction_tab.lo `test -f 'basis_reduction_tab.c' || echo '$(srcdir)/'`basis_reduction_tab.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-basis_reduction_tab.Tpo $(DEPDIR)/libisl_la-basis_reduction_tab.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basis_reduction_tab.c' object='libisl_la-basis_reduction_tab.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-basis_reduction_tab.lo `test -f 'basis_reduction_tab.c' || echo '$(srcdir)/'`basis_reduction_tab.c - -libisl_la-isl_bernstein.lo: isl_bernstein.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_bernstein.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_bernstein.Tpo -c -o libisl_la-isl_bernstein.lo `test -f 'isl_bernstein.c' || echo '$(srcdir)/'`isl_bernstein.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_bernstein.Tpo $(DEPDIR)/libisl_la-isl_bernstein.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_bernstein.c' object='libisl_la-isl_bernstein.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_bernstein.lo `test -f 'isl_bernstein.c' || echo '$(srcdir)/'`isl_bernstein.c - -libisl_la-isl_blk.lo: isl_blk.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_blk.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_blk.Tpo -c -o libisl_la-isl_blk.lo `test -f 'isl_blk.c' || echo '$(srcdir)/'`isl_blk.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_blk.Tpo $(DEPDIR)/libisl_la-isl_blk.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_blk.c' object='libisl_la-isl_blk.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_blk.lo `test -f 'isl_blk.c' || echo '$(srcdir)/'`isl_blk.c - -libisl_la-isl_bound.lo: isl_bound.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_bound.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_bound.Tpo -c -o libisl_la-isl_bound.lo `test -f 'isl_bound.c' || echo '$(srcdir)/'`isl_bound.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_bound.Tpo $(DEPDIR)/libisl_la-isl_bound.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_bound.c' object='libisl_la-isl_bound.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_bound.lo `test -f 'isl_bound.c' || echo '$(srcdir)/'`isl_bound.c - -libisl_la-isl_coalesce.lo: isl_coalesce.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_coalesce.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_coalesce.Tpo -c -o libisl_la-isl_coalesce.lo `test -f 'isl_coalesce.c' || echo '$(srcdir)/'`isl_coalesce.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_coalesce.Tpo $(DEPDIR)/libisl_la-isl_coalesce.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_coalesce.c' object='libisl_la-isl_coalesce.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_coalesce.lo `test -f 'isl_coalesce.c' || echo '$(srcdir)/'`isl_coalesce.c - -libisl_la-isl_constraint.lo: isl_constraint.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_constraint.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_constraint.Tpo -c -o libisl_la-isl_constraint.lo `test -f 'isl_constraint.c' || echo '$(srcdir)/'`isl_constraint.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_constraint.Tpo $(DEPDIR)/libisl_la-isl_constraint.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_constraint.c' object='libisl_la-isl_constraint.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_constraint.lo `test -f 'isl_constraint.c' || echo '$(srcdir)/'`isl_constraint.c - -libisl_la-isl_convex_hull.lo: isl_convex_hull.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_convex_hull.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_convex_hull.Tpo -c -o libisl_la-isl_convex_hull.lo `test -f 'isl_convex_hull.c' || echo '$(srcdir)/'`isl_convex_hull.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_convex_hull.Tpo $(DEPDIR)/libisl_la-isl_convex_hull.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_convex_hull.c' object='libisl_la-isl_convex_hull.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_convex_hull.lo `test -f 'isl_convex_hull.c' || echo '$(srcdir)/'`isl_convex_hull.c - -libisl_la-isl_ctx.lo: isl_ctx.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_ctx.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_ctx.Tpo -c -o libisl_la-isl_ctx.lo `test -f 'isl_ctx.c' || echo '$(srcdir)/'`isl_ctx.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_ctx.Tpo $(DEPDIR)/libisl_la-isl_ctx.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_ctx.c' object='libisl_la-isl_ctx.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_ctx.lo `test -f 'isl_ctx.c' || echo '$(srcdir)/'`isl_ctx.c - -libisl_la-isl_dim.lo: isl_dim.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_dim.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_dim.Tpo -c -o libisl_la-isl_dim.lo `test -f 'isl_dim.c' || echo '$(srcdir)/'`isl_dim.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_dim.Tpo $(DEPDIR)/libisl_la-isl_dim.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_dim.c' object='libisl_la-isl_dim.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_dim.lo `test -f 'isl_dim.c' || echo '$(srcdir)/'`isl_dim.c - -libisl_la-isl_dim_map.lo: isl_dim_map.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_dim_map.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_dim_map.Tpo -c -o libisl_la-isl_dim_map.lo `test -f 'isl_dim_map.c' || echo '$(srcdir)/'`isl_dim_map.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_dim_map.Tpo $(DEPDIR)/libisl_la-isl_dim_map.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_dim_map.c' object='libisl_la-isl_dim_map.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_dim_map.lo `test -f 'isl_dim_map.c' || echo '$(srcdir)/'`isl_dim_map.c - -libisl_la-isl_equalities.lo: isl_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_equalities.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_equalities.Tpo -c -o libisl_la-isl_equalities.lo `test -f 'isl_equalities.c' || echo '$(srcdir)/'`isl_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_equalities.Tpo $(DEPDIR)/libisl_la-isl_equalities.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_equalities.c' object='libisl_la-isl_equalities.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_equalities.lo `test -f 'isl_equalities.c' || echo '$(srcdir)/'`isl_equalities.c - -libisl_la-isl_factorization.lo: isl_factorization.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_factorization.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_factorization.Tpo -c -o libisl_la-isl_factorization.lo `test -f 'isl_factorization.c' || echo '$(srcdir)/'`isl_factorization.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_factorization.Tpo $(DEPDIR)/libisl_la-isl_factorization.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_factorization.c' object='libisl_la-isl_factorization.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_factorization.lo `test -f 'isl_factorization.c' || echo '$(srcdir)/'`isl_factorization.c - -libisl_la-isl_farkas.lo: isl_farkas.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_farkas.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_farkas.Tpo -c -o libisl_la-isl_farkas.lo `test -f 'isl_farkas.c' || echo '$(srcdir)/'`isl_farkas.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_farkas.Tpo $(DEPDIR)/libisl_la-isl_farkas.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_farkas.c' object='libisl_la-isl_farkas.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_farkas.lo `test -f 'isl_farkas.c' || echo '$(srcdir)/'`isl_farkas.c - -libisl_la-isl_flow.lo: isl_flow.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_flow.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_flow.Tpo -c -o libisl_la-isl_flow.lo `test -f 'isl_flow.c' || echo '$(srcdir)/'`isl_flow.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_flow.Tpo $(DEPDIR)/libisl_la-isl_flow.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_flow.c' object='libisl_la-isl_flow.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_flow.lo `test -f 'isl_flow.c' || echo '$(srcdir)/'`isl_flow.c - -libisl_la-isl_fold.lo: isl_fold.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_fold.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_fold.Tpo -c -o libisl_la-isl_fold.lo `test -f 'isl_fold.c' || echo '$(srcdir)/'`isl_fold.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_fold.Tpo $(DEPDIR)/libisl_la-isl_fold.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_fold.c' object='libisl_la-isl_fold.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_fold.lo `test -f 'isl_fold.c' || echo '$(srcdir)/'`isl_fold.c - -libisl_la-isl_gmp.lo: isl_gmp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_gmp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_gmp.Tpo -c -o libisl_la-isl_gmp.lo `test -f 'isl_gmp.c' || echo '$(srcdir)/'`isl_gmp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_gmp.Tpo $(DEPDIR)/libisl_la-isl_gmp.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_gmp.c' object='libisl_la-isl_gmp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_gmp.lo `test -f 'isl_gmp.c' || echo '$(srcdir)/'`isl_gmp.c - -libisl_la-isl_hash.lo: isl_hash.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_hash.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_hash.Tpo -c -o libisl_la-isl_hash.lo `test -f 'isl_hash.c' || echo '$(srcdir)/'`isl_hash.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_hash.Tpo $(DEPDIR)/libisl_la-isl_hash.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_hash.c' object='libisl_la-isl_hash.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_hash.lo `test -f 'isl_hash.c' || echo '$(srcdir)/'`isl_hash.c - -libisl_la-isl_hmap_map_basic_set.lo: isl_hmap_map_basic_set.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_hmap_map_basic_set.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Tpo -c -o libisl_la-isl_hmap_map_basic_set.lo `test -f 'isl_hmap_map_basic_set.c' || echo '$(srcdir)/'`isl_hmap_map_basic_set.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Tpo $(DEPDIR)/libisl_la-isl_hmap_map_basic_set.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_hmap_map_basic_set.c' object='libisl_la-isl_hmap_map_basic_set.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_hmap_map_basic_set.lo `test -f 'isl_hmap_map_basic_set.c' || echo '$(srcdir)/'`isl_hmap_map_basic_set.c - -libisl_la-isl_ilp.lo: isl_ilp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_ilp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_ilp.Tpo -c -o libisl_la-isl_ilp.lo `test -f 'isl_ilp.c' || echo '$(srcdir)/'`isl_ilp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_ilp.Tpo $(DEPDIR)/libisl_la-isl_ilp.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_ilp.c' object='libisl_la-isl_ilp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_ilp.lo `test -f 'isl_ilp.c' || echo '$(srcdir)/'`isl_ilp.c - -libisl_la-isl_input.lo: isl_input.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_input.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_input.Tpo -c -o libisl_la-isl_input.lo `test -f 'isl_input.c' || echo '$(srcdir)/'`isl_input.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_input.Tpo $(DEPDIR)/libisl_la-isl_input.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_input.c' object='libisl_la-isl_input.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_input.lo `test -f 'isl_input.c' || echo '$(srcdir)/'`isl_input.c - -libisl_la-isl_list.lo: isl_list.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_list.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_list.Tpo -c -o libisl_la-isl_list.lo `test -f 'isl_list.c' || echo '$(srcdir)/'`isl_list.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_list.Tpo $(DEPDIR)/libisl_la-isl_list.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_list.c' object='libisl_la-isl_list.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_list.lo `test -f 'isl_list.c' || echo '$(srcdir)/'`isl_list.c - -libisl_la-isl_local_space.lo: isl_local_space.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_local_space.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_local_space.Tpo -c -o libisl_la-isl_local_space.lo `test -f 'isl_local_space.c' || echo '$(srcdir)/'`isl_local_space.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_local_space.Tpo $(DEPDIR)/libisl_la-isl_local_space.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_local_space.c' object='libisl_la-isl_local_space.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_local_space.lo `test -f 'isl_local_space.c' || echo '$(srcdir)/'`isl_local_space.c - -libisl_la-isl_lp.lo: isl_lp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_lp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_lp.Tpo -c -o libisl_la-isl_lp.lo `test -f 'isl_lp.c' || echo '$(srcdir)/'`isl_lp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_lp.Tpo $(DEPDIR)/libisl_la-isl_lp.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_lp.c' object='libisl_la-isl_lp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_lp.lo `test -f 'isl_lp.c' || echo '$(srcdir)/'`isl_lp.c - -libisl_la-isl_map.lo: isl_map.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map.Tpo -c -o libisl_la-isl_map.lo `test -f 'isl_map.c' || echo '$(srcdir)/'`isl_map.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map.Tpo $(DEPDIR)/libisl_la-isl_map.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map.c' object='libisl_la-isl_map.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map.lo `test -f 'isl_map.c' || echo '$(srcdir)/'`isl_map.c - -libisl_la-isl_map_simplify.lo: isl_map_simplify.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_simplify.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_simplify.Tpo -c -o libisl_la-isl_map_simplify.lo `test -f 'isl_map_simplify.c' || echo '$(srcdir)/'`isl_map_simplify.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_simplify.Tpo $(DEPDIR)/libisl_la-isl_map_simplify.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_simplify.c' object='libisl_la-isl_map_simplify.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_simplify.lo `test -f 'isl_map_simplify.c' || echo '$(srcdir)/'`isl_map_simplify.c - -libisl_la-isl_map_subtract.lo: isl_map_subtract.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_map_subtract.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_map_subtract.Tpo -c -o libisl_la-isl_map_subtract.lo `test -f 'isl_map_subtract.c' || echo '$(srcdir)/'`isl_map_subtract.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_map_subtract.Tpo $(DEPDIR)/libisl_la-isl_map_subtract.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_map_subtract.c' object='libisl_la-isl_map_subtract.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_map_subtract.lo `test -f 'isl_map_subtract.c' || echo '$(srcdir)/'`isl_map_subtract.c - -libisl_la-isl_mat.lo: isl_mat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_mat.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_mat.Tpo -c -o libisl_la-isl_mat.lo `test -f 'isl_mat.c' || echo '$(srcdir)/'`isl_mat.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_mat.Tpo $(DEPDIR)/libisl_la-isl_mat.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_mat.c' object='libisl_la-isl_mat.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_mat.lo `test -f 'isl_mat.c' || echo '$(srcdir)/'`isl_mat.c - -libisl_la-isl_morph.lo: isl_morph.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_morph.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_morph.Tpo -c -o libisl_la-isl_morph.lo `test -f 'isl_morph.c' || echo '$(srcdir)/'`isl_morph.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_morph.Tpo $(DEPDIR)/libisl_la-isl_morph.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_morph.c' object='libisl_la-isl_morph.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_morph.lo `test -f 'isl_morph.c' || echo '$(srcdir)/'`isl_morph.c - -libisl_la-isl_id.lo: isl_id.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_id.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_id.Tpo -c -o libisl_la-isl_id.lo `test -f 'isl_id.c' || echo '$(srcdir)/'`isl_id.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_id.Tpo $(DEPDIR)/libisl_la-isl_id.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_id.c' object='libisl_la-isl_id.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_id.lo `test -f 'isl_id.c' || echo '$(srcdir)/'`isl_id.c - -libisl_la-isl_obj.lo: isl_obj.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_obj.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_obj.Tpo -c -o libisl_la-isl_obj.lo `test -f 'isl_obj.c' || echo '$(srcdir)/'`isl_obj.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_obj.Tpo $(DEPDIR)/libisl_la-isl_obj.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_obj.c' object='libisl_la-isl_obj.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_obj.lo `test -f 'isl_obj.c' || echo '$(srcdir)/'`isl_obj.c - -libisl_la-isl_options.lo: isl_options.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_options.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_options.Tpo -c -o libisl_la-isl_options.lo `test -f 'isl_options.c' || echo '$(srcdir)/'`isl_options.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_options.Tpo $(DEPDIR)/libisl_la-isl_options.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_options.c' object='libisl_la-isl_options.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_options.lo `test -f 'isl_options.c' || echo '$(srcdir)/'`isl_options.c - -libisl_la-isl_output.lo: isl_output.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_output.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_output.Tpo -c -o libisl_la-isl_output.lo `test -f 'isl_output.c' || echo '$(srcdir)/'`isl_output.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_output.Tpo $(DEPDIR)/libisl_la-isl_output.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_output.c' object='libisl_la-isl_output.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_output.lo `test -f 'isl_output.c' || echo '$(srcdir)/'`isl_output.c - -libisl_la-isl_qsort.lo: isl_qsort.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_qsort.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_qsort.Tpo -c -o libisl_la-isl_qsort.lo `test -f 'isl_qsort.c' || echo '$(srcdir)/'`isl_qsort.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_qsort.Tpo $(DEPDIR)/libisl_la-isl_qsort.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_qsort.c' object='libisl_la-isl_qsort.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_qsort.lo `test -f 'isl_qsort.c' || echo '$(srcdir)/'`isl_qsort.c - -libisl_la-isl_point.lo: isl_point.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_point.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_point.Tpo -c -o libisl_la-isl_point.lo `test -f 'isl_point.c' || echo '$(srcdir)/'`isl_point.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_point.Tpo $(DEPDIR)/libisl_la-isl_point.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_point.c' object='libisl_la-isl_point.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_point.lo `test -f 'isl_point.c' || echo '$(srcdir)/'`isl_point.c - -libisl_la-isl_polynomial.lo: isl_polynomial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_polynomial.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_polynomial.Tpo -c -o libisl_la-isl_polynomial.lo `test -f 'isl_polynomial.c' || echo '$(srcdir)/'`isl_polynomial.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_polynomial.Tpo $(DEPDIR)/libisl_la-isl_polynomial.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_polynomial.c' object='libisl_la-isl_polynomial.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_polynomial.lo `test -f 'isl_polynomial.c' || echo '$(srcdir)/'`isl_polynomial.c - -libisl_la-isl_printer.lo: isl_printer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_printer.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_printer.Tpo -c -o libisl_la-isl_printer.lo `test -f 'isl_printer.c' || echo '$(srcdir)/'`isl_printer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_printer.Tpo $(DEPDIR)/libisl_la-isl_printer.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_printer.c' object='libisl_la-isl_printer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_printer.lo `test -f 'isl_printer.c' || echo '$(srcdir)/'`isl_printer.c - -libisl_la-print.lo: print.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-print.lo -MD -MP -MF $(DEPDIR)/libisl_la-print.Tpo -c -o libisl_la-print.lo `test -f 'print.c' || echo '$(srcdir)/'`print.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-print.Tpo $(DEPDIR)/libisl_la-print.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print.c' object='libisl_la-print.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-print.lo `test -f 'print.c' || echo '$(srcdir)/'`print.c - -libisl_la-isl_range.lo: isl_range.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_range.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_range.Tpo -c -o libisl_la-isl_range.lo `test -f 'isl_range.c' || echo '$(srcdir)/'`isl_range.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_range.Tpo $(DEPDIR)/libisl_la-isl_range.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_range.c' object='libisl_la-isl_range.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_range.lo `test -f 'isl_range.c' || echo '$(srcdir)/'`isl_range.c - -libisl_la-isl_reordering.lo: isl_reordering.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_reordering.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_reordering.Tpo -c -o libisl_la-isl_reordering.lo `test -f 'isl_reordering.c' || echo '$(srcdir)/'`isl_reordering.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_reordering.Tpo $(DEPDIR)/libisl_la-isl_reordering.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_reordering.c' object='libisl_la-isl_reordering.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_reordering.lo `test -f 'isl_reordering.c' || echo '$(srcdir)/'`isl_reordering.c - -libisl_la-isl_sample.lo: isl_sample.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sample.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sample.Tpo -c -o libisl_la-isl_sample.lo `test -f 'isl_sample.c' || echo '$(srcdir)/'`isl_sample.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sample.Tpo $(DEPDIR)/libisl_la-isl_sample.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_sample.c' object='libisl_la-isl_sample.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_sample.lo `test -f 'isl_sample.c' || echo '$(srcdir)/'`isl_sample.c - -libisl_la-isl_scan.lo: isl_scan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_scan.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_scan.Tpo -c -o libisl_la-isl_scan.lo `test -f 'isl_scan.c' || echo '$(srcdir)/'`isl_scan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_scan.Tpo $(DEPDIR)/libisl_la-isl_scan.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_scan.c' object='libisl_la-isl_scan.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_scan.lo `test -f 'isl_scan.c' || echo '$(srcdir)/'`isl_scan.c - -libisl_la-isl_schedule.lo: isl_schedule.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_schedule.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_schedule.Tpo -c -o libisl_la-isl_schedule.lo `test -f 'isl_schedule.c' || echo '$(srcdir)/'`isl_schedule.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_schedule.Tpo $(DEPDIR)/libisl_la-isl_schedule.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_schedule.c' object='libisl_la-isl_schedule.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_schedule.lo `test -f 'isl_schedule.c' || echo '$(srcdir)/'`isl_schedule.c - -libisl_la-isl_space.lo: isl_space.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_space.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_space.Tpo -c -o libisl_la-isl_space.lo `test -f 'isl_space.c' || echo '$(srcdir)/'`isl_space.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_space.Tpo $(DEPDIR)/libisl_la-isl_space.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_space.c' object='libisl_la-isl_space.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_space.lo `test -f 'isl_space.c' || echo '$(srcdir)/'`isl_space.c - -libisl_la-isl_stream.lo: isl_stream.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_stream.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_stream.Tpo -c -o libisl_la-isl_stream.lo `test -f 'isl_stream.c' || echo '$(srcdir)/'`isl_stream.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_stream.Tpo $(DEPDIR)/libisl_la-isl_stream.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_stream.c' object='libisl_la-isl_stream.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_stream.lo `test -f 'isl_stream.c' || echo '$(srcdir)/'`isl_stream.c - -libisl_la-isl_seq.lo: isl_seq.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_seq.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_seq.Tpo -c -o libisl_la-isl_seq.lo `test -f 'isl_seq.c' || echo '$(srcdir)/'`isl_seq.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_seq.Tpo $(DEPDIR)/libisl_la-isl_seq.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_seq.c' object='libisl_la-isl_seq.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_seq.lo `test -f 'isl_seq.c' || echo '$(srcdir)/'`isl_seq.c - -libisl_la-isl_tab.lo: isl_tab.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_tab.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_tab.Tpo -c -o libisl_la-isl_tab.lo `test -f 'isl_tab.c' || echo '$(srcdir)/'`isl_tab.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_tab.Tpo $(DEPDIR)/libisl_la-isl_tab.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_tab.c' object='libisl_la-isl_tab.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_tab.lo `test -f 'isl_tab.c' || echo '$(srcdir)/'`isl_tab.c - -libisl_la-isl_tab_pip.lo: isl_tab_pip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_tab_pip.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_tab_pip.Tpo -c -o libisl_la-isl_tab_pip.lo `test -f 'isl_tab_pip.c' || echo '$(srcdir)/'`isl_tab_pip.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_tab_pip.Tpo $(DEPDIR)/libisl_la-isl_tab_pip.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_tab_pip.c' object='libisl_la-isl_tab_pip.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_tab_pip.lo `test -f 'isl_tab_pip.c' || echo '$(srcdir)/'`isl_tab_pip.c - -libisl_la-isl_transitive_closure.lo: isl_transitive_closure.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_transitive_closure.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_transitive_closure.Tpo -c -o libisl_la-isl_transitive_closure.lo `test -f 'isl_transitive_closure.c' || echo '$(srcdir)/'`isl_transitive_closure.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_transitive_closure.Tpo $(DEPDIR)/libisl_la-isl_transitive_closure.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_transitive_closure.c' object='libisl_la-isl_transitive_closure.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_transitive_closure.lo `test -f 'isl_transitive_closure.c' || echo '$(srcdir)/'`isl_transitive_closure.c - -libisl_la-isl_union_map.lo: isl_union_map.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_union_map.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_union_map.Tpo -c -o libisl_la-isl_union_map.lo `test -f 'isl_union_map.c' || echo '$(srcdir)/'`isl_union_map.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_union_map.Tpo $(DEPDIR)/libisl_la-isl_union_map.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_union_map.c' object='libisl_la-isl_union_map.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_union_map.lo `test -f 'isl_union_map.c' || echo '$(srcdir)/'`isl_union_map.c - -libisl_la-isl_vec.lo: isl_vec.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_vec.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_vec.Tpo -c -o libisl_la-isl_vec.lo `test -f 'isl_vec.c' || echo '$(srcdir)/'`isl_vec.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_vec.Tpo $(DEPDIR)/libisl_la-isl_vec.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_vec.c' object='libisl_la-isl_vec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_vec.lo `test -f 'isl_vec.c' || echo '$(srcdir)/'`isl_vec.c - -libisl_la-isl_version.lo: isl_version.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_version.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_version.Tpo -c -o libisl_la-isl_version.lo `test -f 'isl_version.c' || echo '$(srcdir)/'`isl_version.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_version.Tpo $(DEPDIR)/libisl_la-isl_version.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_version.c' object='libisl_la-isl_version.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_version.lo `test -f 'isl_version.c' || echo '$(srcdir)/'`isl_version.c - -libisl_la-isl_vertices.lo: isl_vertices.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_vertices.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_vertices.Tpo -c -o libisl_la-isl_vertices.lo `test -f 'isl_vertices.c' || echo '$(srcdir)/'`isl_vertices.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_vertices.Tpo $(DEPDIR)/libisl_la-isl_vertices.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_vertices.c' object='libisl_la-isl_vertices.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_vertices.lo `test -f 'isl_vertices.c' || echo '$(srcdir)/'`isl_vertices.c - -isl_bound-bound.o: bound.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_bound-bound.o -MD -MP -MF $(DEPDIR)/isl_bound-bound.Tpo -c -o isl_bound-bound.o `test -f 'bound.c' || echo '$(srcdir)/'`bound.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_bound-bound.Tpo $(DEPDIR)/isl_bound-bound.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bound.c' object='isl_bound-bound.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_bound-bound.o `test -f 'bound.c' || echo '$(srcdir)/'`bound.c - -isl_bound-bound.obj: bound.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_bound-bound.obj -MD -MP -MF $(DEPDIR)/isl_bound-bound.Tpo -c -o isl_bound-bound.obj `if test -f 'bound.c'; then $(CYGPATH_W) 'bound.c'; else $(CYGPATH_W) '$(srcdir)/bound.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_bound-bound.Tpo $(DEPDIR)/isl_bound-bound.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bound.c' object='isl_bound-bound.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_bound_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_bound-bound.obj `if test -f 'bound.c'; then $(CYGPATH_W) 'bound.c'; else $(CYGPATH_W) '$(srcdir)/bound.c'; fi` - -isl_cat-cat.o: cat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_cat-cat.o -MD -MP -MF $(DEPDIR)/isl_cat-cat.Tpo -c -o isl_cat-cat.o `test -f 'cat.c' || echo '$(srcdir)/'`cat.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_cat-cat.Tpo $(DEPDIR)/isl_cat-cat.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cat.c' object='isl_cat-cat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_cat-cat.o `test -f 'cat.c' || echo '$(srcdir)/'`cat.c - -isl_cat-cat.obj: cat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_cat-cat.obj -MD -MP -MF $(DEPDIR)/isl_cat-cat.Tpo -c -o isl_cat-cat.obj `if test -f 'cat.c'; then $(CYGPATH_W) 'cat.c'; else $(CYGPATH_W) '$(srcdir)/cat.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_cat-cat.Tpo $(DEPDIR)/isl_cat-cat.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cat.c' object='isl_cat-cat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_cat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_cat-cat.obj `if test -f 'cat.c'; then $(CYGPATH_W) 'cat.c'; else $(CYGPATH_W) '$(srcdir)/cat.c'; fi` - -isl_closure-closure.o: closure.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_closure-closure.o -MD -MP -MF $(DEPDIR)/isl_closure-closure.Tpo -c -o isl_closure-closure.o `test -f 'closure.c' || echo '$(srcdir)/'`closure.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_closure-closure.Tpo $(DEPDIR)/isl_closure-closure.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='closure.c' object='isl_closure-closure.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_closure-closure.o `test -f 'closure.c' || echo '$(srcdir)/'`closure.c - -isl_closure-closure.obj: closure.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_closure-closure.obj -MD -MP -MF $(DEPDIR)/isl_closure-closure.Tpo -c -o isl_closure-closure.obj `if test -f 'closure.c'; then $(CYGPATH_W) 'closure.c'; else $(CYGPATH_W) '$(srcdir)/closure.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_closure-closure.Tpo $(DEPDIR)/isl_closure-closure.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='closure.c' object='isl_closure-closure.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_closure_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_closure-closure.obj `if test -f 'closure.c'; then $(CYGPATH_W) 'closure.c'; else $(CYGPATH_W) '$(srcdir)/closure.c'; fi` - -isl_pip-pip.o: pip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_pip-pip.o -MD -MP -MF $(DEPDIR)/isl_pip-pip.Tpo -c -o isl_pip-pip.o `test -f 'pip.c' || echo '$(srcdir)/'`pip.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_pip-pip.Tpo $(DEPDIR)/isl_pip-pip.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pip.c' object='isl_pip-pip.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_pip-pip.o `test -f 'pip.c' || echo '$(srcdir)/'`pip.c - -isl_pip-pip.obj: pip.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_pip-pip.obj -MD -MP -MF $(DEPDIR)/isl_pip-pip.Tpo -c -o isl_pip-pip.obj `if test -f 'pip.c'; then $(CYGPATH_W) 'pip.c'; else $(CYGPATH_W) '$(srcdir)/pip.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_pip-pip.Tpo $(DEPDIR)/isl_pip-pip.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pip.c' object='isl_pip-pip.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_pip_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_pip-pip.obj `if test -f 'pip.c'; then $(CYGPATH_W) 'pip.c'; else $(CYGPATH_W) '$(srcdir)/pip.c'; fi` - -isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o: polyhedron_detect_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o -MD -MP -MF $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o `test -f 'polyhedron_detect_equalities.c' || echo '$(srcdir)/'`polyhedron_detect_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_detect_equalities.c' object='isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.o `test -f 'polyhedron_detect_equalities.c' || echo '$(srcdir)/'`polyhedron_detect_equalities.c - -isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj: polyhedron_detect_equalities.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj -MD -MP -MF $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj `if test -f 'polyhedron_detect_equalities.c'; then $(CYGPATH_W) 'polyhedron_detect_equalities.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_detect_equalities.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Tpo $(DEPDIR)/isl_polyhedron_detect_equalities-polyhedron_detect_equalities.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_detect_equalities.c' object='isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_detect_equalities_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_detect_equalities-polyhedron_detect_equalities.obj `if test -f 'polyhedron_detect_equalities.c'; then $(CYGPATH_W) 'polyhedron_detect_equalities.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_detect_equalities.c'; fi` - -isl_polyhedron_minimize-polyhedron_minimize.o: polyhedron_minimize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_minimize-polyhedron_minimize.o -MD -MP -MF $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo -c -o isl_polyhedron_minimize-polyhedron_minimize.o `test -f 'polyhedron_minimize.c' || echo '$(srcdir)/'`polyhedron_minimize.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_minimize.c' object='isl_polyhedron_minimize-polyhedron_minimize.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_minimize-polyhedron_minimize.o `test -f 'polyhedron_minimize.c' || echo '$(srcdir)/'`polyhedron_minimize.c - -isl_polyhedron_minimize-polyhedron_minimize.obj: polyhedron_minimize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_minimize-polyhedron_minimize.obj -MD -MP -MF $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo -c -o isl_polyhedron_minimize-polyhedron_minimize.obj `if test -f 'polyhedron_minimize.c'; then $(CYGPATH_W) 'polyhedron_minimize.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_minimize.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Tpo $(DEPDIR)/isl_polyhedron_minimize-polyhedron_minimize.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_minimize.c' object='isl_polyhedron_minimize-polyhedron_minimize.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_minimize_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_minimize-polyhedron_minimize.obj `if test -f 'polyhedron_minimize.c'; then $(CYGPATH_W) 'polyhedron_minimize.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_minimize.c'; fi` - -isl_polyhedron_sample-polyhedron_sample.o: polyhedron_sample.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_sample-polyhedron_sample.o -MD -MP -MF $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo -c -o isl_polyhedron_sample-polyhedron_sample.o `test -f 'polyhedron_sample.c' || echo '$(srcdir)/'`polyhedron_sample.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_sample.c' object='isl_polyhedron_sample-polyhedron_sample.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_sample-polyhedron_sample.o `test -f 'polyhedron_sample.c' || echo '$(srcdir)/'`polyhedron_sample.c - -isl_polyhedron_sample-polyhedron_sample.obj: polyhedron_sample.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polyhedron_sample-polyhedron_sample.obj -MD -MP -MF $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo -c -o isl_polyhedron_sample-polyhedron_sample.obj `if test -f 'polyhedron_sample.c'; then $(CYGPATH_W) 'polyhedron_sample.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_sample.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Tpo $(DEPDIR)/isl_polyhedron_sample-polyhedron_sample.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polyhedron_sample.c' object='isl_polyhedron_sample-polyhedron_sample.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polyhedron_sample_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polyhedron_sample-polyhedron_sample.obj `if test -f 'polyhedron_sample.c'; then $(CYGPATH_W) 'polyhedron_sample.c'; else $(CYGPATH_W) '$(srcdir)/polyhedron_sample.c'; fi` - -isl_polytope_scan-polytope_scan.o: polytope_scan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polytope_scan-polytope_scan.o -MD -MP -MF $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo -c -o isl_polytope_scan-polytope_scan.o `test -f 'polytope_scan.c' || echo '$(srcdir)/'`polytope_scan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo $(DEPDIR)/isl_polytope_scan-polytope_scan.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polytope_scan.c' object='isl_polytope_scan-polytope_scan.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polytope_scan-polytope_scan.o `test -f 'polytope_scan.c' || echo '$(srcdir)/'`polytope_scan.c - -isl_polytope_scan-polytope_scan.obj: polytope_scan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_polytope_scan-polytope_scan.obj -MD -MP -MF $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo -c -o isl_polytope_scan-polytope_scan.obj `if test -f 'polytope_scan.c'; then $(CYGPATH_W) 'polytope_scan.c'; else $(CYGPATH_W) '$(srcdir)/polytope_scan.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_polytope_scan-polytope_scan.Tpo $(DEPDIR)/isl_polytope_scan-polytope_scan.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polytope_scan.c' object='isl_polytope_scan-polytope_scan.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_polytope_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_polytope_scan-polytope_scan.obj `if test -f 'polytope_scan.c'; then $(CYGPATH_W) 'polytope_scan.c'; else $(CYGPATH_W) '$(srcdir)/polytope_scan.c'; fi` - -isl_test-isl_test.o: isl_test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_test-isl_test.o -MD -MP -MF $(DEPDIR)/isl_test-isl_test.Tpo -c -o isl_test-isl_test.o `test -f 'isl_test.c' || echo '$(srcdir)/'`isl_test.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_test-isl_test.Tpo $(DEPDIR)/isl_test-isl_test.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_test.c' object='isl_test-isl_test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_test-isl_test.o `test -f 'isl_test.c' || echo '$(srcdir)/'`isl_test.c - -isl_test-isl_test.obj: isl_test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT isl_test-isl_test.obj -MD -MP -MF $(DEPDIR)/isl_test-isl_test.Tpo -c -o isl_test-isl_test.obj `if test -f 'isl_test.c'; then $(CYGPATH_W) 'isl_test.c'; else $(CYGPATH_W) '$(srcdir)/isl_test.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/isl_test-isl_test.Tpo $(DEPDIR)/isl_test-isl_test.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='isl_test.c' object='isl_test-isl_test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(isl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o isl_test-isl_test.obj `if test -f 'isl_test.c'; then $(CYGPATH_W) 'isl_test.c'; else $(CYGPATH_W) '$(srcdir)/isl_test.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files -install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-nodist_pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) isl_config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) isl_config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) isl_config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) isl_config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ - isl_config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-data-local install-nodist_pkgincludeHEADERS \ - install-pkgconfigDATA install-pkgincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES \ - uninstall-nodist_pkgincludeHEADERS uninstall-pkgconfigDATA \ - uninstall-pkgincludeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-TESTS check-am clean \ - clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstPROGRAMS ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man \ - install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ - install-pkgconfigDATA install-pkgincludeHEADERS install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS \ - uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS - - -dist-hook: - echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID - (cd doc; make manual.pdf) - cp doc/manual.pdf $(distdir)/doc/ - -gitversion.h: @GIT_HEAD@ - $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@ - -install-data-local: $(srcdir)/isl.py - @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \ - $(builddir)/libisl.la`; \ - case $$libisl in \ - '') echo Cannot find isl library name. GDB bindings not installed.;; \ - *) echo $(INSTALL_DATA) $(srcdir)/isl.py \ - $(DESTDIR)$(libdir)/$$libisl-gdb.py; \ - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \ - $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/isl/aclocal.m4 b/cloog-0.17.0/isl/aclocal.m4 deleted file mode 100644 index 0e08e3ff2a6fc6dc97e6242a4198018fa5bcb432..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/aclocal.m4 +++ /dev/null @@ -1,995 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([m4/ax_c___attribute__.m4]) -m4_include([m4/ax_cc_maxopt.m4]) -m4_include([m4/ax_check_compiler_flags.m4]) -m4_include([m4/ax_compiler_vendor.m4]) -m4_include([m4/ax_create_pkgconfig_info.m4]) -m4_include([m4/ax_create_stdint_h.m4]) -m4_include([m4/ax_detect_git_head.m4]) -m4_include([m4/ax_gcc_archflag.m4]) -m4_include([m4/ax_gcc_warn_unused_result.m4]) -m4_include([m4/ax_gcc_x86_cpuid.m4]) -m4_include([m4/ax_set_warning_flags.m4]) -m4_include([m4/ax_submodule.m4]) -m4_include([m4/libtool.m4]) -m4_include([m4/ltoptions.m4]) -m4_include([m4/ltsugar.m4]) -m4_include([m4/ltversion.m4]) -m4_include([m4/lt~obsolete.m4]) diff --git a/cloog-0.17.0/isl/basis_reduction_tab.c b/cloog-0.17.0/isl/basis_reduction_tab.c deleted file mode 100644 index af5456939cbbb3b92380de200c36f60befa87d00..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/basis_reduction_tab.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_tab.h" - -struct tab_lp { - struct isl_ctx *ctx; - struct isl_vec *row; - struct isl_tab *tab; - struct isl_tab_undo **stack; - isl_int *obj; - isl_int opt; - isl_int opt_denom; - isl_int tmp; - isl_int tmp2; - int neq; - unsigned dim; - /* number of constraints in initial product tableau */ - int con_offset; - /* objective function has fixed or no integer value */ - int is_fixed; -}; - -static struct tab_lp *init_lp(struct isl_tab *tab); -static void set_lp_obj(struct tab_lp *lp, isl_int *row, int dim); -static int solve_lp(struct tab_lp *lp); -static void get_obj_val(struct tab_lp* lp, mpq_t *F); -static void delete_lp(struct tab_lp *lp); -static int add_lp_row(struct tab_lp *lp, isl_int *row, int dim); -static void get_alpha(struct tab_lp* lp, int row, mpq_t *alpha); -static int del_lp_row(struct tab_lp *lp) WARN_UNUSED; -static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row); - -#define GBR_LP struct tab_lp -#define GBR_type mpq_t -#define GBR_init(v) mpq_init(v) -#define GBR_clear(v) mpq_clear(v) -#define GBR_set(a,b) mpq_set(a,b) -#define GBR_set_ui(a,b) mpq_set_ui(a,b,1) -#define GBR_mul(a,b,c) mpq_mul(a,b,c) -#define GBR_lt(a,b) (mpq_cmp(a,b) < 0) -#define GBR_is_zero(a) (mpq_sgn(a) == 0) -#define GBR_floor(a,b) mpz_fdiv_q(a,mpq_numref(b),mpq_denref(b)) -#define GBR_ceil(a,b) mpz_cdiv_q(a,mpq_numref(b),mpq_denref(b)) -#define GBR_lp_init(P) init_lp(P) -#define GBR_lp_set_obj(lp, obj, dim) set_lp_obj(lp, obj, dim) -#define GBR_lp_solve(lp) solve_lp(lp) -#define GBR_lp_get_obj_val(lp, F) get_obj_val(lp, F) -#define GBR_lp_delete(lp) delete_lp(lp) -#define GBR_lp_next_row(lp) lp->neq -#define GBR_lp_add_row(lp, row, dim) add_lp_row(lp, row, dim) -#define GBR_lp_get_alpha(lp, row, alpha) get_alpha(lp, row, alpha) -#define GBR_lp_del_row(lp) del_lp_row(lp) -#define GBR_lp_is_fixed(lp) (lp)->is_fixed -#define GBR_lp_cut(lp, obj) cut_lp_to_hyperplane(lp, obj) -#include "basis_reduction_templ.c" - -/* Set up a tableau for the Cartesian product of bset with itself. - * This could be optimized by first setting up a tableau for bset - * and then performing the Cartesian product on the tableau. - */ -static struct isl_tab *gbr_tab(struct isl_tab *tab, struct isl_vec *row) -{ - unsigned dim; - struct isl_tab *prod; - - if (!tab || !row) - return NULL; - - dim = tab->n_var; - prod = isl_tab_product(tab, tab); - if (isl_tab_extend_cons(prod, 3 * dim + 1) < 0) { - isl_tab_free(prod); - return NULL; - } - return prod; -} - -static struct tab_lp *init_lp(struct isl_tab *tab) -{ - struct tab_lp *lp = NULL; - - if (!tab) - return NULL; - - lp = isl_calloc_type(tab->mat->ctx, struct tab_lp); - if (!lp) - return NULL; - - isl_int_init(lp->opt); - isl_int_init(lp->opt_denom); - isl_int_init(lp->tmp); - isl_int_init(lp->tmp2); - - lp->dim = tab->n_var; - - lp->ctx = tab->mat->ctx; - isl_ctx_ref(lp->ctx); - - lp->stack = isl_alloc_array(lp->ctx, struct isl_tab_undo *, lp->dim); - - lp->row = isl_vec_alloc(lp->ctx, 1 + 2 * lp->dim); - if (!lp->row) - goto error; - lp->tab = gbr_tab(tab, lp->row); - if (!lp->tab) - goto error; - lp->con_offset = lp->tab->n_con; - lp->obj = NULL; - lp->neq = 0; - - return lp; -error: - delete_lp(lp); - return NULL; -} - -static void set_lp_obj(struct tab_lp *lp, isl_int *row, int dim) -{ - lp->obj = row; -} - -static int solve_lp(struct tab_lp *lp) -{ - enum isl_lp_result res; - unsigned flags = 0; - - lp->is_fixed = 0; - - isl_int_set_si(lp->row->el[0], 0); - isl_seq_cpy(lp->row->el + 1, lp->obj, lp->dim); - isl_seq_neg(lp->row->el + 1 + lp->dim, lp->obj, lp->dim); - if (lp->neq) - flags = ISL_TAB_SAVE_DUAL; - res = isl_tab_min(lp->tab, lp->row->el, lp->ctx->one, - &lp->opt, &lp->opt_denom, flags); - isl_int_mul_ui(lp->opt_denom, lp->opt_denom, 2); - if (isl_int_abs_lt(lp->opt, lp->opt_denom)) { - struct isl_vec *sample = isl_tab_get_sample_value(lp->tab); - if (!sample) - return -1; - isl_seq_inner_product(lp->obj, sample->el + 1, lp->dim, &lp->tmp); - isl_seq_inner_product(lp->obj, sample->el + 1 + lp->dim, lp->dim, &lp->tmp2); - isl_int_cdiv_q(lp->tmp, lp->tmp, sample->el[0]); - isl_int_fdiv_q(lp->tmp2, lp->tmp2, sample->el[0]); - if (isl_int_ge(lp->tmp, lp->tmp2)) - lp->is_fixed = 1; - isl_vec_free(sample); - } - isl_int_divexact_ui(lp->opt_denom, lp->opt_denom, 2); - if (res != isl_lp_ok) - return -1; - return 0; -} - -/* The current objective function has a fixed (or no) integer value. - * Cut the tableau to the hyperplane that fixes this value in - * both halves of the tableau. - * Return 1 if the resulting tableau is empty. - */ -static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row) -{ - enum isl_lp_result res; - - isl_int_set_si(lp->row->el[0], 0); - isl_seq_cpy(lp->row->el + 1, row, lp->dim); - isl_seq_clr(lp->row->el + 1 + lp->dim, lp->dim); - res = isl_tab_min(lp->tab, lp->row->el, lp->ctx->one, - &lp->tmp, NULL, 0); - if (res != isl_lp_ok) - return -1; - - isl_int_neg(lp->row->el[0], lp->tmp); - if (isl_tab_add_eq(lp->tab, lp->row->el) < 0) - return -1; - - isl_seq_cpy(lp->row->el + 1 + lp->dim, row, lp->dim); - isl_seq_clr(lp->row->el + 1, lp->dim); - if (isl_tab_add_eq(lp->tab, lp->row->el) < 0) - return -1; - - lp->con_offset += 2; - - return lp->tab->empty; -} - -static void get_obj_val(struct tab_lp* lp, mpq_t *F) -{ - isl_int_neg(mpq_numref(*F), lp->opt); - isl_int_set(mpq_denref(*F), lp->opt_denom); -} - -static void delete_lp(struct tab_lp *lp) -{ - if (!lp) - return; - - isl_int_clear(lp->opt); - isl_int_clear(lp->opt_denom); - isl_int_clear(lp->tmp); - isl_int_clear(lp->tmp2); - isl_vec_free(lp->row); - free(lp->stack); - isl_tab_free(lp->tab); - isl_ctx_deref(lp->ctx); - free(lp); -} - -static int add_lp_row(struct tab_lp *lp, isl_int *row, int dim) -{ - lp->stack[lp->neq] = isl_tab_snap(lp->tab); - - isl_int_set_si(lp->row->el[0], 0); - isl_seq_cpy(lp->row->el + 1, row, lp->dim); - isl_seq_neg(lp->row->el + 1 + lp->dim, row, lp->dim); - - if (isl_tab_add_valid_eq(lp->tab, lp->row->el) < 0) - return -1; - - return lp->neq++; -} - -static void get_alpha(struct tab_lp* lp, int row, mpq_t *alpha) -{ - row += lp->con_offset; - isl_int_neg(mpq_numref(*alpha), lp->tab->dual->el[1 + row]); - isl_int_set(mpq_denref(*alpha), lp->tab->dual->el[0]); -} - -static int del_lp_row(struct tab_lp *lp) -{ - lp->neq--; - return isl_tab_rollback(lp->tab, lp->stack[lp->neq]); -} diff --git a/cloog-0.17.0/isl/basis_reduction_templ.c b/cloog-0.17.0/isl/basis_reduction_templ.c deleted file mode 100644 index f4c50edd05f52c7cabd70df4f898a804b85071a7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/basis_reduction_templ.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright 2006-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_basis_reduction.h" - -static void save_alpha(GBR_LP *lp, int first, int n, GBR_type *alpha) -{ - int i; - - for (i = 0; i < n; ++i) - GBR_lp_get_alpha(lp, first + i, &alpha[i]); -} - -/* Compute a reduced basis for the set represented by the tableau "tab". - * tab->basis, which must be initialized by the calling function to an affine - * unimodular basis, is updated to reflect the reduced basis. - * The first tab->n_zero rows of the basis (ignoring the constant row) - * are assumed to correspond to equalities and are left untouched. - * tab->n_zero is updated to reflect any additional equalities that - * have been detected in the first rows of the new basis. - * The final tab->n_unbounded rows of the basis are assumed to correspond - * to unbounded directions and are also left untouched. - * In particular this means that the remaining rows are assumed to - * correspond to bounded directions. - * - * This function implements the algorithm described in - * "An Implementation of the Generalized Basis Reduction Algorithm - * for Integer Programming" of Cook el al. to compute a reduced basis. - * We use \epsilon = 1/4. - * - * If ctx->opt->gbr_only_first is set, the user is only interested - * in the first direction. In this case we stop the basis reduction when - * the width in the first direction becomes smaller than 2. - */ -struct isl_tab *isl_tab_compute_reduced_basis(struct isl_tab *tab) -{ - unsigned dim; - struct isl_ctx *ctx; - struct isl_mat *B; - int unbounded; - int i; - GBR_LP *lp = NULL; - GBR_type F_old, alpha, F_new; - int row; - isl_int tmp; - struct isl_vec *b_tmp; - GBR_type *F = NULL; - GBR_type *alpha_buffer[2] = { NULL, NULL }; - GBR_type *alpha_saved; - GBR_type F_saved; - int use_saved = 0; - isl_int mu[2]; - GBR_type mu_F[2]; - GBR_type two; - GBR_type one; - int empty = 0; - int fixed = 0; - int fixed_saved = 0; - int mu_fixed[2]; - int n_bounded; - int gbr_only_first; - - if (!tab) - return NULL; - - if (tab->empty) - return tab; - - ctx = tab->mat->ctx; - gbr_only_first = ctx->opt->gbr_only_first; - dim = tab->n_var; - B = tab->basis; - if (!B) - return tab; - - n_bounded = dim - tab->n_unbounded; - if (n_bounded <= tab->n_zero + 1) - return tab; - - isl_int_init(tmp); - isl_int_init(mu[0]); - isl_int_init(mu[1]); - - GBR_init(alpha); - GBR_init(F_old); - GBR_init(F_new); - GBR_init(F_saved); - GBR_init(mu_F[0]); - GBR_init(mu_F[1]); - GBR_init(two); - GBR_init(one); - - b_tmp = isl_vec_alloc(ctx, dim); - if (!b_tmp) - goto error; - - F = isl_alloc_array(ctx, GBR_type, n_bounded); - alpha_buffer[0] = isl_alloc_array(ctx, GBR_type, n_bounded); - alpha_buffer[1] = isl_alloc_array(ctx, GBR_type, n_bounded); - alpha_saved = alpha_buffer[0]; - - if (!F || !alpha_buffer[0] || !alpha_buffer[1]) - goto error; - - for (i = 0; i < n_bounded; ++i) { - GBR_init(F[i]); - GBR_init(alpha_buffer[0][i]); - GBR_init(alpha_buffer[1][i]); - } - - GBR_set_ui(two, 2); - GBR_set_ui(one, 1); - - lp = GBR_lp_init(tab); - if (!lp) - goto error; - - i = tab->n_zero; - - GBR_lp_set_obj(lp, B->row[1+i]+1, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &F[i]); - - if (GBR_lt(F[i], one)) { - if (!GBR_is_zero(F[i])) { - empty = GBR_lp_cut(lp, B->row[1+i]+1); - if (empty) - goto done; - GBR_set_ui(F[i], 0); - } - tab->n_zero++; - } - - do { - if (i+1 == tab->n_zero) { - GBR_lp_set_obj(lp, B->row[1+i+1]+1, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &F_new); - fixed = GBR_lp_is_fixed(lp); - GBR_set_ui(alpha, 0); - } else - if (use_saved) { - row = GBR_lp_next_row(lp); - GBR_set(F_new, F_saved); - fixed = fixed_saved; - GBR_set(alpha, alpha_saved[i]); - } else { - row = GBR_lp_add_row(lp, B->row[1+i]+1, dim); - GBR_lp_set_obj(lp, B->row[1+i+1]+1, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &F_new); - fixed = GBR_lp_is_fixed(lp); - - GBR_lp_get_alpha(lp, row, &alpha); - - if (i > 0) - save_alpha(lp, row-i, i, alpha_saved); - - if (GBR_lp_del_row(lp) < 0) - goto error; - } - GBR_set(F[i+1], F_new); - - GBR_floor(mu[0], alpha); - GBR_ceil(mu[1], alpha); - - if (isl_int_eq(mu[0], mu[1])) - isl_int_set(tmp, mu[0]); - else { - int j; - - for (j = 0; j <= 1; ++j) { - isl_int_set(tmp, mu[j]); - isl_seq_combine(b_tmp->el, - ctx->one, B->row[1+i+1]+1, - tmp, B->row[1+i]+1, dim); - GBR_lp_set_obj(lp, b_tmp->el, dim); - ctx->stats->gbr_solved_lps++; - unbounded = GBR_lp_solve(lp); - isl_assert(ctx, !unbounded, goto error); - GBR_lp_get_obj_val(lp, &mu_F[j]); - mu_fixed[j] = GBR_lp_is_fixed(lp); - if (i > 0) - save_alpha(lp, row-i, i, alpha_buffer[j]); - } - - if (GBR_lt(mu_F[0], mu_F[1])) - j = 0; - else - j = 1; - - isl_int_set(tmp, mu[j]); - GBR_set(F_new, mu_F[j]); - fixed = mu_fixed[j]; - alpha_saved = alpha_buffer[j]; - } - isl_seq_combine(B->row[1+i+1]+1, ctx->one, B->row[1+i+1]+1, - tmp, B->row[1+i]+1, dim); - - if (i+1 == tab->n_zero && fixed) { - if (!GBR_is_zero(F[i+1])) { - empty = GBR_lp_cut(lp, B->row[1+i+1]+1); - if (empty) - goto done; - GBR_set_ui(F[i+1], 0); - } - tab->n_zero++; - } - - GBR_set(F_old, F[i]); - - use_saved = 0; - /* mu_F[0] = 4 * F_new; mu_F[1] = 3 * F_old */ - GBR_set_ui(mu_F[0], 4); - GBR_mul(mu_F[0], mu_F[0], F_new); - GBR_set_ui(mu_F[1], 3); - GBR_mul(mu_F[1], mu_F[1], F_old); - if (GBR_lt(mu_F[0], mu_F[1])) { - B = isl_mat_swap_rows(B, 1 + i, 1 + i + 1); - if (i > tab->n_zero) { - use_saved = 1; - GBR_set(F_saved, F_new); - fixed_saved = fixed; - if (GBR_lp_del_row(lp) < 0) - goto error; - --i; - } else { - GBR_set(F[tab->n_zero], F_new); - if (gbr_only_first && GBR_lt(F[tab->n_zero], two)) - break; - - if (fixed) { - if (!GBR_is_zero(F[tab->n_zero])) { - empty = GBR_lp_cut(lp, B->row[1+tab->n_zero]+1); - if (empty) - goto done; - GBR_set_ui(F[tab->n_zero], 0); - } - tab->n_zero++; - } - } - } else { - GBR_lp_add_row(lp, B->row[1+i]+1, dim); - ++i; - } - } while (i < n_bounded - 1); - - if (0) { -done: - if (empty < 0) { -error: - isl_mat_free(B); - B = NULL; - } - } - - GBR_lp_delete(lp); - - if (alpha_buffer[1]) - for (i = 0; i < n_bounded; ++i) { - GBR_clear(F[i]); - GBR_clear(alpha_buffer[0][i]); - GBR_clear(alpha_buffer[1][i]); - } - free(F); - free(alpha_buffer[0]); - free(alpha_buffer[1]); - - isl_vec_free(b_tmp); - - GBR_clear(alpha); - GBR_clear(F_old); - GBR_clear(F_new); - GBR_clear(F_saved); - GBR_clear(mu_F[0]); - GBR_clear(mu_F[1]); - GBR_clear(two); - GBR_clear(one); - - isl_int_clear(tmp); - isl_int_clear(mu[0]); - isl_int_clear(mu[1]); - - tab->basis = B; - - return tab; -} - -/* Compute an affine form of a reduced basis of the given basic - * non-parametric set, which is assumed to be bounded and not - * include any integer divisions. - * The first column and the first row correspond to the constant term. - * - * If the input contains any equalities, we first create an initial - * basis with the equalities first. Otherwise, we start off with - * the identity matrix. - */ -struct isl_mat *isl_basic_set_reduced_basis(struct isl_basic_set *bset) -{ - struct isl_mat *basis; - struct isl_tab *tab; - - if (!bset) - return NULL; - - if (isl_basic_set_dim(bset, isl_dim_div) != 0) - isl_die(bset->ctx, isl_error_invalid, - "no integer division allowed", return NULL); - if (isl_basic_set_dim(bset, isl_dim_param) != 0) - isl_die(bset->ctx, isl_error_invalid, - "no parameters allowed", return NULL); - - tab = isl_tab_from_basic_set(bset); - if (!tab) - return NULL; - - if (bset->n_eq == 0) - tab->basis = isl_mat_identity(bset->ctx, 1 + tab->n_var); - else { - isl_mat *eq; - unsigned nvar = isl_basic_set_total_dim(bset); - eq = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, - 1, nvar); - eq = isl_mat_left_hermite(eq, 0, NULL, &tab->basis); - tab->basis = isl_mat_lin_to_aff(tab->basis); - tab->n_zero = bset->n_eq; - isl_mat_free(eq); - } - tab = isl_tab_compute_reduced_basis(tab); - if (!tab) - return NULL; - - basis = isl_mat_copy(tab->basis); - - isl_tab_free(tab); - - return basis; -} diff --git a/cloog-0.17.0/isl/bound.c b/cloog-0.17.0/isl/bound.c deleted file mode 100644 index a0772b7b98e87a756ad32f200b631f3cc7369885..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/bound.c +++ /dev/null @@ -1,278 +0,0 @@ -#include -#include -#include -#include -#include - -struct bound_options { - struct isl_options *isl; - unsigned verify; - int print_all; - int continue_on_error; -}; - -ISL_ARGS_START(struct bound_options, bound_options_args) -ISL_ARG_CHILD(struct bound_options, isl, "isl", &isl_options_args, - "isl options") -ISL_ARG_BOOL(struct bound_options, verify, 'T', "verify", 0, NULL) -ISL_ARG_BOOL(struct bound_options, print_all, 'A', "print-all", 0, NULL) -ISL_ARG_BOOL(struct bound_options, continue_on_error, '\0', "continue-on-error", 0, NULL) -ISL_ARGS_END - -ISL_ARG_DEF(bound_options, struct bound_options, bound_options_args) - -static __isl_give isl_set *set_bounds(__isl_take isl_set *set) -{ - unsigned nparam; - int i, r; - isl_point *pt, *pt2; - isl_set *box; - - nparam = isl_set_dim(set, isl_dim_param); - r = nparam >= 8 ? 5 : nparam >= 5 ? 15 : 50; - - pt = isl_set_sample_point(isl_set_copy(set)); - pt2 = isl_point_copy(pt); - - for (i = 0; i < nparam; ++i) { - pt = isl_point_add_ui(pt, isl_dim_param, i, r); - pt2 = isl_point_sub_ui(pt2, isl_dim_param, i, r); - } - - box = isl_set_box_from_points(pt, pt2); - - return isl_set_intersect(set, box); -} - -struct verify_point_bound { - struct bound_options *options; - int stride; - int n; - int exact; - int error; - - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *bound; -}; - -static int verify_point(__isl_take isl_point *pnt, void *user) -{ - int i; - unsigned nvar; - unsigned nparam; - struct verify_point_bound *vpb = (struct verify_point_bound *) user; - isl_int t; - isl_pw_qpolynomial_fold *pwf; - isl_qpolynomial *bound = NULL; - isl_qpolynomial *opt = NULL; - isl_set *dom = NULL; - const char *minmax; - int bounded; - int sign; - int ok; - FILE *out = vpb->options->print_all ? stdout : stderr; - - vpb->n--; - - if (1) { - minmax = "ub"; - sign = 1; - } else { - minmax = "lb"; - sign = -1; - } - - isl_int_init(t); - - pwf = isl_pw_qpolynomial_fold_copy(vpb->pwf); - - nparam = isl_pw_qpolynomial_fold_dim(pwf, isl_dim_param); - for (i = 0; i < nparam; ++i) { - isl_point_get_coordinate(pnt, isl_dim_param, i, &t); - pwf = isl_pw_qpolynomial_fold_fix_dim(pwf, isl_dim_param, i, t); - } - - bound = isl_pw_qpolynomial_fold_eval( - isl_pw_qpolynomial_fold_copy(vpb->bound), - isl_point_copy(pnt)); - - dom = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf)); - bounded = isl_set_is_bounded(dom); - - if (bounded < 0) - goto error; - - if (!bounded) - opt = isl_pw_qpolynomial_fold_eval( - isl_pw_qpolynomial_fold_copy(pwf), - isl_set_sample_point(isl_set_copy(dom))); - else if (sign > 0) - opt = isl_pw_qpolynomial_fold_max(isl_pw_qpolynomial_fold_copy(pwf)); - else - opt = isl_pw_qpolynomial_fold_min(isl_pw_qpolynomial_fold_copy(pwf)); - - nvar = isl_set_dim(dom, isl_dim_set); - opt = isl_qpolynomial_project_domain_on_params(opt); - if (vpb->exact && bounded) - ok = isl_qpolynomial_plain_is_equal(opt, bound); - else if (sign > 0) - ok = isl_qpolynomial_le_cst(opt, bound); - else - ok = isl_qpolynomial_le_cst(bound, opt); - if (ok < 0) - goto error; - - if (vpb->options->print_all || !ok) { - fprintf(out, "%s(", minmax); - for (i = 0; i < nparam; ++i) { - if (i) - fprintf(out, ", "); - isl_point_get_coordinate(pnt, isl_dim_param, i, &t); - isl_int_print(out, t, 0); - } - fprintf(out, ") = "); - isl_qpolynomial_print(bound, out, ISL_FORMAT_ISL); - fprintf(out, ", %s = ", bounded ? "opt" : "sample"); - isl_qpolynomial_print(opt, out, ISL_FORMAT_ISL); - if (ok) - fprintf(out, ". OK\n"); - else - fprintf(out, ". NOT OK\n"); - } else if ((vpb->n % vpb->stride) == 0) { - printf("o"); - fflush(stdout); - } - - if (0) { -error: - ok = 0; - } - - isl_pw_qpolynomial_fold_free(pwf); - isl_qpolynomial_free(bound); - isl_qpolynomial_free(opt); - isl_point_free(pnt); - isl_set_free(dom); - - isl_int_clear(t); - - if (!ok) - vpb->error = 1; - - if (vpb->options->continue_on_error) - ok = 1; - - return (vpb->n >= 1 && ok) ? 0 : -1; -} - -static int check_solution(__isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_pw_qpolynomial_fold *bound, int exact, - struct bound_options *options) -{ - struct verify_point_bound vpb; - isl_int count, max; - isl_set *dom; - isl_set *context; - int i, r, n; - - dom = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf)); - context = isl_set_params(isl_set_copy(dom)); - context = isl_set_remove_divs(context); - context = set_bounds(context); - - isl_int_init(count); - isl_int_init(max); - - isl_int_set_si(max, 200); - r = isl_set_count_upto(context, max, &count); - assert(r >= 0); - n = isl_int_get_si(count); - - isl_int_clear(max); - isl_int_clear(count); - - vpb.options = options; - vpb.pwf = pwf; - vpb.bound = bound; - vpb.n = n; - vpb.stride = n > 70 ? 1 + (n + 1)/70 : 1; - vpb.error = 0; - vpb.exact = exact; - - if (!options->print_all) { - for (i = 0; i < vpb.n; i += vpb.stride) - printf("."); - printf("\r"); - fflush(stdout); - } - - isl_set_foreach_point(context, verify_point, &vpb); - - isl_set_free(context); - isl_set_free(dom); - isl_pw_qpolynomial_fold_free(pwf); - isl_pw_qpolynomial_fold_free(bound); - - if (!options->print_all) - printf("\n"); - - if (vpb.error) { - fprintf(stderr, "Check failed !\n"); - return -1; - } - - return 0; -} - -int main(int argc, char **argv) -{ - isl_ctx *ctx; - isl_pw_qpolynomial_fold *copy; - isl_pw_qpolynomial_fold *pwf; - struct isl_stream *s; - struct isl_obj obj; - struct bound_options *options; - int exact; - int r = 0; - - options = bound_options_new_with_defaults(); - assert(options); - argc = bound_options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(&bound_options_args, options); - - s = isl_stream_new_file(ctx, stdin); - obj = isl_stream_read_obj(s); - if (obj.type == isl_obj_pw_qpolynomial) - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial(isl_fold_max, - obj.v); - else if (obj.type == isl_obj_pw_qpolynomial_fold) - pwf = obj.v; - else { - obj.type->free(obj.v); - isl_die(ctx, isl_error_invalid, "invalid input", goto error); - } - - if (options->verify) - copy = isl_pw_qpolynomial_fold_copy(pwf); - - pwf = isl_pw_qpolynomial_fold_bound(pwf, &exact); - pwf = isl_pw_qpolynomial_fold_coalesce(pwf); - - if (options->verify) { - r = check_solution(copy, pwf, exact, options); - } else { - if (!exact) - printf("# NOT exact\n"); - isl_pw_qpolynomial_fold_print(pwf, stdout, 0); - fprintf(stdout, "\n"); - isl_pw_qpolynomial_fold_free(pwf); - } - -error: - isl_stream_free(s); - - isl_ctx_free(ctx); - - return r; -} diff --git a/cloog-0.17.0/isl/bound_test.sh.in b/cloog-0.17.0/isl/bound_test.sh.in deleted file mode 100755 index e3fc037ecafab0c296ff04a93f473b5da2dfc862..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/bound_test.sh.in +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -EXEEXT=@EXEEXT@ - -BOUND_TESTS="\ - basicLinear2.pwqp \ - basicLinear.pwqp \ - basicTestParameterPosNeg.pwqp \ - basicTest.pwqp \ - devos.pwqp \ - equality1.pwqp \ - equality2.pwqp \ - equality3.pwqp \ - equality4.pwqp \ - equality5.pwqp \ - faddeev.pwqp \ - linearExample.pwqp \ - neg.pwqp \ - philippe3vars3pars.pwqp \ - philippe3vars.pwqp \ - philippeNeg.pwqp \ - philippePolynomialCoeff1P.pwqp \ - philippePolynomialCoeff.pwqp \ - philippe.pwqp \ - product.pwqp \ - split.pwqp \ - test3Deg3Var.pwqp \ - toplas.pwqp \ - unexpanded.pwqp" - -for i in $BOUND_TESTS; do - echo $i; - ./isl_bound$EXEEXT -T --bound=bernstein < $srcdir/test_inputs/$i || exit - ./isl_bound$EXEEXT -T --bound=range < $srcdir/test_inputs/$i || exit -done diff --git a/cloog-0.17.0/isl/cat.c b/cloog-0.17.0/isl/cat.c deleted file mode 100644 index 631314205923f2c71a0975dfa3dcbbb2d31780db..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/cat.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include - -struct isl_arg_choice cat_format[] = { - {"isl", ISL_FORMAT_ISL}, - {"omega", ISL_FORMAT_OMEGA}, - {"polylib", ISL_FORMAT_POLYLIB}, - {"ext-polylib", ISL_FORMAT_EXT_POLYLIB}, - {"latex", ISL_FORMAT_LATEX}, - {0} -}; - -struct cat_options { - struct isl_options *isl; - unsigned format; -}; - -ISL_ARGS_START(struct cat_options, cat_options_args) -ISL_ARG_CHILD(struct cat_options, isl, "isl", &isl_options_args, "isl options") -ISL_ARG_CHOICE(struct cat_options, format, 0, "format", \ - cat_format, ISL_FORMAT_ISL, "output format") -ISL_ARGS_END - -ISL_ARG_DEF(cat_options, struct cat_options, cat_options_args) - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx; - struct isl_stream *s; - struct isl_obj obj; - struct cat_options *options; - isl_printer *p; - - options = cat_options_new_with_defaults(); - assert(options); - argc = cat_options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(&cat_options_args, options); - - s = isl_stream_new_file(ctx, stdin); - obj = isl_stream_read_obj(s); - isl_stream_free(s); - - p = isl_printer_to_file(ctx, stdout); - p = isl_printer_set_output_format(p, options->format); - p = obj.type->print(p, obj.v); - p = isl_printer_end_line(p); - isl_printer_free(p); - - obj.type->free(obj.v); - - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.17.0/isl/closure.c b/cloog-0.17.0/isl/closure.c deleted file mode 100644 index a0faa15820add003abc2c3b9ef5aeca2d97e2eb6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/closure.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx; - struct isl_map *map; - struct isl_options *options; - int exact; - - options = isl_options_new_with_defaults(); - assert(options); - argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(&isl_options_args, options); - - map = isl_map_read_from_file(ctx, stdin); - map = isl_map_transitive_closure(map, &exact); - if (!exact) - printf("# NOT exact\n"); - isl_map_print(map, stdout, 0, ISL_FORMAT_ISL); - printf("\n"); - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - printf("# coalesced\n"); - isl_map_print(map, stdout, 0, ISL_FORMAT_ISL); - printf("\n"); - isl_map_free(map); - - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.17.0/isl/config.guess b/cloog-0.17.0/isl/config.guess deleted file mode 100755 index c2246a4f7f4c78281ccfc4238a54cf7d83c4f421..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/config.guess +++ /dev/null @@ -1,1502 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2009-12-30' - -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.17.0/isl/config.sub b/cloog-0.17.0/isl/config.sub deleted file mode 100755 index c2d125724c0ed2d2c6da5308c54567649554e5f3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/config.sub +++ /dev/null @@ -1,1714 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-01-22' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.17.0/isl/configure b/cloog-0.17.0/isl/configure deleted file mode 100755 index b397e19c496bef84cca764ac06e91332c4a6e72c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/configure +++ /dev/null @@ -1,20410 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for isl 0.08. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: isl-development@googlegroups.com about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='isl' -PACKAGE_TARNAME='isl' -PACKAGE_VERSION='0.08' -PACKAGE_STRING='isl 0.08' -PACKAGE_BUGREPORT='isl-development@googlegroups.com' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -GIT_HEAD_VERSION -GIT_HEAD -GIT_HEAD_ID -pkgconfig_libfile -pkgconfig_libdir -WARNING_FLAGS -HAVE_CLANG_FALSE -HAVE_CLANG_TRUE -llvm_config_found -CLANG_LIBS -CLANG_LDFLAGS -CLANG_CXXFLAGS -HAVE_PIPLIB_FALSE -HAVE_PIPLIB_TRUE -PIPLIB_LIBS -PIPLIB_LDFLAGS -PIPLIB_CPPFLAGS -NEED_GET_MEMORY_FUNCTIONS_FALSE -NEED_GET_MEMORY_FUNCTIONS_TRUE -GMP_LIBS -GMP_LDFLAGS -GMP_CPPFLAGS -GENERATE_DOC_FALSE -GENERATE_DOC_TRUE -POD2HTML -PDFLATEX -PERL -CXXCPP -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -PRTDIAG -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -versioninfo -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -enable_portable_binary -with_gcc_arch -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -with_gmp -with_gmp_prefix -with_gmp_exec_prefix -with_gmp_builddir -with_piplib -with_piplib_prefix -with_piplib_exec_prefix -with_piplib_builddir -with_clang -with_clang_prefix -with_clang_exec_prefix -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CXX -CXXFLAGS -CCC -CPP -CXXCPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures isl 0.08 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/isl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of isl 0.08:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-portable-binary - disable compiler optimizations that would produce - unportable binaries - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gcc-arch= use architecture for gcc -march/-mtune, - instead of guessing - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-gmp=system|build Which gmp to use [default=system] - --with-gmp-prefix=DIR Prefix of gmp installation - --with-gmp-exec-prefix=DIR - Exec prefix of gmp installation - --with-gmp-builddir=DIR Location of gmp builddir - --with-piplib=no|system|build - Which piplib to use [default=no] - --with-piplib-prefix=DIR - Prefix of piplib installation - --with-piplib-exec-prefix=DIR - Exec prefix of piplib installation - --with-piplib-builddir=DIR - Location of piplib builddir - --with-clang=system|no Which clang to use [default=no] - --with-clang-prefix=DIR Prefix of clang installation - --with-clang-exec-prefix=DIR - Exec prefix of clang installation - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CPP C preprocessor - CXXCPP C++ preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -isl configure 0.08 -generated by GNU Autoconf 2.67 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_member - -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------------------- ## -## Report this to isl-development@googlegroups.com ## -## ----------------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_header_mongrel -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by isl $as_me 0.08, which was -generated by GNU Autoconf 2.67. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_aux_dir= -for ac_dir in . "$srcdir"/.; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='isl' - VERSION='0.08' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' - - -versioninfo=8:0:0 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 -$as_echo_n "checking for C compiler vendor... " >&6; } -if test "${ax_cv_c_compiler_vendor+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_c_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__ clang:__clang__ 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'`")" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !($vencpp) - thisisanerror; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 -$as_echo "$ax_cv_c_compiler_vendor" >&6; } - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - - - - -# Check whether --enable-portable-binary was given. -if test "${enable_portable_binary+set}" = set; then : - enableval=$enable_portable_binary; acx_maxopt_portable=$withval -else - acx_maxopt_portable=no -fi - - -# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $xlc_opt" >&5 -$as_echo_n "checking whether C compiler accepts $xlc_opt... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$xlc_opt" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="-O3 -qansialias -w $xlc_opt" -else - 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 "******************************************************" -fi - - ;; - - 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: - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - icc_archflag=$flag; break -else - : -fi - - done - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icc architecture flag" >&5 -$as_echo_n "checking for icc architecture flag... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $icc_archflag" >&5 -$as_echo "$icc_archflag" >&6; } - 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5 -$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; } -if test "${ax_cv_c_flags__malign_double+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-malign-double" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__malign_double=yes -else - ax_cv_c_flags__malign_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -malign-double" -else - : -fi - - - # -fstrict-aliasing for gcc-2.95+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5 -$as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; } -if test "${ax_cv_c_flags__fstrict_aliasing+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-fstrict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__fstrict_aliasing=yes -else - ax_cv_c_flags__fstrict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__fstrict_aliasing -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -fstrict-aliasing" -else - : -fi - - - # note that we enable "unsafe" fp optimization with other compilers, too - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5 -$as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; } -if test "${ax_cv_c_flags__ffast_math+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ax_save_FLAGS=$CFLAGS - CFLAGS="-ffast-math" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_flags__ffast_math=yes -else - ax_cv_c_flags__ffast_math=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -fi - -eval ax_check_compiler_flags=$ax_cv_c_flags__ffast_math -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - CFLAGS="$CFLAGS -ffast-math" -else - : -fi - - - - - - -# Check whether --with-gcc-arch was given. -if test "${with_gcc_arch+set}" = set; then : - withval=$with_gcc_arch; ax_gcc_arch=$withval -else - ax_gcc_arch=yes -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -if test "${ax_cv_gcc_archflag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -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 - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0 output" >&5 -$as_echo_n "checking for x86 cpuid 0 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 1 output" >&5 -$as_echo_n "checking for x86 cpuid 1 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_1=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_1" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - 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]:*:*:*|*f41347:*:*:*) - 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]?:*:*:*) - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 cpuid 0x80000006 output" >&5 -$as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; } -if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ax_cv_gcc_x86_cpuid_0x80000006=unknown -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - int op = 0x80000006, 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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid -else - ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5 -$as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # 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*) - # Extract the first word of "prtdiag", so it can be a program name with args. -set dummy prtdiag; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PRTDIAG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PRTDIAG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag" - ;; -esac -fi -PRTDIAG=$ac_cv_path_PRTDIAG -if test -n "$PRTDIAG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRTDIAG" >&5 -$as_echo "$PRTDIAG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - 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$acx_maxopt_portable" = 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 -$as_echo_n "checking whether C compiler accepts $flag... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$flag" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - ax_cv_gcc_archflag=$flag; break -else - : -fi - - done - test "x$ax_cv_gcc_archflag" = xunknown || break -done -fi - -fi # $GCC=yes - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc architecture flag" >&5 -$as_echo_n "checking for gcc architecture flag... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_archflag" >&5 -$as_echo "$ax_cv_gcc_archflag" >&6; } -if test "x$ax_cv_gcc_archflag" = xunknown; then - : -else - CFLAGS="$CFLAGS $ax_cv_gcc_archflag" -fi - - - # drop to -O1 for gcc 4.2 - $CC --version | - sed -e 's/.* \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2/' | - (read major minor - if test $major -eq 4 -a $minor -eq 2; then - exit 0 - fi - exit 1 - ) && CFLAGS="-O1" - ;; - 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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS" >&5 -$as_echo_n "checking whether C compiler accepts $CFLAGS... " >&6; } -ax_save_FLAGS=$CFLAGS - CFLAGS="$CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=yes -else - eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_save_FLAGS -eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 -$as_echo "$ax_check_compiler_flags" >&6; } -if test "x$ax_check_compiler_flags" = xyes; then - : -else - - 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 - - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports function __attribute__((__warn_unused_result__))" >&5 -$as_echo_n "checking whether the compiler supports function __attribute__((__warn_unused_result__))... " >&6; } -if test "${ax_cv_gcc_warn_unused_result+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -__attribute__((__warn_unused_result__)) - int f(int i) { return i; } -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_gcc_warn_unused_result=yes -else - ax_cv_gcc_warn_unused_result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_warn_unused_result" >&5 -$as_echo "$ax_cv_gcc_warn_unused_result" >&6; } - if test "$ax_cv_gcc_warn_unused_result" = yes; then - -$as_echo "#define GCC_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 -$as_echo_n "checking for __attribute__... " >&6; } -if test "${ax_cv___attribute__+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void foo(void) __attribute__ ((unused)); - static void - foo(void) { - exit(1); - } - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv___attribute__=yes -else - ax_cv___attribute__=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___attribute__" >&5 -$as_echo "$ax_cv___attribute__" >&6; } - if test "$ax_cv___attribute__" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h - - fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6351: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:6354: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:6357: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 7562 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9618: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9622: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9957: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9961: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10062: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:10066: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10117: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:10121: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12501 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12597 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14553: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14557: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14652: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14656: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14704: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14708: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - link_all_deplibs_CXX=no - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PERL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PERL"; then - ac_cv_prog_PERL="$PERL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PERL="perl" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PERL=$ac_cv_prog_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "pdflatex", so it can be a program name with args. -set dummy pdflatex; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PDFLATEX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PDFLATEX"; then - ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PDFLATEX="pdflatex" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PDFLATEX=$ac_cv_prog_PDFLATEX -if test -n "$PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 -$as_echo "$PDFLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "pod2html", so it can be a program name with args. -set dummy pod2html; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_POD2HTML+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$POD2HTML"; then - ac_cv_prog_POD2HTML="$POD2HTML" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_POD2HTML="pod2html" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -POD2HTML=$ac_cv_prog_POD2HTML -if test -n "$POD2HTML"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2HTML" >&5 -$as_echo "$POD2HTML" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - if test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML"; then - GENERATE_DOC_TRUE= - GENERATE_DOC_FALSE='#' -else - GENERATE_DOC_TRUE='#' - GENERATE_DOC_FALSE= -fi - - -# ------ AX CREATE STDINT H ------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5 -$as_echo_n "checking for stdint types... " >&6; } -ac_stdint_h=`echo include/isl/stdint.h` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -if test "${ac_cv_header_stdint_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int_least32_t v = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; -else - ac_cv_header_stdint_t="" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then -CFLAGS="-std=c99" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int_least32_t v = 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&5 -$as_echo "$as_me: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" -fi - - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5 -$as_echo "(are you sure you want them in ./stdint.h?)" >&6; } -elif test "$ac_stdint_h" = "inttypes.h" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5 -$as_echo "(are you sure you want them in ./inttypes.h?)" >&6; } -elif test "_$ac_cv_header_stdint_t" = "_" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5 -$as_echo "(putting them into $ac_stdint_h)$v" >&6; } -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5 -$as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; } -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - - -inttype_headers=`echo | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 -$as_echo_n "checking for stdint uintptr_t... " >&6; } -if test "${ac_cv_header_stdint_x+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers - do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i> -" -if test "x$ac_cv_type_uintptr_t" = x""yes; then : - ac_cv_header_stdint_x=$i -else - continue -fi - - ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> -" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - and64="/uint64_t" -else - and64="" -fi - - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)" - break - done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 -$as_echo_n "checking for stdint uintptr_t... " >&6; } - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5 -$as_echo "$ac_cv_header_stdint_x" >&6; } - - -if test "_$ac_cv_header_stdint_x" = "_" ; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 -$as_echo_n "checking for stdint uint32_t... " >&6; } -if test "${ac_cv_header_stdint_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers - do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i> -" -if test "x$ac_cv_type_uint32_t" = x""yes; then : - ac_cv_header_stdint_o=$i -else - continue -fi - - ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> -" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - and64="/uint64_t" -else - and64="" -fi - - ac_cv_stdint_result="(seen uint32_t$and64 in $i)" - break - break; - done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 -$as_echo_n "checking for stdint uint32_t... " >&6; } - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5 -$as_echo "$ac_cv_header_stdint_o" >&6; } - -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 -$as_echo_n "checking for stdint u_int32_t... " >&6; } -if test "${ac_cv_header_stdint_u+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i> -" -if test "x$ac_cv_type_u_int32_t" = x""yes; then : - ac_cv_header_stdint_u=$i -else - continue -fi - - ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i> -" -if test "x$ac_cv_type_u_int64_t" = x""yes; then : - and64="/u_int64_t" -else - and64="" -fi - - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)" - break - break; - done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 -$as_echo_n "checking for stdint u_int32_t... " >&6; } - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5 -$as_echo "$ac_cv_header_stdint_u" >&6; } - -fi fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5 -$as_echo_n "checking for stdint datatype model... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 -$as_echo "(..)" >&6; } - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 -$as_echo_n "checking size of char... " >&6; } -if test "${ac_cv_sizeof_char+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (char) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_char=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 -$as_echo "$ac_cv_sizeof_char" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_short=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_int=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5 -$as_echo_n "checking size of void*... " >&6; } -if test "${ac_cv_sizeof_voidp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_voidp" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void*) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_voidp=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5 -$as_echo "$ac_cv_sizeof_voidp" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOIDP $ac_cv_sizeof_voidp -_ACEOF - - - ac_cv_char_data_model="" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking data model" >&5 -$as_echo_n "checking data model... " >&6; } - case "$ac_cv_char_data_model/$ac_cv_long_data_model" in - 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; - 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; - 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; - 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; - 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; - 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; - 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; - 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; - 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; - 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; - 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; - 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; - 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; - 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; - 222/*|333/*|444/*|666/*|888/*) : - ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; - *) ac_cv_data_model="none" ; n="very unusual model" ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_data_model ($ac_cv_long_data_model, $n)" >&5 -$as_echo "$ac_cv_data_model ($ac_cv_long_data_model, $n)" >&6; } - -fi - -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_x" -elif test "_$ac_cv_header_stdint_o" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_o" -elif test "_$ac_cv_header_stdint_u" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_u" -else - ac_cv_header_stdint="stddef.h" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5 -$as_echo_n "checking for extra inttypes in chosen header... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5 -$as_echo "($ac_cv_header_stdint)" >&6; } -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint> -" -if test "x$ac_cv_type_int_least32_t" = x""yes; then : - -fi - -ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint> -" -if test "x$ac_cv_type_int_fast32_t" = x""yes; then : - -fi - -ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint> -" -if test "x$ac_cv_type_intmax_t" = x""yes; then : - -fi - - -fi # shortcircut to system "stdint.h" -# ------------------ PREPARE VARIABLES ------------------------------ -if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` -else -ac_cv_stdint_message="using $CC" -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5 -$as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; } - -# ----------------- DONE inttypes.h checks START header ------------- -ac_config_commands="$ac_config_commands $ac_stdint_h" - - - - - - -# Check whether --with-gmp was given. -if test "${with_gmp+set}" = set; then : - withval=$with_gmp; -fi - -case "system" in -system|build) - -# Check whether --with-gmp_prefix was given. -if test "${with_gmp_prefix+set}" = set; then : - withval=$with_gmp_prefix; -fi - - -# Check whether --with-gmp_exec_prefix was given. -if test "${with_gmp_exec_prefix+set}" = set; then : - withval=$with_gmp_exec_prefix; -fi - -esac - -# Check whether --with-gmp_builddir was given. -if test "${with_gmp_builddir+set}" = set; then : - withval=$with_gmp_builddir; -fi - -if test "x$with_gmp_prefix" != "x" -a "x$with_gmp_exec_prefix" = "x"; then - with_gmp_exec_prefix=$with_gmp_prefix -fi -if test "x$with_gmp_prefix" != "x" -o "x$with_gmp_exec_prefix" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xyes" -a "x$with_gmp" != "xsystem"; then - as_fn_error $? "Setting $with_gmp_prefix implies use of system gmp" "$LINENO" 5 - fi - with_gmp="system" -fi -if test "x$with_gmp_builddir" != "x"; then - if test "x$with_gmp" != "x" -a "x$with_gmp" != "xyes" -a "x$with_gmp" != "xbuild"; then - as_fn_error $? "Setting $with_gmp_builddir implies use of build gmp" "$LINENO" 5 - fi - with_gmp="build" - gmp_srcdir=`echo @abs_srcdir@ | $with_gmp_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: gmp sources in $gmp_srcdir" >&5 -$as_echo "$as_me: gmp sources in $gmp_srcdir" >&6;} -fi -if test "x$with_gmp_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_gmp_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_gmp" in -system|build) - ;; -*) - case "system" in - bundled) - if test -d $srcdir/.git -a \ - -d $srcdir/gmp -a \ - ! -d $srcdir/gmp/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule gmp not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule gmp not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/gmp/configure; then - with_gmp="bundled" - else - with_gmp="no" - fi - ;; - *) - with_gmp="system" - ;; - esac - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which gmp to use" >&5 -$as_echo_n "checking which gmp to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gmp" >&5 -$as_echo "$with_gmp" >&6; } - - - - - - -case "$with_gmp" in -system) - if test "x$with_gmp_prefix" != "x"; then - isl_configure_args="$isl_configure_args --with-gmp=$with_gmp_prefix" - GMP_CPPFLAGS="-I$with_gmp_prefix/include" - GMP_LDFLAGS="-L$with_gmp_prefix/lib" - fi - GMP_LIBS=-lgmp - ;; -build) - GMP_CPPFLAGS="-I$gmp_srcdir -I$with_gmp_builddir" - GMP_LIBS="$with_gmp_builddir/libgmp.la" - ;; -esac -SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" -need_get_memory_functions=false -ac_fn_c_check_decl "$LINENO" "mp_get_memory_functions" "ac_cv_have_decl_mp_get_memory_functions" "#include -" -if test "x$ac_cv_have_decl_mp_get_memory_functions" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MP_GET_MEMORY_FUNCTIONS $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - - need_get_memory_functions=true - -fi - -CPPFLAGS="$SAVE_CPPFLAGS" - if test x$need_get_memory_functions = xtrue; then - NEED_GET_MEMORY_FUNCTIONS_TRUE= - NEED_GET_MEMORY_FUNCTIONS_FALSE='#' -else - NEED_GET_MEMORY_FUNCTIONS_TRUE='#' - NEED_GET_MEMORY_FUNCTIONS_FALSE= -fi - -ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "#include -" -if test "x$ac_cv_have_decl_ffs" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FFS $ac_have_decl -_ACEOF - -ac_fn_c_check_decl "$LINENO" "__builtin_ffs" "ac_cv_have_decl___builtin_ffs" "$ac_includes_default" -if test "x$ac_cv_have_decl___builtin_ffs" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___BUILTIN_FFS $ac_have_decl -_ACEOF - - - - - -# Check whether --with-piplib was given. -if test "${with_piplib+set}" = set; then : - withval=$with_piplib; -fi - -case "system" in -no|system|build) - -# Check whether --with-piplib_prefix was given. -if test "${with_piplib_prefix+set}" = set; then : - withval=$with_piplib_prefix; -fi - - -# Check whether --with-piplib_exec_prefix was given. -if test "${with_piplib_exec_prefix+set}" = set; then : - withval=$with_piplib_exec_prefix; -fi - -esac - -# Check whether --with-piplib_builddir was given. -if test "${with_piplib_builddir+set}" = set; then : - withval=$with_piplib_builddir; -fi - -if test "x$with_piplib_prefix" != "x" -a "x$with_piplib_exec_prefix" = "x"; then - with_piplib_exec_prefix=$with_piplib_prefix -fi -if test "x$with_piplib_prefix" != "x" -o "x$with_piplib_exec_prefix" != "x"; then - if test "x$with_piplib" != "x" -a "x$with_piplib" != "xyes" -a "x$with_piplib" != "xsystem"; then - as_fn_error $? "Setting $with_piplib_prefix implies use of system piplib" "$LINENO" 5 - fi - with_piplib="system" -fi -if test "x$with_piplib_builddir" != "x"; then - if test "x$with_piplib" != "x" -a "x$with_piplib" != "xyes" -a "x$with_piplib" != "xbuild"; then - as_fn_error $? "Setting $with_piplib_builddir implies use of build piplib" "$LINENO" 5 - fi - with_piplib="build" - piplib_srcdir=`echo @abs_srcdir@ | $with_piplib_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: piplib sources in $piplib_srcdir" >&5 -$as_echo "$as_me: piplib sources in $piplib_srcdir" >&6;} -fi -if test "x$with_piplib_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_piplib_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_piplib" in -no|system|build) - ;; -*) - case "no" in - bundled) - if test -d $srcdir/.git -a \ - -d $srcdir/piplib -a \ - ! -d $srcdir/piplib/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule piplib not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule piplib not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/piplib/configure; then - with_piplib="bundled" - else - with_piplib="no" - fi - ;; - *) - with_piplib="no" - ;; - esac - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which piplib to use" >&5 -$as_echo_n "checking which piplib to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_piplib" >&5 -$as_echo "$with_piplib" >&6; } - - - -have_piplib=false - - - -case "$with_piplib" in - build) - PIPLIB_CPPFLAGS="-I$piplib_srcdir/include" - PIPLIB_LIBS="$with_piplib_builddir/libpiplibMP.la" - ;; - system) - PIPLIB_LIBS="-lpiplibMP" - if test "x$with_piplib_prefix" != "x"; then - PIPLIB_CPPFLAGS="-I$with_piplib_prefix/include" - PIPLIB_LDFLAGS="-L$with_piplib_prefix/lib" - fi - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$PIPLIB_CPPFLAGS $CPPFLAGS" - LDFLAGS="$PIPLIB_LDFLAGS $LDFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pip_solve in -lpiplibMP" >&5 -$as_echo_n "checking for pip_solve in -lpiplibMP... " >&6; } -if test "${ac_cv_lib_piplibMP_pip_solve+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpiplibMP $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pip_solve (); -int -main () -{ -return pip_solve (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_piplibMP_pip_solve=yes -else - ac_cv_lib_piplibMP_pip_solve=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_piplibMP_pip_solve" >&5 -$as_echo "$ac_cv_lib_piplibMP_pip_solve" >&6; } -if test "x$ac_cv_lib_piplibMP_pip_solve" = x""yes; then : - - ac_fn_c_check_member "$LINENO" "PipOptions" "Urs_parms" "ac_cv_member_PipOptions_Urs_parms" "#include -" -if test "x$ac_cv_member_PipOptions_Urs_parms" = x""yes; then : - -else - - as_fn_error $? "Piplib too old; please install version 1.3.6 or newer" "$LINENO" 5 - -fi - - -else - - as_fn_error $? "Piplib not found" "$LINENO" 5 - -fi - - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" - ;; - no) - ;; - *) - as_fn_error $? "unsupported" "$LINENO" 5 - ;; -esac -if test "$with_piplib" != "no"; then - -$as_echo "#define ISL_PIPLIB /**/" >>confdefs.h - - have_piplib=true -fi - if test x$have_piplib = xtrue; then - HAVE_PIPLIB_TRUE= - HAVE_PIPLIB_FALSE='#' -else - HAVE_PIPLIB_TRUE='#' - HAVE_PIPLIB_FALSE= -fi - - - - - - - - -# Check whether --with-clang was given. -if test "${with_clang+set}" = set; then : - withval=$with_clang; -fi - -case "system" in -system|no) - -# Check whether --with-clang_prefix was given. -if test "${with_clang_prefix+set}" = set; then : - withval=$with_clang_prefix; -fi - - -# Check whether --with-clang_exec_prefix was given. -if test "${with_clang_exec_prefix+set}" = set; then : - withval=$with_clang_exec_prefix; -fi - -esac - -if test "x$with_clang_prefix" != "x" -a "x$with_clang_exec_prefix" = "x"; then - with_clang_exec_prefix=$with_clang_prefix -fi -if test "x$with_clang_prefix" != "x" -o "x$with_clang_exec_prefix" != "x"; then - if test "x$with_clang" != "x" -a "x$with_clang" != "xyes" -a "x$with_clang" != "xsystem"; then - as_fn_error $? "Setting $with_clang_prefix implies use of system clang" "$LINENO" 5 - fi - with_clang="system" -fi -if test "x$with_clang_builddir" != "x"; then - if test "x$with_clang" != "x" -a "x$with_clang" != "xyes" -a "x$with_clang" != "xbuild"; then - as_fn_error $? "Setting $with_clang_builddir implies use of build clang" "$LINENO" 5 - fi - with_clang="build" - clang_srcdir=`echo @abs_srcdir@ | $with_clang_builddir/config.status --file=-` - { $as_echo "$as_me:${as_lineno-$LINENO}: clang sources in $clang_srcdir" >&5 -$as_echo "$as_me: clang sources in $clang_srcdir" >&6;} -fi -if test "x$with_clang_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_clang_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_clang" in -system|no) - ;; -*) - case "no" in - bundled) - if test -d $srcdir/.git -a \ - -d $srcdir/clang -a \ - ! -d $srcdir/clang/.git; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git repo detected, but submodule clang not initialized" >&5 -$as_echo "$as_me: WARNING: git repo detected, but submodule clang not initialized" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may want to run" >&5 -$as_echo "$as_me: WARNING: You may want to run" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule init" >&5 -$as_echo "$as_me: WARNING: git submodule init" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: git submodule update" >&5 -$as_echo "$as_me: WARNING: git submodule update" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sh autogen.sh" >&5 -$as_echo "$as_me: WARNING: sh autogen.sh" >&2;} - fi - if test -f $srcdir/clang/configure; then - with_clang="bundled" - else - with_clang="no" - fi - ;; - *) - with_clang="no" - ;; - esac - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which clang to use" >&5 -$as_echo_n "checking which clang to use... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_clang" >&5 -$as_echo "$with_clang" >&6; } - - -case "$with_clang" in -system) - llvm_config="llvm-config" - # Extract the first word of ""$llvm_config"", so it can be a program name with args. -set dummy "$llvm_config"; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_llvm_config_found+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$llvm_config_found"; then - ac_cv_prog_llvm_config_found="$llvm_config_found" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_llvm_config_found="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -llvm_config_found=$ac_cv_prog_llvm_config_found -if test -n "$llvm_config_found"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_config_found" >&5 -$as_echo "$llvm_config_found" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$with_clang_prefix" != "x"; then - llvm_config="$with_clang_prefix/bin/llvm-config" - if test -x "$llvm_config"; then - llvm_config_found=yes - fi - fi - if test "$llvm_config_found" != yes; then - as_fn_error $? "llvm-config not found" "$LINENO" 5 - fi - CLANG_CXXFLAGS=`$llvm_config --cxxflags` - CLANG_LDFLAGS=`$llvm_config --ldflags` - CLANG_LIBS=`$llvm_config --libs` - CLANG_PREFIX=`$llvm_config --prefix` - -cat >>confdefs.h <<_ACEOF -#define CLANG_PREFIX "$CLANG_PREFIX" -_ACEOF - - - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CLANG_CXXFLAGS $CPPFLAGS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -ac_fn_cxx_check_header_mongrel "$LINENO" "clang/Basic/SourceLocation.h" "ac_cv_header_clang_Basic_SourceLocation_h" "$ac_includes_default" -if test "x$ac_cv_header_clang_Basic_SourceLocation_h" = x""yes; then : - -else - as_fn_error $? "clang header file not found" "$LINENO" 5 -fi - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getDefaultTargetTriple" >/dev/null 2>&1; then : - -else - -$as_echo "#define getDefaultTargetTriple getHostTriple" >>confdefs.h - -fi -rm -f conftest* - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getExpansionLineNumber" >/dev/null 2>&1; then : - -else - -$as_echo "#define getExpansionLineNumber getInstantiationLineNumber" >>confdefs.h - -fi -rm -f conftest* - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "DiagnosticsEngine" >/dev/null 2>&1; then : - -else - -$as_echo "#define DiagnosticsEngine Diagnostic" >>confdefs.h - -fi -rm -f conftest* - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ArrayRef" >/dev/null 2>&1; then : - -$as_echo "#define USE_ARRAYREF /**/" >>confdefs.h - -fi -rm -f conftest* - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "CXXIsProduction" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_CXXISPRODUCTION /**/" >>confdefs.h - -fi -rm -f conftest* - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - CPPFLAGS="$SAVE_CPPFLAGS" - ;; -esac - if test $with_clang = system; then - HAVE_CLANG_TRUE= - HAVE_CLANG_FALSE='#' -else - HAVE_CLANG_TRUE='#' - HAVE_CLANG_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 -$as_echo_n "checking for C compiler vendor... " >&6; } -if test "${ax_cv_c_compiler_vendor+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_c_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__ clang:__clang__ 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'`")" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#if !($vencpp) - thisisanerror; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 -$as_echo "$ax_cv_c_compiler_vendor" >&6; } - - - WARNING_FLAGS="" - - if test "${ax_cv_c_compiler_vendor}" = "clang"; then - WARNING_FLAGS="-Wall" - fi - - - - -PACKAGE_CFLAGS="$GMP_CPPFLAGS" -PACKAGE_LDFLAGS="$GMP_LDFLAGS" -PACKAGE_LIBS="-lisl -lgmp" - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig libname" >&5 -$as_echo_n "checking our pkgconfig libname... " >&6; } -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="${PACKAGE_NAME}" -test ".$ax_create_pkgconfig_libname" != "." || \ -ax_create_pkgconfig_libname="$PACKAGE" -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libname" >&5 -$as_echo "$ax_create_pkgconfig_libname" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig version" >&5 -$as_echo_n "checking our pkgconfig version... " >&6; } -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="${PACKAGE_VERSION}" -test ".$ax_create_pkgconfig_version" != "." || \ -ax_create_pkgconfig_version="$VERSION" -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_version" >&5 -$as_echo "$ax_create_pkgconfig_version" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libdir" >&5 -$as_echo_n "checking our pkgconfig_libdir... " >&6; } -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -ax_create_pkgconfig_libdir=`eval echo "$pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libdir" >&5 -$as_echo "$pkgconfig_libdir" >&6; } -test "$pkgconfig_libdir" != "$ax_create_pkgconfig_libdir" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&5 -$as_echo "expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libfile" >&5 -$as_echo_n "checking our pkgconfig_libfile... " >&6; } -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_libfile=`eval echo "$pkgconfig_libfile"` -ax_create_pkgconfig_libfile=`eval echo "$ax_create_pkgconfig_libfile"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libfile" >&5 -$as_echo "$pkgconfig_libfile" >&6; } -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_libfile" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&5 -$as_echo "expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&6; }) - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our package / suffix" >&5 -$as_echo_n "checking our package / suffix... " >&6; } -ax_create_pkgconfig_suffix="$program_suffix" -test ".$ax_create_pkgconfig_suffix" != .NONE || ax_create_pkgconfig_suffix="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&5 -$as_echo "${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig description" >&5 -$as_echo_n "checking our pkgconfig description... " >&6; } -ax_create_pkgconfig_description="$PACKAGE_SUMMARY" -test ".$ax_create_pkgconfig_description" != "." || \ -ax_create_pkgconfig_description="$ax_create_pkgconfig_libname Library" -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_description" >&5 -$as_echo "$ax_create_pkgconfig_description" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig requires" >&5 -$as_echo_n "checking our pkgconfig requires... " >&6; } -ax_create_pkgconfig_requires="$PACKAGE_REQUIRES" -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_requires" >&5 -$as_echo "$ax_create_pkgconfig_requires" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ext libs" >&5 -$as_echo_n "checking our pkgconfig ext libs... " >&6; } -ax_create_pkgconfig_pkglibs="$PACKAGE_LIBS" -test ".$ax_create_pkgconfig_pkglibs" != "." || ax_create_pkgconfig_pkglibs="-l$ax_create_pkgconfig_libname" -ax_create_pkgconfig_libs="$ax_create_pkgconfig_pkglibs $LIBS" -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libs" >&5 -$as_echo "$ax_create_pkgconfig_libs" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig cppflags" >&5 -$as_echo_n "checking our pkgconfig cppflags... " >&6; } -ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_cppflags" >&5 -$as_echo "$ax_create_pkgconfig_cppflags" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ldflags" >&5 -$as_echo_n "checking our pkgconfig ldflags... " >&6; } -ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_ldflags" >&5 -$as_echo "$ax_create_pkgconfig_ldflags" >&6; } - -test ".$ax_create_pkgconfig_generate" != "." || \ -ax_create_pkgconfig_generate="$ax_create_pkgconfig_libname.pc" -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` -test "$pkgconfig_libfile" != "$ax_create_pkgconfig_generate" && ( -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: generate the pkgconfig later... $ax_create_pkgconfig_generate" >&5 -$as_echo "generate the pkgconfig later... $ax_create_pkgconfig_generate" >&6; }) - -if test ".$ax_create_pkgconfig_src_libdir" = "." ; then -ax_create_pkgconfig_src_libdir=`pwd` -ax_create_pkgconfig_src_libdir=`$as_dirname -- "$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" || -$as_expr X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_libdir/src || \ -ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/src" -case ".$objdir" in -*libs) ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/$objdir" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&5 -$as_echo "noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&6; } -fi - -if test ".$ax_create_pkgconfig_src_headers" = "." ; then -ax_create_pkgconfig_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) ax_create_pkgconfig_src_headers="" ;; esac -ax_create_pkgconfig_src_headers=`$as_dirname -- "$ax_create_pkgconfig_src_headers/$v/x" || -$as_expr X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)[^/]' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)$' \| \ - X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ax_create_pkgconfig_src_headers/$v/x" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -test ! -d $ax_create_pkgconfig_src_headers/include || \ -ax_create_pkgconfig_src_headers="$ax_create_pkgconfig_src_headers/include" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&5 -$as_echo "noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&6; } -fi - - -ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate" - - - - - - - if test -f $srcdir/.git/HEAD; then - GIT_HEAD="$srcdir/.git/index" - GIT_REPO="$srcdir/.git" - GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe` - elif test -f $srcdir/GIT_HEAD_ID; then - GIT_HEAD_ID=`cat $srcdir/GIT_HEAD_ID` - else - mysrcdir=`(cd $srcdir; pwd)` - head=`basename $mysrcdir | sed -e 's/.*-//'` - head2=`echo $head | sed -e 's/^0-9a-f//'` - head3=`echo $head2 | sed -e 's/........................................//'` - if test "x$head3" = "x" -a "x$head" = "x$head2"; then - GIT_HEAD_ID="$head" - else - GIT_HEAD_ID="UNKNOWN" - fi - fi - if test -z "$GIT_REPO" ; then - GIT_HEAD_VERSION="$GIT_HEAD_ID" - else - GIT_HEAD_VERSION="\`GIT_DIR=$GIT_REPO git describe\`" - fi - -echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h - - -ac_config_headers="$ac_config_headers isl_config.h" - -ac_config_headers="$ac_config_headers include/isl/config.h" - -ac_config_files="$ac_config_files Makefile" - -ac_config_files="$ac_config_files doc/Makefile" - -if test $with_clang = system; then - ac_config_files="$ac_config_files interface/Makefile" - -fi -ac_config_files="$ac_config_files bound_test.sh" - -ac_config_files="$ac_config_files pip_test.sh" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GENERATE_DOC_TRUE}" && test -z "${GENERATE_DOC_FALSE}"; then - as_fn_error $? "conditional \"GENERATE_DOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NEED_GET_MEMORY_FUNCTIONS_TRUE}" && test -z "${NEED_GET_MEMORY_FUNCTIONS_FALSE}"; then - as_fn_error $? "conditional \"NEED_GET_MEMORY_FUNCTIONS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_PIPLIB_TRUE}" && test -z "${HAVE_PIPLIB_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PIPLIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CLANG_TRUE}" && test -z "${HAVE_CLANG_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CLANG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by isl $as_me 0.08, which was -generated by GNU Autoconf 2.67. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -isl config.status 0.08 -configured by $0, generated by GNU Autoconf 2.67, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ -hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - -# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=`$as_echo "_$PACKAGE-$ac_stdint_h" | $as_tr_cpp` -ac_cv_stdint_message="$ac_cv_stdint_message" -ac_cv_header_stdint_t="$ac_cv_header_stdint_t" -ac_cv_header_stdint_x="$ac_cv_header_stdint_x" -ac_cv_header_stdint_o="$ac_cv_header_stdint_o" -ac_cv_header_stdint_u="$ac_cv_header_stdint_u" -ac_cv_type_uint64_t="$ac_cv_type_uint64_t" -ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" -ac_cv_char_data_model="$ac_cv_char_data_model" -ac_cv_long_data_model="$ac_cv_long_data_model" -ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" -ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" -ac_cv_type_intmax_t="$ac_cv_type_intmax_t" - - -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;; - "$ax_create_pkgconfig_generate") CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;; - "isl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS isl_config.h" ;; - "include/isl/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/isl/config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "interface/Makefile") CONFIG_FILES="$CONFIG_FILES interface/Makefile" ;; - "bound_test.sh") CONFIG_FILES="$CONFIG_FILES bound_test.sh" ;; - "pip_test.sh") CONFIG_FILES="$CONFIG_FILES pip_test.sh" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - "$ac_stdint_h":C) -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_stdint_h : $_ac_stdint_h" >&5 -$as_echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;} -ac_stdint=$tmp/_stdint.h - -echo "#ifndef" $_ac_stdint_h >$ac_stdint -echo "#define" $_ac_stdint_h "1" >>$ac_stdint -echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint -echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint -echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint -if test "_$ac_cv_header_stdint_t" != "_" ; then -echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint -echo "#include " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_header="$ac_cv_header_stdint_x" - echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint -fi - -echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_o" != "_" ; then - ac_header="$ac_cv_header_stdint_o" - echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint -fi - -echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint -if test "_$ac_cv_header_stdint_u" != "_" ; then - ac_header="$ac_cv_header_stdint_u" - echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint -fi - -echo "" >>$ac_stdint - -if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then - echo "#include <$ac_header>" >>$ac_stdint - echo "" >>$ac_stdint -fi fi - -echo "/* which 64bit typedef has been found */" >>$ac_stdint -if test "$ac_cv_type_uint64_t" = "yes" ; then -echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint -fi -if test "$ac_cv_type_u_int64_t" = "yes" ; then -echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* which type model has been detected */" >>$ac_stdint -if test "_$ac_cv_char_data_model" != "_" ; then -echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint -echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* whether int_least types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_least32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint -fi -echo "/* whether int_fast types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_fast32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint -fi -echo "/* whether intmax_t type was detected */" >>$ac_stdint -if test "$ac_cv_type_intmax_t" = "yes"; then -echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 199901L -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; - -#elif !defined __STRICT_ANSI__ -#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ -#define _HAVE_UINT64_T -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ -/* note: all ELF-systems seem to have loff-support which needs 64-bit */ -#if !defined _NO_LONGLONG -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; -#endif - -#elif defined __alpha || (defined __mips && defined _ABIN32) -#if !defined _NO_LONGLONG -typedef long int64_t; -typedef unsigned long uint64_t; -#endif - /* compiler/cpu type to define int64_t */ -#endif -#endif -#endif - -#if defined _STDINT_HAVE_U_INT_TYPES -/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ -typedef u_int8_t uint8_t; -typedef u_int16_t uint16_t; -typedef u_int32_t uint32_t; - -/* glibc compatibility */ -#ifndef __int8_t_defined -#define __int8_t_defined -#endif -#endif - -#ifdef _STDINT_NEED_INT_MODEL_T -/* we must guess all the basic types. Apart from byte-adressable system, */ -/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ -/* (btw, those nibble-addressable systems are way off, or so we assume) */ - - -#if defined _STDINT_BYTE_MODEL -#if _STDINT_LONG_MODEL+0 == 242 -/* 2:4:2 = IP16 = a normal 16-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef long int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 -/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ -/* 4:4:4 = ILP32 = a normal 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 -/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ -/* 4:8:8 = LP64 = a normal 64-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* this system has a "long" of 64bit */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -typedef unsigned long uint64_t; -typedef long int64_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 448 -/* LLP64 a 64-bit system derived from a 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* assuming the system has a "long long" */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif -#else -#define _STDINT_NO_INT32_T -#endif -#else -#define _STDINT_NO_INT8_T -#define _STDINT_NO_INT32_T -#endif -#endif - -/* - * quote from SunOS-5.8 sys/inttypes.h: - * Use at your own risk. As of February 1996, the committee is squarely - * behind the fixed sized types; the "least" and "fast" types are still being - * discussed. The probability that the "fast" types may be removed before - * the standard is finalized is high enough that they are not currently - * implemented. - */ - -#if defined _STDINT_NEED_INT_LEAST_T -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_least64_t; -#endif - -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_least64_t; -#endif - /* least types */ -#endif - -#if defined _STDINT_NEED_INT_FAST_T -typedef int8_t int_fast8_t; -typedef int int_fast16_t; -typedef int32_t int_fast32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_fast64_t; -#endif - -typedef uint8_t uint_fast8_t; -typedef unsigned uint_fast16_t; -typedef uint32_t uint_fast32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_fast64_t; -#endif - /* fast types */ -#endif - -#ifdef _STDINT_NEED_INTMAX_T -#ifdef _HAVE_UINT64_T -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; -#else -typedef long intmax_t; -typedef unsigned long uintmax_t; -#endif -#endif - -#ifdef _STDINT_NEED_INTPTR_T -#ifndef __intptr_t_defined -#define __intptr_t_defined -/* we encourage using "long" to store pointer values, never use "int" ! */ -#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 -typedef unsigned int uintptr_t; -typedef int intptr_t; -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 -typedef unsigned long uintptr_t; -typedef long intptr_t; -#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T -typedef uint64_t uintptr_t; -typedef int64_t intptr_t; -#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ -typedef unsigned long uintptr_t; -typedef long intptr_t; -#endif -#endif -#endif - -/* The ISO C99 standard specifies that in C++ implementations these - should only be defined if explicitly requested. */ -#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS -#ifndef UINT32_C - -/* Signed. */ -# define INT8_C(c) c -# define INT16_C(c) c -# define INT32_C(c) c -# ifdef _HAVE_LONGLONG_UINT64_T -# define INT64_C(c) c ## L -# else -# define INT64_C(c) c ## LL -# endif - -/* Unsigned. */ -# define UINT8_C(c) c ## U -# define UINT16_C(c) c ## U -# define UINT32_C(c) c ## U -# ifdef _HAVE_LONGLONG_UINT64_T -# define UINT64_C(c) c ## UL -# else -# define UINT64_C(c) c ## ULL -# endif - -/* Maximal type. */ -# ifdef _HAVE_LONGLONG_UINT64_T -# define INTMAX_C(c) c ## L -# define UINTMAX_C(c) c ## UL -# else -# define INTMAX_C(c) c ## LL -# define UINTMAX_C(c) c ## ULL -# endif - - /* literalnumbers */ -#endif -#endif - -/* These limits are merily those of a two complement byte-oriented system */ - -/* Minimum of signed integral types. */ -# define INT8_MIN (-128) -# define INT16_MIN (-32767-1) -# define INT32_MIN (-2147483647-1) -#ifndef INT64_MIN -# define INT64_MIN (-__INT64_C(9223372036854775807)-1) -#endif -/* Maximum of signed integral types. */ -# define INT8_MAX (127) -# define INT16_MAX (32767) -# define INT32_MAX (2147483647) -#ifndef INT64_MAX -# define INT64_MAX (__INT64_C(9223372036854775807)) -#endif - -/* Maximum of unsigned integral types. */ -#ifndef UINT8_MAX -# define UINT8_MAX (255) -#endif -#ifndef UINT16_MAX -# define UINT16_MAX (65535) -#endif -# define UINT32_MAX (4294967295U) -#ifndef UINT64_MAX -# define UINT64_MAX (__UINT64_C(18446744073709551615)) -#endif - -/* Minimum of signed integral types having a minimum size. */ -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST64_MIN INT64_MIN -/* Maximum of signed integral types having a minimum size. */ -# define INT_LEAST8_MAX INT8_MAX -# define INT_LEAST16_MAX INT16_MAX -# define INT_LEAST32_MAX INT32_MAX -# define INT_LEAST64_MAX INT64_MAX - -/* Maximum of unsigned integral types having a minimum size. */ -# define UINT_LEAST8_MAX UINT8_MAX -# define UINT_LEAST16_MAX UINT16_MAX -# define UINT_LEAST32_MAX UINT32_MAX -# define UINT_LEAST64_MAX UINT64_MAX - - /* shortcircuit*/ -#endif - /* once */ -#endif -#endif -STDINT_EOF -fi - if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_stdint_h is unchanged" >&5 -$as_echo "$as_me: $ac_stdint_h is unchanged" >&6;} - else - ac_dir=`$as_dirname -- "$ac_stdint_h" || -$as_expr X"$ac_stdint_h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_stdint_h" : 'X\(//\)[^/]' \| \ - X"$ac_stdint_h" : 'X\(//\)$' \| \ - X"$ac_stdint_h" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_stdint_h" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi - ;; - "$ax_create_pkgconfig_generate":C) -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_generate.in" >&5 -$as_echo "$as_me: creating $pkgconfig_generate.in" >&6;} -cat > $pkgconfig_generate.in <&5 -$as_echo "$as_me: creating $pkgconfig_generate" >&6;} -cat >conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - as_fn_error $? "$pkgconfig_generate is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error $? "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 -$as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - as_fn_error $? "$pkgconfig_uninstalled is empty" "$LINENO" 5 -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - ;; - "bound_test.sh":F) chmod +x bound_test.sh ;; - "pip_test.sh":F) chmod +x pip_test.sh ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - - ac_configure_args="$ac_configure_args $isl_configure_args" - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/cloog-0.17.0/isl/configure.ac b/cloog-0.17.0/isl/configure.ac deleted file mode 100644 index a41023c85a254b9344ea9309417bbe04808f9592..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/configure.ac +++ /dev/null @@ -1,180 +0,0 @@ -AC_INIT([isl], [0.08], [isl-development@googlegroups.com]) -AC_CONFIG_AUX_DIR([.]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([foreign]) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -AC_SUBST(versioninfo) -versioninfo=8:0:0 - -AC_PROG_CC -AC_PROG_CXX - -AX_CC_MAXOPT -AX_GCC_WARN_UNUSED_RESULT -AX_C___ATTRIBUTE__ - -AC_PROG_LIBTOOL - -AC_CHECK_PROG(PERL, perl, perl, []) -AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, []) -AC_CHECK_PROG(POD2HTML, pod2html, pod2html, []) - -AM_CONDITIONAL(GENERATE_DOC, test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML") - -AX_CREATE_STDINT_H(include/isl/stdint.h) - -AX_SUBMODULE(gmp,system|build,system) - -AC_SUBST(GMP_CPPFLAGS) -AC_SUBST(GMP_LDFLAGS) -AC_SUBST(GMP_LIBS) -case "$with_gmp" in -system) - if test "x$with_gmp_prefix" != "x"; then - isl_configure_args="$isl_configure_args --with-gmp=$with_gmp_prefix" - GMP_CPPFLAGS="-I$with_gmp_prefix/include" - GMP_LDFLAGS="-L$with_gmp_prefix/lib" - fi - GMP_LIBS=-lgmp - ;; -build) - GMP_CPPFLAGS="-I$gmp_srcdir -I$with_gmp_builddir" - GMP_LIBS="$with_gmp_builddir/libgmp.la" - ;; -esac -SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" -need_get_memory_functions=false -AC_CHECK_DECLS(mp_get_memory_functions,[],[ - need_get_memory_functions=true -],[#include ]) -CPPFLAGS="$SAVE_CPPFLAGS" -AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, test x$need_get_memory_functions = xtrue) -AC_CHECK_DECLS(ffs,[],[],[#include ]) -AC_CHECK_DECLS(__builtin_ffs,[],[],[]) - -AX_SUBMODULE(piplib,no|system|build,no) - -have_piplib=false -AC_SUBST(PIPLIB_CPPFLAGS) -AC_SUBST(PIPLIB_LDFLAGS) -AC_SUBST(PIPLIB_LIBS) -case "$with_piplib" in - build) - PIPLIB_CPPFLAGS="-I$piplib_srcdir/include" - PIPLIB_LIBS="$with_piplib_builddir/libpiplibMP.la" - ;; - system) - PIPLIB_LIBS="-lpiplibMP" - if test "x$with_piplib_prefix" != "x"; then - PIPLIB_CPPFLAGS="-I$with_piplib_prefix/include" - PIPLIB_LDFLAGS="-L$with_piplib_prefix/lib" - fi - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$PIPLIB_CPPFLAGS $CPPFLAGS" - LDFLAGS="$PIPLIB_LDFLAGS $LDFLAGS" - AC_CHECK_LIB(piplibMP, pip_solve,[ - AC_CHECK_MEMBER(PipOptions.Urs_parms, [], [ - AC_MSG_ERROR([Piplib too old; please install version 1.3.6 or newer]) - ],[#include ]) - ],[ - AC_MSG_ERROR([Piplib not found]) - ]) - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" - ;; - no) - ;; - *) - AC_MSG_ERROR(unsupported) - ;; -esac -if test "$with_piplib" != "no"; then - AC_DEFINE(ISL_PIPLIB,,piplib is available) - have_piplib=true -fi -AM_CONDITIONAL(HAVE_PIPLIB, test x$have_piplib = xtrue) - -AC_SUBST(CLANG_CXXFLAGS) -AC_SUBST(CLANG_LDFLAGS) -AC_SUBST(CLANG_LIBS) -AX_SUBMODULE(clang,system|no,no) -case "$with_clang" in -system) - llvm_config="llvm-config" - AC_CHECK_PROG([llvm_config_found], ["$llvm_config"], [yes]) - if test "x$with_clang_prefix" != "x"; then - llvm_config="$with_clang_prefix/bin/llvm-config" - if test -x "$llvm_config"; then - llvm_config_found=yes - fi - fi - if test "$llvm_config_found" != yes; then - AC_MSG_ERROR([llvm-config not found]) - fi - CLANG_CXXFLAGS=`$llvm_config --cxxflags` - CLANG_LDFLAGS=`$llvm_config --ldflags` - CLANG_LIBS=`$llvm_config --libs` - CLANG_PREFIX=`$llvm_config --prefix` - AC_DEFINE_UNQUOTED(CLANG_PREFIX, ["$CLANG_PREFIX"], - [Clang installation prefix]) - - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CLANG_CXXFLAGS $CPPFLAGS" - AC_LANG_PUSH(C++) - AC_CHECK_HEADER([clang/Basic/SourceLocation.h], [], - [AC_ERROR([clang header file not found])]) - AC_EGREP_HEADER([getDefaultTargetTriple], [llvm/Support/Host.h], [], - [AC_DEFINE([getDefaultTargetTriple], [getHostTriple], - [Define to getHostTriple for older versions of clang])]) - AC_EGREP_HEADER([getExpansionLineNumber], - [clang/Basic/SourceLocation.h], [], - [AC_DEFINE([getExpansionLineNumber], - [getInstantiationLineNumber], - [Define to getInstantiationLineNumber for older versions of clang])]) - AC_EGREP_HEADER([DiagnosticsEngine], - [clang/Basic/Diagnostic.h], [], - [AC_DEFINE([DiagnosticsEngine], - [Diagnostic], - [Define to Diagnostic for older versions of clang])]) - AC_EGREP_HEADER([ArrayRef], [clang/Driver/Driver.h], - [AC_DEFINE([USE_ARRAYREF], [], - [Define if Driver::BuildCompilation takes ArrayRef])]) - AC_EGREP_HEADER([CXXIsProduction], [clang/Driver/Driver.h], - [AC_DEFINE([HAVE_CXXISPRODUCTION], [], - [Define if Driver constructor takes CXXIsProduction argument])]) - AC_LANG_POP - CPPFLAGS="$SAVE_CPPFLAGS" - ;; -esac -AM_CONDITIONAL(HAVE_CLANG, test $with_clang = system) - -AX_SET_WARNING_FLAGS - -AC_SUBST(WARNING_FLAGS) - -PACKAGE_CFLAGS="$GMP_CPPFLAGS" -PACKAGE_LDFLAGS="$GMP_LDFLAGS" -PACKAGE_LIBS="-lisl -lgmp" -AX_CREATE_PKGCONFIG_INFO - -AX_DETECT_GIT_HEAD -echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h - -AH_BOTTOM([#include ]) -AC_CONFIG_HEADERS(isl_config.h) -AC_CONFIG_HEADERS(include/isl/config.h) -AC_CONFIG_FILES(Makefile) -AC_CONFIG_FILES(doc/Makefile) -if test $with_clang = system; then - AC_CONFIG_FILES(interface/Makefile) -fi -AC_CONFIG_FILES([bound_test.sh], [chmod +x bound_test.sh]) -AC_CONFIG_FILES([pip_test.sh], [chmod +x pip_test.sh]) -AC_CONFIG_COMMANDS_POST([ - dnl pass on arguments to subdir configures, but don't - dnl add them to config.status - ac_configure_args="$ac_configure_args $isl_configure_args" -]) -AC_OUTPUT diff --git a/cloog-0.17.0/isl/depcomp b/cloog-0.17.0/isl/depcomp deleted file mode 100755 index df8eea7e4ce8862105fcd7929b20bdb45488048b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# 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, 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 . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/isl/doc/Makefile.am b/cloog-0.17.0/isl/doc/Makefile.am deleted file mode 100644 index aa79a6c9516e8d4d0f7fa861d787c641d723e911..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -if GENERATE_DOC -export TEXINPUTS := $(srcdir):$(TEXINPUTS) -export BIBINPUTS := $(srcdir):$(BIBINPUTS) -export BSTINPUTS := $(srcdir):$(BSTINPUTS) - -user.tex: user.pod - $(PERL) $(srcdir)/mypod2latex $< $@ -manual.pdf: manual.tex user.tex $(srcdir)/implementation.tex - (cd ..; echo "@GIT_HEAD_VERSION@") > version.tex - $(PDFLATEX) $< - bibtex manual - $(PDFLATEX) $< - $(PDFLATEX) $< -user.html: user.pod - (cd ..; echo "@GIT_HEAD_VERSION@") > version - $(POD2HTML) --infile=$< --outfile=$@ --title="Integer Set Library: Manual [version `cat version`]" -endif diff --git a/cloog-0.17.0/isl/doc/Makefile.in b/cloog-0.17.0/isl/doc/Makefile.in deleted file mode 100644 index ca5f881b9f731b7e4e2c92f92f12e6aa42125130..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/Makefile.in +++ /dev/null @@ -1,410 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/m4/ax_detect_git_head.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_warn_unused_result.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_set_warning_flags.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/isl_config.h \ - $(top_builddir)/include/isl/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CLANG_CXXFLAGS = @CLANG_CXXFLAGS@ -CLANG_LDFLAGS = @CLANG_LDFLAGS@ -CLANG_LIBS = @CLANG_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_HEAD = @GIT_HEAD@ -GIT_HEAD_ID = @GIT_HEAD_ID@ -GIT_HEAD_VERSION = @GIT_HEAD_VERSION@ -GMP_CPPFLAGS = @GMP_CPPFLAGS@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIBS = @GMP_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFLATEX = @PDFLATEX@ -PERL = @PERL@ -PIPLIB_CPPFLAGS = @PIPLIB_CPPFLAGS@ -PIPLIB_LDFLAGS = @PIPLIB_LDFLAGS@ -PIPLIB_LIBS = @PIPLIB_LIBS@ -POD2HTML = @POD2HTML@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -WARNING_FLAGS = @WARNING_FLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -llvm_config_found = @llvm_config_found@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - -@GENERATE_DOC_TRUE@export TEXINPUTS := $(srcdir):$(TEXINPUTS) -@GENERATE_DOC_TRUE@export BIBINPUTS := $(srcdir):$(BIBINPUTS) -@GENERATE_DOC_TRUE@export BSTINPUTS := $(srcdir):$(BSTINPUTS) - -@GENERATE_DOC_TRUE@user.tex: user.pod -@GENERATE_DOC_TRUE@ $(PERL) $(srcdir)/mypod2latex $< $@ -@GENERATE_DOC_TRUE@manual.pdf: manual.tex user.tex $(srcdir)/implementation.tex -@GENERATE_DOC_TRUE@ (cd ..; echo "@GIT_HEAD_VERSION@") > version.tex -@GENERATE_DOC_TRUE@ $(PDFLATEX) $< -@GENERATE_DOC_TRUE@ bibtex manual -@GENERATE_DOC_TRUE@ $(PDFLATEX) $< -@GENERATE_DOC_TRUE@ $(PDFLATEX) $< -@GENERATE_DOC_TRUE@user.html: user.pod -@GENERATE_DOC_TRUE@ (cd ..; echo "@GIT_HEAD_VERSION@") > version -@GENERATE_DOC_TRUE@ $(POD2HTML) --infile=$< --outfile=$@ --title="Integer Set Library: Manual [version `cat version`]" - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/isl/doc/chicago.bst b/cloog-0.17.0/isl/doc/chicago.bst deleted file mode 100644 index ba058338b97c37791bab3d24c0e73bc47d6f8a40..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/chicago.bst +++ /dev/null @@ -1,1726 +0,0 @@ -%%% ==================================================================== -%%% @BibTeX-style-file{ -%%% author = "Glenn Paulley", -%%% version = "4", -%%% date = "28 August 1992", -%%% time = "10:23:39 199", -%%% filename = "chicago.bst", -%%% address = "Data Structuring Group -%%% Department of Computer Science -%%% University of Waterloo -%%% Waterloo, Ontario, Canada -%%% N2L 3G1", -%%% telephone = "(519) 885-1211", -%%% FAX = "(519) 885-1208", -%%% checksum = "26323 1654 5143 37417", -%%% email = "gnpaulle@bluebox.uwaterloo.ca", -%%% codetable = "ISO/ASCII", -%%% keywords = "", -%%% supported = "yes", -%%% abstract = "A BibTeX bibliography style that follows the -%%% `B' reference style of the 13th Edition of -%%% the Chicago Manual of Style. A detailed -%%% feature list is given below.", -%%% docstring = "The checksum field above contains a CRC-16 -%%% checksum as the first value, followed by the -%%% equivalent of the standard UNIX wc (word -%%% count) utility output of lines, words, and -%%% characters. This is produced by Robert -%%% Solovay's checksum utility.", -%%% } -%%% ==================================================================== -% -% "Chicago" BibTeX style, chicago.bst -% =================================== -% -% BibTeX `chicago' style file for BibTeX version 0.99c, LaTeX version 2.09 -% Place it in a file called chicago.bst in the BibTeX search path. -% You need to include chicago.sty as a \documentstyle option. -% (Placing it in the same directory as the LaTeX document should also work.) -% This "chicago" style is based on newapa.bst (American Psych. Assoc.) -% found at ymir.claremont.edu. -% -% Citation format: (author-last-name year) -% (author-last-name and author-last-name year) -% (author-last-name, author-last-name, and author-last-name year) -% (author-last-name et al. year) -% (author-last-name) -% author-last-name (year) -% (author-last-name and author-last-name) -% (author-last-name et al.) -% (year) or (year,year) -% year or year,year -% -% Reference list ordering: alphabetical by author or whatever passes -% for author in the absence of one. -% -% This BibTeX style has support for abbreviated author lists and for -% year-only citations. This is done by having the citations -% actually look like -% -% \citeauthoryear{full-author-info}{abbrev-author-info}{year} -% -% The LaTeX style has to have the following (or similar) -% -% \let\@internalcite\cite -% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} -% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} -% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} -% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} -% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} -% -% These TeX macro definitions are found in chicago.sty. Additional -% commands to manipulate different components of a citation can be defined -% so that, for example, you can list author's names without parentheses -% if using a citation as a noun or object in a sentence. -% -% This file was originally copied from newapa.bst at ymir.claremont.edu. -% -% Features of chicago.bst: -% ======================= -% -% - full names used in citations, but abbreviated citations are available -% (see above) -% - if an entry has a "month", then the month and year are also printed -% as part of that bibitem. -% - all conjunctions use "and" instead of "\&" -% - major modification from Chicago Manual of Style (13th ed.) is that -% only the first author in a reference appears last name first- -% additional authors appear as J. Q. Public. -% - pages are listed as "pp. xx-xx" in all entry types except -% article entries. -% - book, inbook, and manual use "location: publisher" (or organization) -% for address and publisher. All other types list publishers separately. -% - "pp." are used to identify page numbers for all entry types except -% articles. -% - organization is used as a citation label if neither author nor editor -% is present (for manuals). -% - "et al." is used for long author and editor lists, or when "others" -% is used. -% -% Modifications and bug fixes from newapa.bst: -% =========================================== -% -% - added month, year to bib entries if month is present -% - fixed bug with In proceedings, added necessary comma after title -% - all conjunctions changed to "and" from "\&" -% - fixed bug with author labels in my.full.label: "et al." now is -% generated when "others" is an author name -% - major modification from Chicago Manual of Style (13th ed.) is that -% only the first author in a reference appears last name first- -% additional authors appear as J. Q. Public. -% - pages are listed as "pp. xx-xx" in all entry types except -% article entries. Unnecessary (IMHO) "()" around page numbers -% were removed, and page numbers now don't end with a period. -% - created chicago.sty for use with this bibstyle (required). -% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume, -% number, and /or pages. Renamed to format.jour.vol. -% - fixed bug in formatting booktitles: additional period an error if -% book has a volume. -% - fixed bug: editors usually given redundant period before next clause -% (format.editors.dot) removed. -% - added label support for organizations, if both author and editor -% are missing (from alpha.bst). If organization is too long, then -% the key field is used for abbreviated citations. -% - In proceedings or books of several volumes, no comma was written -% between the "Volume x" and the page numbers (this was intentional -% in newapa.bst). Fixed. -% - Some journals may not have volumes/numbers, only month/year (eg. -% IEEE Computer). Fixed bug in article style that assumed volume/number -% was always present. -% -% Original documentation for newapa.sty: -% ===================================== -% -% This version was made by modifying the master file made by -% Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX -% style of Peter F. Patel-Schneider. -% -% Copyright (C) 1985, all rights reserved. -% Copying of this file is authorized only if either -% (1) you make absolutely no changes to your copy, including name, or -% (2) if you do make changes, you name it something other than 'newapa.bst'. -% There are undoubtably bugs in this style. If you make bug fixes, -% improvements, etc. please let me know. My e-mail address is: -% spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com -% -% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst', -% with lots of tweaking to make it look like APA style, along with tips -% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'. - -ENTRY - { address - author - booktitle - chapter - edition - editor - fjournal - howpublished - institution - journal - key - month - note - number - organization - pages - publisher - school - series - title - type - volume - year - } - {} - { label.year extra.label sort.year sort.label } - -INTEGERS { output.state before.all mid.sentence after.sentence after.block } - -FUNCTION {init.state.consts} -{ #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := -} - -STRINGS { s t u } - -FUNCTION {output.nonnull} -{ 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} - -% Use a colon to separate output. Used only for address/publisher -% combination in book/inbook types, address/institution for manuals, -% and organization:publisher for proceedings (inproceedings). -% -FUNCTION {output.nonnull.colon} -{ 's := - output.state mid.sentence = - { ": " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} - -FUNCTION {output} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull - if$ -} - -FUNCTION {output.colon} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull.colon - if$ -} - -FUNCTION {output.check} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ -} - -FUNCTION {output.check.colon} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull.colon - if$ -} - -FUNCTION {output.year.check} -{ year empty$ - { "empty year in " cite$ * warning$ } - { write$ - " (" year * extra.label * - month empty$ - { ")" * } - { ", " * month * ")" * } - if$ - mid.sentence 'output.state := - } - if$ -} - - -FUNCTION {fin.entry} -{ add.period$ - write$ - newline$ -} - -FUNCTION {new.block} -{ output.state before.all = - 'skip$ - { after.block 'output.state := } - if$ -} - -FUNCTION {new.sentence} -{ output.state after.block = - 'skip$ - { output.state before.all = - 'skip$ - { after.sentence 'output.state := } - if$ - } - if$ -} - -FUNCTION {not} -{ { #0 } - { #1 } - if$ -} - -FUNCTION {and} -{ 'skip$ - { pop$ #0 } - if$ -} - -FUNCTION {or} -{ { pop$ #1 } - 'skip$ - if$ -} - -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ -} - -FUNCTION {new.block.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ -} - -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {field.or.null} -{ duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ -} - -% -% Emphasize the top string on the stack. -% -FUNCTION {emphasize} -{ duplicate$ empty$ - { pop$ "" } - { "{\em " swap$ * "}" * } - if$ -} - -% -% Emphasize the top string on the stack, but add a trailing space. -% -FUNCTION {emphasize.space} -{ duplicate$ empty$ - { pop$ "" } - { "{\em " swap$ * "\/}" * } - if$ -} - -INTEGERS { nameptr namesleft numnames } -% -% Format bibliographical entries with the first author last name first, -% and subsequent authors with initials followed by last name. -% All names are formatted in this routine. -% -FUNCTION {format.names} -{ 's := - #1 'nameptr := % nameptr = 1; - s num.names$ 'numnames := % numnames = num.name$(s); - numnames 'namesleft := - { namesleft #0 > } - - { nameptr #1 = - {s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := } - {s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := } - if$ - nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } % from Chicago Manual of Style - if$ - } - if$ - } - 't - if$ - s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := - "\protect \index {" * t * "|hyperemph}" * - nameptr #1 + 'nameptr := % nameptr += 1; - namesleft #1 - 'namesleft := % namesleft =- 1; - } - while$ -} - -FUNCTION {my.full.label} -{ 's := - #1 'nameptr := % nameptr = 1; - s num.names$ 'numnames := % numnames = num.name$(s); - numnames 'namesleft := - { namesleft #0 > } - - { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name - nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } % from Chicago Manual of Style - if$ - } - if$ - } - 't - if$ - s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := - "\protect \index {" * t * "|bold}" * - nameptr #1 + 'nameptr := % nameptr += 1; - namesleft #1 - 'namesleft := % namesleft =- 1; - } - while$ - -} - -FUNCTION {format.names.fml} -% -% Format names in "familiar" format, with first initial followed by -% last name. Like format.names, ALL names are formatted. -% -{ 's := - #1 'nameptr := % nameptr = 1; - s num.names$ 'numnames := % numnames = num.name$(s); - numnames 'namesleft := - { namesleft #0 > } - - { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := - - nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } -% { " \& " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := % nameptr += 1; - namesleft #1 - 'namesleft := % namesleft =- 1; - } - while$ -} - -FUNCTION {format.authors} -{ author empty$ - { "" } - { author format.names } - if$ -} - -FUNCTION {format.key} -{ empty$ - { key field.or.null } - { "" } - if$ -} - -% -% Format editor names for use in the "in" types: inbook, incollection, -% inproceedings: first initial, then last names. When editors are the -% LABEL for an entry, then format.editor is used which lists editors -% by last name first. -% -FUNCTION {format.editors.fml} -{ editor empty$ - { "" } - { editor format.names.fml - editor num.names$ #1 > - { " (Eds.)" * } - { " (Ed.)" * } - if$ - } - if$ -} - -% -% Format editor names for use in labels, last names first. -% -FUNCTION {format.editors} -{ editor empty$ - { "" } - { editor format.names - editor num.names$ #1 > - { " (Eds.)" * } - { " (Ed.)" * } - if$ - } - if$ -} - -FUNCTION {format.title} -{ title empty$ - { "" } - { title "t" change.case$ } - if$ -} - -% Note that the APA style requres case changes -% in article titles. The following does not -% change cases. If you perfer it, uncomment the -% following and comment out the above. - -%FUNCTION {format.title} -%{ title empty$ -% { "" } -% { title } -% if$ -%} - -FUNCTION {n.dashify} -{ 't := - "" - { t empty$ not } - { t #1 #1 substring$ "-" = - { t #1 #2 substring$ "--" = not - { "--" * - t #2 global.max$ substring$ 't := - } - { { t #1 #1 substring$ "-" = } - { "-" * - t #2 global.max$ substring$ 't := - } - while$ - } - if$ - } - { t #1 #1 substring$ * - t #2 global.max$ substring$ 't := - } - if$ - } - while$ -} - -FUNCTION {format.btitle} -{ edition empty$ - { title emphasize } - { title empty$ - { title emphasize } - { volume empty$ % gnp - check for volume, then don't need period - { "{\em " title * "\/} (" * edition * " ed.)" * "." * } - { "{\em " title * "\/} (" * edition * " ed.)" * } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.emphasize.booktitle} -{ edition empty$ - { booktitle emphasize } - { booktitle empty$ - { booktitle emphasize } - { volume empty$ % gnp - extra period an error if book has a volume - { "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *} - { "{\em " booktitle * "\/} (" * edition * " ed.)" * } - if$ - } - if$ - } - if$ - } - - -FUNCTION {tie.or.space.connect} -{ duplicate$ text.length$ #3 < - { "~" } - { " " } - if$ - swap$ * * -} - -FUNCTION {either.or.check} -{ empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ -} - -FUNCTION {format.bvolume} -{ volume empty$ - { "" } - { "Volume" volume tie.or.space.connect % gnp - changed to mixed case - series empty$ - 'skip$ - { " of " * series emphasize * } - if$ - "volume and number" number either.or.check - } - if$ -} - -FUNCTION {format.number.series} -{ volume empty$ - { number empty$ - { series field.or.null } - { output.state mid.sentence = - { "Number" } % gnp - changed to mixed case always - { "Number" } - if$ - number tie.or.space.connect - series empty$ - { "there's a number but no series in " cite$ * warning$ } - { " in " * series * } - if$ - } - if$ - } - { "" } - if$ -} - -INTEGERS { multiresult } - -FUNCTION {multi.page.check} -{ 't := - #0 'multiresult := - { multiresult not - t empty$ not - and - } - { t #1 #1 substring$ - duplicate$ "-" = - swap$ duplicate$ "," = - swap$ "+" = - or or - { #1 'multiresult := } - { t #2 global.max$ substring$ 't := } - if$ - } - while$ - multiresult -} - -FUNCTION {format.pages} -{ pages empty$ - { "" } - { pages multi.page.check - { "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed () - { "pp.\ " pages tie.or.space.connect } - if$ - } - if$ -} - -% By Young (and Spencer) -% GNP - fixed bugs with missing volume, number, and/or pages -% -% Format journal, volume, number, pages for article types. -% -FUNCTION {format.jour.vol} -{ fjournal empty$ - { journal empty$ - { "no journal in " cite$ * warning$ - "" } - { journal emphasize.space } - if$ - } - { fjournal emphasize.space } - if$ - number empty$ - { volume empty$ - { "no number and no volume in " cite$ * warning$ - "" * } - { "~{\em " * Volume * "}" * } - if$ - } - { volume empty$ - {"no volume for " cite$ * warning$ - "~(" * number * ")" * } - { "~" * - volume emphasize.space - "(" * number * ")" * * } - if$ - } - if$ - pages empty$ - {"page numbers missing in " cite$ * warning$ - "" * } % gnp - place a null string on the stack for output - { duplicate$ empty$ - { pop$ format.pages } - { ", " * pages n.dashify * } % gnp - removed pp. for articles - if$ - } - if$ -} - -FUNCTION {format.chapter.pages} -{ chapter empty$ - 'format.pages - { type empty$ - { "Chapter" } % gnp - changed to mixed case - { type "t" change.case$ } - if$ - chapter tie.or.space.connect - pages empty$ - {"page numbers missing in " cite$ * warning$} % gnp - added check - { ", " * format.pages * } - if$ - } - if$ -} - -FUNCTION {format.in.ed.booktitle} -{ booktitle empty$ - { "" } - { editor empty$ - { "In " format.emphasize.booktitle * } - { "In " format.editors.fml * ", " * format.emphasize.booktitle * } - if$ - } - if$ -} - -FUNCTION {format.thesis.type} -{ type empty$ - 'skip$ - { pop$ - type "t" change.case$ - } - if$ -} - -FUNCTION {format.tr.number} -{ type empty$ - { "Technical Report" } - 'type - if$ - number empty$ - { "t" change.case$ } - { number tie.or.space.connect } - if$ -} - -FUNCTION {format.article.crossref} -{ "See" - "\citeN{" * crossref * "}" * -} - -FUNCTION {format.crossref.editor} -{ editor #1 "{vv~}{ll}" format.name$ - editor num.names$ duplicate$ - #2 > - { pop$ " et~al." * } - { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { " et~al." * } - { " and " * editor #2 "{vv~}{ll}" format.name$ * } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.book.crossref} -{ volume empty$ - { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ - "In " - } - { "Volume" volume tie.or.space.connect % gnp - changed to mixed case - " of " * - } - if$ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { "{\em " * series * "\/}" * } - if$ - } - { key * } - if$ - } - { format.crossref.editor * } - if$ - " \citeN{" * crossref * "}" * -} - -FUNCTION {format.incoll.inproc.crossref} -{ "See" - " \citeN{" * crossref * "}" * -} - -% format.lab.names: -% -% determines "short" names for the abbreviated author information. -% "Long" labels are created in calc.label, using the routine my.full.label -% to format author and editor fields. -% -% There are 4 cases for labels. (n=3 in the example) -% a) one author Foo -% b) one to n Foo, Bar and Baz -% c) use of "and others" Foo, Bar et al. -% d) more than n Foo et al. -% -FUNCTION {format.lab.names} -{ 's := - s num.names$ 'numnames := - numnames #2 > % change number to number of others allowed before - % forcing "et al". - { s #1 "{vv~}{ll}" format.name$ - "\protect \index {" * - s #1 "{vv~}{ll}{, jj}{, f.}" format.name$ * - "}" * - "\protect\chicagoetal/" * } - { - numnames #1 - 'namesleft := - #2 'nameptr := - s #1 "{vv~}{ll}" format.name$ - "\protect \index {" * - s #1 "{vv~}{ll}{, jj}{, f.}" format.name$ * - "}" * - { namesleft #0 > } - { nameptr numnames = - { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { "\protect\chicagoetal/" * } - { "\protect\chicagoand/" * s nameptr "{vv~}{ll}" format.name$ * - "\protect \index {" * - s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ * - "}" * - } - if$ - } - { ", " * s nameptr "{vv~}{ll}" format.name$ * } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } - if$ -} - -FUNCTION {author.key.label} -{ author empty$ - { key empty$ - { "no key, author in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {editor.key.label} -{ editor empty$ - { key empty$ - { "no key, editor in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { editor format.lab.names } - if$ -} - -FUNCTION {author.key.organization.label} -% -% added - gnp. Provide label formatting by organization if author is null. -% -{ author empty$ - { organization empty$ - { key empty$ - { "no key, author or organization in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { organization } - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {editor.key.organization.label} -% -% added - gnp. Provide label formatting by organization if editor is null. -% -{ editor empty$ - { organization empty$ - { key empty$ - { "no key, editor or organization in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { organization } - if$ - } - { editor format.lab.names } - if$ -} - -FUNCTION {author.editor.key.label} -{ author empty$ - { editor empty$ - { key empty$ - { "no key, author, or editor in " cite$ * warning$ - cite$ #1 #3 substring$ } - 'key - if$ - } - { editor format.lab.names } - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {calc.label.orig} -% -% Changed - GNP. See also author.organization.sort, editor.organization.sort -% Form label for BibTeX entry. The classification of which fields are used -% for which type of entry (book, inbook, etc.) are taken from alpha.bst. -% The change here from newapa is to also include organization as a -% citation label if author or editor is missing. -% -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label - { type$ "proceedings" = - 'editor.key.organization.label - { type$ "manual" = - 'author.key.organization.label - 'author.key.label - if$ - } - if$ - } - if$ - - author empty$ % generate the full label citation information. - { editor empty$ - { organization empty$ - { "no author, editor, or organization in " cite$ * warning$ - "??" } - { organization } - if$ - } - { editor my.full.label } - if$ - } - { author.key.label } - if$ - -% leave label on the stack, to be popped when required. - - "}{" * swap$ * -% year field.or.null purify$ #-1 #4 substring$ * -% -% save the year for sort processing afterwards (adding a, b, c, etc.) -% - year field.or.null purify$ #-1 #4 substring$ - 'label.year := -} - -FUNCTION {calc.label} -% -% Changed - GNP. See also author.organization.sort, editor.organization.sort -% Form label for BibTeX entry. The classification of which fields are used -% for which type of entry (book, inbook, etc.) are taken from alpha.bst. -% The change here from newapa is to also include organization as a -% citation label if author or editor is missing. -% -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label - { type$ "proceedings" = - 'editor.key.organization.label - { type$ "manual" = - 'author.key.organization.label - 'author.key.label - if$ - } - if$ - } - if$ - - author empty$ % generate the full label citation information. - { editor empty$ - { organization empty$ - { "no author, editor, or organization in " cite$ * warning$ - "??" } - { organization } - if$ - } - { editor my.full.label } - if$ - } - { author my.full.label } - if$ - -% leave label on the stack, to be popped when required. - - "}{" * swap$ * "}{" * title * "}{" * -% year field.or.null purify$ #-1 #4 substring$ * -% -% save the year for sort processing afterwards (adding a, b, c, etc.) -% - year field.or.null purify$ #-1 #4 substring$ - 'label.year := -} - -FUNCTION {output.bibitem} -{ newline$ - - "\bibitem[\protect\citeauthortitleyear{" write$ - calc.label write$ - sort.year write$ - "}]{" write$ - - cite$ write$ - "}" write$ - newline$ - "" - before.all 'output.state := -} - -FUNCTION {article} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - crossref missing$ - { format.jour.vol output - } - { format.article.crossref output.nonnull - format.pages output - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {book} -{ output.bibitem - author empty$ - { format.editors - "author and editor" output.check } - { format.authors - output.nonnull - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - output.year.check % added - new.block - format.btitle - "title" output.check - crossref missing$ - { format.bvolume output - new.block - format.number.series output - new.sentence - address output - publisher "publisher" output.check.colon - } - { new.block - format.book.crossref output.nonnull - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {booklet} -{ output.bibitem - format.authors output - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - howpublished output - address output - new.block - note output - fin.entry -} - -FUNCTION {inbook} -{ output.bibitem - author empty$ - { format.editors - "author and editor" output.check - } - { format.authors output.nonnull - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - output.year.check % added - new.block - format.btitle - "title" output.check - crossref missing$ - { format.bvolume output - format.chapter.pages - "chapter and pages" output.check - new.block - format.number.series output - new.sentence - address output - publisher - "publisher" output.check.colon - } - { format.chapter.pages "chapter and pages" output.check - new.block - format.book.crossref output.nonnull - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {incollection} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle - "booktitle" output.check - format.bvolume output - format.number.series output - format.chapter.pages output % gnp - was special.output.nonnull -% left out comma before page numbers - new.sentence - address output - publisher "publisher" output.check.colon - } - { format.incoll.inproc.crossref - output.nonnull - format.chapter.pages output - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {inproceedings} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle - "booktitle" output.check - format.bvolume output - format.number.series output - address output - format.pages output - new.sentence - organization output - publisher output.colon - } - { format.incoll.inproc.crossref output.nonnull - format.pages output - } - if$ - new.block - note output - fin.entry -} - -FUNCTION {conference} { inproceedings } - -FUNCTION {manual} -{ output.bibitem - author empty$ - { editor empty$ - { organization "organization" output.check - organization format.key output } % if all else fails, use key - { format.editors "author and editor" output.check } - if$ - } - { format.authors output.nonnull } - if$ - output.year.check % added - new.block - format.btitle - "title" output.check - organization address new.block.checkb -% Reversed the order of "address" and "organization", added the ":". - address output - organization "organization" output.check.colon -% address output -% ":" output -% organization output - new.block - note output - fin.entry -} - -FUNCTION {mastersthesis} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - "Master's thesis" format.thesis.type output.nonnull - school "school" output.check - address output - new.block - note output - fin.entry -} - -FUNCTION {misc} -{ output.bibitem - format.authors output - author format.key output % added - output.year.check % added - title howpublished new.block.checkb - format.title output - new.block - howpublished output - new.block - note output - fin.entry -} - -FUNCTION {phdthesis} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.btitle - "title" output.check - new.block - "Ph.\ D. thesis" format.thesis.type output.nonnull - school "school" output.check - address output - new.block - note output - fin.entry -} - -FUNCTION {proceedings} -{ output.bibitem - editor empty$ - { organization output - organization format.key output } % gnp - changed from author format.key - { format.editors output.nonnull } - if$ -% author format.key output % gnp - removed (should be either -% editor or organization - output.year.check % added (newapa) - new.block - format.btitle - "title" output.check - format.bvolume output - format.number.series output - address output - new.sentence - organization output - publisher output.colon - new.block - note output - fin.entry -} - -FUNCTION {techreport} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - format.tr.number output.nonnull - institution - "institution" output.check - address output - new.block - note output - fin.entry -} - -FUNCTION {unpublished} -{ output.bibitem - format.authors - "author" output.check - author format.key output % added - output.year.check % added - new.block - format.title - "title" output.check - new.block - note "note" output.check - fin.entry -} - -FUNCTION {default.type} { misc } - -MACRO {jan} {"January"} - -MACRO {feb} {"February"} - -MACRO {mar} {"March"} - -MACRO {apr} {"April"} - -MACRO {may} {"May"} - -MACRO {jun} {"June"} - -MACRO {jul} {"July"} - -MACRO {aug} {"August"} - -MACRO {sep} {"September"} - -MACRO {oct} {"October"} - -MACRO {nov} {"November"} - -MACRO {dec} {"December"} - -MACRO {acmcs} {"ACM Computing Surveys"} - -MACRO {acta} {"Acta Informatica"} - -MACRO {ai} {"Artificial Intelligence"} - -MACRO {cacm} {"Communications of the ACM"} - -MACRO {ibmjrd} {"IBM Journal of Research and Development"} - -MACRO {ibmsj} {"IBM Systems Journal"} - -MACRO {ieeese} {"IEEE Transactions on Software Engineering"} - -MACRO {ieeetc} {"IEEE Transactions on Computers"} - -MACRO {ieeetcad} - {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} - -MACRO {ipl} {"Information Processing Letters"} - -MACRO {jacm} {"Journal of the ACM"} - -MACRO {jcss} {"Journal of Computer and System Sciences"} - -MACRO {scp} {"Science of Computer Programming"} - -MACRO {sicomp} {"SIAM Journal on Computing"} - -MACRO {tocs} {"ACM Transactions on Computer Systems"} - -MACRO {tods} {"ACM Transactions on Database Systems"} - -MACRO {tog} {"ACM Transactions on Graphics"} - -MACRO {toms} {"ACM Transactions on Mathematical Software"} - -MACRO {toois} {"ACM Transactions on Office Information Systems"} - -MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} - -MACRO {tcs} {"Theoretical Computer Science"} - -READ - -FUNCTION {sortify} -{ purify$ - "l" change.case$ -} - -INTEGERS { len } - -FUNCTION {chop.word} -{ 's := - 'len := - s #1 len substring$ = - { s len #1 + global.max$ substring$ } - 's - if$ -} - - - -FUNCTION {sort.format.names} -{ 's := - #1 'nameptr := - "" - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { nameptr #2 = - { year field.or.null purify$ #-1 #4 substring$ * } - 'skip$ - if$ - nameptr #1 > - { " " * } - 'skip$ - if$ - s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := - nameptr numnames = t "others" = and - { " et~al" * } - { t sortify * } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ -} - -FUNCTION {sort.format.title} -{ 't := - "A " #2 - "An " #3 - "The " #4 t chop.word - chop.word - chop.word - sortify - #1 global.max$ substring$ -} - -FUNCTION {author.sort} -{ author empty$ - { key empty$ - { "to sort, need author or key in " cite$ * warning$ - "" } - { key sortify } - if$ - } - { author sort.format.names } - if$ -} - -FUNCTION {editor.sort} -{ editor empty$ - { key empty$ - { "to sort, need editor or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { editor sort.format.names } - if$ -} - -FUNCTION {author.editor.sort} -{ author empty$ - { "missing author in " cite$ * warning$ - editor empty$ - { key empty$ - { "to sort, need author, editor, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { editor sort.format.names } - if$ - } - { author sort.format.names } - if$ -} - -FUNCTION {author.organization.sort} -% -% added - GNP. Stack author or organization for sorting (from alpha.bst). -% Unlike alpha.bst, we need entire names, not abbreviations -% -{ author empty$ - { organization empty$ - { key empty$ - { "to sort, need author, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { organization sortify } - if$ - } - { author sort.format.names } - if$ -} - -FUNCTION {editor.organization.sort} -% -% added - GNP. Stack editor or organization for sorting (from alpha.bst). -% Unlike alpha.bst, we need entire names, not abbreviations -% -{ editor empty$ - { organization empty$ - { key empty$ - { "to sort, need editor, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { organization sortify } - if$ - } - { editor sort.format.names } - if$ -} - -FUNCTION {presort} -% -% Presort creates the bibentry's label via a call to calc.label, and then -% sorts the entries based on entry type. Chicago.bst adds support for -% including organizations as the sort key; the following is stolen from -% alpha.bst. -% -{ %calc.label sortify % recalculate bibitem label - %year field.or.null purify$ #-1 #4 substring$ * % add year - %duplicate$ warning$ - %" " - %* - type$ "book" = - type$ "inbook" = - or - 'author.editor.sort - { type$ "proceedings" = - 'editor.organization.sort - { type$ "manual" = - 'author.organization.sort - 'author.sort - if$ - } - if$ - } - if$ - #1 entry.max$ substring$ % added for newapa - 'sort.label := % added for newapa - sort.label % added for newapa - %* - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := -} - -ITERATE {presort} - -SORT % by label, year, author/editor, title - -STRINGS { last.label next.extra } - -INTEGERS { last.extra.num } - -FUNCTION {initialize.extra.label.stuff} -{ #0 int.to.chr$ 'last.label := - "" 'next.extra := - #0 'last.extra.num := -} - -FUNCTION {forward.pass} -% -% Pass through all entries, comparing current entry to last one. -% Need to concatenate year to the stack (done by calc.label) to determine -% if two entries are the same (see presort) -% -{ last.label - calc.label.orig year field.or.null purify$ #-1 #4 substring$ * % add year - #1 entry.max$ substring$ = % are they equal? - { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := - } - { "a" chr.to.int$ 'last.extra.num := - "" 'extra.label := - calc.label.orig year field.or.null purify$ #-1 #4 substring$ * % add year - #1 entry.max$ substring$ 'last.label := % assign to last.label - } - if$ -} - -FUNCTION {reverse.pass} -{ next.extra "b" = - { "a" 'extra.label := } - 'skip$ - if$ - label.year extra.label * 'sort.year := - extra.label 'next.extra := -} - -EXECUTE {initialize.extra.label.stuff} - -ITERATE {forward.pass} - -REVERSE {reverse.pass} - -FUNCTION {bib.sort.order} -{ sort.label - " " - * - year field.or.null sortify - * - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := -} - -ITERATE {bib.sort.order} - -SORT % by sort.label, year, title --- giving final bib. order. - -FUNCTION {begin.bib} - -{ preamble$ empty$ - 'skip$ - { preamble$ write$ newline$ } - if$ - "\begin{thebibliography}{}" write$ newline$ -} - - -EXECUTE {begin.bib} - -EXECUTE {init.state.consts} - -ITERATE {call.type$} - -FUNCTION {end.bib} -{ newline$ - "\end{thebibliography}" write$ newline$ -} - -EXECUTE {end.bib} - diff --git a/cloog-0.17.0/isl/doc/chicago.sty b/cloog-0.17.0/isl/doc/chicago.sty deleted file mode 100644 index 33588dba9238069c48fc92072e0d702455fcd55c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/chicago.sty +++ /dev/null @@ -1,320 +0,0 @@ -% -*- LaTeX -*- -%%% ==================================================================== -%%% @LaTeX-style-file{ -%%% author = "Glenn Paulley", -%%% version = "4", -%%% date = "31 August 1992", -%%% time = "09:42:44 199", -%%% filename = "chicago.sty", -%%% address = "Data Structuring Group -%%% Department of Computer Science -%%% University of Waterloo -%%% Waterloo, Ontario, Canada -%%% N2L 3G1", -%%% telephone = "(519) 885-1211", -%%% FAX = "(519) 885-1208", -%%% checksum = "44674 264 1050 10394", -%%% email = "gnpaulle@bluebox.uwaterloo.ca", -%%% codetable = "ISO/ASCII", -%%% keywords = "", -%%% supported = "yes", -%%% abstract = "Contains the LaTeX style command definitions -%%% for the Chicago BibTeX styles chicago.bst and -%%% chicagoa.bst. For details, see below.", -%%% docstring = "The checksum field above contains a CRC-16 -%%% checksum as the first value, followed by the -%%% equivalent of the standard UNIX wc (word -%%% count) utility output of lines, words, and -%%% characters. This is produced by Robert -%%% Solovay's checksum utility.", -%%% } -%%% ==================================================================== -% -% chicago.sty: Style file for use with bibtex style chicago.bst, for -% bibliographies formatted according to the 13th Edition of the Chicago -% Manual of Style. -% -% 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst', -% with lots of tweaking to make it look like APA style, along with tips -% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'. -% newapa.sty formed the basis of this style, chicago.sty. Author-date -% references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst -% supports annotations. -% -% Version 4 (August, 1992): -% - fixed chicago.bst and chicagoa.bst to handle long author lists in -% sorting -% - fixed chicago.bst and chicagoa.bst so that missing page numbers in -% ``article'' entries are handled correctly -% - modified chicago.sty to format entries with 2nd and subsequent lines -% indented. -% -% Citation format: (author-last-name year) -% (author-last-name and author-last-name year) -% (author-last-name et al. year) -% (author-last-name) -% author-last-name -% author-last-name (year) -% (author-last-name and author-last-name) -% (author-last-name et al.) -% (year) or (year,year) -% year or year,year -% -% Reference list ordering: alphabetical by author or whatever passes -% for author in the absence of one. -% -% This BibTeX style has support for abbreviated author lists and for -% year-only citations. This is done by having the citations -% actually look like -% -% \citeauthoryear{full-author-info}{abbrev-author-info}{year} -% -% The LaTeX style has to have the following (or similar) -% -% \let\@internalcite\cite -% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} -% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} -% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} -% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} -% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} -% -% ------------------------------------------------------------------------- -% This file implements citations for the ``chicago'' bibliography style. -% Place it in a file called chicago.sty in the TeX search path. -%(Placing it in the same directory as the LaTeX document should also work.) -% -% This file is a modification of the ``newapa'' LaTeX style, -% originally adapted by Steven Spencer from the ``apalike'' LaTeX style. -% It was originally modified by Stephen N. Spencer, with further -% modifications by Young U. Ryu. -% -% The ``chicago'' BibTeX bibliography style creates citations with labels: -% \citeauthoryear{author-info}{abbrev. author-info}{year} -% -% These labels are processed by the following LaTeX commands: -% -% \cite{key} -% which produces citations with full author list and year. -% eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985) -% \citeNP{key} -% which produces citations with full author list and year, but without -% enclosing parentheses: -% eg. Brown 1978; Jarke, Turner and Stohl 1985 -% \citeA{key} -% which produces citations with only the full author list. -% eg. (Brown; Jarke, Turner and Stohl) -% \citeANP{key} -% which produces citations with only the full author list, without -% parentheses eg. Brown; Jarke, Turner and Stohl -% \citeN{key} -% which produces citations with the full author list and year, but -% can be used as nouns in a sentence; no parentheses appear around -% the author names, but only around the year. -% eg. Shneiderman (1978) states that...... -% \citeN should only be used for a single citation. -% \shortcite{key} -% which produces citations with abbreviated author list and year. -% \shortciteNP{key} -% which produces citations with abbreviated author list and year. -% \shortciteA{key} -% which produces only the abbreviated author list. -% \shortciteANP{key} -% which produces only the abbreviated author list. -% \shortciteN{key} -% which produces the abbreviated author list and year, with only the -% year in parentheses. Use with only one citation. -% \citeyear{key} -% which produces the year information only, within parentheses. -% \citeyearNP{key} -% which produces the year information only. -% -% Abbreviated author lists use the ``et al.'' construct. -% -% `NP' means `no parentheses'. -% -% This LaTeX style file must be used with the ``chicago'' or ``chicagoa'' -% (annotated chicago style) BibTeX styles. -% -\typeout{Using Chicago Manual of Style bibliography: 31 August 1992} -% -% ------------------------------------------------------------------------- -% -% Citation macros. -% -\def\chicagoand/{ and } -\def\chicagoetal/{ et~al.} -% -\let\@internalcite\cite -% -\def\cite{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##1\ ##4}\@internalcite} -\def\citeNP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##1\ ##4}\@internalcite} -\def\citetitleN{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% - \def\citeauthortitleyear##1##2##3##4{##3\ (##1; ##4}\@citedata} -\def\citeN{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% - \def\citeauthortitleyear##1##2##3##4{##1\ (##4}\@citedata} -\def\citeA{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##1}\@internalcite} -\def\citeANP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##1}\@internalcite} -% -\def\shortcite{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##2\ ##4}\@internalcite} -\def\shortciteNP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##2\ ##4}\@internalcite} -\def\shortciteN{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}% - \def\citeauthortitleyear##1##2##3##4{##2\ (##4}\@citedata} -\def\shortciteA{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##2}\@internalcite} -\def\shortciteANP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##2}\@internalcite} -% -\def\citeyear{\def\@citeseppen{-1000}% - \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}% - \def\citeauthortitleyear##1##2##3##4{##4}\@citedata} -\def\citeyearNP{\def\@citeseppen{-1000}% - \def\@cite##1##2{##1\if@tempswa , ##2\fi}% - \def\citeauthortitleyear##1##2##3##4{##4}\@citedata} - -% -% \@citedata and \@citedatax: -% -% Place commas in-between citations in the same \citeyear, \citeyearNP, -% \citeN, or \shortciteN command. -% Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list. -% -\def\@citedata{% - \@ifnextchar [{\@tempswatrue\@citedatax}% - {\@tempswafalse\@citedatax[]}% -} - -\def\@citedatax[#1]#2{% -\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% - \def\@citea{}\@cite{\@for\@citeb:=#2\do% - {\@citea\def\@citea{), }\@ifundefined% by Young - {b@\@citeb}{{\bf ?}% - \@warning{Citation `\@citeb' on page \thepage \space undefined}}% -{\csname b@\@citeb\endcsname}}}{#1}}% - -\@ifpackageloaded{hyperref}{% - \let\BRorg@citedatax\@citedatax - \def\@citedatax[#1]#2{% - \BRorg@citedatax[#1]{#2}% - \Hy@backout{#2}% - }% -}{} -\@ifpackageloaded{hyperref}{% -\def\hyperemph#1{{\em\hyperpage{#1}}}% -\def\bold#1{{\bf\hyperpage{#1}}}% -}{% -\def\hyperemph#1{{\em #1}}% -\def\bold#1{{\bf #1}}% -} - -\def\BR@@lbibitem[#1]#2#3\par{% - \BRorg@bibitem[#1]{#2}#3\hfill\penalty100\hbox{} - \newblock - \backref\hfill[{\csname br@#2\endcsname}% - ]\parskip=-10pt\penalty-10000\hbox{}\nobreak\par -}% -\def\BR@@bibitem#1#2\par{% - \BRorg@bibitem{#1}#2 - \newblock - \backref\penalty-100\hbox{}\nobreak\hfill[\hbox{\csname br@#2\endcsname}% - ]\par -} -\def\thepageorcolor{\thepage} -\def\Hy@backout#1{% - \@bsphack - \ifx\@empty\@currentlabel - \protected@write\@auxout{}{% - \string\@writefile{brf}{% - \string\backcite{#1}{{\thepageorcolor}{(document)}{Doc-Start}}% - }% - }% - \else - \protected@write\@auxout{}{% - \string\@writefile{brf}{% - \string\backcite{#1}{{\thepageorcolor}{\@currentlabel}{\@currentHref}}% - }% - }% - \fi - \@esphack -} - -% don't box citations, separate with ; and a space -% also, make the penalty between citations negative: a good place to break. -% -\def\@citex[#1]#2{% -\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi% - \def\@citea{}\@cite{\@for\@citeb:=#2\do% - {\@citea\def\@citea{; }\@ifundefined% by Young - {b@\@citeb}{{\bf ?}% - \@warning{Citation `\@citeb' on page \thepage \space undefined}}% -{\csname b@\@citeb\endcsname}}}{#1}}% - -% (from apalike.sty) -% No labels in the bibliography. -% -\def\@biblabel#1{} - -% (from apalike.sty) -% Set length of hanging indentation for bibliography entries. -% -\newlength{\bibhang} -\setlength{\bibhang}{2em} - -% Indent second and subsequent lines of bibliographic entries. Stolen -% from openbib.sty: \newblock is set to {}. - -\newdimen\bibindent -\bibindent=1.5em -\@ifundefined{refname}% - {\@ifundefined{chapter}% - {\newcommand{\refname}{References}}% - {\newcommand{\refname}{Bibliography}}% - }% - {}% -\@ifundefined{chapter}% - {\def\thebibliography#1{\section*{\refname\@mkboth - {\uppercase{\refname}}{\uppercase{\refname}}} - \addcontentsline{toc}{section}{References} - \list - {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]} - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \usecounter{enumi}} - \def\newblock{} - \sloppy - \sfcode`\.=1000\relax}} - {\def\thebibliography#1{\chapter*{\refname\@mkboth - {\refname}{\refname}} - \addcontentsline{toc}{chapter}{References} - \list - {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]} - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \usecounter{enumi}} - \def\newblock{} - \sloppy - \sfcode`\.=1000\relax}} diff --git a/cloog-0.17.0/isl/doc/implementation.tex b/cloog-0.17.0/isl/doc/implementation.tex deleted file mode 100644 index d5ece80e4c8ba7876ed2769f38434b4a72848dfe..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/implementation.tex +++ /dev/null @@ -1,2036 +0,0 @@ -\section{Sets and Relations} - -\begin{definition}[Polyhedral Set] -A {\em polyhedral set}\index{polyhedral set} $S$ is a finite union of basic sets -$S = \bigcup_i S_i$, each of which can be represented using affine -constraints -$$ -S_i : \Z^n \to 2^{\Z^d} : \vec s \mapsto -S_i(\vec s) = -\{\, \vec x \in \Z^d \mid \exists \vec z \in \Z^e : -A \vec x + B \vec s + D \vec z + \vec c \geq \vec 0 \,\} -, -$$ -with $A \in \Z^{m \times d}$, -$B \in \Z^{m \times n}$, -$D \in \Z^{m \times e}$ -and $\vec c \in \Z^m$. -\end{definition} - -\begin{definition}[Parameter Domain of a Set] -Let $S \in \Z^n \to 2^{\Z^d}$ be a set. -The {\em parameter domain} of $S$ is the set -$$\pdom S \coloneqq \{\, \vec s \in \Z^n \mid S(\vec s) \ne \emptyset \,\}.$$ -\end{definition} - -\begin{definition}[Polyhedral Relation] -A {\em polyhedral relation}\index{polyhedral relation} -$R$ is a finite union of basic relations -$R = \bigcup_i R_i$ of type -$\Z^n \to 2^{\Z^{d_1+d_2}}$, -each of which can be represented using affine -constraints -$$ -R_i = \vec s \mapsto -R_i(\vec s) = -\{\, \vec x_1 \to \vec x_2 \in \Z^{d_1} \times \Z^{d_2} -\mid \exists \vec z \in \Z^e : -A_1 \vec x_1 + A_2 \vec x_2 + B \vec s + D \vec z + \vec c \geq \vec 0 \,\} -, -$$ -with $A_i \in \Z^{m \times d_i}$, -$B \in \Z^{m \times n}$, -$D \in \Z^{m \times e}$ -and $\vec c \in \Z^m$. -\end{definition} - -\begin{definition}[Parameter Domain of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The {\em parameter domain} of $R$ is the set -$$\pdom R \coloneqq \{\, \vec s \in \Z^n \mid R(\vec s) \ne \emptyset \,\}.$$ -\end{definition} - -\begin{definition}[Domain of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The {\em domain} of $R$ is the polyhedral set -$$\domain R \coloneqq \vec s \mapsto -\{\, \vec x_1 \in \Z^{d_1} \mid \exists \vec x_2 \in \Z^{d_2} : -(\vec x_1, \vec x_2) \in R(\vec s) \,\} -. -$$ -\end{definition} - -\begin{definition}[Range of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The {\em range} of $R$ is the polyhedral set -$$ -\range R \coloneqq \vec s \mapsto -\{\, \vec x_2 \in \Z^{d_2} \mid \exists \vec x_1 \in \Z^{d_1} : -(\vec x_1, \vec x_2) \in R(\vec s) \,\} -. -$$ -\end{definition} - -\begin{definition}[Composition of Relations] -Let $R \in \Z^n \to 2^{\Z^{d_1+d_2}}$ and -$S \in \Z^n \to 2^{\Z^{d_2+d_3}}$ be two relations, -then the composition of -$R$ and $S$ is defined as -$$ -S \circ R \coloneqq -\vec s \mapsto -\{\, \vec x_1 \to \vec x_3 \in \Z^{d_1} \times \Z^{d_3} -\mid \exists \vec x_2 \in \Z^{d_2} : -\vec x_1 \to \vec x_2 \in R(\vec s) \wedge -\vec x_2 \to \vec x_3 \in S(\vec s) -\,\} -. -$$ -\end{definition} - -\begin{definition}[Difference Set of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation. -The difference set ($\Delta \, R$) of $R$ is the set -of differences between image elements and the corresponding -domain elements, -$$ -\diff R \coloneqq -\vec s \mapsto -\{\, \vec \delta \in \Z^{d} \mid \exists \vec x \to \vec y \in R : -\vec \delta = \vec y - \vec x -\,\} -$$ -\end{definition} - -\section{Simple Hull}\label{s:simple hull} - -It is sometimes useful to have a single -basic set or basic relation that contains a given set or relation. -For rational sets, the obvious choice would be to compute the -(rational) convex hull. For integer sets, the obvious choice -would be the integer hull. -However, {\tt isl} currently does not support an integer hull operation -and even if it did, it would be fairly expensive to compute. -The convex hull operation is supported, but it is also fairly -expensive to compute given only an implicit representation. - -Usually, it is not required to compute the exact integer hull, -and an overapproximation of this hull is sufficient. -The ``simple hull'' of a set is such an overapproximation -and it is defined as the (inclusion-wise) smallest basic set -that is described by constraints that are translates of -the constraints in the input set. -This means that the simple hull is relatively cheap to compute -and that the number of constraints in the simple hull is no -larger than the number of constraints in the input. -\begin{definition}[Simple Hull of a Set] -The {\em simple hull} of a set -$S = \bigcup_{1 \le i \le v} S_i$, with -$$ -S : \Z^n \to 2^{\Z^d} : \vec s \mapsto -S(\vec s) = -\left\{\, \vec x \in \Z^d \mid \exists \vec z \in \Z^e : -\bigvee_{1 \le i \le v} -A_i \vec x + B_i \vec s + D_i \vec z + \vec c_i \geq \vec 0 \,\right\} -$$ -is the set -$$ -H : \Z^n \to 2^{\Z^d} : \vec s \mapsto -S(\vec s) = -\left\{\, \vec x \in \Z^d \mid \exists \vec z \in \Z^e : -\bigwedge_{1 \le i \le v} -A_i \vec x + B_i \vec s + D_i \vec z + \vec c_i + \vec K_i \geq \vec 0 -\,\right\} -, -$$ -with $\vec K_i$ the (component-wise) smallest non-negative integer vectors -such that $S \subseteq H$. -\end{definition} -The $\vec K_i$ can be obtained by solving a number of -LP problems, one for each element of each $\vec K_i$. -If any LP problem is unbounded, then the corresponding constraint -is dropped. - -\section{Parametric Integer Programming} - -\subsection{Introduction}\label{s:intro} - -Parametric integer programming \shortcite{Feautrier88parametric} -is used to solve many problems within the context of the polyhedral model. -Here, we are mainly interested in dependence analysis \shortcite{Fea91} -and in computing a unique representation for existentially quantified -variables. The latter operation has been used for counting elements -in sets involving such variables -\shortcite{BouletRe98,Verdoolaege2005experiences} and lies at the core -of the internal representation of {\tt isl}. - -Parametric integer programming was first implemented in \texttt{PipLib}. -An alternative method for parametric integer programming -was later implemented in {\tt barvinok} \cite{barvinok-0.22}. -This method is not based on Feautrier's algorithm, but on rational -generating functions \cite{Woods2003short} and was inspired by the -``digging'' technique of \shortciteN{DeLoera2004Three} for solving -non-parametric integer programming problems. - -In the following sections, we briefly recall the dual simplex -method combined with Gomory cuts and describe some extensions -and optimizations. The main algorithm is applied to a matrix -data structure known as a tableau. In case of parametric problems, -there are two tableaus, one for the main problem and one for -the constraints on the parameters, known as the context tableau. -The handling of the context tableau is described in \autoref{s:context}. - -\subsection{The Dual Simplex Method} - -Tableaus can be represented in several slightly different ways. -In {\tt isl}, the dual simplex method uses the same representation -as that used by its incremental LP solver based on the \emph{primal} -simplex method. The implementation of this LP solver is based -on that of {\tt Simplify} \shortcite{Detlefs2005simplify}, which, in turn, -was derived from the work of \shortciteN{Nelson1980phd}. -In the original \shortcite{Nelson1980phd}, the tableau was implemented -as a sparse matrix, but neither {\tt Simplify} nor the current -implementation of {\tt isl} does so. - -Given some affine constraints on the variables, -$A \vec x + \vec b \ge \vec 0$, the tableau represents the relationship -between the variables $\vec x$ and non-negative variables -$\vec y = A \vec x + \vec b$ corresponding to the constraints. -The initial tableau contains $\begin{pmatrix} -\vec b & A -\end{pmatrix}$ and expresses the constraints $\vec y$ in the rows in terms -of the variables $\vec x$ in the columns. The main operation defined -on a tableau exchanges a column and a row variable and is called a pivot. -During this process, some coefficients may become rational. -As in the \texttt{PipLib} implementation, -{\tt isl} maintains a shared denominator per row. -The sample value of a tableau is one where each column variable is assigned -zero and each row variable is assigned the constant term of the row. -This sample value represents a valid solution if each constraint variable -is assigned a non-negative value, i.e., if the constant terms of -rows corresponding to constraints are all non-negative. - -The dual simplex method starts from an initial sample value that -may be invalid, but that is known to be (lexicographically) no -greater than any solution, and gradually increments this sample value -through pivoting until a valid solution is obtained. -In particular, each pivot exchanges a row variable -$r = -n + \sum_i a_i \, c_i$ with negative -sample value $-n$ with a column variable $c_j$ -such that $a_j > 0$. Since $c_j = (n + r - \sum_{i\ne j} a_i \, c_i)/a_j$, -the new row variable will have a positive sample value $n$. -If no such column can be found, then the problem is infeasible. -By always choosing the column that leads to the (lexicographically) -smallest increment in the variables $\vec x$, -the first solution found is guaranteed to be the (lexicographically) -minimal solution \cite{Feautrier88parametric}. -In order to be able to determine the smallest increment, the tableau -is (implicitly) extended with extra rows defining the original -variables in terms of the column variables. -If we assume that all variables are non-negative, then we know -that the zero vector is no greater than the minimal solution and -then the initial extended tableau looks as follows. -$$ -\begin{tikzpicture} -\matrix (m) [matrix of math nodes] -{ -& {} & 1 & \vec c \\ -\vec x && |(top)| \vec 0 & I \\ -\vec r && \vec b & |(bottom)|A \\ -}; -\begin{pgfonlayer}{background} -\node (core) [inner sep=0pt,fill=black!20,right delimiter=),left delimiter=(,fit=(top)(bottom)] {}; -\end{pgfonlayer} -\end{tikzpicture} -$$ -Each column in this extended tableau is lexicographically positive -and will remain so because of the column choice explained above. -It is then clear that the value of $\vec x$ will increase in each step. -Note that there is no need to store the extra rows explicitly. -If a given $x_i$ is a column variable, then the corresponding row -is the unit vector $e_i$. If, on the other hand, it is a row variable, -then the row already appears somewhere else in the tableau. - -In case of parametric problems, the sign of the constant term -may depend on the parameters. Each time the constant term of a constraint row -changes, we therefore need to check whether the new term can attain -negative and/or positive values over the current set of possible -parameter values, i.e., the context. -If all these terms can only attain non-negative values, the current -state of the tableau represents a solution. If one of the terms -can only attain non-positive values and is not identically zero, -the corresponding row can be pivoted. -Otherwise, we pick one of the terms that can attain both positive -and negative values and split the context into a part where -it only attains non-negative values and a part where it only attains -negative values. - -\subsection{Gomory Cuts} - -The solution found by the dual simplex method may have -non-integral coordinates. If so, some rational solutions -(including the current sample value), can be cut off by -applying a (parametric) Gomory cut. -Let $r = b(\vec p) + \sp {\vec a} {\vec c}$ be the row -corresponding to the first non-integral coordinate of $\vec x$, -with $b(\vec p)$ the constant term, an affine expression in the -parameters $\vec p$, i.e., $b(\vec p) = \sp {\vec f} {\vec p} + g$. -Note that only row variables can attain -non-integral values as the sample value of the column variables is zero. -Consider the expression -$b(\vec p) - \ceil{b(\vec p)} + \sp {\fract{\vec a}} {\vec c}$, -with $\ceil\cdot$ the ceiling function and $\fract\cdot$ the -fractional part. This expression is negative at the sample value -since $\vec c = \vec 0$ and $r = b(\vec p)$ is fractional, i.e., -$\ceil{b(\vec p)} > b(\vec p)$. On the other hand, for each integral -value of $r$ and $\vec c \ge 0$, the expression is non-negative -because $b(\vec p) - \ceil{b(\vec p)} > -1$. -Imposing this expression to be non-negative therefore does not -invalidate any integral solutions, while it does cut away the current -fractional sample value. To be able to formulate this constraint, -a new variable $q = \floor{-b(\vec p)} = - \ceil{b(\vec p)}$ is added -to the context. This integral variable is uniquely defined by the constraints -$0 \le -d \, b(\vec p) - d \, q \le d - 1$, with $d$ the common -denominator of $\vec f$ and $g$. In practice, the variable -$q' = \floor{\sp {\fract{-f}} {\vec p} + \fract{-g}}$ is used instead -and the coefficients of the new constraint are adjusted accordingly. -The sign of the constant term of this new constraint need not be determined -as it is non-positive by construction. -When several of these extra context variables are added, it is important -to avoid adding duplicates. -Recent versions of {\tt PipLib} also check for such duplicates. - -\subsection{Negative Unknowns and Maximization} - -There are two places in the above algorithm where the unknowns $\vec x$ -are assumed to be non-negative: the initial tableau starts from -sample value $\vec x = \vec 0$ and $\vec c$ is assumed to be non-negative -during the construction of Gomory cuts. -To deal with negative unknowns, \shortciteN[Appendix A.2]{Fea91} -proposed to use a ``big parameter'', say $M$, that is taken to be -an arbitrarily large positive number. Instead of looking for the -lexicographically minimal value of $\vec x$, we search instead -for the lexicographically minimal value of $\vec x' = \vec M + \vec x$. -The sample value $\vec x' = \vec 0$ of the initial tableau then -corresponds to $\vec x = -\vec M$, which is clearly not greater than -any potential solution. The sign of the constant term of a row -is determined lexicographically, with the coefficient of $M$ considered -first. That is, if the coefficient of $M$ is not zero, then its sign -is the sign of the entire term. Otherwise, the sign is determined -by the remaining affine expression in the parameters. -If the original problem has a bounded optimum, then the final sample -value will be of the form $\vec M + \vec v$ and the optimal value -of the original problem is then $\vec v$. -Maximization problems can be handled in a similar way by computing -the minimum of $\vec M - \vec x$. - -When the optimum is unbounded, the optimal value computed for -the original problem will involve the big parameter. -In the original implementation of {\tt PipLib}, the big parameter could -even appear in some of the extra variables $\vec q$ created during -the application of a Gomory cut. The final result could then contain -implicit conditions on the big parameter through conditions on such -$\vec q$ variables. This problem was resolved in later versions -of {\tt PipLib} by taking $M$ to be divisible by any positive number. -The big parameter can then never appear in any $\vec q$ because -$\fract {\alpha M } = 0$. It should be noted, though, that an unbounded -problem usually (but not always) -indicates an incorrect formulation of the problem. - -The original version of {\tt PipLib} required the user to ``manually'' -add a big parameter, perform the reformulation and interpret the result -\shortcite{Feautrier02}. Recent versions allow the user to simply -specify that the unknowns may be negative or that the maximum should -be computed and then these transformations are performed internally. -Although there are some application, e.g., -that of \shortciteN{Feautrier92multi}, -where it is useful to have explicit control over the big parameter, -negative unknowns and maximization are by far the most common applications -of the big parameter and we believe that the user should not be bothered -with such implementation issues. -The current version of {\tt isl} therefore does not -provide any interface for specifying big parameters. Instead, the user -can specify whether a maximum needs to be computed and no assumptions -are made on the sign of the unknowns. Instead, the sign of the unknowns -is checked internally and a big parameter is automatically introduced when -needed. For compatibility with {\tt PipLib}, the {\tt isl\_pip} tool -does explicitly add non-negativity constraints on the unknowns unless -the \verb+Urs_unknowns+ option is specified. -Currently, there is also no way in {\tt isl} of expressing a big -parameter in the output. Even though -{\tt isl} makes the same divisibility assumption on the big parameter -as recent versions of {\tt PipLib}, it will therefore eventually -produce an error if the problem turns out to be unbounded. - -\subsection{Preprocessing} - -In this section, we describe some transformations that are -or can be applied in advance to reduce the running time -of the actual dual simplex method with Gomory cuts. - -\subsubsection{Feasibility Check and Detection of Equalities} - -Experience with the original {\tt PipLib} has shown that Gomory cuts -do not perform very well on problems that are (non-obviously) empty, -i.e., problems with rational solutions, but no integer solutions. -In {\tt isl}, we therefore first perform a feasibility check on -the original problem considered as a non-parametric problem -over the combined space of unknowns and parameters. -In fact, we do not simply check the feasibility, but we also -check for implicit equalities among the integer points by computing -the integer affine hull. The algorithm used is the same as that -described in \autoref{s:GBR} below. -Computing the affine hull is fairly expensive, but it can -bring huge benefits if any equalities can be found or if the problem -turns out to be empty. - -\subsubsection{Constraint Simplification} - -If the coefficients of the unknown and parameters in a constraint -have a common factor, then this factor should be removed, possibly -rounding down the constant term. For example, the constraint -$2 x - 5 \ge 0$ should be simplified to $x - 3 \ge 0$. -{\tt isl} performs such simplifications on all sets and relations. -Recent versions of {\tt PipLib} also perform this simplification -on the input. - -\subsubsection{Exploiting Equalities}\label{s:equalities} - -If there are any (explicit) equalities in the input description, -{\tt PipLib} converts each into a pair of inequalities. -It is also possible to write $r$ equalities as $r+1$ inequalities -\shortcite{Feautrier02}, but it is even better to \emph{exploit} the -equalities to reduce the dimensionality of the problem. -Given an equality involving at least one unknown, we pivot -the row corresponding to the equality with the column corresponding -to the last unknown with non-zero coefficient. The new column variable -can then be removed completely because it is identically zero, -thereby reducing the dimensionality of the problem by one. -The last unknown is chosen to ensure that the columns of the initial -tableau remain lexicographically positive. In particular, if -the equality is of the form $b + \sum_{i \le j} a_i \, x_i = 0$ with -$a_j \ne 0$, then the (implicit) top rows of the initial tableau -are changed as follows -$$ -\begin{tikzpicture} -\matrix [matrix of math nodes] -{ - & {} & |(top)| 0 & I_1 & |(j)| & \\ -j && 0 & & 1 & \\ - && 0 & & & |(bottom)|I_2 \\ -}; -\node[overlay,above=2mm of j,anchor=south]{j}; -\begin{pgfonlayer}{background} -\node (m) [inner sep=0pt,fill=black!20,right delimiter=),left delimiter=(,fit=(top)(bottom)] {}; -\end{pgfonlayer} -\begin{scope}[xshift=4cm] -\matrix [matrix of math nodes] -{ - & {} & |(top)| 0 & I_1 & \\ -j && |(left)| -b/a_j & -a_i/a_j & \\ - && 0 & & |(bottom)|I_2 \\ -}; -\begin{pgfonlayer}{background} -\node (m2) [inner sep=0pt,fill=black!20,right delimiter=),left delimiter=(,fit=(top)(bottom)(left)] {}; -\end{pgfonlayer} -\end{scope} - \draw [shorten >=7mm,-to,thick,decorate, - decoration={snake,amplitude=.4mm,segment length=2mm, - pre=moveto,pre length=5mm,post length=8mm}] - (m) -- (m2); -\end{tikzpicture} -$$ -Currently, {\tt isl} also eliminates equalities involving only parameters -in a similar way, provided at least one of the coefficients is equal to one. -The application of parameter compression (see below) -would obviate the need for removing parametric equalities. - -\subsubsection{Offline Symmetry Detection}\label{s:offline} - -Some problems, notably those of \shortciteN{Bygde2010licentiate}, -have a collection of constraints, say -$b_i(\vec p) + \sp {\vec a} {\vec x} \ge 0$, -that only differ in their (parametric) constant terms. -These constant terms will be non-negative on different parts -of the context and this context may have to be split for each -of the constraints. In the worst case, the basic algorithm may -have to consider all possible orderings of the constant terms. -Instead, {\tt isl} introduces a new parameter, say $u$, and -replaces the collection of constraints by the single -constraint $u + \sp {\vec a} {\vec x} \ge 0$ along with -context constraints $u \le b_i(\vec p)$. -Any solution to the new system is also a solution -to the original system since -$\sp {\vec a} {\vec x} \ge -u \ge -b_i(\vec p)$. -Conversely, $m = \min_i b_i(\vec p)$ satisfies the constraints -on $u$ and therefore extends a solution to the new system. -It can also be plugged into a new solution. -See \autoref{s:post} for how this substitution is currently performed -in {\tt isl}. -The method described in this section can only detect symmetries -that are explicitly available in the input. -See \autoref{s:online} for the detection -and exploitation of symmetries that appear during the course of -the dual simplex method. - -\subsubsection{Parameter Compression}\label{s:compression} - -It may in some cases be apparent from the equalities in the problem -description that there can only be a solution for a sublattice -of the parameters. In such cases ``parameter compression'' -\shortcite{Meister2004PhD,Meister2008} can be used to replace -the parameters by alternative ``dense'' parameters. -For example, if there is a constraint $2x = n$, then the system -will only have solutions for even values of $n$ and $n$ can be replaced -by $2n'$. Similarly, the parameters $n$ and $m$ in a system with -the constraint $2n = 3m$ can be replaced by a single parameter $n'$ -with $n=3n'$ and $m=2n'$. -It is also possible to perform a similar compression on the unknowns, -but it would be more complicated as the compression would have to -preserve the lexicographical order. Moreover, due to our handling -of equalities described above there should be -no need for such variable compression. -Although parameter compression has been implemented in {\tt isl}, -it is currently not yet used during parametric integer programming. - -\subsection{Postprocessing}\label{s:post} - -The output of {\tt PipLib} is a quast (quasi-affine selection tree). -Each internal node in this tree corresponds to a split of the context -based on a parametric constant term in the main tableau with indeterminate -sign. Each of these nodes may introduce extra variables in the context -corresponding to integer divisions. Each leaf of the tree prescribes -the solution in that part of the context that satisfies all the conditions -on the path leading to the leaf. -Such a quast is a very economical way of representing the solution, but -it would not be suitable as the (only) internal representation of -sets and relations in {\tt isl}. Instead, {\tt isl} represents -the constraints of a set or relation in disjunctive normal form. -The result of a parametric integer programming problem is then also -converted to this internal representation. Unfortunately, the conversion -to disjunctive normal form can lead to an explosion of the size -of the representation. -In some cases, this overhead would have to be paid anyway in subsequent -operations, but in other cases, especially for outside users that just -want to solve parametric integer programming problems, we would like -to avoid this overhead in future. That is, we are planning on introducing -quasts or a related representation as one of several possible internal -representations and on allowing the output of {\tt isl\_pip} to optionally -be printed as a quast. - -Currently, {\tt isl} also does not have an internal representation -for expressions such as $\min_i b_i(\vec p)$ from the offline -symmetry detection of \autoref{s:offline}. -Assume that one of these expressions has $n$ bounds $b_i(\vec p)$. -If the expression -does not appear in the affine expression describing the solution, -but only in the constraints, and if moreover, the expression -only appears with a positive coefficient, i.e., -$\min_i b_i(\vec p) \ge f_j(\vec p)$, then each of these constraints -can simply be reduplicated $n$ times, once for each of the bounds. -Otherwise, a conversion to disjunctive normal form -leads to $n$ cases, each described as $u = b_i(\vec p)$ with constraints -$b_i(\vec p) \le b_j(\vec p)$ for $j > i$ -and -$b_i(\vec p) < b_j(\vec p)$ for $j < i$. -Note that even though this conversion leads to a size increase -by a factor of $n$, not detecting the symmetry could lead to -an increase by a factor of $n!$ if all possible orderings end up being -considered. - -\subsection{Context Tableau}\label{s:context} - -The main operation that a context tableau needs to provide is a test -on the sign of an affine expression over the elements of the context. -This sign can be determined by solving two integer linear feasibility -problems, one with a constraint added to the context that enforces -the expression to be non-negative and one where the expression is -negative. As already mentioned by \shortciteN{Feautrier88parametric}, -any integer linear feasibility solver could be used, but the {\tt PipLib} -implementation uses a recursive call to the dual simplex with Gomory -cuts algorithm to determine the feasibility of a context. -In {\tt isl}, two ways of handling the context have been implemented, -one that performs the recursive call and one, used by default, that -uses generalized basis reduction. -We start with some optimizations that are shared between the two -implementations and then discuss additional details of each of them. - -\subsubsection{Maintaining Witnesses}\label{s:witness} - -A common feature of both integer linear feasibility solvers is that -they will not only say whether a set is empty or not, but if the set -is non-empty, they will also provide a \emph{witness} for this result, -i.e., a point that belongs to the set. By maintaining a list of such -witnesses, we can avoid many feasibility tests during the determination -of the signs of affine expressions. In particular, if the expression -evaluates to a positive number on some of these points and to a negative -number on some others, then no feasibility test needs to be performed. -If all the evaluations are non-negative, we only need to check for the -possibility of a negative value and similarly in case of all -non-positive evaluations. Finally, in the rare case that all points -evaluate to zero or at the start, when no points have been collected yet, -one or two feasibility tests need to be performed depending on the result -of the first test. - -When a new constraint is added to the context, the points that -violate the constraint are temporarily removed. They are reconsidered -when we backtrack over the addition of the constraint, as they will -satisfy the negation of the constraint. It is only when we backtrack -over the addition of the points that they are finally removed completely. -When an extra integer division is added to the context, -the new coordinates of the -witnesses can easily be computed by evaluating the integer division. -The idea of keeping track of witnesses was first used in {\tt barvinok}. - -\subsubsection{Choice of Constant Term on which to Split} - -Recall that if there are no rows with a non-positive constant term, -but there are rows with an indeterminate sign, then the context -needs to be split along the constant term of one of these rows. -If there is more than one such row, then we need to choose which row -to split on first. {\tt PipLib} uses a heuristic based on the (absolute) -sizes of the coefficients. In particular, it takes the largest coefficient -of each row and then selects the row where this largest coefficient is smaller -than those of the other rows. - -In {\tt isl}, we take that row for which non-negativity of its constant -term implies non-negativity of as many of the constant terms of the other -rows as possible. The intuition behind this heuristic is that on the -positive side, we will have fewer negative and indeterminate signs, -while on the negative side, we need to perform a pivot, which may -affect any number of rows meaning that the effect on the signs -is difficult to predict. This heuristic is of course much more -expensive to evaluate than the heuristic used by {\tt PipLib}. -More extensive tests are needed to evaluate whether the heuristic is worthwhile. - -\subsubsection{Dual Simplex + Gomory Cuts} - -When a new constraint is added to the context, the first steps -of the dual simplex method applied to this new context will be the same -or at least very similar to those taken on the original context, i.e., -before the constraint was added. In {\tt isl}, we therefore apply -the dual simplex method incrementally on the context and backtrack -to a previous state when a constraint is removed again. -An initial implementation that was never made public would also -keep the Gomory cuts, but the current implementation backtracks -to before the point where Gomory cuts are added before adding -an extra constraint to the context. -Keeping the Gomory cuts has the advantage that the sample value -is always an integer point and that this point may also satisfy -the new constraint. However, due to the technique of maintaining -witnesses explained above, -we would not perform a feasibility test in such cases and then -the previously added cuts may be redundant, possibly resulting -in an accumulation of a large number of cuts. - -If the parameters may be negative, then the same big parameter trick -used in the main tableau is applied to the context. This big parameter -is of course unrelated to the big parameter from the main tableau. -Note that it is not a requirement for this parameter to be ``big'', -but it does allow for some code reuse in {\tt isl}. -In {\tt PipLib}, the extra parameter is not ``big'', but this may be because -the big parameter of the main tableau also appears -in the context tableau. - -Finally, it was reported by \shortciteN{Galea2009personal}, who -worked on a parametric integer programming implementation -in {\tt PPL} \shortcite{PPL}, -that it is beneficial to add cuts for \emph{all} rational coordinates -in the context tableau. Based on this report, -the initial {\tt isl} implementation was adapted accordingly. - -\subsubsection{Generalized Basis Reduction}\label{s:GBR} - -The default algorithm used in {\tt isl} for feasibility checking -is generalized basis reduction \shortcite{Cook1991implementation}. -This algorithm is also used in the {\tt barvinok} implementation. -The algorithm is fairly robust, but it has some overhead. -We therefore try to avoid calling the algorithm in easy cases. -In particular, we incrementally keep track of points for which -the entire unit hypercube positioned at that point lies in the context. -This set is described by translates of the constraints of the context -and if (rationally) non-empty, any rational point -in the set can be rounded up to yield an integer point in the context. - -A restriction of the algorithm is that it only works on bounded sets. -The affine hull of the recession cone therefore needs to be projected -out first. As soon as the algorithm is invoked, we then also -incrementally keep track of this recession cone. The reduced basis -found by one call of the algorithm is also reused as initial basis -for the next call. - -Some problems lead to the -introduction of many integer divisions. Within a given context, -some of these integer divisions may be equal to each other, even -if the expressions are not identical, or they may be equal to some -affine combination of other variables. -To detect such cases, we compute the affine hull of the context -each time a new integer division is added. The algorithm used -for computing this affine hull is that of \shortciteN{Karr1976affine}, -while the points used in this algorithm are obtained by performing -integer feasibility checks on that part of the context outside -the current approximation of the affine hull. -The list of witnesses is used to construct an initial approximation -of the hull, while any extra points found during the construction -of the hull is added to this list. -Any equality found in this way that expresses an integer division -as an \emph{integer} affine combination of other variables is -propagated to the main tableau, where it is used to eliminate that -integer division. - -\subsection{Experiments} - -\autoref{t:comparison} compares the execution times of {\tt isl} -(with both types of context tableau) -on some more difficult instances to those of other tools, -run on an Intel Xeon W3520 @ 2.66GHz. -Easier problems such as the -test cases distributed with {\tt Pip\-Lib} can be solved so quickly -that we would only be measuring overhead such as input/output and conversions -and not the running time of the actual algorithm. -We compare the following versions: -{\tt piplib-1.4.0-5-g0132fd9}, -{\tt barvinok-0.32.1-73-gc5d7751}, -{\tt isl-0.05.1-82-g3a37260} -and {\tt PPL} version 0.11.2. - -The first test case is the following dependence analysis problem -originating from the Phideo project \shortcite{Verhaegh1995PhD} -that was communicated to us by Bart Kienhuis: -\begin{lstlisting}[flexiblecolumns=true,breaklines=true]{} -lexmax { [j1,j2] -> [i1,i2,i3,i4,i5,i6,i7,i8,i9,i10] : 1 <= i1,j1 <= 8 and 1 <= i2,i3,i4,i5,i6,i7,i8,i9,i10 <= 2 and 1 <= j2 <= 128 and i1-1 = j1-1 and i2-1+2*i3-2+4*i4-4+8*i5-8+16*i6-16+32*i7-32+64*i8-64+128*i9-128+256*i10-256=3*j2-3+66 }; -\end{lstlisting} -This problem was the main inspiration -for some of the optimizations in \autoref{s:GBR}. -The second group of test cases are projections used during counting. -The first nine of these come from \shortciteN{Seghir2006minimizing}. -The remaining two come from \shortciteN{Verdoolaege2005experiences} and -were used to drive the first, Gomory cuts based, implementation -in {\tt isl}. -The third and final group of test cases are borrowed from -\shortciteN{Bygde2010licentiate} and inspired the offline symmetry detection -of \autoref{s:offline}. Without symmetry detection, the running times -are 11s and 5.9s. -All running times of {\tt barvinok} and {\tt isl} include a conversion -to disjunctive normal form. Without this conversion, the final two -cases can be solved in 0.07s and 0.21s. -The {\tt PipLib} implementation has some fixed limits and will -sometimes report the problem to be too complex (TC), while on some other -problems it will run out of memory (OOM). -The {\tt barvinok} implementation does not support problems -with a non-trivial lineality space (line) nor maximization problems (max). -The Gomory cuts based {\tt isl} implementation was terminated after 1000 -minutes on the first problem. The gbr version introduces some -overhead on some of the easier problems, but is overall the clear winner. - -\begin{table} -\begin{center} -\begin{tabular}{lrrrrr} - & {\tt PipLib} & {\tt barvinok} & {\tt isl} cut & {\tt isl} gbr & {\tt PPL} \\ -\hline -\hline -% bart.pip -Phideo & TC & 793m & $>$999m & 2.7s & 372m \\ -\hline -e1 & 0.33s & 3.5s & 0.08s & 0.11s & 0.18s \\ -e3 & 0.14s & 0.13s & 0.10s & 0.10s & 0.17s \\ -e4 & 0.24s & 9.1s & 0.09s & 0.11s & 0.70s \\ -e5 & 0.12s & 6.0s & 0.06s & 0.14s & 0.17s \\ -e6 & 0.10s & 6.8s & 0.17s & 0.08s & 0.21s \\ -e7 & 0.03s & 0.27s & 0.04s & 0.04s & 0.03s \\ -e8 & 0.03s & 0.18s & 0.03s & 0.04s & 0.01s \\ -e9 & OOM & 70m & 2.6s & 0.94s & 22s \\ -vd & 0.04s & 0.10s & 0.03s & 0.03s & 0.03s \\ -bouleti & 0.25s & line & 0.06s & 0.06s & 0.15s \\ -difficult & OOM & 1.3s & 1.7s & 0.33s & 1.4s \\ -\hline -cnt/sum & TC & max & 2.2s & 2.2s & OOM \\ -jcomplex & TC & max & 3.7s & 3.9s & OOM \\ -\end{tabular} -\caption{Comparison of Execution Times} -\label{t:comparison} -\end{center} -\end{table} - -\subsection{Online Symmetry Detection}\label{s:online} - -Manual experiments on small instances of the problems of -\shortciteN{Bygde2010licentiate} and an analysis of the results -by the approximate MPA method developed by \shortciteN{Bygde2010licentiate} -have revealed that these problems contain many more symmetries -than can be detected using the offline method of \autoref{s:offline}. -In this section, we present an online detection mechanism that has -not been implemented yet, but that has shown promising results -in manual applications. - -Let us first consider what happens when we do not perform offline -symmetry detection. At some point, one of the -$b_i(\vec p) + \sp {\vec a} {\vec x} \ge 0$ constraints, -say the $j$th constraint, appears as a column -variable, say $c_1$, while the other constraints are represented -as rows of the form $b_i(\vec p) - b_j(\vec p) + c$. -The context is then split according to the relative order of -$b_j(\vec p)$ and one of the remaining $b_i(\vec p)$. -The offline method avoids this split by replacing all $b_i(\vec p)$ -by a single newly introduced parameter that represents the minimum -of these $b_i(\vec p)$. -In the online method the split is similarly avoided by the introduction -of a new parameter. In particular, a new parameter is introduced -that represents -$\left| b_j(\vec p) - b_i(\vec p) \right|_+ = -\max(b_j(\vec p) - b_i(\vec p), 0)$. - -In general, let $r = b(\vec p) + \sp {\vec a} {\vec c}$ be a row -of the tableau such that the sign of $b(\vec p)$ is indeterminate -and such that exactly one of the elements of $\vec a$ is a $1$, -while all remaining elements are non-positive. -That is, $r = b(\vec p) + c_j - f$ with $f = -\sum_{i\ne j} a_i c_i \ge 0$. -We introduce a new parameter $t$ with -context constraints $t \ge -b(\vec p)$ and $t \ge 0$ and replace -the column variable $c_j$ by $c' + t$. The row $r$ is now equal -to $b(\vec p) + t + c' - f$. The constant term of this row is always -non-negative because any negative value of $b(\vec p)$ is compensated -by $t \ge -b(\vec p)$ while and non-negative value remains non-negative -because $t \ge 0$. - -We need to show that this transformation does not eliminate any valid -solutions and that it does not introduce any spurious solutions. -Given a valid solution for the original problem, we need to find -a non-negative value of $c'$ satisfying the constraints. -If $b(\vec p) \ge 0$, we can take $t = 0$ so that -$c' = c_j - t = c_j \ge 0$. -If $b(\vec p) < 0$, we can take $t = -b(\vec p)$. -Since $r = b(\vec p) + c_j - f \ge 0$ and $f \ge 0$, we have -$c' = c_j + b(\vec p) \ge 0$. -Note that these choices amount to plugging in -$t = \left|-b(\vec p)\right|_+ = \max(-b(\vec p), 0)$. -Conversely, given a solution to the new problem, we need to find -a non-negative value of $c_j$, but this is easy since $c_j = c' + t$ -and both of these are non-negative. - -Plugging in $t = \max(-b(\vec p), 0)$ can be performed as in -\autoref{s:post}, but, as in the case of offline symmetry detection, -it may be better to provide a direct representation for such -expressions in the internal representation of sets and relations -or at least in a quast-like output format. - -\section{Coalescing}\label{s:coalescing} - -See \shortciteN{Verdoolaege2009isl}, for now. -More details will be added later. - -\section{Transitive Closure} - -\subsection{Introduction} - -\begin{definition}[Power of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation and -$k \in \Z_{\ge 1}$ -a positive number, then power $k$ of relation $R$ is defined as -\begin{equation} -\label{eq:transitive:power} -R^k \coloneqq -\begin{cases} -R & \text{if $k = 1$} -\\ -R \circ R^{k-1} & \text{if $k \ge 2$} -. -\end{cases} -\end{equation} -\end{definition} - -\begin{definition}[Transitive Closure of a Relation] -Let $R \in \Z^n \to 2^{\Z^{d+d}}$ be a relation, -then the transitive closure $R^+$ of $R$ is the union -of all positive powers of $R$, -$$ -R^+ \coloneqq \bigcup_{k \ge 1} R^k -. -$$ -\end{definition} -Alternatively, the transitive closure may be defined -inductively as -\begin{equation} -\label{eq:transitive:inductive} -R^+ \coloneqq R \cup \left(R \circ R^+\right) -. -\end{equation} - -Since the transitive closure of a polyhedral relation -may no longer be a polyhedral relation \shortcite{Kelly1996closure}, -we can, in the general case, only compute an approximation -of the transitive closure. -Whereas \shortciteN{Kelly1996closure} compute underapproximations, -we, like \shortciteN{Beletska2009}, compute overapproximations. -That is, given a relation $R$, we will compute a relation $T$ -such that $R^+ \subseteq T$. Of course, we want this approximation -to be as close as possible to the actual transitive closure -$R^+$ and we want to detect the cases where the approximation is -exact, i.e., where $T = R^+$. - -For computing an approximation of the transitive closure of $R$, -we follow the same general strategy as \shortciteN{Beletska2009} -and first compute an approximation of $R^k$ for $k \ge 1$ and then project -out the parameter $k$ from the resulting relation. - -\begin{example} -As a trivial example, consider the relation -$R = \{\, x \to x + 1 \,\}$. The $k$th power of this map -for arbitrary $k$ is -$$ -R^k = k \mapsto \{\, x \to x + k \mid k \ge 1 \,\} -. -$$ -The transitive closure is then -$$ -\begin{aligned} -R^+ & = \{\, x \to y \mid \exists k \in \Z_{\ge 1} : y = x + k \,\} -\\ -& = \{\, x \to y \mid y \ge x + 1 \,\} -. -\end{aligned} -$$ -\end{example} - -\subsection{Computing an Approximation of $R^k$} -\label{s:power} - -There are some special cases where the computation of $R^k$ is very easy. -One such case is that where $R$ does not compose with itself, -i.e., $R \circ R = \emptyset$ or $\domain R \cap \range R = \emptyset$. -In this case, $R^k$ is only non-empty for $k=1$ where it is equal -to $R$ itself. - -In general, it is impossible to construct a closed form -of $R^k$ as a polyhedral relation. -We will therefore need to make some approximations. -As a first approximations, we will consider each of the basic -relations in $R$ as simply adding one or more offsets to a domain element -to arrive at an image element and ignore the fact that some of these -offsets may only be applied to some of the domain elements. -That is, we will only consider the difference set $\Delta\,R$ of the relation. -In particular, we will first construct a collection $P$ of paths -that move through -a total of $k$ offsets and then intersect domain and range of this -collection with those of $R$. -That is, -\begin{equation} -\label{eq:transitive:approx} -K = P \cap \left(\domain R \to \range R\right) -, -\end{equation} -with -\begin{equation} -\label{eq:transitive:path} -P = \vec s \mapsto \{\, \vec x \to \vec y \mid -\exists k_i \in \Z_{\ge 0}, \vec\delta_i \in k_i \, \Delta_i(\vec s) : -\vec y = \vec x + \sum_i \vec\delta_i -\wedge -\sum_i k_i = k > 0 -\,\} -\end{equation} -and with $\Delta_i$ the basic sets that compose -the difference set $\Delta\,R$. -Note that the number of basic sets $\Delta_i$ need not be -the same as the number of basic relations in $R$. -Also note that since addition is commutative, it does not -matter in which order we add the offsets and so we are allowed -to group them as we did in \eqref{eq:transitive:path}. - -If all the $\Delta_i$s are singleton sets -$\Delta_i = \{\, \vec \delta_i \,\}$ with $\vec \delta_i \in \Z^d$, -then \eqref{eq:transitive:path} simplifies to -\begin{equation} -\label{eq:transitive:singleton} -P = \{\, \vec x \to \vec y \mid -\exists k_i \in \Z_{\ge 0} : -\vec y = \vec x + \sum_i k_i \, \vec \delta_i -\wedge -\sum_i k_i = k > 0 -\,\} -\end{equation} -and then the approximation computed in \eqref{eq:transitive:approx} -is essentially the same as that of \shortciteN{Beletska2009}. -If some of the $\Delta_i$s are not singleton sets or if -some of $\vec \delta_i$s are parametric, then we need -to resort to further approximations. - -To ease both the exposition and the implementation, we will for -the remainder of this section work with extended offsets -$\Delta_i' = \Delta_i \times \{\, 1 \,\}$. -That is, each offset is extended with an extra coordinate that is -set equal to one. The paths constructed by summing such extended -offsets have the length encoded as the difference of their -final coordinates. The path $P'$ can then be decomposed into -paths $P_i'$, one for each $\Delta_i$, -\begin{equation} -\label{eq:transitive:decompose} -P' = \left( -(P_m' \cup \identity) \circ \cdots \circ -(P_2' \cup \identity) \circ -(P_1' \cup \identity) -\right) \cap -\{\, -\vec x' \to \vec y' \mid y_{d+1} - x_{d+1} = k > 0 -\,\} -, -\end{equation} -with -$$ -P_i' = \vec s \mapsto \{\, \vec x' \to \vec y' \mid -\exists k \in \Z_{\ge 1}, \vec \delta \in k \, \Delta_i'(\vec s) : -\vec y' = \vec x' + \vec \delta -\,\} -. -$$ -Note that each $P_i'$ contains paths of length at least one. -We therefore need to take the union with the identity relation -when composing the $P_i'$s to allow for paths that do not contain -any offsets from one or more $\Delta_i'$. -The path that consists of only identity relations is removed -by imposing the constraint $y_{d+1} - x_{d+1} > 0$. -Taking the union with the identity relation means that -that the relations we compose in \eqref{eq:transitive:decompose} -each consist of two basic relations. If there are $m$ -disjuncts in the input relation, then a direct application -of the composition operation may therefore result in a relation -with $2^m$ disjuncts, which is prohibitively expensive. -It is therefore crucial to apply coalescing (\autoref{s:coalescing}) -after each composition. - -Let us now consider how to compute an overapproximation of $P_i'$. -Those that correspond to singleton $\Delta_i$s are grouped together -and handled as in \eqref{eq:transitive:singleton}. -Note that this is just an optimization. The procedure described -below would produce results that are at least as accurate. -For simplicity, we first assume that no constraint in $\Delta_i'$ -involves any existentially quantified variables. -We will return to existentially quantified variables at the end -of this section. -Without existentially quantified variables, we can classify -the constraints of $\Delta_i'$ as follows -\begin{enumerate} -\item non-parametric constraints -\begin{equation} -\label{eq:transitive:non-parametric} -A_1 \vec x + \vec c_1 \geq \vec 0 -\end{equation} -\item purely parametric constraints -\begin{equation} -\label{eq:transitive:parametric} -B_2 \vec s + \vec c_2 \geq \vec 0 -\end{equation} -\item negative mixed constraints -\begin{equation} -\label{eq:transitive:mixed} -A_3 \vec x + B_3 \vec s + \vec c_3 \geq \vec 0 -\end{equation} -such that for each row $j$ and for all $\vec s$, -$$ -\Delta_i'(\vec s) \cap -\{\, \vec \delta' \mid B_{3,j} \vec s + c_{3,j} > 0 \,\} -= \emptyset -$$ -\item positive mixed constraints -$$ -A_4 \vec x + B_4 \vec s + \vec c_4 \geq \vec 0 -$$ -such that for each row $j$, there is at least one $\vec s$ such that -$$ -\Delta_i'(\vec s) \cap -\{\, \vec \delta' \mid B_{4,j} \vec s + c_{4,j} > 0 \,\} -\ne \emptyset -$$ -\end{enumerate} -We will use the following approximation $Q_i$ for $P_i'$: -\begin{equation} -\label{eq:transitive:Q} -\begin{aligned} -Q_i = \vec s \mapsto -\{\, -\vec x' \to \vec y' -\mid {} & \exists k \in \Z_{\ge 1}, \vec f \in \Z^d : -\vec y' = \vec x' + (\vec f, k) -\wedge {} -\\ -& -A_1 \vec f + k \vec c_1 \geq \vec 0 -\wedge -B_2 \vec s + \vec c_2 \geq \vec 0 -\wedge -A_3 \vec f + B_3 \vec s + \vec c_3 \geq \vec 0 -\,\} -. -\end{aligned} -\end{equation} -To prove that $Q_i$ is indeed an overapproximation of $P_i'$, -we need to show that for every $\vec s \in \Z^n$, for every -$k \in \Z_{\ge 1}$ and for every $\vec f \in k \, \Delta_i(\vec s)$ -we have that -$(\vec f, k)$ satisfies the constraints in \eqref{eq:transitive:Q}. -If $\Delta_i(\vec s)$ is non-empty, then $\vec s$ must satisfy -the constraints in \eqref{eq:transitive:parametric}. -Each element $(\vec f, k) \in k \, \Delta_i'(\vec s)$ is a sum -of $k$ elements $(\vec f_j, 1)$ in $\Delta_i'(\vec s)$. -Each of these elements satisfies the constraints in -\eqref{eq:transitive:non-parametric}, i.e., -$$ -\left[ -\begin{matrix} -A_1 & \vec c_1 -\end{matrix} -\right] -\left[ -\begin{matrix} -\vec f_j \\ 1 -\end{matrix} -\right] -\ge \vec 0 -. -$$ -The sum of these elements therefore satisfies the same set of inequalities, -i.e., $A_1 \vec f + k \vec c_1 \geq \vec 0$. -Finally, the constraints in \eqref{eq:transitive:mixed} are such -that for any $\vec s$ in the parameter domain of $\Delta$, -we have $-\vec r(\vec s) \coloneqq B_3 \vec s + \vec c_3 \le \vec 0$, -i.e., $A_3 \vec f_j \ge \vec r(\vec s) \ge \vec 0$ -and therefore also $A_3 \vec f \ge \vec r(\vec s)$. -Note that if there are no mixed constraints and if the -rational relaxation of $\Delta_i(\vec s)$, i.e., -$\{\, \vec x \in \Q^d \mid A_1 \vec x + \vec c_1 \ge \vec 0\,\}$, -has integer vertices, then the approximation is exact, i.e., -$Q_i = P_i'$. In this case, the vertices of $\Delta'_i(\vec s)$ -generate the rational cone -$\{\, \vec x' \in \Q^{d+1} \mid \left[ -\begin{matrix} -A_1 & \vec c_1 -\end{matrix} -\right] \vec x' \,\}$ and therefore $\Delta'_i(\vec s)$ is -a Hilbert basis of this cone \shortcite[Theorem~16.4]{Schrijver1986}. - -Note however that, as pointed out by \shortciteN{DeSmet2010personal}, -if there \emph{are} any mixed constraints, then the above procedure may -not compute the most accurate affine approximation of -$k \, \Delta_i(\vec s)$ with $k \ge 1$. -In particular, we only consider the negative mixed constraints that -happen to appear in the description of $\Delta_i(\vec s)$, while we -should instead consider \emph{all} valid such constraints. -It is also sufficient to consider those constraints because any -constraint that is valid for $k \, \Delta_i(\vec s)$ is also -valid for $1 \, \Delta_i(\vec s) = \Delta_i(\vec s)$. -Take therefore any constraint -$\spv a x + \spv b s + c \ge 0$ valid for $\Delta_i(\vec s)$. -This constraint is also valid for $k \, \Delta_i(\vec s)$ iff -$k \, \spv a x + \spv b s + c \ge 0$. -If $\spv b s + c$ can attain any positive value, then $\spv a x$ -may be negative for some elements of $\Delta_i(\vec s)$. -We then have $k \, \spv a x < \spv a x$ for $k > 1$ and so the constraint -is not valid for $k \, \Delta_i(\vec s)$. -We therefore need to impose $\spv b s + c \le 0$ for all values -of $\vec s$ such that $\Delta_i(\vec s)$ is non-empty, i.e., -$\vec b$ and $c$ need to be such that $- \spv b s - c \ge 0$ is a valid -constraint of $\Delta_i(\vec s)$. That is, $(\vec b, c)$ are the opposites -of the coefficients of a valid constraint of $\Delta_i(\vec s)$. -The approximation of $k \, \Delta_i(\vec s)$ can therefore be obtained -using three applications of Farkas' lemma. The first obtains the coefficients -of constraints valid for $\Delta_i(\vec s)$. The second obtains -the coefficients of constraints valid for the projection of $\Delta_i(\vec s)$ -onto the parameters. The opposite of the second set is then computed -and intersected with the first set. The result is the set of coefficients -of constraints valid for $k \, \Delta_i(\vec s)$. A final application -of Farkas' lemma is needed to obtain the approximation of -$k \, \Delta_i(\vec s)$ itself. - -\begin{example} -Consider the relation -$$ -n \to \{\, (x, y) \to (1 + x, 1 - n + y) \mid n \ge 2 \,\} -. -$$ -The difference set of this relation is -$$ -\Delta = n \to \{\, (1, 1 - n) \mid n \ge 2 \,\} -. -$$ -Using our approach, we would only consider the mixed constraint -$y - 1 + n \ge 0$, leading to the following approximation of the -transitive closure: -$$ -n \to \{\, (x, y) \to (o_0, o_1) \mid n \ge 2 \wedge o_1 \le 1 - n + y \wedge o_0 \ge 1 + x \,\} -. -$$ -If, instead, we apply Farkas's lemma to $\Delta$, i.e., -\begin{verbatim} -D := [n] -> { [1, 1 - n] : n >= 2 }; -CD := coefficients D; -CD; -\end{verbatim} -we obtain -\begin{verbatim} -{ rat: coefficients[[c_cst, c_n] -> [i2, i3]] : i3 <= c_n and - i3 <= c_cst + 2c_n + i2 } -\end{verbatim} -The pure-parametric constraints valid for $\Delta$, -\begin{verbatim} -P := { [a,b] -> [] }(D); -CP := coefficients P; -CP; -\end{verbatim} -are -\begin{verbatim} -{ rat: coefficients[[c_cst, c_n] -> []] : c_n >= 0 and 2c_n >= -c_cst } -\end{verbatim} -Negating these coefficients and intersecting with \verb+CD+, -\begin{verbatim} -NCP := { rat: coefficients[[a,b] -> []] - -> coefficients[[-a,-b] -> []] }(CP); -CK := wrap((unwrap CD) * (dom (unwrap NCP))); -CK; -\end{verbatim} -we obtain -\begin{verbatim} -{ rat: [[c_cst, c_n] -> [i2, i3]] : i3 <= c_n and - i3 <= c_cst + 2c_n + i2 and c_n <= 0 and 2c_n <= -c_cst } -\end{verbatim} -The approximation for $k\,\Delta$, -\begin{verbatim} -K := solutions CK; -K; -\end{verbatim} -is then -\begin{verbatim} -[n] -> { rat: [i0, i1] : i1 <= -i0 and i0 >= 1 and i1 <= 2 - n - i0 } -\end{verbatim} -Finally, the computed approximation for $R^+$, -\begin{verbatim} -T := unwrap({ [dx,dy] -> [[x,y] -> [x+dx,y+dy]] }(K)); -R := [n] -> { [x,y] -> [x+1,y+1-n] : n >= 2 }; -T := T * ((dom R) -> (ran R)); -T; -\end{verbatim} -is -\begin{verbatim} -[n] -> { [x, y] -> [o0, o1] : o1 <= x + y - o0 and - o0 >= 1 + x and o1 <= 2 - n + x + y - o0 and n >= 2 } -\end{verbatim} -\end{example} - -Existentially quantified variables can be handled by -classifying them into variables that are uniquely -determined by the parameters, variables that are independent -of the parameters and others. The first set can be treated -as parameters and the second as variables. Constraints involving -the other existentially quantified variables are removed. - -\begin{example} -Consider the relation -$$ -R = -n \to \{\, x \to y \mid \exists \, \alpha_0, \alpha_1: 7\alpha_0 = -2 + n \wedge 5\alpha_1 = -1 - x + y \wedge y \ge 6 + x \,\} -. -$$ -The difference set of this relation is -$$ -\Delta = \Delta \, R = -n \to \{\, x \mid \exists \, \alpha_0, \alpha_1: 7\alpha_0 = -2 + n \wedge 5\alpha_1 = -1 + x \wedge x \ge 6 \,\} -. -$$ -The existentially quantified variables can be defined in terms -of the parameters and variables as -$$ -\alpha_0 = \floor{\frac{-2 + n}7} -\qquad -\text{and} -\qquad -\alpha_1 = \floor{\frac{-1 + x}5} -. -$$ -$\alpha_0$ can therefore be treated as a parameter, -while $\alpha_1$ can be treated as a variable. -This in turn means that $7\alpha_0 = -2 + n$ can be treated as -a purely parametric constraint, while the other two constraints are -non-parametric. -The corresponding $Q$~\eqref{eq:transitive:Q} is therefore -$$ -\begin{aligned} -n \to \{\, (x,z) \to (y,w) \mid -\exists\, \alpha_0, \alpha_1, k, f : {} & -k \ge 1 \wedge -y = x + f \wedge -w = z + k \wedge {} \\ -& -7\alpha_0 = -2 + n \wedge -5\alpha_1 = -k + x \wedge -x \ge 6 k -\,\} -. -\end{aligned} -$$ -Projecting out the final coordinates encoding the length of the paths, -results in the exact transitive closure -$$ -R^+ = -n \to \{\, x \to y \mid \exists \, \alpha_0, \alpha_1: 7\alpha_1 = -2 + n \wedge 6\alpha_0 \ge -x + y \wedge 5\alpha_0 \le -1 - x + y \,\} -. -$$ -\end{example} - -The fact that we ignore some impure constraints clearly leads -to a loss of accuracy. In some cases, some of this loss can be recovered -by not considering the parameters in a special way. -That is, instead of considering the set -$$ -\Delta = \diff R = -\vec s \mapsto -\{\, \vec \delta \in \Z^{d} \mid \exists \vec x \to \vec y \in R : -\vec \delta = \vec y - \vec x -\,\} -$$ -we consider the set -$$ -\Delta' = \diff R' = -\{\, \vec \delta \in \Z^{n+d} \mid \exists -(\vec s, \vec x) \to (\vec s, \vec y) \in R' : -\vec \delta = (\vec s - \vec s, \vec y - \vec x) -\,\} -. -$$ -The first $n$ coordinates of every element in $\Delta'$ are zero. -Projecting out these zero coordinates from $\Delta'$ is equivalent -to projecting out the parameters in $\Delta$. -The result is obviously a superset of $\Delta$, but all its constraints -are of type \eqref{eq:transitive:non-parametric} and they can therefore -all be used in the construction of $Q_i$. - -\begin{example} -Consider the relation -$$ -% [n] -> { [x, y] -> [1 + x, 1 - n + y] | n >= 2 } -R = n \to \{\, (x, y) \to (1 + x, 1 - n + y) \mid n \ge 2 \,\} -. -$$ -We have -$$ -\diff R = n \to \{\, (1, 1 - n) \mid n \ge 2 \,\} -$$ -and so, by treating the parameters in a special way, we obtain -the following approximation for $R^+$: -$$ -n \to \{\, (x, y) \to (x', y') \mid n \ge 2 \wedge y' \le 1 - n + y \wedge x' \ge 1 + x \,\} -. -$$ -If we consider instead -$$ -R' = \{\, (n, x, y) \to (n, 1 + x, 1 - n + y) \mid n \ge 2 \,\} -$$ -then -$$ -\diff R' = \{\, (0, 1, y) \mid y \le -1 \,\} -$$ -and we obtain the approximation -$$ -n \to \{\, (x, y) \to (x', y') \mid n \ge 2 \wedge x' \ge 1 + x \wedge y' \le x + y - x' \,\} -. -$$ -If we consider both $\diff R$ and $\diff R'$, then we obtain -$$ -n \to \{\, (x, y) \to (x', y') \mid n \ge 2 \wedge y' \le 1 - n + y \wedge x' \ge 1 + x \wedge y' \le x + y - x' \,\} -. -$$ -Note, however, that this is not the most accurate affine approximation that -can be obtained. That would be -$$ -n \to \{\, (x, y) \to (x', y') \mid y' \le 2 - n + x + y - x' \wedge n \ge 2 \wedge x' \ge 1 + x \,\} -. -$$ -\end{example} - -\subsection{Checking Exactness} - -The approximation $T$ for the transitive closure $R^+$ can be obtained -by projecting out the parameter $k$ from the approximation $K$ -\eqref{eq:transitive:approx} of the power $R^k$. -Since $K$ is an overapproximation of $R^k$, $T$ will also be an -overapproximation of $R^+$. -To check whether the results are exact, we need to consider two -cases depending on whether $R$ is {\em cyclic}, where $R$ is defined -to be cyclic if $R^+$ maps any element to itself, i.e., -$R^+ \cap \identity \ne \emptyset$. -If $R$ is acyclic, then the inductive definition of -\eqref{eq:transitive:inductive} is equivalent to its completion, -i.e., -$$ -R^+ = R \cup \left(R \circ R^+\right) -$$ -is a defining property. -Since $T$ is known to be an overapproximation, we only need to check -whether -$$ -T \subseteq R \cup \left(R \circ T\right) -. -$$ -This is essentially Theorem~5 of \shortciteN{Kelly1996closure}. -The only difference is that they only consider lexicographically -forward relations, a special case of acyclic relations. - -If, on the other hand, $R$ is cyclic, then we have to resort -to checking whether the approximation $K$ of the power is exact. -Note that $T$ may be exact even if $K$ is not exact, so the check -is sound, but incomplete. -To check exactness of the power, we simply need to check -\eqref{eq:transitive:power}. Since again $K$ is known -to be an overapproximation, we only need to check whether -$$ -\begin{aligned} -K'|_{y_{d+1} - x_{d+1} = 1} & \subseteq R' -\\ -K'|_{y_{d+1} - x_{d+1} \ge 2} & \subseteq R' \circ K'|_{y_{d+1} - x_{d+1} \ge 1} -, -\end{aligned} -$$ -where $R' = \{\, \vec x' \to \vec y' \mid \vec x \to \vec y \in R -\wedge y_{d+1} - x_{d+1} = 1\,\}$, i.e., $R$ extended with path -lengths equal to 1. - -All that remains is to explain how to check the cyclicity of $R$. -Note that the exactness on the power is always sound, even -in the acyclic case, so we only need to be careful that we find -all cyclic cases. Now, if $R$ is cyclic, i.e., -$R^+ \cap \identity \ne \emptyset$, then, since $T$ is -an overapproximation of $R^+$, also -$T \cap \identity \ne \emptyset$. This in turn means -that $\Delta \, K'$ contains a point whose first $d$ coordinates -are zero and whose final coordinate is positive. -In the implementation we currently perform this test on $P'$ instead of $K'$. -Note that if $R^+$ is acyclic and $T$ is not, then the approximation -is clearly not exact and the approximation of the power $K$ -will not be exact either. - -\subsection{Decomposing $R$ into strongly connected components} - -If the input relation $R$ is a union of several basic relations -that can be partially ordered -then the accuracy of the approximation may be improved by computing -an approximation of each strongly connected components separately. -For example, if $R = R_1 \cup R_2$ and $R_1 \circ R_2 = \emptyset$, -then we know that any path that passes through $R_2$ cannot later -pass through $R_1$, i.e., -\begin{equation} -\label{eq:transitive:components} -R^+ = R_1^+ \cup R_2^+ \cup \left(R_2^+ \circ R_1^+\right) -. -\end{equation} -We can therefore compute (approximations of) transitive closures -of $R_1$ and $R_2$ separately. -Note, however, that the condition $R_1 \circ R_2 = \emptyset$ -is actually too strong. -If $R_1 \circ R_2$ is a subset of $R_2 \circ R_1$ -then we can reorder the segments -in any path that moves through both $R_1$ and $R_2$ to -first move through $R_1$ and then through $R_2$. - -This idea can be generalized to relations that are unions -of more than two basic relations by constructing the -strongly connected components in the graph with as vertices -the basic relations and an edge between two basic relations -$R_i$ and $R_j$ if $R_i$ needs to follow $R_j$ in some paths. -That is, there is an edge from $R_i$ to $R_j$ iff -\begin{equation} -\label{eq:transitive:edge} -R_i \circ R_j -\not\subseteq -R_j \circ R_i -. -\end{equation} -The components can be obtained from the graph by applying -Tarjan's algorithm \shortcite{Tarjan1972}. - -In practice, we compute the (extended) powers $K_i'$ of each component -separately and then compose them as in \eqref{eq:transitive:decompose}. -Note, however, that in this case the order in which we apply them is -important and should correspond to a topological ordering of the -strongly connected components. Simply applying Tarjan's -algorithm will produce topologically sorted strongly connected components. -The graph on which Tarjan's algorithm is applied is constructed on-the-fly. -That is, whenever the algorithm checks if there is an edge between -two vertices, we evaluate \eqref{eq:transitive:edge}. -The exactness check is performed on each component separately. -If the approximation turns out to be inexact for any of the components, -then the entire result is marked inexact and the exactness check -is skipped on the components that still need to be handled. - -It should be noted that \eqref{eq:transitive:components} -is only valid for exact transitive closures. -If overapproximations are computed in the right hand side, then the result will -still be an overapproximation of the left hand side, but this result -may not be transitively closed. If we only separate components based -on the condition $R_i \circ R_j = \emptyset$, then there is no problem, -as this condition will still hold on the computed approximations -of the transitive closures. If, however, we have exploited -\eqref{eq:transitive:edge} during the decomposition and if the -result turns out not to be exact, then we check whether -the result is transitively closed. If not, we recompute -the transitive closure, skipping the decomposition. -Note that testing for transitive closedness on the result may -be fairly expensive, so we may want to make this check -configurable. - -\begin{figure} -\begin{center} -\begin{tikzpicture}[x=0.5cm,y=0.5cm,>=stealth,shorten >=1pt] -\foreach \x in {1,...,10}{ - \foreach \y in {1,...,10}{ - \draw[->] (\x,\y) -- (\x,\y+1); - } -} -\foreach \x in {1,...,20}{ - \foreach \y in {5,...,15}{ - \draw[->] (\x,\y) -- (\x+1,\y); - } -} -\end{tikzpicture} -\end{center} -\caption{The relation from \autoref{ex:closure4}} -\label{f:closure4} -\end{figure} -\begin{example} -\label{ex:closure4} -Consider the relation in example {\tt closure4} that comes with -the Omega calculator~\shortcite{Omega_calc}, $R = R_1 \cup R_2$, -with -$$ -\begin{aligned} -R_1 & = \{\, (x,y) \to (x,y+1) \mid 1 \le x,y \le 10 \,\} -\\ -R_2 & = \{\, (x,y) \to (x+1,y) \mid 1 \le x \le 20 \wedge 5 \le y \le 15 \,\} -. -\end{aligned} -$$ -This relation is shown graphically in \autoref{f:closure4}. -We have -$$ -\begin{aligned} -R_1 \circ R_2 &= -\{\, (x,y) \to (x+1,y+1) \mid 1 \le x \le 9 \wedge 5 \le y \le 10 \,\} -\\ -R_2 \circ R_1 &= -\{\, (x,y) \to (x+1,y+1) \mid 1 \le x \le 10 \wedge 4 \le y \le 10 \,\} -. -\end{aligned} -$$ -Clearly, $R_1 \circ R_2 \subseteq R_2 \circ R_1$ and so -$$ -\left( -R_1 \cup R_2 -\right)^+ -= -\left(R_2^+ \circ R_1^+\right) -\cup R_1^+ -\cup R_2^+ -. -$$ -\end{example} - -\begin{figure} -\newcounter{n} -\newcounter{t1} -\newcounter{t2} -\newcounter{t3} -\newcounter{t4} -\begin{center} -\begin{tikzpicture}[>=stealth,shorten >=1pt] -\setcounter{n}{7} -\foreach \i in {1,...,\value{n}}{ - \foreach \j in {1,...,\value{n}}{ - \setcounter{t1}{2 * \j - 4 - \i + 1} - \setcounter{t2}{\value{n} - 3 - \i + 1} - \setcounter{t3}{2 * \i - 1 - \j + 1} - \setcounter{t4}{\value{n} - \j + 1} - \ifnum\value{t1}>0\ifnum\value{t2}>0 - \ifnum\value{t3}>0\ifnum\value{t4}>0 - \draw[thick,->] (\i,\j) to[out=20] (\i+3,\j); - \fi\fi\fi\fi - \setcounter{t1}{2 * \j - 1 - \i + 1} - \setcounter{t2}{\value{n} - \i + 1} - \setcounter{t3}{2 * \i - 4 - \j + 1} - \setcounter{t4}{\value{n} - 3 - \j + 1} - \ifnum\value{t1}>0\ifnum\value{t2}>0 - \ifnum\value{t3}>0\ifnum\value{t4}>0 - \draw[thick,->] (\i,\j) to[in=-20,out=20] (\i,\j+3); - \fi\fi\fi\fi - \setcounter{t1}{2 * \j - 1 - \i + 1} - \setcounter{t2}{\value{n} - 1 - \i + 1} - \setcounter{t3}{2 * \i - 1 - \j + 1} - \setcounter{t4}{\value{n} - 1 - \j + 1} - \ifnum\value{t1}>0\ifnum\value{t2}>0 - \ifnum\value{t3}>0\ifnum\value{t4}>0 - \draw[thick,->] (\i,\j) to (\i+1,\j+1); - \fi\fi\fi\fi - } -} -\end{tikzpicture} -\end{center} -\caption{The relation from \autoref{ex:decomposition}} -\label{f:decomposition} -\end{figure} -\begin{example} -\label{ex:decomposition} -Consider the relation on the right of \shortciteN[Figure~2]{Beletska2009}, -reproduced in \autoref{f:decomposition}. -The relation can be described as $R = R_1 \cup R_2 \cup R_3$, -with -$$ -\begin{aligned} -R_1 &= n \mapsto \{\, (i,j) \to (i+3,j) \mid -i \le 2 j - 4 \wedge -i \le n - 3 \wedge -j \le 2 i - 1 \wedge -j \le n \,\} -\\ -R_2 &= n \mapsto \{\, (i,j) \to (i,j+3) \mid -i \le 2 j - 1 \wedge -i \le n \wedge -j \le 2 i - 4 \wedge -j \le n - 3 \,\} -\\ -R_3 &= n \mapsto \{\, (i,j) \to (i+1,j+1) \mid -i \le 2 j - 1 \wedge -i \le n - 1 \wedge -j \le 2 i - 1 \wedge -j \le n - 1\,\} -. -\end{aligned} -$$ -The figure shows this relation for $n = 7$. -Both -$R_3 \circ R_1 \subseteq R_1 \circ R_3$ -and -$R_3 \circ R_2 \subseteq R_2 \circ R_3$, -which the reader can verify using the {\tt iscc} calculator: -\begin{verbatim} -R1 := [n] -> { [i,j] -> [i+3,j] : i <= 2 j - 4 and i <= n - 3 and - j <= 2 i - 1 and j <= n }; -R2 := [n] -> { [i,j] -> [i,j+3] : i <= 2 j - 1 and i <= n and - j <= 2 i - 4 and j <= n - 3 }; -R3 := [n] -> { [i,j] -> [i+1,j+1] : i <= 2 j - 1 and i <= n - 1 and - j <= 2 i - 1 and j <= n - 1 }; -(R1 . R3) - (R3 . R1); -(R2 . R3) - (R3 . R2); -\end{verbatim} -$R_3$ can therefore be moved forward in any path. -For the other two basic relations, we have both -$R_2 \circ R_1 \not\subseteq R_1 \circ R_2$ -and -$R_1 \circ R_2 \not\subseteq R_2 \circ R_1$ -and so $R_1$ and $R_2$ form a strongly connected component. -By computing the power of $R_3$ and $R_1 \cup R_2$ separately -and composing the results, the power of $R$ can be computed exactly -using \eqref{eq:transitive:singleton}. -As explained by \shortciteN{Beletska2009}, applying the same formula -to $R$ directly, without a decomposition, would result in -an overapproximation of the power. -\end{example} - -\subsection{Partitioning the domains and ranges of $R$} - -The algorithm of \autoref{s:power} assumes that the input relation $R$ -can be treated as a union of translations. -This is a reasonable assumption if $R$ maps elements of a given -abstract domain to the same domain. -However, if $R$ is a union of relations that map between different -domains, then this assumption no longer holds. -In particular, when an entire dependence graph is encoded -in a single relation, as is done by, e.g., -\shortciteN[Section~6.1]{Barthou2000MSE}, then it does not make -sense to look at differences between iterations of different domains. -Now, arguably, a modified Floyd-Warshall algorithm should -be applied to the dependence graph, as advocated by -\shortciteN{Kelly1996closure}, with the transitive closure operation -only being applied to relations from a given domain to itself. -However, it is also possible to detect disjoint domains and ranges -and to apply Floyd-Warshall internally. - -\linesnumbered -\begin{algorithm} -\caption{The modified Floyd-Warshall algorithm of -\protect\shortciteN{Kelly1996closure}} -\label{a:Floyd} -\SetKwInput{Input}{Input} -\SetKwInput{Output}{Output} -\Input{Relations $R_{pq}$, $0 \le p, q < n$} -\Output{Updated relations $R_{pq}$ such that each relation -$R_{pq}$ contains all indirect paths from $p$ to $q$ in the input graph} -% -\BlankLine -\SetVline -\dontprintsemicolon -% -\For{$r \in [0, n-1]$}{ - $R_{rr} \coloneqq R_{rr}^+$ \nllabel{l:Floyd:closure}\; - \For{$p \in [0, n-1]$}{ - \For{$q \in [0, n-1]$}{ - \If{$p \ne r$ or $q \ne r$}{ - $R_{pq} \coloneqq R_{pq} \cup \left(R_{rq} \circ R_{pr}\right) - \cup \left(R_{rq} \circ R_{rr} \circ R_{pr}\right)$ - \nllabel{l:Floyd:update} - } - } - } -} -\end{algorithm} - -Let the input relation $R$ be a union of $m$ basic relations $R_i$. -Let $D_{2i}$ be the domains of $R_i$ and $D_{2i+1}$ the ranges of $R_i$. -The first step is to group overlapping $D_j$ until a partition is -obtained. If the resulting partition consists of a single part, -then we continue with the algorithm of \autoref{s:power}. -Otherwise, we apply Floyd-Warshall on the graph with as vertices -the parts of the partition and as edges the $R_i$ attached to -the appropriate pairs of vertices. -In particular, let there be $n$ parts $P_k$ in the partition. -We construct $n^2$ relations -$$ -R_{pq} \coloneqq \bigcup_{i \text{ s.t. } \domain R_i \subseteq P_p \wedge - \range R_i \subseteq P_q} R_i -, -$$ -apply \autoref{a:Floyd} and return the union of all resulting -$R_{pq}$ as the transitive closure of $R$. -Each iteration of the $r$-loop in \autoref{a:Floyd} updates -all relations $R_{pq}$ to include paths that go from $p$ to $r$, -possibly stay there for a while, and then go from $r$ to $q$. -Note that paths that ``stay in $r$'' include all paths that -pass through earlier vertices since $R_{rr}$ itself has been updated -accordingly in previous iterations of the outer loop. -In principle, it would be sufficient to use the $R_{pr}$ -and $R_{rq}$ computed in the previous iteration of the -$r$-loop in Line~\ref{l:Floyd:update}. -However, from an implementation perspective, it is easier -to allow either or both of these to have been updated -in the same iteration of the $r$-loop. -This may result in duplicate paths, but these can usually -be removed by coalescing (\autoref{s:coalescing}) the result of the union -in Line~\ref{l:Floyd:update}, which should be done in any case. -The transitive closure in Line~\ref{l:Floyd:closure} -is performed using a recursive call. This recursive call -includes the partitioning step, but the resulting partition will -usually be a singleton. -The result of the recursive call will either be exact or an -overapproximation. The final result of Floyd-Warshall is therefore -also exact or an overapproximation. - -\begin{figure} -\begin{center} -\begin{tikzpicture}[x=1cm,y=1cm,>=stealth,shorten >=3pt] -\foreach \x/\y in {0/0,1/1,3/2} { - \fill (\x,\y) circle (2pt); -} -\foreach \x/\y in {0/1,2/2,3/3} { - \draw (\x,\y) circle (2pt); -} -\draw[->] (0,0) -- (0,1); -\draw[->] (0,1) -- (1,1); -\draw[->] (2,2) -- (3,2); -\draw[->] (3,2) -- (3,3); -\draw[->,dashed] (2,2) -- (3,3); -\draw[->,dotted] (0,0) -- (1,1); -\end{tikzpicture} -\end{center} -\caption{The relation (solid arrows) on the right of Figure~1 of -\protect\shortciteN{Beletska2009} and its transitive closure} -\label{f:COCOA:1} -\end{figure} -\begin{example} -Consider the relation on the right of Figure~1 of -\shortciteN{Beletska2009}, -reproduced in \autoref{f:COCOA:1}. -This relation can be described as -$$ -\begin{aligned} -\{\, (x, y) \to (x_2, y_2) \mid {} & (3y = 2x \wedge x_2 = x \wedge 3y_2 = 3 + 2x \wedge x \ge 0 \wedge x \le 3) \vee {} \\ -& (x_2 = 1 + x \wedge y_2 = y \wedge x \ge 0 \wedge 3y \ge 2 + 2x \wedge x \le 2 \wedge 3y \le 3 + 2x) \,\} -. -\end{aligned} -$$ -Note that the domain of the upward relation overlaps with the range -of the rightward relation and vice versa, but that the domain -of neither relation overlaps with its own range or the domain of -the other relation. -The domains and ranges can therefore be partitioned into two parts, -$P_0$ and $P_1$, shown as the white and black dots in \autoref{f:COCOA:1}, -respectively. -Initially, we have -$$ -\begin{aligned} -R_{00} & = \emptyset -\\ -R_{01} & = -\{\, (x, y) \to (x+1, y) \mid -(x \ge 0 \wedge 3y \ge 2 + 2x \wedge x \le 2 \wedge 3y \le 3 + 2x) \,\} -\\ -R_{10} & = -\{\, (x, y) \to (x_2, y_2) \mid (3y = 2x \wedge x_2 = x \wedge 3y_2 = 3 + 2x \wedge x \ge 0 \wedge x \le 3) \,\} -\\ -R_{11} & = \emptyset -. -\end{aligned} -$$ -In the first iteration, $R_{00}$ remains the same ($\emptyset^+ = \emptyset$). -$R_{01}$ and $R_{10}$ are therefore also unaffected, but -$R_{11}$ is updated to include $R_{01} \circ R_{10}$, i.e., -the dashed arrow in the figure. -This new $R_{11}$ is obviously transitively closed, so it is not -changed in the second iteration and it does not have an effect -on $R_{01}$ and $R_{10}$. However, $R_{00}$ is updated to -include $R_{10} \circ R_{01}$, i.e., the dotted arrow in the figure. -The transitive closure of the original relation is then equal to -$R_{00} \cup R_{01} \cup R_{10} \cup R_{11}$. -\end{example} - -\subsection{Incremental Computation} -\label{s:incremental} - -In some cases it is possible and useful to compute the transitive closure -of union of basic relations incrementally. In particular, -if $R$ is a union of $m$ basic maps, -$$ -R = \bigcup_j R_j -, -$$ -then we can pick some $R_i$ and compute the transitive closure of $R$ as -\begin{equation} -\label{eq:transitive:incremental} -R^+ = R_i^+ \cup -\left( -\bigcup_{j \ne i} -R_i^* \circ R_j \circ R_i^* -\right)^+ -. -\end{equation} -For this approach to be successful, it is crucial that each -of the disjuncts in the argument of the second transitive -closure in \eqref{eq:transitive:incremental} be representable -as a single basic relation, i.e., without a union. -If this condition holds, then by using \eqref{eq:transitive:incremental}, -the number of disjuncts in the argument of the transitive closure -can be reduced by one. -Now, $R_i^* = R_i^+ \cup \identity$, but in some cases it is possible -to relax the constraints of $R_i^+$ to include part of the identity relation, -say on domain $D$. We will use the notation -${\cal C}(R_i,D) = R_i^+ \cup \identity_D$ to represent -this relaxed version of $R^+$. -\shortciteN{Kelly1996closure} use the notation $R_i^?$. -${\cal C}(R_i,D)$ can be computed by allowing $k$ to attain -the value $0$ in \eqref{eq:transitive:Q} and by using -$$ -P \cap \left(D \to D\right) -$$ -instead of \eqref{eq:transitive:approx}. -Typically, $D$ will be a strict superset of both $\domain R_i$ -and $\range R_i$. We therefore need to check that domain -and range of the transitive closure are part of ${\cal C}(R_i,D)$, -i.e., the part that results from the paths of positive length ($k \ge 1$), -are equal to the domain and range of $R_i$. -If not, then the incremental approach cannot be applied for -the given choice of $R_i$ and $D$. - -In order to be able to replace $R^*$ by ${\cal C}(R_i,D)$ -in \eqref{eq:transitive:incremental}, $D$ should be chosen -to include both $\domain R$ and $\range R$, i.e., such -that $\identity_D \circ R_j \circ \identity_D = R_j$ for all $j\ne i$. -\shortciteN{Kelly1996closure} say that they use -$D = \domain R_i \cup \range R_i$, but presumably they mean that -they use $D = \domain R \cup \range R$. -Now, this expression of $D$ contains a union, so it not directly usable. -\shortciteN{Kelly1996closure} do not explain how they avoid this union. -Apparently, in their implementation, -they are using the convex hull of $\domain R \cup \range R$ -or at least an approximation of this convex hull. -We use the simple hull (\autoref{s:simple hull}) of $\domain R \cup \range R$. - -It is also possible to use a domain $D$ that does {\em not\/} -include $\domain R \cup \range R$, but then we have to -compose with ${\cal C}(R_i,D)$ more selectively. -In particular, if we have -\begin{equation} -\label{eq:transitive:right} -\text{for each $j \ne i$ either } -\domain R_j \subseteq D \text{ or } \domain R_j \cap \range R_i = \emptyset -\end{equation} -and, similarly, -\begin{equation} -\label{eq:transitive:left} -\text{for each $j \ne i$ either } -\range R_j \subseteq D \text{ or } \range R_j \cap \domain R_i = \emptyset -\end{equation} -then we can refine \eqref{eq:transitive:incremental} to -$$ -R_i^+ \cup -\left( -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \subseteq D $\\ - $\scriptstyle\range R_j \subseteq D$}} -{\cal C} \circ R_j \circ {\cal C} -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \cap \range R_i = \emptyset$\\ - $\scriptstyle\range R_j \subseteq D$}} -\!\!\!\!\! -{\cal C} \circ R_j -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \subseteq D $\\ - $\scriptstyle\range R_j \cap \domain R_i = \emptyset$}} -\!\!\!\!\! -R_j \circ {\cal C} -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \cap \range R_i = \emptyset$\\ - $\scriptstyle\range R_j \cap \domain R_i = \emptyset$}} -\!\!\!\!\! -R_j -\right) -\right)^+ -. -$$ -If only property~\eqref{eq:transitive:right} holds, -we can use -$$ -R_i^+ \cup -\left( -\left( -R_i^+ \cup \identity -\right) -\circ -\left( -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \subseteq D $}} -R_j \circ {\cal C} -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\domain R_j \cap \range R_i = \emptyset$}} -\!\!\!\!\! -R_j -\right) -\right)^+ -\right) -, -$$ -while if only property~\eqref{eq:transitive:left} holds, -we can use -$$ -R_i^+ \cup -\left( -\left( -\left( -\bigcup_{\shortstack{$\scriptstyle\range R_j \subseteq D $}} -{\cal C} \circ R_j -\right) -\cup -\left( -\bigcup_{\shortstack{$\scriptstyle\range R_j \cap \domain R_i = \emptyset$}} -\!\!\!\!\! -R_j -\right) -\right)^+ -\circ -\left( -R_i^+ \cup \identity -\right) -\right) -. -$$ - -It should be noted that if we want the result of the incremental -approach to be transitively closed, then we can only apply it -if all of the transitive closure operations involved are exact. -If, say, the second transitive closure in \eqref{eq:transitive:incremental} -contains extra elements, then the result does not necessarily contain -the composition of these extra elements with powers of $R_i$. - -\subsection{An {\tt Omega}-like implementation} - -While the main algorithm of \shortciteN{Kelly1996closure} is -designed to compute and underapproximation of the transitive closure, -the authors mention that they could also compute overapproximations. -In this section, we describe our implementation of an algorithm -that is based on their ideas. -Note that the {\tt Omega} library computes underapproximations -\shortcite[Section 6.4]{Omega_lib}. - -The main tool is Equation~(2) of \shortciteN{Kelly1996closure}. -The input relation $R$ is first overapproximated by a ``d-form'' relation -$$ -\{\, \vec i \to \vec j \mid \exists \vec \alpha : -\vec L \le \vec j - \vec i \le \vec U -\wedge -(\forall p : j_p - i_p = M_p \alpha_p) -\,\} -, -$$ -where $p$ ranges over the dimensions and $\vec L$, $\vec U$ and -$\vec M$ are constant integer vectors. The elements of $\vec U$ -may be $\infty$, meaning that there is no upper bound corresponding -to that element, and similarly for $\vec L$. -Such an overapproximation can be obtained by computing strides, -lower and upper bounds on the difference set $\Delta \, R$. -The transitive closure of such a ``d-form'' relation is -\begin{equation} -\label{eq:omega} -\{\, \vec i \to \vec j \mid \exists \vec \alpha, k : -k \ge 1 \wedge -k \, \vec L \le \vec j - \vec i \le k \, \vec U -\wedge -(\forall p : j_p - i_p = M_p \alpha_p) -\,\} -. -\end{equation} -The domain and range of this transitive closure are then -intersected with those of the input relation. -This is a special case of the algorithm in \autoref{s:power}. - -In their algorithm for computing lower bounds, the authors -use the above algorithm as a substep on the disjuncts in the relation. -At the end, they say -\begin{quote} -If an upper bound is required, it can be calculated in a manner -similar to that of a single conjunct [sic] relation. -\end{quote} -Presumably, the authors mean that a ``d-form'' approximation -of the whole input relation should be used. -However, the accuracy can be improved by also trying to -apply the incremental technique from the same paper, -which is explained in more detail in \autoref{s:incremental}. -In this case, ${\cal C}(R_i,D)$ can be obtained by -allowing the value zero for $k$ in \eqref{eq:omega}, -i.e., by computing -$$ -\{\, \vec i \to \vec j \mid \exists \vec \alpha, k : -k \ge 0 \wedge -k \, \vec L \le \vec j - \vec i \le k \, \vec U -\wedge -(\forall p : j_p - i_p = M_p \alpha_p) -\,\} -. -$$ -In our implementation we take as $D$ the simple hull -(\autoref{s:simple hull}) of $\domain R \cup \range R$. -To determine whether it is safe to use ${\cal C}(R_i,D)$, -we check the following conditions, as proposed by -\shortciteN{Kelly1996closure}: -${\cal C}(R_i,D) - R_i^+$ is not a union and for each $j \ne i$ -the condition -$$ -\left({\cal C}(R_i,D) - R_i^+\right) -\circ -R_j -\circ -\left({\cal C}(R_i,D) - R_i^+\right) -= -R_j -$$ -holds. diff --git a/cloog-0.17.0/isl/doc/isl.bib b/cloog-0.17.0/isl/doc/isl.bib deleted file mode 100644 index cfe8081e56b75cd8e1e1994fe9eac9e58f3b799d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/isl.bib +++ /dev/null @@ -1,313 +0,0 @@ -@inproceedings{Kelly1996closure, - author = {Wayne Kelly and - William Pugh and - Evan Rosser and - Tatiana Shpeisman}, - title = {Transitive Closure of Infinite Graphs and Its Applications}, - pages = {126-140}, - editor = {Chua-Huang Huang and - P. Sadayappan and - Utpal Banerjee and - David Gelernter and - Alexandru Nicolau and - David A. Padua}, - booktitle = {Languages and Compilers for Parallel Computing, 8th International - Workshop, LCPC'95, Columbus, Ohio, USA, August 10-12, 1995, - Proceedings}, - publisher = {Springer}, - series = {Lecture Notes in Computer Science}, - volume = {1033}, - year = {1996}, - isbn = {3-540-60765-X}, -} - -@inproceedings{Beletska2009, - author = {Beletska, Anna and Barthou, Denis and Bielecki, Wlodzimierz and Cohen, Albert}, - title = {Computing the Transitive Closure of a Union of Affine Integer Tuple Relations}, - booktitle = {COCOA '09: Proceedings of the 3rd International Conference on Combinatorial Optimization and Applications}, - year = {2009}, - isbn = {978-3-642-02025-4}, - pages = {98--109}, - location = {Huangshan, China}, - doi = {10.1007/978-3-642-02026-1_9}, - publisher = {Springer-Verlag}, - address = {Berlin, Heidelberg}, -} - -@book{Schrijver1986, - author = "Schrijver, Alexander", - title = "Theory of Linear and Integer Programming", - publisher = "John Wiley \& Sons", - year = 1986 -} - -@article{Tarjan1972, - author = {Tarjan, Robert}, - journal = {SIAM Journal on Computing}, - number = {2}, - pages = {146--160}, - publisher = {SIAM}, - title = {Depth-First Search and Linear Graph Algorithms}, - volume = {1}, - year = {1972} -} - -@TechReport{ Omega_calc, - author = "Wayne Kelly and Vadim Maslov and William Pugh and Evan Rosser and Tatiana Shpeisman and Dave Wonnacott", - title = "The {Omega} Calculator and Library", - month = nov, - institution = "University of Maryland", - year = 1996 -} - -@TechReport{ Omega_lib, - author = "Wayne Kelly and Vadim Maslov and William Pugh and Evan Rosser and Tatiana Shpeisman and Dave Wonnacott", - title = "The {Omega} Library", - month = nov, - institution = "University of Maryland", - year = 1996 -} - -@unpublished{Verdoolaege2009isl, - author = "Verdoolaege, Sven", - title = "An integer set library for program analysis", - note = "Advances in the Theory of Integer Linear Optimization and its Extensions,AMS 2009 Spring Western Section Meeting, San Francisco, California, 25-26 April 2009", - month = Apr, - year = "2009", - url = "https://lirias.kuleuven.be/handle/123456789/228373", -} - -@article{Barthou2000MSE, - author = {Barthou, Denis and Cohen, Albert and Collard, Jean-Fran\c{c}ois}, - title = {Maximal Static Expansion}, - journal = {Int. J. Parallel Program.}, - volume = {28}, - number = {3}, - year = {2000}, - issn = {0885-7458}, - pages = {213--243}, - doi = {10.1023/A:1007500431910}, - publisher = {Kluwer Academic Publishers}, - address = {Norwell, MA, USA}, -} - -@article{ Feautrier88parametric, - author = "P. Feautrier", - title = "Parametric Integer Programming", - journal = "RAIRO Recherche Op\'erationnelle", - volume = "22", - number = "3", - pages = "243--268", - year = "1988", -} - -@Article{ Fea91, - author = {Feautrier, P.}, - title = {Dataflow analysis of array and scalar references}, - journal = {International Journal of Parallel Programming}, - year = {1991}, - OPTkey = {}, - volume = {20}, - number = {1}, - OPTmonth = {}, - pages = {23--53}, - OPTnote = {}, - OPTannote = {}, -} - -@INPROCEEDINGS{BouletRe98, - AUTHOR = {Pierre Boulet and Xavier Redon}, - TITLE = {Communication Pre-evaluation in {HPF}}, - BOOKTITLE = {EUROPAR'98}, - PAGES = {263--272}, - YEAR = 1998, - VOLUME = 1470, - series = {Lecture Notes in Computer Science}, - PUBLISHER = {Springer-Verlag, Berlin}, - ABSTRACT = { Parallel computers are difficult to program efficiently. We believe - that a good way to help programmers write efficient programs is to - provide them with tools that show them how their programs behave on - a parallel computer. Data distribution is the major performance - factor of data-parallel programs and so automatic data layout for - HPF programs has been studied by many researchers recently. The - communication volume induced by a data distribution is a good - estimator of the efficiency of this data distribution. - - We present here a symbolic method to compute the communication - volume generated by a given data distribution during the program - writing phase (before compilation). We stay machine-independent to - assure portability. Our goal is to help the programmer understand - the data movements its program generates and thus find a good data - distribution. Our method is based on parametric polyhedral - computations. It can be applied to a large class of regular codes.}, -} - -@INPROCEEDINGS {Verdoolaege2005experiences, - AUTHOR = "Verdoolaege, Sven and Beyls, Kristof and Bruynooghe, Maurice and Catthoor, Francky", - TITLE = {{E}xperiences with enumeration of integer projections of parametric polytopes}, - BOOKTITLE = {{P}roceedings of 14th {I}nternational {C}onference on {C}ompiler {C}onstruction, {E}dinburgh, {S}cotland}, - YEAR = {2005}, - EDITOR = {Bodik, R.}, - VOLUME = 3443, - pages = "91-105", - series = "Lecture Notes in Computer Science", - publisher = "Springer-Verlag", - address = "Berlin", - doi = "10.1007/b107108", -} - -@article{Detlefs2005simplify, - author = {David Detlefs and Greg Nelson and James B. Saxe}, - title = {Simplify: a theorem prover for program checking}, - journal = {J. ACM}, - volume = {52}, - number = {3}, - year = {2005}, - issn = {0004-5411}, - pages = {365--473}, - doi = {10.1145/1066100.1066102}, - publisher = {ACM}, - address = {New York, NY, USA}, - } - -@phdthesis{Nelson1980phd, - author = {Charles Gregory Nelson}, - title = {Techniques for program verification}, - year = {1980}, - order_no = {AAI8011683}, - school = {Stanford University}, - address = {Stanford, CA, USA}, - } - -@article{Woods2003short, - year = 2003, - Journal = "J. Amer. Math. Soc.", - volume = 16, - pages = "957--979", - month = apr, - title = {{Short rational generating functions for lattice point - problems}}, - author = {Alexander Barvinok and Kevin Woods}, -} - -@misc{barvinok-0.22, - author = {Sven Verdoolaege}, - title = {{\texttt{barvinok}}, version 0.22}, - howpublished = {Available from \url{http://freshmeat.net/projects/barvinok/}}, - year = 2006 -} - -@inproceedings{DeLoera2004Three, - title = "Three Kinds of Integer Programming Algorithms based on Barvinok's Rational Functions", - author = "De Loera, J. A. and D. Haws and R. Hemmecke and P. Huggins and R. Yoshida", - booktitle = "Integer Programming and Combinatorial Optimization: 10th International IPCO Conference", - year = "2004", - month = jan, - series = "Lecture Notes in Computer Science", - Volume = 3064, - Pages = "244-255", -} - -@TechReport{Feautrier02, - author = {P. Feautrier and J. Collard and C. Bastoul}, - title = {Solving systems of affine (in)equalities}, - institution = {PRiSM, Versailles University}, - year = 2002 -} - -@article{ Feautrier92multi, - author = "Paul Feautrier", - title = "Some Efficient Solutions to the Affine Scheduling Problem. {P}art {II}. Multidimensional Time", - journal = "International Journal of Parallel Programming", - volume = "21", - number = "6", - pages = "389--420", - year = "1992", - month = dec, - url = "citeseer.nj.nec.com/article/feautrier92some.html", -} - -@misc{Bygde2010licentiate, - author = {Stefan Bygde}, - title = {Static {WCET} Analysis based on Abstract Interpretation and Counting of Elements}, - month = {March}, - year = {2010}, - howpublished = {Licentiate thesis}, - publisher = {M{\"{a}}lardalen University Press}, - url = {http://www.mrtc.mdh.se/index.php?choice=publications&id=2144}, -} - -@phdthesis{Meister2004PhD, - title = {Stating and Manipulating Periodicity in the Polytope Model. Applications to Program Analysis and Optimization}, - author= {Beno\^it Meister}, - school = {Universit\'e Louis Pasteur}, - month = Dec, - year = {2004}, -} - -@inproceedings{Meister2008, - author = {Beno\^it Meister and Sven Verdoolaege}, - title = {Polynomial Approximations in the Polytope Model: Bringing the Power - of Quasi-Polynomials to the Masses}, - year = {2008}, - booktitle = {Digest of the 6th Workshop on Optimization for DSP and Embedded Systems, ODES-6}, - editor = "Jagadeesh Sankaran and Vander Aa, Tom", - month = apr, -} - -@misc{Galea2009personal, - author = "Fran\c{c}ois Galea", - title = "personal communication", - year = 2009, - month = nov, -} - -@misc{PPL, - author = "R. Bagnara and P. M. Hill and E. Zaffanella", - title = "The {Parma Polyhedra Library}", - howpublished = {\url{http://www.cs.unipr.it/ppl/}}, -} - -@TECHREPORT{Cook1991implementation, -AUTHOR={William Cook and Thomas Rutherford and Herbert E. Scarf and David F. Shallcross}, -TITLE={An Implementation of the Generalized Basis Reduction Algorithm for Integer Programming}, -YEAR=1991, -MONTH=Aug, -INSTITUTION={Cowles Foundation, Yale University}, -TYPE={Cowles Foundation Discussion Papers}, -NOTE={available at \url{http://ideas.repec.org/p/cwl/cwldpp/990.html}}, -NUMBER={990}, -} - - @article{Karr1976affine, -author={ Michael Karr}, -title={ Affine Relationships Among Variables of a Program }, -journal={Acta Informatica}, -Volume={6}, -pages={133-151}, -year={1976}, -publisher={Springer-Verlag}, -ignore={ }, -} - -@PhdThesis{Verhaegh1995PhD, - title = "Multidimensional Periodic Scheduling", - author = "Wim F. J. Verhaegh", - school = "Technische Universiteit Eindhoven", - year = 1995, -} - -@INPROCEEDINGS{Seghir2006minimizing, - AUTHOR = "Rachid Seghir and Vincent Loechner", - TITLE = {Memory Optimization by Counting Points in Integer Transformations of Parametric Polytopes}, - BOOKTITLE = {{P}roceedings of the {I}nternational {C}onference on {C}ompilers, {A}rchitectures, and {S}ynthesis for {E}mbedded Systems, CASES 2006, {S}eoul, {K}orea}, - month = oct, - YEAR = {2006} -} - -@misc{DeSmet2010personal, - author = "De Smet, Sven", - title = "personal communication", - year = 2010, - month = apr, -} diff --git a/cloog-0.17.0/isl/doc/manual.pdf b/cloog-0.17.0/isl/doc/manual.pdf deleted file mode 100644 index 3bd22073f7559ca75e66825284f12820e11d639c..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/isl/doc/manual.pdf and /dev/null differ diff --git a/cloog-0.17.0/isl/doc/manual.tex b/cloog-0.17.0/isl/doc/manual.tex deleted file mode 100644 index 91b3db0e640350069e72873fcb5e4f0770fc0e4d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/manual.tex +++ /dev/null @@ -1,75 +0,0 @@ -\documentclass{report} -\usepackage[plainpages=false,pdfpagelabels,breaklinks,pagebackref]{hyperref} -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{txfonts} -\usepackage{chicago} -\usepackage{aliascnt} -\usepackage{tikz} -\usepackage{calc} -\usepackage[ruled]{algorithm2e} -\usetikzlibrary{matrix,fit,backgrounds,decorations.pathmorphing,positioning} -\usepackage{listings} - -\lstset{basicstyle=\tt,flexiblecolumns=false} - -\def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle\bf#1$}} -{\mbox{\boldmath$\textstyle\bf#1$}} -{\mbox{\boldmath$\scriptstyle\bf#1$}} -{\mbox{\boldmath$\scriptscriptstyle\bf#1$}}} - -\providecommand{\fract}[1]{\left\{#1\right\}} -\providecommand{\floor}[1]{\left\lfloor#1\right\rfloor} -\providecommand{\ceil}[1]{\left\lceil#1\right\rceil} -\def\sp#1#2{\langle #1, #2 \rangle} -\def\spv#1#2{\langle\vec #1,\vec #2\rangle} - -\newtheorem{theorem}{Theorem} -\newaliascnt{example}{theorem} -\newtheorem{example}[example]{Example} -\newaliascnt{def}{theorem} -\newtheorem{definition}[def]{Definition} -\aliascntresetthe{example} -\aliascntresetthe{def} -\numberwithin{theorem}{section} -\numberwithin{def}{section} -\numberwithin{example}{section} - -\newcommand{\algocflineautorefname}{Algorithm} -\newcommand{\exampleautorefname}{Example} -\newcommand{\lstnumberautorefname}{Line} -\renewcommand{\sectionautorefname}{Section} -\renewcommand{\subsectionautorefname}{Section} - -\def\Z{\mathbb{Z}} -\def\Q{\mathbb{Q}} - -\def\pdom{\mathop{\rm pdom}\nolimits} -\def\domain{\mathop{\rm dom}\nolimits} -\def\range{\mathop{\rm ran}\nolimits} -\def\identity{\mathop{\rm Id}\nolimits} -\def\diff{\mathop{\Delta}\nolimits} - -\providecommand{\floor}[1]{\left\lfloor#1\right\rfloor} - -\begin{document} - -\title{Integer Set Library: Manual\\ -\small Version: \input{version} } -\author{Sven Verdoolaege} - -\maketitle -\tableofcontents - -\chapter{User Manual} - -\input{user} - -\chapter{Implementation Details} - -\input{implementation} - -\bibliography{isl} -\bibliographystyle{chicago} - -\end{document} diff --git a/cloog-0.17.0/isl/doc/mypod2latex b/cloog-0.17.0/isl/doc/mypod2latex deleted file mode 100755 index b11c0593d01544b000bb999775c1af0a33609f90..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/mypod2latex +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Pod::LaTeX; - -my ($in, $out) = @ARGV; - -my $parser = new Pod::LaTeX( - AddPreamble => 0, - AddPostamble => 0, - LevelNoNum => 5, - ); - -$parser->parse_from_file($in, $out); diff --git a/cloog-0.17.0/isl/doc/user.pod b/cloog-0.17.0/isl/doc/user.pod deleted file mode 100644 index 720a12a95a612521982d7544ffa688c2960de237..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/doc/user.pod +++ /dev/null @@ -1,4267 +0,0 @@ -=head1 Introduction - -C is a thread-safe C library for manipulating -sets and relations of integer points bounded by affine constraints. -The descriptions of the sets and relations may involve -both parameters and existentially quantified variables. -All computations are performed in exact integer arithmetic -using C. -The C library offers functionality that is similar -to that offered by the C and C libraries, -but the underlying algorithms are in most cases completely different. - -The library is by no means complete and some fairly basic -functionality is still missing. -Still, even in its current form, the library has been successfully -used as a backend polyhedral library for the polyhedral -scanner C and as part of an equivalence checker of -static affine programs. -For bug reports, feature requests and questions, -visit the the discussion group at -L. - -=head2 Backward Incompatible Changes - -=head3 Changes since isl-0.02 - -=over - -=item * The old printing functions have been deprecated -and replaced by C functions, see L. - -=item * Most functions related to dependence analysis have acquired -an extra C argument. To obtain the old behavior, this argument -should be given the value 1. See L. - -=back - -=head3 Changes since isl-0.03 - -=over - -=item * The function C has been -renamed to C. -Similarly, C has been -renamed to C. - -=back - -=head3 Changes since isl-0.04 - -=over - -=item * All header files have been renamed from C -to C. - -=back - -=head3 Changes since isl-0.05 - -=over - -=item * The functions C and -C no longer print a newline. - -=item * The functions C -and C now return -the accesses for which no source could be found instead of -the iterations where those accesses occur. - -=item * The functions C and -C now take a B space as input. An old call -C can be rewritten to -C. - -=item * The function C no longer takes -a parameter position as input. Instead, the exponent -is now expressed as the domain of the resulting relation. - -=back - -=head3 Changes since isl-0.06 - -=over - -=item * The format of C's -C output has changed. -Use C to obtain the old output. - -=item * The C<*_fast_*> functions have been renamed to C<*_plain_*>. -Some of the old names have been kept for backward compatibility, -but they will be removed in the future. - -=back - -=head3 Changes since isl-0.07 - -=over - -=item * The function C has been renamed to -C. -Similarly, the function C has been renamed to -C. - -=item * The C type has been renamed to C -along with the associated functions. -Some of the old names have been kept for backward compatibility, -but they will be removed in the future. - -=item * Spaces of maps, sets and parameter domains are now -treated differently. The distinction between map spaces and set spaces -has always been made on a conceptual level, but proper use of such spaces -was never checked. Furthermore, up until isl-0.07 there was no way -of explicitly creating a parameter space. These can now be created -directly using C or from other spaces using -C. - -=item * The space in which C, C, C, -C, C and C -objects live is now a map space -instead of a set space. This means, for example, that the dimensions -of the domain of an C are now considered to be of type -C instead of C. Extra functions have been -added to obtain the domain space. Some of the constructors still -take a domain space and have therefore been renamed. - -=item * The functions C and C -now take an C instead of an C. -An C can be created from an C -using C. - -=item * The C type has been removed. Functions that used -to return an C now return an C. -Note that the space of an C is that of relation. -When replacing a call to C by a call to -C any C argument needs -to be replaced by C. -A call to C can be replaced by a call -to C. -A call to C call be replaced by -the nested call - - isl_qpolynomial_from_aff(isl_aff_floor(div)) - -The function C has also been renamed -to C. - -=item * The C argument has been removed from -C and similar functions. -When reading input in the original PolyLib format, -the result will have no parameters. -If parameters are expected, the caller may want to perform -dimension manipulation on the result. - -=back - -=head1 Installation - -The source of C can be obtained either as a tarball -or from the git repository. Both are available from -L. -The installation process depends on how you obtained -the source. - -=head2 Installation from the git repository - -=over - -=item 1 Clone or update the repository - -The first time the source is obtained, you need to clone -the repository. - - git clone git://repo.or.cz/isl.git - -To obtain updates, you need to pull in the latest changes - - git pull - -=item 2 Generate C - - ./autogen.sh - -=back - -After performing the above steps, continue -with the L. - -=head2 Common installation instructions - -=over - -=item 1 Obtain C - -Building C requires C, including its headers files. -Your distribution may not provide these header files by default -and you may need to install a package called C or something -similar. Alternatively, C can be built from -source, available from L. - -=item 2 Configure - -C uses the standard C C script. -To run it, just type - - ./configure - -optionally followed by some configure options. -A complete list of options can be obtained by running - - ./configure --help - -Below we discuss some of the more common options. - -C can optionally use C, but no -C functionality is currently used by default. -The C<--with-piplib> option can -be used to specify which C -library to use, either an installed version (C), -an externally built version (C) -or no version (C). The option C is mostly useful -in C scripts of larger projects that bundle both C -and C. - -=over - -=item C<--prefix> - -Installation prefix for C - -=item C<--with-gmp-prefix> - -Installation prefix for C (architecture-independent files). - -=item C<--with-gmp-exec-prefix> - -Installation prefix for C (architecture-dependent files). - -=item C<--with-piplib> - -Which copy of C to use, either C (default), C or C. - -=item C<--with-piplib-prefix> - -Installation prefix for C C (architecture-independent files). - -=item C<--with-piplib-exec-prefix> - -Installation prefix for C C (architecture-dependent files). - -=item C<--with-piplib-builddir> - -Location where C C was built. - -=back - -=item 3 Compile - - make - -=item 4 Install (optional) - - make install - -=back - -=head1 Library - -=head2 Initialization - -All manipulations of integer sets and relations occur within -the context of an C. -A given C can only be used within a single thread. -All arguments of a function are required to have been allocated -within the same context. -There are currently no functions available for moving an object -from one C to another C. This means that -there is currently no way of safely moving an object from one -thread to another, unless the whole C is moved. - -An C can be allocated using C and -freed using C. -All objects allocated within an C should be freed -before the C itself is freed. - - isl_ctx *isl_ctx_alloc(); - void isl_ctx_free(isl_ctx *ctx); - -=head2 Integers - -All operations on integers, mainly the coefficients -of the constraints describing the sets and relations, -are performed in exact integer arithmetic using C. -However, to allow future versions of C to optionally -support fixed integer arithmetic, all calls to C -are wrapped inside C specific macros. -The basic type is C and the operations below -are available on this type. -The meanings of these operations are essentially the same -as their C C counterparts. -As always with C types, Cs need to be -initialized with C before they can be used -and they need to be released with C -after the last use. -The user should not assume that an C is represented -as a C, but should instead explicitly convert between -Cs and Cs using C and -C whenever a C is required. - -=over - -=item isl_int_init(i) - -=item isl_int_clear(i) - -=item isl_int_set(r,i) - -=item isl_int_set_si(r,i) - -=item isl_int_set_gmp(r,g) - -=item isl_int_get_gmp(i,g) - -=item isl_int_abs(r,i) - -=item isl_int_neg(r,i) - -=item isl_int_swap(i,j) - -=item isl_int_swap_or_set(i,j) - -=item isl_int_add_ui(r,i,j) - -=item isl_int_sub_ui(r,i,j) - -=item isl_int_add(r,i,j) - -=item isl_int_sub(r,i,j) - -=item isl_int_mul(r,i,j) - -=item isl_int_mul_ui(r,i,j) - -=item isl_int_addmul(r,i,j) - -=item isl_int_submul(r,i,j) - -=item isl_int_gcd(r,i,j) - -=item isl_int_lcm(r,i,j) - -=item isl_int_divexact(r,i,j) - -=item isl_int_cdiv_q(r,i,j) - -=item isl_int_fdiv_q(r,i,j) - -=item isl_int_fdiv_r(r,i,j) - -=item isl_int_fdiv_q_ui(r,i,j) - -=item isl_int_read(r,s) - -=item isl_int_print(out,i,width) - -=item isl_int_sgn(i) - -=item isl_int_cmp(i,j) - -=item isl_int_cmp_si(i,si) - -=item isl_int_eq(i,j) - -=item isl_int_ne(i,j) - -=item isl_int_lt(i,j) - -=item isl_int_le(i,j) - -=item isl_int_gt(i,j) - -=item isl_int_ge(i,j) - -=item isl_int_abs_eq(i,j) - -=item isl_int_abs_ne(i,j) - -=item isl_int_abs_lt(i,j) - -=item isl_int_abs_gt(i,j) - -=item isl_int_abs_ge(i,j) - -=item isl_int_is_zero(i) - -=item isl_int_is_one(i) - -=item isl_int_is_negone(i) - -=item isl_int_is_pos(i) - -=item isl_int_is_neg(i) - -=item isl_int_is_nonpos(i) - -=item isl_int_is_nonneg(i) - -=item isl_int_is_divisible_by(i,j) - -=back - -=head2 Sets and Relations - -C uses six types of objects for representing sets and relations, -C, C, C, C, -C and C. -C and C represent sets and relations that -can be described as a conjunction of affine constraints, while -C and C represent unions of -Cs and Cs, respectively. -However, all Cs or Cs in the union need -to live in the same space. Cs and Cs -represent unions of Cs or Cs in I spaces, -where spaces are considered different if they have a different number -of dimensions and/or different names (see L<"Spaces">). -The difference between sets and relations (maps) is that sets have -one set of variables, while relations have two sets of variables, -input variables and output variables. - -=head2 Memory Management - -Since a high-level operation on sets and/or relations usually involves -several substeps and since the user is usually not interested in -the intermediate results, most functions that return a new object -will also release all the objects passed as arguments. -If the user still wants to use one or more of these arguments -after the function call, she should pass along a copy of the -object rather than the object itself. -The user is then responsible for making sure that the original -object gets used somewhere else or is explicitly freed. - -The arguments and return values of all documented functions are -annotated to make clear which arguments are released and which -arguments are preserved. In particular, the following annotations -are used - -=over - -=item C<__isl_give> - -C<__isl_give> means that a new object is returned. -The user should make sure that the returned pointer is -used exactly once as a value for an C<__isl_take> argument. -In between, it can be used as a value for as many -C<__isl_keep> arguments as the user likes. -There is one exception, and that is the case where the -pointer returned is C. Is this case, the user -is free to use it as an C<__isl_take> argument or not. - -=item C<__isl_take> - -C<__isl_take> means that the object the argument points to -is taken over by the function and may no longer be used -by the user as an argument to any other function. -The pointer value must be one returned by a function -returning an C<__isl_give> pointer. -If the user passes in a C value, then this will -be treated as an error in the sense that the function will -not perform its usual operation. However, it will still -make sure that all the other C<__isl_take> arguments -are released. - -=item C<__isl_keep> - -C<__isl_keep> means that the function will only use the object -temporarily. After the function has finished, the user -can still use it as an argument to other functions. -A C value will be treated in the same way as -a C value for an C<__isl_take> argument. - -=back - -=head2 Error Handling - -C supports different ways to react in case a runtime error is triggered. -Runtime errors arise, e.g., if a function such as C is called -with two maps that have incompatible spaces. There are three possible ways -to react on error: to warn, to continue or to abort. - -The default behavior is to warn. In this mode, C prints a warning, stores -the last error in the corresponding C and the function in which the -error was triggered returns C. An error does not corrupt internal state, -such that isl can continue to be used. C also provides functions to -read the last error and to reset the memory that stores the last error. The -last error is only stored for information purposes. Its presence does not -change the behavior of C. Hence, resetting an error is not required to -continue to use isl, but only to observe new errors. - - #include - enum isl_error isl_ctx_last_error(isl_ctx *ctx); - void isl_ctx_reset_error(isl_ctx *ctx); - -Another option is to continue on error. This is similar to warn on error mode, -except that C does not print any warning. This allows a program to -implement its own error reporting. - -The last option is to directly abort the execution of the program from within -the isl library. This makes it obviously impossible to recover from an error, -but it allows to directly spot the error location. By aborting on error, -debuggers break at the location the error occurred and can provide a stack -trace. Other tools that automatically provide stack traces on abort or that do -not want to continue execution after an error was triggered may also prefer to -abort on error. - -The on error behavior of isl can be specified by calling -C or by setting the command line option -C<--isl-on-error>. Valid arguments for the function call are -C, C and C. The -choices for the command line option are C, C and C. -It is also possible to query the current error mode. - - #include - int isl_options_set_on_error(isl_ctx *ctx, int val); - int isl_options_get_on_error(isl_ctx *ctx); - -=head2 Identifiers - -Identifiers are used to identify both individual dimensions -and tuples of dimensions. They consist of a name and an optional -pointer. Identifiers with the same name but different pointer values -are considered to be distinct. -Identifiers can be constructed, copied, freed, inspected and printed -using the following functions. - - #include - __isl_give isl_id *isl_id_alloc(isl_ctx *ctx, - __isl_keep const char *name, void *user); - __isl_give isl_id *isl_id_copy(isl_id *id); - void *isl_id_free(__isl_take isl_id *id); - - isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id); - void *isl_id_get_user(__isl_keep isl_id *id); - __isl_keep const char *isl_id_get_name(__isl_keep isl_id *id); - - __isl_give isl_printer *isl_printer_print_id( - __isl_take isl_printer *p, __isl_keep isl_id *id); - -Note that C returns a pointer to some internal -data structure, so the result can only be used while the -corresponding C is alive. - -=head2 Spaces - -Whenever a new set or relation is created from scratch, -the space in which it lives needs to be specified using an C. - - #include - __isl_give isl_space *isl_space_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out); - __isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, - unsigned nparam); - __isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim); - __isl_give isl_space *isl_space_copy(__isl_keep isl_space *space); - void isl_space_free(__isl_take isl_space *space); - unsigned isl_space_dim(__isl_keep isl_space *space, - enum isl_dim_type type); - -The space used for creating a parameter domain -needs to be created using C. -For other sets, the space -needs to be created using C, while -for a relation, the space -needs to be created using C. -C can be used -to find out the number of dimensions of each type in -a space, where type may be -C, C (only for relations), -C (only for relations), C -(only for sets) or C. - -To check whether a given space is that of a set or a map -or whether it is a parameter space, use these functions: - - #include - int isl_space_is_params(__isl_keep isl_space *space); - int isl_space_is_set(__isl_keep isl_space *space); - -It is often useful to create objects that live in the -same space as some other object. This can be accomplished -by creating the new objects -(see L or -L) based on the space -of the original object. - - #include - __isl_give isl_space *isl_basic_set_get_space( - __isl_keep isl_basic_set *bset); - __isl_give isl_space *isl_set_get_space(__isl_keep isl_set *set); - - #include - __isl_give isl_space *isl_union_set_get_space( - __isl_keep isl_union_set *uset); - - #include - __isl_give isl_space *isl_basic_map_get_space( - __isl_keep isl_basic_map *bmap); - __isl_give isl_space *isl_map_get_space(__isl_keep isl_map *map); - - #include - __isl_give isl_space *isl_union_map_get_space( - __isl_keep isl_union_map *umap); - - #include - __isl_give isl_space *isl_constraint_get_space( - __isl_keep isl_constraint *constraint); - - #include - __isl_give isl_space *isl_qpolynomial_get_domain_space( - __isl_keep isl_qpolynomial *qp); - __isl_give isl_space *isl_qpolynomial_get_space( - __isl_keep isl_qpolynomial *qp); - __isl_give isl_space *isl_qpolynomial_fold_get_space( - __isl_keep isl_qpolynomial_fold *fold); - __isl_give isl_space *isl_pw_qpolynomial_get_domain_space( - __isl_keep isl_pw_qpolynomial *pwqp); - __isl_give isl_space *isl_pw_qpolynomial_get_space( - __isl_keep isl_pw_qpolynomial *pwqp); - __isl_give isl_space *isl_pw_qpolynomial_fold_get_domain_space( - __isl_keep isl_pw_qpolynomial_fold *pwf); - __isl_give isl_space *isl_pw_qpolynomial_fold_get_space( - __isl_keep isl_pw_qpolynomial_fold *pwf); - __isl_give isl_space *isl_union_pw_qpolynomial_get_space( - __isl_keep isl_union_pw_qpolynomial *upwqp); - __isl_give isl_space *isl_union_pw_qpolynomial_fold_get_space( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - - #include - __isl_give isl_space *isl_aff_get_domain_space( - __isl_keep isl_aff *aff); - __isl_give isl_space *isl_aff_get_space( - __isl_keep isl_aff *aff); - __isl_give isl_space *isl_pw_aff_get_domain_space( - __isl_keep isl_pw_aff *pwaff); - __isl_give isl_space *isl_pw_aff_get_space( - __isl_keep isl_pw_aff *pwaff); - __isl_give isl_space *isl_multi_aff_get_space( - __isl_keep isl_multi_aff *maff); - __isl_give isl_space *isl_pw_multi_aff_get_domain_space( - __isl_keep isl_pw_multi_aff *pma); - __isl_give isl_space *isl_pw_multi_aff_get_space( - __isl_keep isl_pw_multi_aff *pma); - - #include - __isl_give isl_space *isl_point_get_space( - __isl_keep isl_point *pnt); - -The identifiers or names of the individual dimensions may be set or read off -using the following functions. - - #include - __isl_give isl_space *isl_space_set_dim_id( - __isl_take isl_space *space, - enum isl_dim_type type, unsigned pos, - __isl_take isl_id *id); - int isl_space_has_dim_id(__isl_keep isl_space *space, - enum isl_dim_type type, unsigned pos); - __isl_give isl_id *isl_space_get_dim_id( - __isl_keep isl_space *space, - enum isl_dim_type type, unsigned pos); - __isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *space, - enum isl_dim_type type, unsigned pos, - __isl_keep const char *name); - __isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *space, - enum isl_dim_type type, unsigned pos); - -Note that C returns a pointer to some internal -data structure, so the result can only be used while the -corresponding C is alive. -Also note that every function that operates on two sets or relations -requires that both arguments have the same parameters. This also -means that if one of the arguments has named parameters, then the -other needs to have named parameters too and the names need to match. -Pairs of C, C, C and/or C -arguments may have different parameters (as long as they are named), -in which case the result will have as parameters the union of the parameters of -the arguments. - -Given the identifier or name of a dimension (typically a parameter), -its position can be obtained from the following function. - - #include - int isl_space_find_dim_by_id(__isl_keep isl_space *space, - enum isl_dim_type type, __isl_keep isl_id *id); - int isl_space_find_dim_by_name(__isl_keep isl_space *space, - enum isl_dim_type type, const char *name); - -The identifiers or names of entire spaces may be set or read off -using the following functions. - - #include - __isl_give isl_space *isl_space_set_tuple_id( - __isl_take isl_space *space, - enum isl_dim_type type, __isl_take isl_id *id); - __isl_give isl_space *isl_space_reset_tuple_id( - __isl_take isl_space *space, enum isl_dim_type type); - int isl_space_has_tuple_id(__isl_keep isl_space *space, - enum isl_dim_type type); - __isl_give isl_id *isl_space_get_tuple_id( - __isl_keep isl_space *space, enum isl_dim_type type); - __isl_give isl_space *isl_space_set_tuple_name( - __isl_take isl_space *space, - enum isl_dim_type type, const char *s); - const char *isl_space_get_tuple_name(__isl_keep isl_space *space, - enum isl_dim_type type); - -The C argument needs to be one of C, C -or C. As with C, -the C function returns a pointer to some internal -data structure. -Binary operations require the corresponding spaces of their arguments -to have the same name. - -Spaces can be nested. In particular, the domain of a set or -the domain or range of a relation can be a nested relation. -The following functions can be used to construct and deconstruct -such nested spaces. - - #include - int isl_space_is_wrapping(__isl_keep isl_space *space); - __isl_give isl_space *isl_space_wrap(__isl_take isl_space *space); - __isl_give isl_space *isl_space_unwrap(__isl_take isl_space *space); - -The input to C and C should -be the space of a set, while that of -C should be the space of a relation. -Conversely, the output of C is the space -of a relation, while that of C is the space of a set. - -Spaces can be created from other spaces -using the following functions. - - __isl_give isl_space *isl_space_domain(__isl_take isl_space *space); - __isl_give isl_space *isl_space_from_domain(__isl_take isl_space *space); - __isl_give isl_space *isl_space_range(__isl_take isl_space *space); - __isl_give isl_space *isl_space_from_range(__isl_take isl_space *space); - __isl_give isl_space *isl_space_params( - __isl_take isl_space *space); - __isl_give isl_space *isl_space_set_from_params( - __isl_take isl_space *space); - __isl_give isl_space *isl_space_reverse(__isl_take isl_space *space); - __isl_give isl_space *isl_space_join(__isl_take isl_space *left, - __isl_take isl_space *right); - __isl_give isl_space *isl_space_align_params( - __isl_take isl_space *space1, __isl_take isl_space *space2) - __isl_give isl_space *isl_space_insert_dims(__isl_take isl_space *space, - enum isl_dim_type type, unsigned pos, unsigned n); - __isl_give isl_space *isl_space_add_dims(__isl_take isl_space *space, - enum isl_dim_type type, unsigned n); - __isl_give isl_space *isl_space_drop_dims(__isl_take isl_space *space, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_space *isl_space_move_dims(__isl_take isl_space *space, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, - unsigned n); - __isl_give isl_space *isl_space_map_from_set( - __isl_take isl_space *space); - __isl_give isl_space *isl_space_zip(__isl_take isl_space *space); - -Note that if dimensions are added or removed from a space, then -the name and the internal structure are lost. - -=head2 Local Spaces - -A local space is essentially a space with -zero or more existentially quantified variables. -The local space of a basic set or relation can be obtained -using the following functions. - - #include - __isl_give isl_local_space *isl_basic_set_get_local_space( - __isl_keep isl_basic_set *bset); - - #include - __isl_give isl_local_space *isl_basic_map_get_local_space( - __isl_keep isl_basic_map *bmap); - -A new local space can be created from a space using - - #include - __isl_give isl_local_space *isl_local_space_from_space( - __isl_take isl_space *space); - -They can be inspected, modified, copied and freed using the following functions. - - #include - isl_ctx *isl_local_space_get_ctx( - __isl_keep isl_local_space *ls); - int isl_local_space_is_set(__isl_keep isl_local_space *ls); - int isl_local_space_dim(__isl_keep isl_local_space *ls, - enum isl_dim_type type); - const char *isl_local_space_get_dim_name( - __isl_keep isl_local_space *ls, - enum isl_dim_type type, unsigned pos); - __isl_give isl_local_space *isl_local_space_set_dim_name( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, const char *s); - __isl_give isl_local_space *isl_local_space_set_dim_id( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, - __isl_take isl_id *id); - __isl_give isl_space *isl_local_space_get_space( - __isl_keep isl_local_space *ls); - __isl_give isl_aff *isl_local_space_get_div( - __isl_keep isl_local_space *ls, int pos); - __isl_give isl_local_space *isl_local_space_copy( - __isl_keep isl_local_space *ls); - void *isl_local_space_free(__isl_take isl_local_space *ls); - -Two local spaces can be compared using - - int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, - __isl_keep isl_local_space *ls2); - -Local spaces can be created from other local spaces -using the following functions. - - __isl_give isl_local_space *isl_local_space_domain( - __isl_take isl_local_space *ls); - __isl_give isl_local_space *isl_local_space_range( - __isl_take isl_local_space *ls); - __isl_give isl_local_space *isl_local_space_from_domain( - __isl_take isl_local_space *ls); - __isl_give isl_local_space *isl_local_space_intersect( - __isl_take isl_local_space *ls1, - __isl_take isl_local_space *ls2); - __isl_give isl_local_space *isl_local_space_add_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned n); - __isl_give isl_local_space *isl_local_space_insert_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_local_space *isl_local_space_drop_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); - -=head2 Input and Output - -C supports its own input/output format, which is similar -to the C format, but also supports the C format -in some cases. - -=head3 C format - -The C format is similar to that of C, but has a different -syntax for describing the parameters and allows for the definition -of an existentially quantified variable as the integer division -of an affine expression. -For example, the set of integers C between C<0> and C -such that C can be described as - - [n] -> { [i] : exists (a = [i/10] : 0 <= i and i <= n and - i - 10 a <= 6) } - -A set or relation can have several disjuncts, separated -by the keyword C. Each disjunct is either a conjunction -of constraints or a projection (C) of a conjunction -of constraints. The constraints are separated by the keyword -C. - -=head3 C format - -If the represented set is a union, then the first line -contains a single number representing the number of disjuncts. -Otherwise, a line containing the number C<1> is optional. - -Each disjunct is represented by a matrix of constraints. -The first line contains two numbers representing -the number of rows and columns, -where the number of rows is equal to the number of constraints -and the number of columns is equal to two plus the number of variables. -The following lines contain the actual rows of the constraint matrix. -In each row, the first column indicates whether the constraint -is an equality (C<0>) or inequality (C<1>). The final column -corresponds to the constant term. - -If the set is parametric, then the coefficients of the parameters -appear in the last columns before the constant column. -The coefficients of any existentially quantified variables appear -between those of the set variables and those of the parameters. - -=head3 Extended C format - -The extended C format is nearly identical to the -C format. The only difference is that the line -containing the number of rows and columns of a constraint matrix -also contains four additional numbers: -the number of output dimensions, the number of input dimensions, -the number of local dimensions (i.e., the number of existentially -quantified variables) and the number of parameters. -For sets, the number of ``output'' dimensions is equal -to the number of set dimensions, while the number of ``input'' -dimensions is zero. - -=head3 Input - - #include - __isl_give isl_basic_set *isl_basic_set_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_basic_set *isl_basic_set_read_from_str( - isl_ctx *ctx, const char *str); - __isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx, - FILE *input); - __isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx, - const char *str); - - #include - __isl_give isl_basic_map *isl_basic_map_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_basic_map *isl_basic_map_read_from_str( - isl_ctx *ctx, const char *str); - __isl_give isl_map *isl_map_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx, - const char *str); - - #include - __isl_give isl_union_set *isl_union_set_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_union_set *isl_union_set_read_from_str( - isl_ctx *ctx, const char *str); - - #include - __isl_give isl_union_map *isl_union_map_read_from_file( - isl_ctx *ctx, FILE *input); - __isl_give isl_union_map *isl_union_map_read_from_str( - isl_ctx *ctx, const char *str); - -The input format is autodetected and may be either the C format -or the C format. - -=head3 Output - -Before anything can be printed, an C needs to -be created. - - __isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, - FILE *file); - __isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx); - void isl_printer_free(__isl_take isl_printer *printer); - __isl_give char *isl_printer_get_str( - __isl_keep isl_printer *printer); - -The behavior of the printer can be modified in various ways - - __isl_give isl_printer *isl_printer_set_output_format( - __isl_take isl_printer *p, int output_format); - __isl_give isl_printer *isl_printer_set_indent( - __isl_take isl_printer *p, int indent); - __isl_give isl_printer *isl_printer_indent( - __isl_take isl_printer *p, int indent); - __isl_give isl_printer *isl_printer_set_prefix( - __isl_take isl_printer *p, const char *prefix); - __isl_give isl_printer *isl_printer_set_suffix( - __isl_take isl_printer *p, const char *suffix); - -The C may be either C, C, -C, C or C -and defaults to C. -Each line in the output is indented by C (set by -C) spaces -(default: 0), prefixed by C and suffixed by C. -In the C format output, -the coefficients of the existentially quantified variables -appear between those of the set variables and those -of the parameters. -The function C increases the indentation -by the specified amount (which may be negative). - -To actually print something, use - - #include - __isl_give isl_printer *isl_printer_print_basic_set( - __isl_take isl_printer *printer, - __isl_keep isl_basic_set *bset); - __isl_give isl_printer *isl_printer_print_set( - __isl_take isl_printer *printer, - __isl_keep isl_set *set); - - #include - __isl_give isl_printer *isl_printer_print_basic_map( - __isl_take isl_printer *printer, - __isl_keep isl_basic_map *bmap); - __isl_give isl_printer *isl_printer_print_map( - __isl_take isl_printer *printer, - __isl_keep isl_map *map); - - #include - __isl_give isl_printer *isl_printer_print_union_set( - __isl_take isl_printer *p, - __isl_keep isl_union_set *uset); - - #include - __isl_give isl_printer *isl_printer_print_union_map( - __isl_take isl_printer *p, - __isl_keep isl_union_map *umap); - -When called on a file printer, the following function flushes -the file. When called on a string printer, the buffer is cleared. - - __isl_give isl_printer *isl_printer_flush( - __isl_take isl_printer *p); - -=head2 Creating New Sets and Relations - -C has functions for creating some standard sets and relations. - -=over - -=item * Empty sets and relations - - __isl_give isl_basic_set *isl_basic_set_empty( - __isl_take isl_space *space); - __isl_give isl_basic_map *isl_basic_map_empty( - __isl_take isl_space *space); - __isl_give isl_set *isl_set_empty( - __isl_take isl_space *space); - __isl_give isl_map *isl_map_empty( - __isl_take isl_space *space); - __isl_give isl_union_set *isl_union_set_empty( - __isl_take isl_space *space); - __isl_give isl_union_map *isl_union_map_empty( - __isl_take isl_space *space); - -For Cs and Cs, the space -is only used to specify the parameters. - -=item * Universe sets and relations - - __isl_give isl_basic_set *isl_basic_set_universe( - __isl_take isl_space *space); - __isl_give isl_basic_map *isl_basic_map_universe( - __isl_take isl_space *space); - __isl_give isl_set *isl_set_universe( - __isl_take isl_space *space); - __isl_give isl_map *isl_map_universe( - __isl_take isl_space *space); - __isl_give isl_union_set *isl_union_set_universe( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_universe( - __isl_take isl_union_map *umap); - -The sets and relations constructed by the functions above -contain all integer values, while those constructed by the -functions below only contain non-negative values. - - __isl_give isl_basic_set *isl_basic_set_nat_universe( - __isl_take isl_space *space); - __isl_give isl_basic_map *isl_basic_map_nat_universe( - __isl_take isl_space *space); - __isl_give isl_set *isl_set_nat_universe( - __isl_take isl_space *space); - __isl_give isl_map *isl_map_nat_universe( - __isl_take isl_space *space); - -=item * Identity relations - - __isl_give isl_basic_map *isl_basic_map_identity( - __isl_take isl_space *space); - __isl_give isl_map *isl_map_identity( - __isl_take isl_space *space); - -The number of input and output dimensions in C needs -to be the same. - -=item * Lexicographic order - - __isl_give isl_map *isl_map_lex_lt( - __isl_take isl_space *set_space); - __isl_give isl_map *isl_map_lex_le( - __isl_take isl_space *set_space); - __isl_give isl_map *isl_map_lex_gt( - __isl_take isl_space *set_space); - __isl_give isl_map *isl_map_lex_ge( - __isl_take isl_space *set_space); - __isl_give isl_map *isl_map_lex_lt_first( - __isl_take isl_space *space, unsigned n); - __isl_give isl_map *isl_map_lex_le_first( - __isl_take isl_space *space, unsigned n); - __isl_give isl_map *isl_map_lex_gt_first( - __isl_take isl_space *space, unsigned n); - __isl_give isl_map *isl_map_lex_ge_first( - __isl_take isl_space *space, unsigned n); - -The first four functions take a space for a B -and return relations that express that the elements in the domain -are lexicographically less -(C), less or equal (C), -greater (C) or greater or equal (C) -than the elements in the range. -The last four functions take a space for a map -and return relations that express that the first C dimensions -in the domain are lexicographically less -(C), less or equal (C), -greater (C) or greater or equal (C) -than the first C dimensions in the range. - -=back - -A basic set or relation can be converted to a set or relation -using the following functions. - - __isl_give isl_set *isl_set_from_basic_set( - __isl_take isl_basic_set *bset); - __isl_give isl_map *isl_map_from_basic_map( - __isl_take isl_basic_map *bmap); - -Sets and relations can be converted to union sets and relations -using the following functions. - - __isl_give isl_union_map *isl_union_map_from_map( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_from_set( - __isl_take isl_set *set); - -The inverse conversions below can only be used if the input -union set or relation is known to contain elements in exactly one -space. - - __isl_give isl_set *isl_set_from_union_set( - __isl_take isl_union_set *uset); - __isl_give isl_map *isl_map_from_union_map( - __isl_take isl_union_map *umap); - -A zero-dimensional set can be constructed on a given parameter domain -using the following function. - - __isl_give isl_set *isl_set_from_params( - __isl_take isl_set *set); - -Sets and relations can be copied and freed again using the following -functions. - - __isl_give isl_basic_set *isl_basic_set_copy( - __isl_keep isl_basic_set *bset); - __isl_give isl_set *isl_set_copy(__isl_keep isl_set *set); - __isl_give isl_union_set *isl_union_set_copy( - __isl_keep isl_union_set *uset); - __isl_give isl_basic_map *isl_basic_map_copy( - __isl_keep isl_basic_map *bmap); - __isl_give isl_map *isl_map_copy(__isl_keep isl_map *map); - __isl_give isl_union_map *isl_union_map_copy( - __isl_keep isl_union_map *umap); - void isl_basic_set_free(__isl_take isl_basic_set *bset); - void isl_set_free(__isl_take isl_set *set); - void *isl_union_set_free(__isl_take isl_union_set *uset); - void isl_basic_map_free(__isl_take isl_basic_map *bmap); - void isl_map_free(__isl_take isl_map *map); - void *isl_union_map_free(__isl_take isl_union_map *umap); - -Other sets and relations can be constructed by starting -from a universe set or relation, adding equality and/or -inequality constraints and then projecting out the -existentially quantified variables, if any. -Constraints can be constructed, manipulated and -added to (or removed from) (basic) sets and relations -using the following functions. - - #include - __isl_give isl_constraint *isl_equality_alloc( - __isl_take isl_local_space *ls); - __isl_give isl_constraint *isl_inequality_alloc( - __isl_take isl_local_space *ls); - __isl_give isl_constraint *isl_constraint_set_constant( - __isl_take isl_constraint *constraint, isl_int v); - __isl_give isl_constraint *isl_constraint_set_constant_si( - __isl_take isl_constraint *constraint, int v); - __isl_give isl_constraint *isl_constraint_set_coefficient( - __isl_take isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int v); - __isl_give isl_constraint *isl_constraint_set_coefficient_si( - __isl_take isl_constraint *constraint, - enum isl_dim_type type, int pos, int v); - __isl_give isl_basic_map *isl_basic_map_add_constraint( - __isl_take isl_basic_map *bmap, - __isl_take isl_constraint *constraint); - __isl_give isl_basic_set *isl_basic_set_add_constraint( - __isl_take isl_basic_set *bset, - __isl_take isl_constraint *constraint); - __isl_give isl_map *isl_map_add_constraint( - __isl_take isl_map *map, - __isl_take isl_constraint *constraint); - __isl_give isl_set *isl_set_add_constraint( - __isl_take isl_set *set, - __isl_take isl_constraint *constraint); - __isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, - __isl_take isl_constraint *constraint); - -For example, to create a set containing the even integers -between 10 and 42, you would use the following code. - - isl_space *space; - isl_local_space *ls; - isl_constraint *c; - isl_basic_set *bset; - - space = isl_space_set_alloc(ctx, 0, 2); - bset = isl_basic_set_universe(isl_space_copy(space)); - ls = isl_local_space_from_space(space); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - c = isl_constraint_set_coefficient_si(c, isl_dim_set, 0, -1); - c = isl_constraint_set_coefficient_si(c, isl_dim_set, 1, 2); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_inequality_alloc(isl_local_space_copy(ls)); - c = isl_constraint_set_constant_si(c, -10); - c = isl_constraint_set_coefficient_si(c, isl_dim_set, 0, 1); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_inequality_alloc(ls); - c = isl_constraint_set_constant_si(c, 42); - c = isl_constraint_set_coefficient_si(c, isl_dim_set, 0, -1); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 1); - -Or, alternatively, - - isl_basic_set *bset; - bset = isl_basic_set_read_from_str(ctx, - "{[i] : exists (a : i = 2a and i >= 10 and i <= 42)}"); - -A basic set or relation can also be constructed from two matrices -describing the equalities and the inequalities. - - __isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( - __isl_take isl_space *space, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4); - __isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( - __isl_take isl_space *space, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - -The C arguments indicate the order in which -different kinds of variables appear in the input matrices -and should be a permutation of C, C, -C and C for sets and -of C, C, -C, C and C for relations. - -A (basic) set or relation can also be constructed from a (piecewise) -(multiple) affine expression -or a list of affine expressions -(See L<"Piecewise Quasi Affine Expressions"> and -L<"Piecewise Multiple Quasi Affine Expressions">). - - __isl_give isl_basic_map *isl_basic_map_from_aff( - __isl_take isl_aff *aff); - __isl_give isl_set *isl_set_from_pw_aff( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_map *isl_map_from_pw_aff( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_basic_map *isl_basic_map_from_aff_list( - __isl_take isl_space *domain_space, - __isl_take isl_aff_list *list); - __isl_give isl_basic_map *isl_basic_map_from_multi_aff( - __isl_take isl_multi_aff *maff) - __isl_give isl_set *isl_set_from_pw_multi_aff( - __isl_take isl_pw_multi_aff *pma); - __isl_give isl_map *isl_map_from_pw_multi_aff( - __isl_take isl_pw_multi_aff *pma); - -The C argument describes the domain of the resulting -basic relation. It is required because the C may consist -of zero affine expressions. - -=head2 Inspecting Sets and Relations - -Usually, the user should not have to care about the actual constraints -of the sets and maps, but should instead apply the abstract operations -explained in the following sections. -Occasionally, however, it may be required to inspect the individual -coefficients of the constraints. This section explains how to do so. -In these cases, it may also be useful to have C compute -an explicit representation of the existentially quantified variables. - - __isl_give isl_set *isl_set_compute_divs( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_compute_divs( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_compute_divs( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_compute_divs( - __isl_take isl_union_map *umap); - -This explicit representation defines the existentially quantified -variables as integer divisions of the other variables, possibly -including earlier existentially quantified variables. -An explicitly represented existentially quantified variable therefore -has a unique value when the values of the other variables are known. -If, furthermore, the same existentials, i.e., existentials -with the same explicit representations, should appear in the -same order in each of the disjuncts of a set or map, then the user should call -either of the following functions. - - __isl_give isl_set *isl_set_align_divs( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_align_divs( - __isl_take isl_map *map); - -Alternatively, the existentially quantified variables can be removed -using the following functions, which compute an overapproximation. - - __isl_give isl_basic_set *isl_basic_set_remove_divs( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_remove_divs( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_remove_divs( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_remove_divs( - __isl_take isl_map *map); - -To iterate over all the sets or maps in a union set or map, use - - int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_set *set, void *user), - void *user); - int isl_union_map_foreach_map(__isl_keep isl_union_map *umap, - int (*fn)(__isl_take isl_map *map, void *user), - void *user); - -The number of sets or maps in a union set or map can be obtained -from - - int isl_union_set_n_set(__isl_keep isl_union_set *uset); - int isl_union_map_n_map(__isl_keep isl_union_map *umap); - -To extract the set or map in a given space from a union, use - - __isl_give isl_set *isl_union_set_extract_set( - __isl_keep isl_union_set *uset, - __isl_take isl_space *space); - __isl_give isl_map *isl_union_map_extract_map( - __isl_keep isl_union_map *umap, - __isl_take isl_space *space); - -To iterate over all the basic sets or maps in a set or map, use - - int isl_set_foreach_basic_set(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_basic_set *bset, void *user), - void *user); - int isl_map_foreach_basic_map(__isl_keep isl_map *map, - int (*fn)(__isl_take isl_basic_map *bmap, void *user), - void *user); - -The callback function C should return 0 if successful and --1 if an error occurs. In the latter case, or if any other error -occurs, the above functions will return -1. - -It should be noted that C does not guarantee that -the basic sets or maps passed to C are disjoint. -If this is required, then the user should call one of -the following functions first. - - __isl_give isl_set *isl_set_make_disjoint( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_make_disjoint( - __isl_take isl_map *map); - -The number of basic sets in a set can be obtained -from - - int isl_set_n_basic_set(__isl_keep isl_set *set); - -To iterate over the constraints of a basic set or map, use - - #include - - int isl_basic_map_foreach_constraint( - __isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_constraint *c, void *user), - void *user); - void *isl_constraint_free(__isl_take isl_constraint *c); - -Again, the callback function C should return 0 if successful and --1 if an error occurs. In the latter case, or if any other error -occurs, the above functions will return -1. -The constraint C represents either an equality or an inequality. -Use the following function to find out whether a constraint -represents an equality. If not, it represents an inequality. - - int isl_constraint_is_equality( - __isl_keep isl_constraint *constraint); - -The coefficients of the constraints can be inspected using -the following functions. - - void isl_constraint_get_constant( - __isl_keep isl_constraint *constraint, isl_int *v); - void isl_constraint_get_coefficient( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int *v); - int isl_constraint_involves_dims( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned first, unsigned n); - -The explicit representations of the existentially quantified -variables can be inspected using the following function. -Note that the user is only allowed to use this function -if the inspected set or map is the result of a call -to C or C. -The existentially quantified variable is equal to the floor -of the returned affine expression. The affine expression -itself can be inspected using the functions in -L<"Piecewise Quasi Affine Expressions">. - - __isl_give isl_aff *isl_constraint_get_div( - __isl_keep isl_constraint *constraint, int pos); - -To obtain the constraints of a basic set or map in matrix -form, use the following functions. - - __isl_give isl_mat *isl_basic_set_equalities_matrix( - __isl_keep isl_basic_set *bset, - enum isl_dim_type c1, enum isl_dim_type c2, - enum isl_dim_type c3, enum isl_dim_type c4); - __isl_give isl_mat *isl_basic_set_inequalities_matrix( - __isl_keep isl_basic_set *bset, - enum isl_dim_type c1, enum isl_dim_type c2, - enum isl_dim_type c3, enum isl_dim_type c4); - __isl_give isl_mat *isl_basic_map_equalities_matrix( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - __isl_give isl_mat *isl_basic_map_inequalities_matrix( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - -The C arguments dictate the order in which -different kinds of variables appear in the resulting matrix -and should be a permutation of C, C, -C, C and C. - -The number of parameters, input, output or set dimensions can -be obtained using the following functions. - - unsigned isl_basic_set_dim(__isl_keep isl_basic_set *bset, - enum isl_dim_type type); - unsigned isl_basic_map_dim(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type); - unsigned isl_set_dim(__isl_keep isl_set *set, - enum isl_dim_type type); - unsigned isl_map_dim(__isl_keep isl_map *map, - enum isl_dim_type type); - -To check whether the description of a set or relation depends -on one or more given dimensions, it is not necessary to iterate over all -constraints. Instead the following functions can be used. - - int isl_basic_set_involves_dims( - __isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); - int isl_set_involves_dims(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - int isl_basic_map_involves_dims( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); - int isl_map_involves_dims(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); - -Similarly, the following functions can be used to check whether -a given dimension is involved in any lower or upper bound. - - int isl_set_dim_has_lower_bound(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - int isl_set_dim_has_upper_bound(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - -The identifiers or names of the domain and range spaces of a set -or relation can be read off or set using the following functions. - - __isl_give isl_set *isl_set_set_tuple_id( - __isl_take isl_set *set, __isl_take isl_id *id); - __isl_give isl_set *isl_set_reset_tuple_id( - __isl_take isl_set *set); - int isl_set_has_tuple_id(__isl_keep isl_set *set); - __isl_give isl_id *isl_set_get_tuple_id( - __isl_keep isl_set *set); - __isl_give isl_map *isl_map_set_tuple_id( - __isl_take isl_map *map, enum isl_dim_type type, - __isl_take isl_id *id); - __isl_give isl_map *isl_map_reset_tuple_id( - __isl_take isl_map *map, enum isl_dim_type type); - int isl_map_has_tuple_id(__isl_keep isl_map *map, - enum isl_dim_type type); - __isl_give isl_id *isl_map_get_tuple_id( - __isl_keep isl_map *map, enum isl_dim_type type); - - const char *isl_basic_set_get_tuple_name( - __isl_keep isl_basic_set *bset); - __isl_give isl_basic_set *isl_basic_set_set_tuple_name( - __isl_take isl_basic_set *set, const char *s); - const char *isl_set_get_tuple_name( - __isl_keep isl_set *set); - const char *isl_basic_map_get_tuple_name( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type); - __isl_give isl_basic_map *isl_basic_map_set_tuple_name( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, const char *s); - const char *isl_map_get_tuple_name( - __isl_keep isl_map *map, - enum isl_dim_type type); - -As with C, the value returned points to -an internal data structure. -The identifiers, positions or names of individual dimensions can be -read off using the following functions. - - __isl_give isl_set *isl_set_set_dim_id( - __isl_take isl_set *set, enum isl_dim_type type, - unsigned pos, __isl_take isl_id *id); - int isl_set_has_dim_id(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - __isl_give isl_id *isl_set_get_dim_id( - __isl_keep isl_set *set, enum isl_dim_type type, - unsigned pos); - int isl_basic_map_has_dim_id( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos); - __isl_give isl_map *isl_map_set_dim_id( - __isl_take isl_map *map, enum isl_dim_type type, - unsigned pos, __isl_take isl_id *id); - int isl_map_has_dim_id(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); - __isl_give isl_id *isl_map_get_dim_id( - __isl_keep isl_map *map, enum isl_dim_type type, - unsigned pos); - - int isl_set_find_dim_by_id(__isl_keep isl_set *set, - enum isl_dim_type type, __isl_keep isl_id *id); - int isl_map_find_dim_by_id(__isl_keep isl_map *map, - enum isl_dim_type type, __isl_keep isl_id *id); - int isl_set_find_dim_by_name(__isl_keep isl_set *set, - enum isl_dim_type type, const char *name); - int isl_map_find_dim_by_name(__isl_keep isl_map *map, - enum isl_dim_type type, const char *name); - - const char *isl_constraint_get_dim_name( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned pos); - const char *isl_basic_set_get_dim_name( - __isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos); - const char *isl_set_get_dim_name( - __isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - const char *isl_basic_map_get_dim_name( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos); - const char *isl_map_get_dim_name( - __isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); - -These functions are mostly useful to obtain the identifiers, positions -or names of the parameters. Identifiers of individual dimensions are -essentially only useful for printing. They are ignored by all other -operations and may not be preserved across those operations. - -=head2 Properties - -=head3 Unary Properties - -=over - -=item * Emptiness - -The following functions test whether the given set or relation -contains any integer points. The ``plain'' variants do not perform -any computations, but simply check if the given set or relation -is already known to be empty. - - int isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset); - int isl_basic_set_is_empty(__isl_keep isl_basic_set *bset); - int isl_set_plain_is_empty(__isl_keep isl_set *set); - int isl_set_is_empty(__isl_keep isl_set *set); - int isl_union_set_is_empty(__isl_keep isl_union_set *uset); - int isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap); - int isl_basic_map_is_empty(__isl_keep isl_basic_map *bmap); - int isl_map_plain_is_empty(__isl_keep isl_map *map); - int isl_map_is_empty(__isl_keep isl_map *map); - int isl_union_map_is_empty(__isl_keep isl_union_map *umap); - -=item * Universality - - int isl_basic_set_is_universe(__isl_keep isl_basic_set *bset); - int isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap); - int isl_set_plain_is_universe(__isl_keep isl_set *set); - -=item * Single-valuedness - - int isl_map_is_single_valued(__isl_keep isl_map *map); - int isl_union_map_is_single_valued(__isl_keep isl_union_map *umap); - -=item * Injectivity - - int isl_map_plain_is_injective(__isl_keep isl_map *map); - int isl_map_is_injective(__isl_keep isl_map *map); - int isl_union_map_plain_is_injective( - __isl_keep isl_union_map *umap); - int isl_union_map_is_injective( - __isl_keep isl_union_map *umap); - -=item * Bijectivity - - int isl_map_is_bijective(__isl_keep isl_map *map); - int isl_union_map_is_bijective(__isl_keep isl_union_map *umap); - -=item * Position - - int isl_basic_map_plain_is_fixed( - __isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, - isl_int *val); - int isl_set_plain_is_fixed(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos, - isl_int *val); - int isl_map_plain_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, - isl_int *val); - -Check if the relation obviously lies on a hyperplane where the given dimension -has a fixed value and if so, return that value in C<*val>. - -=item * Space - -To check whether a set is a parameter domain, use this function: - - int isl_set_is_params(__isl_keep isl_set *set); - int isl_union_set_is_params( - __isl_keep isl_union_set *uset); - -=item * Wrapping - -The following functions check whether the domain of the given -(basic) set is a wrapped relation. - - int isl_basic_set_is_wrapping( - __isl_keep isl_basic_set *bset); - int isl_set_is_wrapping(__isl_keep isl_set *set); - -=item * Internal Product - - int isl_basic_map_can_zip( - __isl_keep isl_basic_map *bmap); - int isl_map_can_zip(__isl_keep isl_map *map); - -Check whether the product of domain and range of the given relation -can be computed, -i.e., whether both domain and range are nested relations. - -=back - -=head3 Binary Properties - -=over - -=item * Equality - - int isl_set_plain_is_equal(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_set_is_equal(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_union_set_is_equal( - __isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - int isl_basic_map_is_equal( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - int isl_map_is_equal(__isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_map_plain_is_equal(__isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_union_map_is_equal( - __isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - -=item * Disjointness - - int isl_set_plain_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - -=item * Subset - - int isl_set_is_subset(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_set_is_strict_subset( - __isl_keep isl_set *set1, - __isl_keep isl_set *set2); - int isl_union_set_is_subset( - __isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - int isl_union_set_is_strict_subset( - __isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - int isl_basic_map_is_subset( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - int isl_basic_map_is_strict_subset( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - int isl_map_is_subset( - __isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_map_is_strict_subset( - __isl_keep isl_map *map1, - __isl_keep isl_map *map2); - int isl_union_map_is_subset( - __isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - int isl_union_map_is_strict_subset( - __isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - -=back - -=head2 Unary Operations - -=over - -=item * Complement - - __isl_give isl_set *isl_set_complement( - __isl_take isl_set *set); - -=item * Inverse map - - __isl_give isl_basic_map *isl_basic_map_reverse( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_reverse( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_reverse( - __isl_take isl_union_map *umap); - -=item * Projection - - __isl_give isl_basic_set *isl_basic_set_project_out( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_basic_set *isl_basic_set_params( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_basic_map_domain( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_set *isl_basic_map_range( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_params(__isl_take isl_set *set); - __isl_give isl_set *isl_map_params(__isl_take isl_map *map); - __isl_give isl_set *isl_map_domain( - __isl_take isl_map *bmap); - __isl_give isl_set *isl_map_range( - __isl_take isl_map *map); - __isl_give isl_set *isl_union_set_params( - __isl_take isl_union_set *uset); - __isl_give isl_set *isl_union_map_params( - __isl_take isl_union_map *umap); - __isl_give isl_union_set *isl_union_map_domain( - __isl_take isl_union_map *umap); - __isl_give isl_union_set *isl_union_map_range( - __isl_take isl_union_map *umap); - - __isl_give isl_basic_map *isl_basic_map_domain_map( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_map *isl_basic_map_range_map( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map); - __isl_give isl_map *isl_map_range_map(__isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_domain_map( - __isl_take isl_union_map *umap); - __isl_give isl_union_map *isl_union_map_range_map( - __isl_take isl_union_map *umap); - -The functions above construct a (basic, regular or union) relation -that maps (a wrapped version of) the input relation to its domain or range. - -=item * Elimination - - __isl_give isl_set *isl_set_eliminate( - __isl_take isl_set *set, enum isl_dim_type type, - unsigned first, unsigned n); - __isl_give isl_basic_map *isl_basic_map_eliminate( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, - unsigned first, unsigned n); - __isl_give isl_map *isl_map_eliminate( - __isl_take isl_map *map, enum isl_dim_type type, - unsigned first, unsigned n); - -Eliminate the coefficients for the given dimensions from the constraints, -without removing the dimensions. - -=item * Slicing - - __isl_give isl_basic_set *isl_basic_set_fix( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, - isl_int value); - __isl_give isl_basic_set *isl_basic_set_fix_si( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_set *isl_set_fix(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, - isl_int value); - __isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_basic_map *isl_basic_map_fix_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); - -Intersect the set or relation with the hyperplane where the given -dimension has the fixed given value. - - __isl_give isl_basic_map *isl_basic_map_lower_bound_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_set *isl_set_lower_bound_si( - __isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_map *isl_map_lower_bound_si( - __isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_set *isl_set_upper_bound_si( - __isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); - __isl_give isl_map *isl_map_upper_bound_si( - __isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); - -Intersect the set or relation with the half-space where the given -dimension has a value bounded the fixed given value. - - __isl_give isl_set *isl_set_equate(__isl_take isl_set *set, - enum isl_dim_type type1, int pos1, - enum isl_dim_type type2, int pos2); - __isl_give isl_map *isl_map_equate(__isl_take isl_map *map, - enum isl_dim_type type1, int pos1, - enum isl_dim_type type2, int pos2); - -Intersect the set or relation with the hyperplane where the given -dimensions are equal to each other. - - __isl_give isl_map *isl_map_oppose(__isl_take isl_map *map, - enum isl_dim_type type1, int pos1, - enum isl_dim_type type2, int pos2); - -Intersect the relation with the hyperplane where the given -dimensions have opposite values. - -=item * Identity - - __isl_give isl_map *isl_set_identity( - __isl_take isl_set *set); - __isl_give isl_union_map *isl_union_set_identity( - __isl_take isl_union_set *uset); - -Construct an identity relation on the given (union) set. - -=item * Deltas - - __isl_give isl_basic_set *isl_basic_map_deltas( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_map_deltas(__isl_take isl_map *map); - __isl_give isl_union_set *isl_union_map_deltas( - __isl_take isl_union_map *umap); - -These functions return a (basic) set containing the differences -between image elements and corresponding domain elements in the input. - - __isl_give isl_basic_map *isl_basic_map_deltas_map( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_deltas_map( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_deltas_map( - __isl_take isl_union_map *umap); - -The functions above construct a (basic, regular or union) relation -that maps (a wrapped version of) the input relation to its delta set. - -=item * Coalescing - -Simplify the representation of a set or relation by trying -to combine pairs of basic sets or relations into a single -basic set or relation. - - __isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set); - __isl_give isl_map *isl_map_coalesce(__isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_coalesce( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_coalesce( - __isl_take isl_union_map *umap); - -=item * Detecting equalities - - __isl_give isl_basic_set *isl_basic_set_detect_equalities( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_detect_equalities( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_detect_equalities( - __isl_take isl_set *set); - __isl_give isl_map *isl_map_detect_equalities( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_detect_equalities( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_detect_equalities( - __isl_take isl_union_map *umap); - -Simplify the representation of a set or relation by detecting implicit -equalities. - -=item * Removing redundant constraints - - __isl_give isl_basic_set *isl_basic_set_remove_redundancies( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_remove_redundancies( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_basic_map_remove_redundancies( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_remove_redundancies( - __isl_take isl_map *map); - -=item * Convex hull - - __isl_give isl_basic_set *isl_set_convex_hull( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_map_convex_hull( - __isl_take isl_map *map); - -If the input set or relation has any existentially quantified -variables, then the result of these operations is currently undefined. - -=item * Simple hull - - __isl_give isl_basic_set *isl_set_simple_hull( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_map_simple_hull( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_simple_hull( - __isl_take isl_union_map *umap); - -These functions compute a single basic set or relation -that contains the whole input set or relation. -In particular, the output is described by translates -of the constraints describing the basic sets or relations in the input. - -=begin latex - -(See \autoref{s:simple hull}.) - -=end latex - -=item * Affine hull - - __isl_give isl_basic_set *isl_basic_set_affine_hull( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_set_affine_hull( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_affine_hull( - __isl_take isl_union_set *uset); - __isl_give isl_basic_map *isl_basic_map_affine_hull( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_map *isl_map_affine_hull( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_affine_hull( - __isl_take isl_union_map *umap); - -In case of union sets and relations, the affine hull is computed -per space. - -=item * Polyhedral hull - - __isl_give isl_basic_set *isl_set_polyhedral_hull( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_map_polyhedral_hull( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_polyhedral_hull( - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_polyhedral_hull( - __isl_take isl_union_map *umap); - -These functions compute a single basic set or relation -not involving any existentially quantified variables -that contains the whole input set or relation. -In case of union sets and relations, the polyhedral hull is computed -per space. - -=item * Optimization - - #include - enum isl_lp_result isl_basic_set_max( - __isl_keep isl_basic_set *bset, - __isl_keep isl_aff *obj, isl_int *opt) - enum isl_lp_result isl_set_min(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt); - enum isl_lp_result isl_set_max(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt); - -Compute the minimum or maximum of the integer affine expression C -over the points in C, returning the result in C. -The return value may be one of C, -C, C or C. - -=item * Parametric optimization - - __isl_give isl_pw_aff *isl_set_dim_min( - __isl_take isl_set *set, int pos); - __isl_give isl_pw_aff *isl_set_dim_max( - __isl_take isl_set *set, int pos); - __isl_give isl_pw_aff *isl_map_dim_max( - __isl_take isl_map *map, int pos); - -Compute the minimum or maximum of the given set or output dimension -as a function of the parameters (and input dimensions), but independently -of the other set or output dimensions. -For lexicographic optimization, see L<"Lexicographic Optimization">. - -=item * Dual - -The following functions compute either the set of (rational) coefficient -values of valid constraints for the given set or the set of (rational) -values satisfying the constraints with coefficients from the given set. -Internally, these two sets of functions perform essentially the -same operations, except that the set of coefficients is assumed to -be a cone, while the set of values may be any polyhedron. -The current implementation is based on the Farkas lemma and -Fourier-Motzkin elimination, but this may change or be made optional -in future. In particular, future implementations may use different -dualization algorithms or skip the elimination step. - - __isl_give isl_basic_set *isl_basic_set_coefficients( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_set_coefficients( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_coefficients( - __isl_take isl_union_set *bset); - __isl_give isl_basic_set *isl_basic_set_solutions( - __isl_take isl_basic_set *bset); - __isl_give isl_basic_set *isl_set_solutions( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_solutions( - __isl_take isl_union_set *bset); - -=item * Power - - __isl_give isl_map *isl_map_power(__isl_take isl_map *map, - int *exact); - __isl_give isl_union_map *isl_union_map_power( - __isl_take isl_union_map *umap, int *exact); - -Compute a parametric representation for all positive powers I of C. -The result maps I to a nested relation corresponding to the -Ith power of C. -The result may be an overapproximation. If the result is known to be exact, -then C<*exact> is set to C<1>. - -=item * Transitive closure - - __isl_give isl_map *isl_map_transitive_closure( - __isl_take isl_map *map, int *exact); - __isl_give isl_union_map *isl_union_map_transitive_closure( - __isl_take isl_union_map *umap, int *exact); - -Compute the transitive closure of C. -The result may be an overapproximation. If the result is known to be exact, -then C<*exact> is set to C<1>. - -=item * Reaching path lengths - - __isl_give isl_map *isl_map_reaching_path_lengths( - __isl_take isl_map *map, int *exact); - -Compute a relation that maps each element in the range of C -to the lengths of all paths composed of edges in C that -end up in the given element. -The result may be an overapproximation. If the result is known to be exact, -then C<*exact> is set to C<1>. -To compute the I path length, the resulting relation -should be postprocessed by C. -In particular, if the input relation is a dependence relation -(mapping sources to sinks), then the maximal path length corresponds -to the free schedule. -Note, however, that C expects the maximum to be -finite, so if the path lengths are unbounded (possibly due to -the overapproximation), then you will get an error message. - -=item * Wrapping - - __isl_give isl_basic_set *isl_basic_map_wrap( - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_map_wrap( - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_map_wrap( - __isl_take isl_union_map *umap); - __isl_give isl_basic_map *isl_basic_set_unwrap( - __isl_take isl_basic_set *bset); - __isl_give isl_map *isl_set_unwrap( - __isl_take isl_set *set); - __isl_give isl_union_map *isl_union_set_unwrap( - __isl_take isl_union_set *uset); - -=item * Flattening - -Remove any internal structure of domain (and range) of the given -set or relation. If there is any such internal structure in the input, -then the name of the space is also removed. - - __isl_give isl_basic_set *isl_basic_set_flatten( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_flatten( - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_basic_map_flatten_domain( - __isl_take isl_basic_map *bmap); - __isl_give isl_basic_map *isl_basic_map_flatten_range( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_flatten_range( - __isl_take isl_map *map); - __isl_give isl_map *isl_map_flatten_domain( - __isl_take isl_map *map); - __isl_give isl_basic_map *isl_basic_map_flatten( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_flatten( - __isl_take isl_map *map); - - __isl_give isl_map *isl_set_flatten_map( - __isl_take isl_set *set); - -The function above constructs a relation -that maps the input set to a flattened version of the set. - -=item * Lifting - -Lift the input set to a space with extra dimensions corresponding -to the existentially quantified variables in the input. -In particular, the result lives in a wrapped map where the domain -is the original space and the range corresponds to the original -existentially quantified variables. - - __isl_give isl_basic_set *isl_basic_set_lift( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_lift( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_lift( - __isl_take isl_union_set *uset); - -Given a local space that contains the existentially quantified -variables of a set, a basic relation that, when applied to -a basic set, has essentially the same effect as C, -can be constructed using the following function. - - #include - __isl_give isl_basic_map *isl_local_space_lifting( - __isl_take isl_local_space *ls); - -=item * Internal Product - - __isl_give isl_basic_map *isl_basic_map_zip( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_zip( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_zip( - __isl_take isl_union_map *umap); - -Given a relation with nested relations for domain and range, -interchange the range of the domain with the domain of the range. - -=item * Aligning parameters - - __isl_give isl_set *isl_set_align_params( - __isl_take isl_set *set, - __isl_take isl_space *model); - __isl_give isl_map *isl_map_align_params( - __isl_take isl_map *map, - __isl_take isl_space *model); - -Change the order of the parameters of the given set or relation -such that the first parameters match those of C. -This may involve the introduction of extra parameters. -All parameters need to be named. - -=item * Dimension manipulation - - __isl_give isl_set *isl_set_add_dims( - __isl_take isl_set *set, - enum isl_dim_type type, unsigned n); - __isl_give isl_map *isl_map_add_dims( - __isl_take isl_map *map, - enum isl_dim_type type, unsigned n); - __isl_give isl_set *isl_set_insert_dims( - __isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, unsigned n); - __isl_give isl_map *isl_map_insert_dims( - __isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, unsigned n); - __isl_give isl_basic_set *isl_basic_set_move_dims( - __isl_take isl_basic_set *bset, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, - unsigned n); - __isl_give isl_basic_map *isl_basic_map_move_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, - unsigned n); - __isl_give isl_set *isl_set_move_dims( - __isl_take isl_set *set, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, - unsigned n); - __isl_give isl_map *isl_map_move_dims( - __isl_take isl_map *map, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, - unsigned n); - -It is usually not advisable to directly change the (input or output) -space of a set or a relation as this removes the name and the internal -structure of the space. However, the above functions can be useful -to add new parameters, assuming -C and C -are not sufficient. - -=back - -=head2 Binary Operations - -The two arguments of a binary operation not only need to live -in the same C, they currently also need to have -the same (number of) parameters. - -=head3 Basic Operations - -=over - -=item * Intersection - - __isl_give isl_basic_set *isl_basic_set_intersect_params( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_basic_set *isl_basic_set_intersect( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_set *isl_set_intersect_params( - __isl_take isl_set *set, - __isl_take isl_set *params); - __isl_give isl_set *isl_set_intersect( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_union_set *isl_union_set_intersect_params( - __isl_take isl_union_set *uset, - __isl_take isl_set *set); - __isl_give isl_union_map *isl_union_map_intersect_params( - __isl_take isl_union_map *umap, - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_intersect( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_basic_map *isl_basic_map_intersect_domain( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_intersect_range( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); - __isl_give isl_basic_map *isl_basic_map_intersect( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_intersect_params( - __isl_take isl_map *map, - __isl_take isl_set *params); - __isl_give isl_map *isl_map_intersect_domain( - __isl_take isl_map *map, - __isl_take isl_set *set); - __isl_give isl_map *isl_map_intersect_range( - __isl_take isl_map *map, - __isl_take isl_set *set); - __isl_give isl_map *isl_map_intersect( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_intersect_domain( - __isl_take isl_union_map *umap, - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_intersect_range( - __isl_take isl_union_map *umap, - __isl_take isl_union_set *uset); - __isl_give isl_union_map *isl_union_map_intersect( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Union - - __isl_give isl_set *isl_basic_set_union( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_map *isl_basic_map_union( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_set *isl_set_union( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_map *isl_map_union( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_set *isl_union_set_union( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_union_map *isl_union_map_union( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Set difference - - __isl_give isl_set *isl_set_subtract( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_map *isl_map_subtract( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_map *isl_map_subtract_domain( - __isl_take isl_map *map, - __isl_take isl_set *dom); - __isl_give isl_map *isl_map_subtract_range( - __isl_take isl_map *map, - __isl_take isl_set *dom); - __isl_give isl_union_set *isl_union_set_subtract( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_union_map *isl_union_map_subtract( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Application - - __isl_give isl_basic_set *isl_basic_set_apply( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_map *bmap); - __isl_give isl_set *isl_set_apply( - __isl_take isl_set *set, - __isl_take isl_map *map); - __isl_give isl_union_set *isl_union_set_apply( - __isl_take isl_union_set *uset, - __isl_take isl_union_map *umap); - __isl_give isl_basic_map *isl_basic_map_apply_domain( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_basic_map *isl_basic_map_apply_range( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_apply_domain( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_apply_domain( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - __isl_give isl_map *isl_map_apply_range( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_apply_range( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -=item * Cartesian Product - - __isl_give isl_set *isl_set_product( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_union_set *isl_union_set_product( - __isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); - __isl_give isl_basic_map *isl_basic_map_domain_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_basic_map *isl_basic_map_range_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_domain_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_map *isl_map_range_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_range_product( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - __isl_give isl_map *isl_map_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_product( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - -The above functions compute the cross product of the given -sets or relations. The domains and ranges of the results -are wrapped maps between domains and ranges of the inputs. -To obtain a ``flat'' product, use the following functions -instead. - - __isl_give isl_basic_set *isl_basic_set_flat_product( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - __isl_give isl_set *isl_set_flat_product( - __isl_take isl_set *set1, - __isl_take isl_set *set2); - __isl_give isl_basic_map *isl_basic_map_flat_range_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_flat_domain_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_map *isl_map_flat_range_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - __isl_give isl_union_map *isl_union_map_flat_range_product( - __isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); - __isl_give isl_basic_map *isl_basic_map_flat_product( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); - __isl_give isl_map *isl_map_flat_product( - __isl_take isl_map *map1, - __isl_take isl_map *map2); - -=item * Simplification - - __isl_give isl_basic_set *isl_basic_set_gist( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context); - __isl_give isl_set *isl_set_gist(__isl_take isl_set *set, - __isl_take isl_set *context); - __isl_give isl_set *isl_set_gist_params( - __isl_take isl_set *set, - __isl_take isl_set *context); - __isl_give isl_union_set *isl_union_set_gist( - __isl_take isl_union_set *uset, - __isl_take isl_union_set *context); - __isl_give isl_union_set *isl_union_set_gist_params( - __isl_take isl_union_set *uset, - __isl_take isl_set *set); - __isl_give isl_basic_map *isl_basic_map_gist( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_map *context); - __isl_give isl_map *isl_map_gist(__isl_take isl_map *map, - __isl_take isl_map *context); - __isl_give isl_map *isl_map_gist_params( - __isl_take isl_map *map, - __isl_take isl_set *context); - __isl_give isl_map *isl_map_gist_domain( - __isl_take isl_map *map, - __isl_take isl_set *context); - __isl_give isl_map *isl_map_gist_range( - __isl_take isl_map *map, - __isl_take isl_set *context); - __isl_give isl_union_map *isl_union_map_gist( - __isl_take isl_union_map *umap, - __isl_take isl_union_map *context); - __isl_give isl_union_map *isl_union_map_gist_params( - __isl_take isl_union_map *umap, - __isl_take isl_set *set); - __isl_give isl_union_map *isl_union_map_gist_domain( - __isl_take isl_union_map *umap, - __isl_take isl_union_set *uset); - -The gist operation returns a set or relation that has the -same intersection with the context as the input set or relation. -Any implicit equality in the intersection is made explicit in the result, -while all inequalities that are redundant with respect to the intersection -are removed. -In case of union sets and relations, the gist operation is performed -per space. - -=back - -=head3 Lexicographic Optimization - -Given a (basic) set C (or C) and a zero-dimensional domain C, -the following functions -compute a set that contains the lexicographic minimum or maximum -of the elements in C (or C) for those values of the parameters -that satisfy C. -If C is not C, then C<*empty> is assigned a set -that contains the parameter values in C for which C (or C) -has no elements. -In other words, the union of the parameter values -for which the result is non-empty and of C<*empty> -is equal to C. - - __isl_give isl_set *isl_basic_set_partial_lexmin( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_set *isl_basic_set_partial_lexmax( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_set *isl_set_partial_lexmin( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); - __isl_give isl_set *isl_set_partial_lexmax( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); - -Given a (basic) set C (or C), the following functions simply -return a set containing the lexicographic minimum or maximum -of the elements in C (or C). -In case of union sets, the optimum is computed per space. - - __isl_give isl_set *isl_basic_set_lexmin( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_basic_set_lexmax( - __isl_take isl_basic_set *bset); - __isl_give isl_set *isl_set_lexmin( - __isl_take isl_set *set); - __isl_give isl_set *isl_set_lexmax( - __isl_take isl_set *set); - __isl_give isl_union_set *isl_union_set_lexmin( - __isl_take isl_union_set *uset); - __isl_give isl_union_set *isl_union_set_lexmax( - __isl_take isl_union_set *uset); - -Given a (basic) relation C (or C) and a domain C, -the following functions -compute a relation that maps each element of C -to the single lexicographic minimum or maximum -of the elements that are associated to that same -element in C (or C). -If C is not C, then C<*empty> is assigned a set -that contains the elements in C that do not map -to any elements in C (or C). -In other words, the union of the domain of the result and of C<*empty> -is equal to C. - - __isl_give isl_map *isl_basic_map_partial_lexmax( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_map *isl_basic_map_partial_lexmin( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_map *isl_map_partial_lexmax( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); - __isl_give isl_map *isl_map_partial_lexmin( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); - -Given a (basic) map C (or C), the following functions simply -return a map mapping each element in the domain of -C (or C) to the lexicographic minimum or maximum -of all elements associated to that element. -In case of union relations, the optimum is computed per space. - - __isl_give isl_map *isl_basic_map_lexmin( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_basic_map_lexmax( - __isl_take isl_basic_map *bmap); - __isl_give isl_map *isl_map_lexmin( - __isl_take isl_map *map); - __isl_give isl_map *isl_map_lexmax( - __isl_take isl_map *map); - __isl_give isl_union_map *isl_union_map_lexmin( - __isl_take isl_union_map *umap); - __isl_give isl_union_map *isl_union_map_lexmax( - __isl_take isl_union_map *umap); - -The following functions return their result in the form of -a piecewise multi-affine expression -(See L<"Piecewise Multiple Quasi Affine Expressions">), -but are otherwise equivalent to the corresponding functions -returning a basic set or relation. - - __isl_give isl_pw_multi_aff * - isl_basic_map_lexmin_pw_multi_aff( - __isl_take isl_basic_map *bmap); - __isl_give isl_pw_multi_aff * - isl_basic_set_partial_lexmin_pw_multi_aff( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_pw_multi_aff * - isl_basic_set_partial_lexmax_pw_multi_aff( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_pw_multi_aff * - isl_basic_map_partial_lexmin_pw_multi_aff( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - __isl_give isl_pw_multi_aff * - isl_basic_map_partial_lexmax_pw_multi_aff( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - -=head2 Lists - -Lists are defined over several element types, including -C, C, C and C. -Here we take lists of Cs as an example. -Lists can be created, copied and freed using the following functions. - - #include - __isl_give isl_set_list *isl_set_list_from_set( - __isl_take isl_set *el); - __isl_give isl_set_list *isl_set_list_alloc( - isl_ctx *ctx, int n); - __isl_give isl_set_list *isl_set_list_copy( - __isl_keep isl_set_list *list); - __isl_give isl_set_list *isl_set_list_add( - __isl_take isl_set_list *list, - __isl_take isl_set *el); - __isl_give isl_set_list *isl_set_list_concat( - __isl_take isl_set_list *list1, - __isl_take isl_set_list *list2); - void *isl_set_list_free(__isl_take isl_set_list *list); - -C creates an empty list with a capacity for -C elements. C creates a list with a single -element. - -Lists can be inspected using the following functions. - - #include - isl_ctx *isl_set_list_get_ctx(__isl_keep isl_set_list *list); - int isl_set_list_n_set(__isl_keep isl_set_list *list); - __isl_give isl_set *isl_set_list_get_set( - __isl_keep isl_set_list *list, int index); - int isl_set_list_foreach(__isl_keep isl_set_list *list, - int (*fn)(__isl_take isl_set *el, void *user), - void *user); - -Lists can be printed using - - #include - __isl_give isl_printer *isl_printer_print_set_list( - __isl_take isl_printer *p, - __isl_keep isl_set_list *list); - -=head2 Matrices - -Matrices can be created, copied and freed using the following functions. - - #include - __isl_give isl_mat *isl_mat_alloc(isl_ctx *ctx, - unsigned n_row, unsigned n_col); - __isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); - void isl_mat_free(__isl_take isl_mat *mat); - -Note that the elements of a newly created matrix may have arbitrary values. -The elements can be changed and inspected using the following functions. - - isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat); - int isl_mat_rows(__isl_keep isl_mat *mat); - int isl_mat_cols(__isl_keep isl_mat *mat); - int isl_mat_get_element(__isl_keep isl_mat *mat, - int row, int col, isl_int *v); - __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, - int row, int col, isl_int v); - __isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, - int row, int col, int v); - -C will return a negative value if anything went wrong. -In that case, the value of C<*v> is undefined. - -The following function can be used to compute the (right) inverse -of a matrix, i.e., a matrix such that the product of the original -and the inverse (in that order) is a multiple of the identity matrix. -The input matrix is assumed to be of full row-rank. - - __isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat); - -The following function can be used to compute the (right) kernel -(or null space) of a matrix, i.e., a matrix such that the product of -the original and the kernel (in that order) is the zero matrix. - - __isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat); - -=head2 Piecewise Quasi Affine Expressions - -The zero quasi affine expression on a given domain can be created using - - __isl_give isl_aff *isl_aff_zero_on_domain( - __isl_take isl_local_space *ls); - -Note that the space in which the resulting object lives is a map space -with the given space as domain and a one-dimensional range. - -An empty piecewise quasi affine expression (one with no cells) -or a piecewise quasi affine expression with a single cell can -be created using the following functions. - - #include - __isl_give isl_pw_aff *isl_pw_aff_empty( - __isl_take isl_space *space); - __isl_give isl_pw_aff *isl_pw_aff_alloc( - __isl_take isl_set *set, __isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_from_aff( - __isl_take isl_aff *aff); - -Quasi affine expressions can be copied and freed using - - #include - __isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff); - void *isl_aff_free(__isl_take isl_aff *aff); - - __isl_give isl_pw_aff *isl_pw_aff_copy( - __isl_keep isl_pw_aff *pwaff); - void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff); - -A (rational) bound on a dimension can be extracted from an C -using the following function. The constraint is required to have -a non-zero coefficient for the specified dimension. - - #include - __isl_give isl_aff *isl_constraint_get_bound( - __isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos); - -The entire affine expression of the constraint can also be extracted -using the following function. - - #include - __isl_give isl_aff *isl_constraint_get_aff( - __isl_keep isl_constraint *constraint); - -Conversely, an equality constraint equating -the affine expression to zero or an inequality constraint enforcing -the affine expression to be non-negative, can be constructed using - - __isl_give isl_constraint *isl_equality_from_aff( - __isl_take isl_aff *aff); - __isl_give isl_constraint *isl_inequality_from_aff( - __isl_take isl_aff *aff); - -The expression can be inspected using - - #include - isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff); - int isl_aff_dim(__isl_keep isl_aff *aff, - enum isl_dim_type type); - __isl_give isl_local_space *isl_aff_get_domain_local_space( - __isl_keep isl_aff *aff); - __isl_give isl_local_space *isl_aff_get_local_space( - __isl_keep isl_aff *aff); - const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned pos); - const char *isl_pw_aff_get_dim_name( - __isl_keep isl_pw_aff *pa, - enum isl_dim_type type, unsigned pos); - int isl_pw_aff_has_dim_id(__isl_keep isl_pw_aff *pa, - enum isl_dim_type type, unsigned pos); - __isl_give isl_id *isl_pw_aff_get_dim_id( - __isl_keep isl_pw_aff *pa, - enum isl_dim_type type, unsigned pos); - int isl_aff_get_constant(__isl_keep isl_aff *aff, - isl_int *v); - int isl_aff_get_coefficient(__isl_keep isl_aff *aff, - enum isl_dim_type type, int pos, isl_int *v); - int isl_aff_get_denominator(__isl_keep isl_aff *aff, - isl_int *v); - __isl_give isl_aff *isl_aff_get_div( - __isl_keep isl_aff *aff, int pos); - - int isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_aff *aff, - void *user), void *user); - - int isl_aff_is_cst(__isl_keep isl_aff *aff); - int isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff); - - int isl_aff_involves_dims(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - - isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff); - unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, - enum isl_dim_type type); - int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff); - -It can be modified using - - #include - __isl_give isl_pw_aff *isl_pw_aff_set_tuple_id( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, __isl_take isl_id *id); - __isl_give isl_aff *isl_aff_set_dim_name( - __isl_take isl_aff *aff, enum isl_dim_type type, - unsigned pos, const char *s); - __isl_give isl_aff *isl_aff_set_dim_id( - __isl_take isl_aff *aff, enum isl_dim_type type, - unsigned pos, __isl_take isl_id *id); - __isl_give isl_pw_aff *isl_pw_aff_set_dim_id( - __isl_take isl_pw_aff *pma, - enum isl_dim_type type, unsigned pos, - __isl_take isl_id *id); - __isl_give isl_aff *isl_aff_set_constant( - __isl_take isl_aff *aff, isl_int v); - __isl_give isl_aff *isl_aff_set_constant_si( - __isl_take isl_aff *aff, int v); - __isl_give isl_aff *isl_aff_set_coefficient( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); - __isl_give isl_aff *isl_aff_set_coefficient_si( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); - __isl_give isl_aff *isl_aff_set_denominator( - __isl_take isl_aff *aff, isl_int v); - - __isl_give isl_aff *isl_aff_add_constant( - __isl_take isl_aff *aff, isl_int v); - __isl_give isl_aff *isl_aff_add_constant_si( - __isl_take isl_aff *aff, int v); - __isl_give isl_aff *isl_aff_add_coefficient( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); - __isl_give isl_aff *isl_aff_add_coefficient_si( - __isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); - - __isl_give isl_aff *isl_aff_insert_dims( - __isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_pw_aff *isl_pw_aff_insert_dims( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_aff *isl_aff_add_dims( - __isl_take isl_aff *aff, - enum isl_dim_type type, unsigned n); - __isl_give isl_pw_aff *isl_pw_aff_add_dims( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned n); - __isl_give isl_aff *isl_aff_drop_dims( - __isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - __isl_give isl_pw_aff *isl_pw_aff_drop_dims( - __isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - -Note that the C and C functions -set the I of the constant or coefficient, while -C and C add an integer value to -the possibly rational constant or coefficient. - -To check whether an affine expressions is obviously zero -or obviously equal to some other affine expression, use - - #include - int isl_aff_plain_is_zero(__isl_keep isl_aff *aff); - int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, - __isl_keep isl_aff *aff2); - int isl_pw_aff_plain_is_equal( - __isl_keep isl_pw_aff *pwaff1, - __isl_keep isl_pw_aff *pwaff2); - -Operations include - - #include - __isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - __isl_give isl_pw_aff *isl_pw_aff_add( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_pw_aff *isl_pw_aff_min( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_pw_aff *isl_pw_aff_max( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - __isl_give isl_pw_aff *isl_pw_aff_sub( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_neg( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_ceil( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff); - __isl_give isl_pw_aff *isl_pw_aff_floor( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_aff *isl_aff_mod(__isl_take isl_aff *aff, - isl_int mod); - __isl_give isl_pw_aff *isl_pw_aff_mod( - __isl_take isl_pw_aff *pwaff, isl_int mod); - __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, - isl_int f); - __isl_give isl_pw_aff *isl_pw_aff_scale( - __isl_take isl_pw_aff *pwaff, isl_int f); - __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, - isl_int f); - __isl_give isl_aff *isl_aff_scale_down_ui( - __isl_take isl_aff *aff, unsigned f); - __isl_give isl_pw_aff *isl_pw_aff_scale_down( - __isl_take isl_pw_aff *pwaff, isl_int f); - - __isl_give isl_pw_aff *isl_pw_aff_list_min( - __isl_take isl_pw_aff_list *list); - __isl_give isl_pw_aff *isl_pw_aff_list_max( - __isl_take isl_pw_aff_list *list); - - __isl_give isl_pw_aff *isl_pw_aff_coalesce( - __isl_take isl_pw_aff *pwqp); - - __isl_give isl_pw_aff *isl_pw_aff_align_params( - __isl_take isl_pw_aff *pwaff, - __isl_take isl_space *model); - - __isl_give isl_aff *isl_aff_gist_params( - __isl_take isl_aff *aff, - __isl_take isl_set *context); - __isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, - __isl_take isl_set *context); - __isl_give isl_pw_aff *isl_pw_aff_gist_params( - __isl_take isl_pw_aff *pwaff, - __isl_take isl_set *context); - __isl_give isl_pw_aff *isl_pw_aff_gist( - __isl_take isl_pw_aff *pwaff, - __isl_take isl_set *context); - - __isl_give isl_set *isl_pw_aff_domain( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_pw_aff *isl_pw_aff_intersect_domain( - __isl_take isl_pw_aff *pa, - __isl_take isl_set *set); - __isl_give isl_pw_aff *isl_pw_aff_intersect_params( - __isl_take isl_pw_aff *pa, - __isl_take isl_set *set); - - __isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - __isl_give isl_pw_aff *isl_pw_aff_mul( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -When multiplying two affine expressions, at least one of the two needs -to be a constant. - - #include - __isl_give isl_basic_set *isl_aff_le_basic_set( - __isl_take isl_aff *aff1, __isl_take isl_aff *aff2); - __isl_give isl_basic_set *isl_aff_ge_basic_set( - __isl_take isl_aff *aff1, __isl_take isl_aff *aff2); - __isl_give isl_set *isl_pw_aff_eq_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_ne_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_le_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_lt_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_ge_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_set *isl_pw_aff_gt_set( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - - __isl_give isl_set *isl_pw_aff_list_eq_set( - __isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - __isl_give isl_set *isl_pw_aff_list_ne_set( - __isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - __isl_give isl_set *isl_pw_aff_list_le_set( - __isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - __isl_give isl_set *isl_pw_aff_list_lt_set( - __isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - __isl_give isl_set *isl_pw_aff_list_ge_set( - __isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - __isl_give isl_set *isl_pw_aff_list_gt_set( - __isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - -The function C returns a basic set -containing those elements in the shared space -of C and C where C is greater than or equal to C. -The function C returns a set -containing those elements in the shared domain -of C and C where C is greater than or equal to C. -The functions operating on C apply the corresponding -C function to each pair of elements in the two lists. - - #include - __isl_give isl_set *isl_pw_aff_nonneg_set( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_set *isl_pw_aff_zero_set( - __isl_take isl_pw_aff *pwaff); - __isl_give isl_set *isl_pw_aff_non_zero_set( - __isl_take isl_pw_aff *pwaff); - -The function C returns a set -containing those elements in the domain -of C where C is non-negative. - - #include - __isl_give isl_pw_aff *isl_pw_aff_cond( - __isl_take isl_set *cond, - __isl_take isl_pw_aff *pwaff_true, - __isl_take isl_pw_aff *pwaff_false); - -The function C performs a conditional operator -and returns an expression that is equal to C -for elements in C and equal to C for elements -not in C. - - #include - __isl_give isl_pw_aff *isl_pw_aff_union_min( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_pw_aff *isl_pw_aff_union_max( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - __isl_give isl_pw_aff *isl_pw_aff_union_add( - __isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -The function C computes a piecewise quasi-affine -expression with a domain that is the union of those of C and -C and such that on each cell, the quasi-affine expression is -the maximum of those of C and C. If only one of -C or C is defined on a given cell, then the -associated expression is the defined one. - -An expression can be read from input using - - #include - __isl_give isl_aff *isl_aff_read_from_str( - isl_ctx *ctx, const char *str); - __isl_give isl_pw_aff *isl_pw_aff_read_from_str( - isl_ctx *ctx, const char *str); - -An expression can be printed using - - #include - __isl_give isl_printer *isl_printer_print_aff( - __isl_take isl_printer *p, __isl_keep isl_aff *aff); - - __isl_give isl_printer *isl_printer_print_pw_aff( - __isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff); - -=head2 Piecewise Multiple Quasi Affine Expressions - -An C object represents a sequence of -zero or more affine expressions, all defined on the same domain space. - -An C can be constructed from a C using the -following function. - - #include - __isl_give isl_multi_aff *isl_multi_aff_from_aff_list( - __isl_take isl_space *space, - __isl_take isl_aff_list *list); - -An empty piecewise multiple quasi affine expression (one with no cells) or -a piecewise multiple quasi affine expression with a single cell can -be created using the following functions. - - #include - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty( - __isl_take isl_space *space); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc( - __isl_take isl_set *set, - __isl_take isl_multi_aff *maff); - -A piecewise multiple quasi affine expression can also be initialized -from an C or C, provided the C is a singleton -and the C is single-valued. - - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set( - __isl_take isl_set *set); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map( - __isl_take isl_map *map); - -Multiple quasi affine expressions can be copied and freed using - - #include - __isl_give isl_multi_aff *isl_multi_aff_copy( - __isl_keep isl_multi_aff *maff); - void *isl_multi_aff_free(__isl_take isl_multi_aff *maff); - - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy( - __isl_keep isl_pw_multi_aff *pma); - void *isl_pw_multi_aff_free( - __isl_take isl_pw_multi_aff *pma); - -The expression can be inspected using - - #include - isl_ctx *isl_multi_aff_get_ctx( - __isl_keep isl_multi_aff *maff); - isl_ctx *isl_pw_multi_aff_get_ctx( - __isl_keep isl_pw_multi_aff *pma); - unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff *maff, - enum isl_dim_type type); - unsigned isl_pw_multi_aff_dim( - __isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); - __isl_give isl_aff *isl_multi_aff_get_aff( - __isl_keep isl_multi_aff *multi, int pos); - const char *isl_pw_multi_aff_get_dim_name( - __isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type, unsigned pos); - __isl_give isl_id *isl_pw_multi_aff_get_dim_id( - __isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type, unsigned pos); - const char *isl_multi_aff_get_tuple_name( - __isl_keep isl_multi_aff *multi, - enum isl_dim_type type); - const char *isl_pw_multi_aff_get_tuple_name( - __isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); - int isl_pw_multi_aff_has_tuple_id( - __isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); - __isl_give isl_id *isl_pw_multi_aff_get_tuple_id( - __isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); - - int isl_pw_multi_aff_foreach_piece( - __isl_keep isl_pw_multi_aff *pma, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_multi_aff *maff, - void *user), void *user); - -It can be modified using - - #include - __isl_give isl_multi_aff *isl_multi_aff_set_dim_name( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned pos, const char *s); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id( - __isl_take isl_pw_multi_aff *pma, - enum isl_dim_type type, __isl_take isl_id *id); - -To check whether two multiple affine expressions are -obviously equal to each other, use - - int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1, - __isl_keep isl_multi_aff *maff2); - int isl_pw_multi_aff_plain_is_equal( - __isl_keep isl_pw_multi_aff *pma1, - __isl_keep isl_pw_multi_aff *pma2); - -Operations include - - #include - __isl_give isl_multi_aff *isl_multi_aff_add( - __isl_take isl_multi_aff *maff1, - __isl_take isl_multi_aff *maff2); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_add( - __isl_take isl_pw_multi_aff *pma1, - __isl_take isl_pw_multi_aff *pma2); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add( - __isl_take isl_pw_multi_aff *pma1, - __isl_take isl_pw_multi_aff *pma2); - __isl_give isl_multi_aff *isl_multi_aff_scale( - __isl_take isl_multi_aff *maff, - isl_int f); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params( - __isl_take isl_pw_multi_aff *pma, - __isl_take isl_set *set); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain( - __isl_take isl_pw_multi_aff *pma, - __isl_take isl_set *set); - __isl_give isl_multi_aff *isl_multi_aff_lift( - __isl_take isl_multi_aff *maff, - __isl_give isl_local_space **ls); - __isl_give isl_multi_aff *isl_multi_aff_gist_params( - __isl_take isl_multi_aff *maff, - __isl_take isl_set *context); - __isl_give isl_multi_aff *isl_multi_aff_gist( - __isl_take isl_multi_aff *maff, - __isl_take isl_set *context); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist_params( - __isl_take isl_pw_multi_aff *pma, - __isl_take isl_set *set); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist( - __isl_take isl_pw_multi_aff *pma, - __isl_take isl_set *set); - -If the C argument of C is not C, -then it is assigned the local space that lies at the basis of -the lifting applied. - -An expression can be read from input using - - #include - __isl_give isl_multi_aff *isl_multi_aff_read_from_str( - isl_ctx *ctx, const char *str); - __isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str( - isl_ctx *ctx, const char *str); - -An expression can be printed using - - #include - __isl_give isl_printer *isl_printer_print_multi_aff( - __isl_take isl_printer *p, - __isl_keep isl_multi_aff *maff); - __isl_give isl_printer *isl_printer_print_pw_multi_aff( - __isl_take isl_printer *p, - __isl_keep isl_pw_multi_aff *pma); - -=head2 Points - -Points are elements of a set. They can be used to construct -simple sets (boxes) or they can be used to represent the -individual elements of a set. -The zero point (the origin) can be created using - - __isl_give isl_point *isl_point_zero(__isl_take isl_space *space); - -The coordinates of a point can be inspected, set and changed -using - - int isl_point_get_coordinate(__isl_keep isl_point *pnt, - enum isl_dim_type type, int pos, isl_int *v); - __isl_give isl_point *isl_point_set_coordinate( - __isl_take isl_point *pnt, - enum isl_dim_type type, int pos, isl_int v); - - __isl_give isl_point *isl_point_add_ui( - __isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); - __isl_give isl_point *isl_point_sub_ui( - __isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); - -Other properties can be obtained using - - isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); - -Points can be copied or freed using - - __isl_give isl_point *isl_point_copy( - __isl_keep isl_point *pnt); - void isl_point_free(__isl_take isl_point *pnt); - -A singleton set can be created from a point using - - __isl_give isl_basic_set *isl_basic_set_from_point( - __isl_take isl_point *pnt); - __isl_give isl_set *isl_set_from_point( - __isl_take isl_point *pnt); - -and a box can be created from two opposite extremal points using - - __isl_give isl_basic_set *isl_basic_set_box_from_points( - __isl_take isl_point *pnt1, - __isl_take isl_point *pnt2); - __isl_give isl_set *isl_set_box_from_points( - __isl_take isl_point *pnt1, - __isl_take isl_point *pnt2); - -All elements of a B (union) set can be enumerated using -the following functions. - - int isl_set_foreach_point(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_point *pnt, void *user), - void *user); - int isl_union_set_foreach_point(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_point *pnt, void *user), - void *user); - -The function C is called for each integer point in -C with as second argument the last argument of -the C call. The function C -should return C<0> on success and C<-1> on failure. -In the latter case, C will stop -enumerating and return C<-1> as well. -If the enumeration is performed successfully and to completion, -then C returns C<0>. - -To obtain a single point of a (basic) set, use - - __isl_give isl_point *isl_basic_set_sample_point( - __isl_take isl_basic_set *bset); - __isl_give isl_point *isl_set_sample_point( - __isl_take isl_set *set); - -If C does not contain any (integer) points, then the -resulting point will be ``void'', a property that can be -tested using - - int isl_point_is_void(__isl_keep isl_point *pnt); - -=head2 Piecewise Quasipolynomials - -A piecewise quasipolynomial is a particular kind of function that maps -a parametric point to a rational value. -More specifically, a quasipolynomial is a polynomial expression in greatest -integer parts of affine expressions of parameters and variables. -A piecewise quasipolynomial is a subdivision of a given parametric -domain into disjoint cells with a quasipolynomial associated to -each cell. The value of the piecewise quasipolynomial at a given -point is the value of the quasipolynomial associated to the cell -that contains the point. Outside of the union of cells, -the value is assumed to be zero. -For example, the piecewise quasipolynomial - - [n] -> { [x] -> ((1 + n) - x) : x <= n and x >= 0 } - -maps C to C<1 + n - x> for values of C between C<0> and C. -A given piecewise quasipolynomial has a fixed domain dimension. -Union piecewise quasipolynomials are used to contain piecewise quasipolynomials -defined over different domains. -Piecewise quasipolynomials are mainly used by the C -library for representing the number of elements in a parametric set or map. -For example, the piecewise quasipolynomial above represents -the number of points in the map - - [n] -> { [x] -> [y] : x,y >= 0 and 0 <= x + y <= n } - -=head3 Input and Output - -Piecewise quasipolynomials can be read from input using - - __isl_give isl_union_pw_qpolynomial * - isl_union_pw_qpolynomial_read_from_str( - isl_ctx *ctx, const char *str); - -Quasipolynomials and piecewise quasipolynomials can be printed -using the following functions. - - __isl_give isl_printer *isl_printer_print_qpolynomial( - __isl_take isl_printer *p, - __isl_keep isl_qpolynomial *qp); - - __isl_give isl_printer *isl_printer_print_pw_qpolynomial( - __isl_take isl_printer *p, - __isl_keep isl_pw_qpolynomial *pwqp); - - __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial *upwqp); - -The output format of the printer -needs to be set to either C or C. -For C, only C -is supported. -In case of printing in C, the user may want -to set the names of all dimensions - - __isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned pos, - const char *s); - __isl_give isl_pw_qpolynomial * - isl_pw_qpolynomial_set_dim_name( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned pos, - const char *s); - -=head3 Creating New (Piecewise) Quasipolynomials - -Some simple quasipolynomials can be created using the following functions. -More complicated quasipolynomials can be created by applying -operations such as addition and multiplication -on the resulting quasipolynomials - - __isl_give isl_qpolynomial *isl_qpolynomial_zero_on_domain( - __isl_take isl_space *domain); - __isl_give isl_qpolynomial *isl_qpolynomial_one_on_domain( - __isl_take isl_space *domain); - __isl_give isl_qpolynomial *isl_qpolynomial_infty_on_domain( - __isl_take isl_space *domain); - __isl_give isl_qpolynomial *isl_qpolynomial_neginfty_on_domain( - __isl_take isl_space *domain); - __isl_give isl_qpolynomial *isl_qpolynomial_nan_on_domain( - __isl_take isl_space *domain); - __isl_give isl_qpolynomial *isl_qpolynomial_rat_cst_on_domain( - __isl_take isl_space *domain, - const isl_int n, const isl_int d); - __isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain( - __isl_take isl_space *domain, - enum isl_dim_type type, unsigned pos); - __isl_give isl_qpolynomial *isl_qpolynomial_from_aff( - __isl_take isl_aff *aff); - -Note that the space in which a quasipolynomial lives is a map space -with a one-dimensional range. The C argument in some of -the functions above corresponds to the domain of this map space. - -The zero piecewise quasipolynomial or a piecewise quasipolynomial -with a single cell can be created using the following functions. -Multiple of these single cell piecewise quasipolynomials can -be combined to create more complicated piecewise quasipolynomials. - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero( - __isl_take isl_space *space); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc( - __isl_take isl_set *set, - __isl_take isl_qpolynomial *qp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial( - __isl_take isl_qpolynomial *qp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_pw_aff( - __isl_take isl_pw_aff *pwaff); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero( - __isl_take isl_space *space); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial( - __isl_take isl_pw_qpolynomial *pwqp); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_pw_qpolynomial *pwqp); - -Quasipolynomials can be copied and freed again using the following -functions. - - __isl_give isl_qpolynomial *isl_qpolynomial_copy( - __isl_keep isl_qpolynomial *qp); - void *isl_qpolynomial_free(__isl_take isl_qpolynomial *qp); - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy( - __isl_keep isl_pw_qpolynomial *pwqp); - void *isl_pw_qpolynomial_free( - __isl_take isl_pw_qpolynomial *pwqp); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy( - __isl_keep isl_union_pw_qpolynomial *upwqp); - void isl_union_pw_qpolynomial_free( - __isl_take isl_union_pw_qpolynomial *upwqp); - -=head3 Inspecting (Piecewise) Quasipolynomials - -To iterate over all piecewise quasipolynomials in a union -piecewise quasipolynomial, use the following function - - int isl_union_pw_qpolynomial_foreach_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, - int (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user), - void *user); - -To extract the piecewise quasipolynomial in a given space from a union, use - - __isl_give isl_pw_qpolynomial * - isl_union_pw_qpolynomial_extract_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, - __isl_take isl_space *space); - -To iterate over the cells in a piecewise quasipolynomial, -use either of the following two functions - - int isl_pw_qpolynomial_foreach_piece( - __isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, - void *user), void *user); - int isl_pw_qpolynomial_foreach_lifted_piece( - __isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, - void *user), void *user); - -As usual, the function C should return C<0> on success -and C<-1> on failure. The difference between -C and -C is that -C will first -compute unique representations for all existentially quantified -variables and then turn these existentially quantified variables -into extra set variables, adapting the associated quasipolynomial -accordingly. This means that the C passed to C -will not have any existentially quantified variables, but that -the dimensions of the sets may be different for different -invocations of C. - -To iterate over all terms in a quasipolynomial, -use - - int isl_qpolynomial_foreach_term( - __isl_keep isl_qpolynomial *qp, - int (*fn)(__isl_take isl_term *term, - void *user), void *user); - -The terms themselves can be inspected and freed using -these functions - - unsigned isl_term_dim(__isl_keep isl_term *term, - enum isl_dim_type type); - void isl_term_get_num(__isl_keep isl_term *term, - isl_int *n); - void isl_term_get_den(__isl_keep isl_term *term, - isl_int *d); - int isl_term_get_exp(__isl_keep isl_term *term, - enum isl_dim_type type, unsigned pos); - __isl_give isl_aff *isl_term_get_div( - __isl_keep isl_term *term, unsigned pos); - void isl_term_free(__isl_take isl_term *term); - -Each term is a product of parameters, set variables and -integer divisions. The function C -returns the exponent of a given dimensions in the given term. -The Cs in the arguments of C -and C need to have been initialized -using C before calling these functions. - -=head3 Properties of (Piecewise) Quasipolynomials - -To check whether a quasipolynomial is actually a constant, -use the following function. - - int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp, - isl_int *n, isl_int *d); - -If C is a constant and if C and C are not C -then the numerator and denominator of the constant -are returned in C<*n> and C<*d>, respectively. - -To check whether two union piecewise quasipolynomials are -obviously equal, use - - int isl_union_pw_qpolynomial_plain_is_equal( - __isl_keep isl_union_pw_qpolynomial *upwqp1, - __isl_keep isl_union_pw_qpolynomial *upwqp2); - -=head3 Operations on (Piecewise) Quasipolynomials - - __isl_give isl_qpolynomial *isl_qpolynomial_scale( - __isl_take isl_qpolynomial *qp, isl_int v); - __isl_give isl_qpolynomial *isl_qpolynomial_neg( - __isl_take isl_qpolynomial *qp); - __isl_give isl_qpolynomial *isl_qpolynomial_add( - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - __isl_give isl_qpolynomial *isl_qpolynomial_sub( - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - __isl_give isl_qpolynomial *isl_qpolynomial_mul( - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - __isl_give isl_qpolynomial *isl_qpolynomial_pow( - __isl_take isl_qpolynomial *qp, unsigned exponent); - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sub( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_disjoint( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_neg( - __isl_take isl_pw_qpolynomial *pwqp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow( - __isl_take isl_pw_qpolynomial *pwqp, unsigned exponent); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); - - __isl_give isl_qpolynomial *isl_pw_qpolynomial_eval( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_point *pnt); - - __isl_give isl_qpolynomial *isl_union_pw_qpolynomial_eval( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_point *pnt); - - __isl_give isl_set *isl_pw_qpolynomial_domain( - __isl_take isl_pw_qpolynomial *pwqp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain( - __isl_take isl_pw_qpolynomial *pwpq, - __isl_take isl_set *set); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_params( - __isl_take isl_pw_qpolynomial *pwpq, - __isl_take isl_set *set); - - __isl_give isl_union_set *isl_union_pw_qpolynomial_domain( - __isl_take isl_union_pw_qpolynomial *upwqp); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain( - __isl_take isl_union_pw_qpolynomial *upwpq, - __isl_take isl_union_set *uset); - __isl_give isl_union_pw_qpolynomial * - isl_union_pw_qpolynomial_intersect_params( - __isl_take isl_union_pw_qpolynomial *upwpq, - __isl_take isl_set *set); - - __isl_give isl_qpolynomial *isl_qpolynomial_align_params( - __isl_take isl_qpolynomial *qp, - __isl_take isl_space *model); - - __isl_give isl_qpolynomial *isl_qpolynomial_project_domain_on_params( - __isl_take isl_qpolynomial *qp); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_domain_on_params( - __isl_take isl_pw_qpolynomial *pwqp); - - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce( - __isl_take isl_union_pw_qpolynomial *upwqp); - - __isl_give isl_qpolynomial *isl_qpolynomial_gist_params( - __isl_take isl_qpolynomial *qp, - __isl_take isl_set *context); - __isl_give isl_qpolynomial *isl_qpolynomial_gist( - __isl_take isl_qpolynomial *qp, - __isl_take isl_set *context); - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist_params( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_set *context); - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_set *context); - - __isl_give isl_union_pw_qpolynomial * - isl_union_pw_qpolynomial_gist_params( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_set *context); - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_union_set *context); - -The gist operation applies the gist operation to each of -the cells in the domain of the input piecewise quasipolynomial. -The context is also exploited -to simplify the quasipolynomials associated to each cell. - - __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( - __isl_take isl_pw_qpolynomial *pwqp, int sign); - __isl_give isl_union_pw_qpolynomial * - isl_union_pw_qpolynomial_to_polynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, int sign); - -Approximate each quasipolynomial by a polynomial. If C is positive, -the polynomial will be an overapproximation. If C is negative, -it will be an underapproximation. If C is zero, the approximation -will lie somewhere in between. - -=head2 Bounds on Piecewise Quasipolynomials and Piecewise Quasipolynomial Reductions - -A piecewise quasipolynomial reduction is a piecewise -reduction (or fold) of quasipolynomials. -In particular, the reduction can be maximum or a minimum. -The objects are mainly used to represent the result of -an upper or lower bound on a quasipolynomial over its domain, -i.e., as the result of the following function. - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_fold type, int *tight); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( - __isl_take isl_union_pw_qpolynomial *upwqp, - enum isl_fold type, int *tight); - -The C argument may be either C or C. -If C is not C, then C<*tight> is set to C<1> -is the returned bound is known be tight, i.e., for each value -of the parameters there is at least -one element in the domain that reaches the bound. -If the domain of C is not wrapping, then the bound is computed -over all elements in that domain and the result has a purely parametric -domain. If the domain of C is wrapping, then the bound is -computed over the range of the wrapped relation. The domain of the -wrapped relation becomes the domain of the result. - -A (piecewise) quasipolynomial reduction can be copied or freed using the -following functions. - - __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( - __isl_keep isl_qpolynomial_fold *fold); - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy( - __isl_keep isl_pw_qpolynomial_fold *pwf); - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - void isl_qpolynomial_fold_free( - __isl_take isl_qpolynomial_fold *fold); - void *isl_pw_qpolynomial_fold_free( - __isl_take isl_pw_qpolynomial_fold *pwf); - void isl_union_pw_qpolynomial_fold_free( - __isl_take isl_union_pw_qpolynomial_fold *upwf); - -=head3 Printing Piecewise Quasipolynomial Reductions - -Piecewise quasipolynomial reductions can be printed -using the following function. - - __isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_pw_qpolynomial_fold *pwf); - __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -For C, -output format of the printer -needs to be set to either C or C. -For C, -output format of the printer -needs to be set to C. -In case of printing in C, the user may want -to set the names of all dimensions - - __isl_give isl_pw_qpolynomial_fold * - isl_pw_qpolynomial_fold_set_dim_name( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned pos, - const char *s); - -=head3 Inspecting (Piecewise) Quasipolynomial Reductions - -To iterate over all piecewise quasipolynomial reductions in a union -piecewise quasipolynomial reduction, use the following function - - int isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( - __isl_keep isl_union_pw_qpolynomial_fold *upwf, - int (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf, - void *user), void *user); - -To iterate over the cells in a piecewise quasipolynomial reduction, -use either of the following two functions - - int isl_pw_qpolynomial_fold_foreach_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); - int isl_pw_qpolynomial_fold_foreach_lifted_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, - __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); - -See L for an explanation -of the difference between these two functions. - -To iterate over all quasipolynomials in a reduction, use - - int isl_qpolynomial_fold_foreach_qpolynomial( - __isl_keep isl_qpolynomial_fold *fold, - int (*fn)(__isl_take isl_qpolynomial *qp, - void *user), void *user); - -=head3 Properties of Piecewise Quasipolynomial Reductions - -To check whether two union piecewise quasipolynomial reductions are -obviously equal, use - - int isl_union_pw_qpolynomial_fold_plain_is_equal( - __isl_keep isl_union_pw_qpolynomial_fold *upwf1, - __isl_keep isl_union_pw_qpolynomial_fold *upwf2); - -=head3 Operations on Piecewise Quasipolynomial Reductions - - __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( - __isl_take isl_qpolynomial_fold *fold, isl_int v); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( - __isl_take isl_union_pw_qpolynomial_fold *upwf1, - __isl_take isl_union_pw_qpolynomial_fold *upwf2); - - __isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_eval( - __isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_point *pnt); - - __isl_give isl_qpolynomial *isl_union_pw_qpolynomial_fold_eval( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_point *pnt); - - __isl_give isl_pw_qpolynomial_fold * - sl_pw_qpolynomial_fold_intersect_params( - __isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_set *set); - - __isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf); - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *uset); - __isl_give isl_union_pw_qpolynomial_fold * - isl_union_pw_qpolynomial_fold_intersect_params( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_set *set); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params( - __isl_take isl_pw_qpolynomial_fold *pwf); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce( - __isl_take isl_pw_qpolynomial_fold *pwf); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce( - __isl_take isl_union_pw_qpolynomial_fold *upwf); - - __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params( - __isl_take isl_qpolynomial_fold *fold, - __isl_take isl_set *context); - __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( - __isl_take isl_qpolynomial_fold *fold, - __isl_take isl_set *context); - - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist( - __isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_set *context); - __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist_params( - __isl_take isl_pw_qpolynomial_fold *pwf, - __isl_take isl_set *context); - - __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *context); - __isl_give isl_union_pw_qpolynomial_fold * - isl_union_pw_qpolynomial_fold_gist_params( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_set *context); - -The gist operation applies the gist operation to each of -the cells in the domain of the input piecewise quasipolynomial reduction. -In future, the operation will also exploit the context -to simplify the quasipolynomial reductions associated to each cell. - - __isl_give isl_pw_qpolynomial_fold * - isl_set_apply_pw_qpolynomial_fold( - __isl_take isl_set *set, - __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); - __isl_give isl_pw_qpolynomial_fold * - isl_map_apply_pw_qpolynomial_fold( - __isl_take isl_map *map, - __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); - __isl_give isl_union_pw_qpolynomial_fold * - isl_union_set_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_set *uset, - __isl_take isl_union_pw_qpolynomial_fold *upwf, - int *tight); - __isl_give isl_union_pw_qpolynomial_fold * - isl_union_map_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_map *umap, - __isl_take isl_union_pw_qpolynomial_fold *upwf, - int *tight); - -The functions taking a map -compose the given map with the given piecewise quasipolynomial reduction. -That is, compute a bound (of the same type as C or C itself) -over all elements in the intersection of the range of the map -and the domain of the piecewise quasipolynomial reduction -as a function of an element in the domain of the map. -The functions taking a set compute a bound over all elements in the -intersection of the set and the domain of the -piecewise quasipolynomial reduction. - -=head2 Dependence Analysis - -C contains specialized functionality for performing -array dataflow analysis. That is, given a I access relation -and a collection of possible I access relations, -C can compute relations that describe -for each iteration of the sink access, which iteration -of which of the source access relations was the last -to access the same data element before the given iteration -of the sink access. -The resulting dependence relations map source iterations -to the corresponding sink iterations. -To compute standard flow dependences, the sink should be -a read, while the sources should be writes. -If any of the source accesses are marked as being I -accesses, then there will be a dependence from the last -I access B from any I access that follows -this last I access. -In particular, if I sources are I accesses, -then memory based dependence analysis is performed. -If, on the other hand, all sources are I accesses, -then value based dependence analysis is performed. - - #include - - typedef int (*isl_access_level_before)(void *first, void *second); - - __isl_give isl_access_info *isl_access_info_alloc( - __isl_take isl_map *sink, - void *sink_user, isl_access_level_before fn, - int max_source); - __isl_give isl_access_info *isl_access_info_add_source( - __isl_take isl_access_info *acc, - __isl_take isl_map *source, int must, - void *source_user); - void isl_access_info_free(__isl_take isl_access_info *acc); - - __isl_give isl_flow *isl_access_info_compute_flow( - __isl_take isl_access_info *acc); - - int isl_flow_foreach(__isl_keep isl_flow *deps, - int (*fn)(__isl_take isl_map *dep, int must, - void *dep_user, void *user), - void *user); - __isl_give isl_map *isl_flow_get_no_source( - __isl_keep isl_flow *deps, int must); - void isl_flow_free(__isl_take isl_flow *deps); - -The function C performs the actual -dependence analysis. The other functions are used to construct -the input for this function or to read off the output. - -The input is collected in an C, which can -be created through a call to C. -The arguments to this functions are the sink access relation -C, a token C used to identify the sink -access to the user, a callback function for specifying the -relative order of source and sink accesses, and the number -of source access relations that will be added. -The callback function has type C. -The function is called with two user supplied tokens identifying -either a source or the sink and it should return the shared nesting -level and the relative order of the two accesses. -In particular, let I be the number of loops shared by -the two accesses. If C precedes C textually, -then the function should return I<2 * n + 1>; otherwise, -it should return I<2 * n>. -The sources can be added to the C by performing -(at most) C calls to C. -C indicates whether the source is a I access -or a I access. Note that a multi-valued access relation -should only be marked I if every iteration in the domain -of the relation accesses I elements in its image. -The C token is again used to identify -the source access. The range of the source access relation -C should have the same dimension as the range -of the sink access relation. -The C function should usually not be -called explicitly, because it is called implicitly by -C. - -The result of the dependence analysis is collected in an -C. There may be elements of -the sink access for which no preceding source access could be -found or for which all preceding sources are I accesses. -The relations containing these elements can be obtained through -calls to C, the first with C set -and the second with C unset. -In the case of standard flow dependence analysis, -with the sink a read and the sources I writes, -the first relation corresponds to the reads from uninitialized -array elements and the second relation is empty. -The actual flow dependences can be extracted using -C. This function will call the user-specified -callback function C for each B dependence between -a source and the sink. The callback function is called -with four arguments, the actual flow dependence relation -mapping source iterations to sink iterations, a boolean that -indicates whether it is a I or I dependence, a token -identifying the source and an additional C with value -equal to the third argument of the C call. -A dependence is marked I if it originates from a I -source and if it is not followed by any I sources. - -After finishing with an C, the user should call -C to free all associated memory. - -A higher-level interface to dependence analysis is provided -by the following function. - - #include - - int isl_union_map_compute_flow(__isl_take isl_union_map *sink, - __isl_take isl_union_map *must_source, - __isl_take isl_union_map *may_source, - __isl_take isl_union_map *schedule, - __isl_give isl_union_map **must_dep, - __isl_give isl_union_map **may_dep, - __isl_give isl_union_map **must_no_source, - __isl_give isl_union_map **may_no_source); - -The arrays are identified by the tuple names of the ranges -of the accesses. The iteration domains by the tuple names -of the domains of the accesses and of the schedule. -The relative order of the iteration domains is given by the -schedule. The relations returned through C -and C are subsets of C. -Any of C, C, C -or C may be C, but a C value for -any of the other arguments is treated as an error. - -=head2 Scheduling - -B - -The following function can be used to compute a schedule -for a union of domains. The generated schedule respects -all C dependences. That is, all dependence distances -over these dependences in the scheduled space are lexicographically -positive. The generated schedule schedule also tries to minimize -the dependence distances over C dependences. -Moreover, it tries to obtain sequences (bands) of schedule dimensions -for groups of domains where the dependence distances have only -non-negative values. -The algorithm used to construct the schedule is similar to that -of C. - - #include - __isl_give isl_schedule *isl_union_set_compute_schedule( - __isl_take isl_union_set *domain, - __isl_take isl_union_map *validity, - __isl_take isl_union_map *proximity); - void *isl_schedule_free(__isl_take isl_schedule *sched); - -A mapping from the domains to the scheduled space can be obtained -from an C using the following function. - - __isl_give isl_union_map *isl_schedule_get_map( - __isl_keep isl_schedule *sched); - -A representation of the schedule can be printed using - - __isl_give isl_printer *isl_printer_print_schedule( - __isl_take isl_printer *p, - __isl_keep isl_schedule *schedule); - -A representation of the schedule as a forest of bands can be obtained -using the following function. - - __isl_give isl_band_list *isl_schedule_get_band_forest( - __isl_keep isl_schedule *schedule); - -The list can be manipulated as explained in L<"Lists">. -The bands inside the list can be copied and freed using the following -functions. - - #include - __isl_give isl_band *isl_band_copy( - __isl_keep isl_band *band); - void *isl_band_free(__isl_take isl_band *band); - -Each band contains zero or more scheduling dimensions. -These are referred to as the members of the band. -The section of the schedule that corresponds to the band is -referred to as the partial schedule of the band. -For those nodes that participate in a band, the outer scheduling -dimensions form the prefix schedule, while the inner scheduling -dimensions form the suffix schedule. -That is, if we take a cut of the band forest, then the union of -the concatenations of the prefix, partial and suffix schedules of -each band in the cut is equal to the entire schedule (modulo -some possible padding at the end with zero scheduling dimensions). -The properties of a band can be inspected using the following functions. - - #include - isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band); - - int isl_band_has_children(__isl_keep isl_band *band); - __isl_give isl_band_list *isl_band_get_children( - __isl_keep isl_band *band); - - __isl_give isl_union_map *isl_band_get_prefix_schedule( - __isl_keep isl_band *band); - __isl_give isl_union_map *isl_band_get_partial_schedule( - __isl_keep isl_band *band); - __isl_give isl_union_map *isl_band_get_suffix_schedule( - __isl_keep isl_band *band); - - int isl_band_n_member(__isl_keep isl_band *band); - int isl_band_member_is_zero_distance( - __isl_keep isl_band *band, int pos); - -Note that a scheduling dimension is considered to be ``zero -distance'' if it does not carry any proximity dependences -within its band. -That is, if the dependence distances of the proximity -dependences are all zero in that direction (for fixed -iterations of outer bands). - -A representation of the band can be printed using - - #include - __isl_give isl_printer *isl_printer_print_band( - __isl_take isl_printer *p, - __isl_keep isl_band *band); - -=head3 Options - - #include - int isl_options_set_schedule_max_constant_term( - isl_ctx *ctx, int val); - int isl_options_get_schedule_max_constant_term( - isl_ctx *ctx); - int isl_options_set_schedule_maximize_band_depth( - isl_ctx *ctx, int val); - int isl_options_get_schedule_maximize_band_depth( - isl_ctx *ctx); - int isl_options_set_schedule_outer_zero_distance( - isl_ctx *ctx, int val); - int isl_options_get_schedule_outer_zero_distance( - isl_ctx *ctx); - -=over - -=item * max_constant_term - -This option enforces that the constant coefficients in the calculated schedule -are not larger than the maximal constant term. This option can significantly -increase the speed of the scheduling calculation and may also prevent fusing of -unrelated dimensions. A value of -1 means that this option does not introduce -bounds on the constant coefficients. - -=item * maximize_band_depth - -If this option is set, we do not split bands at the point -where we detect splitting is necessary. Instead, we -backtrack and split bands as early as possible. This -reduces the number of splits and maximizes the width of -the bands. Wider bands give more possibilities for tiling. - -=item * schedule_outer_zero_distance - -If this option is set, then we try to construct schedules -where the outermost scheduling dimension in each band -results in a zero dependence distance over the proximity -dependences. - -=back - -=head2 Parametric Vertex Enumeration - -The parametric vertex enumeration described in this section -is mainly intended to be used internally and by the C -library. - - #include - __isl_give isl_vertices *isl_basic_set_compute_vertices( - __isl_keep isl_basic_set *bset); - -The function C performs the -actual computation of the parametric vertices and the chamber -decomposition and store the result in an C object. -This information can be queried by either iterating over all -the vertices or iterating over all the chambers or cells -and then iterating over all vertices that are active on the chamber. - - int isl_vertices_foreach_vertex( - __isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_vertex *vertex, void *user), - void *user); - - int isl_vertices_foreach_cell( - __isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), - void *user); - int isl_cell_foreach_vertex(__isl_keep isl_cell *cell, - int (*fn)(__isl_take isl_vertex *vertex, void *user), - void *user); - -Other operations that can be performed on an C object are -the following. - - isl_ctx *isl_vertices_get_ctx( - __isl_keep isl_vertices *vertices); - int isl_vertices_get_n_vertices( - __isl_keep isl_vertices *vertices); - void isl_vertices_free(__isl_take isl_vertices *vertices); - -Vertices can be inspected and destroyed using the following functions. - - isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex); - int isl_vertex_get_id(__isl_keep isl_vertex *vertex); - __isl_give isl_basic_set *isl_vertex_get_domain( - __isl_keep isl_vertex *vertex); - __isl_give isl_basic_set *isl_vertex_get_expr( - __isl_keep isl_vertex *vertex); - void isl_vertex_free(__isl_take isl_vertex *vertex); - -C returns a singleton parametric set describing -the vertex, while C returns the activity domain -of the vertex. -Note that C and C return -B basic sets, so they should mainly be used for inspection -and should not be mixed with integer sets. - -Chambers can be inspected and destroyed using the following functions. - - isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell); - __isl_give isl_basic_set *isl_cell_get_domain( - __isl_keep isl_cell *cell); - void isl_cell_free(__isl_take isl_cell *cell); - -=head1 Applications - -Although C is mainly meant to be used as a library, -it also contains some basic applications that use some -of the functionality of C. -The input may be specified in either the L -or the L. - -=head2 C - -C takes a polyhedron as input and prints -an integer element of the polyhedron, if there is any. -The first column in the output is the denominator and is always -equal to 1. If the polyhedron contains no integer points, -then a vector of length zero is printed. - -=head2 C - -C takes the same input as the C program -from the C distribution, i.e., a set of constraints -on the parameters, a line containing only -1 and finally a set -of constraints on a parametric polyhedron. -The coefficients of the parameters appear in the last columns -(but before the final constant column). -The output is the lexicographic minimum of the parametric polyhedron. -As C currently does not have its own output format, the output -is just a dump of the internal state. - -=head2 C - -C computes the minimum of some linear -or affine objective function over the integer points in a polyhedron. -If an affine objective function -is given, then the constant should appear in the last column. - -=head2 C - -Given a polytope, C prints -all integer points in the polytope. diff --git a/cloog-0.17.0/isl/include/isl/aff.h b/cloog-0.17.0/isl/include/isl/aff.h deleted file mode 100644 index 32c0d032c2f727b9fcd4c6a06af85326bd441014..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/aff.h +++ /dev/null @@ -1,350 +0,0 @@ -#ifndef ISL_AFF_H -#define ISL_AFF_H - -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_give isl_aff *isl_aff_zero_on_domain(__isl_take isl_local_space *ls); - -__isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff); -void *isl_aff_free(__isl_take isl_aff *aff); - -isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff); - -int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type); -int isl_aff_involves_dims(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_space *isl_aff_get_domain_space(__isl_keep isl_aff *aff); -__isl_give isl_space *isl_aff_get_space(__isl_keep isl_aff *aff); -__isl_give isl_local_space *isl_aff_get_domain_local_space( - __isl_keep isl_aff *aff); -__isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff); - -const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned pos); -int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v); -int isl_aff_get_coefficient(__isl_keep isl_aff *aff, - enum isl_dim_type type, int pos, isl_int *v); -int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v); -__isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v); -__isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v); -__isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); -__isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); -__isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v); -__isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v); -__isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v); -__isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v); -__isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v); - -int isl_aff_is_cst(__isl_keep isl_aff *aff); - -__isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, const char *s); -__isl_give isl_aff *isl_aff_set_dim_id(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); - -int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2); -int isl_aff_plain_is_zero(__isl_keep isl_aff *aff); - -__isl_give isl_aff *isl_aff_get_div(__isl_keep isl_aff *aff, int pos); - -__isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff); -__isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff); -__isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff); -__isl_give isl_aff *isl_aff_mod(__isl_take isl_aff *aff, isl_int mod); - -__isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); -__isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); -__isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - -__isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f); -__isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f); -__isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f); - -__isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned n); -__isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, - __isl_take isl_set *context); -__isl_give isl_aff *isl_aff_gist_params(__isl_take isl_aff *aff, - __isl_take isl_set *context); - -__isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); -__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2); - -__isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str); -__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p, - __isl_keep isl_aff *aff); -void isl_aff_dump(__isl_keep isl_aff *aff); - -isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff); -__isl_give isl_space *isl_pw_aff_get_domain_space(__isl_keep isl_pw_aff *pwaff); -__isl_give isl_space *isl_pw_aff_get_space(__isl_keep isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff); -__isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_space *dim); -__isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set, - __isl_take isl_aff *aff); - -const char *isl_pw_aff_get_dim_name(__isl_keep isl_pw_aff *pa, - enum isl_dim_type type, unsigned pos); -int isl_pw_aff_has_dim_id(__isl_keep isl_pw_aff *pa, - enum isl_dim_type type, unsigned pos); -__isl_give isl_id *isl_pw_aff_get_dim_id(__isl_keep isl_pw_aff *pa, - enum isl_dim_type type, unsigned pos); -__isl_give isl_pw_aff *isl_pw_aff_set_dim_id(__isl_take isl_pw_aff *pma, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); - -int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff); -int isl_pw_aff_plain_is_equal(__isl_keep isl_pw_aff *pwaff1, - __isl_keep isl_pw_aff *pwaff2); - -__isl_give isl_pw_aff *isl_pw_aff_union_min(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_union_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_union_add(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -__isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff); -void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff); - -unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type); -int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - -int isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_align_params(__isl_take isl_pw_aff *pwaff, - __isl_take isl_space *model); - -__isl_give isl_pw_aff *isl_pw_aff_set_tuple_id(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, __isl_take isl_id *id); - -__isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_min(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_mul(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_sub(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff); -__isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff); -__isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff); -__isl_give isl_pw_aff *isl_pw_aff_mod(__isl_take isl_pw_aff *pwaff, - isl_int mod); - -__isl_give isl_pw_aff *isl_pw_aff_intersect_params(__isl_take isl_pw_aff *pa, - __isl_take isl_set *set); -__isl_give isl_pw_aff *isl_pw_aff_intersect_domain(__isl_take isl_pw_aff *pa, - __isl_take isl_set *set); - -__isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_set *cond, - __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false); - -__isl_give isl_pw_aff *isl_pw_aff_scale(__isl_take isl_pw_aff *pwaff, - isl_int f); -__isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff, - isl_int f); - -__isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned n); -__isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp); -__isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff, - __isl_take isl_set *context); -__isl_give isl_pw_aff *isl_pw_aff_gist_params(__isl_take isl_pw_aff *pwaff, - __isl_take isl_set *context); - -int isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff, - int (*fn)(__isl_take isl_set *set, __isl_take isl_aff *aff, - void *user), void *user); - -__isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff); -__isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff); -__isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff); -__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff); - -__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); -__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2); - -__isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str); -__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff); -void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff); - -__isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list); -__isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list); - -__isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); -__isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); -__isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); -__isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); -__isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); -__isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2); - -isl_ctx *isl_multi_aff_get_ctx(__isl_keep isl_multi_aff *maff); -__isl_give isl_space *isl_multi_aff_get_space(__isl_keep isl_multi_aff *maff); -__isl_give isl_multi_aff *isl_multi_aff_copy(__isl_keep isl_multi_aff *maff); -void *isl_multi_aff_free(__isl_take isl_multi_aff *maff); - -unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff *maff, - enum isl_dim_type type); -__isl_give isl_aff *isl_multi_aff_get_aff(__isl_keep isl_multi_aff *multi, - int pos); - -__isl_give isl_multi_aff *isl_multi_aff_set_dim_name( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned pos, const char *s); - -int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1, - __isl_keep isl_multi_aff *maff2); - -__isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1, - __isl_take isl_multi_aff *maff2); - -__isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff, - isl_int f); - -__isl_give isl_multi_aff *isl_multi_aff_gist_params( - __isl_take isl_multi_aff *maff, __isl_take isl_set *context); -__isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff, - __isl_take isl_set *context); - -__isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff, - __isl_give isl_local_space **ls); - -__isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p, - __isl_keep isl_multi_aff *maff); - -__isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx, - const char *str); -void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set, - __isl_take isl_multi_aff *maff); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy( - __isl_keep isl_pw_multi_aff *pma); -void *isl_pw_multi_aff_free(__isl_take isl_pw_multi_aff *pma); - -unsigned isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); - -isl_ctx *isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff *pma); -__isl_give isl_space *isl_pw_multi_aff_get_domain_space( - __isl_keep isl_pw_multi_aff *pma); -__isl_give isl_space *isl_pw_multi_aff_get_space( - __isl_keep isl_pw_multi_aff *pma); -const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); -__isl_give isl_id *isl_pw_multi_aff_get_tuple_id( - __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type); -int isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id( - __isl_take isl_pw_multi_aff *pma, - enum isl_dim_type type, __isl_take isl_id *id); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty(__isl_take isl_space *space); - -const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff *pma, - enum isl_dim_type type, unsigned pos); -__isl_give isl_id *isl_pw_multi_aff_get_dim_id( - __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type, - unsigned pos); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_dim_id( - __isl_take isl_pw_multi_aff *pma, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); - -int isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma1, - __isl_keep isl_pw_multi_aff *pma2); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add( - __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add( - __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params( - __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain( - __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist_params( - __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist( - __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); - -int isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff *pma, - int (*fn)(__isl_take isl_set *set, __isl_take isl_multi_aff *maff, - void *user), void *user); - -__isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma); -__isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma); - -__isl_give isl_printer *isl_printer_print_pw_multi_aff(__isl_take isl_printer *p, - __isl_keep isl_pw_multi_aff *pma); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx, - const char *str); -void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff *pma); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/aff_type.h b/cloog-0.17.0/isl/include/isl/aff_type.h deleted file mode 100644 index 152eeb554e375a1b07ca56e95a7496ed5472787b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/aff_type.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef ISL_AFF_TYPE_H -#define ISL_AFF_TYPE_H - -struct isl_aff; -typedef struct isl_aff isl_aff; - -struct isl_pw_aff; -typedef struct isl_pw_aff isl_pw_aff; - -struct isl_multi_aff; -typedef struct isl_multi_aff isl_multi_aff; - -struct isl_pw_multi_aff; -typedef struct isl_pw_multi_aff isl_pw_multi_aff; - -#endif diff --git a/cloog-0.17.0/isl/include/isl/arg.h b/cloog-0.17.0/isl/include/isl/arg.h deleted file mode 100644 index 4ae3374b21e11144b80c2d7267f77899017ead91..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/arg.h +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_ARG_H -#define ISL_ARG_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_arg_choice { - const char *name; - unsigned value; -}; - -struct isl_arg_flags { - const char *name; - unsigned mask; - unsigned value; -}; - -enum isl_arg_type { - isl_arg_end, - isl_arg_alias, - isl_arg_arg, - isl_arg_bool, - isl_arg_child, - isl_arg_choice, - isl_arg_flags, - isl_arg_footer, - isl_arg_int, - isl_arg_user, - isl_arg_long, - isl_arg_ulong, - isl_arg_str, - isl_arg_str_list, - isl_arg_version -}; - -struct isl_args; - -struct isl_arg { - enum isl_arg_type type; - char short_name; - const char *long_name; - const char *argument_name; - size_t offset; - const char *help_msg; -#define ISL_ARG_SINGLE_DASH (1 << 0) -#define ISL_ARG_BOOL_ARG (1 << 1) -#define ISL_ARG_HIDDEN (1 << 2) - unsigned flags; - union { - struct { - struct isl_arg_choice *choice; - unsigned default_value; - unsigned default_selected; - int (*set)(void *opt, unsigned val); - } choice; - struct { - struct isl_arg_flags *flags; - unsigned default_value; - } flags; - struct { - unsigned default_value; - int (*set)(void *opt, unsigned val); - } b; - struct { - int default_value; - } i; - struct { - long default_value; - long default_selected; - int (*set)(void *opt, long val); - } l; - struct { - unsigned long default_value; - } ul; - struct { - const char *default_value; - } str; - struct { - size_t offset_n; - } str_list; - struct { - struct isl_args *child; - } child; - struct { - void (*print_version)(void); - } version; - struct { - int (*init)(void*); - void (*clear)(void*); - } user; - } u; -}; - -struct isl_args { - size_t options_size; - struct isl_arg *args; -}; - -#define ISL_ARGS_START(s,name) \ - struct isl_arg name ## LIST[]; \ - struct isl_args name = { sizeof(s), name ## LIST }; \ - struct isl_arg name ## LIST[] = { -#define ISL_ARGS_END \ - { isl_arg_end } }; - -#define ISL_ARG_ALIAS(l) { \ - .type = isl_arg_alias, \ - .long_name = l, \ -}, -#define ISL_ARG_ARG(st,f,a,d) { \ - .type = isl_arg_arg, \ - .argument_name = a, \ - .offset = offsetof(st, f), \ - .u = { .str = { .default_value = d } } \ -}, -#define ISL_ARG_FOOTER(h) { \ - .type = isl_arg_footer, \ - .help_msg = h, \ -}, -#define ISL_ARG_CHOICE(st,f,s,l,c,d,h) { \ - .type = isl_arg_choice, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .choice = { .choice = c, .default_value = d, \ - .default_selected = d, .set = NULL } } \ -}, -#define ISL_ARG_OPT_CHOICE(st,f,s,l,c,d,ds,h) { \ - .type = isl_arg_choice, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .choice = { .choice = c, .default_value = d, \ - .default_selected = ds, .set = NULL } } \ -}, -#define ISL_ARG_USER_OPT_CHOICE(st,f,s,l,c,setter,d,ds,h) { \ - .type = isl_arg_choice, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .choice = { .choice = c, .default_value = d, \ - .default_selected = ds, .set = setter } } \ -}, -#define _ISL_ARG_BOOL_F(o,s,l,setter,d,h,fl) { \ - .type = isl_arg_bool, \ - .short_name = s, \ - .long_name = l, \ - .offset = o, \ - .help_msg = h, \ - .flags = fl, \ - .u = { .b = { .default_value = d, .set = setter } } \ -}, -#define ISL_ARG_BOOL_F(st,f,s,l,d,h,fl) \ - _ISL_ARG_BOOL_F(offsetof(st, f),s,l,NULL,d,h,fl) -#define ISL_ARG_BOOL(st,f,s,l,d,h) \ - ISL_ARG_BOOL_F(st,f,s,l,d,h,0) -#define ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,fl) \ - _ISL_ARG_BOOL_F(-1,s,l,setter,0,h,fl) -#define ISL_ARG_PHANTOM_BOOL(s,l,setter,h) \ - ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,0) -#define ISL_ARG_INT_F(st,f,s,l,a,d,h,fl) { \ - .type = isl_arg_int, \ - .short_name = s, \ - .long_name = l, \ - .argument_name = a, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .flags = fl, \ - .u = { .ul = { .default_value = d } } \ -}, -#define ISL_ARG_INT(st,f,s,l,a,d,h) \ - ISL_ARG_INT_F(st,f,s,l,a,d,h,0) -#define ISL_ARG_LONG(st,f,s,lo,d,h) { \ - .type = isl_arg_long, \ - .short_name = s, \ - .long_name = lo, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .l = { .default_value = d, .default_selected = d, \ - .set = NULL } } \ -}, -#define ISL_ARG_USER_LONG(st,f,s,lo,setter,d,h) { \ - .type = isl_arg_long, \ - .short_name = s, \ - .long_name = lo, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .l = { .default_value = d, .default_selected = d, \ - .set = setter } } \ -}, -#define ISL_ARG_OPT_LONG(st,f,s,lo,d,ds,h) { \ - .type = isl_arg_long, \ - .short_name = s, \ - .long_name = lo, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .l = { .default_value = d, .default_selected = ds, \ - .set = NULL } } \ -}, -#define ISL_ARG_ULONG(st,f,s,l,d,h) { \ - .type = isl_arg_ulong, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .ul = { .default_value = d } } \ -}, -#define ISL_ARG_STR_F(st,f,s,l,a,d,h,fl) { \ - .type = isl_arg_str, \ - .short_name = s, \ - .long_name = l, \ - .argument_name = a, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .flags = fl, \ - .u = { .str = { .default_value = d } } \ -}, -#define ISL_ARG_STR(st,f,s,l,a,d,h) \ - ISL_ARG_STR_F(st,f,s,l,a,d,h,0) -#define ISL_ARG_STR_LIST(st,f_n,f_l,s,l,a,h) { \ - .type = isl_arg_str_list, \ - .short_name = s, \ - .long_name = l, \ - .argument_name = a, \ - .offset = offsetof(st, f_l), \ - .help_msg = h, \ - .u = { .str_list = { .offset_n = offsetof(st, f_n) } } \ -}, -#define _ISL_ARG_CHILD(o,l,c,h,fl) { \ - .type = isl_arg_child, \ - .long_name = l, \ - .offset = o, \ - .help_msg = h, \ - .flags = fl, \ - .u = { .child = { .child = c } } \ -}, -#define ISL_ARG_CHILD(st,f,l,c,h) \ - _ISL_ARG_CHILD(offsetof(st, f),l,c,h,0) -#define ISL_ARG_GROUP_F(c,h,fl) \ - _ISL_ARG_CHILD(-1,NULL,c,h,fl) -#define ISL_ARG_GROUP(c,h) \ - ISL_ARG_GROUP_F(c,h,0) -#define ISL_ARG_FLAGS(st,f,s,l,c,d,h) { \ - .type = isl_arg_flags, \ - .short_name = s, \ - .long_name = l, \ - .offset = offsetof(st, f), \ - .help_msg = h, \ - .u = { .flags = { .flags = c, .default_value = d } } \ -}, -#define ISL_ARG_USER(st,f,i,c) { \ - .type = isl_arg_user, \ - .offset = offsetof(st, f), \ - .u = { .user = { .init = i, .clear = c} } \ -}, -#define ISL_ARG_VERSION(print) { \ - .type = isl_arg_version, \ - .u = { .version = { .print_version = print } } \ -}, - -#define ISL_ARG_ALL (1 << 0) - -void isl_args_set_defaults(struct isl_args *args, void *opt); -void isl_args_free(struct isl_args *args, void *opt); -int isl_args_parse(struct isl_args *args, int argc, char **argv, void *opt, - unsigned flags); - -#define ISL_ARG_DECL(prefix,st,args) \ -extern struct isl_args args; \ -st *prefix ## _new_with_defaults(void); \ -void prefix ## _free(st *opt); \ -int prefix ## _parse(st *opt, int argc, char **argv, unsigned flags); - -#define ISL_ARG_DEF(prefix,st,args) \ -st *prefix ## _new_with_defaults() \ -{ \ - st *opt = (st *)calloc(1, sizeof(st)); \ - if (opt) \ - isl_args_set_defaults(&(args), opt); \ - return opt; \ -} \ - \ -void prefix ## _free(st *opt) \ -{ \ - isl_args_free(&(args), opt); \ -} \ - \ -int prefix ## _parse(st *opt, int argc, char **argv, unsigned flags) \ -{ \ - return isl_args_parse(&(args), argc, argv, opt, flags); \ -} - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/band.h b/cloog-0.17.0/isl/include/isl/band.h deleted file mode 100644 index 880cb126204cfae140344f1679a61aabdbedd466..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/band.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef ISL_BAND_H -#define ISL_BAND_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_band; -typedef struct isl_band isl_band; - -__isl_give isl_band *isl_band_copy(__isl_keep isl_band *band); -void *isl_band_free(__isl_take isl_band *band); - -isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band); - -int isl_band_has_children(__isl_keep isl_band *band); -__isl_give isl_band_list *isl_band_get_children( - __isl_keep isl_band *band); - -__isl_give isl_union_map *isl_band_get_prefix_schedule( - __isl_keep isl_band *band); -__isl_give isl_union_map *isl_band_get_partial_schedule( - __isl_keep isl_band *band); -__isl_give isl_union_map *isl_band_get_suffix_schedule( - __isl_keep isl_band *band); - -int isl_band_n_member(__isl_keep isl_band *band); -int isl_band_member_is_zero_distance(__isl_keep isl_band *band, int pos); - -__isl_give isl_printer *isl_printer_print_band(__isl_take isl_printer *p, - __isl_keep isl_band *band); -void isl_band_dump(__isl_keep isl_band *band); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/blk.h b/cloog-0.17.0/isl/include/isl/blk.h deleted file mode 100644 index 690a872a962b2809d199ea7ce00384084463ef70..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/blk.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_BLK_H -#define ISL_BLK_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_blk { - size_t size; - isl_int *data; -}; - -#define ISL_BLK_CACHE_SIZE 20 - -struct isl_ctx; - -struct isl_blk isl_blk_alloc(struct isl_ctx *ctx, size_t n); -struct isl_blk isl_blk_empty(void); -int isl_blk_is_error(struct isl_blk block); -struct isl_blk isl_blk_extend(struct isl_ctx *ctx, struct isl_blk block, - size_t new_n); -void isl_blk_free(struct isl_ctx *ctx, struct isl_blk block); -void isl_blk_clear_cache(struct isl_ctx *ctx); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/config.h.in b/cloog-0.17.0/isl/include/isl/config.h.in deleted file mode 100644 index 231575e5859c9fc35e3922d1263e4ecf0812b276..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/config.h.in +++ /dev/null @@ -1,3 +0,0 @@ -#undef GCC_WARN_UNUSED_RESULT - -#undef ISL_PIPLIB diff --git a/cloog-0.17.0/isl/include/isl/constraint.h b/cloog-0.17.0/isl/include/isl/constraint.h deleted file mode 100644 index bfd8989f183b0ab3a87bd5a98b93c5bdb45399f1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/constraint.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_CONSTRAINT_H -#define ISL_CONSTRAINT_H - -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_constraint; -typedef struct isl_constraint isl_constraint; - -isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c); - -__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls); -__isl_give isl_constraint *isl_inequality_alloc(__isl_take isl_local_space *ls); - -struct isl_constraint *isl_constraint_cow(struct isl_constraint *c); -struct isl_constraint *isl_constraint_copy(struct isl_constraint *c); -void *isl_constraint_free(__isl_take isl_constraint *c); - -int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user); -int isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user); -int isl_constraint_is_equal(struct isl_constraint *constraint1, - struct isl_constraint *constraint2); - -int isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user); - -__isl_give isl_basic_map *isl_basic_map_add_constraint( - __isl_take isl_basic_map *bmap, __isl_take isl_constraint *constraint); -__isl_give isl_basic_set *isl_basic_set_add_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint); -__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map, - __isl_take isl_constraint *constraint); -__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set, - __isl_take isl_constraint *constraint); - -int isl_basic_map_has_defining_equality( - __isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos, - __isl_give isl_constraint **c); -int isl_basic_set_has_defining_equality( - struct isl_basic_set *bset, enum isl_dim_type type, int pos, - struct isl_constraint **constraint); -int isl_basic_set_has_defining_inequalities( - struct isl_basic_set *bset, enum isl_dim_type type, int pos, - struct isl_constraint **lower, - struct isl_constraint **upper); - -__isl_give isl_space *isl_constraint_get_space( - __isl_keep isl_constraint *constraint); -int isl_constraint_dim(struct isl_constraint *constraint, - enum isl_dim_type type); - -int isl_constraint_involves_dims(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned first, unsigned n); - -const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned pos); -void isl_constraint_get_constant(__isl_keep isl_constraint *constraint, - isl_int *v); -void isl_constraint_get_coefficient(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int *v); -__isl_give isl_constraint *isl_constraint_set_constant( - __isl_take isl_constraint *constraint, isl_int v); -__isl_give isl_constraint *isl_constraint_set_constant_si( - __isl_take isl_constraint *constraint, int v); -__isl_give isl_constraint *isl_constraint_set_coefficient( - __isl_take isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int v); -__isl_give isl_constraint *isl_constraint_set_coefficient_si( - __isl_take isl_constraint *constraint, - enum isl_dim_type type, int pos, int v); - -__isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint, - int pos); - -struct isl_constraint *isl_constraint_negate(struct isl_constraint *constraint); - -int isl_constraint_is_equality(__isl_keep isl_constraint *constraint); -int isl_constraint_is_div_constraint(__isl_keep isl_constraint *constraint); - -__isl_give isl_basic_map *isl_basic_map_from_constraint( - __isl_take isl_constraint *constraint); -struct isl_basic_set *isl_basic_set_from_constraint( - struct isl_constraint *constraint); - -__isl_give isl_aff *isl_constraint_get_bound( - __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos); -__isl_give isl_aff *isl_constraint_get_aff( - __isl_keep isl_constraint *constraint); -__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff); -__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff); - -__isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint); - -__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p, - __isl_keep isl_constraint *c); -void isl_constraint_dump(__isl_keep isl_constraint *c); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/ctx.h b/cloog-0.17.0/isl/include/isl/ctx.h deleted file mode 100644 index a77272300fd04b09e9f3f5124c93f479b50032d4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/ctx.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_CTX_H -#define ISL_CTX_H - -#include -#include - -#include -#include -#include -#include -#include - -#ifndef __isl_give -#define __isl_give -#endif -#ifndef __isl_take -#define __isl_take -#endif -#ifndef __isl_keep -#define __isl_keep -#endif -#ifndef __isl_export -#define __isl_export -#endif -#ifndef __isl_constructor -#define __isl_constructor -#endif -#ifndef __isl_subclass -#define __isl_subclass(super) -#endif - -#ifdef GCC_WARN_UNUSED_RESULT -#define WARN_UNUSED GCC_WARN_UNUSED_RESULT -#else -#define WARN_UNUSED -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Nearly all isa functions require a struct isl_ctx allocated using - * isl_ctx_alloc. This ctx contains (or will contain) options that - * control the behavior of the library and some caches. - * - * An object allocated within a given ctx should never be used inside - * another ctx. Functions for moving objects from one ctx to another - * will be added as the need arises. - * - * A given context should only be used inside a single thread. - * A global context for synchronization between different threads - * as well as functions for moving a context to a different thread - * will be added as the need arises. - * - * If anything goes wrong (out of memory, failed assertion), then - * the library will currently simply abort. This will be made - * configurable in the future. - * Users of the library should expect functions that return - * a pointer to a structure, to return NULL, indicating failure. - * Any function accepting a pointer to a structure will treat - * a NULL argument as a failure, resulting in the function freeing - * the remaining structures (if any) and returning NULL itself - * (in case of pointer return type). - * The only exception is the isl_ctx argument, which should never be NULL. - */ -struct isl_stats { - long gbr_solved_lps; -}; -enum isl_error { - isl_error_none = 0, - isl_error_abort, - isl_error_unknown, - isl_error_internal, - isl_error_invalid, - isl_error_unsupported -}; -struct isl_ctx; -typedef struct isl_ctx isl_ctx; - -/* Some helper macros */ - -#define ISL_FL_INIT(l, f) (l) = (f) /* Specific flags location. */ -#define ISL_FL_SET(l, f) ((l) |= (f)) -#define ISL_FL_CLR(l, f) ((l) &= ~(f)) -#define ISL_FL_ISSET(l, f) (!!((l) & (f))) - -#define ISL_F_INIT(p, f) ISL_FL_INIT((p)->flags, f) /* Structure element flags. */ -#define ISL_F_SET(p, f) ISL_FL_SET((p)->flags, f) -#define ISL_F_CLR(p, f) ISL_FL_CLR((p)->flags, f) -#define ISL_F_ISSET(p, f) ISL_FL_ISSET((p)->flags, f) - -/* isl_check_ctx() checks at compile time if 'ctx' is of type 'isl_ctx *' and - * returns the value of 'expr'. It is used to ensure, that always an isl_ctx is - * passed to the following macros, even if they currently do not use it. - */ -#define isl_check_ctx(ctx, expr) (ctx != (isl_ctx *) 0) ? expr : expr - -#define isl_alloc(ctx,type,size) isl_check_ctx(ctx, (type *)malloc(size)) -#define isl_calloc(ctx,type,size) isl_check_ctx(ctx, \ - (type *)calloc(1, size)) -#define isl_realloc(ctx,ptr,type,size) isl_check_ctx(ctx, \ - (type *)realloc(ptr,size)) -#define isl_alloc_type(ctx,type) isl_alloc(ctx,type,sizeof(type)) -#define isl_calloc_type(ctx,type) isl_calloc(ctx,type,sizeof(type)) -#define isl_realloc_type(ctx,ptr,type) isl_realloc(ctx,ptr,type,sizeof(type)) -#define isl_alloc_array(ctx,type,n) isl_alloc(ctx,type,(n)*sizeof(type)) -#define isl_calloc_array(ctx,type,n) isl_check_ctx(ctx,\ - (type *)calloc(n, sizeof(type))) -#define isl_realloc_array(ctx,ptr,type,n) \ - isl_realloc(ctx,ptr,type,(n)*sizeof(type)) - -#define isl_die(ctx,errno,msg,code) \ - do { \ - isl_handle_error(ctx, errno, msg, __FILE__, __LINE__); \ - code; \ - } while (0) - -void isl_handle_error(isl_ctx *ctx, int errno, const char *msg, - const char *file, int line); - -#define isl_assert4(ctx,test,code,errno) \ - do { \ - if (test) \ - break; \ - isl_die(ctx, errno, "Assertion \"" #test "\" failed", code); \ - } while (0) -#define isl_assert(ctx,test,code) \ - isl_assert4(ctx,test,code,isl_error_unknown) - -#define isl_min(a,b) ((a < b) ? (a) : (b)) - -/* struct isl_ctx functions */ - -struct isl_options *isl_ctx_options(isl_ctx *ctx); - -isl_ctx *isl_ctx_alloc_with_options(struct isl_args *args, - __isl_take void *opt); -isl_ctx *isl_ctx_alloc(void); -void *isl_ctx_peek_options(isl_ctx *ctx, struct isl_args *args); -int isl_ctx_parse_options(isl_ctx *ctx, int argc, char **argv, unsigned flags); -void isl_ctx_ref(struct isl_ctx *ctx); -void isl_ctx_deref(struct isl_ctx *ctx); -void isl_ctx_free(isl_ctx *ctx); - -void isl_ctx_abort(isl_ctx *ctx); -void isl_ctx_resume(isl_ctx *ctx); -int isl_ctx_aborted(isl_ctx *ctx); - -#define ISL_ARG_CTX_DECL(prefix,st,args) \ -st *isl_ctx_peek_ ## prefix(isl_ctx *ctx); - -#define ISL_ARG_CTX_DEF(prefix,st,args) \ -st *isl_ctx_peek_ ## prefix(isl_ctx *ctx) \ -{ \ - return (st *)isl_ctx_peek_options(ctx, &(args)); \ -} - -#define ISL_CTX_GET_INT_DEF(prefix,st,args,field) \ -int prefix ## _get_ ## field(isl_ctx *ctx) \ -{ \ - st *options; \ - options = isl_ctx_peek_ ## prefix(ctx); \ - if (!options) \ - isl_die(ctx, isl_error_invalid, \ - "isl_ctx does not reference " #prefix, \ - return -1); \ - return options->field; \ -} - -#define ISL_CTX_SET_INT_DEF(prefix,st,args,field) \ -int prefix ## _set_ ## field(isl_ctx *ctx, int val) \ -{ \ - st *options; \ - options = isl_ctx_peek_ ## prefix(ctx); \ - if (!options) \ - isl_die(ctx, isl_error_invalid, \ - "isl_ctx does not reference " #prefix, \ - return -1); \ - options->field = val; \ - return 0; \ -} - -#define ISL_CTX_GET_BOOL_DEF(prefix,st,args,field) \ - ISL_CTX_GET_INT_DEF(prefix,st,args,field) - -#define ISL_CTX_SET_BOOL_DEF(prefix,st,args,field) \ - ISL_CTX_SET_INT_DEF(prefix,st,args,field) - -#define ISL_CTX_GET_CHOICE_DEF(prefix,st,args,field) \ - ISL_CTX_GET_INT_DEF(prefix,st,args,field) - -#define ISL_CTX_SET_CHOICE_DEF(prefix,st,args,field) \ - ISL_CTX_SET_INT_DEF(prefix,st,args,field) - -enum isl_error isl_ctx_last_error(isl_ctx *ctx); -void isl_ctx_reset_error(isl_ctx *ctx); -void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/dim.h b/cloog-0.17.0/isl/include/isl/dim.h deleted file mode 100644 index 7c31c0291ca7e17ec674ef8431cece3f123d98dc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/dim.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef ISL_DIM_H -#define ISL_DIM_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define isl_dim isl_space - -isl_ctx *isl_dim_get_ctx(__isl_keep isl_space *dim); -__isl_give isl_space *isl_dim_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_give isl_space *isl_dim_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim); -__isl_give isl_space *isl_dim_copy(__isl_keep isl_space *dim); -void isl_dim_free(__isl_take isl_space *dim); - -unsigned isl_dim_size(__isl_keep isl_space *dim, enum isl_dim_type type); - -__isl_give isl_space *isl_dim_set_dim_id(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); -int isl_dim_has_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos); -__isl_give isl_id *isl_dim_get_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos); - -int isl_dim_find_dim_by_id(__isl_keep isl_space *dim, - enum isl_dim_type type, __isl_keep isl_id *id); - -__isl_give isl_space *isl_dim_set_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type, __isl_take isl_id *id); -__isl_give isl_space *isl_dim_reset_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type); -int isl_dim_has_tuple_id(__isl_keep isl_space *dim, enum isl_dim_type type); -__isl_give isl_id *isl_dim_get_tuple_id(__isl_keep isl_space *dim, - enum isl_dim_type type); - -__isl_give isl_space *isl_dim_set_name(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_keep const char *name); -__isl_keep const char *isl_dim_get_name(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos); - -__isl_give isl_space *isl_dim_set_tuple_name(__isl_take isl_space *dim, - enum isl_dim_type type, const char *s); -const char *isl_dim_get_tuple_name(__isl_keep isl_space *dim, - enum isl_dim_type type); - -int isl_dim_is_wrapping(__isl_keep isl_space *dim); -__isl_give isl_space *isl_dim_wrap(__isl_take isl_space *dim); -__isl_give isl_space *isl_dim_unwrap(__isl_take isl_space *dim); - -__isl_give isl_space *isl_dim_domain(__isl_take isl_space *dim); -__isl_give isl_space *isl_dim_from_domain(__isl_take isl_space *dim); -__isl_give isl_space *isl_dim_range(__isl_take isl_space *dim); -__isl_give isl_space *isl_dim_from_range(__isl_take isl_space *dim); -__isl_give isl_space *isl_dim_reverse(__isl_take isl_space *dim); -__isl_give isl_space *isl_dim_join(__isl_take isl_space *left, - __isl_take isl_space *right); -__isl_give isl_space *isl_dim_align_params(__isl_take isl_space *dim1, - __isl_take isl_space *dim2); -__isl_give isl_space *isl_dim_insert(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_space *isl_dim_add(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned n); -__isl_give isl_space *isl_dim_drop(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_space *isl_dim_move(__isl_take isl_space *dim, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_space *isl_dim_map_from_set( - __isl_take isl_space *dim); -__isl_give isl_space *isl_dim_zip(__isl_take isl_space *dim); - -__isl_give isl_local_space *isl_local_space_from_dim( - __isl_take isl_space *dim); -__isl_give isl_space *isl_local_space_get_dim( - __isl_keep isl_local_space *ls); - -__isl_give isl_space *isl_aff_get_dim(__isl_keep isl_aff *aff); -__isl_give isl_space *isl_pw_aff_get_dim(__isl_keep isl_pw_aff *pwaff); - -__isl_give isl_space *isl_constraint_get_dim( - __isl_keep isl_constraint *constraint); - -__isl_give isl_space *isl_basic_map_get_dim(__isl_keep isl_basic_map *bmap); -__isl_give isl_space *isl_map_get_dim(__isl_keep isl_map *map); -__isl_give isl_space *isl_union_map_get_dim(__isl_keep isl_union_map *umap); - -__isl_give isl_space *isl_basic_set_get_dim(__isl_keep isl_basic_set *bset); -__isl_give isl_space *isl_set_get_dim(__isl_keep isl_set *set); -__isl_give isl_space *isl_union_set_get_dim(__isl_keep isl_union_set *uset); - -__isl_give isl_space *isl_point_get_dim(__isl_keep isl_point *pnt); - -__isl_give isl_space *isl_qpolynomial_get_dim(__isl_keep isl_qpolynomial *qp); -__isl_give isl_space *isl_pw_qpolynomial_get_dim( - __isl_keep isl_pw_qpolynomial *pwqp); -__isl_give isl_space *isl_qpolynomial_fold_get_dim( - __isl_keep isl_qpolynomial_fold *fold); -__isl_give isl_space *isl_pw_qpolynomial_fold_get_dim( - __isl_keep isl_pw_qpolynomial_fold *pwf); -__isl_give isl_space *isl_union_pw_qpolynomial_get_dim( - __isl_keep isl_union_pw_qpolynomial *upwqp); -__isl_give isl_space *isl_union_pw_qpolynomial_fold_get_dim( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/flow.h b/cloog-0.17.0/isl/include/isl/flow.h deleted file mode 100644 index 8fc269859aa07626161ab6289eac20b984aeb031..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/flow.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef ISL_FLOW_H -#define ISL_FLOW_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Let n (>= 0) be the number of iterators shared by first and second. - * If first precedes second textually return 2 * n + 1, - * otherwise return 2 * n. - */ -typedef int (*isl_access_level_before)(void *first, void *second); - -struct isl_access_info; -typedef struct isl_access_info isl_access_info; -struct isl_flow; -typedef struct isl_flow isl_flow; - -__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink, - void *sink_user, isl_access_level_before fn, int max_source); -__isl_give isl_access_info *isl_access_info_add_source( - __isl_take isl_access_info *acc, __isl_take isl_map *source, - int must, void *source_user); -void isl_access_info_free(__isl_take isl_access_info *acc); - -isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc); - -__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc); -int isl_flow_foreach(__isl_keep isl_flow *deps, - int (*fn)(__isl_take isl_map *dep, int must, void *dep_user, void *user), - void *user); -__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must); -void isl_flow_free(__isl_take isl_flow *deps); - -isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps); - -int isl_union_map_compute_flow(__isl_take isl_union_map *sink, - __isl_take isl_union_map *must_source, - __isl_take isl_union_map *may_source, - __isl_take isl_union_map *schedule, - __isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep, - __isl_give isl_union_map **must_no_source, - __isl_give isl_union_map **may_no_source); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/hash.h b/cloog-0.17.0/isl/include/isl/hash.h deleted file mode 100644 index 654b6b6dc52db0e10a6883cdc845726d980bc913..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/hash.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_HASH_H -#define ISL_HASH_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define isl_hash_init() (2166136261u) -#define isl_hash_byte(h,b) do { \ - h *= 16777619; \ - h ^= b; \ - } while(0) -#define isl_hash_hash(h,h2) \ - do { \ - isl_hash_byte(h, (h2) & 0xFF); \ - isl_hash_byte(h, ((h2) >> 8) & 0xFF); \ - isl_hash_byte(h, ((h2) >> 16) & 0xFF); \ - isl_hash_byte(h, ((h2) >> 24) & 0xFF); \ - } while(0) -#define isl_hash_bits(h,bits) \ - ((bits) == 32) ? (h) : \ - ((bits) >= 16) ? \ - ((h) >> (bits)) ^ ((h) & (((uint32_t)1 << (bits)) - 1)) : \ - (((h) >> (bits)) ^ (h)) & (((uint32_t)1 << (bits)) - 1) - -uint32_t isl_hash_string(uint32_t hash, const char *s); -uint32_t isl_hash_mem(uint32_t hash, const void *p, size_t len); - -#define isl_hash_builtin(h,l) isl_hash_mem(h, &l, sizeof(l)) - -struct isl_hash_table_entry -{ - uint32_t hash; - void *data; -}; - -struct isl_hash_table { - int bits; - int n; - struct isl_hash_table_entry *entries; -}; - -struct isl_ctx; - -struct isl_hash_table *isl_hash_table_alloc(struct isl_ctx *ctx, int min_size); -void isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table); - -int isl_hash_table_init(struct isl_ctx *ctx, struct isl_hash_table *table, - int min_size); -void isl_hash_table_clear(struct isl_hash_table *table); -struct isl_hash_table_entry *isl_hash_table_find(struct isl_ctx *ctx, - struct isl_hash_table *table, - uint32_t key_hash, - int (*eq)(const void *entry, const void *val), - const void *val, int reserve); -int isl_hash_table_foreach(struct isl_ctx *ctx, - struct isl_hash_table *table, - int (*fn)(void **entry, void *user), void *user); -void isl_hash_table_remove(struct isl_ctx *ctx, - struct isl_hash_table *table, - struct isl_hash_table_entry *entry); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/id.h b/cloog-0.17.0/isl/include/isl/id.h deleted file mode 100644 index 86232f71ef622940320599c27f23a01454806904..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/id.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef ISL_ID_H -#define ISL_ID_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_id; -typedef struct isl_id isl_id; - -isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id); - -__isl_give isl_id *isl_id_alloc(isl_ctx *ctx, - __isl_keep const char *name, void *user); -__isl_give isl_id *isl_id_copy(isl_id *id); -void *isl_id_free(__isl_take isl_id *id); - -void *isl_id_get_user(__isl_keep isl_id *id); -__isl_keep const char *isl_id_get_name(__isl_keep isl_id *id); - -__isl_give isl_printer *isl_printer_print_id(__isl_take isl_printer *p, - __isl_keep isl_id *id); -void isl_id_dump(__isl_keep isl_id *id); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/ilp.h b/cloog-0.17.0/isl/include/isl/ilp.h deleted file mode 100644 index de5ec807540a2d791353c3fd8e1608eb47946a15..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/ilp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_ILP_H -#define ISL_ILP_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_lp_result isl_basic_set_solve_ilp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p); -enum isl_lp_result isl_basic_set_max(__isl_keep isl_basic_set *bset, - __isl_keep isl_aff *obj, isl_int *opt); -enum isl_lp_result isl_set_min(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt); -enum isl_lp_result isl_set_max(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/int.h b/cloog-0.17.0/isl/include/isl/int.h deleted file mode 100644 index d5385b10b919dfba2abcc86e4833eb81cb90c666..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/int.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_INT_H -#define ISL_INT_H - -#include -#include -#include -#if defined(__cplusplus) -#include -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef mp_get_memory_functions -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)); -#endif - -/* isl_int is the basic integer type. It currently always corresponds - * to a gmp mpz_t, but in the future, different types such as long long - * or cln::cl_I will be supported. - */ -typedef mpz_t isl_int; - -#define isl_int_init(i) mpz_init(i) -#define isl_int_clear(i) mpz_clear(i) - -#define isl_int_set(r,i) mpz_set(r,i) -#define isl_int_set_gmp(r,i) mpz_set(r,i) -#define isl_int_set_si(r,i) mpz_set_si(r,i) -#define isl_int_set_ui(r,i) mpz_set_ui(r,i) -#define isl_int_get_gmp(i,g) mpz_set(g,i) -#define isl_int_get_si(r) mpz_get_si(r) -#define isl_int_get_ui(r) mpz_get_ui(r) -#define isl_int_get_d(r) mpz_get_d(r) -#define isl_int_get_str(r) mpz_get_str(0, 10, r) -#define isl_int_abs(r,i) mpz_abs(r,i) -#define isl_int_neg(r,i) mpz_neg(r,i) -#define isl_int_swap(i,j) mpz_swap(i,j) -#define isl_int_swap_or_set(i,j) mpz_swap(i,j) -#define isl_int_add_ui(r,i,j) mpz_add_ui(r,i,j) -#define isl_int_sub_ui(r,i,j) mpz_sub_ui(r,i,j) - -#define isl_int_add(r,i,j) mpz_add(r,i,j) -#define isl_int_sub(r,i,j) mpz_sub(r,i,j) -#define isl_int_mul(r,i,j) mpz_mul(r,i,j) -#define isl_int_mul_2exp(r,i,j) mpz_mul_2exp(r,i,j) -#define isl_int_mul_ui(r,i,j) mpz_mul_ui(r,i,j) -#define isl_int_pow_ui(r,i,j) mpz_pow_ui(r,i,j) -#define isl_int_addmul(r,i,j) mpz_addmul(r,i,j) -#define isl_int_submul(r,i,j) mpz_submul(r,i,j) - -#define isl_int_gcd(r,i,j) mpz_gcd(r,i,j) -#define isl_int_lcm(r,i,j) mpz_lcm(r,i,j) -#define isl_int_divexact(r,i,j) mpz_divexact(r,i,j) -#define isl_int_divexact_ui(r,i,j) mpz_divexact_ui(r,i,j) -#define isl_int_tdiv_q(r,i,j) mpz_tdiv_q(r,i,j) -#define isl_int_cdiv_q(r,i,j) mpz_cdiv_q(r,i,j) -#define isl_int_fdiv_q(r,i,j) mpz_fdiv_q(r,i,j) -#define isl_int_fdiv_r(r,i,j) mpz_fdiv_r(r,i,j) -#define isl_int_fdiv_q_ui(r,i,j) mpz_fdiv_q_ui(r,i,j) - -#define isl_int_read(r,s) mpz_set_str(r,s,10) -typedef void (*isl_int_print_gmp_free_t)(void *, size_t); -#define isl_int_print(out,i,width) \ - do { \ - char *s; \ - isl_int_print_gmp_free_t gmp_free; \ - s = mpz_get_str(0, 10, i); \ - fprintf(out, "%*s", width, s); \ - mp_get_memory_functions(NULL, NULL, &gmp_free); \ - (*gmp_free)(s, strlen(s)+1); \ - } while (0) - -#define isl_int_sgn(i) mpz_sgn(i) -#define isl_int_cmp(i,j) mpz_cmp(i,j) -#define isl_int_cmp_si(i,si) mpz_cmp_si(i,si) -#define isl_int_eq(i,j) (mpz_cmp(i,j) == 0) -#define isl_int_ne(i,j) (mpz_cmp(i,j) != 0) -#define isl_int_lt(i,j) (mpz_cmp(i,j) < 0) -#define isl_int_le(i,j) (mpz_cmp(i,j) <= 0) -#define isl_int_gt(i,j) (mpz_cmp(i,j) > 0) -#define isl_int_ge(i,j) (mpz_cmp(i,j) >= 0) -#define isl_int_abs_eq(i,j) (mpz_cmpabs(i,j) == 0) -#define isl_int_abs_ne(i,j) (mpz_cmpabs(i,j) != 0) -#define isl_int_abs_lt(i,j) (mpz_cmpabs(i,j) < 0) -#define isl_int_abs_gt(i,j) (mpz_cmpabs(i,j) > 0) -#define isl_int_abs_ge(i,j) (mpz_cmpabs(i,j) >= 0) - - -#define isl_int_is_zero(i) (isl_int_sgn(i) == 0) -#define isl_int_is_one(i) (isl_int_cmp_si(i,1) == 0) -#define isl_int_is_negone(i) (isl_int_cmp_si(i,-1) == 0) -#define isl_int_is_pos(i) (isl_int_sgn(i) > 0) -#define isl_int_is_neg(i) (isl_int_sgn(i) < 0) -#define isl_int_is_nonpos(i) (isl_int_sgn(i) <= 0) -#define isl_int_is_nonneg(i) (isl_int_sgn(i) >= 0) -#define isl_int_is_divisible_by(i,j) mpz_divisible_p(i,j) - -uint32_t isl_gmp_hash(mpz_t v, uint32_t hash); -#define isl_int_hash(v,h) isl_gmp_hash(v,h) - -#if defined(__cplusplus) -} -#endif - -#if defined(__cplusplus) -extern "C" { typedef void (*isl_gmp_free_t)(void *, size_t); } - -static inline std::ostream &operator<<(std::ostream &os, isl_int i) -{ - char *s; - isl_gmp_free_t gmp_free; - s = mpz_get_str(0, 10, i); - os << s; - mp_get_memory_functions(NULL, NULL, &gmp_free); - (*gmp_free)(s, strlen(s)+1); - return os; -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/list.h b/cloog-0.17.0/isl/include/isl/list.h deleted file mode 100644 index e0dbfedfccf0963a6acc8b6616f5504b37292190..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/list.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_LIST_H -#define ISL_LIST_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define ISL_DECLARE_LIST(EL) \ -struct isl_##EL; \ -struct isl_##EL##_list; \ -typedef struct isl_##EL##_list isl_##EL##_list; \ -isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \ -__isl_give isl_##EL##_list *isl_##EL##_list_from_##EL( \ - __isl_take struct isl_##EL *el); \ -__isl_give isl_##EL##_list *isl_##EL##_list_alloc(isl_ctx *ctx, int n); \ -__isl_give isl_##EL##_list *isl_##EL##_list_copy( \ - __isl_keep isl_##EL##_list *list); \ -void *isl_##EL##_list_free(__isl_take isl_##EL##_list *list); \ -__isl_give isl_##EL##_list *isl_##EL##_list_add( \ - __isl_take isl_##EL##_list *list, \ - __isl_take struct isl_##EL *el); \ -__isl_give isl_##EL##_list *isl_##EL##_list_concat( \ - __isl_take isl_##EL##_list *list1, \ - __isl_take isl_##EL##_list *list2); \ -int isl_##EL##_list_n_##EL(__isl_keep isl_##EL##_list *list); \ -__isl_give struct isl_##EL *isl_##EL##_list_get_##EL( \ - __isl_keep isl_##EL##_list *list, int index); \ -int isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list, \ - int (*fn)(__isl_take struct isl_##EL *el, void *user), \ - void *user); \ -__isl_give isl_printer *isl_printer_print_##EL##_list( \ - __isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \ -void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list); - -ISL_DECLARE_LIST(basic_set) -ISL_DECLARE_LIST(set) -ISL_DECLARE_LIST(aff) -ISL_DECLARE_LIST(pw_aff) -ISL_DECLARE_LIST(band) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/local_space.h b/cloog-0.17.0/isl/include/isl/local_space.h deleted file mode 100644 index 1f6108da5d52b222b593433476b81d10cbf01265..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/local_space.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef ISL_LOCAL_SPACE_H -#define ISL_LOCAL_SPACE_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_local_space; -typedef struct isl_local_space isl_local_space; - -isl_ctx *isl_local_space_get_ctx(__isl_keep isl_local_space *ls); - -__isl_give isl_local_space *isl_local_space_from_space(__isl_take isl_space *dim); - -__isl_give isl_local_space *isl_local_space_copy( - __isl_keep isl_local_space *ls); -void *isl_local_space_free(__isl_take isl_local_space *ls); - -int isl_local_space_is_set(__isl_keep isl_local_space *ls); - -int isl_local_space_dim(__isl_keep isl_local_space *ls, - enum isl_dim_type type); -const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, - enum isl_dim_type type, unsigned pos); -__isl_give isl_local_space *isl_local_space_set_dim_name( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, const char *s); -__isl_give isl_local_space *isl_local_space_set_dim_id( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); -__isl_give isl_space *isl_local_space_get_space(__isl_keep isl_local_space *ls); -__isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls, - int pos); - -__isl_give isl_local_space *isl_local_space_domain( - __isl_take isl_local_space *ls); -__isl_give isl_local_space *isl_local_space_range( - __isl_take isl_local_space *ls); -__isl_give isl_local_space *isl_local_space_from_domain( - __isl_take isl_local_space *ls); -__isl_give isl_local_space *isl_local_space_add_dims( - __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned n); -__isl_give isl_local_space *isl_local_space_drop_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_local_space *isl_local_space_insert_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_local_space *isl_local_space_intersect( - __isl_take isl_local_space *ls1, __isl_take isl_local_space *ls2); - -int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, - __isl_keep isl_local_space *ls2); - -__isl_give isl_basic_map *isl_local_space_lifting( - __isl_take isl_local_space *ls); - -__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls); -void isl_local_space_dump(__isl_keep isl_local_space *ls); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/lp.h b/cloog-0.17.0/isl/include/isl/lp.h deleted file mode 100644 index 9f7a9122c29174eaecdbd9ceeeddf8d40a6dd7f1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/lp.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_LP_H -#define ISL_LP_H - -#include -#include -#include -#include - -enum isl_lp_result { - isl_lp_error = -1, - isl_lp_ok = 0, - isl_lp_unbounded, - isl_lp_empty -}; - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_lp_result isl_basic_map_solve_lp(struct isl_basic_map *bmap, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); -enum isl_lp_result isl_basic_set_solve_lp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); -enum isl_lp_result isl_map_solve_lp(__isl_keep isl_map *map, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); -enum isl_lp_result isl_set_solve_lp(__isl_keep isl_set *set, int max, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/map.h b/cloog-0.17.0/isl/include/isl/map.h deleted file mode 100644 index 289e7cc1e11d67b44172e2b0bd273086a33a53be..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/map.h +++ /dev/null @@ -1,594 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAP_H -#define ISL_MAP_H - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* General notes: - * - * All structures are reference counted to allow reuse without duplication. - * A *_copy operation will increase the reference count, while a *_free - * operation will decrease the reference count and only actually release - * the structures when the reference count drops to zero. - * - * Functions that return an isa structure will in general _destroy_ - * all argument isa structures (the obvious execption begin the _copy - * functions). A pointer passed to such a function may therefore - * never be used after the function call. If you want to keep a - * reference to the old structure(s), use the appropriate _copy function. - */ - -unsigned isl_basic_map_n_in(const struct isl_basic_map *bmap); -unsigned isl_basic_map_n_out(const struct isl_basic_map *bmap); -unsigned isl_basic_map_n_param(const struct isl_basic_map *bmap); -unsigned isl_basic_map_n_div(const struct isl_basic_map *bmap); -unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap); -unsigned isl_basic_map_dim(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type); - -unsigned isl_map_n_in(const struct isl_map *map); -unsigned isl_map_n_out(const struct isl_map *map); -unsigned isl_map_n_param(const struct isl_map *map); -unsigned isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type); - -isl_ctx *isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap); -isl_ctx *isl_map_get_ctx(__isl_keep isl_map *map); -__isl_give isl_space *isl_basic_map_get_space(__isl_keep isl_basic_map *bmap); -__isl_give isl_space *isl_map_get_space(__isl_keep isl_map *map); - -__isl_give isl_aff *isl_basic_map_get_div(__isl_keep isl_basic_map *bmap, - int pos); - -__isl_give isl_local_space *isl_basic_map_get_local_space( - __isl_keep isl_basic_map *bmap); - -__isl_give isl_basic_map *isl_basic_map_set_tuple_name( - __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s); -const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type); -const char *isl_map_get_tuple_name(__isl_keep isl_map *map, - enum isl_dim_type type); -__isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map, - enum isl_dim_type type, const char *s); -const char *isl_basic_map_get_dim_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos); -const char *isl_map_get_dim_name(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); -__isl_give isl_basic_map *isl_basic_map_set_dim_name( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, const char *s); -__isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_map *isl_map_set_dim_id(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); -int isl_basic_map_has_dim_id(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos); -int isl_map_has_dim_id(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); -__isl_give isl_id *isl_map_get_dim_id(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos); -__isl_give isl_map *isl_map_set_tuple_id(__isl_take isl_map *map, - enum isl_dim_type type, __isl_take isl_id *id); -__isl_give isl_map *isl_map_reset_tuple_id(__isl_take isl_map *map, - enum isl_dim_type type); -int isl_map_has_tuple_id(__isl_keep isl_map *map, enum isl_dim_type type); -__isl_give isl_id *isl_map_get_tuple_id(__isl_keep isl_map *map, - enum isl_dim_type type); - -int isl_map_find_dim_by_id(__isl_keep isl_map *map, enum isl_dim_type type, - __isl_keep isl_id *id); -int isl_map_find_dim_by_name(__isl_keep isl_map *map, enum isl_dim_type type, - const char *name); - -int isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap); - -struct isl_basic_map *isl_basic_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, unsigned extra, - unsigned n_eq, unsigned n_ineq); -__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_space *dim); -struct isl_basic_map *isl_basic_map_identity_like(struct isl_basic_map *model); -struct isl_basic_map *isl_basic_map_finalize(struct isl_basic_map *bmap); -void isl_basic_map_free(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_copy(__isl_keep isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_extend(struct isl_basic_map *base, - unsigned nparam, unsigned n_in, unsigned n_out, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_map *isl_basic_map_extend_constraints( - struct isl_basic_map *base, unsigned n_eq, unsigned n_ineq); -__isl_give isl_basic_map *isl_basic_map_equal( - __isl_take isl_space *dim, unsigned n_equal); -__isl_give isl_basic_map *isl_basic_map_less_at(__isl_take isl_space *dim, - unsigned pos); -__isl_give isl_basic_map *isl_basic_map_more_at(__isl_take isl_space *dim, - unsigned pos); -__isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_space *dim); -struct isl_basic_map *isl_basic_map_empty_like(struct isl_basic_map *model); -struct isl_basic_map *isl_basic_map_empty_like_map(struct isl_map *model); -__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_space *dim); -__isl_give isl_basic_map *isl_basic_map_nat_universe(__isl_take isl_space *dim); -__isl_give isl_basic_map *isl_basic_map_universe_like( - __isl_keep isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_remove_redundancies( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_map_simple_hull(__isl_take isl_map *map); - -__isl_export -__isl_give isl_basic_map *isl_basic_map_intersect_domain( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); -__isl_export -__isl_give isl_basic_map *isl_basic_map_intersect_range( - __isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *bset); -__isl_export -__isl_give isl_basic_map *isl_basic_map_intersect( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_export -__isl_give isl_map *isl_basic_map_union( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_export -__isl_give isl_basic_map *isl_basic_map_apply_domain( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_export -__isl_give isl_basic_map *isl_basic_map_apply_range( - __isl_take isl_basic_map *bmap1, - __isl_take isl_basic_map *bmap2); -__isl_export -__isl_give isl_basic_map *isl_basic_map_affine_hull( - __isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_basic_map *isl_basic_map_reverse(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_map_domain(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_map_range(__isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_domain_map( - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_range_map( - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_remove_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_basic_map *isl_basic_map_eliminate( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_basic_map *isl_basic_map_from_basic_set( - __isl_take isl_basic_set *bset, __isl_take isl_space *dim); -struct isl_basic_set *isl_basic_set_from_basic_map(struct isl_basic_map *bmap); -__isl_export -__isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_simplify(struct isl_basic_map *bmap); -__isl_export -__isl_give isl_basic_map *isl_basic_map_detect_equalities( - __isl_take isl_basic_map *bmap); -__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_constructor -__isl_give isl_basic_map *isl_basic_map_read_from_str(isl_ctx *ctx, - const char *str); -__isl_give isl_map *isl_map_read_from_file(isl_ctx *ctx, FILE *input); -__isl_constructor -__isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx, const char *str); -void isl_basic_map_dump(__isl_keep isl_basic_map *bmap); -void isl_basic_map_print(__isl_keep isl_basic_map *bmap, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format); -void isl_map_dump(__isl_keep isl_map *map); -void isl_map_print(__isl_keep isl_map *map, FILE *out, int indent, - unsigned output_format); -__isl_give isl_printer *isl_printer_print_basic_map( - __isl_take isl_printer *printer, __isl_keep isl_basic_map *bmap); -__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *printer, - __isl_keep isl_map *map); -__isl_give isl_basic_map *isl_basic_map_fix_si(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_basic_map *isl_basic_map_lower_bound_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value); - -struct isl_basic_map *isl_basic_map_sum( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2); -struct isl_basic_map *isl_basic_map_neg(struct isl_basic_map *bmap); -struct isl_basic_map *isl_basic_map_floordiv(struct isl_basic_map *bmap, - isl_int d); - -struct isl_map *isl_map_sum(struct isl_map *map1, struct isl_map *map2); -struct isl_map *isl_map_neg(struct isl_map *map); -struct isl_map *isl_map_floordiv(struct isl_map *map, isl_int d); - -__isl_export -int isl_basic_map_is_equal( - __isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - -__isl_give isl_map *isl_basic_map_partial_lexmax( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_basic_map_partial_lexmin( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_map_partial_lexmax( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_give isl_map *isl_map_partial_lexmin( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_export -__isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_map *isl_basic_map_lexmax(__isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_map *isl_map_lexmin(__isl_take isl_map *map); -__isl_export -__isl_give isl_map *isl_map_lexmax(__isl_take isl_map *map); -__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmin_pw_multi_aff( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmax_pw_multi_aff( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_pw_multi_aff *isl_basic_map_lexmin_pw_multi_aff( - __isl_take isl_basic_map *bmap); - -void isl_basic_map_print_internal(__isl_keep isl_basic_map *bmap, - FILE *out, int indent); - -struct isl_basic_map *isl_map_copy_basic_map(struct isl_map *map); -__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap); - -int isl_basic_map_plain_is_fixed(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, isl_int *val); - -int isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap); -int isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap); -int isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap); -int isl_basic_map_fast_is_empty(__isl_keep isl_basic_map *bmap); -__isl_export -int isl_basic_map_is_empty(__isl_keep isl_basic_map *bmap); -int isl_basic_map_is_subset(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); -int isl_basic_map_is_strict_subset(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); - -struct isl_map *isl_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, int n, - unsigned flags); -__isl_give isl_map *isl_map_universe(__isl_take isl_space *dim); -__isl_give isl_map *isl_map_nat_universe(__isl_take isl_space *dim); -__isl_give isl_map *isl_map_empty(__isl_take isl_space *dim); -struct isl_map *isl_map_empty_like(struct isl_map *model); -struct isl_map *isl_map_empty_like_basic_map(struct isl_basic_map *model); -struct isl_map *isl_map_dup(struct isl_map *map); -__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_identity(__isl_take isl_space *dim); -struct isl_map *isl_map_identity_like(struct isl_map *model); -struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model); -__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_space *dim, unsigned n); -__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_space *dim, unsigned n); -__isl_give isl_map *isl_map_lex_lt(__isl_take isl_space *set_dim); -__isl_give isl_map *isl_map_lex_le(__isl_take isl_space *set_dim); -__isl_give isl_map *isl_map_lex_gt_first(__isl_take isl_space *dim, unsigned n); -__isl_give isl_map *isl_map_lex_ge_first(__isl_take isl_space *dim, unsigned n); -__isl_give isl_map *isl_map_lex_gt(__isl_take isl_space *set_dim); -__isl_give isl_map *isl_map_lex_ge(__isl_take isl_space *set_dim); -struct isl_map *isl_map_finalize(struct isl_map *map); -void isl_map_free(__isl_take isl_map *map); -__isl_give isl_map *isl_map_copy(__isl_keep isl_map *map); -struct isl_map *isl_map_extend(struct isl_map *base, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_export -__isl_give isl_map *isl_map_reverse(__isl_take isl_map *map); -__isl_export -__isl_give isl_map *isl_map_union( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -struct isl_map *isl_map_union_disjoint( - struct isl_map *map1, struct isl_map *map2); -__isl_export -__isl_give isl_map *isl_map_intersect_domain( - __isl_take isl_map *map, - __isl_take isl_set *set); -__isl_export -__isl_give isl_map *isl_map_intersect_range( - __isl_take isl_map *map, - __isl_take isl_set *set); -__isl_export -__isl_give isl_map *isl_map_apply_domain( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_export -__isl_give isl_map *isl_map_apply_range( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_basic_map *isl_basic_map_domain_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_basic_map *isl_basic_map_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_map_domain_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_basic_map *isl_basic_map_flat_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_map_flat_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_basic_map *isl_basic_map_flat_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); -__isl_give isl_map *isl_map_flat_domain_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_export -__isl_give isl_map *isl_map_intersect(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_export -__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map, - __isl_take isl_set *params); -__isl_export -__isl_give isl_map *isl_map_subtract( - __isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_subtract_domain(__isl_take isl_map *map, - __isl_take isl_set *dom); -__isl_give isl_map *isl_map_subtract_range(__isl_take isl_map *map, - __isl_take isl_set *dom); -struct isl_map *isl_map_fix_input_si(struct isl_map *map, - unsigned input, int value); -__isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_map *isl_map_upper_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value); -__isl_export -__isl_give isl_basic_set *isl_basic_map_deltas(__isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_set *isl_map_deltas(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_map_deltas_map( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_deltas_map(__isl_take isl_map *map); -__isl_export -__isl_give isl_map *isl_map_detect_equalities(__isl_take isl_map *map); -__isl_export -__isl_give isl_basic_map *isl_map_affine_hull(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_map_convex_hull(__isl_take isl_map *map); -__isl_export -__isl_give isl_basic_map *isl_map_polyhedral_hull(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_map_add(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned n); -__isl_give isl_map *isl_map_add_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned n); -__isl_give isl_map *isl_map_insert_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_basic_map *isl_basic_map_move_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_map *isl_map_move_dims(__isl_take isl_map *map, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_basic_map *isl_basic_map_remove_divs( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_remove_divs(__isl_take isl_map *map); -__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_map *isl_map_remove_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_map *isl_map_remove_inputs(struct isl_map *map, - unsigned first, unsigned n); - -__isl_give isl_map *isl_map_equate(__isl_take isl_map *map, - enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); -__isl_give isl_map *isl_map_oppose(__isl_take isl_map *map, - enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); - -__isl_export -__isl_give isl_map *isl_set_identity(__isl_take isl_set *set); - -__isl_export -int isl_basic_set_is_wrapping(__isl_keep isl_basic_set *bset); -__isl_export -int isl_set_is_wrapping(__isl_keep isl_set *set); -__isl_give isl_basic_set *isl_basic_map_wrap(__isl_take isl_basic_map *bmap); -__isl_give isl_set *isl_map_wrap(__isl_take isl_map *map); -__isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset); -__isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set); -__isl_export -__isl_give isl_basic_map *isl_basic_map_flatten(__isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_map *isl_map_flatten(__isl_take isl_map *map); -__isl_export -__isl_give isl_basic_map *isl_basic_map_flatten_domain( - __isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_basic_map *isl_basic_map_flatten_range( - __isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_map *isl_map_flatten_domain(__isl_take isl_map *map); -__isl_export -__isl_give isl_map *isl_map_flatten_range(__isl_take isl_map *map); -__isl_export -__isl_give isl_basic_set *isl_basic_set_flatten(__isl_take isl_basic_set *bset); -__isl_export -__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set); -__isl_give isl_map *isl_set_flatten_map(__isl_take isl_set *set); -__isl_give isl_set *isl_map_params(__isl_take isl_map *map); -__isl_give isl_set *isl_map_domain(__isl_take isl_map *bmap); -__isl_give isl_set *isl_map_range(__isl_take isl_map *map); -__isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map); -__isl_give isl_map *isl_map_range_map(__isl_take isl_map *map); -__isl_constructor -__isl_give isl_map *isl_map_from_basic_map(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_from_domain(__isl_take isl_set *set); -__isl_give isl_basic_map *isl_basic_map_from_domain( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_map *isl_basic_map_from_range( - __isl_take isl_basic_set *bset); -struct isl_map *isl_map_from_range(struct isl_set *set); -__isl_give isl_basic_map *isl_basic_map_from_domain_and_range( - __isl_take isl_basic_set *domain, __isl_take isl_basic_set *range); -__isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain, - __isl_take isl_set *range); -__isl_give isl_map *isl_map_from_set(__isl_take isl_set *set, - __isl_take isl_space *dim); -struct isl_set *isl_set_from_map(struct isl_map *map); -__isl_export -__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map); - -int isl_map_plain_is_empty(__isl_keep isl_map *map); -int isl_map_fast_is_empty(__isl_keep isl_map *map); -int isl_map_plain_is_universe(__isl_keep isl_map *map); -__isl_export -int isl_map_is_empty(__isl_keep isl_map *map); -__isl_export -int isl_map_is_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -__isl_export -int isl_map_is_strict_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -__isl_export -int isl_map_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -__isl_export -int isl_map_is_single_valued(__isl_keep isl_map *map); -int isl_map_plain_is_injective(__isl_keep isl_map *map); -__isl_export -int isl_map_is_injective(__isl_keep isl_map *map); -__isl_export -int isl_map_is_bijective(__isl_keep isl_map *map); -int isl_map_is_translation(__isl_keep isl_map *map); -int isl_map_has_equal_space(__isl_keep isl_map *map1, __isl_keep isl_map *map2); - -int isl_basic_map_can_zip(__isl_keep isl_basic_map *bmap); -int isl_map_can_zip(__isl_keep isl_map *map); -__isl_give isl_basic_map *isl_basic_map_zip(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_zip(__isl_take isl_map *map); - -__isl_give isl_map *isl_map_make_disjoint(__isl_take isl_map *map); -__isl_give isl_map *isl_basic_map_compute_divs(__isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_compute_divs(__isl_take isl_map *map); -__isl_give isl_map *isl_map_align_divs(__isl_take isl_map *map); - -int isl_basic_map_involves_dims(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -int isl_map_involves_dims(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); - -void isl_map_print_internal(__isl_keep isl_map *map, FILE *out, int indent); - -int isl_map_plain_input_is_fixed(__isl_keep isl_map *map, - unsigned in, isl_int *val); -int isl_map_plain_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val); -int isl_map_fast_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val); - -__isl_export -__isl_give isl_basic_map *isl_basic_map_gist(__isl_take isl_basic_map *bmap, - __isl_take isl_basic_map *context); -__isl_export -__isl_give isl_map *isl_map_gist(__isl_take isl_map *map, - __isl_take isl_map *context); -__isl_export -__isl_give isl_map *isl_map_gist_domain(__isl_take isl_map *map, - __isl_take isl_set *context); -__isl_give isl_map *isl_map_gist_range(__isl_take isl_map *map, - __isl_take isl_set *context); -__isl_give isl_map *isl_map_gist_params(__isl_take isl_map *map, - __isl_take isl_set *context); -__isl_give isl_map *isl_map_gist_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *context); - -__isl_export -__isl_give isl_map *isl_map_coalesce(__isl_take isl_map *map); - -int isl_map_plain_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); -int isl_map_fast_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); - -uint32_t isl_map_get_hash(__isl_keep isl_map *map); - -__isl_export -int isl_map_foreach_basic_map(__isl_keep isl_map *map, - int (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user); - -__isl_give isl_map *isl_set_lifting(__isl_take isl_set *set); - -__isl_give isl_map *isl_map_power(__isl_take isl_map *map, int *exact); -__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map, - int *exact); -__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map, - int *exact); - -__isl_give isl_map *isl_map_lex_le_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_lex_lt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_lex_ge_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); -__isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2); - -__isl_give isl_map *isl_map_align_params(__isl_take isl_map *map, - __isl_take isl_space *model); - -__isl_give isl_mat *isl_basic_map_equalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); -__isl_give isl_mat *isl_basic_map_inequalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); -__isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( - __isl_take isl_space *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5); - -__isl_give isl_basic_map *isl_basic_map_from_aff(__isl_take isl_aff *aff); -__isl_give isl_basic_map *isl_basic_map_from_multi_aff( - __isl_take isl_multi_aff *maff); -__isl_give isl_basic_map *isl_basic_map_from_aff_list( - __isl_take isl_space *domain_dim, __isl_take isl_aff_list *list); - -__isl_give isl_pw_aff *isl_map_dim_max(__isl_take isl_map *map, int pos); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/map_type.h b/cloog-0.17.0/isl/include/isl/map_type.h deleted file mode 100644 index a60023306f0d31948da276ec7e4c259de07d5873..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/map_type.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef ISL_MAP_TYPE_H -#define ISL_MAP_TYPE_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_subclass(isl_map) -struct isl_basic_map; -typedef struct isl_basic_map isl_basic_map; -__isl_subclass(isl_union_map) -struct isl_map; -typedef struct isl_map isl_map; - -#ifndef isl_basic_set -__isl_subclass(isl_set) -struct isl_basic_set; -typedef struct isl_basic_set isl_basic_set; -#endif -#ifndef isl_set -__isl_subclass(isl_union_set) -struct isl_set; -typedef struct isl_set isl_set; -#endif - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/mat.h b/cloog-0.17.0/isl/include/isl/mat.h deleted file mode 100644 index e888888b408de675ed6e9e9b5dfa781acabfa52c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/mat.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAT_H -#define ISL_MAT_H - -#include - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_mat; -typedef struct isl_mat isl_mat; - -isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat); - -__isl_give isl_mat *isl_mat_alloc(isl_ctx *ctx, - unsigned n_row, unsigned n_col); -struct isl_mat *isl_mat_dup(struct isl_mat *mat); -struct isl_mat *isl_mat_extend(struct isl_mat *mat, - unsigned n_row, unsigned n_col); -struct isl_mat *isl_mat_identity(struct isl_ctx *ctx, unsigned n_row); -__isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); -struct isl_mat *isl_mat_cow(struct isl_mat *mat); -void isl_mat_free(__isl_take isl_mat *mat); - -int isl_mat_rows(__isl_keep isl_mat *mat); -int isl_mat_cols(__isl_keep isl_mat *mat); -int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v); -__isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, - int row, int col, isl_int v); -__isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, - int row, int col, int v); - -struct isl_mat *isl_mat_swap_cols(struct isl_mat *mat, unsigned i, unsigned j); -struct isl_mat *isl_mat_swap_rows(struct isl_mat *mat, unsigned i, unsigned j); - -struct isl_vec *isl_mat_vec_product(struct isl_mat *mat, struct isl_vec *vec); -struct isl_vec *isl_vec_mat_product(struct isl_vec *vec, struct isl_mat *mat); -__isl_give isl_vec *isl_mat_vec_inverse_product(__isl_take isl_mat *mat, - __isl_take isl_vec *vec); -struct isl_mat *isl_mat_aff_direct_sum(struct isl_mat *left, - struct isl_mat *right); -__isl_give isl_mat *isl_mat_diagonal(__isl_take isl_mat *mat1, - __isl_take isl_mat *mat2); -struct isl_mat *isl_mat_left_hermite(struct isl_mat *M, - int neg, struct isl_mat **U, struct isl_mat **Q); -struct isl_mat *isl_mat_lin_to_aff(struct isl_mat *mat); -struct isl_mat *isl_mat_inverse_product(struct isl_mat *left, - struct isl_mat *right); -struct isl_mat *isl_mat_product(struct isl_mat *left, struct isl_mat *right); -struct isl_mat *isl_mat_transpose(struct isl_mat *mat); -__isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat); -__isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat); - -__isl_give isl_mat *isl_mat_normalize(__isl_take isl_mat *mat); -__isl_give isl_mat *isl_mat_normalize_row(__isl_take isl_mat *mat, int row); - -struct isl_mat *isl_mat_drop_cols(struct isl_mat *mat, - unsigned col, unsigned n); -struct isl_mat *isl_mat_drop_rows(struct isl_mat *mat, - unsigned row, unsigned n); -__isl_give isl_mat *isl_mat_insert_cols(__isl_take isl_mat *mat, - unsigned col, unsigned n); -__isl_give isl_mat *isl_mat_insert_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n); -__isl_give isl_mat *isl_mat_move_cols(__isl_take isl_mat *mat, - unsigned dst_col, unsigned src_col, unsigned n); -__isl_give isl_mat *isl_mat_add_rows(__isl_take isl_mat *mat, unsigned n); -__isl_give isl_mat *isl_mat_insert_zero_cols(__isl_take isl_mat *mat, - unsigned first, unsigned n); -__isl_give isl_mat *isl_mat_add_zero_cols(__isl_take isl_mat *mat, unsigned n); -__isl_give isl_mat *isl_mat_insert_zero_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n); -__isl_give isl_mat *isl_mat_add_zero_rows(__isl_take isl_mat *mat, unsigned n); - -void isl_mat_col_add(__isl_keep isl_mat *mat, int dst_col, int src_col); -void isl_mat_col_mul(struct isl_mat *mat, int dst_col, isl_int f, int src_col); -void isl_mat_col_submul(struct isl_mat *mat, - int dst_col, isl_int f, int src_col); - -struct isl_mat *isl_mat_unimodular_complete(struct isl_mat *M, int row); - -__isl_give isl_mat *isl_mat_from_row_vec(__isl_take isl_vec *vec); -__isl_give isl_mat *isl_mat_concat(__isl_take isl_mat *top, - __isl_take isl_mat *bot); -__isl_give isl_mat *isl_mat_vec_concat(__isl_take isl_mat *top, - __isl_take isl_vec *bot); - -int isl_mat_is_equal(__isl_keep isl_mat *mat1, __isl_keep isl_mat *mat2); - -int isl_mat_initial_non_zero_cols(__isl_keep isl_mat *mat); - -void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent); -void isl_mat_dump(__isl_keep isl_mat *mat); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/multi.h b/cloog-0.17.0/isl/include/isl/multi.h deleted file mode 100644 index b9bb1164a19f2d9e694795c1f73ff7913351bc51..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/multi.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef ISL_MULTI_H -#define ISL_MULTI_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -#define ISL_DECLARE_MULTI(BASE) \ -__isl_give isl_multi_##BASE *isl_multi_##BASE##_from_##BASE##_list( \ - __isl_take isl_space *space, __isl_take isl_##BASE##_list *list); \ -const char *isl_multi_##BASE##_get_tuple_name( \ - __isl_keep isl_multi_##BASE *multi, enum isl_dim_type type); - -ISL_DECLARE_MULTI(aff) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/obj.h b/cloog-0.17.0/isl/include/isl/obj.h deleted file mode 100644 index d40a82ca60b58bf19d51a9806de4648a75af2d06..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/obj.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef ISL_OBJ_H -#define ISL_OBJ_H - -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_obj_vtable { - void *(*copy)(void *v1); - void *(*add)(void *v1, void *v2); - __isl_give isl_printer *(*print)(__isl_take isl_printer *p, void *v); - void (*free)(void *v); -}; -typedef struct isl_obj_vtable *isl_obj_type; -extern struct isl_obj_vtable isl_obj_none_vtable; -#define isl_obj_none (&isl_obj_none_vtable) -extern struct isl_obj_vtable isl_obj_int_vtable; -#define isl_obj_int (&isl_obj_int_vtable) -extern struct isl_obj_vtable isl_obj_set_vtable; -#define isl_obj_set (&isl_obj_set_vtable) -extern struct isl_obj_vtable isl_obj_union_set_vtable; -#define isl_obj_union_set (&isl_obj_union_set_vtable) -extern struct isl_obj_vtable isl_obj_map_vtable; -#define isl_obj_map (&isl_obj_map_vtable) -extern struct isl_obj_vtable isl_obj_union_map_vtable; -#define isl_obj_union_map (&isl_obj_union_map_vtable) -extern struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable; -#define isl_obj_pw_qpolynomial (&isl_obj_pw_qpolynomial_vtable) -extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable; -#define isl_obj_union_pw_qpolynomial (&isl_obj_union_pw_qpolynomial_vtable) -extern struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable; -#define isl_obj_pw_qpolynomial_fold (&isl_obj_pw_qpolynomial_fold_vtable) -extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable; -#define isl_obj_union_pw_qpolynomial_fold (&isl_obj_union_pw_qpolynomial_fold_vtable) -struct isl_obj { - isl_obj_type type; - void *v; -}; - -struct isl_int_obj; -typedef struct isl_int_obj isl_int_obj; - -__isl_give isl_int_obj *isl_int_obj_alloc(isl_ctx *ctx, isl_int v); -void isl_int_obj_free(__isl_take isl_int_obj *i); -__isl_give isl_int_obj *isl_int_obj_add(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2); -__isl_give isl_int_obj *isl_int_obj_sub(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2); -__isl_give isl_int_obj *isl_int_obj_mul(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2); -void isl_int_obj_get_int(__isl_keep isl_int_obj *i, isl_int *v); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/options.h b/cloog-0.17.0/isl/include/isl/options.h deleted file mode 100644 index 1c14b19f3303a357c103c0bf5631cf438c577123..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/options.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_OPTIONS_H -#define ISL_OPTIONS_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_options; - -ISL_ARG_DECL(isl_options, struct isl_options, isl_options_args) - -#define ISL_BOUND_BERNSTEIN 0 -#define ISL_BOUND_RANGE 1 -int isl_options_set_bound(isl_ctx *ctx, int val); -int isl_options_get_bound(isl_ctx *ctx); - -#define ISL_ON_ERROR_WARN 0 -#define ISL_ON_ERROR_CONTINUE 1 -#define ISL_ON_ERROR_ABORT 2 -int isl_options_set_on_error(isl_ctx *ctx, int val); -int isl_options_get_on_error(isl_ctx *ctx); - -int isl_options_set_gbr_only_first(isl_ctx *ctx, int val); -int isl_options_get_gbr_only_first(isl_ctx *ctx); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/point.h b/cloog-0.17.0/isl/include/isl/point.h deleted file mode 100644 index 5d845e961155a23ef642dafe52ff2a62dfbe437a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/point.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef ISL_POINT_H -#define ISL_POINT_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_point; -typedef struct isl_point isl_point; - -isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); -__isl_give isl_space *isl_point_get_space(__isl_keep isl_point *pnt); - -__isl_give isl_point *isl_point_zero(__isl_take isl_space *dim); -__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt); -void isl_point_free(__isl_take isl_point *pnt); - -int isl_point_get_coordinate(__isl_keep isl_point *pnt, - enum isl_dim_type type, int pos, isl_int *v); -__isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, isl_int v); - -__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); -__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val); - -__isl_give isl_point *isl_point_void(__isl_take isl_space *dim); -int isl_point_is_void(__isl_keep isl_point *pnt); - -__isl_give isl_printer *isl_printer_print_point( - __isl_take isl_printer *printer, __isl_keep isl_point *pnt); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/polynomial.h b/cloog-0.17.0/isl/include/isl/polynomial.h deleted file mode 100644 index de4d4a74edc1a056dc59dd517daf32cbf46d88b2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/polynomial.h +++ /dev/null @@ -1,593 +0,0 @@ -#ifndef ISL_POLYNOMIAL_H -#define ISL_POLYNOMIAL_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -isl_ctx *isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp); -__isl_give isl_space *isl_qpolynomial_get_domain_space( - __isl_keep isl_qpolynomial *qp); -__isl_give isl_space *isl_qpolynomial_get_space(__isl_keep isl_qpolynomial *qp); -unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type); -int isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_qpolynomial *isl_qpolynomial_zero_on_domain(__isl_take isl_space *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_one_on_domain(__isl_take isl_space *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_infty_on_domain(__isl_take isl_space *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_neginfty_on_domain(__isl_take isl_space *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_nan_on_domain(__isl_take isl_space *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_rat_cst_on_domain(__isl_take isl_space *dim, - const isl_int n, const isl_int d); -__isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos); -__isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp); -void *isl_qpolynomial_free(__isl_take isl_qpolynomial *qp); - -int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2); -int isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp, - isl_int *n, isl_int *d); -void isl_qpolynomial_get_den(__isl_keep isl_qpolynomial *qp, isl_int *d); - -__isl_give isl_qpolynomial *isl_qpolynomial_neg(__isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_sub(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_pow(__isl_take isl_qpolynomial *qp, - unsigned power); -__isl_give isl_qpolynomial *isl_qpolynomial_add_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v); -__isl_give isl_qpolynomial *isl_qpolynomial_mul_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v); -__isl_give isl_qpolynomial *isl_qpolynomial_scale( - __isl_take isl_qpolynomial *qp, isl_int v); - -__isl_give isl_qpolynomial *isl_qpolynomial_insert_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, - unsigned first, unsigned n); -__isl_give isl_qpolynomial *isl_qpolynomial_add_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n); -__isl_give isl_qpolynomial *isl_qpolynomial_move_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_qpolynomial *isl_qpolynomial_project_domain_on_params( - __isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_drop_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_qpolynomial *isl_qpolynomial_substitute( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs); - -int isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial *qp, - __isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user), void *user); - -__isl_give isl_qpolynomial *isl_qpolynomial_homogenize( - __isl_take isl_qpolynomial *poly); - -__isl_give isl_qpolynomial *isl_qpolynomial_align_params( - __isl_take isl_qpolynomial *qp, __isl_take isl_space *model); - -isl_ctx *isl_term_get_ctx(__isl_keep isl_term *term); - -__isl_give isl_term *isl_term_copy(__isl_keep isl_term *term); -void isl_term_free(__isl_take isl_term *term); - -unsigned isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type); -void isl_term_get_num(__isl_keep isl_term *term, isl_int *n); -void isl_term_get_den(__isl_keep isl_term *term, isl_int *d); -int isl_term_get_exp(__isl_keep isl_term *term, - enum isl_dim_type type, unsigned pos); -__isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos); - -int isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial *qp, - int (*fn)(__isl_take isl_term *term, void *user), void *user); - -__isl_give isl_qpolynomial *isl_qpolynomial_eval( - __isl_take isl_qpolynomial *qp, __isl_take isl_point *pnt); - -__isl_give isl_qpolynomial *isl_qpolynomial_gist_params( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *context); -__isl_give isl_qpolynomial *isl_qpolynomial_gist( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *context); - -__isl_give isl_qpolynomial *isl_qpolynomial_from_constraint( - __isl_take isl_constraint *c, enum isl_dim_type type, unsigned pos); -__isl_give isl_qpolynomial *isl_qpolynomial_from_term(__isl_take isl_term *term); -__isl_give isl_qpolynomial *isl_qpolynomial_from_aff(__isl_take isl_aff *aff); -__isl_give isl_basic_map *isl_basic_map_from_qpolynomial( - __isl_take isl_qpolynomial *qp); - -__isl_give isl_printer *isl_printer_print_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp); -void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out, - unsigned output_format); -void isl_qpolynomial_dump(__isl_keep isl_qpolynomial *qp); - -isl_ctx *isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial *pwqp); - -int isl_pw_qpolynomial_plain_is_equal(__isl_keep isl_pw_qpolynomial *pwqp1, - __isl_keep isl_pw_qpolynomial *pwqp2); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero(__isl_take isl_space *dim); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial( - __isl_take isl_qpolynomial *qp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy( - __isl_keep isl_pw_qpolynomial *pwqp); -void *isl_pw_qpolynomial_free(__isl_take isl_pw_qpolynomial *pwqp); - -int isl_pw_qpolynomial_is_zero(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_space *isl_pw_qpolynomial_get_domain_space( - __isl_keep isl_pw_qpolynomial *pwqp); -__isl_give isl_space *isl_pw_qpolynomial_get_space( - __isl_keep isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_reset_domain_space( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_space *dim); -unsigned isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial *pwqp, - enum isl_dim_type type); -int isl_pw_qpolynomial_involves_dims(__isl_keep isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); -int isl_pw_qpolynomial_has_equal_space(__isl_keep isl_pw_qpolynomial *pwqp1, - __isl_keep isl_pw_qpolynomial *pwqp2); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_set_dim_name( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_set *isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain( - __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_params( - __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_domain_on_params( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sub( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_disjoint( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_neg( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul_isl_int( - __isl_take isl_pw_qpolynomial *pwqp, isl_int v); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow( - __isl_take isl_pw_qpolynomial *pwqp, unsigned exponent); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_insert_dims( - __isl_take isl_pw_qpolynomial *pwqp, enum isl_dim_type type, - unsigned first, unsigned n); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned n); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_move_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_dim( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned n, isl_int v); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_eval( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_point *pnt); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_max( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_qpolynomial *isl_pw_qpolynomial_min( - __isl_take isl_pw_qpolynomial *pwqp); - -int isl_pw_qpolynomial_foreach_piece(__isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp, - void *user), void *user); -int isl_pw_qpolynomial_foreach_lifted_piece(__isl_keep isl_pw_qpolynomial *pwqp, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp, - void *user), void *user); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_pw_aff( - __isl_take isl_pw_aff *pwaff); - -__isl_constructor -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx, - const char *str); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_give isl_printer *isl_printer_print_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp); -void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out, - unsigned output_format); -void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_coalesce( - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist_params( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_periods( - __isl_take isl_pw_qpolynomial *pwqp, int max_periods); - -__isl_give isl_pw_qpolynomial *isl_basic_set_multiplicative_call( - __isl_take isl_basic_set *bset, - __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)); - -isl_ctx *isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold *fold); -enum isl_fold isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold *fold); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type, - __isl_take isl_space *dim); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_alloc( - enum isl_fold type, __isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( - __isl_keep isl_qpolynomial_fold *fold); -void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold); - -int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold); -int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1, - __isl_keep isl_qpolynomial_fold *fold2); - -__isl_give isl_space *isl_qpolynomial_fold_get_space( - __isl_keep isl_qpolynomial_fold *fold); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold( - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_mul_isl_int( - __isl_take isl_qpolynomial_fold *fold, isl_int v); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( - __isl_take isl_qpolynomial_fold *fold, isl_int v); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs); - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_eval( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context); - -int isl_qpolynomial_fold_foreach_qpolynomial( - __isl_keep isl_qpolynomial_fold *fold, - int (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user); - -__isl_give isl_printer *isl_printer_print_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold); -void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, FILE *out, - unsigned output_format); -void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold *fold); - -isl_ctx *isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold *pwf); - -int isl_pw_qpolynomial_fold_plain_is_equal( - __isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial( - enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_alloc( - enum isl_fold type, - __isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy( - __isl_keep isl_pw_qpolynomial_fold *pwf); -void *isl_pw_qpolynomial_fold_free(__isl_take isl_pw_qpolynomial_fold *pwf); - -int isl_pw_qpolynomial_fold_is_zero(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_space *isl_pw_qpolynomial_fold_get_domain_space( - __isl_keep isl_pw_qpolynomial_fold *pwf); -__isl_give isl_space *isl_pw_qpolynomial_fold_get_space( - __isl_keep isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_space( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_space *dim); -unsigned isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type); -int isl_pw_qpolynomial_fold_has_equal_space( - __isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2); - -size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_zero( - __isl_take isl_space *dim, enum isl_fold type); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_set_dim_name( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_set *isl_pw_qpolynomial_fold_domain( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_domain( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_params( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add_disjoint( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_mul_isl_int( - __isl_take isl_pw_qpolynomial_fold *pwf, isl_int v); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_dims( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_move_dims( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fix_dim( - __isl_take isl_pw_qpolynomial_fold *pwf, - enum isl_dim_type type, unsigned n, isl_int v); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_eval( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_point *pnt); - -int isl_pw_qpolynomial_fold_foreach_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); -int isl_pw_qpolynomial_fold_foreach_lifted_piece( - __isl_keep isl_pw_qpolynomial_fold *pwf, - int (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold, - void *user), void *user); - -__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf); -void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf, - FILE *out, unsigned output_format); -void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist_params( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context); - -__isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_max( - __isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_qpolynomial *isl_pw_qpolynomial_fold_min( - __isl_take isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( - __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, int *tight); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound( - __isl_take isl_pw_qpolynomial_fold *pwf, int *tight); -__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold( - __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); -__isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold( - __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( - __isl_take isl_pw_qpolynomial *pwqp, int sign); - -isl_ctx *isl_union_pw_qpolynomial_get_ctx( - __isl_keep isl_union_pw_qpolynomial *upwqp); - -int isl_union_pw_qpolynomial_plain_is_equal( - __isl_keep isl_union_pw_qpolynomial *upwqp1, - __isl_keep isl_union_pw_qpolynomial *upwqp2); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero( - __isl_take isl_space *dim); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_pw_qpolynomial *pwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy( - __isl_keep isl_union_pw_qpolynomial *upwqp); -void isl_union_pw_qpolynomial_free(__isl_take isl_union_pw_qpolynomial *upwqp); - -__isl_constructor -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_read_from_str( - isl_ctx *ctx, const char *str); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul_isl_int( - __isl_take isl_union_pw_qpolynomial *upwqp, isl_int v); - -__isl_give isl_union_set *isl_union_pw_qpolynomial_domain( - __isl_take isl_union_pw_qpolynomial *upwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain( - __isl_take isl_union_pw_qpolynomial *upwpq, - __isl_take isl_union_set *uset); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_params( - __isl_take isl_union_pw_qpolynomial *upwpq, - __isl_take isl_set *set); - -__isl_give isl_space *isl_union_pw_qpolynomial_get_space( - __isl_keep isl_union_pw_qpolynomial *upwqp); - -__isl_give isl_qpolynomial *isl_union_pw_qpolynomial_eval( - __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_point *pnt); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce( - __isl_take isl_union_pw_qpolynomial *upwqp); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_union_set *context); -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist_params( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_set *context); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_align_params( - __isl_take isl_union_pw_qpolynomial *upwqp, - __isl_take isl_space *model); - -int isl_union_pw_qpolynomial_foreach_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, - int (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user), void *user); -__isl_give isl_pw_qpolynomial *isl_union_pw_qpolynomial_extract_pw_qpolynomial( - __isl_keep isl_union_pw_qpolynomial *upwqp, __isl_take isl_space *dim); - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp); - -isl_ctx *isl_union_pw_qpolynomial_fold_get_ctx( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -int isl_union_pw_qpolynomial_fold_plain_is_equal( - __isl_keep isl_union_pw_qpolynomial_fold *upwf1, - __isl_keep isl_union_pw_qpolynomial_fold *upwf2); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold *pwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_zero( - __isl_take isl_space *dim, enum isl_fold type); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - __isl_take isl_union_pw_qpolynomial_fold *upwqp, - __isl_take isl_pw_qpolynomial_fold *pwqp); -void isl_union_pw_qpolynomial_fold_free( - __isl_take isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( - __isl_take isl_union_pw_qpolynomial_fold *upwf1, - __isl_take isl_union_pw_qpolynomial_fold *upwf2); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_pw_qpolynomial *upwqp); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_mul_isl_int( - __isl_take isl_union_pw_qpolynomial_fold *upwf, isl_int v); - -__isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *uset); -__isl_give isl_union_pw_qpolynomial_fold * -isl_union_pw_qpolynomial_fold_intersect_params( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_set *set); - -enum isl_fold isl_union_pw_qpolynomial_fold_get_type( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_space *isl_union_pw_qpolynomial_fold_get_space( - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_qpolynomial *isl_union_pw_qpolynomial_fold_eval( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_point *pnt); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce( - __isl_take isl_union_pw_qpolynomial_fold *upwf); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_set *context); -__isl_give isl_union_pw_qpolynomial_fold * -isl_union_pw_qpolynomial_fold_gist_params( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_set *context); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_align_params( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_space *model); - -int isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( - __isl_keep isl_union_pw_qpolynomial_fold *upwf, - int (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf, - void *user), void *user); -__isl_give isl_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold( - __isl_keep isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_space *dim); - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf); - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( - __isl_take isl_union_pw_qpolynomial *upwqp, - enum isl_fold type, int *tight); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_set *uset, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight); -__isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_map *umap, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight); - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, int sign); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/polynomial_type.h b/cloog-0.17.0/isl/include/isl/polynomial_type.h deleted file mode 100644 index bb022bf8894b73a1d42459de3ee0990a6c5ab9b7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/polynomial_type.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ISL_POLYNOMIAL_TYPE_H -#define ISL_POLYNOMIAL_TYPE_H - -struct isl_qpolynomial; -typedef struct isl_qpolynomial isl_qpolynomial; - -struct isl_term; -typedef struct isl_term isl_term; - -__isl_export -struct isl_pw_qpolynomial; -typedef struct isl_pw_qpolynomial isl_pw_qpolynomial; - -enum isl_fold { - isl_fold_min, - isl_fold_max, - isl_fold_list -}; - -struct isl_qpolynomial_fold; -typedef struct isl_qpolynomial_fold isl_qpolynomial_fold; - -struct isl_pw_qpolynomial_fold; -typedef struct isl_pw_qpolynomial_fold isl_pw_qpolynomial_fold; - -__isl_export -struct isl_union_pw_qpolynomial; -typedef struct isl_union_pw_qpolynomial isl_union_pw_qpolynomial; - -struct isl_union_pw_qpolynomial_fold; -typedef struct isl_union_pw_qpolynomial_fold isl_union_pw_qpolynomial_fold; - -#endif diff --git a/cloog-0.17.0/isl/include/isl/printer.h b/cloog-0.17.0/isl/include/isl/printer.h deleted file mode 100644 index da2f043991fd7456b03377c721350d8242889a4f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/printer.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef ISL_PRINTER_H -#define ISL_PRINTER_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_printer; -typedef struct isl_printer isl_printer; - -__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file); -__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx); -void isl_printer_free(__isl_take isl_printer *printer); - -isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer); - -__isl_give char *isl_printer_get_str(__isl_keep isl_printer *printer); - -__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p, - int indent); -__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p, - int indent); - -#define ISL_FORMAT_ISL 0 -#define ISL_FORMAT_POLYLIB 1 -#define ISL_FORMAT_POLYLIB_CONSTRAINTS 2 -#define ISL_FORMAT_OMEGA 3 -#define ISL_FORMAT_C 4 -#define ISL_FORMAT_LATEX 5 -#define ISL_FORMAT_EXT_POLYLIB 6 -__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p, - int output_format); - -__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p, - const char *prefix); -__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p, - const char *suffix); -__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p, - int width); - -__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p); -__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p); -__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i); -__isl_give isl_printer *isl_printer_print_isl_int(__isl_take isl_printer *p, - isl_int i); -__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p, - const char *s); - -__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/schedule.h b/cloog-0.17.0/isl/include/isl/schedule.h deleted file mode 100644 index 7978979b2fa69ce58e600b44ce286e955fa580a2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/schedule.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef ISL_SCHEDULE_H -#define ISL_SCHEDULE_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_schedule; -typedef struct isl_schedule isl_schedule; - -int isl_options_set_schedule_max_constant_term(isl_ctx *ctx, int val); -int isl_options_get_schedule_max_constant_term(isl_ctx *ctx); - -int isl_options_set_schedule_maximize_band_depth(isl_ctx *ctx, int val); -int isl_options_get_schedule_maximize_band_depth(isl_ctx *ctx); - -int isl_options_set_schedule_outer_zero_distance(isl_ctx *ctx, int val); -int isl_options_get_schedule_outer_zero_distance(isl_ctx *ctx); - -__isl_give isl_schedule *isl_union_set_compute_schedule( - __isl_take isl_union_set *domain, - __isl_take isl_union_map *validity, - __isl_take isl_union_map *proximity); -void *isl_schedule_free(__isl_take isl_schedule *sched); -__isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched); - -isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *sched); - -__isl_give isl_band_list *isl_schedule_get_band_forest( - __isl_keep isl_schedule *schedule); - -__isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p, - __isl_keep isl_schedule *schedule); -void isl_schedule_dump(__isl_keep isl_schedule *schedule); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/seq.h b/cloog-0.17.0/isl/include/isl/seq.h deleted file mode 100644 index eda88184026fc20fa1a88d55ace705ad976341fe..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/seq.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SEQ_H -#define ISL_SEQ_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Some common operations on sequences of isl_int's */ - -void isl_seq_clr(isl_int *p, unsigned len); -void isl_seq_set(isl_int *p, isl_int v, unsigned len); -void isl_seq_neg(isl_int *dat, isl_int *src, unsigned len); -void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len); -void isl_seq_addmul(isl_int *dst, isl_int f, isl_int *src, unsigned len); -void isl_seq_submul(isl_int *dst, isl_int f, isl_int *src, unsigned len); -void isl_seq_swp_or_cpy(isl_int *dst, isl_int *src, unsigned len); -void isl_seq_scale(isl_int *dst, isl_int *src, isl_int f, unsigned len); -void isl_seq_scale_down(isl_int *dst, isl_int *src, isl_int f, unsigned len); -void isl_seq_cdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len); -void isl_seq_fdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len); -void isl_seq_fdiv_r(isl_int *dst, isl_int *src, isl_int m, unsigned len); -void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1, - isl_int m2, isl_int *src2, unsigned len); -void isl_seq_elim(isl_int *dst, isl_int *src, unsigned pos, unsigned len, - isl_int *m); -void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd); -void isl_seq_lcm(isl_int *p, unsigned len, isl_int *lcm); -void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len); -void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len, - isl_int *prod); -int isl_seq_first_non_zero(isl_int *p, unsigned len); -int isl_seq_last_non_zero(isl_int *p, unsigned len); -int isl_seq_abs_min_non_zero(isl_int *p, unsigned len); -int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len); -int isl_seq_cmp(isl_int *p1, isl_int *p2, unsigned len); -int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len); - -uint32_t isl_seq_get_hash(isl_int *p, unsigned len); -uint32_t isl_seq_get_hash_bits(isl_int *p, unsigned len, unsigned bits); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/set.h b/cloog-0.17.0/isl/include/isl/set.h deleted file mode 100644 index 27114276963392619903327a99689705aa309274..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/set.h +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SET_H -#define ISL_SET_H - -#include -#include -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -unsigned isl_basic_set_n_dim(__isl_keep isl_basic_set *bset); -unsigned isl_basic_set_n_param(__isl_keep isl_basic_set *bset); -unsigned isl_basic_set_total_dim(const struct isl_basic_set *bset); -unsigned isl_basic_set_dim(__isl_keep isl_basic_set *bset, - enum isl_dim_type type); - -unsigned isl_set_n_dim(__isl_keep isl_set *set); -unsigned isl_set_n_param(__isl_keep isl_set *set); -unsigned isl_set_dim(__isl_keep isl_set *set, enum isl_dim_type type); - -isl_ctx *isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset); -isl_ctx *isl_set_get_ctx(__isl_keep isl_set *set); -__isl_give isl_space *isl_basic_set_get_space(__isl_keep isl_basic_set *bset); -__isl_give isl_space *isl_set_get_space(__isl_keep isl_set *set); -__isl_give isl_set *isl_set_reset_space(__isl_take isl_set *set, - __isl_take isl_space *dim); - -__isl_give isl_aff *isl_basic_set_get_div(__isl_keep isl_basic_set *bset, - int pos); - -__isl_give isl_local_space *isl_basic_set_get_local_space( - __isl_keep isl_basic_set *bset); - -const char *isl_basic_set_get_tuple_name(__isl_keep isl_basic_set *bset); -const char *isl_set_get_tuple_name(__isl_keep isl_set *set); -__isl_give isl_basic_set *isl_basic_set_set_tuple_name( - __isl_take isl_basic_set *set, const char *s); -__isl_give isl_set *isl_set_set_tuple_name(__isl_take isl_set *set, - const char *s); -const char *isl_basic_set_get_dim_name(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos); -__isl_give isl_basic_set *isl_basic_set_set_dim_name( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, const char *s); -const char *isl_set_get_dim_name(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); -__isl_give isl_set *isl_set_set_dim_name(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_set *isl_set_set_dim_id(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); -int isl_set_has_dim_id(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); -__isl_give isl_id *isl_set_get_dim_id(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); -__isl_give isl_set *isl_set_set_tuple_id(__isl_take isl_set *set, - __isl_take isl_id *id); -__isl_give isl_set *isl_set_reset_tuple_id(__isl_take isl_set *set); -int isl_set_has_tuple_id(__isl_keep isl_set *set); -__isl_give isl_id *isl_set_get_tuple_id(__isl_keep isl_set *set); - -int isl_set_find_dim_by_id(__isl_keep isl_set *set, enum isl_dim_type type, - __isl_keep isl_id *id); -int isl_set_find_dim_by_name(__isl_keep isl_set *set, enum isl_dim_type type, - const char *name); - -int isl_basic_set_is_rational(__isl_keep isl_basic_set *bset); - -struct isl_basic_set *isl_basic_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_extend(struct isl_basic_set *base, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_extend_constraints( - struct isl_basic_set *base, unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_finalize(struct isl_basic_set *bset); -void isl_basic_set_free(__isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_copy(__isl_keep isl_basic_set *bset); -struct isl_basic_set *isl_basic_set_dup(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_space *dim); -struct isl_basic_set *isl_basic_set_empty_like(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_universe(__isl_take isl_space *dim); -__isl_give isl_basic_set *isl_basic_set_nat_universe(__isl_take isl_space *dim); -struct isl_basic_set *isl_basic_set_universe_like(struct isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_universe_like_set( - __isl_keep isl_set *model); -struct isl_basic_set *isl_basic_set_interval(struct isl_ctx *ctx, - isl_int min, isl_int max); -__isl_give isl_basic_set *isl_basic_set_positive_orthant( - __isl_take isl_space *space); -void isl_basic_set_print_internal(__isl_keep isl_basic_set *bset, - FILE *out, int indent); -__isl_export -__isl_give isl_basic_set *isl_basic_set_intersect( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); -__isl_export -__isl_give isl_basic_set *isl_basic_set_intersect_params( - __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2); -__isl_export -__isl_give isl_basic_set *isl_basic_set_apply( - __isl_take isl_basic_set *bset, - __isl_take isl_basic_map *bmap); -__isl_export -__isl_give isl_basic_set *isl_basic_set_affine_hull( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_remove_dims( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_set *isl_basic_set_simplify(struct isl_basic_set *bset); -__isl_export -__isl_give isl_basic_set *isl_basic_set_detect_equalities( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_basic_set_remove_redundancies( - __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_basic_set_list_product( - __isl_take struct isl_basic_set_list *list); - -__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_constructor -__isl_give isl_basic_set *isl_basic_set_read_from_str(isl_ctx *ctx, - const char *str); -__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx, FILE *input); -__isl_constructor -__isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx, const char *str); -void isl_basic_set_dump(__isl_keep isl_basic_set *bset); -void isl_set_dump(__isl_keep isl_set *set); -__isl_give isl_printer *isl_printer_print_basic_set( - __isl_take isl_printer *printer, __isl_keep isl_basic_set *bset); -__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *printer, - __isl_keep isl_set *map); -void isl_basic_set_print(__isl_keep isl_basic_set *bset, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format); -void isl_set_print(__isl_keep struct isl_set *set, FILE *out, int indent, - unsigned output_format); -__isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, isl_int value); -__isl_give isl_basic_set *isl_basic_set_fix_si(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); -__isl_give isl_set *isl_set_upper_bound_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value); - -__isl_give isl_set *isl_set_equate(__isl_take isl_set *set, - enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); - -struct isl_basic_set *isl_basic_set_from_underlying_set( - struct isl_basic_set *bset, struct isl_basic_set *like); -struct isl_set *isl_set_from_underlying_set( - struct isl_set *set, struct isl_basic_set *like); -struct isl_set *isl_set_to_underlying_set(struct isl_set *set); - -__isl_export -int isl_basic_set_is_equal( - struct isl_basic_set *bset1, struct isl_basic_set *bset2); - -__isl_give isl_set *isl_basic_set_partial_lexmin( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_basic_set_partial_lexmax( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_set_partial_lexmin( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_give isl_set *isl_set_partial_lexmax( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty); -__isl_export -__isl_give isl_set *isl_basic_set_lexmin(__isl_take isl_basic_set *bset); -__isl_export -__isl_give isl_set *isl_basic_set_lexmax(__isl_take isl_basic_set *bset); -__isl_export -__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set); -__isl_export -__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set); -__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmin_pw_multi_aff( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); -__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmax_pw_multi_aff( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty); - -__isl_export -__isl_give isl_set *isl_basic_set_union( - __isl_take isl_basic_set *bset1, - __isl_take isl_basic_set *bset2); - -int isl_basic_set_compare_at(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, int pos); -int isl_set_follows_at(__isl_keep isl_set *set1, - __isl_keep isl_set *set2, int pos); - -__isl_give isl_basic_set *isl_basic_set_params(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_params(__isl_take isl_set *set); -__isl_give isl_set *isl_set_from_params(__isl_take isl_set *set); - -int isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, unsigned n, int *signs); - -int isl_basic_set_is_universe(__isl_keep isl_basic_set *bset); -int isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset); -int isl_basic_set_fast_is_empty(__isl_keep isl_basic_set *bset); -__isl_export -int isl_basic_set_is_empty(__isl_keep isl_basic_set *bset); -int isl_basic_set_is_bounded(__isl_keep isl_basic_set *bset); - -struct isl_set *isl_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, int n, unsigned flags); -struct isl_set *isl_set_extend(struct isl_set *base, - unsigned nparam, unsigned dim); -__isl_give isl_set *isl_set_empty(__isl_take isl_space *dim); -struct isl_set *isl_set_empty_like(struct isl_set *set); -__isl_give isl_set *isl_set_universe(__isl_take isl_space *dim); -__isl_give isl_set *isl_set_nat_universe(__isl_take isl_space *dim); -__isl_give isl_set *isl_set_universe_like(__isl_keep isl_set *model); -__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *bset); -struct isl_set *isl_set_finalize(struct isl_set *set); -__isl_give isl_set *isl_set_copy(__isl_keep isl_set *set); -void isl_set_free(__isl_take isl_set *set); -struct isl_set *isl_set_dup(struct isl_set *set); -__isl_constructor -__isl_give isl_set *isl_set_from_basic_set(__isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_set_sample(__isl_take isl_set *set); -__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset); -__isl_give isl_point *isl_set_sample_point(__isl_take isl_set *set); -__isl_export -__isl_give isl_set *isl_set_detect_equalities(__isl_take isl_set *set); -__isl_export -__isl_give isl_basic_set *isl_set_affine_hull(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_set_convex_hull(__isl_take isl_set *set); -__isl_export -__isl_give isl_basic_set *isl_set_polyhedral_hull(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_set_simple_hull(__isl_take isl_set *set); -struct isl_basic_set *isl_set_bounded_simple_hull(struct isl_set *set); -__isl_give isl_set *isl_set_recession_cone(__isl_take isl_set *set); - -struct isl_set *isl_set_union_disjoint( - struct isl_set *set1, struct isl_set *set2); -__isl_export -__isl_give isl_set *isl_set_union( - __isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_set *isl_set_product(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_basic_set *isl_basic_set_flat_product( - __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2); -__isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_export -__isl_give isl_set *isl_set_intersect( - __isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_export -__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, - __isl_take isl_set *params); -__isl_export -__isl_give isl_set *isl_set_subtract( - __isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_export -__isl_give isl_set *isl_set_complement(__isl_take isl_set *set); -__isl_export -__isl_give isl_set *isl_set_apply( - __isl_take isl_set *set, - __isl_take isl_map *map); -__isl_give isl_set *isl_set_fix(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, isl_int value); -struct isl_set *isl_set_fix_dim_si(struct isl_set *set, - unsigned dim, int value); -struct isl_set *isl_set_lower_bound_dim(struct isl_set *set, - unsigned dim, isl_int value); -__isl_give isl_set *isl_set_insert_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_basic_set *isl_basic_set_add(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned n); -__isl_give isl_set *isl_set_add_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned n); -__isl_give isl_basic_set *isl_basic_set_move_dims(__isl_take isl_basic_set *bset, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_set *isl_set_move_dims(__isl_take isl_set *set, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_basic_set *isl_basic_set_project_out( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_basic_set *isl_basic_set_remove_divs( - __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_set *isl_set_eliminate_dims(struct isl_set *set, - unsigned first, unsigned n); -__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_remove_divs_involving_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_remove_unknown_divs(__isl_take isl_set *set); -__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set); -__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - -int isl_basic_set_involves_dims(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -int isl_set_involves_dims(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - -void isl_set_print_internal(__isl_keep isl_set *set, FILE *out, int indent); -int isl_set_plain_is_empty(__isl_keep isl_set *set); -int isl_set_fast_is_empty(__isl_keep isl_set *set); -int isl_set_plain_is_universe(__isl_keep isl_set *set); -int isl_set_fast_is_universe(__isl_keep isl_set *set); -int isl_set_is_params(__isl_keep isl_set *set); -__isl_export -int isl_set_is_empty(__isl_keep isl_set *set); -int isl_set_is_bounded(__isl_keep isl_set *set); -__isl_export -int isl_set_is_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -__isl_export -int isl_set_is_strict_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -__isl_export -int isl_set_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_is_singleton(__isl_keep isl_set *set); -int isl_set_is_box(__isl_keep isl_set *set); -int isl_set_has_equal_space(__isl_keep isl_set *set1, __isl_keep isl_set *set2); - -__isl_give isl_set *isl_set_sum(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_basic_set *isl_basic_set_neg(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_neg(__isl_take isl_set *set); - -__isl_give isl_set *isl_set_make_disjoint(__isl_take isl_set *set); -struct isl_set *isl_basic_set_compute_divs(struct isl_basic_set *bset); -__isl_give isl_set *isl_set_compute_divs(__isl_take isl_set *set); -__isl_give isl_set *isl_set_align_divs(__isl_take isl_set *set); - -struct isl_basic_set *isl_set_copy_basic_set(struct isl_set *set); -struct isl_set *isl_set_drop_basic_set(struct isl_set *set, - struct isl_basic_set *bset); - -int isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset, - unsigned dim, isl_int *val); - -int isl_set_plain_is_fixed(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos, isl_int *val); -int isl_set_plain_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val); -int isl_set_fast_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val); -int isl_set_plain_dim_has_fixed_lower_bound(__isl_keep isl_set *set, - unsigned dim, isl_int *val); -int isl_set_dim_is_bounded(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); -int isl_set_dim_has_lower_bound(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); -int isl_set_dim_has_upper_bound(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos); - -__isl_export -__isl_give isl_basic_set *isl_basic_set_gist(__isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context); -__isl_give isl_set *isl_set_gist_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *context); -__isl_export -__isl_give isl_set *isl_set_gist(__isl_take isl_set *set, - __isl_take isl_set *context); -__isl_give isl_set *isl_set_gist_params(__isl_take isl_set *set, - __isl_take isl_set *context); -int isl_basic_set_dim_residue_class(struct isl_basic_set *bset, - int pos, isl_int *modulo, isl_int *residue); -int isl_set_dim_residue_class(struct isl_set *set, - int pos, isl_int *modulo, isl_int *residue); - -__isl_export -__isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set); - -int isl_set_plain_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_fast_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); -int isl_set_plain_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); -int isl_set_fast_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2); - -uint32_t isl_set_get_hash(struct isl_set *set); - -int isl_set_dim_is_unique(struct isl_set *set, unsigned dim); - -int isl_set_n_basic_set(__isl_keep isl_set *set); -__isl_export -int isl_set_foreach_basic_set(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_basic_set *bset, void *user), void *user); - -int isl_set_foreach_point(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user); -int isl_set_count(__isl_keep isl_set *set, isl_int *count); -int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset, - isl_int max, isl_int *count); -int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count); - -__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt); -__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt); -__isl_give isl_basic_set *isl_basic_set_box_from_points( - __isl_take isl_point *pnt1, __isl_take isl_point *pnt2); -__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1, - __isl_take isl_point *pnt2); - -__isl_give isl_basic_set *isl_basic_set_lift(__isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_lift(__isl_take isl_set *set); - -__isl_give isl_map *isl_set_lex_le_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_map *isl_set_lex_lt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_map *isl_set_lex_ge_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); -__isl_give isl_map *isl_set_lex_gt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2); - -int isl_set_size(__isl_keep isl_set *set); - -__isl_give isl_set *isl_set_align_params(__isl_take isl_set *set, - __isl_take isl_space *model); - -__isl_give isl_mat *isl_basic_set_equalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); -__isl_give isl_mat *isl_basic_set_inequalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); -__isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( - __isl_take isl_space *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); - -__isl_give isl_mat *isl_basic_set_reduced_basis(__isl_keep isl_basic_set *bset); - -__isl_give isl_basic_set *isl_basic_set_coefficients( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_set_coefficients(__isl_take isl_set *set); -__isl_give isl_basic_set *isl_basic_set_solutions( - __isl_take isl_basic_set *bset); -__isl_give isl_basic_set *isl_set_solutions(__isl_take isl_set *set); - -__isl_give isl_pw_aff *isl_set_dim_max(__isl_take isl_set *set, int pos); -__isl_give isl_pw_aff *isl_set_dim_min(__isl_take isl_set *set, int pos); - -__isl_give char *isl_set_to_str(__isl_keep isl_set *set); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/set_type.h b/cloog-0.17.0/isl/include/isl/set_type.h deleted file mode 100644 index ce349e1b5d4a13035a2ea3484f0d7c8b202cafed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/set_type.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ISL_SET_TYPE_H -#define ISL_SET_TYPE_H - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/space.h b/cloog-0.17.0/isl/include/isl/space.h deleted file mode 100644 index d3496e0b6fcddd081fe0f0ce2b9ed31566bcfa21..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/space.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SPACE_H -#define ISL_SPACE_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_space; -typedef struct isl_space isl_space; - -enum isl_dim_type { - isl_dim_cst, - isl_dim_param, - isl_dim_in, - isl_dim_out, - isl_dim_set = isl_dim_out, - isl_dim_div, - isl_dim_all -}; - -isl_ctx *isl_space_get_ctx(__isl_keep isl_space *dim); -__isl_give isl_space *isl_space_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim); -__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam); -__isl_give isl_space *isl_space_copy(__isl_keep isl_space *dim); -void isl_space_free(__isl_take isl_space *dim); - -int isl_space_is_params(__isl_keep isl_space *space); -int isl_space_is_set(__isl_keep isl_space *space); - -__isl_give isl_space *isl_space_set_tuple_name(__isl_take isl_space *dim, - enum isl_dim_type type, const char *s); -const char *isl_space_get_tuple_name(__isl_keep isl_space *dim, - enum isl_dim_type type); -__isl_give isl_space *isl_space_set_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type, __isl_take isl_id *id); -__isl_give isl_space *isl_space_reset_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type); -int isl_space_has_tuple_id(__isl_keep isl_space *dim, enum isl_dim_type type); -__isl_give isl_id *isl_space_get_tuple_id(__isl_keep isl_space *dim, - enum isl_dim_type type); - -__isl_give isl_space *isl_space_set_dim_id(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); -int isl_space_has_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos); -__isl_give isl_id *isl_space_get_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos); - -int isl_space_find_dim_by_id(__isl_keep isl_space *dim, enum isl_dim_type type, - __isl_keep isl_id *id); -int isl_space_find_dim_by_name(__isl_keep isl_space *space, - enum isl_dim_type type, const char *name); - -__isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, - __isl_keep const char *name); -__isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos); - -__isl_give isl_space *isl_space_extend(__isl_take isl_space *dim, - unsigned nparam, unsigned n_in, unsigned n_out); -__isl_give isl_space *isl_space_add_dims(__isl_take isl_space *dim, enum isl_dim_type type, - unsigned n); -__isl_give isl_space *isl_space_move_dims(__isl_take isl_space *dim, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n); -__isl_give isl_space *isl_space_insert_dims(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, unsigned n); -__isl_give isl_space *isl_space_join(__isl_take isl_space *left, - __isl_take isl_space *right); -__isl_give isl_space *isl_space_product(__isl_take isl_space *left, - __isl_take isl_space *right); -__isl_give isl_space *isl_space_domain_product(__isl_take isl_space *left, - __isl_take isl_space *right); -__isl_give isl_space *isl_space_range_product(__isl_take isl_space *left, - __isl_take isl_space *right); -__isl_give isl_space *isl_space_map_from_set(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_reverse(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_drop_dims(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned first, unsigned num); -__isl_give isl_space *isl_space_drop_inputs(__isl_take isl_space *dim, - unsigned first, unsigned n); -__isl_give isl_space *isl_space_drop_outputs(__isl_take isl_space *dim, - unsigned first, unsigned n); -__isl_give isl_space *isl_space_domain(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_from_domain(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_range(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_from_range(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_params(__isl_take isl_space *space); -__isl_give isl_space *isl_space_set_from_params(__isl_take isl_space *space); - -__isl_give isl_space *isl_space_align_params(__isl_take isl_space *dim1, - __isl_take isl_space *dim2); - -int isl_space_is_wrapping(__isl_keep isl_space *dim); -__isl_give isl_space *isl_space_wrap(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_unwrap(__isl_take isl_space *dim); - -int isl_space_can_zip(__isl_keep isl_space *dim); -__isl_give isl_space *isl_space_zip(__isl_take isl_space *dim); - -int isl_space_is_equal(__isl_keep isl_space *dim1, __isl_keep isl_space *dim2); -int isl_space_match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_space *dim2, enum isl_dim_type dim2_type); -int isl_space_tuple_match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_space *dim2, enum isl_dim_type dim2_type); -int isl_space_compatible(__isl_keep isl_space *dim1, - __isl_keep isl_space *dim2); -unsigned isl_space_dim(__isl_keep isl_space *dim, enum isl_dim_type type); - -__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p, - __isl_keep isl_space *dim); -void isl_space_dump(__isl_keep isl_space *dim); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/stream.h b/cloog-0.17.0/isl/include/isl/stream.h deleted file mode 100644 index 7c192991161b0af957aed9012a784cc7b3b50f7b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/stream.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_STREAM_H -#define ISL_STREAM_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_token_type { ISL_TOKEN_ERROR = -1, - ISL_TOKEN_UNKNOWN = 256, ISL_TOKEN_VALUE, - ISL_TOKEN_IDENT, ISL_TOKEN_GE, - ISL_TOKEN_LE, ISL_TOKEN_GT, ISL_TOKEN_LT, - ISL_TOKEN_NE, ISL_TOKEN_EQ_EQ, - ISL_TOKEN_LEX_GE, ISL_TOKEN_LEX_LE, - ISL_TOKEN_LEX_GT, ISL_TOKEN_LEX_LT, - ISL_TOKEN_TO, ISL_TOKEN_AND, - ISL_TOKEN_OR, ISL_TOKEN_EXISTS, ISL_TOKEN_NOT, - ISL_TOKEN_DEF, ISL_TOKEN_INFTY, ISL_TOKEN_NAN, - ISL_TOKEN_MIN, ISL_TOKEN_MAX, ISL_TOKEN_RAT, - ISL_TOKEN_TRUE, ISL_TOKEN_FALSE, - ISL_TOKEN_CEILD, ISL_TOKEN_FLOORD, ISL_TOKEN_MOD, - ISL_TOKEN_STRING, - ISL_TOKEN_MAP, ISL_TOKEN_AFF, - ISL_TOKEN_LAST }; - -struct isl_token { - enum isl_token_type type; - - unsigned int on_new_line : 1; - unsigned is_keyword : 1; - int line; - int col; - - union { - isl_int v; - char *s; - isl_map *map; - isl_pw_aff *pwaff; - } u; -}; - -void isl_token_free(struct isl_token *tok); - -struct isl_stream { - struct isl_ctx *ctx; - FILE *file; - const char *str; - int line; - int col; - int eof; - - char *buffer; - size_t size; - size_t len; - int c; - int un[5]; - int n_un; - - struct isl_token *tokens[5]; - int n_token; - - struct isl_hash_table *keywords; - enum isl_token_type next_type; -}; - -struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file); -struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str); -void isl_stream_free(struct isl_stream *s); - -void isl_stream_error(struct isl_stream *s, struct isl_token *tok, char *msg); - -struct isl_token *isl_stream_next_token(struct isl_stream *s); -struct isl_token *isl_stream_next_token_on_same_line(struct isl_stream *s); -int isl_stream_next_token_is(struct isl_stream *s, int type); -void isl_stream_push_token(struct isl_stream *s, struct isl_token *tok); -void isl_stream_flush_tokens(struct isl_stream *s); -int isl_stream_eat_if_available(struct isl_stream *s, int type); -char *isl_stream_read_ident_if_available(struct isl_stream *s); -int isl_stream_eat(struct isl_stream *s, int type); -int isl_stream_is_empty(struct isl_stream *s); -int isl_stream_skip_line(struct isl_stream *s); - -enum isl_token_type isl_stream_register_keyword(struct isl_stream *s, - const char *name); - -struct isl_obj isl_stream_read_obj(struct isl_stream *s); -__isl_give isl_map *isl_stream_read_map(struct isl_stream *s); -__isl_give isl_set *isl_stream_read_set(struct isl_stream *s); -__isl_give isl_pw_qpolynomial *isl_stream_read_pw_qpolynomial( - struct isl_stream *s); -__isl_give isl_union_map *isl_stream_read_union_map(struct isl_stream *s); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/union_map.h b/cloog-0.17.0/isl/include/isl/union_map.h deleted file mode 100644 index f0ebeb2c8a724b5f84443fa712bfa9d7055dce1f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/union_map.h +++ /dev/null @@ -1,191 +0,0 @@ -#ifndef ISL_UNION_MAP_H -#define ISL_UNION_MAP_H - -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_export -struct isl_union_map; -typedef struct isl_union_map isl_union_map; -#ifndef isl_union_set -__isl_export -struct isl_union_set; -typedef struct isl_union_set isl_union_set; -#endif - -__isl_constructor -__isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map); -__isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *dim); -__isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap); -void *isl_union_map_free(__isl_take isl_union_map *umap); - -isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap); -__isl_give isl_space *isl_union_map_get_space(__isl_keep isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_universe( - __isl_take isl_union_map *umap); -__isl_give isl_set *isl_union_map_params(__isl_take isl_union_map *umap); -__isl_give isl_union_set *isl_union_map_domain(__isl_take isl_union_map *umap); -__isl_give isl_union_set *isl_union_map_range(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_domain_map( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_range_map( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_from_domain( - __isl_take isl_union_set *uset); -__isl_give isl_union_map *isl_union_map_from_range( - __isl_take isl_union_set *uset); - -__isl_export -__isl_give isl_union_map *isl_union_map_affine_hull( - __isl_take isl_union_map *umap); -__isl_export -__isl_give isl_union_map *isl_union_map_polyhedral_hull( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_simple_hull( - __isl_take isl_union_map *umap); -__isl_export -__isl_give isl_union_map *isl_union_map_coalesce( - __isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_compute_divs( - __isl_take isl_union_map *umap); -__isl_export -__isl_give isl_union_map *isl_union_map_lexmin(__isl_take isl_union_map *umap); -__isl_export -__isl_give isl_union_map *isl_union_map_lexmax(__isl_take isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_add_map(__isl_take isl_union_map *umap, - __isl_take isl_map *map); -__isl_export -__isl_give isl_union_map *isl_union_map_union(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); -__isl_export -__isl_give isl_union_map *isl_union_map_subtract( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_export -__isl_give isl_union_map *isl_union_map_intersect( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_export -__isl_give isl_union_map *isl_union_map_intersect_params( - __isl_take isl_union_map *umap, __isl_take isl_set *set); -__isl_give isl_union_map *isl_union_map_product(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_flat_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_export -__isl_give isl_union_map *isl_union_map_gist(__isl_take isl_union_map *umap, - __isl_take isl_union_map *context); -__isl_export -__isl_give isl_union_map *isl_union_map_gist_params( - __isl_take isl_union_map *umap, __isl_take isl_set *set); -__isl_export -__isl_give isl_union_map *isl_union_map_gist_domain( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); - -__isl_export -__isl_give isl_union_map *isl_union_map_intersect_domain( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); -__isl_export -__isl_give isl_union_map *isl_union_map_intersect_range( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); - -__isl_export -__isl_give isl_union_map *isl_union_map_apply_domain( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_export -__isl_give isl_union_map *isl_union_map_apply_range( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_export -__isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_from_domain_and_range( - __isl_take isl_union_set *domain, __isl_take isl_union_set *range); - -__isl_export -__isl_give isl_union_map *isl_union_map_detect_equalities( - __isl_keep isl_union_map *umap); -__isl_export -__isl_give isl_union_set *isl_union_map_deltas(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_map_deltas_map( - __isl_take isl_union_map *umap); -__isl_export -__isl_give isl_union_map *isl_union_set_identity(__isl_take isl_union_set *uset); - -__isl_export -int isl_union_map_is_empty(__isl_keep isl_union_map *umap); -__isl_export -int isl_union_map_is_single_valued(__isl_keep isl_union_map *umap); -int isl_union_map_plain_is_injective(__isl_keep isl_union_map *umap); -__isl_export -int isl_union_map_is_injective(__isl_keep isl_union_map *umap); -__isl_export -int isl_union_map_is_bijective(__isl_keep isl_union_map *umap); - -__isl_export -int isl_union_map_is_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); -__isl_export -int isl_union_map_is_equal(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); -__isl_export -int isl_union_map_is_strict_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2); - -int isl_union_map_n_map(__isl_keep isl_union_map *umap); -__isl_export -int isl_union_map_foreach_map(__isl_keep isl_union_map *umap, - int (*fn)(__isl_take isl_map *map, void *user), void *user); -__isl_give int isl_union_map_contains(__isl_keep isl_union_map *umap, - __isl_keep isl_space *dim); -__isl_give isl_map *isl_union_map_extract_map(__isl_keep isl_union_map *umap, - __isl_take isl_space *dim); -__isl_give isl_map *isl_map_from_union_map(__isl_take isl_union_map *umap); - -__isl_give isl_basic_map *isl_union_map_sample(__isl_take isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap, - int *exact); -__isl_give isl_union_map *isl_union_map_transitive_closure( - __isl_take isl_union_map *umap, int *exact); - -__isl_give isl_union_map *isl_union_map_lex_lt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_lex_le_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_lex_gt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); -__isl_give isl_union_map *isl_union_map_lex_ge_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); - -__isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_constructor -__isl_give isl_union_map *isl_union_map_read_from_str(isl_ctx *ctx, - const char *str); -__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p, - __isl_keep isl_union_map *umap); -void isl_union_map_dump(__isl_keep isl_union_map *umap); - -__isl_give isl_union_set *isl_union_map_wrap(__isl_take isl_union_map *umap); -__isl_give isl_union_map *isl_union_set_unwrap(__isl_take isl_union_set *uset); - -__isl_give isl_union_map *isl_union_map_zip(__isl_take isl_union_map *umap); - -__isl_give isl_union_map *isl_union_map_align_params( - __isl_take isl_union_map *umap, __isl_take isl_space *model); -__isl_give isl_union_set *isl_union_set_align_params( - __isl_take isl_union_set *uset, __isl_take isl_space *model); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/union_set.h b/cloog-0.17.0/isl/include/isl/union_set.h deleted file mode 100644 index c2acec47de862e5dba998f0602d93e29d5ca9371..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/union_set.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef ISL_UNION_SET_H -#define ISL_UNION_SET_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_constructor -__isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set); -__isl_give isl_union_set *isl_union_set_empty(__isl_take isl_space *dim); -__isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset); -void *isl_union_set_free(__isl_take isl_union_set *uset); - -isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset); -__isl_give isl_space *isl_union_set_get_space(__isl_keep isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_universe( - __isl_take isl_union_set *uset); -__isl_give isl_set *isl_union_set_params(__isl_take isl_union_set *uset); - -__isl_export -__isl_give isl_union_set *isl_union_set_detect_equalities( - __isl_take isl_union_set *uset); -__isl_export -__isl_give isl_union_set *isl_union_set_affine_hull( - __isl_take isl_union_set *uset); -__isl_export -__isl_give isl_union_set *isl_union_set_polyhedral_hull( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_simple_hull( - __isl_take isl_union_set *uset); -__isl_export -__isl_give isl_union_set *isl_union_set_coalesce( - __isl_take isl_union_set *uset); -__isl_give isl_union_set *isl_union_set_compute_divs( - __isl_take isl_union_set *uset); -__isl_export -__isl_give isl_union_set *isl_union_set_lexmin(__isl_take isl_union_set *uset); -__isl_export -__isl_give isl_union_set *isl_union_set_lexmax(__isl_take isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_add_set(__isl_take isl_union_set *uset, - __isl_take isl_set *set); -__isl_give isl_union_set *isl_union_set_union(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); -__isl_export -__isl_give isl_union_set *isl_union_set_subtract( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_export -__isl_give isl_union_set *isl_union_set_intersect( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_export -__isl_give isl_union_set *isl_union_set_intersect_params( - __isl_take isl_union_set *uset, __isl_take isl_set *set); -__isl_give isl_union_set *isl_union_set_product(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2); -__isl_export -__isl_give isl_union_set *isl_union_set_gist(__isl_take isl_union_set *uset, - __isl_take isl_union_set *context); -__isl_export -__isl_give isl_union_set *isl_union_set_gist_params( - __isl_take isl_union_set *uset, __isl_take isl_set *set); - -__isl_export -__isl_give isl_union_set *isl_union_set_apply( - __isl_take isl_union_set *uset, __isl_take isl_union_map *umap); - -int isl_union_set_is_params(__isl_keep isl_union_set *uset); -__isl_export -int isl_union_set_is_empty(__isl_keep isl_union_set *uset); - -__isl_export -int isl_union_set_is_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); -__isl_export -int isl_union_set_is_equal(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); -__isl_export -int isl_union_set_is_strict_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2); - -int isl_union_set_n_set(__isl_keep isl_union_set *uset); -__isl_export -int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_set *set, void *user), void *user); -__isl_give int isl_union_set_contains(__isl_keep isl_union_set *uset, - __isl_keep isl_space *dim); -__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset, - __isl_take isl_space *dim); -__isl_give isl_set *isl_set_from_union_set(__isl_take isl_union_set *uset); -int isl_union_set_foreach_point(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user); - -__isl_give isl_basic_set *isl_union_set_sample(__isl_take isl_union_set *uset); - -__isl_give isl_union_set *isl_union_set_lift(__isl_take isl_union_set *uset); - -__isl_give isl_union_map *isl_union_set_lex_lt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_map *isl_union_set_lex_le_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_map *isl_union_set_lex_gt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); -__isl_give isl_union_map *isl_union_set_lex_ge_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); - -__isl_give isl_union_set *isl_union_set_coefficients( - __isl_take isl_union_set *bset); -__isl_give isl_union_set *isl_union_set_solutions( - __isl_take isl_union_set *bset); - -__isl_give isl_union_set *isl_union_set_read_from_file(isl_ctx *ctx, - FILE *input); -__isl_constructor -__isl_give isl_union_set *isl_union_set_read_from_str(isl_ctx *ctx, - const char *str); -__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p, - __isl_keep isl_union_set *uset); -void isl_union_set_dump(__isl_keep isl_union_set *uset); - -#if defined(__cplusplus) -} -#endif - -#include - -#endif diff --git a/cloog-0.17.0/isl/include/isl/vec.h b/cloog-0.17.0/isl/include/isl/vec.h deleted file mode 100644 index eb9a7e28e7ffb999689a00515984f083a11d6f90..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/vec.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_VEC_H -#define ISL_VEC_H - -#include - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_vec { - int ref; - - struct isl_ctx *ctx; - - unsigned size; - isl_int *el; - - struct isl_blk block; -}; -typedef struct isl_vec isl_vec; - -struct isl_vec *isl_vec_alloc(struct isl_ctx *ctx, unsigned size); -struct isl_vec *isl_vec_copy(struct isl_vec *vec); -struct isl_vec *isl_vec_cow(struct isl_vec *vec); -void isl_vec_free(struct isl_vec *vec); - -isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec); - -int isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2); - -void isl_vec_dump(__isl_keep isl_vec *vec); -__isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer, - __isl_keep isl_vec *vec); - -void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm); -struct isl_vec *isl_vec_ceil(struct isl_vec *vec); -struct isl_vec *isl_vec_normalize(struct isl_vec *vec); -__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec); -__isl_give isl_vec *isl_vec_neg(__isl_take isl_vec *vec); -__isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m); -__isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1, - __isl_take isl_vec *vec2); -__isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size); -__isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size); - -__isl_give isl_vec *isl_vec_sort(__isl_take isl_vec *vec); - -__isl_give isl_vec *isl_vec_read_from_file(isl_ctx *ctx, FILE *input); - -__isl_give isl_vec *isl_vec_drop_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n); -__isl_give isl_vec *isl_vec_insert_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n); -__isl_give isl_vec *isl_vec_insert_zero_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/version.h b/cloog-0.17.0/isl/include/isl/version.h deleted file mode 100644 index 7f8f23d69451b45b41bbef0f089cc8efba4b7298..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/version.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef ISL_VERSION_H -#define ISL_VERSION_H - -#if defined(__cplusplus) -extern "C" { -#endif - -const char *isl_version(void); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/include/isl/vertices.h b/cloog-0.17.0/isl/include/isl/vertices.h deleted file mode 100644 index 3e8460d65954fff23d2450f61adf15ff34d7ed56..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/include/isl/vertices.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef ISL_VERTICES_H -#define ISL_VERTICES_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_external_vertex; -typedef struct isl_external_vertex isl_vertex; - -struct isl_cell; -typedef struct isl_cell isl_cell; - -struct isl_vertices; -typedef struct isl_vertices isl_vertices; - -isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex); -int isl_vertex_get_id(__isl_keep isl_vertex *vertex); -__isl_give isl_basic_set *isl_vertex_get_domain(__isl_keep isl_vertex *vertex); -__isl_give isl_basic_set *isl_vertex_get_expr(__isl_keep isl_vertex *vertex); -void isl_vertex_free(__isl_take isl_vertex *vertex); - -__isl_give isl_vertices *isl_basic_set_compute_vertices( - __isl_keep isl_basic_set *bset); -isl_ctx *isl_vertices_get_ctx(__isl_keep isl_vertices *vertices); -int isl_vertices_get_n_vertices(__isl_keep isl_vertices *vertices); -int isl_vertices_foreach_vertex(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user); -void isl_vertices_free(__isl_take isl_vertices *vertices); - -isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell); -__isl_give isl_basic_set *isl_cell_get_domain(__isl_keep isl_cell *cell); -int isl_cell_foreach_vertex(__isl_keep isl_cell *cell, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user); -void isl_cell_free(__isl_take isl_cell *cell); - -int isl_vertices_foreach_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/install-sh b/cloog-0.17.0/isl/install-sh deleted file mode 100755 index 6781b987bdbcbc23efe6bbe1654a1e3637b9af07..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/isl/interface/Makefile.am b/cloog-0.17.0/isl/interface/Makefile.am deleted file mode 100644 index 89644b9984cbe94cc940f64fa94a1bf51738ea39..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -AUTOMAKE_OPTIONS = nostdinc - -noinst_PROGRAMS = extract_interface - -AM_CXXFLAGS = $(CLANG_CXXFLAGS) -AM_LDFLAGS = $(CLANG_LDFLAGS) - -INCLUDES = -I$(top_builddir) -I$(top_srcdir) \ - -I$(top_builddir)/include -I$(top_srcdir)/include - -extract_interface_SOURCES = \ - python.h \ - python.cc \ - extract_interface.h \ - extract_interface.cc -extract_interface_LDADD = \ - -lclangFrontend -lclangSerialization -lclangParse -lclangSema \ - -lclangAnalysis -lclangAST -lclangLex -lclangBasic -lclangDriver \ - $(CLANG_LIBS) $(CLANG_LDFLAGS) - -test: extract_interface - ./extract_interface$(EXEEXT) $(INCLUDES) $(srcdir)/all.h - -isl.py: extract_interface isl.py.top - (cat $(srcdir)/isl.py.top; \ - ./extract_interface$(EXEEXT) $(INCLUDES) $(srcdir)/all.h) \ - > isl.py - -dist-hook: isl.py - cp isl.py $(distdir)/ diff --git a/cloog-0.17.0/isl/interface/Makefile.in b/cloog-0.17.0/isl/interface/Makefile.in deleted file mode 100644 index dc65cbf85ab08eda9362f74cbe5a8f7ccb993291..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/Makefile.in +++ /dev/null @@ -1,575 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = extract_interface$(EXEEXT) -subdir = interface -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/m4/ax_detect_git_head.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_warn_unused_result.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_set_warning_flags.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/isl_config.h \ - $(top_builddir)/include/isl/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_extract_interface_OBJECTS = python.$(OBJEXT) \ - extract_interface.$(OBJEXT) -extract_interface_OBJECTS = $(am_extract_interface_OBJECTS) -am__DEPENDENCIES_1 = -extract_interface_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) -am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CXXLD_0 = @echo " CXXLD " $@; -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(extract_interface_SOURCES) -DIST_SOURCES = $(extract_interface_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CLANG_CXXFLAGS = @CLANG_CXXFLAGS@ -CLANG_LDFLAGS = @CLANG_LDFLAGS@ -CLANG_LIBS = @CLANG_LIBS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_HEAD = @GIT_HEAD@ -GIT_HEAD_ID = @GIT_HEAD_ID@ -GIT_HEAD_VERSION = @GIT_HEAD_VERSION@ -GMP_CPPFLAGS = @GMP_CPPFLAGS@ -GMP_LDFLAGS = @GMP_LDFLAGS@ -GMP_LIBS = @GMP_LIBS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFLATEX = @PDFLATEX@ -PERL = @PERL@ -PIPLIB_CPPFLAGS = @PIPLIB_CPPFLAGS@ -PIPLIB_LDFLAGS = @PIPLIB_LDFLAGS@ -PIPLIB_LIBS = @PIPLIB_LIBS@ -POD2HTML = @POD2HTML@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -WARNING_FLAGS = @WARNING_FLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -llvm_config_found = @llvm_config_found@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -AUTOMAKE_OPTIONS = nostdinc -AM_CXXFLAGS = $(CLANG_CXXFLAGS) -AM_LDFLAGS = $(CLANG_LDFLAGS) -INCLUDES = -I$(top_builddir) -I$(top_srcdir) \ - -I$(top_builddir)/include -I$(top_srcdir)/include - -extract_interface_SOURCES = \ - python.h \ - python.cc \ - extract_interface.h \ - extract_interface.cc - -extract_interface_LDADD = \ - -lclangFrontend -lclangSerialization -lclangParse -lclangSema \ - -lclangAnalysis -lclangAST -lclangLex -lclangBasic -lclangDriver \ - $(CLANG_LIBS) $(CLANG_LDFLAGS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cc .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign interface/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign interface/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -extract_interface$(EXEEXT): $(extract_interface_OBJECTS) $(extract_interface_DEPENDENCIES) - @rm -f extract_interface$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(extract_interface_OBJECTS) $(extract_interface_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract_interface.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/python.Po@am__quote@ - -.cc.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags dist-hook distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -test: extract_interface - ./extract_interface$(EXEEXT) $(INCLUDES) $(srcdir)/all.h - -isl.py: extract_interface isl.py.top - (cat $(srcdir)/isl.py.top; \ - ./extract_interface$(EXEEXT) $(INCLUDES) $(srcdir)/all.h) \ - > isl.py - -dist-hook: isl.py - cp isl.py $(distdir)/ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/isl/interface/extract_interface.cc b/cloog-0.17.0/isl/interface/extract_interface.cc deleted file mode 100644 index b2126a3d77c24defde8accd83831b315d584eb2c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/extract_interface.cc +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright 2011 Sven Verdoolaege. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY SVEN VERDOOLAEGE ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SVEN VERDOOLAEGE OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation - * are those of the authors and should not be interpreted as - * representing official policies, either expressed or implied, of - * Sven Verdoolaege. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "isl_config.h" -#include "extract_interface.h" -#include "python.h" - -using namespace std; -using namespace clang; -using namespace clang::driver; - -static llvm::cl::opt InputFilename(llvm::cl::Positional, - llvm::cl::Required, llvm::cl::desc("")); -static llvm::cl::list Includes("I", - llvm::cl::desc("Header search path"), - llvm::cl::value_desc("path"), llvm::cl::Prefix); - -static const char *ResourceDir = CLANG_PREFIX"/lib/clang/"CLANG_VERSION_STRING; - -/* Does decl have an attribute of the following form? - * - * __attribute__((annotate("name"))) - */ -bool has_annotation(Decl *decl, const char *name) -{ - if (!decl->hasAttrs()) - return false; - - AttrVec attrs = decl->getAttrs(); - for (AttrVec::const_iterator i = attrs.begin() ; i != attrs.end(); ++i) { - const AnnotateAttr *ann = dyn_cast(*i); - if (!ann) - continue; - if (ann->getAnnotation().str() == name) - return true; - } - - return false; -} - -/* Is decl marked as exported? - */ -static bool is_exported(Decl *decl) -{ - return has_annotation(decl, "isl_export"); -} - -/* Collect all types and functions that are annotated "isl_export" - * in "types" and "function". - * - * We currently only consider single declarations. - */ -struct MyASTConsumer : public ASTConsumer { - set types; - set functions; - - virtual void HandleTopLevelDecl(DeclGroupRef D) { - Decl *decl; - - if (!D.isSingleDecl()) - return; - decl = D.getSingleDecl(); - if (!is_exported(decl)) - return; - switch (decl->getKind()) { - case Decl::Record: - types.insert(cast(decl)); - break; - case Decl::Function: - functions.insert(cast(decl)); - break; - default: - break; - } - } -}; - -#ifdef USE_ARRAYREF - -#ifdef HAVE_CXXISPRODUCTION -static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags) -{ - return new Driver(binary, llvm::sys::getDefaultTargetTriple(), - "", false, false, Diags); -} -#else -static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags) -{ - return new Driver(binary, llvm::sys::getDefaultTargetTriple(), - "", false, Diags); -} -#endif - -/* Create a CompilerInvocation object that stores the command line - * arguments constructed by the driver. - * The arguments are mainly useful for setting up the system include - * paths on newer clangs and on some platforms. - */ -static CompilerInvocation *construct_invocation(const char *filename, - DiagnosticsEngine &Diags) -{ - const char *binary = CLANG_PREFIX"/bin/clang"; - const llvm::OwningPtr driver(construct_driver(binary, Diags)); - std::vector Argv; - Argv.push_back(binary); - Argv.push_back(filename); - const llvm::OwningPtr compilation( - driver->BuildCompilation(llvm::ArrayRef(Argv))); - JobList &Jobs = compilation->getJobs(); - - Command *cmd = cast(*Jobs.begin()); - if (strcmp(cmd->getCreator().getName(), "clang")) - return NULL; - - const ArgStringList *args = &cmd->getArguments(); - - CompilerInvocation *invocation = new CompilerInvocation; - CompilerInvocation::CreateFromArgs(*invocation, args->data() + 1, - args->data() + args->size(), - Diags); - return invocation; -} - -#else - -static CompilerInvocation *construct_invocation(const char *filename, - DiagnosticsEngine &Diags) -{ - return NULL; -} - -#endif - -int main(int argc, char *argv[]) -{ - llvm::cl::ParseCommandLineOptions(argc, argv); - - CompilerInstance *Clang = new CompilerInstance(); - DiagnosticOptions DO; - Clang->createDiagnostics(0, NULL, - new TextDiagnosticPrinter(llvm::errs(), DO)); - DiagnosticsEngine &Diags = Clang->getDiagnostics(); - Diags.setSuppressSystemWarnings(true); - CompilerInvocation *invocation = - construct_invocation(InputFilename.c_str(), Diags); - if (invocation) - Clang->setInvocation(invocation); - Clang->createFileManager(); - Clang->createSourceManager(Clang->getFileManager()); - TargetOptions TO; - TO.Triple = llvm::sys::getDefaultTargetTriple(); - TargetInfo *target = TargetInfo::CreateTargetInfo(Diags, TO); - Clang->setTarget(target); - CompilerInvocation::setLangDefaults(Clang->getLangOpts(), IK_C, - LangStandard::lang_unspecified); - HeaderSearchOptions &HSO = Clang->getHeaderSearchOpts(); - LangOptions &LO = Clang->getLangOpts(); - PreprocessorOptions &PO = Clang->getPreprocessorOpts(); - HSO.ResourceDir = ResourceDir; - - for (int i = 0; i < Includes.size(); ++i) - HSO.AddPath(Includes[i], frontend::Angled, true, false, false); - - PO.addMacroDef("__isl_give=__attribute__((annotate(\"isl_give\")))"); - PO.addMacroDef("__isl_keep=__attribute__((annotate(\"isl_keep\")))"); - PO.addMacroDef("__isl_take=__attribute__((annotate(\"isl_take\")))"); - PO.addMacroDef("__isl_export=__attribute__((annotate(\"isl_export\")))"); - PO.addMacroDef("__isl_constructor=__attribute__((annotate(\"isl_constructor\"))) __attribute__((annotate(\"isl_export\")))"); - PO.addMacroDef("__isl_subclass(super)=__attribute__((annotate(\"isl_subclass(\" #super \")\"))) __attribute__((annotate(\"isl_export\")))"); - - Clang->createPreprocessor(); - Preprocessor &PP = Clang->getPreprocessor(); - - PP.getBuiltinInfo().InitializeBuiltins(PP.getIdentifierTable(), LO); - - const FileEntry *file = Clang->getFileManager().getFile(InputFilename); - assert(file); - Clang->getSourceManager().createMainFileID(file); - - Clang->createASTContext(); - MyASTConsumer consumer; - Sema *sema = new Sema(PP, Clang->getASTContext(), consumer); - - Diags.getClient()->BeginSourceFile(LO, &PP); - ParseAST(*sema); - Diags.getClient()->EndSourceFile(); - - generate_python(consumer.types, consumer.functions); - - delete sema; - delete Clang; - llvm::llvm_shutdown(); - - return 0; -} diff --git a/cloog-0.17.0/isl/interface/extract_interface.h b/cloog-0.17.0/isl/interface/extract_interface.h deleted file mode 100644 index b6788f1343dfd699f3aaa5c43185788fd71431fb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/extract_interface.h +++ /dev/null @@ -1,3 +0,0 @@ -#include - -bool has_annotation(clang::Decl *decl, const char *name); diff --git a/cloog-0.17.0/isl/interface/isl.py b/cloog-0.17.0/isl/interface/isl.py deleted file mode 100644 index 98eeb47d712754a0ba9725f63b9b4f6e2e1d9f85..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/isl.py +++ /dev/null @@ -1,1091 +0,0 @@ -from ctypes import * - -isl = cdll.LoadLibrary("libisl.so") -libc = cdll.LoadLibrary("libc.so.6") - -class Error(Exception): - pass - -class Context: - defaultInstance = None - - def __init__(self): - ptr = isl.isl_ctx_alloc() - self.ptr = ptr - - def __del__(self): - isl.isl_ctx_free(self) - - def from_param(self): - return self.ptr - - @staticmethod - def getDefaultInstance(): - if Context.defaultInstance == None: - Context.defaultInstance = Context() - return Context.defaultInstance - -isl.isl_ctx_alloc.restype = c_void_p -isl.isl_ctx_free.argtypes = [Context] - -class union_map: - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - if len(args) == 1 and args[0].__class__ is map: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_union_map_from_map(isl.isl_map_copy(args[0].ptr)) - return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_union_map_read_from_str(self.ctx, args[0]) - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_union_map_free(self.ptr) - def __str__(self): - ptr = isl.isl_union_map_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.union_map("%s")' % str(self) - def affine_hull(self): - res = isl.isl_union_map_affine_hull(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def polyhedral_hull(self): - res = isl.isl_union_map_polyhedral_hull(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def coalesce(self): - res = isl.isl_union_map_coalesce(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def lexmin(self): - res = isl.isl_union_map_lexmin(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_union_map_lexmax(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def union(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_union(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def subtract(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_subtract(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def intersect(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_intersect(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def intersect_params(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - raise - res = isl.isl_union_map_intersect_params(isl.isl_union_map_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def gist(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_gist(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def gist_params(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - raise - res = isl.isl_union_map_gist_params(isl.isl_union_map_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def gist_domain(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_map_gist_domain(isl.isl_union_map_copy(self.ptr), isl.isl_union_set_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def intersect_domain(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_map_intersect_domain(isl.isl_union_map_copy(self.ptr), isl.isl_union_set_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def intersect_range(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_map_intersect_range(isl.isl_union_map_copy(self.ptr), isl.isl_union_set_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def apply_domain(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_apply_domain(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def apply_range(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_apply_range(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def reverse(self): - res = isl.isl_union_map_reverse(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_union_map_detect_equalities(self.ptr) - return union_map(ctx=self.ctx, ptr=res) - def deltas(self): - res = isl.isl_union_map_deltas(isl.isl_union_map_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def is_empty(self): - res = isl.isl_union_map_is_empty(self.ptr) - return res - def is_single_valued(self): - res = isl.isl_union_map_is_single_valued(self.ptr) - return res - def is_injective(self): - res = isl.isl_union_map_is_injective(self.ptr) - return res - def is_bijective(self): - res = isl.isl_union_map_is_bijective(self.ptr) - return res - def is_subset(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_is_subset(self.ptr, arg1.ptr) - return res - def is_equal(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_is_equal(self.ptr, arg1.ptr) - return res - def is_strict_subset(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_is_strict_subset(self.ptr, arg1.ptr) - return res - def foreach_map(self, arg1): - exc_info = [None] - fn = CFUNCTYPE(c_int, c_void_p, c_void_p) - def cb_func(cb_arg0, cb_arg1): - cb_arg0 = map(ctx=self.ctx, ptr=cb_arg0) - try: - arg1(cb_arg0) - except: - import sys - exc_info[0] = sys.exc_info() - return -1 - return 0 - cb = fn(cb_func) - res = isl.isl_union_map_foreach_map(self.ptr, cb, None) - if exc_info[0] != None: - raise exc_info[0][0], exc_info[0][1], exc_info[0][2] - return res - -isl.isl_union_map_from_map.restype = c_void_p -isl.isl_union_map_from_map.argtypes = [c_void_p] -isl.isl_union_map_read_from_str.restype = c_void_p -isl.isl_union_map_read_from_str.argtypes = [Context, c_char_p] -isl.isl_union_map_affine_hull.restype = c_void_p -isl.isl_union_map_polyhedral_hull.restype = c_void_p -isl.isl_union_map_coalesce.restype = c_void_p -isl.isl_union_map_lexmin.restype = c_void_p -isl.isl_union_map_lexmax.restype = c_void_p -isl.isl_union_map_union.restype = c_void_p -isl.isl_union_map_subtract.restype = c_void_p -isl.isl_union_map_intersect.restype = c_void_p -isl.isl_union_map_intersect_params.restype = c_void_p -isl.isl_union_map_gist.restype = c_void_p -isl.isl_union_map_gist_params.restype = c_void_p -isl.isl_union_map_gist_domain.restype = c_void_p -isl.isl_union_map_intersect_domain.restype = c_void_p -isl.isl_union_map_intersect_range.restype = c_void_p -isl.isl_union_map_apply_domain.restype = c_void_p -isl.isl_union_map_apply_range.restype = c_void_p -isl.isl_union_map_reverse.restype = c_void_p -isl.isl_union_map_detect_equalities.restype = c_void_p -isl.isl_union_map_deltas.restype = c_void_p -isl.isl_union_map_free.argtypes = [c_void_p] -isl.isl_union_map_to_str.argtypes = [c_void_p] -isl.isl_union_map_to_str.restype = POINTER(c_char) - -class map(union_map): - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_map_read_from_str(self.ctx, args[0]) - return - if len(args) == 1 and args[0].__class__ is basic_map: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_map_from_basic_map(isl.isl_basic_map_copy(args[0].ptr)) - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_map_free(self.ptr) - def __str__(self): - ptr = isl.isl_map_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.map("%s")' % str(self) - def lexmin(self): - res = isl.isl_map_lexmin(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_map_lexmax(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def reverse(self): - res = isl.isl_map_reverse(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def union(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).union(arg1) - res = isl.isl_map_union(isl.isl_map_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def intersect_domain(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_map(self).intersect_domain(arg1) - res = isl.isl_map_intersect_domain(isl.isl_map_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def intersect_range(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_map(self).intersect_range(arg1) - res = isl.isl_map_intersect_range(isl.isl_map_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def apply_domain(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).apply_domain(arg1) - res = isl.isl_map_apply_domain(isl.isl_map_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def apply_range(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).apply_range(arg1) - res = isl.isl_map_apply_range(isl.isl_map_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def intersect(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).intersect(arg1) - res = isl.isl_map_intersect(isl.isl_map_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def intersect_params(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_map(self).intersect_params(arg1) - res = isl.isl_map_intersect_params(isl.isl_map_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def subtract(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).subtract(arg1) - res = isl.isl_map_subtract(isl.isl_map_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def deltas(self): - res = isl.isl_map_deltas(isl.isl_map_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_map_detect_equalities(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def affine_hull(self): - res = isl.isl_map_affine_hull(isl.isl_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def polyhedral_hull(self): - res = isl.isl_map_polyhedral_hull(isl.isl_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def flatten(self): - res = isl.isl_map_flatten(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def flatten_domain(self): - res = isl.isl_map_flatten_domain(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def flatten_range(self): - res = isl.isl_map_flatten_range(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def sample(self): - res = isl.isl_map_sample(isl.isl_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def is_empty(self): - res = isl.isl_map_is_empty(self.ptr) - return res - def is_subset(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).is_subset(arg1) - res = isl.isl_map_is_subset(self.ptr, arg1.ptr) - return res - def is_strict_subset(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).is_strict_subset(arg1) - res = isl.isl_map_is_strict_subset(self.ptr, arg1.ptr) - return res - def is_equal(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).is_equal(arg1) - res = isl.isl_map_is_equal(self.ptr, arg1.ptr) - return res - def is_single_valued(self): - res = isl.isl_map_is_single_valued(self.ptr) - return res - def is_injective(self): - res = isl.isl_map_is_injective(self.ptr) - return res - def is_bijective(self): - res = isl.isl_map_is_bijective(self.ptr) - return res - def gist(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_map(self).gist(arg1) - res = isl.isl_map_gist(isl.isl_map_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def gist_domain(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_map(self).gist_domain(arg1) - res = isl.isl_map_gist_domain(isl.isl_map_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def coalesce(self): - res = isl.isl_map_coalesce(isl.isl_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def foreach_basic_map(self, arg1): - exc_info = [None] - fn = CFUNCTYPE(c_int, c_void_p, c_void_p) - def cb_func(cb_arg0, cb_arg1): - cb_arg0 = basic_map(ctx=self.ctx, ptr=cb_arg0) - try: - arg1(cb_arg0) - except: - import sys - exc_info[0] = sys.exc_info() - return -1 - return 0 - cb = fn(cb_func) - res = isl.isl_map_foreach_basic_map(self.ptr, cb, None) - if exc_info[0] != None: - raise exc_info[0][0], exc_info[0][1], exc_info[0][2] - return res - -isl.isl_map_read_from_str.restype = c_void_p -isl.isl_map_read_from_str.argtypes = [Context, c_char_p] -isl.isl_map_from_basic_map.restype = c_void_p -isl.isl_map_from_basic_map.argtypes = [c_void_p] -isl.isl_map_lexmin.restype = c_void_p -isl.isl_map_lexmax.restype = c_void_p -isl.isl_map_reverse.restype = c_void_p -isl.isl_map_union.restype = c_void_p -isl.isl_map_intersect_domain.restype = c_void_p -isl.isl_map_intersect_range.restype = c_void_p -isl.isl_map_apply_domain.restype = c_void_p -isl.isl_map_apply_range.restype = c_void_p -isl.isl_map_intersect.restype = c_void_p -isl.isl_map_intersect_params.restype = c_void_p -isl.isl_map_subtract.restype = c_void_p -isl.isl_map_deltas.restype = c_void_p -isl.isl_map_detect_equalities.restype = c_void_p -isl.isl_map_affine_hull.restype = c_void_p -isl.isl_map_polyhedral_hull.restype = c_void_p -isl.isl_map_flatten.restype = c_void_p -isl.isl_map_flatten_domain.restype = c_void_p -isl.isl_map_flatten_range.restype = c_void_p -isl.isl_map_sample.restype = c_void_p -isl.isl_map_gist.restype = c_void_p -isl.isl_map_gist_domain.restype = c_void_p -isl.isl_map_coalesce.restype = c_void_p -isl.isl_map_free.argtypes = [c_void_p] -isl.isl_map_to_str.argtypes = [c_void_p] -isl.isl_map_to_str.restype = POINTER(c_char) - -class basic_map(map): - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_basic_map_read_from_str(self.ctx, args[0]) - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_basic_map_free(self.ptr) - def __str__(self): - ptr = isl.isl_basic_map_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.basic_map("%s")' % str(self) - def intersect_domain(self, arg1): - try: - if not arg1.__class__ is basic_set: - arg1 = basic_set(arg1) - except: - return map(self).intersect_domain(arg1) - res = isl.isl_basic_map_intersect_domain(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_set_copy(arg1.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def intersect_range(self, arg1): - try: - if not arg1.__class__ is basic_set: - arg1 = basic_set(arg1) - except: - return map(self).intersect_range(arg1) - res = isl.isl_basic_map_intersect_range(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_set_copy(arg1.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def intersect(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return map(self).intersect(arg1) - res = isl.isl_basic_map_intersect(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_map_copy(arg1.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def union(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return map(self).union(arg1) - res = isl.isl_basic_map_union(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_map_copy(arg1.ptr)) - return map(ctx=self.ctx, ptr=res) - def apply_domain(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return map(self).apply_domain(arg1) - res = isl.isl_basic_map_apply_domain(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_map_copy(arg1.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def apply_range(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return map(self).apply_range(arg1) - res = isl.isl_basic_map_apply_range(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_map_copy(arg1.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def affine_hull(self): - res = isl.isl_basic_map_affine_hull(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def reverse(self): - res = isl.isl_basic_map_reverse(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def sample(self): - res = isl.isl_basic_map_sample(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_basic_map_detect_equalities(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def is_equal(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return map(self).is_equal(arg1) - res = isl.isl_basic_map_is_equal(self.ptr, arg1.ptr) - return res - def lexmin(self): - res = isl.isl_basic_map_lexmin(isl.isl_basic_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_basic_map_lexmax(isl.isl_basic_map_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def is_empty(self): - res = isl.isl_basic_map_is_empty(self.ptr) - return res - def deltas(self): - res = isl.isl_basic_map_deltas(isl.isl_basic_map_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def flatten(self): - res = isl.isl_basic_map_flatten(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def flatten_domain(self): - res = isl.isl_basic_map_flatten_domain(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def flatten_range(self): - res = isl.isl_basic_map_flatten_range(isl.isl_basic_map_copy(self.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - def gist(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return map(self).gist(arg1) - res = isl.isl_basic_map_gist(isl.isl_basic_map_copy(self.ptr), isl.isl_basic_map_copy(arg1.ptr)) - return basic_map(ctx=self.ctx, ptr=res) - -isl.isl_basic_map_read_from_str.restype = c_void_p -isl.isl_basic_map_read_from_str.argtypes = [Context, c_char_p] -isl.isl_basic_map_intersect_domain.restype = c_void_p -isl.isl_basic_map_intersect_range.restype = c_void_p -isl.isl_basic_map_intersect.restype = c_void_p -isl.isl_basic_map_union.restype = c_void_p -isl.isl_basic_map_apply_domain.restype = c_void_p -isl.isl_basic_map_apply_range.restype = c_void_p -isl.isl_basic_map_affine_hull.restype = c_void_p -isl.isl_basic_map_reverse.restype = c_void_p -isl.isl_basic_map_sample.restype = c_void_p -isl.isl_basic_map_detect_equalities.restype = c_void_p -isl.isl_basic_map_lexmin.restype = c_void_p -isl.isl_basic_map_lexmax.restype = c_void_p -isl.isl_basic_map_deltas.restype = c_void_p -isl.isl_basic_map_flatten.restype = c_void_p -isl.isl_basic_map_flatten_domain.restype = c_void_p -isl.isl_basic_map_flatten_range.restype = c_void_p -isl.isl_basic_map_gist.restype = c_void_p -isl.isl_basic_map_free.argtypes = [c_void_p] -isl.isl_basic_map_to_str.argtypes = [c_void_p] -isl.isl_basic_map_to_str.restype = POINTER(c_char) - -class union_set: - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - if len(args) == 1 and args[0].__class__ is set: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_union_set_from_set(isl.isl_set_copy(args[0].ptr)) - return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_union_set_read_from_str(self.ctx, args[0]) - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_union_set_free(self.ptr) - def __str__(self): - ptr = isl.isl_union_set_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.union_set("%s")' % str(self) - def identity(self): - res = isl.isl_union_set_identity(isl.isl_union_set_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_union_set_detect_equalities(isl.isl_union_set_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def affine_hull(self): - res = isl.isl_union_set_affine_hull(isl.isl_union_set_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def polyhedral_hull(self): - res = isl.isl_union_set_polyhedral_hull(isl.isl_union_set_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def coalesce(self): - res = isl.isl_union_set_coalesce(isl.isl_union_set_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def lexmin(self): - res = isl.isl_union_set_lexmin(isl.isl_union_set_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_union_set_lexmax(isl.isl_union_set_copy(self.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def subtract(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_set_subtract(isl.isl_union_set_copy(self.ptr), isl.isl_union_set_copy(arg1.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def intersect(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_set_intersect(isl.isl_union_set_copy(self.ptr), isl.isl_union_set_copy(arg1.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def intersect_params(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - raise - res = isl.isl_union_set_intersect_params(isl.isl_union_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def gist(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_set_gist(isl.isl_union_set_copy(self.ptr), isl.isl_union_set_copy(arg1.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def gist_params(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - raise - res = isl.isl_union_set_gist_params(isl.isl_union_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def apply(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_set_apply(isl.isl_union_set_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) - return union_set(ctx=self.ctx, ptr=res) - def is_empty(self): - res = isl.isl_union_set_is_empty(self.ptr) - return res - def is_subset(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_set_is_subset(self.ptr, arg1.ptr) - return res - def is_equal(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_set_is_equal(self.ptr, arg1.ptr) - return res - def is_strict_subset(self, arg1): - try: - if not arg1.__class__ is union_set: - arg1 = union_set(arg1) - except: - raise - res = isl.isl_union_set_is_strict_subset(self.ptr, arg1.ptr) - return res - def foreach_set(self, arg1): - exc_info = [None] - fn = CFUNCTYPE(c_int, c_void_p, c_void_p) - def cb_func(cb_arg0, cb_arg1): - cb_arg0 = set(ctx=self.ctx, ptr=cb_arg0) - try: - arg1(cb_arg0) - except: - import sys - exc_info[0] = sys.exc_info() - return -1 - return 0 - cb = fn(cb_func) - res = isl.isl_union_set_foreach_set(self.ptr, cb, None) - if exc_info[0] != None: - raise exc_info[0][0], exc_info[0][1], exc_info[0][2] - return res - -isl.isl_union_set_from_set.restype = c_void_p -isl.isl_union_set_from_set.argtypes = [c_void_p] -isl.isl_union_set_read_from_str.restype = c_void_p -isl.isl_union_set_read_from_str.argtypes = [Context, c_char_p] -isl.isl_union_set_identity.restype = c_void_p -isl.isl_union_set_detect_equalities.restype = c_void_p -isl.isl_union_set_affine_hull.restype = c_void_p -isl.isl_union_set_polyhedral_hull.restype = c_void_p -isl.isl_union_set_coalesce.restype = c_void_p -isl.isl_union_set_lexmin.restype = c_void_p -isl.isl_union_set_lexmax.restype = c_void_p -isl.isl_union_set_subtract.restype = c_void_p -isl.isl_union_set_intersect.restype = c_void_p -isl.isl_union_set_intersect_params.restype = c_void_p -isl.isl_union_set_gist.restype = c_void_p -isl.isl_union_set_gist_params.restype = c_void_p -isl.isl_union_set_apply.restype = c_void_p -isl.isl_union_set_free.argtypes = [c_void_p] -isl.isl_union_set_to_str.argtypes = [c_void_p] -isl.isl_union_set_to_str.restype = POINTER(c_char) - -class set(union_set): - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_set_read_from_str(self.ctx, args[0]) - return - if len(args) == 1 and args[0].__class__ is basic_set: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_set_from_basic_set(isl.isl_basic_set_copy(args[0].ptr)) - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_set_free(self.ptr) - def __str__(self): - ptr = isl.isl_set_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.set("%s")' % str(self) - def intersect(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).intersect(arg1) - res = isl.isl_set_intersect(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def intersect_params(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).intersect_params(arg1) - res = isl.isl_set_intersect_params(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def subtract(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).subtract(arg1) - res = isl.isl_set_subtract(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def complement(self): - res = isl.isl_set_complement(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def apply(self, arg1): - try: - if not arg1.__class__ is map: - arg1 = map(arg1) - except: - return union_set(self).apply(arg1) - res = isl.isl_set_apply(isl.isl_set_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def is_empty(self): - res = isl.isl_set_is_empty(self.ptr) - return res - def is_subset(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).is_subset(arg1) - res = isl.isl_set_is_subset(self.ptr, arg1.ptr) - return res - def is_strict_subset(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).is_strict_subset(arg1) - res = isl.isl_set_is_strict_subset(self.ptr, arg1.ptr) - return res - def is_equal(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).is_equal(arg1) - res = isl.isl_set_is_equal(self.ptr, arg1.ptr) - return res - def gist(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).gist(arg1) - res = isl.isl_set_gist(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def coalesce(self): - res = isl.isl_set_coalesce(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def foreach_basic_set(self, arg1): - exc_info = [None] - fn = CFUNCTYPE(c_int, c_void_p, c_void_p) - def cb_func(cb_arg0, cb_arg1): - cb_arg0 = basic_set(ctx=self.ctx, ptr=cb_arg0) - try: - arg1(cb_arg0) - except: - import sys - exc_info[0] = sys.exc_info() - return -1 - return 0 - cb = fn(cb_func) - res = isl.isl_set_foreach_basic_set(self.ptr, cb, None) - if exc_info[0] != None: - raise exc_info[0][0], exc_info[0][1], exc_info[0][2] - return res - def lexmin(self): - res = isl.isl_set_lexmin(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_set_lexmax(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_set_detect_equalities(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def affine_hull(self): - res = isl.isl_set_affine_hull(isl.isl_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def polyhedral_hull(self): - res = isl.isl_set_polyhedral_hull(isl.isl_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def union(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).union(arg1) - res = isl.isl_set_union(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def identity(self): - res = isl.isl_set_identity(isl.isl_set_copy(self.ptr)) - return map(ctx=self.ctx, ptr=res) - def is_wrapping(self): - res = isl.isl_set_is_wrapping(self.ptr) - return res - def flatten(self): - res = isl.isl_set_flatten(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - -isl.isl_set_read_from_str.restype = c_void_p -isl.isl_set_read_from_str.argtypes = [Context, c_char_p] -isl.isl_set_from_basic_set.restype = c_void_p -isl.isl_set_from_basic_set.argtypes = [c_void_p] -isl.isl_set_intersect.restype = c_void_p -isl.isl_set_intersect_params.restype = c_void_p -isl.isl_set_subtract.restype = c_void_p -isl.isl_set_complement.restype = c_void_p -isl.isl_set_apply.restype = c_void_p -isl.isl_set_gist.restype = c_void_p -isl.isl_set_coalesce.restype = c_void_p -isl.isl_set_lexmin.restype = c_void_p -isl.isl_set_lexmax.restype = c_void_p -isl.isl_set_detect_equalities.restype = c_void_p -isl.isl_set_affine_hull.restype = c_void_p -isl.isl_set_polyhedral_hull.restype = c_void_p -isl.isl_set_union.restype = c_void_p -isl.isl_set_identity.restype = c_void_p -isl.isl_set_flatten.restype = c_void_p -isl.isl_set_free.argtypes = [c_void_p] -isl.isl_set_to_str.argtypes = [c_void_p] -isl.isl_set_to_str.restype = POINTER(c_char) - -class basic_set(set): - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_basic_set_read_from_str(self.ctx, args[0]) - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_basic_set_free(self.ptr) - def __str__(self): - ptr = isl.isl_basic_set_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.basic_set("%s")' % str(self) - def gist(self, arg1): - try: - if not arg1.__class__ is basic_set: - arg1 = basic_set(arg1) - except: - return set(self).gist(arg1) - res = isl.isl_basic_set_gist(isl.isl_basic_set_copy(self.ptr), isl.isl_basic_set_copy(arg1.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def intersect(self, arg1): - try: - if not arg1.__class__ is basic_set: - arg1 = basic_set(arg1) - except: - return set(self).intersect(arg1) - res = isl.isl_basic_set_intersect(isl.isl_basic_set_copy(self.ptr), isl.isl_basic_set_copy(arg1.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def intersect_params(self, arg1): - try: - if not arg1.__class__ is basic_set: - arg1 = basic_set(arg1) - except: - return set(self).intersect_params(arg1) - res = isl.isl_basic_set_intersect_params(isl.isl_basic_set_copy(self.ptr), isl.isl_basic_set_copy(arg1.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def apply(self, arg1): - try: - if not arg1.__class__ is basic_map: - arg1 = basic_map(arg1) - except: - return set(self).apply(arg1) - res = isl.isl_basic_set_apply(isl.isl_basic_set_copy(self.ptr), isl.isl_basic_map_copy(arg1.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def affine_hull(self): - res = isl.isl_basic_set_affine_hull(isl.isl_basic_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_basic_set_detect_equalities(isl.isl_basic_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def is_equal(self, arg1): - res = isl.isl_basic_set_is_equal(self.ptr, arg1.ptr) - return res - def lexmin(self): - res = isl.isl_basic_set_lexmin(isl.isl_basic_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_basic_set_lexmax(isl.isl_basic_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def union(self, arg1): - try: - if not arg1.__class__ is basic_set: - arg1 = basic_set(arg1) - except: - return set(self).union(arg1) - res = isl.isl_basic_set_union(isl.isl_basic_set_copy(self.ptr), isl.isl_basic_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) - def is_empty(self): - res = isl.isl_basic_set_is_empty(self.ptr) - return res - def is_wrapping(self): - res = isl.isl_basic_set_is_wrapping(self.ptr) - return res - def flatten(self): - res = isl.isl_basic_set_flatten(isl.isl_basic_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - -isl.isl_basic_set_read_from_str.restype = c_void_p -isl.isl_basic_set_read_from_str.argtypes = [Context, c_char_p] -isl.isl_basic_set_gist.restype = c_void_p -isl.isl_basic_set_intersect.restype = c_void_p -isl.isl_basic_set_intersect_params.restype = c_void_p -isl.isl_basic_set_apply.restype = c_void_p -isl.isl_basic_set_affine_hull.restype = c_void_p -isl.isl_basic_set_detect_equalities.restype = c_void_p -isl.isl_basic_set_lexmin.restype = c_void_p -isl.isl_basic_set_lexmax.restype = c_void_p -isl.isl_basic_set_union.restype = c_void_p -isl.isl_basic_set_flatten.restype = c_void_p -isl.isl_basic_set_free.argtypes = [c_void_p] -isl.isl_basic_set_to_str.argtypes = [c_void_p] -isl.isl_basic_set_to_str.restype = POINTER(c_char) - -class pw_qpolynomial: - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_pw_qpolynomial_free(self.ptr) - def __str__(self): - ptr = isl.isl_pw_qpolynomial_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.pw_qpolynomial("%s")' % str(self) - -isl.isl_pw_qpolynomial_free.argtypes = [c_void_p] -isl.isl_pw_qpolynomial_to_str.argtypes = [c_void_p] -isl.isl_pw_qpolynomial_to_str.restype = POINTER(c_char) - -class union_pw_qpolynomial: - def __init__(self, *args, **keywords): - if "ptr" in keywords: - self.ctx = keywords["ctx"] - self.ptr = keywords["ptr"] - return - raise Error - def __del__(self): - if hasattr(self, 'ptr'): - isl.isl_union_pw_qpolynomial_free(self.ptr) - def __str__(self): - ptr = isl.isl_union_pw_qpolynomial_to_str(self.ptr) - res = str(cast(ptr, c_char_p).value) - libc.free(ptr) - return res - def __repr__(self): - return 'isl.union_pw_qpolynomial("%s")' % str(self) - -isl.isl_union_pw_qpolynomial_free.argtypes = [c_void_p] -isl.isl_union_pw_qpolynomial_to_str.argtypes = [c_void_p] -isl.isl_union_pw_qpolynomial_to_str.restype = POINTER(c_char) diff --git a/cloog-0.17.0/isl/interface/python.cc b/cloog-0.17.0/isl/interface/python.cc deleted file mode 100644 index 784b4be389aea7072735cbf0c5c29b6bed608f60..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/python.cc +++ /dev/null @@ -1,515 +0,0 @@ -/* - * Copyright 2011 Sven Verdoolaege. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY SVEN VERDOOLAEGE ''AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SVEN VERDOOLAEGE OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation - * are those of the authors and should not be interpreted as - * representing official policies, either expressed or implied, of - * Sven Verdoolaege. - */ - -#include -#include -#include -#include "extract_interface.h" -#include "python.h" - -/* Is the given type declaration marked as being a subtype of some other - * type? If so, return that other type in "super". - */ -static bool is_subclass(RecordDecl *decl, string &super) -{ - if (!decl->hasAttrs()) - return false; - - string sub = "isl_subclass"; - size_t len = sub.length(); - AttrVec attrs = decl->getAttrs(); - for (AttrVec::const_iterator i = attrs.begin() ; i != attrs.end(); ++i) { - const AnnotateAttr *ann = dyn_cast(*i); - if (!ann) - continue; - string s = ann->getAnnotation().str(); - if (s.substr(0, len) == sub) { - super = s.substr(len + 1, s.length() - len - 2); - return true; - } - } - - return false; -} - -/* Is decl marked as a constructor? - */ -static bool is_constructor(Decl *decl) -{ - return has_annotation(decl, "isl_constructor"); -} - -/* Is decl marked as consuming a reference? - */ -static bool takes(Decl *decl) -{ - return has_annotation(decl, "isl_take"); -} - -/* isl_class collects all constructors and methods for an isl "class". - * "name" is the name of the class. - * "type" is the declaration that introduces the type. - */ -struct isl_class { - string name; - RecordDecl *type; - set constructors; - set methods; - - void print(map &classes, set &done); - void print_constructor(FunctionDecl *method); - void print_method(FunctionDecl *method, bool subclass, string super); -}; - -/* Return the class that has a name that matches the initial part - * of the namd of function "fd". - */ -static isl_class &method2class(map &classes, - FunctionDecl *fd) -{ - string best; - map::iterator ci; - string name = fd->getNameAsString(); - - for (ci = classes.begin(); ci != classes.end(); ++ci) { - if (name.substr(0, ci->first.length()) == ci->first) - best = ci->first; - } - - return classes[best]; -} - -/* Is "type" the type "isl_ctx *"? - */ -static bool is_isl_ctx(QualType type) -{ - if (!type->isPointerType()) - return 0; - type = type->getPointeeType(); - if (type.getAsString() != "isl_ctx") - return false; - - return true; -} - -/* Is the first argument of "fd" of type "isl_ctx *"? - */ -static bool first_arg_is_isl_ctx(FunctionDecl *fd) -{ - ParmVarDecl *param; - - if (fd->getNumParams() < 1) - return false; - - param = fd->getParamDecl(0); - return is_isl_ctx(param->getOriginalType()); -} - -/* Is "type" that of a pointer to an isl_* structure? - */ -static bool is_isl_type(QualType type) -{ - if (type->isPointerType()) { - string s = type->getPointeeType().getAsString(); - return s.substr(0, 4) == "isl_"; - } - - return false; -} - -/* Is "type" that of a pointer to a function? - */ -static bool is_callback(QualType type) -{ - if (!type->isPointerType()) - return false; - type = type->getPointeeType(); - return type->isFunctionType(); -} - -/* Is "type" that of "char *" of "const char *"? - */ -static bool is_string(QualType type) -{ - if (type->isPointerType()) { - string s = type->getPointeeType().getAsString(); - return s == "const char" || s == "char"; - } - - return false; -} - -/* Return the name of the type that "type" points to. - * The input "type" is assumed to be a pointer type. - */ -static string extract_type(QualType type) -{ - if (type->isPointerType()) - return type->getPointeeType().getAsString(); - assert(0); -} - -/* Drop the "isl_" initial part of the type name "name". - */ -static string type2python(string name) -{ - return name.substr(4); -} - -/* Construct a wrapper for a callback argument (at position "arg"). - * Assign the wrapper to "cb". We assume here that a function call - * has at most one callback argument. - * - * The wrapper converts the arguments of the callback to python types. - * If any exception is thrown, the wrapper keeps track of it in exc_info[0] - * and returns -1. Otherwise the wrapper returns 0. - */ -static void print_callback(QualType type, int arg) -{ - const FunctionProtoType *fn = type->getAs(); - unsigned n_arg = fn->getNumArgs(); - - printf(" exc_info = [None]\n"); - printf(" fn = CFUNCTYPE(c_int"); - for (int i = 0; i < n_arg - 1; ++i) { - QualType arg_type = fn->getArgType(i); - assert(is_isl_type(arg_type)); - printf(", c_void_p"); - } - printf(", c_void_p)\n"); - printf(" def cb_func("); - for (int i = 0; i < n_arg; ++i) { - if (i) - printf(", "); - printf("cb_arg%d", i); - } - printf("):\n"); - for (int i = 0; i < n_arg - 1; ++i) { - string arg_type; - arg_type = type2python(extract_type(fn->getArgType(i))); - printf(" cb_arg%d = %s(ctx=self.ctx, ptr=cb_arg%d)\n", - i, arg_type.c_str(), i); - } - printf(" try:\n"); - printf(" arg%d(", arg); - for (int i = 0; i < n_arg - 1; ++i) { - if (i) - printf(", "); - printf("cb_arg%d", i); - } - printf(")\n"); - printf(" except:\n"); - printf(" import sys\n"); - printf(" exc_info[0] = sys.exc_info()\n"); - printf(" return -1\n"); - printf(" return 0\n"); - printf(" cb = fn(cb_func)\n"); -} - -/* Print a python method corresponding to the C function "method". - * "subclass" is set if the method belongs to a class that is a subclass - * of some other class ("super"). - * - * If the function has a callback argument, then it also has a "user" - * argument. Since Python has closures, there is no need for such - * a user argument in the Python interface, so we simply drop it. - * We also create a wrapper ("cb") for the callback. - * - * If the function has additional arguments that refer to isl structures, - * then we check if the actual arguments are of the right type. - * If not, we try to convert it to the right type. - * It that doesn't work and if subclass is set, we try to convert self - * to the type of the superclass and call the corresponding method. - * - * If the function consumes a reference, then we pass it a copy of - * the actual argument. - */ -void isl_class::print_method(FunctionDecl *method, bool subclass, string super) -{ - string fullname = method->getName(); - string cname = fullname.substr(name.length() + 1); - int num_params = method->getNumParams(); - int drop_user = 0; - - for (int i = 1; i < num_params; ++i) { - ParmVarDecl *param = method->getParamDecl(i); - QualType type = param->getOriginalType(); - if (is_callback(type)) - drop_user = 1; - } - - printf(" def %s(self", cname.c_str()); - for (int i = 1; i < num_params - drop_user; ++i) - printf(", arg%d", i); - printf("):\n"); - - for (int i = 1; i < num_params; ++i) { - ParmVarDecl *param = method->getParamDecl(i); - string type; - if (!is_isl_type(param->getOriginalType())) - continue; - type = type2python(extract_type(param->getOriginalType())); - printf(" try:\n"); - printf(" if not arg%d.__class__ is %s:\n", - i, type.c_str()); - printf(" arg%d = %s(arg%d)\n", - i, type.c_str(), i); - printf(" except:\n"); - if (subclass) { - printf(" return %s(self).%s(", - type2python(super).c_str(), cname.c_str()); - for (int i = 1; i < num_params - drop_user; ++i) { - if (i != 1) - printf(", "); - printf("arg%d", i); - } - printf(")\n"); - } else - printf(" raise\n"); - } - for (int i = 1; i < num_params; ++i) { - ParmVarDecl *param = method->getParamDecl(i); - QualType type = param->getOriginalType(); - if (!is_callback(type)) - continue; - print_callback(type->getPointeeType(), i); - } - printf(" res = isl.%s(", fullname.c_str()); - if (takes(method->getParamDecl(0))) - printf("isl.%s_copy(self.ptr)", name.c_str()); - else - printf("self.ptr"); - for (int i = 1; i < num_params - drop_user; ++i) { - ParmVarDecl *param = method->getParamDecl(i); - QualType type = param->getOriginalType(); - if (is_callback(type)) - printf(", cb"); - else if (takes(param)) { - string type_s = extract_type(type); - printf(", isl.%s_copy(arg%d.ptr)", type_s.c_str(), i); - } else - printf(", arg%d.ptr", i); - } - if (drop_user) - printf(", None"); - printf(")\n"); - - if (is_isl_type(method->getResultType())) { - string type; - type = type2python(extract_type(method->getResultType())); - printf(" return %s(ctx=self.ctx, ptr=res)\n", - type.c_str()); - } else { - if (drop_user) { - printf(" if exc_info[0] != None:\n"); - printf(" raise exc_info[0][0], " - "exc_info[0][1], exc_info[0][2]\n"); - } - printf(" return res\n"); - } -} - -/* Print part of the constructor for this isl_class. - * - * In particular, check if the actual arguments correspond to the - * formal arguments of "cons" and if so call "cons" and put the - * result in self.ptr and a reference to the default context in self.ctx. - * - * If the function consumes a reference, then we pass it a copy of - * the actual argument. - */ -void isl_class::print_constructor(FunctionDecl *cons) -{ - string fullname = cons->getName(); - string cname = fullname.substr(name.length() + 1); - int num_params = cons->getNumParams(); - int drop_ctx = first_arg_is_isl_ctx(cons); - - printf(" if len(args) == %d", num_params - drop_ctx); - for (int i = drop_ctx; i < num_params; ++i) { - ParmVarDecl *param = cons->getParamDecl(i); - if (is_isl_type(param->getOriginalType())) { - string type; - type = extract_type(param->getOriginalType()); - type = type2python(type); - printf(" and args[%d].__class__ is %s", - i - drop_ctx, type.c_str()); - } else - printf(" and type(args[%d]) == str", i - drop_ctx); - } - printf(":\n"); - printf(" self.ctx = Context.getDefaultInstance()\n"); - printf(" self.ptr = isl.%s(", fullname.c_str()); - if (drop_ctx) - printf("self.ctx"); - for (int i = drop_ctx; i < num_params; ++i) { - ParmVarDecl *param = cons->getParamDecl(i); - if (i) - printf(", "); - if (is_isl_type(param->getOriginalType())) { - if (takes(param)) { - string type; - type = extract_type(param->getOriginalType()); - printf("isl.%s_copy(args[%d].ptr)", - type.c_str(), i - drop_ctx); - } else - printf("args[%d].ptr", i - drop_ctx); - } else - printf("args[%d]", i - drop_ctx); - } - printf(")\n"); - printf(" return\n"); -} - -/* Print out the definition of this isl_class. - * - * We first check if this isl_class is a subclass of some other class. - * If it is, we make sure the superclass is printed out first. - * - * Then we print a constructor with several cases, one for constructing - * a Python object from a return value and one for each function that - * was marked as a constructor. - * - * Next, we print out some common methods and the methods corresponding - * to functions that are not marked as constructors. - * - * Finally, we tell ctypes about the types of the arguments of the - * constructor functions and the return types of those function returning - * an isl object. - */ -void isl_class::print(map &classes, set &done) -{ - string super; - string p_name = type2python(name); - set::iterator in; - bool subclass = is_subclass(type, super); - - if (subclass && done.find(super) == done.end()) - classes[super].print(classes, done); - done.insert(name); - - printf("\n"); - printf("class %s", p_name.c_str()); - if (subclass) - printf("(%s)", type2python(super).c_str()); - printf(":\n"); - printf(" def __init__(self, *args, **keywords):\n"); - - printf(" if \"ptr\" in keywords:\n"); - printf(" self.ctx = keywords[\"ctx\"]\n"); - printf(" self.ptr = keywords[\"ptr\"]\n"); - printf(" return\n"); - - for (in = constructors.begin(); in != constructors.end(); ++in) - print_constructor(*in); - printf(" raise Error\n"); - printf(" def __del__(self):\n"); - printf(" if hasattr(self, 'ptr'):\n"); - printf(" isl.%s_free(self.ptr)\n", name.c_str()); - printf(" def __str__(self):\n"); - printf(" ptr = isl.%s_to_str(self.ptr)\n", name.c_str()); - printf(" res = str(cast(ptr, c_char_p).value)\n"); - printf(" libc.free(ptr)\n"); - printf(" return res\n"); - printf(" def __repr__(self):\n"); - printf(" return 'isl.%s(\"%%s\")' %% str(self)\n", p_name.c_str()); - - for (in = methods.begin(); in != methods.end(); ++in) - print_method(*in, subclass, super); - - printf("\n"); - for (in = constructors.begin(); in != constructors.end(); ++in) { - string fullname = (*in)->getName(); - printf("isl.%s.restype = c_void_p\n", fullname.c_str()); - printf("isl.%s.argtypes = [", fullname.c_str()); - for (int i = 0; i < (*in)->getNumParams(); ++i) { - ParmVarDecl *param = (*in)->getParamDecl(i); - QualType type = param->getOriginalType(); - if (i) - printf(", "); - if (is_isl_ctx(type)) - printf("Context"); - else if (is_isl_type(type)) - printf("c_void_p"); - else if (is_string(type)) - printf("c_char_p"); - else - printf("c_int"); - } - printf("]\n"); - } - for (in = methods.begin(); in != methods.end(); ++in) { - string fullname = (*in)->getName(); - if (is_isl_type((*in)->getResultType())) - printf("isl.%s.restype = c_void_p\n", fullname.c_str()); - } - printf("isl.%s_free.argtypes = [c_void_p]\n", name.c_str()); - printf("isl.%s_to_str.argtypes = [c_void_p]\n", name.c_str()); - printf("isl.%s_to_str.restype = POINTER(c_char)\n", name.c_str()); -} - -/* Generate a python interface based on the extracted types and functions. - * We first collect all functions that belong to a certain type, - * separating constructors from regular methods. - * - * Then we print out each class in turn. If one of these is a subclass - * of some other class, it will make sure the superclass is printed out first. - */ -void generate_python(set &types, set functions) -{ - map classes; - map::iterator ci; - set done; - - set::iterator it; - for (it = types.begin(); it != types.end(); ++it) { - RecordDecl *decl = *it; - string name = decl->getName(); - classes[name].name = name; - classes[name].type = decl; - } - - set::iterator in; - for (in = functions.begin(); in != functions.end(); ++in) { - isl_class &c = method2class(classes, *in); - if (is_constructor(*in)) - c.constructors.insert(*in); - else - c.methods.insert(*in); - } - - for (ci = classes.begin(); ci != classes.end(); ++ci) { - if (done.find(ci->first) == done.end()) - ci->second.print(classes, done); - } -} diff --git a/cloog-0.17.0/isl/interface/python.h b/cloog-0.17.0/isl/interface/python.h deleted file mode 100644 index 0f6e8ec5b2f99a554c11a7f355132c9d478b2e3d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/interface/python.h +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -using namespace std; -using namespace clang; - -void generate_python(set &types, set functions); diff --git a/cloog-0.17.0/isl/isl.py b/cloog-0.17.0/isl/isl.py deleted file mode 100644 index 6382f6384e722ec992141da3d25101c59e12cea0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl.py +++ /dev/null @@ -1,100 +0,0 @@ -import gdb -import re - -# GDB Pretty Printers for most isl objects -class IslObjectPrinter: - """Print an isl object""" - def __init__ (self, val, type): - self.val = val - self.type = type - - def to_string (self): - # Cast val to a void pointer to stop gdb using this pretty - # printer for the pointer which would lead to an infinite loop. - void_ptr = gdb.lookup_type('void').pointer() - value = str(self.val.cast(void_ptr)) - printer = gdb.parse_and_eval("isl_printer_to_str(isl_" - + str(self.type) - + "_get_ctx(" + value + "))") - printer = gdb.parse_and_eval("isl_printer_print_" - + str(self.type) + "(" - + str(printer) + ", " - + value + ")") - string = gdb.parse_and_eval("(char*)isl_printer_get_str(" - + str(printer) + ")") - gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")") - return string - - def display_hint (self): - return 'string' - -class IslIntPrinter: - """Print an isl_int """ - def __init__ (self, val): - self.val = val - - def to_string (self): - # Cast val to a void pointer to stop gdb using this pretty - # printer for the pointer which would lead to an infinite loop. - void_ptr = gdb.lookup_type('void').pointer() - value = str(self.val.cast(void_ptr)) - - context = gdb.parse_and_eval("isl_ctx_alloc()") - printer = gdb.parse_and_eval("isl_printer_to_str(" - + str(context) + ")") - printer = gdb.parse_and_eval("isl_printer_print_isl_int(" - + str(printer) + ", " - + value + ")") - string = gdb.parse_and_eval("(char*)isl_printer_get_str(" - + str(printer) + ")") - gdb.parse_and_eval("isl_printer_free(" + str(printer) + ")") - gdb.parse_and_eval("isl_ctx_free(" + str(context) + ")") - return string - - def display_hint (self): - return 'string' - -class IslPrintCommand (gdb.Command): - """Print an isl value.""" - def __init__ (self): - super (IslPrintCommand, self).__init__ ("islprint", - gdb.COMMAND_OBSCURE) - def invoke (self, arg, from_tty): - arg = gdb.parse_and_eval(arg); - printer = str_lookup_function(arg) - - if printer == None: - print "No isl printer for this type" - return - - print printer.to_string() - -IslPrintCommand() - -def str_lookup_function (val): - if val.type.code != gdb.TYPE_CODE_PTR: - if str(val.type) == "isl_int": - return IslIntPrinter(val) - else: - return None - - lookup_tag = val.type.target() - regex = re.compile ("^isl_(.*)$") - - if lookup_tag == None: - return None - - m = regex.match (str(lookup_tag)) - - if m: - # Those types of printers defined in isl. - if m.group(1) in ["basic_set", "set", "union_set", "basic_map", - "map", "union_map", "qpolynomial", - "pw_qpolynomial", "pw_qpolynomial_fold", - "union_pw_qpolynomial", - "union_pw_qpolynomial_fold"]: - return IslObjectPrinter(val, m.group(1)) - return None - -# Do not register the pretty printer. -# gdb.current_objfile().pretty_printers.append(str_lookup_function) diff --git a/cloog-0.17.0/isl/isl_aff.c b/cloog-0.17.0/isl/isl_aff.c deleted file mode 100644 index 173ccf0c262808319cb3855a380f8da30b184576..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_aff.c +++ /dev/null @@ -1,2516 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * Copyright 2011 Sven Verdoolaege - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -__isl_give isl_aff *isl_aff_alloc_vec(__isl_take isl_local_space *ls, - __isl_take isl_vec *v) -{ - isl_aff *aff; - - if (!ls || !v) - goto error; - - aff = isl_calloc_type(v->ctx, struct isl_aff); - if (!aff) - goto error; - - aff->ref = 1; - aff->ls = ls; - aff->v = v; - - return aff; -error: - isl_local_space_free(ls); - isl_vec_free(v); - return NULL; -} - -__isl_give isl_aff *isl_aff_alloc(__isl_take isl_local_space *ls) -{ - isl_ctx *ctx; - isl_vec *v; - unsigned total; - - if (!ls) - return NULL; - - ctx = isl_local_space_get_ctx(ls); - if (!isl_local_space_divs_known(ls)) - isl_die(ctx, isl_error_invalid, "local space has unknown divs", - goto error); - if (!isl_local_space_is_set(ls)) - isl_die(ctx, isl_error_invalid, - "domain of affine expression should be a set", - goto error); - - total = isl_local_space_dim(ls, isl_dim_all); - v = isl_vec_alloc(ctx, 1 + 1 + total); - return isl_aff_alloc_vec(ls, v); -error: - isl_local_space_free(ls); - return NULL; -} - -__isl_give isl_aff *isl_aff_zero_on_domain(__isl_take isl_local_space *ls) -{ - isl_aff *aff; - - aff = isl_aff_alloc(ls); - if (!aff) - return NULL; - - isl_int_set_si(aff->v->el[0], 1); - isl_seq_clr(aff->v->el + 1, aff->v->size - 1); - - return aff; -} - -__isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff) -{ - if (!aff) - return NULL; - - aff->ref++; - return aff; -} - -__isl_give isl_aff *isl_aff_dup(__isl_keep isl_aff *aff) -{ - if (!aff) - return NULL; - - return isl_aff_alloc_vec(isl_local_space_copy(aff->ls), - isl_vec_copy(aff->v)); -} - -__isl_give isl_aff *isl_aff_cow(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - - if (aff->ref == 1) - return aff; - aff->ref--; - return isl_aff_dup(aff); -} - -void *isl_aff_free(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - - if (--aff->ref > 0) - return NULL; - - isl_local_space_free(aff->ls); - isl_vec_free(aff->v); - - free(aff); - - return NULL; -} - -isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff) -{ - return aff ? isl_local_space_get_ctx(aff->ls) : NULL; -} - -/* Externally, an isl_aff has a map space, but internally, the - * ls field corresponds to the domain of that space. - */ -int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type) -{ - if (!aff) - return 0; - if (type == isl_dim_out) - return 1; - if (type == isl_dim_in) - type = isl_dim_set; - return isl_local_space_dim(aff->ls, type); -} - -__isl_give isl_space *isl_aff_get_domain_space(__isl_keep isl_aff *aff) -{ - return aff ? isl_local_space_get_space(aff->ls) : NULL; -} - -__isl_give isl_space *isl_aff_get_space(__isl_keep isl_aff *aff) -{ - isl_space *space; - if (!aff) - return NULL; - space = isl_local_space_get_space(aff->ls); - space = isl_space_from_domain(space); - space = isl_space_add_dims(space, isl_dim_out, 1); - return space; -} - -__isl_give isl_local_space *isl_aff_get_domain_local_space( - __isl_keep isl_aff *aff) -{ - return aff ? isl_local_space_copy(aff->ls) : NULL; -} - -__isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff) -{ - isl_local_space *ls; - if (!aff) - return NULL; - ls = isl_local_space_copy(aff->ls); - ls = isl_local_space_from_domain(ls); - ls = isl_local_space_add_dims(ls, isl_dim_out, 1); - return ls; -} - -/* Externally, an isl_aff has a map space, but internally, the - * ls field corresponds to the domain of that space. - */ -const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned pos) -{ - if (!aff) - return NULL; - if (type == isl_dim_out) - return NULL; - if (type == isl_dim_in) - type = isl_dim_set; - return isl_local_space_get_dim_name(aff->ls, type, pos); -} - -__isl_give isl_aff *isl_aff_reset_domain_space(__isl_take isl_aff *aff, - __isl_take isl_space *dim) -{ - aff = isl_aff_cow(aff); - if (!aff || !dim) - goto error; - - aff->ls = isl_local_space_reset_space(aff->ls, dim); - if (!aff->ls) - return isl_aff_free(aff); - - return aff; -error: - isl_aff_free(aff); - isl_space_free(dim); - return NULL; -} - -/* Reset the space of "aff". This function is called from isl_pw_templ.c - * and doesn't know if the space of an element object is represented - * directly or through its domain. It therefore passes along both. - */ -__isl_give isl_aff *isl_aff_reset_space_and_domain(__isl_take isl_aff *aff, - __isl_take isl_space *space, __isl_take isl_space *domain) -{ - isl_space_free(space); - return isl_aff_reset_domain_space(aff, domain); -} - -/* Reorder the coefficients of the affine expression based - * on the given reodering. - * The reordering r is assumed to have been extended with the local - * variables. - */ -static __isl_give isl_vec *vec_reorder(__isl_take isl_vec *vec, - __isl_take isl_reordering *r, int n_div) -{ - isl_vec *res; - int i; - - if (!vec || !r) - goto error; - - res = isl_vec_alloc(vec->ctx, - 2 + isl_space_dim(r->dim, isl_dim_all) + n_div); - isl_seq_cpy(res->el, vec->el, 2); - isl_seq_clr(res->el + 2, res->size - 2); - for (i = 0; i < r->len; ++i) - isl_int_set(res->el[2 + r->pos[i]], vec->el[2 + i]); - - isl_reordering_free(r); - isl_vec_free(vec); - return res; -error: - isl_vec_free(vec); - isl_reordering_free(r); - return NULL; -} - -/* Reorder the dimensions of the domain of "aff" according - * to the given reordering. - */ -__isl_give isl_aff *isl_aff_realign_domain(__isl_take isl_aff *aff, - __isl_take isl_reordering *r) -{ - aff = isl_aff_cow(aff); - if (!aff) - goto error; - - r = isl_reordering_extend(r, aff->ls->div->n_row); - aff->v = vec_reorder(aff->v, isl_reordering_copy(r), - aff->ls->div->n_row); - aff->ls = isl_local_space_realign(aff->ls, r); - - if (!aff->v || !aff->ls) - return isl_aff_free(aff); - - return aff; -error: - isl_aff_free(aff); - isl_reordering_free(r); - return NULL; -} - -int isl_aff_plain_is_zero(__isl_keep isl_aff *aff) -{ - if (!aff) - return -1; - - return isl_seq_first_non_zero(aff->v->el + 1, aff->v->size - 1) < 0; -} - -int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2) -{ - int equal; - - if (!aff1 || !aff2) - return -1; - - equal = isl_local_space_is_equal(aff1->ls, aff2->ls); - if (equal < 0 || !equal) - return equal; - - return isl_vec_is_equal(aff1->v, aff2->v); -} - -int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v) -{ - if (!aff) - return -1; - isl_int_set(*v, aff->v->el[0]); - return 0; -} - -int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v) -{ - if (!aff) - return -1; - isl_int_set(*v, aff->v->el[1]); - return 0; -} - -int isl_aff_get_coefficient(__isl_keep isl_aff *aff, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!aff) - return -1; - - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "output/set dimension does not have a coefficient", - return -1); - if (type == isl_dim_in) - type = isl_dim_set; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return -1); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_set(*v, aff->v->el[1 + pos]); - - return 0; -} - -__isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_set(aff->v->el[0], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_set(aff->v->el[1], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v) -{ - if (isl_int_is_zero(v)) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_addmul(aff->v->el[1], aff->v->el[0], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v) -{ - isl_int t; - - isl_int_init(t); - isl_int_set_si(t, v); - aff = isl_aff_add_constant(aff, t); - isl_int_clear(t); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_set_si(aff->v->el[1], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!aff) - return NULL; - - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "output/set dimension does not have a coefficient", - return isl_aff_free(aff)); - if (type == isl_dim_in) - type = isl_dim_set; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_set(aff->v->el[1 + pos], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v) -{ - if (!aff) - return NULL; - - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "output/set dimension does not have a coefficient", - return isl_aff_free(aff)); - if (type == isl_dim_in) - type = isl_dim_set; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_set_si(aff->v->el[1 + pos], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!aff) - return NULL; - - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "output/set dimension does not have a coefficient", - return isl_aff_free(aff)); - if (type == isl_dim_in) - type = isl_dim_set; - - if (pos >= isl_local_space_dim(aff->ls, type)) - isl_die(aff->v->ctx, isl_error_invalid, - "position out of bounds", return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - isl_int_addmul(aff->v->el[1 + pos], aff->v->el[0], v); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, - enum isl_dim_type type, int pos, int v) -{ - isl_int t; - - isl_int_init(t); - isl_int_set_si(t, v); - aff = isl_aff_add_coefficient(aff, type, pos, t); - isl_int_clear(t); - - return aff; -} - -__isl_give isl_aff *isl_aff_get_div(__isl_keep isl_aff *aff, int pos) -{ - if (!aff) - return NULL; - - return isl_local_space_get_div(aff->ls, pos); -} - -__isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_seq_neg(aff->v->el + 1, aff->v->el + 1, aff->v->size - 1); - - return aff; -} - -__isl_give isl_aff *isl_aff_normalize(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - aff->v = isl_vec_normalize(aff->v); - if (!aff->v) - return isl_aff_free(aff); - return aff; -} - -/* Given f, return floor(f). - * If f is an integer expression, then just return f. - * Otherwise, if f = g/m, write g = q m + r, - * create a new div d = [r/m] and return the expression q + d. - * The coefficients in r are taken to lie between -m/2 and m/2. - */ -__isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff) -{ - int i; - int size; - isl_ctx *ctx; - isl_vec *div; - - if (!aff) - return NULL; - - if (isl_int_is_one(aff->v->el[0])) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->v = isl_vec_cow(aff->v); - div = isl_vec_copy(aff->v); - div = isl_vec_cow(div); - if (!div) - return isl_aff_free(aff); - - ctx = isl_aff_get_ctx(aff); - isl_int_fdiv_q(aff->v->el[0], aff->v->el[0], ctx->two); - for (i = 1; i < aff->v->size; ++i) { - isl_int_fdiv_r(div->el[i], div->el[i], div->el[0]); - isl_int_fdiv_q(aff->v->el[i], aff->v->el[i], div->el[0]); - if (isl_int_gt(div->el[i], aff->v->el[0])) { - isl_int_sub(div->el[i], div->el[i], div->el[0]); - isl_int_add_ui(aff->v->el[i], aff->v->el[i], 1); - } - } - - aff->ls = isl_local_space_add_div(aff->ls, div); - if (!aff->ls) - return isl_aff_free(aff); - - size = aff->v->size; - aff->v = isl_vec_extend(aff->v, size + 1); - if (!aff->v) - return isl_aff_free(aff); - isl_int_set_si(aff->v->el[0], 1); - isl_int_set_si(aff->v->el[size], 1); - - return aff; -} - -/* Compute - * - * aff mod m = aff - m * floor(aff/m) - */ -__isl_give isl_aff *isl_aff_mod(__isl_take isl_aff *aff, isl_int m) -{ - isl_aff *res; - - res = isl_aff_copy(aff); - aff = isl_aff_scale_down(aff, m); - aff = isl_aff_floor(aff); - aff = isl_aff_scale(aff, m); - res = isl_aff_sub(res, aff); - - return res; -} - -/* Compute - * - * pwaff mod m = pwaff - m * floor(pwaff/m) - */ -__isl_give isl_pw_aff *isl_pw_aff_mod(__isl_take isl_pw_aff *pwaff, isl_int m) -{ - isl_pw_aff *res; - - res = isl_pw_aff_copy(pwaff); - pwaff = isl_pw_aff_scale_down(pwaff, m); - pwaff = isl_pw_aff_floor(pwaff); - pwaff = isl_pw_aff_scale(pwaff, m); - res = isl_pw_aff_sub(res, pwaff); - - return res; -} - -/* Given f, return ceil(f). - * If f is an integer expression, then just return f. - * Otherwise, create a new div d = [-f] and return the expression -d. - */ -__isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff) -{ - if (!aff) - return NULL; - - if (isl_int_is_one(aff->v->el[0])) - return aff; - - aff = isl_aff_neg(aff); - aff = isl_aff_floor(aff); - aff = isl_aff_neg(aff); - - return aff; -} - -/* Apply the expansion computed by isl_merge_divs. - * The expansion itself is given by "exp" while the resulting - * list of divs is given by "div". - */ -__isl_give isl_aff *isl_aff_expand_divs( __isl_take isl_aff *aff, - __isl_take isl_mat *div, int *exp) -{ - int i, j; - int old_n_div; - int new_n_div; - int offset; - - aff = isl_aff_cow(aff); - if (!aff || !div) - goto error; - - old_n_div = isl_local_space_dim(aff->ls, isl_dim_div); - new_n_div = isl_mat_rows(div); - if (new_n_div < old_n_div) - isl_die(isl_mat_get_ctx(div), isl_error_invalid, - "not an expansion", goto error); - - aff->v = isl_vec_extend(aff->v, aff->v->size + new_n_div - old_n_div); - if (!aff->v) - goto error; - - offset = 1 + isl_local_space_offset(aff->ls, isl_dim_div); - j = old_n_div - 1; - for (i = new_n_div - 1; i >= 0; --i) { - if (j >= 0 && exp[j] == i) { - if (i != j) - isl_int_swap(aff->v->el[offset + i], - aff->v->el[offset + j]); - j--; - } else - isl_int_set_si(aff->v->el[offset + i], 0); - } - - aff->ls = isl_local_space_replace_divs(aff->ls, isl_mat_copy(div)); - if (!aff->ls) - goto error; - isl_mat_free(div); - return aff; -error: - isl_aff_free(aff); - isl_mat_free(div); - return NULL; -} - -/* Add two affine expressions that live in the same local space. - */ -static __isl_give isl_aff *add_expanded(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - isl_int gcd, f; - - aff1 = isl_aff_cow(aff1); - if (!aff1 || !aff2) - goto error; - - aff1->v = isl_vec_cow(aff1->v); - if (!aff1->v) - goto error; - - isl_int_init(gcd); - isl_int_init(f); - isl_int_gcd(gcd, aff1->v->el[0], aff2->v->el[0]); - isl_int_divexact(f, aff2->v->el[0], gcd); - isl_seq_scale(aff1->v->el + 1, aff1->v->el + 1, f, aff1->v->size - 1); - isl_int_divexact(f, aff1->v->el[0], gcd); - isl_seq_addmul(aff1->v->el + 1, f, aff2->v->el + 1, aff1->v->size - 1); - isl_int_divexact(f, aff2->v->el[0], gcd); - isl_int_mul(aff1->v->el[0], aff1->v->el[0], f); - isl_int_clear(f); - isl_int_clear(gcd); - - isl_aff_free(aff2); - return aff1; -error: - isl_aff_free(aff1); - isl_aff_free(aff2); - return NULL; -} - -__isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - isl_ctx *ctx; - int *exp1 = NULL; - int *exp2 = NULL; - isl_mat *div; - - if (!aff1 || !aff2) - goto error; - - ctx = isl_aff_get_ctx(aff1); - if (!isl_space_is_equal(aff1->ls->dim, aff2->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", goto error); - - if (aff1->ls->div->n_row == 0 && aff2->ls->div->n_row == 0) - return add_expanded(aff1, aff2); - - exp1 = isl_alloc_array(ctx, int, aff1->ls->div->n_row); - exp2 = isl_alloc_array(ctx, int, aff2->ls->div->n_row); - if (!exp1 || !exp2) - goto error; - - div = isl_merge_divs(aff1->ls->div, aff2->ls->div, exp1, exp2); - aff1 = isl_aff_expand_divs(aff1, isl_mat_copy(div), exp1); - aff2 = isl_aff_expand_divs(aff2, div, exp2); - free(exp1); - free(exp2); - - return add_expanded(aff1, aff2); -error: - free(exp1); - free(exp2); - isl_aff_free(aff1); - isl_aff_free(aff2); - return NULL; -} - -__isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - return isl_aff_add(aff1, isl_aff_neg(aff2)); -} - -__isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f) -{ - isl_int gcd; - - if (isl_int_is_one(f)) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_init(gcd); - isl_int_gcd(gcd, aff->v->el[0], f); - isl_int_divexact(aff->v->el[0], aff->v->el[0], gcd); - isl_int_divexact(gcd, f, gcd); - isl_seq_scale(aff->v->el + 1, aff->v->el + 1, gcd, aff->v->size - 1); - isl_int_clear(gcd); - - return aff; -} - -__isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f) -{ - isl_int gcd; - - if (isl_int_is_one(f)) - return aff; - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - isl_int_init(gcd); - isl_seq_gcd(aff->v->el + 1, aff->v->size - 1, &gcd); - isl_int_gcd(gcd, gcd, f); - isl_seq_scale_down(aff->v->el + 1, aff->v->el + 1, gcd, aff->v->size - 1); - isl_int_divexact(gcd, f, gcd); - isl_int_mul(aff->v->el[0], aff->v->el[0], gcd); - isl_int_clear(gcd); - - return aff; -} - -__isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f) -{ - isl_int v; - - if (f == 1) - return aff; - - isl_int_init(v); - isl_int_set_ui(v, f); - aff = isl_aff_scale_down(aff, v); - isl_int_clear(v); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, const char *s) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "cannot set name of output/set dimension", - return isl_aff_free(aff)); - if (type == isl_dim_in) - type = isl_dim_set; - aff->ls = isl_local_space_set_dim_name(aff->ls, type, pos, s); - if (!aff->ls) - return isl_aff_free(aff); - - return aff; -} - -__isl_give isl_aff *isl_aff_set_dim_id(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - aff = isl_aff_cow(aff); - if (!aff) - return isl_id_free(id); - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "cannot set name of output/set dimension", - goto error); - if (type == isl_dim_in) - type = isl_dim_set; - aff->ls = isl_local_space_set_dim_id(aff->ls, type, pos, id); - if (!aff->ls) - return isl_aff_free(aff); - - return aff; -error: - isl_id_free(id); - isl_aff_free(aff); - return NULL; -} - -/* Exploit the equalities in "eq" to simplify the affine expression - * and the expressions of the integer divisions in the local space. - * The integer divisions in this local space are assumed to appear - * as regular dimensions in "eq". - */ -static __isl_give isl_aff *isl_aff_substitute_equalities_lifted( - __isl_take isl_aff *aff, __isl_take isl_basic_set *eq) -{ - int i, j; - unsigned total; - unsigned n_div; - - if (!eq) - goto error; - if (eq->n_eq == 0) { - isl_basic_set_free(eq); - return aff; - } - - aff = isl_aff_cow(aff); - if (!aff) - goto error; - - aff->ls = isl_local_space_substitute_equalities(aff->ls, - isl_basic_set_copy(eq)); - if (!aff->ls) - goto error; - - total = 1 + isl_space_dim(eq->dim, isl_dim_all); - n_div = eq->n_div; - for (i = 0; i < eq->n_eq; ++i) { - j = isl_seq_last_non_zero(eq->eq[i], total + n_div); - if (j < 0 || j == 0 || j >= total) - continue; - - isl_seq_elim(aff->v->el + 1, eq->eq[i], j, total, - &aff->v->el[0]); - } - - isl_basic_set_free(eq); - return aff; -error: - isl_basic_set_free(eq); - isl_aff_free(aff); - return NULL; -} - -/* Exploit the equalities in "eq" to simplify the affine expression - * and the expressions of the integer divisions in the local space. - */ -static __isl_give isl_aff *isl_aff_substitute_equalities( - __isl_take isl_aff *aff, __isl_take isl_basic_set *eq) -{ - int n_div; - - if (!aff || !eq) - goto error; - n_div = isl_local_space_dim(aff->ls, isl_dim_div); - if (n_div > 0) - eq = isl_basic_set_add(eq, isl_dim_set, n_div); - return isl_aff_substitute_equalities_lifted(aff, eq); -error: - isl_basic_set_free(eq); - isl_aff_free(aff); - return NULL; -} - -/* Look for equalities among the variables shared by context and aff - * and the integer divisions of aff, if any. - * The equalities are then used to eliminate coefficients and/or integer - * divisions from aff. - */ -__isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, - __isl_take isl_set *context) -{ - isl_basic_set *hull; - int n_div; - - if (!aff) - goto error; - n_div = isl_local_space_dim(aff->ls, isl_dim_div); - if (n_div > 0) { - isl_basic_set *bset; - isl_local_space *ls; - context = isl_set_add_dims(context, isl_dim_set, n_div); - ls = isl_aff_get_domain_local_space(aff); - bset = isl_basic_set_from_local_space(ls); - bset = isl_basic_set_lift(bset); - bset = isl_basic_set_flatten(bset); - context = isl_set_intersect(context, - isl_set_from_basic_set(bset)); - } - - hull = isl_set_affine_hull(context); - return isl_aff_substitute_equalities_lifted(aff, hull); -error: - isl_aff_free(aff); - isl_set_free(context); - return NULL; -} - -__isl_give isl_aff *isl_aff_gist_params(__isl_take isl_aff *aff, - __isl_take isl_set *context) -{ - isl_set *dom_context = isl_set_universe(isl_aff_get_domain_space(aff)); - dom_context = isl_set_intersect_params(dom_context, context); - return isl_aff_gist(aff, dom_context); -} - -/* Return a basic set containing those elements in the space - * of aff where it is non-negative. - */ -__isl_give isl_basic_set *isl_aff_nonneg_basic_set(__isl_take isl_aff *aff) -{ - isl_constraint *ineq; - - ineq = isl_inequality_from_aff(aff); - - return isl_basic_set_from_constraint(ineq); -} - -/* Return a basic set containing those elements in the space - * of aff where it is zero. - */ -__isl_give isl_basic_set *isl_aff_zero_basic_set(__isl_take isl_aff *aff) -{ - isl_constraint *ineq; - - ineq = isl_equality_from_aff(aff); - - return isl_basic_set_from_constraint(ineq); -} - -/* Return a basic set containing those elements in the shared space - * of aff1 and aff2 where aff1 is greater than or equal to aff2. - */ -__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - aff1 = isl_aff_sub(aff1, aff2); - - return isl_aff_nonneg_basic_set(aff1); -} - -/* Return a basic set containing those elements in the shared space - * of aff1 and aff2 where aff1 is smaller than or equal to aff2. - */ -__isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - return isl_aff_ge_basic_set(aff2, aff1); -} - -__isl_give isl_aff *isl_aff_add_on_domain(__isl_keep isl_set *dom, - __isl_take isl_aff *aff1, __isl_take isl_aff *aff2) -{ - aff1 = isl_aff_add(aff1, aff2); - aff1 = isl_aff_gist(aff1, isl_set_copy(dom)); - return aff1; -} - -int isl_aff_is_empty(__isl_keep isl_aff *aff) -{ - if (!aff) - return -1; - - return 0; -} - -/* Check whether the given affine expression has non-zero coefficient - * for any dimension in the given range or if any of these dimensions - * appear with non-zero coefficients in any of the integer divisions - * involved in the affine expression. - */ -int isl_aff_involves_dims(__isl_keep isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - isl_ctx *ctx; - int *active = NULL; - int involves = 0; - - if (!aff) - return -1; - if (n == 0) - return 0; - - ctx = isl_aff_get_ctx(aff); - if (first + n > isl_aff_dim(aff, type)) - isl_die(ctx, isl_error_invalid, - "range out of bounds", return -1); - - active = isl_local_space_get_active(aff->ls, aff->v->el + 2); - if (!active) - goto error; - - first += isl_local_space_offset(aff->ls, type) - 1; - for (i = 0; i < n; ++i) - if (active[first + i]) { - involves = 1; - break; - } - - free(active); - - return involves; -error: - free(active); - return -1; -} - -__isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!aff) - return NULL; - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "cannot drop output/set dimension", - return isl_aff_free(aff)); - if (type == isl_dim_in) - type = isl_dim_set; - if (n == 0 && !isl_local_space_is_named_or_nested(aff->ls, type)) - return aff; - - ctx = isl_aff_get_ctx(aff); - if (first + n > isl_local_space_dim(aff->ls, type)) - isl_die(ctx, isl_error_invalid, "range out of bounds", - return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->ls = isl_local_space_drop_dims(aff->ls, type, first, n); - if (!aff->ls) - return isl_aff_free(aff); - - first += 1 + isl_local_space_offset(aff->ls, type); - aff->v = isl_vec_drop_els(aff->v, first, n); - if (!aff->v) - return isl_aff_free(aff); - - return aff; -} - -__isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!aff) - return NULL; - if (type == isl_dim_out) - isl_die(aff->v->ctx, isl_error_invalid, - "cannot insert output/set dimensions", - return isl_aff_free(aff)); - if (type == isl_dim_in) - type = isl_dim_set; - if (n == 0 && !isl_local_space_is_named_or_nested(aff->ls, type)) - return aff; - - ctx = isl_aff_get_ctx(aff); - if (first > isl_local_space_dim(aff->ls, type)) - isl_die(ctx, isl_error_invalid, "position out of bounds", - return isl_aff_free(aff)); - - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->ls = isl_local_space_insert_dims(aff->ls, type, first, n); - if (!aff->ls) - return isl_aff_free(aff); - - first += 1 + isl_local_space_offset(aff->ls, type); - aff->v = isl_vec_insert_zero_els(aff->v, first, n); - if (!aff->v) - return isl_aff_free(aff); - - return aff; -} - -__isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_aff_dim(aff, type); - - return isl_aff_insert_dims(aff, type, pos, n); -} - -__isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff, - enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_pw_aff_dim(pwaff, type); - - return isl_pw_aff_insert_dims(pwaff, type, pos, n); -} - -__isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff) -{ - isl_set *dom = isl_set_universe(isl_aff_get_domain_space(aff)); - return isl_pw_aff_alloc(dom, aff); -} - -#undef PW -#define PW isl_pw_aff -#undef EL -#define EL isl_aff -#undef EL_IS_ZERO -#define EL_IS_ZERO is_empty -#undef ZERO -#define ZERO empty -#undef IS_ZERO -#define IS_ZERO is_empty -#undef FIELD -#define FIELD aff -#undef DEFAULT_IS_ZERO -#define DEFAULT_IS_ZERO 0 - -#define NO_EVAL -#define NO_OPT -#define NO_MOVE_DIMS -#define NO_LIFT -#define NO_MORPH - -#include - -static __isl_give isl_set *align_params_pw_pw_set_and( - __isl_take isl_pw_aff *pwaff1, __isl_take isl_pw_aff *pwaff2, - __isl_give isl_set *(*fn)(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2)) -{ - if (!pwaff1 || !pwaff2) - goto error; - if (isl_space_match(pwaff1->dim, isl_dim_param, - pwaff2->dim, isl_dim_param)) - return fn(pwaff1, pwaff2); - if (!isl_space_has_named_params(pwaff1->dim) || - !isl_space_has_named_params(pwaff2->dim)) - isl_die(isl_pw_aff_get_ctx(pwaff1), isl_error_invalid, - "unaligned unnamed parameters", goto error); - pwaff1 = isl_pw_aff_align_params(pwaff1, isl_pw_aff_get_space(pwaff2)); - pwaff2 = isl_pw_aff_align_params(pwaff2, isl_pw_aff_get_space(pwaff1)); - return fn(pwaff1, pwaff2); -error: - isl_pw_aff_free(pwaff1); - isl_pw_aff_free(pwaff2); - return NULL; -} - -/* Compute a piecewise quasi-affine expression with a domain that - * is the union of those of pwaff1 and pwaff2 and such that on each - * cell, the quasi-affine expression is the better (according to cmp) - * of those of pwaff1 and pwaff2. If only one of pwaff1 or pwaff2 - * is defined on a given cell, then the associated expression - * is the defined one. - */ -static __isl_give isl_pw_aff *pw_aff_union_opt(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2, - __isl_give isl_basic_set *(*cmp)(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2)) -{ - int i, j, n; - isl_pw_aff *res; - isl_ctx *ctx; - isl_set *set; - - if (!pwaff1 || !pwaff2) - goto error; - - ctx = isl_space_get_ctx(pwaff1->dim); - if (!isl_space_is_equal(pwaff1->dim, pwaff2->dim)) - isl_die(ctx, isl_error_invalid, - "arguments should live in same space", goto error); - - if (isl_pw_aff_is_empty(pwaff1)) { - isl_pw_aff_free(pwaff1); - return pwaff2; - } - - if (isl_pw_aff_is_empty(pwaff2)) { - isl_pw_aff_free(pwaff2); - return pwaff1; - } - - n = 2 * (pwaff1->n + 1) * (pwaff2->n + 1); - res = isl_pw_aff_alloc_size(isl_space_copy(pwaff1->dim), n); - - for (i = 0; i < pwaff1->n; ++i) { - set = isl_set_copy(pwaff1->p[i].set); - for (j = 0; j < pwaff2->n; ++j) { - struct isl_set *common; - isl_set *better; - - common = isl_set_intersect( - isl_set_copy(pwaff1->p[i].set), - isl_set_copy(pwaff2->p[j].set)); - better = isl_set_from_basic_set(cmp( - isl_aff_copy(pwaff2->p[j].aff), - isl_aff_copy(pwaff1->p[i].aff))); - better = isl_set_intersect(common, better); - if (isl_set_plain_is_empty(better)) { - isl_set_free(better); - continue; - } - set = isl_set_subtract(set, isl_set_copy(better)); - - res = isl_pw_aff_add_piece(res, better, - isl_aff_copy(pwaff2->p[j].aff)); - } - res = isl_pw_aff_add_piece(res, set, - isl_aff_copy(pwaff1->p[i].aff)); - } - - for (j = 0; j < pwaff2->n; ++j) { - set = isl_set_copy(pwaff2->p[j].set); - for (i = 0; i < pwaff1->n; ++i) - set = isl_set_subtract(set, - isl_set_copy(pwaff1->p[i].set)); - res = isl_pw_aff_add_piece(res, set, - isl_aff_copy(pwaff2->p[j].aff)); - } - - isl_pw_aff_free(pwaff1); - isl_pw_aff_free(pwaff2); - - return res; -error: - isl_pw_aff_free(pwaff1); - isl_pw_aff_free(pwaff2); - return NULL; -} - -/* Compute a piecewise quasi-affine expression with a domain that - * is the union of those of pwaff1 and pwaff2 and such that on each - * cell, the quasi-affine expression is the maximum of those of pwaff1 - * and pwaff2. If only one of pwaff1 or pwaff2 is defined on a given - * cell, then the associated expression is the defined one. - */ -static __isl_give isl_pw_aff *pw_aff_union_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_union_opt(pwaff1, pwaff2, &isl_aff_ge_basic_set); -} - -__isl_give isl_pw_aff *isl_pw_aff_union_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_align_params_pw_pw_and(pwaff1, pwaff2, - &pw_aff_union_max); -} - -/* Compute a piecewise quasi-affine expression with a domain that - * is the union of those of pwaff1 and pwaff2 and such that on each - * cell, the quasi-affine expression is the minimum of those of pwaff1 - * and pwaff2. If only one of pwaff1 or pwaff2 is defined on a given - * cell, then the associated expression is the defined one. - */ -static __isl_give isl_pw_aff *pw_aff_union_min(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_union_opt(pwaff1, pwaff2, &isl_aff_le_basic_set); -} - -__isl_give isl_pw_aff *isl_pw_aff_union_min(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_align_params_pw_pw_and(pwaff1, pwaff2, - &pw_aff_union_min); -} - -__isl_give isl_pw_aff *isl_pw_aff_union_opt(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2, int max) -{ - if (max) - return isl_pw_aff_union_max(pwaff1, pwaff2); - else - return isl_pw_aff_union_min(pwaff1, pwaff2); -} - -/* Construct a map with as domain the domain of pwaff and - * one-dimensional range corresponding to the affine expressions. - */ -static __isl_give isl_map *map_from_pw_aff(__isl_take isl_pw_aff *pwaff) -{ - int i; - isl_space *dim; - isl_map *map; - - if (!pwaff) - return NULL; - - dim = isl_pw_aff_get_space(pwaff); - map = isl_map_empty(dim); - - for (i = 0; i < pwaff->n; ++i) { - isl_basic_map *bmap; - isl_map *map_i; - - bmap = isl_basic_map_from_aff(isl_aff_copy(pwaff->p[i].aff)); - map_i = isl_map_from_basic_map(bmap); - map_i = isl_map_intersect_domain(map_i, - isl_set_copy(pwaff->p[i].set)); - map = isl_map_union_disjoint(map, map_i); - } - - isl_pw_aff_free(pwaff); - - return map; -} - -/* Construct a map with as domain the domain of pwaff and - * one-dimensional range corresponding to the affine expressions. - */ -__isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff) -{ - if (isl_space_is_set(pwaff->dim)) - isl_die(isl_pw_aff_get_ctx(pwaff), isl_error_invalid, - "space of input is not a map", - return isl_pw_aff_free(pwaff)); - return map_from_pw_aff(pwaff); -} - -/* Construct a one-dimensional set with as parameter domain - * the domain of pwaff and the single set dimension - * corresponding to the affine expressions. - */ -__isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff) -{ - if (!pwaff) - return NULL; - if (!isl_space_is_set(pwaff->dim)) - isl_die(isl_pw_aff_get_ctx(pwaff), isl_error_invalid, - "space of input is not a set", - return isl_pw_aff_free(pwaff)); - return map_from_pw_aff(pwaff); -} - -/* Return a set containing those elements in the domain - * of pwaff where it is non-negative. - */ -__isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff) -{ - int i; - isl_set *set; - - if (!pwaff) - return NULL; - - set = isl_set_empty(isl_pw_aff_get_domain_space(pwaff)); - - for (i = 0; i < pwaff->n; ++i) { - isl_basic_set *bset; - isl_set *set_i; - - bset = isl_aff_nonneg_basic_set(isl_aff_copy(pwaff->p[i].aff)); - set_i = isl_set_from_basic_set(bset); - set_i = isl_set_intersect(set_i, isl_set_copy(pwaff->p[i].set)); - set = isl_set_union_disjoint(set, set_i); - } - - isl_pw_aff_free(pwaff); - - return set; -} - -/* Return a set containing those elements in the domain - * of pwaff where it is zero. - */ -__isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff) -{ - int i; - isl_set *set; - - if (!pwaff) - return NULL; - - set = isl_set_empty(isl_pw_aff_get_domain_space(pwaff)); - - for (i = 0; i < pwaff->n; ++i) { - isl_basic_set *bset; - isl_set *set_i; - - bset = isl_aff_zero_basic_set(isl_aff_copy(pwaff->p[i].aff)); - set_i = isl_set_from_basic_set(bset); - set_i = isl_set_intersect(set_i, isl_set_copy(pwaff->p[i].set)); - set = isl_set_union_disjoint(set, set_i); - } - - isl_pw_aff_free(pwaff); - - return set; -} - -/* Return a set containing those elements in the domain - * of pwaff where it is not zero. - */ -__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff) -{ - return isl_set_complement(isl_pw_aff_zero_set(pwaff)); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is greater than (or equal) to pwaff2. - * - * We compute the difference on the shared domain and then construct - * the set of values where this difference is non-negative. - * If strict is set, we first subtract 1 from the difference. - * If equal is set, we only return the elements where pwaff1 and pwaff2 - * are equal. - */ -static __isl_give isl_set *pw_aff_gte_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2, int strict, int equal) -{ - isl_set *set1, *set2; - - set1 = isl_pw_aff_domain(isl_pw_aff_copy(pwaff1)); - set2 = isl_pw_aff_domain(isl_pw_aff_copy(pwaff2)); - set1 = isl_set_intersect(set1, set2); - pwaff1 = isl_pw_aff_intersect_domain(pwaff1, isl_set_copy(set1)); - pwaff2 = isl_pw_aff_intersect_domain(pwaff2, isl_set_copy(set1)); - pwaff1 = isl_pw_aff_add(pwaff1, isl_pw_aff_neg(pwaff2)); - - if (strict) { - isl_space *dim = isl_set_get_space(set1); - isl_aff *aff; - aff = isl_aff_zero_on_domain(isl_local_space_from_space(dim)); - aff = isl_aff_add_constant_si(aff, -1); - pwaff1 = isl_pw_aff_add(pwaff1, isl_pw_aff_alloc(set1, aff)); - } else - isl_set_free(set1); - - if (equal) - return isl_pw_aff_zero_set(pwaff1); - return isl_pw_aff_nonneg_set(pwaff1); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is equal to pwaff2. - */ -static __isl_give isl_set *pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_gte_set(pwaff1, pwaff2, 0, 1); -} - -__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return align_params_pw_pw_set_and(pwaff1, pwaff2, &pw_aff_eq_set); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is greater than or equal to pwaff2. - */ -static __isl_give isl_set *pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_gte_set(pwaff1, pwaff2, 0, 0); -} - -__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return align_params_pw_pw_set_and(pwaff1, pwaff2, &pw_aff_ge_set); -} - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is strictly greater than pwaff2. - */ -static __isl_give isl_set *pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return pw_aff_gte_set(pwaff1, pwaff2, 1, 0); -} - -__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return align_params_pw_pw_set_and(pwaff1, pwaff2, &pw_aff_gt_set); -} - -__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_ge_set(pwaff2, pwaff1); -} - -__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_gt_set(pwaff2, pwaff1); -} - -/* Return a set containing those elements in the shared domain - * of the elements of list1 and list2 where each element in list1 - * has the relation specified by "fn" with each element in list2. - */ -static __isl_give isl_set *pw_aff_list_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2, - __isl_give isl_set *(*fn)(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2)) -{ - int i, j; - isl_ctx *ctx; - isl_set *set; - - if (!list1 || !list2) - goto error; - - ctx = isl_pw_aff_list_get_ctx(list1); - if (list1->n < 1 || list2->n < 1) - isl_die(ctx, isl_error_invalid, - "list should contain at least one element", goto error); - - set = isl_set_universe(isl_pw_aff_get_domain_space(list1->p[0])); - for (i = 0; i < list1->n; ++i) - for (j = 0; j < list2->n; ++j) { - isl_set *set_ij; - - set_ij = fn(isl_pw_aff_copy(list1->p[i]), - isl_pw_aff_copy(list2->p[j])); - set = isl_set_intersect(set, set_ij); - } - - isl_pw_aff_list_free(list1); - isl_pw_aff_list_free(list2); - return set; -error: - isl_pw_aff_list_free(list1); - isl_pw_aff_list_free(list2); - return NULL; -} - -/* Return a set containing those elements in the shared domain - * of the elements of list1 and list2 where each element in list1 - * is equal to each element in list2. - */ -__isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2) -{ - return pw_aff_list_set(list1, list2, &isl_pw_aff_eq_set); -} - -__isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2) -{ - return pw_aff_list_set(list1, list2, &isl_pw_aff_ne_set); -} - -/* Return a set containing those elements in the shared domain - * of the elements of list1 and list2 where each element in list1 - * is less than or equal to each element in list2. - */ -__isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2) -{ - return pw_aff_list_set(list1, list2, &isl_pw_aff_le_set); -} - -__isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2) -{ - return pw_aff_list_set(list1, list2, &isl_pw_aff_lt_set); -} - -__isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2) -{ - return pw_aff_list_set(list1, list2, &isl_pw_aff_ge_set); -} - -__isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1, - __isl_take isl_pw_aff_list *list2) -{ - return pw_aff_list_set(list1, list2, &isl_pw_aff_gt_set); -} - - -/* Return a set containing those elements in the shared domain - * of pwaff1 and pwaff2 where pwaff1 is not equal to pwaff2. - */ -static __isl_give isl_set *pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - isl_set *set_lt, *set_gt; - - set_lt = isl_pw_aff_lt_set(isl_pw_aff_copy(pwaff1), - isl_pw_aff_copy(pwaff2)); - set_gt = isl_pw_aff_gt_set(pwaff1, pwaff2); - return isl_set_union_disjoint(set_lt, set_gt); -} - -__isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return align_params_pw_pw_set_and(pwaff1, pwaff2, &pw_aff_ne_set); -} - -__isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff, - isl_int v) -{ - int i; - - if (isl_int_is_one(v)) - return pwaff; - if (!isl_int_is_pos(v)) - isl_die(isl_pw_aff_get_ctx(pwaff), isl_error_invalid, - "factor needs to be positive", - return isl_pw_aff_free(pwaff)); - pwaff = isl_pw_aff_cow(pwaff); - if (!pwaff) - return NULL; - if (pwaff->n == 0) - return pwaff; - - for (i = 0; i < pwaff->n; ++i) { - pwaff->p[i].aff = isl_aff_scale_down(pwaff->p[i].aff, v); - if (!pwaff->p[i].aff) - return isl_pw_aff_free(pwaff); - } - - return pwaff; -} - -__isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff) -{ - int i; - - pwaff = isl_pw_aff_cow(pwaff); - if (!pwaff) - return NULL; - if (pwaff->n == 0) - return pwaff; - - for (i = 0; i < pwaff->n; ++i) { - pwaff->p[i].aff = isl_aff_floor(pwaff->p[i].aff); - if (!pwaff->p[i].aff) - return isl_pw_aff_free(pwaff); - } - - return pwaff; -} - -__isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff) -{ - int i; - - pwaff = isl_pw_aff_cow(pwaff); - if (!pwaff) - return NULL; - if (pwaff->n == 0) - return pwaff; - - for (i = 0; i < pwaff->n; ++i) { - pwaff->p[i].aff = isl_aff_ceil(pwaff->p[i].aff); - if (!pwaff->p[i].aff) - return isl_pw_aff_free(pwaff); - } - - return pwaff; -} - -/* Return an affine expression that is equal to pwaff_true for elements - * in "cond" and to pwaff_false for elements not in "cond". - * That is, return cond ? pwaff_true : pwaff_false; - */ -__isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_set *cond, - __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false) -{ - isl_set *comp; - - comp = isl_set_complement(isl_set_copy(cond)); - pwaff_true = isl_pw_aff_intersect_domain(pwaff_true, cond); - pwaff_false = isl_pw_aff_intersect_domain(pwaff_false, comp); - - return isl_pw_aff_add_disjoint(pwaff_true, pwaff_false); -} - -int isl_aff_is_cst(__isl_keep isl_aff *aff) -{ - if (!aff) - return -1; - - return isl_seq_first_non_zero(aff->v->el + 2, aff->v->size - 2) == -1; -} - -/* Check whether pwaff is a piecewise constant. - */ -int isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff) -{ - int i; - - if (!pwaff) - return -1; - - for (i = 0; i < pwaff->n; ++i) { - int is_cst = isl_aff_is_cst(pwaff->p[i].aff); - if (is_cst < 0 || !is_cst) - return is_cst; - } - - return 1; -} - -__isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1, - __isl_take isl_aff *aff2) -{ - if (!isl_aff_is_cst(aff2) && isl_aff_is_cst(aff1)) - return isl_aff_mul(aff2, aff1); - - if (!isl_aff_is_cst(aff2)) - isl_die(isl_aff_get_ctx(aff1), isl_error_invalid, - "at least one affine expression should be constant", - goto error); - - aff1 = isl_aff_cow(aff1); - if (!aff1 || !aff2) - goto error; - - aff1 = isl_aff_scale(aff1, aff2->v->el[1]); - aff1 = isl_aff_scale_down(aff1, aff2->v->el[0]); - - isl_aff_free(aff2); - return aff1; -error: - isl_aff_free(aff1); - isl_aff_free(aff2); - return NULL; -} - -static __isl_give isl_pw_aff *pw_aff_add(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_on_shared_domain(pwaff1, pwaff2, &isl_aff_add); -} - -__isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_align_params_pw_pw_and(pwaff1, pwaff2, &pw_aff_add); -} - -__isl_give isl_pw_aff *isl_pw_aff_union_add(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_union_add_(pwaff1, pwaff2); -} - -static __isl_give isl_pw_aff *pw_aff_mul(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_on_shared_domain(pwaff1, pwaff2, &isl_aff_mul); -} - -__isl_give isl_pw_aff *isl_pw_aff_mul(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_align_params_pw_pw_and(pwaff1, pwaff2, &pw_aff_mul); -} - -static __isl_give isl_pw_aff *pw_aff_min(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - isl_set *le; - - le = isl_pw_aff_le_set(isl_pw_aff_copy(pwaff1), - isl_pw_aff_copy(pwaff2)); - return isl_pw_aff_cond(le, pwaff1, pwaff2); -} - -__isl_give isl_pw_aff *isl_pw_aff_min(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_align_params_pw_pw_and(pwaff1, pwaff2, &pw_aff_min); -} - -static __isl_give isl_pw_aff *pw_aff_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - isl_set *le; - - le = isl_pw_aff_ge_set(isl_pw_aff_copy(pwaff1), - isl_pw_aff_copy(pwaff2)); - return isl_pw_aff_cond(le, pwaff1, pwaff2); -} - -__isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2) -{ - return isl_pw_aff_align_params_pw_pw_and(pwaff1, pwaff2, &pw_aff_max); -} - -static __isl_give isl_pw_aff *pw_aff_list_reduce( - __isl_take isl_pw_aff_list *list, - __isl_give isl_pw_aff *(*fn)(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2)) -{ - int i; - isl_ctx *ctx; - isl_pw_aff *res; - - if (!list) - return NULL; - - ctx = isl_pw_aff_list_get_ctx(list); - if (list->n < 1) - isl_die(ctx, isl_error_invalid, - "list should contain at least one element", - return isl_pw_aff_list_free(list)); - - res = isl_pw_aff_copy(list->p[0]); - for (i = 1; i < list->n; ++i) - res = fn(res, isl_pw_aff_copy(list->p[i])); - - isl_pw_aff_list_free(list); - return res; -} - -/* Return an isl_pw_aff that maps each element in the intersection of the - * domains of the elements of list to the minimal corresponding affine - * expression. - */ -__isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list) -{ - return pw_aff_list_reduce(list, &isl_pw_aff_min); -} - -/* Return an isl_pw_aff that maps each element in the intersection of the - * domains of the elements of list to the maximal corresponding affine - * expression. - */ -__isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list) -{ - return pw_aff_list_reduce(list, &isl_pw_aff_max); -} - -#undef BASE -#define BASE aff - -#include - -__isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1, - __isl_take isl_multi_aff *maff2) -{ - int i; - isl_ctx *ctx; - - maff1 = isl_multi_aff_cow(maff1); - if (!maff1 || !maff2) - goto error; - - ctx = isl_multi_aff_get_ctx(maff1); - if (!isl_space_is_equal(maff1->space, maff2->space)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", goto error); - - for (i = 0; i < maff1->n; ++i) { - maff1->p[i] = isl_aff_add(maff1->p[i], - isl_aff_copy(maff2->p[i])); - if (!maff1->p[i]) - goto error; - } - - isl_multi_aff_free(maff2); - return maff1; -error: - isl_multi_aff_free(maff1); - isl_multi_aff_free(maff2); - return NULL; -} - -/* Exploit the equalities in "eq" to simplify the affine expressions. - */ -static __isl_give isl_multi_aff *isl_multi_aff_substitute_equalities( - __isl_take isl_multi_aff *maff, __isl_take isl_basic_set *eq) -{ - int i; - - maff = isl_multi_aff_cow(maff); - if (!maff || !eq) - goto error; - - for (i = 0; i < maff->n; ++i) { - maff->p[i] = isl_aff_substitute_equalities(maff->p[i], - isl_basic_set_copy(eq)); - if (!maff->p[i]) - goto error; - } - - isl_basic_set_free(eq); - return maff; -error: - isl_basic_set_free(eq); - isl_multi_aff_free(maff); - return NULL; -} - -__isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff, - isl_int f) -{ - int i; - - maff = isl_multi_aff_cow(maff); - if (!maff) - return NULL; - - for (i = 0; i < maff->n; ++i) { - maff->p[i] = isl_aff_scale(maff->p[i], f); - if (!maff->p[i]) - return isl_multi_aff_free(maff); - } - - return maff; -} - -__isl_give isl_multi_aff *isl_multi_aff_add_on_domain(__isl_keep isl_set *dom, - __isl_take isl_multi_aff *maff1, __isl_take isl_multi_aff *maff2) -{ - maff1 = isl_multi_aff_add(maff1, maff2); - maff1 = isl_multi_aff_gist(maff1, isl_set_copy(dom)); - return maff1; -} - -int isl_multi_aff_is_empty(__isl_keep isl_multi_aff *maff) -{ - if (!maff) - return -1; - - return 0; -} - -int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1, - __isl_keep isl_multi_aff *maff2) -{ - int i; - int equal; - - if (!maff1 || !maff2) - return -1; - if (maff1->n != maff2->n) - return 0; - equal = isl_space_is_equal(maff1->space, maff2->space); - if (equal < 0 || !equal) - return equal; - - for (i = 0; i < maff1->n; ++i) { - equal = isl_aff_plain_is_equal(maff1->p[i], maff2->p[i]); - if (equal < 0 || !equal) - return equal; - } - - return 1; -} - -__isl_give isl_multi_aff *isl_multi_aff_set_dim_name( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - - maff = isl_multi_aff_cow(maff); - if (!maff) - return NULL; - - maff->space = isl_space_set_dim_name(maff->space, type, pos, s); - if (!maff->space) - return isl_multi_aff_free(maff); - for (i = 0; i < maff->n; ++i) { - maff->p[i] = isl_aff_set_dim_name(maff->p[i], type, pos, s); - if (!maff->p[i]) - return isl_multi_aff_free(maff); - } - - return maff; -} - -__isl_give isl_multi_aff *isl_multi_aff_drop_dims(__isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - maff = isl_multi_aff_cow(maff); - if (!maff) - return NULL; - - maff->space = isl_space_drop_dims(maff->space, type, first, n); - if (!maff->space) - return isl_multi_aff_free(maff); - for (i = 0; i < maff->n; ++i) { - maff->p[i] = isl_aff_drop_dims(maff->p[i], type, first, n); - if (!maff->p[i]) - return isl_multi_aff_free(maff); - } - - return maff; -} - -#undef PW -#define PW isl_pw_multi_aff -#undef EL -#define EL isl_multi_aff -#undef EL_IS_ZERO -#define EL_IS_ZERO is_empty -#undef ZERO -#define ZERO empty -#undef IS_ZERO -#define IS_ZERO is_empty -#undef FIELD -#define FIELD maff -#undef DEFAULT_IS_ZERO -#define DEFAULT_IS_ZERO 0 - -#define NO_NEG -#define NO_EVAL -#define NO_OPT -#define NO_INVOLVES_DIMS -#define NO_MOVE_DIMS -#define NO_INSERT_DIMS -#define NO_LIFT -#define NO_MORPH - -#include - -static __isl_give isl_pw_multi_aff *pw_multi_aff_add( - __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2) -{ - return isl_pw_multi_aff_on_shared_domain(pma1, pma2, - &isl_multi_aff_add); -} - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add( - __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2) -{ - return isl_pw_multi_aff_align_params_pw_pw_and(pma1, pma2, - &pw_multi_aff_add); -} - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add( - __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2) -{ - return isl_pw_multi_aff_union_add_(pma1, pma2); -} - -/* Construct a map mapping the domain the piecewise multi-affine expression - * to its range, with each dimension in the range equated to the - * corresponding affine expression on its cell. - */ -__isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma) -{ - int i; - isl_map *map; - - if (!pma) - return NULL; - - map = isl_map_empty(isl_pw_multi_aff_get_space(pma)); - - for (i = 0; i < pma->n; ++i) { - isl_multi_aff *maff; - isl_basic_map *bmap; - isl_map *map_i; - - maff = isl_multi_aff_copy(pma->p[i].maff); - bmap = isl_basic_map_from_multi_aff(maff); - map_i = isl_map_from_basic_map(bmap); - map_i = isl_map_intersect_domain(map_i, - isl_set_copy(pma->p[i].set)); - map = isl_map_union_disjoint(map, map_i); - } - - isl_pw_multi_aff_free(pma); - return map; -} - -__isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma) -{ - if (!isl_space_is_set(pma->dim)) - isl_die(isl_pw_multi_aff_get_ctx(pma), isl_error_invalid, - "isl_pw_multi_aff cannot be converted into an isl_set", - return isl_pw_multi_aff_free(pma)); - - return isl_map_from_pw_multi_aff(pma); -} - -/* Try and create an isl_pw_multi_aff that is equivalent to the given isl_map. - * This obivously only works if the input "map" is single-valued. - * If so, we compute the lexicographic minimum of the image in the form - * of an isl_pw_multi_aff. Since the image is unique, it is equal - * to its lexicographic minimum. - * If the input is not single-valued, we produce an error. - */ -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map) -{ - int i; - int sv; - isl_pw_multi_aff *pma; - - if (!map) - return NULL; - - sv = isl_map_is_single_valued(map); - if (sv < 0) - goto error; - if (!sv) - isl_die(isl_map_get_ctx(map), isl_error_invalid, - "map is not single-valued", goto error); - map = isl_map_make_disjoint(map); - if (!map) - return NULL; - - pma = isl_pw_multi_aff_empty(isl_map_get_space(map)); - - for (i = 0; i < map->n; ++i) { - isl_pw_multi_aff *pma_i; - isl_basic_map *bmap; - bmap = isl_basic_map_copy(map->p[i]); - pma_i = isl_basic_map_lexmin_pw_multi_aff(bmap); - pma = isl_pw_multi_aff_add_disjoint(pma, pma_i); - } - - isl_map_free(map); - return pma; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set) -{ - return isl_pw_multi_aff_from_map(set); -} - -/* Plug in "subs" for dimension "type", "pos" of "aff". - * - * Let i be the dimension to replace and let "subs" be of the form - * - * f/d - * - * and "aff" of the form - * - * (a i + g)/m - * - * The result is - * - * floor((a f + d g')/(m d)) - * - * where g' is the result of plugging in "subs" in each of the integer - * divisions in g. - */ -__isl_give isl_aff *isl_aff_substitute(__isl_take isl_aff *aff, - enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs) -{ - isl_ctx *ctx; - isl_int v; - - aff = isl_aff_cow(aff); - if (!aff || !subs) - return isl_aff_free(aff); - - ctx = isl_aff_get_ctx(aff); - if (!isl_space_is_equal(aff->ls->dim, subs->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", return isl_aff_free(aff)); - if (isl_local_space_dim(subs->ls, isl_dim_div) != 0) - isl_die(ctx, isl_error_unsupported, - "cannot handle divs yet", return isl_aff_free(aff)); - - aff->ls = isl_local_space_substitute(aff->ls, type, pos, subs); - if (!aff->ls) - return isl_aff_free(aff); - - aff->v = isl_vec_cow(aff->v); - if (!aff->v) - return isl_aff_free(aff); - - pos += isl_local_space_offset(aff->ls, type); - - isl_int_init(v); - isl_int_set(v, aff->v->el[1 + pos]); - isl_int_set_si(aff->v->el[1 + pos], 0); - isl_seq_combine(aff->v->el + 1, subs->v->el[0], aff->v->el + 1, - v, subs->v->el + 1, subs->v->size - 1); - isl_int_mul(aff->v->el[0], aff->v->el[0], subs->v->el[0]); - isl_int_clear(v); - - return aff; -} - -/* Plug in "subs" for dimension "type", "pos" in each of the affine - * expressions in "maff". - */ -__isl_give isl_multi_aff *isl_multi_aff_substitute( - __isl_take isl_multi_aff *maff, enum isl_dim_type type, unsigned pos, - __isl_keep isl_aff *subs) -{ - int i; - - maff = isl_multi_aff_cow(maff); - if (!maff || !subs) - return isl_multi_aff_free(maff); - - if (type == isl_dim_in) - type = isl_dim_set; - - for (i = 0; i < maff->n; ++i) { - maff->p[i] = isl_aff_substitute(maff->p[i], type, pos, subs); - if (!maff->p[i]) - return isl_multi_aff_free(maff); - } - - return maff; -} - -/* Plug in "subs" for dimension "type", "pos" of "pma". - * - * pma is of the form - * - * A_i(v) -> M_i(v) - * - * while subs is of the form - * - * v' = B_j(v) -> S_j - * - * Each pair i,j such that C_ij = A_i \cap B_i is non-empty - * has a contribution in the result, in particular - * - * C_ij(S_j) -> M_i(S_j) - * - * Note that plugging in S_j in C_ij may also result in an empty set - * and this contribution should simply be discarded. - */ -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_substitute( - __isl_take isl_pw_multi_aff *pma, enum isl_dim_type type, unsigned pos, - __isl_keep isl_pw_aff *subs) -{ - int i, j, n; - isl_pw_multi_aff *res; - - if (!pma || !subs) - return isl_pw_multi_aff_free(pma); - - n = pma->n * subs->n; - res = isl_pw_multi_aff_alloc_size(isl_space_copy(pma->dim), n); - - for (i = 0; i < pma->n; ++i) { - for (j = 0; j < subs->n; ++j) { - isl_set *common; - isl_multi_aff *res_ij; - common = isl_set_intersect( - isl_set_copy(pma->p[i].set), - isl_set_copy(subs->p[j].set)); - common = isl_set_substitute(common, - type, pos, subs->p[j].aff); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - res_ij = isl_multi_aff_substitute( - isl_multi_aff_copy(pma->p[i].maff), - type, pos, subs->p[j].aff); - - res = isl_pw_multi_aff_add_piece(res, common, res_ij); - } - } - - isl_pw_multi_aff_free(pma); - return res; -} - -/* Extend the local space of "dst" to include the divs - * in the local space of "src". - */ -__isl_give isl_aff *isl_aff_align_divs(__isl_take isl_aff *dst, - __isl_keep isl_aff *src) -{ - isl_ctx *ctx; - int *exp1 = NULL; - int *exp2 = NULL; - isl_mat *div; - - if (!src || !dst) - return isl_aff_free(dst); - - ctx = isl_aff_get_ctx(src); - if (!isl_space_is_equal(src->ls->dim, dst->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", goto error); - - if (src->ls->div->n_row == 0) - return dst; - - exp1 = isl_alloc_array(ctx, int, src->ls->div->n_row); - exp2 = isl_alloc_array(ctx, int, dst->ls->div->n_row); - if (!exp1 || !exp2) - goto error; - - div = isl_merge_divs(src->ls->div, dst->ls->div, exp1, exp2); - dst = isl_aff_expand_divs(dst, div, exp2); - free(exp1); - free(exp2); - - return dst; -error: - free(exp1); - free(exp2); - return isl_aff_free(dst); -} - -/* Adjust the local spaces of the affine expressions in "maff" - * such that they all have the save divs. - */ -__isl_give isl_multi_aff *isl_multi_aff_align_divs( - __isl_take isl_multi_aff *maff) -{ - int i; - - if (!maff) - return NULL; - if (maff->n == 0) - return maff; - maff = isl_multi_aff_cow(maff); - if (!maff) - return NULL; - - for (i = 1; i < maff->n; ++i) - maff->p[0] = isl_aff_align_divs(maff->p[0], maff->p[i]); - for (i = 1; i < maff->n; ++i) { - maff->p[i] = isl_aff_align_divs(maff->p[i], maff->p[0]); - if (!maff->p[i]) - return isl_multi_aff_free(maff); - } - - return maff; -} - -__isl_give isl_aff *isl_aff_lift(__isl_take isl_aff *aff) -{ - aff = isl_aff_cow(aff); - if (!aff) - return NULL; - - aff->ls = isl_local_space_lift(aff->ls); - if (!aff->ls) - return isl_aff_free(aff); - - return aff; -} - -/* Lift "maff" to a space with extra dimensions such that the result - * has no more existentially quantified variables. - * If "ls" is not NULL, then *ls is assigned the local space that lies - * at the basis of the lifting applied to "maff". - */ -__isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff, - __isl_give isl_local_space **ls) -{ - int i; - isl_space *space; - unsigned n_div; - - if (ls) - *ls = NULL; - - if (!maff) - return NULL; - - if (maff->n == 0) { - if (ls) { - isl_space *space = isl_multi_aff_get_domain_space(maff); - *ls = isl_local_space_from_space(space); - if (!*ls) - return isl_multi_aff_free(maff); - } - return maff; - } - - maff = isl_multi_aff_cow(maff); - maff = isl_multi_aff_align_divs(maff); - if (!maff) - return NULL; - - n_div = isl_aff_dim(maff->p[0], isl_dim_div); - space = isl_multi_aff_get_space(maff); - space = isl_space_lift(isl_space_domain(space), n_div); - space = isl_space_extend_domain_with_range(space, - isl_multi_aff_get_space(maff)); - if (!space) - return isl_multi_aff_free(maff); - isl_space_free(maff->space); - maff->space = space; - - if (ls) { - *ls = isl_aff_get_domain_local_space(maff->p[0]); - if (!*ls) - return isl_multi_aff_free(maff); - } - - for (i = 0; i < maff->n; ++i) { - maff->p[i] = isl_aff_lift(maff->p[i]); - if (!maff->p[i]) - goto error; - } - - return maff; -error: - if (ls) - isl_local_space_free(*ls); - return isl_multi_aff_free(maff); -} diff --git a/cloog-0.17.0/isl/isl_aff_private.h b/cloog-0.17.0/isl/isl_aff_private.h deleted file mode 100644 index 5a7c3e0970f164bb8fc9bd1dfed68dbe4a8dafed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_aff_private.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef ISL_AFF_PRIVATE_H -#define ISL_AFF_PRIVATE_H - -#include -#include -#include -#include - -/* ls represents the domain space. - */ -struct isl_aff { - int ref; - - isl_local_space *ls; - isl_vec *v; -}; - -struct isl_pw_aff_piece { - struct isl_set *set; - struct isl_aff *aff; -}; - -struct isl_pw_aff { - int ref; - - isl_space *dim; - - int n; - - size_t size; - struct isl_pw_aff_piece p[1]; -}; - -struct isl_pw_multi_aff_piece { - isl_set *set; - isl_multi_aff *maff; -}; - -struct isl_pw_multi_aff { - int ref; - - isl_space *dim; - - int n; - - size_t size; - struct isl_pw_multi_aff_piece p[1]; -}; - -__isl_give isl_aff *isl_aff_alloc(__isl_take isl_local_space *ls); - -__isl_give isl_aff *isl_aff_reset_space_and_domain(__isl_take isl_aff *aff, - __isl_take isl_space *space, __isl_take isl_space *domain); -__isl_give isl_aff *isl_aff_reset_domain_space(__isl_take isl_aff *aff, - __isl_take isl_space *dim); -__isl_give isl_aff *isl_aff_realign_domain(__isl_take isl_aff *aff, - __isl_take isl_reordering *r); - -__isl_give isl_aff *isl_aff_normalize(__isl_take isl_aff *aff); - -__isl_give isl_aff *isl_aff_expand_divs( __isl_take isl_aff *aff, - __isl_take isl_mat *div, int *exp); - -__isl_give isl_pw_aff *isl_pw_aff_alloc_size(__isl_take isl_space *space, - int n); -__isl_give isl_pw_aff *isl_pw_aff_reset_space(__isl_take isl_pw_aff *pwaff, - __isl_take isl_space *dim); -__isl_give isl_pw_aff *isl_pw_aff_reset_domain_space( - __isl_take isl_pw_aff *pwaff, __isl_take isl_space *space); -__isl_give isl_pw_aff *isl_pw_aff_add_disjoint( - __isl_take isl_pw_aff *pwaff1, __isl_take isl_pw_aff *pwaff2); - -__isl_give isl_pw_aff *isl_pw_aff_union_opt(__isl_take isl_pw_aff *pwaff1, - __isl_take isl_pw_aff *pwaff2, int max); - -#undef BASE -#define BASE aff - -#include - -__isl_give isl_multi_aff *isl_multi_aff_dup(__isl_keep isl_multi_aff *multi); -__isl_give isl_multi_aff *isl_multi_aff_align_params( - __isl_take isl_multi_aff *multi, __isl_take isl_space *model); - -__isl_give isl_multi_aff *isl_multi_aff_drop_dims( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_domain_space( - __isl_take isl_pw_multi_aff *pwmaff, __isl_take isl_space *space); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_space( - __isl_take isl_pw_multi_aff *pwmaff, __isl_take isl_space *space); -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add_disjoint( - __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_project_out( - __isl_take isl_pw_multi_aff *pma, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_substitute( - __isl_take isl_pw_multi_aff *pma, enum isl_dim_type type, unsigned pos, - __isl_keep isl_pw_aff *subs); - -#endif diff --git a/cloog-0.17.0/isl/isl_affine_hull.c b/cloog-0.17.0/isl/isl_affine_hull.c deleted file mode 100644 index 96af3134ab251e292551404947ba80f0a740537f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_affine_hull.c +++ /dev/null @@ -1,1018 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include "isl_equalities.h" -#include "isl_sample.h" -#include "isl_tab.h" -#include - -struct isl_basic_map *isl_basic_map_implicit_equalities( - struct isl_basic_map *bmap) -{ - struct isl_tab *tab; - - if (!bmap) - return bmap; - - bmap = isl_basic_map_gauss(bmap, NULL); - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NO_IMPLICIT)) - return bmap; - if (bmap->n_ineq <= 1) - return bmap; - - tab = isl_tab_from_basic_map(bmap); - if (isl_tab_detect_implicit_equalities(tab) < 0) - goto error; - bmap = isl_basic_map_update_from_tab(bmap, tab); - isl_tab_free(tab); - bmap = isl_basic_map_gauss(bmap, NULL); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - return bmap; -error: - isl_tab_free(tab); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_implicit_equalities( - struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_implicit_equalities((struct isl_basic_map*)bset); -} - -struct isl_map *isl_map_implicit_equalities(struct isl_map *map) -{ - int i; - - if (!map) - return map; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_implicit_equalities(map->p[i]); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Make eq[row][col] of both bmaps equal so we can add the row - * add the column to the common matrix. - * Note that because of the echelon form, the columns of row row - * after column col are zero. - */ -static void set_common_multiple( - struct isl_basic_set *bset1, struct isl_basic_set *bset2, - unsigned row, unsigned col) -{ - isl_int m, c; - - if (isl_int_eq(bset1->eq[row][col], bset2->eq[row][col])) - return; - - isl_int_init(c); - isl_int_init(m); - isl_int_lcm(m, bset1->eq[row][col], bset2->eq[row][col]); - isl_int_divexact(c, m, bset1->eq[row][col]); - isl_seq_scale(bset1->eq[row], bset1->eq[row], c, col+1); - isl_int_divexact(c, m, bset2->eq[row][col]); - isl_seq_scale(bset2->eq[row], bset2->eq[row], c, col+1); - isl_int_clear(c); - isl_int_clear(m); -} - -/* Delete a given equality, moving all the following equalities one up. - */ -static void delete_row(struct isl_basic_set *bset, unsigned row) -{ - isl_int *t; - int r; - - t = bset->eq[row]; - bset->n_eq--; - for (r = row; r < bset->n_eq; ++r) - bset->eq[r] = bset->eq[r+1]; - bset->eq[bset->n_eq] = t; -} - -/* Make first row entries in column col of bset1 identical to - * those of bset2, using the fact that entry bset1->eq[row][col]=a - * is non-zero. Initially, these elements of bset1 are all zero. - * For each row i < row, we set - * A[i] = a * A[i] + B[i][col] * A[row] - * B[i] = a * B[i] - * so that - * A[i][col] = B[i][col] = a * old(B[i][col]) - */ -static void construct_column( - struct isl_basic_set *bset1, struct isl_basic_set *bset2, - unsigned row, unsigned col) -{ - int r; - isl_int a; - isl_int b; - unsigned total; - - isl_int_init(a); - isl_int_init(b); - total = 1 + isl_basic_set_n_dim(bset1); - for (r = 0; r < row; ++r) { - if (isl_int_is_zero(bset2->eq[r][col])) - continue; - isl_int_gcd(b, bset2->eq[r][col], bset1->eq[row][col]); - isl_int_divexact(a, bset1->eq[row][col], b); - isl_int_divexact(b, bset2->eq[r][col], b); - isl_seq_combine(bset1->eq[r], a, bset1->eq[r], - b, bset1->eq[row], total); - isl_seq_scale(bset2->eq[r], bset2->eq[r], a, total); - } - isl_int_clear(a); - isl_int_clear(b); - delete_row(bset1, row); -} - -/* Make first row entries in column col of bset1 identical to - * those of bset2, using only these entries of the two matrices. - * Let t be the last row with different entries. - * For each row i < t, we set - * A[i] = (A[t][col]-B[t][col]) * A[i] + (B[i][col]-A[i][col) * A[t] - * B[i] = (A[t][col]-B[t][col]) * B[i] + (B[i][col]-A[i][col) * B[t] - * so that - * A[i][col] = B[i][col] = old(A[t][col]*B[i][col]-A[i][col]*B[t][col]) - */ -static int transform_column( - struct isl_basic_set *bset1, struct isl_basic_set *bset2, - unsigned row, unsigned col) -{ - int i, t; - isl_int a, b, g; - unsigned total; - - for (t = row-1; t >= 0; --t) - if (isl_int_ne(bset1->eq[t][col], bset2->eq[t][col])) - break; - if (t < 0) - return 0; - - total = 1 + isl_basic_set_n_dim(bset1); - isl_int_init(a); - isl_int_init(b); - isl_int_init(g); - isl_int_sub(b, bset1->eq[t][col], bset2->eq[t][col]); - for (i = 0; i < t; ++i) { - isl_int_sub(a, bset2->eq[i][col], bset1->eq[i][col]); - isl_int_gcd(g, a, b); - isl_int_divexact(a, a, g); - isl_int_divexact(g, b, g); - isl_seq_combine(bset1->eq[i], g, bset1->eq[i], a, bset1->eq[t], - total); - isl_seq_combine(bset2->eq[i], g, bset2->eq[i], a, bset2->eq[t], - total); - } - isl_int_clear(a); - isl_int_clear(b); - isl_int_clear(g); - delete_row(bset1, t); - delete_row(bset2, t); - return 1; -} - -/* The implementation is based on Section 5.2 of Michael Karr, - * "Affine Relationships Among Variables of a Program", - * except that the echelon form we use starts from the last column - * and that we are dealing with integer coefficients. - */ -static struct isl_basic_set *affine_hull( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - unsigned total; - int col; - int row; - - if (!bset1 || !bset2) - goto error; - - total = 1 + isl_basic_set_n_dim(bset1); - - row = 0; - for (col = total-1; col >= 0; --col) { - int is_zero1 = row >= bset1->n_eq || - isl_int_is_zero(bset1->eq[row][col]); - int is_zero2 = row >= bset2->n_eq || - isl_int_is_zero(bset2->eq[row][col]); - if (!is_zero1 && !is_zero2) { - set_common_multiple(bset1, bset2, row, col); - ++row; - } else if (!is_zero1 && is_zero2) { - construct_column(bset1, bset2, row, col); - } else if (is_zero1 && !is_zero2) { - construct_column(bset2, bset1, row, col); - } else { - if (transform_column(bset1, bset2, row, col)) - --row; - } - } - isl_assert(bset1->ctx, row == bset1->n_eq, goto error); - isl_basic_set_free(bset2); - bset1 = isl_basic_set_normalize_constraints(bset1); - return bset1; -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Find an integer point in the set represented by "tab" - * that lies outside of the equality "eq" e(x) = 0. - * If "up" is true, look for a point satisfying e(x) - 1 >= 0. - * Otherwise, look for a point satisfying -e(x) - 1 >= 0 (i.e., e(x) <= -1). - * The point, if found, is returned. - * If no point can be found, a zero-length vector is returned. - * - * Before solving an ILP problem, we first check if simply - * adding the normal of the constraint to one of the known - * integer points in the basic set represented by "tab" - * yields another point inside the basic set. - * - * The caller of this function ensures that the tableau is bounded or - * that tab->basis and tab->n_unbounded have been set appropriately. - */ -static struct isl_vec *outside_point(struct isl_tab *tab, isl_int *eq, int up) -{ - struct isl_ctx *ctx; - struct isl_vec *sample = NULL; - struct isl_tab_undo *snap; - unsigned dim; - - if (!tab) - return NULL; - ctx = tab->mat->ctx; - - dim = tab->n_var; - sample = isl_vec_alloc(ctx, 1 + dim); - if (!sample) - return NULL; - isl_int_set_si(sample->el[0], 1); - isl_seq_combine(sample->el + 1, - ctx->one, tab->bmap->sample->el + 1, - up ? ctx->one : ctx->negone, eq + 1, dim); - if (isl_basic_map_contains(tab->bmap, sample)) - return sample; - isl_vec_free(sample); - sample = NULL; - - snap = isl_tab_snap(tab); - - if (!up) - isl_seq_neg(eq, eq, 1 + dim); - isl_int_sub_ui(eq[0], eq[0], 1); - - if (isl_tab_extend_cons(tab, 1) < 0) - goto error; - if (isl_tab_add_ineq(tab, eq) < 0) - goto error; - - sample = isl_tab_sample(tab); - - isl_int_add_ui(eq[0], eq[0], 1); - if (!up) - isl_seq_neg(eq, eq, 1 + dim); - - if (sample && isl_tab_rollback(tab, snap) < 0) - goto error; - - return sample; -error: - isl_vec_free(sample); - return NULL; -} - -struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset) -{ - int i; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - isl_assert(bset->ctx, bset->n_div == 0, goto error); - - for (i = 0; i < bset->n_eq; ++i) - isl_int_set_si(bset->eq[i][0], 0); - - for (i = 0; i < bset->n_ineq; ++i) - isl_int_set_si(bset->ineq[i][0], 0); - - ISL_F_CLR(bset, ISL_BASIC_SET_NO_IMPLICIT); - return isl_basic_set_implicit_equalities(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_set *isl_set_recession_cone(__isl_take isl_set *set) -{ - int i; - - if (!set) - return NULL; - if (set->n == 0) - return set; - - set = isl_set_remove_divs(set); - set = isl_set_cow(set); - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_recession_cone(set->p[i]); - if (!set->p[i]) - goto error; - } - - return set; -error: - isl_set_free(set); - return NULL; -} - -/* Extend an initial (under-)approximation of the affine hull of basic - * set represented by the tableau "tab" - * by looking for points that do not satisfy one of the equalities - * in the current approximation and adding them to that approximation - * until no such points can be found any more. - * - * The caller of this function ensures that "tab" is bounded or - * that tab->basis and tab->n_unbounded have been set appropriately. - */ -static struct isl_basic_set *extend_affine_hull(struct isl_tab *tab, - struct isl_basic_set *hull) -{ - int i, j; - unsigned dim; - - if (!tab || !hull) - goto error; - - dim = tab->n_var; - - if (isl_tab_extend_cons(tab, 2 * dim + 1) < 0) - goto error; - - for (i = 0; i < dim; ++i) { - struct isl_vec *sample; - struct isl_basic_set *point; - for (j = 0; j < hull->n_eq; ++j) { - sample = outside_point(tab, hull->eq[j], 1); - if (!sample) - goto error; - if (sample->size > 0) - break; - isl_vec_free(sample); - sample = outside_point(tab, hull->eq[j], 0); - if (!sample) - goto error; - if (sample->size > 0) - break; - isl_vec_free(sample); - - if (isl_tab_add_eq(tab, hull->eq[j]) < 0) - goto error; - } - if (j == hull->n_eq) - break; - if (tab->samples) - tab = isl_tab_add_sample(tab, isl_vec_copy(sample)); - if (!tab) - goto error; - point = isl_basic_set_from_vec(sample); - hull = affine_hull(hull, point); - if (!hull) - return NULL; - } - - return hull; -error: - isl_basic_set_free(hull); - return NULL; -} - -/* Drop all constraints in bset that involve any of the dimensions - * first to first+n-1. - */ -__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving( - __isl_take isl_basic_set *bset, unsigned first, unsigned n) -{ - int i; - - if (n == 0) - return bset; - - bset = isl_basic_set_cow(bset); - - if (!bset) - return NULL; - - for (i = bset->n_eq - 1; i >= 0; --i) { - if (isl_seq_first_non_zero(bset->eq[i] + 1 + first, n) == -1) - continue; - isl_basic_set_drop_equality(bset, i); - } - - for (i = bset->n_ineq - 1; i >= 0; --i) { - if (isl_seq_first_non_zero(bset->ineq[i] + 1 + first, n) == -1) - continue; - isl_basic_set_drop_inequality(bset, i); - } - - return bset; -} - -/* Look for all equalities satisfied by the integer points in bset, - * which is assumed to be bounded. - * - * The equalities are obtained by successively looking for - * a point that is affinely independent of the points found so far. - * In particular, for each equality satisfied by the points so far, - * we check if there is any point on a hyperplane parallel to the - * corresponding hyperplane shifted by at least one (in either direction). - */ -static struct isl_basic_set *uset_affine_hull_bounded(struct isl_basic_set *bset) -{ - struct isl_vec *sample = NULL; - struct isl_basic_set *hull; - struct isl_tab *tab = NULL; - unsigned dim; - - if (isl_basic_set_plain_is_empty(bset)) - return bset; - - dim = isl_basic_set_n_dim(bset); - - if (bset->sample && bset->sample->size == 1 + dim) { - int contains = isl_basic_set_contains(bset, bset->sample); - if (contains < 0) - goto error; - if (contains) { - if (dim == 0) - return bset; - sample = isl_vec_copy(bset->sample); - } else { - isl_vec_free(bset->sample); - bset->sample = NULL; - } - } - - tab = isl_tab_from_basic_set(bset); - if (!tab) - goto error; - if (tab->empty) { - isl_tab_free(tab); - isl_vec_free(sample); - return isl_basic_set_set_to_empty(bset); - } - if (isl_tab_track_bset(tab, isl_basic_set_copy(bset)) < 0) - goto error; - - if (!sample) { - struct isl_tab_undo *snap; - snap = isl_tab_snap(tab); - sample = isl_tab_sample(tab); - if (isl_tab_rollback(tab, snap) < 0) - goto error; - isl_vec_free(tab->bmap->sample); - tab->bmap->sample = isl_vec_copy(sample); - } - - if (!sample) - goto error; - if (sample->size == 0) { - isl_tab_free(tab); - isl_vec_free(sample); - return isl_basic_set_set_to_empty(bset); - } - - hull = isl_basic_set_from_vec(sample); - - isl_basic_set_free(bset); - hull = extend_affine_hull(tab, hull); - isl_tab_free(tab); - - return hull; -error: - isl_vec_free(sample); - isl_tab_free(tab); - isl_basic_set_free(bset); - return NULL; -} - -/* Given an unbounded tableau and an integer point satisfying the tableau, - * construct an initial affine hull containing the recession cone - * shifted to the given point. - * - * The unbounded directions are taken from the last rows of the basis, - * which is assumed to have been initialized appropriately. - */ -static __isl_give isl_basic_set *initial_hull(struct isl_tab *tab, - __isl_take isl_vec *vec) -{ - int i; - int k; - struct isl_basic_set *bset = NULL; - struct isl_ctx *ctx; - unsigned dim; - - if (!vec || !tab) - return NULL; - ctx = vec->ctx; - isl_assert(ctx, vec->size != 0, goto error); - - bset = isl_basic_set_alloc(ctx, 0, vec->size - 1, 0, vec->size - 1, 0); - if (!bset) - goto error; - dim = isl_basic_set_n_dim(bset) - tab->n_unbounded; - for (i = 0; i < dim; ++i) { - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k] + 1, tab->basis->row[1 + i] + 1, - vec->size - 1); - isl_seq_inner_product(bset->eq[k] + 1, vec->el +1, - vec->size - 1, &bset->eq[k][0]); - isl_int_neg(bset->eq[k][0], bset->eq[k][0]); - } - bset->sample = vec; - bset = isl_basic_set_gauss(bset, NULL); - - return bset; -error: - isl_basic_set_free(bset); - isl_vec_free(vec); - return NULL; -} - -/* Given a tableau of a set and a tableau of the corresponding - * recession cone, detect and add all equalities to the tableau. - * If the tableau is bounded, then we can simply keep the - * tableau in its state after the return from extend_affine_hull. - * However, if the tableau is unbounded, then - * isl_tab_set_initial_basis_with_cone will add some additional - * constraints to the tableau that have to be removed again. - * In this case, we therefore rollback to the state before - * any constraints were added and then add the equalities back in. - */ -struct isl_tab *isl_tab_detect_equalities(struct isl_tab *tab, - struct isl_tab *tab_cone) -{ - int j; - struct isl_vec *sample; - struct isl_basic_set *hull; - struct isl_tab_undo *snap; - - if (!tab || !tab_cone) - goto error; - - snap = isl_tab_snap(tab); - - isl_mat_free(tab->basis); - tab->basis = NULL; - - isl_assert(tab->mat->ctx, tab->bmap, goto error); - isl_assert(tab->mat->ctx, tab->samples, goto error); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, goto error); - isl_assert(tab->mat->ctx, tab->n_sample > tab->n_outside, goto error); - - if (isl_tab_set_initial_basis_with_cone(tab, tab_cone) < 0) - goto error; - - sample = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!sample) - goto error; - - isl_seq_cpy(sample->el, tab->samples->row[tab->n_outside], sample->size); - - isl_vec_free(tab->bmap->sample); - tab->bmap->sample = isl_vec_copy(sample); - - if (tab->n_unbounded == 0) - hull = isl_basic_set_from_vec(isl_vec_copy(sample)); - else - hull = initial_hull(tab, isl_vec_copy(sample)); - - for (j = tab->n_outside + 1; j < tab->n_sample; ++j) { - isl_seq_cpy(sample->el, tab->samples->row[j], sample->size); - hull = affine_hull(hull, - isl_basic_set_from_vec(isl_vec_copy(sample))); - } - - isl_vec_free(sample); - - hull = extend_affine_hull(tab, hull); - if (!hull) - goto error; - - if (tab->n_unbounded == 0) { - isl_basic_set_free(hull); - return tab; - } - - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - if (hull->n_eq > tab->n_zero) { - for (j = 0; j < hull->n_eq; ++j) { - isl_seq_normalize(tab->mat->ctx, hull->eq[j], 1 + tab->n_var); - if (isl_tab_add_eq(tab, hull->eq[j]) < 0) - goto error; - } - } - - isl_basic_set_free(hull); - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Compute the affine hull of "bset", where "cone" is the recession cone - * of "bset". - * - * We first compute a unimodular transformation that puts the unbounded - * directions in the last dimensions. In particular, we take a transformation - * that maps all equalities to equalities (in HNF) on the first dimensions. - * Let x be the original dimensions and y the transformed, with y_1 bounded - * and y_2 unbounded. - * - * [ y_1 ] [ y_1 ] [ Q_1 ] - * x = U [ y_2 ] [ y_2 ] = [ Q_2 ] x - * - * Let's call the input basic set S. We compute S' = preimage(S, U) - * and drop the final dimensions including any constraints involving them. - * This results in set S''. - * Then we compute the affine hull A'' of S''. - * Let F y_1 >= g be the constraint system of A''. In the transformed - * space the y_2 are unbounded, so we can add them back without any constraints, - * resulting in - * - * [ y_1 ] - * [ F 0 ] [ y_2 ] >= g - * or - * [ Q_1 ] - * [ F 0 ] [ Q_2 ] x >= g - * or - * F Q_1 x >= g - * - * The affine hull in the original space is then obtained as - * A = preimage(A'', Q_1). - */ -static struct isl_basic_set *affine_hull_with_cone(struct isl_basic_set *bset, - struct isl_basic_set *cone) -{ - unsigned total; - unsigned cone_dim; - struct isl_basic_set *hull; - struct isl_mat *M, *U, *Q; - - if (!bset || !cone) - goto error; - - total = isl_basic_set_total_dim(cone); - cone_dim = total - cone->n_eq; - - M = isl_mat_sub_alloc6(bset->ctx, cone->eq, 0, cone->n_eq, 1, total); - M = isl_mat_left_hermite(M, 0, &U, &Q); - if (!M) - goto error; - isl_mat_free(M); - - U = isl_mat_lin_to_aff(U); - bset = isl_basic_set_preimage(bset, isl_mat_copy(U)); - - bset = isl_basic_set_drop_constraints_involving(bset, total - cone_dim, - cone_dim); - bset = isl_basic_set_drop_dims(bset, total - cone_dim, cone_dim); - - Q = isl_mat_lin_to_aff(Q); - Q = isl_mat_drop_rows(Q, 1 + total - cone_dim, cone_dim); - - if (bset && bset->sample && bset->sample->size == 1 + total) - bset->sample = isl_mat_vec_product(isl_mat_copy(Q), bset->sample); - - hull = uset_affine_hull_bounded(bset); - - if (!hull) - isl_mat_free(U); - else { - struct isl_vec *sample = isl_vec_copy(hull->sample); - U = isl_mat_drop_cols(U, 1 + total - cone_dim, cone_dim); - if (sample && sample->size > 0) - sample = isl_mat_vec_product(U, sample); - else - isl_mat_free(U); - hull = isl_basic_set_preimage(hull, Q); - if (hull) { - isl_vec_free(hull->sample); - hull->sample = sample; - } else - isl_vec_free(sample); - } - - isl_basic_set_free(cone); - - return hull; -error: - isl_basic_set_free(bset); - isl_basic_set_free(cone); - return NULL; -} - -/* Look for all equalities satisfied by the integer points in bset, - * which is assumed not to have any explicit equalities. - * - * The equalities are obtained by successively looking for - * a point that is affinely independent of the points found so far. - * In particular, for each equality satisfied by the points so far, - * we check if there is any point on a hyperplane parallel to the - * corresponding hyperplane shifted by at least one (in either direction). - * - * Before looking for any outside points, we first compute the recession - * cone. The directions of this recession cone will always be part - * of the affine hull, so there is no need for looking for any points - * in these directions. - * In particular, if the recession cone is full-dimensional, then - * the affine hull is simply the whole universe. - */ -static struct isl_basic_set *uset_affine_hull(struct isl_basic_set *bset) -{ - struct isl_basic_set *cone; - - if (isl_basic_set_plain_is_empty(bset)) - return bset; - - cone = isl_basic_set_recession_cone(isl_basic_set_copy(bset)); - if (!cone) - goto error; - if (cone->n_eq == 0) { - struct isl_basic_set *hull; - isl_basic_set_free(cone); - hull = isl_basic_set_universe_like(bset); - isl_basic_set_free(bset); - return hull; - } - - if (cone->n_eq < isl_basic_set_total_dim(cone)) - return affine_hull_with_cone(bset, cone); - - isl_basic_set_free(cone); - return uset_affine_hull_bounded(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Look for all equalities satisfied by the integer points in bmap - * that are independent of the equalities already explicitly available - * in bmap. - * - * We first remove all equalities already explicitly available, - * then look for additional equalities in the reduced space - * and then transform the result to the original space. - * The original equalities are _not_ added to this set. This is - * the responsibility of the calling function. - * The resulting basic set has all meaning about the dimensions removed. - * In particular, dimensions that correspond to existential variables - * in bmap and that are found to be fixed are not removed. - */ -static struct isl_basic_set *equalities_in_underlying_set( - struct isl_basic_map *bmap) -{ - struct isl_mat *T1 = NULL; - struct isl_mat *T2 = NULL; - struct isl_basic_set *bset = NULL; - struct isl_basic_set *hull = NULL; - - bset = isl_basic_map_underlying_set(bmap); - if (!bset) - return NULL; - if (bset->n_eq) - bset = isl_basic_set_remove_equalities(bset, &T1, &T2); - if (!bset) - goto error; - - hull = uset_affine_hull(bset); - if (!T2) - return hull; - - if (!hull) { - isl_mat_free(T1); - isl_mat_free(T2); - } else { - struct isl_vec *sample = isl_vec_copy(hull->sample); - if (sample && sample->size > 0) - sample = isl_mat_vec_product(T1, sample); - else - isl_mat_free(T1); - hull = isl_basic_set_preimage(hull, T2); - if (hull) { - isl_vec_free(hull->sample); - hull->sample = sample; - } else - isl_vec_free(sample); - } - - return hull; -error: - isl_mat_free(T2); - isl_basic_set_free(bset); - isl_basic_set_free(hull); - return NULL; -} - -/* Detect and make explicit all equalities satisfied by the (integer) - * points in bmap. - */ -struct isl_basic_map *isl_basic_map_detect_equalities( - struct isl_basic_map *bmap) -{ - int i, j; - struct isl_basic_set *hull = NULL; - - if (!bmap) - return NULL; - if (bmap->n_ineq == 0) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_ALL_EQUALITIES)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return isl_basic_map_implicit_equalities(bmap); - - hull = equalities_in_underlying_set(isl_basic_map_copy(bmap)); - if (!hull) - goto error; - if (ISL_F_ISSET(hull, ISL_BASIC_SET_EMPTY)) { - isl_basic_set_free(hull); - return isl_basic_map_set_to_empty(bmap); - } - bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim), 0, - hull->n_eq, 0); - for (i = 0; i < hull->n_eq; ++i) { - j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_cpy(bmap->eq[j], hull->eq[i], - 1 + isl_basic_set_total_dim(hull)); - } - isl_vec_free(bmap->sample); - bmap->sample = isl_vec_copy(hull->sample); - isl_basic_set_free(hull); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_IMPLICIT | ISL_BASIC_MAP_ALL_EQUALITIES); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_set_free(hull); - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_detect_equalities( - __isl_take isl_basic_set *bset) -{ - return (isl_basic_set *) - isl_basic_map_detect_equalities((isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, - __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap)) -{ - struct isl_basic_map *bmap; - int i; - - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - bmap = isl_basic_map_copy(map->p[i]); - bmap = fn(bmap); - if (!bmap) - goto error; - isl_basic_map_free(map->p[i]); - map->p[i] = bmap; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_detect_equalities(__isl_take isl_map *map) -{ - return isl_map_inline_foreach_basic_map(map, - &isl_basic_map_detect_equalities); -} - -__isl_give isl_set *isl_set_detect_equalities(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_detect_equalities((isl_map *)set); -} - -/* After computing the rational affine hull (by detecting the implicit - * equalities), we compute the additional equalities satisfied by - * the integer points (if any) and add the original equalities back in. - */ -struct isl_basic_map *isl_basic_map_affine_hull(struct isl_basic_map *bmap) -{ - bmap = isl_basic_map_detect_equalities(bmap); - bmap = isl_basic_map_cow(bmap); - if (bmap) - isl_basic_map_free_inequality(bmap, bmap->n_ineq); - bmap = isl_basic_map_finalize(bmap); - return bmap; -} - -struct isl_basic_set *isl_basic_set_affine_hull(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_affine_hull((struct isl_basic_map *)bset); -} - -struct isl_basic_map *isl_map_affine_hull(struct isl_map *map) -{ - int i; - struct isl_basic_map *model = NULL; - struct isl_basic_map *hull = NULL; - struct isl_set *set; - - map = isl_map_detect_equalities(map); - map = isl_map_align_divs(map); - - if (!map) - return NULL; - - if (map->n == 0) { - hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return hull; - } - - model = isl_basic_map_copy(map->p[0]); - set = isl_map_underlying_set(map); - set = isl_set_cow(set); - if (!set) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_cow(set->p[i]); - set->p[i] = isl_basic_set_affine_hull(set->p[i]); - set->p[i] = isl_basic_set_gauss(set->p[i], NULL); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); - if (set->n == 0) { - hull = isl_basic_map_empty_like(model); - isl_basic_map_free(model); - } else { - struct isl_basic_set *bset; - while (set->n > 1) { - set->p[0] = affine_hull(set->p[0], set->p[--set->n]); - if (!set->p[0]) - goto error; - } - bset = isl_basic_set_copy(set->p[0]); - hull = isl_basic_map_overlying_set(bset, model); - } - isl_set_free(set); - hull = isl_basic_map_simplify(hull); - return isl_basic_map_finalize(hull); -error: - isl_basic_map_free(model); - isl_set_free(set); - return NULL; -} - -struct isl_basic_set *isl_set_affine_hull(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_affine_hull((struct isl_map *)set); -} diff --git a/cloog-0.17.0/isl/isl_arg.c b/cloog-0.17.0/isl/isl_arg.c deleted file mode 100644 index 6961a0783350beb9b4494ac5e02e995fa7115186..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_arg.c +++ /dev/null @@ -1,1205 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -#include -#include - -static struct isl_arg help_arg[] = { -ISL_ARG_PHANTOM_BOOL('h', "help", NULL, "print this help, then exit") -}; - -static void set_default_choice(struct isl_arg *arg, void *opt) -{ - *(unsigned *)(((char *)opt) + arg->offset) = arg->u.choice.default_value; -} - -static void set_default_flags(struct isl_arg *arg, void *opt) -{ - *(unsigned *)(((char *)opt) + arg->offset) = arg->u.flags.default_value; -} - -static void set_default_bool(struct isl_arg *arg, void *opt) -{ - if (arg->offset == (size_t) -1) - return; - *(unsigned *)(((char *)opt) + arg->offset) = arg->u.b.default_value; -} - -static void set_default_child(struct isl_arg *arg, void *opt) -{ - void *child; - - if (arg->offset == (size_t) -1) - child = opt; - else { - child = calloc(1, arg->u.child.child->options_size); - *(void **)(((char *)opt) + arg->offset) = child; - } - - if (child) - isl_args_set_defaults(arg->u.child.child, child); -} - -static void set_default_user(struct isl_arg *arg, void *opt) -{ - arg->u.user.init(((char *)opt) + arg->offset); -} - -static void set_default_int(struct isl_arg *arg, void *opt) -{ - *(int *)(((char *)opt) + arg->offset) = arg->u.i.default_value; -} - -static void set_default_long(struct isl_arg *arg, void *opt) -{ - *(long *)(((char *)opt) + arg->offset) = arg->u.l.default_value; -} - -static void set_default_ulong(struct isl_arg *arg, void *opt) -{ - *(unsigned long *)(((char *)opt) + arg->offset) = arg->u.ul.default_value; -} - -static void set_default_str(struct isl_arg *arg, void *opt) -{ - const char *str = NULL; - if (arg->u.str.default_value) - str = strdup(arg->u.str.default_value); - *(const char **)(((char *)opt) + arg->offset) = str; -} - -static void set_default_str_list(struct isl_arg *arg, void *opt) -{ - *(const char ***)(((char *) opt) + arg->offset) = NULL; - *(int *)(((char *) opt) + arg->u.str_list.offset_n) = 0; -} - -void isl_args_set_defaults(struct isl_args *args, void *opt) -{ - int i; - - for (i = 0; args->args[i].type != isl_arg_end; ++i) { - switch (args->args[i].type) { - case isl_arg_choice: - set_default_choice(&args->args[i], opt); - break; - case isl_arg_flags: - set_default_flags(&args->args[i], opt); - break; - case isl_arg_bool: - set_default_bool(&args->args[i], opt); - break; - case isl_arg_child: - set_default_child(&args->args[i], opt); - break; - case isl_arg_user: - set_default_user(&args->args[i], opt); - break; - case isl_arg_int: - set_default_int(&args->args[i], opt); - break; - case isl_arg_long: - set_default_long(&args->args[i], opt); - break; - case isl_arg_ulong: - set_default_ulong(&args->args[i], opt); - break; - case isl_arg_arg: - case isl_arg_str: - set_default_str(&args->args[i], opt); - break; - case isl_arg_str_list: - set_default_str_list(&args->args[i], opt); - break; - case isl_arg_alias: - case isl_arg_footer: - case isl_arg_version: - case isl_arg_end: - break; - } - } -} - -static void free_str_list(struct isl_arg *arg, void *opt) -{ - int i; - int n = *(int *)(((char *) opt) + arg->u.str_list.offset_n); - char **list = *(char ***)(((char *) opt) + arg->offset); - - for (i = 0; i < n; ++i) - free(list[i]); - free(list); -} - -static void free_args(struct isl_arg *arg, void *opt) -{ - int i; - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - switch (arg[i].type) { - case isl_arg_child: - if (arg[i].offset == (size_t) -1) - free_args(arg[i].u.child.child->args, opt); - else - isl_args_free(arg[i].u.child.child, - *(void **)(((char *)opt) + arg[i].offset)); - break; - case isl_arg_arg: - case isl_arg_str: - free(*(char **)(((char *)opt) + arg[i].offset)); - break; - case isl_arg_str_list: - free_str_list(&arg[i], opt); - break; - case isl_arg_user: - if (arg[i].u.user.clear) - arg[i].u.user.clear(((char *)opt) + arg[i].offset); - break; - case isl_arg_alias: - case isl_arg_bool: - case isl_arg_choice: - case isl_arg_flags: - case isl_arg_int: - case isl_arg_long: - case isl_arg_ulong: - case isl_arg_version: - case isl_arg_footer: - case isl_arg_end: - break; - } - } -} - -void isl_args_free(struct isl_args *args, void *opt) -{ - if (!opt) - return; - - free_args(args->args, opt); - - free(opt); -} - -static int print_arg_help(struct isl_arg *decl, const char *prefix, int no) -{ - int len = 0; - - if (!decl->long_name) { - printf(" -%c", decl->short_name); - return 4; - } - - if (decl->short_name) { - printf(" -%c, --", decl->short_name); - len += 8; - } else if (decl->flags & ISL_ARG_SINGLE_DASH) { - printf(" -"); - len += 3; - } else { - printf(" --"); - len += 8; - } - - if (prefix) { - printf("%s-", prefix); - len += strlen(prefix) + 1; - } - if (no) { - printf("no-"); - len += 3; - } - printf("%s", decl->long_name); - len += strlen(decl->long_name); - - while ((++decl)->type == isl_arg_alias) { - printf(", --"); - len += 4; - if (no) { - printf("no-"); - len += 3; - } - printf("%s", decl->long_name); - len += strlen(decl->long_name); - } - - return len; -} - -const void *isl_memrchr(const void *s, int c, size_t n) -{ - const char *p = s; - while (n-- > 0) - if (p[n] == c) - return p + n; - return NULL; -} - -static int wrap_msg(const char *s, int indent, int pos) -{ - int len; - int wrap_len = 75 - indent; - - if (pos + 1 >= indent) - printf("\n%*s", indent, ""); - else - printf("%*s", indent - pos, ""); - - len = strlen(s); - while (len > wrap_len) { - const char *space = isl_memrchr(s, ' ', wrap_len); - int l; - - if (!space) - space = strchr(s + wrap_len, ' '); - if (!space) - break; - l = space - s; - printf("%.*s", l, s); - s = space + 1; - len -= l + 1; - printf("\n%*s", indent, ""); - } - - printf("%s", s); - return len; -} - -static int print_help_msg(struct isl_arg *decl, int pos) -{ - if (!decl->help_msg) - return pos; - - return wrap_msg(decl->help_msg, 30, pos); -} - -static void print_default(struct isl_arg *decl, const char *def, int pos) -{ - const char *default_prefix = "[default: "; - const char *default_suffix = "]"; - int len; - - len = strlen(default_prefix) + strlen(def) + strlen(default_suffix); - - if (!decl->help_msg) { - if (pos >= 29) - printf("\n%30s", ""); - else - printf("%*s", 30 - pos, ""); - pos = 0; - } else { - if (pos + len >= 48) - printf("\n%30s", ""); - else - printf(" "); - } - printf("%s%s%s", default_prefix, def, default_suffix); -} - -static void print_default_choice(struct isl_arg *decl, void *opt, int pos) -{ - int i; - const char *s = "none"; - unsigned *p; - - p = (unsigned *)(((char *) opt) + decl->offset); - for (i = 0; decl->u.choice.choice[i].name; ++i) - if (decl->u.choice.choice[i].value == *p) { - s = decl->u.choice.choice[i].name; - break; - } - - print_default(decl, s, pos); -} - -static void print_choice_help(struct isl_arg *decl, const char *prefix, - void *opt) -{ - int i; - int pos; - - pos = print_arg_help(decl, prefix, 0); - printf("="); - pos++; - - for (i = 0; decl->u.choice.choice[i].name; ++i) { - if (i) { - printf("|"); - pos++; - } - printf("%s", decl->u.choice.choice[i].name); - pos += strlen(decl->u.choice.choice[i].name); - } - - pos = print_help_msg(decl, pos); - print_default_choice(decl, opt, pos); - - printf("\n"); -} - -static void print_default_flags(struct isl_arg *decl, void *opt, int pos) -{ - int i, first; - const char *default_prefix = "[default: "; - const char *default_suffix = "]"; - int len = strlen(default_prefix) + strlen(default_suffix); - unsigned *p; - - p = (unsigned *)(((char *) opt) + decl->offset); - for (i = 0; decl->u.flags.flags[i].name; ++i) - if ((*p & decl->u.flags.flags[i].mask) == - decl->u.flags.flags[i].value) - len += strlen(decl->u.flags.flags[i].name); - - if (!decl->help_msg) { - if (pos >= 29) - printf("\n%30s", ""); - else - printf("%*s", 30 - pos, ""); - pos = 0; - } else { - if (pos + len >= 48) - printf("\n%30s", ""); - else - printf(" "); - } - printf("%s", default_prefix); - - for (first = 1, i = 0; decl->u.flags.flags[i].name; ++i) - if ((*p & decl->u.flags.flags[i].mask) == - decl->u.flags.flags[i].value) { - if (!first) - printf(","); - printf("%s", decl->u.flags.flags[i].name); - first = 0; - } - - printf("%s", default_suffix); -} - -static void print_flags_help(struct isl_arg *decl, const char *prefix, - void *opt) -{ - int i, j; - int pos; - - pos = print_arg_help(decl, prefix, 0); - printf("="); - pos++; - - for (i = 0; decl->u.flags.flags[i].name; ++i) { - if (i) { - printf(","); - pos++; - } - for (j = i; - decl->u.flags.flags[j].mask == decl->u.flags.flags[i].mask; - ++j) { - if (j != i) { - printf("|"); - pos++; - } - printf("%s", decl->u.flags.flags[j].name); - pos += strlen(decl->u.flags.flags[j].name); - } - i = j - 1; - } - - pos = print_help_msg(decl, pos); - print_default_flags(decl, opt, pos); - - printf("\n"); -} - -static void print_bool_help(struct isl_arg *decl, const char *prefix, void *opt) -{ - int pos; - unsigned *p = opt ? (unsigned *)(((char *) opt) + decl->offset) : NULL; - int no = p ? *p == 1 : 0; - pos = print_arg_help(decl, prefix, no); - pos = print_help_msg(decl, pos); - if (decl->offset != (size_t) -1) - print_default(decl, no ? "yes" : "no", pos); - printf("\n"); -} - -static int print_argument_name(struct isl_arg *decl, const char *name, int pos) -{ - printf("%c<%s>", decl->long_name ? '=' : ' ', name); - return pos + 3 + strlen(name); -} - -static void print_int_help(struct isl_arg *decl, const char *prefix, void *opt) -{ - int pos; - char val[20]; - int *p = (int *)(((char *) opt) + decl->offset); - pos = print_arg_help(decl, prefix, 0); - pos = print_argument_name(decl, decl->argument_name, pos); - pos = print_help_msg(decl, pos); - snprintf(val, sizeof(val), "%d", *p); - print_default(decl, val, pos); - printf("\n"); -} - -static void print_long_help(struct isl_arg *decl, const char *prefix, void *opt) -{ - int pos; - long *p = (long *)(((char *) opt) + decl->offset); - pos = print_arg_help(decl, prefix, 0); - if (*p != decl->u.l.default_selected) { - printf("["); - pos++; - } - printf("=long"); - pos += 5; - if (*p != decl->u.l.default_selected) { - printf("]"); - pos++; - } - print_help_msg(decl, pos); - printf("\n"); -} - -static void print_ulong_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - pos = print_arg_help(decl, prefix, 0); - printf("=ulong"); - pos += 6; - print_help_msg(decl, pos); - printf("\n"); -} - -static void print_str_help(struct isl_arg *decl, const char *prefix, void *opt) -{ - int pos; - const char *a = decl->argument_name ? decl->argument_name : "string"; - const char **p = (const char **)(((char *) opt) + decl->offset); - pos = print_arg_help(decl, prefix, 0); - pos = print_argument_name(decl, a, pos); - pos = print_help_msg(decl, pos); - if (*p) - print_default(decl, *p, pos); - printf("\n"); -} - -static void print_str_list_help(struct isl_arg *decl, const char *prefix) -{ - int pos; - const char *a = decl->argument_name ? decl->argument_name : "string"; - pos = print_arg_help(decl, prefix, 0); - pos = print_argument_name(decl, a, pos); - pos = print_help_msg(decl, pos); - printf("\n"); -} - -static void print_help(struct isl_arg *arg, const char *prefix, void *opt) -{ - int i; - int any = 0; - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - if (arg[i].flags & ISL_ARG_HIDDEN) - continue; - switch (arg[i].type) { - case isl_arg_flags: - print_flags_help(&arg[i], prefix, opt); - any = 1; - break; - case isl_arg_choice: - print_choice_help(&arg[i], prefix, opt); - any = 1; - break; - case isl_arg_bool: - print_bool_help(&arg[i], prefix, opt); - any = 1; - break; - case isl_arg_int: - print_int_help(&arg[i], prefix, opt); - any = 1; - break; - case isl_arg_long: - print_long_help(&arg[i], prefix, opt); - any = 1; - break; - case isl_arg_ulong: - print_ulong_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_str: - print_str_help(&arg[i], prefix, opt); - any = 1; - break; - case isl_arg_str_list: - print_str_list_help(&arg[i], prefix); - any = 1; - break; - case isl_arg_alias: - case isl_arg_version: - case isl_arg_arg: - case isl_arg_footer: - case isl_arg_child: - case isl_arg_user: - case isl_arg_end: - break; - } - } - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - void *child; - - if (arg[i].type != isl_arg_child) - continue; - if (arg[i].flags & ISL_ARG_HIDDEN) - continue; - - if (any) - printf("\n"); - if (arg[i].help_msg) - printf(" %s\n", arg[i].help_msg); - if (arg[i].offset == (size_t) -1) - child = opt; - else - child = *(void **)(((char *) opt) + arg[i].offset); - print_help(arg[i].u.child.child->args, arg[i].long_name, child); - any = 1; - } -} - -static const char *prog_name(const char *prog) -{ - const char *slash; - - slash = strrchr(prog, '/'); - if (slash) - prog = slash + 1; - if (strncmp(prog, "lt-", 3) == 0) - prog += 3; - - return prog; -} - -static int any_version(struct isl_arg *decl) -{ - int i; - - for (i = 0; decl[i].type != isl_arg_end; ++i) { - switch (decl[i].type) { - case isl_arg_version: - return 1; - case isl_arg_child: - if (any_version(decl[i].u.child.child->args)) - return 1; - break; - default: - break; - } - } - - return 0; -} - -static void print_help_and_exit(struct isl_arg *arg, const char *prog, - void *opt) -{ - int i; - - printf("Usage: %s [OPTION...]", prog_name(prog)); - - for (i = 0; arg[i].type != isl_arg_end; ++i) - if (arg[i].type == isl_arg_arg) - printf(" %s", arg[i].argument_name); - - printf("\n\n"); - - print_help(arg, NULL, opt); - printf("\n"); - if (any_version(arg)) - printf(" -V, --version\n"); - print_bool_help(help_arg, NULL, NULL); - - for (i = 0; arg[i].type != isl_arg_end; ++i) { - if (arg[i].type != isl_arg_footer) - continue; - wrap_msg(arg[i].help_msg, 0, 0); - printf("\n"); - } - - exit(0); -} - -static int match_long_name(struct isl_arg *decl, - const char *start, const char *end) -{ - do { - if (end - start == strlen(decl->long_name) && - !strncmp(start, decl->long_name, end - start)) - return 1; - } while ((++decl)->type == isl_arg_alias); - - return 0; -} - -static const char *skip_dash_dash(struct isl_arg *decl, const char *arg) -{ - if (!strncmp(arg, "--", 2)) - return arg + 2; - if ((decl->flags & ISL_ARG_SINGLE_DASH) && arg[0] == '-') - return arg + 1; - return NULL; -} - -static const char *skip_name(struct isl_arg *decl, const char *arg, - const char *prefix, int need_argument, int *has_argument) -{ - const char *equal; - const char *name; - const char *end; - - if (arg[0] == '-' && arg[1] && arg[1] == decl->short_name) { - if (need_argument && !arg[2]) - return NULL; - if (has_argument) - *has_argument = arg[2] != '\0'; - return arg + 2; - } - if (!decl->long_name) - return NULL; - - name = skip_dash_dash(decl, arg); - if (!name) - return NULL; - - equal = strchr(name, '='); - if (need_argument && !equal) - return NULL; - - if (has_argument) - *has_argument = !!equal; - end = equal ? equal : name + strlen(name); - - if (prefix) { - size_t prefix_len = strlen(prefix); - if (strncmp(name, prefix, prefix_len) == 0 && - name[prefix_len] == '-') - name += prefix_len + 1; - } - - if (!match_long_name(decl, name, end)) - return NULL; - - return equal ? equal + 1 : end; -} - -static int parse_choice_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int i; - int has_argument; - const char *choice; - - choice = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!choice) - return 0; - - if (!has_argument && (!arg[1] || arg[1][0] == '-')) { - unsigned u = decl->u.choice.default_selected; - if (decl->u.choice.set) - decl->u.choice.set(opt, u); - else - *(unsigned *)(((char *)opt) + decl->offset) = u; - - return 1; - } - - if (!has_argument) - choice = arg[1]; - - for (i = 0; decl->u.choice.choice[i].name; ++i) { - unsigned u; - - if (strcmp(choice, decl->u.choice.choice[i].name)) - continue; - - u = decl->u.choice.choice[i].value; - if (decl->u.choice.set) - decl->u.choice.set(opt, u); - else - *(unsigned *)(((char *)opt) + decl->offset) = u; - - return has_argument ? 1 : 2; - } - - return 0; -} - -static int set_flag(struct isl_arg *decl, unsigned *val, const char *flag, - size_t len) -{ - int i; - - for (i = 0; decl->u.flags.flags[i].name; ++i) { - if (strncmp(flag, decl->u.flags.flags[i].name, len)) - continue; - - *val &= ~decl->u.flags.flags[i].mask; - *val |= decl->u.flags.flags[i].value; - - return 1; - } - - return 0; -} - -static int parse_flags_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *flags; - const char *comma; - unsigned val; - - flags = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!flags) - return 0; - - if (!has_argument && !arg[1]) - return 0; - - if (!has_argument) - flags = arg[1]; - - val = *(unsigned *)(((char *)opt) + decl->offset); - - while ((comma = strchr(flags, ',')) != NULL) { - if (!set_flag(decl, &val, flags, comma - flags)) - return 0; - flags = comma + 1; - } - if (!set_flag(decl, &val, flags, strlen(flags))) - return 0; - - *(unsigned *)(((char *)opt) + decl->offset) = val; - - return has_argument ? 1 : 2; -} - -static int parse_bool_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - const char *name; - unsigned *p = (unsigned *)(((char *)opt) + decl->offset); - - if (skip_name(decl, arg[0], prefix, 0, NULL)) { - if ((decl->flags & ISL_ARG_BOOL_ARG) && arg[1]) { - char *endptr; - int val = strtol(arg[1], &endptr, 0); - if (*endptr == '\0' && (val == 0 || val == 1)) { - if (decl->u.b.set) - decl->u.b.set(opt, val); - else if (decl->offset != (size_t) -1) - *p = val; - return 2; - } - } - if (decl->u.b.set) - decl->u.b.set(opt, 1); - else if (decl->offset != (size_t) -1) - *p = 1; - - return 1; - } - - if (!decl->long_name) - return 0; - - name = skip_dash_dash(decl, arg[0]); - if (!name) - return 0; - - if (prefix) { - size_t prefix_len = strlen(prefix); - if (strncmp(name, prefix, prefix_len) == 0 && - name[prefix_len] == '-') { - name += prefix_len + 1; - prefix = NULL; - } - } - - if (strncmp(name, "no-", 3)) - return 0; - name += 3; - - if (prefix) { - size_t prefix_len = strlen(prefix); - if (strncmp(name, prefix, prefix_len) == 0 && - name[prefix_len] == '-') - name += prefix_len + 1; - } - - if (match_long_name(decl, name, name + strlen(name))) { - if (decl->u.b.set) - decl->u.b.set(opt, 0); - else if (decl->offset != (size_t) -1) - *p = 0; - - return 1; - } - - return 0; -} - -static int parse_str_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *s; - char **p = (char **)(((char *)opt) + decl->offset); - - s = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!s) - return 0; - - if (has_argument) { - free(*p); - *p = strdup(s); - return 1; - } - - if (arg[1]) { - free(*p); - *p = strdup(arg[1]); - return 2; - } - - return 0; -} - -static int isl_arg_str_list_append(struct isl_arg *decl, void *opt, - const char *s) -{ - int *n = (int *)(((char *) opt) + decl->u.str_list.offset_n); - char **list = *(char ***)(((char *) opt) + decl->offset); - - list = realloc(list, (*n + 1) * sizeof(char *)); - if (!list) - return -1; - *(char ***)(((char *) opt) + decl->offset) = list; - list[*n] = strdup(s); - (*n)++; - return 0; -} - -static int parse_str_list_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *s; - - s = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!s) - return 0; - - if (has_argument) { - isl_arg_str_list_append(decl, opt, s); - return 1; - } - - if (arg[1]) { - isl_arg_str_list_append(decl, opt, arg[1]); - return 2; - } - - return 0; -} - -static int parse_int_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *val; - char *endptr; - int *p = (int *)(((char *)opt) + decl->offset); - - val = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!val) - return 0; - - if (has_argument) { - *p = atoi(val); - return 1; - } - - if (arg[1]) { - int i = strtol(arg[1], &endptr, 0); - if (*endptr == '\0') { - *p = i; - return 2; - } - } - - return 0; -} - -static int parse_long_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *val; - char *endptr; - long *p = (long *)(((char *)opt) + decl->offset); - - val = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!val) - return 0; - - if (has_argument) { - long l = strtol(val, NULL, 0); - if (decl->u.l.set) - decl->u.l.set(opt, l); - else - *p = l; - return 1; - } - - if (arg[1]) { - long l = strtol(arg[1], &endptr, 0); - if (*endptr == '\0') { - if (decl->u.l.set) - decl->u.l.set(opt, l); - else - *p = l; - return 2; - } - } - - if (decl->u.l.default_value != decl->u.l.default_selected) { - if (decl->u.l.set) - decl->u.l.set(opt, decl->u.l.default_selected); - else - *p = decl->u.l.default_selected; - return 1; - } - - return 0; -} - -static int parse_ulong_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int has_argument; - const char *val; - char *endptr; - unsigned long *p = (unsigned long *)(((char *)opt) + decl->offset); - - val = skip_name(decl, arg[0], prefix, 0, &has_argument); - if (!val) - return 0; - - if (has_argument) { - *p = strtoul(val, NULL, 0); - return 1; - } - - if (arg[1]) { - unsigned long ul = strtoul(arg[1], &endptr, 0); - if (*endptr == '\0') { - *p = ul; - return 2; - } - } - - return 0; -} - -static int parse_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt); - -static int parse_child_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - void *child; - - if (decl->offset == (size_t) -1) - child = opt; - else { - child = *(void **)(((char *)opt) + decl->offset); - prefix = decl->long_name; - } - return parse_option(decl->u.child.child->args, arg, prefix, child); -} - -static int parse_option(struct isl_arg *decl, char **arg, - const char *prefix, void *opt) -{ - int i; - - for (i = 0; decl[i].type != isl_arg_end; ++i) { - int parsed = 0; - switch (decl[i].type) { - case isl_arg_choice: - parsed = parse_choice_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_flags: - parsed = parse_flags_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_int: - parsed = parse_int_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_long: - parsed = parse_long_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_ulong: - parsed = parse_ulong_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_bool: - parsed = parse_bool_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_str: - parsed = parse_str_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_str_list: - parsed = parse_str_list_option(&decl[i], arg, prefix, - opt); - break; - case isl_arg_child: - parsed = parse_child_option(&decl[i], arg, prefix, opt); - break; - case isl_arg_alias: - case isl_arg_arg: - case isl_arg_footer: - case isl_arg_user: - case isl_arg_version: - case isl_arg_end: - break; - } - if (parsed) - return parsed; - } - - return 0; -} - -static void print_version(struct isl_arg *decl) -{ - int i; - - for (i = 0; decl[i].type != isl_arg_end; ++i) { - switch (decl[i].type) { - case isl_arg_version: - decl[i].u.version.print_version(); - break; - case isl_arg_child: - print_version(decl[i].u.child.child->args); - break; - default: - break; - } - } -} - -static void print_version_and_exit(struct isl_arg *decl) -{ - print_version(decl); - - exit(0); -} - -static int drop_argument(int argc, char **argv, int drop, int n) -{ - for (; drop < argc; ++drop) - argv[drop] = argv[drop + n]; - - return argc - n; -} - -static int n_arg(struct isl_arg *arg) -{ - int i; - int n_arg = 0; - - for (i = 0; arg[i].type != isl_arg_end; ++i) - if (arg[i].type == isl_arg_arg) - n_arg++; - - return n_arg; -} - -static int next_arg(struct isl_arg *arg, int a) -{ - for (++a; arg[a].type != isl_arg_end; ++a) - if (arg[a].type == isl_arg_arg) - return a; - - return -1; -} - -int isl_args_parse(struct isl_args *args, int argc, char **argv, void *opt, - unsigned flags) -{ - int a = -1; - int skip = 0; - int i; - int n; - - n = n_arg(args->args); - - for (i = 1; i < argc; ++i) { - if (strcmp(argv[i], "--help") == 0) - print_help_and_exit(args->args, argv[0], opt); - } - - for (i = 1; i < argc; ++i) { - if ((strcmp(argv[i], "--version") == 0 || - strcmp(argv[i], "-V") == 0) && any_version(args->args)) - print_version_and_exit(args->args); - } - - while (argc > 1 + skip) { - int parsed; - if (argv[1 + skip][0] != '-') { - a = next_arg(args->args, a); - if (a >= 0) { - char **p; - p = (char **)(((char *)opt)+args->args[a].offset); - free(*p); - *p = strdup(argv[1 + skip]); - argc = drop_argument(argc, argv, 1 + skip, 1); - --n; - } else if (ISL_FL_ISSET(flags, ISL_ARG_ALL)) { - fprintf(stderr, "%s: extra argument: %s\n", - prog_name(argv[0]), argv[1 + skip]); - exit(-1); - } else - ++skip; - continue; - } - parsed = parse_option(args->args, &argv[1 + skip], NULL, opt); - if (parsed) - argc = drop_argument(argc, argv, 1 + skip, parsed); - else if (ISL_FL_ISSET(flags, ISL_ARG_ALL)) { - fprintf(stderr, "%s: unrecognized option: %s\n", - prog_name(argv[0]), argv[1 + skip]); - exit(-1); - } else - ++skip; - } - - if (n > 0) { - fprintf(stderr, "%s: expecting %d more argument(s)\n", - prog_name(argv[0]), n); - exit(-1); - } - - return argc; -} diff --git a/cloog-0.17.0/isl/isl_band.c b/cloog-0.17.0/isl/isl_band.c deleted file mode 100644 index 53582f07c39f8550f2fc5e42459029b3d62fbaed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_band.c +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include - -isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band) -{ - return band ? isl_union_map_get_ctx(band->map) : NULL; -} - -/* We not only increment the reference count of the band, - * but also that of the schedule that contains this band. - * This ensures that the schedule won't disappear while there - * is still a reference to the band outside of the schedule. - * There is no need to increment the reference count of the parent - * band as the parent band is part of the same schedule. - */ -__isl_give isl_band *isl_band_copy(__isl_keep isl_band *band) -{ - if (!band) - return NULL; - - band->ref++; - band->schedule->ref++; - return band; -} - -/* If this is not the last reference to the band (the one from within the - * schedule), then we also need to decrement the reference count of the - * containing schedule as it was incremented in isl_band_copy. - */ -void *isl_band_free(__isl_take isl_band *band) -{ - if (!band) - return NULL; - - if (--band->ref > 0) - return isl_schedule_free(band->schedule); - - isl_union_map_free(band->map); - isl_band_list_free(band->children); - free(band->zero); - free(band); - - return NULL; -} - -int isl_band_has_children(__isl_keep isl_band *band) -{ - if (!band) - return -1; - - return band->children != NULL; -} - -__isl_give isl_band_list *isl_band_get_children( - __isl_keep isl_band *band) -{ - if (!band) - return NULL; - if (!band->children) - isl_die(isl_band_get_ctx(band), isl_error_invalid, - "band has no children", return NULL); - return isl_band_list_dup(band->children); -} - -int isl_band_n_member(__isl_keep isl_band *band) -{ - return band ? band->n : 0; -} - -/* Is the given scheduling dimension zero distance within the band and - * with respect to the proximity dependences. - */ -int isl_band_member_is_zero_distance(__isl_keep isl_band *band, int pos) -{ - if (!band) - return -1; - - if (pos < 0 || pos >= band->n) - isl_die(isl_band_get_ctx(band), isl_error_invalid, - "invalid member position", return -1); - - return band->zero[pos]; -} - -/* Return the schedule that leads up to this band. - */ -__isl_give isl_union_map *isl_band_get_prefix_schedule( - __isl_keep isl_band *band) -{ - isl_union_map *prefix; - isl_band *a; - - if (!band) - return NULL; - - prefix = isl_union_map_copy(band->map); - prefix = isl_union_map_from_domain(isl_union_map_domain(prefix)); - - for (a = band->parent; a; a = a->parent) { - isl_union_map *partial = isl_union_map_copy(a->map); - prefix = isl_union_map_flat_range_product(partial, prefix); - } - - return prefix; -} - -/* Return the schedule of the band in isolation. - */ -__isl_give isl_union_map *isl_band_get_partial_schedule( - __isl_keep isl_band *band) -{ - return band ? isl_union_map_copy(band->map) : NULL; -} - -/* Return the schedule for the forest underneath the given band. - */ -__isl_give isl_union_map *isl_band_get_suffix_schedule( - __isl_keep isl_band *band) -{ - isl_union_map *suffix; - - if (!band) - return NULL; - - if (!isl_band_has_children(band)) { - suffix = isl_union_map_copy(band->map); - suffix = isl_union_map_from_domain(isl_union_map_domain(suffix)); - } else { - int i, n; - isl_band_list *children; - - suffix = isl_union_map_empty(isl_union_map_get_space(band->map)); - children = isl_band_get_children(band); - n = isl_band_list_n_band(children); - for (i = 0; i < n; ++i) { - isl_band *child; - isl_union_map *partial_i; - isl_union_map *suffix_i; - - child = isl_band_list_get_band(children, i); - partial_i = isl_band_get_partial_schedule(child); - suffix_i = isl_band_get_suffix_schedule(child); - suffix_i = isl_union_map_flat_range_product(partial_i, - suffix_i); - suffix = isl_union_map_union(suffix, suffix_i); - - isl_band_free(child); - } - isl_band_list_free(children); - } - - return suffix; -} - -__isl_give isl_printer *isl_printer_print_band(__isl_take isl_printer *p, - __isl_keep isl_band *band) -{ - isl_union_map *prefix, *partial, *suffix; - - prefix = isl_band_get_prefix_schedule(band); - partial = isl_band_get_partial_schedule(band); - suffix = isl_band_get_suffix_schedule(band); - - p = isl_printer_print_str(p, "("); - p = isl_printer_print_union_map(p, prefix); - p = isl_printer_print_str(p, ","); - p = isl_printer_print_union_map(p, partial); - p = isl_printer_print_str(p, ","); - p = isl_printer_print_union_map(p, suffix); - p = isl_printer_print_str(p, ")"); - - isl_union_map_free(prefix); - isl_union_map_free(partial); - isl_union_map_free(suffix); - - return p; -} diff --git a/cloog-0.17.0/isl/isl_band_private.h b/cloog-0.17.0/isl/isl_band_private.h deleted file mode 100644 index 579ef669220f106c0965a15c017d0f8ce91bf5ab..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_band_private.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ISL_BAND_PRIVATE_H -#define ISL_BAND_PRIVATE_H - -#include -#include -#include -#include - -/* Information about a band within a schedule. - * - * n is the number of scheduling dimensions within the band. - * zero is an array of length n, indicating whether a scheduling dimension - * results in zero dependence distances for the proximity dependences. - * map is the partial map corresponding to this band. - * schedule is the schedule that contains this band. - * parent is the parent of this band (or NULL if the band is a root). - * children are the children of this band (or NULL if the band is a leaf). - * - * To avoid circular dependences in the reference counting, - * the schedule and parent pointers are not reference counted. - * isl_band_copy increments the reference count of schedule to ensure - * that outside references to the band keep the schedule alive. - */ -struct isl_band { - int ref; - - int n; - int *zero; - - isl_union_map *map; - isl_schedule *schedule; - isl_band *parent; - isl_band_list *children; -}; - -#endif diff --git a/cloog-0.17.0/isl/isl_basis_reduction.h b/cloog-0.17.0/isl/isl_basis_reduction.h deleted file mode 100644 index fd635605707ca3fb13bcafc432ebbd83ed55a2dd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_basis_reduction.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_BASIS_REDUCTION_H -#define ISL_BASIS_REDUCTION_H - -#include -#include -#include "isl_tab.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_tab *isl_tab_compute_reduced_basis(struct isl_tab *tab); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_bernstein.c b/cloog-0.17.0/isl/isl_bernstein.c deleted file mode 100644 index 0e528e59a72b19247830b4dd175eebcce00df908..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_bernstein.c +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright 2006-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct bernstein_data { - enum isl_fold type; - isl_qpolynomial *poly; - int check_tight; - - isl_cell *cell; - - isl_qpolynomial_fold *fold; - isl_qpolynomial_fold *fold_tight; - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *pwf_tight; -}; - -static int vertex_is_integral(__isl_keep isl_basic_set *vertex) -{ - unsigned nvar; - unsigned nparam; - int i; - - nvar = isl_basic_set_dim(vertex, isl_dim_set); - nparam = isl_basic_set_dim(vertex, isl_dim_param); - for (i = 0; i < nvar; ++i) { - int r = nvar - 1 - i; - if (!isl_int_is_one(vertex->eq[r][1 + nparam + i]) && - !isl_int_is_negone(vertex->eq[r][1 + nparam + i])) - return 0; - } - - return 1; -} - -static __isl_give isl_qpolynomial *vertex_coordinate( - __isl_keep isl_basic_set *vertex, int i, __isl_take isl_space *dim) -{ - unsigned nvar; - unsigned nparam; - int r; - isl_int denom; - isl_qpolynomial *v; - - nvar = isl_basic_set_dim(vertex, isl_dim_set); - nparam = isl_basic_set_dim(vertex, isl_dim_param); - r = nvar - 1 - i; - - isl_int_init(denom); - isl_int_set(denom, vertex->eq[r][1 + nparam + i]); - isl_assert(vertex->ctx, !isl_int_is_zero(denom), goto error); - - if (isl_int_is_pos(denom)) - isl_seq_neg(vertex->eq[r], vertex->eq[r], - 1 + isl_basic_set_total_dim(vertex)); - else - isl_int_neg(denom, denom); - - v = isl_qpolynomial_from_affine(dim, vertex->eq[r], denom); - isl_int_clear(denom); - - return v; -error: - isl_space_free(dim); - isl_int_clear(denom); - return NULL; -} - -/* Check whether the bound associated to the selection "k" is tight, - * which is the case if we select exactly one vertex and if that vertex - * is integral for all values of the parameters. - */ -static int is_tight(int *k, int n, int d, isl_cell *cell) -{ - int i; - - for (i = 0; i < n; ++i) { - int v; - if (k[i] != d) { - if (k[i]) - return 0; - continue; - } - v = cell->ids[n - 1 - i]; - return vertex_is_integral(cell->vertices->v[v].vertex); - } - - return 0; -} - -static void add_fold(__isl_take isl_qpolynomial *b, __isl_keep isl_set *dom, - int *k, int n, int d, struct bernstein_data *data) -{ - isl_qpolynomial_fold *fold; - - fold = isl_qpolynomial_fold_alloc(data->type, b); - - if (data->check_tight && is_tight(k, n, d, data->cell)) - data->fold_tight = isl_qpolynomial_fold_fold_on_domain(dom, - data->fold_tight, fold); - else - data->fold = isl_qpolynomial_fold_fold_on_domain(dom, - data->fold, fold); -} - -/* Extract the coefficients of the Bernstein base polynomials and store - * them in data->fold and data->fold_tight. - * - * In particular, the coefficient of each monomial - * of multi-degree (k[0], k[1], ..., k[n-1]) is divided by the corresponding - * multinomial coefficient d!/k[0]! k[1]! ... k[n-1]! - * - * c[i] contains the coefficient of the selected powers of the first i+1 vars. - * multinom[i] contains the partial multinomial coefficient. - */ -static void extract_coefficients(isl_qpolynomial *poly, - __isl_keep isl_set *dom, struct bernstein_data *data) -{ - int i; - int d; - int n; - isl_ctx *ctx; - isl_qpolynomial **c = NULL; - int *k = NULL; - int *left = NULL; - isl_vec *multinom = NULL; - - if (!poly) - return; - - ctx = isl_qpolynomial_get_ctx(poly); - n = isl_qpolynomial_dim(poly, isl_dim_in); - d = isl_qpolynomial_degree(poly); - isl_assert(ctx, n >= 2, return); - - c = isl_calloc_array(ctx, isl_qpolynomial *, n); - k = isl_alloc_array(ctx, int, n); - left = isl_alloc_array(ctx, int, n); - multinom = isl_vec_alloc(ctx, n); - if (!c || !k || !left || !multinom) - goto error; - - isl_int_set_si(multinom->el[0], 1); - for (k[0] = d; k[0] >= 0; --k[0]) { - int i = 1; - isl_qpolynomial_free(c[0]); - c[0] = isl_qpolynomial_coeff(poly, isl_dim_in, n - 1, k[0]); - left[0] = d - k[0]; - k[1] = -1; - isl_int_set(multinom->el[1], multinom->el[0]); - while (i > 0) { - if (i == n - 1) { - int j; - isl_space *dim; - isl_qpolynomial *b; - isl_qpolynomial *f; - for (j = 2; j <= left[i - 1]; ++j) - isl_int_divexact_ui(multinom->el[i], - multinom->el[i], j); - b = isl_qpolynomial_coeff(c[i - 1], isl_dim_in, - n - 1 - i, left[i - 1]); - b = isl_qpolynomial_project_domain_on_params(b); - dim = isl_qpolynomial_get_domain_space(b); - f = isl_qpolynomial_rat_cst_on_domain(dim, ctx->one, - multinom->el[i]); - b = isl_qpolynomial_mul(b, f); - k[n - 1] = left[n - 2]; - add_fold(b, dom, k, n, d, data); - --i; - continue; - } - if (k[i] >= left[i - 1]) { - --i; - continue; - } - ++k[i]; - if (k[i]) - isl_int_divexact_ui(multinom->el[i], - multinom->el[i], k[i]); - isl_qpolynomial_free(c[i]); - c[i] = isl_qpolynomial_coeff(c[i - 1], isl_dim_in, - n - 1 - i, k[i]); - left[i] = left[i - 1] - k[i]; - k[i + 1] = -1; - isl_int_set(multinom->el[i + 1], multinom->el[i]); - ++i; - } - isl_int_mul_ui(multinom->el[0], multinom->el[0], k[0]); - } - - for (i = 0; i < n; ++i) - isl_qpolynomial_free(c[i]); - - isl_vec_free(multinom); - free(left); - free(k); - free(c); - return; -error: - isl_vec_free(multinom); - free(left); - free(k); - if (c) - for (i = 0; i < n; ++i) - isl_qpolynomial_free(c[i]); - free(c); - return; -} - -/* Perform bernstein expansion on the parametric vertices that are active - * on "cell". - * - * data->poly has been homogenized in the calling function. - * - * We plug in the barycentric coordinates for the set variables - * - * \vec x = \sum_i \alpha_i v_i(\vec p) - * - * and the constant "1 = \sum_i \alpha_i" for the homogeneous dimension. - * Next, we extract the coefficients of the Bernstein base polynomials. - */ -static int bernstein_coefficients_cell(__isl_take isl_cell *cell, void *user) -{ - int i, j; - struct bernstein_data *data = (struct bernstein_data *)user; - isl_space *dim_param; - isl_space *dim_dst; - isl_qpolynomial *poly = data->poly; - unsigned nvar; - int n_vertices; - isl_qpolynomial **subs; - isl_pw_qpolynomial_fold *pwf; - isl_set *dom; - isl_ctx *ctx; - - if (!poly) - goto error; - - nvar = isl_qpolynomial_dim(poly, isl_dim_in) - 1; - n_vertices = cell->n_vertices; - - ctx = isl_qpolynomial_get_ctx(poly); - if (n_vertices > nvar + 1 && ctx->opt->bernstein_triangulate) - return isl_cell_foreach_simplex(cell, - &bernstein_coefficients_cell, user); - - subs = isl_alloc_array(ctx, isl_qpolynomial *, 1 + nvar); - if (!subs) - goto error; - - dim_param = isl_basic_set_get_space(cell->dom); - dim_dst = isl_qpolynomial_get_domain_space(poly); - dim_dst = isl_space_add_dims(dim_dst, isl_dim_set, n_vertices); - - for (i = 0; i < 1 + nvar; ++i) - subs[i] = isl_qpolynomial_zero_on_domain(isl_space_copy(dim_dst)); - - for (i = 0; i < n_vertices; ++i) { - isl_qpolynomial *c; - c = isl_qpolynomial_var_on_domain(isl_space_copy(dim_dst), isl_dim_set, - 1 + nvar + i); - for (j = 0; j < nvar; ++j) { - int k = cell->ids[i]; - isl_qpolynomial *v; - v = vertex_coordinate(cell->vertices->v[k].vertex, j, - isl_space_copy(dim_param)); - v = isl_qpolynomial_add_dims(v, isl_dim_in, - 1 + nvar + n_vertices); - v = isl_qpolynomial_mul(v, isl_qpolynomial_copy(c)); - subs[1 + j] = isl_qpolynomial_add(subs[1 + j], v); - } - subs[0] = isl_qpolynomial_add(subs[0], c); - } - isl_space_free(dim_dst); - - poly = isl_qpolynomial_copy(poly); - - poly = isl_qpolynomial_add_dims(poly, isl_dim_in, n_vertices); - poly = isl_qpolynomial_substitute(poly, isl_dim_in, 0, 1 + nvar, subs); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_in, 0, 1 + nvar); - - data->cell = cell; - dom = isl_set_from_basic_set(isl_basic_set_copy(cell->dom)); - data->fold = isl_qpolynomial_fold_empty(data->type, isl_space_copy(dim_param)); - data->fold_tight = isl_qpolynomial_fold_empty(data->type, dim_param); - extract_coefficients(poly, dom, data); - - pwf = isl_pw_qpolynomial_fold_alloc(data->type, isl_set_copy(dom), - data->fold); - data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, pwf); - pwf = isl_pw_qpolynomial_fold_alloc(data->type, dom, data->fold_tight); - data->pwf_tight = isl_pw_qpolynomial_fold_fold(data->pwf_tight, pwf); - - isl_qpolynomial_free(poly); - isl_cell_free(cell); - for (i = 0; i < 1 + nvar; ++i) - isl_qpolynomial_free(subs[i]); - free(subs); - return 0; -error: - isl_cell_free(cell); - return -1; -} - -/* Base case of applying bernstein expansion. - * - * We compute the chamber decomposition of the parametric polytope "bset" - * and then perform bernstein expansion on the parametric vertices - * that are active on each chamber. - */ -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_base( - __isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct bernstein_data *data, int *tight) -{ - unsigned nvar; - isl_space *dim; - isl_pw_qpolynomial_fold *pwf; - isl_vertices *vertices; - int covers; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - if (nvar == 0) { - isl_set *dom; - isl_qpolynomial_fold *fold; - - fold = isl_qpolynomial_fold_alloc(data->type, poly); - dom = isl_set_from_basic_set(bset); - if (tight) - *tight = 1; - pwf = isl_pw_qpolynomial_fold_alloc(data->type, dom, fold); - return isl_pw_qpolynomial_fold_project_domain_on_params(pwf); - } - - if (isl_qpolynomial_is_zero(poly)) { - isl_set *dom; - isl_qpolynomial_fold *fold; - fold = isl_qpolynomial_fold_alloc(data->type, poly); - dom = isl_set_from_basic_set(bset); - pwf = isl_pw_qpolynomial_fold_alloc(data->type, dom, fold); - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_project_domain_on_params(pwf); - } - - dim = isl_basic_set_get_space(bset); - dim = isl_space_params(dim); - dim = isl_space_from_domain(dim); - dim = isl_space_add_dims(dim, isl_dim_set, 1); - data->pwf = isl_pw_qpolynomial_fold_zero(isl_space_copy(dim), data->type); - data->pwf_tight = isl_pw_qpolynomial_fold_zero(dim, data->type); - data->poly = isl_qpolynomial_homogenize(isl_qpolynomial_copy(poly)); - vertices = isl_basic_set_compute_vertices(bset); - isl_vertices_foreach_disjoint_cell(vertices, - &bernstein_coefficients_cell, data); - isl_vertices_free(vertices); - isl_qpolynomial_free(data->poly); - - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - - covers = isl_pw_qpolynomial_fold_covers(data->pwf_tight, data->pwf); - if (covers < 0) - goto error; - - if (tight) - *tight = covers; - - if (covers) { - isl_pw_qpolynomial_fold_free(data->pwf); - return data->pwf_tight; - } - - data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, data->pwf_tight); - - return data->pwf; -error: - isl_pw_qpolynomial_fold_free(data->pwf_tight); - isl_pw_qpolynomial_fold_free(data->pwf); - return NULL; -} - -/* Apply bernstein expansion recursively by working in on len[i] - * set variables at a time, with i ranging from n_group - 1 to 0. - */ -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_recursive( - __isl_take isl_pw_qpolynomial *pwqp, - int n_group, int *len, struct bernstein_data *data, int *tight) -{ - int i; - unsigned nparam; - unsigned nvar; - isl_pw_qpolynomial_fold *pwf; - - if (!pwqp) - return NULL; - - nparam = isl_pw_qpolynomial_dim(pwqp, isl_dim_param); - nvar = isl_pw_qpolynomial_dim(pwqp, isl_dim_in); - - pwqp = isl_pw_qpolynomial_move_dims(pwqp, isl_dim_param, nparam, - isl_dim_in, 0, nvar - len[n_group - 1]); - pwf = isl_pw_qpolynomial_bound(pwqp, data->type, tight); - - for (i = n_group - 2; i >= 0; --i) { - nparam = isl_pw_qpolynomial_fold_dim(pwf, isl_dim_param); - pwf = isl_pw_qpolynomial_fold_move_dims(pwf, isl_dim_in, 0, - isl_dim_param, nparam - len[i], len[i]); - if (tight && !*tight) - tight = NULL; - pwf = isl_pw_qpolynomial_fold_bound(pwf, tight); - } - - return pwf; -} - -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_factors( - __isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct bernstein_data *data, int *tight) -{ - isl_factorizer *f; - isl_set *set; - isl_pw_qpolynomial *pwqp; - isl_pw_qpolynomial_fold *pwf; - - f = isl_basic_set_factorizer(bset); - if (!f) - goto error; - if (f->n_group == 0) { - isl_factorizer_free(f); - return bernstein_coefficients_base(bset, poly, data, tight); - } - - set = isl_set_from_basic_set(bset); - pwqp = isl_pw_qpolynomial_alloc(set, poly); - pwqp = isl_pw_qpolynomial_morph_domain(pwqp, isl_morph_copy(f->morph)); - - pwf = bernstein_coefficients_recursive(pwqp, f->n_group, f->len, data, - tight); - - isl_factorizer_free(f); - - return pwf; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return NULL; -} - -static __isl_give isl_pw_qpolynomial_fold *bernstein_coefficients_full_recursive( - __isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct bernstein_data *data, int *tight) -{ - int i; - int *len; - unsigned nvar; - isl_pw_qpolynomial_fold *pwf; - isl_set *set; - isl_pw_qpolynomial *pwqp; - - if (!bset || !poly) - goto error; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - len = isl_alloc_array(bset->ctx, int, nvar); - if (!len) - goto error; - - for (i = 0; i < nvar; ++i) - len[i] = 1; - - set = isl_set_from_basic_set(bset); - pwqp = isl_pw_qpolynomial_alloc(set, poly); - - pwf = bernstein_coefficients_recursive(pwqp, nvar, len, data, tight); - - free(len); - - return pwf; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return NULL; -} - -/* Compute a bound on the polynomial defined over the parametric polytope - * using bernstein expansion and store the result - * in bound->pwf and bound->pwf_tight. - * - * If bernstein_recurse is set to ISL_BERNSTEIN_FACTORS, we check if - * the polytope can be factorized and apply bernstein expansion recursively - * on the factors. - * If bernstein_recurse is set to ISL_BERNSTEIN_INTERVALS, we apply - * bernstein expansion recursively on each dimension. - * Otherwise, we apply bernstein expansion on the entire polytope. - */ -int isl_qpolynomial_bound_on_domain_bernstein(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound) -{ - struct bernstein_data data; - isl_pw_qpolynomial_fold *pwf; - unsigned nvar; - int tight = 0; - int *tp = bound->check_tight ? &tight : NULL; - - if (!bset || !poly) - goto error; - - data.type = bound->type; - data.check_tight = bound->check_tight; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - if (bset->ctx->opt->bernstein_recurse & ISL_BERNSTEIN_FACTORS) - pwf = bernstein_coefficients_factors(bset, poly, &data, tp); - else if (nvar > 1 && - (bset->ctx->opt->bernstein_recurse & ISL_BERNSTEIN_INTERVALS)) - pwf = bernstein_coefficients_full_recursive(bset, poly, &data, tp); - else - pwf = bernstein_coefficients_base(bset, poly, &data, tp); - - if (tight) - bound->pwf_tight = isl_pw_qpolynomial_fold_fold(bound->pwf_tight, pwf); - else - bound->pwf = isl_pw_qpolynomial_fold_fold(bound->pwf, pwf); - - return 0; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return -1; -} diff --git a/cloog-0.17.0/isl/isl_bernstein.h b/cloog-0.17.0/isl/isl_bernstein.h deleted file mode 100644 index 7694b04e566175d7afcc964c1e7666bb4441fc18..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_bernstein.h +++ /dev/null @@ -1,4 +0,0 @@ -#include - -int isl_qpolynomial_bound_on_domain_bernstein(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound); diff --git a/cloog-0.17.0/isl/isl_blk.c b/cloog-0.17.0/isl/isl_blk.c deleted file mode 100644 index 0c1dae7e8e4fb0abfe1e5d6d22aee28eb29c00be..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_blk.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include - -/* The maximal number of cache misses before first element is evicted */ -#define ISL_BLK_MAX_MISS 100 - -struct isl_blk isl_blk_empty() -{ - struct isl_blk block; - block.size = 0; - block.data = NULL; - return block; -} - -static int isl_blk_is_empty(struct isl_blk block) -{ - return block.size == 0 && block.data == NULL; -} - -static struct isl_blk isl_blk_error() -{ - struct isl_blk block; - block.size = -1; - block.data = NULL; - return block; -} - -int isl_blk_is_error(struct isl_blk block) -{ - return block.size == -1 && block.data == NULL; -} - -static struct isl_blk extend(struct isl_ctx *ctx, struct isl_blk block, - size_t new_n) -{ - int i; - isl_int *p; - - if (block.size >= new_n) - return block; - - p = block.data; - block.data = isl_realloc_array(ctx, block.data, isl_int, new_n); - if (!block.data) { - free(p); - return isl_blk_error(); - } - - for (i = block.size; i < new_n; ++i) - isl_int_init(block.data[i]); - block.size = new_n; - - return block; -} - -static void isl_blk_free_force(struct isl_ctx *ctx, struct isl_blk block) -{ - int i; - - for (i = 0; i < block.size; ++i) - isl_int_clear(block.data[i]); - free(block.data); -} - -struct isl_blk isl_blk_alloc(struct isl_ctx *ctx, size_t n) -{ - int i; - struct isl_blk block; - - block = isl_blk_empty(); - if (n && ctx->n_cached) { - int best = 0; - for (i = 1; ctx->cache[best].size != n && i < ctx->n_cached; ++i) { - if (ctx->cache[best].size < n) { - if (ctx->cache[i].size > ctx->cache[best].size) - best = i; - } else if (ctx->cache[i].size >= n && - ctx->cache[i].size < ctx->cache[best].size) - best = i; - } - if (ctx->cache[best].size < 2 * n + 100) { - block = ctx->cache[best]; - if (--ctx->n_cached != best) - ctx->cache[best] = ctx->cache[ctx->n_cached]; - if (best == 0) - ctx->n_miss = 0; - } else if (ctx->n_miss++ >= ISL_BLK_MAX_MISS) { - isl_blk_free_force(ctx, ctx->cache[0]); - if (--ctx->n_cached != 0) - ctx->cache[0] = ctx->cache[ctx->n_cached]; - ctx->n_miss = 0; - } - } - - return extend(ctx, block, n); -} - -struct isl_blk isl_blk_extend(struct isl_ctx *ctx, struct isl_blk block, - size_t new_n) -{ - if (isl_blk_is_empty(block)) - return isl_blk_alloc(ctx, new_n); - - return extend(ctx, block, new_n); -} - -void isl_blk_free(struct isl_ctx *ctx, struct isl_blk block) -{ - if (isl_blk_is_empty(block) || isl_blk_is_error(block)) - return; - - if (ctx->n_cached < ISL_BLK_CACHE_SIZE) - ctx->cache[ctx->n_cached++] = block; - else - isl_blk_free_force(ctx, block); -} - -void isl_blk_clear_cache(struct isl_ctx *ctx) -{ - int i; - - for (i = 0; i < ctx->n_cached; ++i) - isl_blk_free_force(ctx, ctx->cache[i]); - ctx->n_cached = 0; -} diff --git a/cloog-0.17.0/isl/isl_bound.c b/cloog-0.17.0/isl/isl_bound.c deleted file mode 100644 index d9c10bc8e0fb3e1c70c4da1096eea39729c70099..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_bound.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include - -/* Compute a bound on the polynomial defined over the parametric polytope - * using either range propagation or bernstein expansion and - * store the result in bound->pwf and bound->pwf_tight. - * Since bernstein expansion requires bounded domains, we apply - * range propagation on unbounded domains. Otherwise, we respect the choice - * of the user. - */ -static int compressed_guarded_poly_bound(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - int bounded; - - if (!bset || !poly) - goto error; - - if (bset->ctx->opt->bound == ISL_BOUND_RANGE) - return isl_qpolynomial_bound_on_domain_range(bset, poly, bound); - - bounded = isl_basic_set_is_bounded(bset); - if (bounded < 0) - goto error; - if (bounded) - return isl_qpolynomial_bound_on_domain_bernstein(bset, poly, bound); - else - return isl_qpolynomial_bound_on_domain_range(bset, poly, bound); -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return -1; -} - -static int unwrapped_guarded_poly_bound(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - isl_pw_qpolynomial_fold *top_pwf; - isl_pw_qpolynomial_fold *top_pwf_tight; - isl_space *dim; - isl_morph *morph; - int r; - - bset = isl_basic_set_detect_equalities(bset); - - if (!bset) - goto error; - - if (bset->n_eq == 0) - return compressed_guarded_poly_bound(bset, poly, user); - - morph = isl_basic_set_full_compression(bset); - - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - poly = isl_qpolynomial_morph_domain(poly, isl_morph_copy(morph)); - - dim = isl_morph_get_ran_space(morph); - dim = isl_space_params(dim); - - top_pwf = bound->pwf; - top_pwf_tight = bound->pwf_tight; - - dim = isl_space_from_domain(dim); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - bound->pwf = isl_pw_qpolynomial_fold_zero(isl_space_copy(dim), - bound->type); - bound->pwf_tight = isl_pw_qpolynomial_fold_zero(dim, bound->type); - - r = compressed_guarded_poly_bound(bset, poly, user); - - morph = isl_morph_dom_params(morph); - morph = isl_morph_ran_params(morph); - morph = isl_morph_inverse(morph); - - bound->pwf = isl_pw_qpolynomial_fold_morph_domain(bound->pwf, - isl_morph_copy(morph)); - bound->pwf_tight = isl_pw_qpolynomial_fold_morph_domain( - bound->pwf_tight, morph); - - bound->pwf = isl_pw_qpolynomial_fold_fold(top_pwf, bound->pwf); - bound->pwf_tight = isl_pw_qpolynomial_fold_fold(top_pwf_tight, - bound->pwf_tight); - - return r; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - return -1; -} - -static int guarded_poly_bound(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - isl_space *dim; - isl_pw_qpolynomial_fold *top_pwf; - isl_pw_qpolynomial_fold *top_pwf_tight; - int nparam; - int n_in; - int r; - - if (!bound->wrapping) - return unwrapped_guarded_poly_bound(bset, poly, user); - - nparam = isl_space_dim(bound->dim, isl_dim_param); - n_in = isl_space_dim(bound->dim, isl_dim_in); - - bset = isl_basic_set_move_dims(bset, isl_dim_param, nparam, - isl_dim_set, 0, n_in); - poly = isl_qpolynomial_move_dims(poly, isl_dim_param, nparam, - isl_dim_in, 0, n_in); - - dim = isl_basic_set_get_space(bset); - dim = isl_space_params(dim); - - top_pwf = bound->pwf; - top_pwf_tight = bound->pwf_tight; - - dim = isl_space_from_domain(dim); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - bound->pwf = isl_pw_qpolynomial_fold_zero(isl_space_copy(dim), - bound->type); - bound->pwf_tight = isl_pw_qpolynomial_fold_zero(dim, bound->type); - - r = unwrapped_guarded_poly_bound(bset, poly, user); - - bound->pwf = isl_pw_qpolynomial_fold_reset_space(bound->pwf, - isl_space_copy(bound->dim)); - bound->pwf_tight = isl_pw_qpolynomial_fold_reset_space(bound->pwf_tight, - isl_space_copy(bound->dim)); - - bound->pwf = isl_pw_qpolynomial_fold_fold(top_pwf, bound->pwf); - bound->pwf_tight = isl_pw_qpolynomial_fold_fold(top_pwf_tight, - bound->pwf_tight); - - return r; -} - -static int guarded_qp(__isl_take isl_qpolynomial *qp, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - int r; - - r = isl_qpolynomial_as_polynomial_on_domain(qp, bound->bset, - &guarded_poly_bound, user); - isl_qpolynomial_free(qp); - return r; -} - -static int basic_guarded_fold(__isl_take isl_basic_set *bset, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - int r; - - bound->bset = bset; - r = isl_qpolynomial_fold_foreach_qpolynomial(bound->fold, - &guarded_qp, user); - isl_basic_set_free(bset); - return r; -} - -static int guarded_fold(__isl_take isl_set *set, - __isl_take isl_qpolynomial_fold *fold, void *user) -{ - struct isl_bound *bound = (struct isl_bound *)user; - - if (!set || !fold) - goto error; - - set = isl_set_make_disjoint(set); - - bound->fold = fold; - bound->type = isl_qpolynomial_fold_get_type(fold); - - if (isl_set_foreach_basic_set(set, &basic_guarded_fold, bound) < 0) - goto error; - - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - - return 0; -error: - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - return -1; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound( - __isl_take isl_pw_qpolynomial_fold *pwf, int *tight) -{ - unsigned nvar; - struct isl_bound bound; - int covers; - - if (!pwf) - return NULL; - - bound.dim = isl_pw_qpolynomial_fold_get_domain_space(pwf); - - bound.wrapping = isl_space_is_wrapping(bound.dim); - if (bound.wrapping) - bound.dim = isl_space_unwrap(bound.dim); - nvar = isl_space_dim(bound.dim, isl_dim_out); - bound.dim = isl_space_domain(bound.dim); - bound.dim = isl_space_from_domain(bound.dim); - bound.dim = isl_space_add_dims(bound.dim, isl_dim_out, 1); - - if (nvar == 0) { - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_reset_space(pwf, bound.dim); - } - - if (isl_pw_qpolynomial_fold_is_zero(pwf)) { - enum isl_fold type = pwf->type; - isl_pw_qpolynomial_fold_free(pwf); - if (tight) - *tight = 1; - return isl_pw_qpolynomial_fold_zero(bound.dim, type); - } - - bound.pwf = isl_pw_qpolynomial_fold_zero(isl_space_copy(bound.dim), - pwf->type); - bound.pwf_tight = isl_pw_qpolynomial_fold_zero(isl_space_copy(bound.dim), - pwf->type); - bound.check_tight = !!tight; - - if (isl_pw_qpolynomial_fold_foreach_lifted_piece(pwf, - guarded_fold, &bound) < 0) - goto error; - - covers = isl_pw_qpolynomial_fold_covers(bound.pwf_tight, bound.pwf); - if (covers < 0) - goto error; - - if (tight) - *tight = covers; - - isl_space_free(bound.dim); - isl_pw_qpolynomial_fold_free(pwf); - - if (covers) { - isl_pw_qpolynomial_fold_free(bound.pwf); - return bound.pwf_tight; - } - - bound.pwf = isl_pw_qpolynomial_fold_fold(bound.pwf, bound.pwf_tight); - - return bound.pwf; -error: - isl_pw_qpolynomial_fold_free(bound.pwf_tight); - isl_pw_qpolynomial_fold_free(bound.pwf); - isl_pw_qpolynomial_fold_free(pwf); - isl_space_free(bound.dim); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( - __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, int *tight) -{ - isl_pw_qpolynomial_fold *pwf; - - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial(type, pwqp); - return isl_pw_qpolynomial_fold_bound(pwf, tight); -} - -struct isl_union_bound_data { - enum isl_fold type; - int tight; - isl_union_pw_qpolynomial_fold *res; -}; - -static int bound_pw(__isl_take isl_pw_qpolynomial *pwqp, void *user) -{ - struct isl_union_bound_data *data = user; - isl_pw_qpolynomial_fold *pwf; - - pwf = isl_pw_qpolynomial_bound(pwqp, data->type, - data->tight ? &data->tight : NULL); - data->res = isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - data->res, pwf); - - return 0; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( - __isl_take isl_union_pw_qpolynomial *upwqp, - enum isl_fold type, int *tight) -{ - isl_space *dim; - struct isl_union_bound_data data = { type, 1, NULL }; - - if (!upwqp) - return NULL; - - if (!tight) - data.tight = 0; - - dim = isl_union_pw_qpolynomial_get_space(upwqp); - data.res = isl_union_pw_qpolynomial_fold_zero(dim, type); - if (isl_union_pw_qpolynomial_foreach_pw_qpolynomial(upwqp, - &bound_pw, &data) < 0) - goto error; - - isl_union_pw_qpolynomial_free(upwqp); - if (tight) - *tight = data.tight; - - return data.res; -error: - isl_union_pw_qpolynomial_free(upwqp); - isl_union_pw_qpolynomial_fold_free(data.res); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_bound.h b/cloog-0.17.0/isl/isl_bound.h deleted file mode 100644 index 1a9d390eab97427d6dfcc964b4f69e40bff76736..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_bound.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ISL_BOUND_H -#define ISL_BOUND_H - -#include - -struct isl_bound { - /* input */ - int check_tight; - int wrapping; - enum isl_fold type; - isl_space *dim; - isl_basic_set *bset; - isl_qpolynomial_fold *fold; - - /* output */ - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *pwf_tight; -}; - -#endif diff --git a/cloog-0.17.0/isl/isl_coalesce.c b/cloog-0.17.0/isl/isl_coalesce.c deleted file mode 100644 index b99c7b53d2b8b1a791f4aeab576e2769720836dc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_coalesce.c +++ /dev/null @@ -1,1294 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include "isl_map_private.h" -#include -#include "isl_tab.h" -#include - -#define STATUS_ERROR -1 -#define STATUS_REDUNDANT 1 -#define STATUS_VALID 2 -#define STATUS_SEPARATE 3 -#define STATUS_CUT 4 -#define STATUS_ADJ_EQ 5 -#define STATUS_ADJ_INEQ 6 - -static int status_in(isl_int *ineq, struct isl_tab *tab) -{ - enum isl_ineq_type type = isl_tab_ineq_type(tab, ineq); - switch (type) { - default: - case isl_ineq_error: return STATUS_ERROR; - case isl_ineq_redundant: return STATUS_VALID; - case isl_ineq_separate: return STATUS_SEPARATE; - case isl_ineq_cut: return STATUS_CUT; - case isl_ineq_adj_eq: return STATUS_ADJ_EQ; - case isl_ineq_adj_ineq: return STATUS_ADJ_INEQ; - } -} - -/* Compute the position of the equalities of basic map "i" - * with respect to basic map "j". - * The resulting array has twice as many entries as the number - * of equalities corresponding to the two inequalties to which - * each equality corresponds. - */ -static int *eq_status_in(struct isl_map *map, int i, int j, - struct isl_tab **tabs) -{ - int k, l; - int *eq = isl_calloc_array(map->ctx, int, 2 * map->p[i]->n_eq); - unsigned dim; - - dim = isl_basic_map_total_dim(map->p[i]); - for (k = 0; k < map->p[i]->n_eq; ++k) { - for (l = 0; l < 2; ++l) { - isl_seq_neg(map->p[i]->eq[k], map->p[i]->eq[k], 1+dim); - eq[2 * k + l] = status_in(map->p[i]->eq[k], tabs[j]); - if (eq[2 * k + l] == STATUS_ERROR) - goto error; - } - if (eq[2 * k] == STATUS_SEPARATE || - eq[2 * k + 1] == STATUS_SEPARATE) - break; - } - - return eq; -error: - free(eq); - return NULL; -} - -/* Compute the position of the inequalities of basic map "i" - * with respect to basic map "j". - */ -static int *ineq_status_in(struct isl_map *map, int i, int j, - struct isl_tab **tabs) -{ - int k; - unsigned n_eq = map->p[i]->n_eq; - int *ineq = isl_calloc_array(map->ctx, int, map->p[i]->n_ineq); - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - if (isl_tab_is_redundant(tabs[i], n_eq + k)) { - ineq[k] = STATUS_REDUNDANT; - continue; - } - ineq[k] = status_in(map->p[i]->ineq[k], tabs[j]); - if (ineq[k] == STATUS_ERROR) - goto error; - if (ineq[k] == STATUS_SEPARATE) - break; - } - - return ineq; -error: - free(ineq); - return NULL; -} - -static int any(int *con, unsigned len, int status) -{ - int i; - - for (i = 0; i < len ; ++i) - if (con[i] == status) - return 1; - return 0; -} - -static int count(int *con, unsigned len, int status) -{ - int i; - int c = 0; - - for (i = 0; i < len ; ++i) - if (con[i] == status) - c++; - return c; -} - -static int all(int *con, unsigned len, int status) -{ - int i; - - for (i = 0; i < len ; ++i) { - if (con[i] == STATUS_REDUNDANT) - continue; - if (con[i] != status) - return 0; - } - return 1; -} - -static void drop(struct isl_map *map, int i, struct isl_tab **tabs) -{ - isl_basic_map_free(map->p[i]); - isl_tab_free(tabs[i]); - - if (i != map->n - 1) { - map->p[i] = map->p[map->n - 1]; - tabs[i] = tabs[map->n - 1]; - } - tabs[map->n - 1] = NULL; - map->n--; -} - -/* Replace the pair of basic maps i and j by the basic map bounded - * by the valid constraints in both basic maps and the constraint - * in extra (if not NULL). - */ -static int fuse(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j, - __isl_keep isl_mat *extra) -{ - int k, l; - struct isl_basic_map *fused = NULL; - struct isl_tab *fused_tab = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - unsigned extra_rows = extra ? extra->n_row : 0; - - fused = isl_basic_map_alloc_space(isl_space_copy(map->p[i]->dim), - map->p[i]->n_div, - map->p[i]->n_eq + map->p[j]->n_eq, - map->p[i]->n_ineq + map->p[j]->n_ineq + extra_rows); - if (!fused) - goto error; - - for (k = 0; k < map->p[i]->n_eq; ++k) { - if (eq_i && (eq_i[2 * k] != STATUS_VALID || - eq_i[2 * k + 1] != STATUS_VALID)) - continue; - l = isl_basic_map_alloc_equality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->eq[l], map->p[i]->eq[k], 1 + total); - } - - for (k = 0; k < map->p[j]->n_eq; ++k) { - if (eq_j && (eq_j[2 * k] != STATUS_VALID || - eq_j[2 * k + 1] != STATUS_VALID)) - continue; - l = isl_basic_map_alloc_equality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->eq[l], map->p[j]->eq[k], 1 + total); - } - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - if (ineq_i[k] != STATUS_VALID) - continue; - l = isl_basic_map_alloc_inequality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->ineq[l], map->p[i]->ineq[k], 1 + total); - } - - for (k = 0; k < map->p[j]->n_ineq; ++k) { - if (ineq_j[k] != STATUS_VALID) - continue; - l = isl_basic_map_alloc_inequality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->ineq[l], map->p[j]->ineq[k], 1 + total); - } - - for (k = 0; k < map->p[i]->n_div; ++k) { - int l = isl_basic_map_alloc_div(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->div[l], map->p[i]->div[k], 1 + 1 + total); - } - - for (k = 0; k < extra_rows; ++k) { - l = isl_basic_map_alloc_inequality(fused); - if (l < 0) - goto error; - isl_seq_cpy(fused->ineq[l], extra->row[k], 1 + total); - } - - fused = isl_basic_map_gauss(fused, NULL); - ISL_F_SET(fused, ISL_BASIC_MAP_FINAL); - if (ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_RATIONAL) && - ISL_F_ISSET(map->p[j], ISL_BASIC_MAP_RATIONAL)) - ISL_F_SET(fused, ISL_BASIC_MAP_RATIONAL); - - fused_tab = isl_tab_from_basic_map(fused); - if (isl_tab_detect_redundant(fused_tab) < 0) - goto error; - - isl_basic_map_free(map->p[i]); - map->p[i] = fused; - isl_tab_free(tabs[i]); - tabs[i] = fused_tab; - drop(map, j, tabs); - - return 1; -error: - isl_tab_free(fused_tab); - isl_basic_map_free(fused); - return -1; -} - -/* Given a pair of basic maps i and j such that all constraints are either - * "valid" or "cut", check if the facets corresponding to the "cut" - * constraints of i lie entirely within basic map j. - * If so, replace the pair by the basic map consisting of the valid - * constraints in both basic maps. - * - * To see that we are not introducing any extra points, call the - * two basic maps A and B and the resulting map U and let x - * be an element of U \setminus ( A \cup B ). - * Then there is a pair of cut constraints c_1 and c_2 in A and B such that x - * violates them. Let X be the intersection of U with the opposites - * of these constraints. Then x \in X. - * The facet corresponding to c_1 contains the corresponding facet of A. - * This facet is entirely contained in B, so c_2 is valid on the facet. - * However, since it is also (part of) a facet of X, -c_2 is also valid - * on the facet. This means c_2 is saturated on the facet, so c_1 and - * c_2 must be opposites of each other, but then x could not violate - * both of them. - */ -static int check_facets(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *ineq_i, int *ineq_j) -{ - int k, l; - struct isl_tab_undo *snap; - unsigned n_eq = map->p[i]->n_eq; - - snap = isl_tab_snap(tabs[i]); - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - if (ineq_i[k] != STATUS_CUT) - continue; - if (isl_tab_select_facet(tabs[i], n_eq + k) < 0) - return -1; - for (l = 0; l < map->p[j]->n_ineq; ++l) { - int stat; - if (ineq_j[l] != STATUS_CUT) - continue; - stat = status_in(map->p[j]->ineq[l], tabs[i]); - if (stat != STATUS_VALID) - break; - } - if (isl_tab_rollback(tabs[i], snap) < 0) - return -1; - if (l < map->p[j]->n_ineq) - break; - } - - if (k < map->p[i]->n_ineq) - /* BAD CUT PAIR */ - return 0; - return fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); -} - -/* Both basic maps have at least one inequality with and adjacent - * (but opposite) inequality in the other basic map. - * Check that there are no cut constraints and that there is only - * a single pair of adjacent inequalities. - * If so, we can replace the pair by a single basic map described - * by all but the pair of adjacent inequalities. - * Any additional points introduced lie strictly between the two - * adjacent hyperplanes and can therefore be integral. - * - * ____ _____ - * / ||\ / \ - * / || \ / \ - * \ || \ => \ \ - * \ || / \ / - * \___||_/ \_____/ - * - * The test for a single pair of adjancent inequalities is important - * for avoiding the combination of two basic maps like the following - * - * /| - * / | - * /__| - * _____ - * | | - * | | - * |___| - */ -static int check_adj_ineq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *ineq_i, int *ineq_j) -{ - int changed = 0; - - if (any(ineq_i, map->p[i]->n_ineq, STATUS_CUT) || - any(ineq_j, map->p[j]->n_ineq, STATUS_CUT)) - /* ADJ INEQ CUT */ - ; - else if (count(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) == 1 && - count(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ) == 1) - changed = fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); - /* else ADJ INEQ TOO MANY */ - - return changed; -} - -/* Check if basic map "i" contains the basic map represented - * by the tableau "tab". - */ -static int contains(struct isl_map *map, int i, int *ineq_i, - struct isl_tab *tab) -{ - int k, l; - unsigned dim; - - dim = isl_basic_map_total_dim(map->p[i]); - for (k = 0; k < map->p[i]->n_eq; ++k) { - for (l = 0; l < 2; ++l) { - int stat; - isl_seq_neg(map->p[i]->eq[k], map->p[i]->eq[k], 1+dim); - stat = status_in(map->p[i]->eq[k], tab); - if (stat != STATUS_VALID) - return 0; - } - } - - for (k = 0; k < map->p[i]->n_ineq; ++k) { - int stat; - if (ineq_i[k] == STATUS_REDUNDANT) - continue; - stat = status_in(map->p[i]->ineq[k], tab); - if (stat != STATUS_VALID) - return 0; - } - return 1; -} - -/* Basic map "i" has an inequality "k" that is adjacent to some equality - * of basic map "j". All the other inequalities are valid for "j". - * Check if basic map "j" forms an extension of basic map "i". - * - * In particular, we relax constraint "k", compute the corresponding - * facet and check whether it is included in the other basic map. - * If so, we know that relaxing the constraint extends the basic - * map with exactly the other basic map (we already know that this - * other basic map is included in the extension, because there - * were no "cut" inequalities in "i") and we can replace the - * two basic maps by thie extension. - * ____ _____ - * / || / | - * / || / | - * \ || => \ | - * \ || \ | - * \___|| \____| - */ -static int is_extension(struct isl_map *map, int i, int j, int k, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - int super; - struct isl_tab_undo *snap, *snap2; - unsigned n_eq = map->p[i]->n_eq; - - snap = isl_tab_snap(tabs[i]); - tabs[i] = isl_tab_relax(tabs[i], n_eq + k); - snap2 = isl_tab_snap(tabs[i]); - if (isl_tab_select_facet(tabs[i], n_eq + k) < 0) - return -1; - super = contains(map, j, ineq_j, tabs[i]); - if (super) { - if (isl_tab_rollback(tabs[i], snap2) < 0) - return -1; - map->p[i] = isl_basic_map_cow(map->p[i]); - if (!map->p[i]) - return -1; - isl_int_add_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); - ISL_F_SET(map->p[i], ISL_BASIC_MAP_FINAL); - drop(map, j, tabs); - changed = 1; - } else - if (isl_tab_rollback(tabs[i], snap) < 0) - return -1; - - return changed; -} - -/* For each non-redundant constraint in "bmap" (as determined by "tab"), - * wrap the constraint around "bound" such that it includes the whole - * set "set" and append the resulting constraint to "wraps". - * "wraps" is assumed to have been pre-allocated to the appropriate size. - * wraps->n_row is the number of actual wrapped constraints that have - * been added. - * If any of the wrapping problems results in a constraint that is - * identical to "bound", then this means that "set" is unbounded in such - * way that no wrapping is possible. If this happens then wraps->n_row - * is reset to zero. - */ -static int add_wraps(__isl_keep isl_mat *wraps, __isl_keep isl_basic_map *bmap, - struct isl_tab *tab, isl_int *bound, __isl_keep isl_set *set) -{ - int l; - int w; - unsigned total = isl_basic_map_total_dim(bmap); - - w = wraps->n_row; - - for (l = 0; l < bmap->n_ineq; ++l) { - if (isl_seq_is_neg(bound, bmap->ineq[l], 1 + total)) - continue; - if (isl_seq_eq(bound, bmap->ineq[l], 1 + total)) - continue; - if (isl_tab_is_redundant(tab, bmap->n_eq + l)) - continue; - - isl_seq_cpy(wraps->row[w], bound, 1 + total); - if (!isl_set_wrap_facet(set, wraps->row[w], bmap->ineq[l])) - return -1; - if (isl_seq_eq(wraps->row[w], bound, 1 + total)) - goto unbounded; - ++w; - } - for (l = 0; l < bmap->n_eq; ++l) { - if (isl_seq_is_neg(bound, bmap->eq[l], 1 + total)) - continue; - if (isl_seq_eq(bound, bmap->eq[l], 1 + total)) - continue; - - isl_seq_cpy(wraps->row[w], bound, 1 + total); - isl_seq_neg(wraps->row[w + 1], bmap->eq[l], 1 + total); - if (!isl_set_wrap_facet(set, wraps->row[w], wraps->row[w + 1])) - return -1; - if (isl_seq_eq(wraps->row[w], bound, 1 + total)) - goto unbounded; - ++w; - - isl_seq_cpy(wraps->row[w], bound, 1 + total); - if (!isl_set_wrap_facet(set, wraps->row[w], bmap->eq[l])) - return -1; - if (isl_seq_eq(wraps->row[w], bound, 1 + total)) - goto unbounded; - ++w; - } - - wraps->n_row = w; - return 0; -unbounded: - wraps->n_row = 0; - return 0; -} - -/* Check if the constraints in "wraps" from "first" until the last - * are all valid for the basic set represented by "tab". - * If not, wraps->n_row is set to zero. - */ -static int check_wraps(__isl_keep isl_mat *wraps, int first, - struct isl_tab *tab) -{ - int i; - - for (i = first; i < wraps->n_row; ++i) { - enum isl_ineq_type type; - type = isl_tab_ineq_type(tab, wraps->row[i]); - if (type == isl_ineq_error) - return -1; - if (type == isl_ineq_redundant) - continue; - wraps->n_row = 0; - return 0; - } - - return 0; -} - -/* Return a set that corresponds to the non-redudant constraints - * (as recorded in tab) of bmap. - * - * It's important to remove the redundant constraints as some - * of the other constraints may have been modified after the - * constraints were marked redundant. - * In particular, a constraint may have been relaxed. - * Redundant constraints are ignored when a constraint is relaxed - * and should therefore continue to be ignored ever after. - * Otherwise, the relaxation might be thwarted by some of - * these constraints. - */ -static __isl_give isl_set *set_from_updated_bmap(__isl_keep isl_basic_map *bmap, - struct isl_tab *tab) -{ - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_update_from_tab(bmap, tab); - return isl_set_from_basic_set(isl_basic_map_underlying_set(bmap)); -} - -/* Given a basic set i with a constraint k that is adjacent to either the - * whole of basic set j or a facet of basic set j, check if we can wrap - * both the facet corresponding to k and the facet of j (or the whole of j) - * around their ridges to include the other set. - * If so, replace the pair of basic sets by their union. - * - * All constraints of i (except k) are assumed to be valid for j. - * - * However, the constraints of j may not be valid for i and so - * we have to check that the wrapping constraints for j are valid for i. - * - * In the case where j has a facet adjacent to i, tab[j] is assumed - * to have been restricted to this facet, so that the non-redundant - * constraints in tab[j] are the ridges of the facet. - * Note that for the purpose of wrapping, it does not matter whether - * we wrap the ridges of i around the whole of j or just around - * the facet since all the other constraints are assumed to be valid for j. - * In practice, we wrap to include the whole of j. - * ____ _____ - * / | / \ - * / || / | - * \ || => \ | - * \ || \ | - * \___|| \____| - * - */ -static int can_wrap_in_facet(struct isl_map *map, int i, int j, int k, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - struct isl_mat *wraps = NULL; - struct isl_set *set_i = NULL; - struct isl_set *set_j = NULL; - struct isl_vec *bound = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - struct isl_tab_undo *snap; - int n; - - set_i = set_from_updated_bmap(map->p[i], tabs[i]); - set_j = set_from_updated_bmap(map->p[j], tabs[j]); - wraps = isl_mat_alloc(map->ctx, 2 * (map->p[i]->n_eq + map->p[j]->n_eq) + - map->p[i]->n_ineq + map->p[j]->n_ineq, - 1 + total); - bound = isl_vec_alloc(map->ctx, 1 + total); - if (!set_i || !set_j || !wraps || !bound) - goto error; - - isl_seq_cpy(bound->el, map->p[i]->ineq[k], 1 + total); - isl_int_add_ui(bound->el[0], bound->el[0], 1); - - isl_seq_cpy(wraps->row[0], bound->el, 1 + total); - wraps->n_row = 1; - - if (add_wraps(wraps, map->p[j], tabs[j], bound->el, set_i) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - snap = isl_tab_snap(tabs[i]); - - if (isl_tab_select_facet(tabs[i], map->p[i]->n_eq + k) < 0) - goto error; - if (isl_tab_detect_redundant(tabs[i]) < 0) - goto error; - - isl_seq_neg(bound->el, map->p[i]->ineq[k], 1 + total); - - n = wraps->n_row; - if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set_j) < 0) - goto error; - - if (isl_tab_rollback(tabs[i], snap) < 0) - goto error; - if (check_wraps(wraps, n, tabs[i]) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - changed = fuse(map, i, j, tabs, eq_i, ineq_i, eq_j, ineq_j, wraps); - -unbounded: - isl_mat_free(wraps); - - isl_set_free(set_i); - isl_set_free(set_j); - - isl_vec_free(bound); - - return changed; -error: - isl_vec_free(bound); - isl_mat_free(wraps); - isl_set_free(set_i); - isl_set_free(set_j); - return -1; -} - -/* Set the is_redundant property of the "n" constraints in "cuts", - * except "k" to "v". - * This is a fairly tricky operation as it bypasses isl_tab.c. - * The reason we want to temporarily mark some constraints redundant - * is that we want to ignore them in add_wraps. - * - * Initially all cut constraints are non-redundant, but the - * selection of a facet right before the call to this function - * may have made some of them redundant. - * Likewise, the same constraints are marked non-redundant - * in the second call to this function, before they are officially - * made non-redundant again in the subsequent rollback. - */ -static void set_is_redundant(struct isl_tab *tab, unsigned n_eq, - int *cuts, int n, int k, int v) -{ - int l; - - for (l = 0; l < n; ++l) { - if (l == k) - continue; - tab->con[n_eq + cuts[l]].is_redundant = v; - } -} - -/* Given a pair of basic maps i and j such that j sticks out - * of i at n cut constraints, each time by at most one, - * try to compute wrapping constraints and replace the two - * basic maps by a single basic map. - * The other constraints of i are assumed to be valid for j. - * - * The facets of i corresponding to the cut constraints are - * wrapped around their ridges, except those ridges determined - * by any of the other cut constraints. - * The intersections of cut constraints need to be ignored - * as the result of wrapping one cut constraint around another - * would result in a constraint cutting the union. - * In each case, the facets are wrapped to include the union - * of the two basic maps. - * - * The pieces of j that lie at an offset of exactly one from - * one of the cut constraints of i are wrapped around their edges. - * Here, there is no need to ignore intersections because we - * are wrapping around the union of the two basic maps. - * - * If any wrapping fails, i.e., if we cannot wrap to touch - * the union, then we give up. - * Otherwise, the pair of basic maps is replaced by their union. - */ -static int wrap_in_facets(struct isl_map *map, int i, int j, - int *cuts, int n, struct isl_tab **tabs, - int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - isl_mat *wraps = NULL; - isl_set *set = NULL; - isl_vec *bound = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - int max_wrap; - int k; - struct isl_tab_undo *snap_i, *snap_j; - - if (isl_tab_extend_cons(tabs[j], 1) < 0) - goto error; - - max_wrap = 2 * (map->p[i]->n_eq + map->p[j]->n_eq) + - map->p[i]->n_ineq + map->p[j]->n_ineq; - max_wrap *= n; - - set = isl_set_union(set_from_updated_bmap(map->p[i], tabs[i]), - set_from_updated_bmap(map->p[j], tabs[j])); - wraps = isl_mat_alloc(map->ctx, max_wrap, 1 + total); - bound = isl_vec_alloc(map->ctx, 1 + total); - if (!set || !wraps || !bound) - goto error; - - snap_i = isl_tab_snap(tabs[i]); - snap_j = isl_tab_snap(tabs[j]); - - wraps->n_row = 0; - - for (k = 0; k < n; ++k) { - if (isl_tab_select_facet(tabs[i], map->p[i]->n_eq + cuts[k]) < 0) - goto error; - if (isl_tab_detect_redundant(tabs[i]) < 0) - goto error; - set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 1); - - isl_seq_neg(bound->el, map->p[i]->ineq[cuts[k]], 1 + total); - if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set) < 0) - goto error; - - set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 0); - if (isl_tab_rollback(tabs[i], snap_i) < 0) - goto error; - - if (!wraps->n_row) - break; - - isl_seq_cpy(bound->el, map->p[i]->ineq[cuts[k]], 1 + total); - isl_int_add_ui(bound->el[0], bound->el[0], 1); - if (isl_tab_add_eq(tabs[j], bound->el) < 0) - goto error; - if (isl_tab_detect_redundant(tabs[j]) < 0) - goto error; - - if (!tabs[j]->empty && - add_wraps(wraps, map->p[j], tabs[j], bound->el, set) < 0) - goto error; - - if (isl_tab_rollback(tabs[j], snap_j) < 0) - goto error; - - if (!wraps->n_row) - break; - } - - if (k == n) - changed = fuse(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j, wraps); - - isl_vec_free(bound); - isl_mat_free(wraps); - isl_set_free(set); - - return changed; -error: - isl_vec_free(bound); - isl_mat_free(wraps); - isl_set_free(set); - return -1; -} - -/* Given two basic sets i and j such that i has no cut equalities, - * check if relaxing all the cut inequalities of i by one turns - * them into valid constraint for j and check if we can wrap in - * the bits that are sticking out. - * If so, replace the pair by their union. - * - * We first check if all relaxed cut inequalities of i are valid for j - * and then try to wrap in the intersections of the relaxed cut inequalities - * with j. - * - * During this wrapping, we consider the points of j that lie at a distance - * of exactly 1 from i. In particular, we ignore the points that lie in - * between this lower-dimensional space and the basic map i. - * We can therefore only apply this to integer maps. - * ____ _____ - * / ___|_ / \ - * / | | / | - * \ | | => \ | - * \|____| \ | - * \___| \____/ - * - * _____ ______ - * | ____|_ | \ - * | | | | | - * | | | => | | - * |_| | | | - * |_____| \______| - * - * _______ - * | | - * | |\ | - * | | \ | - * | | \ | - * | | \| - * | | \ - * | |_____\ - * | | - * |_______| - * - * Wrapping can fail if the result of wrapping one of the facets - * around its edges does not produce any new facet constraint. - * In particular, this happens when we try to wrap in unbounded sets. - * - * _______________________________________________________________________ - * | - * | ___ - * | | | - * |_| |_________________________________________________________________ - * |___| - * - * The following is not an acceptable result of coalescing the above two - * sets as it includes extra integer points. - * _______________________________________________________________________ - * | - * | - * | - * | - * \______________________________________________________________________ - */ -static int can_wrap_in_set(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - int k, m; - int n; - int *cuts = NULL; - - if (ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_RATIONAL) || - ISL_F_ISSET(map->p[j], ISL_BASIC_MAP_RATIONAL)) - return 0; - - n = count(ineq_i, map->p[i]->n_ineq, STATUS_CUT); - if (n == 0) - return 0; - - cuts = isl_alloc_array(map->ctx, int, n); - if (!cuts) - return -1; - - for (k = 0, m = 0; m < n; ++k) { - enum isl_ineq_type type; - - if (ineq_i[k] != STATUS_CUT) - continue; - - isl_int_add_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); - type = isl_tab_ineq_type(tabs[j], map->p[i]->ineq[k]); - isl_int_sub_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); - if (type == isl_ineq_error) - goto error; - if (type != isl_ineq_redundant) - break; - cuts[m] = k; - ++m; - } - - if (m == n) - changed = wrap_in_facets(map, i, j, cuts, n, tabs, - eq_i, ineq_i, eq_j, ineq_j); - - free(cuts); - - return changed; -error: - free(cuts); - return -1; -} - -/* Check if either i or j has a single cut constraint that can - * be used to wrap in (a facet of) the other basic set. - * if so, replace the pair by their union. - */ -static int check_wrap(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT)) - changed = can_wrap_in_set(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - if (changed) - return changed; - - if (!any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = can_wrap_in_set(map, j, i, tabs, - eq_j, ineq_j, eq_i, ineq_i); - return changed; -} - -/* At least one of the basic maps has an equality that is adjacent - * to inequality. Make sure that only one of the basic maps has - * such an equality and that the other basic map has exactly one - * inequality adjacent to an equality. - * We call the basic map that has the inequality "i" and the basic - * map that has the equality "j". - * If "i" has any "cut" (in)equality, then relaxing the inequality - * by one would not result in a basic map that contains the other - * basic map. - */ -static int check_adj_eq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int changed = 0; - int k; - - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_INEQ) && - any(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_INEQ)) - /* ADJ EQ TOO MANY */ - return 0; - - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_INEQ)) - return check_adj_eq(map, j, i, tabs, - eq_j, ineq_j, eq_i, ineq_i); - - /* j has an equality adjacent to an inequality in i */ - - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT)) - return 0; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_CUT)) - /* ADJ EQ CUT */ - return 0; - if (count(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_EQ) != 1 || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_EQ) || - any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ)) - /* ADJ EQ TOO MANY */ - return 0; - - for (k = 0; k < map->p[i]->n_ineq ; ++k) - if (ineq_i[k] == STATUS_ADJ_EQ) - break; - - changed = is_extension(map, i, j, k, tabs, eq_i, ineq_i, eq_j, ineq_j); - if (changed) - return changed; - - if (count(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_INEQ) != 1) - return 0; - - changed = can_wrap_in_facet(map, i, j, k, tabs, eq_i, ineq_i, eq_j, ineq_j); - - return changed; -} - -/* The two basic maps lie on adjacent hyperplanes. In particular, - * basic map "i" has an equality that lies parallel to basic map "j". - * Check if we can wrap the facets around the parallel hyperplanes - * to include the other set. - * - * We perform basically the same operations as can_wrap_in_facet, - * except that we don't need to select a facet of one of the sets. - * _ - * \\ \\ - * \\ => \\ - * \ \| - * - * We only allow one equality of "i" to be adjacent to an equality of "j" - * to avoid coalescing - * - * [m, n] -> { [x, y] -> [x, 1 + y] : x >= 1 and y >= 1 and - * x <= 10 and y <= 10; - * [x, y] -> [1 + x, y] : x >= 1 and x <= 20 and - * y >= 5 and y <= 15 } - * - * to - * - * [m, n] -> { [x, y] -> [x2, y2] : x >= 1 and 10y2 <= 20 - x + 10y and - * 4y2 >= 5 + 3y and 5y2 <= 15 + 4y and - * y2 <= 1 + x + y - x2 and y2 >= y and - * y2 >= 1 + x + y - x2 } - */ -static int check_eq_adj_eq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) -{ - int k; - int changed = 0; - struct isl_mat *wraps = NULL; - struct isl_set *set_i = NULL; - struct isl_set *set_j = NULL; - struct isl_vec *bound = NULL; - unsigned total = isl_basic_map_total_dim(map->p[i]); - - if (count(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_EQ) != 1) - return 0; - - for (k = 0; k < 2 * map->p[i]->n_eq ; ++k) - if (eq_i[k] == STATUS_ADJ_EQ) - break; - - set_i = set_from_updated_bmap(map->p[i], tabs[i]); - set_j = set_from_updated_bmap(map->p[j], tabs[j]); - wraps = isl_mat_alloc(map->ctx, 2 * (map->p[i]->n_eq + map->p[j]->n_eq) + - map->p[i]->n_ineq + map->p[j]->n_ineq, - 1 + total); - bound = isl_vec_alloc(map->ctx, 1 + total); - if (!set_i || !set_j || !wraps || !bound) - goto error; - - if (k % 2 == 0) - isl_seq_neg(bound->el, map->p[i]->eq[k / 2], 1 + total); - else - isl_seq_cpy(bound->el, map->p[i]->eq[k / 2], 1 + total); - isl_int_add_ui(bound->el[0], bound->el[0], 1); - - isl_seq_cpy(wraps->row[0], bound->el, 1 + total); - wraps->n_row = 1; - - if (add_wraps(wraps, map->p[j], tabs[j], bound->el, set_i) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - isl_int_sub_ui(bound->el[0], bound->el[0], 1); - isl_seq_neg(bound->el, bound->el, 1 + total); - - isl_seq_cpy(wraps->row[wraps->n_row], bound->el, 1 + total); - wraps->n_row++; - - if (add_wraps(wraps, map->p[i], tabs[i], bound->el, set_j) < 0) - goto error; - if (!wraps->n_row) - goto unbounded; - - changed = fuse(map, i, j, tabs, eq_i, ineq_i, eq_j, ineq_j, wraps); - - if (0) { -error: changed = -1; - } -unbounded: - - isl_mat_free(wraps); - isl_set_free(set_i); - isl_set_free(set_j); - isl_vec_free(bound); - - return changed; -} - -/* Check if the union of the given pair of basic maps - * can be represented by a single basic map. - * If so, replace the pair by the single basic map and return 1. - * Otherwise, return 0; - * - * We first check the effect of each constraint of one basic map - * on the other basic map. - * The constraint may be - * redundant the constraint is redundant in its own - * basic map and should be ignore and removed - * in the end - * valid all (integer) points of the other basic map - * satisfy the constraint - * separate no (integer) point of the other basic map - * satisfies the constraint - * cut some but not all points of the other basic map - * satisfy the constraint - * adj_eq the given constraint is adjacent (on the outside) - * to an equality of the other basic map - * adj_ineq the given constraint is adjacent (on the outside) - * to an inequality of the other basic map - * - * We consider seven cases in which we can replace the pair by a single - * basic map. We ignore all "redundant" constraints. - * - * 1. all constraints of one basic map are valid - * => the other basic map is a subset and can be removed - * - * 2. all constraints of both basic maps are either "valid" or "cut" - * and the facets corresponding to the "cut" constraints - * of one of the basic maps lies entirely inside the other basic map - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps - * - * 3. there is a single pair of adjacent inequalities - * (all other constraints are "valid") - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps - * - * 4. there is a single adjacent pair of an inequality and an equality, - * the other constraints of the basic map containing the inequality are - * "valid". Moreover, if the inequality the basic map is relaxed - * and then turned into an equality, then resulting facet lies - * entirely inside the other basic map - * => the pair can be replaced by the basic map containing - * the inequality, with the inequality relaxed. - * - * 5. there is a single adjacent pair of an inequality and an equality, - * the other constraints of the basic map containing the inequality are - * "valid". Moreover, the facets corresponding to both - * the inequality and the equality can be wrapped around their - * ridges to include the other basic map - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps together - * with all wrapping constraints - * - * 6. one of the basic maps extends beyond the other by at most one. - * Moreover, the facets corresponding to the cut constraints and - * the pieces of the other basic map at offset one from these cut - * constraints can be wrapped around their ridges to include - * the union of the two basic maps - * => the pair can be replaced by a basic map consisting - * of the valid constraints in both basic maps together - * with all wrapping constraints - * - * 7. the two basic maps live in adjacent hyperplanes. In principle - * such sets can always be combined through wrapping, but we impose - * that there is only one such pair, to avoid overeager coalescing. - * - * Throughout the computation, we maintain a collection of tableaus - * corresponding to the basic maps. When the basic maps are dropped - * or combined, the tableaus are modified accordingly. - */ -static int coalesce_pair(struct isl_map *map, int i, int j, - struct isl_tab **tabs) -{ - int changed = 0; - int *eq_i = NULL; - int *eq_j = NULL; - int *ineq_i = NULL; - int *ineq_j = NULL; - - eq_i = eq_status_in(map, i, j, tabs); - if (!eq_i) - goto error; - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ERROR)) - goto error; - if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_SEPARATE)) - goto done; - - eq_j = eq_status_in(map, j, i, tabs); - if (!eq_j) - goto error; - if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_ERROR)) - goto error; - if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_SEPARATE)) - goto done; - - ineq_i = ineq_status_in(map, i, j, tabs); - if (!ineq_i) - goto error; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_ERROR)) - goto error; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_SEPARATE)) - goto done; - - ineq_j = ineq_status_in(map, j, i, tabs); - if (!ineq_j) - goto error; - if (any(ineq_j, map->p[j]->n_ineq, STATUS_ERROR)) - goto error; - if (any(ineq_j, map->p[j]->n_ineq, STATUS_SEPARATE)) - goto done; - - if (all(eq_i, 2 * map->p[i]->n_eq, STATUS_VALID) && - all(ineq_i, map->p[i]->n_ineq, STATUS_VALID)) { - drop(map, j, tabs); - changed = 1; - } else if (all(eq_j, 2 * map->p[j]->n_eq, STATUS_VALID) && - all(ineq_j, map->p[j]->n_ineq, STATUS_VALID)) { - drop(map, i, tabs); - changed = 1; - } else if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_EQ)) { - changed = check_eq_adj_eq(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - } else if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_EQ)) { - changed = check_eq_adj_eq(map, j, i, tabs, - eq_j, ineq_j, eq_i, ineq_i); - } else if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ADJ_INEQ) || - any(eq_j, 2 * map->p[j]->n_eq, STATUS_ADJ_INEQ)) { - changed = check_adj_eq(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - } else if (any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_EQ) || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_EQ)) { - /* Can't happen */ - /* BAD ADJ INEQ */ - } else if (any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) || - any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ)) { - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) && - !any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = check_adj_ineq(map, i, j, tabs, - ineq_i, ineq_j); - } else { - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) && - !any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = check_facets(map, i, j, tabs, ineq_i, ineq_j); - if (!changed) - changed = check_wrap(map, i, j, tabs, - eq_i, ineq_i, eq_j, ineq_j); - } - -done: - free(eq_i); - free(eq_j); - free(ineq_i); - free(ineq_j); - return changed; -error: - free(eq_i); - free(eq_j); - free(ineq_i); - free(ineq_j); - return -1; -} - -static struct isl_map *coalesce(struct isl_map *map, struct isl_tab **tabs) -{ - int i, j; - - for (i = map->n - 2; i >= 0; --i) -restart: - for (j = i + 1; j < map->n; ++j) { - int changed; - changed = coalesce_pair(map, i, j, tabs); - if (changed < 0) - goto error; - if (changed) - goto restart; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -/* For each pair of basic maps in the map, check if the union of the two - * can be represented by a single basic map. - * If so, replace the pair by the single basic map and start over. - */ -struct isl_map *isl_map_coalesce(struct isl_map *map) -{ - int i; - unsigned n; - struct isl_tab **tabs = NULL; - - if (!map) - return NULL; - - if (map->n <= 1) - return map; - - map = isl_map_align_divs(map); - - tabs = isl_calloc_array(map->ctx, struct isl_tab *, map->n); - if (!tabs) - goto error; - - n = map->n; - for (i = 0; i < map->n; ++i) { - tabs[i] = isl_tab_from_basic_map(map->p[i]); - if (!tabs[i]) - goto error; - if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT)) - if (isl_tab_detect_implicit_equalities(tabs[i]) < 0) - goto error; - if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_REDUNDANT)) - if (isl_tab_detect_redundant(tabs[i]) < 0) - goto error; - } - for (i = map->n - 1; i >= 0; --i) - if (tabs[i]->empty) - drop(map, i, tabs); - - map = coalesce(map, tabs); - - if (map) - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_update_from_tab(map->p[i], - tabs[i]); - map->p[i] = isl_basic_map_finalize(map->p[i]); - if (!map->p[i]) - goto error; - ISL_F_SET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(map->p[i], ISL_BASIC_MAP_NO_REDUNDANT); - } - - for (i = 0; i < n; ++i) - isl_tab_free(tabs[i]); - - free(tabs); - - return map; -error: - if (tabs) - for (i = 0; i < n; ++i) - isl_tab_free(tabs[i]); - free(tabs); - isl_map_free(map); - return NULL; -} - -/* For each pair of basic sets in the set, check if the union of the two - * can be represented by a single basic set. - * If so, replace the pair by the single basic set and start over. - */ -struct isl_set *isl_set_coalesce(struct isl_set *set) -{ - return (struct isl_set *)isl_map_coalesce((struct isl_map *)set); -} diff --git a/cloog-0.17.0/isl/isl_config.h.in b/cloog-0.17.0/isl/isl_config.h.in deleted file mode 100644 index 91845049721c17650ec2a3b1037c9e6891fe1742..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_config.h.in +++ /dev/null @@ -1,118 +0,0 @@ -/* isl_config.h.in. Generated from configure.ac by autoheader. */ - -/* Clang installation prefix */ -#undef CLANG_PREFIX - -/* Define to Diagnostic for older versions of clang */ -#undef DiagnosticsEngine - -/* most gcc compilers know a function __attribute__((__warn_unused_result__)) - */ -#undef GCC_WARN_UNUSED_RESULT - -/* Define if Driver constructor takes CXXIsProduction argument */ -#undef HAVE_CXXISPRODUCTION - -/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */ -#undef HAVE_DECL_FFS - -/* Define to 1 if you have the declaration of `mp_get_memory_functions', and - to 0 if you don't. */ -#undef HAVE_DECL_MP_GET_MEMORY_FUNCTIONS - -/* Define to 1 if you have the declaration of `__builtin_ffs', and to 0 if you - don't. */ -#undef HAVE_DECL___BUILTIN_FFS - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* piplib is available */ -#undef ISL_PIPLIB - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of `char', as computed by sizeof. */ -#undef SIZEOF_CHAR - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - -/* The size of `void*', as computed by sizeof. */ -#undef SIZEOF_VOIDP - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if Driver::BuildCompilation takes ArrayRef */ -#undef USE_ARRAYREF - -/* Version number of package */ -#undef VERSION - -/* Define to getHostTriple for older versions of clang */ -#undef getDefaultTargetTriple - -/* Define to getInstantiationLineNumber for older versions of clang */ -#undef getExpansionLineNumber - -#include diff --git a/cloog-0.17.0/isl/isl_config_post.h b/cloog-0.17.0/isl/isl_config_post.h deleted file mode 100644 index a9c23f472c2a413236457f6e3d43b721a69be61c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_config_post.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef HAVE___ATTRIBUTE__ -#define __attribute__(x) -#endif - -#if (HAVE_DECL_FFS==0) && (HAVE_DECL___BUILTIN_FFS==1) -# define ffs __builtin_ffs -#endif diff --git a/cloog-0.17.0/isl/isl_constraint.c b/cloog-0.17.0/isl/isl_constraint.c deleted file mode 100644 index 923cf59228ddbcf3612855f60065966204325329..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_constraint.c +++ /dev/null @@ -1,1170 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c) -{ - return c ? isl_local_space_get_ctx(c->ls) : NULL; -} - -static unsigned n(struct isl_constraint *c, enum isl_dim_type type) -{ - return isl_local_space_dim(c->ls, type); -} - -static unsigned offset(struct isl_constraint *c, enum isl_dim_type type) -{ - return isl_local_space_offset(c->ls, type); -} - -static unsigned basic_map_offset(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type) -{ - return type == isl_dim_div ? 1 + isl_space_dim(bmap->dim, isl_dim_all) - : 1 + isl_space_offset(bmap->dim, type); -} - -static unsigned basic_set_offset(struct isl_basic_set *bset, - enum isl_dim_type type) -{ - isl_space *dim = bset->dim; - switch (type) { - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -__isl_give isl_constraint *isl_constraint_alloc_vec(int eq, - __isl_take isl_local_space *ls, __isl_take isl_vec *v) -{ - isl_constraint *constraint; - - if (!ls || !v) - goto error; - - constraint = isl_alloc_type(isl_vec_get_ctx(v), isl_constraint); - if (!constraint) - goto error; - - constraint->ref = 1; - constraint->eq = eq; - constraint->ls = ls; - constraint->v = v; - - return constraint; -error: - isl_local_space_free(ls); - isl_vec_free(v); - return NULL; -} - -__isl_give isl_constraint *isl_constraint_alloc(int eq, - __isl_take isl_local_space *ls) -{ - isl_ctx *ctx; - isl_vec *v; - - if (!ls) - return NULL; - - ctx = isl_local_space_get_ctx(ls); - v = isl_vec_alloc(ctx, 1 + isl_local_space_dim(ls, isl_dim_all)); - v = isl_vec_clr(v); - return isl_constraint_alloc_vec(eq, ls, v); -} - -struct isl_constraint *isl_basic_map_constraint(struct isl_basic_map *bmap, - isl_int **line) -{ - int eq; - isl_ctx *ctx; - isl_vec *v; - isl_local_space *ls = NULL; - isl_constraint *constraint; - - if (!bmap || !line) - goto error; - - eq = line >= bmap->eq; - - ctx = isl_basic_map_get_ctx(bmap); - ls = isl_basic_map_get_local_space(bmap); - v = isl_vec_alloc(ctx, 1 + isl_local_space_dim(ls, isl_dim_all)); - if (!v) - goto error; - isl_seq_cpy(v->el, line[0], v->size); - constraint = isl_constraint_alloc_vec(eq, ls, v); - - isl_basic_map_free(bmap); - return constraint; -error: - isl_local_space_free(ls); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_constraint *isl_basic_set_constraint(struct isl_basic_set *bset, - isl_int **line) -{ - return isl_basic_map_constraint((struct isl_basic_map *)bset, line); -} - -__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls) -{ - return isl_constraint_alloc(1, ls); -} - -__isl_give isl_constraint *isl_inequality_alloc(__isl_take isl_local_space *ls) -{ - return isl_constraint_alloc(0, ls); -} - -struct isl_constraint *isl_constraint_dup(struct isl_constraint *c) -{ - if (!c) - return NULL; - - return isl_constraint_alloc_vec(c->eq, isl_local_space_copy(c->ls), - isl_vec_copy(c->v)); -} - -struct isl_constraint *isl_constraint_cow(struct isl_constraint *c) -{ - if (!c) - return NULL; - - if (c->ref == 1) - return c; - c->ref--; - return isl_constraint_dup(c); -} - -struct isl_constraint *isl_constraint_copy(struct isl_constraint *constraint) -{ - if (!constraint) - return NULL; - - constraint->ref++; - return constraint; -} - -void *isl_constraint_free(struct isl_constraint *c) -{ - if (!c) - return NULL; - - if (--c->ref > 0) - return NULL; - - isl_local_space_free(c->ls); - isl_vec_free(c->v); - free(c); - - return NULL; -} - -int isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user) -{ - int i; - struct isl_constraint *c; - - if (!bmap) - return -1; - - isl_assert(bmap->ctx, ISL_F_ISSET(bmap, ISL_BASIC_MAP_FINAL), - return -1); - - for (i = 0; i < bmap->n_eq; ++i) { - c = isl_basic_map_constraint(isl_basic_map_copy(bmap), - &bmap->eq[i]); - if (!c) - return -1; - if (fn(c, user) < 0) - return -1; - } - - for (i = 0; i < bmap->n_ineq; ++i) { - c = isl_basic_map_constraint(isl_basic_map_copy(bmap), - &bmap->ineq[i]); - if (!c) - return -1; - if (fn(c, user) < 0) - return -1; - } - - return 0; -} - -int isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_constraint *c, void *user), void *user) -{ - return isl_basic_map_foreach_constraint((isl_basic_map *)bset, fn, user); -} - -int isl_constraint_is_equal(struct isl_constraint *constraint1, - struct isl_constraint *constraint2) -{ - int equal; - - if (!constraint1 || !constraint2) - return 0; - if (constraint1->eq != constraint2->eq) - return 0; - equal = isl_local_space_is_equal(constraint1->ls, constraint2->ls); - if (equal < 0 || !equal) - return equal; - return isl_vec_is_equal(constraint1->v, constraint2->v); -} - -struct isl_basic_map *isl_basic_map_add_constraint( - struct isl_basic_map *bmap, struct isl_constraint *constraint) -{ - isl_ctx *ctx; - isl_space *dim; - int equal_space; - - if (!bmap || !constraint) - goto error; - - ctx = isl_constraint_get_ctx(constraint); - dim = isl_constraint_get_space(constraint); - equal_space = isl_space_is_equal(bmap->dim, dim); - isl_space_free(dim); - isl_assert(ctx, equal_space, goto error); - - bmap = isl_basic_map_intersect(bmap, - isl_basic_map_from_constraint(constraint)); - return bmap; -error: - isl_basic_map_free(bmap); - isl_constraint_free(constraint); - return NULL; -} - -struct isl_basic_set *isl_basic_set_add_constraint( - struct isl_basic_set *bset, struct isl_constraint *constraint) -{ - return (struct isl_basic_set *) - isl_basic_map_add_constraint((struct isl_basic_map *)bset, - constraint); -} - -__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map, - __isl_take isl_constraint *constraint) -{ - isl_basic_map *bmap; - - bmap = isl_basic_map_from_constraint(constraint); - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; -} - -__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set, - __isl_take isl_constraint *constraint) -{ - return isl_map_add_constraint(set, constraint); -} - -__isl_give isl_space *isl_constraint_get_space( - __isl_keep isl_constraint *constraint) -{ - return constraint ? isl_local_space_get_space(constraint->ls) : NULL; -} - -int isl_constraint_dim(struct isl_constraint *constraint, - enum isl_dim_type type) -{ - if (!constraint) - return -1; - return n(constraint, type); -} - -int isl_constraint_involves_dims(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - isl_ctx *ctx; - int *active = NULL; - int involves = 0; - - if (!constraint) - return -1; - if (n == 0) - return 0; - - ctx = isl_constraint_get_ctx(constraint); - if (first + n > isl_constraint_dim(constraint, type)) - isl_die(ctx, isl_error_invalid, - "range out of bounds", return -1); - - active = isl_local_space_get_active(constraint->ls, - constraint->v->el + 1); - if (!active) - goto error; - - first += isl_local_space_offset(constraint->ls, type) - 1; - for (i = 0; i < n; ++i) - if (active[first + i]) { - involves = 1; - break; - } - - free(active); - - return involves; -error: - free(active); - return -1; -} - -const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint, - enum isl_dim_type type, unsigned pos) -{ - return constraint ? - isl_local_space_get_dim_name(constraint->ls, type, pos) : NULL; -} - -void isl_constraint_get_constant(struct isl_constraint *constraint, isl_int *v) -{ - if (!constraint) - return; - isl_int_set(*v, constraint->v->el[0]); -} - -void isl_constraint_get_coefficient(struct isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!constraint) - return; - - if (pos >= isl_local_space_dim(constraint->ls, type)) - isl_die(constraint->v->ctx, isl_error_invalid, - "position out of bounds", return); - - pos += isl_local_space_offset(constraint->ls, type); - isl_int_set(*v, constraint->v->el[pos]); -} - -__isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint, - int pos) -{ - if (!constraint) - return NULL; - - return isl_local_space_get_div(constraint->ls, pos); -} - -__isl_give isl_constraint *isl_constraint_set_constant( - __isl_take isl_constraint *constraint, isl_int v) -{ - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - constraint->v = isl_vec_cow(constraint->v); - if (!constraint->v) - return isl_constraint_free(constraint); - - isl_int_set(constraint->v->el[0], v); - return constraint; -} - -__isl_give isl_constraint *isl_constraint_set_constant_si( - __isl_take isl_constraint *constraint, int v) -{ - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - constraint->v = isl_vec_cow(constraint->v); - if (!constraint->v) - return isl_constraint_free(constraint); - - isl_int_set_si(constraint->v->el[0], v); - return constraint; -} - -__isl_give isl_constraint *isl_constraint_set_coefficient( - __isl_take isl_constraint *constraint, - enum isl_dim_type type, int pos, isl_int v) -{ - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - if (pos >= isl_local_space_dim(constraint->ls, type)) - isl_die(constraint->v->ctx, isl_error_invalid, - "position out of bounds", - return isl_constraint_free(constraint)); - - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - constraint->v = isl_vec_cow(constraint->v); - if (!constraint->v) - return isl_constraint_free(constraint); - - pos += isl_local_space_offset(constraint->ls, type); - isl_int_set(constraint->v->el[pos], v); - - return constraint; -} - -__isl_give isl_constraint *isl_constraint_set_coefficient_si( - __isl_take isl_constraint *constraint, - enum isl_dim_type type, int pos, int v) -{ - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - if (pos >= isl_local_space_dim(constraint->ls, type)) - isl_die(constraint->v->ctx, isl_error_invalid, - "position out of bounds", - return isl_constraint_free(constraint)); - - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - constraint->v = isl_vec_cow(constraint->v); - if (!constraint->v) - return isl_constraint_free(constraint); - - pos += isl_local_space_offset(constraint->ls, type); - isl_int_set_si(constraint->v->el[pos], v); - - return constraint; -} - -/* Drop any constraint from "bset" that is identical to "constraint". - * In particular, this means that the local spaces of "bset" and - * "constraint" need to be the same. - * - * Since the given constraint may actually be a pointer into the bset, - * we have to be careful not to reorder the constraints as the user - * may be holding on to other constraints from the same bset. - * This should be cleaned up when the internal representation of - * isl_constraint is changed to use isl_aff. - */ -__isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint) -{ - int i; - unsigned n; - isl_int **row; - unsigned total; - isl_local_space *ls1; - int equal; - - if (!bset || !constraint) - goto error; - - ls1 = isl_basic_set_get_local_space(bset); - equal = isl_local_space_is_equal(ls1, constraint->ls); - isl_local_space_free(ls1); - if (equal < 0) - goto error; - if (!equal) { - isl_constraint_free(constraint); - return bset; - } - - if (isl_constraint_is_equality(constraint)) { - n = bset->n_eq; - row = bset->eq; - } else { - n = bset->n_ineq; - row = bset->ineq; - } - - total = isl_constraint_dim(constraint, isl_dim_all); - for (i = 0; i < n; ++i) - if (isl_seq_eq(row[i], constraint->v->el, 1 + total)) - isl_seq_clr(row[i], 1 + total); - - isl_constraint_free(constraint); - return bset; -error: - isl_constraint_free(constraint); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_constraint *isl_constraint_negate(struct isl_constraint *constraint) -{ - isl_ctx *ctx; - - constraint = isl_constraint_cow(constraint); - if (!constraint) - return NULL; - - ctx = isl_constraint_get_ctx(constraint); - if (isl_constraint_is_equality(constraint)) - isl_die(ctx, isl_error_invalid, "cannot negate equality", - return isl_constraint_free(constraint)); - constraint->v = isl_vec_neg(constraint->v); - constraint->v = isl_vec_cow(constraint->v); - if (!constraint->v) - return isl_constraint_free(constraint); - isl_int_sub_ui(constraint->v->el[0], constraint->v->el[0], 1); - return constraint; -} - -int isl_constraint_is_equality(struct isl_constraint *constraint) -{ - if (!constraint) - return -1; - return constraint->eq; -} - -int isl_constraint_is_div_constraint(__isl_keep isl_constraint *constraint) -{ - int i; - int n_div; - - if (!constraint) - return -1; - if (isl_constraint_is_equality(constraint)) - return 0; - n_div = isl_constraint_dim(constraint, isl_dim_div); - for (i = 0; i < n_div; ++i) { - if (isl_local_space_is_div_constraint(constraint->ls, - constraint->v->el, i)) - return 1; - } - - return 0; -} - -/* We manually set ISL_BASIC_SET_FINAL instead of calling - * isl_basic_map_finalize because we want to keep the position - * of the divs and we therefore do not want to throw away redundant divs. - * This is arguably a bit fragile. - */ -__isl_give isl_basic_map *isl_basic_map_from_constraint( - __isl_take isl_constraint *constraint) -{ - int k; - isl_local_space *ls; - struct isl_basic_map *bmap; - isl_int *c; - unsigned total; - - if (!constraint) - return NULL; - - ls = isl_local_space_copy(constraint->ls); - bmap = isl_basic_map_from_local_space(ls); - bmap = isl_basic_map_extend_constraints(bmap, 1, 1); - if (isl_constraint_is_equality(constraint)) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - c = bmap->eq[k]; - } - else { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - c = bmap->ineq[k]; - } - total = isl_basic_map_total_dim(bmap); - isl_seq_cpy(c, constraint->v->el, 1 + total); - isl_constraint_free(constraint); - if (bmap) - ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); - return bmap; -error: - isl_constraint_free(constraint); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_from_constraint( - struct isl_constraint *constraint) -{ - if (!constraint) - return NULL; - - if (isl_constraint_dim(constraint, isl_dim_in) != 0) - isl_die(isl_constraint_get_ctx(constraint), isl_error_invalid, - "not a set constraint", - return isl_constraint_free(constraint)); - return (isl_basic_set *)isl_basic_map_from_constraint(constraint); -} - -int isl_basic_map_has_defining_equality( - __isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos, - __isl_give isl_constraint **c) -{ - int i; - unsigned offset; - unsigned total; - - if (!bmap) - return -1; - offset = basic_map_offset(bmap, type); - total = isl_basic_map_total_dim(bmap); - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), return -1); - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][offset + pos]) && - isl_seq_first_non_zero(bmap->eq[i]+offset+pos+1, - 1+total-offset-pos-1) == -1) { - *c = isl_basic_map_constraint(isl_basic_map_copy(bmap), - &bmap->eq[i]); - return 1; - } - return 0; -} - -int isl_basic_set_has_defining_equality( - __isl_keep isl_basic_set *bset, enum isl_dim_type type, int pos, - __isl_give isl_constraint **c) -{ - return isl_basic_map_has_defining_equality((isl_basic_map *)bset, - type, pos, c); -} - -int isl_basic_set_has_defining_inequalities( - struct isl_basic_set *bset, enum isl_dim_type type, int pos, - struct isl_constraint **lower, - struct isl_constraint **upper) -{ - int i, j; - unsigned offset; - unsigned total; - isl_int m; - isl_int **lower_line, **upper_line; - - if (!bset) - return -1; - offset = basic_set_offset(bset, type); - total = isl_basic_set_total_dim(bset); - isl_assert(bset->ctx, pos < isl_basic_set_dim(bset, type), return -1); - isl_int_init(m); - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][offset + pos])) - continue; - if (isl_int_is_one(bset->ineq[i][offset + pos])) - continue; - if (isl_int_is_negone(bset->ineq[i][offset + pos])) - continue; - if (isl_seq_first_non_zero(bset->ineq[i]+offset+pos+1, - 1+total-offset-pos-1) != -1) - continue; - for (j = i + 1; j < bset->n_ineq; ++j) { - if (!isl_seq_is_neg(bset->ineq[i]+1, bset->ineq[j]+1, - total)) - continue; - isl_int_add(m, bset->ineq[i][0], bset->ineq[j][0]); - if (isl_int_abs_ge(m, bset->ineq[i][offset+pos])) - continue; - - if (isl_int_is_pos(bset->ineq[i][offset+pos])) { - lower_line = &bset->ineq[i]; - upper_line = &bset->ineq[j]; - } else { - lower_line = &bset->ineq[j]; - upper_line = &bset->ineq[i]; - } - *lower = isl_basic_set_constraint( - isl_basic_set_copy(bset), lower_line); - *upper = isl_basic_set_constraint( - isl_basic_set_copy(bset), upper_line); - isl_int_clear(m); - return 1; - } - } - *lower = NULL; - *upper = NULL; - isl_int_clear(m); - return 0; -} - -/* Given two constraints "a" and "b" on the variable at position "abs_pos" - * (in "a" and "b"), add a constraint to "bset" that ensures that the - * bound implied by "a" is (strictly) larger than the bound implied by "b". - * - * If both constraints imply lower bounds, then this means that "a" is - * active in the result. - * If both constraints imply upper bounds, then this means that "b" is - * active in the result. - */ -static __isl_give isl_basic_set *add_larger_bound_constraint( - __isl_take isl_basic_set *bset, isl_int *a, isl_int *b, - unsigned abs_pos, int strict) -{ - int k; - isl_int t; - unsigned total; - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - - total = isl_basic_set_dim(bset, isl_dim_all); - - isl_int_init(t); - isl_int_neg(t, b[1 + abs_pos]); - - isl_seq_combine(bset->ineq[k], t, a, a[1 + abs_pos], b, 1 + abs_pos); - isl_seq_combine(bset->ineq[k] + 1 + abs_pos, - t, a + 1 + abs_pos + 1, a[1 + abs_pos], b + 1 + abs_pos + 1, - total - abs_pos); - - if (strict) - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - - isl_int_clear(t); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Add constraints to "context" that ensure that "u" is the smallest - * (and therefore active) upper bound on "abs_pos" in "bset" and return - * the resulting basic set. - */ -static __isl_give isl_basic_set *set_smallest_upper_bound( - __isl_keep isl_basic_set *context, - __isl_keep isl_basic_set *bset, unsigned abs_pos, int n_upper, int u) -{ - int j; - - context = isl_basic_set_copy(context); - context = isl_basic_set_cow(context); - - context = isl_basic_set_extend_constraints(context, 0, n_upper - 1); - - for (j = 0; j < bset->n_ineq; ++j) { - if (j == u) - continue; - if (!isl_int_is_neg(bset->ineq[j][1 + abs_pos])) - continue; - context = add_larger_bound_constraint(context, - bset->ineq[j], bset->ineq[u], abs_pos, j > u); - } - - context = isl_basic_set_simplify(context); - context = isl_basic_set_finalize(context); - - return context; -} - -/* Add constraints to "context" that ensure that "u" is the largest - * (and therefore active) upper bound on "abs_pos" in "bset" and return - * the resulting basic set. - */ -static __isl_give isl_basic_set *set_largest_lower_bound( - __isl_keep isl_basic_set *context, - __isl_keep isl_basic_set *bset, unsigned abs_pos, int n_lower, int l) -{ - int j; - - context = isl_basic_set_copy(context); - context = isl_basic_set_cow(context); - - context = isl_basic_set_extend_constraints(context, 0, n_lower - 1); - - for (j = 0; j < bset->n_ineq; ++j) { - if (j == l) - continue; - if (!isl_int_is_pos(bset->ineq[j][1 + abs_pos])) - continue; - context = add_larger_bound_constraint(context, - bset->ineq[l], bset->ineq[j], abs_pos, j > l); - } - - context = isl_basic_set_simplify(context); - context = isl_basic_set_finalize(context); - - return context; -} - -static int foreach_upper_bound(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned abs_pos, - __isl_take isl_basic_set *context, int n_upper, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - isl_basic_set *context_i; - isl_constraint *upper = NULL; - int i; - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][1 + abs_pos])) - continue; - - context_i = set_smallest_upper_bound(context, bset, - abs_pos, n_upper, i); - if (isl_basic_set_is_empty(context_i)) { - isl_basic_set_free(context_i); - continue; - } - upper = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[i]); - if (!upper || !context_i) - goto error; - if (fn(NULL, upper, context_i, user) < 0) - break; - } - - isl_basic_set_free(context); - - if (i < bset->n_ineq) - return -1; - - return 0; -error: - isl_constraint_free(upper); - isl_basic_set_free(context_i); - isl_basic_set_free(context); - return -1; -} - -static int foreach_lower_bound(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned abs_pos, - __isl_take isl_basic_set *context, int n_lower, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - isl_basic_set *context_i; - isl_constraint *lower = NULL; - int i; - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][1 + abs_pos])) - continue; - - context_i = set_largest_lower_bound(context, bset, - abs_pos, n_lower, i); - if (isl_basic_set_is_empty(context_i)) { - isl_basic_set_free(context_i); - continue; - } - lower = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[i]); - if (!lower || !context_i) - goto error; - if (fn(lower, NULL, context_i, user) < 0) - break; - } - - isl_basic_set_free(context); - - if (i < bset->n_ineq) - return -1; - - return 0; -error: - isl_constraint_free(lower); - isl_basic_set_free(context_i); - isl_basic_set_free(context); - return -1; -} - -static int foreach_bound_pair(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned abs_pos, - __isl_take isl_basic_set *context, int n_lower, int n_upper, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - isl_basic_set *context_i, *context_j; - isl_constraint *lower = NULL; - isl_constraint *upper = NULL; - int i, j; - - for (i = 0; i < bset->n_ineq; ++i) { - if (!isl_int_is_pos(bset->ineq[i][1 + abs_pos])) - continue; - - context_i = set_largest_lower_bound(context, bset, - abs_pos, n_lower, i); - if (isl_basic_set_is_empty(context_i)) { - isl_basic_set_free(context_i); - continue; - } - - for (j = 0; j < bset->n_ineq; ++j) { - if (!isl_int_is_neg(bset->ineq[j][1 + abs_pos])) - continue; - - context_j = set_smallest_upper_bound(context_i, bset, - abs_pos, n_upper, j); - context_j = isl_basic_set_extend_constraints(context_j, - 0, 1); - context_j = add_larger_bound_constraint(context_j, - bset->ineq[i], bset->ineq[j], abs_pos, 0); - context_j = isl_basic_set_simplify(context_j); - context_j = isl_basic_set_finalize(context_j); - if (isl_basic_set_is_empty(context_j)) { - isl_basic_set_free(context_j); - continue; - } - lower = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[i]); - upper = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->ineq[j]); - if (!lower || !upper || !context_j) - goto error; - if (fn(lower, upper, context_j, user) < 0) - break; - } - - isl_basic_set_free(context_i); - - if (j < bset->n_ineq) - break; - } - - isl_basic_set_free(context); - - if (i < bset->n_ineq) - return -1; - - return 0; -error: - isl_constraint_free(lower); - isl_constraint_free(upper); - isl_basic_set_free(context_i); - isl_basic_set_free(context_j); - isl_basic_set_free(context); - return -1; -} - -/* For each pair of lower and upper bounds on the variable "pos" - * of type "type", call "fn" with these lower and upper bounds and the - * set of constraints on the remaining variables where these bounds - * are active, i.e., (stricly) larger/smaller than the other lower/upper bounds. - * - * If the designated variable is equal to an affine combination of the - * other variables then fn is called with both lower and upper - * set to the corresponding equality. - * - * If there is no lower (or upper) bound, then NULL is passed - * as the corresponding bound. - * - * We first check if the variable is involved in any equality. - * If not, we count the number of lower and upper bounds and - * act accordingly. - */ -int isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, - int (*fn)(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, - __isl_take isl_basic_set *bset, void *user), void *user) -{ - int i; - isl_constraint *lower = NULL; - isl_constraint *upper = NULL; - isl_basic_set *context = NULL; - unsigned abs_pos; - int n_lower, n_upper; - - if (!bset) - return -1; - isl_assert(bset->ctx, pos < isl_basic_set_dim(bset, type), return -1); - isl_assert(bset->ctx, type == isl_dim_param || type == isl_dim_set, - return -1); - - abs_pos = pos; - if (type == isl_dim_set) - abs_pos += isl_basic_set_dim(bset, isl_dim_param); - - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][1 + abs_pos])) - continue; - - lower = isl_basic_set_constraint(isl_basic_set_copy(bset), - &bset->eq[i]); - upper = isl_constraint_copy(lower); - context = isl_basic_set_remove_dims(isl_basic_set_copy(bset), - type, pos, 1); - if (!lower || !upper || !context) - goto error; - return fn(lower, upper, context, user); - } - - n_lower = 0; - n_upper = 0; - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_pos(bset->ineq[i][1 + abs_pos])) - n_lower++; - else if (isl_int_is_neg(bset->ineq[i][1 + abs_pos])) - n_upper++; - } - - context = isl_basic_set_copy(bset); - context = isl_basic_set_cow(context); - if (!context) - goto error; - for (i = context->n_ineq - 1; i >= 0; --i) - if (!isl_int_is_zero(context->ineq[i][1 + abs_pos])) - isl_basic_set_drop_inequality(context, i); - - context = isl_basic_set_drop(context, type, pos, 1); - if (!n_lower && !n_upper) - return fn(NULL, NULL, context, user); - if (!n_lower) - return foreach_upper_bound(bset, type, abs_pos, context, n_upper, - fn, user); - if (!n_upper) - return foreach_lower_bound(bset, type, abs_pos, context, n_lower, - fn, user); - return foreach_bound_pair(bset, type, abs_pos, context, n_lower, n_upper, - fn, user); -error: - isl_constraint_free(lower); - isl_constraint_free(upper); - isl_basic_set_free(context); - return -1; -} - -__isl_give isl_aff *isl_constraint_get_bound( - __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos) -{ - isl_aff *aff; - isl_ctx *ctx; - - if (!constraint) - return NULL; - ctx = isl_constraint_get_ctx(constraint); - if (pos >= isl_constraint_dim(constraint, type)) - isl_die(ctx, isl_error_invalid, - "index out of bounds", return NULL); - if (isl_constraint_dim(constraint, isl_dim_in) != 0) - isl_die(ctx, isl_error_invalid, - "not a set constraint", return NULL); - - pos += offset(constraint, type); - if (isl_int_is_zero(constraint->v->el[pos])) - isl_die(ctx, isl_error_invalid, - "constraint does not define a bound on given dimension", - return NULL); - - aff = isl_aff_alloc(isl_local_space_copy(constraint->ls)); - if (!aff) - return NULL; - - if (isl_int_is_neg(constraint->v->el[pos])) - isl_seq_cpy(aff->v->el + 1, constraint->v->el, aff->v->size - 1); - else - isl_seq_neg(aff->v->el + 1, constraint->v->el, aff->v->size - 1); - isl_int_set_si(aff->v->el[1 + pos], 0); - isl_int_abs(aff->v->el[0], constraint->v->el[pos]); - - return aff; -} - -/* For an inequality constraint - * - * f >= 0 - * - * or an equality constraint - * - * f = 0 - * - * return the affine expression f. - */ -__isl_give isl_aff *isl_constraint_get_aff( - __isl_keep isl_constraint *constraint) -{ - isl_aff *aff; - - if (!constraint) - return NULL; - - aff = isl_aff_alloc(isl_local_space_copy(constraint->ls)); - if (!aff) - return NULL; - - isl_seq_cpy(aff->v->el + 1, constraint->v->el, aff->v->size - 1); - isl_int_set_si(aff->v->el[0], 1); - - return aff; -} - -/* Construct an equality constraint equating the given affine expression - * to zero. - */ -__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff) -{ - int k; - isl_local_space *ls; - isl_basic_set *bset; - - if (!aff) - return NULL; - - ls = isl_aff_get_domain_local_space(aff); - bset = isl_basic_set_from_local_space(ls); - bset = isl_basic_set_extend_constraints(bset, 1, 0); - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - - isl_seq_cpy(bset->eq[k], aff->v->el + 1, aff->v->size - 1); - isl_aff_free(aff); - - return isl_basic_set_constraint(bset, &bset->eq[k]); -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - return NULL; -} - -/* Construct an inequality constraint enforcing the given affine expression - * to be non-negative. - */ -__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff) -{ - int k; - isl_local_space *ls; - isl_basic_set *bset; - - if (!aff) - return NULL; - - ls = isl_aff_get_domain_local_space(aff); - bset = isl_basic_set_from_local_space(ls); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - - isl_seq_cpy(bset->ineq[k], aff->v->el + 1, aff->v->size - 1); - isl_aff_free(aff); - - return isl_basic_set_constraint(bset, &bset->ineq[k]); -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_constraint_private.h b/cloog-0.17.0/isl/isl_constraint_private.h deleted file mode 100644 index 83143254cc09f1fc9b2f910c6c3cad868437eaed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_constraint_private.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ISL_CONSTRAINT_PRIVATE_H -#define ISL_CONSTRAINT_PRIVATE_H - -#include -#include - -struct isl_constraint { - int ref; - - int eq; - isl_local_space *ls; - isl_vec *v; -}; - -struct isl_constraint *isl_basic_set_constraint(struct isl_basic_set *bset, - isl_int **line); - -#endif diff --git a/cloog-0.17.0/isl/isl_convex_hull.c b/cloog-0.17.0/isl/isl_convex_hull.c deleted file mode 100644 index a6e26b8448f0ec47d7c2883aabd177894d3d24c2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_convex_hull.c +++ /dev/null @@ -1,2432 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "isl_equalities.h" -#include "isl_tab.h" - -static struct isl_basic_set *uset_convex_hull_wrap_bounded(struct isl_set *set); - -/* Return 1 if constraint c is redundant with respect to the constraints - * in bmap. If c is a lower [upper] bound in some variable and bmap - * does not have a lower [upper] bound in that variable, then c cannot - * be redundant and we do not need solve any lp. - */ -int isl_basic_map_constraint_is_redundant(struct isl_basic_map **bmap, - isl_int *c, isl_int *opt_n, isl_int *opt_d) -{ - enum isl_lp_result res; - unsigned total; - int i, j; - - if (!bmap) - return -1; - - total = isl_basic_map_total_dim(*bmap); - for (i = 0; i < total; ++i) { - int sign; - if (isl_int_is_zero(c[1+i])) - continue; - sign = isl_int_sgn(c[1+i]); - for (j = 0; j < (*bmap)->n_ineq; ++j) - if (sign == isl_int_sgn((*bmap)->ineq[j][1+i])) - break; - if (j == (*bmap)->n_ineq) - break; - } - if (i < total) - return 0; - - res = isl_basic_map_solve_lp(*bmap, 0, c, (*bmap)->ctx->one, - opt_n, opt_d, NULL); - if (res == isl_lp_unbounded) - return 0; - if (res == isl_lp_error) - return -1; - if (res == isl_lp_empty) { - *bmap = isl_basic_map_set_to_empty(*bmap); - return 0; - } - return !isl_int_is_neg(*opt_n); -} - -int isl_basic_set_constraint_is_redundant(struct isl_basic_set **bset, - isl_int *c, isl_int *opt_n, isl_int *opt_d) -{ - return isl_basic_map_constraint_is_redundant( - (struct isl_basic_map **)bset, c, opt_n, opt_d); -} - -/* Remove redundant - * constraints. If the minimal value along the normal of a constraint - * is the same if the constraint is removed, then the constraint is redundant. - * - * Alternatively, we could have intersected the basic map with the - * corresponding equality and the checked if the dimension was that - * of a facet. - */ -__isl_give isl_basic_map *isl_basic_map_remove_redundancies( - __isl_take isl_basic_map *bmap) -{ - struct isl_tab *tab; - - if (!bmap) - return NULL; - - bmap = isl_basic_map_gauss(bmap, NULL); - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NO_REDUNDANT)) - return bmap; - if (bmap->n_ineq <= 1) - return bmap; - - tab = isl_tab_from_basic_map(bmap); - if (isl_tab_detect_implicit_equalities(tab) < 0) - goto error; - if (isl_tab_detect_redundant(tab) < 0) - goto error; - bmap = isl_basic_map_update_from_tab(bmap, tab); - isl_tab_free(tab); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - return bmap; -error: - isl_tab_free(tab); - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_remove_redundancies( - __isl_take isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_remove_redundancies((struct isl_basic_map *)bset); -} - -/* Remove redundant constraints in each of the basic maps. - */ -__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map) -{ - return isl_map_inline_foreach_basic_map(map, - &isl_basic_map_remove_redundancies); -} - -__isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set) -{ - return isl_map_remove_redundancies(set); -} - -/* Check if the set set is bound in the direction of the affine - * constraint c and if so, set the constant term such that the - * resulting constraint is a bounding constraint for the set. - */ -static int uset_is_bound(struct isl_set *set, isl_int *c, unsigned len) -{ - int first; - int j; - isl_int opt; - isl_int opt_denom; - - isl_int_init(opt); - isl_int_init(opt_denom); - first = 1; - for (j = 0; j < set->n; ++j) { - enum isl_lp_result res; - - if (ISL_F_ISSET(set->p[j], ISL_BASIC_SET_EMPTY)) - continue; - - res = isl_basic_set_solve_lp(set->p[j], - 0, c, set->ctx->one, &opt, &opt_denom, NULL); - if (res == isl_lp_unbounded) - break; - if (res == isl_lp_error) - goto error; - if (res == isl_lp_empty) { - set->p[j] = isl_basic_set_set_to_empty(set->p[j]); - if (!set->p[j]) - goto error; - continue; - } - if (first || isl_int_is_neg(opt)) { - if (!isl_int_is_one(opt_denom)) - isl_seq_scale(c, c, opt_denom, len); - isl_int_sub(c[0], c[0], opt); - } - first = 0; - } - isl_int_clear(opt); - isl_int_clear(opt_denom); - return j >= set->n; -error: - isl_int_clear(opt); - isl_int_clear(opt_denom); - return -1; -} - -__isl_give isl_basic_map *isl_basic_map_set_rational( - __isl_take isl_basic_set *bmap) -{ - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - ISL_F_SET(bmap, ISL_BASIC_MAP_RATIONAL); - - return isl_basic_map_finalize(bmap); -} - -__isl_give isl_basic_set *isl_basic_set_set_rational( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_set_rational(bset); -} - -__isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_set_rational(map->p[i]); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_set_rational(__isl_take isl_set *set) -{ - return isl_map_set_rational(set); -} - -static struct isl_basic_set *isl_basic_set_add_equality( - struct isl_basic_set *bset, isl_int *c) -{ - int i; - unsigned dim; - - if (!bset) - return NULL; - - if (ISL_F_ISSET(bset, ISL_BASIC_SET_EMPTY)) - return bset; - - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(bset->ctx, bset->n_div == 0, goto error); - dim = isl_basic_set_n_dim(bset); - bset = isl_basic_set_cow(bset); - bset = isl_basic_set_extend(bset, 0, dim, 0, 1, 0); - i = isl_basic_set_alloc_equality(bset); - if (i < 0) - goto error; - isl_seq_cpy(bset->eq[i], c, 1 + dim); - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_set *isl_set_add_basic_set_equality(struct isl_set *set, isl_int *c) -{ - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_add_equality(set->p[i], c); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -/* Given a union of basic sets, construct the constraints for wrapping - * a facet around one of its ridges. - * In particular, if each of n the d-dimensional basic sets i in "set" - * contains the origin, satisfies the constraints x_1 >= 0 and x_2 >= 0 - * and is defined by the constraints - * [ 1 ] - * A_i [ x ] >= 0 - * - * then the resulting set is of dimension n*(1+d) and has as constraints - * - * [ a_i ] - * A_i [ x_i ] >= 0 - * - * a_i >= 0 - * - * \sum_i x_{i,1} = 1 - */ -static struct isl_basic_set *wrap_constraints(struct isl_set *set) -{ - struct isl_basic_set *lp; - unsigned n_eq; - unsigned n_ineq; - int i, j, k; - unsigned dim, lp_dim; - - if (!set) - return NULL; - - dim = 1 + isl_set_n_dim(set); - n_eq = 1; - n_ineq = set->n; - for (i = 0; i < set->n; ++i) { - n_eq += set->p[i]->n_eq; - n_ineq += set->p[i]->n_ineq; - } - lp = isl_basic_set_alloc(set->ctx, 0, dim * set->n, 0, n_eq, n_ineq); - lp = isl_basic_set_set_rational(lp); - if (!lp) - return NULL; - lp_dim = isl_basic_set_n_dim(lp); - k = isl_basic_set_alloc_equality(lp); - isl_int_set_si(lp->eq[k][0], -1); - for (i = 0; i < set->n; ++i) { - isl_int_set_si(lp->eq[k][1+dim*i], 0); - isl_int_set_si(lp->eq[k][1+dim*i+1], 1); - isl_seq_clr(lp->eq[k]+1+dim*i+2, dim-2); - } - for (i = 0; i < set->n; ++i) { - k = isl_basic_set_alloc_inequality(lp); - isl_seq_clr(lp->ineq[k], 1+lp_dim); - isl_int_set_si(lp->ineq[k][1+dim*i], 1); - - for (j = 0; j < set->p[i]->n_eq; ++j) { - k = isl_basic_set_alloc_equality(lp); - isl_seq_clr(lp->eq[k], 1+dim*i); - isl_seq_cpy(lp->eq[k]+1+dim*i, set->p[i]->eq[j], dim); - isl_seq_clr(lp->eq[k]+1+dim*(i+1), dim*(set->n-i-1)); - } - - for (j = 0; j < set->p[i]->n_ineq; ++j) { - k = isl_basic_set_alloc_inequality(lp); - isl_seq_clr(lp->ineq[k], 1+dim*i); - isl_seq_cpy(lp->ineq[k]+1+dim*i, set->p[i]->ineq[j], dim); - isl_seq_clr(lp->ineq[k]+1+dim*(i+1), dim*(set->n-i-1)); - } - } - return lp; -} - -/* Given a facet "facet" of the convex hull of "set" and a facet "ridge" - * of that facet, compute the other facet of the convex hull that contains - * the ridge. - * - * We first transform the set such that the facet constraint becomes - * - * x_1 >= 0 - * - * I.e., the facet lies in - * - * x_1 = 0 - * - * and on that facet, the constraint that defines the ridge is - * - * x_2 >= 0 - * - * (This transformation is not strictly needed, all that is needed is - * that the ridge contains the origin.) - * - * Since the ridge contains the origin, the cone of the convex hull - * will be of the form - * - * x_1 >= 0 - * x_2 >= a x_1 - * - * with this second constraint defining the new facet. - * The constant a is obtained by settting x_1 in the cone of the - * convex hull to 1 and minimizing x_2. - * Now, each element in the cone of the convex hull is the sum - * of elements in the cones of the basic sets. - * If a_i is the dilation factor of basic set i, then the problem - * we need to solve is - * - * min \sum_i x_{i,2} - * st - * \sum_i x_{i,1} = 1 - * a_i >= 0 - * [ a_i ] - * A [ x_i ] >= 0 - * - * with - * [ 1 ] - * A_i [ x_i ] >= 0 - * - * the constraints of each (transformed) basic set. - * If a = n/d, then the constraint defining the new facet (in the transformed - * space) is - * - * -n x_1 + d x_2 >= 0 - * - * In the original space, we need to take the same combination of the - * corresponding constraints "facet" and "ridge". - * - * If a = -infty = "-1/0", then we just return the original facet constraint. - * This means that the facet is unbounded, but has a bounded intersection - * with the union of sets. - */ -isl_int *isl_set_wrap_facet(__isl_keep isl_set *set, - isl_int *facet, isl_int *ridge) -{ - int i; - isl_ctx *ctx; - struct isl_mat *T = NULL; - struct isl_basic_set *lp = NULL; - struct isl_vec *obj; - enum isl_lp_result res; - isl_int num, den; - unsigned dim; - - if (!set) - return NULL; - ctx = set->ctx; - set = isl_set_copy(set); - set = isl_set_set_rational(set); - - dim = 1 + isl_set_n_dim(set); - T = isl_mat_alloc(ctx, 3, dim); - if (!T) - goto error; - isl_int_set_si(T->row[0][0], 1); - isl_seq_clr(T->row[0]+1, dim - 1); - isl_seq_cpy(T->row[1], facet, dim); - isl_seq_cpy(T->row[2], ridge, dim); - T = isl_mat_right_inverse(T); - set = isl_set_preimage(set, T); - T = NULL; - if (!set) - goto error; - lp = wrap_constraints(set); - obj = isl_vec_alloc(ctx, 1 + dim*set->n); - if (!obj) - goto error; - isl_int_set_si(obj->block.data[0], 0); - for (i = 0; i < set->n; ++i) { - isl_seq_clr(obj->block.data + 1 + dim*i, 2); - isl_int_set_si(obj->block.data[1 + dim*i+2], 1); - isl_seq_clr(obj->block.data + 1 + dim*i+3, dim-3); - } - isl_int_init(num); - isl_int_init(den); - res = isl_basic_set_solve_lp(lp, 0, - obj->block.data, ctx->one, &num, &den, NULL); - if (res == isl_lp_ok) { - isl_int_neg(num, num); - isl_seq_combine(facet, num, facet, den, ridge, dim); - isl_seq_normalize(ctx, facet, dim); - } - isl_int_clear(num); - isl_int_clear(den); - isl_vec_free(obj); - isl_basic_set_free(lp); - isl_set_free(set); - if (res == isl_lp_error) - return NULL; - isl_assert(ctx, res == isl_lp_ok || res == isl_lp_unbounded, - return NULL); - return facet; -error: - isl_basic_set_free(lp); - isl_mat_free(T); - isl_set_free(set); - return NULL; -} - -/* Compute the constraint of a facet of "set". - * - * We first compute the intersection with a bounding constraint - * that is orthogonal to one of the coordinate axes. - * If the affine hull of this intersection has only one equality, - * we have found a facet. - * Otherwise, we wrap the current bounding constraint around - * one of the equalities of the face (one that is not equal to - * the current bounding constraint). - * This process continues until we have found a facet. - * The dimension of the intersection increases by at least - * one on each iteration, so termination is guaranteed. - */ -static __isl_give isl_mat *initial_facet_constraint(__isl_keep isl_set *set) -{ - struct isl_set *slice = NULL; - struct isl_basic_set *face = NULL; - int i; - unsigned dim = isl_set_n_dim(set); - int is_bound; - isl_mat *bounds; - - isl_assert(set->ctx, set->n > 0, goto error); - bounds = isl_mat_alloc(set->ctx, 1, 1 + dim); - if (!bounds) - return NULL; - - isl_seq_clr(bounds->row[0], dim); - isl_int_set_si(bounds->row[0][1 + dim - 1], 1); - is_bound = uset_is_bound(set, bounds->row[0], 1 + dim); - if (is_bound < 0) - goto error; - isl_assert(set->ctx, is_bound, goto error); - isl_seq_normalize(set->ctx, bounds->row[0], 1 + dim); - bounds->n_row = 1; - - for (;;) { - slice = isl_set_copy(set); - slice = isl_set_add_basic_set_equality(slice, bounds->row[0]); - face = isl_set_affine_hull(slice); - if (!face) - goto error; - if (face->n_eq == 1) { - isl_basic_set_free(face); - break; - } - for (i = 0; i < face->n_eq; ++i) - if (!isl_seq_eq(bounds->row[0], face->eq[i], 1 + dim) && - !isl_seq_is_neg(bounds->row[0], - face->eq[i], 1 + dim)) - break; - isl_assert(set->ctx, i < face->n_eq, goto error); - if (!isl_set_wrap_facet(set, bounds->row[0], face->eq[i])) - goto error; - isl_seq_normalize(set->ctx, bounds->row[0], bounds->n_col); - isl_basic_set_free(face); - } - - return bounds; -error: - isl_basic_set_free(face); - isl_mat_free(bounds); - return NULL; -} - -/* Given the bounding constraint "c" of a facet of the convex hull of "set", - * compute a hyperplane description of the facet, i.e., compute the facets - * of the facet. - * - * We compute an affine transformation that transforms the constraint - * - * [ 1 ] - * c [ x ] = 0 - * - * to the constraint - * - * z_1 = 0 - * - * by computing the right inverse U of a matrix that starts with the rows - * - * [ 1 0 ] - * [ c ] - * - * Then - * [ 1 ] [ 1 ] - * [ x ] = U [ z ] - * and - * [ 1 ] [ 1 ] - * [ z ] = Q [ x ] - * - * with Q = U^{-1} - * Since z_1 is zero, we can drop this variable as well as the corresponding - * column of U to obtain - * - * [ 1 ] [ 1 ] - * [ x ] = U' [ z' ] - * and - * [ 1 ] [ 1 ] - * [ z' ] = Q' [ x ] - * - * with Q' equal to Q, but without the corresponding row. - * After computing the facets of the facet in the z' space, - * we convert them back to the x space through Q. - */ -static struct isl_basic_set *compute_facet(struct isl_set *set, isl_int *c) -{ - struct isl_mat *m, *U, *Q; - struct isl_basic_set *facet = NULL; - struct isl_ctx *ctx; - unsigned dim; - - ctx = set->ctx; - set = isl_set_copy(set); - dim = isl_set_n_dim(set); - m = isl_mat_alloc(set->ctx, 2, 1 + dim); - if (!m) - goto error; - isl_int_set_si(m->row[0][0], 1); - isl_seq_clr(m->row[0]+1, dim); - isl_seq_cpy(m->row[1], c, 1+dim); - U = isl_mat_right_inverse(m); - Q = isl_mat_right_inverse(isl_mat_copy(U)); - U = isl_mat_drop_cols(U, 1, 1); - Q = isl_mat_drop_rows(Q, 1, 1); - set = isl_set_preimage(set, U); - facet = uset_convex_hull_wrap_bounded(set); - facet = isl_basic_set_preimage(facet, Q); - if (facet) - isl_assert(ctx, facet->n_eq == 0, goto error); - return facet; -error: - isl_basic_set_free(facet); - isl_set_free(set); - return NULL; -} - -/* Given an initial facet constraint, compute the remaining facets. - * We do this by running through all facets found so far and computing - * the adjacent facets through wrapping, adding those facets that we - * hadn't already found before. - * - * For each facet we have found so far, we first compute its facets - * in the resulting convex hull. That is, we compute the ridges - * of the resulting convex hull contained in the facet. - * We also compute the corresponding facet in the current approximation - * of the convex hull. There is no need to wrap around the ridges - * in this facet since that would result in a facet that is already - * present in the current approximation. - * - * This function can still be significantly optimized by checking which of - * the facets of the basic sets are also facets of the convex hull and - * using all the facets so far to help in constructing the facets of the - * facets - * and/or - * using the technique in section "3.1 Ridge Generation" of - * "Extended Convex Hull" by Fukuda et al. - */ -static struct isl_basic_set *extend(struct isl_basic_set *hull, - struct isl_set *set) -{ - int i, j, f; - int k; - struct isl_basic_set *facet = NULL; - struct isl_basic_set *hull_facet = NULL; - unsigned dim; - - if (!hull) - return NULL; - - isl_assert(set->ctx, set->n > 0, goto error); - - dim = isl_set_n_dim(set); - - for (i = 0; i < hull->n_ineq; ++i) { - facet = compute_facet(set, hull->ineq[i]); - facet = isl_basic_set_add_equality(facet, hull->ineq[i]); - facet = isl_basic_set_gauss(facet, NULL); - facet = isl_basic_set_normalize_constraints(facet); - hull_facet = isl_basic_set_copy(hull); - hull_facet = isl_basic_set_add_equality(hull_facet, hull->ineq[i]); - hull_facet = isl_basic_set_gauss(hull_facet, NULL); - hull_facet = isl_basic_set_normalize_constraints(hull_facet); - if (!facet || !hull_facet) - goto error; - hull = isl_basic_set_cow(hull); - hull = isl_basic_set_extend_space(hull, - isl_space_copy(hull->dim), 0, 0, facet->n_ineq); - if (!hull) - goto error; - for (j = 0; j < facet->n_ineq; ++j) { - for (f = 0; f < hull_facet->n_ineq; ++f) - if (isl_seq_eq(facet->ineq[j], - hull_facet->ineq[f], 1 + dim)) - break; - if (f < hull_facet->n_ineq) - continue; - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - isl_seq_cpy(hull->ineq[k], hull->ineq[i], 1+dim); - if (!isl_set_wrap_facet(set, hull->ineq[k], facet->ineq[j])) - goto error; - } - isl_basic_set_free(hull_facet); - isl_basic_set_free(facet); - } - hull = isl_basic_set_simplify(hull); - hull = isl_basic_set_finalize(hull); - return hull; -error: - isl_basic_set_free(hull_facet); - isl_basic_set_free(facet); - isl_basic_set_free(hull); - return NULL; -} - -/* Special case for computing the convex hull of a one dimensional set. - * We simply collect the lower and upper bounds of each basic set - * and the biggest of those. - */ -static struct isl_basic_set *convex_hull_1d(struct isl_set *set) -{ - struct isl_mat *c = NULL; - isl_int *lower = NULL; - isl_int *upper = NULL; - int i, j, k; - isl_int a, b; - struct isl_basic_set *hull; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_simplify(set->p[i]); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); - if (!set) - goto error; - isl_assert(set->ctx, set->n > 0, goto error); - c = isl_mat_alloc(set->ctx, 2, 2); - if (!c) - goto error; - - if (set->p[0]->n_eq > 0) { - isl_assert(set->ctx, set->p[0]->n_eq == 1, goto error); - lower = c->row[0]; - upper = c->row[1]; - if (isl_int_is_pos(set->p[0]->eq[0][1])) { - isl_seq_cpy(lower, set->p[0]->eq[0], 2); - isl_seq_neg(upper, set->p[0]->eq[0], 2); - } else { - isl_seq_neg(lower, set->p[0]->eq[0], 2); - isl_seq_cpy(upper, set->p[0]->eq[0], 2); - } - } else { - for (j = 0; j < set->p[0]->n_ineq; ++j) { - if (isl_int_is_pos(set->p[0]->ineq[j][1])) { - lower = c->row[0]; - isl_seq_cpy(lower, set->p[0]->ineq[j], 2); - } else { - upper = c->row[1]; - isl_seq_cpy(upper, set->p[0]->ineq[j], 2); - } - } - } - - isl_int_init(a); - isl_int_init(b); - for (i = 0; i < set->n; ++i) { - struct isl_basic_set *bset = set->p[i]; - int has_lower = 0; - int has_upper = 0; - - for (j = 0; j < bset->n_eq; ++j) { - has_lower = 1; - has_upper = 1; - if (lower) { - isl_int_mul(a, lower[0], bset->eq[j][1]); - isl_int_mul(b, lower[1], bset->eq[j][0]); - if (isl_int_lt(a, b) && isl_int_is_pos(bset->eq[j][1])) - isl_seq_cpy(lower, bset->eq[j], 2); - if (isl_int_gt(a, b) && isl_int_is_neg(bset->eq[j][1])) - isl_seq_neg(lower, bset->eq[j], 2); - } - if (upper) { - isl_int_mul(a, upper[0], bset->eq[j][1]); - isl_int_mul(b, upper[1], bset->eq[j][0]); - if (isl_int_lt(a, b) && isl_int_is_pos(bset->eq[j][1])) - isl_seq_neg(upper, bset->eq[j], 2); - if (isl_int_gt(a, b) && isl_int_is_neg(bset->eq[j][1])) - isl_seq_cpy(upper, bset->eq[j], 2); - } - } - for (j = 0; j < bset->n_ineq; ++j) { - if (isl_int_is_pos(bset->ineq[j][1])) - has_lower = 1; - if (isl_int_is_neg(bset->ineq[j][1])) - has_upper = 1; - if (lower && isl_int_is_pos(bset->ineq[j][1])) { - isl_int_mul(a, lower[0], bset->ineq[j][1]); - isl_int_mul(b, lower[1], bset->ineq[j][0]); - if (isl_int_lt(a, b)) - isl_seq_cpy(lower, bset->ineq[j], 2); - } - if (upper && isl_int_is_neg(bset->ineq[j][1])) { - isl_int_mul(a, upper[0], bset->ineq[j][1]); - isl_int_mul(b, upper[1], bset->ineq[j][0]); - if (isl_int_gt(a, b)) - isl_seq_cpy(upper, bset->ineq[j], 2); - } - } - if (!has_lower) - lower = NULL; - if (!has_upper) - upper = NULL; - } - isl_int_clear(a); - isl_int_clear(b); - - hull = isl_basic_set_alloc(set->ctx, 0, 1, 0, 0, 2); - hull = isl_basic_set_set_rational(hull); - if (!hull) - goto error; - if (lower) { - k = isl_basic_set_alloc_inequality(hull); - isl_seq_cpy(hull->ineq[k], lower, 2); - } - if (upper) { - k = isl_basic_set_alloc_inequality(hull); - isl_seq_cpy(hull->ineq[k], upper, 2); - } - hull = isl_basic_set_finalize(hull); - isl_set_free(set); - isl_mat_free(c); - return hull; -error: - isl_set_free(set); - isl_mat_free(c); - return NULL; -} - -static struct isl_basic_set *convex_hull_0d(struct isl_set *set) -{ - struct isl_basic_set *convex_hull; - - if (!set) - return NULL; - - if (isl_set_is_empty(set)) - convex_hull = isl_basic_set_empty(isl_space_copy(set->dim)); - else - convex_hull = isl_basic_set_universe(isl_space_copy(set->dim)); - isl_set_free(set); - return convex_hull; -} - -/* Compute the convex hull of a pair of basic sets without any parameters or - * integer divisions using Fourier-Motzkin elimination. - * The convex hull is the set of all points that can be written as - * the sum of points from both basic sets (in homogeneous coordinates). - * We set up the constraints in a space with dimensions for each of - * the three sets and then project out the dimensions corresponding - * to the two original basic sets, retaining only those corresponding - * to the convex hull. - */ -static struct isl_basic_set *convex_hull_pair_elim(struct isl_basic_set *bset1, - struct isl_basic_set *bset2) -{ - int i, j, k; - struct isl_basic_set *bset[2]; - struct isl_basic_set *hull = NULL; - unsigned dim; - - if (!bset1 || !bset2) - goto error; - - dim = isl_basic_set_n_dim(bset1); - hull = isl_basic_set_alloc(bset1->ctx, 0, 2 + 3 * dim, 0, - 1 + dim + bset1->n_eq + bset2->n_eq, - 2 + bset1->n_ineq + bset2->n_ineq); - bset[0] = bset1; - bset[1] = bset2; - for (i = 0; i < 2; ++i) { - for (j = 0; j < bset[i]->n_eq; ++j) { - k = isl_basic_set_alloc_equality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->eq[k], (i+1) * (1+dim)); - isl_seq_clr(hull->eq[k]+(i+2)*(1+dim), (1-i)*(1+dim)); - isl_seq_cpy(hull->eq[k]+(i+1)*(1+dim), bset[i]->eq[j], - 1+dim); - } - for (j = 0; j < bset[i]->n_ineq; ++j) { - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->ineq[k], (i+1) * (1+dim)); - isl_seq_clr(hull->ineq[k]+(i+2)*(1+dim), (1-i)*(1+dim)); - isl_seq_cpy(hull->ineq[k]+(i+1)*(1+dim), - bset[i]->ineq[j], 1+dim); - } - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->ineq[k], 1+2+3*dim); - isl_int_set_si(hull->ineq[k][(i+1)*(1+dim)], 1); - } - for (j = 0; j < 1+dim; ++j) { - k = isl_basic_set_alloc_equality(hull); - if (k < 0) - goto error; - isl_seq_clr(hull->eq[k], 1+2+3*dim); - isl_int_set_si(hull->eq[k][j], -1); - isl_int_set_si(hull->eq[k][1+dim+j], 1); - isl_int_set_si(hull->eq[k][2*(1+dim)+j], 1); - } - hull = isl_basic_set_set_rational(hull); - hull = isl_basic_set_remove_dims(hull, isl_dim_set, dim, 2*(1+dim)); - hull = isl_basic_set_remove_redundancies(hull); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return hull; -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - isl_basic_set_free(hull); - return NULL; -} - -/* Is the set bounded for each value of the parameters? - */ -int isl_basic_set_is_bounded(__isl_keep isl_basic_set *bset) -{ - struct isl_tab *tab; - int bounded; - - if (!bset) - return -1; - if (isl_basic_set_plain_is_empty(bset)) - return 1; - - tab = isl_tab_from_recession_cone(bset, 1); - bounded = isl_tab_cone_is_bounded(tab); - isl_tab_free(tab); - return bounded; -} - -/* Is the image bounded for each value of the parameters and - * the domain variables? - */ -int isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap) -{ - unsigned nparam = isl_basic_map_dim(bmap, isl_dim_param); - unsigned n_in = isl_basic_map_dim(bmap, isl_dim_in); - int bounded; - - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_move_dims(bmap, isl_dim_param, nparam, - isl_dim_in, 0, n_in); - bounded = isl_basic_set_is_bounded((isl_basic_set *)bmap); - isl_basic_map_free(bmap); - - return bounded; -} - -/* Is the set bounded for each value of the parameters? - */ -int isl_set_is_bounded(__isl_keep isl_set *set) -{ - int i; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) { - int bounded = isl_basic_set_is_bounded(set->p[i]); - if (!bounded || bounded < 0) - return bounded; - } - return 1; -} - -/* Compute the lineality space of the convex hull of bset1 and bset2. - * - * We first compute the intersection of the recession cone of bset1 - * with the negative of the recession cone of bset2 and then compute - * the linear hull of the resulting cone. - */ -static struct isl_basic_set *induced_lineality_space( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - int i, k; - struct isl_basic_set *lin = NULL; - unsigned dim; - - if (!bset1 || !bset2) - goto error; - - dim = isl_basic_set_total_dim(bset1); - lin = isl_basic_set_alloc_space(isl_basic_set_get_space(bset1), 0, - bset1->n_eq + bset2->n_eq, - bset1->n_ineq + bset2->n_ineq); - lin = isl_basic_set_set_rational(lin); - if (!lin) - goto error; - for (i = 0; i < bset1->n_eq; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_cpy(lin->eq[k] + 1, bset1->eq[i] + 1, dim); - } - for (i = 0; i < bset1->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->ineq[k][0], 0); - isl_seq_cpy(lin->ineq[k] + 1, bset1->ineq[i] + 1, dim); - } - for (i = 0; i < bset2->n_eq; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_neg(lin->eq[k] + 1, bset2->eq[i] + 1, dim); - } - for (i = 0; i < bset2->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->ineq[k][0], 0); - isl_seq_neg(lin->ineq[k] + 1, bset2->ineq[i] + 1, dim); - } - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return isl_basic_set_affine_hull(lin); -error: - isl_basic_set_free(lin); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -static struct isl_basic_set *uset_convex_hull(struct isl_set *set); - -/* Given a set and a linear space "lin" of dimension n > 0, - * project the linear space from the set, compute the convex hull - * and then map the set back to the original space. - * - * Let - * - * M x = 0 - * - * describe the linear space. We first compute the Hermite normal - * form H = M U of M = H Q, to obtain - * - * H Q x = 0 - * - * The last n rows of H will be zero, so the last n variables of x' = Q x - * are the one we want to project out. We do this by transforming each - * basic set A x >= b to A U x' >= b and then removing the last n dimensions. - * After computing the convex hull in x'_1, i.e., A' x'_1 >= b', - * we transform the hull back to the original space as A' Q_1 x >= b', - * with Q_1 all but the last n rows of Q. - */ -static struct isl_basic_set *modulo_lineality(struct isl_set *set, - struct isl_basic_set *lin) -{ - unsigned total = isl_basic_set_total_dim(lin); - unsigned lin_dim; - struct isl_basic_set *hull; - struct isl_mat *M, *U, *Q; - - if (!set || !lin) - goto error; - lin_dim = total - lin->n_eq; - M = isl_mat_sub_alloc6(set->ctx, lin->eq, 0, lin->n_eq, 1, total); - M = isl_mat_left_hermite(M, 0, &U, &Q); - if (!M) - goto error; - isl_mat_free(M); - isl_basic_set_free(lin); - - Q = isl_mat_drop_rows(Q, Q->n_row - lin_dim, lin_dim); - - U = isl_mat_lin_to_aff(U); - Q = isl_mat_lin_to_aff(Q); - - set = isl_set_preimage(set, U); - set = isl_set_remove_dims(set, isl_dim_set, total - lin_dim, lin_dim); - hull = uset_convex_hull(set); - hull = isl_basic_set_preimage(hull, Q); - - return hull; -error: - isl_basic_set_free(lin); - isl_set_free(set); - return NULL; -} - -/* Given two polyhedra with as constraints h_{ij} x >= 0 in homegeneous space, - * set up an LP for solving - * - * \sum_j \alpha_{1j} h_{1j} = \sum_j \alpha_{2j} h_{2j} - * - * \alpha{i0} corresponds to the (implicit) positivity constraint 1 >= 0 - * The next \alpha{ij} correspond to the equalities and come in pairs. - * The final \alpha{ij} correspond to the inequalities. - */ -static struct isl_basic_set *valid_direction_lp( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - isl_space *dim; - struct isl_basic_set *lp; - unsigned d; - int n; - int i, j, k; - - if (!bset1 || !bset2) - goto error; - d = 1 + isl_basic_set_total_dim(bset1); - n = 2 + - 2 * bset1->n_eq + bset1->n_ineq + 2 * bset2->n_eq + bset2->n_ineq; - dim = isl_space_set_alloc(bset1->ctx, 0, n); - lp = isl_basic_set_alloc_space(dim, 0, d, n); - if (!lp) - goto error; - for (i = 0; i < n; ++i) { - k = isl_basic_set_alloc_inequality(lp); - if (k < 0) - goto error; - isl_seq_clr(lp->ineq[k] + 1, n); - isl_int_set_si(lp->ineq[k][0], -1); - isl_int_set_si(lp->ineq[k][1 + i], 1); - } - for (i = 0; i < d; ++i) { - k = isl_basic_set_alloc_equality(lp); - if (k < 0) - goto error; - n = 0; - isl_int_set_si(lp->eq[k][n], 0); n++; - /* positivity constraint 1 >= 0 */ - isl_int_set_si(lp->eq[k][n], i == 0); n++; - for (j = 0; j < bset1->n_eq; ++j) { - isl_int_set(lp->eq[k][n], bset1->eq[j][i]); n++; - isl_int_neg(lp->eq[k][n], bset1->eq[j][i]); n++; - } - for (j = 0; j < bset1->n_ineq; ++j) { - isl_int_set(lp->eq[k][n], bset1->ineq[j][i]); n++; - } - /* positivity constraint 1 >= 0 */ - isl_int_set_si(lp->eq[k][n], -(i == 0)); n++; - for (j = 0; j < bset2->n_eq; ++j) { - isl_int_neg(lp->eq[k][n], bset2->eq[j][i]); n++; - isl_int_set(lp->eq[k][n], bset2->eq[j][i]); n++; - } - for (j = 0; j < bset2->n_ineq; ++j) { - isl_int_neg(lp->eq[k][n], bset2->ineq[j][i]); n++; - } - } - lp = isl_basic_set_gauss(lp, NULL); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return lp; -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Compute a vector s in the homogeneous space such that > 0 - * for all rays in the homogeneous space of the two cones that correspond - * to the input polyhedra bset1 and bset2. - * - * We compute s as a vector that satisfies - * - * s = \sum_j \alpha_{ij} h_{ij} for i = 1,2 (*) - * - * with h_{ij} the normals of the facets of polyhedron i - * (including the "positivity constraint" 1 >= 0) and \alpha_{ij} - * strictly positive numbers. For simplicity we impose \alpha_{ij} >= 1. - * We first set up an LP with as variables the \alpha{ij}. - * In this formulation, for each polyhedron i, - * the first constraint is the positivity constraint, followed by pairs - * of variables for the equalities, followed by variables for the inequalities. - * We then simply pick a feasible solution and compute s using (*). - * - * Note that we simply pick any valid direction and make no attempt - * to pick a "good" or even the "best" valid direction. - */ -static struct isl_vec *valid_direction( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - struct isl_basic_set *lp; - struct isl_tab *tab; - struct isl_vec *sample = NULL; - struct isl_vec *dir; - unsigned d; - int i; - int n; - - if (!bset1 || !bset2) - goto error; - lp = valid_direction_lp(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2)); - tab = isl_tab_from_basic_set(lp); - sample = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - isl_basic_set_free(lp); - if (!sample) - goto error; - d = isl_basic_set_total_dim(bset1); - dir = isl_vec_alloc(bset1->ctx, 1 + d); - if (!dir) - goto error; - isl_seq_clr(dir->block.data + 1, dir->size - 1); - n = 1; - /* positivity constraint 1 >= 0 */ - isl_int_set(dir->block.data[0], sample->block.data[n]); n++; - for (i = 0; i < bset1->n_eq; ++i) { - isl_int_sub(sample->block.data[n], - sample->block.data[n], sample->block.data[n+1]); - isl_seq_combine(dir->block.data, - bset1->ctx->one, dir->block.data, - sample->block.data[n], bset1->eq[i], 1 + d); - - n += 2; - } - for (i = 0; i < bset1->n_ineq; ++i) - isl_seq_combine(dir->block.data, - bset1->ctx->one, dir->block.data, - sample->block.data[n++], bset1->ineq[i], 1 + d); - isl_vec_free(sample); - isl_seq_normalize(bset1->ctx, dir->el, dir->size); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return dir; -error: - isl_vec_free(sample); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Given a polyhedron b_i + A_i x >= 0 and a map T = S^{-1}, - * compute b_i' + A_i' x' >= 0, with - * - * [ b_i A_i ] [ y' ] [ y' ] - * [ 1 0 ] S^{-1} [ x' ] >= 0 or [ b_i' A_i' ] [ x' ] >= 0 - * - * In particular, add the "positivity constraint" and then perform - * the mapping. - */ -static struct isl_basic_set *homogeneous_map(struct isl_basic_set *bset, - struct isl_mat *T) -{ - int k; - - if (!bset) - goto error; - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k] + 1, isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->ineq[k][0], 1); - bset = isl_basic_set_preimage(bset, T); - return bset; -error: - isl_mat_free(T); - isl_basic_set_free(bset); - return NULL; -} - -/* Compute the convex hull of a pair of basic sets without any parameters or - * integer divisions, where the convex hull is known to be pointed, - * but the basic sets may be unbounded. - * - * We turn this problem into the computation of a convex hull of a pair - * _bounded_ polyhedra by "changing the direction of the homogeneous - * dimension". This idea is due to Matthias Koeppe. - * - * Consider the cones in homogeneous space that correspond to the - * input polyhedra. The rays of these cones are also rays of the - * polyhedra if the coordinate that corresponds to the homogeneous - * dimension is zero. That is, if the inner product of the rays - * with the homogeneous direction is zero. - * The cones in the homogeneous space can also be considered to - * correspond to other pairs of polyhedra by chosing a different - * homogeneous direction. To ensure that both of these polyhedra - * are bounded, we need to make sure that all rays of the cones - * correspond to vertices and not to rays. - * Let s be a direction such that > 0 for all rays r of both cones. - * Then using s as a homogeneous direction, we obtain a pair of polytopes. - * The vector s is computed in valid_direction. - * - * Note that we need to consider _all_ rays of the cones and not just - * the rays that correspond to rays in the polyhedra. If we were to - * only consider those rays and turn them into vertices, then we - * may inadvertently turn some vertices into rays. - * - * The standard homogeneous direction is the unit vector in the 0th coordinate. - * We therefore transform the two polyhedra such that the selected - * direction is mapped onto this standard direction and then proceed - * with the normal computation. - * Let S be a non-singular square matrix with s as its first row, - * then we want to map the polyhedra to the space - * - * [ y' ] [ y ] [ y ] [ y' ] - * [ x' ] = S [ x ] i.e., [ x ] = S^{-1} [ x' ] - * - * We take S to be the unimodular completion of s to limit the growth - * of the coefficients in the following computations. - * - * Let b_i + A_i x >= 0 be the constraints of polyhedron i. - * We first move to the homogeneous dimension - * - * b_i y + A_i x >= 0 [ b_i A_i ] [ y ] [ 0 ] - * y >= 0 or [ 1 0 ] [ x ] >= [ 0 ] - * - * Then we change directoin - * - * [ b_i A_i ] [ y' ] [ y' ] - * [ 1 0 ] S^{-1} [ x' ] >= 0 or [ b_i' A_i' ] [ x' ] >= 0 - * - * Then we compute the convex hull of the polytopes b_i' + A_i' x' >= 0 - * resulting in b' + A' x' >= 0, which we then convert back - * - * [ y ] [ y ] - * [ b' A' ] S [ x ] >= 0 or [ b A ] [ x ] >= 0 - * - * The polyhedron b + A x >= 0 is then the convex hull of the input polyhedra. - */ -static struct isl_basic_set *convex_hull_pair_pointed( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - struct isl_ctx *ctx = NULL; - struct isl_vec *dir = NULL; - struct isl_mat *T = NULL; - struct isl_mat *T2 = NULL; - struct isl_basic_set *hull; - struct isl_set *set; - - if (!bset1 || !bset2) - goto error; - ctx = bset1->ctx; - dir = valid_direction(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2)); - if (!dir) - goto error; - T = isl_mat_alloc(bset1->ctx, dir->size, dir->size); - if (!T) - goto error; - isl_seq_cpy(T->row[0], dir->block.data, dir->size); - T = isl_mat_unimodular_complete(T, 1); - T2 = isl_mat_right_inverse(isl_mat_copy(T)); - - bset1 = homogeneous_map(bset1, isl_mat_copy(T2)); - bset2 = homogeneous_map(bset2, T2); - set = isl_set_alloc_space(isl_basic_set_get_space(bset1), 2, 0); - set = isl_set_add_basic_set(set, bset1); - set = isl_set_add_basic_set(set, bset2); - hull = uset_convex_hull(set); - hull = isl_basic_set_preimage(hull, T); - - isl_vec_free(dir); - - return hull; -error: - isl_vec_free(dir); - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -static struct isl_basic_set *uset_convex_hull_wrap(struct isl_set *set); -static struct isl_basic_set *modulo_affine_hull( - struct isl_set *set, struct isl_basic_set *affine_hull); - -/* Compute the convex hull of a pair of basic sets without any parameters or - * integer divisions. - * - * This function is called from uset_convex_hull_unbounded, which - * means that the complete convex hull is unbounded. Some pairs - * of basic sets may still be bounded, though. - * They may even lie inside a lower dimensional space, in which - * case they need to be handled inside their affine hull since - * the main algorithm assumes that the result is full-dimensional. - * - * If the convex hull of the two basic sets would have a non-trivial - * lineality space, we first project out this lineality space. - */ -static struct isl_basic_set *convex_hull_pair(struct isl_basic_set *bset1, - struct isl_basic_set *bset2) -{ - isl_basic_set *lin, *aff; - int bounded1, bounded2; - - if (bset1->ctx->opt->convex == ISL_CONVEX_HULL_FM) - return convex_hull_pair_elim(bset1, bset2); - - aff = isl_set_affine_hull(isl_basic_set_union(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2))); - if (!aff) - goto error; - if (aff->n_eq != 0) - return modulo_affine_hull(isl_basic_set_union(bset1, bset2), aff); - isl_basic_set_free(aff); - - bounded1 = isl_basic_set_is_bounded(bset1); - bounded2 = isl_basic_set_is_bounded(bset2); - - if (bounded1 < 0 || bounded2 < 0) - goto error; - - if (bounded1 && bounded2) - uset_convex_hull_wrap(isl_basic_set_union(bset1, bset2)); - - if (bounded1 || bounded2) - return convex_hull_pair_pointed(bset1, bset2); - - lin = induced_lineality_space(isl_basic_set_copy(bset1), - isl_basic_set_copy(bset2)); - if (!lin) - goto error; - if (isl_basic_set_is_universe(lin)) { - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return lin; - } - if (lin->n_eq < isl_basic_set_total_dim(lin)) { - struct isl_set *set; - set = isl_set_alloc_space(isl_basic_set_get_space(bset1), 2, 0); - set = isl_set_add_basic_set(set, bset1); - set = isl_set_add_basic_set(set, bset2); - return modulo_lineality(set, lin); - } - isl_basic_set_free(lin); - - return convex_hull_pair_pointed(bset1, bset2); -error: - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - return NULL; -} - -/* Compute the lineality space of a basic set. - * We currently do not allow the basic set to have any divs. - * We basically just drop the constants and turn every inequality - * into an equality. - */ -struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset) -{ - int i, k; - struct isl_basic_set *lin = NULL; - unsigned dim; - - if (!bset) - goto error; - isl_assert(bset->ctx, bset->n_div == 0, goto error); - dim = isl_basic_set_total_dim(bset); - - lin = isl_basic_set_alloc_space(isl_basic_set_get_space(bset), 0, dim, 0); - if (!lin) - goto error; - for (i = 0; i < bset->n_eq; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_cpy(lin->eq[k] + 1, bset->eq[i] + 1, dim); - } - lin = isl_basic_set_gauss(lin, NULL); - if (!lin) - goto error; - for (i = 0; i < bset->n_ineq && lin->n_eq < dim; ++i) { - k = isl_basic_set_alloc_equality(lin); - if (k < 0) - goto error; - isl_int_set_si(lin->eq[k][0], 0); - isl_seq_cpy(lin->eq[k] + 1, bset->ineq[i] + 1, dim); - lin = isl_basic_set_gauss(lin, NULL); - if (!lin) - goto error; - } - isl_basic_set_free(bset); - return lin; -error: - isl_basic_set_free(lin); - isl_basic_set_free(bset); - return NULL; -} - -/* Compute the (linear) hull of the lineality spaces of the basic sets in the - * "underlying" set "set". - */ -static struct isl_basic_set *uset_combined_lineality_space(struct isl_set *set) -{ - int i; - struct isl_set *lin = NULL; - - if (!set) - return NULL; - if (set->n == 0) { - isl_space *dim = isl_set_get_space(set); - isl_set_free(set); - return isl_basic_set_empty(dim); - } - - lin = isl_set_alloc_space(isl_set_get_space(set), set->n, 0); - for (i = 0; i < set->n; ++i) - lin = isl_set_add_basic_set(lin, - isl_basic_set_lineality_space(isl_basic_set_copy(set->p[i]))); - isl_set_free(set); - return isl_set_affine_hull(lin); -} - -/* Compute the convex hull of a set without any parameters or - * integer divisions. - * In each step, we combined two basic sets until only one - * basic set is left. - * The input basic sets are assumed not to have a non-trivial - * lineality space. If any of the intermediate results has - * a non-trivial lineality space, it is projected out. - */ -static struct isl_basic_set *uset_convex_hull_unbounded(struct isl_set *set) -{ - struct isl_basic_set *convex_hull = NULL; - - convex_hull = isl_set_copy_basic_set(set); - set = isl_set_drop_basic_set(set, convex_hull); - if (!set) - goto error; - while (set->n > 0) { - struct isl_basic_set *t; - t = isl_set_copy_basic_set(set); - if (!t) - goto error; - set = isl_set_drop_basic_set(set, t); - if (!set) - goto error; - convex_hull = convex_hull_pair(convex_hull, t); - if (set->n == 0) - break; - t = isl_basic_set_lineality_space(isl_basic_set_copy(convex_hull)); - if (!t) - goto error; - if (isl_basic_set_is_universe(t)) { - isl_basic_set_free(convex_hull); - convex_hull = t; - break; - } - if (t->n_eq < isl_basic_set_total_dim(t)) { - set = isl_set_add_basic_set(set, convex_hull); - return modulo_lineality(set, t); - } - isl_basic_set_free(t); - } - isl_set_free(set); - return convex_hull; -error: - isl_set_free(set); - isl_basic_set_free(convex_hull); - return NULL; -} - -/* Compute an initial hull for wrapping containing a single initial - * facet. - * This function assumes that the given set is bounded. - */ -static struct isl_basic_set *initial_hull(struct isl_basic_set *hull, - struct isl_set *set) -{ - struct isl_mat *bounds = NULL; - unsigned dim; - int k; - - if (!hull) - goto error; - bounds = initial_facet_constraint(set); - if (!bounds) - goto error; - k = isl_basic_set_alloc_inequality(hull); - if (k < 0) - goto error; - dim = isl_set_n_dim(set); - isl_assert(set->ctx, 1 + dim == bounds->n_col, goto error); - isl_seq_cpy(hull->ineq[k], bounds->row[0], bounds->n_col); - isl_mat_free(bounds); - - return hull; -error: - isl_basic_set_free(hull); - isl_mat_free(bounds); - return NULL; -} - -struct max_constraint { - struct isl_mat *c; - int count; - int ineq; -}; - -static int max_constraint_equal(const void *entry, const void *val) -{ - struct max_constraint *a = (struct max_constraint *)entry; - isl_int *b = (isl_int *)val; - - return isl_seq_eq(a->c->row[0] + 1, b, a->c->n_col - 1); -} - -static void update_constraint(struct isl_ctx *ctx, struct isl_hash_table *table, - isl_int *con, unsigned len, int n, int ineq) -{ - struct isl_hash_table_entry *entry; - struct max_constraint *c; - uint32_t c_hash; - - c_hash = isl_seq_get_hash(con + 1, len); - entry = isl_hash_table_find(ctx, table, c_hash, max_constraint_equal, - con + 1, 0); - if (!entry) - return; - c = entry->data; - if (c->count < n) { - isl_hash_table_remove(ctx, table, entry); - return; - } - c->count++; - if (isl_int_gt(c->c->row[0][0], con[0])) - return; - if (isl_int_eq(c->c->row[0][0], con[0])) { - if (ineq) - c->ineq = ineq; - return; - } - c->c = isl_mat_cow(c->c); - isl_int_set(c->c->row[0][0], con[0]); - c->ineq = ineq; -} - -/* Check whether the constraint hash table "table" constains the constraint - * "con". - */ -static int has_constraint(struct isl_ctx *ctx, struct isl_hash_table *table, - isl_int *con, unsigned len, int n) -{ - struct isl_hash_table_entry *entry; - struct max_constraint *c; - uint32_t c_hash; - - c_hash = isl_seq_get_hash(con + 1, len); - entry = isl_hash_table_find(ctx, table, c_hash, max_constraint_equal, - con + 1, 0); - if (!entry) - return 0; - c = entry->data; - if (c->count < n) - return 0; - return isl_int_eq(c->c->row[0][0], con[0]); -} - -/* Check for inequality constraints of a basic set without equalities - * such that the same or more stringent copies of the constraint appear - * in all of the basic sets. Such constraints are necessarily facet - * constraints of the convex hull. - * - * If the resulting basic set is by chance identical to one of - * the basic sets in "set", then we know that this basic set contains - * all other basic sets and is therefore the convex hull of set. - * In this case we set *is_hull to 1. - */ -static struct isl_basic_set *common_constraints(struct isl_basic_set *hull, - struct isl_set *set, int *is_hull) -{ - int i, j, s, n; - int min_constraints; - int best; - struct max_constraint *constraints = NULL; - struct isl_hash_table *table = NULL; - unsigned total; - - *is_hull = 0; - - for (i = 0; i < set->n; ++i) - if (set->p[i]->n_eq == 0) - break; - if (i >= set->n) - return hull; - min_constraints = set->p[i]->n_ineq; - best = i; - for (i = best + 1; i < set->n; ++i) { - if (set->p[i]->n_eq != 0) - continue; - if (set->p[i]->n_ineq >= min_constraints) - continue; - min_constraints = set->p[i]->n_ineq; - best = i; - } - constraints = isl_calloc_array(hull->ctx, struct max_constraint, - min_constraints); - if (!constraints) - return hull; - table = isl_alloc_type(hull->ctx, struct isl_hash_table); - if (isl_hash_table_init(hull->ctx, table, min_constraints)) - goto error; - - total = isl_space_dim(set->dim, isl_dim_all); - for (i = 0; i < set->p[best]->n_ineq; ++i) { - constraints[i].c = isl_mat_sub_alloc6(hull->ctx, - set->p[best]->ineq + i, 0, 1, 0, 1 + total); - if (!constraints[i].c) - goto error; - constraints[i].ineq = 1; - } - for (i = 0; i < min_constraints; ++i) { - struct isl_hash_table_entry *entry; - uint32_t c_hash; - c_hash = isl_seq_get_hash(constraints[i].c->row[0] + 1, total); - entry = isl_hash_table_find(hull->ctx, table, c_hash, - max_constraint_equal, constraints[i].c->row[0] + 1, 1); - if (!entry) - goto error; - isl_assert(hull->ctx, !entry->data, goto error); - entry->data = &constraints[i]; - } - - n = 0; - for (s = 0; s < set->n; ++s) { - if (s == best) - continue; - - for (i = 0; i < set->p[s]->n_eq; ++i) { - isl_int *eq = set->p[s]->eq[i]; - for (j = 0; j < 2; ++j) { - isl_seq_neg(eq, eq, 1 + total); - update_constraint(hull->ctx, table, - eq, total, n, 0); - } - } - for (i = 0; i < set->p[s]->n_ineq; ++i) { - isl_int *ineq = set->p[s]->ineq[i]; - update_constraint(hull->ctx, table, ineq, total, n, - set->p[s]->n_eq == 0); - } - ++n; - } - - for (i = 0; i < min_constraints; ++i) { - if (constraints[i].count < n) - continue; - if (!constraints[i].ineq) - continue; - j = isl_basic_set_alloc_inequality(hull); - if (j < 0) - goto error; - isl_seq_cpy(hull->ineq[j], constraints[i].c->row[0], 1 + total); - } - - for (s = 0; s < set->n; ++s) { - if (set->p[s]->n_eq) - continue; - if (set->p[s]->n_ineq != hull->n_ineq) - continue; - for (i = 0; i < set->p[s]->n_ineq; ++i) { - isl_int *ineq = set->p[s]->ineq[i]; - if (!has_constraint(hull->ctx, table, ineq, total, n)) - break; - } - if (i == set->p[s]->n_ineq) - *is_hull = 1; - } - - isl_hash_table_clear(table); - for (i = 0; i < min_constraints; ++i) - isl_mat_free(constraints[i].c); - free(constraints); - free(table); - return hull; -error: - isl_hash_table_clear(table); - free(table); - if (constraints) - for (i = 0; i < min_constraints; ++i) - isl_mat_free(constraints[i].c); - free(constraints); - return hull; -} - -/* Create a template for the convex hull of "set" and fill it up - * obvious facet constraints, if any. If the result happens to - * be the convex hull of "set" then *is_hull is set to 1. - */ -static struct isl_basic_set *proto_hull(struct isl_set *set, int *is_hull) -{ - struct isl_basic_set *hull; - unsigned n_ineq; - int i; - - n_ineq = 1; - for (i = 0; i < set->n; ++i) { - n_ineq += set->p[i]->n_eq; - n_ineq += set->p[i]->n_ineq; - } - hull = isl_basic_set_alloc_space(isl_space_copy(set->dim), 0, 0, n_ineq); - hull = isl_basic_set_set_rational(hull); - if (!hull) - return NULL; - return common_constraints(hull, set, is_hull); -} - -static struct isl_basic_set *uset_convex_hull_wrap(struct isl_set *set) -{ - struct isl_basic_set *hull; - int is_hull; - - hull = proto_hull(set, &is_hull); - if (hull && !is_hull) { - if (hull->n_ineq == 0) - hull = initial_hull(hull, set); - hull = extend(hull, set); - } - isl_set_free(set); - - return hull; -} - -/* Compute the convex hull of a set without any parameters or - * integer divisions. Depending on whether the set is bounded, - * we pass control to the wrapping based convex hull or - * the Fourier-Motzkin elimination based convex hull. - * We also handle a few special cases before checking the boundedness. - */ -static struct isl_basic_set *uset_convex_hull(struct isl_set *set) -{ - struct isl_basic_set *convex_hull = NULL; - struct isl_basic_set *lin; - - if (isl_set_n_dim(set) == 0) - return convex_hull_0d(set); - - set = isl_set_coalesce(set); - set = isl_set_set_rational(set); - - if (!set) - goto error; - if (!set) - return NULL; - if (set->n == 1) { - convex_hull = isl_basic_set_copy(set->p[0]); - isl_set_free(set); - return convex_hull; - } - if (isl_set_n_dim(set) == 1) - return convex_hull_1d(set); - - if (isl_set_is_bounded(set) && - set->ctx->opt->convex == ISL_CONVEX_HULL_WRAP) - return uset_convex_hull_wrap(set); - - lin = uset_combined_lineality_space(isl_set_copy(set)); - if (!lin) - goto error; - if (isl_basic_set_is_universe(lin)) { - isl_set_free(set); - return lin; - } - if (lin->n_eq < isl_basic_set_total_dim(lin)) - return modulo_lineality(set, lin); - isl_basic_set_free(lin); - - return uset_convex_hull_unbounded(set); -error: - isl_set_free(set); - isl_basic_set_free(convex_hull); - return NULL; -} - -/* This is the core procedure, where "set" is a "pure" set, i.e., - * without parameters or divs and where the convex hull of set is - * known to be full-dimensional. - */ -static struct isl_basic_set *uset_convex_hull_wrap_bounded(struct isl_set *set) -{ - struct isl_basic_set *convex_hull = NULL; - - if (!set) - goto error; - - if (isl_set_n_dim(set) == 0) { - convex_hull = isl_basic_set_universe(isl_space_copy(set->dim)); - isl_set_free(set); - convex_hull = isl_basic_set_set_rational(convex_hull); - return convex_hull; - } - - set = isl_set_set_rational(set); - set = isl_set_coalesce(set); - if (!set) - goto error; - if (set->n == 1) { - convex_hull = isl_basic_set_copy(set->p[0]); - isl_set_free(set); - return convex_hull; - } - if (isl_set_n_dim(set) == 1) - return convex_hull_1d(set); - - return uset_convex_hull_wrap(set); -error: - isl_set_free(set); - return NULL; -} - -/* Compute the convex hull of set "set" with affine hull "affine_hull", - * We first remove the equalities (transforming the set), compute the - * convex hull of the transformed set and then add the equalities back - * (after performing the inverse transformation. - */ -static struct isl_basic_set *modulo_affine_hull( - struct isl_set *set, struct isl_basic_set *affine_hull) -{ - struct isl_mat *T; - struct isl_mat *T2; - struct isl_basic_set *dummy; - struct isl_basic_set *convex_hull; - - dummy = isl_basic_set_remove_equalities( - isl_basic_set_copy(affine_hull), &T, &T2); - if (!dummy) - goto error; - isl_basic_set_free(dummy); - set = isl_set_preimage(set, T); - convex_hull = uset_convex_hull(set); - convex_hull = isl_basic_set_preimage(convex_hull, T2); - convex_hull = isl_basic_set_intersect(convex_hull, affine_hull); - return convex_hull; -error: - isl_basic_set_free(affine_hull); - isl_set_free(set); - return NULL; -} - -/* Compute the convex hull of a map. - * - * The implementation was inspired by "Extended Convex Hull" by Fukuda et al., - * specifically, the wrapping of facets to obtain new facets. - */ -struct isl_basic_map *isl_map_convex_hull(struct isl_map *map) -{ - struct isl_basic_set *bset; - struct isl_basic_map *model = NULL; - struct isl_basic_set *affine_hull = NULL; - struct isl_basic_map *convex_hull = NULL; - struct isl_set *set = NULL; - struct isl_ctx *ctx; - - if (!map) - goto error; - - ctx = map->ctx; - if (map->n == 0) { - convex_hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return convex_hull; - } - - map = isl_map_detect_equalities(map); - map = isl_map_align_divs(map); - if (!map) - goto error; - model = isl_basic_map_copy(map->p[0]); - set = isl_map_underlying_set(map); - if (!set) - goto error; - - affine_hull = isl_set_affine_hull(isl_set_copy(set)); - if (!affine_hull) - goto error; - if (affine_hull->n_eq != 0) - bset = modulo_affine_hull(set, affine_hull); - else { - isl_basic_set_free(affine_hull); - bset = uset_convex_hull(set); - } - - convex_hull = isl_basic_map_overlying_set(bset, model); - if (!convex_hull) - return NULL; - - ISL_F_SET(convex_hull, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(convex_hull, ISL_BASIC_MAP_ALL_EQUALITIES); - ISL_F_CLR(convex_hull, ISL_BASIC_MAP_RATIONAL); - return convex_hull; -error: - isl_set_free(set); - isl_basic_map_free(model); - return NULL; -} - -struct isl_basic_set *isl_set_convex_hull(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_convex_hull((struct isl_map *)set); -} - -__isl_give isl_basic_map *isl_map_polyhedral_hull(__isl_take isl_map *map) -{ - isl_basic_map *hull; - - hull = isl_map_convex_hull(map); - return isl_basic_map_remove_divs(hull); -} - -__isl_give isl_basic_set *isl_set_polyhedral_hull(__isl_take isl_set *set) -{ - return (isl_basic_set *)isl_map_polyhedral_hull((isl_map *)set); -} - -struct sh_data_entry { - struct isl_hash_table *table; - struct isl_tab *tab; -}; - -/* Holds the data needed during the simple hull computation. - * In particular, - * n the number of basic sets in the original set - * hull_table a hash table of already computed constraints - * in the simple hull - * p for each basic set, - * table a hash table of the constraints - * tab the tableau corresponding to the basic set - */ -struct sh_data { - struct isl_ctx *ctx; - unsigned n; - struct isl_hash_table *hull_table; - struct sh_data_entry p[1]; -}; - -static void sh_data_free(struct sh_data *data) -{ - int i; - - if (!data) - return; - isl_hash_table_free(data->ctx, data->hull_table); - for (i = 0; i < data->n; ++i) { - isl_hash_table_free(data->ctx, data->p[i].table); - isl_tab_free(data->p[i].tab); - } - free(data); -} - -struct ineq_cmp_data { - unsigned len; - isl_int *p; -}; - -static int has_ineq(const void *entry, const void *val) -{ - isl_int *row = (isl_int *)entry; - struct ineq_cmp_data *v = (struct ineq_cmp_data *)val; - - return isl_seq_eq(row + 1, v->p + 1, v->len) || - isl_seq_is_neg(row + 1, v->p + 1, v->len); -} - -static int hash_ineq(struct isl_ctx *ctx, struct isl_hash_table *table, - isl_int *ineq, unsigned len) -{ - uint32_t c_hash; - struct ineq_cmp_data v; - struct isl_hash_table_entry *entry; - - v.len = len; - v.p = ineq; - c_hash = isl_seq_get_hash(ineq + 1, len); - entry = isl_hash_table_find(ctx, table, c_hash, has_ineq, &v, 1); - if (!entry) - return - 1; - entry->data = ineq; - return 0; -} - -/* Fill hash table "table" with the constraints of "bset". - * Equalities are added as two inequalities. - * The value in the hash table is a pointer to the (in)equality of "bset". - */ -static int hash_basic_set(struct isl_hash_table *table, - struct isl_basic_set *bset) -{ - int i, j; - unsigned dim = isl_basic_set_total_dim(bset); - - for (i = 0; i < bset->n_eq; ++i) { - for (j = 0; j < 2; ++j) { - isl_seq_neg(bset->eq[i], bset->eq[i], 1 + dim); - if (hash_ineq(bset->ctx, table, bset->eq[i], dim) < 0) - return -1; - } - } - for (i = 0; i < bset->n_ineq; ++i) { - if (hash_ineq(bset->ctx, table, bset->ineq[i], dim) < 0) - return -1; - } - return 0; -} - -static struct sh_data *sh_data_alloc(struct isl_set *set, unsigned n_ineq) -{ - struct sh_data *data; - int i; - - data = isl_calloc(set->ctx, struct sh_data, - sizeof(struct sh_data) + - (set->n - 1) * sizeof(struct sh_data_entry)); - if (!data) - return NULL; - data->ctx = set->ctx; - data->n = set->n; - data->hull_table = isl_hash_table_alloc(set->ctx, n_ineq); - if (!data->hull_table) - goto error; - for (i = 0; i < set->n; ++i) { - data->p[i].table = isl_hash_table_alloc(set->ctx, - 2 * set->p[i]->n_eq + set->p[i]->n_ineq); - if (!data->p[i].table) - goto error; - if (hash_basic_set(data->p[i].table, set->p[i]) < 0) - goto error; - } - return data; -error: - sh_data_free(data); - return NULL; -} - -/* Check if inequality "ineq" is a bound for basic set "j" or if - * it can be relaxed (by increasing the constant term) to become - * a bound for that basic set. In the latter case, the constant - * term is updated. - * Return 1 if "ineq" is a bound - * 0 if "ineq" may attain arbitrarily small values on basic set "j" - * -1 if some error occurred - */ -static int is_bound(struct sh_data *data, struct isl_set *set, int j, - isl_int *ineq) -{ - enum isl_lp_result res; - isl_int opt; - - if (!data->p[j].tab) { - data->p[j].tab = isl_tab_from_basic_set(set->p[j]); - if (!data->p[j].tab) - return -1; - } - - isl_int_init(opt); - - res = isl_tab_min(data->p[j].tab, ineq, data->ctx->one, - &opt, NULL, 0); - if (res == isl_lp_ok && isl_int_is_neg(opt)) - isl_int_sub(ineq[0], ineq[0], opt); - - isl_int_clear(opt); - - return (res == isl_lp_ok || res == isl_lp_empty) ? 1 : - res == isl_lp_unbounded ? 0 : -1; -} - -/* Check if inequality "ineq" from basic set "i" can be relaxed to - * become a bound on the whole set. If so, add the (relaxed) inequality - * to "hull". - * - * We first check if "hull" already contains a translate of the inequality. - * If so, we are done. - * Then, we check if any of the previous basic sets contains a translate - * of the inequality. If so, then we have already considered this - * inequality and we are done. - * Otherwise, for each basic set other than "i", we check if the inequality - * is a bound on the basic set. - * For previous basic sets, we know that they do not contain a translate - * of the inequality, so we directly call is_bound. - * For following basic sets, we first check if a translate of the - * inequality appears in its description and if so directly update - * the inequality accordingly. - */ -static struct isl_basic_set *add_bound(struct isl_basic_set *hull, - struct sh_data *data, struct isl_set *set, int i, isl_int *ineq) -{ - uint32_t c_hash; - struct ineq_cmp_data v; - struct isl_hash_table_entry *entry; - int j, k; - - if (!hull) - return NULL; - - v.len = isl_basic_set_total_dim(hull); - v.p = ineq; - c_hash = isl_seq_get_hash(ineq + 1, v.len); - - entry = isl_hash_table_find(hull->ctx, data->hull_table, c_hash, - has_ineq, &v, 0); - if (entry) - return hull; - - for (j = 0; j < i; ++j) { - entry = isl_hash_table_find(hull->ctx, data->p[j].table, - c_hash, has_ineq, &v, 0); - if (entry) - break; - } - if (j < i) - return hull; - - k = isl_basic_set_alloc_inequality(hull); - isl_seq_cpy(hull->ineq[k], ineq, 1 + v.len); - if (k < 0) - goto error; - - for (j = 0; j < i; ++j) { - int bound; - bound = is_bound(data, set, j, hull->ineq[k]); - if (bound < 0) - goto error; - if (!bound) - break; - } - if (j < i) { - isl_basic_set_free_inequality(hull, 1); - return hull; - } - - for (j = i + 1; j < set->n; ++j) { - int bound, neg; - isl_int *ineq_j; - entry = isl_hash_table_find(hull->ctx, data->p[j].table, - c_hash, has_ineq, &v, 0); - if (entry) { - ineq_j = entry->data; - neg = isl_seq_is_neg(ineq_j + 1, - hull->ineq[k] + 1, v.len); - if (neg) - isl_int_neg(ineq_j[0], ineq_j[0]); - if (isl_int_gt(ineq_j[0], hull->ineq[k][0])) - isl_int_set(hull->ineq[k][0], ineq_j[0]); - if (neg) - isl_int_neg(ineq_j[0], ineq_j[0]); - continue; - } - bound = is_bound(data, set, j, hull->ineq[k]); - if (bound < 0) - goto error; - if (!bound) - break; - } - if (j < set->n) { - isl_basic_set_free_inequality(hull, 1); - return hull; - } - - entry = isl_hash_table_find(hull->ctx, data->hull_table, c_hash, - has_ineq, &v, 1); - if (!entry) - goto error; - entry->data = hull->ineq[k]; - - return hull; -error: - isl_basic_set_free(hull); - return NULL; -} - -/* Check if any inequality from basic set "i" can be relaxed to - * become a bound on the whole set. If so, add the (relaxed) inequality - * to "hull". - */ -static struct isl_basic_set *add_bounds(struct isl_basic_set *bset, - struct sh_data *data, struct isl_set *set, int i) -{ - int j, k; - unsigned dim = isl_basic_set_total_dim(bset); - - for (j = 0; j < set->p[i]->n_eq; ++j) { - for (k = 0; k < 2; ++k) { - isl_seq_neg(set->p[i]->eq[j], set->p[i]->eq[j], 1+dim); - bset = add_bound(bset, data, set, i, set->p[i]->eq[j]); - } - } - for (j = 0; j < set->p[i]->n_ineq; ++j) - bset = add_bound(bset, data, set, i, set->p[i]->ineq[j]); - return bset; -} - -/* Compute a superset of the convex hull of set that is described - * by only translates of the constraints in the constituents of set. - */ -static struct isl_basic_set *uset_simple_hull(struct isl_set *set) -{ - struct sh_data *data = NULL; - struct isl_basic_set *hull = NULL; - unsigned n_ineq; - int i; - - if (!set) - return NULL; - - n_ineq = 0; - for (i = 0; i < set->n; ++i) { - if (!set->p[i]) - goto error; - n_ineq += 2 * set->p[i]->n_eq + set->p[i]->n_ineq; - } - - hull = isl_basic_set_alloc_space(isl_space_copy(set->dim), 0, 0, n_ineq); - if (!hull) - goto error; - - data = sh_data_alloc(set, n_ineq); - if (!data) - goto error; - - for (i = 0; i < set->n; ++i) - hull = add_bounds(hull, data, set, i); - - sh_data_free(data); - isl_set_free(set); - - return hull; -error: - sh_data_free(data); - isl_basic_set_free(hull); - isl_set_free(set); - return NULL; -} - -/* Compute a superset of the convex hull of map that is described - * by only translates of the constraints in the constituents of map. - */ -struct isl_basic_map *isl_map_simple_hull(struct isl_map *map) -{ - struct isl_set *set = NULL; - struct isl_basic_map *model = NULL; - struct isl_basic_map *hull; - struct isl_basic_map *affine_hull; - struct isl_basic_set *bset = NULL; - - if (!map) - return NULL; - if (map->n == 0) { - hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return hull; - } - if (map->n == 1) { - hull = isl_basic_map_copy(map->p[0]); - isl_map_free(map); - return hull; - } - - map = isl_map_detect_equalities(map); - affine_hull = isl_map_affine_hull(isl_map_copy(map)); - map = isl_map_align_divs(map); - model = isl_basic_map_copy(map->p[0]); - - set = isl_map_underlying_set(map); - - bset = uset_simple_hull(set); - - hull = isl_basic_map_overlying_set(bset, model); - - hull = isl_basic_map_intersect(hull, affine_hull); - hull = isl_basic_map_remove_redundancies(hull); - ISL_F_SET(hull, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_SET(hull, ISL_BASIC_MAP_ALL_EQUALITIES); - - return hull; -} - -struct isl_basic_set *isl_set_simple_hull(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_simple_hull((struct isl_map *)set); -} - -/* Given a set "set", return parametric bounds on the dimension "dim". - */ -static struct isl_basic_set *set_bounds(struct isl_set *set, int dim) -{ - unsigned set_dim = isl_set_dim(set, isl_dim_set); - set = isl_set_copy(set); - set = isl_set_eliminate_dims(set, dim + 1, set_dim - (dim + 1)); - set = isl_set_eliminate_dims(set, 0, dim); - return isl_set_convex_hull(set); -} - -/* Computes a "simple hull" and then check if each dimension in the - * resulting hull is bounded by a symbolic constant. If not, the - * hull is intersected with the corresponding bounds on the whole set. - */ -struct isl_basic_set *isl_set_bounded_simple_hull(struct isl_set *set) -{ - int i, j; - struct isl_basic_set *hull; - unsigned nparam, left; - int removed_divs = 0; - - hull = isl_set_simple_hull(isl_set_copy(set)); - if (!hull) - goto error; - - nparam = isl_basic_set_dim(hull, isl_dim_param); - for (i = 0; i < isl_basic_set_dim(hull, isl_dim_set); ++i) { - int lower = 0, upper = 0; - struct isl_basic_set *bounds; - - left = isl_basic_set_total_dim(hull) - nparam - i - 1; - for (j = 0; j < hull->n_eq; ++j) { - if (isl_int_is_zero(hull->eq[j][1 + nparam + i])) - continue; - if (isl_seq_first_non_zero(hull->eq[j]+1+nparam+i+1, - left) == -1) - break; - } - if (j < hull->n_eq) - continue; - - for (j = 0; j < hull->n_ineq; ++j) { - if (isl_int_is_zero(hull->ineq[j][1 + nparam + i])) - continue; - if (isl_seq_first_non_zero(hull->ineq[j]+1+nparam+i+1, - left) != -1 || - isl_seq_first_non_zero(hull->ineq[j]+1+nparam, - i) != -1) - continue; - if (isl_int_is_pos(hull->ineq[j][1 + nparam + i])) - lower = 1; - else - upper = 1; - if (lower && upper) - break; - } - - if (lower && upper) - continue; - - if (!removed_divs) { - set = isl_set_remove_divs(set); - if (!set) - goto error; - removed_divs = 1; - } - bounds = set_bounds(set, i); - hull = isl_basic_set_intersect(hull, bounds); - if (!hull) - goto error; - } - - isl_set_free(set); - return hull; -error: - isl_set_free(set); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_ctx.c b/cloog-0.17.0/isl/isl_ctx.c deleted file mode 100644 index 6f999502dd2185888d5a5f5fcd507492278a5c56..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_ctx.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -void isl_handle_error(isl_ctx *ctx, int errno, const char *msg, - const char *file, int line) -{ - isl_ctx_set_error(ctx, errno); - - switch (isl_options_get_on_error(ctx)) { - case ISL_ON_ERROR_WARN: - fprintf(stderr, "%s:%d: %s\n", file, line, msg); - return; - case ISL_ON_ERROR_CONTINUE: - return; - case ISL_ON_ERROR_ABORT: - fprintf(stderr, "%s:%d: %s\n", file, line, msg); - abort(); - return; - } -} - -static struct isl_options *find_nested_options(struct isl_args *args, - void *opt, struct isl_args *wanted) -{ - int i; - struct isl_options *options; - - if (args == wanted) - return opt; - - for (i = 0; args->args[i].type != isl_arg_end; ++i) { - if (args->args[i].type != isl_arg_child) - continue; - options = find_nested_options(args->args[i].u.child.child, - *(void **)(((char *)opt) + args->args[i].offset), - wanted); - if (options) - return options; - } - - return NULL; -} - -static struct isl_options *find_nested_isl_options(struct isl_args *args, - void *opt) -{ - return find_nested_options(args, opt, &isl_options_args); -} - -void *isl_ctx_peek_options(isl_ctx *ctx, struct isl_args *args) -{ - if (!ctx) - return NULL; - return find_nested_options(ctx->user_args, ctx->user_opt, args); -} - -isl_ctx *isl_ctx_alloc_with_options(struct isl_args *args, void *user_opt) -{ - struct isl_ctx *ctx = NULL; - struct isl_options *opt = NULL; - int opt_allocated = 0; - - if (!user_opt) - return NULL; - - opt = find_nested_isl_options(args, user_opt); - if (!opt) { - opt = isl_options_new_with_defaults(); - if (!opt) - goto error; - opt_allocated = 1; - } - - ctx = isl_calloc_type(NULL, struct isl_ctx); - if (!ctx) - goto error; - - if (isl_hash_table_init(ctx, &ctx->id_table, 0)) - goto error; - - ctx->stats = isl_calloc_type(ctx, struct isl_stats); - if (!ctx->stats) - goto error; - - ctx->user_args = args; - ctx->user_opt = user_opt; - ctx->opt_allocated = opt_allocated; - ctx->opt = opt; - ctx->ref = 0; - - isl_int_init(ctx->zero); - isl_int_set_si(ctx->zero, 0); - - isl_int_init(ctx->one); - isl_int_set_si(ctx->one, 1); - - isl_int_init(ctx->two); - isl_int_set_si(ctx->two, 2); - - isl_int_init(ctx->negone); - isl_int_set_si(ctx->negone, -1); - - isl_int_init(ctx->normalize_gcd); - - ctx->n_cached = 0; - ctx->n_miss = 0; - - ctx->error = isl_error_none; - - return ctx; -error: - isl_args_free(args, user_opt); - if (opt_allocated) - isl_options_free(opt); - free(ctx); - return NULL; -} - -struct isl_ctx *isl_ctx_alloc() -{ - struct isl_options *opt; - - opt = isl_options_new_with_defaults(); - - return isl_ctx_alloc_with_options(&isl_options_args, opt); -} - -void isl_ctx_ref(struct isl_ctx *ctx) -{ - ctx->ref++; -} - -void isl_ctx_deref(struct isl_ctx *ctx) -{ - isl_assert(ctx, ctx->ref > 0, return); - ctx->ref--; -} - -void isl_ctx_free(struct isl_ctx *ctx) -{ - if (!ctx) - return; - if (ctx->ref != 0) - isl_die(ctx, isl_error_invalid, - "isl_ctx freed, but some objects still reference it", - return); - - isl_hash_table_clear(&ctx->id_table); - isl_blk_clear_cache(ctx); - isl_int_clear(ctx->zero); - isl_int_clear(ctx->one); - isl_int_clear(ctx->two); - isl_int_clear(ctx->negone); - isl_int_clear(ctx->normalize_gcd); - isl_args_free(ctx->user_args, ctx->user_opt); - if (ctx->opt_allocated) - free(ctx->opt); - free(ctx->stats); - free(ctx); -} - -struct isl_options *isl_ctx_options(isl_ctx *ctx) -{ - if (!ctx) - return NULL; - return ctx->opt; -} - -enum isl_error isl_ctx_last_error(isl_ctx *ctx) -{ - return ctx->error; -} - -void isl_ctx_reset_error(isl_ctx *ctx) -{ - ctx->error = isl_error_none; -} - -void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error) -{ - if (ctx) - ctx->error = error; -} - -void isl_ctx_abort(isl_ctx *ctx) -{ - if (ctx) - ctx->abort = 1; -} - -void isl_ctx_resume(isl_ctx *ctx) -{ - if (ctx) - ctx->abort = 0; -} - -int isl_ctx_aborted(isl_ctx *ctx) -{ - return ctx ? ctx->abort : -1; -} - -int isl_ctx_parse_options(isl_ctx *ctx, int argc, char **argv, unsigned flags) -{ - if (!ctx) - return -1; - return isl_args_parse(ctx->user_args, argc, argv, ctx->user_opt, flags); -} diff --git a/cloog-0.17.0/isl/isl_ctx_private.h b/cloog-0.17.0/isl/isl_ctx_private.h deleted file mode 100644 index 65267f80a49467e42fcf9221d27d3570967be952..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_ctx_private.h +++ /dev/null @@ -1,28 +0,0 @@ -#include - -struct isl_ctx { - int ref; - - struct isl_stats *stats; - - int opt_allocated; - struct isl_options *opt; - void *user_opt; - struct isl_args *user_args; - - isl_int zero; - isl_int one; - isl_int two; - isl_int negone; - - isl_int normalize_gcd; - - int n_cached; - int n_miss; - struct isl_blk cache[ISL_BLK_CACHE_SIZE]; - struct isl_hash_table id_table; - - enum isl_error error; - - int abort; -}; diff --git a/cloog-0.17.0/isl/isl_dim.c b/cloog-0.17.0/isl/isl_dim.c deleted file mode 100644 index 914d666b38ee5f0d2c5817bf740dd5c5295b050a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_dim.c +++ /dev/null @@ -1,258 +0,0 @@ -#include -#include -#include -#include -#include - -isl_ctx *isl_dim_get_ctx(__isl_keep isl_space *dim) -{ - return isl_space_get_ctx(dim); -} - -__isl_give isl_space *isl_dim_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - return isl_space_alloc(ctx, nparam, n_in, n_out); -} -__isl_give isl_space *isl_dim_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim) -{ - return isl_space_set_alloc(ctx, nparam, dim); -} -__isl_give isl_space *isl_dim_copy(__isl_keep isl_space *dim) -{ - return isl_space_copy(dim); -} -void isl_dim_free(__isl_take isl_space *dim) -{ - isl_space_free(dim); -} - -unsigned isl_dim_size(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - return isl_space_dim(dim, type); -} - -__isl_give isl_space *isl_dim_set_dim_id(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - return isl_space_set_dim_id(dim, type, pos, id); -} -int isl_dim_has_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - return isl_space_has_dim_id(dim, type, pos); -} -__isl_give isl_id *isl_dim_get_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - return isl_space_get_dim_id(dim, type, pos); -} - -int isl_dim_find_dim_by_id(__isl_keep isl_space *dim, - enum isl_dim_type type, __isl_keep isl_id *id) -{ - return isl_space_find_dim_by_id(dim, type, id); -} - -__isl_give isl_space *isl_dim_set_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type, __isl_take isl_id *id) -{ - return isl_space_set_tuple_id(dim, type, id); -} -__isl_give isl_space *isl_dim_reset_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type) -{ - return isl_space_reset_tuple_id(dim, type); -} -int isl_dim_has_tuple_id(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - return isl_space_has_tuple_id(dim, type); -} -__isl_give isl_id *isl_dim_get_tuple_id(__isl_keep isl_space *dim, - enum isl_dim_type type) -{ - return isl_space_get_tuple_id(dim, type); -} - -__isl_give isl_space *isl_dim_set_name(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_keep const char *name) -{ - return isl_space_set_dim_name(dim, type, pos, name); -} -__isl_keep const char *isl_dim_get_name(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - return isl_space_get_dim_name(dim, type, pos); -} - -__isl_give isl_space *isl_dim_set_tuple_name(__isl_take isl_space *dim, - enum isl_dim_type type, const char *s) -{ - return isl_space_set_tuple_name(dim, type, s); -} -const char *isl_dim_get_tuple_name(__isl_keep isl_space *dim, - enum isl_dim_type type) -{ - return isl_space_get_tuple_name(dim, type); -} - -int isl_dim_is_wrapping(__isl_keep isl_space *dim) -{ - return isl_space_is_wrapping(dim); -} -__isl_give isl_space *isl_dim_wrap(__isl_take isl_space *dim) -{ - return isl_space_wrap(dim); -} -__isl_give isl_space *isl_dim_unwrap(__isl_take isl_space *dim) -{ - return isl_space_unwrap(dim); -} - -__isl_give isl_space *isl_dim_domain(__isl_take isl_space *dim) -{ - return isl_space_domain(dim); -} -__isl_give isl_space *isl_dim_from_domain(__isl_take isl_space *dim) -{ - return isl_space_from_domain(dim); -} -__isl_give isl_space *isl_dim_range(__isl_take isl_space *dim) -{ - return isl_space_range(dim); -} -__isl_give isl_space *isl_dim_from_range(__isl_take isl_space *dim) -{ - return isl_space_from_range(dim); -} -__isl_give isl_space *isl_dim_reverse(__isl_take isl_space *dim) -{ - return isl_space_reverse(dim); -} -__isl_give isl_space *isl_dim_join(__isl_take isl_space *left, - __isl_take isl_space *right) -{ - return isl_space_join(left, right); -} -__isl_give isl_space *isl_dim_align_params(__isl_take isl_space *dim1, - __isl_take isl_space *dim2) -{ - return isl_space_align_params(dim1, dim2); -} -__isl_give isl_space *isl_dim_insert(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - return isl_space_insert_dims(dim, type, pos, n); -} -__isl_give isl_space *isl_dim_add(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned n) -{ - return isl_space_add_dims(dim, type, n); -} -__isl_give isl_space *isl_dim_drop(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return isl_space_drop_dims(dim, type, first, n); -} -__isl_give isl_space *isl_dim_move(__isl_take isl_space *dim, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - return isl_space_move_dims(dim, dst_type, dst_pos, src_type, src_pos, n); -} -__isl_give isl_space *isl_dim_map_from_set(__isl_take isl_space *dim) -{ - return isl_space_map_from_set(dim); -} -__isl_give isl_space *isl_dim_zip(__isl_take isl_space *dim) -{ - return isl_space_zip(dim); -} - -__isl_give isl_local_space *isl_local_space_from_dim( - __isl_take isl_space *dim) -{ - return isl_local_space_from_space(dim); -} -__isl_give isl_space *isl_local_space_get_dim( - __isl_keep isl_local_space *ls) -{ - return isl_local_space_get_space(ls); -} - -__isl_give isl_space *isl_aff_get_dim(__isl_keep isl_aff *aff) -{ - return isl_aff_get_space(aff); -} -__isl_give isl_space *isl_pw_aff_get_dim(__isl_keep isl_pw_aff *pwaff) -{ - return isl_pw_aff_get_space(pwaff); -} - -__isl_give isl_space *isl_constraint_get_dim( - __isl_keep isl_constraint *constraint) -{ - return isl_constraint_get_space(constraint); -} - -__isl_give isl_space *isl_basic_map_get_dim(__isl_keep isl_basic_map *bmap) -{ - return isl_basic_map_get_space(bmap); -} -__isl_give isl_space *isl_map_get_dim(__isl_keep isl_map *map) -{ - return isl_map_get_space(map); -} -__isl_give isl_space *isl_union_map_get_dim(__isl_keep isl_union_map *umap) -{ - return isl_union_map_get_space(umap); -} - -__isl_give isl_space *isl_basic_set_get_dim(__isl_keep isl_basic_set *bset) -{ - return isl_basic_set_get_space(bset); -} -__isl_give isl_space *isl_set_get_dim(__isl_keep isl_set *set) -{ - return isl_set_get_space(set); -} -__isl_give isl_space *isl_union_set_get_dim(__isl_keep isl_union_set *uset) -{ - return isl_union_set_get_space(uset); -} - -__isl_give isl_space *isl_point_get_dim(__isl_keep isl_point *pnt) -{ - return isl_point_get_space(pnt); -} - -__isl_give isl_space *isl_qpolynomial_get_dim(__isl_keep isl_qpolynomial *qp) -{ - return isl_qpolynomial_get_space(qp); -} -__isl_give isl_space *isl_pw_qpolynomial_get_dim( - __isl_keep isl_pw_qpolynomial *pwqp) -{ - return isl_pw_qpolynomial_get_space(pwqp); -} -__isl_give isl_space *isl_qpolynomial_fold_get_dim( - __isl_keep isl_qpolynomial_fold *fold) -{ - return isl_qpolynomial_fold_get_space(fold); -} -__isl_give isl_space *isl_pw_qpolynomial_fold_get_dim( - __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - return isl_pw_qpolynomial_fold_get_space(pwf); -} -__isl_give isl_space *isl_union_pw_qpolynomial_get_dim( - __isl_keep isl_union_pw_qpolynomial *upwqp) -{ - return isl_union_pw_qpolynomial_get_space(upwqp); -} -__isl_give isl_space *isl_union_pw_qpolynomial_fold_get_dim( - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - return isl_union_pw_qpolynomial_fold_get_space(upwf); -} diff --git a/cloog-0.17.0/isl/isl_dim_map.c b/cloog-0.17.0/isl/isl_dim_map.c deleted file mode 100644 index 37da3d4be22c9fc439e176d1bd5285a3281e6661..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_dim_map.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010-2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include - -struct isl_dim_map_entry { - int pos; - int sgn; -}; - -/* Maps dst positions to src positions */ -struct isl_dim_map { - unsigned len; - struct isl_dim_map_entry m[1]; -}; - -__isl_give isl_dim_map *isl_dim_map_alloc(isl_ctx *ctx, unsigned len) -{ - int i; - struct isl_dim_map *dim_map; - dim_map = isl_alloc(ctx, struct isl_dim_map, - sizeof(struct isl_dim_map) + len * sizeof(struct isl_dim_map_entry)); - if (!dim_map) - return NULL; - dim_map->len = 1 + len; - dim_map->m[0].pos = 0; - dim_map->m[0].sgn = 1; - for (i = 0; i < len; ++i) - dim_map->m[1 + i].sgn = 0; - return dim_map; -} - -void isl_dim_map_range(__isl_keep isl_dim_map *dim_map, - unsigned dst_pos, unsigned dst_stride, - unsigned src_pos, unsigned src_stride, - unsigned n, int sign) -{ - int i; - - if (!dim_map) - return; - - for (i = 0; i < n; ++i) { - unsigned d = 1 + dst_pos + dst_stride * i; - unsigned s = 1 + src_pos + src_stride * i; - dim_map->m[d].pos = s; - dim_map->m[d].sgn = sign; - } -} - -void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_space *dim, enum isl_dim_type type, - unsigned first, unsigned n, unsigned dst_pos) -{ - int i; - unsigned src_pos; - - if (!dim_map || !dim) - return; - - src_pos = 1 + isl_space_offset(dim, type); - for (i = 0; i < n; ++i) { - dim_map->m[1 + dst_pos + i].pos = src_pos + first + i; - dim_map->m[1 + dst_pos + i].sgn = 1; - } -} - -void isl_dim_map_dim(__isl_keep isl_dim_map *dim_map, __isl_keep isl_space *dim, - enum isl_dim_type type, unsigned dst_pos) -{ - isl_dim_map_dim_range(dim_map, dim, type, - 0, isl_space_dim(dim, type), dst_pos); -} - -void isl_dim_map_div(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap, unsigned dst_pos) -{ - int i; - unsigned src_pos; - - if (!dim_map || !bmap) - return; - - src_pos = 1 + isl_space_dim(bmap->dim, isl_dim_all); - for (i = 0; i < bmap->n_div; ++i) { - dim_map->m[1 + dst_pos + i].pos = src_pos + i; - dim_map->m[1 + dst_pos + i].sgn = 1; - } -} - -void isl_dim_map_dump(struct isl_dim_map *dim_map) -{ - int i; - - for (i = 0; i < dim_map->len; ++i) - fprintf(stderr, "%d -> %d * %d; ", i, - dim_map->m[i].sgn, dim_map->m[i].pos); - fprintf(stderr, "\n"); -} - -static void copy_constraint_dim_map(isl_int *dst, isl_int *src, - struct isl_dim_map *dim_map) -{ - int i; - - for (i = 0; i < dim_map->len; ++i) { - if (dim_map->m[i].sgn == 0) - isl_int_set_si(dst[i], 0); - else if (dim_map->m[i].sgn > 0) - isl_int_set(dst[i], src[dim_map->m[i].pos]); - else - isl_int_neg(dst[i], src[dim_map->m[i].pos]); - } -} - -static void copy_div_dim_map(isl_int *dst, isl_int *src, - struct isl_dim_map *dim_map) -{ - isl_int_set(dst[0], src[0]); - copy_constraint_dim_map(dst+1, src+1, dim_map); -} - -__isl_give isl_basic_map *isl_basic_map_add_constraints_dim_map( - __isl_take isl_basic_map *dst, __isl_take isl_basic_map *src, - __isl_take isl_dim_map *dim_map) -{ - int i; - - if (!src || !dst || !dim_map) - goto error; - - for (i = 0; i < src->n_eq; ++i) { - int i1 = isl_basic_map_alloc_equality(dst); - if (i1 < 0) - goto error; - copy_constraint_dim_map(dst->eq[i1], src->eq[i], dim_map); - } - - for (i = 0; i < src->n_ineq; ++i) { - int i1 = isl_basic_map_alloc_inequality(dst); - if (i1 < 0) - goto error; - copy_constraint_dim_map(dst->ineq[i1], src->ineq[i], dim_map); - } - - for (i = 0; i < src->n_div; ++i) { - int i1 = isl_basic_map_alloc_div(dst); - if (i1 < 0) - goto error; - copy_div_dim_map(dst->div[i1], src->div[i], dim_map); - } - - free(dim_map); - isl_basic_map_free(src); - - return dst; -error: - free(dim_map); - isl_basic_map_free(src); - isl_basic_map_free(dst); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_add_constraints_dim_map( - __isl_take isl_basic_set *dst, __isl_take isl_basic_set *src, - __isl_take isl_dim_map *dim_map) -{ - return isl_basic_map_add_constraints_dim_map(dst, src, dim_map); -} - -/* Extend the given dim_map with mappings for the divs in bmap. - */ -__isl_give isl_dim_map *isl_dim_map_extend(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap) -{ - int i; - struct isl_dim_map *res; - int offset; - - offset = isl_basic_map_offset(bmap, isl_dim_div); - - res = isl_dim_map_alloc(bmap->ctx, dim_map->len - 1 + bmap->n_div); - if (!res) - return NULL; - - for (i = 0; i < dim_map->len; ++i) - res->m[i] = dim_map->m[i]; - for (i = 0; i < bmap->n_div; ++i) { - res->m[dim_map->len + i].pos = offset + i; - res->m[dim_map->len + i].sgn = 1; - } - - return res; -} - -/* Extract a dim_map from a reordering. - * We essentially need to reverse the mapping, and add an offset - * of 1 for the constant term. - */ -__isl_give isl_dim_map *isl_dim_map_from_reordering( - __isl_keep isl_reordering *exp) -{ - int i; - isl_ctx *ctx; - struct isl_dim_map *dim_map; - - if (!exp) - return NULL; - - ctx = isl_space_get_ctx(exp->dim); - dim_map = isl_dim_map_alloc(ctx, isl_space_dim(exp->dim, isl_dim_all)); - if (!dim_map) - return NULL; - - for (i = 0; i < exp->len; ++i) { - dim_map->m[1 + exp->pos[i]].pos = 1 + i; - dim_map->m[1 + exp->pos[i]].sgn = 1; - } - - return dim_map; -} diff --git a/cloog-0.17.0/isl/isl_dim_map.h b/cloog-0.17.0/isl/isl_dim_map.h deleted file mode 100644 index 0f988c3166d3722b93e54dca78aba755cf5f7d17..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_dim_map.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ISL_DIM_MAP_H -#define ISL_DIM_MAP_H - -#include -#include -#include - -struct isl_dim_map; -typedef struct isl_dim_map isl_dim_map; - -__isl_give isl_dim_map *isl_dim_map_alloc(isl_ctx *ctx, unsigned len); -void isl_dim_map_range(__isl_keep isl_dim_map *dim_map, - unsigned dst_pos, unsigned dst_stride, - unsigned src_pos, unsigned src_stride, - unsigned n, int sign); -void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map, - isl_space *dim, enum isl_dim_type type, - unsigned first, unsigned n, unsigned dst_pos); -void isl_dim_map_dim(__isl_keep isl_dim_map *dim_map, __isl_keep isl_space *dim, - enum isl_dim_type type, unsigned dst_pos); -void isl_dim_map_div(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap, unsigned dst_pos); -__isl_give isl_basic_set *isl_basic_set_add_constraints_dim_map( - __isl_take isl_basic_set *dst, __isl_take isl_basic_set *src, - __isl_take isl_dim_map *dim_map); -__isl_give isl_basic_map *isl_basic_map_add_constraints_dim_map( - __isl_take isl_basic_map *dst, __isl_take isl_basic_map *src, - __isl_take isl_dim_map *dim_map); - -__isl_give isl_dim_map *isl_dim_map_extend(__isl_keep isl_dim_map *dim_map, - __isl_keep isl_basic_map *bmap); - -__isl_give isl_dim_map *isl_dim_map_from_reordering( - __isl_keep isl_reordering *exp); - -#endif diff --git a/cloog-0.17.0/isl/isl_equalities.c b/cloog-0.17.0/isl/isl_equalities.c deleted file mode 100644 index 68d2c89a6cdaa8aead8580b9ee0ac6bede0e4622..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_equalities.c +++ /dev/null @@ -1,697 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_map_private.h" -#include "isl_equalities.h" - -/* Given a set of modulo constraints - * - * c + A y = 0 mod d - * - * this function computes a particular solution y_0 - * - * The input is given as a matrix B = [ c A ] and a vector d. - * - * The output is matrix containing the solution y_0 or - * a zero-column matrix if the constraints admit no integer solution. - * - * The given set of constrains is equivalent to - * - * c + A y = -D x - * - * with D = diag d and x a fresh set of variables. - * Reducing both c and A modulo d does not change the - * value of y in the solution and may lead to smaller coefficients. - * Let M = [ D A ] and [ H 0 ] = M U, the Hermite normal form of M. - * Then - * [ x ] - * M [ y ] = - c - * and so - * [ x ] - * [ H 0 ] U^{-1} [ y ] = - c - * Let - * [ A ] [ x ] - * [ B ] = U^{-1} [ y ] - * then - * H A + 0 B = -c - * - * so B may be chosen arbitrarily, e.g., B = 0, and then - * - * [ x ] = [ -c ] - * U^{-1} [ y ] = [ 0 ] - * or - * [ x ] [ -c ] - * [ y ] = U [ 0 ] - * specifically, - * - * y = U_{2,1} (-c) - * - * If any of the coordinates of this y are non-integer - * then the constraints admit no integer solution and - * a zero-column matrix is returned. - */ -static struct isl_mat *particular_solution(struct isl_mat *B, struct isl_vec *d) -{ - int i, j; - struct isl_mat *M = NULL; - struct isl_mat *C = NULL; - struct isl_mat *U = NULL; - struct isl_mat *H = NULL; - struct isl_mat *cst = NULL; - struct isl_mat *T = NULL; - - M = isl_mat_alloc(B->ctx, B->n_row, B->n_row + B->n_col - 1); - C = isl_mat_alloc(B->ctx, 1 + B->n_row, 1); - if (!M || !C) - goto error; - isl_int_set_si(C->row[0][0], 1); - for (i = 0; i < B->n_row; ++i) { - isl_seq_clr(M->row[i], B->n_row); - isl_int_set(M->row[i][i], d->block.data[i]); - isl_int_neg(C->row[1 + i][0], B->row[i][0]); - isl_int_fdiv_r(C->row[1+i][0], C->row[1+i][0], M->row[i][i]); - for (j = 0; j < B->n_col - 1; ++j) - isl_int_fdiv_r(M->row[i][B->n_row + j], - B->row[i][1 + j], M->row[i][i]); - } - M = isl_mat_left_hermite(M, 0, &U, NULL); - if (!M || !U) - goto error; - H = isl_mat_sub_alloc(M, 0, B->n_row, 0, B->n_row); - H = isl_mat_lin_to_aff(H); - C = isl_mat_inverse_product(H, C); - if (!C) - goto error; - for (i = 0; i < B->n_row; ++i) { - if (!isl_int_is_divisible_by(C->row[1+i][0], C->row[0][0])) - break; - isl_int_divexact(C->row[1+i][0], C->row[1+i][0], C->row[0][0]); - } - if (i < B->n_row) - cst = isl_mat_alloc(B->ctx, B->n_row, 0); - else - cst = isl_mat_sub_alloc(C, 1, B->n_row, 0, 1); - T = isl_mat_sub_alloc(U, B->n_row, B->n_col - 1, 0, B->n_row); - cst = isl_mat_product(T, cst); - isl_mat_free(M); - isl_mat_free(C); - isl_mat_free(U); - return cst; -error: - isl_mat_free(M); - isl_mat_free(C); - isl_mat_free(U); - return NULL; -} - -/* Compute and return the matrix - * - * U_1^{-1} diag(d_1, 1, ..., 1) - * - * with U_1 the unimodular completion of the first (and only) row of B. - * The columns of this matrix generate the lattice that satisfies - * the single (linear) modulo constraint. - */ -static struct isl_mat *parameter_compression_1( - struct isl_mat *B, struct isl_vec *d) -{ - struct isl_mat *U; - - U = isl_mat_alloc(B->ctx, B->n_col - 1, B->n_col - 1); - if (!U) - return NULL; - isl_seq_cpy(U->row[0], B->row[0] + 1, B->n_col - 1); - U = isl_mat_unimodular_complete(U, 1); - U = isl_mat_right_inverse(U); - if (!U) - return NULL; - isl_mat_col_mul(U, 0, d->block.data[0], 0); - U = isl_mat_lin_to_aff(U); - return U; -} - -/* Compute a common lattice of solutions to the linear modulo - * constraints specified by B and d. - * See also the documentation of isl_mat_parameter_compression. - * We put the matrix - * - * A = [ L_1^{-T} L_2^{-T} ... L_k^{-T} ] - * - * on a common denominator. This denominator D is the lcm of modulos d. - * Since L_i = U_i^{-1} diag(d_i, 1, ... 1), we have - * L_i^{-T} = U_i^T diag(d_i, 1, ... 1)^{-T} = U_i^T diag(1/d_i, 1, ..., 1). - * Putting this on the common denominator, we have - * D * L_i^{-T} = U_i^T diag(D/d_i, D, ..., D). - */ -static struct isl_mat *parameter_compression_multi( - struct isl_mat *B, struct isl_vec *d) -{ - int i, j, k; - isl_int D; - struct isl_mat *A = NULL, *U = NULL; - struct isl_mat *T; - unsigned size; - - isl_int_init(D); - - isl_vec_lcm(d, &D); - - size = B->n_col - 1; - A = isl_mat_alloc(B->ctx, size, B->n_row * size); - U = isl_mat_alloc(B->ctx, size, size); - if (!U || !A) - goto error; - for (i = 0; i < B->n_row; ++i) { - isl_seq_cpy(U->row[0], B->row[i] + 1, size); - U = isl_mat_unimodular_complete(U, 1); - if (!U) - goto error; - isl_int_divexact(D, D, d->block.data[i]); - for (k = 0; k < U->n_col; ++k) - isl_int_mul(A->row[k][i*size+0], D, U->row[0][k]); - isl_int_mul(D, D, d->block.data[i]); - for (j = 1; j < U->n_row; ++j) - for (k = 0; k < U->n_col; ++k) - isl_int_mul(A->row[k][i*size+j], - D, U->row[j][k]); - } - A = isl_mat_left_hermite(A, 0, NULL, NULL); - T = isl_mat_sub_alloc(A, 0, A->n_row, 0, A->n_row); - T = isl_mat_lin_to_aff(T); - if (!T) - goto error; - isl_int_set(T->row[0][0], D); - T = isl_mat_right_inverse(T); - if (!T) - goto error; - isl_assert(T->ctx, isl_int_is_one(T->row[0][0]), goto error); - T = isl_mat_transpose(T); - isl_mat_free(A); - isl_mat_free(U); - - isl_int_clear(D); - return T; -error: - isl_mat_free(A); - isl_mat_free(U); - isl_int_clear(D); - return NULL; -} - -/* Given a set of modulo constraints - * - * c + A y = 0 mod d - * - * this function returns an affine transformation T, - * - * y = T y' - * - * that bijectively maps the integer vectors y' to integer - * vectors y that satisfy the modulo constraints. - * - * This function is inspired by Section 2.5.3 - * of B. Meister, "Stating and Manipulating Periodicity in the Polytope - * Model. Applications to Program Analysis and Optimization". - * However, the implementation only follows the algorithm of that - * section for computing a particular solution and not for computing - * a general homogeneous solution. The latter is incomplete and - * may remove some valid solutions. - * Instead, we use an adaptation of the algorithm in Section 7 of - * B. Meister, S. Verdoolaege, "Polynomial Approximations in the Polytope - * Model: Bringing the Power of Quasi-Polynomials to the Masses". - * - * The input is given as a matrix B = [ c A ] and a vector d. - * Each element of the vector d corresponds to a row in B. - * The output is a lower triangular matrix. - * If no integer vector y satisfies the given constraints then - * a matrix with zero columns is returned. - * - * We first compute a particular solution y_0 to the given set of - * modulo constraints in particular_solution. If no such solution - * exists, then we return a zero-columned transformation matrix. - * Otherwise, we compute the generic solution to - * - * A y = 0 mod d - * - * That is we want to compute G such that - * - * y = G y'' - * - * with y'' integer, describes the set of solutions. - * - * We first remove the common factors of each row. - * In particular if gcd(A_i,d_i) != 1, then we divide the whole - * row i (including d_i) by this common factor. If afterwards gcd(A_i) != 1, - * then we divide this row of A by the common factor, unless gcd(A_i) = 0. - * In the later case, we simply drop the row (in both A and d). - * - * If there are no rows left in A, then G is the identity matrix. Otherwise, - * for each row i, we now determine the lattice of integer vectors - * that satisfies this row. Let U_i be the unimodular extension of the - * row A_i. This unimodular extension exists because gcd(A_i) = 1. - * The first component of - * - * y' = U_i y - * - * needs to be a multiple of d_i. Let y' = diag(d_i, 1, ..., 1) y''. - * Then, - * - * y = U_i^{-1} diag(d_i, 1, ..., 1) y'' - * - * for arbitrary integer vectors y''. That is, y belongs to the lattice - * generated by the columns of L_i = U_i^{-1} diag(d_i, 1, ..., 1). - * If there is only one row, then G = L_1. - * - * If there is more than one row left, we need to compute the intersection - * of the lattices. That is, we need to compute an L such that - * - * L = L_i L_i' for all i - * - * with L_i' some integer matrices. Let A be constructed as follows - * - * A = [ L_1^{-T} L_2^{-T} ... L_k^{-T} ] - * - * and computed the Hermite Normal Form of A = [ H 0 ] U - * Then, - * - * L_i^{-T} = H U_{1,i} - * - * or - * - * H^{-T} = L_i U_{1,i}^T - * - * In other words G = L = H^{-T}. - * To ensure that G is lower triangular, we compute and use its Hermite - * normal form. - * - * The affine transformation matrix returned is then - * - * [ 1 0 ] - * [ y_0 G ] - * - * as any y = y_0 + G y' with y' integer is a solution to the original - * modulo constraints. - */ -struct isl_mat *isl_mat_parameter_compression( - struct isl_mat *B, struct isl_vec *d) -{ - int i; - struct isl_mat *cst = NULL; - struct isl_mat *T = NULL; - isl_int D; - - if (!B || !d) - goto error; - isl_assert(B->ctx, B->n_row == d->size, goto error); - cst = particular_solution(B, d); - if (!cst) - goto error; - if (cst->n_col == 0) { - T = isl_mat_alloc(B->ctx, B->n_col, 0); - isl_mat_free(cst); - isl_mat_free(B); - isl_vec_free(d); - return T; - } - isl_int_init(D); - /* Replace a*g*row = 0 mod g*m by row = 0 mod m */ - for (i = 0; i < B->n_row; ++i) { - isl_seq_gcd(B->row[i] + 1, B->n_col - 1, &D); - if (isl_int_is_one(D)) - continue; - if (isl_int_is_zero(D)) { - B = isl_mat_drop_rows(B, i, 1); - d = isl_vec_cow(d); - if (!B || !d) - goto error2; - isl_seq_cpy(d->block.data+i, d->block.data+i+1, - d->size - (i+1)); - d->size--; - i--; - continue; - } - B = isl_mat_cow(B); - if (!B) - goto error2; - isl_seq_scale_down(B->row[i] + 1, B->row[i] + 1, D, B->n_col-1); - isl_int_gcd(D, D, d->block.data[i]); - d = isl_vec_cow(d); - if (!d) - goto error2; - isl_int_divexact(d->block.data[i], d->block.data[i], D); - } - isl_int_clear(D); - if (B->n_row == 0) - T = isl_mat_identity(B->ctx, B->n_col); - else if (B->n_row == 1) - T = parameter_compression_1(B, d); - else - T = parameter_compression_multi(B, d); - T = isl_mat_left_hermite(T, 0, NULL, NULL); - if (!T) - goto error; - isl_mat_sub_copy(T->ctx, T->row + 1, cst->row, cst->n_row, 0, 0, 1); - isl_mat_free(cst); - isl_mat_free(B); - isl_vec_free(d); - return T; -error2: - isl_int_clear(D); -error: - isl_mat_free(cst); - isl_mat_free(B); - isl_vec_free(d); - return NULL; -} - -/* Given a set of equalities - * - * M x - c = 0 - * - * this function computes a unimodular transformation from a lower-dimensional - * space to the original space that bijectively maps the integer points x' - * in the lower-dimensional space to the integer points x in the original - * space that satisfy the equalities. - * - * The input is given as a matrix B = [ -c M ] and the output is a - * matrix that maps [1 x'] to [1 x]. - * If T2 is not NULL, then *T2 is set to a matrix mapping [1 x] to [1 x']. - * - * First compute the (left) Hermite normal form of M, - * - * M [U1 U2] = M U = H = [H1 0] - * or - * M = H Q = [H1 0] [Q1] - * [Q2] - * - * with U, Q unimodular, Q = U^{-1} (and H lower triangular). - * Define the transformed variables as - * - * x = [U1 U2] [ x1' ] = [U1 U2] [Q1] x - * [ x2' ] [Q2] - * - * The equalities then become - * - * H1 x1' - c = 0 or x1' = H1^{-1} c = c' - * - * If any of the c' is non-integer, then the original set has no - * integer solutions (since the x' are a unimodular transformation - * of the x) and a zero-column matrix is returned. - * Otherwise, the transformation is given by - * - * x = U1 H1^{-1} c + U2 x2' - * - * The inverse transformation is simply - * - * x2' = Q2 x - */ -struct isl_mat *isl_mat_variable_compression(struct isl_mat *B, - struct isl_mat **T2) -{ - int i; - struct isl_mat *H = NULL, *C = NULL, *H1, *U = NULL, *U1, *U2, *TC; - unsigned dim; - - if (T2) - *T2 = NULL; - if (!B) - goto error; - - dim = B->n_col - 1; - H = isl_mat_sub_alloc(B, 0, B->n_row, 1, dim); - H = isl_mat_left_hermite(H, 0, &U, T2); - if (!H || !U || (T2 && !*T2)) - goto error; - if (T2) { - *T2 = isl_mat_drop_rows(*T2, 0, B->n_row); - *T2 = isl_mat_lin_to_aff(*T2); - if (!*T2) - goto error; - } - C = isl_mat_alloc(B->ctx, 1+B->n_row, 1); - if (!C) - goto error; - isl_int_set_si(C->row[0][0], 1); - isl_mat_sub_neg(C->ctx, C->row+1, B->row, B->n_row, 0, 0, 1); - H1 = isl_mat_sub_alloc(H, 0, H->n_row, 0, H->n_row); - H1 = isl_mat_lin_to_aff(H1); - TC = isl_mat_inverse_product(H1, C); - if (!TC) - goto error; - isl_mat_free(H); - if (!isl_int_is_one(TC->row[0][0])) { - for (i = 0; i < B->n_row; ++i) { - if (!isl_int_is_divisible_by(TC->row[1+i][0], TC->row[0][0])) { - struct isl_ctx *ctx = B->ctx; - isl_mat_free(B); - isl_mat_free(TC); - isl_mat_free(U); - if (T2) { - isl_mat_free(*T2); - *T2 = NULL; - } - return isl_mat_alloc(ctx, 1 + dim, 0); - } - isl_seq_scale_down(TC->row[1+i], TC->row[1+i], TC->row[0][0], 1); - } - isl_int_set_si(TC->row[0][0], 1); - } - U1 = isl_mat_sub_alloc(U, 0, U->n_row, 0, B->n_row); - U1 = isl_mat_lin_to_aff(U1); - U2 = isl_mat_sub_alloc(U, 0, U->n_row, B->n_row, U->n_row - B->n_row); - U2 = isl_mat_lin_to_aff(U2); - isl_mat_free(U); - TC = isl_mat_product(U1, TC); - TC = isl_mat_aff_direct_sum(TC, U2); - - isl_mat_free(B); - - return TC; -error: - isl_mat_free(B); - isl_mat_free(H); - isl_mat_free(U); - if (T2) { - isl_mat_free(*T2); - *T2 = NULL; - } - return NULL; -} - -/* Use the n equalities of bset to unimodularly transform the - * variables x such that n transformed variables x1' have a constant value - * and rewrite the constraints of bset in terms of the remaining - * transformed variables x2'. The matrix pointed to by T maps - * the new variables x2' back to the original variables x, while T2 - * maps the original variables to the new variables. - */ -static struct isl_basic_set *compress_variables( - struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2) -{ - struct isl_mat *B, *TC; - unsigned dim; - - if (T) - *T = NULL; - if (T2) - *T2 = NULL; - if (!bset) - goto error; - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(bset->ctx, bset->n_div == 0, goto error); - dim = isl_basic_set_n_dim(bset); - isl_assert(bset->ctx, bset->n_eq <= dim, goto error); - if (bset->n_eq == 0) - return bset; - - B = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, 0, 1 + dim); - TC = isl_mat_variable_compression(B, T2); - if (!TC) - goto error; - if (TC->n_col == 0) { - isl_mat_free(TC); - if (T2) { - isl_mat_free(*T2); - *T2 = NULL; - } - return isl_basic_set_set_to_empty(bset); - } - - bset = isl_basic_set_preimage(bset, T ? isl_mat_copy(TC) : TC); - if (T) - *T = TC; - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_set *isl_basic_set_remove_equalities( - struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2) -{ - if (T) - *T = NULL; - if (T2) - *T2 = NULL; - if (!bset) - return NULL; - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - bset = isl_basic_set_gauss(bset, NULL); - if (ISL_F_ISSET(bset, ISL_BASIC_SET_EMPTY)) - return bset; - bset = compress_variables(bset, T, T2); - return bset; -error: - isl_basic_set_free(bset); - *T = NULL; - return NULL; -} - -/* Check if dimension dim belongs to a residue class - * i_dim \equiv r mod m - * with m != 1 and if so return m in *modulo and r in *residue. - * As a special case, when i_dim has a fixed value v, then - * *modulo is set to 0 and *residue to v. - * - * If i_dim does not belong to such a residue class, then *modulo - * is set to 1 and *residue is set to 0. - */ -int isl_basic_set_dim_residue_class(struct isl_basic_set *bset, - int pos, isl_int *modulo, isl_int *residue) -{ - struct isl_ctx *ctx; - struct isl_mat *H = NULL, *U = NULL, *C, *H1, *U1; - unsigned total; - unsigned nparam; - - if (!bset || !modulo || !residue) - return -1; - - if (isl_basic_set_plain_dim_is_fixed(bset, pos, residue)) { - isl_int_set_si(*modulo, 0); - return 0; - } - - ctx = bset->ctx; - total = isl_basic_set_total_dim(bset); - nparam = isl_basic_set_n_param(bset); - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, 1, total); - H = isl_mat_left_hermite(H, 0, &U, NULL); - if (!H) - return -1; - - isl_seq_gcd(U->row[nparam + pos]+bset->n_eq, - total-bset->n_eq, modulo); - if (isl_int_is_zero(*modulo)) - isl_int_set_si(*modulo, 1); - if (isl_int_is_one(*modulo)) { - isl_int_set_si(*residue, 0); - isl_mat_free(H); - isl_mat_free(U); - return 0; - } - - C = isl_mat_alloc(bset->ctx, 1+bset->n_eq, 1); - if (!C) - goto error; - isl_int_set_si(C->row[0][0], 1); - isl_mat_sub_neg(C->ctx, C->row+1, bset->eq, bset->n_eq, 0, 0, 1); - H1 = isl_mat_sub_alloc(H, 0, H->n_row, 0, H->n_row); - H1 = isl_mat_lin_to_aff(H1); - C = isl_mat_inverse_product(H1, C); - isl_mat_free(H); - U1 = isl_mat_sub_alloc(U, nparam+pos, 1, 0, bset->n_eq); - U1 = isl_mat_lin_to_aff(U1); - isl_mat_free(U); - C = isl_mat_product(U1, C); - if (!C) - goto error; - if (!isl_int_is_divisible_by(C->row[1][0], C->row[0][0])) { - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_set_to_empty(bset); - isl_basic_set_free(bset); - isl_int_set_si(*modulo, 1); - isl_int_set_si(*residue, 0); - return 0; - } - isl_int_divexact(*residue, C->row[1][0], C->row[0][0]); - isl_int_fdiv_r(*residue, *residue, *modulo); - isl_mat_free(C); - return 0; -error: - isl_mat_free(H); - isl_mat_free(U); - return -1; -} - -/* Check if dimension dim belongs to a residue class - * i_dim \equiv r mod m - * with m != 1 and if so return m in *modulo and r in *residue. - * As a special case, when i_dim has a fixed value v, then - * *modulo is set to 0 and *residue to v. - * - * If i_dim does not belong to such a residue class, then *modulo - * is set to 1 and *residue is set to 0. - */ -int isl_set_dim_residue_class(struct isl_set *set, - int pos, isl_int *modulo, isl_int *residue) -{ - isl_int m; - isl_int r; - int i; - - if (!set || !modulo || !residue) - return -1; - - if (set->n == 0) { - isl_int_set_si(*modulo, 0); - isl_int_set_si(*residue, 0); - return 0; - } - - if (isl_basic_set_dim_residue_class(set->p[0], pos, modulo, residue)<0) - return -1; - - if (set->n == 1) - return 0; - - if (isl_int_is_one(*modulo)) - return 0; - - isl_int_init(m); - isl_int_init(r); - - for (i = 1; i < set->n; ++i) { - if (isl_basic_set_dim_residue_class(set->p[0], pos, &m, &r) < 0) - goto error; - isl_int_gcd(*modulo, *modulo, m); - if (!isl_int_is_zero(*modulo)) - isl_int_fdiv_r(*residue, *residue, *modulo); - if (isl_int_is_one(*modulo)) - break; - if (!isl_int_is_zero(*modulo)) - isl_int_fdiv_r(r, r, *modulo); - if (isl_int_ne(*residue, r)) { - isl_int_set_si(*modulo, 1); - isl_int_set_si(*residue, 0); - break; - } - } - - isl_int_clear(m); - isl_int_clear(r); - - return 0; -error: - isl_int_clear(m); - isl_int_clear(r); - return -1; -} diff --git a/cloog-0.17.0/isl/isl_equalities.h b/cloog-0.17.0/isl/isl_equalities.h deleted file mode 100644 index ceb554496f5787b1646f494ae9aa88330000e034..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_equalities.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_EQUALITIES_H -#define ISL_EQUALITIES_H - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_mat *isl_mat_variable_compression( - struct isl_mat *B, struct isl_mat **T2); -struct isl_mat *isl_mat_parameter_compression( - struct isl_mat *B, struct isl_vec *d); -struct isl_basic_set *isl_basic_set_remove_equalities( - struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_factorization.c b/cloog-0.17.0/isl/isl_factorization.c deleted file mode 100644 index 64d6b30e0393ab39b7f09f16aa9dd392db2239fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_factorization.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright 2005-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include - -static __isl_give isl_factorizer *isl_factorizer_alloc( - __isl_take isl_morph *morph, int n_group) -{ - isl_factorizer *f = NULL; - int *len = NULL; - - if (!morph) - return NULL; - - if (n_group > 0) { - len = isl_alloc_array(morph->dom->ctx, int, n_group); - if (!len) - goto error; - } - - f = isl_alloc_type(morph->dom->ctx, struct isl_factorizer); - if (!f) - goto error; - - f->morph = morph; - f->n_group = n_group; - f->len = len; - - return f; -error: - free(len); - isl_morph_free(morph); - return NULL; -} - -void isl_factorizer_free(__isl_take isl_factorizer *f) -{ - if (!f) - return; - - isl_morph_free(f->morph); - free(f->len); - free(f); -} - -void isl_factorizer_dump(__isl_take isl_factorizer *f, FILE *out) -{ - int i; - - if (!f) - return; - - isl_morph_dump(f->morph, out); - fprintf(out, "["); - for (i = 0; i < f->n_group; ++i) { - if (i) - fprintf(out, ", "); - fprintf(out, "%d", f->len[i]); - } - fprintf(out, "]\n"); -} - -__isl_give isl_factorizer *isl_factorizer_identity(__isl_keep isl_basic_set *bset) -{ - return isl_factorizer_alloc(isl_morph_identity(bset), 0); -} - -__isl_give isl_factorizer *isl_factorizer_groups(__isl_keep isl_basic_set *bset, - __isl_take isl_mat *Q, __isl_take isl_mat *U, int n, int *len) -{ - int i; - unsigned nvar; - unsigned ovar; - isl_space *dim; - isl_basic_set *dom; - isl_basic_set *ran; - isl_morph *morph; - isl_factorizer *f; - isl_mat *id; - - if (!bset || !Q || !U) - goto error; - - ovar = 1 + isl_space_offset(bset->dim, isl_dim_set); - id = isl_mat_identity(bset->ctx, ovar); - Q = isl_mat_diagonal(isl_mat_copy(id), Q); - U = isl_mat_diagonal(id, U); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - dim = isl_basic_set_get_space(bset); - dom = isl_basic_set_universe(isl_space_copy(dim)); - dim = isl_space_drop_dims(dim, isl_dim_set, 0, nvar); - dim = isl_space_add_dims(dim, isl_dim_set, nvar); - ran = isl_basic_set_universe(dim); - morph = isl_morph_alloc(dom, ran, Q, U); - f = isl_factorizer_alloc(morph, n); - if (!f) - return NULL; - for (i = 0; i < n; ++i) - f->len[i] = len[i]; - return f; -error: - isl_mat_free(Q); - isl_mat_free(U); - return NULL; -} - -struct isl_factor_groups { - int *pos; /* for each column: row position of pivot */ - int *group; /* group to which a column belongs */ - int *cnt; /* number of columns in the group */ - int *rowgroup; /* group to which a constraint belongs */ -}; - -/* Initialize isl_factor_groups structure: find pivot row positions, - * each column initially belongs to its own group and the groups - * of the constraints are still unknown. - */ -static int init_groups(struct isl_factor_groups *g, __isl_keep isl_mat *H) -{ - int i, j; - - if (!H) - return -1; - - g->pos = isl_alloc_array(H->ctx, int, H->n_col); - g->group = isl_alloc_array(H->ctx, int, H->n_col); - g->cnt = isl_alloc_array(H->ctx, int, H->n_col); - g->rowgroup = isl_alloc_array(H->ctx, int, H->n_row); - - if (!g->pos || !g->group || !g->cnt || !g->rowgroup) - return -1; - - for (i = 0; i < H->n_row; ++i) - g->rowgroup[i] = -1; - for (i = 0, j = 0; i < H->n_col; ++i) { - for ( ; j < H->n_row; ++j) - if (!isl_int_is_zero(H->row[j][i])) - break; - g->pos[i] = j; - } - for (i = 0; i < H->n_col; ++i) { - g->group[i] = i; - g->cnt[i] = 1; - } - - return 0; -} - -/* Update group[k] to the group column k belongs to. - * When merging two groups, only the group of the current - * group leader is changed. Here we change the group of - * the other members to also point to the group that the - * old group leader now points to. - */ -static void update_group(struct isl_factor_groups *g, int k) -{ - int p = g->group[k]; - while (g->cnt[p] == 0) - p = g->group[p]; - g->group[k] = p; -} - -/* Merge group i with all groups of the subsequent columns - * with non-zero coefficients in row j of H. - * (The previous columns are all zero; otherwise we would have handled - * the row before.) - */ -static int update_group_i_with_row_j(struct isl_factor_groups *g, int i, int j, - __isl_keep isl_mat *H) -{ - int k; - - g->rowgroup[j] = g->group[i]; - for (k = i + 1; k < H->n_col && j >= g->pos[k]; ++k) { - update_group(g, k); - update_group(g, i); - if (g->group[k] != g->group[i] && - !isl_int_is_zero(H->row[j][k])) { - isl_assert(H->ctx, g->cnt[g->group[k]] != 0, return -1); - isl_assert(H->ctx, g->cnt[g->group[i]] != 0, return -1); - if (g->group[i] < g->group[k]) { - g->cnt[g->group[i]] += g->cnt[g->group[k]]; - g->cnt[g->group[k]] = 0; - g->group[g->group[k]] = g->group[i]; - } else { - g->cnt[g->group[k]] += g->cnt[g->group[i]]; - g->cnt[g->group[i]] = 0; - g->group[g->group[i]] = g->group[k]; - } - } - } - - return 0; -} - -/* Update the group information based on the constraint matrix. - */ -static int update_groups(struct isl_factor_groups *g, __isl_keep isl_mat *H) -{ - int i, j; - - for (i = 0; i < H->n_col && g->cnt[0] < H->n_col; ++i) { - if (g->pos[i] == H->n_row) - continue; /* A line direction */ - if (g->rowgroup[g->pos[i]] == -1) - g->rowgroup[g->pos[i]] = i; - for (j = g->pos[i] + 1; j < H->n_row; ++j) { - if (isl_int_is_zero(H->row[j][i])) - continue; - if (g->rowgroup[j] != -1) - continue; - if (update_group_i_with_row_j(g, i, j, H) < 0) - return -1; - } - } - for (i = 1; i < H->n_col; ++i) - update_group(g, i); - - return 0; -} - -static void clear_groups(struct isl_factor_groups *g) -{ - if (!g) - return; - free(g->pos); - free(g->group); - free(g->cnt); - free(g->rowgroup); -} - -/* Determine if the set variables of the basic set can be factorized and - * return the results in an isl_factorizer. - * - * The algorithm works by first computing the Hermite normal form - * and then grouping columns linked by one or more constraints together, - * where a constraints "links" two or more columns if the constraint - * has nonzero coefficients in the columns. - */ -__isl_give isl_factorizer *isl_basic_set_factorizer( - __isl_keep isl_basic_set *bset) -{ - int i, j, n, done; - isl_mat *H, *U, *Q; - unsigned nvar; - struct isl_factor_groups g = { 0 }; - isl_factorizer *f; - - if (!bset) - return NULL; - - isl_assert(bset->ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, - return NULL); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - if (nvar <= 1) - return isl_factorizer_identity(bset); - - H = isl_mat_alloc(bset->ctx, bset->n_eq + bset->n_ineq, nvar); - if (!H) - return NULL; - isl_mat_sub_copy(bset->ctx, H->row, bset->eq, bset->n_eq, - 0, 1 + isl_space_offset(bset->dim, isl_dim_set), nvar); - isl_mat_sub_copy(bset->ctx, H->row + bset->n_eq, bset->ineq, bset->n_ineq, - 0, 1 + isl_space_offset(bset->dim, isl_dim_set), nvar); - H = isl_mat_left_hermite(H, 0, &U, &Q); - - if (init_groups(&g, H) < 0) - goto error; - if (update_groups(&g, H) < 0) - goto error; - - if (g.cnt[0] == nvar) { - isl_mat_free(H); - isl_mat_free(U); - isl_mat_free(Q); - clear_groups(&g); - - return isl_factorizer_identity(bset); - } - - done = 0; - n = 0; - while (done != nvar) { - int group = g.group[done]; - for (i = 1; i < g.cnt[group]; ++i) { - if (g.group[done + i] == group) - continue; - for (j = done + g.cnt[group]; j < nvar; ++j) - if (g.group[j] == group) - break; - if (j == nvar) - isl_die(bset->ctx, isl_error_internal, - "internal error", goto error); - g.group[j] = g.group[done + i]; - Q = isl_mat_swap_rows(Q, done + i, j); - U = isl_mat_swap_cols(U, done + i, j); - } - done += g.cnt[group]; - g.pos[n++] = g.cnt[group]; - } - - f = isl_factorizer_groups(bset, Q, U, n, g.pos); - - isl_mat_free(H); - clear_groups(&g); - - return f; -error: - isl_mat_free(H); - isl_mat_free(U); - isl_mat_free(Q); - clear_groups(&g); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_factorization.h b/cloog-0.17.0/isl/isl_factorization.h deleted file mode 100644 index f0d3518d7545d22849c7d2856fcd6be5c474ca81..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_factorization.h +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* Data for factorizing a particular basic set. - * After applying "morph" to the basic set, there are "n_group" - * groups of consecutive set variables, each of length "len[i]", - * with 0 <= i < n_group. - * If no factorization is possible, then "n_group" is set to 0. - */ -struct isl_factorizer { - isl_morph *morph; - int n_group; - int *len; -}; -typedef struct isl_factorizer isl_factorizer; - -__isl_give isl_factorizer *isl_basic_set_factorizer( - __isl_keep isl_basic_set *bset); - -void isl_factorizer_free(__isl_take isl_factorizer *f); -void isl_factorizer_dump(__isl_take isl_factorizer *f, FILE *out); - -#if defined(__cplusplus) -} -#endif diff --git a/cloog-0.17.0/isl/isl_farkas.c b/cloog-0.17.0/isl/isl_farkas.c deleted file mode 100644 index 9f6a462fe8502814dbdd63c13866079ac09907f7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_farkas.c +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include - -/* - * Let C be a cone and define - * - * C' := { y | forall x in C : y x >= 0 } - * - * C' contains the coefficients of all linear constraints - * that are valid for C. - * Furthermore, C'' = C. - * - * If C is defined as { x | A x >= 0 } - * then any element in C' must be a non-negative combination - * of the rows of A, i.e., y = t A with t >= 0. That is, - * - * C' = { y | exists t >= 0 : y = t A } - * - * If any of the rows in A actually represents an equality, then - * also negative combinations of this row are allowed and so the - * non-negativity constraint on the corresponding element of t - * can be dropped. - * - * A polyhedron P = { x | b + A x >= 0 } can be represented - * in homogeneous coordinates by the cone - * C = { [z,x] | b z + A x >= and z >= 0 } - * The valid linear constraints on C correspond to the valid affine - * constraints on P. - * This is essentially Farkas' lemma. - * - * Let A' = [b A], then, since - * [ 1 0 ] - * [ w y ] = [t_0 t] [ b A ] - * - * we have - * - * C' = { w, y | exists t_0, t >= 0 : y = t A' and w = t_0 + t b } - * or - * - * C' = { w, y | exists t >= 0 : y = t A' and w - t b >= 0 } - * - * In practice, we introduce an extra variable (w), shifting all - * other variables to the right, and an extra inequality - * (w - t b >= 0) corresponding to the positivity constraint on - * the homogeneous coordinate. - * - * When going back from coefficients to solutions, we immediately - * plug in 1 for z, which corresponds to shifting all variables - * to the left, with the leftmost ending up in the constant position. - */ - -/* Add the given prefix to all named isl_dim_set dimensions in "dim". - */ -static __isl_give isl_space *isl_space_prefix(__isl_take isl_space *dim, - const char *prefix) -{ - int i; - isl_ctx *ctx; - unsigned nvar; - size_t prefix_len = strlen(prefix); - - if (!dim) - return NULL; - - ctx = isl_space_get_ctx(dim); - nvar = isl_space_dim(dim, isl_dim_set); - - for (i = 0; i < nvar; ++i) { - const char *name; - char *prefix_name; - - name = isl_space_get_dim_name(dim, isl_dim_set, i); - if (!name) - continue; - - prefix_name = isl_alloc_array(ctx, char, - prefix_len + strlen(name) + 1); - if (!prefix_name) - goto error; - memcpy(prefix_name, prefix, prefix_len); - strcpy(prefix_name + prefix_len, name); - - dim = isl_space_set_dim_name(dim, isl_dim_set, i, prefix_name); - free(prefix_name); - } - - return dim; -error: - isl_space_free(dim); - return NULL; -} - -/* Given a dimension specification of the solutions space, construct - * a dimension specification for the space of coefficients. - * - * In particular transform - * - * [params] -> { S } - * - * to - * - * { coefficients[[cst, params] -> S] } - * - * and prefix each dimension name with "c_". - */ -static __isl_give isl_space *isl_space_coefficients(__isl_take isl_space *dim) -{ - isl_space *dim_param; - unsigned nvar; - unsigned nparam; - - nvar = isl_space_dim(dim, isl_dim_set); - nparam = isl_space_dim(dim, isl_dim_param); - dim_param = isl_space_copy(dim); - dim_param = isl_space_drop_dims(dim_param, isl_dim_set, 0, nvar); - dim_param = isl_space_move_dims(dim_param, isl_dim_set, 0, - isl_dim_param, 0, nparam); - dim_param = isl_space_prefix(dim_param, "c_"); - dim_param = isl_space_insert_dims(dim_param, isl_dim_set, 0, 1); - dim_param = isl_space_set_dim_name(dim_param, isl_dim_set, 0, "c_cst"); - dim = isl_space_drop_dims(dim, isl_dim_param, 0, nparam); - dim = isl_space_prefix(dim, "c_"); - dim = isl_space_join(isl_space_from_domain(dim_param), - isl_space_from_range(dim)); - dim = isl_space_wrap(dim); - dim = isl_space_set_tuple_name(dim, isl_dim_set, "coefficients"); - - return dim; -} - -/* Drop the given prefix from all named dimensions of type "type" in "dim". - */ -static __isl_give isl_space *isl_space_unprefix(__isl_take isl_space *dim, - enum isl_dim_type type, const char *prefix) -{ - int i; - unsigned n; - size_t prefix_len = strlen(prefix); - - n = isl_space_dim(dim, type); - - for (i = 0; i < n; ++i) { - const char *name; - - name = isl_space_get_dim_name(dim, type, i); - if (!name) - continue; - if (strncmp(name, prefix, prefix_len)) - continue; - - dim = isl_space_set_dim_name(dim, type, i, name + prefix_len); - } - - return dim; -} - -/* Given a dimension specification of the space of coefficients, construct - * a dimension specification for the space of solutions. - * - * In particular transform - * - * { coefficients[[cst, params] -> S] } - * - * to - * - * [params] -> { S } - * - * and drop the "c_" prefix from the dimension names. - */ -static __isl_give isl_space *isl_space_solutions(__isl_take isl_space *dim) -{ - unsigned nparam; - - dim = isl_space_unwrap(dim); - dim = isl_space_drop_dims(dim, isl_dim_in, 0, 1); - dim = isl_space_unprefix(dim, isl_dim_in, "c_"); - dim = isl_space_unprefix(dim, isl_dim_out, "c_"); - nparam = isl_space_dim(dim, isl_dim_in); - dim = isl_space_move_dims(dim, isl_dim_param, 0, isl_dim_in, 0, nparam); - dim = isl_space_range(dim); - - return dim; -} - -/* Compute the dual of "bset" by applying Farkas' lemma. - * As explained above, we add an extra dimension to represent - * the coefficient of the constant term when going from solutions - * to coefficients (shift == 1) and we drop the extra dimension when going - * in the opposite direction (shift == -1). "dim" is the space in which - * the dual should be created. - */ -static __isl_give isl_basic_set *farkas(__isl_take isl_space *dim, - __isl_take isl_basic_set *bset, int shift) -{ - int i, j, k; - isl_basic_set *dual = NULL; - unsigned total; - - total = isl_basic_set_total_dim(bset); - - dual = isl_basic_set_alloc_space(dim, bset->n_eq + bset->n_ineq, - total, bset->n_ineq + (shift > 0)); - dual = isl_basic_set_set_rational(dual); - - for (i = 0; i < bset->n_eq + bset->n_ineq; ++i) { - k = isl_basic_set_alloc_div(dual); - if (k < 0) - goto error; - isl_int_set_si(dual->div[k][0], 0); - } - - for (i = 0; i < total; ++i) { - k = isl_basic_set_alloc_equality(dual); - if (k < 0) - goto error; - isl_seq_clr(dual->eq[k], 1 + shift + total); - isl_int_set_si(dual->eq[k][1 + shift + i], -1); - for (j = 0; j < bset->n_eq; ++j) - isl_int_set(dual->eq[k][1 + shift + total + j], - bset->eq[j][1 + i]); - for (j = 0; j < bset->n_ineq; ++j) - isl_int_set(dual->eq[k][1 + shift + total + bset->n_eq + j], - bset->ineq[j][1 + i]); - } - - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(dual); - if (k < 0) - goto error; - isl_seq_clr(dual->ineq[k], - 1 + shift + total + bset->n_eq + bset->n_ineq); - isl_int_set_si(dual->ineq[k][1 + shift + total + bset->n_eq + i], 1); - } - - if (shift > 0) { - k = isl_basic_set_alloc_inequality(dual); - if (k < 0) - goto error; - isl_seq_clr(dual->ineq[k], 2 + total); - isl_int_set_si(dual->ineq[k][1], 1); - for (j = 0; j < bset->n_eq; ++j) - isl_int_neg(dual->ineq[k][2 + total + j], - bset->eq[j][0]); - for (j = 0; j < bset->n_ineq; ++j) - isl_int_neg(dual->ineq[k][2 + total + bset->n_eq + j], - bset->ineq[j][0]); - } - - dual = isl_basic_set_remove_divs(dual); - isl_basic_set_simplify(dual); - isl_basic_set_finalize(dual); - - isl_basic_set_free(bset); - return dual; -error: - isl_basic_set_free(bset); - isl_basic_set_free(dual); - return NULL; -} - -/* Construct a basic set containing the tuples of coefficients of all - * valid affine constraints on the given basic set. - */ -__isl_give isl_basic_set *isl_basic_set_coefficients( - __isl_take isl_basic_set *bset) -{ - isl_space *dim; - - if (!bset) - return NULL; - if (bset->n_div) - isl_die(bset->ctx, isl_error_invalid, - "input set not allowed to have local variables", - goto error); - - dim = isl_basic_set_get_space(bset); - dim = isl_space_coefficients(dim); - - return farkas(dim, bset, 1); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Construct a basic set containing the elements that satisfy all - * affine constraints whose coefficient tuples are - * contained in the given basic set. - */ -__isl_give isl_basic_set *isl_basic_set_solutions( - __isl_take isl_basic_set *bset) -{ - isl_space *dim; - - if (!bset) - return NULL; - if (bset->n_div) - isl_die(bset->ctx, isl_error_invalid, - "input set not allowed to have local variables", - goto error); - - dim = isl_basic_set_get_space(bset); - dim = isl_space_solutions(dim); - - return farkas(dim, bset, -1); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Construct a basic set containing the tuples of coefficients of all - * valid affine constraints on the given set. - */ -__isl_give isl_basic_set *isl_set_coefficients(__isl_take isl_set *set) -{ - int i; - isl_basic_set *coeff; - - if (!set) - return NULL; - if (set->n == 0) { - isl_space *dim = isl_set_get_space(set); - dim = isl_space_coefficients(dim); - coeff = isl_basic_set_universe(dim); - coeff = isl_basic_set_set_rational(coeff); - isl_set_free(set); - return coeff; - } - - coeff = isl_basic_set_coefficients(isl_basic_set_copy(set->p[0])); - - for (i = 1; i < set->n; ++i) { - isl_basic_set *bset, *coeff_i; - bset = isl_basic_set_copy(set->p[i]); - coeff_i = isl_basic_set_coefficients(bset); - coeff = isl_basic_set_intersect(coeff, coeff_i); - } - - isl_set_free(set); - return coeff; -} - -/* Construct a basic set containing the elements that satisfy all - * affine constraints whose coefficient tuples are - * contained in the given set. - */ -__isl_give isl_basic_set *isl_set_solutions(__isl_take isl_set *set) -{ - int i; - isl_basic_set *sol; - - if (!set) - return NULL; - if (set->n == 0) { - isl_space *dim = isl_set_get_space(set); - dim = isl_space_solutions(dim); - sol = isl_basic_set_universe(dim); - sol = isl_basic_set_set_rational(sol); - isl_set_free(set); - return sol; - } - - sol = isl_basic_set_solutions(isl_basic_set_copy(set->p[0])); - - for (i = 1; i < set->n; ++i) { - isl_basic_set *bset, *sol_i; - bset = isl_basic_set_copy(set->p[i]); - sol_i = isl_basic_set_solutions(bset); - sol = isl_basic_set_intersect(sol, sol_i); - } - - isl_set_free(set); - return sol; -} diff --git a/cloog-0.17.0/isl/isl_flow.c b/cloog-0.17.0/isl/isl_flow.c deleted file mode 100644 index 1056ab2aa62f94c5bbf66f0b0c73389ba0315698..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_flow.c +++ /dev/null @@ -1,1320 +0,0 @@ -/* - * Copyright 2005-2007 Universiteit Leiden - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, Leiden Institute of Advanced Computer Science, - * Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, The Netherlands - * and K.U.Leuven, Departement Computerwetenschappen, Celestijnenlaan 200A, - * B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include - -/* A private structure to keep track of a mapping together with - * a user-specified identifier and a boolean indicating whether - * the map represents a must or may access/dependence. - */ -struct isl_labeled_map { - struct isl_map *map; - void *data; - int must; -}; - -/* A structure containing the input for dependence analysis: - * - a sink - * - n_must + n_may (<= max_source) sources - * - a function for determining the relative order of sources and sink - * The must sources are placed before the may sources. - */ -struct isl_access_info { - struct isl_labeled_map sink; - isl_access_level_before level_before; - int max_source; - int n_must; - int n_may; - struct isl_labeled_map source[1]; -}; - -/* A structure containing the output of dependence analysis: - * - n_source dependences - * - a wrapped subset of the sink for which definitely no source could be found - * - a wrapped subset of the sink for which possibly no source could be found - */ -struct isl_flow { - isl_set *must_no_source; - isl_set *may_no_source; - int n_source; - struct isl_labeled_map *dep; -}; - -/* Construct an isl_access_info structure and fill it up with - * the given data. The number of sources is set to 0. - */ -__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink, - void *sink_user, isl_access_level_before fn, int max_source) -{ - isl_ctx *ctx; - struct isl_access_info *acc; - - if (!sink) - return NULL; - - ctx = isl_map_get_ctx(sink); - isl_assert(ctx, max_source >= 0, goto error); - - acc = isl_alloc(ctx, struct isl_access_info, - sizeof(struct isl_access_info) + - (max_source - 1) * sizeof(struct isl_labeled_map)); - if (!acc) - goto error; - - acc->sink.map = sink; - acc->sink.data = sink_user; - acc->level_before = fn; - acc->max_source = max_source; - acc->n_must = 0; - acc->n_may = 0; - - return acc; -error: - isl_map_free(sink); - return NULL; -} - -/* Free the given isl_access_info structure. - */ -void isl_access_info_free(__isl_take isl_access_info *acc) -{ - int i; - - if (!acc) - return; - isl_map_free(acc->sink.map); - for (i = 0; i < acc->n_must + acc->n_may; ++i) - isl_map_free(acc->source[i].map); - free(acc); -} - -isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc) -{ - return acc ? isl_map_get_ctx(acc->sink.map) : NULL; -} - -/* Add another source to an isl_access_info structure, making - * sure the "must" sources are placed before the "may" sources. - * This function may be called at most max_source times on a - * given isl_access_info structure, with max_source as specified - * in the call to isl_access_info_alloc that constructed the structure. - */ -__isl_give isl_access_info *isl_access_info_add_source( - __isl_take isl_access_info *acc, __isl_take isl_map *source, - int must, void *source_user) -{ - isl_ctx *ctx; - - if (!acc) - return NULL; - ctx = isl_map_get_ctx(acc->sink.map); - isl_assert(ctx, acc->n_must + acc->n_may < acc->max_source, goto error); - - if (must) { - if (acc->n_may) - acc->source[acc->n_must + acc->n_may] = - acc->source[acc->n_must]; - acc->source[acc->n_must].map = source; - acc->source[acc->n_must].data = source_user; - acc->source[acc->n_must].must = 1; - acc->n_must++; - } else { - acc->source[acc->n_must + acc->n_may].map = source; - acc->source[acc->n_must + acc->n_may].data = source_user; - acc->source[acc->n_must + acc->n_may].must = 0; - acc->n_may++; - } - - return acc; -error: - isl_map_free(source); - isl_access_info_free(acc); - return NULL; -} - -/* A temporary structure used while sorting the accesses in an isl_access_info. - */ -struct isl_access_sort_info { - struct isl_map *source_map; - void *source_data; - struct isl_access_info *acc; -}; - -/* Return -n, 0 or n (with n a positive value), depending on whether - * the source access identified by p1 should be sorted before, together - * or after that identified by p2. - * - * If p1 and p2 share a different number of levels with the sink, - * then the one with the lowest number of shared levels should be - * sorted first. - * If they both share no levels, then the order is irrelevant. - * Otherwise, if p1 appears before p2, then it should be sorted first. - * For more generic initial schedules, it is possible that neither - * p1 nor p2 appears before the other, or at least not in any obvious way. - * We therefore also check if p2 appears before p1, in which case p2 - * should be sorted first. - * If not, we try to order the two statements based on the description - * of the iteration domains. This results in an arbitrary, but fairly - * stable ordering. - */ -static int access_sort_cmp(const void *p1, const void *p2) -{ - const struct isl_access_sort_info *i1, *i2; - int level1, level2; - uint32_t h1, h2; - i1 = (const struct isl_access_sort_info *) p1; - i2 = (const struct isl_access_sort_info *) p2; - - level1 = i1->acc->level_before(i1->source_data, i1->acc->sink.data); - level2 = i2->acc->level_before(i2->source_data, i2->acc->sink.data); - - if (level1 != level2 || !level1) - return level1 - level2; - - level1 = i1->acc->level_before(i1->source_data, i2->source_data); - if (level1 % 2) - return -1; - - level2 = i1->acc->level_before(i2->source_data, i1->source_data); - if (level2 % 2) - return 1; - - h1 = isl_map_get_hash(i1->source_map); - h2 = isl_map_get_hash(i2->source_map); - return h1 > h2 ? 1 : h1 < h2 ? -1 : 0; -} - -/* Sort the must source accesses in order of increasing number of shared - * levels with the sink access. - * Source accesses with the same number of shared levels are sorted - * in their textual order. - */ -static __isl_give isl_access_info *isl_access_info_sort_sources( - __isl_take isl_access_info *acc) -{ - int i; - isl_ctx *ctx; - struct isl_access_sort_info *array; - - if (!acc) - return NULL; - if (acc->n_must <= 1) - return acc; - - ctx = isl_map_get_ctx(acc->sink.map); - array = isl_alloc_array(ctx, struct isl_access_sort_info, acc->n_must); - if (!array) - goto error; - - for (i = 0; i < acc->n_must; ++i) { - array[i].source_map = acc->source[i].map; - array[i].source_data = acc->source[i].data; - array[i].acc = acc; - } - - qsort(array, acc->n_must, sizeof(struct isl_access_sort_info), - access_sort_cmp); - - for (i = 0; i < acc->n_must; ++i) { - acc->source[i].map = array[i].source_map; - acc->source[i].data = array[i].source_data; - } - - free(array); - - return acc; -error: - isl_access_info_free(acc); - return NULL; -} - -/* Align the parameters of the two spaces if needed and then call - * isl_space_join. - */ -static __isl_give isl_space *space_align_and_join(__isl_take isl_space *left, - __isl_take isl_space *right) -{ - if (isl_space_match(left, isl_dim_param, right, isl_dim_param)) - return isl_space_join(left, right); - - left = isl_space_align_params(left, isl_space_copy(right)); - right = isl_space_align_params(right, isl_space_copy(left)); - return isl_space_join(left, right); -} - -/* Initialize an empty isl_flow structure corresponding to a given - * isl_access_info structure. - * For each must access, two dependences are created (initialized - * to the empty relation), one for the resulting must dependences - * and one for the resulting may dependences. May accesses can - * only lead to may dependences, so only one dependence is created - * for each of them. - * This function is private as isl_flow structures are only supposed - * to be created by isl_access_info_compute_flow. - */ -static __isl_give isl_flow *isl_flow_alloc(__isl_keep isl_access_info *acc) -{ - int i; - struct isl_ctx *ctx; - struct isl_flow *dep; - - if (!acc) - return NULL; - - ctx = isl_map_get_ctx(acc->sink.map); - dep = isl_calloc_type(ctx, struct isl_flow); - if (!dep) - return NULL; - - dep->dep = isl_calloc_array(ctx, struct isl_labeled_map, - 2 * acc->n_must + acc->n_may); - if (!dep->dep) - goto error; - - dep->n_source = 2 * acc->n_must + acc->n_may; - for (i = 0; i < acc->n_must; ++i) { - isl_space *dim; - dim = space_align_and_join( - isl_map_get_space(acc->source[i].map), - isl_space_reverse(isl_map_get_space(acc->sink.map))); - dep->dep[2 * i].map = isl_map_empty(dim); - dep->dep[2 * i + 1].map = isl_map_copy(dep->dep[2 * i].map); - dep->dep[2 * i].data = acc->source[i].data; - dep->dep[2 * i + 1].data = acc->source[i].data; - dep->dep[2 * i].must = 1; - dep->dep[2 * i + 1].must = 0; - if (!dep->dep[2 * i].map || !dep->dep[2 * i + 1].map) - goto error; - } - for (i = acc->n_must; i < acc->n_must + acc->n_may; ++i) { - isl_space *dim; - dim = space_align_and_join( - isl_map_get_space(acc->source[i].map), - isl_space_reverse(isl_map_get_space(acc->sink.map))); - dep->dep[acc->n_must + i].map = isl_map_empty(dim); - dep->dep[acc->n_must + i].data = acc->source[i].data; - dep->dep[acc->n_must + i].must = 0; - if (!dep->dep[acc->n_must + i].map) - goto error; - } - - return dep; -error: - isl_flow_free(dep); - return NULL; -} - -/* Iterate over all sources and for each resulting flow dependence - * that is not empty, call the user specfied function. - * The second argument in this function call identifies the source, - * while the third argument correspond to the final argument of - * the isl_flow_foreach call. - */ -int isl_flow_foreach(__isl_keep isl_flow *deps, - int (*fn)(__isl_take isl_map *dep, int must, void *dep_user, void *user), - void *user) -{ - int i; - - if (!deps) - return -1; - - for (i = 0; i < deps->n_source; ++i) { - if (isl_map_plain_is_empty(deps->dep[i].map)) - continue; - if (fn(isl_map_copy(deps->dep[i].map), deps->dep[i].must, - deps->dep[i].data, user) < 0) - return -1; - } - - return 0; -} - -/* Return a copy of the subset of the sink for which no source could be found. - */ -__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must) -{ - if (!deps) - return NULL; - - if (must) - return isl_set_unwrap(isl_set_copy(deps->must_no_source)); - else - return isl_set_unwrap(isl_set_copy(deps->may_no_source)); -} - -void isl_flow_free(__isl_take isl_flow *deps) -{ - int i; - - if (!deps) - return; - isl_set_free(deps->must_no_source); - isl_set_free(deps->may_no_source); - if (deps->dep) { - for (i = 0; i < deps->n_source; ++i) - isl_map_free(deps->dep[i].map); - free(deps->dep); - } - free(deps); -} - -isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps) -{ - return deps ? isl_set_get_ctx(deps->must_no_source) : NULL; -} - -/* Return a map that enforces that the domain iteration occurs after - * the range iteration at the given level. - * If level is odd, then the domain iteration should occur after - * the target iteration in their shared level/2 outermost loops. - * In this case we simply need to enforce that these outermost - * loop iterations are the same. - * If level is even, then the loop iterator of the domain should - * be greater than the loop iterator of the range at the last - * of the level/2 shared loops, i.e., loop level/2 - 1. - */ -static __isl_give isl_map *after_at_level(__isl_take isl_space *dim, int level) -{ - struct isl_basic_map *bmap; - - if (level % 2) - bmap = isl_basic_map_equal(dim, level/2); - else - bmap = isl_basic_map_more_at(dim, level/2 - 1); - - return isl_map_from_basic_map(bmap); -} - -/* Compute the last iteration of must source j that precedes the sink - * at the given level for sink iterations in set_C. - * The subset of set_C for which no such iteration can be found is returned - * in *empty. - */ -static struct isl_map *last_source(struct isl_access_info *acc, - struct isl_set *set_C, - int j, int level, struct isl_set **empty) -{ - struct isl_map *read_map; - struct isl_map *write_map; - struct isl_map *dep_map; - struct isl_map *after; - struct isl_map *result; - - read_map = isl_map_copy(acc->sink.map); - write_map = isl_map_copy(acc->source[j].map); - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - after = after_at_level(isl_map_get_space(dep_map), level); - dep_map = isl_map_intersect(dep_map, after); - result = isl_map_partial_lexmax(dep_map, set_C, empty); - result = isl_map_reverse(result); - - return result; -} - -/* For a given mapping between iterations of must source j and iterations - * of the sink, compute the last iteration of must source k preceding - * the sink at level before_level for any of the sink iterations, - * but following the corresponding iteration of must source j at level - * after_level. - */ -static struct isl_map *last_later_source(struct isl_access_info *acc, - struct isl_map *old_map, - int j, int before_level, - int k, int after_level, - struct isl_set **empty) -{ - isl_space *dim; - struct isl_set *set_C; - struct isl_map *read_map; - struct isl_map *write_map; - struct isl_map *dep_map; - struct isl_map *after_write; - struct isl_map *before_read; - struct isl_map *result; - - set_C = isl_map_range(isl_map_copy(old_map)); - read_map = isl_map_copy(acc->sink.map); - write_map = isl_map_copy(acc->source[k].map); - - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - dim = space_align_and_join(isl_map_get_space(acc->source[k].map), - isl_space_reverse(isl_map_get_space(acc->source[j].map))); - after_write = after_at_level(dim, after_level); - after_write = isl_map_apply_range(after_write, old_map); - after_write = isl_map_reverse(after_write); - dep_map = isl_map_intersect(dep_map, after_write); - before_read = after_at_level(isl_map_get_space(dep_map), before_level); - dep_map = isl_map_intersect(dep_map, before_read); - result = isl_map_partial_lexmax(dep_map, set_C, empty); - result = isl_map_reverse(result); - - return result; -} - -/* Given a shared_level between two accesses, return 1 if the - * the first can precede the second at the requested target_level. - * If the target level is odd, i.e., refers to a statement level - * dimension, then first needs to precede second at the requested - * level, i.e., shared_level must be equal to target_level. - * If the target level is odd, then the two loops should share - * at least the requested number of outer loops. - */ -static int can_precede_at_level(int shared_level, int target_level) -{ - if (shared_level < target_level) - return 0; - if ((target_level % 2) && shared_level > target_level) - return 0; - return 1; -} - -/* Given a possible flow dependence temp_rel[j] between source j and the sink - * at level sink_level, remove those elements for which - * there is an iteration of another source k < j that is closer to the sink. - * The flow dependences temp_rel[k] are updated with the improved sources. - * Any improved source needs to precede the sink at the same level - * and needs to follow source j at the same or a deeper level. - * The lower this level, the later the execution date of source k. - * We therefore consider lower levels first. - * - * If temp_rel[j] is empty, then there can be no improvement and - * we return immediately. - */ -static int intermediate_sources(__isl_keep isl_access_info *acc, - struct isl_map **temp_rel, int j, int sink_level) -{ - int k, level; - int depth = 2 * isl_map_dim(acc->source[j].map, isl_dim_in) + 1; - - if (isl_map_plain_is_empty(temp_rel[j])) - return 0; - - for (k = j - 1; k >= 0; --k) { - int plevel, plevel2; - plevel = acc->level_before(acc->source[k].data, acc->sink.data); - if (!can_precede_at_level(plevel, sink_level)) - continue; - - plevel2 = acc->level_before(acc->source[j].data, - acc->source[k].data); - - for (level = sink_level; level <= depth; ++level) { - struct isl_map *T; - struct isl_set *trest; - struct isl_map *copy; - - if (!can_precede_at_level(plevel2, level)) - continue; - - copy = isl_map_copy(temp_rel[j]); - T = last_later_source(acc, copy, j, sink_level, k, - level, &trest); - if (isl_map_plain_is_empty(T)) { - isl_set_free(trest); - isl_map_free(T); - continue; - } - temp_rel[j] = isl_map_intersect_range(temp_rel[j], trest); - temp_rel[k] = isl_map_union_disjoint(temp_rel[k], T); - } - } - - return 0; -} - -/* Compute all iterations of may source j that precedes the sink at the given - * level for sink iterations in set_C. - */ -static __isl_give isl_map *all_sources(__isl_keep isl_access_info *acc, - __isl_take isl_set *set_C, int j, int level) -{ - isl_map *read_map; - isl_map *write_map; - isl_map *dep_map; - isl_map *after; - - read_map = isl_map_copy(acc->sink.map); - read_map = isl_map_intersect_domain(read_map, set_C); - write_map = isl_map_copy(acc->source[acc->n_must + j].map); - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - after = after_at_level(isl_map_get_space(dep_map), level); - dep_map = isl_map_intersect(dep_map, after); - - return isl_map_reverse(dep_map); -} - -/* For a given mapping between iterations of must source k and iterations - * of the sink, compute the all iteration of may source j preceding - * the sink at level before_level for any of the sink iterations, - * but following the corresponding iteration of must source k at level - * after_level. - */ -static __isl_give isl_map *all_later_sources(__isl_keep isl_access_info *acc, - __isl_keep isl_map *old_map, - int j, int before_level, int k, int after_level) -{ - isl_space *dim; - isl_set *set_C; - isl_map *read_map; - isl_map *write_map; - isl_map *dep_map; - isl_map *after_write; - isl_map *before_read; - - set_C = isl_map_range(isl_map_copy(old_map)); - read_map = isl_map_copy(acc->sink.map); - read_map = isl_map_intersect_domain(read_map, set_C); - write_map = isl_map_copy(acc->source[acc->n_must + j].map); - - write_map = isl_map_reverse(write_map); - dep_map = isl_map_apply_range(read_map, write_map); - dim = isl_space_join(isl_map_get_space(acc->source[acc->n_must + j].map), - isl_space_reverse(isl_map_get_space(acc->source[k].map))); - after_write = after_at_level(dim, after_level); - after_write = isl_map_apply_range(after_write, old_map); - after_write = isl_map_reverse(after_write); - dep_map = isl_map_intersect(dep_map, after_write); - before_read = after_at_level(isl_map_get_space(dep_map), before_level); - dep_map = isl_map_intersect(dep_map, before_read); - return isl_map_reverse(dep_map); -} - -/* Given the must and may dependence relations for the must accesses - * for level sink_level, check if there are any accesses of may access j - * that occur in between and return their union. - * If some of these accesses are intermediate with respect to - * (previously thought to be) must dependences, then these - * must dependences are turned into may dependences. - */ -static __isl_give isl_map *all_intermediate_sources( - __isl_keep isl_access_info *acc, __isl_take isl_map *map, - struct isl_map **must_rel, struct isl_map **may_rel, - int j, int sink_level) -{ - int k, level; - int depth = 2 * isl_map_dim(acc->source[acc->n_must + j].map, - isl_dim_in) + 1; - - for (k = 0; k < acc->n_must; ++k) { - int plevel; - - if (isl_map_plain_is_empty(may_rel[k]) && - isl_map_plain_is_empty(must_rel[k])) - continue; - - plevel = acc->level_before(acc->source[k].data, - acc->source[acc->n_must + j].data); - - for (level = sink_level; level <= depth; ++level) { - isl_map *T; - isl_map *copy; - isl_set *ran; - - if (!can_precede_at_level(plevel, level)) - continue; - - copy = isl_map_copy(may_rel[k]); - T = all_later_sources(acc, copy, j, sink_level, k, level); - map = isl_map_union(map, T); - - copy = isl_map_copy(must_rel[k]); - T = all_later_sources(acc, copy, j, sink_level, k, level); - ran = isl_map_range(isl_map_copy(T)); - map = isl_map_union(map, T); - may_rel[k] = isl_map_union_disjoint(may_rel[k], - isl_map_intersect_range(isl_map_copy(must_rel[k]), - isl_set_copy(ran))); - T = isl_map_from_domain_and_range( - isl_set_universe( - isl_space_domain(isl_map_get_space(must_rel[k]))), - ran); - must_rel[k] = isl_map_subtract(must_rel[k], T); - } - } - - return map; -} - -/* Compute dependences for the case where all accesses are "may" - * accesses, which boils down to computing memory based dependences. - * The generic algorithm would also work in this case, but it would - * be overkill to use it. - */ -static __isl_give isl_flow *compute_mem_based_dependences( - __isl_take isl_access_info *acc) -{ - int i; - isl_set *mustdo; - isl_set *maydo; - isl_flow *res; - - res = isl_flow_alloc(acc); - if (!res) - goto error; - - mustdo = isl_map_domain(isl_map_copy(acc->sink.map)); - maydo = isl_set_copy(mustdo); - - for (i = 0; i < acc->n_may; ++i) { - int plevel; - int is_before; - isl_space *dim; - isl_map *before; - isl_map *dep; - - plevel = acc->level_before(acc->source[i].data, acc->sink.data); - is_before = plevel & 1; - plevel >>= 1; - - dim = isl_map_get_space(res->dep[i].map); - if (is_before) - before = isl_map_lex_le_first(dim, plevel); - else - before = isl_map_lex_lt_first(dim, plevel); - dep = isl_map_apply_range(isl_map_copy(acc->source[i].map), - isl_map_reverse(isl_map_copy(acc->sink.map))); - dep = isl_map_intersect(dep, before); - mustdo = isl_set_subtract(mustdo, - isl_map_range(isl_map_copy(dep))); - res->dep[i].map = isl_map_union(res->dep[i].map, dep); - } - - res->may_no_source = isl_set_subtract(maydo, isl_set_copy(mustdo)); - res->must_no_source = mustdo; - - isl_access_info_free(acc); - - return res; -error: - isl_access_info_free(acc); - return NULL; -} - -/* Compute dependences for the case where there is at least one - * "must" access. - * - * The core algorithm considers all levels in which a source may precede - * the sink, where a level may either be a statement level or a loop level. - * The outermost statement level is 1, the first loop level is 2, etc... - * The algorithm basically does the following: - * for all levels l of the read access from innermost to outermost - * for all sources w that may precede the sink access at that level - * compute the last iteration of the source that precedes the sink access - * at that level - * add result to possible last accesses at level l of source w - * for all sources w2 that we haven't considered yet at this level that may - * also precede the sink access - * for all levels l2 of w from l to innermost - * for all possible last accesses dep of w at l - * compute last iteration of w2 between the source and sink - * of dep - * add result to possible last accesses at level l of write w2 - * and replace possible last accesses dep by the remainder - * - * - * The above algorithm is applied to the must access. During the course - * of the algorithm, we keep track of sink iterations that still - * need to be considered. These iterations are split into those that - * haven't been matched to any source access (mustdo) and those that have only - * been matched to may accesses (maydo). - * At the end of each level, we also consider the may accesses. - * In particular, we consider may accesses that precede the remaining - * sink iterations, moving elements from mustdo to maydo when appropriate, - * and may accesses that occur between a must source and a sink of any - * dependences found at the current level, turning must dependences into - * may dependences when appropriate. - * - */ -static __isl_give isl_flow *compute_val_based_dependences( - __isl_take isl_access_info *acc) -{ - isl_ctx *ctx; - isl_flow *res; - isl_set *mustdo = NULL; - isl_set *maydo = NULL; - int level, j; - int depth; - isl_map **must_rel = NULL; - isl_map **may_rel = NULL; - - acc = isl_access_info_sort_sources(acc); - if (!acc) - return NULL; - - res = isl_flow_alloc(acc); - if (!res) - goto error; - ctx = isl_map_get_ctx(acc->sink.map); - - depth = 2 * isl_map_dim(acc->sink.map, isl_dim_in) + 1; - mustdo = isl_map_domain(isl_map_copy(acc->sink.map)); - maydo = isl_set_empty_like(mustdo); - if (!mustdo || !maydo) - goto error; - if (isl_set_plain_is_empty(mustdo)) - goto done; - - must_rel = isl_alloc_array(ctx, struct isl_map *, acc->n_must); - may_rel = isl_alloc_array(ctx, struct isl_map *, acc->n_must); - if (!must_rel || !may_rel) - goto error; - - for (level = depth; level >= 1; --level) { - for (j = acc->n_must-1; j >=0; --j) { - must_rel[j] = isl_map_empty_like(res->dep[j].map); - may_rel[j] = isl_map_copy(must_rel[j]); - } - - for (j = acc->n_must - 1; j >= 0; --j) { - struct isl_map *T; - struct isl_set *rest; - int plevel; - - plevel = acc->level_before(acc->source[j].data, - acc->sink.data); - if (!can_precede_at_level(plevel, level)) - continue; - - T = last_source(acc, mustdo, j, level, &rest); - must_rel[j] = isl_map_union_disjoint(must_rel[j], T); - mustdo = rest; - - intermediate_sources(acc, must_rel, j, level); - - T = last_source(acc, maydo, j, level, &rest); - may_rel[j] = isl_map_union_disjoint(may_rel[j], T); - maydo = rest; - - intermediate_sources(acc, may_rel, j, level); - - if (isl_set_plain_is_empty(mustdo) && - isl_set_plain_is_empty(maydo)) - break; - } - for (j = j - 1; j >= 0; --j) { - int plevel; - - plevel = acc->level_before(acc->source[j].data, - acc->sink.data); - if (!can_precede_at_level(plevel, level)) - continue; - - intermediate_sources(acc, must_rel, j, level); - intermediate_sources(acc, may_rel, j, level); - } - - for (j = 0; j < acc->n_may; ++j) { - int plevel; - isl_map *T; - isl_set *ran; - - plevel = acc->level_before(acc->source[acc->n_must + j].data, - acc->sink.data); - if (!can_precede_at_level(plevel, level)) - continue; - - T = all_sources(acc, isl_set_copy(maydo), j, level); - res->dep[2 * acc->n_must + j].map = - isl_map_union(res->dep[2 * acc->n_must + j].map, T); - T = all_sources(acc, isl_set_copy(mustdo), j, level); - ran = isl_map_range(isl_map_copy(T)); - res->dep[2 * acc->n_must + j].map = - isl_map_union(res->dep[2 * acc->n_must + j].map, T); - mustdo = isl_set_subtract(mustdo, isl_set_copy(ran)); - maydo = isl_set_union_disjoint(maydo, ran); - - T = res->dep[2 * acc->n_must + j].map; - T = all_intermediate_sources(acc, T, must_rel, may_rel, - j, level); - res->dep[2 * acc->n_must + j].map = T; - } - - for (j = acc->n_must - 1; j >= 0; --j) { - res->dep[2 * j].map = - isl_map_union_disjoint(res->dep[2 * j].map, - must_rel[j]); - res->dep[2 * j + 1].map = - isl_map_union_disjoint(res->dep[2 * j + 1].map, - may_rel[j]); - } - - if (isl_set_plain_is_empty(mustdo) && - isl_set_plain_is_empty(maydo)) - break; - } - - free(must_rel); - free(may_rel); -done: - res->must_no_source = mustdo; - res->may_no_source = maydo; - isl_access_info_free(acc); - return res; -error: - isl_access_info_free(acc); - isl_flow_free(res); - isl_set_free(mustdo); - isl_set_free(maydo); - free(must_rel); - free(may_rel); - return NULL; -} - -/* Given a "sink" access, a list of n "source" accesses, - * compute for each iteration of the sink access - * and for each element accessed by that iteration, - * the source access in the list that last accessed the - * element accessed by the sink access before this sink access. - * Each access is given as a map from the loop iterators - * to the array indices. - * The result is a list of n relations between source and sink - * iterations and a subset of the domain of the sink access, - * corresponding to those iterations that access an element - * not previously accessed. - * - * To deal with multi-valued sink access relations, the sink iteration - * domain is first extended with dimensions that correspond to the data - * space. After the computation is finished, these extra dimensions are - * projected out again. - */ -__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc) -{ - int j; - struct isl_flow *res; - isl_map *domain_map = NULL; - - if (!acc) - return NULL; - - domain_map = isl_map_domain_map(isl_map_copy(acc->sink.map)); - acc->sink.map = isl_map_range_map(acc->sink.map); - if (!acc->sink.map) - goto error; - - if (acc->n_must == 0) - res = compute_mem_based_dependences(acc); - else - res = compute_val_based_dependences(acc); - if (!res) - goto error2; - - for (j = 0; j < res->n_source; ++j) { - res->dep[j].map = isl_map_apply_range(res->dep[j].map, - isl_map_copy(domain_map)); - if (!res->dep[j].map) - goto error2; - } - if (!res->must_no_source || !res->may_no_source) - goto error2; - - isl_map_free(domain_map); - return res; -error: - isl_map_free(domain_map); - isl_access_info_free(acc); - return NULL; -error2: - isl_map_free(domain_map); - isl_flow_free(res); - return NULL; -} - - -/* Keep track of some information about a schedule for a given - * access. In particular, keep track of which dimensions - * have a constant value and of the actual constant values. - */ -struct isl_sched_info { - int *is_cst; - isl_vec *cst; -}; - -static void sched_info_free(__isl_take struct isl_sched_info *info) -{ - if (!info) - return; - isl_vec_free(info->cst); - free(info->is_cst); - free(info); -} - -/* Extract information on the constant dimensions of the schedule - * for a given access. The "map" is of the form - * - * [S -> D] -> A - * - * with S the schedule domain, D the iteration domain and A the data domain. - */ -static __isl_give struct isl_sched_info *sched_info_alloc( - __isl_keep isl_map *map) -{ - isl_ctx *ctx; - isl_space *dim; - struct isl_sched_info *info; - int i, n; - - if (!map) - return NULL; - - dim = isl_space_unwrap(isl_space_domain(isl_map_get_space(map))); - if (!dim) - return NULL; - n = isl_space_dim(dim, isl_dim_in); - isl_space_free(dim); - - ctx = isl_map_get_ctx(map); - info = isl_alloc_type(ctx, struct isl_sched_info); - if (!info) - return NULL; - info->is_cst = isl_alloc_array(ctx, int, n); - info->cst = isl_vec_alloc(ctx, n); - if (!info->is_cst || !info->cst) - goto error; - - for (i = 0; i < n; ++i) - info->is_cst[i] = isl_map_plain_is_fixed(map, isl_dim_in, i, - &info->cst->el[i]); - - return info; -error: - sched_info_free(info); - return NULL; -} - -struct isl_compute_flow_data { - isl_union_map *must_source; - isl_union_map *may_source; - isl_union_map *must_dep; - isl_union_map *may_dep; - isl_union_map *must_no_source; - isl_union_map *may_no_source; - - int count; - int must; - isl_space *dim; - struct isl_sched_info *sink_info; - struct isl_sched_info **source_info; - isl_access_info *accesses; -}; - -static int count_matching_array(__isl_take isl_map *map, void *user) -{ - int eq; - isl_space *dim; - struct isl_compute_flow_data *data; - - data = (struct isl_compute_flow_data *)user; - - dim = isl_space_range(isl_map_get_space(map)); - - eq = isl_space_is_equal(dim, data->dim); - - isl_space_free(dim); - isl_map_free(map); - - if (eq < 0) - return -1; - if (eq) - data->count++; - - return 0; -} - -static int collect_matching_array(__isl_take isl_map *map, void *user) -{ - int eq; - isl_space *dim; - struct isl_sched_info *info; - struct isl_compute_flow_data *data; - - data = (struct isl_compute_flow_data *)user; - - dim = isl_space_range(isl_map_get_space(map)); - - eq = isl_space_is_equal(dim, data->dim); - - isl_space_free(dim); - - if (eq < 0) - goto error; - if (!eq) { - isl_map_free(map); - return 0; - } - - info = sched_info_alloc(map); - data->source_info[data->count] = info; - - data->accesses = isl_access_info_add_source(data->accesses, - map, data->must, info); - - data->count++; - - return 0; -error: - isl_map_free(map); - return -1; -} - -/* Determine the shared nesting level and the "textual order" of - * the given accesses. - * - * We first determine the minimal schedule dimension for both accesses. - * - * If among those dimensions, we can find one where both have a fixed - * value and if moreover those values are different, then the previous - * dimension is the last shared nesting level and the textual order - * is determined based on the order of the fixed values. - * If no such fixed values can be found, then we set the shared - * nesting level to the minimal schedule dimension, with no textual ordering. - */ -static int before(void *first, void *second) -{ - struct isl_sched_info *info1 = first; - struct isl_sched_info *info2 = second; - int n1, n2; - int i; - - n1 = info1->cst->size; - n2 = info2->cst->size; - - if (n2 < n1) - n1 = n2; - - for (i = 0; i < n1; ++i) { - if (!info1->is_cst[i]) - continue; - if (!info2->is_cst[i]) - continue; - if (isl_int_eq(info1->cst->el[i], info2->cst->el[i])) - continue; - return 2 * i + isl_int_lt(info1->cst->el[i], info2->cst->el[i]); - } - - return 2 * n1; -} - -/* Given a sink access, look for all the source accesses that access - * the same array and perform dataflow analysis on them using - * isl_access_info_compute_flow. - */ -static int compute_flow(__isl_take isl_map *map, void *user) -{ - int i; - isl_ctx *ctx; - struct isl_compute_flow_data *data; - isl_flow *flow; - - data = (struct isl_compute_flow_data *)user; - - ctx = isl_map_get_ctx(map); - - data->accesses = NULL; - data->sink_info = NULL; - data->source_info = NULL; - data->count = 0; - data->dim = isl_space_range(isl_map_get_space(map)); - - if (isl_union_map_foreach_map(data->must_source, - &count_matching_array, data) < 0) - goto error; - if (isl_union_map_foreach_map(data->may_source, - &count_matching_array, data) < 0) - goto error; - - data->sink_info = sched_info_alloc(map); - data->source_info = isl_calloc_array(ctx, struct isl_sched_info *, - data->count); - - data->accesses = isl_access_info_alloc(isl_map_copy(map), - data->sink_info, &before, data->count); - if (!data->sink_info || !data->source_info || !data->accesses) - goto error; - data->count = 0; - data->must = 1; - if (isl_union_map_foreach_map(data->must_source, - &collect_matching_array, data) < 0) - goto error; - data->must = 0; - if (isl_union_map_foreach_map(data->may_source, - &collect_matching_array, data) < 0) - goto error; - - flow = isl_access_info_compute_flow(data->accesses); - data->accesses = NULL; - - if (!flow) - goto error; - - data->must_no_source = isl_union_map_union(data->must_no_source, - isl_union_map_from_map(isl_flow_get_no_source(flow, 1))); - data->may_no_source = isl_union_map_union(data->may_no_source, - isl_union_map_from_map(isl_flow_get_no_source(flow, 0))); - - for (i = 0; i < flow->n_source; ++i) { - isl_union_map *dep; - dep = isl_union_map_from_map(isl_map_copy(flow->dep[i].map)); - if (flow->dep[i].must) - data->must_dep = isl_union_map_union(data->must_dep, dep); - else - data->may_dep = isl_union_map_union(data->may_dep, dep); - } - - isl_flow_free(flow); - - sched_info_free(data->sink_info); - if (data->source_info) { - for (i = 0; i < data->count; ++i) - sched_info_free(data->source_info[i]); - free(data->source_info); - } - isl_space_free(data->dim); - isl_map_free(map); - - return 0; -error: - isl_access_info_free(data->accesses); - sched_info_free(data->sink_info); - if (data->source_info) { - for (i = 0; i < data->count; ++i) - sched_info_free(data->source_info[i]); - free(data->source_info); - } - isl_space_free(data->dim); - isl_map_free(map); - - return -1; -} - -/* Given a collection of "sink" and "source" accesses, - * compute for each iteration of a sink access - * and for each element accessed by that iteration, - * the source access in the list that last accessed the - * element accessed by the sink access before this sink access. - * Each access is given as a map from the loop iterators - * to the array indices. - * The result is a relations between source and sink - * iterations and a subset of the domain of the sink accesses, - * corresponding to those iterations that access an element - * not previously accessed. - * - * We first prepend the schedule dimensions to the domain - * of the accesses so that we can easily compare their relative order. - * Then we consider each sink access individually in compute_flow. - */ -int isl_union_map_compute_flow(__isl_take isl_union_map *sink, - __isl_take isl_union_map *must_source, - __isl_take isl_union_map *may_source, - __isl_take isl_union_map *schedule, - __isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep, - __isl_give isl_union_map **must_no_source, - __isl_give isl_union_map **may_no_source) -{ - isl_space *dim; - isl_union_map *range_map = NULL; - struct isl_compute_flow_data data; - - sink = isl_union_map_align_params(sink, - isl_union_map_get_space(must_source)); - sink = isl_union_map_align_params(sink, - isl_union_map_get_space(may_source)); - sink = isl_union_map_align_params(sink, - isl_union_map_get_space(schedule)); - dim = isl_union_map_get_space(sink); - must_source = isl_union_map_align_params(must_source, isl_space_copy(dim)); - may_source = isl_union_map_align_params(may_source, isl_space_copy(dim)); - schedule = isl_union_map_align_params(schedule, isl_space_copy(dim)); - - schedule = isl_union_map_reverse(schedule); - range_map = isl_union_map_range_map(schedule); - schedule = isl_union_map_reverse(isl_union_map_copy(range_map)); - sink = isl_union_map_apply_domain(sink, isl_union_map_copy(schedule)); - must_source = isl_union_map_apply_domain(must_source, - isl_union_map_copy(schedule)); - may_source = isl_union_map_apply_domain(may_source, schedule); - - data.must_source = must_source; - data.may_source = may_source; - data.must_dep = must_dep ? - isl_union_map_empty(isl_space_copy(dim)) : NULL; - data.may_dep = may_dep ? isl_union_map_empty(isl_space_copy(dim)) : NULL; - data.must_no_source = must_no_source ? - isl_union_map_empty(isl_space_copy(dim)) : NULL; - data.may_no_source = may_no_source ? - isl_union_map_empty(isl_space_copy(dim)) : NULL; - - isl_space_free(dim); - - if (isl_union_map_foreach_map(sink, &compute_flow, &data) < 0) - goto error; - - isl_union_map_free(sink); - isl_union_map_free(must_source); - isl_union_map_free(may_source); - - if (must_dep) { - data.must_dep = isl_union_map_apply_domain(data.must_dep, - isl_union_map_copy(range_map)); - data.must_dep = isl_union_map_apply_range(data.must_dep, - isl_union_map_copy(range_map)); - *must_dep = data.must_dep; - } - if (may_dep) { - data.may_dep = isl_union_map_apply_domain(data.may_dep, - isl_union_map_copy(range_map)); - data.may_dep = isl_union_map_apply_range(data.may_dep, - isl_union_map_copy(range_map)); - *may_dep = data.may_dep; - } - if (must_no_source) { - data.must_no_source = isl_union_map_apply_domain( - data.must_no_source, isl_union_map_copy(range_map)); - *must_no_source = data.must_no_source; - } - if (may_no_source) { - data.may_no_source = isl_union_map_apply_domain( - data.may_no_source, isl_union_map_copy(range_map)); - *may_no_source = data.may_no_source; - } - - isl_union_map_free(range_map); - - return 0; -error: - isl_union_map_free(range_map); - isl_union_map_free(sink); - isl_union_map_free(must_source); - isl_union_map_free(may_source); - isl_union_map_free(data.must_dep); - isl_union_map_free(data.may_dep); - isl_union_map_free(data.must_no_source); - isl_union_map_free(data.may_no_source); - - if (must_dep) - *must_dep = NULL; - if (may_dep) - *may_dep = NULL; - if (must_no_source) - *must_no_source = NULL; - if (may_no_source) - *may_no_source = NULL; - return -1; -} diff --git a/cloog-0.17.0/isl/isl_fold.c b/cloog-0.17.0/isl/isl_fold.c deleted file mode 100644 index b96c096577023c9610938179ad62ceaef3cf1895..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_fold.c +++ /dev/null @@ -1,1629 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#define ISL_DIM_H -#include -#include -#include -#include -#include -#include -#include -#include -#include - -enum isl_fold isl_fold_type_negate(enum isl_fold type) -{ - switch (type) { - case isl_fold_min: - return isl_fold_max; - case isl_fold_max: - return isl_fold_min; - case isl_fold_list: - return isl_fold_list; - } - - isl_die(NULL, isl_error_internal, "unhandled isl_fold type", abort()); -} - -static __isl_give isl_qpolynomial_fold *qpolynomial_fold_alloc( - enum isl_fold type, __isl_take isl_space *dim, int n) -{ - isl_qpolynomial_fold *fold; - - if (!dim) - goto error; - - isl_assert(dim->ctx, n >= 0, goto error); - fold = isl_calloc(dim->ctx, struct isl_qpolynomial_fold, - sizeof(struct isl_qpolynomial_fold) + - (n - 1) * sizeof(struct isl_qpolynomial *)); - if (!fold) - goto error; - - fold->ref = 1; - fold->size = n; - fold->n = 0; - fold->type = type; - fold->dim = dim; - - return fold; -error: - isl_space_free(dim); - return NULL; -} - -isl_ctx *isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold *fold) -{ - return fold ? fold->dim->ctx : NULL; -} - -__isl_give isl_space *isl_qpolynomial_fold_get_domain_space( - __isl_keep isl_qpolynomial_fold *fold) -{ - return fold ? isl_space_copy(fold->dim) : NULL; -} - -__isl_give isl_space *isl_qpolynomial_fold_get_space( - __isl_keep isl_qpolynomial_fold *fold) -{ - isl_space *space; - if (!fold) - return NULL; - space = isl_space_copy(fold->dim); - space = isl_space_from_domain(space); - space = isl_space_add_dims(space, isl_dim_out, 1); - return space; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_reset_domain_space( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_space *dim) -{ - int i; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold || !dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_reset_domain_space(fold->qp[i], - isl_space_copy(dim)); - if (!fold->qp[i]) - goto error; - } - - isl_space_free(fold->dim); - fold->dim = dim; - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_space_free(dim); - return NULL; -} - -/* Reset the space of "fold". This function is called from isl_pw_templ.c - * and doesn't know if the space of an element object is represented - * directly or through its domain. It therefore passes along both. - */ -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_reset_space_and_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_space *space, - __isl_take isl_space *domain) -{ - isl_space_free(space); - return isl_qpolynomial_fold_reset_domain_space(fold, domain); -} - -int isl_qpolynomial_fold_involves_dims(__isl_keep isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!fold) - return -1; - if (fold->n == 0 || n == 0) - return 0; - - for (i = 0; i < fold->n; ++i) { - int involves = isl_qpolynomial_involves_dims(fold->qp[i], - type, first, n); - if (involves < 0 || involves) - return involves; - } - return 0; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_set_dim_name( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - fold->dim = isl_space_set_dim_name(fold->dim, type, pos, s); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_set_dim_name(fold->qp[i], - type, pos, s); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_drop_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - enum isl_dim_type set_type; - - if (!fold) - return NULL; - if (n == 0) - return fold; - - set_type = type == isl_dim_in ? isl_dim_set : type; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - fold->dim = isl_space_drop_dims(fold->dim, set_type, first, n); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_drop_dims(fold->qp[i], - type, first, n); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_insert_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!fold) - return NULL; - if (n == 0 && !isl_space_is_named_or_nested(fold->dim, type)) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - fold->dim = isl_space_insert_dims(fold->dim, type, first, n); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_insert_dims(fold->qp[i], - type, first, n); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -static int isl_qpolynomial_cst_sign(__isl_keep isl_qpolynomial *qp) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_as_cst(qp->upoly); - if (!cst) - return 0; - - return isl_int_sgn(cst->n) < 0 ? -1 : 1; -} - -static int isl_qpolynomial_aff_sign(__isl_keep isl_set *set, - __isl_keep isl_qpolynomial *qp) -{ - enum isl_lp_result res; - isl_vec *aff; - isl_int opt; - int sgn = 0; - - aff = isl_qpolynomial_extract_affine(qp); - if (!aff) - return 0; - - isl_int_init(opt); - - res = isl_set_solve_lp(set, 0, aff->el + 1, aff->el[0], - &opt, NULL, NULL); - if (res == isl_lp_error) - goto done; - if (res == isl_lp_empty || - (res == isl_lp_ok && !isl_int_is_neg(opt))) { - sgn = 1; - goto done; - } - - res = isl_set_solve_lp(set, 1, aff->el + 1, aff->el[0], - &opt, NULL, NULL); - if (res == isl_lp_ok && !isl_int_is_pos(opt)) - sgn = -1; - -done: - isl_int_clear(opt); - isl_vec_free(aff); - return sgn; -} - -/* Determine, if possible, the sign of the quasipolynomial "qp" on - * the domain "set". - * - * If qp is a constant, then the problem is trivial. - * If qp is linear, then we check if the minimum of the corresponding - * affine constraint is non-negative or if the maximum is non-positive. - * - * Otherwise, we check if the outermost variable "v" has a lower bound "l" - * in "set". If so, we write qp(v,v') as - * - * q(v,v') * (v - l) + r(v') - * - * if q(v,v') and r(v') have the same known sign, then the original - * quasipolynomial has the same sign as well. - * - * Return - * -1 if qp <= 0 - * 1 if qp >= 0 - * 0 if unknown - */ -static int isl_qpolynomial_sign(__isl_keep isl_set *set, - __isl_keep isl_qpolynomial *qp) -{ - int d; - int i; - int is; - struct isl_upoly_rec *rec; - isl_vec *v; - isl_int l; - enum isl_lp_result res; - int sgn = 0; - - is = isl_qpolynomial_is_cst(qp, NULL, NULL); - if (is < 0) - return 0; - if (is) - return isl_qpolynomial_cst_sign(qp); - - is = isl_qpolynomial_is_affine(qp); - if (is < 0) - return 0; - if (is) - return isl_qpolynomial_aff_sign(set, qp); - - if (qp->div->n_row > 0) - return 0; - - rec = isl_upoly_as_rec(qp->upoly); - if (!rec) - return 0; - - d = isl_space_dim(qp->dim, isl_dim_all); - v = isl_vec_alloc(set->ctx, 2 + d); - if (!v) - return 0; - - isl_seq_clr(v->el + 1, 1 + d); - isl_int_set_si(v->el[0], 1); - isl_int_set_si(v->el[2 + qp->upoly->var], 1); - - isl_int_init(l); - - res = isl_set_solve_lp(set, 0, v->el + 1, v->el[0], &l, NULL, NULL); - if (res == isl_lp_ok) { - isl_qpolynomial *min; - isl_qpolynomial *base; - isl_qpolynomial *r, *q; - isl_qpolynomial *t; - - min = isl_qpolynomial_cst_on_domain(isl_space_copy(qp->dim), l); - base = isl_qpolynomial_var_pow_on_domain(isl_space_copy(qp->dim), - qp->upoly->var, 1); - - r = isl_qpolynomial_alloc(isl_space_copy(qp->dim), 0, - isl_upoly_copy(rec->p[rec->n - 1])); - q = isl_qpolynomial_copy(r); - - for (i = rec->n - 2; i >= 0; --i) { - r = isl_qpolynomial_mul(r, isl_qpolynomial_copy(min)); - t = isl_qpolynomial_alloc(isl_space_copy(qp->dim), 0, - isl_upoly_copy(rec->p[i])); - r = isl_qpolynomial_add(r, t); - if (i == 0) - break; - q = isl_qpolynomial_mul(q, isl_qpolynomial_copy(base)); - q = isl_qpolynomial_add(q, isl_qpolynomial_copy(r)); - } - - if (isl_qpolynomial_is_zero(q)) - sgn = isl_qpolynomial_sign(set, r); - else if (isl_qpolynomial_is_zero(r)) - sgn = isl_qpolynomial_sign(set, q); - else { - int sgn_q, sgn_r; - sgn_r = isl_qpolynomial_sign(set, r); - sgn_q = isl_qpolynomial_sign(set, q); - if (sgn_r == sgn_q) - sgn = sgn_r; - } - - isl_qpolynomial_free(min); - isl_qpolynomial_free(base); - isl_qpolynomial_free(q); - isl_qpolynomial_free(r); - } - - isl_int_clear(l); - - isl_vec_free(v); - - return sgn; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold_on_domain( - __isl_keep isl_set *set, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2) -{ - int i, j; - int n1; - struct isl_qpolynomial_fold *res = NULL; - int better; - - if (!fold1 || !fold2) - goto error; - - isl_assert(fold1->dim->ctx, fold1->type == fold2->type, goto error); - isl_assert(fold1->dim->ctx, isl_space_is_equal(fold1->dim, fold2->dim), - goto error); - - better = fold1->type == isl_fold_max ? -1 : 1; - - if (isl_qpolynomial_fold_is_empty(fold1)) { - isl_qpolynomial_fold_free(fold1); - return fold2; - } - - if (isl_qpolynomial_fold_is_empty(fold2)) { - isl_qpolynomial_fold_free(fold2); - return fold1; - } - - res = qpolynomial_fold_alloc(fold1->type, isl_space_copy(fold1->dim), - fold1->n + fold2->n); - if (!res) - goto error; - - for (i = 0; i < fold1->n; ++i) { - res->qp[res->n] = isl_qpolynomial_copy(fold1->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - n1 = res->n; - - for (i = 0; i < fold2->n; ++i) { - for (j = n1 - 1; j >= 0; --j) { - isl_qpolynomial *d; - int sgn; - d = isl_qpolynomial_sub( - isl_qpolynomial_copy(res->qp[j]), - isl_qpolynomial_copy(fold2->qp[i])); - sgn = isl_qpolynomial_sign(set, d); - isl_qpolynomial_free(d); - if (sgn == 0) - continue; - if (sgn != better) - break; - isl_qpolynomial_free(res->qp[j]); - if (j != n1 - 1) - res->qp[j] = res->qp[n1 - 1]; - n1--; - if (n1 != res->n - 1) - res->qp[n1] = res->qp[res->n - 1]; - res->n--; - } - if (j >= 0) - continue; - res->qp[res->n] = isl_qpolynomial_copy(fold2->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - - return res; -error: - isl_qpolynomial_fold_free(res); - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_add_qpolynomial( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_qpolynomial *qp) -{ - int i; - - if (!fold || !qp) - goto error; - - if (isl_qpolynomial_is_zero(qp)) { - isl_qpolynomial_free(qp); - return fold; - } - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_add(fold->qp[i], - isl_qpolynomial_copy(qp)); - if (!fold->qp[i]) - goto error; - } - - isl_qpolynomial_free(qp); - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_add_on_domain( - __isl_keep isl_set *dom, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2) -{ - int i; - isl_qpolynomial_fold *res = NULL; - - if (!fold1 || !fold2) - goto error; - - if (isl_qpolynomial_fold_is_empty(fold1)) { - isl_qpolynomial_fold_free(fold1); - return fold2; - } - - if (isl_qpolynomial_fold_is_empty(fold2)) { - isl_qpolynomial_fold_free(fold2); - return fold1; - } - - if (fold1->n == 1 && fold2->n != 1) - return isl_qpolynomial_fold_add_on_domain(dom, fold2, fold1); - - if (fold2->n == 1) { - res = isl_qpolynomial_fold_add_qpolynomial(fold1, - isl_qpolynomial_copy(fold2->qp[0])); - isl_qpolynomial_fold_free(fold2); - return res; - } - - res = isl_qpolynomial_fold_add_qpolynomial( - isl_qpolynomial_fold_copy(fold1), - isl_qpolynomial_copy(fold2->qp[0])); - - for (i = 1; i < fold2->n; ++i) { - isl_qpolynomial_fold *res_i; - res_i = isl_qpolynomial_fold_add_qpolynomial( - isl_qpolynomial_fold_copy(fold1), - isl_qpolynomial_copy(fold2->qp[i])); - res = isl_qpolynomial_fold_fold_on_domain(dom, res, res_i); - } - - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return res; -error: - isl_qpolynomial_fold_free(res); - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute_equalities( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_basic_set *eq) -{ - int i; - - if (!fold || !eq) - goto error; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_substitute_equalities(fold->qp[i], - isl_basic_set_copy(eq)); - if (!fold->qp[i]) - goto error; - } - - isl_basic_set_free(eq); - return fold; -error: - isl_basic_set_free(eq); - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context) -{ - int i; - - if (!fold || !context) - goto error; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_gist(fold->qp[i], - isl_set_copy(context)); - if (!fold->qp[i]) - goto error; - } - - isl_set_free(context); - return fold; -error: - isl_set_free(context); - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context) -{ - isl_space *space = isl_qpolynomial_fold_get_domain_space(fold); - isl_set *dom_context = isl_set_universe(space); - dom_context = isl_set_intersect_params(dom_context, context); - return isl_qpolynomial_fold_gist(fold, dom_context); -} - -#define HAS_TYPE - -#undef PW -#define PW isl_pw_qpolynomial_fold -#undef EL -#define EL isl_qpolynomial_fold -#undef EL_IS_ZERO -#define EL_IS_ZERO is_empty -#undef ZERO -#define ZERO zero -#undef IS_ZERO -#define IS_ZERO is_zero -#undef FIELD -#define FIELD fold -#undef DEFAULT_IS_ZERO -#define DEFAULT_IS_ZERO 1 - -#define NO_NEG - -#include - -#undef UNION -#define UNION isl_union_pw_qpolynomial_fold -#undef PART -#define PART isl_pw_qpolynomial_fold -#undef PARTS -#define PARTS pw_qpolynomial_fold -#define ALIGN_DOMAIN - -#include - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type, - __isl_take isl_space *dim) -{ - return qpolynomial_fold_alloc(type, dim, 0); -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_alloc( - enum isl_fold type, __isl_take isl_qpolynomial *qp) -{ - isl_qpolynomial_fold *fold; - - if (!qp) - return NULL; - - fold = qpolynomial_fold_alloc(type, isl_space_copy(qp->dim), 1); - if (!fold) - goto error; - - fold->qp[0] = qp; - fold->n++; - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( - __isl_keep isl_qpolynomial_fold *fold) -{ - if (!fold) - return NULL; - - fold->ref++; - return fold; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_dup( - __isl_keep isl_qpolynomial_fold *fold) -{ - int i; - isl_qpolynomial_fold *dup; - - if (!fold) - return NULL; - dup = qpolynomial_fold_alloc(fold->type, - isl_space_copy(fold->dim), fold->n); - if (!dup) - return NULL; - - dup->n = fold->n; - for (i = 0; i < fold->n; ++i) { - dup->qp[i] = isl_qpolynomial_copy(fold->qp[i]); - if (!dup->qp[i]) - goto error; - } - - return dup; -error: - isl_qpolynomial_fold_free(dup); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_cow( - __isl_take isl_qpolynomial_fold *fold) -{ - if (!fold) - return NULL; - - if (fold->ref == 1) - return fold; - fold->ref--; - return isl_qpolynomial_fold_dup(fold); -} - -void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold *fold) -{ - int i; - - if (!fold) - return; - if (--fold->ref > 0) - return; - - for (i = 0; i < fold->n; ++i) - isl_qpolynomial_free(fold->qp[i]); - isl_space_free(fold->dim); - free(fold); -} - -int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold) -{ - if (!fold) - return -1; - - return fold->n == 0; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold( - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2) -{ - int i; - struct isl_qpolynomial_fold *res = NULL; - - if (!fold1 || !fold2) - goto error; - - isl_assert(fold1->dim->ctx, fold1->type == fold2->type, goto error); - isl_assert(fold1->dim->ctx, isl_space_is_equal(fold1->dim, fold2->dim), - goto error); - - if (isl_qpolynomial_fold_is_empty(fold1)) { - isl_qpolynomial_fold_free(fold1); - return fold2; - } - - if (isl_qpolynomial_fold_is_empty(fold2)) { - isl_qpolynomial_fold_free(fold2); - return fold1; - } - - res = qpolynomial_fold_alloc(fold1->type, isl_space_copy(fold1->dim), - fold1->n + fold2->n); - if (!res) - goto error; - - for (i = 0; i < fold1->n; ++i) { - res->qp[res->n] = isl_qpolynomial_copy(fold1->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - - for (i = 0; i < fold2->n; ++i) { - res->qp[res->n] = isl_qpolynomial_copy(fold2->qp[i]); - if (!res->qp[res->n]) - goto error; - res->n++; - } - - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - - return res; -error: - isl_qpolynomial_fold_free(res); - isl_qpolynomial_fold_free(fold1); - isl_qpolynomial_fold_free(fold2); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( - __isl_take isl_pw_qpolynomial_fold *pw1, - __isl_take isl_pw_qpolynomial_fold *pw2) -{ - int i, j, n; - struct isl_pw_qpolynomial_fold *res; - isl_set *set; - - if (!pw1 || !pw2) - goto error; - - isl_assert(pw1->dim->ctx, isl_space_is_equal(pw1->dim, pw2->dim), goto error); - - if (isl_pw_qpolynomial_fold_is_zero(pw1)) { - isl_pw_qpolynomial_fold_free(pw1); - return pw2; - } - - if (isl_pw_qpolynomial_fold_is_zero(pw2)) { - isl_pw_qpolynomial_fold_free(pw2); - return pw1; - } - - if (pw1->type != pw2->type) - isl_die(pw1->dim->ctx, isl_error_invalid, - "fold types don't match", goto error); - - n = (pw1->n + 1) * (pw2->n + 1); - res = isl_pw_qpolynomial_fold_alloc_size(isl_space_copy(pw1->dim), - pw1->type, n); - - for (i = 0; i < pw1->n; ++i) { - set = isl_set_copy(pw1->p[i].set); - for (j = 0; j < pw2->n; ++j) { - struct isl_set *common; - isl_qpolynomial_fold *sum; - set = isl_set_subtract(set, - isl_set_copy(pw2->p[j].set)); - common = isl_set_intersect(isl_set_copy(pw1->p[i].set), - isl_set_copy(pw2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - sum = isl_qpolynomial_fold_fold_on_domain(common, - isl_qpolynomial_fold_copy(pw1->p[i].fold), - isl_qpolynomial_fold_copy(pw2->p[j].fold)); - - res = isl_pw_qpolynomial_fold_add_piece(res, common, sum); - } - res = isl_pw_qpolynomial_fold_add_piece(res, set, - isl_qpolynomial_fold_copy(pw1->p[i].fold)); - } - - for (j = 0; j < pw2->n; ++j) { - set = isl_set_copy(pw2->p[j].set); - for (i = 0; i < pw1->n; ++i) - set = isl_set_subtract(set, isl_set_copy(pw1->p[i].set)); - res = isl_pw_qpolynomial_fold_add_piece(res, set, - isl_qpolynomial_fold_copy(pw2->p[j].fold)); - } - - isl_pw_qpolynomial_fold_free(pw1); - isl_pw_qpolynomial_fold_free(pw2); - - return res; -error: - isl_pw_qpolynomial_fold_free(pw1); - isl_pw_qpolynomial_fold_free(pw2); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - __isl_take isl_union_pw_qpolynomial_fold *u, - __isl_take isl_pw_qpolynomial_fold *part) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - u = isl_union_pw_qpolynomial_fold_cow(u); - - if (!part || !u) - goto error; - - isl_assert(u->dim->ctx, isl_space_match(part->dim, isl_dim_param, u->dim, - isl_dim_param), goto error); - - hash = isl_space_get_hash(part->dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, hash, - &has_dim, part->dim, 1); - if (!entry) - goto error; - - if (!entry->data) - entry->data = part; - else { - entry->data = isl_pw_qpolynomial_fold_fold(entry->data, - isl_pw_qpolynomial_fold_copy(part)); - if (!entry->data) - goto error; - isl_pw_qpolynomial_fold_free(part); - } - - return u; -error: - isl_pw_qpolynomial_fold_free(part); - isl_union_pw_qpolynomial_fold_free(u); - return NULL; -} - -static int fold_part(__isl_take isl_pw_qpolynomial_fold *part, void *user) -{ - isl_union_pw_qpolynomial_fold **u; - u = (isl_union_pw_qpolynomial_fold **)user; - - *u = isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold(*u, part); - - return 0; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( - __isl_take isl_union_pw_qpolynomial_fold *u1, - __isl_take isl_union_pw_qpolynomial_fold *u2) -{ - u1 = isl_union_pw_qpolynomial_fold_cow(u1); - - if (!u1 || !u2) - goto error; - - if (isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(u2, - &fold_part, &u1) < 0) - goto error; - - isl_union_pw_qpolynomial_fold_free(u2); - - return u1; -error: - isl_union_pw_qpolynomial_fold_free(u1); - isl_union_pw_qpolynomial_fold_free(u2); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial( - enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp) -{ - int i; - isl_pw_qpolynomial_fold *pwf; - - if (!pwqp) - return NULL; - - pwf = isl_pw_qpolynomial_fold_alloc_size(isl_space_copy(pwqp->dim), - type, pwqp->n); - - for (i = 0; i < pwqp->n; ++i) - pwf = isl_pw_qpolynomial_fold_add_piece(pwf, - isl_set_copy(pwqp->p[i].set), - isl_qpolynomial_fold_alloc(type, - isl_qpolynomial_copy(pwqp->p[i].qp))); - - isl_pw_qpolynomial_free(pwqp); - - return pwf; -} - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( - __isl_take isl_pw_qpolynomial_fold *pwf1, - __isl_take isl_pw_qpolynomial_fold *pwf2) -{ - return isl_pw_qpolynomial_fold_union_add_(pwf1, pwf2); -} - -int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1, - __isl_keep isl_qpolynomial_fold *fold2) -{ - int i; - - if (!fold1 || !fold2) - return -1; - - if (fold1->n != fold2->n) - return 0; - - /* We probably want to sort the qps first... */ - for (i = 0; i < fold1->n; ++i) { - int eq = isl_qpolynomial_plain_is_equal(fold1->qp[i], fold2->qp[i]); - if (eq < 0 || !eq) - return eq; - } - - return 1; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_eval( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt) -{ - isl_qpolynomial *qp; - - if (!fold || !pnt) - goto error; - isl_assert(pnt->dim->ctx, isl_space_is_equal(pnt->dim, fold->dim), goto error); - isl_assert(pnt->dim->ctx, - fold->type == isl_fold_max || fold->type == isl_fold_min, - goto error); - - if (fold->n == 0) - qp = isl_qpolynomial_zero_on_domain(isl_space_copy(fold->dim)); - else { - int i; - qp = isl_qpolynomial_eval(isl_qpolynomial_copy(fold->qp[0]), - isl_point_copy(pnt)); - for (i = 1; i < fold->n; ++i) { - isl_qpolynomial *qp_i; - qp_i = isl_qpolynomial_eval( - isl_qpolynomial_copy(fold->qp[i]), - isl_point_copy(pnt)); - if (fold->type == isl_fold_max) - qp = isl_qpolynomial_max_cst(qp, qp_i); - else - qp = isl_qpolynomial_min_cst(qp, qp_i); - } - } - isl_qpolynomial_fold_free(fold); - isl_point_free(pnt); - - return qp; -error: - isl_qpolynomial_fold_free(fold); - isl_point_free(pnt); - return NULL; -} - -size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf) -{ - int i; - size_t n = 0; - - for (i = 0; i < pwf->n; ++i) - n += pwf->p[i].fold->n; - - return n; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_opt_on_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *set, int max) -{ - int i; - isl_qpolynomial *opt; - - if (!set || !fold) - goto error; - - if (fold->n == 0) { - isl_space *dim = isl_space_copy(fold->dim); - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - return isl_qpolynomial_zero_on_domain(dim); - } - - opt = isl_qpolynomial_opt_on_domain(isl_qpolynomial_copy(fold->qp[0]), - isl_set_copy(set), max); - for (i = 1; i < fold->n; ++i) { - isl_qpolynomial *opt_i; - opt_i = isl_qpolynomial_opt_on_domain( - isl_qpolynomial_copy(fold->qp[i]), - isl_set_copy(set), max); - if (max) - opt = isl_qpolynomial_max_cst(opt, opt_i); - else - opt = isl_qpolynomial_min_cst(opt, opt_i); - } - - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - - return opt; -error: - isl_set_free(set); - isl_qpolynomial_fold_free(fold); - return NULL; -} - -/* Check whether for each quasi-polynomial in "fold2" there is - * a quasi-polynomial in "fold1" that dominates it on "set". - */ -static int qpolynomial_fold_covers_on_domain(__isl_keep isl_set *set, - __isl_keep isl_qpolynomial_fold *fold1, - __isl_keep isl_qpolynomial_fold *fold2) -{ - int i, j; - int covers; - - if (!set || !fold1 || !fold2) - return -1; - - covers = fold1->type == isl_fold_max ? 1 : -1; - - for (i = 0; i < fold2->n; ++i) { - for (j = 0; j < fold1->n; ++j) { - isl_qpolynomial *d; - int sgn; - - d = isl_qpolynomial_sub( - isl_qpolynomial_copy(fold1->qp[j]), - isl_qpolynomial_copy(fold2->qp[i])); - sgn = isl_qpolynomial_sign(set, d); - isl_qpolynomial_free(d); - if (sgn == covers) - break; - } - if (j >= fold1->n) - return 0; - } - - return 1; -} - -/* Check whether "pwf1" dominated "pwf2", i.e., the domain of "pwf1" contains - * that of "pwf2" and on each cell, the corresponding fold from pwf1 dominates - * that of pwf2. - */ -int isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2) -{ - int i, j; - isl_set *dom1, *dom2; - int is_subset; - - if (!pwf1 || !pwf2) - return -1; - - if (pwf2->n == 0) - return 1; - if (pwf1->n == 0) - return 0; - - dom1 = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf1)); - dom2 = isl_pw_qpolynomial_fold_domain(isl_pw_qpolynomial_fold_copy(pwf2)); - is_subset = isl_set_is_subset(dom2, dom1); - isl_set_free(dom1); - isl_set_free(dom2); - - if (is_subset < 0 || !is_subset) - return is_subset; - - for (i = 0; i < pwf2->n; ++i) { - for (j = 0; j < pwf1->n; ++j) { - int is_empty; - isl_set *common; - int covers; - - common = isl_set_intersect(isl_set_copy(pwf1->p[j].set), - isl_set_copy(pwf2->p[i].set)); - is_empty = isl_set_is_empty(common); - if (is_empty < 0 || is_empty) { - isl_set_free(common); - if (is_empty < 0) - return -1; - continue; - } - covers = qpolynomial_fold_covers_on_domain(common, - pwf1->p[j].fold, pwf2->p[i].fold); - isl_set_free(common); - if (covers < 0 || !covers) - return covers; - } - } - - return 1; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_morph_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_morph *morph) -{ - int i; - isl_ctx *ctx; - - if (!fold || !morph) - goto error; - - ctx = fold->dim->ctx; - isl_assert(ctx, isl_space_is_equal(fold->dim, morph->dom->dim), goto error); - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - goto error; - - isl_space_free(fold->dim); - fold->dim = isl_space_copy(morph->ran->dim); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_morph_domain(fold->qp[i], - isl_morph_copy(morph)); - if (!fold->qp[i]) - goto error; - } - - isl_morph_free(morph); - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_morph_free(morph); - return NULL; -} - -enum isl_fold isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold *fold) -{ - if (!fold) - return isl_fold_list; - return fold->type; -} - -enum isl_fold isl_union_pw_qpolynomial_fold_get_type( - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - if (!upwf) - return isl_fold_list; - return upwf->type; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_lift( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_space *dim) -{ - int i; - - if (!fold || !dim) - goto error; - - if (isl_space_is_equal(fold->dim, dim)) { - isl_space_free(dim); - return fold; - } - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - goto error; - - isl_space_free(fold->dim); - fold->dim = isl_space_copy(dim); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_lift(fold->qp[i], - isl_space_copy(dim)); - if (!fold->qp[i]) - goto error; - } - - isl_space_free(dim); - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_space_free(dim); - return NULL; -} - -int isl_qpolynomial_fold_foreach_qpolynomial( - __isl_keep isl_qpolynomial_fold *fold, - int (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user) -{ - int i; - - if (!fold) - return -1; - - for (i = 0; i < fold->n; ++i) - if (fn(isl_qpolynomial_copy(fold->qp[i]), user) < 0) - return -1; - - return 0; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - if (n == 0) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - fold->dim = isl_space_move_dims(fold->dim, dst_type, dst_pos, - src_type, src_pos, n); - if (!fold->dim) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_move_dims(fold->qp[i], - dst_type, dst_pos, src_type, src_pos, n); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -/* For each 0 <= i < "n", replace variable "first" + i of type "type" - * in fold->qp[k] by subs[i]. - */ -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute( - __isl_take isl_qpolynomial_fold *fold, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs) -{ - int i; - - if (n == 0) - return fold; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_substitute(fold->qp[i], - type, first, n, subs); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -static int add_pwqp(__isl_take isl_pw_qpolynomial *pwqp, void *user) -{ - isl_ctx *ctx; - isl_pw_qpolynomial_fold *pwf; - isl_union_pw_qpolynomial_fold **upwf; - uint32_t hash; - struct isl_hash_table_entry *entry; - - upwf = (isl_union_pw_qpolynomial_fold **)user; - - ctx = pwqp->dim->ctx; - hash = isl_space_get_hash(pwqp->dim); - entry = isl_hash_table_find(ctx, &(*upwf)->table, - hash, &has_dim, pwqp->dim, 1); - if (!entry) - goto error; - - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial((*upwf)->type, pwqp); - if (!entry->data) - entry->data = pwf; - else { - entry->data = isl_pw_qpolynomial_fold_add(entry->data, pwf); - if (!entry->data) - return -1; - if (isl_pw_qpolynomial_fold_is_zero(entry->data)) { - isl_pw_qpolynomial_fold_free(entry->data); - isl_hash_table_remove(ctx, &(*upwf)->table, entry); - } - } - - return 0; -error: - isl_pw_qpolynomial_free(pwqp); - return -1; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial( - __isl_take isl_union_pw_qpolynomial_fold *upwf, - __isl_take isl_union_pw_qpolynomial *upwqp) -{ - upwf = isl_union_pw_qpolynomial_fold_align_params(upwf, - isl_union_pw_qpolynomial_get_space(upwqp)); - upwqp = isl_union_pw_qpolynomial_align_params(upwqp, - isl_union_pw_qpolynomial_fold_get_space(upwf)); - - upwf = isl_union_pw_qpolynomial_fold_cow(upwf); - if (!upwf || !upwqp) - goto error; - - if (isl_union_pw_qpolynomial_foreach_pw_qpolynomial(upwqp, &add_pwqp, - &upwf) < 0) - goto error; - - isl_union_pw_qpolynomial_free(upwqp); - - return upwf; -error: - isl_union_pw_qpolynomial_fold_free(upwf); - isl_union_pw_qpolynomial_free(upwqp); - return NULL; -} - -static int join_compatible(__isl_keep isl_space *dim1, __isl_keep isl_space *dim2) -{ - int m; - m = isl_space_match(dim1, isl_dim_param, dim2, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_space_tuple_match(dim1, isl_dim_out, dim2, isl_dim_in); -} - -/* Compute the intersection of the range of the map and the domain - * of the piecewise quasipolynomial reduction and then compute a bound - * on the associated quasipolynomial reduction over all elements - * in this intersection. - * - * We first introduce some unconstrained dimensions in the - * piecewise quasipolynomial, intersect the resulting domain - * with the wrapped map and the compute the sum. - */ -__isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold( - __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight) -{ - isl_ctx *ctx; - isl_set *dom; - isl_space *map_dim; - isl_space *pwf_dim; - unsigned n_in; - int ok; - - ctx = isl_map_get_ctx(map); - if (!ctx) - goto error; - - map_dim = isl_map_get_space(map); - pwf_dim = isl_pw_qpolynomial_fold_get_space(pwf); - ok = join_compatible(map_dim, pwf_dim); - isl_space_free(map_dim); - isl_space_free(pwf_dim); - if (!ok) - isl_die(ctx, isl_error_invalid, "incompatible dimensions", - goto error); - - n_in = isl_map_dim(map, isl_dim_in); - pwf = isl_pw_qpolynomial_fold_insert_dims(pwf, isl_dim_in, 0, n_in); - - dom = isl_map_wrap(map); - pwf = isl_pw_qpolynomial_fold_reset_domain_space(pwf, - isl_set_get_space(dom)); - - pwf = isl_pw_qpolynomial_fold_intersect_domain(pwf, dom); - pwf = isl_pw_qpolynomial_fold_bound(pwf, tight); - - return pwf; -error: - isl_map_free(map); - isl_pw_qpolynomial_fold_free(pwf); - return NULL; -} - -__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold( - __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf, - int *tight) -{ - return isl_map_apply_pw_qpolynomial_fold(set, pwf, tight); -} - -struct isl_apply_fold_data { - isl_union_pw_qpolynomial_fold *upwf; - isl_union_pw_qpolynomial_fold *res; - isl_map *map; - int tight; -}; - -static int pw_qpolynomial_fold_apply(__isl_take isl_pw_qpolynomial_fold *pwf, - void *user) -{ - isl_space *map_dim; - isl_space *pwf_dim; - struct isl_apply_fold_data *data = user; - int ok; - - map_dim = isl_map_get_space(data->map); - pwf_dim = isl_pw_qpolynomial_fold_get_space(pwf); - ok = join_compatible(map_dim, pwf_dim); - isl_space_free(map_dim); - isl_space_free(pwf_dim); - - if (ok) { - pwf = isl_map_apply_pw_qpolynomial_fold(isl_map_copy(data->map), - pwf, data->tight ? &data->tight : NULL); - data->res = isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( - data->res, pwf); - } else - isl_pw_qpolynomial_fold_free(pwf); - - return 0; -} - -static int map_apply(__isl_take isl_map *map, void *user) -{ - struct isl_apply_fold_data *data = user; - int r; - - data->map = map; - r = isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( - data->upwf, &pw_qpolynomial_fold_apply, data); - - isl_map_free(map); - return r; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_map *umap, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight) -{ - isl_space *dim; - enum isl_fold type; - struct isl_apply_fold_data data; - - upwf = isl_union_pw_qpolynomial_fold_align_params(upwf, - isl_union_map_get_space(umap)); - umap = isl_union_map_align_params(umap, - isl_union_pw_qpolynomial_fold_get_space(upwf)); - - data.upwf = upwf; - data.tight = tight ? 1 : 0; - dim = isl_union_pw_qpolynomial_fold_get_space(upwf); - type = isl_union_pw_qpolynomial_fold_get_type(upwf); - data.res = isl_union_pw_qpolynomial_fold_zero(dim, type); - if (isl_union_map_foreach_map(umap, &map_apply, &data) < 0) - goto error; - - isl_union_map_free(umap); - isl_union_pw_qpolynomial_fold_free(upwf); - - if (tight) - *tight = data.tight; - - return data.res; -error: - isl_union_map_free(umap); - isl_union_pw_qpolynomial_fold_free(upwf); - isl_union_pw_qpolynomial_fold_free(data.res); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold( - __isl_take isl_union_set *uset, - __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight) -{ - return isl_union_map_apply_union_pw_qpolynomial_fold(uset, upwf, tight); -} - -/* Reorder the dimension of "fold" according to the given reordering. - */ -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_realign_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_reordering *r) -{ - int i; - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold || !r) - goto error; - - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_realign_domain(fold->qp[i], - isl_reordering_copy(r)); - if (!fold->qp[i]) - goto error; - } - - fold = isl_qpolynomial_fold_reset_domain_space(fold, - isl_space_copy(r->dim)); - - isl_reordering_free(r); - - return fold; -error: - isl_qpolynomial_fold_free(fold); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_mul_isl_int( - __isl_take isl_qpolynomial_fold *fold, isl_int v) -{ - int i; - - if (isl_int_is_one(v)) - return fold; - if (fold && isl_int_is_zero(v)) { - isl_qpolynomial_fold *zero; - isl_space *dim = isl_space_copy(fold->dim); - zero = isl_qpolynomial_fold_empty(fold->type, dim); - isl_qpolynomial_fold_free(fold); - return zero; - } - - fold = isl_qpolynomial_fold_cow(fold); - if (!fold) - return NULL; - - if (isl_int_is_neg(v)) - fold->type = isl_fold_type_negate(fold->type); - for (i = 0; i < fold->n; ++i) { - fold->qp[i] = isl_qpolynomial_mul_isl_int(fold->qp[i], v); - if (!fold->qp[i]) - goto error; - } - - return fold; -error: - isl_qpolynomial_fold_free(fold); - return NULL; -} - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( - __isl_take isl_qpolynomial_fold *fold, isl_int v) -{ - return isl_qpolynomial_fold_mul_isl_int(fold, v); -} diff --git a/cloog-0.17.0/isl/isl_gmp.c b/cloog-0.17.0/isl/isl_gmp.c deleted file mode 100644 index 0c8db59ae15d1010b8d25a9be9077f09c33c4f73..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_gmp.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include - -uint32_t isl_gmp_hash(mpz_t v, uint32_t hash) -{ - int sa = v[0]._mp_size; - int abs_sa = sa < 0 ? -sa : sa; - unsigned char *data = (unsigned char *)v[0]._mp_d; - unsigned char *end = data + abs_sa * sizeof(v[0]._mp_d[0]); - - if (sa < 0) - isl_hash_byte(hash, 0xFF); - for (; data < end; ++data) - isl_hash_byte(hash, *data); - return hash; -} diff --git a/cloog-0.17.0/isl/isl_hash.c b/cloog-0.17.0/isl/isl_hash.c deleted file mode 100644 index 52e3135ee174a36353aed5896a1842acfecd0d60..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_hash.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_config.h" - -uint32_t isl_hash_string(uint32_t hash, const char *s) -{ - for (; *s; s++) - isl_hash_byte(hash, *s); - return hash; -} - -uint32_t isl_hash_mem(uint32_t hash, const void *p, size_t len) -{ - int i; - const char *s = p; - for (i = 0; i < len; ++i) - isl_hash_byte(hash, s[i]); - return hash; -} - -static unsigned int round_up(unsigned int v) -{ - int old_v = v; - - while (v) { - old_v = v; - v ^= v & -v; - } - return old_v << 1; -} - -int isl_hash_table_init(struct isl_ctx *ctx, struct isl_hash_table *table, - int min_size) -{ - size_t size; - - if (!table) - return -1; - - if (min_size < 2) - min_size = 2; - table->bits = ffs(round_up(4 * (min_size + 1) / 3 - 1)) - 1; - table->n = 0; - - size = 1 << table->bits; - table->entries = isl_calloc_array(ctx, struct isl_hash_table_entry, - size); - if (!table->entries) - return -1; - - return 0; -} - -static int grow_table(struct isl_ctx *ctx, struct isl_hash_table *table, - int (*eq)(const void *entry, const void *val)) -{ - size_t old_size, size; - struct isl_hash_table_entry *entries; - uint32_t h; - - entries = table->entries; - old_size = 1 << table->bits; - size = 2 * old_size; - table->entries = isl_calloc_array(ctx, struct isl_hash_table_entry, - size); - if (!table->entries) { - table->entries = entries; - return -1; - } - - table->bits++; - - for (h = 0; h < old_size; ++h) { - struct isl_hash_table_entry *entry; - - if (!entries[h].data) - continue; - - entry = isl_hash_table_find(ctx, table, entries[h].hash, - eq, entries[h].data, 1); - if (!entry) { - table->bits--; - free(table->entries); - table->entries = entries; - return -1; - } - - *entry = entries[h]; - } - - free(entries); - - return 0; -} - -struct isl_hash_table *isl_hash_table_alloc(struct isl_ctx *ctx, int min_size) -{ - struct isl_hash_table *table = NULL; - - table = isl_alloc_type(ctx, struct isl_hash_table); - if (isl_hash_table_init(ctx, table, min_size)) - goto error; - return table; -error: - isl_hash_table_free(ctx, table); - return NULL; -} - -void isl_hash_table_clear(struct isl_hash_table *table) -{ - if (!table) - return; - free(table->entries); -} - -void isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table) -{ - if (!table) - return; - isl_hash_table_clear(table); - free(table); -} - -struct isl_hash_table_entry *isl_hash_table_find(struct isl_ctx *ctx, - struct isl_hash_table *table, - uint32_t key_hash, - int (*eq)(const void *entry, const void *val), - const void *val, int reserve) -{ - size_t size; - uint32_t h, key_bits; - - key_bits = isl_hash_bits(key_hash, table->bits); - size = 1 << table->bits; - for (h = key_bits; table->entries[h].data; h = (h+1) % size) - if (table->entries[h].hash == key_hash && - eq(table->entries[h].data, val)) - return &table->entries[h]; - - if (!reserve) - return NULL; - - if (4 * table->n >= 3 * size) { - if (grow_table(ctx, table, eq) < 0) - return NULL; - return isl_hash_table_find(ctx, table, key_hash, eq, val, 1); - } - - table->n++; - table->entries[h].hash = key_hash; - - return &table->entries[h]; -} - -int isl_hash_table_foreach(struct isl_ctx *ctx, - struct isl_hash_table *table, - int (*fn)(void **entry, void *user), void *user) -{ - size_t size; - uint32_t h; - - size = 1 << table->bits; - for (h = 0; h < size; ++ h) - if (table->entries[h].data && - fn(&table->entries[h].data, user) < 0) - return -1; - - return 0; -} - -void isl_hash_table_remove(struct isl_ctx *ctx, - struct isl_hash_table *table, - struct isl_hash_table_entry *entry) -{ - int h, h2; - size_t size; - - if (!table || !entry) - return; - - size = 1 << table->bits; - h = entry - table->entries; - isl_assert(ctx, h >= 0 && h < size, return); - - for (h2 = h+1; table->entries[h2 % size].data; h2++) { - uint32_t bits = isl_hash_bits(table->entries[h2 % size].hash, - table->bits); - uint32_t offset = (size + bits - (h+1)) % size; - if (offset <= h2 - (h+1)) - continue; - *entry = table->entries[h2 % size]; - h = h2; - entry = &table->entries[h % size]; - } - - entry->hash = 0; - entry->data = NULL; - table->n--; -} diff --git a/cloog-0.17.0/isl/isl_hmap_map_basic_set.c b/cloog-0.17.0/isl/isl_hmap_map_basic_set.c deleted file mode 100644 index b303516f03109053d4e6ea529c6e03348829b750..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_hmap_map_basic_set.c +++ /dev/null @@ -1,102 +0,0 @@ -#include - -struct isl_map_basic_set_pair { - isl_map *key; - isl_basic_set *val; -}; - -__isl_give isl_hmap_map_basic_set *isl_hmap_map_basic_set_alloc(isl_ctx *ctx, - int min_size) -{ - return (isl_hmap_map_basic_set *) isl_hash_table_alloc(ctx, min_size); -} - -static int free_pair(void **entry, void *user) -{ - struct isl_map_basic_set_pair *pair = *entry; - isl_map_free(pair->key); - isl_basic_set_free(pair->val); - free(pair); - *entry = NULL; - return 0; -} - -void isl_hmap_map_basic_set_free(isl_ctx *ctx, - __isl_take isl_hmap_map_basic_set *hmap) -{ - if (!hmap) - return; - isl_hash_table_foreach(ctx, &hmap->table, &free_pair, NULL); - isl_hash_table_free(ctx, &hmap->table); -} - -static int has_key(const void *entry, const void *key) -{ - const struct isl_map_basic_set_pair *pair = entry; - isl_map *map = (isl_map *)key; - - return isl_map_plain_is_equal(pair->key, map); -} - -int isl_hmap_map_basic_set_has(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_keep isl_map *key) -{ - uint32_t hash; - - hash = isl_map_get_hash(key); - return !!isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 0); -} - -__isl_give isl_basic_set *isl_hmap_map_basic_set_get(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key) -{ - struct isl_hash_table_entry *entry; - struct isl_map_basic_set_pair *pair; - uint32_t hash; - - hash = isl_map_get_hash(key); - entry = isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 0); - isl_map_free(key); - - if (!entry) - return NULL; - - pair = entry->data; - - return isl_basic_set_copy(pair->val); -} - -int isl_hmap_map_basic_set_set(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key, - __isl_take isl_basic_set *val) -{ - struct isl_hash_table_entry *entry; - struct isl_map_basic_set_pair *pair; - uint32_t hash; - - hash = isl_map_get_hash(key); - entry = isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 1); - - if (!entry) - return -1; - - if (entry->data) { - pair = entry->data; - isl_basic_set_free(pair->val); - pair->val = val; - isl_map_free(key); - return 0; - } - - pair = isl_alloc_type(ctx, struct isl_map_basic_set_pair); - if (!pair) { - isl_map_free(key); - isl_basic_set_free(val); - return -1; - } - - entry->data = pair; - pair->key = key; - pair->val = val; - return 0; -} diff --git a/cloog-0.17.0/isl/isl_hmap_map_basic_set.h b/cloog-0.17.0/isl/isl_hmap_map_basic_set.h deleted file mode 100644 index 905791d61b57532d21b2ecc84e739e397b100a4c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_hmap_map_basic_set.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ISL_HMAP_MAP_BASIC_SET_H -#define ISL_HMAP_MAP_BASIC_SET_H - -#include -#include -#include - -struct isl_hmap_map_basic_set { - struct isl_hash_table table; -}; -typedef struct isl_hmap_map_basic_set isl_hmap_map_basic_set; - -__isl_give isl_hmap_map_basic_set *isl_hmap_map_basic_set_alloc( isl_ctx *ctx, - int min_size); -void isl_hmap_map_basic_set_free(isl_ctx *ctx, - __isl_take isl_hmap_map_basic_set *hmap); - -int isl_hmap_map_basic_set_has(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_keep isl_map *key); -__isl_give isl_basic_set *isl_hmap_map_basic_set_get(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key); -int isl_hmap_map_basic_set_set(isl_ctx *ctx, - __isl_keep isl_hmap_map_basic_set *hmap, __isl_take isl_map *key, - __isl_take isl_basic_set *val); - -#endif diff --git a/cloog-0.17.0/isl/isl_id.c b/cloog-0.17.0/isl/isl_id.c deleted file mode 100644 index a3a2ea9d907458cf265949e8dce2fa860d384be6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_id.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -/* A special, static isl_id to use as domains (and ranges) - * of sets and parameters domains. - * The user should never get a hold on this isl_id. - */ -isl_id isl_id_none = { - .ref = -1, - .ctx = NULL, - .name = "#none", - .user = NULL -}; - -isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id) -{ - return id ? id->ctx : NULL; -} - -void *isl_id_get_user(__isl_keep isl_id *id) -{ - return id ? id->user : NULL; -} - -const char *isl_id_get_name(__isl_keep isl_id *id) -{ - return id ? id->name : NULL; -} - -static __isl_give isl_id *id_alloc(isl_ctx *ctx, const char *name, void *user) -{ - const char *copy = name ? strdup(name) : NULL; - isl_id *id; - - if (name && !copy) - return NULL; - id = isl_alloc_type(ctx, struct isl_id); - if (!id) - goto error; - - id->ctx = ctx; - isl_ctx_ref(id->ctx); - id->ref = 1; - id->name = copy; - id->user = user; - - id->hash = isl_hash_init(); - if (name) - id->hash = isl_hash_string(id->hash, name); - else - id->hash = isl_hash_builtin(id->hash, user); - - return id; -error: - free((char *)copy); - return NULL; -} - -struct isl_name_and_user { - const char *name; - void *user; -}; - -static int isl_id_has_name_and_user(const void *entry, const void *val) -{ - isl_id *id = (isl_id *)entry; - struct isl_name_and_user *nu = (struct isl_name_and_user *) val; - - if (id->user != nu->user) - return 0; - if (!id->name && !nu->name) - return 1; - - return !strcmp(id->name, nu->name); -} - -__isl_give isl_id *isl_id_alloc(isl_ctx *ctx, const char *name, void *user) -{ - struct isl_hash_table_entry *entry; - uint32_t id_hash; - struct isl_name_and_user nu = { name, user }; - - id_hash = isl_hash_init(); - if (name) - id_hash = isl_hash_string(id_hash, name); - else - id_hash = isl_hash_builtin(id_hash, user); - entry = isl_hash_table_find(ctx, &ctx->id_table, id_hash, - isl_id_has_name_and_user, &nu, 1); - if (!entry) - return NULL; - if (entry->data) - return isl_id_copy(entry->data); - entry->data = id_alloc(ctx, name, user); - if (!entry->data) - ctx->id_table.n--; - return entry->data; -} - -/* If the id has a negative refcount, then it is a static isl_id - * which should not be changed. - */ -__isl_give isl_id *isl_id_copy(isl_id *id) -{ - if (!id) - return NULL; - - if (id->ref < 0) - return id; - - id->ref++; - return id; -} - -static int isl_id_eq(const void *entry, const void *name) -{ - return entry == name; -} - -uint32_t isl_hash_id(uint32_t hash, __isl_keep isl_id *id) -{ - if (id) - isl_hash_hash(hash, id->hash); - - return hash; -} - -/* If the id has a negative refcount, then it is a static isl_id - * and should not be freed. - */ -void *isl_id_free(__isl_take isl_id *id) -{ - struct isl_hash_table_entry *entry; - - if (!id) - return NULL; - - if (id->ref < 0) - return NULL; - - if (--id->ref > 0) - return NULL; - - entry = isl_hash_table_find(id->ctx, &id->ctx->id_table, id->hash, - isl_id_eq, id, 0); - if (!entry) - isl_die(id->ctx, isl_error_unknown, - "unable to find id", (void)0); - else - isl_hash_table_remove(id->ctx, &id->ctx->id_table, entry); - - free((char *)id->name); - isl_ctx_deref(id->ctx); - free(id); - - return NULL; -} - -__isl_give isl_printer *isl_printer_print_id(__isl_take isl_printer *p, - __isl_keep isl_id *id) -{ - if (!id) - goto error; - - if (id->name) - p = isl_printer_print_str(p, id->name); - if (id->user) { - char buffer[50]; - snprintf(buffer, sizeof(buffer), "@%p", id->user); - p = isl_printer_print_str(p, buffer); - } - return p; -error: - isl_printer_free(p); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_id_private.h b/cloog-0.17.0/isl/isl_id_private.h deleted file mode 100644 index a472d770ca842e9f2e004f3eb8a05deb16843157..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_id_private.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_ID_PRIVATE_H -#define ISL_ID_PRIVATE_H - -#include - -struct isl_id { - int ref; - isl_ctx *ctx; - - const char *name; - void *user; - uint32_t hash; -}; - -uint32_t isl_hash_id(uint32_t hash, __isl_keep isl_id *id); - -extern isl_id isl_id_none; - -#endif diff --git a/cloog-0.17.0/isl/isl_ilp.c b/cloog-0.17.0/isl/isl_ilp.c deleted file mode 100644 index abfac265ace6bd6a67b34bc3e2ebf726206a6b81..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_ilp.c +++ /dev/null @@ -1,485 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_sample.h" -#include -#include "isl_equalities.h" -#include -#include -#include - -/* Given a basic set "bset", construct a basic set U such that for - * each element x in U, the whole unit box positioned at x is inside - * the given basic set. - * Note that U may not contain all points that satisfy this property. - * - * We simply add the sum of all negative coefficients to the constant - * term. This ensures that if x satisfies the resulting constraints, - * then x plus any sum of unit vectors satisfies the original constraints. - */ -static struct isl_basic_set *unit_box_base_points(struct isl_basic_set *bset) -{ - int i, j, k; - struct isl_basic_set *unit_box = NULL; - unsigned total; - - if (!bset) - goto error; - - if (bset->n_eq != 0) { - unit_box = isl_basic_set_empty_like(bset); - isl_basic_set_free(bset); - return unit_box; - } - - total = isl_basic_set_total_dim(bset); - unit_box = isl_basic_set_alloc_space(isl_basic_set_get_space(bset), - 0, 0, bset->n_ineq); - - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(unit_box); - if (k < 0) - goto error; - isl_seq_cpy(unit_box->ineq[k], bset->ineq[i], 1 + total); - for (j = 0; j < total; ++j) { - if (isl_int_is_nonneg(unit_box->ineq[k][1 + j])) - continue; - isl_int_add(unit_box->ineq[k][0], - unit_box->ineq[k][0], unit_box->ineq[k][1 + j]); - } - } - - isl_basic_set_free(bset); - return unit_box; -error: - isl_basic_set_free(bset); - isl_basic_set_free(unit_box); - return NULL; -} - -/* Find an integer point in "bset", preferably one that is - * close to minimizing "f". - * - * We first check if we can easily put unit boxes inside bset. - * If so, we take the best base point of any of the unit boxes we can find - * and round it up to the nearest integer. - * If not, we simply pick any integer point in "bset". - */ -static struct isl_vec *initial_solution(struct isl_basic_set *bset, isl_int *f) -{ - enum isl_lp_result res; - struct isl_basic_set *unit_box; - struct isl_vec *sol; - - unit_box = unit_box_base_points(isl_basic_set_copy(bset)); - - res = isl_basic_set_solve_lp(unit_box, 0, f, bset->ctx->one, - NULL, NULL, &sol); - if (res == isl_lp_ok) { - isl_basic_set_free(unit_box); - return isl_vec_ceil(sol); - } - - isl_basic_set_free(unit_box); - - return isl_basic_set_sample_vec(isl_basic_set_copy(bset)); -} - -/* Restrict "bset" to those points with values for f in the interval [l, u]. - */ -static struct isl_basic_set *add_bounds(struct isl_basic_set *bset, - isl_int *f, isl_int l, isl_int u) -{ - int k; - unsigned total; - - total = isl_basic_set_total_dim(bset); - bset = isl_basic_set_extend_constraints(bset, 0, 2); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->ineq[k], f, 1 + total); - isl_int_sub(bset->ineq[k][0], bset->ineq[k][0], l); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_neg(bset->ineq[k], f, 1 + total); - isl_int_add(bset->ineq[k][0], bset->ineq[k][0], u); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Find an integer point in "bset" that minimizes f (in any) such that - * the value of f lies inside the interval [l, u]. - * Return this integer point if it can be found. - * Otherwise, return sol. - * - * We perform a number of steps until l > u. - * In each step, we look for an integer point with value in either - * the whole interval [l, u] or half of the interval [l, l+floor(u-l-1/2)]. - * The choice depends on whether we have found an integer point in the - * previous step. If so, we look for the next point in half of the remaining - * interval. - * If we find a point, the current solution is updated and u is set - * to its value minus 1. - * If no point can be found, we update l to the upper bound of the interval - * we checked (u or l+floor(u-l-1/2)) plus 1. - */ -static struct isl_vec *solve_ilp_search(struct isl_basic_set *bset, - isl_int *f, isl_int *opt, struct isl_vec *sol, isl_int l, isl_int u) -{ - isl_int tmp; - int divide = 1; - - isl_int_init(tmp); - - while (isl_int_le(l, u)) { - struct isl_basic_set *slice; - struct isl_vec *sample; - - if (!divide) - isl_int_set(tmp, u); - else { - isl_int_sub(tmp, u, l); - isl_int_fdiv_q_ui(tmp, tmp, 2); - isl_int_add(tmp, tmp, l); - } - slice = add_bounds(isl_basic_set_copy(bset), f, l, tmp); - sample = isl_basic_set_sample_vec(slice); - if (!sample) { - isl_vec_free(sol); - sol = NULL; - break; - } - if (sample->size > 0) { - isl_vec_free(sol); - sol = sample; - isl_seq_inner_product(f, sol->el, sol->size, opt); - isl_int_sub_ui(u, *opt, 1); - divide = 1; - } else { - isl_vec_free(sample); - if (!divide) - break; - isl_int_add_ui(l, tmp, 1); - divide = 0; - } - } - - isl_int_clear(tmp); - - return sol; -} - -/* Find an integer point in "bset" that minimizes f (if any). - * If sol_p is not NULL then the integer point is returned in *sol_p. - * The optimal value of f is returned in *opt. - * - * The algorithm maintains a currently best solution and an interval [l, u] - * of values of f for which integer solutions could potentially still be found. - * The initial value of the best solution so far is any solution. - * The initial value of l is minimal value of f over the rationals - * (rounded up to the nearest integer). - * The initial value of u is the value of f at the initial solution minus 1. - * - * We then call solve_ilp_search to perform a binary search on the interval. - */ -static enum isl_lp_result solve_ilp(struct isl_basic_set *bset, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p) -{ - enum isl_lp_result res; - isl_int l, u; - struct isl_vec *sol; - - res = isl_basic_set_solve_lp(bset, 0, f, bset->ctx->one, - opt, NULL, &sol); - if (res == isl_lp_ok && isl_int_is_one(sol->el[0])) { - if (sol_p) - *sol_p = sol; - else - isl_vec_free(sol); - return isl_lp_ok; - } - isl_vec_free(sol); - if (res == isl_lp_error || res == isl_lp_empty) - return res; - - sol = initial_solution(bset, f); - if (!sol) - return isl_lp_error; - if (sol->size == 0) { - isl_vec_free(sol); - return isl_lp_empty; - } - if (res == isl_lp_unbounded) { - isl_vec_free(sol); - return isl_lp_unbounded; - } - - isl_int_init(l); - isl_int_init(u); - - isl_int_set(l, *opt); - - isl_seq_inner_product(f, sol->el, sol->size, opt); - isl_int_sub_ui(u, *opt, 1); - - sol = solve_ilp_search(bset, f, opt, sol, l, u); - if (!sol) - res = isl_lp_error; - - isl_int_clear(l); - isl_int_clear(u); - - if (sol_p) - *sol_p = sol; - else - isl_vec_free(sol); - - return res; -} - -static enum isl_lp_result solve_ilp_with_eq(struct isl_basic_set *bset, int max, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p) -{ - unsigned dim; - enum isl_lp_result res; - struct isl_mat *T = NULL; - struct isl_vec *v; - - bset = isl_basic_set_copy(bset); - dim = isl_basic_set_total_dim(bset); - v = isl_vec_alloc(bset->ctx, 1 + dim); - if (!v) - goto error; - isl_seq_cpy(v->el, f, 1 + dim); - bset = isl_basic_set_remove_equalities(bset, &T, NULL); - v = isl_vec_mat_product(v, isl_mat_copy(T)); - if (!v) - goto error; - res = isl_basic_set_solve_ilp(bset, max, v->el, opt, sol_p); - isl_vec_free(v); - if (res == isl_lp_ok && sol_p) { - *sol_p = isl_mat_vec_product(T, *sol_p); - if (!*sol_p) - res = isl_lp_error; - } else - isl_mat_free(T); - isl_basic_set_free(bset); - return res; -error: - isl_mat_free(T); - isl_basic_set_free(bset); - return isl_lp_error; -} - -/* Find an integer point in "bset" that minimizes (or maximizes if max is set) - * f (if any). - * If sol_p is not NULL then the integer point is returned in *sol_p. - * The optimal value of f is returned in *opt. - * - * If there is any equality among the points in "bset", then we first - * project it out. Otherwise, we continue with solve_ilp above. - */ -enum isl_lp_result isl_basic_set_solve_ilp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int *opt, - struct isl_vec **sol_p) -{ - unsigned dim; - enum isl_lp_result res; - - if (!bset) - return isl_lp_error; - if (sol_p) - *sol_p = NULL; - - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - - if (isl_basic_set_plain_is_empty(bset)) - return isl_lp_empty; - - if (bset->n_eq) - return solve_ilp_with_eq(bset, max, f, opt, sol_p); - - dim = isl_basic_set_total_dim(bset); - - if (max) - isl_seq_neg(f, f, 1 + dim); - - res = solve_ilp(bset, f, opt, sol_p); - - if (max) { - isl_seq_neg(f, f, 1 + dim); - isl_int_neg(*opt, *opt); - } - - return res; -error: - isl_basic_set_free(bset); - return isl_lp_error; -} - -static enum isl_lp_result basic_set_opt(__isl_keep isl_basic_set *bset, int max, - __isl_keep isl_aff *obj, isl_int *opt) -{ - enum isl_lp_result res; - - if (!obj) - return isl_lp_error; - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_underlying_set(bset); - res = isl_basic_set_solve_ilp(bset, max, obj->v->el + 1, opt, NULL); - isl_basic_set_free(bset); - return res; -} - -static __isl_give isl_mat *extract_divs(__isl_keep isl_basic_set *bset) -{ - int i; - isl_ctx *ctx = isl_basic_set_get_ctx(bset); - isl_mat *div; - - div = isl_mat_alloc(ctx, bset->n_div, - 1 + 1 + isl_basic_set_total_dim(bset)); - if (!div) - return NULL; - - for (i = 0; i < bset->n_div; ++i) - isl_seq_cpy(div->row[i], bset->div[i], div->n_col); - - return div; -} - -enum isl_lp_result isl_basic_set_opt(__isl_keep isl_basic_set *bset, int max, - __isl_keep isl_aff *obj, isl_int *opt) -{ - int *exp1 = NULL; - int *exp2 = NULL; - isl_ctx *ctx; - isl_mat *bset_div = NULL; - isl_mat *div = NULL; - enum isl_lp_result res; - - if (!bset || !obj) - return isl_lp_error; - - ctx = isl_aff_get_ctx(obj); - if (!isl_space_is_equal(bset->dim, obj->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", return isl_lp_error); - if (!isl_int_is_one(obj->v->el[0])) - isl_die(ctx, isl_error_unsupported, - "expecting integer affine expression", - return isl_lp_error); - - if (bset->n_div == 0 && obj->ls->div->n_row == 0) - return basic_set_opt(bset, max, obj, opt); - - bset = isl_basic_set_copy(bset); - obj = isl_aff_copy(obj); - - bset_div = extract_divs(bset); - exp1 = isl_alloc_array(ctx, int, bset_div->n_row); - exp2 = isl_alloc_array(ctx, int, obj->ls->div->n_row); - if (!bset_div || !exp1 || !exp2) - goto error; - - div = isl_merge_divs(bset_div, obj->ls->div, exp1, exp2); - - bset = isl_basic_set_expand_divs(bset, isl_mat_copy(div), exp1); - obj = isl_aff_expand_divs(obj, isl_mat_copy(div), exp2); - - res = basic_set_opt(bset, max, obj, opt); - - isl_mat_free(bset_div); - isl_mat_free(div); - free(exp1); - free(exp2); - isl_basic_set_free(bset); - isl_aff_free(obj); - - return res; -error: - isl_mat_free(div); - isl_mat_free(bset_div); - free(exp1); - free(exp2); - isl_basic_set_free(bset); - isl_aff_free(obj); - return isl_lp_error; -} - -/* Compute the minimum (maximum if max is set) of the integer affine - * expression obj over the points in set and put the result in *opt. - */ -enum isl_lp_result isl_set_opt(__isl_keep isl_set *set, int max, - __isl_keep isl_aff *obj, isl_int *opt) -{ - int i; - enum isl_lp_result res; - int empty = 1; - isl_int opt_i; - - if (!set || !obj) - return isl_lp_error; - if (set->n == 0) - return isl_lp_empty; - - res = isl_basic_set_opt(set->p[0], max, obj, opt); - if (res == isl_lp_error || res == isl_lp_unbounded) - return res; - if (set->n == 1) - return res; - if (res == isl_lp_ok) - empty = 0; - - isl_int_init(opt_i); - for (i = 1; i < set->n; ++i) { - res = isl_basic_set_opt(set->p[i], max, obj, &opt_i); - if (res == isl_lp_error || res == isl_lp_unbounded) { - isl_int_clear(opt_i); - return res; - } - if (res == isl_lp_ok) - empty = 0; - if (isl_int_gt(opt_i, *opt)) - isl_int_set(*opt, opt_i); - } - isl_int_clear(opt_i); - - return empty ? isl_lp_empty : isl_lp_ok; -} - -enum isl_lp_result isl_basic_set_max(__isl_keep isl_basic_set *bset, - __isl_keep isl_aff *obj, isl_int *opt) -{ - return isl_basic_set_opt(bset, 1, obj, opt); -} - -enum isl_lp_result isl_set_max(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt) -{ - return isl_set_opt(set, 1, obj, opt); -} - -enum isl_lp_result isl_set_min(__isl_keep isl_set *set, - __isl_keep isl_aff *obj, isl_int *opt) -{ - return isl_set_opt(set, 0, obj, opt); -} diff --git a/cloog-0.17.0/isl/isl_input.c b/cloog-0.17.0/isl/isl_input.c deleted file mode 100644 index 320703a667dc9e6668174aaf70430ad996cfe67f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_input.c +++ /dev/null @@ -1,2685 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "isl_polynomial_private.h" -#include -#include -#include -#include - -struct variable { - char *name; - int pos; - struct variable *next; -}; - -struct vars { - struct isl_ctx *ctx; - int n; - struct variable *v; -}; - -static struct vars *vars_new(struct isl_ctx *ctx) -{ - struct vars *v; - v = isl_alloc_type(ctx, struct vars); - if (!v) - return NULL; - v->ctx = ctx; - v->n = 0; - v->v = NULL; - return v; -} - -static void variable_free(struct variable *var) -{ - while (var) { - struct variable *next = var->next; - free(var->name); - free(var); - var = next; - } -} - -static void vars_free(struct vars *v) -{ - if (!v) - return; - variable_free(v->v); - free(v); -} - -static void vars_drop(struct vars *v, int n) -{ - struct variable *var; - - if (!v || !v->v) - return; - - v->n -= n; - - var = v->v; - while (--n >= 0) { - struct variable *next = var->next; - free(var->name); - free(var); - var = next; - } - v->v = var; -} - -static struct variable *variable_new(struct vars *v, const char *name, int len, - int pos) -{ - struct variable *var; - var = isl_calloc_type(v->ctx, struct variable); - if (!var) - goto error; - var->name = strdup(name); - var->name[len] = '\0'; - var->pos = pos; - var->next = v->v; - return var; -error: - variable_free(v->v); - return NULL; -} - -static int vars_pos(struct vars *v, const char *s, int len) -{ - int pos; - struct variable *q; - - if (len == -1) - len = strlen(s); - for (q = v->v; q; q = q->next) { - if (strncmp(q->name, s, len) == 0 && q->name[len] == '\0') - break; - } - if (q) - pos = q->pos; - else { - pos = v->n; - v->v = variable_new(v, s, len, v->n); - if (!v->v) - return -1; - v->n++; - } - return pos; -} - -static int vars_add_anon(struct vars *v) -{ - v->v = variable_new(v, "", 0, v->n); - - if (!v->v) - return -1; - v->n++; - - return 0; -} - -static __isl_give isl_map *set_name(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, char *name) -{ - char *prime; - - if (!map) - return NULL; - if (!name) - return map; - - prime = strchr(name, '\''); - if (prime) - *prime = '\0'; - map = isl_map_set_dim_name(map, type, pos, name); - if (prime) - *prime = '\''; - - return map; -} - -/* Obtain next token, with some preprocessing. - * In particular, evaluate expressions of the form x^y, - * with x and y values. - */ -static struct isl_token *next_token(struct isl_stream *s) -{ - struct isl_token *tok, *tok2; - - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) - return tok; - if (!isl_stream_eat_if_available(s, '^')) - return tok; - tok2 = isl_stream_next_token(s); - if (!tok2 || tok2->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok2, "expecting constant value"); - goto error; - } - - isl_int_pow_ui(tok->u.v, tok->u.v, isl_int_get_ui(tok2->u.v)); - - isl_token_free(tok2); - return tok; -error: - isl_token_free(tok); - isl_token_free(tok2); - return NULL; -} - -static int accept_cst_factor(struct isl_stream *s, isl_int *f) -{ - struct isl_token *tok; - - tok = next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting constant value"); - goto error; - } - - isl_int_mul(*f, *f, tok->u.v); - - isl_token_free(tok); - - if (isl_stream_eat_if_available(s, '*')) - return accept_cst_factor(s, f); - - return 0; -error: - isl_token_free(tok); - return -1; -} - -/* Given an affine expression aff, return an affine expression - * for aff % d, with d the next token on the stream, which is - * assumed to be a constant. - * - * We introduce an integer division q = [aff/d] and the result - * is set to aff - d q. - */ -static __isl_give isl_pw_aff *affine_mod(struct isl_stream *s, - struct vars *v, __isl_take isl_pw_aff *aff) -{ - struct isl_token *tok; - isl_pw_aff *q; - - tok = next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting constant value"); - goto error; - } - - q = isl_pw_aff_copy(aff); - q = isl_pw_aff_scale_down(q, tok->u.v); - q = isl_pw_aff_floor(q); - q = isl_pw_aff_scale(q, tok->u.v); - - aff = isl_pw_aff_sub(aff, q); - - isl_token_free(tok); - return aff; -error: - isl_pw_aff_free(aff); - isl_token_free(tok); - return NULL; -} - -static __isl_give isl_pw_aff *accept_affine(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v); -static __isl_give isl_pw_aff_list *accept_affine_list(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v); - -static __isl_give isl_pw_aff *accept_minmax(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v) -{ - struct isl_token *tok; - isl_pw_aff_list *list = NULL; - int min; - - tok = isl_stream_next_token(s); - if (!tok) - goto error; - min = tok->type == ISL_TOKEN_MIN; - isl_token_free(tok); - - if (isl_stream_eat(s, '(')) - goto error; - - list = accept_affine_list(s, isl_space_copy(dim), v); - if (!list) - goto error; - - if (isl_stream_eat(s, ')')) - goto error; - - isl_space_free(dim); - return min ? isl_pw_aff_list_min(list) : isl_pw_aff_list_max(list); -error: - isl_space_free(dim); - isl_pw_aff_list_free(list); - return NULL; -} - -static __isl_give isl_pw_aff *accept_div(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v) -{ - struct isl_token *tok; - int seen_paren = 0; - int f = 0; - int c = 0; - isl_pw_aff *pwaff = NULL; - - if (isl_stream_eat_if_available(s, ISL_TOKEN_FLOORD)) - f = 1; - else if (isl_stream_eat_if_available(s, ISL_TOKEN_CEILD)) - c = 1; - if (f || c) { - if (isl_stream_eat(s, '(')) - goto error; - } else { - if (isl_stream_eat(s, '[')) - goto error; - if (isl_stream_eat_if_available(s, '(')) - seen_paren = 1; - } - - pwaff = accept_affine(s, isl_space_copy(dim), v); - - if (f || c) { - if (isl_stream_eat(s, ',')) - goto error; - } else { - if (seen_paren && isl_stream_eat(s, ')')) - goto error; - if (isl_stream_eat(s, '/')) - goto error; - } - - tok = next_token(s); - if (!tok) - goto error; - if (tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expected denominator"); - isl_stream_push_token(s, tok); - goto error; - } - isl_pw_aff_scale_down(pwaff, tok->u.v); - isl_token_free(tok); - - if (c) - pwaff = isl_pw_aff_ceil(pwaff); - else - pwaff = isl_pw_aff_floor(pwaff); - - if (f || c) { - if (isl_stream_eat(s, ')')) - goto error; - } else { - if (isl_stream_eat(s, ']')) - goto error; - } - - isl_space_free(dim); - return pwaff; -error: - isl_space_free(dim); - isl_pw_aff_free(pwaff); - return NULL; -} - -static __isl_give isl_pw_aff *accept_affine_factor(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v) -{ - struct isl_token *tok = NULL; - isl_pw_aff *res = NULL; - - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - - if (tok->type == ISL_TOKEN_AFF) { - res = isl_pw_aff_copy(tok->u.pwaff); - isl_token_free(tok); - } else if (tok->type == ISL_TOKEN_IDENT) { - int n = v->n; - int pos = vars_pos(v, tok->u.s, -1); - isl_aff *aff; - - if (pos < 0) - goto error; - if (pos >= n) { - isl_stream_error(s, tok, "unknown identifier"); - goto error; - } - - aff = isl_aff_zero_on_domain(isl_local_space_from_space(isl_space_copy(dim))); - if (!aff) - goto error; - isl_int_set_si(aff->v->el[2 + pos], 1); - res = isl_pw_aff_from_aff(aff); - isl_token_free(tok); - } else if (tok->type == ISL_TOKEN_VALUE) { - if (isl_stream_eat_if_available(s, '*')) { - res = accept_affine_factor(s, isl_space_copy(dim), v); - res = isl_pw_aff_scale(res, tok->u.v); - } else { - isl_local_space *ls; - isl_aff *aff; - ls = isl_local_space_from_space(isl_space_copy(dim)); - aff = isl_aff_zero_on_domain(ls); - aff = isl_aff_add_constant(aff, tok->u.v); - res = isl_pw_aff_from_aff(aff); - } - isl_token_free(tok); - } else if (tok->type == '(') { - isl_token_free(tok); - tok = NULL; - res = accept_affine(s, isl_space_copy(dim), v); - if (!res) - goto error; - if (isl_stream_eat(s, ')')) - goto error; - } else if (tok->type == '[' || - tok->type == ISL_TOKEN_FLOORD || - tok->type == ISL_TOKEN_CEILD) { - isl_stream_push_token(s, tok); - tok = NULL; - res = accept_div(s, isl_space_copy(dim), v); - } else if (tok->type == ISL_TOKEN_MIN || tok->type == ISL_TOKEN_MAX) { - isl_stream_push_token(s, tok); - tok = NULL; - res = accept_minmax(s, isl_space_copy(dim), v); - } else { - isl_stream_error(s, tok, "expecting factor"); - goto error; - } - if (isl_stream_eat_if_available(s, '%') || - isl_stream_eat_if_available(s, ISL_TOKEN_MOD)) { - isl_space_free(dim); - return affine_mod(s, v, res); - } - if (isl_stream_eat_if_available(s, '*')) { - isl_int f; - isl_int_init(f); - isl_int_set_si(f, 1); - if (accept_cst_factor(s, &f) < 0) { - isl_int_clear(f); - goto error2; - } - res = isl_pw_aff_scale(res, f); - isl_int_clear(f); - } - - isl_space_free(dim); - return res; -error: - isl_token_free(tok); -error2: - isl_pw_aff_free(res); - isl_space_free(dim); - return NULL; -} - -static __isl_give isl_pw_aff *add_cst(__isl_take isl_pw_aff *pwaff, isl_int v) -{ - isl_aff *aff; - isl_space *space; - - space = isl_pw_aff_get_domain_space(pwaff); - aff = isl_aff_zero_on_domain(isl_local_space_from_space(space)); - aff = isl_aff_add_constant(aff, v); - - return isl_pw_aff_add(pwaff, isl_pw_aff_from_aff(aff)); -} - -static __isl_give isl_pw_aff *accept_affine(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v) -{ - struct isl_token *tok = NULL; - isl_local_space *ls; - isl_pw_aff *res; - int sign = 1; - - ls = isl_local_space_from_space(isl_space_copy(dim)); - res = isl_pw_aff_from_aff(isl_aff_zero_on_domain(ls)); - if (!res) - goto error; - - for (;;) { - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type == '-') { - sign = -sign; - isl_token_free(tok); - continue; - } - if (tok->type == '(' || tok->type == '[' || - tok->type == ISL_TOKEN_MIN || tok->type == ISL_TOKEN_MAX || - tok->type == ISL_TOKEN_FLOORD || - tok->type == ISL_TOKEN_CEILD || - tok->type == ISL_TOKEN_IDENT || - tok->type == ISL_TOKEN_AFF) { - isl_pw_aff *term; - isl_stream_push_token(s, tok); - tok = NULL; - term = accept_affine_factor(s, isl_space_copy(dim), v); - if (sign < 0) - res = isl_pw_aff_sub(res, term); - else - res = isl_pw_aff_add(res, term); - if (!res) - goto error; - sign = 1; - } else if (tok->type == ISL_TOKEN_VALUE) { - if (sign < 0) - isl_int_neg(tok->u.v, tok->u.v); - if (isl_stream_eat_if_available(s, '*') || - isl_stream_next_token_is(s, ISL_TOKEN_IDENT)) { - isl_pw_aff *term; - term = accept_affine_factor(s, - isl_space_copy(dim), v); - term = isl_pw_aff_scale(term, tok->u.v); - res = isl_pw_aff_add(res, term); - if (!res) - goto error; - } else { - res = add_cst(res, tok->u.v); - } - sign = 1; - } else { - isl_stream_error(s, tok, "unexpected isl_token"); - isl_stream_push_token(s, tok); - isl_pw_aff_free(res); - isl_space_free(dim); - return NULL; - } - isl_token_free(tok); - - tok = next_token(s); - if (tok && tok->type == '-') { - sign = -sign; - isl_token_free(tok); - } else if (tok && tok->type == '+') { - /* nothing */ - isl_token_free(tok); - } else if (tok && tok->type == ISL_TOKEN_VALUE && - isl_int_is_neg(tok->u.v)) { - isl_stream_push_token(s, tok); - } else { - if (tok) - isl_stream_push_token(s, tok); - break; - } - } - - isl_space_free(dim); - return res; -error: - isl_space_free(dim); - isl_token_free(tok); - isl_pw_aff_free(res); - return NULL; -} - -static int is_comparator(struct isl_token *tok) -{ - if (!tok) - return 0; - - switch (tok->type) { - case ISL_TOKEN_LT: - case ISL_TOKEN_GT: - case ISL_TOKEN_LE: - case ISL_TOKEN_GE: - case ISL_TOKEN_NE: - case '=': - return 1; - default: - return 0; - } -} - -static struct isl_map *read_disjuncts(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map); -static __isl_give isl_pw_aff *accept_extended_affine(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v); - -/* Accept a ternary operator, given the first argument. - */ -static __isl_give isl_pw_aff *accept_ternary(struct isl_stream *s, - __isl_take isl_map *cond, struct vars *v) -{ - isl_space *dim; - isl_pw_aff *pwaff1 = NULL, *pwaff2 = NULL; - - if (!cond) - return NULL; - - if (isl_stream_eat(s, '?')) - goto error; - - dim = isl_space_wrap(isl_map_get_space(cond)); - pwaff1 = accept_extended_affine(s, dim, v); - if (!pwaff1) - goto error; - - if (isl_stream_eat(s, ':')) - goto error; - - dim = isl_pw_aff_get_domain_space(pwaff1); - pwaff2 = accept_extended_affine(s, dim, v); - if (!pwaff1) - goto error; - - return isl_pw_aff_cond(isl_map_wrap(cond), pwaff1, pwaff2); -error: - isl_map_free(cond); - isl_pw_aff_free(pwaff1); - isl_pw_aff_free(pwaff2); - return NULL; -} - -/* Accept an affine expression that may involve ternary operators. - * We first read an affine expression. - * If it is not followed by a comparison operator, we simply return it. - * Otherwise, we assume the affine epxression is part of the first - * argument of a ternary operator and try to parse that. - */ -static __isl_give isl_pw_aff *accept_extended_affine(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v) -{ - isl_space *space; - isl_map *cond; - isl_pw_aff *pwaff; - struct isl_token *tok; - int line = -1, col = -1; - int is_comp; - - tok = isl_stream_next_token(s); - if (tok) { - line = tok->line; - col = tok->col; - isl_stream_push_token(s, tok); - } - - pwaff = accept_affine(s, dim, v); - if (!pwaff) - return NULL; - - tok = isl_stream_next_token(s); - if (!tok) - return isl_pw_aff_free(pwaff); - - is_comp = is_comparator(tok); - isl_stream_push_token(s, tok); - if (!is_comp) - return pwaff; - - tok = isl_token_new(s->ctx, line, col, 0); - if (!tok) - return isl_pw_aff_free(pwaff); - tok->type = ISL_TOKEN_AFF; - tok->u.pwaff = pwaff; - - space = isl_pw_aff_get_domain_space(pwaff); - cond = isl_map_universe(isl_space_unwrap(space)); - - isl_stream_push_token(s, tok); - - cond = read_disjuncts(s, v, cond); - - return accept_ternary(s, cond, v); -} - -static __isl_give isl_map *read_var_def(struct isl_stream *s, - __isl_take isl_map *map, enum isl_dim_type type, struct vars *v) -{ - isl_pw_aff *def; - int pos; - isl_map *def_map; - - if (type == isl_dim_param) - pos = isl_map_dim(map, isl_dim_param); - else { - pos = isl_map_dim(map, isl_dim_in); - if (type == isl_dim_out) - pos += isl_map_dim(map, isl_dim_out); - type = isl_dim_in; - } - --pos; - - def = accept_extended_affine(s, isl_space_wrap(isl_map_get_space(map)), v); - def_map = isl_map_from_pw_aff(def); - def_map = isl_map_equate(def_map, type, pos, isl_dim_out, 0); - def_map = isl_set_unwrap(isl_map_domain(def_map)); - - map = isl_map_intersect(map, def_map); - - return map; -} - -static __isl_give isl_map *read_var_list(struct isl_stream *s, - __isl_take isl_map *map, enum isl_dim_type type, struct vars *v) -{ - int i = 0; - struct isl_token *tok; - - if (isl_stream_next_token_is(s, ']')) - return isl_map_add_dims(map, type, 0); - - while ((tok = next_token(s)) != NULL) { - int new_name = 0; - - if (tok->type == ISL_TOKEN_IDENT) { - int n = v->n; - int p = vars_pos(v, tok->u.s, -1); - if (p < 0) - goto error; - new_name = p >= n; - } - - if (new_name) { - map = isl_map_add_dims(map, type, 1); - map = set_name(map, type, i, v->v->name); - isl_token_free(tok); - if (isl_stream_eat_if_available(s, '=')) - map = read_var_def(s, map, type, v); - } else { - if (type == isl_dim_param) { - isl_stream_error(s, tok, - "expecting unique identifier"); - goto error; - } - isl_stream_push_token(s, tok); - tok = NULL; - if (vars_add_anon(v) < 0) - goto error; - map = isl_map_add_dims(map, type, 1); - map = read_var_def(s, map, type, v); - } - - tok = isl_stream_next_token(s); - if (tok && tok->type == ']' && - isl_stream_next_token_is(s, '[')) { - isl_token_free(tok); - tok = isl_stream_next_token(s); - } else if (!tok || tok->type != ',') - break; - - isl_token_free(tok); - i++; - } - if (tok) - isl_stream_push_token(s, tok); - - return map; -error: - isl_token_free(tok); - isl_map_free(map); - return NULL; -} - -static __isl_give isl_pw_aff_list *accept_affine_list(struct isl_stream *s, - __isl_take isl_space *dim, struct vars *v) -{ - isl_pw_aff *pwaff; - isl_pw_aff_list *list; - struct isl_token *tok = NULL; - - pwaff = accept_affine(s, isl_space_copy(dim), v); - list = isl_pw_aff_list_from_pw_aff(pwaff); - if (!list) - goto error; - - for (;;) { - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type != ',') { - isl_stream_push_token(s, tok); - break; - } - isl_token_free(tok); - - pwaff = accept_affine(s, isl_space_copy(dim), v); - list = isl_pw_aff_list_concat(list, - isl_pw_aff_list_from_pw_aff(pwaff)); - if (!list) - return NULL; - } - - isl_space_free(dim); - return list; -error: - isl_space_free(dim); - isl_pw_aff_list_free(list); - return NULL; -} - -static __isl_give isl_map *read_defined_var_list(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - struct isl_token *tok; - - while ((tok = isl_stream_next_token(s)) != NULL) { - int p; - int n = v->n; - - if (tok->type != ISL_TOKEN_IDENT) - break; - - p = vars_pos(v, tok->u.s, -1); - if (p < 0) - goto error; - if (p < n) { - isl_stream_error(s, tok, "expecting unique identifier"); - goto error; - } - - map = isl_map_add_dims(map, isl_dim_out, 1); - - isl_token_free(tok); - tok = isl_stream_next_token(s); - if (tok && tok->type == '=') { - isl_token_free(tok); - map = read_var_def(s, map, isl_dim_out, v); - tok = isl_stream_next_token(s); - } - - if (!tok || tok->type != ',') - break; - - isl_token_free(tok); - } - if (tok) - isl_stream_push_token(s, tok); - - return map; -error: - isl_token_free(tok); - isl_map_free(map); - return NULL; -} - -static int next_is_tuple(struct isl_stream *s) -{ - struct isl_token *tok; - int is_tuple; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - if (tok->type == '[') { - isl_stream_push_token(s, tok); - return 1; - } - if (tok->type != ISL_TOKEN_IDENT && !tok->is_keyword) { - isl_stream_push_token(s, tok); - return 0; - } - - is_tuple = isl_stream_next_token_is(s, '['); - - isl_stream_push_token(s, tok); - - return is_tuple; -} - -static __isl_give isl_map *read_tuple(struct isl_stream *s, - __isl_take isl_map *map, enum isl_dim_type type, struct vars *v); - -static __isl_give isl_set *read_nested_tuple(struct isl_stream *s, - __isl_take isl_map *map, struct vars *v) -{ - map = read_tuple(s, map, isl_dim_in, v); - if (isl_stream_eat(s, ISL_TOKEN_TO)) - goto error; - map = read_tuple(s, map, isl_dim_out, v); - return isl_map_wrap(map); -error: - isl_map_free(map); - return NULL; -} - -static __isl_give isl_map *read_tuple(struct isl_stream *s, - __isl_take isl_map *map, enum isl_dim_type type, struct vars *v) -{ - struct isl_token *tok; - char *name = NULL; - - tok = isl_stream_next_token(s); - if (tok && (tok->type == ISL_TOKEN_IDENT || tok->is_keyword)) { - name = strdup(tok->u.s); - if (!name) - goto error; - isl_token_free(tok); - tok = isl_stream_next_token(s); - } - if (!tok || tok->type != '[') { - isl_stream_error(s, tok, "expecting '['"); - goto error; - } - isl_token_free(tok); - if (type != isl_dim_param && next_is_tuple(s)) { - isl_space *dim = isl_map_get_space(map); - int nparam = isl_space_dim(dim, isl_dim_param); - int n_in = isl_space_dim(dim, isl_dim_in); - isl_set *nested; - if (type == isl_dim_out) { - dim = isl_space_move_dims(dim, isl_dim_param, nparam, - isl_dim_in, 0, n_in); - dim = isl_space_params(dim); - } - nested = read_nested_tuple(s, isl_map_universe(dim), v); - if (type == isl_dim_in) { - nested = isl_map_reverse(nested); - map = isl_map_intersect_params(nested, map); - } else { - isl_set *set; - dim = isl_set_get_space(nested); - dim = isl_space_drop_dims(dim, isl_dim_param, nparam, n_in); - dim = isl_space_join(isl_map_get_space(map), dim); - set = isl_map_domain(map); - nested = isl_map_reset_space(nested, dim); - map = isl_map_intersect_domain(nested, set); - } - } else - map = read_var_list(s, map, type, v); - tok = isl_stream_next_token(s); - if (!tok || tok->type != ']') { - isl_stream_error(s, tok, "expecting ']'"); - goto error; - } - isl_token_free(tok); - - if (name) { - map = isl_map_set_tuple_name(map, type, name); - free(name); - } - - return map; -error: - if (tok) - isl_token_free(tok); - isl_map_free(map); - return NULL; -} - -static __isl_give isl_set *construct_constraints( - __isl_take isl_set *set, enum isl_token_type type, - __isl_keep isl_pw_aff_list *left, __isl_keep isl_pw_aff_list *right) -{ - isl_set *cond; - - if (type == ISL_TOKEN_LE) - cond = isl_pw_aff_list_le_set(isl_pw_aff_list_copy(left), - isl_pw_aff_list_copy(right)); - else if (type == ISL_TOKEN_GE) - cond = isl_pw_aff_list_ge_set(isl_pw_aff_list_copy(left), - isl_pw_aff_list_copy(right)); - else if (type == ISL_TOKEN_LT) - cond = isl_pw_aff_list_lt_set(isl_pw_aff_list_copy(left), - isl_pw_aff_list_copy(right)); - else if (type == ISL_TOKEN_GT) - cond = isl_pw_aff_list_gt_set(isl_pw_aff_list_copy(left), - isl_pw_aff_list_copy(right)); - else if (type == ISL_TOKEN_NE) - cond = isl_pw_aff_list_ne_set(isl_pw_aff_list_copy(left), - isl_pw_aff_list_copy(right)); - else - cond = isl_pw_aff_list_eq_set(isl_pw_aff_list_copy(left), - isl_pw_aff_list_copy(right)); - - return isl_set_intersect(set, cond); -} - -static __isl_give isl_map *add_constraint(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - struct isl_token *tok = NULL; - isl_pw_aff_list *list1 = NULL, *list2 = NULL; - isl_set *set; - - set = isl_map_wrap(map); - list1 = accept_affine_list(s, isl_set_get_space(set), v); - if (!list1) - goto error; - tok = isl_stream_next_token(s); - if (!is_comparator(tok)) { - isl_stream_error(s, tok, "missing operator"); - if (tok) - isl_stream_push_token(s, tok); - tok = NULL; - goto error; - } - for (;;) { - list2 = accept_affine_list(s, isl_set_get_space(set), v); - if (!list2) - goto error; - - set = construct_constraints(set, tok->type, list1, list2); - isl_token_free(tok); - isl_pw_aff_list_free(list1); - list1 = list2; - - tok = isl_stream_next_token(s); - if (!is_comparator(tok)) { - if (tok) - isl_stream_push_token(s, tok); - break; - } - } - isl_pw_aff_list_free(list1); - - return isl_set_unwrap(set); -error: - if (tok) - isl_token_free(tok); - isl_pw_aff_list_free(list1); - isl_pw_aff_list_free(list2); - isl_set_free(set); - return NULL; -} - -static __isl_give isl_map *read_exists(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - int n = v->n; - int seen_paren = isl_stream_eat_if_available(s, '('); - - map = isl_map_from_domain(isl_map_wrap(map)); - map = read_defined_var_list(s, v, map); - - if (isl_stream_eat(s, ':')) - goto error; - - map = read_disjuncts(s, v, map); - map = isl_set_unwrap(isl_map_domain(map)); - - vars_drop(v, v->n - n); - if (seen_paren && isl_stream_eat(s, ')')) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Parse an expression between parentheses and push the result - * back on the stream. - * - * The parsed expression may be either an affine expression - * or a condition. The first type is pushed onto the stream - * as an isl_pw_aff, while the second is pushed as an isl_map. - * - * If the initial token indicates the start of a condition, - * we parse it as such. - * Otherwise, we first parse an affine expression and push - * that onto the stream. If the affine expression covers the - * entire expression between parentheses, we return. - * Otherwise, we assume that the affine expression is the - * start of a condition and continue parsing. - */ -static int resolve_paren_expr(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - struct isl_token *tok, *tok2; - int line, col; - isl_pw_aff *pwaff; - - tok = isl_stream_next_token(s); - if (!tok || tok->type != '(') - goto error; - - if (isl_stream_next_token_is(s, '(')) - if (resolve_paren_expr(s, v, isl_map_copy(map))) - goto error; - - if (isl_stream_next_token_is(s, ISL_TOKEN_EXISTS) || - isl_stream_next_token_is(s, ISL_TOKEN_TRUE) || - isl_stream_next_token_is(s, ISL_TOKEN_FALSE) || - isl_stream_next_token_is(s, ISL_TOKEN_MAP)) { - map = read_disjuncts(s, v, map); - if (isl_stream_eat(s, ')')) - goto error; - tok->type = ISL_TOKEN_MAP; - tok->u.map = map; - isl_stream_push_token(s, tok); - return 0; - } - - tok2 = isl_stream_next_token(s); - if (!tok2) - goto error; - line = tok2->line; - col = tok2->col; - isl_stream_push_token(s, tok2); - - pwaff = accept_affine(s, isl_space_wrap(isl_map_get_space(map)), v); - if (!pwaff) - goto error; - - tok2 = isl_token_new(s->ctx, line, col, 0); - if (!tok2) - goto error2; - tok2->type = ISL_TOKEN_AFF; - tok2->u.pwaff = pwaff; - - if (isl_stream_eat_if_available(s, ')')) { - isl_stream_push_token(s, tok2); - isl_token_free(tok); - isl_map_free(map); - return 0; - } - - isl_stream_push_token(s, tok2); - - map = read_disjuncts(s, v, map); - if (isl_stream_eat(s, ')')) - goto error; - - tok->type = ISL_TOKEN_MAP; - tok->u.map = map; - isl_stream_push_token(s, tok); - - return 0; -error2: - isl_pw_aff_free(pwaff); -error: - isl_token_free(tok); - isl_map_free(map); - return -1; -} - -static __isl_give isl_map *read_conjunct(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - if (isl_stream_next_token_is(s, '(')) - if (resolve_paren_expr(s, v, isl_map_copy(map))) - goto error; - - if (isl_stream_next_token_is(s, ISL_TOKEN_MAP)) { - struct isl_token *tok; - tok = isl_stream_next_token(s); - if (!tok) - goto error; - isl_map_free(map); - map = isl_map_copy(tok->u.map); - isl_token_free(tok); - return map; - } - - if (isl_stream_eat_if_available(s, ISL_TOKEN_EXISTS)) - return read_exists(s, v, map); - - if (isl_stream_eat_if_available(s, ISL_TOKEN_TRUE)) - return map; - - if (isl_stream_eat_if_available(s, ISL_TOKEN_FALSE)) { - isl_space *dim = isl_map_get_space(map); - isl_map_free(map); - return isl_map_empty(dim); - } - - return add_constraint(s, v, map); -error: - isl_map_free(map); - return NULL; -} - -static __isl_give isl_map *read_conjuncts(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - isl_map *res; - int negate; - - negate = isl_stream_eat_if_available(s, ISL_TOKEN_NOT); - res = read_conjunct(s, v, isl_map_copy(map)); - if (negate) - res = isl_map_subtract(isl_map_copy(map), res); - - while (isl_stream_eat_if_available(s, ISL_TOKEN_AND)) { - isl_map *res_i; - - negate = isl_stream_eat_if_available(s, ISL_TOKEN_NOT); - res_i = read_conjunct(s, v, isl_map_copy(map)); - if (negate) - res = isl_map_subtract(res, res_i); - else - res = isl_map_intersect(res, res_i); - } - - isl_map_free(map); - return res; -} - -static struct isl_map *read_disjuncts(struct isl_stream *s, - struct vars *v, __isl_take isl_map *map) -{ - isl_map *res; - - if (isl_stream_next_token_is(s, '}')) { - isl_space *dim = isl_map_get_space(map); - isl_map_free(map); - return isl_map_universe(dim); - } - - res = read_conjuncts(s, v, isl_map_copy(map)); - while (isl_stream_eat_if_available(s, ISL_TOKEN_OR)) { - isl_map *res_i; - - res_i = read_conjuncts(s, v, isl_map_copy(map)); - res = isl_map_union(res, res_i); - } - - isl_map_free(map); - return res; -} - -static int polylib_pos_to_isl_pos(__isl_keep isl_basic_map *bmap, int pos) -{ - if (pos < isl_basic_map_dim(bmap, isl_dim_out)) - return 1 + isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in) + pos; - pos -= isl_basic_map_dim(bmap, isl_dim_out); - - if (pos < isl_basic_map_dim(bmap, isl_dim_in)) - return 1 + isl_basic_map_dim(bmap, isl_dim_param) + pos; - pos -= isl_basic_map_dim(bmap, isl_dim_in); - - if (pos < isl_basic_map_dim(bmap, isl_dim_div)) - return 1 + isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in) + - isl_basic_map_dim(bmap, isl_dim_out) + pos; - pos -= isl_basic_map_dim(bmap, isl_dim_div); - - if (pos < isl_basic_map_dim(bmap, isl_dim_param)) - return 1 + pos; - - return 0; -} - -static __isl_give isl_basic_map *basic_map_read_polylib_constraint( - struct isl_stream *s, __isl_take isl_basic_map *bmap) -{ - int j; - struct isl_token *tok; - int type; - int k; - isl_int *c; - unsigned nparam; - unsigned dim; - - if (!bmap) - return NULL; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - dim = isl_basic_map_dim(bmap, isl_dim_out); - - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting coefficient"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - if (!tok->on_new_line) { - isl_stream_error(s, tok, "coefficient should appear on new line"); - isl_stream_push_token(s, tok); - goto error; - } - - type = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - isl_assert(s->ctx, type == 0 || type == 1, goto error); - if (type == 0) { - k = isl_basic_map_alloc_equality(bmap); - c = bmap->eq[k]; - } else { - k = isl_basic_map_alloc_inequality(bmap); - c = bmap->ineq[k]; - } - if (k < 0) - goto error; - - for (j = 0; j < 1 + isl_basic_map_total_dim(bmap); ++j) { - int pos; - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting coefficient"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - if (tok->on_new_line) { - isl_stream_error(s, tok, - "coefficient should not appear on new line"); - isl_stream_push_token(s, tok); - goto error; - } - pos = polylib_pos_to_isl_pos(bmap, j); - isl_int_set(c[pos], tok->u.v); - isl_token_free(tok); - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *basic_map_read_polylib(struct isl_stream *s) -{ - int i; - struct isl_token *tok; - struct isl_token *tok2; - int n_row, n_col; - int on_new_line; - unsigned in = 0, out, local = 0; - struct isl_basic_map *bmap = NULL; - int nparam = 0; - - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - tok2 = isl_stream_next_token(s); - if (!tok2) { - isl_token_free(tok); - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - if (tok->type != ISL_TOKEN_VALUE || tok2->type != ISL_TOKEN_VALUE) { - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - isl_stream_error(s, NULL, - "expecting constraint matrix dimensions"); - return NULL; - } - n_row = isl_int_get_si(tok->u.v); - n_col = isl_int_get_si(tok2->u.v); - on_new_line = tok2->on_new_line; - isl_token_free(tok2); - isl_token_free(tok); - isl_assert(s->ctx, !on_new_line, return NULL); - isl_assert(s->ctx, n_row >= 0, return NULL); - isl_assert(s->ctx, n_col >= 2 + nparam, return NULL); - tok = isl_stream_next_token_on_same_line(s); - if (tok) { - if (tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of output dimensions"); - isl_stream_push_token(s, tok); - goto error; - } - out = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - tok = isl_stream_next_token_on_same_line(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of input dimensions"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - in = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - tok = isl_stream_next_token_on_same_line(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of existentials"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - local = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - tok = isl_stream_next_token_on_same_line(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, - "expecting number of parameters"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - nparam = isl_int_get_si(tok->u.v); - isl_token_free(tok); - if (n_col != 1 + out + in + local + nparam + 1) { - isl_stream_error(s, NULL, - "dimensions don't match"); - goto error; - } - } else - out = n_col - 2 - nparam; - bmap = isl_basic_map_alloc(s->ctx, nparam, in, out, local, n_row, n_row); - if (!bmap) - return NULL; - - for (i = 0; i < local; ++i) { - int k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->div[k], 1 + 1 + nparam + in + out + local); - } - - for (i = 0; i < n_row; ++i) - bmap = basic_map_read_polylib_constraint(s, bmap); - - tok = isl_stream_next_token_on_same_line(s); - if (tok) { - isl_stream_error(s, tok, "unexpected extra token on line"); - isl_stream_push_token(s, tok); - goto error; - } - - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static struct isl_map *map_read_polylib(struct isl_stream *s) -{ - struct isl_token *tok; - struct isl_token *tok2; - int i, n; - struct isl_map *map; - - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - tok2 = isl_stream_next_token_on_same_line(s); - if (tok2 && tok2->type == ISL_TOKEN_VALUE) { - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - return isl_map_from_basic_map(basic_map_read_polylib(s)); - } - if (tok2) { - isl_stream_error(s, tok2, "unexpected token"); - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - return NULL; - } - n = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - isl_assert(s->ctx, n >= 1, return NULL); - - map = isl_map_from_basic_map(basic_map_read_polylib(s)); - - for (i = 1; map && i < n; ++i) - map = isl_map_union(map, - isl_map_from_basic_map(basic_map_read_polylib(s))); - - return map; -} - -static int optional_power(struct isl_stream *s) -{ - int pow; - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 1; - if (tok->type != '^') { - isl_stream_push_token(s, tok); - return 1; - } - isl_token_free(tok); - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting exponent"); - if (tok) - isl_stream_push_token(s, tok); - return 1; - } - pow = isl_int_get_si(tok->u.v); - isl_token_free(tok); - return pow; -} - -static __isl_give isl_pw_qpolynomial *read_term(struct isl_stream *s, - __isl_keep isl_map *map, struct vars *v); - -static __isl_give isl_pw_qpolynomial *read_factor(struct isl_stream *s, - __isl_keep isl_map *map, struct vars *v) -{ - isl_pw_qpolynomial *pwqp; - struct isl_token *tok; - - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - return NULL; - } - if (tok->type == '(') { - int pow; - - isl_token_free(tok); - pwqp = read_term(s, map, v); - if (!pwqp) - return NULL; - if (isl_stream_eat(s, ')')) - goto error; - pow = optional_power(s); - pwqp = isl_pw_qpolynomial_pow(pwqp, pow); - } else if (tok->type == ISL_TOKEN_VALUE) { - struct isl_token *tok2; - tok2 = isl_stream_next_token(s); - isl_qpolynomial *qp; - if (tok2 && tok2->type == '/') { - isl_token_free(tok2); - tok2 = next_token(s); - if (!tok2 || tok2->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok2, "expected denominator"); - isl_token_free(tok); - isl_token_free(tok2); - return NULL; - } - qp = isl_qpolynomial_rat_cst_on_domain(isl_map_get_space(map), - tok->u.v, tok2->u.v); - isl_token_free(tok2); - } else { - isl_stream_push_token(s, tok2); - qp = isl_qpolynomial_cst_on_domain(isl_map_get_space(map), - tok->u.v); - } - isl_token_free(tok); - pwqp = isl_pw_qpolynomial_from_qpolynomial(qp); - } else if (tok->type == ISL_TOKEN_INFTY) { - isl_qpolynomial *qp; - isl_token_free(tok); - qp = isl_qpolynomial_infty_on_domain(isl_map_get_space(map)); - pwqp = isl_pw_qpolynomial_from_qpolynomial(qp); - } else if (tok->type == ISL_TOKEN_NAN) { - isl_qpolynomial *qp; - isl_token_free(tok); - qp = isl_qpolynomial_nan_on_domain(isl_map_get_space(map)); - pwqp = isl_pw_qpolynomial_from_qpolynomial(qp); - } else if (tok->type == ISL_TOKEN_IDENT) { - int n = v->n; - int pos = vars_pos(v, tok->u.s, -1); - int pow; - isl_qpolynomial *qp; - if (pos < 0) { - isl_token_free(tok); - return NULL; - } - if (pos >= n) { - vars_drop(v, v->n - n); - isl_stream_error(s, tok, "unknown identifier"); - isl_token_free(tok); - return NULL; - } - isl_token_free(tok); - pow = optional_power(s); - qp = isl_qpolynomial_var_pow_on_domain(isl_map_get_space(map), pos, pow); - pwqp = isl_pw_qpolynomial_from_qpolynomial(qp); - } else if (tok->type == '[') { - isl_pw_aff *pwaff; - int pow; - - isl_stream_push_token(s, tok); - pwaff = accept_affine(s, isl_map_get_space(map), v); - pow = optional_power(s); - pwqp = isl_pw_qpolynomial_from_pw_aff(pwaff); - pwqp = isl_pw_qpolynomial_pow(pwqp, pow); - } else if (tok->type == '-') { - isl_token_free(tok); - pwqp = read_factor(s, map, v); - pwqp = isl_pw_qpolynomial_neg(pwqp); - } else { - isl_stream_error(s, tok, "unexpected isl_token"); - isl_stream_push_token(s, tok); - return NULL; - } - - if (isl_stream_eat_if_available(s, '*') || - isl_stream_next_token_is(s, ISL_TOKEN_IDENT)) { - isl_pw_qpolynomial *pwqp2; - - pwqp2 = read_factor(s, map, v); - pwqp = isl_pw_qpolynomial_mul(pwqp, pwqp2); - } - - return pwqp; -error: - isl_pw_qpolynomial_free(pwqp); - return NULL; -} - -static __isl_give isl_pw_qpolynomial *read_term(struct isl_stream *s, - __isl_keep isl_map *map, struct vars *v) -{ - struct isl_token *tok; - isl_pw_qpolynomial *pwqp; - - pwqp = read_factor(s, map, v); - - for (;;) { - tok = next_token(s); - if (!tok) - return pwqp; - - if (tok->type == '+') { - isl_pw_qpolynomial *pwqp2; - - isl_token_free(tok); - pwqp2 = read_factor(s, map, v); - pwqp = isl_pw_qpolynomial_add(pwqp, pwqp2); - } else if (tok->type == '-') { - isl_pw_qpolynomial *pwqp2; - - isl_token_free(tok); - pwqp2 = read_factor(s, map, v); - pwqp = isl_pw_qpolynomial_sub(pwqp, pwqp2); - } else if (tok->type == ISL_TOKEN_VALUE && - isl_int_is_neg(tok->u.v)) { - isl_pw_qpolynomial *pwqp2; - - isl_stream_push_token(s, tok); - pwqp2 = read_factor(s, map, v); - pwqp = isl_pw_qpolynomial_add(pwqp, pwqp2); - } else { - isl_stream_push_token(s, tok); - break; - } - } - - return pwqp; -} - -static __isl_give isl_map *read_optional_disjuncts(struct isl_stream *s, - __isl_take isl_map *map, struct vars *v) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type == ':' || - (tok->type == ISL_TOKEN_OR && !strcmp(tok->u.s, "|"))) { - isl_token_free(tok); - map = read_disjuncts(s, v, map); - } else - isl_stream_push_token(s, tok); - - return map; -error: - isl_map_free(map); - return NULL; -} - -static struct isl_obj obj_read_poly(struct isl_stream *s, - __isl_take isl_map *map, struct vars *v, int n) -{ - struct isl_obj obj = { isl_obj_pw_qpolynomial, NULL }; - isl_pw_qpolynomial *pwqp; - struct isl_set *set; - - pwqp = read_term(s, map, v); - map = read_optional_disjuncts(s, map, v); - set = isl_map_range(map); - - pwqp = isl_pw_qpolynomial_intersect_domain(pwqp, set); - - vars_drop(v, v->n - n); - - obj.v = pwqp; - return obj; -} - -static struct isl_obj obj_read_poly_or_fold(struct isl_stream *s, - __isl_take isl_set *set, struct vars *v, int n) -{ - struct isl_obj obj = { isl_obj_pw_qpolynomial_fold, NULL }; - isl_pw_qpolynomial *pwqp; - isl_pw_qpolynomial_fold *pwf = NULL; - - if (!isl_stream_eat_if_available(s, ISL_TOKEN_MAX)) - return obj_read_poly(s, set, v, n); - - if (isl_stream_eat(s, '(')) - goto error; - - pwqp = read_term(s, set, v); - pwf = isl_pw_qpolynomial_fold_from_pw_qpolynomial(isl_fold_max, pwqp); - - while (isl_stream_eat_if_available(s, ',')) { - isl_pw_qpolynomial_fold *pwf_i; - pwqp = read_term(s, set, v); - pwf_i = isl_pw_qpolynomial_fold_from_pw_qpolynomial(isl_fold_max, - pwqp); - pwf = isl_pw_qpolynomial_fold_fold(pwf, pwf_i); - } - - if (isl_stream_eat(s, ')')) - goto error; - - set = read_optional_disjuncts(s, set, v); - pwf = isl_pw_qpolynomial_fold_intersect_domain(pwf, set); - - vars_drop(v, v->n - n); - - obj.v = pwf; - return obj; -error: - isl_set_free(set); - isl_pw_qpolynomial_fold_free(pwf); - obj.type = isl_obj_none; - return obj; -} - -static int is_rational(struct isl_stream *s) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - if (tok->type == ISL_TOKEN_RAT && isl_stream_next_token_is(s, ':')) { - isl_token_free(tok); - isl_stream_eat(s, ':'); - return 1; - } - - isl_stream_push_token(s, tok); - - return 0; -} - -static struct isl_obj obj_read_body(struct isl_stream *s, - __isl_take isl_map *map, struct vars *v) -{ - struct isl_token *tok; - struct isl_obj obj = { isl_obj_set, NULL }; - int n = v->n; - - if (is_rational(s)) - map = isl_map_set_rational(map); - - if (isl_stream_next_token_is(s, ':')) { - obj.type = isl_obj_set; - obj.v = read_optional_disjuncts(s, map, v); - return obj; - } - - if (!next_is_tuple(s)) - return obj_read_poly_or_fold(s, map, v, n); - - map = read_tuple(s, map, isl_dim_in, v); - if (!map) - goto error; - tok = isl_stream_next_token(s); - if (tok && tok->type == ISL_TOKEN_TO) { - obj.type = isl_obj_map; - isl_token_free(tok); - if (!next_is_tuple(s)) { - isl_set *set = isl_map_domain(map); - return obj_read_poly_or_fold(s, set, v, n); - } - map = read_tuple(s, map, isl_dim_out, v); - if (!map) - goto error; - } else { - map = isl_map_reverse(map); - if (tok) - isl_stream_push_token(s, tok); - } - - map = read_optional_disjuncts(s, map, v); - - vars_drop(v, v->n - n); - - obj.v = map; - return obj; -error: - isl_map_free(map); - obj.type = isl_obj_none; - return obj; -} - -static struct isl_obj to_union(isl_ctx *ctx, struct isl_obj obj) -{ - if (obj.type == isl_obj_map) { - obj.v = isl_union_map_from_map(obj.v); - obj.type = isl_obj_union_map; - } else if (obj.type == isl_obj_set) { - obj.v = isl_union_set_from_set(obj.v); - obj.type = isl_obj_union_set; - } else if (obj.type == isl_obj_pw_qpolynomial) { - obj.v = isl_union_pw_qpolynomial_from_pw_qpolynomial(obj.v); - obj.type = isl_obj_union_pw_qpolynomial; - } else if (obj.type == isl_obj_pw_qpolynomial_fold) { - obj.v = isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(obj.v); - obj.type = isl_obj_union_pw_qpolynomial_fold; - } else - isl_assert(ctx, 0, goto error); - return obj; -error: - obj.type->free(obj.v); - obj.type = isl_obj_none; - return obj; -} - -static struct isl_obj obj_add(struct isl_ctx *ctx, - struct isl_obj obj1, struct isl_obj obj2) -{ - if (obj1.type == isl_obj_set && obj2.type == isl_obj_union_set) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_set && obj2.type == isl_obj_set) - obj2 = to_union(ctx, obj2); - if (obj1.type == isl_obj_map && obj2.type == isl_obj_union_map) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_map && obj2.type == isl_obj_map) - obj2 = to_union(ctx, obj2); - if (obj1.type == isl_obj_pw_qpolynomial && - obj2.type == isl_obj_union_pw_qpolynomial) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_pw_qpolynomial && - obj2.type == isl_obj_pw_qpolynomial) - obj2 = to_union(ctx, obj2); - if (obj1.type == isl_obj_pw_qpolynomial_fold && - obj2.type == isl_obj_union_pw_qpolynomial_fold) - obj1 = to_union(ctx, obj1); - if (obj1.type == isl_obj_union_pw_qpolynomial_fold && - obj2.type == isl_obj_pw_qpolynomial_fold) - obj2 = to_union(ctx, obj2); - isl_assert(ctx, obj1.type == obj2.type, goto error); - if (obj1.type == isl_obj_map && !isl_map_has_equal_space(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - if (obj1.type == isl_obj_set && !isl_set_has_equal_space(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - if (obj1.type == isl_obj_pw_qpolynomial && - !isl_pw_qpolynomial_has_equal_space(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - if (obj1.type == isl_obj_pw_qpolynomial_fold && - !isl_pw_qpolynomial_fold_has_equal_space(obj1.v, obj2.v)) { - obj1 = to_union(ctx, obj1); - obj2 = to_union(ctx, obj2); - } - obj1.v = obj1.type->add(obj1.v, obj2.v); - return obj1; -error: - obj1.type->free(obj1.v); - obj2.type->free(obj2.v); - obj1.type = isl_obj_none; - obj1.v = NULL; - return obj1; -} - -static struct isl_obj obj_read(struct isl_stream *s) -{ - isl_map *map = NULL; - struct isl_token *tok; - struct vars *v = NULL; - struct isl_obj obj = { isl_obj_set, NULL }; - - tok = next_token(s); - if (!tok) { - isl_stream_error(s, NULL, "unexpected EOF"); - goto error; - } - if (tok->type == ISL_TOKEN_VALUE) { - struct isl_token *tok2; - struct isl_map *map; - - tok2 = isl_stream_next_token(s); - if (!tok2 || tok2->type != ISL_TOKEN_VALUE || - isl_int_is_neg(tok2->u.v)) { - if (tok2) - isl_stream_push_token(s, tok2); - obj.type = isl_obj_int; - obj.v = isl_int_obj_alloc(s->ctx, tok->u.v); - isl_token_free(tok); - return obj; - } - isl_stream_push_token(s, tok2); - isl_stream_push_token(s, tok); - map = map_read_polylib(s); - if (!map) - goto error; - if (isl_map_may_be_set(map)) - obj.v = isl_map_range(map); - else { - obj.type = isl_obj_map; - obj.v = map; - } - return obj; - } - v = vars_new(s->ctx); - if (!v) { - isl_stream_push_token(s, tok); - goto error; - } - map = isl_map_universe(isl_space_params_alloc(s->ctx, 0)); - if (tok->type == '[') { - isl_stream_push_token(s, tok); - map = read_tuple(s, map, isl_dim_param, v); - if (!map) - goto error; - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_TO) { - isl_stream_error(s, tok, "expecting '->'"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - isl_token_free(tok); - tok = isl_stream_next_token(s); - } - if (!tok || tok->type != '{') { - isl_stream_error(s, tok, "expecting '{'"); - if (tok) - isl_stream_push_token(s, tok); - goto error; - } - isl_token_free(tok); - - tok = isl_stream_next_token(s); - if (!tok) - ; - else if (tok->type == ISL_TOKEN_IDENT && !strcmp(tok->u.s, "Sym")) { - isl_token_free(tok); - if (isl_stream_eat(s, '=')) - goto error; - map = read_tuple(s, map, isl_dim_param, v); - if (!map) - goto error; - } else if (tok->type == '}') { - obj.type = isl_obj_union_set; - obj.v = isl_union_set_empty(isl_map_get_space(map)); - isl_token_free(tok); - goto done; - } else - isl_stream_push_token(s, tok); - - for (;;) { - struct isl_obj o; - tok = NULL; - o = obj_read_body(s, isl_map_copy(map), v); - if (o.type == isl_obj_none || !o.v) - goto error; - if (!obj.v) - obj = o; - else { - obj = obj_add(s->ctx, obj, o); - if (obj.type == isl_obj_none || !obj.v) - goto error; - } - tok = isl_stream_next_token(s); - if (!tok || tok->type != ';') - break; - isl_token_free(tok); - if (isl_stream_next_token_is(s, '}')) { - tok = isl_stream_next_token(s); - break; - } - } - - if (tok && tok->type == '}') { - isl_token_free(tok); - } else { - isl_stream_error(s, tok, "unexpected isl_token"); - if (tok) - isl_token_free(tok); - goto error; - } -done: - vars_free(v); - isl_map_free(map); - - return obj; -error: - isl_map_free(map); - obj.type->free(obj.v); - if (v) - vars_free(v); - obj.v = NULL; - return obj; -} - -struct isl_obj isl_stream_read_obj(struct isl_stream *s) -{ - return obj_read(s); -} - -__isl_give isl_map *isl_stream_read_map(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_map || - obj.type == isl_obj_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_set *isl_stream_read_set(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (obj.v) { - if (obj.type == isl_obj_map && isl_map_may_be_set(obj.v)) { - obj.v = isl_map_range(obj.v); - obj.type = isl_obj_set; - } - isl_assert(s->ctx, obj.type == isl_obj_set, goto error); - } - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_union_map *isl_stream_read_union_map(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (obj.type == isl_obj_map) { - obj.type = isl_obj_union_map; - obj.v = isl_union_map_from_map(obj.v); - } - if (obj.type == isl_obj_set) { - obj.type = isl_obj_union_set; - obj.v = isl_union_set_from_set(obj.v); - } - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_union_map || - obj.type == isl_obj_union_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_union_set *isl_stream_read_union_set(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (obj.type == isl_obj_set) { - obj.type = isl_obj_union_set; - obj.v = isl_union_set_from_set(obj.v); - } - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_union_set, goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -static __isl_give isl_basic_map *basic_map_read(struct isl_stream *s) -{ - struct isl_obj obj; - struct isl_map *map; - struct isl_basic_map *bmap; - - obj = obj_read(s); - map = obj.v; - if (!map) - return NULL; - - isl_assert(map->ctx, map->n <= 1, goto error); - - if (map->n == 0) - bmap = isl_basic_map_empty_like_map(map); - else - bmap = isl_basic_map_copy(map->p[0]); - - isl_map_free(map); - - return bmap; -error: - isl_map_free(map); - return NULL; -} - -static __isl_give isl_basic_set *basic_set_read(struct isl_stream *s) -{ - isl_basic_map *bmap; - bmap = basic_map_read(s); - if (!bmap) - return NULL; - if (!isl_basic_map_may_be_set(bmap)) - isl_die(s->ctx, isl_error_invalid, - "input is not a set", goto error); - return isl_basic_map_range(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx, - FILE *input) -{ - struct isl_basic_map *bmap; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - bmap = basic_map_read(s); - isl_stream_free(s); - return bmap; -} - -__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_basic_set *bset; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - bset = basic_set_read(s); - isl_stream_free(s); - return bset; -} - -struct isl_basic_map *isl_basic_map_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - struct isl_basic_map *bmap; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - bmap = basic_map_read(s); - isl_stream_free(s); - return bmap; -} - -struct isl_basic_set *isl_basic_set_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - isl_basic_set *bset; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - bset = basic_set_read(s); - isl_stream_free(s); - return bset; -} - -__isl_give isl_map *isl_map_read_from_file(struct isl_ctx *ctx, - FILE *input) -{ - struct isl_map *map; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - map = isl_stream_read_map(s); - isl_stream_free(s); - return map; -} - -__isl_give isl_map *isl_map_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - struct isl_map *map; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - map = isl_stream_read_map(s); - isl_stream_free(s); - return map; -} - -__isl_give isl_set *isl_set_read_from_file(struct isl_ctx *ctx, - FILE *input) -{ - isl_set *set; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - set = isl_stream_read_set(s); - isl_stream_free(s); - return set; -} - -struct isl_set *isl_set_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - isl_set *set; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - set = isl_stream_read_set(s); - isl_stream_free(s); - return set; -} - -__isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_union_map *umap; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - umap = isl_stream_read_union_map(s); - isl_stream_free(s); - return umap; -} - -__isl_give isl_union_map *isl_union_map_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - isl_union_map *umap; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - umap = isl_stream_read_union_map(s); - isl_stream_free(s); - return umap; -} - -__isl_give isl_union_set *isl_union_set_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_union_set *uset; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - uset = isl_stream_read_union_set(s); - isl_stream_free(s); - return uset; -} - -__isl_give isl_union_set *isl_union_set_read_from_str(struct isl_ctx *ctx, - const char *str) -{ - isl_union_set *uset; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - uset = isl_stream_read_union_set(s); - isl_stream_free(s); - return uset; -} - -static __isl_give isl_vec *isl_vec_read_polylib(struct isl_stream *s) -{ - struct isl_vec *vec = NULL; - struct isl_token *tok; - unsigned size; - int j; - - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting vector length"); - goto error; - } - - size = isl_int_get_si(tok->u.v); - isl_token_free(tok); - - vec = isl_vec_alloc(s->ctx, size); - - for (j = 0; j < size; ++j) { - tok = isl_stream_next_token(s); - if (!tok || tok->type != ISL_TOKEN_VALUE) { - isl_stream_error(s, tok, "expecting constant value"); - goto error; - } - isl_int_set(vec->el[j], tok->u.v); - isl_token_free(tok); - } - - return vec; -error: - isl_token_free(tok); - isl_vec_free(vec); - return NULL; -} - -static __isl_give isl_vec *vec_read(struct isl_stream *s) -{ - return isl_vec_read_polylib(s); -} - -__isl_give isl_vec *isl_vec_read_from_file(isl_ctx *ctx, FILE *input) -{ - isl_vec *v; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - v = vec_read(s); - isl_stream_free(s); - return v; -} - -__isl_give isl_pw_qpolynomial *isl_stream_read_pw_qpolynomial( - struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_pw_qpolynomial, - goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx, - const char *str) -{ - isl_pw_qpolynomial *pwqp; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - pwqp = isl_stream_read_pw_qpolynomial(s); - isl_stream_free(s); - return pwqp; -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx, - FILE *input) -{ - isl_pw_qpolynomial *pwqp; - struct isl_stream *s = isl_stream_new_file(ctx, input); - if (!s) - return NULL; - pwqp = isl_stream_read_pw_qpolynomial(s); - isl_stream_free(s); - return pwqp; -} - -/* Read an affine expression from "s" with domain (space) "dom". - * We call accept_affine to parse a possibly piecewise affine expression - * and then check that the result is a single affine expression on - * a universe domain. - */ -static __isl_give isl_aff *read_aff_with_dom(struct isl_stream *s, - __isl_take isl_set *dom, struct vars *v) -{ - isl_aff *aff = NULL; - isl_pw_aff *pwaff = NULL; - - if (!isl_set_plain_is_universe(dom)) - isl_die(s->ctx, isl_error_invalid, - "expecting universe domain", goto error); - - if (!isl_set_is_params(dom) && isl_stream_eat(s, ISL_TOKEN_TO)) - goto error; - - if (isl_stream_eat(s, '[')) - goto error; - - pwaff = accept_affine(s, isl_set_get_space(dom), v); - - if (isl_stream_eat(s, ']')) - goto error; - if (isl_stream_eat(s, '}')) - goto error; - - if (!pwaff) - goto error; - - if (pwaff->n != 1) - isl_die(s->ctx, isl_error_invalid, - "expecting single affine expression", goto error); - if (!isl_set_plain_is_universe(pwaff->p[0].set)) - isl_die(s->ctx, isl_error_invalid, - "expecting universe domain", goto error); - - aff = isl_aff_copy(pwaff->p[0].aff); - - vars_free(v); - isl_pw_aff_free(pwaff); - isl_set_free(dom); - return aff; -error: - vars_free(v); - isl_pw_aff_free(pwaff); - isl_set_free(dom); - return NULL; -} - -/* Is the next token an identifer not in "v"? - */ -static int next_is_fresh_ident(struct isl_stream *s, struct vars *v) -{ - int n = v->n; - int fresh; - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - fresh = tok->type == ISL_TOKEN_IDENT && vars_pos(v, tok->u.s, -1) >= n; - isl_stream_push_token(s, tok); - - vars_drop(v, v->n - n); - - return fresh; -} - -/* First read the domain of the affine expression, which may be - * a parameter space or a set. - * The tricky part is that we don't know if the domain is a set or not, - * so when we are trying to read the domain, we may actually be reading - * the affine expression itself (defined on a parameter domains) - * If the tuple we are reading is named, we assume it's the domain. - * Also, if inside the tuple, the first thing we find is a nested tuple - * or a new identifier, we again assume it's the domain. - * Otherwise, we assume we are reading an affine expression. - */ -static __isl_give isl_set *read_aff_domain(struct isl_stream *s, - __isl_take isl_set *dom, struct vars *v) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (tok && (tok->type == ISL_TOKEN_IDENT || tok->is_keyword)) { - isl_stream_push_token(s, tok); - return read_tuple(s, dom, isl_dim_set, v); - } - if (!tok || tok->type != '[') { - isl_stream_error(s, tok, "expecting '['"); - goto error; - } - if (next_is_tuple(s) || next_is_fresh_ident(s, v)) { - isl_stream_push_token(s, tok); - dom = read_tuple(s, dom, isl_dim_set, v); - } else - isl_stream_push_token(s, tok); - - return dom; -error: - if (tok) - isl_stream_push_token(s, tok); - vars_free(v); - isl_set_free(dom); - return NULL; -} - -/* Read an affine expression from "s". - * We first read the domain of the affine expression, which may be - * a parameter space or a set, and then call read_aff_with_dom. - */ -__isl_give isl_aff *isl_stream_read_aff(struct isl_stream *s) -{ - struct vars *v; - isl_set *dom = NULL; - - v = vars_new(s->ctx); - if (!v) - return NULL; - - dom = isl_set_universe(isl_space_params_alloc(s->ctx, 0)); - if (next_is_tuple(s)) { - dom = read_tuple(s, dom, isl_dim_param, v); - if (isl_stream_eat(s, ISL_TOKEN_TO)) - goto error; - } - if (isl_stream_eat(s, '{')) - goto error; - - dom = read_aff_domain(s, dom, v); - return read_aff_with_dom(s, dom, v); -error: - vars_free(v); - isl_set_free(dom); - return NULL; -} - -/* Read a piecewise affine expression from "s" with domain (space) "dom". - */ -static __isl_give isl_pw_aff *read_pw_aff_with_dom(struct isl_stream *s, - __isl_take isl_set *dom, struct vars *v) -{ - isl_pw_aff *pwaff = NULL; - - if (!isl_set_is_params(dom) && isl_stream_eat(s, ISL_TOKEN_TO)) - goto error; - - if (isl_stream_eat(s, '[')) - goto error; - - pwaff = accept_affine(s, isl_set_get_space(dom), v); - - if (isl_stream_eat(s, ']')) - goto error; - - dom = read_optional_disjuncts(s, dom, v); - pwaff = isl_pw_aff_intersect_domain(pwaff, dom); - - return pwaff; -error: - isl_set_free(dom); - isl_pw_aff_free(pwaff); - return NULL; -} - -__isl_give isl_pw_aff *isl_stream_read_pw_aff(struct isl_stream *s) -{ - struct vars *v; - isl_set *dom = NULL; - isl_set *aff_dom; - isl_pw_aff *pa = NULL; - int n; - - v = vars_new(s->ctx); - if (!v) - return NULL; - - dom = isl_set_universe(isl_space_params_alloc(s->ctx, 0)); - if (next_is_tuple(s)) { - dom = read_tuple(s, dom, isl_dim_param, v); - if (isl_stream_eat(s, ISL_TOKEN_TO)) - goto error; - } - if (isl_stream_eat(s, '{')) - goto error; - - n = v->n; - aff_dom = read_aff_domain(s, isl_set_copy(dom), v); - pa = read_pw_aff_with_dom(s, aff_dom, v); - vars_drop(v, v->n - n); - - while (isl_stream_eat_if_available(s, ';')) { - isl_pw_aff *pa_i; - - n = v->n; - aff_dom = read_aff_domain(s, isl_set_copy(dom), v); - pa_i = read_pw_aff_with_dom(s, aff_dom, v); - vars_drop(v, v->n - n); - - pa = isl_pw_aff_add(pa, pa_i); - } - - if (isl_stream_eat(s, '}')) - goto error; - - vars_free(v); - isl_set_free(dom); - return pa; -error: - vars_free(v); - isl_set_free(dom); - isl_pw_aff_free(pa); - return NULL; -} - -__isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str) -{ - isl_aff *aff; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - aff = isl_stream_read_aff(s); - isl_stream_free(s); - return aff; -} - -__isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str) -{ - isl_pw_aff *pa; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - pa = isl_stream_read_pw_aff(s); - isl_stream_free(s); - return pa; -} - -/* Read an isl_pw_multi_aff from "s". - * We currently read a generic object and if it turns out to be a set or - * a map, we convert that to an isl_pw_multi_aff. - * It would be more efficient if we were to construct the isl_pw_multi_aff - * directly. - */ -__isl_give isl_pw_multi_aff *isl_stream_read_pw_multi_aff(struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (!obj.v) - return NULL; - - if (obj.type == isl_obj_map) - return isl_pw_multi_aff_from_map(obj.v); - if (obj.type == isl_obj_set) - return isl_pw_multi_aff_from_set(obj.v); - - obj.type->free(obj.v); - isl_die(s->ctx, isl_error_invalid, "unexpected object type", - return NULL); -} - -__isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx, - const char *str) -{ - isl_pw_multi_aff *pma; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - pma = isl_stream_read_pw_multi_aff(s); - isl_stream_free(s); - return pma; -} - -/* Read a multi-affine expression from "s". - * We call isl_stream_read_pw_multi_aff to parse a possibly piecewise - * multi-affine expression and then check that the result is - * a single multi-affine expression on a universe domain. - */ -__isl_give isl_multi_aff *isl_stream_read_multi_aff(struct isl_stream *s) -{ - isl_pw_multi_aff *pma; - isl_multi_aff *maff; - - pma = isl_stream_read_pw_multi_aff(s); - if (!pma) - return NULL; - if (pma->n != 1) - isl_die(s->ctx, isl_error_invalid, - "expecting single list of affine expressions", - return isl_pw_multi_aff_free(pma)); - if (!isl_set_plain_is_universe(pma->p[0].set)) - isl_die(s->ctx, isl_error_invalid, "expecting universe domain", - return isl_pw_multi_aff_free(pma)); - maff = isl_multi_aff_copy(pma->p[0].maff); - isl_pw_multi_aff_free(pma); - return maff; -} - -__isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx, - const char *str) -{ - isl_multi_aff *maff; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - maff = isl_stream_read_multi_aff(s); - isl_stream_free(s); - return maff; -} - -__isl_give isl_union_pw_qpolynomial *isl_stream_read_union_pw_qpolynomial( - struct isl_stream *s) -{ - struct isl_obj obj; - - obj = obj_read(s); - if (obj.type == isl_obj_pw_qpolynomial) { - obj.type = isl_obj_union_pw_qpolynomial; - obj.v = isl_union_pw_qpolynomial_from_pw_qpolynomial(obj.v); - } - if (obj.v) - isl_assert(s->ctx, obj.type == isl_obj_union_pw_qpolynomial, - goto error); - - return obj.v; -error: - obj.type->free(obj.v); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_read_from_str( - isl_ctx *ctx, const char *str) -{ - isl_union_pw_qpolynomial *upwqp; - struct isl_stream *s = isl_stream_new_str(ctx, str); - if (!s) - return NULL; - upwqp = isl_stream_read_union_pw_qpolynomial(s); - isl_stream_free(s); - return upwqp; -} diff --git a/cloog-0.17.0/isl/isl_list.c b/cloog-0.17.0/isl/isl_list.c deleted file mode 100644 index 27baab10919b1f839fea73d93e7e941ec132615b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_list.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include - -#undef BASE -#define BASE basic_set - -#include - -#undef BASE -#define BASE set - -#include - -#undef BASE -#define BASE aff - -#include - -#undef BASE -#define BASE pw_aff - -#include - -#undef BASE -#define BASE band - -#include diff --git a/cloog-0.17.0/isl/isl_list_private.h b/cloog-0.17.0/isl/isl_list_private.h deleted file mode 100644 index da57f41edf7820f431c52105e7bb24aba0e65900..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_list_private.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef ISL_LIST_PRIVATE_H -#define ISL_LIST_PRIVATE_H - -#include - -#undef EL -#define EL isl_basic_set - -#include - -#undef EL -#define EL isl_set - -#include - -#undef EL -#define EL isl_aff - -#include - -#undef EL -#define EL isl_pw_aff - -#include - -#undef EL -#define EL isl_band - -#include - -#endif diff --git a/cloog-0.17.0/isl/isl_list_templ.c b/cloog-0.17.0/isl/isl_list_templ.c deleted file mode 100644 index 9aa4351b5cf09600b18f12928363f0d0ead5c169..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_list_templ.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#define xCAT(A,B) A ## B -#define CAT(A,B) xCAT(A,B) -#undef EL -#define EL CAT(isl_,BASE) -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xLIST(EL) EL ## _list -#define LIST(EL) xLIST(EL) - -isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list) -{ - return list ? list->ctx : NULL; -} - -__isl_give LIST(EL) *FN(LIST(EL),alloc)(isl_ctx *ctx, int n) -{ - LIST(EL) *list; - - if (n < 0) - isl_die(ctx, isl_error_invalid, - "cannot create list of negative length", - return NULL); - list = isl_alloc(ctx, LIST(EL), - sizeof(LIST(EL)) + (n - 1) * sizeof(struct EL *)); - if (!list) - return NULL; - - list->ctx = ctx; - isl_ctx_ref(ctx); - list->ref = 1; - list->size = n; - list->n = 0; - return list; -} - -__isl_give LIST(EL) *FN(LIST(EL),copy)(__isl_keep LIST(EL) *list) -{ - if (!list) - return NULL; - - list->ref++; - return list; -} - -__isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list) -{ - int i; - LIST(EL) *dup; - - if (!list) - return NULL; - - dup = FN(LIST(EL),alloc)(FN(LIST(EL),get_ctx)(list), list->n); - if (!dup) - return NULL; - for (i = 0; i < list->n; ++i) - dup = FN(LIST(EL),add)(dup, FN(EL,copy)(list->p[i])); - return dup; -} - -__isl_give LIST(EL) *FN(LIST(EL),add)(__isl_take LIST(EL) *list, - __isl_take struct EL *el) -{ - if (!list || !el) - goto error; - isl_assert(list->ctx, list->n < list->size, goto error); - list->p[list->n] = el; - list->n++; - return list; -error: - FN(EL,free)(el); - FN(LIST(EL),free)(list); - return NULL; -} - -void *FN(LIST(EL),free)(__isl_take LIST(EL) *list) -{ - int i; - - if (!list) - return NULL; - - if (--list->ref > 0) - return NULL; - - isl_ctx_deref(list->ctx); - for (i = 0; i < list->n; ++i) - FN(EL,free)(list->p[i]); - free(list); - - return NULL; -} - -int FN(FN(LIST(EL),n),BASE)(__isl_keep LIST(EL) *list) -{ - return list ? list->n : 0; -} - -__isl_give EL *FN(FN(LIST(EL),get),BASE)(__isl_keep LIST(EL) *list, int index) -{ - if (!list) - return NULL; - if (index < 0 || index >= list->n) - isl_die(list->ctx, isl_error_invalid, - "index out of bounds", return NULL); - return FN(EL,copy)(list->p[index]); -} - -int FN(LIST(EL),foreach)(__isl_keep LIST(EL) *list, - int (*fn)(__isl_take EL *el, void *user), void *user) -{ - int i; - - if (!list) - return -1; - - for (i = 0; i < list->n; ++i) { - EL *el = FN(EL,copy(list->p[i])); - if (!el) - return -1; - if (fn(el, user) < 0) - return -1; - } - - return 0; -} - -__isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el) -{ - isl_ctx *ctx; - LIST(EL) *list; - - if (!el) - return NULL; - ctx = FN(EL,get_ctx)(el); - list = FN(LIST(EL),alloc)(ctx, 1); - if (!list) - goto error; - list = FN(LIST(EL),add)(list, el); - return list; -error: - FN(EL,free)(el); - return NULL; -} - -__isl_give LIST(EL) *FN(LIST(EL),concat)(__isl_take LIST(EL) *list1, - __isl_take LIST(EL) *list2) -{ - int i; - isl_ctx *ctx; - LIST(EL) *res; - - if (!list1 || !list2) - goto error; - - ctx = FN(LIST(EL),get_ctx)(list1); - res = FN(LIST(EL),alloc)(ctx, list1->n + list2->n); - for (i = 0; i < list1->n; ++i) - res = FN(LIST(EL),add)(res, FN(EL,copy)(list1->p[i])); - for (i = 0; i < list2->n; ++i) - res = FN(LIST(EL),add)(res, FN(EL,copy)(list2->p[i])); - - FN(LIST(EL),free)(list1); - FN(LIST(EL),free)(list2); - return res; -error: - FN(LIST(EL),free)(list1); - FN(LIST(EL),free)(list2); - return NULL; -} - -__isl_give isl_printer *CAT(isl_printer_print_,LIST(BASE))( - __isl_take isl_printer *p, __isl_keep LIST(EL) *list) -{ - int i; - - if (!p || !list) - goto error; - p = isl_printer_print_str(p, "("); - for (i = 0; i < list->n; ++i) { - if (i) - p = isl_printer_print_str(p, ","); - p = CAT(isl_printer_print_,BASE)(p, list->p[i]); - } - p = isl_printer_print_str(p, ")"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void FN(LIST(EL),dump)(__isl_keep LIST(EL) *list) -{ - isl_printer *printer; - - if (!list) - return; - - printer = isl_printer_to_file(FN(LIST(EL),get_ctx)(list), stderr); - printer = CAT(isl_printer_print_,LIST(BASE))(printer, list); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} diff --git a/cloog-0.17.0/isl/isl_list_templ.h b/cloog-0.17.0/isl/isl_list_templ.h deleted file mode 100644 index 9c60f5a3d46620e54a503bed38c825a3dad4a2f7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_list_templ.h +++ /dev/null @@ -1,24 +0,0 @@ -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xLIST(EL) EL ## _list -#define LIST(EL) xLIST(EL) - -struct LIST(EL) { - int ref; - isl_ctx *ctx; - - int n; - - size_t size; - struct EL *p[1]; -}; - -#define ISL_DECLARE_LIST_PRIVATE(EL) \ -__isl_give isl_##EL##_list *isl_##EL##_list_dup( \ - __isl_keep isl_##EL##_list *list); - -ISL_DECLARE_LIST_PRIVATE(basic_set) -ISL_DECLARE_LIST_PRIVATE(set) -ISL_DECLARE_LIST_PRIVATE(aff) -ISL_DECLARE_LIST_PRIVATE(pw_aff) -ISL_DECLARE_LIST_PRIVATE(band) diff --git a/cloog-0.17.0/isl/isl_local_space.c b/cloog-0.17.0/isl/isl_local_space.c deleted file mode 100644 index a57fff1aa24b681ae47c6a4850b2b4407c2f246e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_local_space.c +++ /dev/null @@ -1,897 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_local_space_get_ctx(__isl_keep isl_local_space *ls) -{ - return ls ? ls->dim->ctx : NULL; -} - -__isl_give isl_local_space *isl_local_space_alloc_div(__isl_take isl_space *dim, - __isl_take isl_mat *div) -{ - isl_ctx *ctx; - isl_local_space *ls = NULL; - - if (!dim) - goto error; - - ctx = isl_space_get_ctx(dim); - ls = isl_calloc_type(ctx, struct isl_local_space); - if (!ls) - goto error; - - ls->ref = 1; - ls->dim = dim; - ls->div = div; - - return ls; -error: - isl_space_free(dim); - isl_local_space_free(ls); - return NULL; -} - -__isl_give isl_local_space *isl_local_space_alloc(__isl_take isl_space *dim, - unsigned n_div) -{ - isl_ctx *ctx; - isl_mat *div; - unsigned total; - - if (!dim) - return NULL; - - total = isl_space_dim(dim, isl_dim_all); - - ctx = isl_space_get_ctx(dim); - div = isl_mat_alloc(ctx, n_div, 1 + 1 + total + n_div); - return isl_local_space_alloc_div(dim, div); -} - -__isl_give isl_local_space *isl_local_space_from_space(__isl_take isl_space *dim) -{ - return isl_local_space_alloc(dim, 0); -} - -__isl_give isl_local_space *isl_local_space_copy(__isl_keep isl_local_space *ls) -{ - if (!ls) - return NULL; - - ls->ref++; - return ls; -} - -__isl_give isl_local_space *isl_local_space_dup(__isl_keep isl_local_space *ls) -{ - if (!ls) - return NULL; - - return isl_local_space_alloc_div(isl_space_copy(ls->dim), - isl_mat_copy(ls->div)); - -} - -__isl_give isl_local_space *isl_local_space_cow(__isl_take isl_local_space *ls) -{ - if (!ls) - return NULL; - - if (ls->ref == 1) - return ls; - ls->ref--; - return isl_local_space_dup(ls); -} - -void *isl_local_space_free(__isl_take isl_local_space *ls) -{ - if (!ls) - return NULL; - - if (--ls->ref > 0) - return NULL; - - isl_space_free(ls->dim); - isl_mat_free(ls->div); - - free(ls); - - return NULL; -} - -/* Is the local space that of a set? - */ -int isl_local_space_is_set(__isl_keep isl_local_space *ls) -{ - return ls ? isl_space_is_set(ls->dim) : -1; -} - -/* Return true if the two local spaces are identical, with identical - * expressions for the integer divisions. - */ -int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, - __isl_keep isl_local_space *ls2) -{ - int equal; - - if (!ls1 || !ls2) - return -1; - - equal = isl_space_is_equal(ls1->dim, ls2->dim); - if (equal < 0 || !equal) - return equal; - - if (!isl_local_space_divs_known(ls1)) - return 0; - if (!isl_local_space_divs_known(ls2)) - return 0; - - return isl_mat_is_equal(ls1->div, ls2->div); -} - -int isl_local_space_dim(__isl_keep isl_local_space *ls, - enum isl_dim_type type) -{ - if (!ls) - return 0; - if (type == isl_dim_div) - return ls->div->n_row; - if (type == isl_dim_all) - return isl_space_dim(ls->dim, isl_dim_all) + ls->div->n_row; - return isl_space_dim(ls->dim, type); -} - -unsigned isl_local_space_offset(__isl_keep isl_local_space *ls, - enum isl_dim_type type) -{ - isl_space *dim; - - if (!ls) - return 0; - - dim = ls->dim; - switch (type) { - case isl_dim_cst: return 0; - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, - enum isl_dim_type type, unsigned pos) -{ - return ls ? isl_space_get_dim_name(ls->dim, type, pos) : NULL; -} - -__isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls, - int pos) -{ - isl_aff *aff; - - if (!ls) - return NULL; - - if (pos < 0 || pos >= ls->div->n_row) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "index out of bounds", return NULL); - - if (isl_int_is_zero(ls->div->row[pos][0])) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "expression of div unknown", return NULL); - - aff = isl_aff_alloc(isl_local_space_copy(ls)); - if (!aff) - return NULL; - isl_seq_cpy(aff->v->el, ls->div->row[pos], aff->v->size); - return aff; -} - -__isl_give isl_space *isl_local_space_get_space(__isl_keep isl_local_space *ls) -{ - if (!ls) - return NULL; - - return isl_space_copy(ls->dim); -} - -__isl_give isl_local_space *isl_local_space_set_dim_name( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, const char *s) -{ - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - ls->dim = isl_space_set_dim_name(ls->dim, type, pos, s); - if (!ls->dim) - return isl_local_space_free(ls); - - return ls; -} - -__isl_give isl_local_space *isl_local_space_set_dim_id( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - ls = isl_local_space_cow(ls); - if (!ls) - return isl_id_free(id); - ls->dim = isl_space_set_dim_id(ls->dim, type, pos, id); - if (!ls->dim) - return isl_local_space_free(ls); - - return ls; -} - -__isl_give isl_local_space *isl_local_space_reset_space( - __isl_take isl_local_space *ls, __isl_take isl_space *dim) -{ - ls = isl_local_space_cow(ls); - if (!ls || !dim) - goto error; - - isl_space_free(ls->dim); - ls->dim = dim; - - return ls; -error: - isl_local_space_free(ls); - isl_space_free(dim); - return NULL; -} - -/* Reorder the columns of the given div definitions according to the - * given reordering. - * The order of the divs themselves is assumed not to change. - */ -static __isl_give isl_mat *reorder_divs(__isl_take isl_mat *div, - __isl_take isl_reordering *r) -{ - int i, j; - isl_mat *mat; - int extra; - - if (!div || !r) - goto error; - - extra = isl_space_dim(r->dim, isl_dim_all) + div->n_row - r->len; - mat = isl_mat_alloc(div->ctx, div->n_row, div->n_col + extra); - if (!mat) - goto error; - - for (i = 0; i < div->n_row; ++i) { - isl_seq_cpy(mat->row[i], div->row[i], 2); - isl_seq_clr(mat->row[i] + 2, mat->n_col - 2); - for (j = 0; j < r->len; ++j) - isl_int_set(mat->row[i][2 + r->pos[j]], - div->row[i][2 + j]); - } - - isl_reordering_free(r); - isl_mat_free(div); - return mat; -error: - isl_reordering_free(r); - isl_mat_free(div); - return NULL; -} - -/* Reorder the dimensions of "ls" according to the given reordering. - * The reordering r is assumed to have been extended with the local - * variables, leaving them in the same order. - */ -__isl_give isl_local_space *isl_local_space_realign( - __isl_take isl_local_space *ls, __isl_take isl_reordering *r) -{ - ls = isl_local_space_cow(ls); - if (!ls || !r) - goto error; - - ls->div = reorder_divs(ls->div, isl_reordering_copy(r)); - if (!ls->div) - goto error; - - ls = isl_local_space_reset_space(ls, isl_space_copy(r->dim)); - - isl_reordering_free(r); - return ls; -error: - isl_local_space_free(ls); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_local_space *isl_local_space_add_div( - __isl_take isl_local_space *ls, __isl_take isl_vec *div) -{ - ls = isl_local_space_cow(ls); - if (!ls || !div) - goto error; - - if (ls->div->n_col != div->size) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "incompatible dimensions", goto error); - - ls->div = isl_mat_add_zero_cols(ls->div, 1); - ls->div = isl_mat_add_rows(ls->div, 1); - if (!ls->div) - goto error; - - isl_seq_cpy(ls->div->row[ls->div->n_row - 1], div->el, div->size); - isl_int_set_si(ls->div->row[ls->div->n_row - 1][div->size], 0); - - isl_vec_free(div); - return ls; -error: - isl_local_space_free(ls); - isl_vec_free(div); - return NULL; -} - -__isl_give isl_local_space *isl_local_space_replace_divs( - __isl_take isl_local_space *ls, __isl_take isl_mat *div) -{ - ls = isl_local_space_cow(ls); - - if (!ls || !div) - goto error; - - isl_mat_free(ls->div); - ls->div = div; - return ls; -error: - isl_mat_free(div); - isl_local_space_free(ls); - return NULL; -} - -/* Copy row "s" of "src" to row "d" of "dst", applying the expansion - * defined by "exp". - */ -static void expand_row(__isl_keep isl_mat *dst, int d, - __isl_keep isl_mat *src, int s, int *exp) -{ - int i; - unsigned c = src->n_col - src->n_row; - - isl_seq_cpy(dst->row[d], src->row[s], c); - isl_seq_clr(dst->row[d] + c, dst->n_col - c); - - for (i = 0; i < s; ++i) - isl_int_set(dst->row[d][c + exp[i]], src->row[s][c + i]); -} - -/* Compare (known) divs. - * Return non-zero if at least one of the two divs is unknown. - */ -static int cmp_row(__isl_keep isl_mat *div, int i, int j) -{ - int li, lj; - - if (isl_int_is_zero(div->row[j][0])) - return -1; - if (isl_int_is_zero(div->row[i][0])) - return 1; - - li = isl_seq_last_non_zero(div->row[i], div->n_col); - lj = isl_seq_last_non_zero(div->row[j], div->n_col); - - if (li != lj) - return li - lj; - - return isl_seq_cmp(div->row[i], div->row[j], div->n_col); -} - -/* Combine the two lists of divs into a single list. - * For each row i in div1, exp1[i] is set to the position of the corresponding - * row in the result. Similarly for div2 and exp2. - * This function guarantees - * exp1[i] >= i - * exp1[i+1] > exp1[i] - * For optimal merging, the two input list should have been sorted. - */ -__isl_give isl_mat *isl_merge_divs(__isl_keep isl_mat *div1, - __isl_keep isl_mat *div2, int *exp1, int *exp2) -{ - int i, j, k; - isl_mat *div = NULL; - unsigned d = div1->n_col - div1->n_row; - - div = isl_mat_alloc(div1->ctx, 1 + div1->n_row + div2->n_row, - d + div1->n_row + div2->n_row); - if (!div) - return NULL; - - for (i = 0, j = 0, k = 0; i < div1->n_row && j < div2->n_row; ++k) { - int cmp; - - expand_row(div, k, div1, i, exp1); - expand_row(div, k + 1, div2, j, exp2); - - cmp = cmp_row(div, k, k + 1); - if (cmp == 0) { - exp1[i++] = k; - exp2[j++] = k; - } else if (cmp < 0) { - exp1[i++] = k; - } else { - exp2[j++] = k; - isl_seq_cpy(div->row[k], div->row[k + 1], div->n_col); - } - } - for (; i < div1->n_row; ++i, ++k) { - expand_row(div, k, div1, i, exp1); - exp1[i] = k; - } - for (; j < div2->n_row; ++j, ++k) { - expand_row(div, k, div2, j, exp2); - exp2[j] = k; - } - - div->n_row = k; - div->n_col = d + k; - - return div; -} - -/* Construct a local space that contains all the divs in either - * "ls1" or "ls2". - */ -__isl_give isl_local_space *isl_local_space_intersect( - __isl_take isl_local_space *ls1, __isl_take isl_local_space *ls2) -{ - isl_ctx *ctx; - int *exp1 = NULL; - int *exp2 = NULL; - isl_mat *div; - - if (!ls1 || !ls2) - goto error; - - ctx = isl_local_space_get_ctx(ls1); - if (!isl_space_is_equal(ls1->dim, ls2->dim)) - isl_die(ctx, isl_error_invalid, - "spaces should be identical", goto error); - - if (ls2->div->n_row == 0) { - isl_local_space_free(ls2); - return ls1; - } - - if (ls1->div->n_row == 0) { - isl_local_space_free(ls1); - return ls2; - } - - exp1 = isl_alloc_array(ctx, int, ls1->div->n_row); - exp2 = isl_alloc_array(ctx, int, ls2->div->n_row); - if (!exp1 || !exp2) - goto error; - - div = isl_merge_divs(ls1->div, ls2->div, exp1, exp2); - if (!div) - goto error; - - free(exp1); - free(exp2); - isl_local_space_free(ls2); - isl_mat_free(ls1->div); - ls1->div = div; - - return ls1; -error: - free(exp1); - free(exp2); - isl_local_space_free(ls1); - isl_local_space_free(ls2); - return NULL; -} - -int isl_local_space_divs_known(__isl_keep isl_local_space *ls) -{ - int i; - - if (!ls) - return -1; - - for (i = 0; i < ls->div->n_row; ++i) - if (isl_int_is_zero(ls->div->row[i][0])) - return 0; - - return 1; -} - -__isl_give isl_local_space *isl_local_space_domain( - __isl_take isl_local_space *ls) -{ - ls = isl_local_space_drop_dims(ls, isl_dim_out, - 0, isl_local_space_dim(ls, isl_dim_out)); - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - ls->dim = isl_space_domain(ls->dim); - if (!ls->dim) - return isl_local_space_free(ls); - return ls; -} - -__isl_give isl_local_space *isl_local_space_range( - __isl_take isl_local_space *ls) -{ - ls = isl_local_space_drop_dims(ls, isl_dim_in, - 0, isl_local_space_dim(ls, isl_dim_in)); - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - - ls->dim = isl_space_range(ls->dim); - if (!ls->dim) - return isl_local_space_free(ls); - return ls; -} - -/* Construct a local space for a map that has the given local - * space as domain and that has a zero-dimensional range. - */ -__isl_give isl_local_space *isl_local_space_from_domain( - __isl_take isl_local_space *ls) -{ - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - ls->dim = isl_space_from_domain(ls->dim); - if (!ls->dim) - return isl_local_space_free(ls); - return ls; -} - -__isl_give isl_local_space *isl_local_space_add_dims( - __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned n) -{ - int pos; - - if (!ls) - return NULL; - pos = isl_local_space_dim(ls, type); - return isl_local_space_insert_dims(ls, type, pos, n); -} - -/* Remove common factor of non-constant terms and denominator. - */ -static void normalize_div(__isl_keep isl_local_space *ls, int div) -{ - isl_ctx *ctx = ls->div->ctx; - unsigned total = ls->div->n_col - 2; - - isl_seq_gcd(ls->div->row[div] + 2, total, &ctx->normalize_gcd); - isl_int_gcd(ctx->normalize_gcd, - ctx->normalize_gcd, ls->div->row[div][0]); - if (isl_int_is_one(ctx->normalize_gcd)) - return; - - isl_seq_scale_down(ls->div->row[div] + 2, ls->div->row[div] + 2, - ctx->normalize_gcd, total); - isl_int_divexact(ls->div->row[div][0], ls->div->row[div][0], - ctx->normalize_gcd); - isl_int_fdiv_q(ls->div->row[div][1], ls->div->row[div][1], - ctx->normalize_gcd); -} - -/* Exploit the equalities in "eq" to simplify the expressions of - * the integer divisions in "ls". - * The integer divisions in "ls" are assumed to appear as regular - * dimensions in "eq". - */ -__isl_give isl_local_space *isl_local_space_substitute_equalities( - __isl_take isl_local_space *ls, __isl_take isl_basic_set *eq) -{ - int i, j, k; - unsigned total; - unsigned n_div; - - ls = isl_local_space_cow(ls); - if (!ls || !eq) - goto error; - - total = isl_space_dim(eq->dim, isl_dim_all); - if (isl_local_space_dim(ls, isl_dim_all) != total) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "dimensions don't match", goto error); - total++; - n_div = eq->n_div; - for (i = 0; i < eq->n_eq; ++i) { - j = isl_seq_last_non_zero(eq->eq[i], total + n_div); - if (j < 0 || j == 0 || j >= total) - continue; - - for (k = 0; k < ls->div->n_row; ++k) { - if (isl_int_is_zero(ls->div->row[k][1 + j])) - continue; - isl_seq_elim(ls->div->row[k] + 1, eq->eq[i], j, total, - &ls->div->row[k][0]); - normalize_div(ls, k); - } - } - - isl_basic_set_free(eq); - return ls; -error: - isl_basic_set_free(eq); - isl_local_space_free(ls); - return NULL; -} - -/* Plug in "subs" for dimension "type", "pos" in the integer divisions - * of "ls". - * - * Let i be the dimension to replace and let "subs" be of the form - * - * f/d - * - * Any integer division with a non-zero coefficient for i, - * - * floor((a i + g)/m) - * - * is replaced by - * - * floor((a f + d g)/(m d)) - */ -__isl_give isl_local_space *isl_local_space_substitute( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs) -{ - int i; - isl_int v; - - ls = isl_local_space_cow(ls); - if (!ls || !subs) - return isl_local_space_free(ls); - - if (!isl_space_is_equal(ls->dim, subs->ls->dim)) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "spaces don't match", return isl_local_space_free(ls)); - if (isl_local_space_dim(subs->ls, isl_dim_div) != 0) - isl_die(isl_local_space_get_ctx(ls), isl_error_unsupported, - "cannot handle divs yet", - return isl_local_space_free(ls)); - - pos += isl_local_space_offset(ls, type); - - isl_int_init(v); - for (i = 0; i < ls->div->n_row; ++i) { - if (isl_int_is_zero(ls->div->row[i][1 + pos])) - continue; - isl_int_set(v, ls->div->row[i][1 + pos]); - isl_int_set_si(ls->div->row[i][1 + pos], 0); - isl_seq_combine(ls->div->row[i] + 1, - subs->v->el[0], ls->div->row[i] + 1, - v, subs->v->el + 1, subs->v->size - 1); - isl_int_mul(ls->div->row[i][0], - ls->div->row[i][0], subs->v->el[0]); - normalize_div(ls, i); - } - isl_int_clear(v); - - return ls; -} - -int isl_local_space_is_named_or_nested(__isl_keep isl_local_space *ls, - enum isl_dim_type type) -{ - if (!ls) - return -1; - return isl_space_is_named_or_nested(ls->dim, type); -} - -__isl_give isl_local_space *isl_local_space_drop_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!ls) - return NULL; - if (n == 0 && !isl_local_space_is_named_or_nested(ls, type)) - return ls; - - ctx = isl_local_space_get_ctx(ls); - if (first + n > isl_local_space_dim(ls, type)) - isl_die(ctx, isl_error_invalid, "range out of bounds", - return isl_local_space_free(ls)); - - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - - if (type == isl_dim_div) { - ls->div = isl_mat_drop_rows(ls->div, first, n); - } else { - ls->dim = isl_space_drop_dims(ls->dim, type, first, n); - if (!ls->dim) - return isl_local_space_free(ls); - } - - first += 1 + isl_local_space_offset(ls, type); - ls->div = isl_mat_drop_cols(ls->div, first, n); - if (!ls->div) - return isl_local_space_free(ls); - - return ls; -} - -__isl_give isl_local_space *isl_local_space_insert_dims( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned first, unsigned n) -{ - isl_ctx *ctx; - - if (!ls) - return NULL; - if (n == 0 && !isl_local_space_is_named_or_nested(ls, type)) - return ls; - - ctx = isl_local_space_get_ctx(ls); - if (first > isl_local_space_dim(ls, type)) - isl_die(ctx, isl_error_invalid, "position out of bounds", - return isl_local_space_free(ls)); - - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - - if (type == isl_dim_div) { - ls->div = isl_mat_insert_zero_rows(ls->div, first, n); - } else { - ls->dim = isl_space_insert_dims(ls->dim, type, first, n); - if (!ls->dim) - return isl_local_space_free(ls); - } - - first += 1 + isl_local_space_offset(ls, type); - ls->div = isl_mat_insert_zero_cols(ls->div, first, n); - if (!ls->div) - return isl_local_space_free(ls); - - return ls; -} - -/* Check if the constraints pointed to by "constraint" is a div - * constraint corresponding to div "div" in "ls". - * - * That is, if div = floor(f/m), then check if the constraint is - * - * f - m d >= 0 - * or - * -(f-(m-1)) + m d >= 0 - */ -int isl_local_space_is_div_constraint(__isl_keep isl_local_space *ls, - isl_int *constraint, unsigned div) -{ - unsigned pos; - - if (!ls) - return -1; - - if (isl_int_is_zero(ls->div->row[div][0])) - return 0; - - pos = isl_local_space_offset(ls, isl_dim_div) + div; - - if (isl_int_eq(constraint[pos], ls->div->row[div][0])) { - int neg; - isl_int_sub(ls->div->row[div][1], - ls->div->row[div][1], ls->div->row[div][0]); - isl_int_add_ui(ls->div->row[div][1], ls->div->row[div][1], 1); - neg = isl_seq_is_neg(constraint, ls->div->row[div]+1, pos); - isl_int_sub_ui(ls->div->row[div][1], ls->div->row[div][1], 1); - isl_int_add(ls->div->row[div][1], - ls->div->row[div][1], ls->div->row[div][0]); - if (!neg) - return 0; - if (isl_seq_first_non_zero(constraint+pos+1, - ls->div->n_row-div-1) != -1) - return 0; - } else if (isl_int_abs_eq(constraint[pos], ls->div->row[div][0])) { - if (!isl_seq_eq(constraint, ls->div->row[div]+1, pos)) - return 0; - if (isl_seq_first_non_zero(constraint+pos+1, - ls->div->n_row-div-1) != -1) - return 0; - } else - return 0; - - return 1; -} - -/* - * Set active[i] to 1 if the dimension at position i is involved - * in the linear expression l. - */ -int *isl_local_space_get_active(__isl_keep isl_local_space *ls, isl_int *l) -{ - int i, j; - isl_ctx *ctx; - int *active = NULL; - unsigned total; - unsigned offset; - - ctx = isl_local_space_get_ctx(ls); - total = isl_local_space_dim(ls, isl_dim_all); - active = isl_calloc_array(ctx, int, total); - if (!active) - return NULL; - - for (i = 0; i < total; ++i) - active[i] = !isl_int_is_zero(l[i]); - - offset = isl_local_space_offset(ls, isl_dim_div) - 1; - for (i = ls->div->n_row - 1; i >= 0; --i) { - if (!active[offset + i]) - continue; - for (j = 0; j < total; ++j) - active[j] |= !isl_int_is_zero(ls->div->row[i][2 + j]); - } - - return active; -} - -/* Given a local space "ls" of a set, create a local space - * for the lift of the set. In particular, the result - * is of the form [dim -> local[..]], with ls->div->n_row variables in the - * range of the wrapped map. - */ -__isl_give isl_local_space *isl_local_space_lift( - __isl_take isl_local_space *ls) -{ - ls = isl_local_space_cow(ls); - if (!ls) - return NULL; - - ls->dim = isl_space_lift(ls->dim, ls->div->n_row); - ls->div = isl_mat_drop_rows(ls->div, 0, ls->div->n_row); - if (!ls->dim || !ls->div) - return isl_local_space_free(ls); - - return ls; -} - -/* Construct a basic map that maps a set living in local space "ls" - * to the corresponding lifted local space. - */ -__isl_give isl_basic_map *isl_local_space_lifting( - __isl_take isl_local_space *ls) -{ - isl_basic_map *lifting; - isl_basic_set *bset; - - if (!ls) - return NULL; - if (!isl_local_space_is_set(ls)) - isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "lifting only defined on set spaces", - return isl_local_space_free(ls)); - - bset = isl_basic_set_from_local_space(ls); - lifting = isl_basic_set_unwrap(isl_basic_set_lift(bset)); - lifting = isl_basic_map_domain_map(lifting); - lifting = isl_basic_map_reverse(lifting); - - return lifting; -} diff --git a/cloog-0.17.0/isl/isl_local_space_private.h b/cloog-0.17.0/isl/isl_local_space_private.h deleted file mode 100644 index 8d106bd07b14d5c2511479fac7b325813ad6b003..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_local_space_private.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef ISL_LOCAL_SPACE_PRIVATE_H -#define ISL_LOCAL_SPACE_PRIVATE_H - -#include -#include -#include - -struct isl_local_space { - int ref; - - isl_space *dim; - isl_mat *div; -}; - -__isl_give isl_local_space *isl_local_space_alloc(__isl_take isl_space *dim, - unsigned n_div); -__isl_give isl_local_space *isl_local_space_alloc_div(__isl_take isl_space *dim, - __isl_take isl_mat *div); - -__isl_give isl_local_space *isl_local_space_add_div( - __isl_take isl_local_space *ls, __isl_take isl_vec *div); - -__isl_give isl_mat *isl_merge_divs(__isl_keep isl_mat *div1, - __isl_keep isl_mat *div2, int *exp1, int *exp2); - -unsigned isl_local_space_offset(__isl_keep isl_local_space *ls, - enum isl_dim_type type); - -__isl_give isl_local_space *isl_local_space_replace_divs( - __isl_take isl_local_space *ls, __isl_take isl_mat *div); -int isl_local_space_divs_known(__isl_keep isl_local_space *ls); - -__isl_give isl_local_space *isl_local_space_substitute_equalities( - __isl_take isl_local_space *ls, __isl_take isl_basic_set *eq); - -int isl_local_space_is_named_or_nested(__isl_keep isl_local_space *ls, - enum isl_dim_type type); - -__isl_give isl_local_space *isl_local_space_reset_space( - __isl_take isl_local_space *ls, __isl_take isl_space *dim); -__isl_give isl_local_space *isl_local_space_realign( - __isl_take isl_local_space *ls, __isl_take isl_reordering *r); - -int isl_local_space_is_div_constraint(__isl_keep isl_local_space *ls, - isl_int *constraint, unsigned div); - -int *isl_local_space_get_active(__isl_keep isl_local_space *ls, isl_int *l); - -__isl_give isl_local_space *isl_local_space_substitute( - __isl_take isl_local_space *ls, - enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs); - -__isl_give isl_local_space *isl_local_space_lift( - __isl_take isl_local_space *ls); - -#endif diff --git a/cloog-0.17.0/isl/isl_lp.c b/cloog-0.17.0/isl/isl_lp.c deleted file mode 100644 index d2e35a5bd9a0e8c02649929d823ee2a26736d520..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_lp.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_lp_piplib.h" -#include -#include "isl_tab.h" -#include - -enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - struct isl_tab *tab; - enum isl_lp_result res; - unsigned dim = isl_basic_map_total_dim(bmap); - - if (maximize) - isl_seq_neg(f, f, 1 + dim); - - bmap = isl_basic_map_gauss(bmap, NULL); - tab = isl_tab_from_basic_map(bmap); - res = isl_tab_min(tab, f, denom, opt, opt_denom, 0); - if (res == isl_lp_ok && sol) { - *sol = isl_tab_get_sample_value(tab); - if (!*sol) - res = isl_lp_error; - } - isl_tab_free(tab); - - if (maximize) - isl_seq_neg(f, f, 1 + dim); - if (maximize && opt) - isl_int_neg(*opt, *opt); - - return res; -} - -/* Given a basic map "bmap" and an affine combination of the variables "f" - * with denominator "denom", set *opt / *opt_denom to the minimal - * (or maximal if "maximize" is true) value attained by f/d over "bmap", - * assuming the basic map is not empty and the expression cannot attain - * arbitrarily small (or large) values. - * If opt_denom is NULL, then *opt is rounded up (or down) - * to the nearest integer. - * The return value reflects the nature of the result (empty, unbounded, - * minmimal or maximal value returned in *opt). - */ -enum isl_lp_result isl_basic_map_solve_lp(struct isl_basic_map *bmap, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - if (sol) - *sol = NULL; - - if (!bmap) - return isl_lp_error; - - switch (bmap->ctx->opt->lp_solver) { - case ISL_LP_PIP: - return isl_pip_solve_lp(bmap, max, f, d, opt, opt_denom, sol); - case ISL_LP_TAB: - return isl_tab_solve_lp(bmap, max, f, d, opt, opt_denom, sol); - default: - return isl_lp_error; - } -} - -enum isl_lp_result isl_basic_set_solve_lp(struct isl_basic_set *bset, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - return isl_basic_map_solve_lp((struct isl_basic_map *)bset, max, - f, d, opt, opt_denom, sol); -} - -enum isl_lp_result isl_map_solve_lp(__isl_keep isl_map *map, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - int i; - isl_int o; - isl_int t; - isl_int opt_i; - isl_int opt_denom_i; - enum isl_lp_result res; - int max_div; - isl_vec *v = NULL; - - if (!map) - return isl_lp_error; - if (map->n == 0) - return isl_lp_empty; - - max_div = 0; - for (i = 0; i < map->n; ++i) - if (map->p[i]->n_div > max_div) - max_div = map->p[i]->n_div; - if (max_div > 0) { - unsigned total = isl_space_dim(map->dim, isl_dim_all); - v = isl_vec_alloc(map->ctx, 1 + total + max_div); - if (!v) - return isl_lp_error; - isl_seq_cpy(v->el, f, 1 + total); - isl_seq_clr(v->el + 1 + total, max_div); - f = v->el; - } - - if (!opt && map->n > 1 && sol) { - isl_int_init(o); - opt = &o; - } - if (map->n > 0) - isl_int_init(opt_i); - if (map->n > 0 && opt_denom) { - isl_int_init(opt_denom_i); - isl_int_init(t); - } - - res = isl_basic_map_solve_lp(map->p[0], max, f, d, - opt, opt_denom, sol); - if (res == isl_lp_error || res == isl_lp_unbounded) - goto done; - - if (sol) - *sol = NULL; - - for (i = 1; i < map->n; ++i) { - isl_vec *sol_i = NULL; - enum isl_lp_result res_i; - int better; - - res_i = isl_basic_map_solve_lp(map->p[i], max, f, d, - &opt_i, - opt_denom ? &opt_denom_i : NULL, - sol ? &sol_i : NULL); - if (res_i == isl_lp_error || res_i == isl_lp_unbounded) { - res = res_i; - goto done; - } - if (res_i == isl_lp_empty) - continue; - if (res == isl_lp_empty) { - better = 1; - } else if (!opt_denom) { - if (max) - better = isl_int_gt(opt_i, *opt); - else - better = isl_int_lt(opt_i, *opt); - } else { - isl_int_mul(t, opt_i, *opt_denom); - isl_int_submul(t, *opt, opt_denom_i); - if (max) - better = isl_int_is_pos(t); - else - better = isl_int_is_neg(t); - } - if (better) { - res = res_i; - if (opt) - isl_int_set(*opt, opt_i); - if (opt_denom) - isl_int_set(*opt_denom, opt_denom_i); - if (sol) { - isl_vec_free(*sol); - *sol = sol_i; - } - } else - isl_vec_free(sol_i); - } - -done: - isl_vec_free(v); - if (map->n > 0 && opt_denom) { - isl_int_clear(opt_denom_i); - isl_int_clear(t); - } - if (map->n > 0) - isl_int_clear(opt_i); - if (opt == &o) - isl_int_clear(o); - return res; -} - -enum isl_lp_result isl_set_solve_lp(__isl_keep isl_set *set, int max, - isl_int *f, isl_int d, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - return isl_map_solve_lp((struct isl_map *)set, max, - f, d, opt, opt_denom, sol); -} diff --git a/cloog-0.17.0/isl/isl_lp_no_piplib.c b/cloog-0.17.0/isl/isl_lp_no_piplib.c deleted file mode 100644 index 54c0135b2124b707a94feac46bdedd6c11312504..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_lp_no_piplib.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_lp_piplib.h" - -enum isl_lp_result isl_pip_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol) -{ - return isl_lp_error; -} diff --git a/cloog-0.17.0/isl/isl_lp_piplib.c b/cloog-0.17.0/isl/isl_lp_piplib.c deleted file mode 100644 index d4b92af2fe9f28ce8e111ee3109218089be55b0a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_lp_piplib.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_piplib.h" -#include "isl_map_piplib.h" - -static void copy_solution(struct isl_vec *vec, int maximize, isl_int *opt, - isl_int *opt_denom, PipQuast *sol) -{ - int i; - PipList *list; - isl_int tmp; - - if (opt) { - if (opt_denom) { - isl_seq_cpy_from_pip(opt, - &sol->list->vector->the_vector[0], 1); - isl_seq_cpy_from_pip(opt_denom, - &sol->list->vector->the_deno[0], 1); - } else if (maximize) - mpz_fdiv_q(*opt, sol->list->vector->the_vector[0], - sol->list->vector->the_deno[0]); - else - mpz_cdiv_q(*opt, sol->list->vector->the_vector[0], - sol->list->vector->the_deno[0]); - } - - if (!vec) - return; - - isl_int_init(tmp); - isl_int_set_si(vec->el[0], 1); - for (i = 0, list = sol->list->next; list; ++i, list = list->next) { - isl_seq_cpy_from_pip(&vec->el[1 + i], - &list->vector->the_deno[0], 1); - isl_int_lcm(vec->el[0], vec->el[0], vec->el[1 + i]); - } - for (i = 0, list = sol->list->next; list; ++i, list = list->next) { - isl_seq_cpy_from_pip(&tmp, &list->vector->the_deno[0], 1); - isl_int_divexact(tmp, vec->el[0], tmp); - isl_seq_cpy_from_pip(&vec->el[1 + i], - &list->vector->the_vector[0], 1); - isl_int_mul(vec->el[1 + i], vec->el[1 + i], tmp); - } - isl_int_clear(tmp); -} - -enum isl_lp_result isl_pip_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **vec) -{ - enum isl_lp_result res = isl_lp_ok; - PipMatrix *domain = NULL; - PipOptions *options; - PipQuast *sol; - unsigned total; - - total = isl_basic_map_total_dim(bmap); - domain = isl_basic_map_to_pip(bmap, 0, 1, 0); - if (!domain) - goto error; - entier_set_si(domain->p[0][1], -1); - isl_int_set(domain->p[0][domain->NbColumns - 1], f[0]); - isl_seq_cpy_to_pip(domain->p[0]+2, f+1, total); - - options = pip_options_init(); - if (!options) - goto error; - options->Urs_unknowns = -1; - options->Maximize = maximize; - options->Nq = 0; - sol = pip_solve(domain, NULL, -1, options); - pip_options_free(options); - if (!sol) - goto error; - - if (vec) { - isl_ctx *ctx = isl_basic_map_get_ctx(bmap); - *vec = isl_vec_alloc(ctx, 1 + total); - } - if (vec && !*vec) - res = isl_lp_error; - else if (!sol->list) - res = isl_lp_empty; - else if (entier_zero_p(sol->list->vector->the_deno[0])) - res = isl_lp_unbounded; - else - copy_solution(*vec, maximize, opt, opt_denom, sol); - pip_matrix_free(domain); - pip_quast_free(sol); - return res; -error: - if (domain) - pip_matrix_free(domain); - return isl_lp_error; -} diff --git a/cloog-0.17.0/isl/isl_lp_piplib.h b/cloog-0.17.0/isl/isl_lp_piplib.h deleted file mode 100644 index e69a3b4a112abe87fad79a2bd8e6a53341670965..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_lp_piplib.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_LP_PIPLIB_H -#define ISL_LP_PIPLIB_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum isl_lp_result isl_pip_solve_lp(struct isl_basic_map *bmap, int maximize, - isl_int *f, isl_int denom, isl_int *opt, - isl_int *opt_denom, - struct isl_vec **sol); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_map.c b/cloog-0.17.0/isl/isl_map.c deleted file mode 100644 index 8b4aea37b130807d4595ea9f5f7b7d3302ca8f8a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map.c +++ /dev/null @@ -1,10008 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include "isl_space_private.h" -#include "isl_equalities.h" -#include -#include -#include -#include -#include -#include "isl_map_piplib.h" -#include -#include "isl_sample.h" -#include "isl_tab.h" -#include -#include -#include -#include -#include -#include - -static unsigned n(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return dim->nparam; - case isl_dim_in: return dim->n_in; - case isl_dim_out: return dim->n_out; - case isl_dim_all: return dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -static unsigned pos(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - default: return 0; - } -} - -unsigned isl_basic_map_dim(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type) -{ - if (!bmap) - return 0; - switch (type) { - case isl_dim_cst: return 1; - case isl_dim_param: - case isl_dim_in: - case isl_dim_out: return isl_space_dim(bmap->dim, type); - case isl_dim_div: return bmap->n_div; - case isl_dim_all: return isl_basic_map_total_dim(bmap); - default: return 0; - } -} - -unsigned isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type) -{ - return map ? n(map->dim, type) : 0; -} - -unsigned isl_set_dim(__isl_keep isl_set *set, enum isl_dim_type type) -{ - return set ? n(set->dim, type) : 0; -} - -unsigned isl_basic_map_offset(struct isl_basic_map *bmap, - enum isl_dim_type type) -{ - isl_space *dim = bmap->dim; - switch (type) { - case isl_dim_cst: return 0; - case isl_dim_param: return 1; - case isl_dim_in: return 1 + dim->nparam; - case isl_dim_out: return 1 + dim->nparam + dim->n_in; - case isl_dim_div: return 1 + dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -unsigned isl_basic_set_offset(struct isl_basic_set *bset, - enum isl_dim_type type) -{ - return isl_basic_map_offset(bset, type); -} - -static unsigned map_offset(struct isl_map *map, enum isl_dim_type type) -{ - return pos(map->dim, type); -} - -unsigned isl_basic_set_dim(__isl_keep isl_basic_set *bset, - enum isl_dim_type type) -{ - return isl_basic_map_dim(bset, type); -} - -unsigned isl_basic_set_n_dim(__isl_keep isl_basic_set *bset) -{ - return isl_basic_set_dim(bset, isl_dim_set); -} - -unsigned isl_basic_set_n_param(__isl_keep isl_basic_set *bset) -{ - return isl_basic_set_dim(bset, isl_dim_param); -} - -unsigned isl_basic_set_total_dim(const struct isl_basic_set *bset) -{ - return isl_space_dim(bset->dim, isl_dim_all) + bset->n_div; -} - -unsigned isl_set_n_dim(__isl_keep isl_set *set) -{ - return isl_set_dim(set, isl_dim_set); -} - -unsigned isl_set_n_param(__isl_keep isl_set *set) -{ - return isl_set_dim(set, isl_dim_param); -} - -unsigned isl_basic_map_n_in(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->dim->n_in : 0; -} - -unsigned isl_basic_map_n_out(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->dim->n_out : 0; -} - -unsigned isl_basic_map_n_param(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->dim->nparam : 0; -} - -unsigned isl_basic_map_n_div(const struct isl_basic_map *bmap) -{ - return bmap ? bmap->n_div : 0; -} - -unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap) -{ - return bmap ? isl_space_dim(bmap->dim, isl_dim_all) + bmap->n_div : 0; -} - -unsigned isl_map_n_in(const struct isl_map *map) -{ - return map ? map->dim->n_in : 0; -} - -unsigned isl_map_n_out(const struct isl_map *map) -{ - return map ? map->dim->n_out : 0; -} - -unsigned isl_map_n_param(const struct isl_map *map) -{ - return map ? map->dim->nparam : 0; -} - -int isl_map_compatible_domain(struct isl_map *map, struct isl_set *set) -{ - int m; - if (!map || !set) - return -1; - m = isl_space_match(map->dim, isl_dim_param, set->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_space_tuple_match(map->dim, isl_dim_in, set->dim, isl_dim_set); -} - -int isl_basic_map_compatible_domain(struct isl_basic_map *bmap, - struct isl_basic_set *bset) -{ - int m; - if (!bmap || !bset) - return -1; - m = isl_space_match(bmap->dim, isl_dim_param, bset->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_space_tuple_match(bmap->dim, isl_dim_in, bset->dim, isl_dim_set); -} - -int isl_map_compatible_range(__isl_keep isl_map *map, __isl_keep isl_set *set) -{ - int m; - if (!map || !set) - return -1; - m = isl_space_match(map->dim, isl_dim_param, set->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_space_tuple_match(map->dim, isl_dim_out, set->dim, isl_dim_set); -} - -int isl_basic_map_compatible_range(struct isl_basic_map *bmap, - struct isl_basic_set *bset) -{ - int m; - if (!bmap || !bset) - return -1; - m = isl_space_match(bmap->dim, isl_dim_param, bset->dim, isl_dim_param); - if (m < 0 || !m) - return m; - return isl_space_tuple_match(bmap->dim, isl_dim_out, bset->dim, isl_dim_set); -} - -isl_ctx *isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap) -{ - return bmap ? bmap->ctx : NULL; -} - -isl_ctx *isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset) -{ - return bset ? bset->ctx : NULL; -} - -isl_ctx *isl_map_get_ctx(__isl_keep isl_map *map) -{ - return map ? map->ctx : NULL; -} - -isl_ctx *isl_set_get_ctx(__isl_keep isl_set *set) -{ - return set ? set->ctx : NULL; -} - -__isl_give isl_space *isl_basic_map_get_space(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - return isl_space_copy(bmap->dim); -} - -__isl_give isl_space *isl_basic_set_get_space(__isl_keep isl_basic_set *bset) -{ - if (!bset) - return NULL; - return isl_space_copy(bset->dim); -} - -__isl_give isl_local_space *isl_basic_map_get_local_space( - __isl_keep isl_basic_map *bmap) -{ - int i; - isl_local_space *ls; - unsigned total; - - if (!bmap) - return NULL; - - total = isl_basic_map_total_dim(bmap); - ls = isl_local_space_alloc(isl_space_copy(bmap->dim), bmap->n_div); - if (!ls) - return NULL; - - for (i = 0; i < bmap->n_div; ++i) - isl_seq_cpy(ls->div->row[i], bmap->div[i], 2 + total); - - return ls; -} - -__isl_give isl_local_space *isl_basic_set_get_local_space( - __isl_keep isl_basic_set *bset) -{ - return isl_basic_map_get_local_space(bset); -} - -__isl_give isl_basic_map *isl_basic_map_from_local_space( - __isl_take isl_local_space *ls) -{ - int i; - int n_div; - isl_basic_map *bmap; - - if (!ls) - return NULL; - - n_div = isl_local_space_dim(ls, isl_dim_div); - bmap = isl_basic_map_alloc_space(isl_local_space_get_space(ls), - n_div, 0, 2 * n_div); - - for (i = 0; i < n_div; ++i) - if (isl_basic_map_alloc_div(bmap) < 0) - goto error; - - for (i = 0; i < n_div; ++i) { - isl_seq_cpy(bmap->div[i], ls->div->row[i], ls->div->n_col); - if (isl_basic_map_add_div_constraints(bmap, i) < 0) - goto error; - } - - isl_local_space_free(ls); - return bmap; -error: - isl_local_space_free(ls); - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_from_local_space( - __isl_take isl_local_space *ls) -{ - return isl_basic_map_from_local_space(ls); -} - -__isl_give isl_space *isl_map_get_space(__isl_keep isl_map *map) -{ - if (!map) - return NULL; - return isl_space_copy(map->dim); -} - -__isl_give isl_space *isl_set_get_space(__isl_keep isl_set *set) -{ - if (!set) - return NULL; - return isl_space_copy(set->dim); -} - -__isl_give isl_basic_map *isl_basic_map_set_tuple_name( - __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - bmap->dim = isl_space_set_tuple_name(bmap->dim, type, s); - if (!bmap->dim) - goto error; - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_set_tuple_name( - __isl_take isl_basic_set *bset, const char *s) -{ - return isl_basic_map_set_tuple_name(bset, isl_dim_set, s); -} - -const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type) -{ - return bmap ? isl_space_get_tuple_name(bmap->dim, type) : NULL; -} - -__isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map, - enum isl_dim_type type, const char *s) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_set_tuple_name(map->dim, type, s); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_set_tuple_name(map->p[i], type, s); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -const char *isl_map_get_tuple_name(__isl_keep isl_map *map, - enum isl_dim_type type) -{ - return map ? isl_space_get_tuple_name(map->dim, type) : NULL; -} - -__isl_give isl_set *isl_set_set_tuple_name(__isl_take isl_set *set, - const char *s) -{ - return (isl_set *)isl_map_set_tuple_name((isl_map *)set, isl_dim_set, s); -} - -__isl_give isl_map *isl_map_set_tuple_id(__isl_take isl_map *map, - enum isl_dim_type type, __isl_take isl_id *id) -{ - map = isl_map_cow(map); - if (!map) - return isl_id_free(id); - - map->dim = isl_space_set_tuple_id(map->dim, type, id); - - return isl_map_reset_space(map, isl_space_copy(map->dim)); -} - -__isl_give isl_set *isl_set_set_tuple_id(__isl_take isl_set *set, - __isl_take isl_id *id) -{ - return isl_map_set_tuple_id(set, isl_dim_set, id); -} - -__isl_give isl_map *isl_map_reset_tuple_id(__isl_take isl_map *map, - enum isl_dim_type type) -{ - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_reset_tuple_id(map->dim, type); - - return isl_map_reset_space(map, isl_space_copy(map->dim)); -} - -__isl_give isl_set *isl_set_reset_tuple_id(__isl_take isl_set *set) -{ - return isl_map_reset_tuple_id(set, isl_dim_set); -} - -int isl_map_has_tuple_id(__isl_keep isl_map *map, enum isl_dim_type type) -{ - return map ? isl_space_has_tuple_id(map->dim, type) : -1; -} - -__isl_give isl_id *isl_map_get_tuple_id(__isl_keep isl_map *map, - enum isl_dim_type type) -{ - return map ? isl_space_get_tuple_id(map->dim, type) : NULL; -} - -int isl_set_has_tuple_id(__isl_keep isl_set *set) -{ - return isl_map_has_tuple_id(set, isl_dim_set); -} - -__isl_give isl_id *isl_set_get_tuple_id(__isl_keep isl_set *set) -{ - return isl_map_get_tuple_id(set, isl_dim_set); -} - -const char *isl_basic_set_get_tuple_name(__isl_keep isl_basic_set *bset) -{ - return bset ? isl_space_get_tuple_name(bset->dim, isl_dim_set) : NULL; -} - -const char *isl_set_get_tuple_name(__isl_keep isl_set *set) -{ - return set ? isl_space_get_tuple_name(set->dim, isl_dim_set) : NULL; -} - -const char *isl_basic_map_get_dim_name(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - return bmap ? isl_space_get_dim_name(bmap->dim, type, pos) : NULL; -} - -const char *isl_basic_set_get_dim_name(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned pos) -{ - return bset ? isl_space_get_dim_name(bset->dim, type, pos) : NULL; -} - -const char *isl_map_get_dim_name(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos) -{ - return map ? isl_space_get_dim_name(map->dim, type, pos) : NULL; -} - -const char *isl_set_get_dim_name(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return set ? isl_space_get_dim_name(set->dim, type, pos) : NULL; -} - -__isl_give isl_basic_map *isl_basic_map_set_dim_name( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, const char *s) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - bmap->dim = isl_space_set_dim_name(bmap->dim, type, pos, s); - if (!bmap->dim) - goto error; - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_set_dim_name(map->dim, type, pos, s); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_set_dim_name(map->p[i], type, pos, s); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_set_dim_name( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, const char *s) -{ - return (isl_basic_set *)isl_basic_map_set_dim_name( - (isl_basic_map *)bset, type, pos, s); -} - -__isl_give isl_set *isl_set_set_dim_name(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, const char *s) -{ - return (isl_set *)isl_map_set_dim_name((isl_map *)set, type, pos, s); -} - -int isl_basic_map_has_dim_id(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - return bmap ? isl_space_has_dim_id(bmap->dim, type, pos) : -1; -} - -int isl_map_has_dim_id(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos) -{ - return map ? isl_space_has_dim_id(map->dim, type, pos) : -1; -} - -__isl_give isl_id *isl_map_get_dim_id(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos) -{ - return map ? isl_space_get_dim_id(map->dim, type, pos) : NULL; -} - -int isl_set_has_dim_id(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return isl_map_has_dim_id(set, type, pos); -} - -__isl_give isl_id *isl_set_get_dim_id(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return isl_map_get_dim_id(set, type, pos); -} - -__isl_give isl_map *isl_map_set_dim_id(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - map = isl_map_cow(map); - if (!map) - return isl_id_free(id); - - map->dim = isl_space_set_dim_id(map->dim, type, pos, id); - - return isl_map_reset_space(map, isl_space_copy(map->dim)); -} - -__isl_give isl_set *isl_set_set_dim_id(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - return isl_map_set_dim_id(set, type, pos, id); -} - -int isl_map_find_dim_by_id(__isl_keep isl_map *map, enum isl_dim_type type, - __isl_keep isl_id *id) -{ - if (!map) - return -1; - return isl_space_find_dim_by_id(map->dim, type, id); -} - -int isl_set_find_dim_by_id(__isl_keep isl_set *set, enum isl_dim_type type, - __isl_keep isl_id *id) -{ - return isl_map_find_dim_by_id(set, type, id); -} - -int isl_map_find_dim_by_name(__isl_keep isl_map *map, enum isl_dim_type type, - const char *name) -{ - if (!map) - return -1; - return isl_space_find_dim_by_name(map->dim, type, name); -} - -int isl_set_find_dim_by_name(__isl_keep isl_set *set, enum isl_dim_type type, - const char *name) -{ - return isl_map_find_dim_by_name(set, type, name); -} - -int isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); -} - -int isl_basic_set_is_rational(__isl_keep isl_basic_set *bset) -{ - return isl_basic_map_is_rational(bset); -} - -/* Is this basic set a parameter domain? - */ -int isl_basic_set_is_params(__isl_keep isl_basic_set *bset) -{ - if (!bset) - return -1; - return isl_space_is_params(bset->dim); -} - -/* Is this set a parameter domain? - */ -int isl_set_is_params(__isl_keep isl_set *set) -{ - if (!set) - return -1; - return isl_space_is_params(set->dim); -} - -/* Is this map actually a parameter domain? - * Users should never call this function. Outside of isl, - * a map can never be a parameter domain. - */ -int isl_map_is_params(__isl_keep isl_map *map) -{ - if (!map) - return -1; - return isl_space_is_params(map->dim); -} - -static struct isl_basic_map *basic_map_init(struct isl_ctx *ctx, - struct isl_basic_map *bmap, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - int i; - size_t row_size = 1 + isl_space_dim(bmap->dim, isl_dim_all) + extra; - - bmap->ctx = ctx; - isl_ctx_ref(ctx); - - bmap->block = isl_blk_alloc(ctx, (n_ineq + n_eq) * row_size); - if (isl_blk_is_error(bmap->block)) - goto error; - - bmap->ineq = isl_alloc_array(ctx, isl_int *, n_ineq + n_eq); - if (!bmap->ineq) - goto error; - - if (extra == 0) { - bmap->block2 = isl_blk_empty(); - bmap->div = NULL; - } else { - bmap->block2 = isl_blk_alloc(ctx, extra * (1 + row_size)); - if (isl_blk_is_error(bmap->block2)) - goto error; - - bmap->div = isl_alloc_array(ctx, isl_int *, extra); - if (!bmap->div) - goto error; - } - - for (i = 0; i < n_ineq + n_eq; ++i) - bmap->ineq[i] = bmap->block.data + i * row_size; - - for (i = 0; i < extra; ++i) - bmap->div[i] = bmap->block2.data + i * (1 + row_size); - - bmap->ref = 1; - bmap->flags = 0; - bmap->c_size = n_eq + n_ineq; - bmap->eq = bmap->ineq + n_ineq; - bmap->extra = extra; - bmap->n_eq = 0; - bmap->n_ineq = 0; - bmap->n_div = 0; - bmap->sample = NULL; - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - isl_space *space; - - space = isl_space_set_alloc(ctx, nparam, dim); - if (!space) - return NULL; - - bmap = isl_basic_map_alloc_space(space, extra, n_eq, n_ineq); - return (struct isl_basic_set *)bmap; -} - -struct isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - if (!dim) - return NULL; - isl_assert(dim->ctx, dim->n_in == 0, goto error); - bmap = isl_basic_map_alloc_space(dim, extra, n_eq, n_ineq); - return (struct isl_basic_set *)bmap; -error: - isl_space_free(dim); - return NULL; -} - -struct isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - - if (!dim) - return NULL; - bmap = isl_calloc_type(dim->ctx, struct isl_basic_map); - if (!bmap) - goto error; - bmap->dim = dim; - - return basic_map_init(dim->ctx, bmap, extra, n_eq, n_ineq); -error: - isl_space_free(dim); - return NULL; -} - -struct isl_basic_map *isl_basic_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - isl_space *dim; - - dim = isl_space_alloc(ctx, nparam, in, out); - if (!dim) - return NULL; - - bmap = isl_basic_map_alloc_space(dim, extra, n_eq, n_ineq); - return bmap; -} - -static void dup_constraints( - struct isl_basic_map *dst, struct isl_basic_map *src) -{ - int i; - unsigned total = isl_basic_map_total_dim(src); - - for (i = 0; i < src->n_eq; ++i) { - int j = isl_basic_map_alloc_equality(dst); - isl_seq_cpy(dst->eq[j], src->eq[i], 1+total); - } - - for (i = 0; i < src->n_ineq; ++i) { - int j = isl_basic_map_alloc_inequality(dst); - isl_seq_cpy(dst->ineq[j], src->ineq[i], 1+total); - } - - for (i = 0; i < src->n_div; ++i) { - int j = isl_basic_map_alloc_div(dst); - isl_seq_cpy(dst->div[j], src->div[i], 1+1+total); - } - ISL_F_SET(dst, ISL_BASIC_SET_FINAL); -} - -struct isl_basic_map *isl_basic_map_dup(struct isl_basic_map *bmap) -{ - struct isl_basic_map *dup; - - if (!bmap) - return NULL; - dup = isl_basic_map_alloc_space(isl_space_copy(bmap->dim), - bmap->n_div, bmap->n_eq, bmap->n_ineq); - if (!dup) - return NULL; - dup_constraints(dup, bmap); - dup->flags = bmap->flags; - dup->sample = isl_vec_copy(bmap->sample); - return dup; -} - -struct isl_basic_set *isl_basic_set_dup(struct isl_basic_set *bset) -{ - struct isl_basic_map *dup; - - dup = isl_basic_map_dup((struct isl_basic_map *)bset); - return (struct isl_basic_set *)dup; -} - -struct isl_basic_set *isl_basic_set_copy(struct isl_basic_set *bset) -{ - if (!bset) - return NULL; - - if (ISL_F_ISSET(bset, ISL_BASIC_SET_FINAL)) { - bset->ref++; - return bset; - } - return isl_basic_set_dup(bset); -} - -struct isl_set *isl_set_copy(struct isl_set *set) -{ - if (!set) - return NULL; - - set->ref++; - return set; -} - -struct isl_basic_map *isl_basic_map_copy(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_SET_FINAL)) { - bmap->ref++; - return bmap; - } - bmap = isl_basic_map_dup(bmap); - if (bmap) - ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); - return bmap; -} - -struct isl_map *isl_map_copy(struct isl_map *map) -{ - if (!map) - return NULL; - - map->ref++; - return map; -} - -void isl_basic_map_free(struct isl_basic_map *bmap) -{ - if (!bmap) - return; - - if (--bmap->ref > 0) - return; - - isl_ctx_deref(bmap->ctx); - free(bmap->div); - isl_blk_free(bmap->ctx, bmap->block2); - free(bmap->ineq); - isl_blk_free(bmap->ctx, bmap->block); - isl_vec_free(bmap->sample); - isl_space_free(bmap->dim); - free(bmap); -} - -void isl_basic_set_free(struct isl_basic_set *bset) -{ - isl_basic_map_free((struct isl_basic_map *)bset); -} - -static int room_for_con(struct isl_basic_map *bmap, unsigned n) -{ - return bmap->n_eq + bmap->n_ineq + n <= bmap->c_size; -} - -__isl_give isl_map *isl_map_align_params_map_map_and( - __isl_take isl_map *map1, __isl_take isl_map *map2, - __isl_give isl_map *(*fn)(__isl_take isl_map *map1, - __isl_take isl_map *map2)) -{ - if (!map1 || !map2) - goto error; - if (isl_space_match(map1->dim, isl_dim_param, map2->dim, isl_dim_param)) - return fn(map1, map2); - if (!isl_space_has_named_params(map1->dim) || - !isl_space_has_named_params(map2->dim)) - isl_die(map1->ctx, isl_error_invalid, - "unaligned unnamed parameters", goto error); - map1 = isl_map_align_params(map1, isl_map_get_space(map2)); - map2 = isl_map_align_params(map2, isl_map_get_space(map1)); - return fn(map1, map2); -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -int isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1, - __isl_keep isl_map *map2, - int (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2)) -{ - int r; - - if (!map1 || !map2) - return -1; - if (isl_space_match(map1->dim, isl_dim_param, map2->dim, isl_dim_param)) - return fn(map1, map2); - if (!isl_space_has_named_params(map1->dim) || - !isl_space_has_named_params(map2->dim)) - isl_die(map1->ctx, isl_error_invalid, - "unaligned unnamed parameters", return -1); - map1 = isl_map_copy(map1); - map2 = isl_map_copy(map2); - map1 = isl_map_align_params(map1, isl_map_get_space(map2)); - map2 = isl_map_align_params(map2, isl_map_get_space(map1)); - r = fn(map1, map2); - isl_map_free(map1); - isl_map_free(map2); - return r; -} - -int isl_basic_map_alloc_equality(struct isl_basic_map *bmap) -{ - struct isl_ctx *ctx; - if (!bmap) - return -1; - ctx = bmap->ctx; - isl_assert(ctx, room_for_con(bmap, 1), return -1); - isl_assert(ctx, (bmap->eq - bmap->ineq) + bmap->n_eq <= bmap->c_size, - return -1); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_ALL_EQUALITIES); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - if ((bmap->eq - bmap->ineq) + bmap->n_eq == bmap->c_size) { - isl_int *t; - int j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - return -1; - t = bmap->ineq[j]; - bmap->ineq[j] = bmap->ineq[bmap->n_ineq - 1]; - bmap->ineq[bmap->n_ineq - 1] = bmap->eq[-1]; - bmap->eq[-1] = t; - bmap->n_eq++; - bmap->n_ineq--; - bmap->eq--; - return 0; - } - isl_seq_clr(bmap->eq[bmap->n_eq] + 1 + isl_basic_map_total_dim(bmap), - bmap->extra - bmap->n_div); - return bmap->n_eq++; -} - -int isl_basic_set_alloc_equality(struct isl_basic_set *bset) -{ - return isl_basic_map_alloc_equality((struct isl_basic_map *)bset); -} - -int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, n <= bmap->n_eq, return -1); - bmap->n_eq -= n; - return 0; -} - -int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_equality((struct isl_basic_map *)bset, n); -} - -int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos) -{ - isl_int *t; - if (!bmap) - return -1; - isl_assert(bmap->ctx, pos < bmap->n_eq, return -1); - - if (pos != bmap->n_eq - 1) { - t = bmap->eq[pos]; - bmap->eq[pos] = bmap->eq[bmap->n_eq - 1]; - bmap->eq[bmap->n_eq - 1] = t; - } - bmap->n_eq--; - return 0; -} - -int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos) -{ - return isl_basic_map_drop_equality((struct isl_basic_map *)bset, pos); -} - -void isl_basic_map_inequality_to_equality( - struct isl_basic_map *bmap, unsigned pos) -{ - isl_int *t; - - t = bmap->ineq[pos]; - bmap->ineq[pos] = bmap->ineq[bmap->n_ineq - 1]; - bmap->ineq[bmap->n_ineq - 1] = bmap->eq[-1]; - bmap->eq[-1] = t; - bmap->n_eq++; - bmap->n_ineq--; - bmap->eq--; - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - ISL_F_CLR(bmap, ISL_BASIC_MAP_ALL_EQUALITIES); -} - -static int room_for_ineq(struct isl_basic_map *bmap, unsigned n) -{ - return bmap->n_ineq + n <= bmap->eq - bmap->ineq; -} - -int isl_basic_map_alloc_inequality(struct isl_basic_map *bmap) -{ - struct isl_ctx *ctx; - if (!bmap) - return -1; - ctx = bmap->ctx; - isl_assert(ctx, room_for_ineq(bmap, 1), return -1); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_IMPLICIT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NO_REDUNDANT); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - ISL_F_CLR(bmap, ISL_BASIC_MAP_ALL_EQUALITIES); - isl_seq_clr(bmap->ineq[bmap->n_ineq] + - 1 + isl_basic_map_total_dim(bmap), - bmap->extra - bmap->n_div); - return bmap->n_ineq++; -} - -int isl_basic_set_alloc_inequality(struct isl_basic_set *bset) -{ - return isl_basic_map_alloc_inequality((struct isl_basic_map *)bset); -} - -int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, n <= bmap->n_ineq, return -1); - bmap->n_ineq -= n; - return 0; -} - -int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_inequality((struct isl_basic_map *)bset, n); -} - -int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos) -{ - isl_int *t; - if (!bmap) - return -1; - isl_assert(bmap->ctx, pos < bmap->n_ineq, return -1); - - if (pos != bmap->n_ineq - 1) { - t = bmap->ineq[pos]; - bmap->ineq[pos] = bmap->ineq[bmap->n_ineq - 1]; - bmap->ineq[bmap->n_ineq - 1] = t; - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } - bmap->n_ineq--; - return 0; -} - -int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos) -{ - return isl_basic_map_drop_inequality((struct isl_basic_map *)bset, pos); -} - -__isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap, - isl_int *eq) -{ - int k; - - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - if (!bmap) - return NULL; - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], eq, 1 + isl_basic_map_total_dim(bmap)); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset, - isl_int *eq) -{ - return (isl_basic_set *) - isl_basic_map_add_eq((isl_basic_map *)bset, eq); -} - -__isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap, - isl_int *ineq) -{ - int k; - - bmap = isl_basic_map_extend_constraints(bmap, 0, 1); - if (!bmap) - return NULL; - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], ineq, 1 + isl_basic_map_total_dim(bmap)); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset, - isl_int *ineq) -{ - return (isl_basic_set *) - isl_basic_map_add_ineq((isl_basic_map *)bset, ineq); -} - -int isl_basic_map_alloc_div(struct isl_basic_map *bmap) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, bmap->n_div < bmap->extra, return -1); - isl_seq_clr(bmap->div[bmap->n_div] + - 1 + 1 + isl_basic_map_total_dim(bmap), - bmap->extra - bmap->n_div); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - return bmap->n_div++; -} - -int isl_basic_set_alloc_div(struct isl_basic_set *bset) -{ - return isl_basic_map_alloc_div((struct isl_basic_map *)bset); -} - -int isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n) -{ - if (!bmap) - return -1; - isl_assert(bmap->ctx, n <= bmap->n_div, return -1); - bmap->n_div -= n; - return 0; -} - -int isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_div((struct isl_basic_map *)bset, n); -} - -/* Copy constraint from src to dst, putting the vars of src at offset - * dim_off in dst and the divs of src at offset div_off in dst. - * If both sets are actually map, then dim_off applies to the input - * variables. - */ -static void copy_constraint(struct isl_basic_map *dst_map, isl_int *dst, - struct isl_basic_map *src_map, isl_int *src, - unsigned in_off, unsigned out_off, unsigned div_off) -{ - unsigned src_nparam = isl_basic_map_n_param(src_map); - unsigned dst_nparam = isl_basic_map_n_param(dst_map); - unsigned src_in = isl_basic_map_n_in(src_map); - unsigned dst_in = isl_basic_map_n_in(dst_map); - unsigned src_out = isl_basic_map_n_out(src_map); - unsigned dst_out = isl_basic_map_n_out(dst_map); - isl_int_set(dst[0], src[0]); - isl_seq_cpy(dst+1, src+1, isl_min(dst_nparam, src_nparam)); - if (dst_nparam > src_nparam) - isl_seq_clr(dst+1+src_nparam, - dst_nparam - src_nparam); - isl_seq_clr(dst+1+dst_nparam, in_off); - isl_seq_cpy(dst+1+dst_nparam+in_off, - src+1+src_nparam, - isl_min(dst_in-in_off, src_in)); - if (dst_in-in_off > src_in) - isl_seq_clr(dst+1+dst_nparam+in_off+src_in, - dst_in - in_off - src_in); - isl_seq_clr(dst+1+dst_nparam+dst_in, out_off); - isl_seq_cpy(dst+1+dst_nparam+dst_in+out_off, - src+1+src_nparam+src_in, - isl_min(dst_out-out_off, src_out)); - if (dst_out-out_off > src_out) - isl_seq_clr(dst+1+dst_nparam+dst_in+out_off+src_out, - dst_out - out_off - src_out); - isl_seq_clr(dst+1+dst_nparam+dst_in+dst_out, div_off); - isl_seq_cpy(dst+1+dst_nparam+dst_in+dst_out+div_off, - src+1+src_nparam+src_in+src_out, - isl_min(dst_map->extra-div_off, src_map->n_div)); - if (dst_map->n_div-div_off > src_map->n_div) - isl_seq_clr(dst+1+dst_nparam+dst_in+dst_out+ - div_off+src_map->n_div, - dst_map->n_div - div_off - src_map->n_div); -} - -static void copy_div(struct isl_basic_map *dst_map, isl_int *dst, - struct isl_basic_map *src_map, isl_int *src, - unsigned in_off, unsigned out_off, unsigned div_off) -{ - isl_int_set(dst[0], src[0]); - copy_constraint(dst_map, dst+1, src_map, src+1, in_off, out_off, div_off); -} - -static struct isl_basic_map *add_constraints(struct isl_basic_map *bmap1, - struct isl_basic_map *bmap2, unsigned i_pos, unsigned o_pos) -{ - int i; - unsigned div_off; - - if (!bmap1 || !bmap2) - goto error; - - div_off = bmap1->n_div; - - for (i = 0; i < bmap2->n_eq; ++i) { - int i1 = isl_basic_map_alloc_equality(bmap1); - if (i1 < 0) - goto error; - copy_constraint(bmap1, bmap1->eq[i1], bmap2, bmap2->eq[i], - i_pos, o_pos, div_off); - } - - for (i = 0; i < bmap2->n_ineq; ++i) { - int i1 = isl_basic_map_alloc_inequality(bmap1); - if (i1 < 0) - goto error; - copy_constraint(bmap1, bmap1->ineq[i1], bmap2, bmap2->ineq[i], - i_pos, o_pos, div_off); - } - - for (i = 0; i < bmap2->n_div; ++i) { - int i1 = isl_basic_map_alloc_div(bmap1); - if (i1 < 0) - goto error; - copy_div(bmap1, bmap1->div[i1], bmap2, bmap2->div[i], - i_pos, o_pos, div_off); - } - - isl_basic_map_free(bmap2); - - return bmap1; - -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, unsigned pos) -{ - return (struct isl_basic_set *) - add_constraints((struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2, 0, pos); -} - -struct isl_basic_map *isl_basic_map_extend_space(struct isl_basic_map *base, - __isl_take isl_space *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *ext; - unsigned flags; - int dims_ok; - - if (!dim) - goto error; - - if (!base) - goto error; - - dims_ok = isl_space_is_equal(base->dim, dim) && - base->extra >= base->n_div + extra; - - if (dims_ok && room_for_con(base, n_eq + n_ineq) && - room_for_ineq(base, n_ineq)) { - isl_space_free(dim); - return base; - } - - isl_assert(base->ctx, base->dim->nparam <= dim->nparam, goto error); - isl_assert(base->ctx, base->dim->n_in <= dim->n_in, goto error); - isl_assert(base->ctx, base->dim->n_out <= dim->n_out, goto error); - extra += base->extra; - n_eq += base->n_eq; - n_ineq += base->n_ineq; - - ext = isl_basic_map_alloc_space(dim, extra, n_eq, n_ineq); - dim = NULL; - if (!ext) - goto error; - - if (dims_ok) - ext->sample = isl_vec_copy(base->sample); - flags = base->flags; - ext = add_constraints(ext, base, 0, 0); - if (ext) { - ext->flags = flags; - ISL_F_CLR(ext, ISL_BASIC_SET_FINAL); - } - - return ext; - -error: - isl_space_free(dim); - isl_basic_map_free(base); - return NULL; -} - -struct isl_basic_set *isl_basic_set_extend_space(struct isl_basic_set *base, - __isl_take isl_space *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - return (struct isl_basic_set *) - isl_basic_map_extend_space((struct isl_basic_map *)base, dim, - extra, n_eq, n_ineq); -} - -struct isl_basic_map *isl_basic_map_extend_constraints( - struct isl_basic_map *base, unsigned n_eq, unsigned n_ineq) -{ - if (!base) - return NULL; - return isl_basic_map_extend_space(base, isl_space_copy(base->dim), - 0, n_eq, n_ineq); -} - -struct isl_basic_map *isl_basic_map_extend(struct isl_basic_map *base, - unsigned nparam, unsigned n_in, unsigned n_out, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - struct isl_basic_map *bmap; - isl_space *dim; - - if (!base) - return NULL; - dim = isl_space_alloc(base->ctx, nparam, n_in, n_out); - if (!dim) - goto error; - - bmap = isl_basic_map_extend_space(base, dim, extra, n_eq, n_ineq); - return bmap; -error: - isl_basic_map_free(base); - return NULL; -} - -struct isl_basic_set *isl_basic_set_extend(struct isl_basic_set *base, - unsigned nparam, unsigned dim, unsigned extra, - unsigned n_eq, unsigned n_ineq) -{ - return (struct isl_basic_set *) - isl_basic_map_extend((struct isl_basic_map *)base, - nparam, 0, dim, extra, n_eq, n_ineq); -} - -struct isl_basic_set *isl_basic_set_extend_constraints( - struct isl_basic_set *base, unsigned n_eq, unsigned n_ineq) -{ - return (struct isl_basic_set *) - isl_basic_map_extend_constraints((struct isl_basic_map *)base, - n_eq, n_ineq); -} - -struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_cow((struct isl_basic_map *)bset); -} - -struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (bmap->ref > 1) { - bmap->ref--; - bmap = isl_basic_map_dup(bmap); - } - if (bmap) - ISL_F_CLR(bmap, ISL_BASIC_SET_FINAL); - return bmap; -} - -struct isl_set *isl_set_cow(struct isl_set *set) -{ - if (!set) - return NULL; - - if (set->ref == 1) - return set; - set->ref--; - return isl_set_dup(set); -} - -struct isl_map *isl_map_cow(struct isl_map *map) -{ - if (!map) - return NULL; - - if (map->ref == 1) - return map; - map->ref--; - return isl_map_dup(map); -} - -static void swap_vars(struct isl_blk blk, isl_int *a, - unsigned a_len, unsigned b_len) -{ - isl_seq_cpy(blk.data, a+a_len, b_len); - isl_seq_cpy(blk.data+b_len, a, a_len); - isl_seq_cpy(a, blk.data, b_len+a_len); -} - -static __isl_give isl_basic_map *isl_basic_map_swap_vars( - __isl_take isl_basic_map *bmap, unsigned pos, unsigned n1, unsigned n2) -{ - int i; - struct isl_blk blk; - - if (!bmap) - goto error; - - isl_assert(bmap->ctx, - pos + n1 + n2 <= 1 + isl_basic_map_total_dim(bmap), goto error); - - if (n1 == 0 || n2 == 0) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - blk = isl_blk_alloc(bmap->ctx, n1 + n2); - if (isl_blk_is_error(blk)) - goto error; - - for (i = 0; i < bmap->n_eq; ++i) - swap_vars(blk, - bmap->eq[i] + pos, n1, n2); - - for (i = 0; i < bmap->n_ineq; ++i) - swap_vars(blk, - bmap->ineq[i] + pos, n1, n2); - - for (i = 0; i < bmap->n_div; ++i) - swap_vars(blk, - bmap->div[i]+1 + pos, n1, n2); - - isl_blk_free(bmap->ctx, blk); - - ISL_F_CLR(bmap, ISL_BASIC_SET_NORMALIZED); - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_set *isl_basic_set_swap_vars( - __isl_take isl_basic_set *bset, unsigned n) -{ - unsigned dim; - unsigned nparam; - - nparam = isl_basic_set_n_param(bset); - dim = isl_basic_set_n_dim(bset); - isl_assert(bset->ctx, n <= dim, goto error); - - return isl_basic_map_swap_vars(bset, 1 + nparam, n, dim - n); -error: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap) -{ - int i = 0; - unsigned total; - if (!bmap) - goto error; - total = isl_basic_map_total_dim(bmap); - isl_basic_map_free_div(bmap, bmap->n_div); - isl_basic_map_free_inequality(bmap, bmap->n_ineq); - if (bmap->n_eq > 0) - isl_basic_map_free_equality(bmap, bmap->n_eq-1); - else { - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - goto error; - } - isl_int_set_si(bmap->eq[i][0], 1); - isl_seq_clr(bmap->eq[i]+1, total); - ISL_F_SET(bmap, ISL_BASIC_MAP_EMPTY); - isl_vec_free(bmap->sample); - bmap->sample = NULL; - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_set_to_empty((struct isl_basic_map *)bset); -} - -void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b) -{ - int i; - unsigned off = isl_space_dim(bmap->dim, isl_dim_all); - isl_int *t = bmap->div[a]; - bmap->div[a] = bmap->div[b]; - bmap->div[b] = t; - - for (i = 0; i < bmap->n_eq; ++i) - isl_int_swap(bmap->eq[i][1+off+a], bmap->eq[i][1+off+b]); - - for (i = 0; i < bmap->n_ineq; ++i) - isl_int_swap(bmap->ineq[i][1+off+a], bmap->ineq[i][1+off+b]); - - for (i = 0; i < bmap->n_div; ++i) - isl_int_swap(bmap->div[i][1+1+off+a], bmap->div[i][1+1+off+b]); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return NULL; - if (n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_eliminate(map->p[i], type, first, n); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_eliminate((isl_map *)set, type, first, n); -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_set *isl_set_eliminate_dims(__isl_take isl_set *set, - unsigned first, unsigned n) -{ - return isl_set_eliminate(set, isl_dim_set, first, n); -} - -__isl_give isl_basic_map *isl_basic_map_remove_divs( - __isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - bmap = isl_basic_map_eliminate_vars(bmap, - isl_space_dim(bmap->dim, isl_dim_all), bmap->n_div); - if (!bmap) - return NULL; - bmap->n_div = 0; - return isl_basic_map_finalize(bmap); -} - -__isl_give isl_basic_set *isl_basic_set_remove_divs( - __isl_take isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_remove_divs( - (struct isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_remove_divs(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_remove_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set) -{ - return isl_map_remove_divs(set); -} - -struct isl_basic_map *isl_basic_map_remove_dims(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - if (!bmap) - return NULL; - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - if (n == 0 && !isl_space_is_named_or_nested(bmap->dim, type)) - return bmap; - bmap = isl_basic_map_eliminate_vars(bmap, - isl_basic_map_offset(bmap, type) - 1 + first, n); - if (!bmap) - return bmap; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY) && type == isl_dim_div) - return bmap; - bmap = isl_basic_map_drop(bmap, type, first, n); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Return true if the definition of the given div (recursively) involves - * any of the given variables. - */ -static int div_involves_vars(__isl_keep isl_basic_map *bmap, int div, - unsigned first, unsigned n) -{ - int i; - unsigned div_offset = isl_basic_map_offset(bmap, isl_dim_div); - - if (isl_int_is_zero(bmap->div[div][0])) - return 0; - if (isl_seq_first_non_zero(bmap->div[div] + 1 + first, n) >= 0) - return 1; - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (isl_int_is_zero(bmap->div[div][1 + div_offset + i])) - continue; - if (div_involves_vars(bmap, i, first, n)) - return 1; - } - - return 0; -} - -/* Remove all divs (recursively) involving any of the given dimensions - * in their definitions. - */ -__isl_give isl_basic_map *isl_basic_map_remove_divs_involving_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!bmap) - return NULL; - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - first += isl_basic_map_offset(bmap, type); - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (!div_involves_vars(bmap, i, first, n)) - continue; - bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, i, 1); - if (!bmap) - return NULL; - i = bmap->n_div; - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_remove_divs_involving_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_remove_divs_involving_dims(map->p[i], - type, first, n); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_divs_involving_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_remove_divs_involving_dims((isl_map *)set, - type, first, n); -} - -/* Does the desciption of "bmap" depend on the specified dimensions? - * We also check whether the dimensions appear in any of the div definitions. - * In principle there is no need for this check. If the dimensions appear - * in a div definition, they also appear in the defining constraints of that - * div. - */ -int isl_basic_map_involves_dims(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!bmap) - return -1; - - if (first + n > isl_basic_map_dim(bmap, type)) - isl_die(bmap->ctx, isl_error_invalid, - "index out of bounds", return -1); - - first += isl_basic_map_offset(bmap, type); - for (i = 0; i < bmap->n_eq; ++i) - if (isl_seq_first_non_zero(bmap->eq[i] + first, n) >= 0) - return 1; - for (i = 0; i < bmap->n_ineq; ++i) - if (isl_seq_first_non_zero(bmap->ineq[i] + first, n) >= 0) - return 1; - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_seq_first_non_zero(bmap->div[i] + 1 + first, n) >= 0) - return 1; - } - - return 0; -} - -int isl_map_involves_dims(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return -1; - - if (first + n > isl_map_dim(map, type)) - isl_die(map->ctx, isl_error_invalid, - "index out of bounds", return -1); - - for (i = 0; i < map->n; ++i) { - int involves = isl_basic_map_involves_dims(map->p[i], - type, first, n); - if (involves < 0 || involves) - return involves; - } - - return 0; -} - -int isl_basic_set_involves_dims(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return isl_basic_map_involves_dims(bset, type, first, n); -} - -int isl_set_involves_dims(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return isl_map_involves_dims(set, type, first, n); -} - -/* Return true if the definition of the given div is unknown or depends - * on unknown divs. - */ -static int div_is_unknown(__isl_keep isl_basic_map *bmap, int div) -{ - int i; - unsigned div_offset = isl_basic_map_offset(bmap, isl_dim_div); - - if (isl_int_is_zero(bmap->div[div][0])) - return 1; - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (isl_int_is_zero(bmap->div[div][1 + div_offset + i])) - continue; - if (div_is_unknown(bmap, i)) - return 1; - } - - return 0; -} - -/* Remove all divs that are unknown or defined in terms of unknown divs. - */ -__isl_give isl_basic_map *isl_basic_map_remove_unknown_divs( - __isl_take isl_basic_map *bmap) -{ - int i; - - if (!bmap) - return NULL; - - for (i = bmap->n_div - 1; i >= 0; --i) { - if (!div_is_unknown(bmap, i)) - continue; - bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, i, 1); - } - - return bmap; -} - -__isl_give isl_map *isl_map_remove_unknown_divs(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_remove_unknown_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_unknown_divs(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_remove_unknown_divs((isl_map *)set); -} - -__isl_give isl_basic_set *isl_basic_set_remove_dims( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_basic_set *) - isl_basic_map_remove_dims((isl_basic_map *)bset, type, first, n); -} - -struct isl_map *isl_map_remove_dims(struct isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (n == 0) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_eliminate_vars(map->p[i], - isl_basic_map_offset(map->p[i], type) - 1 + first, n); - if (!map->p[i]) - goto error; - } - map = isl_map_drop(map, type, first, n); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_remove_dims((isl_map *)bset, type, first, n); -} - -/* Project out n inputs starting at first using Fourier-Motzkin */ -struct isl_map *isl_map_remove_inputs(struct isl_map *map, - unsigned first, unsigned n) -{ - return isl_map_remove_dims(map, isl_dim_in, first, n); -} - -static void dump_term(struct isl_basic_map *bmap, - isl_int c, int pos, FILE *out) -{ - const char *name; - unsigned in = isl_basic_map_n_in(bmap); - unsigned dim = in + isl_basic_map_n_out(bmap); - unsigned nparam = isl_basic_map_n_param(bmap); - if (!pos) - isl_int_print(out, c, 0); - else { - if (!isl_int_is_one(c)) - isl_int_print(out, c, 0); - if (pos < 1 + nparam) { - name = isl_space_get_dim_name(bmap->dim, - isl_dim_param, pos - 1); - if (name) - fprintf(out, "%s", name); - else - fprintf(out, "p%d", pos - 1); - } else if (pos < 1 + nparam + in) - fprintf(out, "i%d", pos - 1 - nparam); - else if (pos < 1 + nparam + dim) - fprintf(out, "o%d", pos - 1 - nparam - in); - else - fprintf(out, "e%d", pos - 1 - nparam - dim); - } -} - -static void dump_constraint_sign(struct isl_basic_map *bmap, isl_int *c, - int sign, FILE *out) -{ - int i; - int first; - unsigned len = 1 + isl_basic_map_total_dim(bmap); - isl_int v; - - isl_int_init(v); - for (i = 0, first = 1; i < len; ++i) { - if (isl_int_sgn(c[i]) * sign <= 0) - continue; - if (!first) - fprintf(out, " + "); - first = 0; - isl_int_abs(v, c[i]); - dump_term(bmap, v, i, out); - } - isl_int_clear(v); - if (first) - fprintf(out, "0"); -} - -static void dump_constraint(struct isl_basic_map *bmap, isl_int *c, - const char *op, FILE *out, int indent) -{ - int i; - - fprintf(out, "%*s", indent, ""); - - dump_constraint_sign(bmap, c, 1, out); - fprintf(out, " %s ", op); - dump_constraint_sign(bmap, c, -1, out); - - fprintf(out, "\n"); - - for (i = bmap->n_div; i < bmap->extra; ++i) { - if (isl_int_is_zero(c[1+isl_space_dim(bmap->dim, isl_dim_all)+i])) - continue; - fprintf(out, "%*s", indent, ""); - fprintf(out, "ERROR: unused div coefficient not zero\n"); - abort(); - } -} - -static void dump_constraints(struct isl_basic_map *bmap, - isl_int **c, unsigned n, - const char *op, FILE *out, int indent) -{ - int i; - - for (i = 0; i < n; ++i) - dump_constraint(bmap, c[i], op, out, indent); -} - -static void dump_affine(struct isl_basic_map *bmap, isl_int *exp, FILE *out) -{ - int j; - int first = 1; - unsigned total = isl_basic_map_total_dim(bmap); - - for (j = 0; j < 1 + total; ++j) { - if (isl_int_is_zero(exp[j])) - continue; - if (!first && isl_int_is_pos(exp[j])) - fprintf(out, "+"); - dump_term(bmap, exp[j], j, out); - first = 0; - } -} - -static void dump(struct isl_basic_map *bmap, FILE *out, int indent) -{ - int i; - - dump_constraints(bmap, bmap->eq, bmap->n_eq, "=", out, indent); - dump_constraints(bmap, bmap->ineq, bmap->n_ineq, ">=", out, indent); - - for (i = 0; i < bmap->n_div; ++i) { - fprintf(out, "%*s", indent, ""); - fprintf(out, "e%d = [(", i); - dump_affine(bmap, bmap->div[i]+1, out); - fprintf(out, ")/"); - isl_int_print(out, bmap->div[i][0], 0); - fprintf(out, "]\n"); - } -} - -void isl_basic_set_print_internal(struct isl_basic_set *bset, - FILE *out, int indent) -{ - if (!bset) { - fprintf(out, "null basic set\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, nparam: %d, dim: %d, extra: %d, flags: %x\n", - bset->ref, bset->dim->nparam, bset->dim->n_out, - bset->extra, bset->flags); - dump((struct isl_basic_map *)bset, out, indent); -} - -void isl_basic_map_print_internal(struct isl_basic_map *bmap, - FILE *out, int indent) -{ - if (!bmap) { - fprintf(out, "null basic map\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, nparam: %d, in: %d, out: %d, extra: %d, " - "flags: %x, n_name: %d\n", - bmap->ref, - bmap->dim->nparam, bmap->dim->n_in, bmap->dim->n_out, - bmap->extra, bmap->flags, bmap->dim->n_id); - dump(bmap, out, indent); -} - -int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos) -{ - unsigned total; - if (!bmap) - return -1; - total = isl_basic_map_total_dim(bmap); - isl_assert(bmap->ctx, pos < bmap->n_ineq, return -1); - isl_seq_neg(bmap->ineq[pos], bmap->ineq[pos], 1 + total); - isl_int_sub_ui(bmap->ineq[pos][0], bmap->ineq[pos][0], 1); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - return 0; -} - -__isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *dim, int n, - unsigned flags) -{ - struct isl_set *set; - - if (!dim) - return NULL; - isl_assert(dim->ctx, dim->n_in == 0, goto error); - isl_assert(dim->ctx, n >= 0, goto error); - set = isl_alloc(dim->ctx, struct isl_set, - sizeof(struct isl_set) + - (n - 1) * sizeof(struct isl_basic_set *)); - if (!set) - goto error; - - set->ctx = dim->ctx; - isl_ctx_ref(set->ctx); - set->ref = 1; - set->size = n; - set->n = 0; - set->dim = dim; - set->flags = flags; - return set; -error: - isl_space_free(dim); - return NULL; -} - -struct isl_set *isl_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, int n, unsigned flags) -{ - struct isl_set *set; - isl_space *dims; - - dims = isl_space_alloc(ctx, nparam, 0, dim); - if (!dims) - return NULL; - - set = isl_set_alloc_space(dims, n, flags); - return set; -} - -/* Make sure "map" has room for at least "n" more basic maps. - */ -struct isl_map *isl_map_grow(struct isl_map *map, int n) -{ - int i; - struct isl_map *grown = NULL; - - if (!map) - return NULL; - isl_assert(map->ctx, n >= 0, goto error); - if (map->n + n <= map->size) - return map; - grown = isl_map_alloc_space(isl_map_get_space(map), map->n + n, map->flags); - if (!grown) - goto error; - for (i = 0; i < map->n; ++i) { - grown->p[i] = isl_basic_map_copy(map->p[i]); - if (!grown->p[i]) - goto error; - grown->n++; - } - isl_map_free(map); - return grown; -error: - isl_map_free(grown); - isl_map_free(map); - return NULL; -} - -/* Make sure "set" has room for at least "n" more basic sets. - */ -struct isl_set *isl_set_grow(struct isl_set *set, int n) -{ - return (struct isl_set *)isl_map_grow((struct isl_map *)set, n); -} - -struct isl_set *isl_set_dup(struct isl_set *set) -{ - int i; - struct isl_set *dup; - - if (!set) - return NULL; - - dup = isl_set_alloc_space(isl_space_copy(set->dim), set->n, set->flags); - if (!dup) - return NULL; - for (i = 0; i < set->n; ++i) - dup = isl_set_add_basic_set(dup, isl_basic_set_copy(set->p[i])); - return dup; -} - -struct isl_set *isl_set_from_basic_set(struct isl_basic_set *bset) -{ - return isl_map_from_basic_map(bset); -} - -struct isl_map *isl_map_from_basic_map(struct isl_basic_map *bmap) -{ - struct isl_map *map; - - if (!bmap) - return NULL; - - map = isl_map_alloc_space(isl_space_copy(bmap->dim), 1, ISL_MAP_DISJOINT); - return isl_map_add_basic_map(map, bmap); -} - -__isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *bset) -{ - return (struct isl_set *)isl_map_add_basic_map((struct isl_map *)set, - (struct isl_basic_map *)bset); -} - -void isl_set_free(struct isl_set *set) -{ - int i; - - if (!set) - return; - - if (--set->ref > 0) - return; - - isl_ctx_deref(set->ctx); - for (i = 0; i < set->n; ++i) - isl_basic_set_free(set->p[i]); - isl_space_free(set->dim); - free(set); -} - -void isl_set_print_internal(struct isl_set *set, FILE *out, int indent) -{ - int i; - - if (!set) { - fprintf(out, "null set\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, n: %d, nparam: %d, dim: %d, flags: %x\n", - set->ref, set->n, set->dim->nparam, set->dim->n_out, - set->flags); - for (i = 0; i < set->n; ++i) { - fprintf(out, "%*s", indent, ""); - fprintf(out, "basic set %d:\n", i); - isl_basic_set_print_internal(set->p[i], out, indent+4); - } -} - -void isl_map_print_internal(struct isl_map *map, FILE *out, int indent) -{ - int i; - - if (!map) { - fprintf(out, "null map\n"); - return; - } - - fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, n: %d, nparam: %d, in: %d, out: %d, " - "flags: %x, n_name: %d\n", - map->ref, map->n, map->dim->nparam, map->dim->n_in, - map->dim->n_out, map->flags, map->dim->n_id); - for (i = 0; i < map->n; ++i) { - fprintf(out, "%*s", indent, ""); - fprintf(out, "basic map %d:\n", i); - isl_basic_map_print_internal(map->p[i], out, indent+4); - } -} - -struct isl_basic_map *isl_basic_map_intersect_domain( - struct isl_basic_map *bmap, struct isl_basic_set *bset) -{ - struct isl_basic_map *bmap_domain; - - if (!bmap || !bset) - goto error; - - isl_assert(bset->ctx, isl_space_match(bmap->dim, isl_dim_param, - bset->dim, isl_dim_param), goto error); - - if (isl_space_dim(bset->dim, isl_dim_set) != 0) - isl_assert(bset->ctx, - isl_basic_map_compatible_domain(bmap, bset), goto error); - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim), - bset->n_div, bset->n_eq, bset->n_ineq); - bmap_domain = isl_basic_map_from_domain(bset); - bmap = add_constraints(bmap, bmap_domain, 0, 0); - - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_map *isl_basic_map_intersect_range( - struct isl_basic_map *bmap, struct isl_basic_set *bset) -{ - struct isl_basic_map *bmap_range; - - if (!bmap || !bset) - goto error; - - isl_assert(bset->ctx, isl_space_match(bmap->dim, isl_dim_param, - bset->dim, isl_dim_param), goto error); - - if (isl_space_dim(bset->dim, isl_dim_set) != 0) - isl_assert(bset->ctx, - isl_basic_map_compatible_range(bmap, bset), goto error); - - if (isl_basic_set_is_universe(bset)) { - isl_basic_set_free(bset); - return bmap; - } - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim), - bset->n_div, bset->n_eq, bset->n_ineq); - bmap_range = isl_basic_map_from_basic_set(bset, isl_space_copy(bset->dim)); - bmap = add_constraints(bmap, bmap_range, 0, 0); - - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - isl_basic_set_free(bset); - return NULL; -} - -int isl_basic_map_contains(struct isl_basic_map *bmap, struct isl_vec *vec) -{ - int i; - unsigned total; - isl_int s; - - total = 1 + isl_basic_map_total_dim(bmap); - if (total != vec->size) - return -1; - - isl_int_init(s); - - for (i = 0; i < bmap->n_eq; ++i) { - isl_seq_inner_product(vec->el, bmap->eq[i], total, &s); - if (!isl_int_is_zero(s)) { - isl_int_clear(s); - return 0; - } - } - - for (i = 0; i < bmap->n_ineq; ++i) { - isl_seq_inner_product(vec->el, bmap->ineq[i], total, &s); - if (isl_int_is_neg(s)) { - isl_int_clear(s); - return 0; - } - } - - isl_int_clear(s); - - return 1; -} - -int isl_basic_set_contains(struct isl_basic_set *bset, struct isl_vec *vec) -{ - return isl_basic_map_contains((struct isl_basic_map *)bset, vec); -} - -struct isl_basic_map *isl_basic_map_intersect( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - struct isl_vec *sample = NULL; - - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, isl_space_match(bmap1->dim, isl_dim_param, - bmap2->dim, isl_dim_param), goto error); - if (isl_space_dim(bmap1->dim, isl_dim_all) == - isl_space_dim(bmap1->dim, isl_dim_param) && - isl_space_dim(bmap2->dim, isl_dim_all) != - isl_space_dim(bmap2->dim, isl_dim_param)) - return isl_basic_map_intersect(bmap2, bmap1); - - if (isl_space_dim(bmap2->dim, isl_dim_all) != - isl_space_dim(bmap2->dim, isl_dim_param)) - isl_assert(bmap1->ctx, - isl_space_is_equal(bmap1->dim, bmap2->dim), goto error); - - if (bmap1->sample && - isl_basic_map_contains(bmap1, bmap1->sample) > 0 && - isl_basic_map_contains(bmap2, bmap1->sample) > 0) - sample = isl_vec_copy(bmap1->sample); - else if (bmap2->sample && - isl_basic_map_contains(bmap1, bmap2->sample) > 0 && - isl_basic_map_contains(bmap2, bmap2->sample) > 0) - sample = isl_vec_copy(bmap2->sample); - - bmap1 = isl_basic_map_cow(bmap1); - if (!bmap1) - goto error; - bmap1 = isl_basic_map_extend_space(bmap1, isl_space_copy(bmap1->dim), - bmap2->n_div, bmap2->n_eq, bmap2->n_ineq); - bmap1 = add_constraints(bmap1, bmap2, 0, 0); - - if (!bmap1) - isl_vec_free(sample); - else if (sample) { - isl_vec_free(bmap1->sample); - bmap1->sample = sample; - } - - bmap1 = isl_basic_map_simplify(bmap1); - return isl_basic_map_finalize(bmap1); -error: - if (sample) - isl_vec_free(sample); - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_basic_set *isl_basic_set_intersect( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - return (struct isl_basic_set *) - isl_basic_map_intersect( - (struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2); -} - -__isl_give isl_basic_set *isl_basic_set_intersect_params( - __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2) -{ - return isl_basic_set_intersect(bset1, bset2); -} - -/* Special case of isl_map_intersect, where both map1 and map2 - * are convex, without any divs and such that either map1 or map2 - * contains a single constraint. This constraint is then simply - * added to the other map. - */ -static __isl_give isl_map *map_intersect_add_constraint( - __isl_take isl_map *map1, __isl_take isl_map *map2) -{ - isl_assert(map1->ctx, map1->n == 1, goto error); - isl_assert(map2->ctx, map1->n == 1, goto error); - isl_assert(map1->ctx, map1->p[0]->n_div == 0, goto error); - isl_assert(map2->ctx, map1->p[0]->n_div == 0, goto error); - - if (map2->p[0]->n_eq + map2->p[0]->n_ineq != 1) - return isl_map_intersect(map2, map1); - - isl_assert(map2->ctx, - map2->p[0]->n_eq + map2->p[0]->n_ineq == 1, goto error); - - map1 = isl_map_cow(map1); - if (!map1) - goto error; - if (isl_map_plain_is_empty(map1)) { - isl_map_free(map2); - return map1; - } - map1->p[0] = isl_basic_map_cow(map1->p[0]); - if (map2->p[0]->n_eq == 1) - map1->p[0] = isl_basic_map_add_eq(map1->p[0], map2->p[0]->eq[0]); - else - map1->p[0] = isl_basic_map_add_ineq(map1->p[0], - map2->p[0]->ineq[0]); - - map1->p[0] = isl_basic_map_simplify(map1->p[0]); - map1->p[0] = isl_basic_map_finalize(map1->p[0]); - if (!map1->p[0]) - goto error; - - if (isl_basic_map_plain_is_empty(map1->p[0])) { - isl_basic_map_free(map1->p[0]); - map1->n = 0; - } - - isl_map_free(map2); - - return map1; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -/* map2 may be either a parameter domain or a map living in the same - * space as map1. - */ -static __isl_give isl_map *map_intersect_internal(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - unsigned flags = 0; - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - if (isl_map_plain_is_empty(map1) && - isl_space_is_equal(map1->dim, map2->dim)) { - isl_map_free(map2); - return map1; - } - if (isl_map_plain_is_empty(map2) && - isl_space_is_equal(map1->dim, map2->dim)) { - isl_map_free(map1); - return map2; - } - - if (map1->n == 1 && map2->n == 1 && - map1->p[0]->n_div == 0 && map2->p[0]->n_div == 0 && - isl_space_is_equal(map1->dim, map2->dim) && - (map1->p[0]->n_eq + map1->p[0]->n_ineq == 1 || - map2->p[0]->n_eq + map2->p[0]->n_ineq == 1)) - return map_intersect_add_constraint(map1, map2); - - if (isl_space_dim(map2->dim, isl_dim_all) != - isl_space_dim(map2->dim, isl_dim_param)) - isl_assert(map1->ctx, - isl_space_is_equal(map1->dim, map2->dim), goto error); - - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT) && - ISL_F_ISSET(map2, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - result = isl_map_alloc_space(isl_space_copy(map1->dim), - map1->n * map2->n, flags); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - struct isl_basic_map *part; - part = isl_basic_map_intersect( - isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j])); - if (isl_basic_map_is_empty(part)) - isl_basic_map_free(part); - else - result = isl_map_add_basic_map(result, part); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -static __isl_give isl_map *map_intersect(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - if (!map1 || !map2) - goto error; - if (!isl_space_is_equal(map1->dim, map2->dim)) - isl_die(isl_map_get_ctx(map1), isl_error_invalid, - "spaces don't match", goto error); - return map_intersect_internal(map1, map2); -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_map *isl_map_intersect(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_intersect); -} - -struct isl_set *isl_set_intersect(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_intersect((struct isl_map *)set1, - (struct isl_map *)set2); -} - -/* map_intersect_internal accepts intersections - * with parameter domains, so we can just call that function. - */ -static __isl_give isl_map *map_intersect_params(__isl_take isl_map *map, - __isl_take isl_set *params) -{ - return map_intersect_internal(map, params); -} - -__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_intersect_params); -} - -__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, - __isl_take isl_set *params) -{ - return isl_map_intersect_params(set, params); -} - -struct isl_basic_map *isl_basic_map_reverse(struct isl_basic_map *bmap) -{ - isl_space *dim; - struct isl_basic_set *bset; - unsigned in; - - if (!bmap) - return NULL; - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - dim = isl_space_reverse(isl_space_copy(bmap->dim)); - in = isl_basic_map_n_in(bmap); - bset = isl_basic_set_from_basic_map(bmap); - bset = isl_basic_set_swap_vars(bset, in); - return isl_basic_map_from_basic_set(bset, dim); -} - -static __isl_give isl_basic_map *basic_map_space_reset( - __isl_take isl_basic_map *bmap, enum isl_dim_type type) -{ - isl_space *space; - - if (!isl_space_is_named_or_nested(bmap->dim, type)) - return bmap; - - space = isl_basic_map_get_space(bmap); - space = isl_space_reset(space, type); - bmap = isl_basic_map_reset_space(bmap, space); - return bmap; -} - -__isl_give isl_basic_map *isl_basic_map_insert(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - isl_space *res_dim; - struct isl_basic_map *res; - struct isl_dim_map *dim_map; - unsigned total, off; - enum isl_dim_type t; - - if (n == 0) - return basic_map_space_reset(bmap, type); - - if (!bmap) - return NULL; - - res_dim = isl_space_insert_dims(isl_basic_map_get_space(bmap), type, pos, n); - - total = isl_basic_map_total_dim(bmap) + n; - dim_map = isl_dim_map_alloc(bmap->ctx, total); - off = 0; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - if (t != type) { - isl_dim_map_dim(dim_map, bmap->dim, t, off); - } else { - unsigned size = isl_basic_map_dim(bmap, t); - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, pos, off); - isl_dim_map_dim_range(dim_map, bmap->dim, t, - pos, size - pos, off + pos + n); - } - off += isl_space_dim(res_dim, t); - } - isl_dim_map_div(dim_map, bmap, off); - - res = isl_basic_map_alloc_space(res_dim, - bmap->n_div, bmap->n_eq, bmap->n_ineq); - if (isl_basic_map_is_rational(bmap)) - res = isl_basic_map_set_rational(res); - res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - return isl_basic_map_finalize(res); -} - -__isl_give isl_basic_map *isl_basic_map_add(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned n) -{ - if (!bmap) - return NULL; - return isl_basic_map_insert(bmap, type, - isl_basic_map_dim(bmap, type), n); -} - -__isl_give isl_basic_set *isl_basic_set_add(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned n) -{ - if (!bset) - return NULL; - isl_assert(bset->ctx, type != isl_dim_in, goto error); - return (isl_basic_set *)isl_basic_map_add((isl_basic_map *)bset, type, n); -error: - isl_basic_set_free(bset); - return NULL; -} - -static __isl_give isl_map *map_space_reset(__isl_take isl_map *map, - enum isl_dim_type type) -{ - isl_space *space; - - if (!map || !isl_space_is_named_or_nested(map->dim, type)) - return map; - - space = isl_map_get_space(map); - space = isl_space_reset(space, type); - map = isl_map_reset_space(map, space); - return map; -} - -__isl_give isl_map *isl_map_insert_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - int i; - - if (n == 0) - return map_space_reset(map, type); - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_insert_dims(map->dim, type, pos, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_insert(map->p[i], type, pos, n); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_insert_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - return isl_map_insert_dims(set, type, pos, n); -} - -__isl_give isl_map *isl_map_add_dims(__isl_take isl_map *map, - enum isl_dim_type type, unsigned n) -{ - if (!map) - return NULL; - return isl_map_insert_dims(map, type, isl_map_dim(map, type), n); -} - -__isl_give isl_set *isl_set_add_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned n) -{ - if (!set) - return NULL; - isl_assert(set->ctx, type != isl_dim_in, goto error); - return (isl_set *)isl_map_add_dims((isl_map *)set, type, n); -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_move_dims( - __isl_take isl_basic_map *bmap, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - struct isl_dim_map *dim_map; - struct isl_basic_map *res; - enum isl_dim_type t; - unsigned total, off; - - if (!bmap) - return NULL; - if (n == 0) - return bmap; - - isl_assert(bmap->ctx, src_pos + n <= isl_basic_map_dim(bmap, src_type), - goto error); - - if (dst_type == src_type && dst_pos == src_pos) - return bmap; - - isl_assert(bmap->ctx, dst_type != src_type, goto error); - - if (pos(bmap->dim, dst_type) + dst_pos == - pos(bmap->dim, src_type) + src_pos + - ((src_type < dst_type) ? n : 0)) { - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_space_move_dims(bmap->dim, dst_type, dst_pos, - src_type, src_pos, n); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; - } - - total = isl_basic_map_total_dim(bmap); - dim_map = isl_dim_map_alloc(bmap->ctx, total); - - off = 0; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - unsigned size = isl_space_dim(bmap->dim, t); - if (t == dst_type) { - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, dst_pos, off); - off += dst_pos; - isl_dim_map_dim_range(dim_map, bmap->dim, src_type, - src_pos, n, off); - off += n; - isl_dim_map_dim_range(dim_map, bmap->dim, t, - dst_pos, size - dst_pos, off); - off += size - dst_pos; - } else if (t == src_type) { - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, src_pos, off); - off += src_pos; - isl_dim_map_dim_range(dim_map, bmap->dim, t, - src_pos + n, size - src_pos - n, off); - off += size - src_pos - n; - } else { - isl_dim_map_dim(dim_map, bmap->dim, t, off); - off += size; - } - } - isl_dim_map_div(dim_map, bmap, off); - - res = isl_basic_map_alloc_space(isl_basic_map_get_space(bmap), - bmap->n_div, bmap->n_eq, bmap->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - - bmap->dim = isl_space_move_dims(bmap->dim, dst_type, dst_pos, - src_type, src_pos, n); - if (!bmap->dim) - goto error; - - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - bmap = isl_basic_map_gauss(bmap, NULL); - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_move_dims(__isl_take isl_basic_set *bset, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - return (isl_basic_set *)isl_basic_map_move_dims( - (isl_basic_map *)bset, dst_type, dst_pos, src_type, src_pos, n); -} - -__isl_give isl_set *isl_set_move_dims(__isl_take isl_set *set, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - if (!set) - return NULL; - isl_assert(set->ctx, dst_type != isl_dim_in, goto error); - return (isl_set *)isl_map_move_dims((isl_map *)set, dst_type, dst_pos, - src_type, src_pos, n); -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_map *isl_map_move_dims(__isl_take isl_map *map, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - if (!map) - return NULL; - if (n == 0) - return map; - - isl_assert(map->ctx, src_pos + n <= isl_map_dim(map, src_type), - goto error); - - if (dst_type == src_type && dst_pos == src_pos) - return map; - - isl_assert(map->ctx, dst_type != src_type, goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_move_dims(map->dim, dst_type, dst_pos, src_type, src_pos, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_move_dims(map->p[i], - dst_type, dst_pos, - src_type, src_pos, n); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Move the specified dimensions to the last columns right before - * the divs. Don't change the dimension specification of bmap. - * That's the responsibility of the caller. - */ -static __isl_give isl_basic_map *move_last(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - struct isl_dim_map *dim_map; - struct isl_basic_map *res; - enum isl_dim_type t; - unsigned total, off; - - if (!bmap) - return NULL; - if (pos(bmap->dim, type) + first + n == - 1 + isl_space_dim(bmap->dim, isl_dim_all)) - return bmap; - - total = isl_basic_map_total_dim(bmap); - dim_map = isl_dim_map_alloc(bmap->ctx, total); - - off = 0; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - unsigned size = isl_space_dim(bmap->dim, t); - if (t == type) { - isl_dim_map_dim_range(dim_map, bmap->dim, t, - 0, first, off); - off += first; - isl_dim_map_dim_range(dim_map, bmap->dim, t, - first, n, total - bmap->n_div - n); - isl_dim_map_dim_range(dim_map, bmap->dim, t, - first + n, size - (first + n), off); - off += size - (first + n); - } else { - isl_dim_map_dim(dim_map, bmap->dim, t, off); - off += size; - } - } - isl_dim_map_div(dim_map, bmap, off + n); - - res = isl_basic_map_alloc_space(isl_basic_map_get_space(bmap), - bmap->n_div, bmap->n_eq, bmap->n_ineq); - res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - return res; -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -__isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - size_t row_size; - isl_int **new_div; - isl_int *old; - - if (n == 0) - return bmap; - - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return isl_basic_map_remove_dims(bmap, type, first, n); - - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - - bmap = move_last(bmap, type, first, n); - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - row_size = 1 + isl_space_dim(bmap->dim, isl_dim_all) + bmap->extra; - old = bmap->block2.data; - bmap->block2 = isl_blk_extend(bmap->ctx, bmap->block2, - (bmap->extra + n) * (1 + row_size)); - if (!bmap->block2.data) - goto error; - new_div = isl_alloc_array(bmap->ctx, isl_int *, bmap->extra + n); - if (!new_div) - goto error; - for (i = 0; i < n; ++i) { - new_div[i] = bmap->block2.data + - (bmap->extra + i) * (1 + row_size); - isl_seq_clr(new_div[i], 1 + row_size); - } - for (i = 0; i < bmap->extra; ++i) - new_div[n + i] = bmap->block2.data + (bmap->div[i] - old); - free(bmap->div); - bmap->div = new_div; - bmap->n_div += n; - bmap->extra += n; - - bmap->dim = isl_space_drop_dims(bmap->dim, type, first, n); - if (!bmap->dim) - goto error; - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_drop_redundant_divs(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -struct isl_basic_set *isl_basic_set_project_out(struct isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_basic_set *)isl_basic_map_project_out( - (isl_basic_map *)bset, type, first, n); -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -__isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - return NULL; - - if (n == 0) - return map; - - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_drop_dims(map->dim, type, first, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_project_out(map->p[i], type, first, n); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. - */ -__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_project_out((isl_map *)set, type, first, n); -} - -static struct isl_basic_map *add_divs(struct isl_basic_map *bmap, unsigned n) -{ - int i, j; - - for (i = 0; i < n; ++i) { - j = isl_basic_map_alloc_div(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->div[j], 1+1+isl_basic_map_total_dim(bmap)); - } - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_apply_range( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - isl_space *dim_result = NULL; - struct isl_basic_map *bmap; - unsigned n_in, n_out, n, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - dim_result = isl_space_join(isl_space_copy(bmap1->dim), - isl_space_copy(bmap2->dim)); - - n_in = isl_basic_map_n_in(bmap1); - n_out = isl_basic_map_n_out(bmap2); - n = isl_basic_map_n_out(bmap1); - nparam = isl_basic_map_n_param(bmap1); - - total = nparam + n_in + n_out + bmap1->n_div + bmap2->n_div + n; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += n_in); - isl_dim_map_div(dim_map1, bmap1, pos += n_out); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += bmap2->n_div); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos); - - bmap = isl_basic_map_alloc_space(dim_result, - bmap1->n_div + bmap2->n_div + n, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = add_divs(bmap, n); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_drop_redundant_divs(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_basic_set *isl_basic_set_apply( - struct isl_basic_set *bset, struct isl_basic_map *bmap) -{ - if (!bset || !bmap) - goto error; - - isl_assert(bset->ctx, isl_basic_map_compatible_domain(bmap, bset), - goto error); - - return (struct isl_basic_set *) - isl_basic_map_apply_range((struct isl_basic_map *)bset, bmap); -error: - isl_basic_set_free(bset); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_apply_domain( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, - isl_basic_map_n_in(bmap1) == isl_basic_map_n_in(bmap2), goto error); - isl_assert(bmap1->ctx, - isl_basic_map_n_param(bmap1) == isl_basic_map_n_param(bmap2), - goto error); - - bmap1 = isl_basic_map_reverse(bmap1); - bmap1 = isl_basic_map_apply_range(bmap1, bmap2); - return isl_basic_map_reverse(bmap1); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -/* Given two basic maps A -> f(A) and B -> g(B), construct a basic map - * A \cap B -> f(A) + f(B) - */ -struct isl_basic_map *isl_basic_map_sum( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - unsigned n_in, n_out, nparam, total, pos; - struct isl_basic_map *bmap = NULL; - struct isl_dim_map *dim_map1, *dim_map2; - int i; - - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), - goto error); - - nparam = isl_basic_map_n_param(bmap1); - n_in = isl_basic_map_n_in(bmap1); - n_out = isl_basic_map_n_out(bmap1); - - total = nparam + n_in + n_out + bmap1->n_div + bmap2->n_div + 2 * n_out; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap2->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos); - isl_dim_map_div(dim_map1, bmap1, pos += n_in + n_out); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += bmap2->n_div); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += n_out); - - bmap = isl_basic_map_alloc_space(isl_space_copy(bmap1->dim), - bmap1->n_div + bmap2->n_div + 2 * n_out, - bmap1->n_eq + bmap2->n_eq + n_out, - bmap1->n_ineq + bmap2->n_ineq); - for (i = 0; i < n_out; ++i) { - int j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j], 1+total); - isl_int_set_si(bmap->eq[j][1+nparam+n_in+i], -1); - isl_int_set_si(bmap->eq[j][1+pos+i], 1); - isl_int_set_si(bmap->eq[j][1+pos-n_out+i], 1); - } - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = add_divs(bmap, 2 * n_out); - - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -/* Given two maps A -> f(A) and B -> g(B), construct a map - * A \cap B -> f(A) + f(B) - */ -struct isl_map *isl_map_sum(struct isl_map *map1, struct isl_map *map2) -{ - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - isl_assert(map1->ctx, isl_space_is_equal(map1->dim, map2->dim), goto error); - - result = isl_map_alloc_space(isl_space_copy(map1->dim), - map1->n * map2->n, 0); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - struct isl_basic_map *part; - part = isl_basic_map_sum( - isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j])); - if (isl_basic_map_is_empty(part)) - isl_basic_map_free(part); - else - result = isl_map_add_basic_map(result, part); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_set *isl_set_sum(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - return (isl_set *)isl_map_sum((isl_map *)set1, (isl_map *)set2); -} - -/* Given a basic map A -> f(A), construct A -> -f(A). - */ -struct isl_basic_map *isl_basic_map_neg(struct isl_basic_map *bmap) -{ - int i, j; - unsigned off, n; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - n = isl_basic_map_dim(bmap, isl_dim_out); - off = isl_basic_map_offset(bmap, isl_dim_out); - for (i = 0; i < bmap->n_eq; ++i) - for (j = 0; j < n; ++j) - isl_int_neg(bmap->eq[i][off+j], bmap->eq[i][off+j]); - for (i = 0; i < bmap->n_ineq; ++i) - for (j = 0; j < n; ++j) - isl_int_neg(bmap->ineq[i][off+j], bmap->ineq[i][off+j]); - for (i = 0; i < bmap->n_div; ++i) - for (j = 0; j < n; ++j) - isl_int_neg(bmap->div[i][1+off+j], bmap->div[i][1+off+j]); - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -} - -__isl_give isl_basic_set *isl_basic_set_neg(__isl_take isl_basic_set *bset) -{ - return isl_basic_map_neg(bset); -} - -/* Given a map A -> f(A), construct A -> -f(A). - */ -struct isl_map *isl_map_neg(struct isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_neg(map->p[i]); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_neg(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_neg((isl_map *)set); -} - -/* Given a basic map A -> f(A) and an integer d, construct a basic map - * A -> floor(f(A)/d). - */ -struct isl_basic_map *isl_basic_map_floordiv(struct isl_basic_map *bmap, - isl_int d) -{ - unsigned n_in, n_out, nparam, total, pos; - struct isl_basic_map *result = NULL; - struct isl_dim_map *dim_map; - int i; - - if (!bmap) - return NULL; - - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - n_out = isl_basic_map_n_out(bmap); - - total = nparam + n_in + n_out + bmap->n_div + n_out; - dim_map = isl_dim_map_alloc(bmap->ctx, total); - isl_dim_map_dim(dim_map, bmap->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map, bmap->dim, isl_dim_in, pos += nparam); - isl_dim_map_div(dim_map, bmap, pos += n_in + n_out); - isl_dim_map_dim(dim_map, bmap->dim, isl_dim_out, pos += bmap->n_div); - - result = isl_basic_map_alloc_space(isl_space_copy(bmap->dim), - bmap->n_div + n_out, - bmap->n_eq, bmap->n_ineq + 2 * n_out); - result = isl_basic_map_add_constraints_dim_map(result, bmap, dim_map); - result = add_divs(result, n_out); - for (i = 0; i < n_out; ++i) { - int j; - j = isl_basic_map_alloc_inequality(result); - if (j < 0) - goto error; - isl_seq_clr(result->ineq[j], 1+total); - isl_int_neg(result->ineq[j][1+nparam+n_in+i], d); - isl_int_set_si(result->ineq[j][1+pos+i], 1); - j = isl_basic_map_alloc_inequality(result); - if (j < 0) - goto error; - isl_seq_clr(result->ineq[j], 1+total); - isl_int_set(result->ineq[j][1+nparam+n_in+i], d); - isl_int_set_si(result->ineq[j][1+pos+i], -1); - isl_int_sub_ui(result->ineq[j][0], d, 1); - } - - result = isl_basic_map_simplify(result); - return isl_basic_map_finalize(result); -error: - isl_basic_map_free(result); - return NULL; -} - -/* Given a map A -> f(A) and an integer d, construct a map - * A -> floor(f(A)/d). - */ -struct isl_map *isl_map_floordiv(struct isl_map *map, isl_int d) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - ISL_F_CLR(map, ISL_MAP_DISJOINT); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_floordiv(map->p[i], d); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -static struct isl_basic_map *var_equal(struct isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->eq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[i][1+nparam+pos], -1); - isl_int_set_si(bmap->eq[i][1+nparam+n_in+pos], 1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraints to "bmap" expressing i_pos < o_pos - */ -static struct isl_basic_map *var_less(struct isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][0], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], 1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraint to "bmap" expressing i_pos <= o_pos - */ -static __isl_give isl_basic_map *var_less_or_equal( - __isl_take isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], 1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraints to "bmap" expressing i_pos > o_pos - */ -static struct isl_basic_map *var_more(struct isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][0], -1); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], 1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], -1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Add a constraint to "bmap" expressing i_pos >= o_pos - */ -static __isl_give isl_basic_map *var_more_or_equal( - __isl_take isl_basic_map *bmap, unsigned pos) -{ - int i; - unsigned nparam; - unsigned n_in; - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - goto error; - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[i][1+nparam+pos], 1); - isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], -1); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_equal( - __isl_take isl_space *dim, unsigned n_equal) -{ - int i; - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_space(dim, 0, n_equal, 0); - if (!bmap) - return NULL; - for (i = 0; i < n_equal && bmap; ++i) - bmap = var_equal(bmap, i); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on of dimension "dim" expressing i_[0..pos] << o_[0..pos] - */ -__isl_give isl_basic_map *isl_basic_map_less_at(__isl_take isl_space *dim, - unsigned pos) -{ - int i; - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_space(dim, 0, pos, 1); - if (!bmap) - return NULL; - for (i = 0; i < pos && bmap; ++i) - bmap = var_equal(bmap, i); - if (bmap) - bmap = var_less(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on of dimension "dim" expressing i_[0..pos] <<= o_[0..pos] - */ -__isl_give isl_basic_map *isl_basic_map_less_or_equal_at( - __isl_take isl_space *dim, unsigned pos) -{ - int i; - isl_basic_map *bmap; - - bmap = isl_basic_map_alloc_space(dim, 0, pos, 1); - for (i = 0; i < pos; ++i) - bmap = var_equal(bmap, i); - bmap = var_less_or_equal(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on pairs of sets of dimension "dim" expressing i_pos > o_pos - */ -__isl_give isl_basic_map *isl_basic_map_more_at(__isl_take isl_space *dim, - unsigned pos) -{ - int i; - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_space(dim, 0, pos, 1); - if (!bmap) - return NULL; - for (i = 0; i < pos && bmap; ++i) - bmap = var_equal(bmap, i); - if (bmap) - bmap = var_more(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -/* Return a relation on of dimension "dim" expressing i_[0..pos] >>= o_[0..pos] - */ -__isl_give isl_basic_map *isl_basic_map_more_or_equal_at( - __isl_take isl_space *dim, unsigned pos) -{ - int i; - isl_basic_map *bmap; - - bmap = isl_basic_map_alloc_space(dim, 0, pos, 1); - for (i = 0; i < pos; ++i) - bmap = var_equal(bmap, i); - bmap = var_more_or_equal(bmap, pos); - return isl_basic_map_finalize(bmap); -} - -static __isl_give isl_map *map_lex_lte_first(__isl_take isl_space *dims, - unsigned n, int equal) -{ - struct isl_map *map; - int i; - - if (n == 0 && equal) - return isl_map_universe(dims); - - map = isl_map_alloc_space(isl_space_copy(dims), n, ISL_MAP_DISJOINT); - - for (i = 0; i + 1 < n; ++i) - map = isl_map_add_basic_map(map, - isl_basic_map_less_at(isl_space_copy(dims), i)); - if (n > 0) { - if (equal) - map = isl_map_add_basic_map(map, - isl_basic_map_less_or_equal_at(dims, n - 1)); - else - map = isl_map_add_basic_map(map, - isl_basic_map_less_at(dims, n - 1)); - } else - isl_space_free(dims); - - return map; -} - -static __isl_give isl_map *map_lex_lte(__isl_take isl_space *dims, int equal) -{ - if (!dims) - return NULL; - return map_lex_lte_first(dims, dims->n_out, equal); -} - -__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_space *dim, unsigned n) -{ - return map_lex_lte_first(dim, n, 0); -} - -__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_space *dim, unsigned n) -{ - return map_lex_lte_first(dim, n, 1); -} - -__isl_give isl_map *isl_map_lex_lt(__isl_take isl_space *set_dim) -{ - return map_lex_lte(isl_space_map_from_set(set_dim), 0); -} - -__isl_give isl_map *isl_map_lex_le(__isl_take isl_space *set_dim) -{ - return map_lex_lte(isl_space_map_from_set(set_dim), 1); -} - -static __isl_give isl_map *map_lex_gte_first(__isl_take isl_space *dims, - unsigned n, int equal) -{ - struct isl_map *map; - int i; - - if (n == 0 && equal) - return isl_map_universe(dims); - - map = isl_map_alloc_space(isl_space_copy(dims), n, ISL_MAP_DISJOINT); - - for (i = 0; i + 1 < n; ++i) - map = isl_map_add_basic_map(map, - isl_basic_map_more_at(isl_space_copy(dims), i)); - if (n > 0) { - if (equal) - map = isl_map_add_basic_map(map, - isl_basic_map_more_or_equal_at(dims, n - 1)); - else - map = isl_map_add_basic_map(map, - isl_basic_map_more_at(dims, n - 1)); - } else - isl_space_free(dims); - - return map; -} - -static __isl_give isl_map *map_lex_gte(__isl_take isl_space *dims, int equal) -{ - if (!dims) - return NULL; - return map_lex_gte_first(dims, dims->n_out, equal); -} - -__isl_give isl_map *isl_map_lex_gt_first(__isl_take isl_space *dim, unsigned n) -{ - return map_lex_gte_first(dim, n, 0); -} - -__isl_give isl_map *isl_map_lex_ge_first(__isl_take isl_space *dim, unsigned n) -{ - return map_lex_gte_first(dim, n, 1); -} - -__isl_give isl_map *isl_map_lex_gt(__isl_take isl_space *set_dim) -{ - return map_lex_gte(isl_space_map_from_set(set_dim), 0); -} - -__isl_give isl_map *isl_map_lex_ge(__isl_take isl_space *set_dim) -{ - return map_lex_gte(isl_space_map_from_set(set_dim), 1); -} - -__isl_give isl_map *isl_set_lex_le_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_le(isl_set_get_space(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_set_lex_lt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_lt(isl_set_get_space(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_set_lex_ge_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_ge(isl_set_get_space(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_set_lex_gt_set(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - isl_map *map; - map = isl_map_lex_gt(isl_set_get_space(set1)); - map = isl_map_intersect_domain(map, set1); - map = isl_map_intersect_range(map, set2); - return map; -} - -__isl_give isl_map *isl_map_lex_le_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_le(isl_space_range(isl_map_get_space(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_map *isl_map_lex_lt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_lt(isl_space_range(isl_map_get_space(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_map *isl_map_lex_ge_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_ge(isl_space_range(isl_map_get_space(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *map; - map = isl_map_lex_gt(isl_space_range(isl_map_get_space(map1))); - map = isl_map_apply_domain(map, isl_map_reverse(map1)); - map = isl_map_apply_range(map, isl_map_reverse(map2)); - return map; -} - -__isl_give isl_basic_map *isl_basic_map_from_basic_set( - __isl_take isl_basic_set *bset, __isl_take isl_space *dim) -{ - struct isl_basic_map *bmap; - - bset = isl_basic_set_cow(bset); - if (!bset || !dim) - goto error; - - isl_assert(bset->ctx, isl_space_compatible(bset->dim, dim), goto error); - isl_space_free(bset->dim); - bmap = (struct isl_basic_map *) bset; - bmap->dim = dim; - return isl_basic_map_finalize(bmap); -error: - isl_basic_set_free(bset); - isl_space_free(dim); - return NULL; -} - -struct isl_basic_set *isl_basic_set_from_basic_map(struct isl_basic_map *bmap) -{ - if (!bmap) - goto error; - if (bmap->dim->n_in == 0) - return (struct isl_basic_set *)bmap; - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap->dim = isl_space_as_set_space(bmap->dim); - if (!bmap->dim) - goto error; - bmap = isl_basic_map_finalize(bmap); - return (struct isl_basic_set *)bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* For a div d = floor(f/m), add the constraints - * - * f - m d >= 0 - * -(f-(n-1)) + m d >= 0 - * - * Note that the second constraint is the negation of - * - * f - m d >= n - */ -int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap, - unsigned pos, isl_int *div) -{ - int i, j; - unsigned total = isl_basic_map_total_dim(bmap); - - i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - return -1; - isl_seq_cpy(bmap->ineq[i], div + 1, 1 + total); - isl_int_neg(bmap->ineq[i][1 + pos], div[0]); - - j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - return -1; - isl_seq_neg(bmap->ineq[j], bmap->ineq[i], 1 + total); - isl_int_add(bmap->ineq[j][0], bmap->ineq[j][0], bmap->ineq[j][1 + pos]); - isl_int_sub_ui(bmap->ineq[j][0], bmap->ineq[j][0], 1); - return j; -} - -int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset, - unsigned pos, isl_int *div) -{ - return isl_basic_map_add_div_constraints_var((isl_basic_map *)bset, - pos, div); -} - -int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div) -{ - unsigned total = isl_basic_map_total_dim(bmap); - unsigned div_pos = total - bmap->n_div + div; - - return isl_basic_map_add_div_constraints_var(bmap, div_pos, - bmap->div[div]); -} - -struct isl_basic_set *isl_basic_map_underlying_set( - struct isl_basic_map *bmap) -{ - if (!bmap) - goto error; - if (bmap->dim->nparam == 0 && bmap->dim->n_in == 0 && - bmap->n_div == 0 && - !isl_space_is_named_or_nested(bmap->dim, isl_dim_in) && - !isl_space_is_named_or_nested(bmap->dim, isl_dim_out)) - return (struct isl_basic_set *)bmap; - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - bmap->dim = isl_space_underlying(bmap->dim, bmap->n_div); - if (!bmap->dim) - goto error; - bmap->extra -= bmap->n_div; - bmap->n_div = 0; - bmap = isl_basic_map_finalize(bmap); - return (struct isl_basic_set *)bmap; -error: - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_underlying_set( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_underlying_set((isl_basic_map *)bset); -} - -struct isl_basic_map *isl_basic_map_overlying_set( - struct isl_basic_set *bset, struct isl_basic_map *like) -{ - struct isl_basic_map *bmap; - struct isl_ctx *ctx; - unsigned total; - int i; - - if (!bset || !like) - goto error; - ctx = bset->ctx; - isl_assert(ctx, bset->n_div == 0, goto error); - isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(ctx, bset->dim->n_out == isl_basic_map_total_dim(like), - goto error); - if (isl_space_is_equal(bset->dim, like->dim) && like->n_div == 0) { - isl_basic_map_free(like); - return (struct isl_basic_map *)bset; - } - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - total = bset->dim->n_out + bset->extra; - bmap = (struct isl_basic_map *)bset; - isl_space_free(bmap->dim); - bmap->dim = isl_space_copy(like->dim); - if (!bmap->dim) - goto error; - bmap->n_div = like->n_div; - bmap->extra += like->n_div; - if (bmap->extra) { - unsigned ltotal; - isl_int **div; - ltotal = total - bmap->extra + like->extra; - if (ltotal > total) - ltotal = total; - bmap->block2 = isl_blk_extend(ctx, bmap->block2, - bmap->extra * (1 + 1 + total)); - if (isl_blk_is_error(bmap->block2)) - goto error; - div = isl_realloc_array(ctx, bmap->div, isl_int *, bmap->extra); - if (!div) - goto error; - bmap->div = div; - for (i = 0; i < bmap->extra; ++i) - bmap->div[i] = bmap->block2.data + i * (1 + 1 + total); - for (i = 0; i < like->n_div; ++i) { - isl_seq_cpy(bmap->div[i], like->div[i], 1 + 1 + ltotal); - isl_seq_clr(bmap->div[i]+1+1+ltotal, total - ltotal); - } - bmap = isl_basic_map_extend_constraints(bmap, - 0, 2 * like->n_div); - for (i = 0; i < like->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_basic_map_add_div_constraints(bmap, i) < 0) - goto error; - } - } - isl_basic_map_free(like); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_basic_map_free(like); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_basic_set *isl_basic_set_from_underlying_set( - struct isl_basic_set *bset, struct isl_basic_set *like) -{ - return (struct isl_basic_set *) - isl_basic_map_overlying_set(bset, (struct isl_basic_map *)like); -} - -struct isl_set *isl_set_from_underlying_set( - struct isl_set *set, struct isl_basic_set *like) -{ - int i; - - if (!set || !like) - goto error; - isl_assert(set->ctx, set->dim->n_out == isl_basic_set_total_dim(like), - goto error); - if (isl_space_is_equal(set->dim, like->dim) && like->n_div == 0) { - isl_basic_set_free(like); - return set; - } - set = isl_set_cow(set); - if (!set) - goto error; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_from_underlying_set(set->p[i], - isl_basic_set_copy(like)); - if (!set->p[i]) - goto error; - } - isl_space_free(set->dim); - set->dim = isl_space_copy(like->dim); - if (!set->dim) - goto error; - isl_basic_set_free(like); - return set; -error: - isl_basic_set_free(like); - isl_set_free(set); - return NULL; -} - -struct isl_set *isl_map_underlying_set(struct isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - map->dim = isl_space_cow(map->dim); - if (!map->dim) - goto error; - - for (i = 1; i < map->n; ++i) - isl_assert(map->ctx, map->p[0]->n_div == map->p[i]->n_div, - goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = (struct isl_basic_map *) - isl_basic_map_underlying_set(map->p[i]); - if (!map->p[i]) - goto error; - } - if (map->n == 0) - map->dim = isl_space_underlying(map->dim, 0); - else { - isl_space_free(map->dim); - map->dim = isl_space_copy(map->p[0]->dim); - } - if (!map->dim) - goto error; - return (struct isl_set *)map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_to_underlying_set(struct isl_set *set) -{ - return (struct isl_set *)isl_map_underlying_set((struct isl_map *)set); -} - -__isl_give isl_basic_map *isl_basic_map_reset_space( - __isl_take isl_basic_map *bmap, __isl_take isl_space *dim) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap || !dim) - goto error; - - isl_space_free(bmap->dim); - bmap->dim = dim; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - isl_space_free(dim); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_reset_space( - __isl_take isl_basic_set *bset, __isl_take isl_space *dim) -{ - return (isl_basic_set *)isl_basic_map_reset_space((isl_basic_map *)bset, - dim); -} - -__isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map, - __isl_take isl_space *dim) -{ - int i; - - map = isl_map_cow(map); - if (!map || !dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_reset_space(map->p[i], - isl_space_copy(dim)); - if (!map->p[i]) - goto error; - } - isl_space_free(map->dim); - map->dim = dim; - - return map; -error: - isl_map_free(map); - isl_space_free(dim); - return NULL; -} - -__isl_give isl_set *isl_set_reset_space(__isl_take isl_set *set, - __isl_take isl_space *dim) -{ - return (struct isl_set *) isl_map_reset_space((struct isl_map *)set, dim); -} - -/* Compute the parameter domain of the given basic set. - */ -__isl_give isl_basic_set *isl_basic_set_params(__isl_take isl_basic_set *bset) -{ - isl_space *space; - unsigned n; - - if (isl_basic_set_is_params(bset)) - return bset; - - n = isl_basic_set_dim(bset, isl_dim_set); - bset = isl_basic_set_project_out(bset, isl_dim_set, 0, n); - space = isl_basic_set_get_space(bset); - space = isl_space_params(space); - bset = isl_basic_set_reset_space(bset, space); - return bset; -} - -/* Compute the parameter domain of the given set. - */ -__isl_give isl_set *isl_set_params(__isl_take isl_set *set) -{ - isl_space *space; - unsigned n; - - if (isl_set_is_params(set)) - return set; - - n = isl_set_dim(set, isl_dim_set); - set = isl_set_project_out(set, isl_dim_set, 0, n); - space = isl_set_get_space(set); - space = isl_space_params(space); - set = isl_set_reset_space(set, space); - return set; -} - -/* Construct a zero-dimensional set with the given parameter domain. - */ -__isl_give isl_set *isl_set_from_params(__isl_take isl_set *set) -{ - isl_space *space; - space = isl_set_get_space(set); - space = isl_space_set_from_params(space); - set = isl_set_reset_space(set, space); - return set; -} - -/* Compute the parameter domain of the given map. - */ -__isl_give isl_set *isl_map_params(__isl_take isl_map *map) -{ - isl_space *space; - unsigned n; - - n = isl_map_dim(map, isl_dim_in); - map = isl_map_project_out(map, isl_dim_in, 0, n); - n = isl_map_dim(map, isl_dim_out); - map = isl_map_project_out(map, isl_dim_out, 0, n); - space = isl_map_get_space(map); - space = isl_space_params(space); - map = isl_map_reset_space(map, space); - return map; -} - -struct isl_basic_set *isl_basic_map_domain(struct isl_basic_map *bmap) -{ - isl_space *dim; - struct isl_basic_set *domain; - unsigned n_in; - unsigned n_out; - - if (!bmap) - return NULL; - dim = isl_space_domain(isl_basic_map_get_space(bmap)); - - n_in = isl_basic_map_n_in(bmap); - n_out = isl_basic_map_n_out(bmap); - domain = isl_basic_set_from_basic_map(bmap); - domain = isl_basic_set_project_out(domain, isl_dim_set, n_in, n_out); - - domain = isl_basic_set_reset_space(domain, dim); - - return domain; -} - -int isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return isl_space_may_be_set(bmap->dim); -} - -/* Is this basic map actually a set? - * Users should never call this function. Outside of isl, - * the type should indicate whether something is a set or a map. - */ -int isl_basic_map_is_set(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return isl_space_is_set(bmap->dim); -} - -struct isl_basic_set *isl_basic_map_range(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - if (isl_basic_map_is_set(bmap)) - return bmap; - return isl_basic_map_domain(isl_basic_map_reverse(bmap)); -} - -__isl_give isl_basic_map *isl_basic_map_domain_map( - __isl_take isl_basic_map *bmap) -{ - int i, k; - isl_space *dim; - isl_basic_map *domain; - int nparam, n_in, n_out; - unsigned total; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - - dim = isl_space_from_range(isl_space_domain(isl_basic_map_get_space(bmap))); - domain = isl_basic_map_universe(dim); - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = isl_basic_map_apply_range(bmap, domain); - bmap = isl_basic_map_extend_constraints(bmap, n_in, 0); - - total = isl_basic_map_total_dim(bmap); - - for (i = 0; i < n_in; ++i) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + total); - isl_int_set_si(bmap->eq[k][1 + nparam + i], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + n_in + n_out + i], 1); - } - - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_range_map( - __isl_take isl_basic_map *bmap) -{ - int i, k; - isl_space *dim; - isl_basic_map *range; - int nparam, n_in, n_out; - unsigned total; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - - dim = isl_space_from_range(isl_space_range(isl_basic_map_get_space(bmap))); - range = isl_basic_map_universe(dim); - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = isl_basic_map_apply_range(bmap, range); - bmap = isl_basic_map_extend_constraints(bmap, n_out, 0); - - total = isl_basic_map_total_dim(bmap); - - for (i = 0; i < n_out; ++i) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + total); - isl_int_set_si(bmap->eq[k][1 + nparam + n_in + i], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + n_in + n_out + i], 1); - } - - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -int isl_map_may_be_set(__isl_keep isl_map *map) -{ - if (!map) - return -1; - return isl_space_may_be_set(map->dim); -} - -/* Is this map actually a set? - * Users should never call this function. Outside of isl, - * the type should indicate whether something is a set or a map. - */ -int isl_map_is_set(__isl_keep isl_map *map) -{ - if (!map) - return -1; - return isl_space_is_set(map->dim); -} - -struct isl_set *isl_map_range(struct isl_map *map) -{ - int i; - struct isl_set *set; - - if (!map) - goto error; - if (isl_map_is_set(map)) - return (isl_set *)map; - - map = isl_map_cow(map); - if (!map) - goto error; - - set = (struct isl_set *) map; - set->dim = isl_space_range(set->dim); - if (!set->dim) - goto error; - for (i = 0; i < map->n; ++i) { - set->p[i] = isl_basic_map_range(map->p[i]); - if (!set->p[i]) - goto error; - } - ISL_F_CLR(set, ISL_MAP_DISJOINT); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map) -{ - int i; - isl_space *domain_dim; - - map = isl_map_cow(map); - if (!map) - return NULL; - - domain_dim = isl_space_from_range(isl_space_domain(isl_map_get_space(map))); - map->dim = isl_space_from_domain(isl_space_wrap(map->dim)); - map->dim = isl_space_join(map->dim, domain_dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_domain_map(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_DISJOINT); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_range_map(__isl_take isl_map *map) -{ - int i; - isl_space *range_dim; - - map = isl_map_cow(map); - if (!map) - return NULL; - - range_dim = isl_space_range(isl_map_get_space(map)); - range_dim = isl_space_from_range(range_dim); - map->dim = isl_space_from_domain(isl_space_wrap(map->dim)); - map->dim = isl_space_join(map->dim, range_dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_range_map(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_DISJOINT); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_from_set(__isl_take isl_set *set, - __isl_take isl_space *dim) -{ - int i; - struct isl_map *map = NULL; - - set = isl_set_cow(set); - if (!set || !dim) - goto error; - isl_assert(set->ctx, isl_space_compatible(set->dim, dim), goto error); - map = (struct isl_map *)set; - for (i = 0; i < set->n; ++i) { - map->p[i] = isl_basic_map_from_basic_set( - set->p[i], isl_space_copy(dim)); - if (!map->p[i]) - goto error; - } - isl_space_free(map->dim); - map->dim = dim; - return map; -error: - isl_space_free(dim); - isl_set_free(set); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_from_domain( - __isl_take isl_basic_set *bset) -{ - return isl_basic_map_reverse(isl_basic_map_from_range(bset)); -} - -__isl_give isl_basic_map *isl_basic_map_from_range( - __isl_take isl_basic_set *bset) -{ - isl_space *space; - space = isl_basic_set_get_space(bset); - space = isl_space_from_range(space); - bset = isl_basic_set_reset_space(bset, space); - return (isl_basic_map *)bset; -} - -struct isl_map *isl_map_from_range(struct isl_set *set) -{ - isl_space *space; - space = isl_set_get_space(set); - space = isl_space_from_range(space); - set = isl_set_reset_space(set, space); - return (struct isl_map *)set; -} - -__isl_give isl_map *isl_map_from_domain(__isl_take isl_set *set) -{ - return isl_map_reverse(isl_map_from_range(set)); -} - -__isl_give isl_basic_map *isl_basic_map_from_domain_and_range( - __isl_take isl_basic_set *domain, __isl_take isl_basic_set *range) -{ - return isl_basic_map_apply_range(isl_basic_map_reverse(domain), range); -} - -__isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain, - __isl_take isl_set *range) -{ - return isl_map_apply_range(isl_map_reverse(domain), range); -} - -struct isl_set *isl_set_from_map(struct isl_map *map) -{ - int i; - struct isl_set *set = NULL; - - if (!map) - return NULL; - map = isl_map_cow(map); - if (!map) - return NULL; - map->dim = isl_space_as_set_space(map->dim); - if (!map->dim) - goto error; - set = (struct isl_set *)map; - for (i = 0; i < map->n; ++i) { - set->p[i] = isl_basic_set_from_basic_map(map->p[i]); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *dim, int n, - unsigned flags) -{ - struct isl_map *map; - - if (!dim) - return NULL; - if (n < 0) - isl_die(dim->ctx, isl_error_internal, - "negative number of basic maps", goto error); - map = isl_alloc(dim->ctx, struct isl_map, - sizeof(struct isl_map) + - (n - 1) * sizeof(struct isl_basic_map *)); - if (!map) - goto error; - - map->ctx = dim->ctx; - isl_ctx_ref(map->ctx); - map->ref = 1; - map->size = n; - map->n = 0; - map->dim = dim; - map->flags = flags; - return map; -error: - isl_space_free(dim); - return NULL; -} - -struct isl_map *isl_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, int n, - unsigned flags) -{ - struct isl_map *map; - isl_space *dims; - - dims = isl_space_alloc(ctx, nparam, in, out); - if (!dims) - return NULL; - - map = isl_map_alloc_space(dims, n, flags); - return map; -} - -__isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_space *dim) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_space(dim, 0, 1, 0); - bmap = isl_basic_map_set_to_empty(bmap); - return bmap; -} - -__isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_space *dim) -{ - struct isl_basic_set *bset; - bset = isl_basic_set_alloc_space(dim, 0, 1, 0); - bset = isl_basic_set_set_to_empty(bset); - return bset; -} - -struct isl_basic_map *isl_basic_map_empty_like(struct isl_basic_map *model) -{ - struct isl_basic_map *bmap; - if (!model) - return NULL; - bmap = isl_basic_map_alloc_space(isl_space_copy(model->dim), 0, 1, 0); - bmap = isl_basic_map_set_to_empty(bmap); - return bmap; -} - -struct isl_basic_map *isl_basic_map_empty_like_map(struct isl_map *model) -{ - struct isl_basic_map *bmap; - if (!model) - return NULL; - bmap = isl_basic_map_alloc_space(isl_space_copy(model->dim), 0, 1, 0); - bmap = isl_basic_map_set_to_empty(bmap); - return bmap; -} - -struct isl_basic_set *isl_basic_set_empty_like(struct isl_basic_set *model) -{ - struct isl_basic_set *bset; - if (!model) - return NULL; - bset = isl_basic_set_alloc_space(isl_space_copy(model->dim), 0, 1, 0); - bset = isl_basic_set_set_to_empty(bset); - return bset; -} - -__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_space *dim) -{ - struct isl_basic_map *bmap; - bmap = isl_basic_map_alloc_space(dim, 0, 0, 0); - bmap = isl_basic_map_finalize(bmap); - return bmap; -} - -__isl_give isl_basic_set *isl_basic_set_universe(__isl_take isl_space *dim) -{ - struct isl_basic_set *bset; - bset = isl_basic_set_alloc_space(dim, 0, 0, 0); - bset = isl_basic_set_finalize(bset); - return bset; -} - -__isl_give isl_basic_map *isl_basic_map_nat_universe(__isl_take isl_space *dim) -{ - int i; - unsigned total = isl_space_dim(dim, isl_dim_all); - isl_basic_map *bmap; - - bmap= isl_basic_map_alloc_space(dim, 0, 0, total); - for (i = 0; i < total; ++i) { - int k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], 1 + total); - isl_int_set_si(bmap->ineq[k][1 + i], 1); - } - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_nat_universe(__isl_take isl_space *dim) -{ - return isl_basic_map_nat_universe(dim); -} - -__isl_give isl_map *isl_map_nat_universe(__isl_take isl_space *dim) -{ - return isl_map_from_basic_map(isl_basic_map_nat_universe(dim)); -} - -__isl_give isl_set *isl_set_nat_universe(__isl_take isl_space *dim) -{ - return isl_map_nat_universe(dim); -} - -__isl_give isl_basic_map *isl_basic_map_universe_like( - __isl_keep isl_basic_map *model) -{ - if (!model) - return NULL; - return isl_basic_map_alloc_space(isl_space_copy(model->dim), 0, 0, 0); -} - -struct isl_basic_set *isl_basic_set_universe_like(struct isl_basic_set *model) -{ - if (!model) - return NULL; - return isl_basic_set_alloc_space(isl_space_copy(model->dim), 0, 0, 0); -} - -__isl_give isl_basic_set *isl_basic_set_universe_like_set( - __isl_keep isl_set *model) -{ - if (!model) - return NULL; - return isl_basic_set_alloc_space(isl_space_copy(model->dim), 0, 0, 0); -} - -__isl_give isl_map *isl_map_empty(__isl_take isl_space *dim) -{ - return isl_map_alloc_space(dim, 0, ISL_MAP_DISJOINT); -} - -struct isl_map *isl_map_empty_like(struct isl_map *model) -{ - if (!model) - return NULL; - return isl_map_alloc_space(isl_space_copy(model->dim), 0, ISL_MAP_DISJOINT); -} - -struct isl_map *isl_map_empty_like_basic_map(struct isl_basic_map *model) -{ - if (!model) - return NULL; - return isl_map_alloc_space(isl_space_copy(model->dim), 0, ISL_MAP_DISJOINT); -} - -__isl_give isl_set *isl_set_empty(__isl_take isl_space *dim) -{ - return isl_set_alloc_space(dim, 0, ISL_MAP_DISJOINT); -} - -struct isl_set *isl_set_empty_like(struct isl_set *model) -{ - if (!model) - return NULL; - return isl_set_empty(isl_space_copy(model->dim)); -} - -__isl_give isl_map *isl_map_universe(__isl_take isl_space *dim) -{ - struct isl_map *map; - if (!dim) - return NULL; - map = isl_map_alloc_space(isl_space_copy(dim), 1, ISL_MAP_DISJOINT); - map = isl_map_add_basic_map(map, isl_basic_map_universe(dim)); - return map; -} - -__isl_give isl_set *isl_set_universe(__isl_take isl_space *dim) -{ - struct isl_set *set; - if (!dim) - return NULL; - set = isl_set_alloc_space(isl_space_copy(dim), 1, ISL_MAP_DISJOINT); - set = isl_set_add_basic_set(set, isl_basic_set_universe(dim)); - return set; -} - -__isl_give isl_set *isl_set_universe_like(__isl_keep isl_set *model) -{ - if (!model) - return NULL; - return isl_set_universe(isl_space_copy(model->dim)); -} - -struct isl_map *isl_map_dup(struct isl_map *map) -{ - int i; - struct isl_map *dup; - - if (!map) - return NULL; - dup = isl_map_alloc_space(isl_space_copy(map->dim), map->n, map->flags); - for (i = 0; i < map->n; ++i) - dup = isl_map_add_basic_map(dup, isl_basic_map_copy(map->p[i])); - return dup; -} - -__isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *bmap) -{ - if (!bmap || !map) - goto error; - if (isl_basic_map_plain_is_empty(bmap)) { - isl_basic_map_free(bmap); - return map; - } - isl_assert(map->ctx, isl_space_is_equal(map->dim, bmap->dim), goto error); - isl_assert(map->ctx, map->n < map->size, goto error); - map->p[map->n] = bmap; - map->n++; - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - if (map) - isl_map_free(map); - if (bmap) - isl_basic_map_free(bmap); - return NULL; -} - -void isl_map_free(struct isl_map *map) -{ - int i; - - if (!map) - return; - - if (--map->ref > 0) - return; - - isl_ctx_deref(map->ctx); - for (i = 0; i < map->n; ++i) - isl_basic_map_free(map->p[i]); - isl_space_free(map->dim); - free(map); -} - -struct isl_map *isl_map_extend(struct isl_map *base, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - int i; - - base = isl_map_cow(base); - if (!base) - return NULL; - - base->dim = isl_space_extend(base->dim, nparam, n_in, n_out); - if (!base->dim) - goto error; - for (i = 0; i < base->n; ++i) { - base->p[i] = isl_basic_map_extend_space(base->p[i], - isl_space_copy(base->dim), 0, 0, 0); - if (!base->p[i]) - goto error; - } - return base; -error: - isl_map_free(base); - return NULL; -} - -struct isl_set *isl_set_extend(struct isl_set *base, - unsigned nparam, unsigned dim) -{ - return (struct isl_set *)isl_map_extend((struct isl_map *)base, - nparam, 0, dim); -} - -static struct isl_basic_map *isl_basic_map_fix_pos_si( - struct isl_basic_map *bmap, unsigned pos, int value) -{ - int j; - - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j] + 1, isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[j][pos], -1); - isl_int_set_si(bmap->eq[j][0], value); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give isl_basic_map *isl_basic_map_fix_pos( - __isl_take isl_basic_map *bmap, unsigned pos, isl_int value) -{ - int j; - - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j] + 1, isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[j][pos], -1); - isl_int_set(bmap->eq[j][0], value); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_fix_si(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value) -{ - if (!bmap) - return NULL; - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), goto error); - return isl_basic_map_fix_pos_si(bmap, - isl_basic_map_offset(bmap, type) + pos, value); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_fix(__isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - if (!bmap) - return NULL; - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), goto error); - return isl_basic_map_fix_pos(bmap, - isl_basic_map_offset(bmap, type) + pos, value); -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_fix_si(struct isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, int value) -{ - return (struct isl_basic_set *) - isl_basic_map_fix_si((struct isl_basic_map *)bset, - type, pos, value); -} - -__isl_give isl_basic_set *isl_basic_set_fix(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - return (struct isl_basic_set *) - isl_basic_map_fix((struct isl_basic_map *)bset, - type, pos, value); -} - -struct isl_basic_map *isl_basic_map_fix_input_si(struct isl_basic_map *bmap, - unsigned input, int value) -{ - return isl_basic_map_fix_si(bmap, isl_dim_in, input, value); -} - -struct isl_basic_set *isl_basic_set_fix_dim_si(struct isl_basic_set *bset, - unsigned dim, int value) -{ - return (struct isl_basic_set *) - isl_basic_map_fix_si((struct isl_basic_map *)bset, - isl_dim_set, dim, value); -} - -struct isl_map *isl_map_fix_si(struct isl_map *map, - enum isl_dim_type type, unsigned pos, int value) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - isl_assert(map->ctx, pos < isl_map_dim(map, type), goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_fix_si(map->p[i], type, pos, value); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value) -{ - return (struct isl_set *) - isl_map_fix_si((struct isl_map *)set, type, pos, value); -} - -__isl_give isl_map *isl_map_fix(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - isl_assert(map->ctx, pos < isl_map_dim(map, type), goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_fix(map->p[i], type, pos, value); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_fix(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, isl_int value) -{ - return (struct isl_set *)isl_map_fix((isl_map *)set, type, pos, value); -} - -struct isl_map *isl_map_fix_input_si(struct isl_map *map, - unsigned input, int value) -{ - return isl_map_fix_si(map, isl_dim_in, input, value); -} - -struct isl_set *isl_set_fix_dim_si(struct isl_set *set, unsigned dim, int value) -{ - return (struct isl_set *) - isl_map_fix_si((struct isl_map *)set, isl_dim_set, dim, value); -} - -static __isl_give isl_basic_map *basic_map_bound_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value, int upper) -{ - int j; - - if (!bmap) - return NULL; - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), goto error); - pos += isl_basic_map_offset(bmap, type); - bmap = isl_basic_map_cow(bmap); - bmap = isl_basic_map_extend_constraints(bmap, 0, 1); - j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->ineq[j], 1 + isl_basic_map_total_dim(bmap)); - if (upper) { - isl_int_set_si(bmap->ineq[j][pos], -1); - isl_int_set_si(bmap->ineq[j][0], value); - } else { - isl_int_set_si(bmap->ineq[j][pos], 1); - isl_int_set_si(bmap->ineq[j][0], -value); - } - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_lower_bound_si( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int value) -{ - return basic_map_bound_si(bmap, type, pos, value, 0); -} - -struct isl_basic_set *isl_basic_set_lower_bound_dim(struct isl_basic_set *bset, - unsigned dim, isl_int value) -{ - int j; - - bset = isl_basic_set_cow(bset); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - j = isl_basic_set_alloc_inequality(bset); - if (j < 0) - goto error; - isl_seq_clr(bset->ineq[j], 1 + isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->ineq[j][1 + isl_basic_set_n_param(bset) + dim], 1); - isl_int_neg(bset->ineq[j][0], value); - bset = isl_basic_set_simplify(bset); - return isl_basic_set_finalize(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -static __isl_give isl_map *map_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value, int upper) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - isl_assert(map->ctx, pos < isl_map_dim(map, type), goto error); - for (i = 0; i < map->n; ++i) { - map->p[i] = basic_map_bound_si(map->p[i], - type, pos, value, upper); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value) -{ - return map_bound_si(map, type, pos, value, 0); -} - -__isl_give isl_map *isl_map_upper_bound_si(__isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int value) -{ - return map_bound_si(map, type, pos, value, 1); -} - -__isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value) -{ - return (struct isl_set *) - isl_map_lower_bound_si((struct isl_map *)set, type, pos, value); -} - -__isl_give isl_set *isl_set_upper_bound_si(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, int value) -{ - return isl_map_upper_bound_si(set, type, pos, value); -} - -struct isl_set *isl_set_lower_bound_dim(struct isl_set *set, unsigned dim, - isl_int value) -{ - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - - isl_assert(set->ctx, dim < isl_set_n_dim(set), goto error); - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_lower_bound_dim(set->p[i], dim, value); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -struct isl_map *isl_map_reverse(struct isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - map->dim = isl_space_reverse(map->dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_reverse(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -static struct isl_map *isl_basic_map_partial_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - if (!bmap) - goto error; - if (bmap->ctx->opt->pip == ISL_PIP_PIP) - return isl_pip_basic_map_lexopt(bmap, dom, empty, max); - else - return isl_tab_basic_map_partial_lexopt(bmap, dom, empty, max); -error: - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - if (empty) - *empty = NULL; - return NULL; -} - -struct isl_map *isl_basic_map_partial_lexmax( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return isl_basic_map_partial_lexopt(bmap, dom, empty, 1); -} - -struct isl_map *isl_basic_map_partial_lexmin( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return isl_basic_map_partial_lexopt(bmap, dom, empty, 0); -} - -struct isl_set *isl_basic_set_partial_lexmin( - struct isl_basic_set *bset, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return (struct isl_set *) - isl_basic_map_partial_lexmin((struct isl_basic_map *)bset, - dom, empty); -} - -struct isl_set *isl_basic_set_partial_lexmax( - struct isl_basic_set *bset, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return (struct isl_set *) - isl_basic_map_partial_lexmax((struct isl_basic_map *)bset, - dom, empty); -} - -__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmin_pw_multi_aff( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty) -{ - return isl_basic_map_partial_lexopt_pw_multi_aff(bmap, dom, empty, 0); -} - -__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmax_pw_multi_aff( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty) -{ - return isl_basic_map_partial_lexopt_pw_multi_aff(bmap, dom, empty, 1); -} - -__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmin_pw_multi_aff( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty) -{ - return isl_basic_map_partial_lexmin_pw_multi_aff(bset, dom, empty); -} - -__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmax_pw_multi_aff( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty) -{ - return isl_basic_map_partial_lexmax_pw_multi_aff(bset, dom, empty); -} - -__isl_give isl_pw_multi_aff *isl_basic_map_lexopt_pw_multi_aff( - __isl_take isl_basic_map *bmap, int max) -{ - isl_basic_set *dom = NULL; - isl_space *dom_space; - - if (!bmap) - goto error; - dom_space = isl_space_domain(isl_space_copy(bmap->dim)); - dom = isl_basic_set_universe(dom_space); - return isl_basic_map_partial_lexopt_pw_multi_aff(bmap, dom, NULL, max); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_pw_multi_aff *isl_basic_map_lexmin_pw_multi_aff( - __isl_take isl_basic_map *bmap) -{ - return isl_basic_map_lexopt_pw_multi_aff(bmap, 0); -} - -/* Given a basic map "bmap", compute the lexicographically minimal - * (or maximal) image element for each domain element in dom. - * Set *empty to those elements in dom that do not have an image element. - * - * We first make sure the basic sets in dom are disjoint and then - * simply collect the results over each of the basic sets separately. - * We could probably improve the efficiency a bit by moving the union - * domain down into the parametric integer programming. - */ -static __isl_give isl_map *basic_map_partial_lexopt( - __isl_take isl_basic_map *bmap, __isl_take isl_set *dom, - __isl_give isl_set **empty, int max) -{ - int i; - struct isl_map *res; - - dom = isl_set_make_disjoint(dom); - if (!dom) - goto error; - - if (isl_set_plain_is_empty(dom)) { - res = isl_map_empty_like_basic_map(bmap); - *empty = isl_set_empty_like(dom); - isl_set_free(dom); - isl_basic_map_free(bmap); - return res; - } - - res = isl_basic_map_partial_lexopt(isl_basic_map_copy(bmap), - isl_basic_set_copy(dom->p[0]), empty, max); - - for (i = 1; i < dom->n; ++i) { - struct isl_map *res_i; - struct isl_set *empty_i; - - res_i = isl_basic_map_partial_lexopt(isl_basic_map_copy(bmap), - isl_basic_set_copy(dom->p[i]), &empty_i, max); - - res = isl_map_union_disjoint(res, res_i); - *empty = isl_set_union_disjoint(*empty, empty_i); - } - - isl_set_free(dom); - isl_basic_map_free(bmap); - return res; -error: - *empty = NULL; - isl_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -/* Given a map "map", compute the lexicographically minimal - * (or maximal) image element for each domain element in dom. - * Set *empty to those elements in dom that do not have an image element. - * - * We first compute the lexicographically minimal or maximal element - * in the first basic map. This results in a partial solution "res" - * and a subset "todo" of dom that still need to be handled. - * We then consider each of the remaining maps in "map" and successively - * improve both "res" and "todo". - * - * Let res^k and todo^k be the results after k steps and let i = k + 1. - * Assume we are computing the lexicographical maximum. - * We first compute the lexicographically maximal element in basic map i. - * This results in a partial solution res_i and a subset todo_i. - * Then we combine these results with those obtain for the first k basic maps - * to obtain a result that is valid for the first k+1 basic maps. - * In particular, the set where there is no solution is the set where - * there is no solution for the first k basic maps and also no solution - * for the ith basic map, i.e., - * - * todo^i = todo^k * todo_i - * - * On dom(res^k) * dom(res_i), we need to pick the larger of the two - * solutions, arbitrarily breaking ties in favor of res^k. - * That is, when res^k(a) >= res_i(a), we pick res^k and - * when res^k(a) < res_i(a), we pick res_i. (Here, ">=" and "<" denote - * the lexicographic order.) - * In practice, we compute - * - * res^k * (res_i . "<=") - * - * and - * - * res_i * (res^k . "<") - * - * Finally, we consider the symmetric difference of dom(res^k) and dom(res_i), - * where only one of res^k and res_i provides a solution and we simply pick - * that one, i.e., - * - * res^k * todo_i - * and - * res_i * todo^k - * - * Note that we only compute these intersections when dom(res^k) intersects - * dom(res_i). Otherwise, the only effect of these intersections is to - * potentially break up res^k and res_i into smaller pieces. - * We want to avoid such splintering as much as possible. - * In fact, an earlier implementation of this function would look for - * better results in the domain of res^k and for extra results in todo^k, - * but this would always result in a splintering according to todo^k, - * even when the domain of basic map i is disjoint from the domains of - * the previous basic maps. - */ -static __isl_give isl_map *isl_map_partial_lexopt_aligned( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty, int max) -{ - int i; - struct isl_map *res; - struct isl_set *todo; - - if (!map || !dom) - goto error; - - if (isl_map_plain_is_empty(map)) { - if (empty) - *empty = dom; - else - isl_set_free(dom); - return map; - } - - res = basic_map_partial_lexopt(isl_basic_map_copy(map->p[0]), - isl_set_copy(dom), &todo, max); - - for (i = 1; i < map->n; ++i) { - isl_map *lt, *le; - isl_map *res_i; - isl_set *todo_i; - isl_space *dim = isl_space_range(isl_map_get_space(res)); - - res_i = basic_map_partial_lexopt(isl_basic_map_copy(map->p[i]), - isl_set_copy(dom), &todo_i, max); - - if (max) { - lt = isl_map_lex_lt(isl_space_copy(dim)); - le = isl_map_lex_le(dim); - } else { - lt = isl_map_lex_gt(isl_space_copy(dim)); - le = isl_map_lex_ge(dim); - } - lt = isl_map_apply_range(isl_map_copy(res), lt); - lt = isl_map_intersect(lt, isl_map_copy(res_i)); - le = isl_map_apply_range(isl_map_copy(res_i), le); - le = isl_map_intersect(le, isl_map_copy(res)); - - if (!isl_map_is_empty(lt) || !isl_map_is_empty(le)) { - res = isl_map_intersect_domain(res, - isl_set_copy(todo_i)); - res_i = isl_map_intersect_domain(res_i, - isl_set_copy(todo)); - } - - res = isl_map_union_disjoint(res, res_i); - res = isl_map_union_disjoint(res, lt); - res = isl_map_union_disjoint(res, le); - - todo = isl_set_intersect(todo, todo_i); - } - - isl_set_free(dom); - isl_map_free(map); - - if (empty) - *empty = todo; - else - isl_set_free(todo); - - return res; -error: - if (empty) - *empty = NULL; - isl_set_free(dom); - isl_map_free(map); - return NULL; -} - -/* Given a map "map", compute the lexicographically minimal - * (or maximal) image element for each domain element in dom. - * Set *empty to those elements in dom that do not have an image element. - * - * Align parameters if needed and then call isl_map_partial_lexopt_aligned. - */ -static __isl_give isl_map *isl_map_partial_lexopt( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty, int max) -{ - if (!map || !dom) - goto error; - if (isl_space_match(map->dim, isl_dim_param, dom->dim, isl_dim_param)) - return isl_map_partial_lexopt_aligned(map, dom, empty, max); - if (!isl_space_has_named_params(map->dim) || - !isl_space_has_named_params(dom->dim)) - isl_die(map->ctx, isl_error_invalid, - "unaligned unnamed parameters", goto error); - map = isl_map_align_params(map, isl_map_get_space(dom)); - dom = isl_map_align_params(dom, isl_map_get_space(map)); - return isl_map_partial_lexopt_aligned(map, dom, empty, max); -error: - if (empty) - *empty = NULL; - isl_set_free(dom); - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_partial_lexmax( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return isl_map_partial_lexopt(map, dom, empty, 1); -} - -__isl_give isl_map *isl_map_partial_lexmin( - __isl_take isl_map *map, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return isl_map_partial_lexopt(map, dom, empty, 0); -} - -__isl_give isl_set *isl_set_partial_lexmin( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return (struct isl_set *) - isl_map_partial_lexmin((struct isl_map *)set, - dom, empty); -} - -__isl_give isl_set *isl_set_partial_lexmax( - __isl_take isl_set *set, __isl_take isl_set *dom, - __isl_give isl_set **empty) -{ - return (struct isl_set *) - isl_map_partial_lexmax((struct isl_map *)set, - dom, empty); -} - -__isl_give isl_map *isl_basic_map_lexopt(__isl_take isl_basic_map *bmap, int max) -{ - struct isl_basic_set *dom = NULL; - isl_space *dom_dim; - - if (!bmap) - goto error; - dom_dim = isl_space_domain(isl_space_copy(bmap->dim)); - dom = isl_basic_set_universe(dom_dim); - return isl_basic_map_partial_lexopt(bmap, dom, NULL, max); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap) -{ - return isl_basic_map_lexopt(bmap, 0); -} - -__isl_give isl_map *isl_basic_map_lexmax(__isl_take isl_basic_map *bmap) -{ - return isl_basic_map_lexopt(bmap, 1); -} - -__isl_give isl_set *isl_basic_set_lexmin(__isl_take isl_basic_set *bset) -{ - return (isl_set *)isl_basic_map_lexmin((isl_basic_map *)bset); -} - -__isl_give isl_set *isl_basic_set_lexmax(__isl_take isl_basic_set *bset) -{ - return (isl_set *)isl_basic_map_lexmax((isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_lexopt(__isl_take isl_map *map, int max) -{ - struct isl_set *dom = NULL; - isl_space *dom_dim; - - if (!map) - goto error; - dom_dim = isl_space_domain(isl_space_copy(map->dim)); - dom = isl_set_universe(dom_dim); - return isl_map_partial_lexopt(map, dom, NULL, max); -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_lexmin(__isl_take isl_map *map) -{ - return isl_map_lexopt(map, 0); -} - -__isl_give isl_map *isl_map_lexmax(__isl_take isl_map *map) -{ - return isl_map_lexopt(map, 1); -} - -__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_lexmin((isl_map *)set); -} - -__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_lexmax((isl_map *)set); -} - -/* Extract the first and only affine expression from list - * and then add it to *pwaff with the given dom. - * This domain is known to be disjoint from other domains - * because of the way isl_basic_map_foreach_lexmax works. - */ -static int update_dim_opt(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user) -{ - isl_ctx *ctx = isl_basic_set_get_ctx(dom); - isl_aff *aff; - isl_pw_aff **pwaff = user; - isl_pw_aff *pwaff_i; - - if (isl_aff_list_n_aff(list) != 1) - isl_die(ctx, isl_error_internal, - "expecting single element list", goto error); - - aff = isl_aff_list_get_aff(list, 0); - pwaff_i = isl_pw_aff_alloc(isl_set_from_basic_set(dom), aff); - - *pwaff = isl_pw_aff_add_disjoint(*pwaff, pwaff_i); - - isl_aff_list_free(list); - - return 0; -error: - isl_basic_set_free(dom); - isl_aff_list_free(list); - return -1; -} - -/* Given a basic map with one output dimension, compute the minimum or - * maximum of that dimension as an isl_pw_aff. - * - * The isl_pw_aff is constructed by having isl_basic_map_foreach_lexopt - * call update_dim_opt on each leaf of the result. - */ -static __isl_give isl_pw_aff *basic_map_dim_opt(__isl_keep isl_basic_map *bmap, - int max) -{ - isl_space *dim = isl_basic_map_get_space(bmap); - isl_pw_aff *pwaff; - int r; - - dim = isl_space_from_domain(isl_space_domain(dim)); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - pwaff = isl_pw_aff_empty(dim); - - r = isl_basic_map_foreach_lexopt(bmap, max, &update_dim_opt, &pwaff); - if (r < 0) - return isl_pw_aff_free(pwaff); - - return pwaff; -} - -/* Compute the minimum or maximum of the given output dimension - * as a function of the parameters and the input dimensions, - * but independently of the other output dimensions. - * - * We first project out the other output dimension and then compute - * the "lexicographic" maximum in each basic map, combining the results - * using isl_pw_aff_union_max. - */ -static __isl_give isl_pw_aff *map_dim_opt(__isl_take isl_map *map, int pos, - int max) -{ - int i; - isl_pw_aff *pwaff; - unsigned n_out; - - n_out = isl_map_dim(map, isl_dim_out); - map = isl_map_project_out(map, isl_dim_out, pos + 1, n_out - (pos + 1)); - map = isl_map_project_out(map, isl_dim_out, 0, pos); - if (!map) - return NULL; - - if (map->n == 0) { - isl_space *dim = isl_map_get_space(map); - dim = isl_space_domain(isl_space_from_range(dim)); - isl_map_free(map); - return isl_pw_aff_empty(dim); - } - - pwaff = basic_map_dim_opt(map->p[0], max); - for (i = 1; i < map->n; ++i) { - isl_pw_aff *pwaff_i; - - pwaff_i = basic_map_dim_opt(map->p[i], max); - pwaff = isl_pw_aff_union_opt(pwaff, pwaff_i, max); - } - - isl_map_free(map); - - return pwaff; -} - -/* Compute the maximum of the given output dimension as a function of the - * parameters and input dimensions, but independently of - * the other output dimensions. - */ -__isl_give isl_pw_aff *isl_map_dim_max(__isl_take isl_map *map, int pos) -{ - return map_dim_opt(map, pos, 1); -} - -/* Compute the minimum or maximum of the given set dimension - * as a function of the parameters, - * but independently of the other set dimensions. - */ -static __isl_give isl_pw_aff *set_dim_opt(__isl_take isl_set *set, int pos, - int max) -{ - return map_dim_opt(set, pos, max); -} - -/* Compute the maximum of the given set dimension as a function of the - * parameters, but independently of the other set dimensions. - */ -__isl_give isl_pw_aff *isl_set_dim_max(__isl_take isl_set *set, int pos) -{ - return set_dim_opt(set, pos, 1); -} - -/* Compute the minimum of the given set dimension as a function of the - * parameters, but independently of the other set dimensions. - */ -__isl_give isl_pw_aff *isl_set_dim_min(__isl_take isl_set *set, int pos) -{ - return set_dim_opt(set, pos, 0); -} - -/* Apply a preimage specified by "mat" on the parameters of "bset". - * bset is assumed to have only parameters and divs. - */ -static struct isl_basic_set *basic_set_parameter_preimage( - struct isl_basic_set *bset, struct isl_mat *mat) -{ - unsigned nparam; - - if (!bset || !mat) - goto error; - - bset->dim = isl_space_cow(bset->dim); - if (!bset->dim) - goto error; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - - isl_assert(bset->ctx, mat->n_row == 1 + nparam, goto error); - - bset->dim->nparam = 0; - bset->dim->n_out = nparam; - bset = isl_basic_set_preimage(bset, mat); - if (bset) { - bset->dim->nparam = bset->dim->n_out; - bset->dim->n_out = 0; - } - return bset; -error: - isl_mat_free(mat); - isl_basic_set_free(bset); - return NULL; -} - -/* Apply a preimage specified by "mat" on the parameters of "set". - * set is assumed to have only parameters and divs. - */ -static struct isl_set *set_parameter_preimage( - struct isl_set *set, struct isl_mat *mat) -{ - isl_space *dim = NULL; - unsigned nparam; - - if (!set || !mat) - goto error; - - dim = isl_space_copy(set->dim); - dim = isl_space_cow(dim); - if (!dim) - goto error; - - nparam = isl_set_dim(set, isl_dim_param); - - isl_assert(set->ctx, mat->n_row == 1 + nparam, goto error); - - dim->nparam = 0; - dim->n_out = nparam; - isl_set_reset_space(set, dim); - set = isl_set_preimage(set, mat); - if (!set) - goto error2; - dim = isl_space_copy(set->dim); - dim = isl_space_cow(dim); - if (!dim) - goto error2; - dim->nparam = dim->n_out; - dim->n_out = 0; - isl_set_reset_space(set, dim); - return set; -error: - isl_space_free(dim); - isl_mat_free(mat); -error2: - isl_set_free(set); - return NULL; -} - -/* Intersect the basic set "bset" with the affine space specified by the - * equalities in "eq". - */ -static struct isl_basic_set *basic_set_append_equalities( - struct isl_basic_set *bset, struct isl_mat *eq) -{ - int i, k; - unsigned len; - - if (!bset || !eq) - goto error; - - bset = isl_basic_set_extend_space(bset, isl_space_copy(bset->dim), 0, - eq->n_row, 0); - if (!bset) - goto error; - - len = 1 + isl_space_dim(bset->dim, isl_dim_all) + bset->extra; - for (i = 0; i < eq->n_row; ++i) { - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k], eq->row[i], eq->n_col); - isl_seq_clr(bset->eq[k] + eq->n_col, len - eq->n_col); - } - isl_mat_free(eq); - - bset = isl_basic_set_gauss(bset, NULL); - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_mat_free(eq); - isl_basic_set_free(bset); - return NULL; -} - -/* Intersect the set "set" with the affine space specified by the - * equalities in "eq". - */ -static struct isl_set *set_append_equalities(struct isl_set *set, - struct isl_mat *eq) -{ - int i; - - if (!set || !eq) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = basic_set_append_equalities(set->p[i], - isl_mat_copy(eq)); - if (!set->p[i]) - goto error; - } - isl_mat_free(eq); - return set; -error: - isl_mat_free(eq); - isl_set_free(set); - return NULL; -} - -/* Project the given basic set onto its parameter domain, possibly introducing - * new, explicit, existential variables in the constraints. - * The input has parameters and (possibly implicit) existential variables. - * The output has the same parameters, but only - * explicit existentially quantified variables. - * - * The actual projection is performed by pip, but pip doesn't seem - * to like equalities very much, so we first remove the equalities - * among the parameters by performing a variable compression on - * the parameters. Afterward, an inverse transformation is performed - * and the equalities among the parameters are inserted back in. - */ -static struct isl_set *parameter_compute_divs(struct isl_basic_set *bset) -{ - int i, j; - struct isl_mat *eq; - struct isl_mat *T, *T2; - struct isl_set *set; - unsigned nparam, n_div; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - if (bset->n_eq == 0) - return isl_basic_set_lexmin(bset); - - isl_basic_set_gauss(bset, NULL); - - nparam = isl_basic_set_dim(bset, isl_dim_param); - n_div = isl_basic_set_dim(bset, isl_dim_div); - - for (i = 0, j = n_div - 1; i < bset->n_eq && j >= 0; --j) { - if (!isl_int_is_zero(bset->eq[i][1 + nparam + j])) - ++i; - } - if (i == bset->n_eq) - return isl_basic_set_lexmin(bset); - - eq = isl_mat_sub_alloc6(bset->ctx, bset->eq, i, bset->n_eq - i, - 0, 1 + nparam); - eq = isl_mat_cow(eq); - T = isl_mat_variable_compression(isl_mat_copy(eq), &T2); - if (T && T->n_col == 0) { - isl_mat_free(T); - isl_mat_free(T2); - isl_mat_free(eq); - bset = isl_basic_set_set_to_empty(bset); - return isl_set_from_basic_set(bset); - } - bset = basic_set_parameter_preimage(bset, T); - - set = isl_basic_set_lexmin(bset); - set = set_parameter_preimage(set, T2); - set = set_append_equalities(set, eq); - return set; -} - -/* Compute an explicit representation for all the existentially - * quantified variables. - * The input and output dimensions are first turned into parameters. - * compute_divs then returns a map with the same parameters and - * no input or output dimensions and the dimension specification - * is reset to that of the input. - */ -static struct isl_map *compute_divs(struct isl_basic_map *bmap) -{ - struct isl_basic_set *bset; - struct isl_set *set; - struct isl_map *map; - isl_space *dim, *orig_dim = NULL; - unsigned nparam; - unsigned n_in; - unsigned n_out; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - dim = isl_space_set_alloc(bmap->ctx, nparam + n_in + n_out, 0); - if (!dim) - goto error; - - orig_dim = bmap->dim; - bmap->dim = dim; - bset = (struct isl_basic_set *)bmap; - - set = parameter_compute_divs(bset); - map = (struct isl_map *)set; - map = isl_map_reset_space(map, orig_dim); - - return map; -error: - isl_basic_map_free(bmap); - return NULL; -} - -int isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap) -{ - int i; - unsigned off; - - if (!bmap) - return -1; - - off = isl_space_dim(bmap->dim, isl_dim_all); - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - return 0; - isl_assert(bmap->ctx, isl_int_is_zero(bmap->div[i][1+1+off+i]), - return -1); - } - return 1; -} - -static int map_divs_known(__isl_keep isl_map *map) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int known = isl_basic_map_divs_known(map->p[i]); - if (known <= 0) - return known; - } - - return 1; -} - -/* If bmap contains any unknown divs, then compute explicit - * expressions for them. However, this computation may be - * quite expensive, so first try to remove divs that aren't - * strictly needed. - */ -struct isl_map *isl_basic_map_compute_divs(struct isl_basic_map *bmap) -{ - int known; - struct isl_map *map; - - known = isl_basic_map_divs_known(bmap); - if (known < 0) - goto error; - if (known) - return isl_map_from_basic_map(bmap); - - bmap = isl_basic_map_drop_redundant_divs(bmap); - - known = isl_basic_map_divs_known(bmap); - if (known < 0) - goto error; - if (known) - return isl_map_from_basic_map(bmap); - - map = compute_divs(bmap); - return map; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_map *isl_map_compute_divs(struct isl_map *map) -{ - int i; - int known; - struct isl_map *res; - - if (!map) - return NULL; - if (map->n == 0) - return map; - - known = map_divs_known(map); - if (known < 0) { - isl_map_free(map); - return NULL; - } - if (known) - return map; - - res = isl_basic_map_compute_divs(isl_basic_map_copy(map->p[0])); - for (i = 1 ; i < map->n; ++i) { - struct isl_map *r2; - r2 = isl_basic_map_compute_divs(isl_basic_map_copy(map->p[i])); - if (ISL_F_ISSET(map, ISL_MAP_DISJOINT)) - res = isl_map_union_disjoint(res, r2); - else - res = isl_map_union(res, r2); - } - isl_map_free(map); - - return res; -} - -struct isl_set *isl_basic_set_compute_divs(struct isl_basic_set *bset) -{ - return (struct isl_set *) - isl_basic_map_compute_divs((struct isl_basic_map *)bset); -} - -struct isl_set *isl_set_compute_divs(struct isl_set *set) -{ - return (struct isl_set *) - isl_map_compute_divs((struct isl_map *)set); -} - -struct isl_set *isl_map_domain(struct isl_map *map) -{ - int i; - struct isl_set *set; - - if (!map) - goto error; - - map = isl_map_cow(map); - if (!map) - return NULL; - - set = (struct isl_set *)map; - set->dim = isl_space_domain(set->dim); - if (!set->dim) - goto error; - for (i = 0; i < map->n; ++i) { - set->p[i] = isl_basic_map_domain(map->p[i]); - if (!set->p[i]) - goto error; - } - ISL_F_CLR(set, ISL_MAP_DISJOINT); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_map_free(map); - return NULL; -} - -static __isl_give isl_map *map_union_disjoint(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - int i; - unsigned flags = 0; - struct isl_map *map = NULL; - - if (!map1 || !map2) - goto error; - - if (map1->n == 0) { - isl_map_free(map1); - return map2; - } - if (map2->n == 0) { - isl_map_free(map2); - return map1; - } - - isl_assert(map1->ctx, isl_space_is_equal(map1->dim, map2->dim), goto error); - - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT) && - ISL_F_ISSET(map2, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - map = isl_map_alloc_space(isl_space_copy(map1->dim), - map1->n + map2->n, flags); - if (!map) - goto error; - for (i = 0; i < map1->n; ++i) { - map = isl_map_add_basic_map(map, - isl_basic_map_copy(map1->p[i])); - if (!map) - goto error; - } - for (i = 0; i < map2->n; ++i) { - map = isl_map_add_basic_map(map, - isl_basic_map_copy(map2->p[i])); - if (!map) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return map; -error: - isl_map_free(map); - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_map *isl_map_union_disjoint(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_union_disjoint); -} - -struct isl_map *isl_map_union(struct isl_map *map1, struct isl_map *map2) -{ - map1 = isl_map_union_disjoint(map1, map2); - if (!map1) - return NULL; - if (map1->n > 1) - ISL_F_CLR(map1, ISL_MAP_DISJOINT); - return map1; -} - -struct isl_set *isl_set_union_disjoint( - struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_union_disjoint( - (struct isl_map *)set1, (struct isl_map *)set2); -} - -struct isl_set *isl_set_union(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_union((struct isl_map *)set1, (struct isl_map *)set2); -} - -static __isl_give isl_map *map_intersect_range(__isl_take isl_map *map, - __isl_take isl_set *set) -{ - unsigned flags = 0; - struct isl_map *result; - int i, j; - - if (!map || !set) - goto error; - - if (!isl_space_match(map->dim, isl_dim_param, set->dim, isl_dim_param)) - isl_die(set->ctx, isl_error_invalid, - "parameters don't match", goto error); - - if (isl_space_dim(set->dim, isl_dim_set) != 0 && - !isl_map_compatible_range(map, set)) - isl_die(set->ctx, isl_error_invalid, - "incompatible spaces", goto error); - - if (isl_set_plain_is_universe(set)) { - isl_set_free(set); - return map; - } - - if (ISL_F_ISSET(map, ISL_MAP_DISJOINT) && - ISL_F_ISSET(set, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - result = isl_map_alloc_space(isl_space_copy(map->dim), - map->n * set->n, flags); - if (!result) - goto error; - for (i = 0; i < map->n; ++i) - for (j = 0; j < set->n; ++j) { - result = isl_map_add_basic_map(result, - isl_basic_map_intersect_range( - isl_basic_map_copy(map->p[i]), - isl_basic_set_copy(set->p[j]))); - if (!result) - goto error; - } - isl_map_free(map); - isl_set_free(set); - return result; -error: - isl_map_free(map); - isl_set_free(set); - return NULL; -} - -__isl_give isl_map *isl_map_intersect_range(__isl_take isl_map *map, - __isl_take isl_set *set) -{ - return isl_map_align_params_map_map_and(map, set, &map_intersect_range); -} - -struct isl_map *isl_map_intersect_domain( - struct isl_map *map, struct isl_set *set) -{ - return isl_map_reverse( - isl_map_intersect_range(isl_map_reverse(map), set)); -} - -static __isl_give isl_map *map_apply_domain(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - if (!map1 || !map2) - goto error; - map1 = isl_map_reverse(map1); - map1 = isl_map_apply_range(map1, map2); - return isl_map_reverse(map1); -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_map *isl_map_apply_domain(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_apply_domain); -} - -static __isl_give isl_map *map_apply_range(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_space *dim_result; - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - dim_result = isl_space_join(isl_space_copy(map1->dim), - isl_space_copy(map2->dim)); - - result = isl_map_alloc_space(dim_result, map1->n * map2->n, 0); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - result = isl_map_add_basic_map(result, - isl_basic_map_apply_range( - isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j]))); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - if (result && result->n <= 1) - ISL_F_SET(result, ISL_MAP_DISJOINT); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_map *isl_map_apply_range(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_apply_range); -} - -/* - * returns range - domain - */ -struct isl_basic_set *isl_basic_map_deltas(struct isl_basic_map *bmap) -{ - isl_space *dims, *target_dim; - struct isl_basic_set *bset; - unsigned dim; - unsigned nparam; - int i; - - if (!bmap) - goto error; - isl_assert(bmap->ctx, isl_space_tuple_match(bmap->dim, isl_dim_in, - bmap->dim, isl_dim_out), - goto error); - target_dim = isl_space_domain(isl_basic_map_get_space(bmap)); - dim = isl_basic_map_n_in(bmap); - nparam = isl_basic_map_n_param(bmap); - bset = isl_basic_set_from_basic_map(bmap); - bset = isl_basic_set_cow(bset); - dims = isl_basic_set_get_space(bset); - dims = isl_space_add_dims(dims, isl_dim_set, dim); - bset = isl_basic_set_extend_space(bset, dims, 0, dim, 0); - bset = isl_basic_set_swap_vars(bset, 2*dim); - for (i = 0; i < dim; ++i) { - int j = isl_basic_map_alloc_equality( - (struct isl_basic_map *)bset); - if (j < 0) - goto error; - isl_seq_clr(bset->eq[j], 1 + isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->eq[j][1+nparam+i], 1); - isl_int_set_si(bset->eq[j][1+nparam+dim+i], 1); - isl_int_set_si(bset->eq[j][1+nparam+2*dim+i], -1); - } - bset = isl_basic_set_project_out(bset, isl_dim_set, dim, 2*dim); - bset = isl_basic_set_reset_space(bset, target_dim); - return bset; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* - * returns range - domain - */ -struct isl_set *isl_map_deltas(struct isl_map *map) -{ - int i; - isl_space *dim; - struct isl_set *result; - - if (!map) - return NULL; - - isl_assert(map->ctx, isl_space_tuple_match(map->dim, isl_dim_in, - map->dim, isl_dim_out), - goto error); - dim = isl_map_get_space(map); - dim = isl_space_domain(dim); - result = isl_set_alloc_space(dim, map->n, 0); - if (!result) - goto error; - for (i = 0; i < map->n; ++i) - result = isl_set_add_basic_set(result, - isl_basic_map_deltas(isl_basic_map_copy(map->p[i]))); - isl_map_free(map); - return result; -error: - isl_map_free(map); - return NULL; -} - -/* - * returns [domain -> range] -> range - domain - */ -__isl_give isl_basic_map *isl_basic_map_deltas_map( - __isl_take isl_basic_map *bmap) -{ - int i, k; - isl_space *dim; - isl_basic_map *domain; - int nparam, n; - unsigned total; - - if (!isl_space_tuple_match(bmap->dim, isl_dim_in, bmap->dim, isl_dim_out)) - isl_die(bmap->ctx, isl_error_invalid, - "domain and range don't match", goto error); - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n = isl_basic_map_dim(bmap, isl_dim_in); - - dim = isl_space_from_range(isl_space_domain(isl_basic_map_get_space(bmap))); - domain = isl_basic_map_universe(dim); - - bmap = isl_basic_map_from_domain(isl_basic_map_wrap(bmap)); - bmap = isl_basic_map_apply_range(bmap, domain); - bmap = isl_basic_map_extend_constraints(bmap, n, 0); - - total = isl_basic_map_total_dim(bmap); - - for (i = 0; i < n; ++i) { - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + total); - isl_int_set_si(bmap->eq[k][1 + nparam + i], 1); - isl_int_set_si(bmap->eq[k][1 + nparam + n + i], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + n + n + i], 1); - } - - bmap = isl_basic_map_gauss(bmap, NULL); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* - * returns [domain -> range] -> range - domain - */ -__isl_give isl_map *isl_map_deltas_map(__isl_take isl_map *map) -{ - int i; - isl_space *domain_dim; - - if (!map) - return NULL; - - if (!isl_space_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - isl_die(map->ctx, isl_error_invalid, - "domain and range don't match", goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - domain_dim = isl_space_from_range(isl_space_domain(isl_map_get_space(map))); - map->dim = isl_space_from_domain(isl_space_wrap(map->dim)); - map->dim = isl_space_join(map->dim, domain_dim); - if (!map->dim) - goto error; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_deltas_map(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give struct isl_basic_map *basic_map_identity(__isl_take isl_space *dims) -{ - struct isl_basic_map *bmap; - unsigned nparam; - unsigned dim; - int i; - - if (!dims) - return NULL; - - nparam = dims->nparam; - dim = dims->n_out; - bmap = isl_basic_map_alloc_space(dims, 0, dim, 0); - if (!bmap) - goto error; - - for (i = 0; i < dim; ++i) { - int j = isl_basic_map_alloc_equality(bmap); - if (j < 0) - goto error; - isl_seq_clr(bmap->eq[j], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[j][1+nparam+i], 1); - isl_int_set_si(bmap->eq[j][1+nparam+dim+i], -1); - } - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - if (dim->n_in != dim->n_out) - isl_die(dim->ctx, isl_error_invalid, - "number of input and output dimensions needs to be " - "the same", goto error); - return basic_map_identity(dim); -error: - isl_space_free(dim); - return NULL; -} - -struct isl_basic_map *isl_basic_map_identity_like(struct isl_basic_map *model) -{ - if (!model || !model->dim) - return NULL; - return isl_basic_map_identity(isl_space_copy(model->dim)); -} - -__isl_give isl_map *isl_map_identity(__isl_take isl_space *dim) -{ - return isl_map_from_basic_map(isl_basic_map_identity(dim)); -} - -struct isl_map *isl_map_identity_like(struct isl_map *model) -{ - if (!model || !model->dim) - return NULL; - return isl_map_identity(isl_space_copy(model->dim)); -} - -struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model) -{ - if (!model || !model->dim) - return NULL; - return isl_map_identity(isl_space_copy(model->dim)); -} - -__isl_give isl_map *isl_set_identity(__isl_take isl_set *set) -{ - isl_space *dim = isl_set_get_space(set); - isl_map *id; - id = isl_map_identity(isl_space_map_from_set(dim)); - return isl_map_intersect_range(id, set); -} - -/* Construct a basic set with all set dimensions having only non-negative - * values. - */ -__isl_give isl_basic_set *isl_basic_set_positive_orthant( - __isl_take isl_space *space) -{ - int i; - unsigned nparam; - unsigned dim; - struct isl_basic_set *bset; - - if (!space) - return NULL; - nparam = space->nparam; - dim = space->n_out; - bset = isl_basic_set_alloc_space(space, 0, 0, dim); - if (!bset) - return NULL; - for (i = 0; i < dim; ++i) { - int k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k], 1 + isl_basic_set_total_dim(bset)); - isl_int_set_si(bset->ineq[k][1 + nparam + i], 1); - } - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Construct the half-space x_pos >= 0. - */ -static __isl_give isl_basic_set *nonneg_halfspace(__isl_take isl_space *dim, - int pos) -{ - int k; - isl_basic_set *nonneg; - - nonneg = isl_basic_set_alloc_space(dim, 0, 0, 1); - k = isl_basic_set_alloc_inequality(nonneg); - if (k < 0) - goto error; - isl_seq_clr(nonneg->ineq[k], 1 + isl_basic_set_total_dim(nonneg)); - isl_int_set_si(nonneg->ineq[k][pos], 1); - - return isl_basic_set_finalize(nonneg); -error: - isl_basic_set_free(nonneg); - return NULL; -} - -/* Construct the half-space x_pos <= -1. - */ -static __isl_give isl_basic_set *neg_halfspace(__isl_take isl_space *dim, int pos) -{ - int k; - isl_basic_set *neg; - - neg = isl_basic_set_alloc_space(dim, 0, 0, 1); - k = isl_basic_set_alloc_inequality(neg); - if (k < 0) - goto error; - isl_seq_clr(neg->ineq[k], 1 + isl_basic_set_total_dim(neg)); - isl_int_set_si(neg->ineq[k][0], -1); - isl_int_set_si(neg->ineq[k][pos], -1); - - return isl_basic_set_finalize(neg); -error: - isl_basic_set_free(neg); - return NULL; -} - -__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - isl_basic_set *nonneg; - isl_basic_set *neg; - - if (!set) - return NULL; - if (n == 0) - return set; - - isl_assert(set->ctx, first + n <= isl_set_dim(set, type), goto error); - - for (i = 0; i < n; ++i) { - nonneg = nonneg_halfspace(isl_set_get_space(set), - pos(set->dim, type) + first + i); - neg = neg_halfspace(isl_set_get_space(set), - pos(set->dim, type) + first + i); - - set = isl_set_intersect(set, isl_basic_set_union(nonneg, neg)); - } - - return set; -error: - isl_set_free(set); - return NULL; -} - -static int foreach_orthant(__isl_take isl_set *set, int *signs, int first, - int len, int (*fn)(__isl_take isl_set *orthant, int *signs, void *user), - void *user) -{ - isl_set *half; - - if (!set) - return -1; - if (isl_set_plain_is_empty(set)) { - isl_set_free(set); - return 0; - } - if (first == len) - return fn(set, signs, user); - - signs[first] = 1; - half = isl_set_from_basic_set(nonneg_halfspace(isl_set_get_space(set), - 1 + first)); - half = isl_set_intersect(half, isl_set_copy(set)); - if (foreach_orthant(half, signs, first + 1, len, fn, user) < 0) - goto error; - - signs[first] = -1; - half = isl_set_from_basic_set(neg_halfspace(isl_set_get_space(set), - 1 + first)); - half = isl_set_intersect(half, set); - return foreach_orthant(half, signs, first + 1, len, fn, user); -error: - isl_set_free(set); - return -1; -} - -/* Call "fn" on the intersections of "set" with each of the orthants - * (except for obviously empty intersections). The orthant is identified - * by the signs array, with each entry having value 1 or -1 according - * to the sign of the corresponding variable. - */ -int isl_set_foreach_orthant(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_set *orthant, int *signs, void *user), - void *user) -{ - unsigned nparam; - unsigned nvar; - int *signs; - int r; - - if (!set) - return -1; - if (isl_set_plain_is_empty(set)) - return 0; - - nparam = isl_set_dim(set, isl_dim_param); - nvar = isl_set_dim(set, isl_dim_set); - - signs = isl_alloc_array(set->ctx, int, nparam + nvar); - - r = foreach_orthant(isl_set_copy(set), signs, 0, nparam + nvar, - fn, user); - - free(signs); - - return r; -} - -int isl_set_is_equal(struct isl_set *set1, struct isl_set *set2) -{ - return isl_map_is_equal((struct isl_map *)set1, (struct isl_map *)set2); -} - -int isl_basic_map_is_subset( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - int is_subset; - struct isl_map *map1; - struct isl_map *map2; - - if (!bmap1 || !bmap2) - return -1; - - map1 = isl_map_from_basic_map(isl_basic_map_copy(bmap1)); - map2 = isl_map_from_basic_map(isl_basic_map_copy(bmap2)); - - is_subset = isl_map_is_subset(map1, map2); - - isl_map_free(map1); - isl_map_free(map2); - - return is_subset; -} - -int isl_basic_map_is_equal( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - int is_subset; - - if (!bmap1 || !bmap2) - return -1; - is_subset = isl_basic_map_is_subset(bmap1, bmap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_basic_map_is_subset(bmap2, bmap1); - return is_subset; -} - -int isl_basic_set_is_equal( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - return isl_basic_map_is_equal( - (struct isl_basic_map *)bset1, (struct isl_basic_map *)bset2); -} - -int isl_map_is_empty(struct isl_map *map) -{ - int i; - int is_empty; - - if (!map) - return -1; - for (i = 0; i < map->n; ++i) { - is_empty = isl_basic_map_is_empty(map->p[i]); - if (is_empty < 0) - return -1; - if (!is_empty) - return 0; - } - return 1; -} - -int isl_map_plain_is_empty(__isl_keep isl_map *map) -{ - return map ? map->n == 0 : -1; -} - -int isl_map_fast_is_empty(__isl_keep isl_map *map) -{ - return isl_map_plain_is_empty(map); -} - -int isl_set_plain_is_empty(struct isl_set *set) -{ - return set ? set->n == 0 : -1; -} - -int isl_set_fast_is_empty(__isl_keep isl_set *set) -{ - return isl_set_plain_is_empty(set); -} - -int isl_set_is_empty(struct isl_set *set) -{ - return isl_map_is_empty((struct isl_map *)set); -} - -int isl_map_has_equal_space(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - if (!map1 || !map2) - return -1; - - return isl_space_is_equal(map1->dim, map2->dim); -} - -int isl_set_has_equal_space(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - if (!set1 || !set2) - return -1; - - return isl_space_is_equal(set1->dim, set2->dim); -} - -static int map_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - int is_subset; - - if (!map1 || !map2) - return -1; - is_subset = isl_map_is_subset(map1, map2); - if (is_subset != 1) - return is_subset; - is_subset = isl_map_is_subset(map2, map1); - return is_subset; -} - -int isl_map_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - return isl_map_align_params_map_map_and_test(map1, map2, &map_is_equal); -} - -int isl_basic_map_is_strict_subset( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - int is_subset; - - if (!bmap1 || !bmap2) - return -1; - is_subset = isl_basic_map_is_subset(bmap1, bmap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_basic_map_is_subset(bmap2, bmap1); - if (is_subset == -1) - return is_subset; - return !is_subset; -} - -int isl_map_is_strict_subset(struct isl_map *map1, struct isl_map *map2) -{ - int is_subset; - - if (!map1 || !map2) - return -1; - is_subset = isl_map_is_subset(map1, map2); - if (is_subset != 1) - return is_subset; - is_subset = isl_map_is_subset(map2, map1); - if (is_subset == -1) - return is_subset; - return !is_subset; -} - -int isl_set_is_strict_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_map_is_strict_subset((isl_map *)set1, (isl_map *)set2); -} - -int isl_basic_map_is_universe(struct isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return bmap->n_eq == 0 && bmap->n_ineq == 0; -} - -int isl_basic_set_is_universe(struct isl_basic_set *bset) -{ - if (!bset) - return -1; - return bset->n_eq == 0 && bset->n_ineq == 0; -} - -int isl_map_plain_is_universe(__isl_keep isl_map *map) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int r = isl_basic_map_is_universe(map->p[i]); - if (r < 0 || r) - return r; - } - - return 0; -} - -int isl_set_plain_is_universe(__isl_keep isl_set *set) -{ - return isl_map_plain_is_universe((isl_map *) set); -} - -int isl_set_fast_is_universe(__isl_keep isl_set *set) -{ - return isl_set_plain_is_universe(set); -} - -int isl_basic_map_is_empty(struct isl_basic_map *bmap) -{ - struct isl_basic_set *bset = NULL; - struct isl_vec *sample = NULL; - int empty; - unsigned total; - - if (!bmap) - return -1; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return 1; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) { - struct isl_basic_map *copy = isl_basic_map_copy(bmap); - copy = isl_basic_map_remove_redundancies(copy); - empty = ISL_F_ISSET(copy, ISL_BASIC_MAP_EMPTY); - isl_basic_map_free(copy); - return empty; - } - - total = 1 + isl_basic_map_total_dim(bmap); - if (bmap->sample && bmap->sample->size == total) { - int contains = isl_basic_map_contains(bmap, bmap->sample); - if (contains < 0) - return -1; - if (contains) - return 0; - } - isl_vec_free(bmap->sample); - bmap->sample = NULL; - bset = isl_basic_map_underlying_set(isl_basic_map_copy(bmap)); - if (!bset) - return -1; - sample = isl_basic_set_sample_vec(bset); - if (!sample) - return -1; - empty = sample->size == 0; - isl_vec_free(bmap->sample); - bmap->sample = sample; - if (empty) - ISL_F_SET(bmap, ISL_BASIC_MAP_EMPTY); - - return empty; -} - -int isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - return ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY); -} - -int isl_basic_map_fast_is_empty(__isl_keep isl_basic_map *bmap) -{ - return isl_basic_map_plain_is_empty(bmap); -} - -int isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset) -{ - if (!bset) - return -1; - return ISL_F_ISSET(bset, ISL_BASIC_SET_EMPTY); -} - -int isl_basic_set_fast_is_empty(__isl_keep isl_basic_set *bset) -{ - return isl_basic_set_plain_is_empty(bset); -} - -int isl_basic_set_is_empty(struct isl_basic_set *bset) -{ - return isl_basic_map_is_empty((struct isl_basic_map *)bset); -} - -struct isl_map *isl_basic_map_union( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - struct isl_map *map; - if (!bmap1 || !bmap2) - return NULL; - - isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), goto error); - - map = isl_map_alloc_space(isl_space_copy(bmap1->dim), 2, 0); - if (!map) - goto error; - map = isl_map_add_basic_map(map, bmap1); - map = isl_map_add_basic_map(map, bmap2); - return map; -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -struct isl_set *isl_basic_set_union( - struct isl_basic_set *bset1, struct isl_basic_set *bset2) -{ - return (struct isl_set *)isl_basic_map_union( - (struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2); -} - -/* Order divs such that any div only depends on previous divs */ -struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap) -{ - int i; - unsigned off; - - if (!bmap) - return NULL; - - off = isl_space_dim(bmap->dim, isl_dim_all); - - for (i = 0; i < bmap->n_div; ++i) { - int pos; - if (isl_int_is_zero(bmap->div[i][0])) - continue; - pos = isl_seq_first_non_zero(bmap->div[i]+1+1+off+i, - bmap->n_div-i); - if (pos == -1) - continue; - isl_basic_map_swap_div(bmap, i, i + pos); - --i; - } - return bmap; -} - -struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_order_divs((struct isl_basic_map *)bset); -} - -__isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map) -{ - int i; - - if (!map) - return 0; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_order_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Apply the expansion computed by isl_merge_divs. - * The expansion itself is given by "exp" while the resulting - * list of divs is given by "div". - */ -__isl_give isl_basic_set *isl_basic_set_expand_divs( - __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp) -{ - int i, j; - int n_div; - - bset = isl_basic_set_cow(bset); - if (!bset || !div) - goto error; - - if (div->n_row < bset->n_div) - isl_die(isl_mat_get_ctx(div), isl_error_invalid, - "not an expansion", goto error); - - bset = isl_basic_map_extend_space(bset, isl_space_copy(bset->dim), - div->n_row - bset->n_div, 0, - 2 * (div->n_row - bset->n_div)); - - n_div = bset->n_div; - for (i = n_div; i < div->n_row; ++i) - if (isl_basic_set_alloc_div(bset) < 0) - goto error; - - j = n_div - 1; - for (i = div->n_row - 1; i >= 0; --i) { - if (j >= 0 && exp[j] == i) { - if (i != j) - isl_basic_map_swap_div(bset, i, j); - j--; - } else { - isl_seq_cpy(bset->div[i], div->row[i], div->n_col); - if (isl_basic_map_add_div_constraints(bset, i) < 0) - goto error; - } - } - - isl_mat_free(div); - return bset; -error: - isl_basic_set_free(bset); - isl_mat_free(div); - return NULL; -} - -/* Look for a div in dst that corresponds to the div "div" in src. - * The divs before "div" in src and dst are assumed to be the same. - * - * Returns -1 if no corresponding div was found and the position - * of the corresponding div in dst otherwise. - */ -static int find_div(struct isl_basic_map *dst, - struct isl_basic_map *src, unsigned div) -{ - int i; - - unsigned total = isl_space_dim(src->dim, isl_dim_all); - - isl_assert(dst->ctx, div <= dst->n_div, return -1); - for (i = div; i < dst->n_div; ++i) - if (isl_seq_eq(dst->div[i], src->div[div], 1+1+total+div) && - isl_seq_first_non_zero(dst->div[i]+1+1+total+div, - dst->n_div - div) == -1) - return i; - return -1; -} - -struct isl_basic_map *isl_basic_map_align_divs( - struct isl_basic_map *dst, struct isl_basic_map *src) -{ - int i; - unsigned total = isl_space_dim(src->dim, isl_dim_all); - - if (!dst || !src) - goto error; - - if (src->n_div == 0) - return dst; - - for (i = 0; i < src->n_div; ++i) - isl_assert(src->ctx, !isl_int_is_zero(src->div[i][0]), goto error); - - src = isl_basic_map_order_divs(src); - dst = isl_basic_map_cow(dst); - dst = isl_basic_map_extend_space(dst, isl_space_copy(dst->dim), - src->n_div, 0, 2 * src->n_div); - if (!dst) - return NULL; - for (i = 0; i < src->n_div; ++i) { - int j = find_div(dst, src, i); - if (j < 0) { - j = isl_basic_map_alloc_div(dst); - if (j < 0) - goto error; - isl_seq_cpy(dst->div[j], src->div[i], 1+1+total+i); - isl_seq_clr(dst->div[j]+1+1+total+i, dst->n_div - i); - if (isl_basic_map_add_div_constraints(dst, j) < 0) - goto error; - } - if (j != i) - isl_basic_map_swap_div(dst, i, j); - } - return dst; -error: - isl_basic_map_free(dst); - return NULL; -} - -struct isl_basic_set *isl_basic_set_align_divs( - struct isl_basic_set *dst, struct isl_basic_set *src) -{ - return (struct isl_basic_set *)isl_basic_map_align_divs( - (struct isl_basic_map *)dst, (struct isl_basic_map *)src); -} - -struct isl_map *isl_map_align_divs(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - if (map->n == 0) - return map; - map = isl_map_compute_divs(map); - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 1; i < map->n; ++i) - map->p[0] = isl_basic_map_align_divs(map->p[0], map->p[i]); - for (i = 1; i < map->n; ++i) - map->p[i] = isl_basic_map_align_divs(map->p[i], map->p[0]); - - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -} - -struct isl_set *isl_set_align_divs(struct isl_set *set) -{ - return (struct isl_set *)isl_map_align_divs((struct isl_map *)set); -} - -static __isl_give isl_set *set_apply( __isl_take isl_set *set, - __isl_take isl_map *map) -{ - if (!set || !map) - goto error; - isl_assert(set->ctx, isl_map_compatible_domain(map, set), goto error); - map = isl_map_intersect_domain(map, set); - set = isl_map_range(map); - return set; -error: - isl_set_free(set); - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_apply( __isl_take isl_set *set, - __isl_take isl_map *map) -{ - return isl_map_align_params_map_map_and(set, map, &set_apply); -} - -/* There is no need to cow as removing empty parts doesn't change - * the meaning of the set. - */ -struct isl_map *isl_map_remove_empty_parts(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - - for (i = map->n-1; i >= 0; --i) { - if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_EMPTY)) - continue; - isl_basic_map_free(map->p[i]); - if (i != map->n-1) { - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - map->p[i] = map->p[map->n-1]; - } - map->n--; - } - - return map; -} - -struct isl_set *isl_set_remove_empty_parts(struct isl_set *set) -{ - return (struct isl_set *) - isl_map_remove_empty_parts((struct isl_map *)set); -} - -struct isl_basic_map *isl_map_copy_basic_map(struct isl_map *map) -{ - struct isl_basic_map *bmap; - if (!map || map->n == 0) - return NULL; - bmap = map->p[map->n-1]; - isl_assert(map->ctx, ISL_F_ISSET(bmap, ISL_BASIC_SET_FINAL), return NULL); - return isl_basic_map_copy(bmap); -} - -struct isl_basic_set *isl_set_copy_basic_set(struct isl_set *set) -{ - return (struct isl_basic_set *) - isl_map_copy_basic_map((struct isl_map *)set); -} - -__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap) -{ - int i; - - if (!map || !bmap) - goto error; - for (i = map->n-1; i >= 0; --i) { - if (map->p[i] != bmap) - continue; - map = isl_map_cow(map); - if (!map) - goto error; - isl_basic_map_free(map->p[i]); - if (i != map->n-1) { - ISL_F_CLR(map, ISL_SET_NORMALIZED); - map->p[i] = map->p[map->n-1]; - } - map->n--; - return map; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop_basic_set(struct isl_set *set, - struct isl_basic_set *bset) -{ - return (struct isl_set *)isl_map_drop_basic_map((struct isl_map *)set, - (struct isl_basic_map *)bset); -} - -/* Given two basic sets bset1 and bset2, compute the maximal difference - * between the values of dimension pos in bset1 and those in bset2 - * for any common value of the parameters and dimensions preceding pos. - */ -static enum isl_lp_result basic_set_maximal_difference_at( - __isl_keep isl_basic_set *bset1, __isl_keep isl_basic_set *bset2, - int pos, isl_int *opt) -{ - isl_space *dims; - struct isl_basic_map *bmap1 = NULL; - struct isl_basic_map *bmap2 = NULL; - struct isl_ctx *ctx; - struct isl_vec *obj; - unsigned total; - unsigned nparam; - unsigned dim1, dim2; - enum isl_lp_result res; - - if (!bset1 || !bset2) - return isl_lp_error; - - nparam = isl_basic_set_n_param(bset1); - dim1 = isl_basic_set_n_dim(bset1); - dim2 = isl_basic_set_n_dim(bset2); - dims = isl_space_alloc(bset1->ctx, nparam, pos, dim1 - pos); - bmap1 = isl_basic_map_from_basic_set(isl_basic_set_copy(bset1), dims); - dims = isl_space_alloc(bset2->ctx, nparam, pos, dim2 - pos); - bmap2 = isl_basic_map_from_basic_set(isl_basic_set_copy(bset2), dims); - if (!bmap1 || !bmap2) - goto error; - bmap1 = isl_basic_map_cow(bmap1); - bmap1 = isl_basic_map_extend(bmap1, nparam, - pos, (dim1 - pos) + (dim2 - pos), - bmap2->n_div, bmap2->n_eq, bmap2->n_ineq); - bmap1 = add_constraints(bmap1, bmap2, 0, dim1 - pos); - if (!bmap1) - goto error; - total = isl_basic_map_total_dim(bmap1); - ctx = bmap1->ctx; - obj = isl_vec_alloc(ctx, 1 + total); - isl_seq_clr(obj->block.data, 1 + total); - isl_int_set_si(obj->block.data[1+nparam+pos], 1); - isl_int_set_si(obj->block.data[1+nparam+pos+(dim1-pos)], -1); - if (!obj) - goto error; - res = isl_basic_map_solve_lp(bmap1, 1, obj->block.data, ctx->one, - opt, NULL, NULL); - isl_basic_map_free(bmap1); - isl_vec_free(obj); - return res; -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return isl_lp_error; -} - -/* Given two _disjoint_ basic sets bset1 and bset2, check whether - * for any common value of the parameters and dimensions preceding pos - * in both basic sets, the values of dimension pos in bset1 are - * smaller or larger than those in bset2. - * - * Returns - * 1 if bset1 follows bset2 - * -1 if bset1 precedes bset2 - * 0 if bset1 and bset2 are incomparable - * -2 if some error occurred. - */ -int isl_basic_set_compare_at(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, int pos) -{ - isl_int opt; - enum isl_lp_result res; - int cmp; - - isl_int_init(opt); - - res = basic_set_maximal_difference_at(bset1, bset2, pos, &opt); - - if (res == isl_lp_empty) - cmp = 0; - else if ((res == isl_lp_ok && isl_int_is_pos(opt)) || - res == isl_lp_unbounded) - cmp = 1; - else if (res == isl_lp_ok && isl_int_is_neg(opt)) - cmp = -1; - else - cmp = -2; - - isl_int_clear(opt); - return cmp; -} - -/* Given two basic sets bset1 and bset2, check whether - * for any common value of the parameters and dimensions preceding pos - * there is a value of dimension pos in bset1 that is larger - * than a value of the same dimension in bset2. - * - * Return - * 1 if there exists such a pair - * 0 if there is no such pair, but there is a pair of equal values - * -1 otherwise - * -2 if some error occurred. - */ -int isl_basic_set_follows_at(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2, int pos) -{ - isl_int opt; - enum isl_lp_result res; - int cmp; - - isl_int_init(opt); - - res = basic_set_maximal_difference_at(bset1, bset2, pos, &opt); - - if (res == isl_lp_empty) - cmp = -1; - else if ((res == isl_lp_ok && isl_int_is_pos(opt)) || - res == isl_lp_unbounded) - cmp = 1; - else if (res == isl_lp_ok && isl_int_is_neg(opt)) - cmp = -1; - else if (res == isl_lp_ok) - cmp = 0; - else - cmp = -2; - - isl_int_clear(opt); - return cmp; -} - -/* Given two sets set1 and set2, check whether - * for any common value of the parameters and dimensions preceding pos - * there is a value of dimension pos in set1 that is larger - * than a value of the same dimension in set2. - * - * Return - * 1 if there exists such a pair - * 0 if there is no such pair, but there is a pair of equal values - * -1 otherwise - * -2 if some error occurred. - */ -int isl_set_follows_at(__isl_keep isl_set *set1, - __isl_keep isl_set *set2, int pos) -{ - int i, j; - int follows = -1; - - if (!set1 || !set2) - return -2; - - for (i = 0; i < set1->n; ++i) - for (j = 0; j < set2->n; ++j) { - int f; - f = isl_basic_set_follows_at(set1->p[i], set2->p[j], pos); - if (f == 1 || f == -2) - return f; - if (f > follows) - follows = f; - } - - return follows; -} - -static int isl_basic_map_plain_has_fixed_var(__isl_keep isl_basic_map *bmap, - unsigned pos, isl_int *val) -{ - int i; - int d; - unsigned total; - - if (!bmap) - return -1; - total = isl_basic_map_total_dim(bmap); - for (i = 0, d = total-1; i < bmap->n_eq && d+1 > pos; ++i) { - for (; d+1 > pos; --d) - if (!isl_int_is_zero(bmap->eq[i][1+d])) - break; - if (d != pos) - continue; - if (isl_seq_first_non_zero(bmap->eq[i]+1, d) != -1) - return 0; - if (isl_seq_first_non_zero(bmap->eq[i]+1+d+1, total-d-1) != -1) - return 0; - if (!isl_int_is_one(bmap->eq[i][1+d])) - return 0; - if (val) - isl_int_neg(*val, bmap->eq[i][0]); - return 1; - } - return 0; -} - -static int isl_map_plain_has_fixed_var(__isl_keep isl_map *map, - unsigned pos, isl_int *val) -{ - int i; - isl_int v; - isl_int tmp; - int fixed; - - if (!map) - return -1; - if (map->n == 0) - return 0; - if (map->n == 1) - return isl_basic_map_plain_has_fixed_var(map->p[0], pos, val); - isl_int_init(v); - isl_int_init(tmp); - fixed = isl_basic_map_plain_has_fixed_var(map->p[0], pos, &v); - for (i = 1; fixed == 1 && i < map->n; ++i) { - fixed = isl_basic_map_plain_has_fixed_var(map->p[i], pos, &tmp); - if (fixed == 1 && isl_int_ne(tmp, v)) - fixed = 0; - } - if (val) - isl_int_set(*val, v); - isl_int_clear(tmp); - isl_int_clear(v); - return fixed; -} - -static int isl_basic_set_plain_has_fixed_var(__isl_keep isl_basic_set *bset, - unsigned pos, isl_int *val) -{ - return isl_basic_map_plain_has_fixed_var((struct isl_basic_map *)bset, - pos, val); -} - -static int isl_set_plain_has_fixed_var(__isl_keep isl_set *set, unsigned pos, - isl_int *val) -{ - return isl_map_plain_has_fixed_var((struct isl_map *)set, pos, val); -} - -int isl_basic_map_plain_is_fixed(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - if (pos >= isl_basic_map_dim(bmap, type)) - return -1; - return isl_basic_map_plain_has_fixed_var(bmap, - isl_basic_map_offset(bmap, type) - 1 + pos, val); -} - -int isl_map_plain_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - if (pos >= isl_map_dim(map, type)) - return -1; - return isl_map_plain_has_fixed_var(map, - map_offset(map, type) - 1 + pos, val); -} - -int isl_set_plain_is_fixed(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - return isl_map_plain_is_fixed(set, type, pos, val); -} - -int isl_map_fast_is_fixed(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, isl_int *val) -{ - return isl_map_plain_is_fixed(map, type, pos, val); -} - -/* Check if dimension dim has fixed value and if so and if val is not NULL, - * then return this fixed value in *val. - */ -int isl_basic_set_plain_dim_is_fixed(__isl_keep isl_basic_set *bset, - unsigned dim, isl_int *val) -{ - return isl_basic_set_plain_has_fixed_var(bset, - isl_basic_set_n_param(bset) + dim, val); -} - -/* Check if dimension dim has fixed value and if so and if val is not NULL, - * then return this fixed value in *val. - */ -int isl_set_plain_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val) -{ - return isl_set_plain_has_fixed_var(set, isl_set_n_param(set) + dim, val); -} - -int isl_set_fast_dim_is_fixed(__isl_keep isl_set *set, - unsigned dim, isl_int *val) -{ - return isl_set_plain_dim_is_fixed(set, dim, val); -} - -/* Check if input variable in has fixed value and if so and if val is not NULL, - * then return this fixed value in *val. - */ -int isl_map_plain_input_is_fixed(__isl_keep isl_map *map, - unsigned in, isl_int *val) -{ - return isl_map_plain_has_fixed_var(map, isl_map_n_param(map) + in, val); -} - -/* Check if dimension dim has an (obvious) fixed lower bound and if so - * and if val is not NULL, then return this lower bound in *val. - */ -int isl_basic_set_plain_dim_has_fixed_lower_bound( - __isl_keep isl_basic_set *bset, unsigned dim, isl_int *val) -{ - int i, i_eq = -1, i_ineq = -1; - isl_int *c; - unsigned total; - unsigned nparam; - - if (!bset) - return -1; - total = isl_basic_set_total_dim(bset); - nparam = isl_basic_set_n_param(bset); - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][1+nparam+dim])) - continue; - if (i_eq != -1) - return 0; - i_eq = i; - } - for (i = 0; i < bset->n_ineq; ++i) { - if (!isl_int_is_pos(bset->ineq[i][1+nparam+dim])) - continue; - if (i_eq != -1 || i_ineq != -1) - return 0; - i_ineq = i; - } - if (i_eq == -1 && i_ineq == -1) - return 0; - c = i_eq != -1 ? bset->eq[i_eq] : bset->ineq[i_ineq]; - /* The coefficient should always be one due to normalization. */ - if (!isl_int_is_one(c[1+nparam+dim])) - return 0; - if (isl_seq_first_non_zero(c+1, nparam+dim) != -1) - return 0; - if (isl_seq_first_non_zero(c+1+nparam+dim+1, - total - nparam - dim - 1) != -1) - return 0; - if (val) - isl_int_neg(*val, c[0]); - return 1; -} - -int isl_set_plain_dim_has_fixed_lower_bound(__isl_keep isl_set *set, - unsigned dim, isl_int *val) -{ - int i; - isl_int v; - isl_int tmp; - int fixed; - - if (!set) - return -1; - if (set->n == 0) - return 0; - if (set->n == 1) - return isl_basic_set_plain_dim_has_fixed_lower_bound(set->p[0], - dim, val); - isl_int_init(v); - isl_int_init(tmp); - fixed = isl_basic_set_plain_dim_has_fixed_lower_bound(set->p[0], - dim, &v); - for (i = 1; fixed == 1 && i < set->n; ++i) { - fixed = isl_basic_set_plain_dim_has_fixed_lower_bound(set->p[i], - dim, &tmp); - if (fixed == 1 && isl_int_ne(tmp, v)) - fixed = 0; - } - if (val) - isl_int_set(*val, v); - isl_int_clear(tmp); - isl_int_clear(v); - return fixed; -} - -struct constraint { - unsigned size; - isl_int *c; -}; - -/* uset_gist depends on constraints without existentially quantified - * variables sorting first. - */ -static int qsort_constraint_cmp(const void *p1, const void *p2) -{ - const struct constraint *c1 = (const struct constraint *)p1; - const struct constraint *c2 = (const struct constraint *)p2; - int l1, l2; - unsigned size = isl_min(c1->size, c2->size); - - l1 = isl_seq_last_non_zero(c1->c, size); - l2 = isl_seq_last_non_zero(c2->c, size); - - if (l1 != l2) - return l1 - l2; - - return isl_seq_cmp(c1->c, c2->c, size); -} - -static struct isl_basic_map *isl_basic_map_sort_constraints( - struct isl_basic_map *bmap) -{ - int i; - struct constraint *c; - unsigned total; - - if (!bmap) - return NULL; - total = isl_basic_map_total_dim(bmap); - c = isl_alloc_array(bmap->ctx, struct constraint, bmap->n_ineq); - if (!c) - goto error; - for (i = 0; i < bmap->n_ineq; ++i) { - c[i].size = total; - c[i].c = bmap->ineq[i]; - } - qsort(c, bmap->n_ineq, sizeof(struct constraint), qsort_constraint_cmp); - for (i = 0; i < bmap->n_ineq; ++i) - bmap->ineq[i] = c[i].c; - free(c); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_sort_constraints( - __isl_take isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_sort_constraints( - (struct isl_basic_map *)bset); -} - -struct isl_basic_map *isl_basic_map_normalize(struct isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NORMALIZED)) - return bmap; - bmap = isl_basic_map_remove_redundancies(bmap); - bmap = isl_basic_map_sort_constraints(bmap); - ISL_F_SET(bmap, ISL_BASIC_MAP_NORMALIZED); - return bmap; -} - -struct isl_basic_set *isl_basic_set_normalize(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_normalize( - (struct isl_basic_map *)bset); -} - -int isl_basic_map_plain_cmp(const __isl_keep isl_basic_map *bmap1, - const __isl_keep isl_basic_map *bmap2) -{ - int i, cmp; - unsigned total; - - if (bmap1 == bmap2) - return 0; - if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) != - ISL_F_ISSET(bmap2, ISL_BASIC_MAP_RATIONAL)) - return ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) ? -1 : 1; - if (isl_basic_map_n_param(bmap1) != isl_basic_map_n_param(bmap2)) - return isl_basic_map_n_param(bmap1) - isl_basic_map_n_param(bmap2); - if (isl_basic_map_n_in(bmap1) != isl_basic_map_n_in(bmap2)) - return isl_basic_map_n_out(bmap1) - isl_basic_map_n_out(bmap2); - if (isl_basic_map_n_out(bmap1) != isl_basic_map_n_out(bmap2)) - return isl_basic_map_n_out(bmap1) - isl_basic_map_n_out(bmap2); - if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_EMPTY) && - ISL_F_ISSET(bmap2, ISL_BASIC_MAP_EMPTY)) - return 0; - if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_EMPTY)) - return 1; - if (ISL_F_ISSET(bmap2, ISL_BASIC_MAP_EMPTY)) - return -1; - if (bmap1->n_eq != bmap2->n_eq) - return bmap1->n_eq - bmap2->n_eq; - if (bmap1->n_ineq != bmap2->n_ineq) - return bmap1->n_ineq - bmap2->n_ineq; - if (bmap1->n_div != bmap2->n_div) - return bmap1->n_div - bmap2->n_div; - total = isl_basic_map_total_dim(bmap1); - for (i = 0; i < bmap1->n_eq; ++i) { - cmp = isl_seq_cmp(bmap1->eq[i], bmap2->eq[i], 1+total); - if (cmp) - return cmp; - } - for (i = 0; i < bmap1->n_ineq; ++i) { - cmp = isl_seq_cmp(bmap1->ineq[i], bmap2->ineq[i], 1+total); - if (cmp) - return cmp; - } - for (i = 0; i < bmap1->n_div; ++i) { - cmp = isl_seq_cmp(bmap1->div[i], bmap2->div[i], 1+1+total); - if (cmp) - return cmp; - } - return 0; -} - -int isl_basic_set_plain_cmp(const __isl_keep isl_basic_set *bset1, - const __isl_keep isl_basic_set *bset2) -{ - return isl_basic_map_plain_cmp(bset1, bset2); -} - -int isl_set_plain_cmp(const __isl_keep isl_set *set1, - const __isl_keep isl_set *set2) -{ - int i, cmp; - - if (set1 == set2) - return 0; - if (set1->n != set2->n) - return set1->n - set2->n; - - for (i = 0; i < set1->n; ++i) { - cmp = isl_basic_set_plain_cmp(set1->p[i], set2->p[i]); - if (cmp) - return cmp; - } - - return 0; -} - -int isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2) -{ - return isl_basic_map_plain_cmp(bmap1, bmap2) == 0; -} - -int isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2) -{ - return isl_basic_map_plain_is_equal((isl_basic_map *)bset1, - (isl_basic_map *)bset2); -} - -static int qsort_bmap_cmp(const void *p1, const void *p2) -{ - const struct isl_basic_map *bmap1 = *(const struct isl_basic_map **)p1; - const struct isl_basic_map *bmap2 = *(const struct isl_basic_map **)p2; - - return isl_basic_map_plain_cmp(bmap1, bmap2); -} - -/* We normalize in place, but if anything goes wrong we need - * to return NULL, so we need to make sure we don't change the - * meaning of any possible other copies of map. - */ -struct isl_map *isl_map_normalize(struct isl_map *map) -{ - int i, j; - struct isl_basic_map *bmap; - - if (!map) - return NULL; - if (ISL_F_ISSET(map, ISL_MAP_NORMALIZED)) - return map; - for (i = 0; i < map->n; ++i) { - bmap = isl_basic_map_normalize(isl_basic_map_copy(map->p[i])); - if (!bmap) - goto error; - isl_basic_map_free(map->p[i]); - map->p[i] = bmap; - } - qsort(map->p, map->n, sizeof(struct isl_basic_map *), qsort_bmap_cmp); - ISL_F_SET(map, ISL_MAP_NORMALIZED); - map = isl_map_remove_empty_parts(map); - if (!map) - return NULL; - for (i = map->n - 1; i >= 1; --i) { - if (!isl_basic_map_plain_is_equal(map->p[i-1], map->p[i])) - continue; - isl_basic_map_free(map->p[i-1]); - for (j = i; j < map->n; ++j) - map->p[j-1] = map->p[j]; - map->n--; - } - return map; -error: - isl_map_free(map); - return NULL; - -} - -struct isl_set *isl_set_normalize(struct isl_set *set) -{ - return (struct isl_set *)isl_map_normalize((struct isl_map *)set); -} - -int isl_map_plain_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - int i; - int equal; - - if (!map1 || !map2) - return -1; - - if (map1 == map2) - return 1; - if (!isl_space_is_equal(map1->dim, map2->dim)) - return 0; - - map1 = isl_map_copy(map1); - map2 = isl_map_copy(map2); - map1 = isl_map_normalize(map1); - map2 = isl_map_normalize(map2); - if (!map1 || !map2) - goto error; - equal = map1->n == map2->n; - for (i = 0; equal && i < map1->n; ++i) { - equal = isl_basic_map_plain_is_equal(map1->p[i], map2->p[i]); - if (equal < 0) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return equal; -error: - isl_map_free(map1); - isl_map_free(map2); - return -1; -} - -int isl_map_fast_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - return isl_map_plain_is_equal(map1, map2); -} - -int isl_set_plain_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_map_plain_is_equal((struct isl_map *)set1, - (struct isl_map *)set2); -} - -int isl_set_fast_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_set_plain_is_equal(set1, set2); -} - -/* Return an interval that ranges from min to max (inclusive) - */ -struct isl_basic_set *isl_basic_set_interval(struct isl_ctx *ctx, - isl_int min, isl_int max) -{ - int k; - struct isl_basic_set *bset = NULL; - - bset = isl_basic_set_alloc(ctx, 0, 1, 0, 0, 2); - if (!bset) - goto error; - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_int_set_si(bset->ineq[k][1], 1); - isl_int_neg(bset->ineq[k][0], min); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_int_set_si(bset->ineq[k][1], -1); - isl_int_set(bset->ineq[k][0], max); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Return the Cartesian product of the basic sets in list (in the given order). - */ -__isl_give isl_basic_set *isl_basic_set_list_product( - __isl_take struct isl_basic_set_list *list) -{ - int i; - unsigned dim; - unsigned nparam; - unsigned extra; - unsigned n_eq; - unsigned n_ineq; - struct isl_basic_set *product = NULL; - - if (!list) - goto error; - isl_assert(list->ctx, list->n > 0, goto error); - isl_assert(list->ctx, list->p[0], goto error); - nparam = isl_basic_set_n_param(list->p[0]); - dim = isl_basic_set_n_dim(list->p[0]); - extra = list->p[0]->n_div; - n_eq = list->p[0]->n_eq; - n_ineq = list->p[0]->n_ineq; - for (i = 1; i < list->n; ++i) { - isl_assert(list->ctx, list->p[i], goto error); - isl_assert(list->ctx, - nparam == isl_basic_set_n_param(list->p[i]), goto error); - dim += isl_basic_set_n_dim(list->p[i]); - extra += list->p[i]->n_div; - n_eq += list->p[i]->n_eq; - n_ineq += list->p[i]->n_ineq; - } - product = isl_basic_set_alloc(list->ctx, nparam, dim, extra, - n_eq, n_ineq); - if (!product) - goto error; - dim = 0; - for (i = 0; i < list->n; ++i) { - isl_basic_set_add_constraints(product, - isl_basic_set_copy(list->p[i]), dim); - dim += isl_basic_set_n_dim(list->p[i]); - } - isl_basic_set_list_free(list); - return product; -error: - isl_basic_set_free(product); - isl_basic_set_list_free(list); - return NULL; -} - -struct isl_basic_map *isl_basic_map_product( - struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) -{ - isl_space *dim_result = NULL; - struct isl_basic_map *bmap; - unsigned in1, in2, out1, out2, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - isl_assert(bmap1->ctx, isl_space_match(bmap1->dim, isl_dim_param, - bmap2->dim, isl_dim_param), goto error); - dim_result = isl_space_product(isl_space_copy(bmap1->dim), - isl_space_copy(bmap2->dim)); - - in1 = isl_basic_map_n_in(bmap1); - in2 = isl_basic_map_n_in(bmap2); - out1 = isl_basic_map_n_out(bmap1); - out2 = isl_basic_map_n_out(bmap2); - nparam = isl_basic_map_n_param(bmap1); - - total = nparam + in1 + in2 + out1 + out2 + bmap1->n_div + bmap2->n_div; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos += in1); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += in2); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += out1); - isl_dim_map_div(dim_map1, bmap1, pos += out2); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - - bmap = isl_basic_map_alloc_space(dim_result, - bmap1->n_div + bmap2->n_div, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flat_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_basic_map *prod; - - prod = isl_basic_map_product(bmap1, bmap2); - prod = isl_basic_map_flatten(prod); - return prod; -} - -__isl_give isl_basic_set *isl_basic_set_flat_product( - __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2) -{ - return isl_basic_map_flat_range_product(bset1, bset2); -} - -__isl_give isl_basic_map *isl_basic_map_domain_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_space *space_result = NULL; - isl_basic_map *bmap; - unsigned in1, in2, out, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - space_result = isl_space_domain_product(isl_space_copy(bmap1->dim), - isl_space_copy(bmap2->dim)); - - in1 = isl_basic_map_dim(bmap1, isl_dim_in); - in2 = isl_basic_map_dim(bmap2, isl_dim_in); - out = isl_basic_map_dim(bmap1, isl_dim_out); - nparam = isl_basic_map_dim(bmap1, isl_dim_param); - - total = nparam + in1 + in2 + out + bmap1->n_div + bmap2->n_div; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos += in1); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += in2); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos); - isl_dim_map_div(dim_map1, bmap1, pos += out); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - - bmap = isl_basic_map_alloc_space(space_result, - bmap1->n_div + bmap2->n_div, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_space *dim_result = NULL; - isl_basic_map *bmap; - unsigned in, out1, out2, nparam, total, pos; - struct isl_dim_map *dim_map1, *dim_map2; - - if (!bmap1 || !bmap2) - goto error; - - dim_result = isl_space_range_product(isl_space_copy(bmap1->dim), - isl_space_copy(bmap2->dim)); - - in = isl_basic_map_dim(bmap1, isl_dim_in); - out1 = isl_basic_map_n_out(bmap1); - out2 = isl_basic_map_n_out(bmap2); - nparam = isl_basic_map_n_param(bmap1); - - total = nparam + in + out1 + out2 + bmap1->n_div + bmap2->n_div; - dim_map1 = isl_dim_map_alloc(bmap1->ctx, total); - dim_map2 = isl_dim_map_alloc(bmap1->ctx, total); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_param, pos = 0); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_in, pos += nparam); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_in, pos); - isl_dim_map_dim(dim_map1, bmap1->dim, isl_dim_out, pos += in); - isl_dim_map_dim(dim_map2, bmap2->dim, isl_dim_out, pos += out1); - isl_dim_map_div(dim_map1, bmap1, pos += out2); - isl_dim_map_div(dim_map2, bmap2, pos += bmap1->n_div); - - bmap = isl_basic_map_alloc_space(dim_result, - bmap1->n_div + bmap2->n_div, - bmap1->n_eq + bmap2->n_eq, - bmap1->n_ineq + bmap2->n_ineq); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap1, dim_map1); - bmap = isl_basic_map_add_constraints_dim_map(bmap, bmap2, dim_map2); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap1); - isl_basic_map_free(bmap2); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flat_range_product( - __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2) -{ - isl_basic_map *prod; - - prod = isl_basic_map_range_product(bmap1, bmap2); - prod = isl_basic_map_flatten_range(prod); - return prod; -} - -static __isl_give isl_map *map_product(__isl_take isl_map *map1, - __isl_take isl_map *map2, - __isl_give isl_space *(*dim_product)(__isl_take isl_space *left, - __isl_take isl_space *right), - __isl_give isl_basic_map *(*basic_map_product)( - __isl_take isl_basic_map *left, __isl_take isl_basic_map *right)) -{ - unsigned flags = 0; - struct isl_map *result; - int i, j; - - if (!map1 || !map2) - goto error; - - isl_assert(map1->ctx, isl_space_match(map1->dim, isl_dim_param, - map2->dim, isl_dim_param), goto error); - - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT) && - ISL_F_ISSET(map2, ISL_MAP_DISJOINT)) - ISL_FL_SET(flags, ISL_MAP_DISJOINT); - - result = isl_map_alloc_space(dim_product(isl_space_copy(map1->dim), - isl_space_copy(map2->dim)), - map1->n * map2->n, flags); - if (!result) - goto error; - for (i = 0; i < map1->n; ++i) - for (j = 0; j < map2->n; ++j) { - struct isl_basic_map *part; - part = basic_map_product(isl_basic_map_copy(map1->p[i]), - isl_basic_map_copy(map2->p[j])); - if (isl_basic_map_is_empty(part)) - isl_basic_map_free(part); - else - result = isl_map_add_basic_map(result, part); - if (!result) - goto error; - } - isl_map_free(map1); - isl_map_free(map2); - return result; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -/* Given two maps A -> B and C -> D, construct a map [A -> C] -> [B -> D] - */ -static __isl_give isl_map *map_product_aligned(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return map_product(map1, map2, &isl_space_product, &isl_basic_map_product); -} - -__isl_give isl_map *isl_map_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_product_aligned); -} - -/* Given two maps A -> B and C -> D, construct a map (A, C) -> (B, D) - */ -__isl_give isl_map *isl_map_flat_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *prod; - - prod = isl_map_product(map1, map2); - prod = isl_map_flatten(prod); - return prod; -} - -/* Given two set A and B, construct its Cartesian product A x B. - */ -struct isl_set *isl_set_product(struct isl_set *set1, struct isl_set *set2) -{ - return isl_map_range_product(set1, set2); -} - -__isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1, - __isl_take isl_set *set2) -{ - return isl_map_flat_range_product(set1, set2); -} - -/* Given two maps A -> B and C -> D, construct a map [A -> C] -> (B * D) - */ -static __isl_give isl_map *map_domain_product_aligned(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return map_product(map1, map2, &isl_space_domain_product, - &isl_basic_map_domain_product); -} - -/* Given two maps A -> B and C -> D, construct a map (A * C) -> [B -> D] - */ -static __isl_give isl_map *map_range_product_aligned(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return map_product(map1, map2, &isl_space_range_product, - &isl_basic_map_range_product); -} - -__isl_give isl_map *isl_map_domain_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, - &map_domain_product_aligned); -} - -__isl_give isl_map *isl_map_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, - &map_range_product_aligned); -} - -/* Given two maps A -> B and C -> D, construct a map (A, C) -> (B * D) - */ -__isl_give isl_map *isl_map_flat_domain_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *prod; - - prod = isl_map_domain_product(map1, map2); - prod = isl_map_flatten_domain(prod); - return prod; -} - -/* Given two maps A -> B and C -> D, construct a map (A * C) -> (B, D) - */ -__isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - isl_map *prod; - - prod = isl_map_range_product(map1, map2); - prod = isl_map_flatten_range(prod); - return prod; -} - -uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap) -{ - int i; - uint32_t hash = isl_hash_init(); - unsigned total; - - if (!bmap) - return 0; - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_normalize(bmap); - if (!bmap) - return 0; - total = isl_basic_map_total_dim(bmap); - isl_hash_byte(hash, bmap->n_eq & 0xFF); - for (i = 0; i < bmap->n_eq; ++i) { - uint32_t c_hash; - c_hash = isl_seq_get_hash(bmap->eq[i], 1 + total); - isl_hash_hash(hash, c_hash); - } - isl_hash_byte(hash, bmap->n_ineq & 0xFF); - for (i = 0; i < bmap->n_ineq; ++i) { - uint32_t c_hash; - c_hash = isl_seq_get_hash(bmap->ineq[i], 1 + total); - isl_hash_hash(hash, c_hash); - } - isl_hash_byte(hash, bmap->n_div & 0xFF); - for (i = 0; i < bmap->n_div; ++i) { - uint32_t c_hash; - if (isl_int_is_zero(bmap->div[i][0])) - continue; - isl_hash_byte(hash, i & 0xFF); - c_hash = isl_seq_get_hash(bmap->div[i], 1 + 1 + total); - isl_hash_hash(hash, c_hash); - } - isl_basic_map_free(bmap); - return hash; -} - -uint32_t isl_basic_set_get_hash(__isl_keep isl_basic_set *bset) -{ - return isl_basic_map_get_hash((isl_basic_map *)bset); -} - -uint32_t isl_map_get_hash(__isl_keep isl_map *map) -{ - int i; - uint32_t hash; - - if (!map) - return 0; - map = isl_map_copy(map); - map = isl_map_normalize(map); - if (!map) - return 0; - - hash = isl_hash_init(); - for (i = 0; i < map->n; ++i) { - uint32_t bmap_hash; - bmap_hash = isl_basic_map_get_hash(map->p[i]); - isl_hash_hash(hash, bmap_hash); - } - - isl_map_free(map); - - return hash; -} - -uint32_t isl_set_get_hash(__isl_keep isl_set *set) -{ - return isl_map_get_hash((isl_map *)set); -} - -/* Check if the value for dimension dim is completely determined - * by the values of the other parameters and variables. - * That is, check if dimension dim is involved in an equality. - */ -int isl_basic_set_dim_is_unique(struct isl_basic_set *bset, unsigned dim) -{ - int i; - unsigned nparam; - - if (!bset) - return -1; - nparam = isl_basic_set_n_param(bset); - for (i = 0; i < bset->n_eq; ++i) - if (!isl_int_is_zero(bset->eq[i][1 + nparam + dim])) - return 1; - return 0; -} - -/* Check if the value for dimension dim is completely determined - * by the values of the other parameters and variables. - * That is, check if dimension dim is involved in an equality - * for each of the subsets. - */ -int isl_set_dim_is_unique(struct isl_set *set, unsigned dim) -{ - int i; - - if (!set) - return -1; - for (i = 0; i < set->n; ++i) { - int unique; - unique = isl_basic_set_dim_is_unique(set->p[i], dim); - if (unique != 1) - return unique; - } - return 1; -} - -int isl_set_n_basic_set(__isl_keep isl_set *set) -{ - return set ? set->n : 0; -} - -int isl_map_foreach_basic_map(__isl_keep isl_map *map, - int (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) - if (fn(isl_basic_map_copy(map->p[i]), user) < 0) - return -1; - - return 0; -} - -int isl_set_foreach_basic_set(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_basic_set *bset, void *user), void *user) -{ - int i; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) - if (fn(isl_basic_set_copy(set->p[i]), user) < 0) - return -1; - - return 0; -} - -__isl_give isl_basic_set *isl_basic_set_lift(__isl_take isl_basic_set *bset) -{ - isl_space *dim; - - if (!bset) - return NULL; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - dim = isl_basic_set_get_space(bset); - dim = isl_space_lift(dim, bset->n_div); - if (!dim) - goto error; - isl_space_free(bset->dim); - bset->dim = dim; - bset->extra -= bset->n_div; - bset->n_div = 0; - - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_set *isl_set_lift(__isl_take isl_set *set) -{ - int i; - isl_space *dim; - unsigned n_div; - - set = isl_set_align_divs(set); - - if (!set) - return NULL; - - set = isl_set_cow(set); - if (!set) - return NULL; - - n_div = set->p[0]->n_div; - dim = isl_set_get_space(set); - dim = isl_space_lift(dim, n_div); - if (!dim) - goto error; - isl_space_free(set->dim); - set->dim = dim; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_lift(set->p[i]); - if (!set->p[i]) - goto error; - } - - return set; -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_map *isl_set_lifting(__isl_take isl_set *set) -{ - isl_space *dim; - struct isl_basic_map *bmap; - unsigned n_set; - unsigned n_div; - unsigned n_param; - unsigned total; - int i, k, l; - - set = isl_set_align_divs(set); - - if (!set) - return NULL; - - dim = isl_set_get_space(set); - if (set->n == 0 || set->p[0]->n_div == 0) { - isl_set_free(set); - return isl_map_identity(isl_space_map_from_set(dim)); - } - - n_div = set->p[0]->n_div; - dim = isl_space_map_from_set(dim); - n_param = isl_space_dim(dim, isl_dim_param); - n_set = isl_space_dim(dim, isl_dim_in); - dim = isl_space_extend(dim, n_param, n_set, n_set + n_div); - bmap = isl_basic_map_alloc_space(dim, 0, n_set, 2 * n_div); - for (i = 0; i < n_set; ++i) - bmap = var_equal(bmap, i); - - total = n_param + n_set + n_set + n_div; - for (i = 0; i < n_div; ++i) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], set->p[0]->div[i]+1, 1+n_param); - isl_seq_clr(bmap->ineq[k]+1+n_param, n_set); - isl_seq_cpy(bmap->ineq[k]+1+n_param+n_set, - set->p[0]->div[i]+1+1+n_param, n_set + n_div); - isl_int_neg(bmap->ineq[k][1+n_param+n_set+n_set+i], - set->p[0]->div[i][0]); - - l = isl_basic_map_alloc_inequality(bmap); - if (l < 0) - goto error; - isl_seq_neg(bmap->ineq[l], bmap->ineq[k], 1 + total); - isl_int_add(bmap->ineq[l][0], bmap->ineq[l][0], - set->p[0]->div[i][0]); - isl_int_sub_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - } - - isl_set_free(set); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return isl_map_from_basic_map(bmap); -error: - isl_set_free(set); - isl_basic_map_free(bmap); - return NULL; -} - -int isl_basic_set_size(__isl_keep isl_basic_set *bset) -{ - unsigned dim; - int size = 0; - - if (!bset) - return -1; - - dim = isl_basic_set_total_dim(bset); - size += bset->n_eq * (1 + dim); - size += bset->n_ineq * (1 + dim); - size += bset->n_div * (2 + dim); - - return size; -} - -int isl_set_size(__isl_keep isl_set *set) -{ - int i; - int size = 0; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) - size += isl_basic_set_size(set->p[i]); - - return size; -} - -/* Check if there is any lower bound (if lower == 0) and/or upper - * bound (if upper == 0) on the specified dim. - */ -static int basic_map_dim_is_bounded(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos, int lower, int upper) -{ - int i; - - if (!bmap) - return -1; - - isl_assert(bmap->ctx, pos < isl_basic_map_dim(bmap, type), return -1); - - pos += isl_basic_map_offset(bmap, type); - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (!isl_int_is_zero(bmap->div[i][1 + pos])) - return 1; - } - - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][pos])) - return 1; - - for (i = 0; i < bmap->n_ineq; ++i) { - int sgn = isl_int_sgn(bmap->ineq[i][pos]); - if (sgn > 0) - lower = 1; - if (sgn < 0) - upper = 1; - } - - return lower && upper; -} - -int isl_basic_map_dim_is_bounded(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - return basic_map_dim_is_bounded(bmap, type, pos, 0, 0); -} - -int isl_basic_map_dim_has_lower_bound(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - return basic_map_dim_is_bounded(bmap, type, pos, 0, 1); -} - -int isl_basic_map_dim_has_upper_bound(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos) -{ - return basic_map_dim_is_bounded(bmap, type, pos, 1, 0); -} - -int isl_map_dim_is_bounded(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int bounded; - bounded = isl_basic_map_dim_is_bounded(map->p[i], type, pos); - if (bounded < 0 || !bounded) - return bounded; - } - - return 1; -} - -/* Return 1 if the specified dim is involved in both an upper bound - * and a lower bound. - */ -int isl_set_dim_is_bounded(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return isl_map_dim_is_bounded((isl_map *)set, type, pos); -} - -static int has_bound(__isl_keep isl_map *map, - enum isl_dim_type type, unsigned pos, - int (*fn)(__isl_keep isl_basic_map *bmap, - enum isl_dim_type type, unsigned pos)) -{ - int i; - - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - int bounded; - bounded = fn(map->p[i], type, pos); - if (bounded < 0 || bounded) - return bounded; - } - - return 0; -} - -/* Return 1 if the specified dim is involved in any lower bound. - */ -int isl_set_dim_has_lower_bound(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return has_bound(set, type, pos, &isl_basic_map_dim_has_lower_bound); -} - -/* Return 1 if the specified dim is involved in any upper bound. - */ -int isl_set_dim_has_upper_bound(__isl_keep isl_set *set, - enum isl_dim_type type, unsigned pos) -{ - return has_bound(set, type, pos, &isl_basic_map_dim_has_upper_bound); -} - -/* For each of the "n" variables starting at "first", determine - * the sign of the variable and put the results in the first "n" - * elements of the array "signs". - * Sign - * 1 means that the variable is non-negative - * -1 means that the variable is non-positive - * 0 means the variable attains both positive and negative values. - */ -int isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset, - unsigned first, unsigned n, int *signs) -{ - isl_vec *bound = NULL; - struct isl_tab *tab = NULL; - struct isl_tab_undo *snap; - int i; - - if (!bset || !signs) - return -1; - - bound = isl_vec_alloc(bset->ctx, 1 + isl_basic_set_total_dim(bset)); - tab = isl_tab_from_basic_set(bset); - if (!bound || !tab) - goto error; - - isl_seq_clr(bound->el, bound->size); - isl_int_set_si(bound->el[0], -1); - - snap = isl_tab_snap(tab); - for (i = 0; i < n; ++i) { - int empty; - - isl_int_set_si(bound->el[1 + first + i], -1); - if (isl_tab_add_ineq(tab, bound->el) < 0) - goto error; - empty = tab->empty; - isl_int_set_si(bound->el[1 + first + i], 0); - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - if (empty) { - signs[i] = 1; - continue; - } - - isl_int_set_si(bound->el[1 + first + i], 1); - if (isl_tab_add_ineq(tab, bound->el) < 0) - goto error; - empty = tab->empty; - isl_int_set_si(bound->el[1 + first + i], 0); - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - signs[i] = empty ? -1 : 0; - } - - isl_tab_free(tab); - isl_vec_free(bound); - return 0; -error: - isl_tab_free(tab); - isl_vec_free(bound); - return -1; -} - -int isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n, int *signs) -{ - if (!bset || !signs) - return -1; - isl_assert(bset->ctx, first + n <= isl_basic_set_dim(bset, type), - return -1); - - first += pos(bset->dim, type) - 1; - return isl_basic_set_vars_get_sign(bset, first, n, signs); -} - -/* Check if the given basic map is obviously single-valued. - * In particular, for each output dimension, check that there is - * an equality that defines the output dimension in terms of - * earlier dimensions. - */ -int isl_basic_map_plain_is_single_valued(__isl_keep isl_basic_map *bmap) -{ - int i, j; - unsigned total; - unsigned n_out; - unsigned o_out; - - if (!bmap) - return -1; - - total = 1 + isl_basic_map_total_dim(bmap); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - o_out = isl_basic_map_offset(bmap, isl_dim_out); - - for (i = 0; i < n_out; ++i) { - for (j = 0; j < bmap->n_eq; ++j) { - if (isl_int_is_zero(bmap->eq[j][o_out + i])) - continue; - if (isl_seq_first_non_zero(bmap->eq[j] + o_out + i + 1, - total - (o_out + i + 1)) == -1) - break; - } - if (j >= bmap->n_eq) - return 0; - } - - return 1; -} - -/* Check if the given map is obviously single-valued. - */ -int isl_map_plain_is_single_valued(__isl_keep isl_map *map) -{ - if (!map) - return -1; - if (map->n == 0) - return 1; - if (map->n >= 2) - return 0; - - return isl_basic_map_plain_is_single_valued(map->p[0]); -} - -/* Check if the given map is single-valued. - * We simply compute - * - * M \circ M^-1 - * - * and check if the result is a subset of the identity mapping. - */ -int isl_map_is_single_valued(__isl_keep isl_map *map) -{ - isl_space *dim; - isl_map *test; - isl_map *id; - int sv; - - sv = isl_map_plain_is_single_valued(map); - if (sv < 0 || sv) - return sv; - - test = isl_map_reverse(isl_map_copy(map)); - test = isl_map_apply_range(test, isl_map_copy(map)); - - dim = isl_space_map_from_set(isl_space_range(isl_map_get_space(map))); - id = isl_map_identity(dim); - - sv = isl_map_is_subset(test, id); - - isl_map_free(test); - isl_map_free(id); - - return sv; -} - -int isl_map_is_injective(__isl_keep isl_map *map) -{ - int in; - - map = isl_map_copy(map); - map = isl_map_reverse(map); - in = isl_map_is_single_valued(map); - isl_map_free(map); - - return in; -} - -/* Check if the given map is obviously injective. - */ -int isl_map_plain_is_injective(__isl_keep isl_map *map) -{ - int in; - - map = isl_map_copy(map); - map = isl_map_reverse(map); - in = isl_map_plain_is_single_valued(map); - isl_map_free(map); - - return in; -} - -int isl_map_is_bijective(__isl_keep isl_map *map) -{ - int sv; - - sv = isl_map_is_single_valued(map); - if (sv < 0 || !sv) - return sv; - - return isl_map_is_injective(map); -} - -int isl_set_is_singleton(__isl_keep isl_set *set) -{ - return isl_map_is_single_valued((isl_map *)set); -} - -int isl_map_is_translation(__isl_keep isl_map *map) -{ - int ok; - isl_set *delta; - - delta = isl_map_deltas(isl_map_copy(map)); - ok = isl_set_is_singleton(delta); - isl_set_free(delta); - - return ok; -} - -static int unique(isl_int *p, unsigned pos, unsigned len) -{ - if (isl_seq_first_non_zero(p, pos) != -1) - return 0; - if (isl_seq_first_non_zero(p + pos + 1, len - pos - 1) != -1) - return 0; - return 1; -} - -int isl_basic_set_is_box(__isl_keep isl_basic_set *bset) -{ - int i, j; - unsigned nvar; - unsigned ovar; - - if (!bset) - return -1; - - if (isl_basic_set_dim(bset, isl_dim_div) != 0) - return 0; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - ovar = isl_space_offset(bset->dim, isl_dim_set); - for (j = 0; j < nvar; ++j) { - int lower = 0, upper = 0; - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][1 + ovar + j])) - continue; - if (!unique(bset->eq[i] + 1 + ovar, j, nvar)) - return 0; - break; - } - if (i < bset->n_eq) - continue; - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][1 + ovar + j])) - continue; - if (!unique(bset->ineq[i] + 1 + ovar, j, nvar)) - return 0; - if (isl_int_is_pos(bset->ineq[i][1 + ovar + j])) - lower = 1; - else - upper = 1; - } - if (!lower || !upper) - return 0; - } - - return 1; -} - -int isl_set_is_box(__isl_keep isl_set *set) -{ - if (!set) - return -1; - if (set->n != 1) - return 0; - - return isl_basic_set_is_box(set->p[0]); -} - -int isl_basic_set_is_wrapping(__isl_keep isl_basic_set *bset) -{ - if (!bset) - return -1; - - return isl_space_is_wrapping(bset->dim); -} - -int isl_set_is_wrapping(__isl_keep isl_set *set) -{ - if (!set) - return -1; - - return isl_space_is_wrapping(set->dim); -} - -__isl_give isl_basic_set *isl_basic_map_wrap(__isl_take isl_basic_map *bmap) -{ - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_space_wrap(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return (isl_basic_set *)bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_set *isl_map_wrap(__isl_take isl_map *map) -{ - int i; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = (isl_basic_map *)isl_basic_map_wrap(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_space_wrap(map->dim); - if (!map->dim) - goto error; - - return (isl_set *)map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset) -{ - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - bset->dim = isl_space_unwrap(bset->dim); - if (!bset->dim) - goto error; - - bset = isl_basic_set_finalize(bset); - - return (isl_basic_map *)bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set) -{ - int i; - - if (!set) - return NULL; - - if (!isl_set_is_wrapping(set)) - isl_die(set->ctx, isl_error_invalid, "not a wrapping set", - goto error); - - set = isl_set_cow(set); - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - set->p[i] = (isl_basic_set *)isl_basic_set_unwrap(set->p[i]); - if (!set->p[i]) - goto error; - } - - set->dim = isl_space_unwrap(set->dim); - if (!set->dim) - goto error; - - return (isl_map *)set; -error: - isl_set_free(set); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_reset(__isl_take isl_basic_map *bmap, - enum isl_dim_type type) -{ - if (!bmap) - return NULL; - - if (!isl_space_is_named_or_nested(bmap->dim, type)) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_space_reset(bmap->dim, type); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_reset(__isl_take isl_map *map, - enum isl_dim_type type) -{ - int i; - - if (!map) - return NULL; - - if (!isl_space_is_named_or_nested(map->dim, type)) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_reset(map->p[i], type); - if (!map->p[i]) - goto error; - } - map->dim = isl_space_reset(map->dim, type); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flatten(__isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (!bmap->dim->nested[0] && !bmap->dim->nested[1]) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_space_flatten(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_flatten(__isl_take isl_basic_set *bset) -{ - return (isl_basic_set *)isl_basic_map_flatten((isl_basic_map *)bset); -} - -__isl_give isl_basic_map *isl_basic_map_flatten_domain( - __isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (!bmap->dim->nested[0]) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_space_flatten_domain(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_flatten_range( - __isl_take isl_basic_map *bmap) -{ - if (!bmap) - return NULL; - - if (!bmap->dim->nested[1]) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - bmap->dim = isl_space_flatten_range(bmap->dim); - if (!bmap->dim) - goto error; - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_map *isl_map_flatten(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!map->dim->nested[0] && !map->dim->nested[1]) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_flatten(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_space_flatten(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_flatten((isl_map *)set); -} - -__isl_give isl_map *isl_set_flatten_map(__isl_take isl_set *set) -{ - isl_space *dim, *flat_dim; - isl_map *map; - - dim = isl_set_get_space(set); - flat_dim = isl_space_flatten(isl_space_copy(dim)); - map = isl_map_identity(isl_space_join(isl_space_reverse(dim), flat_dim)); - map = isl_map_intersect_domain(map, set); - - return map; -} - -__isl_give isl_map *isl_map_flatten_domain(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!map->dim->nested[0]) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_flatten_domain(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_space_flatten_domain(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_flatten_range(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!map->dim->nested[1]) - return map; - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_flatten_range(map->p[i]); - if (!map->p[i]) - goto error; - } - map->dim = isl_space_flatten_range(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Reorder the dimensions of "bmap" according to the given dim_map - * and set the dimension specification to "dim". - */ -__isl_give isl_basic_map *isl_basic_map_realign(__isl_take isl_basic_map *bmap, - __isl_take isl_space *dim, __isl_take struct isl_dim_map *dim_map) -{ - isl_basic_map *res; - - bmap = isl_basic_map_cow(bmap); - if (!bmap || !dim || !dim_map) - goto error; - - res = isl_basic_map_alloc_space(dim, - bmap->n_div, bmap->n_eq, bmap->n_ineq); - res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); - res = isl_basic_map_finalize(res); - return res; -error: - free(dim_map); - isl_basic_map_free(bmap); - isl_space_free(dim); - return NULL; -} - -/* Reorder the dimensions of "map" according to given reordering. - */ -__isl_give isl_map *isl_map_realign(__isl_take isl_map *map, - __isl_take isl_reordering *r) -{ - int i; - struct isl_dim_map *dim_map; - - map = isl_map_cow(map); - dim_map = isl_dim_map_from_reordering(r); - if (!map || !r || !dim_map) - goto error; - - for (i = 0; i < map->n; ++i) { - struct isl_dim_map *dim_map_i; - - dim_map_i = isl_dim_map_extend(dim_map, map->p[i]); - - map->p[i] = isl_basic_map_realign(map->p[i], - isl_space_copy(r->dim), dim_map_i); - - if (!map->p[i]) - goto error; - } - - map = isl_map_reset_space(map, isl_space_copy(r->dim)); - - isl_reordering_free(r); - free(dim_map); - return map; -error: - free(dim_map); - isl_map_free(map); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_set *isl_set_realign(__isl_take isl_set *set, - __isl_take isl_reordering *r) -{ - return (isl_set *)isl_map_realign((isl_map *)set, r); -} - -__isl_give isl_map *isl_map_align_params(__isl_take isl_map *map, - __isl_take isl_space *model) -{ - isl_ctx *ctx; - - if (!map || !model) - goto error; - - ctx = isl_space_get_ctx(model); - if (!isl_space_has_named_params(model)) - isl_die(ctx, isl_error_invalid, - "model has unnamed parameters", goto error); - if (!isl_space_has_named_params(map->dim)) - isl_die(ctx, isl_error_invalid, - "relation has unnamed parameters", goto error); - if (!isl_space_match(map->dim, isl_dim_param, model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_space_drop_dims(model, isl_dim_in, - 0, isl_space_dim(model, isl_dim_in)); - model = isl_space_drop_dims(model, isl_dim_out, - 0, isl_space_dim(model, isl_dim_out)); - exp = isl_parameter_alignment_reordering(map->dim, model); - exp = isl_reordering_extend_space(exp, isl_map_get_space(map)); - map = isl_map_realign(map, exp); - } - - isl_space_free(model); - return map; -error: - isl_space_free(model); - isl_map_free(map); - return NULL; -} - -__isl_give isl_set *isl_set_align_params(__isl_take isl_set *set, - __isl_take isl_space *model) -{ - return isl_map_align_params(set, model); -} - -__isl_give isl_mat *isl_basic_map_equalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5) -{ - enum isl_dim_type c[5] = { c1, c2, c3, c4, c5 }; - struct isl_mat *mat; - int i, j, k; - int pos; - - if (!bmap) - return NULL; - mat = isl_mat_alloc(bmap->ctx, bmap->n_eq, - isl_basic_map_total_dim(bmap) + 1); - if (!mat) - return NULL; - for (i = 0; i < bmap->n_eq; ++i) - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(mat->row[i][pos], - bmap->eq[i][off + k]); - ++pos; - } - } - - return mat; -} - -__isl_give isl_mat *isl_basic_map_inequalities_matrix( - __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5) -{ - enum isl_dim_type c[5] = { c1, c2, c3, c4, c5 }; - struct isl_mat *mat; - int i, j, k; - int pos; - - if (!bmap) - return NULL; - mat = isl_mat_alloc(bmap->ctx, bmap->n_ineq, - isl_basic_map_total_dim(bmap) + 1); - if (!mat) - return NULL; - for (i = 0; i < bmap->n_ineq; ++i) - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(mat->row[i][pos], - bmap->ineq[i][off + k]); - ++pos; - } - } - - return mat; -} - -__isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( - __isl_take isl_space *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, - enum isl_dim_type c4, enum isl_dim_type c5) -{ - enum isl_dim_type c[5] = { c1, c2, c3, c4, c5 }; - isl_basic_map *bmap; - unsigned total; - unsigned extra; - int i, j, k, l; - int pos; - - if (!dim || !eq || !ineq) - goto error; - - if (eq->n_col != ineq->n_col) - isl_die(dim->ctx, isl_error_invalid, - "equalities and inequalities matrices should have " - "same number of columns", goto error); - - total = 1 + isl_space_dim(dim, isl_dim_all); - - if (eq->n_col < total) - isl_die(dim->ctx, isl_error_invalid, - "number of columns too small", goto error); - - extra = eq->n_col - total; - - bmap = isl_basic_map_alloc_space(isl_space_copy(dim), extra, - eq->n_row, ineq->n_row); - if (!bmap) - goto error; - for (i = 0; i < extra; ++i) { - k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_int_set_si(bmap->div[k][0], 0); - } - for (i = 0; i < eq->n_row; ++i) { - l = isl_basic_map_alloc_equality(bmap); - if (l < 0) - goto error; - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(bmap->eq[l][off + k], - eq->row[i][pos]); - ++pos; - } - } - } - for (i = 0; i < ineq->n_row; ++i) { - l = isl_basic_map_alloc_inequality(bmap); - if (l < 0) - goto error; - for (j = 0, pos = 0; j < 5; ++j) { - int off = isl_basic_map_offset(bmap, c[j]); - for (k = 0; k < isl_basic_map_dim(bmap, c[j]); ++k) { - isl_int_set(bmap->ineq[l][off + k], - ineq->row[i][pos]); - ++pos; - } - } - } - - isl_space_free(dim); - isl_mat_free(eq); - isl_mat_free(ineq); - - return bmap; -error: - isl_space_free(dim); - isl_mat_free(eq); - isl_mat_free(ineq); - return NULL; -} - -__isl_give isl_mat *isl_basic_set_equalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4) -{ - return isl_basic_map_equalities_matrix((isl_basic_map *)bset, - c1, c2, c3, c4, isl_dim_in); -} - -__isl_give isl_mat *isl_basic_set_inequalities_matrix( - __isl_keep isl_basic_set *bset, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4) -{ - return isl_basic_map_inequalities_matrix((isl_basic_map *)bset, - c1, c2, c3, c4, isl_dim_in); -} - -__isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( - __isl_take isl_space *dim, - __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, - enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4) -{ - return (isl_basic_set*) - isl_basic_map_from_constraint_matrices(dim, eq, ineq, - c1, c2, c3, c4, isl_dim_in); -} - -int isl_basic_map_can_zip(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - - return isl_space_can_zip(bmap->dim); -} - -int isl_map_can_zip(__isl_keep isl_map *map) -{ - if (!map) - return -1; - - return isl_space_can_zip(map->dim); -} - -/* Given a basic map (A -> B) -> (C -> D), return the corresponding basic map - * (A -> C) -> (B -> D). - */ -__isl_give isl_basic_map *isl_basic_map_zip(__isl_take isl_basic_map *bmap) -{ - unsigned pos; - unsigned n1; - unsigned n2; - - if (!bmap) - return NULL; - - if (!isl_basic_map_can_zip(bmap)) - isl_die(bmap->ctx, isl_error_invalid, - "basic map cannot be zipped", goto error); - pos = isl_basic_map_offset(bmap, isl_dim_in) + - isl_space_dim(bmap->dim->nested[0], isl_dim_in); - n1 = isl_space_dim(bmap->dim->nested[0], isl_dim_out); - n2 = isl_space_dim(bmap->dim->nested[1], isl_dim_in); - bmap = isl_basic_map_swap_vars(bmap, pos, n1, n2); - if (!bmap) - return NULL; - bmap->dim = isl_space_zip(bmap->dim); - if (!bmap->dim) - goto error; - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Given a map (A -> B) -> (C -> D), return the corresponding map - * (A -> C) -> (B -> D). - */ -__isl_give isl_map *isl_map_zip(__isl_take isl_map *map) -{ - int i; - - if (!map) - return NULL; - - if (!isl_map_can_zip(map)) - isl_die(map->ctx, isl_error_invalid, "map cannot be zipped", - goto error); - - map = isl_map_cow(map); - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_zip(map->p[i]); - if (!map->p[i]) - goto error; - } - - map->dim = isl_space_zip(map->dim); - if (!map->dim) - goto error; - - return map; -error: - isl_map_free(map); - return NULL; -} - -/* Construct a basic map mapping the domain of the affine expression - * to a one-dimensional range prescribed by the affine expression. - */ -__isl_give isl_basic_map *isl_basic_map_from_aff(__isl_take isl_aff *aff) -{ - int k; - int pos; - isl_local_space *ls; - isl_basic_map *bmap; - - if (!aff) - return NULL; - - ls = isl_aff_get_local_space(aff); - bmap = isl_basic_map_from_local_space(ls); - bmap = isl_basic_map_extend_constraints(bmap, 1, 0); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - - pos = isl_basic_map_offset(bmap, isl_dim_out); - isl_seq_cpy(bmap->eq[k], aff->v->el + 1, pos); - isl_int_neg(bmap->eq[k][pos], aff->v->el[0]); - isl_seq_cpy(bmap->eq[k] + pos + 1, aff->v->el + 1 + pos, - aff->v->size - (pos + 1)); - - isl_aff_free(aff); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_aff_free(aff); - isl_basic_map_free(bmap); - return NULL; -} - -/* Construct a basic map mapping the domain the multi-affine expression - * to its range, with each dimension in the range equated to the - * corresponding affine expression. - */ -__isl_give isl_basic_map *isl_basic_map_from_multi_aff( - __isl_take isl_multi_aff *maff) -{ - int i; - isl_space *space; - isl_basic_map *bmap; - - if (!maff) - return NULL; - - if (isl_space_dim(maff->space, isl_dim_out) != maff->n) - isl_die(isl_multi_aff_get_ctx(maff), isl_error_internal, - "invalid space", return isl_multi_aff_free(maff)); - - space = isl_space_domain(isl_multi_aff_get_space(maff)); - bmap = isl_basic_map_universe(isl_space_from_domain(space)); - - for (i = 0; i < maff->n; ++i) { - isl_aff *aff; - isl_basic_map *bmap_i; - - aff = isl_aff_copy(maff->p[i]); - bmap_i = isl_basic_map_from_aff(aff); - - bmap = isl_basic_map_flat_range_product(bmap, bmap_i); - } - - bmap = isl_basic_map_reset_space(bmap, isl_multi_aff_get_space(maff)); - - isl_multi_aff_free(maff); - return bmap; -} - -/* Construct a basic map mapping a domain in the given space to - * to an n-dimensional range, with n the number of elements in the list, - * where each coordinate in the range is prescribed by the - * corresponding affine expression. - * The domains of all affine expressions in the list are assumed to match - * domain_dim. - */ -__isl_give isl_basic_map *isl_basic_map_from_aff_list( - __isl_take isl_space *domain_dim, __isl_take isl_aff_list *list) -{ - int i; - isl_space *dim; - isl_basic_map *bmap; - - if (!list) - return NULL; - - dim = isl_space_from_domain(domain_dim); - bmap = isl_basic_map_universe(dim); - - for (i = 0; i < list->n; ++i) { - isl_aff *aff; - isl_basic_map *bmap_i; - - aff = isl_aff_copy(list->p[i]); - bmap_i = isl_basic_map_from_aff(aff); - - bmap = isl_basic_map_flat_range_product(bmap, bmap_i); - } - - isl_aff_list_free(list); - return bmap; -} - -__isl_give isl_set *isl_set_equate(__isl_take isl_set *set, - enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) -{ - return isl_map_equate(set, type1, pos1, type2, pos2); -} - -/* Add a constraint imposing that the given two dimensions are equal. - */ -__isl_give isl_map *isl_map_equate(__isl_take isl_map *map, - enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) -{ - isl_basic_map *bmap = NULL; - int i; - - if (!map) - return NULL; - - if (pos1 >= isl_map_dim(map, type1)) - isl_die(map->ctx, isl_error_invalid, - "index out of bounds", goto error); - if (pos2 >= isl_map_dim(map, type2)) - isl_die(map->ctx, isl_error_invalid, - "index out of bounds", goto error); - - bmap = isl_basic_map_alloc_space(isl_map_get_space(map), 0, 1, 0); - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - goto error; - isl_seq_clr(bmap->eq[i], 1 + isl_basic_map_total_dim(bmap)); - pos1 += isl_basic_map_offset(bmap, type1); - pos2 += isl_basic_map_offset(bmap, type2); - isl_int_set_si(bmap->eq[i][pos1], -1); - isl_int_set_si(bmap->eq[i][pos2], 1); - bmap = isl_basic_map_finalize(bmap); - - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; -error: - isl_basic_map_free(bmap); - isl_map_free(map); - return NULL; -} - -/* Add a constraint imposing that the given two dimensions have opposite values. - */ -__isl_give isl_map *isl_map_oppose(__isl_take isl_map *map, - enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) -{ - isl_basic_map *bmap = NULL; - int i; - - if (!map) - return NULL; - - if (pos1 >= isl_map_dim(map, type1)) - isl_die(map->ctx, isl_error_invalid, - "index out of bounds", goto error); - if (pos2 >= isl_map_dim(map, type2)) - isl_die(map->ctx, isl_error_invalid, - "index out of bounds", goto error); - - bmap = isl_basic_map_alloc_space(isl_map_get_space(map), 0, 1, 0); - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - goto error; - isl_seq_clr(bmap->eq[i], 1 + isl_basic_map_total_dim(bmap)); - pos1 += isl_basic_map_offset(bmap, type1); - pos2 += isl_basic_map_offset(bmap, type2); - isl_int_set_si(bmap->eq[i][pos1], 1); - isl_int_set_si(bmap->eq[i][pos2], 1); - bmap = isl_basic_map_finalize(bmap); - - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; -error: - isl_basic_map_free(bmap); - isl_map_free(map); - return NULL; -} - -__isl_give isl_aff *isl_basic_map_get_div(__isl_keep isl_basic_map *bmap, - int pos) -{ - isl_aff *div; - isl_local_space *ls; - - if (!bmap) - return NULL; - - if (!isl_basic_map_divs_known(bmap)) - isl_die(isl_basic_map_get_ctx(bmap), isl_error_invalid, - "some divs are unknown", return NULL); - - ls = isl_basic_map_get_local_space(bmap); - div = isl_local_space_get_div(ls, pos); - isl_local_space_free(ls); - - return div; -} - -__isl_give isl_aff *isl_basic_set_get_div(__isl_keep isl_basic_set *bset, - int pos) -{ - return isl_basic_map_get_div(bset, pos); -} - -/* Plug in "subs" for dimension "type", "pos" of "bset". - * - * Let i be the dimension to replace and let "subs" be of the form - * - * f/d - * - * Any integer division with a non-zero coefficient for i, - * - * floor((a i + g)/m) - * - * is replaced by - * - * floor((a f + d g)/(m d)) - * - * Constraints of the form - * - * a i + g - * - * are replaced by - * - * a f + d g - */ -__isl_give isl_basic_set *isl_basic_set_substitute( - __isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs) -{ - int i; - isl_int v; - isl_ctx *ctx; - - if (bset && isl_basic_set_plain_is_empty(bset)) - return bset; - - bset = isl_basic_set_cow(bset); - if (!bset || !subs) - goto error; - - ctx = isl_basic_set_get_ctx(bset); - if (!isl_space_is_equal(bset->dim, subs->ls->dim)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", goto error); - if (isl_local_space_dim(subs->ls, isl_dim_div) != 0) - isl_die(ctx, isl_error_unsupported, - "cannot handle divs yet", goto error); - - pos += isl_basic_set_offset(bset, type); - - isl_int_init(v); - - for (i = 0; i < bset->n_eq; ++i) { - if (isl_int_is_zero(bset->eq[i][pos])) - continue; - isl_int_set(v, bset->eq[i][pos]); - isl_int_set_si(bset->eq[i][pos], 0); - isl_seq_combine(bset->eq[i], subs->v->el[0], bset->eq[i], - v, subs->v->el + 1, subs->v->size - 1); - } - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_int_is_zero(bset->ineq[i][pos])) - continue; - isl_int_set(v, bset->ineq[i][pos]); - isl_int_set_si(bset->ineq[i][pos], 0); - isl_seq_combine(bset->ineq[i], subs->v->el[0], bset->ineq[i], - v, subs->v->el + 1, subs->v->size - 1); - } - - for (i = 0; i < bset->n_div; ++i) { - if (isl_int_is_zero(bset->div[i][1 + pos])) - continue; - isl_int_set(v, bset->div[i][1 + pos]); - isl_int_set_si(bset->div[i][1 + pos], 0); - isl_seq_combine(bset->div[i] + 1, - subs->v->el[0], bset->div[i] + 1, - v, subs->v->el + 1, subs->v->size - 1); - isl_int_mul(bset->div[i][0], bset->div[i][0], subs->v->el[0]); - } - - isl_int_clear(v); - - bset = isl_basic_set_simplify(bset); - return isl_basic_set_finalize(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Plug in "subs" for dimension "type", "pos" of "set". - */ -__isl_give isl_set *isl_set_substitute(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs) -{ - int i; - - if (set && isl_set_plain_is_empty(set)) - return set; - - set = isl_set_cow(set); - if (!set || !subs) - goto error; - - for (i = set->n - 1; i >= 0; --i) { - set->p[i] = isl_basic_set_substitute(set->p[i], type, pos, subs); - if (!set->p[i]) - goto error; - if (isl_basic_set_plain_is_empty(set->p[i])) { - isl_basic_set_free(set->p[i]); - if (i != set->n - 1) - set->p[i] = set->p[set->n - 1]; - set->n--; - } - } - - return set; -error: - isl_set_free(set); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_map_no_piplib.c b/cloog-0.17.0/isl/isl_map_no_piplib.c deleted file mode 100644 index 8a28b074de315fe5b73489cfd5009449a4c7bf4f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map_no_piplib.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_map_piplib.h" -#include - -struct isl_map *isl_pip_basic_map_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_map_piplib.c b/cloog-0.17.0/isl/isl_map_piplib.c deleted file mode 100644 index 17181539bdc417b5d41fa04f777ca07ea1d452d3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map_piplib.c +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include "isl_piplib.h" -#include "isl_map_piplib.h" - -static void copy_values_from(isl_int *dst, Entier *src, unsigned n) -{ - int i; - - for (i = 0; i < n; ++i) - entier_assign(dst[i], src[i]); -} - -static void add_value(isl_int *dst, Entier *src) -{ - mpz_add(*dst, *dst, *src); -} - -static void copy_constraint_from(isl_int *dst, PipVector *src, - unsigned nparam, unsigned n_in, unsigned n_out, - unsigned extra, int *pos) -{ - int i; - - copy_values_from(dst, src->the_vector+src->nb_elements-1, 1); - copy_values_from(dst+1, src->the_vector, nparam+n_in); - isl_seq_clr(dst+1+nparam+n_in, n_out); - isl_seq_clr(dst+1+nparam+n_in+n_out, extra); - for (i = 0; i + n_in + nparam < src->nb_elements-1; ++i) { - int p = pos[i]; - add_value(&dst[1+nparam+n_in+n_out+p], - &src->the_vector[n_in+nparam+i]); - } -} - -static int add_inequality(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, PipVector *vec) -{ - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - unsigned n_div = isl_basic_map_n_div(bmap); - int i = isl_basic_map_alloc_inequality(bmap); - if (i < 0) - return -1; - copy_constraint_from(bmap->ineq[i], vec, - nparam, n_in, n_out, n_div, pos); - - return i; -} - -/* For a div d = floor(f/m), add the constraints - * - * f - m d >= 0 - * -(f-(n-1)) + m d >= 0 - * - * Note that the second constraint is the negation of - * - * f - m d >= n - */ -static int add_div_constraints(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, PipNewparm *p, unsigned div) -{ - int i, j; - unsigned total = isl_basic_map_total_dim(bmap); - unsigned div_pos = 1 + total - bmap->n_div + div; - - i = add_inequality(ctx, bmap, pos, p->vector); - if (i < 0) - return -1; - copy_values_from(&bmap->ineq[i][div_pos], &p->deno, 1); - isl_int_neg(bmap->ineq[i][div_pos], bmap->ineq[i][div_pos]); - - j = isl_basic_map_alloc_inequality(bmap); - if (j < 0) - return -1; - isl_seq_neg(bmap->ineq[j], bmap->ineq[i], 1 + total); - isl_int_add(bmap->ineq[j][0], bmap->ineq[j][0], bmap->ineq[j][div_pos]); - isl_int_sub_ui(bmap->ineq[j][0], bmap->ineq[j][0], 1); - return j; -} - -static int add_equality(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, - unsigned var, PipVector *vec) -{ - int i; - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - - isl_assert(ctx, var < n_out, return -1); - - i = isl_basic_map_alloc_equality(bmap); - if (i < 0) - return -1; - copy_constraint_from(bmap->eq[i], vec, - nparam, n_in, n_out, bmap->extra, pos); - isl_int_set_si(bmap->eq[i][1+nparam+n_in+var], -1); - - return i; -} - -static int find_div(struct isl_ctx *ctx, - struct isl_basic_map *bmap, int *pos, PipNewparm *p) -{ - int i, j; - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - - i = isl_basic_map_alloc_div(bmap); - if (i < 0) - return -1; - - copy_constraint_from(bmap->div[i]+1, p->vector, - nparam, n_in, n_out, bmap->extra, pos); - - copy_values_from(bmap->div[i], &p->deno, 1); - for (j = 0; j < i; ++j) - if (isl_seq_eq(bmap->div[i], bmap->div[j], - 1+1+isl_basic_map_total_dim(bmap)+j)) { - isl_basic_map_free_div(bmap, 1); - return j; - } - - if (add_div_constraints(ctx, bmap, pos, p, i) < 0) - return -1; - - return i; -} - -/* Count some properties of a quast - * - maximal number of new parameters - * - maximal depth - * - total number of solutions - * - total number of empty branches - */ -static void quast_count(PipQuast *q, int *maxnew, int depth, int *maxdepth, - int *sol, int *nosol) -{ - PipNewparm *p; - - for (p = q->newparm; p; p = p->next) - if (p->rank > *maxnew) - *maxnew = p->rank; - if (q->condition) { - if (++depth > *maxdepth) - *maxdepth = depth; - quast_count(q->next_else, maxnew, depth, maxdepth, sol, nosol); - quast_count(q->next_then, maxnew, depth, maxdepth, sol, nosol); - } else { - if (q->list) - ++(*sol); - else - ++(*nosol); - } -} - -/* - * pos: array of length bmap->set.extra, mapping each of the existential - * variables PIP proposes to an existential variable in bmap - * bmap: collects the currently active constraints - * rest: collects the empty leaves of the quast (if not NULL) - */ -struct scan_data { - struct isl_ctx *ctx; - struct isl_basic_map *bmap; - struct isl_set **rest; - int *pos; -}; - -/* - * New existentially quantified variables are places after the existing ones. - */ -static struct isl_map *scan_quast_r(struct scan_data *data, PipQuast *q, - struct isl_map *map) -{ - PipNewparm *p; - struct isl_basic_map *bmap = data->bmap; - unsigned old_n_div = bmap->n_div; - unsigned nparam = isl_basic_map_n_param(bmap); - unsigned n_in = isl_basic_map_n_in(bmap); - unsigned n_out = isl_basic_map_n_out(bmap); - - if (!map) - goto error; - - for (p = q->newparm; p; p = p->next) { - int pos; - unsigned pip_param = nparam + n_in; - - pos = find_div(data->ctx, bmap, data->pos, p); - if (pos < 0) - goto error; - data->pos[p->rank - pip_param] = pos; - } - - if (q->condition) { - int pos = add_inequality(data->ctx, bmap, data->pos, - q->condition); - if (pos < 0) - goto error; - map = scan_quast_r(data, q->next_then, map); - - if (isl_inequality_negate(bmap, pos)) - goto error; - map = scan_quast_r(data, q->next_else, map); - - if (isl_basic_map_free_inequality(bmap, 1)) - goto error; - } else if (q->list) { - PipList *l; - int j; - /* if bmap->n_out is zero, we are only interested in the domains - * where a solution exists and not in the actual solution - */ - for (j = 0, l = q->list; j < n_out && l; ++j, l = l->next) - if (add_equality(data->ctx, bmap, data->pos, j, - l->vector) < 0) - goto error; - map = isl_map_add_basic_map(map, isl_basic_map_copy(bmap)); - if (isl_basic_map_free_equality(bmap, n_out)) - goto error; - } else if (data->rest) { - struct isl_basic_set *bset; - bset = isl_basic_set_from_basic_map(isl_basic_map_copy(bmap)); - bset = isl_basic_set_drop_dims(bset, n_in, n_out); - if (!bset) - goto error; - *data->rest = isl_set_add_basic_set(*data->rest, bset); - } - - if (isl_basic_map_free_inequality(bmap, 2*(bmap->n_div - old_n_div))) - goto error; - if (isl_basic_map_free_div(bmap, bmap->n_div - old_n_div)) - goto error; - return map; -error: - isl_map_free(map); - return NULL; -} - -/* - * Returns a map of dimension "keep_dim" with "context" as domain and - * as range the first "isl_space_dim(keep_dim, isl_dim_out)" variables - * in the quast lists. - */ -static struct isl_map *isl_map_from_quast(struct isl_ctx *ctx, PipQuast *q, - isl_space *keep_dim, - struct isl_basic_set *context, - struct isl_set **rest) -{ - int pip_param; - int nexist; - int max_depth; - int n_sol, n_nosol; - struct scan_data data; - struct isl_map *map = NULL; - isl_space *dims; - unsigned nparam; - unsigned dim; - unsigned keep; - - data.ctx = ctx; - data.rest = rest; - data.bmap = NULL; - data.pos = NULL; - - if (!context || !keep_dim) - goto error; - - dim = isl_basic_set_n_dim(context); - nparam = isl_basic_set_n_param(context); - keep = isl_space_dim(keep_dim, isl_dim_out); - pip_param = nparam + dim; - - max_depth = 0; - n_sol = 0; - n_nosol = 0; - nexist = pip_param-1; - quast_count(q, &nexist, 0, &max_depth, &n_sol, &n_nosol); - nexist -= pip_param-1; - - if (rest) { - *rest = isl_set_alloc_space(isl_space_copy(context->dim), n_nosol, - ISL_MAP_DISJOINT); - if (!*rest) - goto error; - } - map = isl_map_alloc_space(isl_space_copy(keep_dim), n_sol, - ISL_MAP_DISJOINT); - if (!map) - goto error; - - dims = isl_space_reverse(isl_space_copy(context->dim)); - data.bmap = isl_basic_map_from_basic_set(context, dims); - data.bmap = isl_basic_map_extend_space(data.bmap, - keep_dim, nexist, keep, max_depth+2*nexist); - if (!data.bmap) - goto error2; - - if (data.bmap->extra) { - int i; - data.pos = isl_alloc_array(ctx, int, data.bmap->extra); - if (!data.pos) - goto error; - for (i = 0; i < data.bmap->n_div; ++i) - data.pos[i] = i; - } - - map = scan_quast_r(&data, q, map); - map = isl_map_finalize(map); - if (!map) - goto error2; - if (rest) { - *rest = isl_set_finalize(*rest); - if (!*rest) - goto error2; - } - isl_basic_map_free(data.bmap); - if (data.pos) - free(data.pos); - return map; -error: - isl_basic_set_free(context); - isl_space_free(keep_dim); -error2: - if (data.pos) - free(data.pos); - isl_basic_map_free(data.bmap); - isl_map_free(map); - if (rest) { - isl_set_free(*rest); - *rest = NULL; - } - return NULL; -} - -static void copy_values_to(Entier *dst, isl_int *src, unsigned n) -{ - int i; - - for (i = 0; i < n; ++i) - entier_assign(dst[i], src[i]); -} - -static void copy_constraint_to(Entier *dst, isl_int *src, - unsigned pip_param, unsigned pip_var, - unsigned extra_front, unsigned extra_back) -{ - copy_values_to(dst+1+extra_front+pip_var+pip_param+extra_back, src, 1); - copy_values_to(dst+1+extra_front+pip_var, src+1, pip_param); - copy_values_to(dst+1+extra_front, src+1+pip_param, pip_var); -} - -PipMatrix *isl_basic_map_to_pip(struct isl_basic_map *bmap, unsigned pip_param, - unsigned extra_front, unsigned extra_back) -{ - int i; - unsigned nrow; - unsigned ncol; - PipMatrix *M; - unsigned off; - unsigned pip_var = isl_basic_map_total_dim(bmap) - pip_param; - - nrow = extra_front + bmap->n_eq + bmap->n_ineq; - ncol = 1 + extra_front + pip_var + pip_param + extra_back + 1; - M = pip_matrix_alloc(nrow, ncol); - if (!M) - return NULL; - - off = extra_front; - for (i = 0; i < bmap->n_eq; ++i) { - entier_set_si(M->p[off+i][0], 0); - copy_constraint_to(M->p[off+i], bmap->eq[i], - pip_param, pip_var, extra_front, extra_back); - } - off += bmap->n_eq; - for (i = 0; i < bmap->n_ineq; ++i) { - entier_set_si(M->p[off+i][0], 1); - copy_constraint_to(M->p[off+i], bmap->ineq[i], - pip_param, pip_var, extra_front, extra_back); - } - return M; -} - -PipMatrix *isl_basic_set_to_pip(struct isl_basic_set *bset, unsigned pip_param, - unsigned extra_front, unsigned extra_back) -{ - return isl_basic_map_to_pip((struct isl_basic_map *)bset, - pip_param, extra_front, extra_back); -} - -struct isl_map *isl_pip_basic_map_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - PipOptions *options; - PipQuast *sol; - struct isl_map *map; - struct isl_ctx *ctx; - PipMatrix *domain = NULL, *context = NULL; - unsigned nparam, n_in, n_out; - - bmap = isl_basic_map_detect_equalities(bmap); - if (!bmap || !dom) - goto error; - - ctx = bmap->ctx; - isl_assert(ctx, isl_basic_map_compatible_domain(bmap, dom), goto error); - nparam = isl_basic_map_n_param(bmap); - n_in = isl_basic_map_n_in(bmap); - n_out = isl_basic_map_n_out(bmap); - - domain = isl_basic_map_to_pip(bmap, nparam + n_in, 0, dom->n_div); - if (!domain) - goto error; - context = isl_basic_map_to_pip((struct isl_basic_map *)dom, 0, 0, 0); - if (!context) - goto error; - - options = pip_options_init(); - options->Simplify = 1; - options->Maximize = max; - options->Urs_unknowns = -1; - options->Urs_parms = -1; - sol = pip_solve(domain, context, -1, options); - - if (sol) { - struct isl_basic_set *copy; - copy = isl_basic_set_copy(dom); - map = isl_map_from_quast(ctx, sol, - isl_space_copy(bmap->dim), copy, empty); - } else { - map = isl_map_empty_like_basic_map(bmap); - if (empty) - *empty = NULL; - } - if (!map) - goto error; - if (map->n == 0 && empty) { - isl_set_free(*empty); - *empty = isl_set_from_basic_set(dom); - } else - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - - pip_quast_free(sol); - pip_options_free(options); - pip_matrix_free(domain); - pip_matrix_free(context); - - return map; -error: - if (domain) - pip_matrix_free(domain); - if (context) - pip_matrix_free(context); - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_map_piplib.h b/cloog-0.17.0/isl/isl_map_piplib.h deleted file mode 100644 index e796e4add7c983462b9c1060c9d8f4df6641f9bb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map_piplib.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAP_PIPLIB_H -#define ISL_MAP_PIPLIB_H - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_map *isl_pip_basic_map_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_map_private.h b/cloog-0.17.0/isl/isl_map_private.h deleted file mode 100644 index f3c6cd291e9e59f463f40001f7da63b7c5ad844b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map_private.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_MAP_PRIVATE_H -#define ISL_MAP_PRIVATE_H - -#define isl_basic_set isl_basic_map -#define isl_set isl_map -#define isl_basic_set_list isl_basic_map_list -#include -#include -#include -#include - -/* A "basic map" is a relation between two sets of variables, - * called the "in" and "out" variables. - * A "basic set" is a basic map with a zero-dimensional - * domain. - * - * It is implemented as a set with two extra fields: - * n_in is the number of in variables - * n_out is the number of out variables - * n_in + n_out should be equal to set.dim - */ -struct isl_basic_map { - int ref; -#define ISL_BASIC_MAP_FINAL (1 << 0) -#define ISL_BASIC_MAP_EMPTY (1 << 1) -#define ISL_BASIC_MAP_NO_IMPLICIT (1 << 2) -#define ISL_BASIC_MAP_NO_REDUNDANT (1 << 3) -#define ISL_BASIC_MAP_RATIONAL (1 << 4) -#define ISL_BASIC_MAP_NORMALIZED (1 << 5) -#define ISL_BASIC_MAP_NORMALIZED_DIVS (1 << 6) -#define ISL_BASIC_MAP_ALL_EQUALITIES (1 << 7) -#define ISL_BASIC_SET_FINAL (1 << 0) -#define ISL_BASIC_SET_EMPTY (1 << 1) -#define ISL_BASIC_SET_NO_IMPLICIT (1 << 2) -#define ISL_BASIC_SET_NO_REDUNDANT (1 << 3) -#define ISL_BASIC_SET_RATIONAL (1 << 4) -#define ISL_BASIC_SET_NORMALIZED (1 << 5) -#define ISL_BASIC_SET_NORMALIZED_DIVS (1 << 6) -#define ISL_BASIC_SET_ALL_EQUALITIES (1 << 7) - unsigned flags; - - struct isl_ctx *ctx; - - isl_space *dim; - unsigned extra; - - unsigned n_eq; - unsigned n_ineq; - - size_t c_size; - isl_int **eq; - isl_int **ineq; - - unsigned n_div; - - isl_int **div; - - struct isl_vec *sample; - - struct isl_blk block; - struct isl_blk block2; -}; - -/* A "map" is a (possibly disjoint) union of basic maps. - * A "set" is a (possibly disjoint) union of basic sets. - * - * Currently, the isl_set structure is identical to the isl_map structure - * and the library depends on this correspondence internally. - * However, users should not depend on this correspondence. - */ -struct isl_map { - int ref; -#define ISL_MAP_DISJOINT (1 << 0) -#define ISL_MAP_NORMALIZED (1 << 1) -#define ISL_SET_DISJOINT (1 << 0) -#define ISL_SET_NORMALIZED (1 << 1) - unsigned flags; - - struct isl_ctx *ctx; - - isl_space *dim; - - int n; - - size_t size; - struct isl_basic_map *p[1]; -}; - -__isl_give isl_map *isl_map_realign(__isl_take isl_map *map, - __isl_take isl_reordering *r); -__isl_give isl_set *isl_set_realign(__isl_take isl_set *set, - __isl_take isl_reordering *r); - -__isl_give isl_map *isl_map_reset(__isl_take isl_map *map, - enum isl_dim_type type); - -__isl_give isl_basic_set *isl_basic_set_reset_space( - __isl_take isl_basic_set *bset, __isl_take isl_space *dim); -__isl_give isl_basic_map *isl_basic_map_reset_space( - __isl_take isl_basic_map *bmap, __isl_take isl_space *dim); -__isl_give isl_map *isl_map_reset_space(__isl_take isl_map *map, - __isl_take isl_space *dim); - -unsigned isl_basic_map_offset(struct isl_basic_map *bmap, - enum isl_dim_type type); -unsigned isl_basic_set_offset(struct isl_basic_set *bset, - enum isl_dim_type type); - -int isl_basic_map_may_be_set(__isl_keep isl_basic_map *bmap); -int isl_map_may_be_set(__isl_keep isl_map *map); -int isl_map_compatible_domain(struct isl_map *map, struct isl_set *set); -int isl_basic_map_compatible_domain(struct isl_basic_map *bmap, - struct isl_basic_set *bset); -int isl_basic_map_compatible_range(struct isl_basic_map *bmap, - struct isl_basic_set *bset); - -struct isl_basic_map *isl_basic_map_extend_space(struct isl_basic_map *base, - __isl_take isl_space *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_extend_space(struct isl_basic_set *base, - __isl_take isl_space *dim, unsigned extra, - unsigned n_eq, unsigned n_ineq); -struct isl_basic_set *isl_basic_set_add_constraints(struct isl_basic_set *bset1, - struct isl_basic_set *bset2, unsigned pos); - -struct isl_map *isl_map_grow(struct isl_map *map, int n); -struct isl_set *isl_set_grow(struct isl_set *set, int n); - -int isl_basic_set_contains(struct isl_basic_set *bset, struct isl_vec *vec); -int isl_basic_map_contains(struct isl_basic_map *bmap, struct isl_vec *vec); - -__isl_give isl_basic_set *isl_basic_set_alloc_space(__isl_take isl_space *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq); -__isl_give isl_set *isl_set_alloc_space(__isl_take isl_space *dim, int n, - unsigned flags); -__isl_give isl_basic_map *isl_basic_map_alloc_space(__isl_take isl_space *dim, - unsigned extra, unsigned n_eq, unsigned n_ineq); -__isl_give isl_map *isl_map_alloc_space(__isl_take isl_space *dim, int n, - unsigned flags); - -unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap); - -int isl_basic_map_alloc_equality(struct isl_basic_map *bmap); -int isl_basic_set_alloc_equality(struct isl_basic_set *bset); -int isl_basic_set_free_inequality(struct isl_basic_set *bset, unsigned n); -int isl_basic_map_free_equality(struct isl_basic_map *bmap, unsigned n); -int isl_basic_set_free_equality(struct isl_basic_set *bset, unsigned n); -int isl_basic_set_alloc_inequality(struct isl_basic_set *bset); -int isl_basic_map_alloc_inequality(struct isl_basic_map *bmap); -int isl_basic_map_free_inequality(struct isl_basic_map *bmap, unsigned n); -int isl_basic_map_alloc_div(struct isl_basic_map *bmap); -int isl_basic_set_alloc_div(struct isl_basic_set *bset); -int isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n); -int isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n); -void isl_basic_map_inequality_to_equality( - struct isl_basic_map *bmap, unsigned pos); -int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos); -int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos); -int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos); -int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos); -__isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset, - isl_int *eq); -__isl_give isl_basic_map *isl_basic_map_add_eq(__isl_take isl_basic_map *bmap, - isl_int *eq); -__isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset, - isl_int *ineq); -__isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap, - isl_int *ineq); - -int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos); - -struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset); -struct isl_basic_map *isl_basic_map_cow(struct isl_basic_map *bmap); -struct isl_set *isl_set_cow(struct isl_set *set); -struct isl_map *isl_map_cow(struct isl_map *map); - -struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset); -struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset); -void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b); -struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap); -__isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map); -struct isl_basic_map *isl_basic_map_align_divs( - struct isl_basic_map *dst, struct isl_basic_map *src); -struct isl_basic_set *isl_basic_set_align_divs( - struct isl_basic_set *dst, struct isl_basic_set *src); -struct isl_basic_map *isl_basic_map_gauss( - struct isl_basic_map *bmap, int *progress); -struct isl_basic_set *isl_basic_set_gauss( - struct isl_basic_set *bset, int *progress); -__isl_give isl_basic_set *isl_basic_set_sort_constraints( - __isl_take isl_basic_set *bset); -int isl_basic_map_plain_cmp(const __isl_keep isl_basic_map *bmap1, - const __isl_keep isl_basic_map *bmap2); -int isl_set_plain_cmp(const __isl_keep isl_set *set1, - const __isl_keep isl_set *set2); -int isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2); -int isl_basic_map_plain_is_equal(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2); -struct isl_basic_map *isl_basic_map_normalize_constraints( - struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_normalize_constraints( - struct isl_basic_set *bset); -struct isl_basic_map *isl_basic_map_implicit_equalities( - struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_map_underlying_set(struct isl_basic_map *bmap); -__isl_give isl_basic_set *isl_basic_set_underlying_set( - __isl_take isl_basic_set *bset); -struct isl_set *isl_map_underlying_set(struct isl_map *map); -struct isl_basic_map *isl_basic_map_overlying_set(struct isl_basic_set *bset, - struct isl_basic_map *like); -__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving( - __isl_take isl_basic_set *bset, unsigned first, unsigned n); -__isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_map *isl_basic_map_drop(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_set *isl_set_drop(struct isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); -struct isl_basic_set *isl_basic_set_drop_dims( - struct isl_basic_set *bset, unsigned first, unsigned n); -struct isl_set *isl_set_drop_dims( - struct isl_set *set, unsigned first, unsigned n); -struct isl_map *isl_map_drop_inputs( - struct isl_map *map, unsigned first, unsigned n); -struct isl_map *isl_map_drop(struct isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); - -struct isl_map *isl_map_remove_empty_parts(struct isl_map *map); -struct isl_set *isl_set_remove_empty_parts(struct isl_set *set); - -struct isl_set *isl_set_normalize(struct isl_set *set); - -struct isl_set *isl_set_drop_vars( - struct isl_set *set, unsigned first, unsigned n); - -struct isl_basic_map *isl_basic_map_eliminate_vars( - struct isl_basic_map *bmap, unsigned pos, unsigned n); -struct isl_basic_set *isl_basic_set_eliminate_vars( - struct isl_basic_set *bset, unsigned pos, unsigned n); - -__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n); - -int isl_basic_set_constraint_is_redundant(struct isl_basic_set **bset, - isl_int *c, isl_int *opt_n, isl_int *opt_d); - -int isl_basic_map_add_div_constraints(struct isl_basic_map *bmap, unsigned div); -struct isl_basic_map *isl_basic_map_drop_redundant_divs( - struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_drop_redundant_divs( - struct isl_basic_set *bset); - -struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset); -struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset); - -struct isl_basic_set *isl_basic_set_set_rational(struct isl_basic_set *bset); -__isl_give isl_basic_map *isl_basic_map_set_rational( - __isl_take isl_basic_map *bmap); -__isl_give isl_map *isl_map_set_rational(__isl_take isl_map *map); - -struct isl_mat; - -struct isl_basic_set *isl_basic_set_preimage(struct isl_basic_set *bset, - struct isl_mat *mat); -struct isl_set *isl_set_preimage(struct isl_set *set, struct isl_mat *mat); - -__isl_give isl_basic_set *isl_basic_set_transform_dims( - __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, - __isl_take isl_mat *trans); - -isl_int *isl_set_wrap_facet(__isl_keep isl_set *set, - isl_int *facet, isl_int *ridge); - -int isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap, - __isl_keep isl_point *point); -int isl_set_contains_point(__isl_keep isl_set *set, __isl_keep isl_point *point); - -int isl_basic_set_vars_get_sign(__isl_keep isl_basic_set *bset, - unsigned first, unsigned n, int *signs); -int isl_set_foreach_orthant(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_set *orthant, int *signs, void *user), - void *user); - -int isl_basic_map_add_div_constraints_var(__isl_keep isl_basic_map *bmap, - unsigned pos, isl_int *div); -int isl_basic_set_add_div_constraints_var(__isl_keep isl_basic_set *bset, - unsigned pos, isl_int *div); -int isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap, - isl_int *constraint, unsigned div); - -__isl_give isl_basic_set *isl_basic_set_from_local_space( - __isl_take isl_local_space *ls); -__isl_give isl_basic_map *isl_basic_map_from_local_space( - __isl_take isl_local_space *ls); -__isl_give isl_basic_set *isl_basic_set_expand_divs( - __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp); - -int isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap); - -__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, - __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap)); - -__isl_give isl_map *isl_map_align_params_map_map_and( - __isl_take isl_map *map1, __isl_take isl_map *map2, - __isl_give isl_map *(*fn)(__isl_take isl_map *map1, - __isl_take isl_map *map2)); -int isl_map_align_params_map_map_and_test(__isl_keep isl_map *map1, - __isl_keep isl_map *map2, - int (*fn)(__isl_keep isl_map *map1, __isl_keep isl_map *map2)); - -int isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user); -int isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set *bset, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user); - -__isl_give isl_set *isl_set_substitute(__isl_take isl_set *set, - enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs); - -__isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *context); - -int isl_map_compatible_range(__isl_keep isl_map *map, __isl_keep isl_set *set); - -#endif diff --git a/cloog-0.17.0/isl/isl_map_simplify.c b/cloog-0.17.0/isl/isl_map_simplify.c deleted file mode 100644 index e5687333b9624607acf357ac46a9c227bed0d2c1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map_simplify.c +++ /dev/null @@ -1,2569 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_equalities.h" -#include -#include -#include "isl_tab.h" -#include -#include - -static void swap_equality(struct isl_basic_map *bmap, int a, int b) -{ - isl_int *t = bmap->eq[a]; - bmap->eq[a] = bmap->eq[b]; - bmap->eq[b] = t; -} - -static void swap_inequality(struct isl_basic_map *bmap, int a, int b) -{ - if (a != b) { - isl_int *t = bmap->ineq[a]; - bmap->ineq[a] = bmap->ineq[b]; - bmap->ineq[b] = t; - } -} - -static void constraint_drop_vars(isl_int *c, unsigned n, unsigned rem) -{ - isl_seq_cpy(c, c + n, rem); - isl_seq_clr(c + rem, n); -} - -/* Drop n dimensions starting at first. - * - * In principle, this frees up some extra variables as the number - * of columns remains constant, but we would have to extend - * the div array too as the number of rows in this array is assumed - * to be equal to extra. - */ -struct isl_basic_set *isl_basic_set_drop_dims( - struct isl_basic_set *bset, unsigned first, unsigned n) -{ - int i; - - if (!bset) - goto error; - - isl_assert(bset->ctx, first + n <= bset->dim->n_out, goto error); - - if (n == 0 && !isl_space_get_tuple_name(bset->dim, isl_dim_set)) - return bset; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - for (i = 0; i < bset->n_eq; ++i) - constraint_drop_vars(bset->eq[i]+1+bset->dim->nparam+first, n, - (bset->dim->n_out-first-n)+bset->extra); - - for (i = 0; i < bset->n_ineq; ++i) - constraint_drop_vars(bset->ineq[i]+1+bset->dim->nparam+first, n, - (bset->dim->n_out-first-n)+bset->extra); - - for (i = 0; i < bset->n_div; ++i) - constraint_drop_vars(bset->div[i]+1+1+bset->dim->nparam+first, n, - (bset->dim->n_out-first-n)+bset->extra); - - bset->dim = isl_space_drop_outputs(bset->dim, first, n); - if (!bset->dim) - goto error; - - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED); - bset = isl_basic_set_simplify(bset); - return isl_basic_set_finalize(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_set *isl_set_drop_dims( - struct isl_set *set, unsigned first, unsigned n) -{ - int i; - - if (!set) - goto error; - - isl_assert(set->ctx, first + n <= set->dim->n_out, goto error); - - if (n == 0 && !isl_space_get_tuple_name(set->dim, isl_dim_set)) - return set; - set = isl_set_cow(set); - if (!set) - goto error; - set->dim = isl_space_drop_outputs(set->dim, first, n); - if (!set->dim) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_drop_dims(set->p[i], first, n); - if (!set->p[i]) - goto error; - } - - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_set_free(set); - return NULL; -} - -/* Move "n" divs starting at "first" to the end of the list of divs. - */ -static struct isl_basic_map *move_divs_last(struct isl_basic_map *bmap, - unsigned first, unsigned n) -{ - isl_int **div; - int i; - - if (first + n == bmap->n_div) - return bmap; - - div = isl_alloc_array(bmap->ctx, isl_int *, n); - if (!div) - goto error; - for (i = 0; i < n; ++i) - div[i] = bmap->div[first + i]; - for (i = 0; i < bmap->n_div - first - n; ++i) - bmap->div[first + i] = bmap->div[first + n + i]; - for (i = 0; i < n; ++i) - bmap->div[bmap->n_div - n + i] = div[i]; - free(div); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Drop "n" dimensions of type "type" starting at "first". - * - * In principle, this frees up some extra variables as the number - * of columns remains constant, but we would have to extend - * the div array too as the number of rows in this array is assumed - * to be equal to extra. - */ -struct isl_basic_map *isl_basic_map_drop(struct isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - unsigned dim; - unsigned offset; - unsigned left; - - if (!bmap) - goto error; - - dim = isl_basic_map_dim(bmap, type); - isl_assert(bmap->ctx, first + n <= dim, goto error); - - if (n == 0 && !isl_space_is_named_or_nested(bmap->dim, type)) - return bmap; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - - offset = isl_basic_map_offset(bmap, type) + first; - left = isl_basic_map_total_dim(bmap) - (offset - 1) - n; - for (i = 0; i < bmap->n_eq; ++i) - constraint_drop_vars(bmap->eq[i]+offset, n, left); - - for (i = 0; i < bmap->n_ineq; ++i) - constraint_drop_vars(bmap->ineq[i]+offset, n, left); - - for (i = 0; i < bmap->n_div; ++i) - constraint_drop_vars(bmap->div[i]+1+offset, n, left); - - if (type == isl_dim_div) { - bmap = move_divs_last(bmap, first, n); - if (!bmap) - goto error; - isl_basic_map_free_div(bmap, n); - } else - bmap->dim = isl_space_drop_dims(bmap->dim, type, first, n); - if (!bmap->dim) - goto error; - - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - bmap = isl_basic_map_simplify(bmap); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_set *isl_basic_set_drop(__isl_take isl_basic_set *bset, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_basic_set *)isl_basic_map_drop((isl_basic_map *)bset, - type, first, n); -} - -struct isl_basic_map *isl_basic_map_drop_inputs( - struct isl_basic_map *bmap, unsigned first, unsigned n) -{ - return isl_basic_map_drop(bmap, isl_dim_in, first, n); -} - -struct isl_map *isl_map_drop(struct isl_map *map, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!map) - goto error; - - isl_assert(map->ctx, first + n <= isl_map_dim(map, type), goto error); - - if (n == 0 && !isl_space_get_tuple_name(map->dim, type)) - return map; - map = isl_map_cow(map); - if (!map) - goto error; - map->dim = isl_space_drop_dims(map->dim, type, first, n); - if (!map->dim) - goto error; - - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_drop(map->p[i], type, first, n); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop(struct isl_set *set, - enum isl_dim_type type, unsigned first, unsigned n) -{ - return (isl_set *)isl_map_drop((isl_map *)set, type, first, n); -} - -struct isl_map *isl_map_drop_inputs( - struct isl_map *map, unsigned first, unsigned n) -{ - return isl_map_drop(map, isl_dim_in, first, n); -} - -/* - * We don't cow, as the div is assumed to be redundant. - */ -static struct isl_basic_map *isl_basic_map_drop_div( - struct isl_basic_map *bmap, unsigned div) -{ - int i; - unsigned pos; - - if (!bmap) - goto error; - - pos = 1 + isl_space_dim(bmap->dim, isl_dim_all) + div; - - isl_assert(bmap->ctx, div < bmap->n_div, goto error); - - for (i = 0; i < bmap->n_eq; ++i) - constraint_drop_vars(bmap->eq[i]+pos, 1, bmap->extra-div-1); - - for (i = 0; i < bmap->n_ineq; ++i) { - if (!isl_int_is_zero(bmap->ineq[i][pos])) { - isl_basic_map_drop_inequality(bmap, i); - --i; - continue; - } - constraint_drop_vars(bmap->ineq[i]+pos, 1, bmap->extra-div-1); - } - - for (i = 0; i < bmap->n_div; ++i) - constraint_drop_vars(bmap->div[i]+1+pos, 1, bmap->extra-div-1); - - if (div != bmap->n_div - 1) { - int j; - isl_int *t = bmap->div[div]; - - for (j = div; j < bmap->n_div - 1; ++j) - bmap->div[j] = bmap->div[j+1]; - - bmap->div[bmap->n_div - 1] = t; - } - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - isl_basic_map_free_div(bmap, 1); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_map *isl_basic_map_normalize_constraints( - struct isl_basic_map *bmap) -{ - int i; - isl_int gcd; - unsigned total = isl_basic_map_total_dim(bmap); - - if (!bmap) - return NULL; - - isl_int_init(gcd); - for (i = bmap->n_eq - 1; i >= 0; --i) { - isl_seq_gcd(bmap->eq[i]+1, total, &gcd); - if (isl_int_is_zero(gcd)) { - if (!isl_int_is_zero(bmap->eq[i][0])) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_basic_map_drop_equality(bmap, i); - continue; - } - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - isl_int_gcd(gcd, gcd, bmap->eq[i][0]); - if (isl_int_is_one(gcd)) - continue; - if (!isl_int_is_divisible_by(bmap->eq[i][0], gcd)) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_seq_scale_down(bmap->eq[i], bmap->eq[i], gcd, 1+total); - } - - for (i = bmap->n_ineq - 1; i >= 0; --i) { - isl_seq_gcd(bmap->ineq[i]+1, total, &gcd); - if (isl_int_is_zero(gcd)) { - if (isl_int_is_neg(bmap->ineq[i][0])) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_basic_map_drop_inequality(bmap, i); - continue; - } - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - isl_int_gcd(gcd, gcd, bmap->ineq[i][0]); - if (isl_int_is_one(gcd)) - continue; - isl_int_fdiv_q(bmap->ineq[i][0], bmap->ineq[i][0], gcd); - isl_seq_scale_down(bmap->ineq[i]+1, bmap->ineq[i]+1, gcd, total); - } - isl_int_clear(gcd); - - return bmap; -} - -struct isl_basic_set *isl_basic_set_normalize_constraints( - struct isl_basic_set *bset) -{ - return (struct isl_basic_set *)isl_basic_map_normalize_constraints( - (struct isl_basic_map *)bset); -} - -/* Assumes divs have been ordered if keep_divs is set. - */ -static void eliminate_var_using_equality(struct isl_basic_map *bmap, - unsigned pos, isl_int *eq, int keep_divs, int *progress) -{ - unsigned total; - unsigned space_total; - int k; - int last_div; - - total = isl_basic_map_total_dim(bmap); - space_total = isl_space_dim(bmap->dim, isl_dim_all); - last_div = isl_seq_last_non_zero(eq + 1 + space_total, bmap->n_div); - for (k = 0; k < bmap->n_eq; ++k) { - if (bmap->eq[k] == eq) - continue; - if (isl_int_is_zero(bmap->eq[k][1+pos])) - continue; - if (progress) - *progress = 1; - isl_seq_elim(bmap->eq[k], eq, 1+pos, 1+total, NULL); - isl_seq_normalize(bmap->ctx, bmap->eq[k], 1 + total); - } - - for (k = 0; k < bmap->n_ineq; ++k) { - if (isl_int_is_zero(bmap->ineq[k][1+pos])) - continue; - if (progress) - *progress = 1; - isl_seq_elim(bmap->ineq[k], eq, 1+pos, 1+total, NULL); - isl_seq_normalize(bmap->ctx, bmap->ineq[k], 1 + total); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } - - for (k = 0; k < bmap->n_div; ++k) { - if (isl_int_is_zero(bmap->div[k][0])) - continue; - if (isl_int_is_zero(bmap->div[k][1+1+pos])) - continue; - if (progress) - *progress = 1; - /* We need to be careful about circular definitions, - * so for now we just remove the definition of div k - * if the equality contains any divs. - * If keep_divs is set, then the divs have been ordered - * and we can keep the definition as long as the result - * is still ordered. - */ - if (last_div == -1 || (keep_divs && last_div < k)) - isl_seq_elim(bmap->div[k]+1, eq, - 1+pos, 1+total, &bmap->div[k][0]); - else - isl_seq_clr(bmap->div[k], 1 + total); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } -} - -/* Assumes divs have been ordered if keep_divs is set. - */ -static void eliminate_div(struct isl_basic_map *bmap, isl_int *eq, - unsigned div, int keep_divs) -{ - unsigned pos = isl_space_dim(bmap->dim, isl_dim_all) + div; - - eliminate_var_using_equality(bmap, pos, eq, keep_divs, NULL); - - isl_basic_map_drop_div(bmap, div); -} - -/* Check if elimination of div "div" using equality "eq" would not - * result in a div depending on a later div. - */ -static int ok_to_eliminate_div(struct isl_basic_map *bmap, isl_int *eq, - unsigned div) -{ - int k; - int last_div; - unsigned space_total = isl_space_dim(bmap->dim, isl_dim_all); - unsigned pos = space_total + div; - - last_div = isl_seq_last_non_zero(eq + 1 + space_total, bmap->n_div); - if (last_div < 0 || last_div <= div) - return 1; - - for (k = 0; k <= last_div; ++k) { - if (isl_int_is_zero(bmap->div[k][0])) - return 1; - if (!isl_int_is_zero(bmap->div[k][1 + 1 + pos])) - return 0; - } - - return 1; -} - -/* Elimininate divs based on equalities - */ -static struct isl_basic_map *eliminate_divs_eq( - struct isl_basic_map *bmap, int *progress) -{ - int d; - int i; - int modified = 0; - unsigned off; - - bmap = isl_basic_map_order_divs(bmap); - - if (!bmap) - return NULL; - - off = 1 + isl_space_dim(bmap->dim, isl_dim_all); - - for (d = bmap->n_div - 1; d >= 0 ; --d) { - for (i = 0; i < bmap->n_eq; ++i) { - if (!isl_int_is_one(bmap->eq[i][off + d]) && - !isl_int_is_negone(bmap->eq[i][off + d])) - continue; - if (!ok_to_eliminate_div(bmap, bmap->eq[i], d)) - continue; - modified = 1; - *progress = 1; - eliminate_div(bmap, bmap->eq[i], d, 1); - isl_basic_map_drop_equality(bmap, i); - break; - } - } - if (modified) - return eliminate_divs_eq(bmap, progress); - return bmap; -} - -/* Elimininate divs based on inequalities - */ -static struct isl_basic_map *eliminate_divs_ineq( - struct isl_basic_map *bmap, int *progress) -{ - int d; - int i; - unsigned off; - struct isl_ctx *ctx; - - if (!bmap) - return NULL; - - ctx = bmap->ctx; - off = 1 + isl_space_dim(bmap->dim, isl_dim_all); - - for (d = bmap->n_div - 1; d >= 0 ; --d) { - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][off + d])) - break; - if (i < bmap->n_eq) - continue; - for (i = 0; i < bmap->n_ineq; ++i) - if (isl_int_abs_gt(bmap->ineq[i][off + d], ctx->one)) - break; - if (i < bmap->n_ineq) - continue; - *progress = 1; - bmap = isl_basic_map_eliminate_vars(bmap, (off-1)+d, 1); - if (!bmap || ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - break; - bmap = isl_basic_map_drop_div(bmap, d); - if (!bmap) - break; - } - return bmap; -} - -struct isl_basic_map *isl_basic_map_gauss( - struct isl_basic_map *bmap, int *progress) -{ - int k; - int done; - int last_var; - unsigned total_var; - unsigned total; - - bmap = isl_basic_map_order_divs(bmap); - - if (!bmap) - return NULL; - - total = isl_basic_map_total_dim(bmap); - total_var = total - bmap->n_div; - - last_var = total - 1; - for (done = 0; done < bmap->n_eq; ++done) { - for (; last_var >= 0; --last_var) { - for (k = done; k < bmap->n_eq; ++k) - if (!isl_int_is_zero(bmap->eq[k][1+last_var])) - break; - if (k < bmap->n_eq) - break; - } - if (last_var < 0) - break; - if (k != done) - swap_equality(bmap, k, done); - if (isl_int_is_neg(bmap->eq[done][1+last_var])) - isl_seq_neg(bmap->eq[done], bmap->eq[done], 1+total); - - eliminate_var_using_equality(bmap, last_var, bmap->eq[done], 1, - progress); - - if (last_var >= total_var && - isl_int_is_zero(bmap->div[last_var - total_var][0])) { - unsigned div = last_var - total_var; - isl_seq_neg(bmap->div[div]+1, bmap->eq[done], 1+total); - isl_int_set_si(bmap->div[div][1+1+last_var], 0); - isl_int_set(bmap->div[div][0], - bmap->eq[done][1+last_var]); - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - } - } - if (done == bmap->n_eq) - return bmap; - for (k = done; k < bmap->n_eq; ++k) { - if (isl_int_is_zero(bmap->eq[k][0])) - continue; - return isl_basic_map_set_to_empty(bmap); - } - isl_basic_map_free_equality(bmap, bmap->n_eq-done); - return bmap; -} - -struct isl_basic_set *isl_basic_set_gauss( - struct isl_basic_set *bset, int *progress) -{ - return (struct isl_basic_set*)isl_basic_map_gauss( - (struct isl_basic_map *)bset, progress); -} - - -static unsigned int round_up(unsigned int v) -{ - int old_v = v; - - while (v) { - old_v = v; - v ^= v & -v; - } - return old_v << 1; -} - -static int hash_index(isl_int ***index, unsigned int size, int bits, - struct isl_basic_map *bmap, int k) -{ - int h; - unsigned total = isl_basic_map_total_dim(bmap); - uint32_t hash = isl_seq_get_hash_bits(bmap->ineq[k]+1, total, bits); - for (h = hash; index[h]; h = (h+1) % size) - if (&bmap->ineq[k] != index[h] && - isl_seq_eq(bmap->ineq[k]+1, index[h][0]+1, total)) - break; - return h; -} - -static int set_hash_index(isl_int ***index, unsigned int size, int bits, - struct isl_basic_set *bset, int k) -{ - return hash_index(index, size, bits, (struct isl_basic_map *)bset, k); -} - -/* If we can eliminate more than one div, then we need to make - * sure we do it from last div to first div, in order not to - * change the position of the other divs that still need to - * be removed. - */ -static struct isl_basic_map *remove_duplicate_divs( - struct isl_basic_map *bmap, int *progress) -{ - unsigned int size; - int *index; - int *elim_for; - int k, l, h; - int bits; - struct isl_blk eq; - unsigned total_var; - unsigned total; - struct isl_ctx *ctx; - - if (!bmap || bmap->n_div <= 1) - return bmap; - - total_var = isl_space_dim(bmap->dim, isl_dim_all); - total = total_var + bmap->n_div; - - ctx = bmap->ctx; - for (k = bmap->n_div - 1; k >= 0; --k) - if (!isl_int_is_zero(bmap->div[k][0])) - break; - if (k <= 0) - return bmap; - - elim_for = isl_calloc_array(ctx, int, bmap->n_div); - size = round_up(4 * bmap->n_div / 3 - 1); - bits = ffs(size) - 1; - index = isl_calloc_array(ctx, int, size); - if (!index) - return bmap; - eq = isl_blk_alloc(ctx, 1+total); - if (isl_blk_is_error(eq)) - goto out; - - isl_seq_clr(eq.data, 1+total); - index[isl_seq_get_hash_bits(bmap->div[k], 2+total, bits)] = k + 1; - for (--k; k >= 0; --k) { - uint32_t hash; - - if (isl_int_is_zero(bmap->div[k][0])) - continue; - - hash = isl_seq_get_hash_bits(bmap->div[k], 2+total, bits); - for (h = hash; index[h]; h = (h+1) % size) - if (isl_seq_eq(bmap->div[k], - bmap->div[index[h]-1], 2+total)) - break; - if (index[h]) { - *progress = 1; - l = index[h] - 1; - elim_for[l] = k + 1; - } - index[h] = k+1; - } - for (l = bmap->n_div - 1; l >= 0; --l) { - if (!elim_for[l]) - continue; - k = elim_for[l] - 1; - isl_int_set_si(eq.data[1+total_var+k], -1); - isl_int_set_si(eq.data[1+total_var+l], 1); - eliminate_div(bmap, eq.data, l, 0); - isl_int_set_si(eq.data[1+total_var+k], 0); - isl_int_set_si(eq.data[1+total_var+l], 0); - } - - isl_blk_free(ctx, eq); -out: - free(index); - free(elim_for); - return bmap; -} - -static int n_pure_div_eq(struct isl_basic_map *bmap) -{ - int i, j; - unsigned total; - - total = isl_space_dim(bmap->dim, isl_dim_all); - for (i = 0, j = bmap->n_div-1; i < bmap->n_eq; ++i) { - while (j >= 0 && isl_int_is_zero(bmap->eq[i][1 + total + j])) - --j; - if (j < 0) - break; - if (isl_seq_first_non_zero(bmap->eq[i] + 1 + total, j) != -1) - return 0; - } - return i; -} - -/* Normalize divs that appear in equalities. - * - * In particular, we assume that bmap contains some equalities - * of the form - * - * a x = m * e_i - * - * and we want to replace the set of e_i by a minimal set and - * such that the new e_i have a canonical representation in terms - * of the vector x. - * If any of the equalities involves more than one divs, then - * we currently simply bail out. - * - * Let us first additionally assume that all equalities involve - * a div. The equalities then express modulo constraints on the - * remaining variables and we can use "parameter compression" - * to find a minimal set of constraints. The result is a transformation - * - * x = T(x') = x_0 + G x' - * - * with G a lower-triangular matrix with all elements below the diagonal - * non-negative and smaller than the diagonal element on the same row. - * We first normalize x_0 by making the same property hold in the affine - * T matrix. - * The rows i of G with a 1 on the diagonal do not impose any modulo - * constraint and simply express x_i = x'_i. - * For each of the remaining rows i, we introduce a div and a corresponding - * equality. In particular - * - * g_ii e_j = x_i - g_i(x') - * - * where each x'_k is replaced either by x_k (if g_kk = 1) or the - * corresponding div (if g_kk != 1). - * - * If there are any equalities not involving any div, then we - * first apply a variable compression on the variables x: - * - * x = C x'' x'' = C_2 x - * - * and perform the above parameter compression on A C instead of on A. - * The resulting compression is then of the form - * - * x'' = T(x') = x_0 + G x' - * - * and in constructing the new divs and the corresponding equalities, - * we have to replace each x'', i.e., the x'_k with (g_kk = 1), - * by the corresponding row from C_2. - */ -static struct isl_basic_map *normalize_divs( - struct isl_basic_map *bmap, int *progress) -{ - int i, j, k; - int total; - int div_eq; - struct isl_mat *B; - struct isl_vec *d; - struct isl_mat *T = NULL; - struct isl_mat *C = NULL; - struct isl_mat *C2 = NULL; - isl_int v; - int *pos; - int dropped, needed; - - if (!bmap) - return NULL; - - if (bmap->n_div == 0) - return bmap; - - if (bmap->n_eq == 0) - return bmap; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS)) - return bmap; - - total = isl_space_dim(bmap->dim, isl_dim_all); - div_eq = n_pure_div_eq(bmap); - if (div_eq == 0) - return bmap; - - if (div_eq < bmap->n_eq) { - B = isl_mat_sub_alloc6(bmap->ctx, bmap->eq, div_eq, - bmap->n_eq - div_eq, 0, 1 + total); - C = isl_mat_variable_compression(B, &C2); - if (!C || !C2) - goto error; - if (C->n_col == 0) { - bmap = isl_basic_map_set_to_empty(bmap); - isl_mat_free(C); - isl_mat_free(C2); - goto done; - } - } - - d = isl_vec_alloc(bmap->ctx, div_eq); - if (!d) - goto error; - for (i = 0, j = bmap->n_div-1; i < div_eq; ++i) { - while (j >= 0 && isl_int_is_zero(bmap->eq[i][1 + total + j])) - --j; - isl_int_set(d->block.data[i], bmap->eq[i][1 + total + j]); - } - B = isl_mat_sub_alloc6(bmap->ctx, bmap->eq, 0, div_eq, 0, 1 + total); - - if (C) { - B = isl_mat_product(B, C); - C = NULL; - } - - T = isl_mat_parameter_compression(B, d); - if (!T) - goto error; - if (T->n_col == 0) { - bmap = isl_basic_map_set_to_empty(bmap); - isl_mat_free(C2); - isl_mat_free(T); - goto done; - } - isl_int_init(v); - for (i = 0; i < T->n_row - 1; ++i) { - isl_int_fdiv_q(v, T->row[1 + i][0], T->row[1 + i][1 + i]); - if (isl_int_is_zero(v)) - continue; - isl_mat_col_submul(T, 0, v, 1 + i); - } - isl_int_clear(v); - pos = isl_alloc_array(bmap->ctx, int, T->n_row); - if (!pos) - goto error; - /* We have to be careful because dropping equalities may reorder them */ - dropped = 0; - for (j = bmap->n_div - 1; j >= 0; --j) { - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][1 + total + j])) - break; - if (i < bmap->n_eq) { - bmap = isl_basic_map_drop_div(bmap, j); - isl_basic_map_drop_equality(bmap, i); - ++dropped; - } - } - pos[0] = 0; - needed = 0; - for (i = 1; i < T->n_row; ++i) { - if (isl_int_is_one(T->row[i][i])) - pos[i] = i; - else - needed++; - } - if (needed > dropped) { - bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim), - needed, needed, 0); - if (!bmap) - goto error; - } - for (i = 1; i < T->n_row; ++i) { - if (isl_int_is_one(T->row[i][i])) - continue; - k = isl_basic_map_alloc_div(bmap); - pos[i] = 1 + total + k; - isl_seq_clr(bmap->div[k] + 1, 1 + total + bmap->n_div); - isl_int_set(bmap->div[k][0], T->row[i][i]); - if (C2) - isl_seq_cpy(bmap->div[k] + 1, C2->row[i], 1 + total); - else - isl_int_set_si(bmap->div[k][1 + i], 1); - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(T->row[i][j])) - continue; - if (pos[j] < T->n_row && C2) - isl_seq_submul(bmap->div[k] + 1, T->row[i][j], - C2->row[pos[j]], 1 + total); - else - isl_int_neg(bmap->div[k][1 + pos[j]], - T->row[i][j]); - } - j = isl_basic_map_alloc_equality(bmap); - isl_seq_neg(bmap->eq[j], bmap->div[k]+1, 1+total+bmap->n_div); - isl_int_set(bmap->eq[j][pos[i]], bmap->div[k][0]); - } - free(pos); - isl_mat_free(C2); - isl_mat_free(T); - - if (progress) - *progress = 1; -done: - ISL_F_SET(bmap, ISL_BASIC_MAP_NORMALIZED_DIVS); - - return bmap; -error: - isl_mat_free(C); - isl_mat_free(C2); - isl_mat_free(T); - return bmap; -} - -static struct isl_basic_map *set_div_from_lower_bound( - struct isl_basic_map *bmap, int div, int ineq) -{ - unsigned total = 1 + isl_space_dim(bmap->dim, isl_dim_all); - - isl_seq_neg(bmap->div[div] + 1, bmap->ineq[ineq], total + bmap->n_div); - isl_int_set(bmap->div[div][0], bmap->ineq[ineq][total + div]); - isl_int_add(bmap->div[div][1], bmap->div[div][1], bmap->div[div][0]); - isl_int_sub_ui(bmap->div[div][1], bmap->div[div][1], 1); - isl_int_set_si(bmap->div[div][1 + total + div], 0); - - return bmap; -} - -/* Check whether it is ok to define a div based on an inequality. - * To avoid the introduction of circular definitions of divs, we - * do not allow such a definition if the resulting expression would refer to - * any other undefined divs or if any known div is defined in - * terms of the unknown div. - */ -static int ok_to_set_div_from_bound(struct isl_basic_map *bmap, - int div, int ineq) -{ - int j; - unsigned total = 1 + isl_space_dim(bmap->dim, isl_dim_all); - - /* Not defined in terms of unknown divs */ - for (j = 0; j < bmap->n_div; ++j) { - if (div == j) - continue; - if (isl_int_is_zero(bmap->ineq[ineq][total + j])) - continue; - if (isl_int_is_zero(bmap->div[j][0])) - return 0; - } - - /* No other div defined in terms of this one => avoid loops */ - for (j = 0; j < bmap->n_div; ++j) { - if (div == j) - continue; - if (isl_int_is_zero(bmap->div[j][0])) - continue; - if (!isl_int_is_zero(bmap->div[j][1 + total + div])) - return 0; - } - - return 1; -} - -/* Given two constraints "k" and "l" that are opposite to each other, - * except for the constant term, check if we can use them - * to obtain an expression for one of the hitherto unknown divs. - * "sum" is the sum of the constant terms of the constraints. - * If this sum is strictly smaller than the coefficient of one - * of the divs, then this pair can be used define the div. - * To avoid the introduction of circular definitions of divs, we - * do not use the pair if the resulting expression would refer to - * any other undefined divs or if any known div is defined in - * terms of the unknown div. - */ -static struct isl_basic_map *check_for_div_constraints( - struct isl_basic_map *bmap, int k, int l, isl_int sum, int *progress) -{ - int i; - unsigned total = 1 + isl_space_dim(bmap->dim, isl_dim_all); - - for (i = 0; i < bmap->n_div; ++i) { - if (!isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_int_is_zero(bmap->ineq[k][total + i])) - continue; - if (isl_int_abs_ge(sum, bmap->ineq[k][total + i])) - continue; - if (!ok_to_set_div_from_bound(bmap, i, k)) - break; - if (isl_int_is_pos(bmap->ineq[k][total + i])) - bmap = set_div_from_lower_bound(bmap, i, k); - else - bmap = set_div_from_lower_bound(bmap, i, l); - if (progress) - *progress = 1; - break; - } - return bmap; -} - -static struct isl_basic_map *remove_duplicate_constraints( - struct isl_basic_map *bmap, int *progress, int detect_divs) -{ - unsigned int size; - isl_int ***index; - int k, l, h; - int bits; - unsigned total = isl_basic_map_total_dim(bmap); - isl_int sum; - isl_ctx *ctx; - - if (!bmap || bmap->n_ineq <= 1) - return bmap; - - size = round_up(4 * (bmap->n_ineq+1) / 3 - 1); - bits = ffs(size) - 1; - ctx = isl_basic_map_get_ctx(bmap); - index = isl_calloc_array(ctx, isl_int **, size); - if (!index) - return bmap; - - index[isl_seq_get_hash_bits(bmap->ineq[0]+1, total, bits)] = &bmap->ineq[0]; - for (k = 1; k < bmap->n_ineq; ++k) { - h = hash_index(index, size, bits, bmap, k); - if (!index[h]) { - index[h] = &bmap->ineq[k]; - continue; - } - if (progress) - *progress = 1; - l = index[h] - &bmap->ineq[0]; - if (isl_int_lt(bmap->ineq[k][0], bmap->ineq[l][0])) - swap_inequality(bmap, k, l); - isl_basic_map_drop_inequality(bmap, k); - --k; - } - isl_int_init(sum); - for (k = 0; k < bmap->n_ineq-1; ++k) { - isl_seq_neg(bmap->ineq[k]+1, bmap->ineq[k]+1, total); - h = hash_index(index, size, bits, bmap, k); - isl_seq_neg(bmap->ineq[k]+1, bmap->ineq[k]+1, total); - if (!index[h]) - continue; - l = index[h] - &bmap->ineq[0]; - isl_int_add(sum, bmap->ineq[k][0], bmap->ineq[l][0]); - if (isl_int_is_pos(sum)) { - if (detect_divs) - bmap = check_for_div_constraints(bmap, k, l, - sum, progress); - continue; - } - if (isl_int_is_zero(sum)) { - /* We need to break out of the loop after these - * changes since the contents of the hash - * will no longer be valid. - * Plus, we probably we want to regauss first. - */ - if (progress) - *progress = 1; - isl_basic_map_drop_inequality(bmap, l); - isl_basic_map_inequality_to_equality(bmap, k); - } else - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - isl_int_clear(sum); - - free(index); - return bmap; -} - - -struct isl_basic_map *isl_basic_map_simplify(struct isl_basic_map *bmap) -{ - int progress = 1; - if (!bmap) - return NULL; - while (progress) { - progress = 0; - bmap = isl_basic_map_normalize_constraints(bmap); - bmap = remove_duplicate_divs(bmap, &progress); - bmap = eliminate_divs_eq(bmap, &progress); - bmap = eliminate_divs_ineq(bmap, &progress); - bmap = isl_basic_map_gauss(bmap, &progress); - /* requires equalities in normal form */ - bmap = normalize_divs(bmap, &progress); - bmap = remove_duplicate_constraints(bmap, &progress, 1); - } - return bmap; -} - -struct isl_basic_set *isl_basic_set_simplify(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_simplify((struct isl_basic_map *)bset); -} - - -int isl_basic_map_is_div_constraint(__isl_keep isl_basic_map *bmap, - isl_int *constraint, unsigned div) -{ - unsigned pos; - - if (!bmap) - return -1; - - pos = 1 + isl_space_dim(bmap->dim, isl_dim_all) + div; - - if (isl_int_eq(constraint[pos], bmap->div[div][0])) { - int neg; - isl_int_sub(bmap->div[div][1], - bmap->div[div][1], bmap->div[div][0]); - isl_int_add_ui(bmap->div[div][1], bmap->div[div][1], 1); - neg = isl_seq_is_neg(constraint, bmap->div[div]+1, pos); - isl_int_sub_ui(bmap->div[div][1], bmap->div[div][1], 1); - isl_int_add(bmap->div[div][1], - bmap->div[div][1], bmap->div[div][0]); - if (!neg) - return 0; - if (isl_seq_first_non_zero(constraint+pos+1, - bmap->n_div-div-1) != -1) - return 0; - } else if (isl_int_abs_eq(constraint[pos], bmap->div[div][0])) { - if (!isl_seq_eq(constraint, bmap->div[div]+1, pos)) - return 0; - if (isl_seq_first_non_zero(constraint+pos+1, - bmap->n_div-div-1) != -1) - return 0; - } else - return 0; - - return 1; -} - - -/* If the only constraints a div d=floor(f/m) - * appears in are its two defining constraints - * - * f - m d >=0 - * -(f - (m - 1)) + m d >= 0 - * - * then it can safely be removed. - */ -static int div_is_redundant(struct isl_basic_map *bmap, int div) -{ - int i; - unsigned pos = 1 + isl_space_dim(bmap->dim, isl_dim_all) + div; - - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][pos])) - return 0; - - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_int_is_zero(bmap->ineq[i][pos])) - continue; - if (!isl_basic_map_is_div_constraint(bmap, bmap->ineq[i], div)) - return 0; - } - - for (i = 0; i < bmap->n_div; ++i) - if (!isl_int_is_zero(bmap->div[i][1+pos])) - return 0; - - return 1; -} - -/* - * Remove divs that don't occur in any of the constraints or other divs. - * These can arise when dropping some of the variables in a quast - * returned by piplib. - */ -static struct isl_basic_map *remove_redundant_divs(struct isl_basic_map *bmap) -{ - int i; - - if (!bmap) - return NULL; - - for (i = bmap->n_div-1; i >= 0; --i) { - if (!div_is_redundant(bmap, i)) - continue; - bmap = isl_basic_map_drop_div(bmap, i); - } - return bmap; -} - -struct isl_basic_map *isl_basic_map_finalize(struct isl_basic_map *bmap) -{ - bmap = remove_redundant_divs(bmap); - if (!bmap) - return NULL; - ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); - return bmap; -} - -struct isl_basic_set *isl_basic_set_finalize(struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_finalize((struct isl_basic_map *)bset); -} - -struct isl_set *isl_set_finalize(struct isl_set *set) -{ - int i; - - if (!set) - return NULL; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_finalize(set->p[i]); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -struct isl_map *isl_map_finalize(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_finalize(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - - -/* Remove definition of any div that is defined in terms of the given variable. - * The div itself is not removed. Functions such as - * eliminate_divs_ineq depend on the other divs remaining in place. - */ -static struct isl_basic_map *remove_dependent_vars(struct isl_basic_map *bmap, - int pos) -{ - int i; - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_int_is_zero(bmap->div[i][1+1+pos])) - continue; - isl_int_set_si(bmap->div[i][0], 0); - } - return bmap; -} - -/* Eliminate the specified variables from the constraints using - * Fourier-Motzkin. The variables themselves are not removed. - */ -struct isl_basic_map *isl_basic_map_eliminate_vars( - struct isl_basic_map *bmap, unsigned pos, unsigned n) -{ - int d; - int i, j, k; - unsigned total; - int need_gauss = 0; - - if (n == 0) - return bmap; - if (!bmap) - return NULL; - total = isl_basic_map_total_dim(bmap); - - bmap = isl_basic_map_cow(bmap); - for (d = pos + n - 1; d >= 0 && d >= pos; --d) - bmap = remove_dependent_vars(bmap, d); - - for (d = pos + n - 1; - d >= 0 && d >= total - bmap->n_div && d >= pos; --d) - isl_seq_clr(bmap->div[d-(total-bmap->n_div)], 2+total); - for (d = pos + n - 1; d >= 0 && d >= pos; --d) { - int n_lower, n_upper; - if (!bmap) - return NULL; - for (i = 0; i < bmap->n_eq; ++i) { - if (isl_int_is_zero(bmap->eq[i][1+d])) - continue; - eliminate_var_using_equality(bmap, d, bmap->eq[i], 0, NULL); - isl_basic_map_drop_equality(bmap, i); - need_gauss = 1; - break; - } - if (i < bmap->n_eq) - continue; - n_lower = 0; - n_upper = 0; - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_int_is_pos(bmap->ineq[i][1+d])) - n_lower++; - else if (isl_int_is_neg(bmap->ineq[i][1+d])) - n_upper++; - } - bmap = isl_basic_map_extend_constraints(bmap, - 0, n_lower * n_upper); - if (!bmap) - goto error; - for (i = bmap->n_ineq - 1; i >= 0; --i) { - int last; - if (isl_int_is_zero(bmap->ineq[i][1+d])) - continue; - last = -1; - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(bmap->ineq[j][1+d])) - continue; - last = j; - if (isl_int_sgn(bmap->ineq[i][1+d]) == - isl_int_sgn(bmap->ineq[j][1+d])) - continue; - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], bmap->ineq[i], - 1+total); - isl_seq_elim(bmap->ineq[k], bmap->ineq[j], - 1+d, 1+total, NULL); - } - isl_basic_map_drop_inequality(bmap, i); - i = last + 1; - } - if (n_lower > 0 && n_upper > 0) { - bmap = isl_basic_map_normalize_constraints(bmap); - bmap = remove_duplicate_constraints(bmap, NULL, 0); - bmap = isl_basic_map_gauss(bmap, NULL); - bmap = isl_basic_map_remove_redundancies(bmap); - need_gauss = 0; - if (!bmap) - goto error; - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - break; - } - } - ISL_F_CLR(bmap, ISL_BASIC_MAP_NORMALIZED); - if (need_gauss) - bmap = isl_basic_map_gauss(bmap, NULL); - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_eliminate_vars( - struct isl_basic_set *bset, unsigned pos, unsigned n) -{ - return (struct isl_basic_set *)isl_basic_map_eliminate_vars( - (struct isl_basic_map *)bset, pos, n); -} - -/* Eliminate the specified n dimensions starting at first from the - * constraints using Fourier-Motzkin. The dimensions themselves - * are not removed. - */ -__isl_give isl_basic_map *isl_basic_map_eliminate( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) -{ - if (!bmap) - return NULL; - if (n == 0) - return bmap; - - if (first + n > isl_basic_map_dim(bmap, type)) - isl_die(bmap->ctx, isl_error_invalid, - "index out of bounds", goto error); - - first += isl_basic_map_offset(bmap, type) - 1; - bmap = isl_basic_map_eliminate_vars(bmap, first, n); - return isl_basic_map_finalize(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Don't assume equalities are in order, because align_divs - * may have changed the order of the divs. - */ -static void compute_elimination_index(struct isl_basic_map *bmap, int *elim) -{ - int d, i; - unsigned total; - - total = isl_space_dim(bmap->dim, isl_dim_all); - for (d = 0; d < total; ++d) - elim[d] = -1; - for (i = 0; i < bmap->n_eq; ++i) { - for (d = total - 1; d >= 0; --d) { - if (isl_int_is_zero(bmap->eq[i][1+d])) - continue; - elim[d] = i; - break; - } - } -} - -static void set_compute_elimination_index(struct isl_basic_set *bset, int *elim) -{ - compute_elimination_index((struct isl_basic_map *)bset, elim); -} - -static int reduced_using_equalities(isl_int *dst, isl_int *src, - struct isl_basic_map *bmap, int *elim) -{ - int d; - int copied = 0; - unsigned total; - - total = isl_space_dim(bmap->dim, isl_dim_all); - for (d = total - 1; d >= 0; --d) { - if (isl_int_is_zero(src[1+d])) - continue; - if (elim[d] == -1) - continue; - if (!copied) { - isl_seq_cpy(dst, src, 1 + total); - copied = 1; - } - isl_seq_elim(dst, bmap->eq[elim[d]], 1 + d, 1 + total, NULL); - } - return copied; -} - -static int set_reduced_using_equalities(isl_int *dst, isl_int *src, - struct isl_basic_set *bset, int *elim) -{ - return reduced_using_equalities(dst, src, - (struct isl_basic_map *)bset, elim); -} - -static struct isl_basic_set *isl_basic_set_reduce_using_equalities( - struct isl_basic_set *bset, struct isl_basic_set *context) -{ - int i; - int *elim; - - if (!bset || !context) - goto error; - - if (context->n_eq == 0) { - isl_basic_set_free(context); - return bset; - } - - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - - elim = isl_alloc_array(bset->ctx, int, isl_basic_set_n_dim(bset)); - if (!elim) - goto error; - set_compute_elimination_index(context, elim); - for (i = 0; i < bset->n_eq; ++i) - set_reduced_using_equalities(bset->eq[i], bset->eq[i], - context, elim); - for (i = 0; i < bset->n_ineq; ++i) - set_reduced_using_equalities(bset->ineq[i], bset->ineq[i], - context, elim); - isl_basic_set_free(context); - free(elim); - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - return bset; -error: - isl_basic_set_free(bset); - isl_basic_set_free(context); - return NULL; -} - -static struct isl_basic_set *remove_shifted_constraints( - struct isl_basic_set *bset, struct isl_basic_set *context) -{ - unsigned int size; - isl_int ***index; - int bits; - int k, h, l; - isl_ctx *ctx; - - if (!bset) - return NULL; - - size = round_up(4 * (context->n_ineq+1) / 3 - 1); - bits = ffs(size) - 1; - ctx = isl_basic_set_get_ctx(bset); - index = isl_calloc_array(ctx, isl_int **, size); - if (!index) - return bset; - - for (k = 0; k < context->n_ineq; ++k) { - h = set_hash_index(index, size, bits, context, k); - index[h] = &context->ineq[k]; - } - for (k = 0; k < bset->n_ineq; ++k) { - h = set_hash_index(index, size, bits, bset, k); - if (!index[h]) - continue; - l = index[h] - &context->ineq[0]; - if (isl_int_lt(bset->ineq[k][0], context->ineq[l][0])) - continue; - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - isl_basic_set_drop_inequality(bset, k); - --k; - } - free(index); - return bset; -error: - free(index); - return bset; -} - -/* Remove all information from bset that is redundant in the context - * of context. Both bset and context are assumed to be full-dimensional. - * - * We first * remove the inequalities from "bset" - * that are obviously redundant with respect to some inequality in "context". - * - * If there are any inequalities left, we construct a tableau for - * the context and then add the inequalities of "bset". - * Before adding these inequalities, we freeze all constraints such that - * they won't be considered redundant in terms of the constraints of "bset". - * Then we detect all redundant constraints (among the - * constraints that weren't frozen), first by checking for redundancy in the - * the tableau and then by checking if replacing a constraint by its negation - * would lead to an empty set. This last step is fairly expensive - * and could be optimized by more reuse of the tableau. - * Finally, we update bset according to the results. - */ -static __isl_give isl_basic_set *uset_gist_full(__isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context) -{ - int i, k; - isl_basic_set *combined = NULL; - struct isl_tab *tab = NULL; - unsigned context_ineq; - unsigned total; - - if (!bset || !context) - goto error; - - if (isl_basic_set_is_universe(bset)) { - isl_basic_set_free(context); - return bset; - } - - if (isl_basic_set_is_universe(context)) { - isl_basic_set_free(context); - return bset; - } - - bset = remove_shifted_constraints(bset, context); - if (!bset) - goto error; - if (bset->n_ineq == 0) - goto done; - - context_ineq = context->n_ineq; - combined = isl_basic_set_cow(isl_basic_set_copy(context)); - combined = isl_basic_set_extend_constraints(combined, 0, bset->n_ineq); - tab = isl_tab_from_basic_set(combined); - for (i = 0; i < context_ineq; ++i) - if (isl_tab_freeze_constraint(tab, i) < 0) - goto error; - tab = isl_tab_extend(tab, bset->n_ineq); - for (i = 0; i < bset->n_ineq; ++i) - if (isl_tab_add_ineq(tab, bset->ineq[i]) < 0) - goto error; - bset = isl_basic_set_add_constraints(combined, bset, 0); - combined = NULL; - if (!bset) - goto error; - if (isl_tab_detect_redundant(tab) < 0) - goto error; - total = isl_basic_set_total_dim(bset); - for (i = context_ineq; i < bset->n_ineq; ++i) { - int is_empty; - if (tab->con[i].is_redundant) - continue; - tab->con[i].is_redundant = 1; - combined = isl_basic_set_dup(bset); - combined = isl_basic_set_update_from_tab(combined, tab); - combined = isl_basic_set_extend_constraints(combined, 0, 1); - k = isl_basic_set_alloc_inequality(combined); - if (k < 0) - goto error; - isl_seq_neg(combined->ineq[k], bset->ineq[i], 1 + total); - isl_int_sub_ui(combined->ineq[k][0], combined->ineq[k][0], 1); - is_empty = isl_basic_set_is_empty(combined); - if (is_empty < 0) - goto error; - isl_basic_set_free(combined); - combined = NULL; - if (!is_empty) - tab->con[i].is_redundant = 0; - } - for (i = 0; i < context_ineq; ++i) - tab->con[i].is_redundant = 1; - bset = isl_basic_set_update_from_tab(bset, tab); - if (bset) { - ISL_F_SET(bset, ISL_BASIC_SET_NO_IMPLICIT); - ISL_F_SET(bset, ISL_BASIC_SET_NO_REDUNDANT); - } - - isl_tab_free(tab); -done: - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - isl_basic_set_free(context); - return bset; -error: - isl_tab_free(tab); - isl_basic_set_free(combined); - isl_basic_set_free(context); - isl_basic_set_free(bset); - return NULL; -} - -/* Remove all information from bset that is redundant in the context - * of context. In particular, equalities that are linear combinations - * of those in context are removed. Then the inequalities that are - * redundant in the context of the equalities and inequalities of - * context are removed. - * - * We first compute the integer affine hull of the intersection, - * compute the gist inside this affine hull and then add back - * those equalities that are not implied by the context. - * - * If two constraints are mutually redundant, then uset_gist_full - * will remove the second of those constraints. We therefore first - * sort the constraints so that constraints not involving existentially - * quantified variables are given precedence over those that do. - * We have to perform this sorting before the variable compression, - * because that may effect the order of the variables. - */ -static __isl_give isl_basic_set *uset_gist(__isl_take isl_basic_set *bset, - __isl_take isl_basic_set *context) -{ - isl_mat *eq; - isl_mat *T, *T2; - isl_basic_set *aff; - isl_basic_set *aff_context; - unsigned total; - - if (!bset || !context) - goto error; - - bset = isl_basic_set_intersect(bset, isl_basic_set_copy(context)); - if (isl_basic_set_plain_is_empty(bset)) { - isl_basic_set_free(context); - return bset; - } - bset = isl_basic_set_sort_constraints(bset); - aff = isl_basic_set_affine_hull(isl_basic_set_copy(bset)); - if (!aff) - goto error; - if (isl_basic_set_plain_is_empty(aff)) { - isl_basic_set_free(aff); - isl_basic_set_free(context); - return bset; - } - if (aff->n_eq == 0) { - isl_basic_set_free(aff); - return uset_gist_full(bset, context); - } - total = isl_basic_set_total_dim(bset); - eq = isl_mat_sub_alloc6(bset->ctx, aff->eq, 0, aff->n_eq, 0, 1 + total); - eq = isl_mat_cow(eq); - T = isl_mat_variable_compression(eq, &T2); - if (T && T->n_col == 0) { - isl_mat_free(T); - isl_mat_free(T2); - isl_basic_set_free(context); - isl_basic_set_free(aff); - return isl_basic_set_set_to_empty(bset); - } - - aff_context = isl_basic_set_affine_hull(isl_basic_set_copy(context)); - - bset = isl_basic_set_preimage(bset, isl_mat_copy(T)); - context = isl_basic_set_preimage(context, T); - - bset = uset_gist_full(bset, context); - bset = isl_basic_set_preimage(bset, T2); - bset = isl_basic_set_intersect(bset, aff); - bset = isl_basic_set_reduce_using_equalities(bset, aff_context); - - if (bset) { - ISL_F_SET(bset, ISL_BASIC_SET_NO_IMPLICIT); - ISL_F_SET(bset, ISL_BASIC_SET_NO_REDUNDANT); - } - - return bset; -error: - isl_basic_set_free(bset); - isl_basic_set_free(context); - return NULL; -} - -/* Normalize the divs in "bmap" in the context of the equalities in "context". - * We simply add the equalities in context to bmap and then do a regular - * div normalizations. Better results can be obtained by normalizing - * only the divs in bmap than do not also appear in context. - * We need to be careful to reduce the divs using the equalities - * so that later calls to isl_basic_map_overlying_set wouldn't introduce - * spurious constraints. - */ -static struct isl_basic_map *normalize_divs_in_context( - struct isl_basic_map *bmap, struct isl_basic_map *context) -{ - int i; - unsigned total_context; - int div_eq; - - div_eq = n_pure_div_eq(bmap); - if (div_eq == 0) - return bmap; - - if (context->n_div > 0) - bmap = isl_basic_map_align_divs(bmap, context); - - total_context = isl_basic_map_total_dim(context); - bmap = isl_basic_map_extend_constraints(bmap, context->n_eq, 0); - for (i = 0; i < context->n_eq; ++i) { - int k; - k = isl_basic_map_alloc_equality(bmap); - isl_seq_cpy(bmap->eq[k], context->eq[i], 1 + total_context); - isl_seq_clr(bmap->eq[k] + 1 + total_context, - isl_basic_map_total_dim(bmap) - total_context); - } - bmap = isl_basic_map_gauss(bmap, NULL); - bmap = normalize_divs(bmap, NULL); - bmap = isl_basic_map_gauss(bmap, NULL); - return bmap; -} - -struct isl_basic_map *isl_basic_map_gist(struct isl_basic_map *bmap, - struct isl_basic_map *context) -{ - struct isl_basic_set *bset; - - if (!bmap || !context) - goto error; - - if (isl_basic_map_is_universe(bmap)) { - isl_basic_map_free(context); - return bmap; - } - if (isl_basic_map_plain_is_empty(context)) { - isl_basic_map_free(bmap); - return context; - } - if (isl_basic_map_plain_is_empty(bmap)) { - isl_basic_map_free(context); - return bmap; - } - - bmap = isl_basic_map_remove_redundancies(bmap); - context = isl_basic_map_remove_redundancies(context); - - if (context->n_eq) - bmap = normalize_divs_in_context(bmap, context); - - context = isl_basic_map_align_divs(context, bmap); - bmap = isl_basic_map_align_divs(bmap, context); - - bset = uset_gist(isl_basic_map_underlying_set(isl_basic_map_copy(bmap)), - isl_basic_map_underlying_set(context)); - - return isl_basic_map_overlying_set(bset, bmap); -error: - isl_basic_map_free(bmap); - isl_basic_map_free(context); - return NULL; -} - -/* - * Assumes context has no implicit divs. - */ -__isl_give isl_map *isl_map_gist_basic_map(__isl_take isl_map *map, - __isl_take isl_basic_map *context) -{ - int i; - - if (!map || !context) - goto error;; - - if (isl_basic_map_plain_is_empty(context)) { - isl_map_free(map); - return isl_map_from_basic_map(context); - } - - context = isl_basic_map_remove_redundancies(context); - map = isl_map_cow(map); - if (!map || !context) - goto error;; - isl_assert(map->ctx, isl_space_is_equal(map->dim, context->dim), goto error); - map = isl_map_compute_divs(map); - for (i = 0; i < map->n; ++i) - context = isl_basic_map_align_divs(context, map->p[i]); - for (i = map->n - 1; i >= 0; --i) { - map->p[i] = isl_basic_map_gist(map->p[i], - isl_basic_map_copy(context)); - if (!map->p[i]) - goto error; - if (isl_basic_map_plain_is_empty(map->p[i])) { - isl_basic_map_free(map->p[i]); - if (i != map->n - 1) - map->p[i] = map->p[map->n - 1]; - map->n--; - } - } - isl_basic_map_free(context); - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - isl_basic_map_free(context); - return NULL; -} - -static __isl_give isl_map *map_gist(__isl_take isl_map *map, - __isl_take isl_map *context) -{ - context = isl_map_compute_divs(context); - return isl_map_gist_basic_map(map, isl_map_simple_hull(context)); -} - -__isl_give isl_map *isl_map_gist(__isl_take isl_map *map, - __isl_take isl_map *context) -{ - return isl_map_align_params_map_map_and(map, context, &map_gist); -} - -struct isl_basic_set *isl_basic_set_gist(struct isl_basic_set *bset, - struct isl_basic_set *context) -{ - return (struct isl_basic_set *)isl_basic_map_gist( - (struct isl_basic_map *)bset, (struct isl_basic_map *)context); -} - -__isl_give isl_set *isl_set_gist_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *context) -{ - return (struct isl_set *)isl_map_gist_basic_map((struct isl_map *)set, - (struct isl_basic_map *)context); -} - -__isl_give isl_set *isl_set_gist_params_basic_set(__isl_take isl_set *set, - __isl_take isl_basic_set *context) -{ - isl_space *space = isl_set_get_space(set); - isl_basic_set *dom_context = isl_basic_set_universe(space); - dom_context = isl_basic_set_intersect_params(dom_context, context); - return isl_set_gist_basic_set(set, dom_context); -} - -__isl_give isl_set *isl_set_gist(__isl_take isl_set *set, - __isl_take isl_set *context) -{ - return (struct isl_set *)isl_map_gist((struct isl_map *)set, - (struct isl_map *)context); -} - -__isl_give isl_map *isl_map_gist_domain(__isl_take isl_map *map, - __isl_take isl_set *context) -{ - isl_map *map_context = isl_map_universe(isl_map_get_space(map)); - map_context = isl_map_intersect_domain(map_context, context); - return isl_map_gist(map, map_context); -} - -__isl_give isl_map *isl_map_gist_range(__isl_take isl_map *map, - __isl_take isl_set *context) -{ - isl_map *map_context = isl_map_universe(isl_map_get_space(map)); - map_context = isl_map_intersect_range(map_context, context); - return isl_map_gist(map, map_context); -} - -__isl_give isl_map *isl_map_gist_params(__isl_take isl_map *map, - __isl_take isl_set *context) -{ - isl_map *map_context = isl_map_universe(isl_map_get_space(map)); - map_context = isl_map_intersect_params(map_context, context); - return isl_map_gist(map, map_context); -} - -__isl_give isl_set *isl_set_gist_params(__isl_take isl_set *set, - __isl_take isl_set *context) -{ - return isl_map_gist_params(set, context); -} - -/* Quick check to see if two basic maps are disjoint. - * In particular, we reduce the equalities and inequalities of - * one basic map in the context of the equalities of the other - * basic map and check if we get a contradiction. - */ -int isl_basic_map_plain_is_disjoint(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2) -{ - struct isl_vec *v = NULL; - int *elim = NULL; - unsigned total; - int i; - - if (!bmap1 || !bmap2) - return -1; - isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), - return -1); - if (bmap1->n_div || bmap2->n_div) - return 0; - if (!bmap1->n_eq && !bmap2->n_eq) - return 0; - - total = isl_space_dim(bmap1->dim, isl_dim_all); - if (total == 0) - return 0; - v = isl_vec_alloc(bmap1->ctx, 1 + total); - if (!v) - goto error; - elim = isl_alloc_array(bmap1->ctx, int, total); - if (!elim) - goto error; - compute_elimination_index(bmap1, elim); - for (i = 0; i < bmap2->n_eq; ++i) { - int reduced; - reduced = reduced_using_equalities(v->block.data, bmap2->eq[i], - bmap1, elim); - if (reduced && !isl_int_is_zero(v->block.data[0]) && - isl_seq_first_non_zero(v->block.data + 1, total) == -1) - goto disjoint; - } - for (i = 0; i < bmap2->n_ineq; ++i) { - int reduced; - reduced = reduced_using_equalities(v->block.data, - bmap2->ineq[i], bmap1, elim); - if (reduced && isl_int_is_neg(v->block.data[0]) && - isl_seq_first_non_zero(v->block.data + 1, total) == -1) - goto disjoint; - } - compute_elimination_index(bmap2, elim); - for (i = 0; i < bmap1->n_ineq; ++i) { - int reduced; - reduced = reduced_using_equalities(v->block.data, - bmap1->ineq[i], bmap2, elim); - if (reduced && isl_int_is_neg(v->block.data[0]) && - isl_seq_first_non_zero(v->block.data + 1, total) == -1) - goto disjoint; - } - isl_vec_free(v); - free(elim); - return 0; -disjoint: - isl_vec_free(v); - free(elim); - return 1; -error: - isl_vec_free(v); - free(elim); - return -1; -} - -int isl_basic_set_plain_is_disjoint(__isl_keep isl_basic_set *bset1, - __isl_keep isl_basic_set *bset2) -{ - return isl_basic_map_plain_is_disjoint((struct isl_basic_map *)bset1, - (struct isl_basic_map *)bset2); -} - -int isl_map_plain_is_disjoint(__isl_keep isl_map *map1, - __isl_keep isl_map *map2) -{ - int i, j; - - if (!map1 || !map2) - return -1; - - if (isl_map_plain_is_equal(map1, map2)) - return 0; - - for (i = 0; i < map1->n; ++i) { - for (j = 0; j < map2->n; ++j) { - int d = isl_basic_map_plain_is_disjoint(map1->p[i], - map2->p[j]); - if (d != 1) - return d; - } - } - return 1; -} - -int isl_set_plain_is_disjoint(__isl_keep isl_set *set1, - __isl_keep isl_set *set2) -{ - return isl_map_plain_is_disjoint((struct isl_map *)set1, - (struct isl_map *)set2); -} - -int isl_set_fast_is_disjoint(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - return isl_set_plain_is_disjoint(set1, set2); -} - -/* Check if we can combine a given div with lower bound l and upper - * bound u with some other div and if so return that other div. - * Otherwise return -1. - * - * We first check that - * - the bounds are opposites of each other (except for the constant - * term) - * - the bounds do not reference any other div - * - no div is defined in terms of this div - * - * Let m be the size of the range allowed on the div by the bounds. - * That is, the bounds are of the form - * - * e <= a <= e + m - 1 - * - * with e some expression in the other variables. - * We look for another div b such that no third div is defined in terms - * of this second div b and such that in any constraint that contains - * a (except for the given lower and upper bound), also contains b - * with a coefficient that is m times that of b. - * That is, all constraints (execpt for the lower and upper bound) - * are of the form - * - * e + f (a + m b) >= 0 - * - * If so, we return b so that "a + m b" can be replaced by - * a single div "c = a + m b". - */ -static int div_find_coalesce(struct isl_basic_map *bmap, int *pairs, - unsigned div, unsigned l, unsigned u) -{ - int i, j; - unsigned dim; - int coalesce = -1; - - if (bmap->n_div <= 1) - return -1; - dim = isl_space_dim(bmap->dim, isl_dim_all); - if (isl_seq_first_non_zero(bmap->ineq[l] + 1 + dim, div) != -1) - return -1; - if (isl_seq_first_non_zero(bmap->ineq[l] + 1 + dim + div + 1, - bmap->n_div - div - 1) != -1) - return -1; - if (!isl_seq_is_neg(bmap->ineq[l] + 1, bmap->ineq[u] + 1, - dim + bmap->n_div)) - return -1; - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (!isl_int_is_zero(bmap->div[i][1 + 1 + dim + div])) - return -1; - } - - isl_int_add(bmap->ineq[l][0], bmap->ineq[l][0], bmap->ineq[u][0]); - if (isl_int_is_neg(bmap->ineq[l][0])) { - isl_int_sub(bmap->ineq[l][0], - bmap->ineq[l][0], bmap->ineq[u][0]); - bmap = isl_basic_map_copy(bmap); - bmap = isl_basic_map_set_to_empty(bmap); - isl_basic_map_free(bmap); - return -1; - } - isl_int_add_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - for (i = 0; i < bmap->n_div; ++i) { - if (i == div) - continue; - if (!pairs[i]) - continue; - for (j = 0; j < bmap->n_div; ++j) { - if (isl_int_is_zero(bmap->div[j][0])) - continue; - if (!isl_int_is_zero(bmap->div[j][1 + 1 + dim + i])) - break; - } - if (j < bmap->n_div) - continue; - for (j = 0; j < bmap->n_ineq; ++j) { - int valid; - if (j == l || j == u) - continue; - if (isl_int_is_zero(bmap->ineq[j][1 + dim + div])) - continue; - if (isl_int_is_zero(bmap->ineq[j][1 + dim + i])) - break; - isl_int_mul(bmap->ineq[j][1 + dim + div], - bmap->ineq[j][1 + dim + div], - bmap->ineq[l][0]); - valid = isl_int_eq(bmap->ineq[j][1 + dim + div], - bmap->ineq[j][1 + dim + i]); - isl_int_divexact(bmap->ineq[j][1 + dim + div], - bmap->ineq[j][1 + dim + div], - bmap->ineq[l][0]); - if (!valid) - break; - } - if (j < bmap->n_ineq) - continue; - coalesce = i; - break; - } - isl_int_sub_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - isl_int_sub(bmap->ineq[l][0], bmap->ineq[l][0], bmap->ineq[u][0]); - return coalesce; -} - -/* Given a lower and an upper bound on div i, construct an inequality - * that when nonnegative ensures that this pair of bounds always allows - * for an integer value of the given div. - * The lower bound is inequality l, while the upper bound is inequality u. - * The constructed inequality is stored in ineq. - * g, fl, fu are temporary scalars. - * - * Let the upper bound be - * - * -n_u a + e_u >= 0 - * - * and the lower bound - * - * n_l a + e_l >= 0 - * - * Let n_u = f_u g and n_l = f_l g, with g = gcd(n_u, n_l). - * We have - * - * - f_u e_l <= f_u f_l g a <= f_l e_u - * - * Since all variables are integer valued, this is equivalent to - * - * - f_u e_l - (f_u - 1) <= f_u f_l g a <= f_l e_u + (f_l - 1) - * - * If this interval is at least f_u f_l g, then it contains at least - * one integer value for a. - * That is, the test constraint is - * - * f_l e_u + f_u e_l + f_l - 1 + f_u - 1 + 1 >= f_u f_l g - */ -static void construct_test_ineq(struct isl_basic_map *bmap, int i, - int l, int u, isl_int *ineq, isl_int g, isl_int fl, isl_int fu) -{ - unsigned dim; - dim = isl_space_dim(bmap->dim, isl_dim_all); - - isl_int_gcd(g, bmap->ineq[l][1 + dim + i], bmap->ineq[u][1 + dim + i]); - isl_int_divexact(fl, bmap->ineq[l][1 + dim + i], g); - isl_int_divexact(fu, bmap->ineq[u][1 + dim + i], g); - isl_int_neg(fu, fu); - isl_seq_combine(ineq, fl, bmap->ineq[u], fu, bmap->ineq[l], - 1 + dim + bmap->n_div); - isl_int_add(ineq[0], ineq[0], fl); - isl_int_add(ineq[0], ineq[0], fu); - isl_int_sub_ui(ineq[0], ineq[0], 1); - isl_int_mul(g, g, fl); - isl_int_mul(g, g, fu); - isl_int_sub(ineq[0], ineq[0], g); -} - -/* Remove more kinds of divs that are not strictly needed. - * In particular, if all pairs of lower and upper bounds on a div - * are such that they allow at least one integer value of the div, - * the we can eliminate the div using Fourier-Motzkin without - * introducing any spurious solutions. - */ -static struct isl_basic_map *drop_more_redundant_divs( - struct isl_basic_map *bmap, int *pairs, int n) -{ - struct isl_tab *tab = NULL; - struct isl_vec *vec = NULL; - unsigned dim; - int remove = -1; - isl_int g, fl, fu; - - isl_int_init(g); - isl_int_init(fl); - isl_int_init(fu); - - if (!bmap) - goto error; - - dim = isl_space_dim(bmap->dim, isl_dim_all); - vec = isl_vec_alloc(bmap->ctx, 1 + dim + bmap->n_div); - if (!vec) - goto error; - - tab = isl_tab_from_basic_map(bmap); - - while (n > 0) { - int i, l, u; - int best = -1; - enum isl_lp_result res; - - for (i = 0; i < bmap->n_div; ++i) { - if (!pairs[i]) - continue; - if (best >= 0 && pairs[best] <= pairs[i]) - continue; - best = i; - } - - i = best; - for (l = 0; l < bmap->n_ineq; ++l) { - if (!isl_int_is_pos(bmap->ineq[l][1 + dim + i])) - continue; - for (u = 0; u < bmap->n_ineq; ++u) { - if (!isl_int_is_neg(bmap->ineq[u][1 + dim + i])) - continue; - construct_test_ineq(bmap, i, l, u, - vec->el, g, fl, fu); - res = isl_tab_min(tab, vec->el, - bmap->ctx->one, &g, NULL, 0); - if (res == isl_lp_error) - goto error; - if (res == isl_lp_empty) { - bmap = isl_basic_map_set_to_empty(bmap); - break; - } - if (res != isl_lp_ok || isl_int_is_neg(g)) - break; - } - if (u < bmap->n_ineq) - break; - } - if (l == bmap->n_ineq) { - remove = i; - break; - } - pairs[i] = 0; - --n; - } - - isl_tab_free(tab); - isl_vec_free(vec); - - isl_int_clear(g); - isl_int_clear(fl); - isl_int_clear(fu); - - free(pairs); - - if (remove < 0) - return bmap; - - bmap = isl_basic_map_remove_dims(bmap, isl_dim_div, remove, 1); - return isl_basic_map_drop_redundant_divs(bmap); -error: - free(pairs); - isl_basic_map_free(bmap); - isl_tab_free(tab); - isl_vec_free(vec); - isl_int_clear(g); - isl_int_clear(fl); - isl_int_clear(fu); - return NULL; -} - -/* Given a pair of divs div1 and div2 such that, expect for the lower bound l - * and the upper bound u, div1 always occurs together with div2 in the form - * (div1 + m div2), where m is the constant range on the variable div1 - * allowed by l and u, replace the pair div1 and div2 by a single - * div that is equal to div1 + m div2. - * - * The new div will appear in the location that contains div2. - * We need to modify all constraints that contain - * div2 = (div - div1) / m - * (If a constraint does not contain div2, it will also not contain div1.) - * If the constraint also contains div1, then we know they appear - * as f (div1 + m div2) and we can simply replace (div1 + m div2) by div, - * i.e., the coefficient of div is f. - * - * Otherwise, we first need to introduce div1 into the constraint. - * Let the l be - * - * div1 + f >=0 - * - * and u - * - * -div1 + f' >= 0 - * - * A lower bound on div2 - * - * n div2 + t >= 0 - * - * can be replaced by - * - * (n * (m div 2 + div1) + m t + n f)/g >= 0 - * - * with g = gcd(m,n). - * An upper bound - * - * -n div2 + t >= 0 - * - * can be replaced by - * - * (-n * (m div2 + div1) + m t + n f')/g >= 0 - * - * These constraint are those that we would obtain from eliminating - * div1 using Fourier-Motzkin. - * - * After all constraints have been modified, we drop the lower and upper - * bound and then drop div1. - */ -static struct isl_basic_map *coalesce_divs(struct isl_basic_map *bmap, - unsigned div1, unsigned div2, unsigned l, unsigned u) -{ - isl_int a; - isl_int b; - isl_int m; - unsigned dim, total; - int i; - - dim = isl_space_dim(bmap->dim, isl_dim_all); - total = 1 + dim + bmap->n_div; - - isl_int_init(a); - isl_int_init(b); - isl_int_init(m); - isl_int_add(m, bmap->ineq[l][0], bmap->ineq[u][0]); - isl_int_add_ui(m, m, 1); - - for (i = 0; i < bmap->n_ineq; ++i) { - if (i == l || i == u) - continue; - if (isl_int_is_zero(bmap->ineq[i][1 + dim + div2])) - continue; - if (isl_int_is_zero(bmap->ineq[i][1 + dim + div1])) { - isl_int_gcd(b, m, bmap->ineq[i][1 + dim + div2]); - isl_int_divexact(a, m, b); - isl_int_divexact(b, bmap->ineq[i][1 + dim + div2], b); - if (isl_int_is_pos(b)) { - isl_seq_combine(bmap->ineq[i], a, bmap->ineq[i], - b, bmap->ineq[l], total); - } else { - isl_int_neg(b, b); - isl_seq_combine(bmap->ineq[i], a, bmap->ineq[i], - b, bmap->ineq[u], total); - } - } - isl_int_set(bmap->ineq[i][1 + dim + div2], - bmap->ineq[i][1 + dim + div1]); - isl_int_set_si(bmap->ineq[i][1 + dim + div1], 0); - } - - isl_int_clear(a); - isl_int_clear(b); - isl_int_clear(m); - if (l > u) { - isl_basic_map_drop_inequality(bmap, l); - isl_basic_map_drop_inequality(bmap, u); - } else { - isl_basic_map_drop_inequality(bmap, u); - isl_basic_map_drop_inequality(bmap, l); - } - bmap = isl_basic_map_drop_div(bmap, div1); - return bmap; -} - -/* First check if we can coalesce any pair of divs and - * then continue with dropping more redundant divs. - * - * We loop over all pairs of lower and upper bounds on a div - * with coefficient 1 and -1, respectively, check if there - * is any other div "c" with which we can coalesce the div - * and if so, perform the coalescing. - */ -static struct isl_basic_map *coalesce_or_drop_more_redundant_divs( - struct isl_basic_map *bmap, int *pairs, int n) -{ - int i, l, u; - unsigned dim; - - dim = isl_space_dim(bmap->dim, isl_dim_all); - - for (i = 0; i < bmap->n_div; ++i) { - if (!pairs[i]) - continue; - for (l = 0; l < bmap->n_ineq; ++l) { - if (!isl_int_is_one(bmap->ineq[l][1 + dim + i])) - continue; - for (u = 0; u < bmap->n_ineq; ++u) { - int c; - - if (!isl_int_is_negone(bmap->ineq[u][1+dim+i])) - continue; - c = div_find_coalesce(bmap, pairs, i, l, u); - if (c < 0) - continue; - free(pairs); - bmap = coalesce_divs(bmap, i, c, l, u); - return isl_basic_map_drop_redundant_divs(bmap); - } - } - } - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) - return bmap; - - return drop_more_redundant_divs(bmap, pairs, n); -} - -/* Remove divs that are not strictly needed. - * In particular, if a div only occurs positively (or negatively) - * in constraints, then it can simply be dropped. - * Also, if a div occurs only occurs in two constraints and if moreover - * those two constraints are opposite to each other, except for the constant - * term and if the sum of the constant terms is such that for any value - * of the other values, there is always at least one integer value of the - * div, i.e., if one plus this sum is greater than or equal to - * the (absolute value) of the coefficent of the div in the constraints, - * then we can also simply drop the div. - * - * If any divs are left after these simple checks then we move on - * to more complicated cases in drop_more_redundant_divs. - */ -struct isl_basic_map *isl_basic_map_drop_redundant_divs( - struct isl_basic_map *bmap) -{ - int i, j; - unsigned off; - int *pairs = NULL; - int n = 0; - - if (!bmap) - goto error; - - off = isl_space_dim(bmap->dim, isl_dim_all); - pairs = isl_calloc_array(bmap->ctx, int, bmap->n_div); - if (!pairs) - goto error; - - for (i = 0; i < bmap->n_div; ++i) { - int pos, neg; - int last_pos, last_neg; - int redundant; - int defined; - - defined = !isl_int_is_zero(bmap->div[i][0]); - for (j = 0; j < bmap->n_eq; ++j) - if (!isl_int_is_zero(bmap->eq[j][1 + off + i])) - break; - if (j < bmap->n_eq) - continue; - ++n; - pos = neg = 0; - for (j = 0; j < bmap->n_ineq; ++j) { - if (isl_int_is_pos(bmap->ineq[j][1 + off + i])) { - last_pos = j; - ++pos; - } - if (isl_int_is_neg(bmap->ineq[j][1 + off + i])) { - last_neg = j; - ++neg; - } - } - pairs[i] = pos * neg; - if (pairs[i] == 0) { - for (j = bmap->n_ineq - 1; j >= 0; --j) - if (!isl_int_is_zero(bmap->ineq[j][1+off+i])) - isl_basic_map_drop_inequality(bmap, j); - bmap = isl_basic_map_drop_div(bmap, i); - free(pairs); - return isl_basic_map_drop_redundant_divs(bmap); - } - if (pairs[i] != 1) - continue; - if (!isl_seq_is_neg(bmap->ineq[last_pos] + 1, - bmap->ineq[last_neg] + 1, - off + bmap->n_div)) - continue; - - isl_int_add(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], bmap->ineq[last_neg][0]); - isl_int_add_ui(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], 1); - redundant = isl_int_ge(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][1+off+i]); - isl_int_sub_ui(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], 1); - isl_int_sub(bmap->ineq[last_pos][0], - bmap->ineq[last_pos][0], bmap->ineq[last_neg][0]); - if (!redundant) { - if (defined || - !ok_to_set_div_from_bound(bmap, i, last_pos)) { - pairs[i] = 0; - --n; - continue; - } - bmap = set_div_from_lower_bound(bmap, i, last_pos); - bmap = isl_basic_map_simplify(bmap); - free(pairs); - return isl_basic_map_drop_redundant_divs(bmap); - } - if (last_pos > last_neg) { - isl_basic_map_drop_inequality(bmap, last_pos); - isl_basic_map_drop_inequality(bmap, last_neg); - } else { - isl_basic_map_drop_inequality(bmap, last_neg); - isl_basic_map_drop_inequality(bmap, last_pos); - } - bmap = isl_basic_map_drop_div(bmap, i); - free(pairs); - return isl_basic_map_drop_redundant_divs(bmap); - } - - if (n > 0) - return coalesce_or_drop_more_redundant_divs(bmap, pairs, n); - - free(pairs); - return bmap; -error: - free(pairs); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_basic_set *isl_basic_set_drop_redundant_divs( - struct isl_basic_set *bset) -{ - return (struct isl_basic_set *) - isl_basic_map_drop_redundant_divs((struct isl_basic_map *)bset); -} - -struct isl_map *isl_map_drop_redundant_divs(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_drop_redundant_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop_redundant_divs(struct isl_set *set) -{ - return (struct isl_set *) - isl_map_drop_redundant_divs((struct isl_map *)set); -} diff --git a/cloog-0.17.0/isl/isl_map_subtract.c b/cloog-0.17.0/isl/isl_map_subtract.c deleted file mode 100644 index 1fd408683cda56c7e9ae5e1effcb397c51d198d7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_map_subtract.c +++ /dev/null @@ -1,858 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_tab.h" -#include - -static void expand_constraint(isl_vec *v, unsigned dim, - isl_int *c, int *div_map, unsigned n_div) -{ - int i; - - isl_seq_cpy(v->el, c, 1 + dim); - isl_seq_clr(v->el + 1 + dim, v->size - (1 + dim)); - - for (i = 0; i < n_div; ++i) - isl_int_set(v->el[1 + dim + div_map[i]], c[1 + dim + i]); -} - -/* Add all constraints of bmap to tab. The equalities of bmap - * are added as a pair of inequalities. - */ -static int tab_add_constraints(struct isl_tab *tab, - __isl_keep isl_basic_map *bmap, int *div_map) -{ - int i; - unsigned dim; - unsigned tab_total; - unsigned bmap_total; - isl_vec *v; - - if (!tab || !bmap) - return -1; - - tab_total = isl_basic_map_total_dim(tab->bmap); - bmap_total = isl_basic_map_total_dim(bmap); - dim = isl_space_dim(tab->bmap->dim, isl_dim_all); - - if (isl_tab_extend_cons(tab, 2 * bmap->n_eq + bmap->n_ineq) < 0) - return -1; - - v = isl_vec_alloc(bmap->ctx, 1 + tab_total); - if (!v) - return -1; - - for (i = 0; i < bmap->n_eq; ++i) { - expand_constraint(v, dim, bmap->eq[i], div_map, bmap->n_div); - if (isl_tab_add_ineq(tab, v->el) < 0) - goto error; - isl_seq_neg(bmap->eq[i], bmap->eq[i], 1 + bmap_total); - expand_constraint(v, dim, bmap->eq[i], div_map, bmap->n_div); - if (isl_tab_add_ineq(tab, v->el) < 0) - goto error; - isl_seq_neg(bmap->eq[i], bmap->eq[i], 1 + bmap_total); - if (tab->empty) - break; - } - - for (i = 0; i < bmap->n_ineq; ++i) { - expand_constraint(v, dim, bmap->ineq[i], div_map, bmap->n_div); - if (isl_tab_add_ineq(tab, v->el) < 0) - goto error; - if (tab->empty) - break; - } - - isl_vec_free(v); - return 0; -error: - isl_vec_free(v); - return -1; -} - -/* Add a specific constraint of bmap (or its opposite) to tab. - * The position of the constraint is specified by "c", where - * the equalities of bmap are counted twice, once for the inequality - * that is equal to the equality, and once for its negation. - */ -static int tab_add_constraint(struct isl_tab *tab, - __isl_keep isl_basic_map *bmap, int *div_map, int c, int oppose) -{ - unsigned dim; - unsigned tab_total; - unsigned bmap_total; - isl_vec *v; - int r; - - if (!tab || !bmap) - return -1; - - tab_total = isl_basic_map_total_dim(tab->bmap); - bmap_total = isl_basic_map_total_dim(bmap); - dim = isl_space_dim(tab->bmap->dim, isl_dim_all); - - v = isl_vec_alloc(bmap->ctx, 1 + tab_total); - if (!v) - return -1; - - if (c < 2 * bmap->n_eq) { - if ((c % 2) != oppose) - isl_seq_neg(bmap->eq[c/2], bmap->eq[c/2], - 1 + bmap_total); - if (oppose) - isl_int_sub_ui(bmap->eq[c/2][0], bmap->eq[c/2][0], 1); - expand_constraint(v, dim, bmap->eq[c/2], div_map, bmap->n_div); - r = isl_tab_add_ineq(tab, v->el); - if (oppose) - isl_int_add_ui(bmap->eq[c/2][0], bmap->eq[c/2][0], 1); - if ((c % 2) != oppose) - isl_seq_neg(bmap->eq[c/2], bmap->eq[c/2], - 1 + bmap_total); - } else { - c -= 2 * bmap->n_eq; - if (oppose) { - isl_seq_neg(bmap->ineq[c], bmap->ineq[c], - 1 + bmap_total); - isl_int_sub_ui(bmap->ineq[c][0], bmap->ineq[c][0], 1); - } - expand_constraint(v, dim, bmap->ineq[c], div_map, bmap->n_div); - r = isl_tab_add_ineq(tab, v->el); - if (oppose) { - isl_int_add_ui(bmap->ineq[c][0], bmap->ineq[c][0], 1); - isl_seq_neg(bmap->ineq[c], bmap->ineq[c], - 1 + bmap_total); - } - } - - isl_vec_free(v); - return r; -} - -static int tab_add_divs(struct isl_tab *tab, __isl_keep isl_basic_map *bmap, - int **div_map) -{ - int i, j; - struct isl_vec *vec; - unsigned total; - unsigned dim; - - if (!bmap) - return -1; - if (!bmap->n_div) - return 0; - - if (!*div_map) - *div_map = isl_alloc_array(bmap->ctx, int, bmap->n_div); - if (!*div_map) - return -1; - - total = isl_basic_map_total_dim(tab->bmap); - dim = total - tab->bmap->n_div; - vec = isl_vec_alloc(bmap->ctx, 2 + total + bmap->n_div); - if (!vec) - return -1; - - for (i = 0; i < bmap->n_div; ++i) { - isl_seq_cpy(vec->el, bmap->div[i], 2 + dim); - isl_seq_clr(vec->el + 2 + dim, tab->bmap->n_div); - for (j = 0; j < i; ++j) - isl_int_set(vec->el[2 + dim + (*div_map)[j]], - bmap->div[i][2 + dim + j]); - for (j = 0; j < tab->bmap->n_div; ++j) - if (isl_seq_eq(tab->bmap->div[j], - vec->el, 2 + dim + tab->bmap->n_div)) - break; - (*div_map)[i] = j; - if (j == tab->bmap->n_div) { - vec->size = 2 + dim + tab->bmap->n_div; - if (isl_tab_add_div(tab, vec, NULL, NULL) < 0) - goto error; - } - } - - isl_vec_free(vec); - - return 0; -error: - isl_vec_free(vec); - - return -1; -} - -/* Freeze all constraints of tableau tab. - */ -static int tab_freeze_constraints(struct isl_tab *tab) -{ - int i; - - for (i = 0; i < tab->n_con; ++i) - if (isl_tab_freeze_constraint(tab, i) < 0) - return -1; - - return 0; -} - -/* Check for redundant constraints starting at offset. - * Put the indices of the redundant constraints in index - * and return the number of redundant constraints. - */ -static int n_non_redundant(isl_ctx *ctx, struct isl_tab *tab, - int offset, int **index) -{ - int i, n; - int n_test = tab->n_con - offset; - - if (isl_tab_detect_redundant(tab) < 0) - return -1; - - if (!*index) - *index = isl_alloc_array(ctx, int, n_test); - if (!*index) - return -1; - - for (n = 0, i = 0; i < n_test; ++i) { - int r; - r = isl_tab_is_redundant(tab, offset + i); - if (r < 0) - return -1; - if (r) - continue; - (*index)[n++] = i; - } - - return n; -} - -/* basic_map_collect_diff calls add on each of the pieces of - * the set difference between bmap and map until the add method - * return a negative value. - */ -struct isl_diff_collector { - int (*add)(struct isl_diff_collector *dc, - __isl_take isl_basic_map *bmap); -}; - -/* Compute the set difference between bmap and map and call - * dc->add on each of the piece until this function returns - * a negative value. - * Return 0 on success and -1 on error. dc->add returning - * a negative value is treated as an error, but the calling - * function can interpret the results based on the state of dc. - * - * Assumes that map has known divs. - * - * The difference is computed by a backtracking algorithm. - * Each level corresponds to a basic map in "map". - * When a node in entered for the first time, we check - * if the corresonding basic map intersects the current piece - * of "bmap". If not, we move to the next level. - * Otherwise, we split the current piece into as many - * pieces as there are non-redundant constraints of the current - * basic map in the intersection. Each of these pieces is - * handled by a child of the current node. - * In particular, if there are n non-redundant constraints, - * then for each 0 <= i < n, a piece is cut off by adding - * constraints 0 <= j < i and adding the opposite of constraint i. - * If there are no non-redundant constraints, meaning that the current - * piece is a subset of the current basic map, then we simply backtrack. - * - * In the leaves, we check if the remaining piece has any integer points - * and if so, pass it along to dc->add. As a special case, if nothing - * has been removed when we end up in a leaf, we simply pass along - * the original basic map. - */ -static int basic_map_collect_diff(__isl_take isl_basic_map *bmap, - __isl_take isl_map *map, struct isl_diff_collector *dc) -{ - int i; - int modified; - int level; - int init; - int empty; - isl_ctx *ctx; - struct isl_tab *tab = NULL; - struct isl_tab_undo **snap = NULL; - int *k = NULL; - int *n = NULL; - int **index = NULL; - int **div_map = NULL; - - empty = isl_basic_map_is_empty(bmap); - if (empty) { - isl_basic_map_free(bmap); - isl_map_free(map); - return empty < 0 ? -1 : 0; - } - - bmap = isl_basic_map_cow(bmap); - map = isl_map_cow(map); - - if (!bmap || !map) - goto error; - - ctx = map->ctx; - snap = isl_alloc_array(map->ctx, struct isl_tab_undo *, map->n); - k = isl_alloc_array(map->ctx, int, map->n); - n = isl_alloc_array(map->ctx, int, map->n); - index = isl_calloc_array(map->ctx, int *, map->n); - div_map = isl_calloc_array(map->ctx, int *, map->n); - if (!snap || !k || !n || !index || !div_map) - goto error; - - bmap = isl_basic_map_order_divs(bmap); - map = isl_map_order_divs(map); - - tab = isl_tab_from_basic_map(bmap); - if (isl_tab_track_bmap(tab, isl_basic_map_copy(bmap)) < 0) - goto error; - - modified = 0; - level = 0; - init = 1; - - while (level >= 0) { - if (level >= map->n) { - int empty; - struct isl_basic_map *bm; - if (!modified) { - if (dc->add(dc, isl_basic_map_copy(bmap)) < 0) - goto error; - break; - } - bm = isl_basic_map_copy(tab->bmap); - bm = isl_basic_map_cow(bm); - bm = isl_basic_map_update_from_tab(bm, tab); - bm = isl_basic_map_simplify(bm); - bm = isl_basic_map_finalize(bm); - empty = isl_basic_map_is_empty(bm); - if (empty) - isl_basic_map_free(bm); - else if (dc->add(dc, bm) < 0) - goto error; - if (empty < 0) - goto error; - level--; - init = 0; - continue; - } - if (init) { - int offset; - struct isl_tab_undo *snap2; - snap2 = isl_tab_snap(tab); - if (tab_add_divs(tab, map->p[level], - &div_map[level]) < 0) - goto error; - offset = tab->n_con; - snap[level] = isl_tab_snap(tab); - if (tab_freeze_constraints(tab) < 0) - goto error; - if (tab_add_constraints(tab, map->p[level], - div_map[level]) < 0) - goto error; - k[level] = 0; - n[level] = 0; - if (tab->empty) { - if (isl_tab_rollback(tab, snap2) < 0) - goto error; - level++; - continue; - } - modified = 1; - n[level] = n_non_redundant(ctx, tab, offset, - &index[level]); - if (n[level] < 0) - goto error; - if (n[level] == 0) { - level--; - init = 0; - continue; - } - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - if (tab_add_constraint(tab, map->p[level], - div_map[level], index[level][0], 1) < 0) - goto error; - level++; - continue; - } else { - if (k[level] + 1 >= n[level]) { - level--; - continue; - } - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - if (tab_add_constraint(tab, map->p[level], - div_map[level], - index[level][k[level]], 0) < 0) - goto error; - snap[level] = isl_tab_snap(tab); - k[level]++; - if (tab_add_constraint(tab, map->p[level], - div_map[level], - index[level][k[level]], 1) < 0) - goto error; - level++; - init = 1; - continue; - } - } - - isl_tab_free(tab); - free(snap); - free(n); - free(k); - for (i = 0; index && i < map->n; ++i) - free(index[i]); - free(index); - for (i = 0; div_map && i < map->n; ++i) - free(div_map[i]); - free(div_map); - - isl_basic_map_free(bmap); - isl_map_free(map); - - return 0; -error: - isl_tab_free(tab); - free(snap); - free(n); - free(k); - for (i = 0; index && i < map->n; ++i) - free(index[i]); - free(index); - for (i = 0; div_map && i < map->n; ++i) - free(div_map[i]); - free(div_map); - isl_basic_map_free(bmap); - isl_map_free(map); - return -1; -} - -/* A diff collector that actually collects all parts of the - * set difference in the field diff. - */ -struct isl_subtract_diff_collector { - struct isl_diff_collector dc; - struct isl_map *diff; -}; - -/* isl_subtract_diff_collector callback. - */ -static int basic_map_subtract_add(struct isl_diff_collector *dc, - __isl_take isl_basic_map *bmap) -{ - struct isl_subtract_diff_collector *sdc; - sdc = (struct isl_subtract_diff_collector *)dc; - - sdc->diff = isl_map_union_disjoint(sdc->diff, - isl_map_from_basic_map(bmap)); - - return sdc->diff ? 0 : -1; -} - -/* Return the set difference between bmap and map. - */ -static __isl_give isl_map *basic_map_subtract(__isl_take isl_basic_map *bmap, - __isl_take isl_map *map) -{ - struct isl_subtract_diff_collector sdc; - sdc.dc.add = &basic_map_subtract_add; - sdc.diff = isl_map_empty_like_basic_map(bmap); - if (basic_map_collect_diff(bmap, map, &sdc.dc) < 0) { - isl_map_free(sdc.diff); - sdc.diff = NULL; - } - return sdc.diff; -} - -/* Return the set difference between map1 and map2. - * (U_i A_i) \ (U_j B_j) is computed as U_i (A_i \ (U_j B_j)) - */ -static __isl_give isl_map *map_subtract( __isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - int i; - struct isl_map *diff; - - if (!map1 || !map2) - goto error; - - isl_assert(map1->ctx, isl_space_is_equal(map1->dim, map2->dim), goto error); - - if (isl_map_is_empty(map2)) { - isl_map_free(map2); - return map1; - } - - map1 = isl_map_compute_divs(map1); - map2 = isl_map_compute_divs(map2); - if (!map1 || !map2) - goto error; - - map1 = isl_map_remove_empty_parts(map1); - map2 = isl_map_remove_empty_parts(map2); - - diff = isl_map_empty_like(map1); - for (i = 0; i < map1->n; ++i) { - struct isl_map *d; - d = basic_map_subtract(isl_basic_map_copy(map1->p[i]), - isl_map_copy(map2)); - if (ISL_F_ISSET(map1, ISL_MAP_DISJOINT)) - diff = isl_map_union_disjoint(diff, d); - else - diff = isl_map_union(diff, d); - } - - isl_map_free(map1); - isl_map_free(map2); - - return diff; -error: - isl_map_free(map1); - isl_map_free(map2); - return NULL; -} - -__isl_give isl_map *isl_map_subtract( __isl_take isl_map *map1, - __isl_take isl_map *map2) -{ - return isl_map_align_params_map_map_and(map1, map2, &map_subtract); -} - -struct isl_set *isl_set_subtract(struct isl_set *set1, struct isl_set *set2) -{ - return (struct isl_set *) - isl_map_subtract( - (struct isl_map *)set1, (struct isl_map *)set2); -} - -/* Remove the elements of "dom" from the domain of "map". - */ -static __isl_give isl_map *map_subtract_domain(__isl_take isl_map *map, - __isl_take isl_set *dom) -{ - isl_map *ext_dom; - - if (!isl_map_compatible_domain(map, dom)) - isl_die(isl_set_get_ctx(dom), isl_error_invalid, - "incompatible spaces", goto error); - - ext_dom = isl_map_universe(isl_map_get_space(map)); - ext_dom = isl_map_intersect_domain(ext_dom, dom); - return isl_map_subtract(map, ext_dom); -error: - isl_map_free(map); - isl_set_free(dom); - return NULL; -} - -__isl_give isl_map *isl_map_subtract_domain(__isl_take isl_map *map, - __isl_take isl_set *dom) -{ - return isl_map_align_params_map_map_and(map, dom, &map_subtract_domain); -} - -/* Remove the elements of "dom" from the range of "map". - */ -static __isl_give isl_map *map_subtract_range(__isl_take isl_map *map, - __isl_take isl_set *dom) -{ - isl_map *ext_dom; - - if (!isl_map_compatible_range(map, dom)) - isl_die(isl_set_get_ctx(dom), isl_error_invalid, - "incompatible spaces", goto error); - - ext_dom = isl_map_universe(isl_map_get_space(map)); - ext_dom = isl_map_intersect_range(ext_dom, dom); - return isl_map_subtract(map, ext_dom); -error: - isl_map_free(map); - isl_set_free(dom); - return NULL; -} - -__isl_give isl_map *isl_map_subtract_range(__isl_take isl_map *map, - __isl_take isl_set *dom) -{ - return isl_map_align_params_map_map_and(map, dom, &map_subtract_range); -} - -/* A diff collector that aborts as soon as its add function is called, - * setting empty to 0. - */ -struct isl_is_empty_diff_collector { - struct isl_diff_collector dc; - int empty; -}; - -/* isl_is_empty_diff_collector callback. - */ -static int basic_map_is_empty_add(struct isl_diff_collector *dc, - __isl_take isl_basic_map *bmap) -{ - struct isl_is_empty_diff_collector *edc; - edc = (struct isl_is_empty_diff_collector *)dc; - - edc->empty = 0; - - isl_basic_map_free(bmap); - return -1; -} - -/* Check if bmap \ map is empty by computing this set difference - * and breaking off as soon as the difference is known to be non-empty. - */ -static int basic_map_diff_is_empty(__isl_keep isl_basic_map *bmap, - __isl_keep isl_map *map) -{ - int r; - struct isl_is_empty_diff_collector edc; - - r = isl_basic_map_plain_is_empty(bmap); - if (r) - return r; - - edc.dc.add = &basic_map_is_empty_add; - edc.empty = 1; - r = basic_map_collect_diff(isl_basic_map_copy(bmap), - isl_map_copy(map), &edc.dc); - if (!edc.empty) - return 0; - - return r < 0 ? -1 : 1; -} - -/* Check if map1 \ map2 is empty by checking if the set difference is empty - * for each of the basic maps in map1. - */ -static int map_diff_is_empty(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - int i; - int is_empty = 1; - - if (!map1 || !map2) - return -1; - - for (i = 0; i < map1->n; ++i) { - is_empty = basic_map_diff_is_empty(map1->p[i], map2); - if (is_empty < 0 || !is_empty) - break; - } - - return is_empty; -} - -/* Return 1 if "bmap" contains a single element. - */ -int isl_basic_map_plain_is_singleton(__isl_keep isl_basic_map *bmap) -{ - if (!bmap) - return -1; - if (bmap->n_div) - return 0; - if (bmap->n_ineq) - return 0; - return bmap->n_eq == isl_basic_map_total_dim(bmap); -} - -/* Return 1 if "map" contains a single element. - */ -int isl_map_plain_is_singleton(__isl_keep isl_map *map) -{ - if (!map) - return -1; - if (map->n != 1) - return 0; - - return isl_basic_map_plain_is_singleton(map->p[0]); -} - -/* Given a singleton basic map, extract the single element - * as an isl_point. - */ -static __isl_give isl_point *singleton_extract_point( - __isl_keep isl_basic_map *bmap) -{ - int j; - unsigned dim; - struct isl_vec *point; - isl_int m; - - if (!bmap) - return NULL; - - dim = isl_basic_map_total_dim(bmap); - isl_assert(bmap->ctx, bmap->n_eq == dim, return NULL); - point = isl_vec_alloc(bmap->ctx, 1 + dim); - if (!point) - return NULL; - - isl_int_init(m); - - isl_int_set_si(point->el[0], 1); - for (j = 0; j < bmap->n_eq; ++j) { - int i = dim - 1 - j; - isl_assert(bmap->ctx, - isl_seq_first_non_zero(bmap->eq[j] + 1, i) == -1, - goto error); - isl_assert(bmap->ctx, - isl_int_is_one(bmap->eq[j][1 + i]) || - isl_int_is_negone(bmap->eq[j][1 + i]), - goto error); - isl_assert(bmap->ctx, - isl_seq_first_non_zero(bmap->eq[j]+1+i+1, dim-i-1) == -1, - goto error); - - isl_int_gcd(m, point->el[0], bmap->eq[j][1 + i]); - isl_int_divexact(m, bmap->eq[j][1 + i], m); - isl_int_abs(m, m); - isl_seq_scale(point->el, point->el, m, 1 + i); - isl_int_divexact(m, point->el[0], bmap->eq[j][1 + i]); - isl_int_neg(m, m); - isl_int_mul(point->el[1 + i], m, bmap->eq[j][0]); - } - - isl_int_clear(m); - return isl_point_alloc(isl_basic_map_get_space(bmap), point); -error: - isl_int_clear(m); - isl_vec_free(point); - return NULL; -} - -/* Return 1 is the singleton map "map1" is a subset of "map2", - * i.e., if the single element of "map1" is also an element of "map2". - * Assumes "map2" has known divs. - */ -static int map_is_singleton_subset(__isl_keep isl_map *map1, - __isl_keep isl_map *map2) -{ - int i; - int is_subset = 0; - struct isl_point *point; - - if (!map1 || !map2) - return -1; - if (map1->n != 1) - return -1; - - point = singleton_extract_point(map1->p[0]); - if (!point) - return -1; - - for (i = 0; i < map2->n; ++i) { - is_subset = isl_basic_map_contains_point(map2->p[i], point); - if (is_subset) - break; - } - - isl_point_free(point); - return is_subset; -} - -static int map_is_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - int is_subset = 0; - - if (!map1 || !map2) - return -1; - - if (!isl_map_has_equal_space(map1, map2)) - return 0; - - if (isl_map_is_empty(map1)) - return 1; - - if (isl_map_is_empty(map2)) - return 0; - - if (isl_map_plain_is_universe(map2)) - return 1; - - map2 = isl_map_compute_divs(isl_map_copy(map2)); - if (isl_map_plain_is_singleton(map1)) { - is_subset = map_is_singleton_subset(map1, map2); - isl_map_free(map2); - return is_subset; - } - is_subset = map_diff_is_empty(map1, map2); - isl_map_free(map2); - - return is_subset; -} - -int isl_map_is_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2) -{ - return isl_map_align_params_map_map_and_test(map1, map2, - &map_is_subset); -} - -int isl_set_is_subset(struct isl_set *set1, struct isl_set *set2) -{ - return isl_map_is_subset( - (struct isl_map *)set1, (struct isl_map *)set2); -} - -__isl_give isl_map *isl_map_make_disjoint(__isl_take isl_map *map) -{ - int i; - struct isl_subtract_diff_collector sdc; - sdc.dc.add = &basic_map_subtract_add; - - if (!map) - return NULL; - if (ISL_F_ISSET(map, ISL_MAP_DISJOINT)) - return map; - if (map->n <= 1) - return map; - - map = isl_map_compute_divs(map); - map = isl_map_remove_empty_parts(map); - - if (!map || map->n <= 1) - return map; - - sdc.diff = isl_map_from_basic_map(isl_basic_map_copy(map->p[0])); - - for (i = 1; i < map->n; ++i) { - struct isl_basic_map *bmap = isl_basic_map_copy(map->p[i]); - struct isl_map *copy = isl_map_copy(sdc.diff); - if (basic_map_collect_diff(bmap, copy, &sdc.dc) < 0) { - isl_map_free(sdc.diff); - sdc.diff = NULL; - break; - } - } - - isl_map_free(map); - - return sdc.diff; -} - -__isl_give isl_set *isl_set_make_disjoint(__isl_take isl_set *set) -{ - return (struct isl_set *)isl_map_make_disjoint((struct isl_map *)set); -} - -__isl_give isl_set *isl_set_complement(__isl_take isl_set *set) -{ - isl_set *universe; - - if (!set) - return NULL; - - universe = isl_set_universe(isl_set_get_space(set)); - - return isl_set_subtract(universe, set); -} diff --git a/cloog-0.17.0/isl/isl_mat.c b/cloog-0.17.0/isl/isl_mat.c deleted file mode 100644 index 97249003ee327b1320ddb954a3cf582b22ccdcdb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_mat.c +++ /dev/null @@ -1,1632 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include "isl_map_private.h" -#include - -isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat) -{ - return mat ? mat->ctx : NULL; -} - -struct isl_mat *isl_mat_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_col) -{ - int i; - struct isl_mat *mat; - - mat = isl_alloc_type(ctx, struct isl_mat); - if (!mat) - return NULL; - - mat->row = NULL; - mat->block = isl_blk_alloc(ctx, n_row * n_col); - if (isl_blk_is_error(mat->block)) - goto error; - mat->row = isl_alloc_array(ctx, isl_int *, n_row); - if (!mat->row) - goto error; - - for (i = 0; i < n_row; ++i) - mat->row[i] = mat->block.data + i * n_col; - - mat->ctx = ctx; - isl_ctx_ref(ctx); - mat->ref = 1; - mat->n_row = n_row; - mat->n_col = n_col; - mat->max_col = n_col; - mat->flags = 0; - - return mat; -error: - isl_blk_free(ctx, mat->block); - free(mat); - return NULL; -} - -struct isl_mat *isl_mat_extend(struct isl_mat *mat, - unsigned n_row, unsigned n_col) -{ - int i; - isl_int *old; - isl_int **row; - - if (!mat) - return NULL; - - if (mat->max_col >= n_col && mat->n_row >= n_row) { - if (mat->n_col < n_col) - mat->n_col = n_col; - return mat; - } - - if (mat->max_col < n_col) { - struct isl_mat *new_mat; - - if (n_row < mat->n_row) - n_row = mat->n_row; - new_mat = isl_mat_alloc(mat->ctx, n_row, n_col); - if (!new_mat) - goto error; - for (i = 0; i < mat->n_row; ++i) - isl_seq_cpy(new_mat->row[i], mat->row[i], mat->n_col); - isl_mat_free(mat); - return new_mat; - } - - mat = isl_mat_cow(mat); - if (!mat) - goto error; - - old = mat->block.data; - mat->block = isl_blk_extend(mat->ctx, mat->block, n_row * mat->max_col); - if (isl_blk_is_error(mat->block)) - goto error; - row = isl_realloc_array(mat->ctx, mat->row, isl_int *, n_row); - if (!row) - goto error; - mat->row = row; - - for (i = 0; i < mat->n_row; ++i) - mat->row[i] = mat->block.data + (mat->row[i] - old); - for (i = mat->n_row; i < n_row; ++i) - mat->row[i] = mat->block.data + i * mat->max_col; - mat->n_row = n_row; - if (mat->n_col < n_col) - mat->n_col = n_col; - - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col) -{ - int i; - struct isl_mat *mat; - - mat = isl_alloc_type(ctx, struct isl_mat); - if (!mat) - return NULL; - mat->row = isl_alloc_array(ctx, isl_int *, n_row); - if (!mat->row) - goto error; - for (i = 0; i < n_row; ++i) - mat->row[i] = row[first_row+i] + first_col; - mat->ctx = ctx; - isl_ctx_ref(ctx); - mat->ref = 1; - mat->n_row = n_row; - mat->n_col = n_col; - mat->block = isl_blk_empty(); - mat->flags = ISL_MAT_BORROWED; - return mat; -error: - free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_sub_alloc(__isl_keep isl_mat *mat, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col) -{ - if (!mat) - return NULL; - return isl_mat_sub_alloc6(mat->ctx, mat->row, first_row, n_row, - first_col, n_col); -} - -void isl_mat_sub_copy(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col) -{ - int i; - - for (i = 0; i < n_row; ++i) - isl_seq_cpy(dst[i]+dst_col, src[i]+src_col, n_col); -} - -void isl_mat_sub_neg(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col) -{ - int i; - - for (i = 0; i < n_row; ++i) - isl_seq_neg(dst[i]+dst_col, src[i]+src_col, n_col); -} - -struct isl_mat *isl_mat_copy(struct isl_mat *mat) -{ - if (!mat) - return NULL; - - mat->ref++; - return mat; -} - -struct isl_mat *isl_mat_dup(struct isl_mat *mat) -{ - int i; - struct isl_mat *mat2; - - if (!mat) - return NULL; - mat2 = isl_mat_alloc(mat->ctx, mat->n_row, mat->n_col); - if (!mat2) - return NULL; - for (i = 0; i < mat->n_row; ++i) - isl_seq_cpy(mat2->row[i], mat->row[i], mat->n_col); - return mat2; -} - -struct isl_mat *isl_mat_cow(struct isl_mat *mat) -{ - struct isl_mat *mat2; - if (!mat) - return NULL; - - if (mat->ref == 1 && !ISL_F_ISSET(mat, ISL_MAT_BORROWED)) - return mat; - - mat2 = isl_mat_dup(mat); - isl_mat_free(mat); - return mat2; -} - -void isl_mat_free(struct isl_mat *mat) -{ - if (!mat) - return; - - if (--mat->ref > 0) - return; - - if (!ISL_F_ISSET(mat, ISL_MAT_BORROWED)) - isl_blk_free(mat->ctx, mat->block); - isl_ctx_deref(mat->ctx); - free(mat->row); - free(mat); -} - -int isl_mat_rows(__isl_keep isl_mat *mat) -{ - return mat ? mat->n_row : -1; -} - -int isl_mat_cols(__isl_keep isl_mat *mat) -{ - return mat ? mat->n_col : -1; -} - -int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v) -{ - if (!mat) - return -1; - if (row < 0 || row >= mat->n_row) - isl_die(mat->ctx, isl_error_invalid, "row out of range", - return -1); - if (col < 0 || col >= mat->n_col) - isl_die(mat->ctx, isl_error_invalid, "column out of range", - return -1); - isl_int_set(*v, mat->row[row][col]); - return 0; -} - -__isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, - int row, int col, isl_int v) -{ - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - if (row < 0 || row >= mat->n_row) - isl_die(mat->ctx, isl_error_invalid, "row out of range", - goto error); - if (col < 0 || col >= mat->n_col) - isl_die(mat->ctx, isl_error_invalid, "column out of range", - goto error); - isl_int_set(mat->row[row][col], v); - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, - int row, int col, int v) -{ - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - if (row < 0 || row >= mat->n_row) - isl_die(mat->ctx, isl_error_invalid, "row out of range", - goto error); - if (col < 0 || col >= mat->n_col) - isl_die(mat->ctx, isl_error_invalid, "column out of range", - goto error); - isl_int_set_si(mat->row[row][col], v); - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_diag(isl_ctx *ctx, unsigned n_row, isl_int d) -{ - int i; - struct isl_mat *mat; - - mat = isl_mat_alloc(ctx, n_row, n_row); - if (!mat) - return NULL; - for (i = 0; i < n_row; ++i) { - isl_seq_clr(mat->row[i], i); - isl_int_set(mat->row[i][i], d); - isl_seq_clr(mat->row[i]+i+1, n_row-(i+1)); - } - - return mat; -} - -__isl_give isl_mat *isl_mat_identity(isl_ctx *ctx, unsigned n_row) -{ - if (!ctx) - return NULL; - return isl_mat_diag(ctx, n_row, ctx->one); -} - -struct isl_vec *isl_mat_vec_product(struct isl_mat *mat, struct isl_vec *vec) -{ - int i; - struct isl_vec *prod; - - if (!mat || !vec) - goto error; - - isl_assert(mat->ctx, mat->n_col == vec->size, goto error); - - prod = isl_vec_alloc(mat->ctx, mat->n_row); - if (!prod) - goto error; - - for (i = 0; i < prod->size; ++i) - isl_seq_inner_product(mat->row[i], vec->el, vec->size, - &prod->block.data[i]); - isl_mat_free(mat); - isl_vec_free(vec); - return prod; -error: - isl_mat_free(mat); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_vec *isl_mat_vec_inverse_product(__isl_take isl_mat *mat, - __isl_take isl_vec *vec) -{ - struct isl_mat *vec_mat; - int i; - - if (!mat || !vec) - goto error; - vec_mat = isl_mat_alloc(vec->ctx, vec->size, 1); - if (!vec_mat) - goto error; - for (i = 0; i < vec->size; ++i) - isl_int_set(vec_mat->row[i][0], vec->el[i]); - vec_mat = isl_mat_inverse_product(mat, vec_mat); - isl_vec_free(vec); - if (!vec_mat) - return NULL; - vec = isl_vec_alloc(vec_mat->ctx, vec_mat->n_row); - if (vec) - for (i = 0; i < vec->size; ++i) - isl_int_set(vec->el[i], vec_mat->row[i][0]); - isl_mat_free(vec_mat); - return vec; -error: - isl_mat_free(mat); - isl_vec_free(vec); - return NULL; -} - -struct isl_vec *isl_vec_mat_product(struct isl_vec *vec, struct isl_mat *mat) -{ - int i, j; - struct isl_vec *prod; - - if (!mat || !vec) - goto error; - - isl_assert(mat->ctx, mat->n_row == vec->size, goto error); - - prod = isl_vec_alloc(mat->ctx, mat->n_col); - if (!prod) - goto error; - - for (i = 0; i < prod->size; ++i) { - isl_int_set_si(prod->el[i], 0); - for (j = 0; j < vec->size; ++j) - isl_int_addmul(prod->el[i], vec->el[j], mat->row[j][i]); - } - isl_mat_free(mat); - isl_vec_free(vec); - return prod; -error: - isl_mat_free(mat); - isl_vec_free(vec); - return NULL; -} - -struct isl_mat *isl_mat_aff_direct_sum(struct isl_mat *left, - struct isl_mat *right) -{ - int i; - struct isl_mat *sum; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, left->n_row == right->n_row, goto error); - isl_assert(left->ctx, left->n_row >= 1, goto error); - isl_assert(left->ctx, left->n_col >= 1, goto error); - isl_assert(left->ctx, right->n_col >= 1, goto error); - isl_assert(left->ctx, - isl_seq_first_non_zero(left->row[0]+1, left->n_col-1) == -1, - goto error); - isl_assert(left->ctx, - isl_seq_first_non_zero(right->row[0]+1, right->n_col-1) == -1, - goto error); - - sum = isl_mat_alloc(left->ctx, left->n_row, left->n_col + right->n_col - 1); - if (!sum) - goto error; - isl_int_lcm(sum->row[0][0], left->row[0][0], right->row[0][0]); - isl_int_divexact(left->row[0][0], sum->row[0][0], left->row[0][0]); - isl_int_divexact(right->row[0][0], sum->row[0][0], right->row[0][0]); - - isl_seq_clr(sum->row[0]+1, sum->n_col-1); - for (i = 1; i < sum->n_row; ++i) { - isl_int_mul(sum->row[i][0], left->row[0][0], left->row[i][0]); - isl_int_addmul(sum->row[i][0], - right->row[0][0], right->row[i][0]); - isl_seq_scale(sum->row[i]+1, left->row[i]+1, left->row[0][0], - left->n_col-1); - isl_seq_scale(sum->row[i]+left->n_col, - right->row[i]+1, right->row[0][0], - right->n_col-1); - } - - isl_int_divexact(left->row[0][0], sum->row[0][0], left->row[0][0]); - isl_int_divexact(right->row[0][0], sum->row[0][0], right->row[0][0]); - isl_mat_free(left); - isl_mat_free(right); - return sum; -error: - isl_mat_free(left); - isl_mat_free(right); - return NULL; -} - -static void exchange(struct isl_mat *M, struct isl_mat **U, - struct isl_mat **Q, unsigned row, unsigned i, unsigned j) -{ - int r; - for (r = row; r < M->n_row; ++r) - isl_int_swap(M->row[r][i], M->row[r][j]); - if (U) { - for (r = 0; r < (*U)->n_row; ++r) - isl_int_swap((*U)->row[r][i], (*U)->row[r][j]); - } - if (Q) - isl_mat_swap_rows(*Q, i, j); -} - -static void subtract(struct isl_mat *M, struct isl_mat **U, - struct isl_mat **Q, unsigned row, unsigned i, unsigned j, isl_int m) -{ - int r; - for (r = row; r < M->n_row; ++r) - isl_int_submul(M->row[r][j], m, M->row[r][i]); - if (U) { - for (r = 0; r < (*U)->n_row; ++r) - isl_int_submul((*U)->row[r][j], m, (*U)->row[r][i]); - } - if (Q) { - for (r = 0; r < (*Q)->n_col; ++r) - isl_int_addmul((*Q)->row[i][r], m, (*Q)->row[j][r]); - } -} - -static void oppose(struct isl_mat *M, struct isl_mat **U, - struct isl_mat **Q, unsigned row, unsigned col) -{ - int r; - for (r = row; r < M->n_row; ++r) - isl_int_neg(M->row[r][col], M->row[r][col]); - if (U) { - for (r = 0; r < (*U)->n_row; ++r) - isl_int_neg((*U)->row[r][col], (*U)->row[r][col]); - } - if (Q) - isl_seq_neg((*Q)->row[col], (*Q)->row[col], (*Q)->n_col); -} - -/* Given matrix M, compute - * - * M U = H - * M = H Q - * - * with U and Q unimodular matrices and H a matrix in column echelon form - * such that on each echelon row the entries in the non-echelon column - * are non-negative (if neg == 0) or non-positive (if neg == 1) - * and stricly smaller (in absolute value) than the entries in the echelon - * column. - * If U or Q are NULL, then these matrices are not computed. - */ -struct isl_mat *isl_mat_left_hermite(struct isl_mat *M, int neg, - struct isl_mat **U, struct isl_mat **Q) -{ - isl_int c; - int row, col; - - if (U) - *U = NULL; - if (Q) - *Q = NULL; - if (!M) - goto error; - M = isl_mat_cow(M); - if (!M) - goto error; - if (U) { - *U = isl_mat_identity(M->ctx, M->n_col); - if (!*U) - goto error; - } - if (Q) { - *Q = isl_mat_identity(M->ctx, M->n_col); - if (!*Q) - goto error; - } - - col = 0; - isl_int_init(c); - for (row = 0; row < M->n_row; ++row) { - int first, i, off; - first = isl_seq_abs_min_non_zero(M->row[row]+col, M->n_col-col); - if (first == -1) - continue; - first += col; - if (first != col) - exchange(M, U, Q, row, first, col); - if (isl_int_is_neg(M->row[row][col])) - oppose(M, U, Q, row, col); - first = col+1; - while ((off = isl_seq_first_non_zero(M->row[row]+first, - M->n_col-first)) != -1) { - first += off; - isl_int_fdiv_q(c, M->row[row][first], M->row[row][col]); - subtract(M, U, Q, row, col, first, c); - if (!isl_int_is_zero(M->row[row][first])) - exchange(M, U, Q, row, first, col); - else - ++first; - } - for (i = 0; i < col; ++i) { - if (isl_int_is_zero(M->row[row][i])) - continue; - if (neg) - isl_int_cdiv_q(c, M->row[row][i], M->row[row][col]); - else - isl_int_fdiv_q(c, M->row[row][i], M->row[row][col]); - if (isl_int_is_zero(c)) - continue; - subtract(M, U, Q, row, col, i, c); - } - ++col; - } - isl_int_clear(c); - - return M; -error: - if (Q) { - isl_mat_free(*Q); - *Q = NULL; - } - if (U) { - isl_mat_free(*U); - *U = NULL; - } - isl_mat_free(M); - return NULL; -} - -struct isl_mat *isl_mat_right_kernel(struct isl_mat *mat) -{ - int i, rank; - struct isl_mat *U = NULL; - struct isl_mat *K; - - mat = isl_mat_left_hermite(mat, 0, &U, NULL); - if (!mat || !U) - goto error; - - for (i = 0, rank = 0; rank < mat->n_col; ++rank) { - while (i < mat->n_row && isl_int_is_zero(mat->row[i][rank])) - ++i; - if (i >= mat->n_row) - break; - } - K = isl_mat_alloc(U->ctx, U->n_row, U->n_col - rank); - if (!K) - goto error; - isl_mat_sub_copy(K->ctx, K->row, U->row, U->n_row, 0, rank, U->n_col-rank); - isl_mat_free(mat); - isl_mat_free(U); - return K; -error: - isl_mat_free(mat); - isl_mat_free(U); - return NULL; -} - -struct isl_mat *isl_mat_lin_to_aff(struct isl_mat *mat) -{ - int i; - struct isl_mat *mat2; - - if (!mat) - return NULL; - mat2 = isl_mat_alloc(mat->ctx, 1+mat->n_row, 1+mat->n_col); - if (!mat2) - goto error; - isl_int_set_si(mat2->row[0][0], 1); - isl_seq_clr(mat2->row[0]+1, mat->n_col); - for (i = 0; i < mat->n_row; ++i) { - isl_int_set_si(mat2->row[1+i][0], 0); - isl_seq_cpy(mat2->row[1+i]+1, mat->row[i], mat->n_col); - } - isl_mat_free(mat); - return mat2; -error: - isl_mat_free(mat); - return NULL; -} - -/* Given two matrices M1 and M2, return the block matrix - * - * [ M1 0 ] - * [ 0 M2 ] - */ -__isl_give isl_mat *isl_mat_diagonal(__isl_take isl_mat *mat1, - __isl_take isl_mat *mat2) -{ - int i; - isl_mat *mat; - - if (!mat1 || !mat2) - goto error; - - mat = isl_mat_alloc(mat1->ctx, mat1->n_row + mat2->n_row, - mat1->n_col + mat2->n_col); - if (!mat) - goto error; - for (i = 0; i < mat1->n_row; ++i) { - isl_seq_cpy(mat->row[i], mat1->row[i], mat1->n_col); - isl_seq_clr(mat->row[i] + mat1->n_col, mat2->n_col); - } - for (i = 0; i < mat2->n_row; ++i) { - isl_seq_clr(mat->row[mat1->n_row + i], mat1->n_col); - isl_seq_cpy(mat->row[mat1->n_row + i] + mat1->n_col, - mat2->row[i], mat2->n_col); - } - isl_mat_free(mat1); - isl_mat_free(mat2); - return mat; -error: - isl_mat_free(mat1); - isl_mat_free(mat2); - return NULL; -} - -static int row_first_non_zero(isl_int **row, unsigned n_row, unsigned col) -{ - int i; - - for (i = 0; i < n_row; ++i) - if (!isl_int_is_zero(row[i][col])) - return i; - return -1; -} - -static int row_abs_min_non_zero(isl_int **row, unsigned n_row, unsigned col) -{ - int i, min = row_first_non_zero(row, n_row, col); - if (min < 0) - return -1; - for (i = min + 1; i < n_row; ++i) { - if (isl_int_is_zero(row[i][col])) - continue; - if (isl_int_abs_lt(row[i][col], row[min][col])) - min = i; - } - return min; -} - -static void inv_exchange(struct isl_mat *left, struct isl_mat *right, - unsigned i, unsigned j) -{ - left = isl_mat_swap_rows(left, i, j); - right = isl_mat_swap_rows(right, i, j); -} - -static void inv_oppose( - struct isl_mat *left, struct isl_mat *right, unsigned row) -{ - isl_seq_neg(left->row[row]+row, left->row[row]+row, left->n_col-row); - isl_seq_neg(right->row[row], right->row[row], right->n_col); -} - -static void inv_subtract(struct isl_mat *left, struct isl_mat *right, - unsigned row, unsigned i, isl_int m) -{ - isl_int_neg(m, m); - isl_seq_combine(left->row[i]+row, - left->ctx->one, left->row[i]+row, - m, left->row[row]+row, - left->n_col-row); - isl_seq_combine(right->row[i], right->ctx->one, right->row[i], - m, right->row[row], right->n_col); -} - -/* Compute inv(left)*right - */ -struct isl_mat *isl_mat_inverse_product(struct isl_mat *left, - struct isl_mat *right) -{ - int row; - isl_int a, b; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, left->n_row == left->n_col, goto error); - isl_assert(left->ctx, left->n_row == right->n_row, goto error); - - if (left->n_row == 0) { - isl_mat_free(left); - return right; - } - - left = isl_mat_cow(left); - right = isl_mat_cow(right); - if (!left || !right) - goto error; - - isl_int_init(a); - isl_int_init(b); - for (row = 0; row < left->n_row; ++row) { - int pivot, first, i, off; - pivot = row_abs_min_non_zero(left->row+row, left->n_row-row, row); - if (pivot < 0) { - isl_int_clear(a); - isl_int_clear(b); - isl_assert(left->ctx, pivot >= 0, goto error); - } - pivot += row; - if (pivot != row) - inv_exchange(left, right, pivot, row); - if (isl_int_is_neg(left->row[row][row])) - inv_oppose(left, right, row); - first = row+1; - while ((off = row_first_non_zero(left->row+first, - left->n_row-first, row)) != -1) { - first += off; - isl_int_fdiv_q(a, left->row[first][row], - left->row[row][row]); - inv_subtract(left, right, row, first, a); - if (!isl_int_is_zero(left->row[first][row])) - inv_exchange(left, right, row, first); - else - ++first; - } - for (i = 0; i < row; ++i) { - if (isl_int_is_zero(left->row[i][row])) - continue; - isl_int_gcd(a, left->row[row][row], left->row[i][row]); - isl_int_divexact(b, left->row[i][row], a); - isl_int_divexact(a, left->row[row][row], a); - isl_int_neg(b, b); - isl_seq_combine(left->row[i] + i, - a, left->row[i] + i, - b, left->row[row] + i, - left->n_col - i); - isl_seq_combine(right->row[i], a, right->row[i], - b, right->row[row], right->n_col); - } - } - isl_int_clear(b); - - isl_int_set(a, left->row[0][0]); - for (row = 1; row < left->n_row; ++row) - isl_int_lcm(a, a, left->row[row][row]); - if (isl_int_is_zero(a)){ - isl_int_clear(a); - isl_assert(left->ctx, 0, goto error); - } - for (row = 0; row < left->n_row; ++row) { - isl_int_divexact(left->row[row][row], a, left->row[row][row]); - if (isl_int_is_one(left->row[row][row])) - continue; - isl_seq_scale(right->row[row], right->row[row], - left->row[row][row], right->n_col); - } - isl_int_clear(a); - - isl_mat_free(left); - return right; -error: - isl_mat_free(left); - isl_mat_free(right); - return NULL; -} - -void isl_mat_col_scale(struct isl_mat *mat, unsigned col, isl_int m) -{ - int i; - - for (i = 0; i < mat->n_row; ++i) - isl_int_mul(mat->row[i][col], mat->row[i][col], m); -} - -void isl_mat_col_combine(struct isl_mat *mat, unsigned dst, - isl_int m1, unsigned src1, isl_int m2, unsigned src2) -{ - int i; - isl_int tmp; - - isl_int_init(tmp); - for (i = 0; i < mat->n_row; ++i) { - isl_int_mul(tmp, m1, mat->row[i][src1]); - isl_int_addmul(tmp, m2, mat->row[i][src2]); - isl_int_set(mat->row[i][dst], tmp); - } - isl_int_clear(tmp); -} - -struct isl_mat *isl_mat_right_inverse(struct isl_mat *mat) -{ - struct isl_mat *inv; - int row; - isl_int a, b; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - inv = isl_mat_identity(mat->ctx, mat->n_col); - inv = isl_mat_cow(inv); - if (!inv) - goto error; - - isl_int_init(a); - isl_int_init(b); - for (row = 0; row < mat->n_row; ++row) { - int pivot, first, i, off; - pivot = isl_seq_abs_min_non_zero(mat->row[row]+row, mat->n_col-row); - if (pivot < 0) { - isl_int_clear(a); - isl_int_clear(b); - isl_assert(mat->ctx, pivot >= 0, goto error); - } - pivot += row; - if (pivot != row) - exchange(mat, &inv, NULL, row, pivot, row); - if (isl_int_is_neg(mat->row[row][row])) - oppose(mat, &inv, NULL, row, row); - first = row+1; - while ((off = isl_seq_first_non_zero(mat->row[row]+first, - mat->n_col-first)) != -1) { - first += off; - isl_int_fdiv_q(a, mat->row[row][first], - mat->row[row][row]); - subtract(mat, &inv, NULL, row, row, first, a); - if (!isl_int_is_zero(mat->row[row][first])) - exchange(mat, &inv, NULL, row, row, first); - else - ++first; - } - for (i = 0; i < row; ++i) { - if (isl_int_is_zero(mat->row[row][i])) - continue; - isl_int_gcd(a, mat->row[row][row], mat->row[row][i]); - isl_int_divexact(b, mat->row[row][i], a); - isl_int_divexact(a, mat->row[row][row], a); - isl_int_neg(a, a); - isl_mat_col_combine(mat, i, a, i, b, row); - isl_mat_col_combine(inv, i, a, i, b, row); - } - } - isl_int_clear(b); - - isl_int_set(a, mat->row[0][0]); - for (row = 1; row < mat->n_row; ++row) - isl_int_lcm(a, a, mat->row[row][row]); - if (isl_int_is_zero(a)){ - isl_int_clear(a); - goto error; - } - for (row = 0; row < mat->n_row; ++row) { - isl_int_divexact(mat->row[row][row], a, mat->row[row][row]); - if (isl_int_is_one(mat->row[row][row])) - continue; - isl_mat_col_scale(inv, row, mat->row[row][row]); - } - isl_int_clear(a); - - isl_mat_free(mat); - - return inv; -error: - isl_mat_free(mat); - isl_mat_free(inv); - return NULL; -} - -struct isl_mat *isl_mat_transpose(struct isl_mat *mat) -{ - struct isl_mat *transpose = NULL; - int i, j; - - if (mat->n_col == mat->n_row) { - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - for (i = 0; i < mat->n_row; ++i) - for (j = i + 1; j < mat->n_col; ++j) - isl_int_swap(mat->row[i][j], mat->row[j][i]); - return mat; - } - transpose = isl_mat_alloc(mat->ctx, mat->n_col, mat->n_row); - if (!transpose) - goto error; - for (i = 0; i < mat->n_row; ++i) - for (j = 0; j < mat->n_col; ++j) - isl_int_set(transpose->row[j][i], mat->row[i][j]); - isl_mat_free(mat); - return transpose; -error: - isl_mat_free(mat); - return NULL; -} - -struct isl_mat *isl_mat_swap_cols(struct isl_mat *mat, unsigned i, unsigned j) -{ - int r; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - isl_assert(mat->ctx, i < mat->n_col, goto error); - isl_assert(mat->ctx, j < mat->n_col, goto error); - - for (r = 0; r < mat->n_row; ++r) - isl_int_swap(mat->row[r][i], mat->row[r][j]); - return mat; -error: - isl_mat_free(mat); - return NULL; -} - -struct isl_mat *isl_mat_swap_rows(struct isl_mat *mat, unsigned i, unsigned j) -{ - isl_int *t; - - if (!mat) - return NULL; - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - t = mat->row[i]; - mat->row[i] = mat->row[j]; - mat->row[j] = t; - return mat; -} - -struct isl_mat *isl_mat_product(struct isl_mat *left, struct isl_mat *right) -{ - int i, j, k; - struct isl_mat *prod; - - if (!left || !right) - goto error; - isl_assert(left->ctx, left->n_col == right->n_row, goto error); - prod = isl_mat_alloc(left->ctx, left->n_row, right->n_col); - if (!prod) - goto error; - if (left->n_col == 0) { - for (i = 0; i < prod->n_row; ++i) - isl_seq_clr(prod->row[i], prod->n_col); - isl_mat_free(left); - isl_mat_free(right); - return prod; - } - for (i = 0; i < prod->n_row; ++i) { - for (j = 0; j < prod->n_col; ++j) { - isl_int_mul(prod->row[i][j], - left->row[i][0], right->row[0][j]); - for (k = 1; k < left->n_col; ++k) - isl_int_addmul(prod->row[i][j], - left->row[i][k], right->row[k][j]); - } - } - isl_mat_free(left); - isl_mat_free(right); - return prod; -error: - isl_mat_free(left); - isl_mat_free(right); - return NULL; -} - -/* Replace the variables x in the rows q by x' given by x = M x', - * with M the matrix mat. - * - * If the number of new variables is greater than the original - * number of variables, then the rows q have already been - * preextended. If the new number is smaller, then the coefficients - * of the divs, which are not changed, need to be shifted down. - * The row q may be the equalities, the inequalities or the - * div expressions. In the latter case, has_div is true and - * we need to take into account the extra denominator column. - */ -static int preimage(struct isl_ctx *ctx, isl_int **q, unsigned n, - unsigned n_div, int has_div, struct isl_mat *mat) -{ - int i; - struct isl_mat *t; - int e; - - if (mat->n_col >= mat->n_row) - e = 0; - else - e = mat->n_row - mat->n_col; - if (has_div) - for (i = 0; i < n; ++i) - isl_int_mul(q[i][0], q[i][0], mat->row[0][0]); - t = isl_mat_sub_alloc6(mat->ctx, q, 0, n, has_div, mat->n_row); - t = isl_mat_product(t, mat); - if (!t) - return -1; - for (i = 0; i < n; ++i) { - isl_seq_swp_or_cpy(q[i] + has_div, t->row[i], t->n_col); - isl_seq_cpy(q[i] + has_div + t->n_col, - q[i] + has_div + t->n_col + e, n_div); - isl_seq_clr(q[i] + has_div + t->n_col + n_div, e); - } - isl_mat_free(t); - return 0; -} - -/* Replace the variables x in bset by x' given by x = M x', with - * M the matrix mat. - * - * If there are fewer variables x' then there are x, then we perform - * the transformation in place, which that, in principle, - * this frees up some extra variables as the number - * of columns remains constant, but we would have to extend - * the div array too as the number of rows in this array is assumed - * to be equal to extra. - */ -struct isl_basic_set *isl_basic_set_preimage(struct isl_basic_set *bset, - struct isl_mat *mat) -{ - struct isl_ctx *ctx; - - if (!bset || !mat) - goto error; - - ctx = bset->ctx; - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - - isl_assert(ctx, bset->dim->nparam == 0, goto error); - isl_assert(ctx, 1+bset->dim->n_out == mat->n_row, goto error); - isl_assert(ctx, mat->n_col > 0, goto error); - - if (mat->n_col > mat->n_row) { - bset = isl_basic_set_extend(bset, 0, mat->n_col-1, 0, 0, 0); - if (!bset) - goto error; - } else if (mat->n_col < mat->n_row) { - bset->dim = isl_space_cow(bset->dim); - if (!bset->dim) - goto error; - bset->dim->n_out -= mat->n_row - mat->n_col; - } - - if (preimage(ctx, bset->eq, bset->n_eq, bset->n_div, 0, - isl_mat_copy(mat)) < 0) - goto error; - - if (preimage(ctx, bset->ineq, bset->n_ineq, bset->n_div, 0, - isl_mat_copy(mat)) < 0) - goto error; - - if (preimage(ctx, bset->div, bset->n_div, bset->n_div, 1, mat) < 0) - goto error2; - - ISL_F_CLR(bset, ISL_BASIC_SET_NO_IMPLICIT); - ISL_F_CLR(bset, ISL_BASIC_SET_NO_REDUNDANT); - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED); - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED_DIVS); - ISL_F_CLR(bset, ISL_BASIC_SET_ALL_EQUALITIES); - - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_mat_free(mat); -error2: - isl_basic_set_free(bset); - return NULL; -} - -struct isl_set *isl_set_preimage(struct isl_set *set, struct isl_mat *mat) -{ - struct isl_ctx *ctx; - int i; - - set = isl_set_cow(set); - if (!set) - return NULL; - - ctx = set->ctx; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_preimage(set->p[i], - isl_mat_copy(mat)); - if (!set->p[i]) - goto error; - } - if (mat->n_col != mat->n_row) { - set->dim = isl_space_cow(set->dim); - if (!set->dim) - goto error; - set->dim->n_out += mat->n_col; - set->dim->n_out -= mat->n_row; - } - isl_mat_free(mat); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; -error: - isl_set_free(set); - isl_mat_free(mat); - return NULL; -} - -/* Replace the variables x starting at pos in the rows q - * by x' with x = M x' with M the matrix mat. - * That is, replace the corresponding coefficients c by c M. - */ -static int transform(isl_ctx *ctx, isl_int **q, unsigned n, - unsigned pos, __isl_take isl_mat *mat) -{ - int i; - isl_mat *t; - - t = isl_mat_sub_alloc6(ctx, q, 0, n, pos, mat->n_row); - t = isl_mat_product(t, mat); - if (!t) - return -1; - for (i = 0; i < n; ++i) - isl_seq_swp_or_cpy(q[i] + pos, t->row[i], t->n_col); - isl_mat_free(t); - return 0; -} - -/* Replace the variables x of type "type" starting at "first" in "bset" - * by x' with x = M x' with M the matrix trans. - * That is, replace the corresponding coefficients c by c M. - * - * The transformation matrix should be a square matrix. - */ -__isl_give isl_basic_set *isl_basic_set_transform_dims( - __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, - __isl_take isl_mat *trans) -{ - isl_ctx *ctx; - unsigned pos; - - bset = isl_basic_set_cow(bset); - if (!bset || !trans) - goto error; - - ctx = isl_basic_set_get_ctx(bset); - if (trans->n_row != trans->n_col) - isl_die(trans->ctx, isl_error_invalid, - "expecting square transformation matrix", goto error); - if (first + trans->n_row > isl_basic_set_dim(bset, type)) - isl_die(trans->ctx, isl_error_invalid, - "oversized transformation matrix", goto error); - - pos = isl_basic_set_offset(bset, type) + first; - - if (transform(ctx, bset->eq, bset->n_eq, pos, isl_mat_copy(trans)) < 0) - goto error; - if (transform(ctx, bset->ineq, bset->n_ineq, pos, - isl_mat_copy(trans)) < 0) - goto error; - if (transform(ctx, bset->div, bset->n_div, 1 + pos, - isl_mat_copy(trans)) < 0) - goto error; - - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED); - ISL_F_CLR(bset, ISL_BASIC_SET_NORMALIZED_DIVS); - - isl_mat_free(trans); - return bset; -error: - isl_mat_free(trans); - isl_basic_set_free(bset); - return NULL; -} - -void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent) -{ - int i, j; - - if (!mat) { - fprintf(out, "%*snull mat\n", indent, ""); - return; - } - - if (mat->n_row == 0) - fprintf(out, "%*s[]\n", indent, ""); - - for (i = 0; i < mat->n_row; ++i) { - if (!i) - fprintf(out, "%*s[[", indent, ""); - else - fprintf(out, "%*s[", indent+1, ""); - for (j = 0; j < mat->n_col; ++j) { - if (j) - fprintf(out, ","); - isl_int_print(out, mat->row[i][j], 0); - } - if (i == mat->n_row-1) - fprintf(out, "]]\n"); - else - fprintf(out, "]\n"); - } -} - -void isl_mat_dump(__isl_keep isl_mat *mat) -{ - isl_mat_print_internal(mat, stderr, 0); -} - -struct isl_mat *isl_mat_drop_cols(struct isl_mat *mat, unsigned col, unsigned n) -{ - int r; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - if (col != mat->n_col-n) { - for (r = 0; r < mat->n_row; ++r) - isl_seq_cpy(mat->row[r]+col, mat->row[r]+col+n, - mat->n_col - col - n); - } - mat->n_col -= n; - return mat; -} - -struct isl_mat *isl_mat_drop_rows(struct isl_mat *mat, unsigned row, unsigned n) -{ - int r; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - for (r = row; r+n < mat->n_row; ++r) - mat->row[r] = mat->row[r+n]; - - mat->n_row -= n; - return mat; -} - -__isl_give isl_mat *isl_mat_insert_cols(__isl_take isl_mat *mat, - unsigned col, unsigned n) -{ - isl_mat *ext; - - if (!mat) - return NULL; - if (n == 0) - return mat; - - ext = isl_mat_alloc(mat->ctx, mat->n_row, mat->n_col + n); - if (!ext) - goto error; - - isl_mat_sub_copy(mat->ctx, ext->row, mat->row, mat->n_row, 0, 0, col); - isl_mat_sub_copy(mat->ctx, ext->row, mat->row, mat->n_row, - col + n, col, mat->n_col - col); - - isl_mat_free(mat); - return ext; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_insert_zero_cols(__isl_take isl_mat *mat, - unsigned first, unsigned n) -{ - int i; - - if (!mat) - return NULL; - mat = isl_mat_insert_cols(mat, first, n); - if (!mat) - return NULL; - - for (i = 0; i < mat->n_row; ++i) - isl_seq_clr(mat->row[i] + first, n); - - return mat; -} - -__isl_give isl_mat *isl_mat_add_zero_cols(__isl_take isl_mat *mat, unsigned n) -{ - if (!mat) - return NULL; - - return isl_mat_insert_zero_cols(mat, mat->n_col, n); -} - -__isl_give isl_mat *isl_mat_insert_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n) -{ - isl_mat *ext; - - if (!mat) - return NULL; - if (n == 0) - return mat; - - ext = isl_mat_alloc(mat->ctx, mat->n_row + n, mat->n_col); - if (!ext) - goto error; - - isl_mat_sub_copy(mat->ctx, ext->row, mat->row, row, 0, 0, mat->n_col); - isl_mat_sub_copy(mat->ctx, ext->row + row + n, mat->row + row, - mat->n_row - row, 0, 0, mat->n_col); - - isl_mat_free(mat); - return ext; -error: - isl_mat_free(mat); - return NULL; -} - -__isl_give isl_mat *isl_mat_add_rows(__isl_take isl_mat *mat, unsigned n) -{ - if (!mat) - return NULL; - - return isl_mat_insert_rows(mat, mat->n_row, n); -} - -__isl_give isl_mat *isl_mat_insert_zero_rows(__isl_take isl_mat *mat, - unsigned row, unsigned n) -{ - int i; - - mat = isl_mat_insert_rows(mat, row, n); - if (!mat) - return NULL; - - for (i = 0; i < n; ++i) - isl_seq_clr(mat->row[row + i], mat->n_col); - - return mat; -} - -__isl_give isl_mat *isl_mat_add_zero_rows(__isl_take isl_mat *mat, unsigned n) -{ - if (!mat) - return NULL; - - return isl_mat_insert_zero_rows(mat, mat->n_row, n); -} - -void isl_mat_col_submul(struct isl_mat *mat, - int dst_col, isl_int f, int src_col) -{ - int i; - - for (i = 0; i < mat->n_row; ++i) - isl_int_submul(mat->row[i][dst_col], f, mat->row[i][src_col]); -} - -void isl_mat_col_add(__isl_keep isl_mat *mat, int dst_col, int src_col) -{ - int i; - - if (!mat) - return; - - for (i = 0; i < mat->n_row; ++i) - isl_int_add(mat->row[i][dst_col], - mat->row[i][dst_col], mat->row[i][src_col]); -} - -void isl_mat_col_mul(struct isl_mat *mat, int dst_col, isl_int f, int src_col) -{ - int i; - - for (i = 0; i < mat->n_row; ++i) - isl_int_mul(mat->row[i][dst_col], f, mat->row[i][src_col]); -} - -struct isl_mat *isl_mat_unimodular_complete(struct isl_mat *M, int row) -{ - int r; - struct isl_mat *H = NULL, *Q = NULL; - - if (!M) - return NULL; - - isl_assert(M->ctx, M->n_row == M->n_col, goto error); - M->n_row = row; - H = isl_mat_left_hermite(isl_mat_copy(M), 0, NULL, &Q); - M->n_row = M->n_col; - if (!H) - goto error; - for (r = 0; r < row; ++r) - isl_assert(M->ctx, isl_int_is_one(H->row[r][r]), goto error); - for (r = row; r < M->n_row; ++r) - isl_seq_cpy(M->row[r], Q->row[r], M->n_col); - isl_mat_free(H); - isl_mat_free(Q); - return M; -error: - isl_mat_free(H); - isl_mat_free(Q); - isl_mat_free(M); - return NULL; -} - -__isl_give isl_mat *isl_mat_concat(__isl_take isl_mat *top, - __isl_take isl_mat *bot) -{ - struct isl_mat *mat; - - if (!top || !bot) - goto error; - - isl_assert(top->ctx, top->n_col == bot->n_col, goto error); - if (top->n_row == 0) { - isl_mat_free(top); - return bot; - } - if (bot->n_row == 0) { - isl_mat_free(bot); - return top; - } - - mat = isl_mat_alloc(top->ctx, top->n_row + bot->n_row, top->n_col); - if (!mat) - goto error; - isl_mat_sub_copy(mat->ctx, mat->row, top->row, top->n_row, - 0, 0, mat->n_col); - isl_mat_sub_copy(mat->ctx, mat->row + top->n_row, bot->row, bot->n_row, - 0, 0, mat->n_col); - isl_mat_free(top); - isl_mat_free(bot); - return mat; -error: - isl_mat_free(top); - isl_mat_free(bot); - return NULL; -} - -int isl_mat_is_equal(__isl_keep isl_mat *mat1, __isl_keep isl_mat *mat2) -{ - int i; - - if (!mat1 || !mat2) - return -1; - - if (mat1->n_row != mat2->n_row) - return 0; - - if (mat1->n_col != mat2->n_col) - return 0; - - for (i = 0; i < mat1->n_row; ++i) - if (!isl_seq_eq(mat1->row[i], mat2->row[i], mat1->n_col)) - return 0; - - return 1; -} - -__isl_give isl_mat *isl_mat_from_row_vec(__isl_take isl_vec *vec) -{ - struct isl_mat *mat; - - if (!vec) - return NULL; - mat = isl_mat_alloc(vec->ctx, 1, vec->size); - if (!mat) - goto error; - - isl_seq_cpy(mat->row[0], vec->el, vec->size); - - isl_vec_free(vec); - return mat; -error: - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_mat *isl_mat_vec_concat(__isl_take isl_mat *top, - __isl_take isl_vec *bot) -{ - return isl_mat_concat(top, isl_mat_from_row_vec(bot)); -} - -__isl_give isl_mat *isl_mat_move_cols(__isl_take isl_mat *mat, - unsigned dst_col, unsigned src_col, unsigned n) -{ - isl_mat *res; - - if (!mat) - return NULL; - if (n == 0 || dst_col == src_col) - return mat; - - res = isl_mat_alloc(mat->ctx, mat->n_row, mat->n_col); - if (!res) - goto error; - - if (dst_col < src_col) { - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - 0, 0, dst_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col, src_col, n); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col + n, dst_col, src_col - dst_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - src_col + n, src_col + n, - res->n_col - src_col - n); - } else { - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - 0, 0, src_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - src_col, src_col + n, dst_col - src_col); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col, src_col, n); - isl_mat_sub_copy(res->ctx, res->row, mat->row, mat->n_row, - dst_col + n, dst_col + n, - res->n_col - dst_col - n); - } - isl_mat_free(mat); - - return res; -error: - isl_mat_free(mat); - return NULL; -} - -void isl_mat_gcd(__isl_keep isl_mat *mat, isl_int *gcd) -{ - int i; - isl_int g; - - isl_int_set_si(*gcd, 0); - if (!mat) - return; - - isl_int_init(g); - for (i = 0; i < mat->n_row; ++i) { - isl_seq_gcd(mat->row[i], mat->n_col, &g); - isl_int_gcd(*gcd, *gcd, g); - } - isl_int_clear(g); -} - -__isl_give isl_mat *isl_mat_scale_down(__isl_take isl_mat *mat, isl_int m) -{ - int i; - - if (isl_int_is_one(m)) - return mat; - - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - for (i = 0; i < mat->n_row; ++i) - isl_seq_scale_down(mat->row[i], mat->row[i], m, mat->n_col); - - return mat; -} - -__isl_give isl_mat *isl_mat_normalize(__isl_take isl_mat *mat) -{ - isl_int gcd; - - if (!mat) - return NULL; - - isl_int_init(gcd); - isl_mat_gcd(mat, &gcd); - mat = isl_mat_scale_down(mat, gcd); - isl_int_clear(gcd); - - return mat; -} - -__isl_give isl_mat *isl_mat_normalize_row(__isl_take isl_mat *mat, int row) -{ - mat = isl_mat_cow(mat); - if (!mat) - return NULL; - - isl_seq_normalize(mat->ctx, mat->row[row], mat->n_col); - - return mat; -} - -/* Number of initial non-zero columns. - */ -int isl_mat_initial_non_zero_cols(__isl_keep isl_mat *mat) -{ - int i; - - if (!mat) - return -1; - - for (i = 0; i < mat->n_col; ++i) - if (row_first_non_zero(mat->row, mat->n_row, i) < 0) - break; - - return i; -} diff --git a/cloog-0.17.0/isl/isl_mat_private.h b/cloog-0.17.0/isl/isl_mat_private.h deleted file mode 100644 index f27f29af902075cb8d3a7e628f211c6679d4bd16..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_mat_private.h +++ /dev/null @@ -1,30 +0,0 @@ -#include - -struct isl_mat { - int ref; - - struct isl_ctx *ctx; - -#define ISL_MAT_BORROWED (1 << 0) - unsigned flags; - - unsigned n_row; - unsigned n_col; - - isl_int **row; - - /* actual size of the rows in memory; n_col <= max_col */ - unsigned max_col; - - struct isl_blk block; -}; - -__isl_give isl_mat *isl_mat_sub_alloc(__isl_keep isl_mat *mat, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col); -__isl_give isl_mat *isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row, - unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col); -void isl_mat_sub_copy(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col); -void isl_mat_sub_neg(struct isl_ctx *ctx, isl_int **dst, isl_int **src, - unsigned n_row, unsigned dst_col, unsigned src_col, unsigned n_col); -__isl_give isl_mat *isl_mat_diag(isl_ctx *ctx, unsigned n_row, isl_int d); diff --git a/cloog-0.17.0/isl/isl_morph.c b/cloog-0.17.0/isl/isl_morph.c deleted file mode 100644 index 69aababf239b061ab121fd2f9c32b95b934b4d16..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_morph.c +++ /dev/null @@ -1,817 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include - -__isl_give isl_morph *isl_morph_alloc( - __isl_take isl_basic_set *dom, __isl_take isl_basic_set *ran, - __isl_take isl_mat *map, __isl_take isl_mat *inv) -{ - isl_morph *morph; - - if (!dom || !ran || !map || !inv) - goto error; - - morph = isl_alloc_type(dom->ctx, struct isl_morph); - if (!morph) - goto error; - - morph->ref = 1; - morph->dom = dom; - morph->ran = ran; - morph->map = map; - morph->inv = inv; - - return morph; -error: - isl_basic_set_free(dom); - isl_basic_set_free(ran); - isl_mat_free(map); - isl_mat_free(inv); - return NULL; -} - -__isl_give isl_morph *isl_morph_copy(__isl_keep isl_morph *morph) -{ - if (!morph) - return NULL; - - morph->ref++; - return morph; -} - -__isl_give isl_morph *isl_morph_dup(__isl_keep isl_morph *morph) -{ - if (!morph) - return NULL; - - return isl_morph_alloc(isl_basic_set_copy(morph->dom), - isl_basic_set_copy(morph->ran), - isl_mat_copy(morph->map), isl_mat_copy(morph->inv)); -} - -__isl_give isl_morph *isl_morph_cow(__isl_take isl_morph *morph) -{ - if (!morph) - return NULL; - - if (morph->ref == 1) - return morph; - morph->ref--; - return isl_morph_dup(morph); -} - -void isl_morph_free(__isl_take isl_morph *morph) -{ - if (!morph) - return; - - if (--morph->ref > 0) - return; - - isl_basic_set_free(morph->dom); - isl_basic_set_free(morph->ran); - isl_mat_free(morph->map); - isl_mat_free(morph->inv); - free(morph); -} - -__isl_give isl_space *isl_morph_get_ran_space(__isl_keep isl_morph *morph) -{ - if (!morph) - return NULL; - - return isl_space_copy(morph->ran->dim); -} - -unsigned isl_morph_dom_dim(__isl_keep isl_morph *morph, enum isl_dim_type type) -{ - if (!morph) - return 0; - - return isl_basic_set_dim(morph->dom, type); -} - -unsigned isl_morph_ran_dim(__isl_keep isl_morph *morph, enum isl_dim_type type) -{ - if (!morph) - return 0; - - return isl_basic_set_dim(morph->ran, type); -} - -__isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n) -{ - unsigned dom_offset; - - if (n == 0) - return morph; - - morph = isl_morph_cow(morph); - if (!morph) - return NULL; - - dom_offset = 1 + isl_space_offset(morph->dom->dim, type); - - morph->dom = isl_basic_set_remove_dims(morph->dom, type, first, n); - - morph->map = isl_mat_drop_cols(morph->map, dom_offset + first, n); - - morph->inv = isl_mat_drop_rows(morph->inv, dom_offset + first, n); - - if (morph->dom && morph->ran && morph->map && morph->inv) - return morph; - - isl_morph_free(morph); - return NULL; -} - -__isl_give isl_morph *isl_morph_remove_ran_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n) -{ - unsigned ran_offset; - - if (n == 0) - return morph; - - morph = isl_morph_cow(morph); - if (!morph) - return NULL; - - ran_offset = 1 + isl_space_offset(morph->ran->dim, type); - - morph->ran = isl_basic_set_remove_dims(morph->ran, type, first, n); - - morph->map = isl_mat_drop_rows(morph->map, ran_offset + first, n); - - morph->inv = isl_mat_drop_cols(morph->inv, ran_offset + first, n); - - if (morph->dom && morph->ran && morph->map && morph->inv) - return morph; - - isl_morph_free(morph); - return NULL; -} - -/* Project domain of morph onto its parameter domain. - */ -__isl_give isl_morph *isl_morph_dom_params(__isl_take isl_morph *morph) -{ - unsigned n; - - if (!morph) - return NULL; - n = isl_basic_set_dim(morph->dom, isl_dim_set); - morph = isl_morph_remove_dom_dims(morph, isl_dim_set, 0, n); - if (!morph) - return NULL; - morph->dom = isl_basic_set_params(morph->dom); - if (morph->dom) - return morph; - - isl_morph_free(morph); - return NULL; -} - -/* Project range of morph onto its parameter domain. - */ -__isl_give isl_morph *isl_morph_ran_params(__isl_take isl_morph *morph) -{ - unsigned n; - - if (!morph) - return NULL; - n = isl_basic_set_dim(morph->ran, isl_dim_set); - morph = isl_morph_remove_ran_dims(morph, isl_dim_set, 0, n); - if (!morph) - return NULL; - morph->ran = isl_basic_set_params(morph->ran); - if (morph->ran) - return morph; - - isl_morph_free(morph); - return NULL; -} - -void isl_morph_dump(__isl_take isl_morph *morph, FILE *out) -{ - if (!morph) - return; - - isl_basic_set_print(morph->dom, out, 0, "", "", ISL_FORMAT_ISL); - isl_basic_set_print(morph->ran, out, 0, "", "", ISL_FORMAT_ISL); - isl_mat_print_internal(morph->map, out, 4); - isl_mat_print_internal(morph->inv, out, 4); -} - -__isl_give isl_morph *isl_morph_identity(__isl_keep isl_basic_set *bset) -{ - isl_mat *id; - isl_basic_set *universe; - unsigned total; - - if (!bset) - return NULL; - - total = isl_basic_set_total_dim(bset); - id = isl_mat_identity(bset->ctx, 1 + total); - universe = isl_basic_set_universe(isl_space_copy(bset->dim)); - - return isl_morph_alloc(universe, isl_basic_set_copy(universe), - id, isl_mat_copy(id)); -} - -/* Create a(n identity) morphism between empty sets of the same dimension - * a "bset". - */ -__isl_give isl_morph *isl_morph_empty(__isl_keep isl_basic_set *bset) -{ - isl_mat *id; - isl_basic_set *empty; - unsigned total; - - if (!bset) - return NULL; - - total = isl_basic_set_total_dim(bset); - id = isl_mat_identity(bset->ctx, 1 + total); - empty = isl_basic_set_empty(isl_space_copy(bset->dim)); - - return isl_morph_alloc(empty, isl_basic_set_copy(empty), - id, isl_mat_copy(id)); -} - -/* Given a matrix that maps a (possibly) parametric domain to - * a parametric domain, add in rows that map the "nparam" parameters onto - * themselves. - */ -static __isl_give isl_mat *insert_parameter_rows(__isl_take isl_mat *mat, - unsigned nparam) -{ - int i; - - if (nparam == 0) - return mat; - if (!mat) - return NULL; - - mat = isl_mat_insert_rows(mat, 1, nparam); - if (!mat) - return NULL; - - for (i = 0; i < nparam; ++i) { - isl_seq_clr(mat->row[1 + i], mat->n_col); - isl_int_set(mat->row[1 + i][1 + i], mat->row[0][0]); - } - - return mat; -} - -/* Construct a basic set described by the "n" equalities of "bset" starting - * at "first". - */ -static __isl_give isl_basic_set *copy_equalities(__isl_keep isl_basic_set *bset, - unsigned first, unsigned n) -{ - int i, k; - isl_basic_set *eq; - unsigned total; - - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - - total = isl_basic_set_total_dim(bset); - eq = isl_basic_set_alloc_space(isl_space_copy(bset->dim), 0, n, 0); - if (!eq) - return NULL; - for (i = 0; i < n; ++i) { - k = isl_basic_set_alloc_equality(eq); - if (k < 0) - goto error; - isl_seq_cpy(eq->eq[k], bset->eq[first + k], 1 + total); - } - - return eq; -error: - isl_basic_set_free(eq); - return NULL; -} - -/* Given a basic set, exploit the equalties in the a basic set to construct - * a morphishm that maps the basic set to a lower-dimensional space. - * Specifically, the morphism reduces the number of dimensions of type "type". - * - * This function is a slight generalization of isl_mat_variable_compression - * in that it allows the input to be parametric and that it allows for the - * compression of either parameters or set variables. - * - * We first select the equalities of interest, that is those that involve - * variables of type "type" and no later variables. - * Denote those equalities as - * - * -C(p) + M x = 0 - * - * where C(p) depends on the parameters if type == isl_dim_set and - * is a constant if type == isl_dim_param. - * - * First compute the (left) Hermite normal form of M, - * - * M [U1 U2] = M U = H = [H1 0] - * or - * M = H Q = [H1 0] [Q1] - * [Q2] - * - * with U, Q unimodular, Q = U^{-1} (and H lower triangular). - * Define the transformed variables as - * - * x = [U1 U2] [ x1' ] = [U1 U2] [Q1] x - * [ x2' ] [Q2] - * - * The equalities then become - * - * -C(p) + H1 x1' = 0 or x1' = H1^{-1} C(p) = C'(p) - * - * If the denominator of the constant term does not divide the - * the common denominator of the parametric terms, then every - * integer point is mapped to a non-integer point and then the original set has no - * integer solutions (since the x' are a unimodular transformation - * of the x). In this case, an empty morphism is returned. - * Otherwise, the transformation is given by - * - * x = U1 H1^{-1} C(p) + U2 x2' - * - * The inverse transformation is simply - * - * x2' = Q2 x - * - * Both matrices are extended to map the full original space to the full - * compressed space. - */ -__isl_give isl_morph *isl_basic_set_variable_compression( - __isl_keep isl_basic_set *bset, enum isl_dim_type type) -{ - unsigned otype; - unsigned ntype; - unsigned orest; - unsigned nrest; - int f_eq, n_eq; - isl_space *dim; - isl_mat *H, *U, *Q, *C = NULL, *H1, *U1, *U2; - isl_basic_set *dom, *ran; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return isl_morph_empty(bset); - - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - - otype = 1 + isl_space_offset(bset->dim, type); - ntype = isl_basic_set_dim(bset, type); - orest = otype + ntype; - nrest = isl_basic_set_total_dim(bset) - (orest - 1); - - for (f_eq = 0; f_eq < bset->n_eq; ++f_eq) - if (isl_seq_first_non_zero(bset->eq[f_eq] + orest, nrest) == -1) - break; - for (n_eq = 0; f_eq + n_eq < bset->n_eq; ++n_eq) - if (isl_seq_first_non_zero(bset->eq[f_eq + n_eq] + otype, ntype) == -1) - break; - if (n_eq == 0) - return isl_morph_identity(bset); - - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, f_eq, n_eq, otype, ntype); - H = isl_mat_left_hermite(H, 0, &U, &Q); - if (!H || !U || !Q) - goto error; - Q = isl_mat_drop_rows(Q, 0, n_eq); - Q = isl_mat_diagonal(isl_mat_identity(bset->ctx, otype), Q); - Q = isl_mat_diagonal(Q, isl_mat_identity(bset->ctx, nrest)); - C = isl_mat_alloc(bset->ctx, 1 + n_eq, otype); - if (!C) - goto error; - isl_int_set_si(C->row[0][0], 1); - isl_seq_clr(C->row[0] + 1, otype - 1); - isl_mat_sub_neg(C->ctx, C->row + 1, bset->eq + f_eq, n_eq, 0, 0, otype); - H1 = isl_mat_sub_alloc(H, 0, H->n_row, 0, H->n_row); - H1 = isl_mat_lin_to_aff(H1); - C = isl_mat_inverse_product(H1, C); - if (!C) - goto error; - isl_mat_free(H); - - if (!isl_int_is_one(C->row[0][0])) { - int i; - isl_int g; - - isl_int_init(g); - for (i = 0; i < n_eq; ++i) { - isl_seq_gcd(C->row[1 + i] + 1, otype - 1, &g); - isl_int_gcd(g, g, C->row[0][0]); - if (!isl_int_is_divisible_by(C->row[1 + i][0], g)) - break; - } - isl_int_clear(g); - - if (i < n_eq) { - isl_mat_free(C); - isl_mat_free(U); - isl_mat_free(Q); - return isl_morph_empty(bset); - } - - C = isl_mat_normalize(C); - } - - U1 = isl_mat_sub_alloc(U, 0, U->n_row, 0, n_eq); - U1 = isl_mat_lin_to_aff(U1); - U2 = isl_mat_sub_alloc(U, 0, U->n_row, n_eq, U->n_row - n_eq); - U2 = isl_mat_lin_to_aff(U2); - isl_mat_free(U); - - C = isl_mat_product(U1, C); - C = isl_mat_aff_direct_sum(C, U2); - C = insert_parameter_rows(C, otype - 1); - C = isl_mat_diagonal(C, isl_mat_identity(bset->ctx, nrest)); - - dim = isl_space_copy(bset->dim); - dim = isl_space_drop_dims(dim, type, 0, ntype); - dim = isl_space_add_dims(dim, type, ntype - n_eq); - ran = isl_basic_set_universe(dim); - dom = copy_equalities(bset, f_eq, n_eq); - - return isl_morph_alloc(dom, ran, Q, C); -error: - isl_mat_free(C); - isl_mat_free(H); - isl_mat_free(U); - isl_mat_free(Q); - return NULL; -} - -/* Construct a parameter compression for "bset". - * We basically just call isl_mat_parameter_compression with the right input - * and then extend the resulting matrix to include the variables. - * - * Let the equalities be given as - * - * B(p) + A x = 0 - * - * and let [H 0] be the Hermite Normal Form of A, then - * - * H^-1 B(p) - * - * needs to be integer, so we impose that each row is divisible by - * the denominator. - */ -__isl_give isl_morph *isl_basic_set_parameter_compression( - __isl_keep isl_basic_set *bset) -{ - unsigned nparam; - unsigned nvar; - int n_eq; - isl_mat *H, *B; - isl_vec *d; - isl_mat *map, *inv; - isl_basic_set *dom, *ran; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return isl_morph_empty(bset); - if (bset->n_eq == 0) - return isl_morph_identity(bset); - - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - - n_eq = bset->n_eq; - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - isl_assert(bset->ctx, n_eq <= nvar, return NULL); - - d = isl_vec_alloc(bset->ctx, n_eq); - B = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, n_eq, 0, 1 + nparam); - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, n_eq, 1 + nparam, nvar); - H = isl_mat_left_hermite(H, 0, NULL, NULL); - H = isl_mat_drop_cols(H, n_eq, nvar - n_eq); - H = isl_mat_lin_to_aff(H); - H = isl_mat_right_inverse(H); - if (!H || !d) - goto error; - isl_seq_set(d->el, H->row[0][0], d->size); - H = isl_mat_drop_rows(H, 0, 1); - H = isl_mat_drop_cols(H, 0, 1); - B = isl_mat_product(H, B); - inv = isl_mat_parameter_compression(B, d); - inv = isl_mat_diagonal(inv, isl_mat_identity(bset->ctx, nvar)); - map = isl_mat_right_inverse(isl_mat_copy(inv)); - - dom = isl_basic_set_universe(isl_space_copy(bset->dim)); - ran = isl_basic_set_universe(isl_space_copy(bset->dim)); - - return isl_morph_alloc(dom, ran, map, inv); -error: - isl_mat_free(H); - isl_mat_free(B); - isl_vec_free(d); - return NULL; -} - -/* Add stride constraints to "bset" based on the inverse mapping - * that was plugged in. In particular, if morph maps x' to x, - * the the constraints of the original input - * - * A x' + b >= 0 - * - * have been rewritten to - * - * A inv x + b >= 0 - * - * However, this substitution may loose information on the integrality of x', - * so we need to impose that - * - * inv x - * - * is integral. If inv = B/d, this means that we need to impose that - * - * B x = 0 mod d - * - * or - * - * exists alpha in Z^m: B x = d alpha - * - */ -static __isl_give isl_basic_set *add_strides(__isl_take isl_basic_set *bset, - __isl_keep isl_morph *morph) -{ - int i, div, k; - isl_int gcd; - - if (isl_int_is_one(morph->inv->row[0][0])) - return bset; - - isl_int_init(gcd); - - for (i = 0; 1 + i < morph->inv->n_row; ++i) { - isl_seq_gcd(morph->inv->row[1 + i], morph->inv->n_col, &gcd); - if (isl_int_is_divisible_by(gcd, morph->inv->row[0][0])) - continue; - div = isl_basic_set_alloc_div(bset); - if (div < 0) - goto error; - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k], morph->inv->row[1 + i], - morph->inv->n_col); - isl_seq_clr(bset->eq[k] + morph->inv->n_col, bset->n_div); - isl_int_set(bset->eq[k][morph->inv->n_col + div], - morph->inv->row[0][0]); - } - - isl_int_clear(gcd); - - return bset; -error: - isl_int_clear(gcd); - isl_basic_set_free(bset); - return NULL; -} - -/* Apply the morphism to the basic set. - * We basically just compute the preimage of "bset" under the inverse mapping - * in morph, add in stride constraints and intersect with the range - * of the morphism. - */ -__isl_give isl_basic_set *isl_morph_basic_set(__isl_take isl_morph *morph, - __isl_take isl_basic_set *bset) -{ - isl_basic_set *res = NULL; - isl_mat *mat = NULL; - int i, k; - int max_stride; - - if (!morph || !bset) - goto error; - - isl_assert(bset->ctx, isl_space_is_equal(bset->dim, morph->dom->dim), - goto error); - - max_stride = morph->inv->n_row - 1; - if (isl_int_is_one(morph->inv->row[0][0])) - max_stride = 0; - res = isl_basic_set_alloc_space(isl_space_copy(morph->ran->dim), - bset->n_div + max_stride, bset->n_eq + max_stride, bset->n_ineq); - - for (i = 0; i < bset->n_div; ++i) - if (isl_basic_set_alloc_div(res) < 0) - goto error; - - mat = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, bset->n_eq, - 0, morph->inv->n_row); - mat = isl_mat_product(mat, isl_mat_copy(morph->inv)); - if (!mat) - goto error; - for (i = 0; i < bset->n_eq; ++i) { - k = isl_basic_set_alloc_equality(res); - if (k < 0) - goto error; - isl_seq_cpy(res->eq[k], mat->row[i], mat->n_col); - isl_seq_scale(res->eq[k] + mat->n_col, bset->eq[i] + mat->n_col, - morph->inv->row[0][0], bset->n_div); - } - isl_mat_free(mat); - - mat = isl_mat_sub_alloc6(bset->ctx, bset->ineq, 0, bset->n_ineq, - 0, morph->inv->n_row); - mat = isl_mat_product(mat, isl_mat_copy(morph->inv)); - if (!mat) - goto error; - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(res); - if (k < 0) - goto error; - isl_seq_cpy(res->ineq[k], mat->row[i], mat->n_col); - isl_seq_scale(res->ineq[k] + mat->n_col, - bset->ineq[i] + mat->n_col, - morph->inv->row[0][0], bset->n_div); - } - isl_mat_free(mat); - - mat = isl_mat_sub_alloc6(bset->ctx, bset->div, 0, bset->n_div, - 1, morph->inv->n_row); - mat = isl_mat_product(mat, isl_mat_copy(morph->inv)); - if (!mat) - goto error; - for (i = 0; i < bset->n_div; ++i) { - isl_int_mul(res->div[i][0], - morph->inv->row[0][0], bset->div[i][0]); - isl_seq_cpy(res->div[i] + 1, mat->row[i], mat->n_col); - isl_seq_scale(res->div[i] + 1 + mat->n_col, - bset->div[i] + 1 + mat->n_col, - morph->inv->row[0][0], bset->n_div); - } - isl_mat_free(mat); - - res = add_strides(res, morph); - - if (isl_basic_set_is_rational(bset)) - res = isl_basic_set_set_rational(res); - - res = isl_basic_set_simplify(res); - res = isl_basic_set_finalize(res); - - res = isl_basic_set_intersect(res, isl_basic_set_copy(morph->ran)); - - isl_morph_free(morph); - isl_basic_set_free(bset); - return res; -error: - isl_mat_free(mat); - isl_morph_free(morph); - isl_basic_set_free(bset); - isl_basic_set_free(res); - return NULL; -} - -/* Apply the morphism to the set. - */ -__isl_give isl_set *isl_morph_set(__isl_take isl_morph *morph, - __isl_take isl_set *set) -{ - int i; - - if (!morph || !set) - goto error; - - isl_assert(set->ctx, isl_space_is_equal(set->dim, morph->dom->dim), goto error); - - set = isl_set_cow(set); - if (!set) - goto error; - - isl_space_free(set->dim); - set->dim = isl_space_copy(morph->ran->dim); - if (!set->dim) - goto error; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_morph_basic_set(isl_morph_copy(morph), set->p[i]); - if (!set->p[i]) - goto error; - } - - isl_morph_free(morph); - - ISL_F_CLR(set, ISL_SET_NORMALIZED); - - return set; -error: - isl_set_free(set); - isl_morph_free(morph); - return NULL; -} - -/* Construct a morphism that first does morph2 and then morph1. - */ -__isl_give isl_morph *isl_morph_compose(__isl_take isl_morph *morph1, - __isl_take isl_morph *morph2) -{ - isl_mat *map, *inv; - isl_basic_set *dom, *ran; - - if (!morph1 || !morph2) - goto error; - - map = isl_mat_product(isl_mat_copy(morph1->map), isl_mat_copy(morph2->map)); - inv = isl_mat_product(isl_mat_copy(morph2->inv), isl_mat_copy(morph1->inv)); - dom = isl_morph_basic_set(isl_morph_inverse(isl_morph_copy(morph2)), - isl_basic_set_copy(morph1->dom)); - dom = isl_basic_set_intersect(dom, isl_basic_set_copy(morph2->dom)); - ran = isl_morph_basic_set(isl_morph_copy(morph1), - isl_basic_set_copy(morph2->ran)); - ran = isl_basic_set_intersect(ran, isl_basic_set_copy(morph1->ran)); - - isl_morph_free(morph1); - isl_morph_free(morph2); - - return isl_morph_alloc(dom, ran, map, inv); -error: - isl_morph_free(morph1); - isl_morph_free(morph2); - return NULL; -} - -__isl_give isl_morph *isl_morph_inverse(__isl_take isl_morph *morph) -{ - isl_basic_set *bset; - isl_mat *mat; - - morph = isl_morph_cow(morph); - if (!morph) - return NULL; - - bset = morph->dom; - morph->dom = morph->ran; - morph->ran = bset; - - mat = morph->map; - morph->map = morph->inv; - morph->inv = mat; - - return morph; -} - -__isl_give isl_morph *isl_basic_set_full_compression( - __isl_keep isl_basic_set *bset) -{ - isl_morph *morph, *morph2; - - bset = isl_basic_set_copy(bset); - - morph = isl_basic_set_variable_compression(bset, isl_dim_param); - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - - morph2 = isl_basic_set_parameter_compression(bset); - bset = isl_morph_basic_set(isl_morph_copy(morph2), bset); - - morph = isl_morph_compose(morph2, morph); - - morph2 = isl_basic_set_variable_compression(bset, isl_dim_set); - isl_basic_set_free(bset); - - morph = isl_morph_compose(morph2, morph); - - return morph; -} - -__isl_give isl_vec *isl_morph_vec(__isl_take isl_morph *morph, - __isl_take isl_vec *vec) -{ - if (!morph) - goto error; - - vec = isl_mat_vec_product(isl_mat_copy(morph->map), vec); - - isl_morph_free(morph); - return vec; -error: - isl_morph_free(morph); - isl_vec_free(vec); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_morph.h b/cloog-0.17.0/isl/isl_morph.h deleted file mode 100644 index 372344889ad7b61ca7e1badc5e71db96ca0c11d4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_morph.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#ifndef ISL_MORHP_H -#define ISL_MORHP_H - -#include -#include -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -/* An isl_morph is a "morphism" on (basic) sets. - * "map" is an affine mapping from "dom" to "ran" - * and "inv" is the inverse mapping. - */ -struct isl_morph { - int ref; - - isl_basic_set *dom; - isl_basic_set *ran; - - isl_mat *map; - isl_mat *inv; -}; -typedef struct isl_morph isl_morph; - -__isl_give isl_morph *isl_morph_alloc( - __isl_take isl_basic_set *dom, __isl_take isl_basic_set *ran, - __isl_take isl_mat *map, __isl_take isl_mat *inv); -__isl_give isl_morph *isl_morph_copy(__isl_keep isl_morph *morph); -__isl_give isl_morph *isl_morph_identity(__isl_keep isl_basic_set *bset); -void isl_morph_free(__isl_take isl_morph *morph); - -__isl_give isl_space *isl_morph_get_ran_space(__isl_keep isl_morph *morph); -unsigned isl_morph_dom_dim(__isl_keep isl_morph *morph, enum isl_dim_type type); -unsigned isl_morph_ran_dim(__isl_keep isl_morph *morph, enum isl_dim_type type); - -__isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_morph *isl_morph_remove_ran_dims(__isl_take isl_morph *morph, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_morph *isl_morph_dom_params(__isl_take isl_morph *morph); -__isl_give isl_morph *isl_morph_ran_params(__isl_take isl_morph *morph); - -__isl_give isl_morph *isl_morph_compose(__isl_take isl_morph *morph1, - __isl_take isl_morph *morph2); -__isl_give isl_morph *isl_morph_inverse(__isl_take isl_morph *morph); - -void isl_morph_dump(__isl_take isl_morph *morph, FILE *out); - -__isl_give isl_morph *isl_basic_set_variable_compression( - __isl_keep isl_basic_set *bset, enum isl_dim_type type); -__isl_give isl_morph *isl_basic_set_parameter_compression( - __isl_keep isl_basic_set *bset); -__isl_give isl_morph *isl_basic_set_full_compression( - __isl_keep isl_basic_set *bset); - -__isl_give isl_basic_set *isl_morph_basic_set(__isl_take isl_morph *morph, - __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_morph_set(__isl_take isl_morph *morph, - __isl_take isl_set *set); -__isl_give isl_vec *isl_morph_vec(__isl_take isl_morph *morph, - __isl_take isl_vec *vec); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_multi_templ.c b/cloog-0.17.0/isl/isl_multi_templ.c deleted file mode 100644 index a60b7d453daaf68dbbdb61ad4b4aad9b986fa261..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_multi_templ.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright 2011 Sven Verdoolaege - * - * Use of this software is governed by the GNU LGPLv2.1 license - */ - -#define xCAT(A,B) A ## B -#define CAT(A,B) xCAT(A,B) -#undef EL -#define EL CAT(isl_,BASE) -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xMULTI(BASE) isl_multi_ ## BASE -#define MULTI(BASE) xMULTI(BASE) -#define MULTI_NAME(BASE) "isl_multi_" #BASE -#define xLIST(EL) EL ## _list -#define LIST(EL) xLIST(EL) - -isl_ctx *FN(MULTI(BASE),get_ctx)(__isl_keep MULTI(BASE) *multi) -{ - return multi ? isl_space_get_ctx(multi->space) : NULL; -} - -__isl_give isl_space *FN(MULTI(BASE),get_space)(__isl_keep MULTI(BASE) *multi) -{ - return multi ? isl_space_copy(multi->space) : NULL; -} - -__isl_give isl_space *FN(MULTI(BASE),get_domain_space)( - __isl_keep MULTI(BASE) *multi) -{ - return multi ? isl_space_domain(isl_space_copy(multi->space)) : NULL; -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),alloc)(__isl_take isl_space *space) -{ - isl_ctx *ctx; - int n; - MULTI(BASE) *multi; - - if (!space) - return NULL; - - ctx = isl_space_get_ctx(space); - n = isl_space_dim(space, isl_dim_out); - multi = isl_calloc(ctx, MULTI(BASE), - sizeof(MULTI(BASE)) + (n - 1) * sizeof(struct EL *)); - if (!multi) - goto error; - - multi->space = space; - multi->n = n; - multi->ref = 1; - return multi; -error: - isl_space_free(space); - return NULL; -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),dup)(__isl_keep MULTI(BASE) *multi) -{ - int i; - MULTI(BASE) *dup; - - if (!multi) - return NULL; - - dup = FN(MULTI(BASE),alloc)(isl_space_copy(multi->space)); - if (!dup) - return NULL; - - for (i = 0; i < multi->n; ++i) - dup = FN(FN(MULTI(BASE),set),BASE)(dup, i, - FN(EL,copy)(multi->p[i])); - - return dup; -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),cow)(__isl_take MULTI(BASE) *multi) -{ - if (!multi) - return NULL; - - if (multi->ref == 1) - return multi; - - multi->ref--; - return FN(MULTI(BASE),dup)(multi); -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),copy)(__isl_keep MULTI(BASE) *multi) -{ - if (!multi) - return NULL; - - multi->ref++; - return multi; -} - -void *FN(MULTI(BASE),free)(__isl_take MULTI(BASE) *multi) -{ - int i; - - if (!multi) - return NULL; - - if (--multi->ref > 0) - return NULL; - - isl_space_free(multi->space); - for (i = 0; i < multi->n; ++i) - FN(EL,free)(multi->p[i]); - free(multi); - - return NULL; -} - -unsigned FN(MULTI(BASE),dim)(__isl_keep MULTI(BASE) *multi, - enum isl_dim_type type) -{ - return multi ? isl_space_dim(multi->space, type) : 0; -} - -const char *FN(MULTI(BASE),get_tuple_name)(__isl_keep MULTI(BASE) *multi, - enum isl_dim_type type) -{ - return multi ? isl_space_get_tuple_name(multi->space, type) : NULL; -} - -__isl_give EL *FN(FN(MULTI(BASE),get),BASE)(__isl_keep MULTI(BASE) *multi, - int pos) -{ - isl_ctx *ctx; - - if (!multi) - return NULL; - ctx = FN(MULTI(BASE),get_ctx)(multi); - if (pos < 0 || pos >= multi->n) - isl_die(ctx, isl_error_invalid, - "index out of bounds", return NULL); - return FN(EL,copy)(multi->p[pos]); -} - -__isl_give MULTI(BASE) *FN(FN(MULTI(BASE),set),BASE)( - __isl_take MULTI(BASE) *multi, int pos, __isl_take EL *el) -{ - if (!multi || !el) - goto error; - - FN(EL,free)(multi->p[pos]); - multi->p[pos] = el; - - return multi; -error: - FN(MULTI(BASE),free)(multi); - FN(EL,free)(el); - return NULL; -} - -/* Reset the space of "multi". This function is called from isl_pw_templ.c - * and doesn't know if the space of an element object is represented - * directly or through its domain. It therefore passes along both, - * which we pass along to the element function since we don't how - * that is represented either. - */ -__isl_give MULTI(BASE) *FN(MULTI(BASE),reset_space_and_domain)( - __isl_take MULTI(BASE) *multi, __isl_take isl_space *space, - __isl_take isl_space *domain) -{ - int i; - - multi = FN(MULTI(BASE),cow)(multi); - if (!multi || !space || !domain) - goto error; - - for (i = 0; i < multi->n; ++i) { - multi->p[i] = FN(EL,reset_space_and_domain)(multi->p[i], - isl_space_copy(space), isl_space_copy(domain)); - if (!multi->p[i]) - goto error; - } - isl_space_free(domain); - isl_space_free(multi->space); - multi->space = space; - - return multi; -error: - isl_space_free(domain); - isl_space_free(space); - FN(MULTI(BASE),free)(multi); - return NULL; -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),reset_domain_space)( - __isl_take MULTI(BASE) *multi, __isl_take isl_space *domain) -{ - isl_space *space; - - space = isl_space_extend_domain_with_range(isl_space_copy(domain), - isl_space_copy(multi->space)); - return FN(MULTI(BASE),reset_space_and_domain)(multi, space, domain); -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),realign_domain)( - __isl_take MULTI(BASE) *multi, __isl_take isl_reordering *exp) -{ - int i; - - multi = FN(MULTI(BASE),cow)(multi); - if (!multi || !exp) - return NULL; - - for (i = 0; i < multi->n; ++i) { - multi->p[i] = FN(EL,realign_domain)(multi->p[i], - isl_reordering_copy(exp)); - if (!multi->p[i]) - goto error; - } - - multi = FN(MULTI(BASE),reset_domain_space)(multi, - isl_space_copy(exp->dim)); - - isl_reordering_free(exp); - return multi; -error: - isl_reordering_free(exp); - FN(MULTI(BASE),free)(multi); - return NULL; -} - -/* Align the parameters of "multi" to those of "model". - */ -__isl_give MULTI(BASE) *FN(MULTI(BASE),align_params)( - __isl_take MULTI(BASE) *multi, __isl_take isl_space *model) -{ - isl_ctx *ctx; - - if (!multi || !model) - goto error; - - ctx = isl_space_get_ctx(model); - if (!isl_space_has_named_params(model)) - isl_die(ctx, isl_error_invalid, - "model has unnamed parameters", goto error); - if (!isl_space_has_named_params(multi->space)) - isl_die(ctx, isl_error_invalid, - "input has unnamed parameters", goto error); - if (!isl_space_match(multi->space, isl_dim_param, - model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_space_params(model); - exp = isl_parameter_alignment_reordering(multi->space, model); - exp = isl_reordering_extend_space(exp, - FN(MULTI(BASE),get_domain_space)(multi)); - multi = FN(MULTI(BASE),realign_domain)(multi, exp); - } - - isl_space_free(model); - return multi; -error: - isl_space_free(model); - FN(MULTI(BASE),free)(multi); - return NULL; -} - -static __isl_give MULTI(BASE) *align_params_multi_set_and( - __isl_take MULTI(BASE) *multi, __isl_take isl_set *set, - __isl_give MULTI(BASE) *(*fn)(__isl_take MULTI(BASE) *multi, - __isl_take isl_set *set)) -{ - isl_ctx *ctx; - - if (!multi || !set) - goto error; - if (isl_space_match(multi->space, isl_dim_param, - set->dim, isl_dim_param)) - return fn(multi, set); - ctx = FN(MULTI(BASE),get_ctx)(multi); - if (!isl_space_has_named_params(multi->space) || - !isl_space_has_named_params(set->dim)) - isl_die(ctx, isl_error_invalid, - "unaligned unnamed parameters", goto error); - multi = FN(MULTI(BASE),align_params)(multi, isl_set_get_space(set)); - set = isl_set_align_params(set, FN(MULTI(BASE),get_space)(multi)); - return fn(multi, set); -error: - FN(MULTI(BASE),free)(multi); - isl_set_free(set); - return NULL; -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),gist_aligned)( - __isl_take MULTI(BASE) *multi, __isl_take isl_set *context) -{ - int i; - - if (!multi || !context) - goto error; - - for (i = 0; i < multi->n; ++i) { - multi->p[i] = FN(EL,gist)(multi->p[i], isl_set_copy(context)); - if (!multi->p[i]) - goto error; - } - - isl_set_free(context); - return multi; -error: - isl_set_free(context); - FN(MULTI(BASE),free)(multi); - return NULL; -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),gist)(__isl_take MULTI(BASE) *multi, - __isl_take isl_set *context) -{ - return align_params_multi_set_and(multi, context, - &FN(MULTI(BASE),gist_aligned)); -} - -__isl_give MULTI(BASE) *FN(MULTI(BASE),gist_params)( - __isl_take MULTI(BASE) *multi, __isl_take isl_set *context) -{ - isl_space *space = FN(MULTI(BASE),get_domain_space)(multi); - isl_set *dom_context = isl_set_universe(space); - dom_context = isl_set_intersect_params(dom_context, context); - return FN(MULTI(BASE),gist)(multi, dom_context); -} - -__isl_give MULTI(BASE) *FN(FN(MULTI(BASE),from),LIST(BASE))( - __isl_take isl_space *space, __isl_take LIST(EL) *list) -{ - int i; - int n; - isl_ctx *ctx; - MULTI(BASE) *multi; - - if (!space || !list) - goto error; - - ctx = isl_space_get_ctx(space); - n = FN(FN(LIST(EL),n),BASE)(list); - if (n != isl_space_dim(space, isl_dim_out)) - isl_die(ctx, isl_error_invalid, - "invalid number of elements in list", goto error); - - multi = FN(MULTI(BASE),alloc)(isl_space_copy(space)); - for (i = 0; i < n; ++i) { - multi = FN(FN(MULTI(BASE),set),BASE)(multi, i, - FN(FN(LIST(EL),get),BASE)(list, i)); - } - - isl_space_free(space); - FN(LIST(EL),free)(list); - return multi; -error: - isl_space_free(space); - FN(LIST(EL),free)(list); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_multi_templ.h b/cloog-0.17.0/isl/isl_multi_templ.h deleted file mode 100644 index 329985ed7eb8114fcbe06aafe6658e82386beea1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_multi_templ.h +++ /dev/null @@ -1,22 +0,0 @@ -#define xCAT(A,B) A ## B -#define CAT(A,B) xCAT(A,B) -#undef EL -#define EL CAT(isl_,BASE) -#define xMULTI(BASE) isl_multi_ ## BASE -#define MULTI(BASE) xMULTI(BASE) - -struct MULTI(BASE) { - int ref; - isl_space *space; - - int n; - EL *p[1]; -}; - -#define ISL_DECLARE_MULTI_PRIVATE(BASE) \ -__isl_give isl_multi_##BASE *isl_multi_##BASE##_alloc( \ - __isl_take isl_space *space); \ -__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_##BASE( \ - __isl_take isl_multi_##BASE *multi, int pos, __isl_take EL *el); - -ISL_DECLARE_MULTI_PRIVATE(aff) diff --git a/cloog-0.17.0/isl/isl_obj.c b/cloog-0.17.0/isl/isl_obj.c deleted file mode 100644 index dc63454966c42632477e35dbc0e413ce7b068bfc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_obj.c +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include - -struct isl_int_obj { - int ref; - isl_ctx *ctx; - isl_int v; -}; - -__isl_give isl_int_obj *isl_int_obj_alloc(isl_ctx *ctx, isl_int v) -{ - isl_int_obj *i; - - i = isl_alloc_type(ctx, isl_int_obj); - if (!i) - return NULL; - - i->ctx = ctx; - isl_ctx_ref(ctx); - i->ref = 1; - isl_int_init(i->v); - isl_int_set(i->v, v); - - return i; -} - -__isl_give isl_int_obj *isl_int_obj_copy(__isl_keep isl_int_obj *i) -{ - if (!i) - return NULL; - - i->ref++; - return i; -} - -__isl_give isl_int_obj *isl_int_obj_dup(__isl_keep isl_int_obj *i) -{ - if (!i) - return NULL; - - return isl_int_obj_alloc(i->ctx, i->v); -} - -__isl_give isl_int_obj *isl_int_obj_cow(__isl_take isl_int_obj *i) -{ - if (!i) - return NULL; - - if (i->ref == 1) - return i; - i->ref--; - return isl_int_obj_dup(i); -} - -void isl_int_obj_free(__isl_take isl_int_obj *i) -{ - if (!i) - return; - - if (--i->ref > 0) - return; - - isl_ctx_deref(i->ctx); - isl_int_clear(i->v); - free(i); -} - -__isl_give isl_int_obj *isl_int_obj_add(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2) -{ - i1 = isl_int_obj_cow(i1); - if (!i1 || !i2) - goto error; - - isl_int_add(i1->v, i1->v, i2->v); - - isl_int_obj_free(i2); - return i1; -error: - isl_int_obj_free(i1); - isl_int_obj_free(i2); - return NULL; -} - -__isl_give isl_int_obj *isl_int_obj_sub(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2) -{ - i1 = isl_int_obj_cow(i1); - if (!i1 || !i2) - goto error; - - isl_int_sub(i1->v, i1->v, i2->v); - - isl_int_obj_free(i2); - return i1; -error: - isl_int_obj_free(i1); - isl_int_obj_free(i2); - return NULL; -} - -__isl_give isl_int_obj *isl_int_obj_mul(__isl_take isl_int_obj *i1, - __isl_take isl_int_obj *i2) -{ - i1 = isl_int_obj_cow(i1); - if (!i1 || !i2) - goto error; - - isl_int_mul(i1->v, i1->v, i2->v); - - isl_int_obj_free(i2); - return i1; -error: - isl_int_obj_free(i1); - isl_int_obj_free(i2); - return NULL; -} - -void isl_int_obj_get_int(__isl_keep isl_int_obj *i, isl_int *v) -{ - if (!i) - return; - isl_int_set(*v, i->v); -} - -static void *isl_obj_int_copy(void *v) -{ - return isl_int_obj_copy((isl_int_obj *)v); -} - -static void isl_obj_int_free(void *v) -{ - isl_int_obj_free((isl_int_obj *)v); -} - -static __isl_give isl_printer *isl_obj_int_print(__isl_take isl_printer *p, - void *v) -{ - isl_int_obj *i = v; - return isl_printer_print_isl_int(p, i->v); -} - -static void *isl_obj_int_add(void *v1, void *v2) -{ - return isl_int_obj_add((isl_int_obj *)v1, (isl_int_obj *)v2); -} - -struct isl_obj_vtable isl_obj_int_vtable = { - isl_obj_int_copy, - isl_obj_int_add, - isl_obj_int_print, - isl_obj_int_free -}; - -static void *isl_obj_map_copy(void *v) -{ - return isl_map_copy((struct isl_map *)v); -} - -static void isl_obj_map_free(void *v) -{ - isl_map_free((struct isl_map *)v); -} - -static __isl_give isl_printer *isl_obj_map_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_map(p, (struct isl_map *)v); -} - -static void *isl_obj_map_add(void *v1, void *v2) -{ - return isl_map_union((struct isl_map *)v1, (struct isl_map *)v2); -} - -struct isl_obj_vtable isl_obj_map_vtable = { - isl_obj_map_copy, - isl_obj_map_add, - isl_obj_map_print, - isl_obj_map_free -}; - -static void *isl_obj_union_map_copy(void *v) -{ - return isl_union_map_copy((isl_union_map *)v); -} - -static void isl_obj_union_map_free(void *v) -{ - isl_union_map_free((isl_union_map *)v); -} - -static __isl_give isl_printer *isl_obj_union_map_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_union_map(p, (isl_union_map *)v); -} - -static void *isl_obj_union_map_add(void *v1, void *v2) -{ - return isl_union_map_union((isl_union_map *)v1, (isl_union_map *)v2); -} - -struct isl_obj_vtable isl_obj_union_map_vtable = { - isl_obj_union_map_copy, - isl_obj_union_map_add, - isl_obj_union_map_print, - isl_obj_union_map_free -}; - -static void *isl_obj_set_copy(void *v) -{ - return isl_set_copy((struct isl_set *)v); -} - -static void isl_obj_set_free(void *v) -{ - isl_set_free((struct isl_set *)v); -} - -static __isl_give isl_printer *isl_obj_set_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_set(p, (struct isl_set *)v); -} - -static void *isl_obj_set_add(void *v1, void *v2) -{ - return isl_set_union((struct isl_set *)v1, (struct isl_set *)v2); -} - -struct isl_obj_vtable isl_obj_set_vtable = { - isl_obj_set_copy, - isl_obj_set_add, - isl_obj_set_print, - isl_obj_set_free -}; - -static void *isl_obj_union_set_copy(void *v) -{ - return isl_union_set_copy((isl_union_set *)v); -} - -static void isl_obj_union_set_free(void *v) -{ - isl_union_set_free((isl_union_set *)v); -} - -static __isl_give isl_printer *isl_obj_union_set_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_union_set(p, (isl_union_set *)v); -} - -static void *isl_obj_union_set_add(void *v1, void *v2) -{ - return isl_union_set_union((isl_union_set *)v1, (isl_union_set *)v2); -} - -struct isl_obj_vtable isl_obj_union_set_vtable = { - isl_obj_union_set_copy, - isl_obj_union_set_add, - isl_obj_union_set_print, - isl_obj_union_set_free -}; - -static void *isl_obj_none_copy(void *v) -{ - return v; -} - -static void isl_obj_none_free(void *v) -{ -} - -static __isl_give isl_printer *isl_obj_none_print(__isl_take isl_printer *p, - void *v) -{ - return p; -} - -static void *isl_obj_none_add(void *v1, void *v2) -{ - return NULL; -} - -struct isl_obj_vtable isl_obj_none_vtable = { - isl_obj_none_copy, - isl_obj_none_add, - isl_obj_none_print, - isl_obj_none_free -}; - -static void *isl_obj_pw_qp_copy(void *v) -{ - return isl_pw_qpolynomial_copy((struct isl_pw_qpolynomial *)v); -} - -static void isl_obj_pw_qp_free(void *v) -{ - isl_pw_qpolynomial_free((struct isl_pw_qpolynomial *)v); -} - -static __isl_give isl_printer *isl_obj_pw_qp_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_pw_qpolynomial(p, - (struct isl_pw_qpolynomial *)v); -} - -static void *isl_obj_pw_qp_add(void *v1, void *v2) -{ - return isl_pw_qpolynomial_add((struct isl_pw_qpolynomial *)v1, - (struct isl_pw_qpolynomial *)v2); -} - -struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable = { - isl_obj_pw_qp_copy, - isl_obj_pw_qp_add, - isl_obj_pw_qp_print, - isl_obj_pw_qp_free -}; - -static void *isl_obj_union_pw_qp_copy(void *v) -{ - return isl_union_pw_qpolynomial_copy((struct isl_union_pw_qpolynomial *)v); -} - -static void isl_obj_union_pw_qp_free(void *v) -{ - isl_union_pw_qpolynomial_free((struct isl_union_pw_qpolynomial *)v); -} - -static __isl_give isl_printer *isl_obj_union_pw_qp_print( - __isl_take isl_printer *p, void *v) -{ - return isl_printer_print_union_pw_qpolynomial(p, - (struct isl_union_pw_qpolynomial *)v); -} - -static void *isl_obj_union_pw_qp_add(void *v1, void *v2) -{ - return isl_union_pw_qpolynomial_add( - (struct isl_union_pw_qpolynomial *)v1, - (struct isl_union_pw_qpolynomial *)v2); -} - -struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable = { - isl_obj_union_pw_qp_copy, - isl_obj_union_pw_qp_add, - isl_obj_union_pw_qp_print, - isl_obj_union_pw_qp_free -}; - -static void *isl_obj_pw_qpf_copy(void *v) -{ - return isl_pw_qpolynomial_fold_copy((struct isl_pw_qpolynomial_fold *)v); -} - -static void isl_obj_pw_qpf_free(void *v) -{ - isl_pw_qpolynomial_fold_free((struct isl_pw_qpolynomial_fold *)v); -} - -static __isl_give isl_printer *isl_obj_pw_qpf_print(__isl_take isl_printer *p, - void *v) -{ - return isl_printer_print_pw_qpolynomial_fold(p, - (struct isl_pw_qpolynomial_fold *)v); -} - -static void *isl_obj_pw_qpf_add(void *v1, void *v2) -{ - return isl_pw_qpolynomial_fold_fold((struct isl_pw_qpolynomial_fold *)v1, - (struct isl_pw_qpolynomial_fold *)v2); -} - -struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable = { - isl_obj_pw_qpf_copy, - isl_obj_pw_qpf_add, - isl_obj_pw_qpf_print, - isl_obj_pw_qpf_free -}; - -static void *isl_obj_union_pw_qpf_copy(void *v) -{ - return isl_union_pw_qpolynomial_fold_copy((struct isl_union_pw_qpolynomial_fold *)v); -} - -static void isl_obj_union_pw_qpf_free(void *v) -{ - isl_union_pw_qpolynomial_fold_free((struct isl_union_pw_qpolynomial_fold *)v); -} - -static __isl_give isl_printer *isl_obj_union_pw_qpf_print( - __isl_take isl_printer *p, void *v) -{ - return isl_printer_print_union_pw_qpolynomial_fold(p, - (struct isl_union_pw_qpolynomial_fold *)v); -} - -static void *isl_obj_union_pw_qpf_add(void *v1, void *v2) -{ - return isl_union_pw_qpolynomial_fold_fold( - (struct isl_union_pw_qpolynomial_fold *)v1, - (struct isl_union_pw_qpolynomial_fold *)v2); -} - -struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable = { - isl_obj_union_pw_qpf_copy, - isl_obj_union_pw_qpf_add, - isl_obj_union_pw_qpf_print, - isl_obj_union_pw_qpf_free -}; diff --git a/cloog-0.17.0/isl/isl_options.c b/cloog-0.17.0/isl/isl_options.c deleted file mode 100644 index 35d8a46700ce506970abe559e9591020c0741d74..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_options.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -#include -#include -#include - -struct isl_arg_choice isl_lp_solver_choice[] = { - {"tab", ISL_LP_TAB}, -#ifdef ISL_PIPLIB - {"pip", ISL_LP_PIP}, -#endif - {0} -}; - -struct isl_arg_choice isl_ilp_solver_choice[] = { - {"gbr", ISL_ILP_GBR}, -#ifdef ISL_PIPLIB - {"pip", ISL_ILP_PIP}, -#endif - {0} -}; - -struct isl_arg_choice isl_pip_solver_choice[] = { - {"tab", ISL_PIP_TAB}, -#ifdef ISL_PIPLIB - {"pip", ISL_PIP_PIP}, -#endif - {0} -}; - -struct isl_arg_choice isl_pip_context_choice[] = { - {"gbr", ISL_CONTEXT_GBR}, - {"lexmin", ISL_CONTEXT_LEXMIN}, - {0} -}; - -struct isl_arg_choice isl_gbr_choice[] = { - {"never", ISL_GBR_NEVER}, - {"once", ISL_GBR_ONCE}, - {"always", ISL_GBR_ALWAYS}, - {0} -}; - -struct isl_arg_choice isl_closure_choice[] = { - {"isl", ISL_CLOSURE_ISL}, - {"box", ISL_CLOSURE_BOX}, - {0} -}; - -static struct isl_arg_choice bound[] = { - {"bernstein", ISL_BOUND_BERNSTEIN}, - {"range", ISL_BOUND_RANGE}, - {0} -}; - -static struct isl_arg_choice on_error[] = { - {"warn", ISL_ON_ERROR_WARN}, - {"continue", ISL_ON_ERROR_CONTINUE}, - {"abort", ISL_ON_ERROR_ABORT}, - {0} -}; - -static struct isl_arg_flags bernstein_recurse[] = { - {"none", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, 0}, - {"factors", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, - ISL_BERNSTEIN_FACTORS}, - {"intervals", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, - ISL_BERNSTEIN_INTERVALS}, - {"full", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, - ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS}, - {0} -}; - -static struct isl_arg_choice convex[] = { - {"wrap", ISL_CONVEX_HULL_WRAP}, - {"fm", ISL_CONVEX_HULL_FM}, - {0} -}; - -static void print_version(void) -{ - printf("%s", isl_version()); -} - -ISL_ARGS_START(struct isl_options, isl_options_args) -ISL_ARG_CHOICE(struct isl_options, lp_solver, 0, "lp-solver", \ - isl_lp_solver_choice, ISL_LP_TAB, "lp solver to use") -ISL_ARG_CHOICE(struct isl_options, ilp_solver, 0, "ilp-solver", \ - isl_ilp_solver_choice, ISL_ILP_GBR, "ilp solver to use") -ISL_ARG_CHOICE(struct isl_options, pip, 0, "pip", \ - isl_pip_solver_choice, ISL_PIP_TAB, "pip solver to use") -ISL_ARG_CHOICE(struct isl_options, context, 0, "context", \ - isl_pip_context_choice, ISL_CONTEXT_GBR, - "how to handle the pip context tableau") -ISL_ARG_CHOICE(struct isl_options, gbr, 0, "gbr", \ - isl_gbr_choice, ISL_GBR_ONCE, - "how often to use generalized basis reduction") -ISL_ARG_CHOICE(struct isl_options, closure, 0, "closure", \ - isl_closure_choice, ISL_CLOSURE_ISL, - "closure operation to use") -ISL_ARG_BOOL(struct isl_options, gbr_only_first, 0, "gbr-only-first", 0, - "only perform basis reduction in first direction") -ISL_ARG_CHOICE(struct isl_options, bound, 0, "bound", bound, - ISL_BOUND_BERNSTEIN, "algorithm to use for computing bounds") -ISL_ARG_CHOICE(struct isl_options, on_error, 0, "on-error", on_error, - ISL_ON_ERROR_WARN, "how to react if an error is detected") -ISL_ARG_FLAGS(struct isl_options, bernstein_recurse, 0, - "bernstein-recurse", bernstein_recurse, ISL_BERNSTEIN_FACTORS, NULL) -ISL_ARG_BOOL(struct isl_options, bernstein_triangulate, 0, - "bernstein-triangulate", 1, - "triangulate domains during Bernstein expansion") -ISL_ARG_BOOL(struct isl_options, pip_symmetry, 0, "pip-symmetry", 1, - "detect simple symmetries in PIP input") -ISL_ARG_CHOICE(struct isl_options, convex, 0, "convex-hull", \ - convex, ISL_CONVEX_HULL_WRAP, "convex hull algorithm to use") -ISL_ARG_INT(struct isl_options, schedule_max_constant_term, 0, - "schedule-max-constant-term", "limit", -1, "Only consider schedules " - "where the coefficients of the constant dimension do not exceed " - ". A value of -1 allows arbitrary coefficients.") -ISL_ARG_BOOL(struct isl_options, schedule_parametric, 0, - "schedule-parametric", 1, "construct possibly parametric schedules") -ISL_ARG_BOOL(struct isl_options, schedule_outer_zero_distance, 0, - "schedule-outer-zero-distance", 0, - "try to construct schedules with outer zero distances over " - "proximity dependences") -ISL_ARG_BOOL(struct isl_options, schedule_maximize_band_depth, 0, - "schedule-maximize-band-depth", 1, - "maximize the number of scheduling dimensions in a band") -ISL_ARG_BOOL(struct isl_options, schedule_split_parallel, 0, - "schedule-split-parallel", 1, - "split non-tilable bands with parallel schedules") -ISL_ARG_VERSION(print_version) -ISL_ARGS_END - -ISL_ARG_DEF(isl_options, struct isl_options, isl_options_args) - -ISL_ARG_CTX_DEF(isl_options, struct isl_options, isl_options_args) - -ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, bound) -ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, bound) - -ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, - on_error) -ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, - on_error) - -ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, - gbr_only_first) -ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, - gbr_only_first) - -ISL_CTX_SET_INT_DEF(isl_options, struct isl_options, isl_options_args, - schedule_max_constant_term) -ISL_CTX_GET_INT_DEF(isl_options, struct isl_options, isl_options_args, - schedule_max_constant_term) - -ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, - schedule_maximize_band_depth) -ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, - schedule_maximize_band_depth) - -ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, - schedule_outer_zero_distance) -ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, - schedule_outer_zero_distance) diff --git a/cloog-0.17.0/isl/isl_options_private.h b/cloog-0.17.0/isl/isl_options_private.h deleted file mode 100644 index 6cbd8823575480cb48bc8014d0150eb903b303e3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_options_private.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ISL_OPTIONS_PRIVATE_H -#define ISL_OPTIONS_PRIVATE_H - -#include - -struct isl_options { - #define ISL_LP_TAB 0 - #define ISL_LP_PIP 1 - unsigned lp_solver; - - #define ISL_ILP_GBR 0 - #define ISL_ILP_PIP 1 - unsigned ilp_solver; - - #define ISL_PIP_TAB 0 - #define ISL_PIP_PIP 1 - unsigned pip; - - #define ISL_CONTEXT_GBR 0 - #define ISL_CONTEXT_LEXMIN 1 - unsigned context; - - #define ISL_GBR_NEVER 0 - #define ISL_GBR_ONCE 1 - #define ISL_GBR_ALWAYS 2 - unsigned gbr; - unsigned gbr_only_first; - - #define ISL_CLOSURE_ISL 0 - #define ISL_CLOSURE_BOX 1 - unsigned closure; - - int bound; - unsigned on_error; - - #define ISL_BERNSTEIN_FACTORS 1 - #define ISL_BERNSTEIN_INTERVALS 2 - int bernstein_recurse; - - int bernstein_triangulate; - - int pip_symmetry; - - #define ISL_CONVEX_HULL_WRAP 0 - #define ISL_CONVEX_HULL_FM 1 - int convex; - - int schedule_max_constant_term; - int schedule_parametric; - int schedule_outer_zero_distance; - int schedule_maximize_band_depth; - int schedule_split_parallel; -}; - -#endif diff --git a/cloog-0.17.0/isl/isl_output.c b/cloog-0.17.0/isl/isl_output.c deleted file mode 100644 index 6883e7f50a2016df3c4b9e8851a78a83f3cd8a9b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_output.c +++ /dev/null @@ -1,2389 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static const char *s_to[2] = { " -> ", " \\to " }; -static const char *s_and[2] = { " and ", " \\wedge " }; -static const char *s_or[2] = { " or ", " \\vee " }; -static const char *s_le[2] = { "<=", "\\le" }; -static const char *s_ge[2] = { ">=", "\\ge" }; -static const char *s_open_set[2] = { "{ ", "\\{\\, " }; -static const char *s_close_set[2] = { " }", " \\,\\}" }; -static const char *s_open_list[2] = { "[", "(" }; -static const char *s_close_list[2] = { "]", ")" }; -static const char *s_such_that[2] = { " : ", " \\mid " }; -static const char *s_open_exists[2] = { "exists (", "\\exists \\, " }; -static const char *s_close_exists[2] = { ")", "" }; -static const char *s_div_prefix[2] = { "e", "\\alpha_" }; -static const char *s_param_prefix[2] = { "p", "p_" }; -static const char *s_input_prefix[2] = { "i", "i_" }; -static const char *s_output_prefix[2] = { "o", "o_" }; - -static __isl_give isl_printer *print_constraint_polylib( - struct isl_basic_map *bmap, int ineq, int n, __isl_take isl_printer *p) -{ - int i; - unsigned n_in = isl_basic_map_dim(bmap, isl_dim_in); - unsigned n_out = isl_basic_map_dim(bmap, isl_dim_out); - unsigned nparam = isl_basic_map_dim(bmap, isl_dim_param); - isl_int *c = ineq ? bmap->ineq[n] : bmap->eq[n]; - - p = isl_printer_start_line(p); - p = isl_printer_print_int(p, ineq); - for (i = 0; i < n_out; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+nparam+n_in+i]); - } - for (i = 0; i < n_in; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+nparam+i]); - } - for (i = 0; i < bmap->n_div; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+nparam+n_in+n_out+i]); - } - for (i = 0; i < nparam; ++i) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[1+i]); - } - p = isl_printer_print_str(p, " "); - p = isl_printer_print_isl_int(p, c[0]); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *print_constraints_polylib( - struct isl_basic_map *bmap, __isl_take isl_printer *p) -{ - int i; - - p = isl_printer_set_isl_int_width(p, 5); - - for (i = 0; i < bmap->n_eq; ++i) - p = print_constraint_polylib(bmap, 0, i, p); - for (i = 0; i < bmap->n_ineq; ++i) - p = print_constraint_polylib(bmap, 1, i, p); - - return p; -} - -static __isl_give isl_printer *bset_print_constraints_polylib( - struct isl_basic_set *bset, __isl_take isl_printer *p) -{ - return print_constraints_polylib((struct isl_basic_map *)bset, p); -} - -static __isl_give isl_printer *isl_basic_map_print_polylib( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, int ext) -{ - unsigned total = isl_basic_map_total_dim(bmap); - p = isl_printer_start_line(p); - p = isl_printer_print_int(p, bmap->n_eq + bmap->n_ineq); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, 1 + total + 1); - if (ext) { - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_out)); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_in)); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_div)); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_int(p, - isl_basic_map_dim(bmap, isl_dim_param)); - } - p = isl_printer_end_line(p); - return print_constraints_polylib(bmap, p); -} - -static __isl_give isl_printer *isl_basic_set_print_polylib( - __isl_keep isl_basic_set *bset, __isl_take isl_printer *p, int ext) -{ - return isl_basic_map_print_polylib((struct isl_basic_map *)bset, p, ext); -} - -static __isl_give isl_printer *isl_map_print_polylib(__isl_keep isl_map *map, - __isl_take isl_printer *p, int ext) -{ - int i; - - p = isl_printer_start_line(p); - p = isl_printer_print_int(p, map->n); - p = isl_printer_end_line(p); - for (i = 0; i < map->n; ++i) { - p = isl_printer_start_line(p); - p = isl_printer_end_line(p); - p = isl_basic_map_print_polylib(map->p[i], p, ext); - } - return p; -} - -static __isl_give isl_printer *isl_set_print_polylib(__isl_keep isl_set *set, - __isl_take isl_printer *p, int ext) -{ - return isl_map_print_polylib((struct isl_map *)set, p, ext); -} - -static int count_same_name(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos, const char *name) -{ - enum isl_dim_type t; - unsigned p, s; - int count = 0; - - for (t = isl_dim_param; t <= type && t <= isl_dim_out; ++t) { - s = t == type ? pos : isl_space_dim(dim, t); - for (p = 0; p < s; ++p) { - const char *n = isl_space_get_dim_name(dim, t, p); - if (n && !strcmp(n, name)) - count++; - } - } - return count; -} - -static __isl_give isl_printer *print_name(__isl_keep isl_space *dim, - __isl_take isl_printer *p, enum isl_dim_type type, unsigned pos, - int latex) -{ - const char *name; - char buffer[20]; - int primes; - - name = type == isl_dim_div ? NULL : isl_space_get_dim_name(dim, type, pos); - - if (!name) { - const char *prefix; - if (type == isl_dim_param) - prefix = s_param_prefix[latex]; - else if (type == isl_dim_div) - prefix = s_div_prefix[latex]; - else if (isl_space_is_set(dim) || type == isl_dim_in) - prefix = s_input_prefix[latex]; - else - prefix = s_output_prefix[latex]; - snprintf(buffer, sizeof(buffer), "%s%d", prefix, pos); - name = buffer; - } - primes = count_same_name(dim, name == buffer ? isl_dim_div : type, - pos, name); - p = isl_printer_print_str(p, name); - while (primes-- > 0) - p = isl_printer_print_str(p, "'"); - return p; -} - -static enum isl_dim_type pos2type(__isl_keep isl_space *dim, unsigned *pos) -{ - enum isl_dim_type type; - unsigned n_in = isl_space_dim(dim, isl_dim_in); - unsigned n_out = isl_space_dim(dim, isl_dim_out); - unsigned nparam = isl_space_dim(dim, isl_dim_param); - - if (*pos < 1 + nparam) { - type = isl_dim_param; - *pos -= 1; - } else if (*pos < 1 + nparam + n_in) { - type = isl_dim_in; - *pos -= 1 + nparam; - } else if (*pos < 1 + nparam + n_in + n_out) { - type = isl_dim_out; - *pos -= 1 + nparam + n_in; - } else { - type = isl_dim_div; - *pos -= 1 + nparam + n_in + n_out; - } - - return type; -} - -static __isl_give isl_printer *print_div(__isl_keep isl_space *dim, - __isl_keep isl_mat *div, int pos, __isl_take isl_printer *p); - -static __isl_give isl_printer *print_term(__isl_keep isl_space *dim, - __isl_keep isl_mat *div, - isl_int c, unsigned pos, __isl_take isl_printer *p, int latex) -{ - enum isl_dim_type type; - int print_div_def; - - if (pos == 0) - return isl_printer_print_isl_int(p, c); - - type = pos2type(dim, &pos); - print_div_def = type == isl_dim_div && div && - !isl_int_is_zero(div->row[pos][0]); - - if (isl_int_is_one(c)) - ; - else if (isl_int_is_negone(c)) - p = isl_printer_print_str(p, "-"); - else { - p = isl_printer_print_isl_int(p, c); - if (p->output_format == ISL_FORMAT_C || print_div_def) - p = isl_printer_print_str(p, "*"); - } - if (print_div_def) - p = print_div(dim, div, pos, p); - else - p = print_name(dim, p, type, pos, latex); - return p; -} - -static __isl_give isl_printer *print_affine_of_len(__isl_keep isl_space *dim, - __isl_keep isl_mat *div, - __isl_take isl_printer *p, isl_int *c, int len) -{ - int i; - int first; - - for (i = 0, first = 1; i < len; ++i) { - int flip = 0; - if (isl_int_is_zero(c[i])) - continue; - if (!first) { - if (isl_int_is_neg(c[i])) { - flip = 1; - isl_int_neg(c[i], c[i]); - p = isl_printer_print_str(p, " - "); - } else - p = isl_printer_print_str(p, " + "); - } - first = 0; - p = print_term(dim, div, c[i], i, p, 0); - if (flip) - isl_int_neg(c[i], c[i]); - } - if (first) - p = isl_printer_print_str(p, "0"); - return p; -} - -static __isl_give isl_printer *print_affine(__isl_keep isl_basic_map *bmap, - __isl_keep isl_space *dim, __isl_take isl_printer *p, isl_int *c) -{ - unsigned len = 1 + isl_basic_map_total_dim(bmap); - return print_affine_of_len(dim, NULL, p, c, len); -} - -static int defining_equality(__isl_keep isl_basic_map *eq, - __isl_keep isl_space *dim, enum isl_dim_type type, int pos) -{ - int i; - unsigned total; - - if (!eq) - return -1; - - pos += isl_space_offset(dim, type); - total = isl_basic_map_total_dim(eq); - - for (i = 0; i < eq->n_eq; ++i) { - if (isl_seq_last_non_zero(eq->eq[i] + 1, total) != pos) - continue; - if (isl_int_is_one(eq->eq[i][1 + pos])) - isl_seq_neg(eq->eq[i], eq->eq[i], 1 + total); - return i; - } - - return -1; -} - -static __isl_give isl_printer *print_aff_body(__isl_take isl_printer *p, - __isl_keep isl_aff *aff); - -/* offset is the offset of local_dim inside global_type of global_dim. - */ -static __isl_give isl_printer *print_nested_var_list(__isl_take isl_printer *p, - __isl_keep isl_space *global_dim, enum isl_dim_type global_type, - __isl_keep isl_space *local_dim, enum isl_dim_type local_type, - int latex, __isl_keep isl_basic_map *eq, - __isl_keep isl_multi_aff *maff, int offset) -{ - int i, j; - - if (global_dim != local_dim && local_type == isl_dim_out) - offset += local_dim->n_in; - - for (i = 0; i < isl_space_dim(local_dim, local_type); ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - if (maff && global_type == isl_dim_out) { - p = print_aff_body(p, maff->p[offset + i]); - continue; - } - j = defining_equality(eq, global_dim, global_type, offset + i); - if (j >= 0) { - int pos = 1 + isl_space_offset(global_dim, global_type) - + offset + i; - p = print_affine_of_len(eq->dim, NULL, - p, eq->eq[j], pos); - } else { - p = print_name(global_dim, p, global_type, offset + i, - latex); - } - } - return p; -} - -static __isl_give isl_printer *print_var_list(__isl_keep isl_space *dim, - __isl_take isl_printer *p, enum isl_dim_type type, - int latex, __isl_keep isl_basic_map *eq, __isl_keep isl_multi_aff *maff) -{ - return print_nested_var_list(p, dim, type, dim, type, latex, - eq, maff, 0); -} - -static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p, - __isl_keep isl_space *global_dim, enum isl_dim_type global_type, - __isl_keep isl_space *local_dim, - int latex, __isl_keep isl_basic_map *eq, - __isl_keep isl_multi_aff *maff, int offset); - -static __isl_give isl_printer *print_nested_tuple(__isl_take isl_printer *p, - __isl_keep isl_space *global_dim, enum isl_dim_type global_type, - __isl_keep isl_space *local_dim, enum isl_dim_type local_type, - int latex, __isl_keep isl_basic_map *eq, - __isl_keep isl_multi_aff *maff, int offset) -{ - const char *name = NULL; - unsigned n = isl_space_dim(local_dim, local_type); - if ((local_type == isl_dim_in || local_type == isl_dim_out)) { - name = isl_space_get_tuple_name(local_dim, local_type); - if (name) { - if (latex) - p = isl_printer_print_str(p, "\\mathrm{"); - p = isl_printer_print_str(p, name); - if (latex) - p = isl_printer_print_str(p, "}"); - } - } - if (!latex || n != 1 || name) - p = isl_printer_print_str(p, s_open_list[latex]); - if ((local_type == isl_dim_in || local_type == isl_dim_out) && - local_dim->nested[local_type - isl_dim_in]) { - if (global_dim != local_dim && local_type == isl_dim_out) - offset += local_dim->n_in; - p = print_nested_map_dim(p, global_dim, global_type, - local_dim->nested[local_type - isl_dim_in], - latex, eq, maff, offset); - } else - p = print_nested_var_list(p, global_dim, global_type, - local_dim, local_type, latex, - eq, maff, offset); - if (!latex || n != 1 || name) - p = isl_printer_print_str(p, s_close_list[latex]); - return p; -} - -static __isl_give isl_printer *print_tuple(__isl_keep isl_space *dim, - __isl_take isl_printer *p, enum isl_dim_type type, - int latex, __isl_keep isl_basic_map *eq, __isl_keep isl_multi_aff *maff) -{ - return print_nested_tuple(p, dim, type, dim, type, latex, eq, maff, 0); -} - -static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p, - __isl_keep isl_space *global_dim, enum isl_dim_type global_type, - __isl_keep isl_space *local_dim, - int latex, __isl_keep isl_basic_map *eq, - __isl_keep isl_multi_aff *maff, int offset) -{ - p = print_nested_tuple(p, global_dim, global_type, - local_dim, isl_dim_in, latex, eq, maff, offset); - p = isl_printer_print_str(p, s_to[latex]); - p = print_nested_tuple(p, global_dim, global_type, - local_dim, isl_dim_out, latex, eq, maff, offset); - - return p; -} - -static __isl_give isl_printer *print_space(__isl_keep isl_space *dim, - __isl_take isl_printer *p, int latex, int rational, - __isl_keep isl_basic_map *eq, __isl_keep isl_multi_aff *maff) -{ - if (rational && !latex) - p = isl_printer_print_str(p, "rat: "); - if (isl_space_is_params(dim)) - ; - else if (isl_space_is_set(dim)) - p = print_tuple(dim, p, isl_dim_set, latex, eq, maff); - else { - p = print_tuple(dim, p, isl_dim_in, latex, eq, maff); - p = isl_printer_print_str(p, s_to[latex]); - p = print_tuple(dim, p, isl_dim_out, latex, eq, maff); - } - - return p; -} - -static __isl_give isl_printer *print_omega_parameters(__isl_keep isl_space *dim, - __isl_take isl_printer *p) -{ - if (isl_space_dim(dim, isl_dim_param) == 0) - return p; - - p = isl_printer_start_line(p); - p = isl_printer_print_str(p, "symbolic "); - p = print_var_list(dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, ";"); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *print_constraint(struct isl_basic_map *bmap, - __isl_keep isl_space *dim, __isl_take isl_printer *p, - isl_int *c, int last, const char *op, int first_constraint, int latex) -{ - if (!first_constraint) - p = isl_printer_print_str(p, s_and[latex]); - - isl_int_abs(c[last], c[last]); - - p = print_term(dim, NULL, c[last], last, p, latex); - - p = isl_printer_print_str(p, " "); - p = isl_printer_print_str(p, op); - p = isl_printer_print_str(p, " "); - - isl_int_set_si(c[last], 0); - p = print_affine(bmap, dim, p, c); - - return p; -} - -static __isl_give isl_printer *print_constraints(__isl_keep isl_basic_map *bmap, - __isl_keep isl_space *dim, __isl_take isl_printer *p, int latex) -{ - int i; - struct isl_vec *c; - unsigned total = isl_basic_map_total_dim(bmap); - - c = isl_vec_alloc(bmap->ctx, 1 + total); - if (!c) - goto error; - - for (i = bmap->n_eq - 1; i >= 0; --i) { - int l = isl_seq_last_non_zero(bmap->eq[i], 1 + total); - if (l < 0) { - if (i != bmap->n_eq - 1) - p = isl_printer_print_str(p, s_and[latex]); - p = isl_printer_print_str(p, "0 = 0"); - continue; - } - if (isl_int_is_neg(bmap->eq[i][l])) - isl_seq_cpy(c->el, bmap->eq[i], 1 + total); - else - isl_seq_neg(c->el, bmap->eq[i], 1 + total); - p = print_constraint(bmap, dim, p, c->el, l, - "=", i == bmap->n_eq - 1, latex); - } - for (i = 0; i < bmap->n_ineq; ++i) { - int l = isl_seq_last_non_zero(bmap->ineq[i], 1 + total); - int s; - const char *op; - if (l < 0) - continue; - s = isl_int_sgn(bmap->ineq[i][l]); - if (s < 0) - isl_seq_cpy(c->el, bmap->ineq[i], 1 + total); - else - isl_seq_neg(c->el, bmap->ineq[i], 1 + total); - op = s < 0 ? s_le[latex] : s_ge[latex]; - p = print_constraint(bmap, dim, p, c->el, l, - op, !bmap->n_eq && !i, latex); - } - - isl_vec_free(c); - - return p; -error: - isl_vec_free(c); - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_omega_constraints( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p) -{ - if (bmap->n_eq + bmap->n_ineq == 0) - return p; - - p = isl_printer_print_str(p, ": "); - if (bmap->n_div > 0) { - int i; - p = isl_printer_print_str(p, "exists ("); - for (i = 0; i < bmap->n_div; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_name(bmap->dim, p, isl_dim_div, i, 0); - } - p = isl_printer_print_str(p, ": "); - } - p = print_constraints(bmap, bmap->dim, p, 0); - if (bmap->n_div > 0) - p = isl_printer_print_str(p, ")"); - return p; -} - -static __isl_give isl_printer *basic_map_print_omega( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p) -{ - p = isl_printer_print_str(p, "{ ["); - p = print_var_list(bmap->dim, p, isl_dim_in, 0, NULL, NULL); - p = isl_printer_print_str(p, "] -> ["); - p = print_var_list(bmap->dim, p, isl_dim_out, 0, NULL, NULL); - p = isl_printer_print_str(p, "] "); - p = print_omega_constraints(bmap, p); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *isl_basic_map_print_omega( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p) -{ - p = print_omega_parameters(bmap->dim, p); - - p = isl_printer_start_line(p); - p = basic_map_print_omega(bmap, p); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *basic_set_print_omega( - __isl_keep isl_basic_set *bset, __isl_take isl_printer *p) -{ - p = isl_printer_print_str(p, "{ ["); - p = print_var_list(bset->dim, p, isl_dim_set, 0, NULL, NULL); - p = isl_printer_print_str(p, "] "); - p = print_omega_constraints((isl_basic_map *)bset, p); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *isl_basic_set_print_omega( - __isl_keep isl_basic_set *bset, __isl_take isl_printer *p) -{ - p = print_omega_parameters(bset->dim, p); - - p = isl_printer_start_line(p); - p = basic_set_print_omega(bset, p); - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *isl_map_print_omega(__isl_keep isl_map *map, - __isl_take isl_printer *p) -{ - int i; - - p = print_omega_parameters(map->dim, p); - - p = isl_printer_start_line(p); - for (i = 0; i < map->n; ++i) { - if (i) - p = isl_printer_print_str(p, " union "); - p = basic_map_print_omega(map->p[i], p); - } - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *isl_set_print_omega(__isl_keep isl_set *set, - __isl_take isl_printer *p) -{ - int i; - - p = print_omega_parameters(set->dim, p); - - p = isl_printer_start_line(p); - for (i = 0; i < set->n; ++i) { - if (i) - p = isl_printer_print_str(p, " union "); - p = basic_set_print_omega(set->p[i], p); - } - p = isl_printer_end_line(p); - return p; -} - -static __isl_give isl_printer *print_disjunct(__isl_keep isl_basic_map *bmap, - __isl_keep isl_space *dim, __isl_take isl_printer *p, int latex) -{ - if (bmap->n_div > 0) { - int i; - p = isl_printer_print_str(p, s_open_exists[latex]); - for (i = 0; i < bmap->n_div; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_name(dim, p, isl_dim_div, i, latex); - if (latex || isl_int_is_zero(bmap->div[i][0])) - continue; - p = isl_printer_print_str(p, " = [("); - p = print_affine(bmap, dim, p, bmap->div[i] + 1); - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, bmap->div[i][0]); - p = isl_printer_print_str(p, "]"); - } - p = isl_printer_print_str(p, ": "); - } - - p = print_constraints(bmap, dim, p, latex); - - if (bmap->n_div > 0) - p = isl_printer_print_str(p, s_close_exists[latex]); - return p; -} - -static __isl_give isl_printer *isl_basic_map_print_isl( - __isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, - int latex) -{ - int rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - if (isl_basic_map_dim(bmap, isl_dim_param) > 0) { - p = print_tuple(bmap->dim, p, isl_dim_param, latex, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_space(bmap->dim, p, latex, rational, NULL, NULL); - p = isl_printer_print_str(p, " : "); - p = print_disjunct(bmap, bmap->dim, p, latex); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *print_disjuncts(__isl_keep isl_map *map, - __isl_take isl_printer *p, int latex) -{ - int i; - - if (isl_map_plain_is_universe(map)) - return p; - - p = isl_printer_print_str(p, s_such_that[latex]); - if (map->n == 0) - p = isl_printer_print_str(p, "1 = 0"); - for (i = 0; i < map->n; ++i) { - if (i) - p = isl_printer_print_str(p, s_or[latex]); - if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1) - p = isl_printer_print_str(p, "("); - p = print_disjunct(map->p[i], map->dim, p, latex); - if (map->n > 1 && map->p[i]->n_eq + map->p[i]->n_ineq > 1) - p = isl_printer_print_str(p, ")"); - } - return p; -} - -/* Print the disjuncts of a map (or set). - * If the map turns out to be a universal parameter domain, then - * we need to print the colon. Otherwise, the output looks identical - * to the empty set. - */ -static __isl_give isl_printer *print_disjuncts_map(__isl_keep isl_map *map, - __isl_take isl_printer *p, int latex) -{ - if (isl_map_plain_is_universe(map) && isl_space_is_params(map->dim)) - return isl_printer_print_str(p, s_such_that[latex]); - else - return print_disjuncts(map, p, latex); -} - -struct isl_aff_split { - isl_basic_map *aff; - isl_map *map; -}; - -static void free_split(__isl_take struct isl_aff_split *split, int n) -{ - int i; - - if (!split) - return; - - for (i = 0; i < n; ++i) { - isl_basic_map_free(split[i].aff); - isl_map_free(split[i].map); - } - - free(split); -} - -static __isl_give isl_basic_map *get_aff(__isl_take isl_basic_map *bmap) -{ - int i, j; - unsigned nparam, n_in, n_out, total; - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - return NULL; - if (isl_basic_map_free_inequality(bmap, bmap->n_ineq) < 0) - goto error; - - nparam = isl_basic_map_dim(bmap, isl_dim_param); - n_in = isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_out); - total = isl_basic_map_dim(bmap, isl_dim_all); - for (i = bmap->n_eq - 1; i >= 0; --i) { - j = isl_seq_last_non_zero(bmap->eq[i] + 1, total); - if (j >= nparam && j < nparam + n_in + n_out && - (isl_int_is_one(bmap->eq[i][1 + j]) || - isl_int_is_negone(bmap->eq[i][1 + j]))) - continue; - if (isl_basic_map_drop_equality(bmap, i) < 0) - goto error; - } - - bmap = isl_basic_map_finalize(bmap); - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static int aff_split_cmp(const void *p1, const void *p2) -{ - const struct isl_aff_split *s1, *s2; - s1 = (const struct isl_aff_split *) p1; - s2 = (const struct isl_aff_split *) p2; - - return isl_basic_map_plain_cmp(s1->aff, s2->aff); -} - -static __isl_give isl_basic_map *drop_aff(__isl_take isl_basic_map *bmap, - __isl_keep isl_basic_map *aff) -{ - int i, j; - unsigned total; - - if (!bmap || !aff) - goto error; - - total = isl_space_dim(bmap->dim, isl_dim_all); - - for (i = bmap->n_eq - 1; i >= 0; --i) { - if (isl_seq_first_non_zero(bmap->eq[i] + 1 + total, - bmap->n_div) != -1) - continue; - for (j = 0; j < aff->n_eq; ++j) { - if (!isl_seq_eq(bmap->eq[i], aff->eq[j], 1 + total) && - !isl_seq_is_neg(bmap->eq[i], aff->eq[j], 1 + total)) - continue; - if (isl_basic_map_drop_equality(bmap, i) < 0) - goto error; - break; - } - } - - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -static __isl_give struct isl_aff_split *split_aff(__isl_keep isl_map *map) -{ - int i, n; - struct isl_aff_split *split; - isl_ctx *ctx; - - ctx = isl_map_get_ctx(map); - split = isl_calloc_array(ctx, struct isl_aff_split, map->n); - if (!split) - return NULL; - - for (i = 0; i < map->n; ++i) { - isl_basic_map *bmap; - split[i].aff = get_aff(isl_basic_map_copy(map->p[i])); - bmap = isl_basic_map_copy(map->p[i]); - bmap = isl_basic_map_cow(bmap); - bmap = drop_aff(bmap, split[i].aff); - split[i].map = isl_map_from_basic_map(bmap); - if (!split[i].aff || !split[i].map) - goto error; - } - - qsort(split, map->n, sizeof(struct isl_aff_split), &aff_split_cmp); - - n = map->n; - for (i = n - 1; i >= 1; --i) { - if (!isl_basic_map_plain_is_equal(split[i - 1].aff, - split[i].aff)) - continue; - isl_basic_map_free(split[i].aff); - split[i - 1].map = isl_map_union(split[i - 1].map, - split[i].map); - if (i != n - 1) - split[i] = split[n - 1]; - split[n - 1].aff = NULL; - split[n - 1].map = NULL; - --n; - } - - return split; -error: - free_split(split, map->n); - return NULL; -} - -static __isl_give isl_printer *print_split_map(__isl_take isl_printer *p, - struct isl_aff_split *split, int n) -{ - int i; - int rational; - - for (i = 0; i < n; ++i) { - isl_space *dim; - - if (!split[i].map) - break; - dim = split[i].map->dim; - rational = split[i].map->n > 0 && - ISL_F_ISSET(split[i].map->p[0], ISL_BASIC_MAP_RATIONAL); - if (i) - p = isl_printer_print_str(p, "; "); - p = print_space(dim, p, 0, rational, split[i].aff, NULL); - p = print_disjuncts_map(split[i].map, p, 0); - } - - return p; -} - -static __isl_give isl_printer *isl_map_print_isl_body(__isl_keep isl_map *map, - __isl_take isl_printer *p) -{ - struct isl_aff_split *split = NULL; - int rational; - - if (map->n > 0) - split = split_aff(map); - if (split) { - p = print_split_map(p, split, map->n); - } else { - rational = map->n > 0 && - ISL_F_ISSET(map->p[0], ISL_BASIC_MAP_RATIONAL); - p = print_space(map->dim, p, 0, rational, NULL, NULL); - p = print_disjuncts_map(map, p, 0); - } - free_split(split, map->n); - return p; -} - -static __isl_give isl_printer *isl_map_print_isl(__isl_keep isl_map *map, - __isl_take isl_printer *p) -{ - if (isl_map_dim(map, isl_dim_param) > 0) { - p = print_tuple(map->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, s_to[0]); - } - p = isl_printer_print_str(p, s_open_set[0]); - p = isl_map_print_isl_body(map, p); - p = isl_printer_print_str(p, s_close_set[0]); - return p; -} - -static __isl_give isl_printer *print_latex_map(__isl_keep isl_map *map, - __isl_take isl_printer *p, __isl_keep isl_basic_map *aff) -{ - if (isl_map_dim(map, isl_dim_param) > 0) { - p = print_tuple(map->dim, p, isl_dim_param, 1, NULL, NULL); - p = isl_printer_print_str(p, s_to[1]); - } - p = isl_printer_print_str(p, s_open_set[1]); - p = print_space(map->dim, p, 1, 0, aff, NULL); - p = print_disjuncts_map(map, p, 1); - p = isl_printer_print_str(p, s_close_set[1]); - - return p; -} - -static __isl_give isl_printer *isl_map_print_latex(__isl_keep isl_map *map, - __isl_take isl_printer *p) -{ - int i; - struct isl_aff_split *split = NULL; - - if (map->n > 0) - split = split_aff(map); - - if (!split) - return print_latex_map(map, p, NULL); - - for (i = 0; i < map->n; ++i) { - if (!split[i].map) - break; - if (i) - p = isl_printer_print_str(p, " \\cup "); - p = print_latex_map(split[i].map, p, split[i].aff); - } - - free_split(split, map->n); - return p; -} - -__isl_give isl_printer *isl_printer_print_basic_map(__isl_take isl_printer *p, - __isl_keep isl_basic_map *bmap) -{ - if (!p || !bmap) - goto error; - if (p->output_format == ISL_FORMAT_ISL) - return isl_basic_map_print_isl(bmap, p, 0); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_basic_map_print_omega(bmap, p); - isl_assert(bmap->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_basic_map_print(__isl_keep isl_basic_map *bmap, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format) -{ - isl_printer *printer; - - if (!bmap) - return; - - printer = isl_printer_to_file(bmap->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_prefix(printer, prefix); - printer = isl_printer_set_suffix(printer, suffix); - printer = isl_printer_set_output_format(printer, output_format); - isl_printer_print_basic_map(printer, bmap); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_basic_set(__isl_take isl_printer *p, - __isl_keep isl_basic_set *bset) -{ - if (!p || !bset) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_basic_map_print_isl(bset, p, 0); - else if (p->output_format == ISL_FORMAT_POLYLIB) - return isl_basic_set_print_polylib(bset, p, 0); - else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) - return isl_basic_set_print_polylib(bset, p, 1); - else if (p->output_format == ISL_FORMAT_POLYLIB_CONSTRAINTS) - return bset_print_constraints_polylib(bset, p); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_basic_set_print_omega(bset, p); - isl_assert(p->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_basic_set_print(struct isl_basic_set *bset, FILE *out, int indent, - const char *prefix, const char *suffix, unsigned output_format) -{ - isl_printer *printer; - - if (!bset) - return; - - printer = isl_printer_to_file(bset->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_prefix(printer, prefix); - printer = isl_printer_set_suffix(printer, suffix); - printer = isl_printer_set_output_format(printer, output_format); - isl_printer_print_basic_set(printer, bset); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *p, - __isl_keep isl_set *set) -{ - if (!p || !set) - goto error; - if (p->output_format == ISL_FORMAT_ISL) - return isl_map_print_isl((isl_map *)set, p); - else if (p->output_format == ISL_FORMAT_POLYLIB) - return isl_set_print_polylib(set, p, 0); - else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) - return isl_set_print_polylib(set, p, 1); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_set_print_omega(set, p); - else if (p->output_format == ISL_FORMAT_LATEX) - return isl_map_print_latex((isl_map *)set, p); - isl_assert(set->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_set_print(struct isl_set *set, FILE *out, int indent, - unsigned output_format) -{ - isl_printer *printer; - - if (!set) - return; - - printer = isl_printer_to_file(set->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_output_format(printer, output_format); - printer = isl_printer_print_set(printer, set); - - isl_printer_free(printer); -} - -__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *p, - __isl_keep isl_map *map) -{ - if (!p || !map) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_map_print_isl(map, p); - else if (p->output_format == ISL_FORMAT_POLYLIB) - return isl_map_print_polylib(map, p, 0); - else if (p->output_format == ISL_FORMAT_EXT_POLYLIB) - return isl_map_print_polylib(map, p, 1); - else if (p->output_format == ISL_FORMAT_OMEGA) - return isl_map_print_omega(map, p); - else if (p->output_format == ISL_FORMAT_LATEX) - return isl_map_print_latex(map, p); - isl_assert(map->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -struct isl_union_print_data { - isl_printer *p; - int first; -}; - -static int print_map_body(__isl_take isl_map *map, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, "; "); - data->first = 0; - - data->p = isl_map_print_isl_body(map, data->p); - isl_map_free(map); - - return 0; -} - -static __isl_give isl_printer *isl_union_map_print_isl( - __isl_keep isl_union_map *umap, __isl_take isl_printer *p) -{ - struct isl_union_print_data data = { p, 1 }; - isl_space *dim; - dim = isl_union_map_get_space(umap); - if (isl_space_dim(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, s_to[0]); - } - isl_space_free(dim); - p = isl_printer_print_str(p, s_open_set[0]); - isl_union_map_foreach_map(umap, &print_map_body, &data); - p = data.p; - p = isl_printer_print_str(p, s_close_set[0]); - return p; -} - -static int print_latex_map_body(__isl_take isl_map *map, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, " \\cup "); - data->first = 0; - - data->p = isl_map_print_latex(map, data->p); - isl_map_free(map); - - return 0; -} - -static __isl_give isl_printer *isl_union_map_print_latex( - __isl_keep isl_union_map *umap, __isl_take isl_printer *p) -{ - struct isl_union_print_data data = { p, 1 }; - isl_union_map_foreach_map(umap, &print_latex_map_body, &data); - p = data.p; - return p; -} - -__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p, - __isl_keep isl_union_map *umap) -{ - if (!p || !umap) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_union_map_print_isl(umap, p); - if (p->output_format == ISL_FORMAT_LATEX) - return isl_union_map_print_latex(umap, p); - - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_map", goto error); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p, - __isl_keep isl_union_set *uset) -{ - if (!p || !uset) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return isl_union_map_print_isl((isl_union_map *)uset, p); - if (p->output_format == ISL_FORMAT_LATEX) - return isl_union_map_print_latex((isl_union_map *)uset, p); - - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_set", goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_map_print(__isl_keep isl_map *map, FILE *out, int indent, - unsigned output_format) -{ - isl_printer *printer; - - if (!map) - return; - - printer = isl_printer_to_file(map->ctx, out); - printer = isl_printer_set_indent(printer, indent); - printer = isl_printer_set_output_format(printer, output_format); - printer = isl_printer_print_map(printer, map); - - isl_printer_free(printer); -} - -static int upoly_rec_n_non_zero(__isl_keep struct isl_upoly_rec *rec) -{ - int i; - int n; - - for (i = 0, n = 0; i < rec->n; ++i) - if (!isl_upoly_is_zero(rec->p[i])) - ++n; - - return n; -} - -static __isl_give isl_printer *print_div(__isl_keep isl_space *dim, - __isl_keep isl_mat *div, int pos, __isl_take isl_printer *p) -{ - int c = p->output_format == ISL_FORMAT_C; - p = isl_printer_print_str(p, c ? "floord(" : "[("); - p = print_affine_of_len(dim, div, p, - div->row[pos] + 1, div->n_col - 1); - p = isl_printer_print_str(p, c ? ", " : ")/"); - p = isl_printer_print_isl_int(p, div->row[pos][0]); - p = isl_printer_print_str(p, c ? ")" : "]"); - return p; -} - -static __isl_give isl_printer *upoly_print_cst(__isl_keep struct isl_upoly *up, - __isl_take isl_printer *p, int first) -{ - struct isl_upoly_cst *cst; - int neg; - - cst = isl_upoly_as_cst(up); - if (!cst) - goto error; - neg = !first && isl_int_is_neg(cst->n); - if (!first) - p = isl_printer_print_str(p, neg ? " - " : " + "); - if (neg) - isl_int_neg(cst->n, cst->n); - if (isl_int_is_zero(cst->d)) { - int sgn = isl_int_sgn(cst->n); - p = isl_printer_print_str(p, sgn < 0 ? "-infty" : - sgn == 0 ? "NaN" : "infty"); - } else - p = isl_printer_print_isl_int(p, cst->n); - if (neg) - isl_int_neg(cst->n, cst->n); - if (!isl_int_is_zero(cst->d) && !isl_int_is_one(cst->d)) { - p = isl_printer_print_str(p, "/"); - p = isl_printer_print_isl_int(p, cst->d); - } - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_base(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_mat *div, int var) -{ - unsigned total; - - total = isl_space_dim(dim, isl_dim_all); - if (var < total) - p = print_term(dim, NULL, dim->ctx->one, 1 + var, p, 0); - else - p = print_div(dim, div, var - total, p); - return p; -} - -static __isl_give isl_printer *print_pow(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_mat *div, int var, int exp) -{ - p = print_base(p, dim, div, var); - if (exp == 1) - return p; - if (p->output_format == ISL_FORMAT_C) { - int i; - for (i = 1; i < exp; ++i) { - p = isl_printer_print_str(p, "*"); - p = print_base(p, dim, div, var); - } - } else { - p = isl_printer_print_str(p, "^"); - p = isl_printer_print_int(p, exp); - } - return p; -} - -static __isl_give isl_printer *upoly_print(__isl_keep struct isl_upoly *up, - __isl_keep isl_space *dim, __isl_keep isl_mat *div, - __isl_take isl_printer *p, int outer) -{ - int i, n, first, print_parens; - struct isl_upoly_rec *rec; - - if (!p || !up || !dim || !div) - goto error; - - if (isl_upoly_is_cst(up)) - return upoly_print_cst(up, p, 1); - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - n = upoly_rec_n_non_zero(rec); - print_parens = n > 1 || - (outer && rec->up.var >= isl_space_dim(dim, isl_dim_all)); - if (print_parens) - p = isl_printer_print_str(p, "("); - for (i = 0, first = 1; i < rec->n; ++i) { - if (isl_upoly_is_zero(rec->p[i])) - continue; - if (isl_upoly_is_negone(rec->p[i])) { - if (!i) - p = isl_printer_print_str(p, "-1"); - else if (first) - p = isl_printer_print_str(p, "-"); - else - p = isl_printer_print_str(p, " - "); - } else if (isl_upoly_is_cst(rec->p[i]) && - !isl_upoly_is_one(rec->p[i])) - p = upoly_print_cst(rec->p[i], p, first); - else { - if (!first) - p = isl_printer_print_str(p, " + "); - if (i == 0 || !isl_upoly_is_one(rec->p[i])) - p = upoly_print(rec->p[i], dim, div, p, 0); - } - first = 0; - if (i == 0) - continue; - if (!isl_upoly_is_one(rec->p[i]) && - !isl_upoly_is_negone(rec->p[i])) - p = isl_printer_print_str(p, " * "); - p = print_pow(p, dim, div, rec->up.var, i); - } - if (print_parens) - p = isl_printer_print_str(p, ")"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial(__isl_take isl_printer *p, - __isl_keep isl_qpolynomial *qp) -{ - if (!p || !qp) - goto error; - p = upoly_print(qp->upoly, qp->dim, qp->div, p, 1); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial_isl(__isl_take isl_printer *p, - __isl_keep isl_qpolynomial *qp) -{ - if (!p || !qp) - goto error; - - if (isl_space_dim(qp->dim, isl_dim_param) > 0) { - p = print_tuple(qp->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - if (!isl_space_is_params(qp->dim)) { - p = print_space(qp->dim, p, 0, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = print_qpolynomial(p, qp); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_qpolynomial *qp) -{ - isl_int den; - - isl_int_init(den); - isl_qpolynomial_get_den(qp, &den); - if (!isl_int_is_one(den)) { - isl_qpolynomial *f; - p = isl_printer_print_str(p, "("); - qp = isl_qpolynomial_copy(qp); - f = isl_qpolynomial_rat_cst_on_domain(isl_space_copy(qp->dim), - den, qp->dim->ctx->one); - qp = isl_qpolynomial_mul(qp, f); - } - if (qp) - p = upoly_print(qp->upoly, dim, qp->div, p, 0); - if (!isl_int_is_one(den)) { - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, den); - isl_qpolynomial_free(qp); - } - isl_int_clear(den); - return p; -} - -__isl_give isl_printer *isl_printer_print_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp) -{ - if (!p || !qp) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_qpolynomial_isl(p, qp); - else if (p->output_format == ISL_FORMAT_C) - return print_qpolynomial_c(p, qp->dim, qp); - else - isl_die(qp->dim->ctx, isl_error_unsupported, - "output format not supported for isl_qpolynomials", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out, - unsigned output_format) -{ - isl_printer *p; - - if (!qp) - return; - - isl_assert(qp->dim->ctx, output_format == ISL_FORMAT_ISL, return); - p = isl_printer_to_file(qp->dim->ctx, out); - p = isl_printer_print_qpolynomial(p, qp); - isl_printer_free(p); -} - -static __isl_give isl_printer *qpolynomial_fold_print( - __isl_keep isl_qpolynomial_fold *fold, __isl_take isl_printer *p) -{ - int i; - - if (fold->type == isl_fold_min) - p = isl_printer_print_str(p, "min"); - else if (fold->type == isl_fold_max) - p = isl_printer_print_str(p, "max"); - p = isl_printer_print_str(p, "("); - for (i = 0; i < fold->n; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_qpolynomial(p, fold->qp[i]); - } - p = isl_printer_print_str(p, ")"); - return p; -} - -void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, - FILE *out, unsigned output_format) -{ - isl_printer *p; - - if (!fold) - return; - - isl_assert(fold->dim->ctx, output_format == ISL_FORMAT_ISL, return); - - p = isl_printer_to_file(fold->dim->ctx, out); - p = isl_printer_print_qpolynomial_fold(p, fold); - - isl_printer_free(p); -} - -static __isl_give isl_printer *isl_pwqp_print_isl_body( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - int i = 0; - - for (i = 0; i < pwqp->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - if (!isl_space_is_params(pwqp->p[i].set->dim)) { - p = print_space(pwqp->p[i].set->dim, p, 0, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = print_qpolynomial(p, pwqp->p[i].qp); - p = print_disjuncts((isl_map *)pwqp->p[i].set, p, 0); - } - - return p; -} - -static __isl_give isl_printer *print_pw_qpolynomial_isl( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - if (!p || !pwqp) - goto error; - - if (isl_space_dim(pwqp->dim, isl_dim_param) > 0) { - p = print_tuple(pwqp->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - if (pwqp->n == 0) { - if (!isl_space_is_set(pwqp->dim)) { - p = print_tuple(pwqp->dim, p, isl_dim_in, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "0"); - } - p = isl_pwqp_print_isl_body(p, pwqp); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out, - unsigned output_format) -{ - isl_printer *p; - - if (!pwqp) - return; - - p = isl_printer_to_file(pwqp->dim->ctx, out); - p = isl_printer_set_output_format(p, output_format); - p = isl_printer_print_pw_qpolynomial(p, pwqp); - - isl_printer_free(p); -} - -static __isl_give isl_printer *isl_pwf_print_isl_body( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - int i = 0; - - for (i = 0; i < pwf->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - if (!isl_space_is_params(pwf->p[i].set->dim)) { - p = print_space(pwf->p[i].set->dim, p, 0, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = qpolynomial_fold_print(pwf->p[i].fold, p); - p = print_disjuncts((isl_map *)pwf->p[i].set, p, 0); - } - - return p; -} - -static __isl_give isl_printer *print_pw_qpolynomial_fold_isl( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - if (isl_space_dim(pwf->dim, isl_dim_param) > 0) { - p = print_tuple(pwf->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - if (pwf->n == 0) { - if (!isl_space_is_set(pwf->dim)) { - p = print_tuple(pwf->dim, p, isl_dim_in, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "0"); - } - p = isl_pwf_print_isl_body(p, pwf); - p = isl_printer_print_str(p, " }"); - return p; -} - -static __isl_give isl_printer *print_affine_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_basic_set *bset, isl_int *c); - -static __isl_give isl_printer *print_name_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, - __isl_keep isl_basic_set *bset, enum isl_dim_type type, unsigned pos) -{ - if (type == isl_dim_div) { - p = isl_printer_print_str(p, "floord("); - p = print_affine_c(p, dim, bset, bset->div[pos] + 1); - p = isl_printer_print_str(p, ", "); - p = isl_printer_print_isl_int(p, bset->div[pos][0]); - p = isl_printer_print_str(p, ")"); - } else { - const char *name; - - name = isl_space_get_dim_name(dim, type, pos); - if (!name) - name = "UNNAMED"; - p = isl_printer_print_str(p, name); - } - return p; -} - -static __isl_give isl_printer *print_term_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, - __isl_keep isl_basic_set *bset, isl_int c, unsigned pos) -{ - enum isl_dim_type type; - - if (pos == 0) - return isl_printer_print_isl_int(p, c); - - if (isl_int_is_one(c)) - ; - else if (isl_int_is_negone(c)) - p = isl_printer_print_str(p, "-"); - else { - p = isl_printer_print_isl_int(p, c); - p = isl_printer_print_str(p, "*"); - } - type = pos2type(dim, &pos); - p = print_name_c(p, dim, bset, type, pos); - return p; -} - -static __isl_give isl_printer *print_partial_affine_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, - __isl_keep isl_basic_set *bset, isl_int *c, unsigned len) -{ - int i; - int first; - - for (i = 0, first = 1; i < len; ++i) { - int flip = 0; - if (isl_int_is_zero(c[i])) - continue; - if (!first) { - if (isl_int_is_neg(c[i])) { - flip = 1; - isl_int_neg(c[i], c[i]); - p = isl_printer_print_str(p, " - "); - } else - p = isl_printer_print_str(p, " + "); - } - first = 0; - p = print_term_c(p, dim, bset, c[i], i); - if (flip) - isl_int_neg(c[i], c[i]); - } - if (first) - p = isl_printer_print_str(p, "0"); - return p; -} - -static __isl_give isl_printer *print_affine_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_basic_set *bset, isl_int *c) -{ - unsigned len = 1 + isl_basic_set_total_dim(bset); - return print_partial_affine_c(p, dim, bset, c, len); -} - -static __isl_give isl_printer *print_constraint_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, - __isl_keep isl_basic_set *bset, isl_int *c, const char *op, int first) -{ - if (!first) - p = isl_printer_print_str(p, " && "); - - p = print_affine_c(p, dim, bset, c); - p = isl_printer_print_str(p, " "); - p = isl_printer_print_str(p, op); - p = isl_printer_print_str(p, " 0"); - return p; -} - -static __isl_give isl_printer *print_basic_set_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_basic_set *bset) -{ - int i, j; - unsigned n_div = isl_basic_set_dim(bset, isl_dim_div); - unsigned total = isl_basic_set_total_dim(bset) - n_div; - - for (i = 0; i < bset->n_eq; ++i) { - j = isl_seq_last_non_zero(bset->eq[i] + 1 + total, n_div); - if (j < 0) - p = print_constraint_c(p, dim, bset, - bset->eq[i], "==", !i); - else { - if (i) - p = isl_printer_print_str(p, " && "); - p = isl_printer_print_str(p, "("); - p = print_partial_affine_c(p, dim, bset, bset->eq[i], - 1 + total + j); - p = isl_printer_print_str(p, ") % "); - p = isl_printer_print_isl_int(p, - bset->eq[i][1 + total + j]); - p = isl_printer_print_str(p, " == 0"); - } - } - for (i = 0; i < bset->n_ineq; ++i) - p = print_constraint_c(p, dim, bset, bset->ineq[i], ">=", - !bset->n_eq && !i); - return p; -} - -static __isl_give isl_printer *print_set_c(__isl_take isl_printer *p, - __isl_keep isl_space *dim, __isl_keep isl_set *set) -{ - int i; - - if (set->n == 0) - p = isl_printer_print_str(p, "0"); - - for (i = 0; i < set->n; ++i) { - if (i) - p = isl_printer_print_str(p, " || "); - if (set->n > 1) - p = isl_printer_print_str(p, "("); - p = print_basic_set_c(p, dim, set->p[i]); - if (set->n > 1) - p = isl_printer_print_str(p, ")"); - } - return p; -} - -static __isl_give isl_printer *print_pw_qpolynomial_c( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - int i; - - if (pwqp->n == 1 && isl_set_plain_is_universe(pwqp->p[0].set)) - return print_qpolynomial_c(p, pwqp->dim, pwqp->p[0].qp); - - for (i = 0; i < pwqp->n; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwqp->dim, pwqp->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_qpolynomial_c(p, pwqp->dim, pwqp->p[i].qp); - p = isl_printer_print_str(p, ") : "); - } - - p = isl_printer_print_str(p, "0"); - return p; -} - -__isl_give isl_printer *isl_printer_print_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp) -{ - if (!p || !pwqp) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_qpolynomial_isl(p, pwqp); - else if (p->output_format == ISL_FORMAT_C) - return print_pw_qpolynomial_c(p, pwqp); - isl_assert(p->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -static int print_pwqp_body(__isl_take isl_pw_qpolynomial *pwqp, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, "; "); - data->first = 0; - - data->p = isl_pwqp_print_isl_body(data->p, pwqp); - isl_pw_qpolynomial_free(pwqp); - - return 0; -} - -static __isl_give isl_printer *print_union_pw_qpolynomial_isl( - __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp) -{ - struct isl_union_print_data data = { p, 1 }; - isl_space *dim; - dim = isl_union_pw_qpolynomial_get_space(upwqp); - if (isl_space_dim(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - isl_space_free(dim); - p = isl_printer_print_str(p, "{ "); - isl_union_pw_qpolynomial_foreach_pw_qpolynomial(upwqp, &print_pwqp_body, - &data); - p = data.p; - p = isl_printer_print_str(p, " }"); - return p; -} - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( - __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp) -{ - if (!p || !upwqp) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_union_pw_qpolynomial_isl(p, upwqp); - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_pw_qpolynomial", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_qpolynomial_fold_c( - __isl_take isl_printer *p, __isl_keep isl_space *dim, - __isl_keep isl_qpolynomial_fold *fold) -{ - int i; - - for (i = 0; i < fold->n - 1; ++i) - if (fold->type == isl_fold_min) - p = isl_printer_print_str(p, "min("); - else if (fold->type == isl_fold_max) - p = isl_printer_print_str(p, "max("); - - for (i = 0; i < fold->n; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_qpolynomial_c(p, dim, fold->qp[i]); - if (i) - p = isl_printer_print_str(p, ")"); - } - return p; -} - -__isl_give isl_printer *isl_printer_print_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold) -{ - if (!p || !fold) - goto error; - if (p->output_format == ISL_FORMAT_ISL) - return qpolynomial_fold_print(fold, p); - else if (p->output_format == ISL_FORMAT_C) - return print_qpolynomial_fold_c(p, fold->dim, fold); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_pw_qpolynomial_fold_c( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - int i; - - if (pwf->n == 1 && isl_set_plain_is_universe(pwf->p[0].set)) - return print_qpolynomial_fold_c(p, pwf->dim, pwf->p[0].fold); - - for (i = 0; i < pwf->n; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwf->dim, pwf->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_qpolynomial_fold_c(p, pwf->dim, pwf->p[i].fold); - p = isl_printer_print_str(p, ") : "); - } - - p = isl_printer_print_str(p, "0"); - return p; -} - -__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( - __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf) -{ - if (!p || !pwf) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_qpolynomial_fold_isl(p, pwf); - else if (p->output_format == ISL_FORMAT_C) - return print_pw_qpolynomial_fold_c(p, pwf); - isl_assert(p->ctx, 0, goto error); -error: - isl_printer_free(p); - return NULL; -} - -void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf, - FILE *out, unsigned output_format) -{ - isl_printer *p; - - if (!pwf) - return; - - p = isl_printer_to_file(pwf->dim->ctx, out); - p = isl_printer_set_output_format(p, output_format); - p = isl_printer_print_pw_qpolynomial_fold(p, pwf); - - isl_printer_free(p); -} - -static int print_pwf_body(__isl_take isl_pw_qpolynomial_fold *pwf, void *user) -{ - struct isl_union_print_data *data; - data = (struct isl_union_print_data *)user; - - if (!data->first) - data->p = isl_printer_print_str(data->p, "; "); - data->first = 0; - - data->p = isl_pwf_print_isl_body(data->p, pwf); - isl_pw_qpolynomial_fold_free(pwf); - - return 0; -} - -static __isl_give isl_printer *print_union_pw_qpolynomial_fold_isl( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - struct isl_union_print_data data = { p, 1 }; - isl_space *dim; - dim = isl_union_pw_qpolynomial_fold_get_space(upwf); - if (isl_space_dim(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - isl_space_free(dim); - p = isl_printer_print_str(p, "{ "); - isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(upwf, - &print_pwf_body, &data); - p = data.p; - p = isl_printer_print_str(p, " }"); - return p; -} - -__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( - __isl_take isl_printer *p, - __isl_keep isl_union_pw_qpolynomial_fold *upwf) -{ - if (!p || !upwf) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_union_pw_qpolynomial_fold_isl(p, upwf); - isl_die(p->ctx, isl_error_invalid, - "invalid output format for isl_union_pw_qpolynomial_fold", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p, - __isl_keep isl_constraint *c) -{ - isl_basic_map *bmap; - - if (!p || !c) - goto error; - - bmap = isl_basic_map_from_constraint(isl_constraint_copy(c)); - p = isl_printer_print_basic_map(p, bmap); - isl_basic_map_free(bmap); - return p; -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p, - __isl_keep isl_space *dim) -{ - if (!dim) - goto error; - - if (isl_space_dim(dim, isl_dim_param) > 0) { - p = print_tuple(dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - - p = isl_printer_print_str(p, "{ "); - if (isl_space_is_params(dim)) - p = isl_printer_print_str(p, s_such_that[0]); - else - p = print_space(dim, p, 0, 0, NULL, NULL); - p = isl_printer_print_str(p, " }"); - - return p; -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls) -{ - unsigned total; - unsigned n_div; - - if (!ls) - goto error; - - total = isl_local_space_dim(ls, isl_dim_all); - if (isl_local_space_dim(ls, isl_dim_param) > 0) { - p = print_tuple(ls->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_space(ls->dim, p, 0, 0, NULL, NULL); - n_div = isl_local_space_dim(ls, isl_dim_div); - if (n_div > 0) { - int i; - p = isl_printer_print_str(p, " : "); - p = isl_printer_print_str(p, s_open_exists[0]); - for (i = 0; i < n_div; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = print_name(ls->dim, p, isl_dim_div, i, 0); - if (isl_int_is_zero(ls->div->row[i][0])) - continue; - p = isl_printer_print_str(p, " = [("); - p = print_affine_of_len(ls->dim, ls->div, p, - ls->div->row[i] + 1, 1 + total); - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, ls->div->row[i][0]); - p = isl_printer_print_str(p, "]"); - } - } else if (isl_space_is_params(ls->dim)) - p = isl_printer_print_str(p, s_such_that[0]); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_aff_body(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - unsigned total; - - total = isl_local_space_dim(aff->ls, isl_dim_all); - p = isl_printer_print_str(p, "("); - p = print_affine_of_len(aff->ls->dim, aff->ls->div, p, - aff->v->el + 1, 1 + total); - if (isl_int_is_one(aff->v->el[0])) - p = isl_printer_print_str(p, ")"); - else { - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, aff->v->el[0]); - } - - return p; -} - -static __isl_give isl_printer *print_aff(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - if (isl_space_is_params(aff->ls->dim)) - ; - else { - p = print_tuple(aff->ls->dim, p, isl_dim_set, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "["); - p = print_aff_body(p, aff); - p = isl_printer_print_str(p, "]"); - - return p; -} - -static __isl_give isl_printer *print_aff_isl(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - if (!aff) - goto error; - - if (isl_local_space_dim(aff->ls, isl_dim_param) > 0) { - p = print_tuple(aff->ls->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_aff(p, aff); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_pw_aff_isl(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff) -{ - int i; - - if (!pwaff) - goto error; - - if (isl_space_dim(pwaff->dim, isl_dim_param) > 0) { - p = print_tuple(pwaff->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - for (i = 0; i < pwaff->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - p = print_aff(p, pwaff->p[i].aff); - p = print_disjuncts((isl_map *)pwaff->p[i].set, p, 0); - } - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, isl_int *c); - -static __isl_give isl_printer *print_ls_name_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, enum isl_dim_type type, unsigned pos) -{ - if (type == isl_dim_div) { - p = isl_printer_print_str(p, "floord("); - p = print_ls_affine_c(p, ls, ls->div->row[pos] + 1); - p = isl_printer_print_str(p, ", "); - p = isl_printer_print_isl_int(p, ls->div->row[pos][0]); - p = isl_printer_print_str(p, ")"); - } else { - const char *name; - - name = isl_space_get_dim_name(ls->dim, type, pos); - if (!name) - name = "UNNAMED"; - p = isl_printer_print_str(p, name); - } - return p; -} - -static __isl_give isl_printer *print_ls_term_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, isl_int c, unsigned pos) -{ - enum isl_dim_type type; - - if (pos == 0) - return isl_printer_print_isl_int(p, c); - - if (isl_int_is_one(c)) - ; - else if (isl_int_is_negone(c)) - p = isl_printer_print_str(p, "-"); - else { - p = isl_printer_print_isl_int(p, c); - p = isl_printer_print_str(p, "*"); - } - type = pos2type(ls->dim, &pos); - p = print_ls_name_c(p, ls, type, pos); - return p; -} - -static __isl_give isl_printer *print_ls_partial_affine_c( - __isl_take isl_printer *p, __isl_keep isl_local_space *ls, - isl_int *c, unsigned len) -{ - int i; - int first; - - for (i = 0, first = 1; i < len; ++i) { - int flip = 0; - if (isl_int_is_zero(c[i])) - continue; - if (!first) { - if (isl_int_is_neg(c[i])) { - flip = 1; - isl_int_neg(c[i], c[i]); - p = isl_printer_print_str(p, " - "); - } else - p = isl_printer_print_str(p, " + "); - } - first = 0; - p = print_ls_term_c(p, ls, c[i], i); - if (flip) - isl_int_neg(c[i], c[i]); - } - if (first) - p = isl_printer_print_str(p, "0"); - return p; -} - -static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p, - __isl_keep isl_local_space *ls, isl_int *c) -{ - unsigned len = 1 + isl_local_space_dim(ls, isl_dim_all); - return print_ls_partial_affine_c(p, ls, c, len); -} - -static __isl_give isl_printer *print_aff_c(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - unsigned total; - - total = isl_local_space_dim(aff->ls, isl_dim_all); - p = isl_printer_print_str(p, "("); - p = print_ls_partial_affine_c(p, aff->ls, aff->v->el + 1, 1 + total); - if (isl_int_is_one(aff->v->el[0])) - p = isl_printer_print_str(p, ")"); - else { - p = isl_printer_print_str(p, ")/"); - p = isl_printer_print_isl_int(p, aff->v->el[0]); - } - return p; -} - -static __isl_give isl_printer *print_pw_aff_c(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff) -{ - int i; - - if (pwaff->n < 1) - isl_die(p->ctx, isl_error_unsupported, - "cannot print empty isl_pw_aff in C format", goto error); - - for (i = 0; i < pwaff->n - 1; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pwaff->dim, pwaff->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_aff_c(p, pwaff->p[i].aff); - p = isl_printer_print_str(p, ") : "); - } - - return print_aff_c(p, pwaff->p[pwaff->n - 1].aff); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p, - __isl_keep isl_aff *aff) -{ - if (!p || !aff) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_aff_isl(p, aff); - else if (p->output_format == ISL_FORMAT_C) - return print_aff_c(p, aff); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p, - __isl_keep isl_pw_aff *pwaff) -{ - if (!p || !pwaff) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_aff_isl(p, pwaff); - else if (p->output_format == ISL_FORMAT_C) - return print_pw_aff_c(p, pwaff); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_multi_aff(__isl_take isl_printer *p, - __isl_keep isl_multi_aff *maff) -{ - return print_space(maff->space, p, 0, 0, NULL, maff); -} - -static __isl_give isl_printer *print_multi_aff_isl(__isl_take isl_printer *p, - __isl_keep isl_multi_aff *maff) -{ - if (!maff) - goto error; - - if (isl_space_dim(maff->space, isl_dim_param) > 0) { - p = print_tuple(maff->space, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - p = print_multi_aff(p, maff); - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p, - __isl_keep isl_multi_aff *maff) -{ - if (!p || !maff) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_multi_aff_isl(p, maff); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_pw_multi_aff_isl(__isl_take isl_printer *p, - __isl_keep isl_pw_multi_aff *pma) -{ - int i; - - if (!pma) - goto error; - - if (isl_space_dim(pma->dim, isl_dim_param) > 0) { - p = print_tuple(pma->dim, p, isl_dim_param, 0, NULL, NULL); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "{ "); - for (i = 0; i < pma->n; ++i) { - if (i) - p = isl_printer_print_str(p, "; "); - p = print_multi_aff(p, pma->p[i].maff); - p = print_disjuncts((isl_map *)pma->p[i].set, p, 0); - } - p = isl_printer_print_str(p, " }"); - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *print_unnamed_pw_multi_aff_c( - __isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma) -{ - int i; - - for (i = 0; i < pma->n - 1; ++i) { - p = isl_printer_print_str(p, "("); - p = print_set_c(p, pma->dim, pma->p[i].set); - p = isl_printer_print_str(p, ") ? ("); - p = print_aff_c(p, pma->p[i].maff->p[0]); - p = isl_printer_print_str(p, ") : "); - } - - return print_aff_c(p, pma->p[pma->n - 1].maff->p[0]); -} - -static __isl_give isl_printer *print_pw_multi_aff_c(__isl_take isl_printer *p, - __isl_keep isl_pw_multi_aff *pma) -{ - int n; - const char *name; - - if (!pma) - goto error; - if (pma->n < 1) - isl_die(p->ctx, isl_error_unsupported, - "cannot print empty isl_pw_multi_aff in C format", - goto error); - name = isl_pw_multi_aff_get_tuple_name(pma, isl_dim_out); - if (!name && isl_pw_multi_aff_dim(pma, isl_dim_out) == 1) - return print_unnamed_pw_multi_aff_c(p, pma); - if (!name) - isl_die(p->ctx, isl_error_unsupported, - "cannot print unnamed isl_pw_multi_aff in C format", - goto error); - - p = isl_printer_print_str(p, name); - n = isl_pw_multi_aff_dim(pma, isl_dim_out); - if (n != 0) - isl_die(p->ctx, isl_error_unsupported, - "not supported yet", goto error); - - return p; -error: - isl_printer_free(p); - return NULL; -} - -__isl_give isl_printer *isl_printer_print_pw_multi_aff( - __isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma) -{ - if (!p || !pma) - goto error; - - if (p->output_format == ISL_FORMAT_ISL) - return print_pw_multi_aff_isl(p, pma); - if (p->output_format == ISL_FORMAT_C) - return print_pw_multi_aff_c(p, pma); - isl_die(p->ctx, isl_error_unsupported, "unsupported output format", - goto error); -error: - isl_printer_free(p); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_piplib.c b/cloog-0.17.0/isl/isl_piplib.c deleted file mode 100644 index e33b9812046a4f7a238a5e9f49ec21497b73c943..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_piplib.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_piplib.h" - -void isl_seq_cpy_to_pip(Entier *dst, isl_int *src, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - entier_assign(dst[i], src[i]); -} - -void isl_seq_cpy_from_pip(isl_int *dst, Entier *src, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - entier_assign(dst[i], src[i]); -} diff --git a/cloog-0.17.0/isl/isl_piplib.h b/cloog-0.17.0/isl/isl_piplib.h deleted file mode 100644 index 8408770aede94fdc49857b798da4743060babbe0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_piplib.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_PIPLIB_H -#define ISL_PIPLIB_H - -#include -#include -#include -#ifndef ISL_PIPLIB -#error "no piplib" -#endif - -#include - -void isl_seq_cpy_to_pip(Entier *dst, isl_int *src, unsigned len); -void isl_seq_cpy_from_pip(isl_int *dst, Entier *src, unsigned len); - -PipMatrix *isl_basic_map_to_pip(struct isl_basic_map *bmap, unsigned pip_param, - unsigned extra_front, unsigned extra_back); - -#endif diff --git a/cloog-0.17.0/isl/isl_point.c b/cloog-0.17.0/isl/isl_point.c deleted file mode 100644 index 00514a9fec6e708a93e5d7f071f505f549964e7c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_point.c +++ /dev/null @@ -1,500 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt) -{ - return pnt ? isl_space_get_ctx(pnt->dim) : NULL; -} - -__isl_give isl_space *isl_point_get_space(__isl_keep isl_point *pnt) -{ - return pnt ? isl_space_copy(pnt->dim) : NULL; -} - -__isl_give isl_point *isl_point_alloc(__isl_take isl_space *dim, - __isl_take isl_vec *vec) -{ - struct isl_point *pnt; - - if (!dim || !vec) - goto error; - - if (vec->size > 1 + isl_space_dim(dim, isl_dim_all)) { - vec = isl_vec_cow(vec); - if (!vec) - goto error; - vec->size = 1 + isl_space_dim(dim, isl_dim_all); - } - - pnt = isl_alloc_type(dim->ctx, struct isl_point); - if (!pnt) - goto error; - - pnt->ref = 1; - pnt->dim = dim; - pnt->vec = vec; - - return pnt; -error: - isl_space_free(dim); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_point *isl_point_zero(__isl_take isl_space *dim) -{ - isl_vec *vec; - - if (!dim) - return NULL; - vec = isl_vec_alloc(dim->ctx, 1 + isl_space_dim(dim, isl_dim_all)); - if (!vec) - goto error; - isl_int_set_si(vec->el[0], 1); - isl_seq_clr(vec->el + 1, vec->size - 1); - return isl_point_alloc(dim, vec); -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_point *isl_point_dup(__isl_keep isl_point *pnt) -{ - struct isl_point *pnt2; - - if (!pnt) - return NULL; - pnt2 = isl_point_alloc(isl_space_copy(pnt->dim), isl_vec_copy(pnt->vec)); - return pnt2; -} - -__isl_give isl_point *isl_point_cow(__isl_take isl_point *pnt) -{ - struct isl_point *pnt2; - if (!pnt) - return NULL; - - if (pnt->ref == 1) - return pnt; - - pnt2 = isl_point_dup(pnt); - isl_point_free(pnt); - return pnt2; -} - -__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt) -{ - if (!pnt) - return NULL; - - pnt->ref++; - return pnt; -} - -void isl_point_free(__isl_take isl_point *pnt) -{ - if (!pnt) - return; - - if (--pnt->ref > 0) - return; - - isl_space_free(pnt->dim); - isl_vec_free(pnt->vec); - free(pnt); -} - -__isl_give isl_point *isl_point_void(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - - return isl_point_alloc(dim, isl_vec_alloc(dim->ctx, 0)); -} - -int isl_point_is_void(__isl_keep isl_point *pnt) -{ - if (!pnt) - return -1; - - return pnt->vec->size == 0; -} - -int isl_point_get_coordinate(__isl_keep isl_point *pnt, - enum isl_dim_type type, int pos, isl_int *v) -{ - if (!pnt || isl_point_is_void(pnt)) - return -1; - - if (pos < 0 || pos >= isl_space_dim(pnt->dim, type)) - isl_die(isl_point_get_ctx(pnt), isl_error_invalid, - "position out of bounds", return -1); - - if (type == isl_dim_set) - pos += isl_space_dim(pnt->dim, isl_dim_param); - isl_int_set(*v, pnt->vec->el[1 + pos]); - - return 0; -} - -__isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, isl_int v) -{ - if (!pnt || isl_point_is_void(pnt)) - return pnt; - - pnt = isl_point_cow(pnt); - if (!pnt) - return NULL; - pnt->vec = isl_vec_cow(pnt->vec); - if (!pnt->vec) - goto error; - - if (type == isl_dim_set) - pos += isl_space_dim(pnt->dim, isl_dim_param); - - isl_int_set(pnt->vec->el[1 + pos], v); - - return pnt; -error: - isl_point_free(pnt); - return NULL; -} - -__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val) -{ - if (!pnt || isl_point_is_void(pnt)) - return pnt; - - pnt = isl_point_cow(pnt); - if (!pnt) - return NULL; - pnt->vec = isl_vec_cow(pnt->vec); - if (!pnt->vec) - goto error; - - if (type == isl_dim_set) - pos += isl_space_dim(pnt->dim, isl_dim_param); - - isl_int_add_ui(pnt->vec->el[1 + pos], pnt->vec->el[1 + pos], val); - - return pnt; -error: - isl_point_free(pnt); - return NULL; -} - -__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt, - enum isl_dim_type type, int pos, unsigned val) -{ - if (!pnt || isl_point_is_void(pnt)) - return pnt; - - pnt = isl_point_cow(pnt); - if (!pnt) - return NULL; - pnt->vec = isl_vec_cow(pnt->vec); - if (!pnt->vec) - goto error; - - if (type == isl_dim_set) - pos += isl_space_dim(pnt->dim, isl_dim_param); - - isl_int_sub_ui(pnt->vec->el[1 + pos], pnt->vec->el[1 + pos], val); - - return pnt; -error: - isl_point_free(pnt); - return NULL; -} - -struct isl_foreach_point { - struct isl_scan_callback callback; - int (*fn)(__isl_take isl_point *pnt, void *user); - void *user; - isl_space *dim; -}; - -static int foreach_point(struct isl_scan_callback *cb, __isl_take isl_vec *sample) -{ - struct isl_foreach_point *fp = (struct isl_foreach_point *)cb; - isl_point *pnt; - - pnt = isl_point_alloc(isl_space_copy(fp->dim), sample); - - return fp->fn(pnt, fp->user); -} - -int isl_set_foreach_point(__isl_keep isl_set *set, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user) -{ - struct isl_foreach_point fp = { { &foreach_point }, fn, user }; - int i; - - if (!set) - return -1; - - fp.dim = isl_set_get_space(set); - if (!fp.dim) - return -1; - - set = isl_set_copy(set); - set = isl_set_cow(set); - set = isl_set_make_disjoint(set); - set = isl_set_compute_divs(set); - if (!set) - goto error; - - for (i = 0; i < set->n; ++i) - if (isl_basic_set_scan(isl_basic_set_copy(set->p[i]), - &fp.callback) < 0) - goto error; - - isl_set_free(set); - isl_space_free(fp.dim); - - return 0; -error: - isl_set_free(set); - isl_space_free(fp.dim); - return -1; -} - -/* Return 1 if "bmap" contains the point "point". - * "bmap" is assumed to have known divs. - * The point is first extended with the divs and then passed - * to basic_map_contains. - */ -int isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap, - __isl_keep isl_point *point) -{ - int i; - struct isl_vec *vec; - unsigned dim; - int contains; - - if (!bmap || !point) - return -1; - isl_assert(bmap->ctx, isl_space_is_equal(bmap->dim, point->dim), return -1); - if (bmap->n_div == 0) - return isl_basic_map_contains(bmap, point->vec); - - dim = isl_basic_map_total_dim(bmap) - bmap->n_div; - vec = isl_vec_alloc(bmap->ctx, 1 + dim + bmap->n_div); - if (!vec) - return -1; - - isl_seq_cpy(vec->el, point->vec->el, point->vec->size); - for (i = 0; i < bmap->n_div; ++i) { - isl_seq_inner_product(bmap->div[i] + 1, vec->el, - 1 + dim + i, &vec->el[1+dim+i]); - isl_int_fdiv_q(vec->el[1+dim+i], vec->el[1+dim+i], - bmap->div[i][0]); - } - - contains = isl_basic_map_contains(bmap, vec); - - isl_vec_free(vec); - return contains; -} - -int isl_map_contains_point(__isl_keep isl_map *map, __isl_keep isl_point *point) -{ - int i; - int found = 0; - - if (!map || !point) - return -1; - - map = isl_map_copy(map); - map = isl_map_compute_divs(map); - if (!map) - return -1; - - for (i = 0; i < map->n; ++i) { - found = isl_basic_map_contains_point(map->p[i], point); - if (found < 0) - goto error; - if (found) - break; - } - isl_map_free(map); - - return found; -error: - isl_map_free(map); - return -1; -} - -int isl_set_contains_point(__isl_keep isl_set *set, __isl_keep isl_point *point) -{ - return isl_map_contains_point((isl_map *)set, point); -} - -__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt) -{ - isl_basic_set *bset; - isl_basic_set *model; - - model = isl_basic_set_empty(isl_space_copy(pnt->dim)); - bset = isl_basic_set_from_vec(isl_vec_copy(pnt->vec)); - bset = isl_basic_set_from_underlying_set(bset, model); - isl_point_free(pnt); - - return bset; -} - -__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt) -{ - isl_basic_set *bset; - bset = isl_basic_set_from_point(pnt); - return isl_set_from_basic_set(bset); -} - -__isl_give isl_basic_set *isl_basic_set_box_from_points( - __isl_take isl_point *pnt1, __isl_take isl_point *pnt2) -{ - isl_basic_set *bset; - unsigned total; - int i; - int k; - isl_int t; - - isl_int_init(t); - - if (!pnt1 || !pnt2) - goto error; - - isl_assert(pnt1->dim->ctx, - isl_space_is_equal(pnt1->dim, pnt2->dim), goto error); - - if (isl_point_is_void(pnt1) && isl_point_is_void(pnt2)) { - isl_space *dim = isl_space_copy(pnt1->dim); - isl_point_free(pnt1); - isl_point_free(pnt2); - isl_int_clear(t); - return isl_basic_set_empty(dim); - } - if (isl_point_is_void(pnt1)) { - isl_point_free(pnt1); - isl_int_clear(t); - return isl_basic_set_from_point(pnt2); - } - if (isl_point_is_void(pnt2)) { - isl_point_free(pnt2); - isl_int_clear(t); - return isl_basic_set_from_point(pnt1); - } - - total = isl_space_dim(pnt1->dim, isl_dim_all); - bset = isl_basic_set_alloc_space(isl_space_copy(pnt1->dim), 0, 0, 2 * total); - - for (i = 0; i < total; ++i) { - isl_int_mul(t, pnt1->vec->el[1 + i], pnt2->vec->el[0]); - isl_int_submul(t, pnt2->vec->el[1 + i], pnt1->vec->el[0]); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k] + 1, total); - if (isl_int_is_pos(t)) { - isl_int_set_si(bset->ineq[k][1 + i], -1); - isl_int_set(bset->ineq[k][0], pnt1->vec->el[1 + i]); - } else { - isl_int_set_si(bset->ineq[k][1 + i], 1); - isl_int_neg(bset->ineq[k][0], pnt1->vec->el[1 + i]); - } - isl_int_fdiv_q(bset->ineq[k][0], bset->ineq[k][0], pnt1->vec->el[0]); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k] + 1, total); - if (isl_int_is_pos(t)) { - isl_int_set_si(bset->ineq[k][1 + i], 1); - isl_int_neg(bset->ineq[k][0], pnt2->vec->el[1 + i]); - } else { - isl_int_set_si(bset->ineq[k][1 + i], -1); - isl_int_set(bset->ineq[k][0], pnt2->vec->el[1 + i]); - } - isl_int_fdiv_q(bset->ineq[k][0], bset->ineq[k][0], pnt2->vec->el[0]); - } - - bset = isl_basic_set_finalize(bset); - - isl_point_free(pnt1); - isl_point_free(pnt2); - - isl_int_clear(t); - - return bset; -error: - isl_point_free(pnt1); - isl_point_free(pnt2); - isl_int_clear(t); - return NULL; -} - -__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1, - __isl_take isl_point *pnt2) -{ - isl_basic_set *bset; - bset = isl_basic_set_box_from_points(pnt1, pnt2); - return isl_set_from_basic_set(bset); -} - -__isl_give isl_printer *isl_printer_print_point( - __isl_take isl_printer *p, __isl_keep isl_point *pnt) -{ - int i; - unsigned nparam; - unsigned dim; - - if (!pnt) - return p; - if (isl_point_is_void(pnt)) { - p = isl_printer_print_str(p, "void"); - return p; - } - - nparam = isl_space_dim(pnt->dim, isl_dim_param); - dim = isl_space_dim(pnt->dim, isl_dim_set); - if (nparam > 0) { - p = isl_printer_print_str(p, "["); - for (i = 0; i < nparam; ++i) { - const char *name; - if (i) - p = isl_printer_print_str(p, ", "); - name = isl_space_get_dim_name(pnt->dim, isl_dim_param, i); - if (name) { - p = isl_printer_print_str(p, name); - p = isl_printer_print_str(p, " = "); - } - p = isl_printer_print_isl_int(p, pnt->vec->el[1 + i]); - if (!isl_int_is_one(pnt->vec->el[0])) { - p = isl_printer_print_str(p, "/"); - p = isl_printer_print_isl_int(p, pnt->vec->el[0]); - } - } - p = isl_printer_print_str(p, "]"); - p = isl_printer_print_str(p, " -> "); - } - p = isl_printer_print_str(p, "["); - for (i = 0; i < dim; ++i) { - if (i) - p = isl_printer_print_str(p, ", "); - p = isl_printer_print_isl_int(p, pnt->vec->el[1 + nparam + i]); - if (!isl_int_is_one(pnt->vec->el[0])) { - p = isl_printer_print_str(p, "/"); - p = isl_printer_print_isl_int(p, pnt->vec->el[0]); - } - } - p = isl_printer_print_str(p, "]"); - return p; -} diff --git a/cloog-0.17.0/isl/isl_point_private.h b/cloog-0.17.0/isl/isl_point_private.h deleted file mode 100644 index 305b81e381a5347f19909cd498f61664cef27c1f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_point_private.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include -#include - -struct isl_point { - int ref; - isl_space *dim; - struct isl_vec *vec; -}; - -__isl_give isl_point *isl_point_alloc(__isl_take isl_space *dim, - __isl_take isl_vec *vec); diff --git a/cloog-0.17.0/isl/isl_polynomial.c b/cloog-0.17.0/isl/isl_polynomial.c deleted file mode 100644 index 132986ea5b69772f93a319c89ccb2287202557bf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_polynomial.c +++ /dev/null @@ -1,4781 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#define ISL_DIM_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static unsigned pos(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return 0; - case isl_dim_in: return dim->nparam; - case isl_dim_out: return dim->nparam + dim->n_in; - default: return 0; - } -} - -int isl_upoly_is_cst(__isl_keep struct isl_upoly *up) -{ - if (!up) - return -1; - - return up->var < 0; -} - -__isl_keep struct isl_upoly_cst *isl_upoly_as_cst(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - isl_assert(up->ctx, up->var < 0, return NULL); - - return (struct isl_upoly_cst *)up; -} - -__isl_keep struct isl_upoly_rec *isl_upoly_as_rec(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - isl_assert(up->ctx, up->var >= 0, return NULL); - - return (struct isl_upoly_rec *)up; -} - -int isl_upoly_is_equal(__isl_keep struct isl_upoly *up1, - __isl_keep struct isl_upoly *up2) -{ - int i; - struct isl_upoly_rec *rec1, *rec2; - - if (!up1 || !up2) - return -1; - if (up1 == up2) - return 1; - if (up1->var != up2->var) - return 0; - if (isl_upoly_is_cst(up1)) { - struct isl_upoly_cst *cst1, *cst2; - cst1 = isl_upoly_as_cst(up1); - cst2 = isl_upoly_as_cst(up2); - if (!cst1 || !cst2) - return -1; - return isl_int_eq(cst1->n, cst2->n) && - isl_int_eq(cst1->d, cst2->d); - } - - rec1 = isl_upoly_as_rec(up1); - rec2 = isl_upoly_as_rec(up2); - if (!rec1 || !rec2) - return -1; - - if (rec1->n != rec2->n) - return 0; - - for (i = 0; i < rec1->n; ++i) { - int eq = isl_upoly_is_equal(rec1->p[i], rec2->p[i]); - if (eq < 0 || !eq) - return eq; - } - - return 1; -} - -int isl_upoly_is_zero(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_zero(cst->n) && isl_int_is_pos(cst->d); -} - -int isl_upoly_sgn(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return 0; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return 0; - - return isl_int_sgn(cst->n); -} - -int isl_upoly_is_nan(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_zero(cst->n) && isl_int_is_zero(cst->d); -} - -int isl_upoly_is_infty(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_pos(cst->n) && isl_int_is_zero(cst->d); -} - -int isl_upoly_is_neginfty(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_neg(cst->n) && isl_int_is_zero(cst->d); -} - -int isl_upoly_is_one(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_eq(cst->n, cst->d) && isl_int_is_pos(cst->d); -} - -int isl_upoly_is_negone(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - - if (!up) - return -1; - if (!isl_upoly_is_cst(up)) - return 0; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - - return isl_int_is_negone(cst->n) && isl_int_is_one(cst->d); -} - -__isl_give struct isl_upoly_cst *isl_upoly_cst_alloc(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_alloc_type(ctx, struct isl_upoly_cst); - if (!cst) - return NULL; - - cst->up.ref = 1; - cst->up.ctx = ctx; - isl_ctx_ref(ctx); - cst->up.var = -1; - - isl_int_init(cst->n); - isl_int_init(cst->d); - - return cst; -} - -__isl_give struct isl_upoly *isl_upoly_zero(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 0); - isl_int_set_si(cst->d, 1); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_one(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 1); - isl_int_set_si(cst->d, 1); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_infty(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 1); - isl_int_set_si(cst->d, 0); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_neginfty(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, -1); - isl_int_set_si(cst->d, 0); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_nan(struct isl_ctx *ctx) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set_si(cst->n, 0); - isl_int_set_si(cst->d, 0); - - return &cst->up; -} - -__isl_give struct isl_upoly *isl_upoly_rat_cst(struct isl_ctx *ctx, - isl_int n, isl_int d) -{ - struct isl_upoly_cst *cst; - - cst = isl_upoly_cst_alloc(ctx); - if (!cst) - return NULL; - - isl_int_set(cst->n, n); - isl_int_set(cst->d, d); - - return &cst->up; -} - -__isl_give struct isl_upoly_rec *isl_upoly_alloc_rec(struct isl_ctx *ctx, - int var, int size) -{ - struct isl_upoly_rec *rec; - - isl_assert(ctx, var >= 0, return NULL); - isl_assert(ctx, size >= 0, return NULL); - rec = isl_calloc(ctx, struct isl_upoly_rec, - sizeof(struct isl_upoly_rec) + - size * sizeof(struct isl_upoly *)); - if (!rec) - return NULL; - - rec->up.ref = 1; - rec->up.ctx = ctx; - isl_ctx_ref(ctx); - rec->up.var = var; - - rec->n = 0; - rec->size = size; - - return rec; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_reset_domain_space( - __isl_take isl_qpolynomial *qp, __isl_take isl_space *dim) -{ - qp = isl_qpolynomial_cow(qp); - if (!qp || !dim) - goto error; - - isl_space_free(qp->dim); - qp->dim = dim; - - return qp; -error: - isl_qpolynomial_free(qp); - isl_space_free(dim); - return NULL; -} - -/* Reset the space of "qp". This function is called from isl_pw_templ.c - * and doesn't know if the space of an element object is represented - * directly or through its domain. It therefore passes along both. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_reset_space_and_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_space *space, - __isl_take isl_space *domain) -{ - isl_space_free(space); - return isl_qpolynomial_reset_domain_space(qp, domain); -} - -isl_ctx *isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp) -{ - return qp ? qp->dim->ctx : NULL; -} - -__isl_give isl_space *isl_qpolynomial_get_domain_space( - __isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_space_copy(qp->dim) : NULL; -} - -__isl_give isl_space *isl_qpolynomial_get_space(__isl_keep isl_qpolynomial *qp) -{ - isl_space *space; - if (!qp) - return NULL; - space = isl_space_copy(qp->dim); - space = isl_space_from_domain(space); - space = isl_space_add_dims(space, isl_dim_out, 1); - return space; -} - -/* Externally, an isl_qpolynomial has a map space, but internally, the - * ls field corresponds to the domain of that space. - */ -unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type) -{ - if (!qp) - return 0; - if (type == isl_dim_out) - return 1; - if (type == isl_dim_in) - type = isl_dim_set; - return isl_space_dim(qp->dim, type); -} - -int isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_zero(qp->upoly) : -1; -} - -int isl_qpolynomial_is_one(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_one(qp->upoly) : -1; -} - -int isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_nan(qp->upoly) : -1; -} - -int isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_infty(qp->upoly) : -1; -} - -int isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_is_neginfty(qp->upoly) : -1; -} - -int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial *qp) -{ - return qp ? isl_upoly_sgn(qp->upoly) : 0; -} - -static void upoly_free_cst(__isl_take struct isl_upoly_cst *cst) -{ - isl_int_clear(cst->n); - isl_int_clear(cst->d); -} - -static void upoly_free_rec(__isl_take struct isl_upoly_rec *rec) -{ - int i; - - for (i = 0; i < rec->n; ++i) - isl_upoly_free(rec->p[i]); -} - -__isl_give struct isl_upoly *isl_upoly_copy(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - up->ref++; - return up; -} - -__isl_give struct isl_upoly *isl_upoly_dup_cst(__isl_keep struct isl_upoly *up) -{ - struct isl_upoly_cst *cst; - struct isl_upoly_cst *dup; - - cst = isl_upoly_as_cst(up); - if (!cst) - return NULL; - - dup = isl_upoly_as_cst(isl_upoly_zero(up->ctx)); - if (!dup) - return NULL; - isl_int_set(dup->n, cst->n); - isl_int_set(dup->d, cst->d); - - return &dup->up; -} - -__isl_give struct isl_upoly *isl_upoly_dup_rec(__isl_keep struct isl_upoly *up) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly_rec *dup; - - rec = isl_upoly_as_rec(up); - if (!rec) - return NULL; - - dup = isl_upoly_alloc_rec(up->ctx, up->var, rec->n); - if (!dup) - return NULL; - - for (i = 0; i < rec->n; ++i) { - dup->p[i] = isl_upoly_copy(rec->p[i]); - if (!dup->p[i]) - goto error; - dup->n++; - } - - return &dup->up; -error: - isl_upoly_free(&dup->up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_dup(__isl_keep struct isl_upoly *up) -{ - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return isl_upoly_dup_cst(up); - else - return isl_upoly_dup_rec(up); -} - -__isl_give struct isl_upoly *isl_upoly_cow(__isl_take struct isl_upoly *up) -{ - if (!up) - return NULL; - - if (up->ref == 1) - return up; - up->ref--; - return isl_upoly_dup(up); -} - -void isl_upoly_free(__isl_take struct isl_upoly *up) -{ - if (!up) - return; - - if (--up->ref > 0) - return; - - if (up->var < 0) - upoly_free_cst((struct isl_upoly_cst *)up); - else - upoly_free_rec((struct isl_upoly_rec *)up); - - isl_ctx_deref(up->ctx); - free(up); -} - -static void isl_upoly_cst_reduce(__isl_keep struct isl_upoly_cst *cst) -{ - isl_int gcd; - - isl_int_init(gcd); - isl_int_gcd(gcd, cst->n, cst->d); - if (!isl_int_is_zero(gcd) && !isl_int_is_one(gcd)) { - isl_int_divexact(cst->n, cst->n, gcd); - isl_int_divexact(cst->d, cst->d, gcd); - } - isl_int_clear(gcd); -} - -__isl_give struct isl_upoly *isl_upoly_sum_cst(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - struct isl_upoly_cst *cst1; - struct isl_upoly_cst *cst2; - - up1 = isl_upoly_cow(up1); - if (!up1 || !up2) - goto error; - - cst1 = isl_upoly_as_cst(up1); - cst2 = isl_upoly_as_cst(up2); - - if (isl_int_eq(cst1->d, cst2->d)) - isl_int_add(cst1->n, cst1->n, cst2->n); - else { - isl_int_mul(cst1->n, cst1->n, cst2->d); - isl_int_addmul(cst1->n, cst2->n, cst1->d); - isl_int_mul(cst1->d, cst1->d, cst2->d); - } - - isl_upoly_cst_reduce(cst1); - - isl_upoly_free(up2); - return up1; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -static __isl_give struct isl_upoly *replace_by_zero( - __isl_take struct isl_upoly *up) -{ - struct isl_ctx *ctx; - - if (!up) - return NULL; - ctx = up->ctx; - isl_upoly_free(up); - return isl_upoly_zero(ctx); -} - -static __isl_give struct isl_upoly *replace_by_constant_term( - __isl_take struct isl_upoly *up) -{ - struct isl_upoly_rec *rec; - struct isl_upoly *cst; - - if (!up) - return NULL; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - cst = isl_upoly_copy(rec->p[0]); - isl_upoly_free(up); - return cst; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_sum(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - int i; - struct isl_upoly_rec *rec1, *rec2; - - if (!up1 || !up2) - goto error; - - if (isl_upoly_is_nan(up1)) { - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_nan(up2)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_zero(up1)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_zero(up2)) { - isl_upoly_free(up2); - return up1; - } - - if (up1->var < up2->var) - return isl_upoly_sum(up2, up1); - - if (up2->var < up1->var) { - struct isl_upoly_rec *rec; - if (isl_upoly_is_infty(up2) || isl_upoly_is_neginfty(up2)) { - isl_upoly_free(up1); - return up2; - } - up1 = isl_upoly_cow(up1); - rec = isl_upoly_as_rec(up1); - if (!rec) - goto error; - rec->p[0] = isl_upoly_sum(rec->p[0], up2); - if (rec->n == 1) - up1 = replace_by_constant_term(up1); - return up1; - } - - if (isl_upoly_is_cst(up1)) - return isl_upoly_sum_cst(up1, up2); - - rec1 = isl_upoly_as_rec(up1); - rec2 = isl_upoly_as_rec(up2); - if (!rec1 || !rec2) - goto error; - - if (rec1->n < rec2->n) - return isl_upoly_sum(up2, up1); - - up1 = isl_upoly_cow(up1); - rec1 = isl_upoly_as_rec(up1); - if (!rec1) - goto error; - - for (i = rec2->n - 1; i >= 0; --i) { - rec1->p[i] = isl_upoly_sum(rec1->p[i], - isl_upoly_copy(rec2->p[i])); - if (!rec1->p[i]) - goto error; - if (i == rec1->n - 1 && isl_upoly_is_zero(rec1->p[i])) { - isl_upoly_free(rec1->p[i]); - rec1->n--; - } - } - - if (rec1->n == 0) - up1 = replace_by_zero(up1); - else if (rec1->n == 1) - up1 = replace_by_constant_term(up1); - - isl_upoly_free(up2); - - return up1; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_cst_add_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - struct isl_upoly_cst *cst; - - up = isl_upoly_cow(up); - if (!up) - return NULL; - - cst = isl_upoly_as_cst(up); - - isl_int_addmul(cst->n, cst->d, v); - - return up; -} - -__isl_give struct isl_upoly *isl_upoly_add_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return isl_upoly_cst_add_isl_int(up, v); - - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - rec->p[0] = isl_upoly_add_isl_int(rec->p[0], v); - if (!rec->p[0]) - goto error; - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_cst_mul_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - struct isl_upoly_cst *cst; - - if (isl_upoly_is_zero(up)) - return up; - - up = isl_upoly_cow(up); - if (!up) - return NULL; - - cst = isl_upoly_as_cst(up); - - isl_int_mul(cst->n, cst->n, v); - - return up; -} - -__isl_give struct isl_upoly *isl_upoly_mul_isl_int( - __isl_take struct isl_upoly *up, isl_int v) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return isl_upoly_cst_mul_isl_int(up, v); - - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = isl_upoly_mul_isl_int(rec->p[i], v); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_mul_cst(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - struct isl_upoly_cst *cst1; - struct isl_upoly_cst *cst2; - - up1 = isl_upoly_cow(up1); - if (!up1 || !up2) - goto error; - - cst1 = isl_upoly_as_cst(up1); - cst2 = isl_upoly_as_cst(up2); - - isl_int_mul(cst1->n, cst1->n, cst2->n); - isl_int_mul(cst1->d, cst1->d, cst2->d); - - isl_upoly_cst_reduce(cst1); - - isl_upoly_free(up2); - return up1; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_mul_rec(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - struct isl_upoly_rec *rec1; - struct isl_upoly_rec *rec2; - struct isl_upoly_rec *res = NULL; - int i, j; - int size; - - rec1 = isl_upoly_as_rec(up1); - rec2 = isl_upoly_as_rec(up2); - if (!rec1 || !rec2) - goto error; - size = rec1->n + rec2->n - 1; - res = isl_upoly_alloc_rec(up1->ctx, up1->var, size); - if (!res) - goto error; - - for (i = 0; i < rec1->n; ++i) { - res->p[i] = isl_upoly_mul(isl_upoly_copy(rec2->p[0]), - isl_upoly_copy(rec1->p[i])); - if (!res->p[i]) - goto error; - res->n++; - } - for (; i < size; ++i) { - res->p[i] = isl_upoly_zero(up1->ctx); - if (!res->p[i]) - goto error; - res->n++; - } - for (i = 0; i < rec1->n; ++i) { - for (j = 1; j < rec2->n; ++j) { - struct isl_upoly *up; - up = isl_upoly_mul(isl_upoly_copy(rec2->p[j]), - isl_upoly_copy(rec1->p[i])); - res->p[i + j] = isl_upoly_sum(res->p[i + j], up); - if (!res->p[i + j]) - goto error; - } - } - - isl_upoly_free(up1); - isl_upoly_free(up2); - - return &res->up; -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - isl_upoly_free(&res->up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_mul(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2) -{ - if (!up1 || !up2) - goto error; - - if (isl_upoly_is_nan(up1)) { - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_nan(up2)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_zero(up1)) { - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_zero(up2)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_one(up1)) { - isl_upoly_free(up1); - return up2; - } - - if (isl_upoly_is_one(up2)) { - isl_upoly_free(up2); - return up1; - } - - if (up1->var < up2->var) - return isl_upoly_mul(up2, up1); - - if (up2->var < up1->var) { - int i; - struct isl_upoly_rec *rec; - if (isl_upoly_is_infty(up2) || isl_upoly_is_neginfty(up2)) { - isl_ctx *ctx = up1->ctx; - isl_upoly_free(up1); - isl_upoly_free(up2); - return isl_upoly_nan(ctx); - } - up1 = isl_upoly_cow(up1); - rec = isl_upoly_as_rec(up1); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = isl_upoly_mul(rec->p[i], - isl_upoly_copy(up2)); - if (!rec->p[i]) - goto error; - } - isl_upoly_free(up2); - return up1; - } - - if (isl_upoly_is_cst(up1)) - return isl_upoly_mul_cst(up1, up2); - - return isl_upoly_mul_rec(up1, up2); -error: - isl_upoly_free(up1); - isl_upoly_free(up2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_pow(__isl_take struct isl_upoly *up, - unsigned power) -{ - struct isl_upoly *res; - - if (!up) - return NULL; - if (power == 1) - return up; - - if (power % 2) - res = isl_upoly_copy(up); - else - res = isl_upoly_one(up->ctx); - - while (power >>= 1) { - up = isl_upoly_mul(up, isl_upoly_copy(up)); - if (power % 2) - res = isl_upoly_mul(res, isl_upoly_copy(up)); - } - - isl_upoly_free(up); - return res; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_alloc(__isl_take isl_space *dim, - unsigned n_div, __isl_take struct isl_upoly *up) -{ - struct isl_qpolynomial *qp = NULL; - unsigned total; - - if (!dim || !up) - goto error; - - if (!isl_space_is_set(dim)) - isl_die(isl_space_get_ctx(dim), isl_error_invalid, - "domain of polynomial should be a set", goto error); - - total = isl_space_dim(dim, isl_dim_all); - - qp = isl_calloc_type(dim->ctx, struct isl_qpolynomial); - if (!qp) - goto error; - - qp->ref = 1; - qp->div = isl_mat_alloc(dim->ctx, n_div, 1 + 1 + total + n_div); - if (!qp->div) - goto error; - - qp->dim = dim; - qp->upoly = up; - - return qp; -error: - isl_space_free(dim); - isl_upoly_free(up); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - qp->ref++; - return qp; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_dup(__isl_keep isl_qpolynomial *qp) -{ - struct isl_qpolynomial *dup; - - if (!qp) - return NULL; - - dup = isl_qpolynomial_alloc(isl_space_copy(qp->dim), qp->div->n_row, - isl_upoly_copy(qp->upoly)); - if (!dup) - return NULL; - isl_mat_free(dup->div); - dup->div = isl_mat_copy(qp->div); - if (!dup->div) - goto error; - - return dup; -error: - isl_qpolynomial_free(dup); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_cow(__isl_take isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - if (qp->ref == 1) - return qp; - qp->ref--; - return isl_qpolynomial_dup(qp); -} - -void *isl_qpolynomial_free(__isl_take isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - if (--qp->ref > 0) - return NULL; - - isl_space_free(qp->dim); - isl_mat_free(qp->div); - isl_upoly_free(qp->upoly); - - free(qp); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_var_pow(isl_ctx *ctx, int pos, int power) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly_cst *cst; - - rec = isl_upoly_alloc_rec(ctx, pos, 1 + power); - if (!rec) - return NULL; - for (i = 0; i < 1 + power; ++i) { - rec->p[i] = isl_upoly_zero(ctx); - if (!rec->p[i]) - goto error; - rec->n++; - } - cst = isl_upoly_as_cst(rec->p[power]); - isl_int_set_si(cst->n, 1); - - return &rec->up; -error: - isl_upoly_free(&rec->up); - return NULL; -} - -/* r array maps original positions to new positions. - */ -static __isl_give struct isl_upoly *reorder(__isl_take struct isl_upoly *up, - int *r) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly *base; - struct isl_upoly *res; - - if (isl_upoly_is_cst(up)) - return up; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - isl_assert(up->ctx, rec->n >= 1, goto error); - - base = isl_upoly_var_pow(up->ctx, r[up->var], 1); - res = reorder(isl_upoly_copy(rec->p[rec->n - 1]), r); - - for (i = rec->n - 2; i >= 0; --i) { - res = isl_upoly_mul(res, isl_upoly_copy(base)); - res = isl_upoly_sum(res, reorder(isl_upoly_copy(rec->p[i]), r)); - } - - isl_upoly_free(base); - isl_upoly_free(up); - - return res; -error: - isl_upoly_free(up); - return NULL; -} - -static int compatible_divs(__isl_keep isl_mat *div1, __isl_keep isl_mat *div2) -{ - int n_row, n_col; - int equal; - - isl_assert(div1->ctx, div1->n_row >= div2->n_row && - div1->n_col >= div2->n_col, return -1); - - if (div1->n_row == div2->n_row) - return isl_mat_is_equal(div1, div2); - - n_row = div1->n_row; - n_col = div1->n_col; - div1->n_row = div2->n_row; - div1->n_col = div2->n_col; - - equal = isl_mat_is_equal(div1, div2); - - div1->n_row = n_row; - div1->n_col = n_col; - - return equal; -} - -static int cmp_row(__isl_keep isl_mat *div, int i, int j) -{ - int li, lj; - - li = isl_seq_last_non_zero(div->row[i], div->n_col); - lj = isl_seq_last_non_zero(div->row[j], div->n_col); - - if (li != lj) - return li - lj; - - return isl_seq_cmp(div->row[i], div->row[j], div->n_col); -} - -struct isl_div_sort_info { - isl_mat *div; - int row; -}; - -static int div_sort_cmp(const void *p1, const void *p2) -{ - const struct isl_div_sort_info *i1, *i2; - i1 = (const struct isl_div_sort_info *) p1; - i2 = (const struct isl_div_sort_info *) p2; - - return cmp_row(i1->div, i1->row, i2->row); -} - -/* Sort divs and remove duplicates. - */ -static __isl_give isl_qpolynomial *sort_divs(__isl_take isl_qpolynomial *qp) -{ - int i; - int skip; - int len; - struct isl_div_sort_info *array = NULL; - int *pos = NULL, *at = NULL; - int *reordering = NULL; - unsigned div_pos; - - if (!qp) - return NULL; - if (qp->div->n_row <= 1) - return qp; - - div_pos = isl_space_dim(qp->dim, isl_dim_all); - - array = isl_alloc_array(qp->div->ctx, struct isl_div_sort_info, - qp->div->n_row); - pos = isl_alloc_array(qp->div->ctx, int, qp->div->n_row); - at = isl_alloc_array(qp->div->ctx, int, qp->div->n_row); - len = qp->div->n_col - 2; - reordering = isl_alloc_array(qp->div->ctx, int, len); - if (!array || !pos || !at || !reordering) - goto error; - - for (i = 0; i < qp->div->n_row; ++i) { - array[i].div = qp->div; - array[i].row = i; - pos[i] = i; - at[i] = i; - } - - qsort(array, qp->div->n_row, sizeof(struct isl_div_sort_info), - div_sort_cmp); - - for (i = 0; i < div_pos; ++i) - reordering[i] = i; - - for (i = 0; i < qp->div->n_row; ++i) { - if (pos[array[i].row] == i) - continue; - qp->div = isl_mat_swap_rows(qp->div, i, pos[array[i].row]); - pos[at[i]] = pos[array[i].row]; - at[pos[array[i].row]] = at[i]; - at[i] = array[i].row; - pos[array[i].row] = i; - } - - skip = 0; - for (i = 0; i < len - div_pos; ++i) { - if (i > 0 && - isl_seq_eq(qp->div->row[i - skip - 1], - qp->div->row[i - skip], qp->div->n_col)) { - qp->div = isl_mat_drop_rows(qp->div, i - skip, 1); - isl_mat_col_add(qp->div, 2 + div_pos + i - skip - 1, - 2 + div_pos + i - skip); - qp->div = isl_mat_drop_cols(qp->div, - 2 + div_pos + i - skip, 1); - skip++; - } - reordering[div_pos + array[i].row] = div_pos + i - skip; - } - - qp->upoly = reorder(qp->upoly, reordering); - - if (!qp->upoly || !qp->div) - goto error; - - free(at); - free(pos); - free(array); - free(reordering); - - return qp; -error: - free(at); - free(pos); - free(array); - free(reordering); - isl_qpolynomial_free(qp); - return NULL; -} - -static __isl_give struct isl_upoly *expand(__isl_take struct isl_upoly *up, - int *exp, int first) -{ - int i; - struct isl_upoly_rec *rec; - - if (isl_upoly_is_cst(up)) - return up; - - if (up->var < first) - return up; - - if (exp[up->var - first] == up->var - first) - return up; - - up = isl_upoly_cow(up); - if (!up) - goto error; - - up->var = exp[up->var - first] + first; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = expand(rec->p[i], exp, first); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -static __isl_give isl_qpolynomial *with_merged_divs( - __isl_give isl_qpolynomial *(*fn)(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2), - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) -{ - int *exp1 = NULL; - int *exp2 = NULL; - isl_mat *div = NULL; - - qp1 = isl_qpolynomial_cow(qp1); - qp2 = isl_qpolynomial_cow(qp2); - - if (!qp1 || !qp2) - goto error; - - isl_assert(qp1->div->ctx, qp1->div->n_row >= qp2->div->n_row && - qp1->div->n_col >= qp2->div->n_col, goto error); - - exp1 = isl_alloc_array(qp1->div->ctx, int, qp1->div->n_row); - exp2 = isl_alloc_array(qp2->div->ctx, int, qp2->div->n_row); - if (!exp1 || !exp2) - goto error; - - div = isl_merge_divs(qp1->div, qp2->div, exp1, exp2); - if (!div) - goto error; - - isl_mat_free(qp1->div); - qp1->div = isl_mat_copy(div); - isl_mat_free(qp2->div); - qp2->div = isl_mat_copy(div); - - qp1->upoly = expand(qp1->upoly, exp1, div->n_col - div->n_row - 2); - qp2->upoly = expand(qp2->upoly, exp2, div->n_col - div->n_row - 2); - - if (!qp1->upoly || !qp2->upoly) - goto error; - - isl_mat_free(div); - free(exp1); - free(exp2); - - return fn(qp1, qp2); -error: - isl_mat_free(div); - free(exp1); - free(exp2); - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - qp1 = isl_qpolynomial_cow(qp1); - - if (!qp1 || !qp2) - goto error; - - if (qp1->div->n_row < qp2->div->n_row) - return isl_qpolynomial_add(qp2, qp1); - - isl_assert(qp1->dim->ctx, isl_space_is_equal(qp1->dim, qp2->dim), goto error); - if (!compatible_divs(qp1->div, qp2->div)) - return with_merged_divs(isl_qpolynomial_add, qp1, qp2); - - qp1->upoly = isl_upoly_sum(qp1->upoly, isl_upoly_copy(qp2->upoly)); - if (!qp1->upoly) - goto error; - - isl_qpolynomial_free(qp2); - - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add_on_domain( - __isl_keep isl_set *dom, - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - qp1 = isl_qpolynomial_add(qp1, qp2); - qp1 = isl_qpolynomial_gist(qp1, isl_set_copy(dom)); - return qp1; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_sub(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - return isl_qpolynomial_add(qp1, isl_qpolynomial_neg(qp2)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v) -{ - if (isl_int_is_zero(v)) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - qp->upoly = isl_upoly_add_isl_int(qp->upoly, v); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; - -} - -__isl_give isl_qpolynomial *isl_qpolynomial_neg(__isl_take isl_qpolynomial *qp) -{ - if (!qp) - return NULL; - - return isl_qpolynomial_mul_isl_int(qp, qp->dim->ctx->negone); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_mul_isl_int( - __isl_take isl_qpolynomial *qp, isl_int v) -{ - if (isl_int_is_one(v)) - return qp; - - if (qp && isl_int_is_zero(v)) { - isl_qpolynomial *zero; - zero = isl_qpolynomial_zero_on_domain(isl_space_copy(qp->dim)); - isl_qpolynomial_free(qp); - return zero; - } - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - qp->upoly = isl_upoly_mul_isl_int(qp->upoly, v); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_scale( - __isl_take isl_qpolynomial *qp, isl_int v) -{ - return isl_qpolynomial_mul_isl_int(qp, v); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2) -{ - qp1 = isl_qpolynomial_cow(qp1); - - if (!qp1 || !qp2) - goto error; - - if (qp1->div->n_row < qp2->div->n_row) - return isl_qpolynomial_mul(qp2, qp1); - - isl_assert(qp1->dim->ctx, isl_space_is_equal(qp1->dim, qp2->dim), goto error); - if (!compatible_divs(qp1->div, qp2->div)) - return with_merged_divs(isl_qpolynomial_mul, qp1, qp2); - - qp1->upoly = isl_upoly_mul(qp1->upoly, isl_upoly_copy(qp2->upoly)); - if (!qp1->upoly) - goto error; - - isl_qpolynomial_free(qp2); - - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_pow(__isl_take isl_qpolynomial *qp, - unsigned power) -{ - qp = isl_qpolynomial_cow(qp); - - if (!qp) - return NULL; - - qp->upoly = isl_upoly_pow(qp->upoly, power); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow( - __isl_take isl_pw_qpolynomial *pwqp, unsigned power) -{ - int i; - - if (power == 1) - return pwqp; - - pwqp = isl_pw_qpolynomial_cow(pwqp); - if (!pwqp) - return NULL; - - for (i = 0; i < pwqp->n; ++i) { - pwqp->p[i].qp = isl_qpolynomial_pow(pwqp->p[i].qp, power); - if (!pwqp->p[i].qp) - return isl_pw_qpolynomial_free(pwqp); - } - - return pwqp; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_zero_on_domain( - __isl_take isl_space *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_zero(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_one_on_domain( - __isl_take isl_space *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_one(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_infty_on_domain( - __isl_take isl_space *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_infty(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_neginfty_on_domain( - __isl_take isl_space *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_neginfty(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_nan_on_domain( - __isl_take isl_space *dim) -{ - if (!dim) - return NULL; - return isl_qpolynomial_alloc(dim, 0, isl_upoly_nan(dim->ctx)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_cst_on_domain( - __isl_take isl_space *dim, - isl_int v) -{ - struct isl_qpolynomial *qp; - struct isl_upoly_cst *cst; - - if (!dim) - return NULL; - - qp = isl_qpolynomial_alloc(dim, 0, isl_upoly_zero(dim->ctx)); - if (!qp) - return NULL; - - cst = isl_upoly_as_cst(qp->upoly); - isl_int_set(cst->n, v); - - return qp; -} - -int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp, - isl_int *n, isl_int *d) -{ - struct isl_upoly_cst *cst; - - if (!qp) - return -1; - - if (!isl_upoly_is_cst(qp->upoly)) - return 0; - - cst = isl_upoly_as_cst(qp->upoly); - if (!cst) - return -1; - - if (n) - isl_int_set(*n, cst->n); - if (d) - isl_int_set(*d, cst->d); - - return 1; -} - -int isl_upoly_is_affine(__isl_keep struct isl_upoly *up) -{ - int is_cst; - struct isl_upoly_rec *rec; - - if (!up) - return -1; - - if (up->var < 0) - return 1; - - rec = isl_upoly_as_rec(up); - if (!rec) - return -1; - - if (rec->n > 2) - return 0; - - isl_assert(up->ctx, rec->n > 1, return -1); - - is_cst = isl_upoly_is_cst(rec->p[1]); - if (is_cst < 0) - return -1; - if (!is_cst) - return 0; - - return isl_upoly_is_affine(rec->p[0]); -} - -int isl_qpolynomial_is_affine(__isl_keep isl_qpolynomial *qp) -{ - if (!qp) - return -1; - - if (qp->div->n_row > 0) - return 0; - - return isl_upoly_is_affine(qp->upoly); -} - -static void update_coeff(__isl_keep isl_vec *aff, - __isl_keep struct isl_upoly_cst *cst, int pos) -{ - isl_int gcd; - isl_int f; - - if (isl_int_is_zero(cst->n)) - return; - - isl_int_init(gcd); - isl_int_init(f); - isl_int_gcd(gcd, cst->d, aff->el[0]); - isl_int_divexact(f, cst->d, gcd); - isl_int_divexact(gcd, aff->el[0], gcd); - isl_seq_scale(aff->el, aff->el, f, aff->size); - isl_int_mul(aff->el[1 + pos], gcd, cst->n); - isl_int_clear(gcd); - isl_int_clear(f); -} - -int isl_upoly_update_affine(__isl_keep struct isl_upoly *up, - __isl_keep isl_vec *aff) -{ - struct isl_upoly_cst *cst; - struct isl_upoly_rec *rec; - - if (!up || !aff) - return -1; - - if (up->var < 0) { - struct isl_upoly_cst *cst; - - cst = isl_upoly_as_cst(up); - if (!cst) - return -1; - update_coeff(aff, cst, 0); - return 0; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - return -1; - isl_assert(up->ctx, rec->n == 2, return -1); - - cst = isl_upoly_as_cst(rec->p[1]); - if (!cst) - return -1; - update_coeff(aff, cst, 1 + up->var); - - return isl_upoly_update_affine(rec->p[0], aff); -} - -__isl_give isl_vec *isl_qpolynomial_extract_affine( - __isl_keep isl_qpolynomial *qp) -{ - isl_vec *aff; - unsigned d; - - if (!qp) - return NULL; - - d = isl_space_dim(qp->dim, isl_dim_all); - aff = isl_vec_alloc(qp->div->ctx, 2 + d + qp->div->n_row); - if (!aff) - return NULL; - - isl_seq_clr(aff->el + 1, 1 + d + qp->div->n_row); - isl_int_set_si(aff->el[0], 1); - - if (isl_upoly_update_affine(qp->upoly, aff) < 0) - goto error; - - return aff; -error: - isl_vec_free(aff); - return NULL; -} - -int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2) -{ - int equal; - - if (!qp1 || !qp2) - return -1; - - equal = isl_space_is_equal(qp1->dim, qp2->dim); - if (equal < 0 || !equal) - return equal; - - equal = isl_mat_is_equal(qp1->div, qp2->div); - if (equal < 0 || !equal) - return equal; - - return isl_upoly_is_equal(qp1->upoly, qp2->upoly); -} - -static void upoly_update_den(__isl_keep struct isl_upoly *up, isl_int *d) -{ - int i; - struct isl_upoly_rec *rec; - - if (isl_upoly_is_cst(up)) { - struct isl_upoly_cst *cst; - cst = isl_upoly_as_cst(up); - if (!cst) - return; - isl_int_lcm(*d, *d, cst->d); - return; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - return; - - for (i = 0; i < rec->n; ++i) - upoly_update_den(rec->p[i], d); -} - -void isl_qpolynomial_get_den(__isl_keep isl_qpolynomial *qp, isl_int *d) -{ - isl_int_set_si(*d, 1); - if (!qp) - return; - upoly_update_den(qp->upoly, d); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_var_pow_on_domain( - __isl_take isl_space *dim, int pos, int power) -{ - struct isl_ctx *ctx; - - if (!dim) - return NULL; - - ctx = dim->ctx; - - return isl_qpolynomial_alloc(dim, 0, isl_upoly_var_pow(ctx, pos, power)); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - if (!dim) - return NULL; - - isl_assert(dim->ctx, isl_space_dim(dim, isl_dim_in) == 0, goto error); - isl_assert(dim->ctx, pos < isl_space_dim(dim, type), goto error); - - if (type == isl_dim_set) - pos += isl_space_dim(dim, isl_dim_param); - - return isl_qpolynomial_var_pow_on_domain(dim, pos, 1); -error: - isl_space_free(dim); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_subs(__isl_take struct isl_upoly *up, - unsigned first, unsigned n, __isl_keep struct isl_upoly **subs) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly *base, *res; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up)) - return up; - - if (up->var < first) - return up; - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - isl_assert(up->ctx, rec->n >= 1, goto error); - - if (up->var >= first + n) - base = isl_upoly_var_pow(up->ctx, up->var, 1); - else - base = isl_upoly_copy(subs[up->var - first]); - - res = isl_upoly_subs(isl_upoly_copy(rec->p[rec->n - 1]), first, n, subs); - for (i = rec->n - 2; i >= 0; --i) { - struct isl_upoly *t; - t = isl_upoly_subs(isl_upoly_copy(rec->p[i]), first, n, subs); - res = isl_upoly_mul(res, isl_upoly_copy(base)); - res = isl_upoly_sum(res, t); - } - - isl_upoly_free(base); - isl_upoly_free(up); - - return res; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_from_affine(isl_ctx *ctx, isl_int *f, - isl_int denom, unsigned len) -{ - int i; - struct isl_upoly *up; - - isl_assert(ctx, len >= 1, return NULL); - - up = isl_upoly_rat_cst(ctx, f[0], denom); - for (i = 0; i < len - 1; ++i) { - struct isl_upoly *t; - struct isl_upoly *c; - - if (isl_int_is_zero(f[1 + i])) - continue; - - c = isl_upoly_rat_cst(ctx, f[1 + i], denom); - t = isl_upoly_var_pow(ctx, i, 1); - t = isl_upoly_mul(c, t); - up = isl_upoly_sum(up, t); - } - - return up; -} - -/* Remove common factor of non-constant terms and denominator. - */ -static void normalize_div(__isl_keep isl_qpolynomial *qp, int div) -{ - isl_ctx *ctx = qp->div->ctx; - unsigned total = qp->div->n_col - 2; - - isl_seq_gcd(qp->div->row[div] + 2, total, &ctx->normalize_gcd); - isl_int_gcd(ctx->normalize_gcd, - ctx->normalize_gcd, qp->div->row[div][0]); - if (isl_int_is_one(ctx->normalize_gcd)) - return; - - isl_seq_scale_down(qp->div->row[div] + 2, qp->div->row[div] + 2, - ctx->normalize_gcd, total); - isl_int_divexact(qp->div->row[div][0], qp->div->row[div][0], - ctx->normalize_gcd); - isl_int_fdiv_q(qp->div->row[div][1], qp->div->row[div][1], - ctx->normalize_gcd); -} - -/* Replace the integer division identified by "div" by the polynomial "s". - * The integer division is assumed not to appear in the definition - * of any other integer divisions. - */ -static __isl_give isl_qpolynomial *substitute_div( - __isl_take isl_qpolynomial *qp, - int div, __isl_take struct isl_upoly *s) -{ - int i; - int total; - int *reordering; - - if (!qp || !s) - goto error; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - - total = isl_space_dim(qp->dim, isl_dim_all); - qp->upoly = isl_upoly_subs(qp->upoly, total + div, 1, &s); - if (!qp->upoly) - goto error; - - reordering = isl_alloc_array(qp->dim->ctx, int, total + qp->div->n_row); - if (!reordering) - goto error; - for (i = 0; i < total + div; ++i) - reordering[i] = i; - for (i = total + div + 1; i < total + qp->div->n_row; ++i) - reordering[i] = i - 1; - qp->div = isl_mat_drop_rows(qp->div, div, 1); - qp->div = isl_mat_drop_cols(qp->div, 2 + total + div, 1); - qp->upoly = reorder(qp->upoly, reordering); - free(reordering); - - if (!qp->upoly || !qp->div) - goto error; - - isl_upoly_free(s); - return qp; -error: - isl_qpolynomial_free(qp); - isl_upoly_free(s); - return NULL; -} - -/* Replace all integer divisions [e/d] that turn out to not actually be integer - * divisions because d is equal to 1 by their definition, i.e., e. - */ -static __isl_give isl_qpolynomial *substitute_non_divs( - __isl_take isl_qpolynomial *qp) -{ - int i, j; - int total; - struct isl_upoly *s; - - if (!qp) - return NULL; - - total = isl_space_dim(qp->dim, isl_dim_all); - for (i = 0; qp && i < qp->div->n_row; ++i) { - if (!isl_int_is_one(qp->div->row[i][0])) - continue; - for (j = i + 1; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + total + i])) - continue; - isl_seq_combine(qp->div->row[j] + 1, - qp->div->ctx->one, qp->div->row[j] + 1, - qp->div->row[j][2 + total + i], - qp->div->row[i] + 1, 1 + total + i); - isl_int_set_si(qp->div->row[j][2 + total + i], 0); - normalize_div(qp, j); - } - s = isl_upoly_from_affine(qp->dim->ctx, qp->div->row[i] + 1, - qp->div->row[i][0], qp->div->n_col - 1); - qp = substitute_div(qp, i, s); - --i; - } - - return qp; -} - -/* Reduce the coefficients of div "div" to lie in the interval [0, d-1], - * with d the denominator. When replacing the coefficient e of x by - * d * frac(e/d) = e - d * floor(e/d), we are subtracting d * floor(e/d) * x - * inside the division, so we need to add floor(e/d) * x outside. - * That is, we replace q by q' + floor(e/d) * x and we therefore need - * to adjust the coefficient of x in each later div that depends on the - * current div "div" and also in the affine expression "aff" - * (if it too depends on "div"). - */ -static void reduce_div(__isl_keep isl_qpolynomial *qp, int div, - __isl_keep isl_vec *aff) -{ - int i, j; - isl_int v; - unsigned total = qp->div->n_col - qp->div->n_row - 2; - - isl_int_init(v); - for (i = 0; i < 1 + total + div; ++i) { - if (isl_int_is_nonneg(qp->div->row[div][1 + i]) && - isl_int_lt(qp->div->row[div][1 + i], qp->div->row[div][0])) - continue; - isl_int_fdiv_q(v, qp->div->row[div][1 + i], qp->div->row[div][0]); - isl_int_fdiv_r(qp->div->row[div][1 + i], - qp->div->row[div][1 + i], qp->div->row[div][0]); - if (!isl_int_is_zero(aff->el[1 + total + div])) - isl_int_addmul(aff->el[i], v, aff->el[1 + total + div]); - for (j = div + 1; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + total + div])) - continue; - isl_int_addmul(qp->div->row[j][1 + i], - v, qp->div->row[j][2 + total + div]); - } - } - isl_int_clear(v); -} - -/* Check if the last non-zero coefficient is bigger that half of the - * denominator. If so, we will invert the div to further reduce the number - * of distinct divs that may appear. - * If the last non-zero coefficient is exactly half the denominator, - * then we continue looking for earlier coefficients that are bigger - * than half the denominator. - */ -static int needs_invert(__isl_keep isl_mat *div, int row) -{ - int i; - int cmp; - - for (i = div->n_col - 1; i >= 1; --i) { - if (isl_int_is_zero(div->row[row][i])) - continue; - isl_int_mul_ui(div->row[row][i], div->row[row][i], 2); - cmp = isl_int_cmp(div->row[row][i], div->row[row][0]); - isl_int_divexact_ui(div->row[row][i], div->row[row][i], 2); - if (cmp) - return cmp > 0; - if (i == 1) - return 1; - } - - return 0; -} - -/* Replace div "div" q = [e/d] by -[(-e+(d-1))/d]. - * We only invert the coefficients of e (and the coefficient of q in - * later divs and in "aff"). After calling this function, the - * coefficients of e should be reduced again. - */ -static void invert_div(__isl_keep isl_qpolynomial *qp, int div, - __isl_keep isl_vec *aff) -{ - unsigned total = qp->div->n_col - qp->div->n_row - 2; - - isl_seq_neg(qp->div->row[div] + 1, - qp->div->row[div] + 1, qp->div->n_col - 1); - isl_int_sub_ui(qp->div->row[div][1], qp->div->row[div][1], 1); - isl_int_add(qp->div->row[div][1], - qp->div->row[div][1], qp->div->row[div][0]); - if (!isl_int_is_zero(aff->el[1 + total + div])) - isl_int_neg(aff->el[1 + total + div], aff->el[1 + total + div]); - isl_mat_col_mul(qp->div, 2 + total + div, - qp->div->ctx->negone, 2 + total + div); -} - -/* Assuming "qp" is a monomial, reduce all its divs to have coefficients - * in the interval [0, d-1], with d the denominator and such that the - * last non-zero coefficient that is not equal to d/2 is smaller than d/2. - * - * After the reduction, some divs may have become redundant or identical, - * so we call substitute_non_divs and sort_divs. If these functions - * eliminate divs or merge two or more divs into one, the coefficients - * of the enclosing divs may have to be reduced again, so we call - * ourselves recursively if the number of divs decreases. - */ -static __isl_give isl_qpolynomial *reduce_divs(__isl_take isl_qpolynomial *qp) -{ - int i; - isl_vec *aff = NULL; - struct isl_upoly *s; - unsigned n_div; - - if (!qp) - return NULL; - - aff = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1); - aff = isl_vec_clr(aff); - if (!aff) - goto error; - - isl_int_set_si(aff->el[1 + qp->upoly->var], 1); - - for (i = 0; i < qp->div->n_row; ++i) { - normalize_div(qp, i); - reduce_div(qp, i, aff); - if (needs_invert(qp->div, i)) { - invert_div(qp, i, aff); - reduce_div(qp, i, aff); - } - } - - s = isl_upoly_from_affine(qp->div->ctx, aff->el, - qp->div->ctx->one, aff->size); - qp->upoly = isl_upoly_subs(qp->upoly, qp->upoly->var, 1, &s); - isl_upoly_free(s); - if (!qp->upoly) - goto error; - - isl_vec_free(aff); - - n_div = qp->div->n_row; - qp = substitute_non_divs(qp); - qp = sort_divs(qp); - if (qp && qp->div->n_row < n_div) - return reduce_divs(qp); - - return qp; -error: - isl_qpolynomial_free(qp); - isl_vec_free(aff); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_rat_cst_on_domain( - __isl_take isl_space *dim, const isl_int n, const isl_int d) -{ - struct isl_qpolynomial *qp; - struct isl_upoly_cst *cst; - - if (!dim) - return NULL; - - qp = isl_qpolynomial_alloc(dim, 0, isl_upoly_zero(dim->ctx)); - if (!qp) - return NULL; - - cst = isl_upoly_as_cst(qp->upoly); - isl_int_set(cst->n, n); - isl_int_set(cst->d, d); - - return qp; -} - -static int up_set_active(__isl_keep struct isl_upoly *up, int *active, int d) -{ - struct isl_upoly_rec *rec; - int i; - - if (!up) - return -1; - - if (isl_upoly_is_cst(up)) - return 0; - - if (up->var < d) - active[up->var] = 1; - - rec = isl_upoly_as_rec(up); - for (i = 0; i < rec->n; ++i) - if (up_set_active(rec->p[i], active, d) < 0) - return -1; - - return 0; -} - -static int set_active(__isl_keep isl_qpolynomial *qp, int *active) -{ - int i, j; - int d = isl_space_dim(qp->dim, isl_dim_all); - - if (!qp || !active) - return -1; - - for (i = 0; i < d; ++i) - for (j = 0; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + i])) - continue; - active[i] = 1; - break; - } - - return up_set_active(qp->upoly, active, d); -} - -int isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - int *active = NULL; - int involves = 0; - - if (!qp) - return -1; - if (n == 0) - return 0; - - isl_assert(qp->dim->ctx, - first + n <= isl_qpolynomial_dim(qp, type), return -1); - isl_assert(qp->dim->ctx, type == isl_dim_param || - type == isl_dim_in, return -1); - - active = isl_calloc_array(qp->dim->ctx, int, - isl_space_dim(qp->dim, isl_dim_all)); - if (set_active(qp, active) < 0) - goto error; - - if (type == isl_dim_in) - first += isl_space_dim(qp->dim, isl_dim_param); - for (i = 0; i < n; ++i) - if (active[first + i]) { - involves = 1; - break; - } - - free(active); - - return involves; -error: - free(active); - return -1; -} - -/* Remove divs that do not appear in the quasi-polynomial, nor in any - * of the divs that do appear in the quasi-polynomial. - */ -static __isl_give isl_qpolynomial *remove_redundant_divs( - __isl_take isl_qpolynomial *qp) -{ - int i, j; - int d; - int len; - int skip; - int *active = NULL; - int *reordering = NULL; - int redundant = 0; - int n_div; - isl_ctx *ctx; - - if (!qp) - return NULL; - if (qp->div->n_row == 0) - return qp; - - d = isl_space_dim(qp->dim, isl_dim_all); - len = qp->div->n_col - 2; - ctx = isl_qpolynomial_get_ctx(qp); - active = isl_calloc_array(ctx, int, len); - if (!active) - goto error; - - if (up_set_active(qp->upoly, active, len) < 0) - goto error; - - for (i = qp->div->n_row - 1; i >= 0; --i) { - if (!active[d + i]) { - redundant = 1; - continue; - } - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(qp->div->row[i][2 + d + j])) - continue; - active[d + j] = 1; - break; - } - } - - if (!redundant) { - free(active); - return qp; - } - - reordering = isl_alloc_array(qp->div->ctx, int, len); - if (!reordering) - goto error; - - for (i = 0; i < d; ++i) - reordering[i] = i; - - skip = 0; - n_div = qp->div->n_row; - for (i = 0; i < n_div; ++i) { - if (!active[d + i]) { - qp->div = isl_mat_drop_rows(qp->div, i - skip, 1); - qp->div = isl_mat_drop_cols(qp->div, - 2 + d + i - skip, 1); - skip++; - } - reordering[d + i] = d + i - skip; - } - - qp->upoly = reorder(qp->upoly, reordering); - - if (!qp->upoly || !qp->div) - goto error; - - free(active); - free(reordering); - - return qp; -error: - free(active); - free(reordering); - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_drop(__isl_take struct isl_upoly *up, - unsigned first, unsigned n) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - if (n == 0 || up->var < 0 || up->var < first) - return up; - if (up->var < first + n) { - up = replace_by_constant_term(up); - return isl_upoly_drop(up, first, n); - } - up = isl_upoly_cow(up); - if (!up) - return NULL; - up->var -= n; - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - rec->p[i] = isl_upoly_drop(rec->p[i], first, n); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned pos, const char *s) -{ - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - qp->dim = isl_space_set_dim_name(qp->dim, type, pos, s); - if (!qp->dim) - goto error; - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_drop_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n) -{ - if (!qp) - return NULL; - if (type == isl_dim_out) - isl_die(qp->dim->ctx, isl_error_invalid, - "cannot drop output/set dimension", - goto error); - if (type == isl_dim_in) - type = isl_dim_set; - if (n == 0 && !isl_space_is_named_or_nested(qp->dim, type)) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - isl_assert(qp->dim->ctx, first + n <= isl_space_dim(qp->dim, type), - goto error); - isl_assert(qp->dim->ctx, type == isl_dim_param || - type == isl_dim_set, goto error); - - qp->dim = isl_space_drop_dims(qp->dim, type, first, n); - if (!qp->dim) - goto error; - - if (type == isl_dim_set) - first += isl_space_dim(qp->dim, isl_dim_param); - - qp->div = isl_mat_drop_cols(qp->div, 2 + first, n); - if (!qp->div) - goto error; - - qp->upoly = isl_upoly_drop(qp->upoly, first, n); - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -/* Project the domain of the quasi-polynomial onto its parameter space. - * The quasi-polynomial may not involve any of the domain dimensions. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_project_domain_on_params( - __isl_take isl_qpolynomial *qp) -{ - isl_space *space; - unsigned n; - int involves; - - n = isl_qpolynomial_dim(qp, isl_dim_in); - involves = isl_qpolynomial_involves_dims(qp, isl_dim_in, 0, n); - if (involves < 0) - return isl_qpolynomial_free(qp); - if (involves) - isl_die(isl_qpolynomial_get_ctx(qp), isl_error_invalid, - "polynomial involves some of the domain dimensions", - return isl_qpolynomial_free(qp)); - qp = isl_qpolynomial_drop_dims(qp, isl_dim_in, 0, n); - space = isl_qpolynomial_get_domain_space(qp); - space = isl_space_params(space); - qp = isl_qpolynomial_reset_domain_space(qp, space); - return qp; -} - -static __isl_give isl_qpolynomial *isl_qpolynomial_substitute_equalities_lifted( - __isl_take isl_qpolynomial *qp, __isl_take isl_basic_set *eq) -{ - int i, j, k; - isl_int denom; - unsigned total; - unsigned n_div; - struct isl_upoly *up; - - if (!eq) - goto error; - if (eq->n_eq == 0) { - isl_basic_set_free(eq); - return qp; - } - - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - qp->div = isl_mat_cow(qp->div); - if (!qp->div) - goto error; - - total = 1 + isl_space_dim(eq->dim, isl_dim_all); - n_div = eq->n_div; - isl_int_init(denom); - for (i = 0; i < eq->n_eq; ++i) { - j = isl_seq_last_non_zero(eq->eq[i], total + n_div); - if (j < 0 || j == 0 || j >= total) - continue; - - for (k = 0; k < qp->div->n_row; ++k) { - if (isl_int_is_zero(qp->div->row[k][1 + j])) - continue; - isl_seq_elim(qp->div->row[k] + 1, eq->eq[i], j, total, - &qp->div->row[k][0]); - normalize_div(qp, k); - } - - if (isl_int_is_pos(eq->eq[i][j])) - isl_seq_neg(eq->eq[i], eq->eq[i], total); - isl_int_abs(denom, eq->eq[i][j]); - isl_int_set_si(eq->eq[i][j], 0); - - up = isl_upoly_from_affine(qp->dim->ctx, - eq->eq[i], denom, total); - qp->upoly = isl_upoly_subs(qp->upoly, j - 1, 1, &up); - isl_upoly_free(up); - } - isl_int_clear(denom); - - if (!qp->upoly) - goto error; - - isl_basic_set_free(eq); - - qp = substitute_non_divs(qp); - qp = sort_divs(qp); - - return qp; -error: - isl_basic_set_free(eq); - isl_qpolynomial_free(qp); - return NULL; -} - -/* Exploit the equalities in "eq" to simplify the quasi-polynomial. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_substitute_equalities( - __isl_take isl_qpolynomial *qp, __isl_take isl_basic_set *eq) -{ - if (!qp || !eq) - goto error; - if (qp->div->n_row > 0) - eq = isl_basic_set_add(eq, isl_dim_set, qp->div->n_row); - return isl_qpolynomial_substitute_equalities_lifted(qp, eq); -error: - isl_basic_set_free(eq); - isl_qpolynomial_free(qp); - return NULL; -} - -static __isl_give isl_basic_set *add_div_constraints( - __isl_take isl_basic_set *bset, __isl_take isl_mat *div) -{ - int i; - unsigned total; - - if (!bset || !div) - goto error; - - bset = isl_basic_set_extend_constraints(bset, 0, 2 * div->n_row); - if (!bset) - goto error; - total = isl_basic_set_total_dim(bset); - for (i = 0; i < div->n_row; ++i) - if (isl_basic_set_add_div_constraints_var(bset, - total - div->n_row + i, div->row[i]) < 0) - goto error; - - isl_mat_free(div); - return bset; -error: - isl_mat_free(div); - isl_basic_set_free(bset); - return NULL; -} - -/* Look for equalities among the variables shared by context and qp - * and the integer divisions of qp, if any. - * The equalities are then used to eliminate variables and/or integer - * divisions from qp. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_gist( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *context) -{ - isl_basic_set *aff; - - if (!qp) - goto error; - if (qp->div->n_row > 0) { - isl_basic_set *bset; - context = isl_set_add_dims(context, isl_dim_set, - qp->div->n_row); - bset = isl_basic_set_universe(isl_set_get_space(context)); - bset = add_div_constraints(bset, isl_mat_copy(qp->div)); - context = isl_set_intersect(context, - isl_set_from_basic_set(bset)); - } - - aff = isl_set_affine_hull(context); - return isl_qpolynomial_substitute_equalities_lifted(qp, aff); -error: - isl_qpolynomial_free(qp); - isl_set_free(context); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_gist_params( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *context) -{ - isl_space *space = isl_qpolynomial_get_domain_space(qp); - isl_set *dom_context = isl_set_universe(space); - dom_context = isl_set_intersect_params(dom_context, context); - return isl_qpolynomial_gist(qp, dom_context); -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial( - __isl_take isl_qpolynomial *qp) -{ - isl_set *dom; - - if (!qp) - return NULL; - if (isl_qpolynomial_is_zero(qp)) { - isl_space *dim = isl_qpolynomial_get_space(qp); - isl_qpolynomial_free(qp); - return isl_pw_qpolynomial_zero(dim); - } - - dom = isl_set_universe(isl_qpolynomial_get_domain_space(qp)); - return isl_pw_qpolynomial_alloc(dom, qp); -} - -#undef PW -#define PW isl_pw_qpolynomial -#undef EL -#define EL isl_qpolynomial -#undef EL_IS_ZERO -#define EL_IS_ZERO is_zero -#undef ZERO -#define ZERO zero -#undef IS_ZERO -#define IS_ZERO is_zero -#undef FIELD -#define FIELD qp -#undef DEFAULT_IS_ZERO -#define DEFAULT_IS_ZERO 1 - -#include - -#undef UNION -#define UNION isl_union_pw_qpolynomial -#undef PART -#define PART isl_pw_qpolynomial -#undef PARTS -#define PARTS pw_qpolynomial -#define ALIGN_DOMAIN - -#include - -int isl_pw_qpolynomial_is_one(__isl_keep isl_pw_qpolynomial *pwqp) -{ - if (!pwqp) - return -1; - - if (pwqp->n != -1) - return 0; - - if (!isl_set_plain_is_universe(pwqp->p[0].set)) - return 0; - - return isl_qpolynomial_is_one(pwqp->p[0].qp); -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2) -{ - return isl_pw_qpolynomial_union_add_(pwqp1, pwqp2); -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( - __isl_take isl_pw_qpolynomial *pwqp1, - __isl_take isl_pw_qpolynomial *pwqp2) -{ - int i, j, n; - struct isl_pw_qpolynomial *res; - - if (!pwqp1 || !pwqp2) - goto error; - - isl_assert(pwqp1->dim->ctx, isl_space_is_equal(pwqp1->dim, pwqp2->dim), - goto error); - - if (isl_pw_qpolynomial_is_zero(pwqp1)) { - isl_pw_qpolynomial_free(pwqp2); - return pwqp1; - } - - if (isl_pw_qpolynomial_is_zero(pwqp2)) { - isl_pw_qpolynomial_free(pwqp1); - return pwqp2; - } - - if (isl_pw_qpolynomial_is_one(pwqp1)) { - isl_pw_qpolynomial_free(pwqp1); - return pwqp2; - } - - if (isl_pw_qpolynomial_is_one(pwqp2)) { - isl_pw_qpolynomial_free(pwqp2); - return pwqp1; - } - - n = pwqp1->n * pwqp2->n; - res = isl_pw_qpolynomial_alloc_size(isl_space_copy(pwqp1->dim), n); - - for (i = 0; i < pwqp1->n; ++i) { - for (j = 0; j < pwqp2->n; ++j) { - struct isl_set *common; - struct isl_qpolynomial *prod; - common = isl_set_intersect(isl_set_copy(pwqp1->p[i].set), - isl_set_copy(pwqp2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - prod = isl_qpolynomial_mul( - isl_qpolynomial_copy(pwqp1->p[i].qp), - isl_qpolynomial_copy(pwqp2->p[j].qp)); - - res = isl_pw_qpolynomial_add_piece(res, common, prod); - } - } - - isl_pw_qpolynomial_free(pwqp1); - isl_pw_qpolynomial_free(pwqp2); - - return res; -error: - isl_pw_qpolynomial_free(pwqp1); - isl_pw_qpolynomial_free(pwqp2); - return NULL; -} - -__isl_give struct isl_upoly *isl_upoly_eval( - __isl_take struct isl_upoly *up, __isl_take isl_vec *vec) -{ - int i; - struct isl_upoly_rec *rec; - struct isl_upoly *res; - struct isl_upoly *base; - - if (isl_upoly_is_cst(up)) { - isl_vec_free(vec); - return up; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - isl_assert(up->ctx, rec->n >= 1, goto error); - - base = isl_upoly_rat_cst(up->ctx, vec->el[1 + up->var], vec->el[0]); - - res = isl_upoly_eval(isl_upoly_copy(rec->p[rec->n - 1]), - isl_vec_copy(vec)); - - for (i = rec->n - 2; i >= 0; --i) { - res = isl_upoly_mul(res, isl_upoly_copy(base)); - res = isl_upoly_sum(res, - isl_upoly_eval(isl_upoly_copy(rec->p[i]), - isl_vec_copy(vec))); - } - - isl_upoly_free(base); - isl_upoly_free(up); - isl_vec_free(vec); - return res; -error: - isl_upoly_free(up); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_eval( - __isl_take isl_qpolynomial *qp, __isl_take isl_point *pnt) -{ - isl_vec *ext; - struct isl_upoly *up; - isl_space *dim; - - if (!qp || !pnt) - goto error; - isl_assert(pnt->dim->ctx, isl_space_is_equal(pnt->dim, qp->dim), goto error); - - if (qp->div->n_row == 0) - ext = isl_vec_copy(pnt->vec); - else { - int i; - unsigned dim = isl_space_dim(qp->dim, isl_dim_all); - ext = isl_vec_alloc(qp->dim->ctx, 1 + dim + qp->div->n_row); - if (!ext) - goto error; - - isl_seq_cpy(ext->el, pnt->vec->el, pnt->vec->size); - for (i = 0; i < qp->div->n_row; ++i) { - isl_seq_inner_product(qp->div->row[i] + 1, ext->el, - 1 + dim + i, &ext->el[1+dim+i]); - isl_int_fdiv_q(ext->el[1+dim+i], ext->el[1+dim+i], - qp->div->row[i][0]); - } - } - - up = isl_upoly_eval(isl_upoly_copy(qp->upoly), ext); - if (!up) - goto error; - - dim = isl_space_copy(qp->dim); - isl_qpolynomial_free(qp); - isl_point_free(pnt); - - return isl_qpolynomial_alloc(dim, 0, up); -error: - isl_qpolynomial_free(qp); - isl_point_free(pnt); - return NULL; -} - -int isl_upoly_cmp(__isl_keep struct isl_upoly_cst *cst1, - __isl_keep struct isl_upoly_cst *cst2) -{ - int cmp; - isl_int t; - isl_int_init(t); - isl_int_mul(t, cst1->n, cst2->d); - isl_int_submul(t, cst2->n, cst1->d); - cmp = isl_int_sgn(t); - isl_int_clear(t); - return cmp; -} - -int isl_qpolynomial_le_cst(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2) -{ - struct isl_upoly_cst *cst1, *cst2; - - if (!qp1 || !qp2) - return -1; - isl_assert(qp1->dim->ctx, isl_upoly_is_cst(qp1->upoly), return -1); - isl_assert(qp2->dim->ctx, isl_upoly_is_cst(qp2->upoly), return -1); - if (isl_qpolynomial_is_nan(qp1)) - return -1; - if (isl_qpolynomial_is_nan(qp2)) - return -1; - cst1 = isl_upoly_as_cst(qp1->upoly); - cst2 = isl_upoly_as_cst(qp2->upoly); - - return isl_upoly_cmp(cst1, cst2) <= 0; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_min_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) -{ - struct isl_upoly_cst *cst1, *cst2; - int cmp; - - if (!qp1 || !qp2) - goto error; - isl_assert(qp1->dim->ctx, isl_upoly_is_cst(qp1->upoly), goto error); - isl_assert(qp2->dim->ctx, isl_upoly_is_cst(qp2->upoly), goto error); - cst1 = isl_upoly_as_cst(qp1->upoly); - cst2 = isl_upoly_as_cst(qp2->upoly); - cmp = isl_upoly_cmp(cst1, cst2); - - if (cmp <= 0) { - isl_qpolynomial_free(qp2); - } else { - isl_qpolynomial_free(qp1); - qp1 = qp2; - } - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_max_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) -{ - struct isl_upoly_cst *cst1, *cst2; - int cmp; - - if (!qp1 || !qp2) - goto error; - isl_assert(qp1->dim->ctx, isl_upoly_is_cst(qp1->upoly), goto error); - isl_assert(qp2->dim->ctx, isl_upoly_is_cst(qp2->upoly), goto error); - cst1 = isl_upoly_as_cst(qp1->upoly); - cst2 = isl_upoly_as_cst(qp2->upoly); - cmp = isl_upoly_cmp(cst1, cst2); - - if (cmp >= 0) { - isl_qpolynomial_free(qp2); - } else { - isl_qpolynomial_free(qp1); - qp1 = qp2; - } - return qp1; -error: - isl_qpolynomial_free(qp1); - isl_qpolynomial_free(qp2); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_insert_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, - unsigned first, unsigned n) -{ - unsigned total; - unsigned g_pos; - int *exp; - - if (!qp) - return NULL; - if (type == isl_dim_out) - isl_die(qp->div->ctx, isl_error_invalid, - "cannot insert output/set dimensions", - goto error); - if (type == isl_dim_in) - type = isl_dim_set; - if (n == 0 && !isl_space_is_named_or_nested(qp->dim, type)) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - isl_assert(qp->div->ctx, first <= isl_space_dim(qp->dim, type), - goto error); - - g_pos = pos(qp->dim, type) + first; - - qp->div = isl_mat_insert_zero_cols(qp->div, 2 + g_pos, n); - if (!qp->div) - goto error; - - total = qp->div->n_col - 2; - if (total > g_pos) { - int i; - exp = isl_alloc_array(qp->div->ctx, int, total - g_pos); - if (!exp) - goto error; - for (i = 0; i < total - g_pos; ++i) - exp[i] = i + n; - qp->upoly = expand(qp->upoly, exp, g_pos); - free(exp); - if (!qp->upoly) - goto error; - } - - qp->dim = isl_space_insert_dims(qp->dim, type, first, n); - if (!qp->dim) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_add_dims( - __isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_qpolynomial_dim(qp, type); - - return isl_qpolynomial_insert_dims(qp, type, pos, n); -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_dims( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned n) -{ - unsigned pos; - - pos = isl_pw_qpolynomial_dim(pwqp, type); - - return isl_pw_qpolynomial_insert_dims(pwqp, type, pos, n); -} - -static int *reordering_move(isl_ctx *ctx, - unsigned len, unsigned dst, unsigned src, unsigned n) -{ - int i; - int *reordering; - - reordering = isl_alloc_array(ctx, int, len); - if (!reordering) - return NULL; - - if (dst <= src) { - for (i = 0; i < dst; ++i) - reordering[i] = i; - for (i = 0; i < n; ++i) - reordering[src + i] = dst + i; - for (i = 0; i < src - dst; ++i) - reordering[dst + i] = dst + n + i; - for (i = 0; i < len - src - n; ++i) - reordering[src + n + i] = src + n + i; - } else { - for (i = 0; i < src; ++i) - reordering[i] = i; - for (i = 0; i < n; ++i) - reordering[src + i] = dst + i; - for (i = 0; i < dst - src; ++i) - reordering[src + n + i] = src + i; - for (i = 0; i < len - dst - n; ++i) - reordering[dst + n + i] = dst + n + i; - } - - return reordering; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_move_dims( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - unsigned g_dst_pos; - unsigned g_src_pos; - int *reordering; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - if (dst_type == isl_dim_out || src_type == isl_dim_out) - isl_die(qp->dim->ctx, isl_error_invalid, - "cannot move output/set dimension", - goto error); - if (dst_type == isl_dim_in) - dst_type = isl_dim_set; - if (src_type == isl_dim_in) - src_type = isl_dim_set; - - isl_assert(qp->dim->ctx, src_pos + n <= isl_space_dim(qp->dim, src_type), - goto error); - - g_dst_pos = pos(qp->dim, dst_type) + dst_pos; - g_src_pos = pos(qp->dim, src_type) + src_pos; - if (dst_type > src_type) - g_dst_pos -= n; - - qp->div = isl_mat_move_cols(qp->div, 2 + g_dst_pos, 2 + g_src_pos, n); - if (!qp->div) - goto error; - qp = sort_divs(qp); - if (!qp) - goto error; - - reordering = reordering_move(qp->dim->ctx, - qp->div->n_col - 2, g_dst_pos, g_src_pos, n); - if (!reordering) - goto error; - - qp->upoly = reorder(qp->upoly, reordering); - free(reordering); - if (!qp->upoly) - goto error; - - qp->dim = isl_space_move_dims(qp->dim, dst_type, dst_pos, src_type, src_pos, n); - if (!qp->dim) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_affine(__isl_take isl_space *dim, - isl_int *f, isl_int denom) -{ - struct isl_upoly *up; - - dim = isl_space_domain(dim); - if (!dim) - return NULL; - - up = isl_upoly_from_affine(dim->ctx, f, denom, - 1 + isl_space_dim(dim, isl_dim_all)); - - return isl_qpolynomial_alloc(dim, 0, up); -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_aff(__isl_take isl_aff *aff) -{ - isl_ctx *ctx; - struct isl_upoly *up; - isl_qpolynomial *qp; - - if (!aff) - return NULL; - - ctx = isl_aff_get_ctx(aff); - up = isl_upoly_from_affine(ctx, aff->v->el + 1, aff->v->el[0], - aff->v->size - 1); - - qp = isl_qpolynomial_alloc(isl_aff_get_domain_space(aff), - aff->ls->div->n_row, up); - if (!qp) - goto error; - - isl_mat_free(qp->div); - qp->div = isl_mat_copy(aff->ls->div); - qp->div = isl_mat_cow(qp->div); - if (!qp->div) - goto error; - - isl_aff_free(aff); - qp = reduce_divs(qp); - qp = remove_redundant_divs(qp); - return qp; -error: - isl_aff_free(aff); - return NULL; -} - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_pw_aff( - __isl_take isl_pw_aff *pwaff) -{ - int i; - isl_pw_qpolynomial *pwqp; - - if (!pwaff) - return NULL; - - pwqp = isl_pw_qpolynomial_alloc_size(isl_pw_aff_get_space(pwaff), - pwaff->n); - - for (i = 0; i < pwaff->n; ++i) { - isl_set *dom; - isl_qpolynomial *qp; - - dom = isl_set_copy(pwaff->p[i].set); - qp = isl_qpolynomial_from_aff(isl_aff_copy(pwaff->p[i].aff)); - pwqp = isl_pw_qpolynomial_add_piece(pwqp, dom, qp); - } - - isl_pw_aff_free(pwaff); - return pwqp; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_constraint( - __isl_take isl_constraint *c, enum isl_dim_type type, unsigned pos) -{ - isl_aff *aff; - - aff = isl_constraint_get_bound(c, type, pos); - isl_constraint_free(c); - return isl_qpolynomial_from_aff(aff); -} - -/* For each 0 <= i < "n", replace variable "first" + i of type "type" - * in "qp" by subs[i]. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_substitute( - __isl_take isl_qpolynomial *qp, - enum isl_dim_type type, unsigned first, unsigned n, - __isl_keep isl_qpolynomial **subs) -{ - int i; - struct isl_upoly **ups; - - if (n == 0) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - if (type == isl_dim_out) - isl_die(qp->dim->ctx, isl_error_invalid, - "cannot substitute output/set dimension", - goto error); - if (type == isl_dim_in) - type = isl_dim_set; - - for (i = 0; i < n; ++i) - if (!subs[i]) - goto error; - - isl_assert(qp->dim->ctx, first + n <= isl_space_dim(qp->dim, type), - goto error); - - for (i = 0; i < n; ++i) - isl_assert(qp->dim->ctx, isl_space_is_equal(qp->dim, subs[i]->dim), - goto error); - - isl_assert(qp->dim->ctx, qp->div->n_row == 0, goto error); - for (i = 0; i < n; ++i) - isl_assert(qp->dim->ctx, subs[i]->div->n_row == 0, goto error); - - first += pos(qp->dim, type); - - ups = isl_alloc_array(qp->dim->ctx, struct isl_upoly *, n); - if (!ups) - goto error; - for (i = 0; i < n; ++i) - ups[i] = subs[i]->upoly; - - qp->upoly = isl_upoly_subs(qp->upoly, first, n, ups); - - free(ups); - - if (!qp->upoly) - goto error; - - return qp; -error: - isl_qpolynomial_free(qp); - return NULL; -} - -/* Extend "bset" with extra set dimensions for each integer division - * in "qp" and then call "fn" with the extended bset and the polynomial - * that results from replacing each of the integer divisions by the - * corresponding extra set dimension. - */ -int isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial *qp, - __isl_keep isl_basic_set *bset, - int (*fn)(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, void *user), void *user) -{ - isl_space *dim; - isl_mat *div; - isl_qpolynomial *poly; - - if (!qp || !bset) - goto error; - if (qp->div->n_row == 0) - return fn(isl_basic_set_copy(bset), isl_qpolynomial_copy(qp), - user); - - div = isl_mat_copy(qp->div); - dim = isl_space_copy(qp->dim); - dim = isl_space_add_dims(dim, isl_dim_set, qp->div->n_row); - poly = isl_qpolynomial_alloc(dim, 0, isl_upoly_copy(qp->upoly)); - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_add(bset, isl_dim_set, qp->div->n_row); - bset = add_div_constraints(bset, div); - - return fn(bset, poly, user); -error: - return -1; -} - -/* Return total degree in variables first (inclusive) up to last (exclusive). - */ -int isl_upoly_degree(__isl_keep struct isl_upoly *up, int first, int last) -{ - int deg = -1; - int i; - struct isl_upoly_rec *rec; - - if (!up) - return -2; - if (isl_upoly_is_zero(up)) - return -1; - if (isl_upoly_is_cst(up) || up->var < first) - return 0; - - rec = isl_upoly_as_rec(up); - if (!rec) - return -2; - - for (i = 0; i < rec->n; ++i) { - int d; - - if (isl_upoly_is_zero(rec->p[i])) - continue; - d = isl_upoly_degree(rec->p[i], first, last); - if (up->var < last) - d += i; - if (d > deg) - deg = d; - } - - return deg; -} - -/* Return total degree in set variables. - */ -int isl_qpolynomial_degree(__isl_keep isl_qpolynomial *poly) -{ - unsigned ovar; - unsigned nvar; - - if (!poly) - return -2; - - ovar = isl_space_offset(poly->dim, isl_dim_set); - nvar = isl_space_dim(poly->dim, isl_dim_set); - return isl_upoly_degree(poly->upoly, ovar, ovar + nvar); -} - -__isl_give struct isl_upoly *isl_upoly_coeff(__isl_keep struct isl_upoly *up, - unsigned pos, int deg) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - - if (isl_upoly_is_cst(up) || up->var < pos) { - if (deg == 0) - return isl_upoly_copy(up); - else - return isl_upoly_zero(up->ctx); - } - - rec = isl_upoly_as_rec(up); - if (!rec) - return NULL; - - if (up->var == pos) { - if (deg < rec->n) - return isl_upoly_copy(rec->p[deg]); - else - return isl_upoly_zero(up->ctx); - } - - up = isl_upoly_copy(up); - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - struct isl_upoly *t; - t = isl_upoly_coeff(rec->p[i], pos, deg); - if (!t) - goto error; - isl_upoly_free(rec->p[i]); - rec->p[i] = t; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -/* Return coefficient of power "deg" of variable "t_pos" of type "type". - */ -__isl_give isl_qpolynomial *isl_qpolynomial_coeff( - __isl_keep isl_qpolynomial *qp, - enum isl_dim_type type, unsigned t_pos, int deg) -{ - unsigned g_pos; - struct isl_upoly *up; - isl_qpolynomial *c; - - if (!qp) - return NULL; - - if (type == isl_dim_out) - isl_die(qp->div->ctx, isl_error_invalid, - "output/set dimension does not have a coefficient", - return NULL); - if (type == isl_dim_in) - type = isl_dim_set; - - isl_assert(qp->div->ctx, t_pos < isl_space_dim(qp->dim, type), - return NULL); - - g_pos = pos(qp->dim, type) + t_pos; - up = isl_upoly_coeff(qp->upoly, g_pos, deg); - - c = isl_qpolynomial_alloc(isl_space_copy(qp->dim), qp->div->n_row, up); - if (!c) - return NULL; - isl_mat_free(c->div); - c->div = isl_mat_copy(qp->div); - if (!c->div) - goto error; - return c; -error: - isl_qpolynomial_free(c); - return NULL; -} - -/* Homogenize the polynomial in the variables first (inclusive) up to - * last (exclusive) by inserting powers of variable first. - * Variable first is assumed not to appear in the input. - */ -__isl_give struct isl_upoly *isl_upoly_homogenize( - __isl_take struct isl_upoly *up, int deg, int target, - int first, int last) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up) - return NULL; - if (isl_upoly_is_zero(up)) - return up; - if (deg == target) - return up; - if (isl_upoly_is_cst(up) || up->var < first) { - struct isl_upoly *hom; - - hom = isl_upoly_var_pow(up->ctx, first, target - deg); - if (!hom) - goto error; - rec = isl_upoly_as_rec(hom); - rec->p[target - deg] = isl_upoly_mul(rec->p[target - deg], up); - - return hom; - } - - up = isl_upoly_cow(up); - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - if (isl_upoly_is_zero(rec->p[i])) - continue; - rec->p[i] = isl_upoly_homogenize(rec->p[i], - up->var < last ? deg + i : i, target, - first, last); - if (!rec->p[i]) - goto error; - } - - return up; -error: - isl_upoly_free(up); - return NULL; -} - -/* Homogenize the polynomial in the set variables by introducing - * powers of an extra set variable at position 0. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_homogenize( - __isl_take isl_qpolynomial *poly) -{ - unsigned ovar; - unsigned nvar; - int deg = isl_qpolynomial_degree(poly); - - if (deg < -1) - goto error; - - poly = isl_qpolynomial_insert_dims(poly, isl_dim_in, 0, 1); - poly = isl_qpolynomial_cow(poly); - if (!poly) - goto error; - - ovar = isl_space_offset(poly->dim, isl_dim_set); - nvar = isl_space_dim(poly->dim, isl_dim_set); - poly->upoly = isl_upoly_homogenize(poly->upoly, 0, deg, - ovar, ovar + nvar); - if (!poly->upoly) - goto error; - - return poly; -error: - isl_qpolynomial_free(poly); - return NULL; -} - -__isl_give isl_term *isl_term_alloc(__isl_take isl_space *dim, - __isl_take isl_mat *div) -{ - isl_term *term; - int n; - - if (!dim || !div) - goto error; - - n = isl_space_dim(dim, isl_dim_all) + div->n_row; - - term = isl_calloc(dim->ctx, struct isl_term, - sizeof(struct isl_term) + (n - 1) * sizeof(int)); - if (!term) - goto error; - - term->ref = 1; - term->dim = dim; - term->div = div; - isl_int_init(term->n); - isl_int_init(term->d); - - return term; -error: - isl_space_free(dim); - isl_mat_free(div); - return NULL; -} - -__isl_give isl_term *isl_term_copy(__isl_keep isl_term *term) -{ - if (!term) - return NULL; - - term->ref++; - return term; -} - -__isl_give isl_term *isl_term_dup(__isl_keep isl_term *term) -{ - int i; - isl_term *dup; - unsigned total; - - if (term) - return NULL; - - total = isl_space_dim(term->dim, isl_dim_all) + term->div->n_row; - - dup = isl_term_alloc(isl_space_copy(term->dim), isl_mat_copy(term->div)); - if (!dup) - return NULL; - - isl_int_set(dup->n, term->n); - isl_int_set(dup->d, term->d); - - for (i = 0; i < total; ++i) - dup->pow[i] = term->pow[i]; - - return dup; -} - -__isl_give isl_term *isl_term_cow(__isl_take isl_term *term) -{ - if (!term) - return NULL; - - if (term->ref == 1) - return term; - term->ref--; - return isl_term_dup(term); -} - -void isl_term_free(__isl_take isl_term *term) -{ - if (!term) - return; - - if (--term->ref > 0) - return; - - isl_space_free(term->dim); - isl_mat_free(term->div); - isl_int_clear(term->n); - isl_int_clear(term->d); - free(term); -} - -unsigned isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type) -{ - if (!term) - return 0; - - switch (type) { - case isl_dim_param: - case isl_dim_in: - case isl_dim_out: return isl_space_dim(term->dim, type); - case isl_dim_div: return term->div->n_row; - case isl_dim_all: return isl_space_dim(term->dim, isl_dim_all) + - term->div->n_row; - default: return 0; - } -} - -isl_ctx *isl_term_get_ctx(__isl_keep isl_term *term) -{ - return term ? term->dim->ctx : NULL; -} - -void isl_term_get_num(__isl_keep isl_term *term, isl_int *n) -{ - if (!term) - return; - isl_int_set(*n, term->n); -} - -void isl_term_get_den(__isl_keep isl_term *term, isl_int *d) -{ - if (!term) - return; - isl_int_set(*d, term->d); -} - -int isl_term_get_exp(__isl_keep isl_term *term, - enum isl_dim_type type, unsigned pos) -{ - if (!term) - return -1; - - isl_assert(term->dim->ctx, pos < isl_term_dim(term, type), return -1); - - if (type >= isl_dim_set) - pos += isl_space_dim(term->dim, isl_dim_param); - if (type >= isl_dim_div) - pos += isl_space_dim(term->dim, isl_dim_set); - - return term->pow[pos]; -} - -__isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos) -{ - isl_local_space *ls; - isl_aff *aff; - unsigned total; - - if (!term) - return NULL; - - isl_assert(term->dim->ctx, pos < isl_term_dim(term, isl_dim_div), - return NULL); - - total = term->div->n_col - term->div->n_row - 2; - /* No nested divs for now */ - isl_assert(term->dim->ctx, - isl_seq_first_non_zero(term->div->row[pos] + 2 + total, - term->div->n_row) == -1, - return NULL); - - ls = isl_local_space_alloc_div(isl_space_copy(term->dim), - isl_mat_copy(term->div)); - aff = isl_aff_alloc(ls); - if (!aff) - return NULL; - - isl_seq_cpy(aff->v->el, term->div->row[pos], aff->v->size); - - return aff; -} - -__isl_give isl_term *isl_upoly_foreach_term(__isl_keep struct isl_upoly *up, - int (*fn)(__isl_take isl_term *term, void *user), - __isl_take isl_term *term, void *user) -{ - int i; - struct isl_upoly_rec *rec; - - if (!up || !term) - goto error; - - if (isl_upoly_is_zero(up)) - return term; - - isl_assert(up->ctx, !isl_upoly_is_nan(up), goto error); - isl_assert(up->ctx, !isl_upoly_is_infty(up), goto error); - isl_assert(up->ctx, !isl_upoly_is_neginfty(up), goto error); - - if (isl_upoly_is_cst(up)) { - struct isl_upoly_cst *cst; - cst = isl_upoly_as_cst(up); - if (!cst) - goto error; - term = isl_term_cow(term); - if (!term) - goto error; - isl_int_set(term->n, cst->n); - isl_int_set(term->d, cst->d); - if (fn(isl_term_copy(term), user) < 0) - goto error; - return term; - } - - rec = isl_upoly_as_rec(up); - if (!rec) - goto error; - - for (i = 0; i < rec->n; ++i) { - term = isl_term_cow(term); - if (!term) - goto error; - term->pow[up->var] = i; - term = isl_upoly_foreach_term(rec->p[i], fn, term, user); - if (!term) - goto error; - } - term->pow[up->var] = 0; - - return term; -error: - isl_term_free(term); - return NULL; -} - -int isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial *qp, - int (*fn)(__isl_take isl_term *term, void *user), void *user) -{ - isl_term *term; - - if (!qp) - return -1; - - term = isl_term_alloc(isl_space_copy(qp->dim), isl_mat_copy(qp->div)); - if (!term) - return -1; - - term = isl_upoly_foreach_term(qp->upoly, fn, term, user); - - isl_term_free(term); - - return term ? 0 : -1; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_from_term(__isl_take isl_term *term) -{ - struct isl_upoly *up; - isl_qpolynomial *qp; - int i, n; - - if (!term) - return NULL; - - n = isl_space_dim(term->dim, isl_dim_all) + term->div->n_row; - - up = isl_upoly_rat_cst(term->dim->ctx, term->n, term->d); - for (i = 0; i < n; ++i) { - if (!term->pow[i]) - continue; - up = isl_upoly_mul(up, - isl_upoly_var_pow(term->dim->ctx, i, term->pow[i])); - } - - qp = isl_qpolynomial_alloc(isl_space_copy(term->dim), term->div->n_row, up); - if (!qp) - goto error; - isl_mat_free(qp->div); - qp->div = isl_mat_copy(term->div); - if (!qp->div) - goto error; - - isl_term_free(term); - return qp; -error: - isl_qpolynomial_free(qp); - isl_term_free(term); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_lift(__isl_take isl_qpolynomial *qp, - __isl_take isl_space *dim) -{ - int i; - int extra; - unsigned total; - - if (!qp || !dim) - goto error; - - if (isl_space_is_equal(qp->dim, dim)) { - isl_space_free(dim); - return qp; - } - - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - - extra = isl_space_dim(dim, isl_dim_set) - - isl_space_dim(qp->dim, isl_dim_set); - total = isl_space_dim(qp->dim, isl_dim_all); - if (qp->div->n_row) { - int *exp; - - exp = isl_alloc_array(qp->div->ctx, int, qp->div->n_row); - if (!exp) - goto error; - for (i = 0; i < qp->div->n_row; ++i) - exp[i] = extra + i; - qp->upoly = expand(qp->upoly, exp, total); - free(exp); - if (!qp->upoly) - goto error; - } - qp->div = isl_mat_insert_cols(qp->div, 2 + total, extra); - if (!qp->div) - goto error; - for (i = 0; i < qp->div->n_row; ++i) - isl_seq_clr(qp->div->row[i] + 2 + total, extra); - - isl_space_free(qp->dim); - qp->dim = dim; - - return qp; -error: - isl_space_free(dim); - isl_qpolynomial_free(qp); - return NULL; -} - -/* For each parameter or variable that does not appear in qp, - * first eliminate the variable from all constraints and then set it to zero. - */ -static __isl_give isl_set *fix_inactive(__isl_take isl_set *set, - __isl_keep isl_qpolynomial *qp) -{ - int *active = NULL; - int i; - int d; - unsigned nparam; - unsigned nvar; - - if (!set || !qp) - goto error; - - d = isl_space_dim(set->dim, isl_dim_all); - active = isl_calloc_array(set->ctx, int, d); - if (set_active(qp, active) < 0) - goto error; - - for (i = 0; i < d; ++i) - if (!active[i]) - break; - - if (i == d) { - free(active); - return set; - } - - nparam = isl_space_dim(set->dim, isl_dim_param); - nvar = isl_space_dim(set->dim, isl_dim_set); - for (i = 0; i < nparam; ++i) { - if (active[i]) - continue; - set = isl_set_eliminate(set, isl_dim_param, i, 1); - set = isl_set_fix_si(set, isl_dim_param, i, 0); - } - for (i = 0; i < nvar; ++i) { - if (active[nparam + i]) - continue; - set = isl_set_eliminate(set, isl_dim_set, i, 1); - set = isl_set_fix_si(set, isl_dim_set, i, 0); - } - - free(active); - - return set; -error: - free(active); - isl_set_free(set); - return NULL; -} - -struct isl_opt_data { - isl_qpolynomial *qp; - int first; - isl_qpolynomial *opt; - int max; -}; - -static int opt_fn(__isl_take isl_point *pnt, void *user) -{ - struct isl_opt_data *data = (struct isl_opt_data *)user; - isl_qpolynomial *val; - - val = isl_qpolynomial_eval(isl_qpolynomial_copy(data->qp), pnt); - if (data->first) { - data->first = 0; - data->opt = val; - } else if (data->max) { - data->opt = isl_qpolynomial_max_cst(data->opt, val); - } else { - data->opt = isl_qpolynomial_min_cst(data->opt, val); - } - - return 0; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_opt_on_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *set, int max) -{ - struct isl_opt_data data = { NULL, 1, NULL, max }; - - if (!set || !qp) - goto error; - - if (isl_upoly_is_cst(qp->upoly)) { - isl_set_free(set); - return qp; - } - - set = fix_inactive(set, qp); - - data.qp = qp; - if (isl_set_foreach_point(set, opt_fn, &data) < 0) - goto error; - - if (data.first) { - isl_space *space = isl_qpolynomial_get_domain_space(qp); - data.opt = isl_qpolynomial_zero_on_domain(space); - } - - isl_set_free(set); - isl_qpolynomial_free(qp); - return data.opt; -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - isl_qpolynomial_free(data.opt); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_morph_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_morph *morph) -{ - int i; - int n_sub; - isl_ctx *ctx; - struct isl_upoly **subs; - isl_mat *mat, *diag; - - qp = isl_qpolynomial_cow(qp); - if (!qp || !morph) - goto error; - - ctx = qp->dim->ctx; - isl_assert(ctx, isl_space_is_equal(qp->dim, morph->dom->dim), goto error); - - n_sub = morph->inv->n_row - 1; - if (morph->inv->n_row != morph->inv->n_col) - n_sub += qp->div->n_row; - subs = isl_calloc_array(ctx, struct isl_upoly *, n_sub); - if (!subs) - goto error; - - for (i = 0; 1 + i < morph->inv->n_row; ++i) - subs[i] = isl_upoly_from_affine(ctx, morph->inv->row[1 + i], - morph->inv->row[0][0], morph->inv->n_col); - if (morph->inv->n_row != morph->inv->n_col) - for (i = 0; i < qp->div->n_row; ++i) - subs[morph->inv->n_row - 1 + i] = - isl_upoly_var_pow(ctx, morph->inv->n_col - 1 + i, 1); - - qp->upoly = isl_upoly_subs(qp->upoly, 0, n_sub, subs); - - for (i = 0; i < n_sub; ++i) - isl_upoly_free(subs[i]); - free(subs); - - diag = isl_mat_diag(ctx, 1, morph->inv->row[0][0]); - mat = isl_mat_diagonal(diag, isl_mat_copy(morph->inv)); - diag = isl_mat_diag(ctx, qp->div->n_row, morph->inv->row[0][0]); - mat = isl_mat_diagonal(mat, diag); - qp->div = isl_mat_product(qp->div, mat); - isl_space_free(qp->dim); - qp->dim = isl_space_copy(morph->ran->dim); - - if (!qp->upoly || !qp->div || !qp->dim) - goto error; - - isl_morph_free(morph); - - return qp; -error: - isl_qpolynomial_free(qp); - isl_morph_free(morph); - return NULL; -} - -static int neg_entry(void **entry, void *user) -{ - isl_pw_qpolynomial **pwqp = (isl_pw_qpolynomial **)entry; - - *pwqp = isl_pw_qpolynomial_neg(*pwqp); - - return *pwqp ? 0 : -1; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_neg( - __isl_take isl_union_pw_qpolynomial *upwqp) -{ - upwqp = isl_union_pw_qpolynomial_cow(upwqp); - if (!upwqp) - return NULL; - - if (isl_hash_table_foreach(upwqp->dim->ctx, &upwqp->table, - &neg_entry, NULL) < 0) - goto error; - - return upwqp; -error: - isl_union_pw_qpolynomial_free(upwqp); - return NULL; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2) -{ - return isl_union_pw_qpolynomial_add(upwqp1, - isl_union_pw_qpolynomial_neg(upwqp2)); -} - -static int mul_entry(void **entry, void *user) -{ - struct isl_union_pw_qpolynomial_match_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_pw_qpolynomial *pwpq = *entry; - int empty; - - hash = isl_space_get_hash(pwpq->dim); - entry2 = isl_hash_table_find(data->u2->dim->ctx, &data->u2->table, - hash, &has_dim, pwpq->dim, 0); - if (!entry2) - return 0; - - pwpq = isl_pw_qpolynomial_copy(pwpq); - pwpq = isl_pw_qpolynomial_mul(pwpq, - isl_pw_qpolynomial_copy(entry2->data)); - - empty = isl_pw_qpolynomial_is_zero(pwpq); - if (empty < 0) { - isl_pw_qpolynomial_free(pwpq); - return -1; - } - if (empty) { - isl_pw_qpolynomial_free(pwpq); - return 0; - } - - data->res = isl_union_pw_qpolynomial_add_pw_qpolynomial(data->res, pwpq); - - return 0; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2) -{ - return match_bin_op(upwqp1, upwqp2, &mul_entry); -} - -/* Reorder the columns of the given div definitions according to the - * given reordering. - */ -static __isl_give isl_mat *reorder_divs(__isl_take isl_mat *div, - __isl_take isl_reordering *r) -{ - int i, j; - isl_mat *mat; - int extra; - - if (!div || !r) - goto error; - - extra = isl_space_dim(r->dim, isl_dim_all) + div->n_row - r->len; - mat = isl_mat_alloc(div->ctx, div->n_row, div->n_col + extra); - if (!mat) - goto error; - - for (i = 0; i < div->n_row; ++i) { - isl_seq_cpy(mat->row[i], div->row[i], 2); - isl_seq_clr(mat->row[i] + 2, mat->n_col - 2); - for (j = 0; j < r->len; ++j) - isl_int_set(mat->row[i][2 + r->pos[j]], - div->row[i][2 + j]); - } - - isl_reordering_free(r); - isl_mat_free(div); - return mat; -error: - isl_reordering_free(r); - isl_mat_free(div); - return NULL; -} - -/* Reorder the dimension of "qp" according to the given reordering. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_realign_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_reordering *r) -{ - qp = isl_qpolynomial_cow(qp); - if (!qp) - goto error; - - r = isl_reordering_extend(r, qp->div->n_row); - if (!r) - goto error; - - qp->div = reorder_divs(qp->div, isl_reordering_copy(r)); - if (!qp->div) - goto error; - - qp->upoly = reorder(qp->upoly, r->pos); - if (!qp->upoly) - goto error; - - qp = isl_qpolynomial_reset_domain_space(qp, isl_space_copy(r->dim)); - - isl_reordering_free(r); - return qp; -error: - isl_qpolynomial_free(qp); - isl_reordering_free(r); - return NULL; -} - -__isl_give isl_qpolynomial *isl_qpolynomial_align_params( - __isl_take isl_qpolynomial *qp, __isl_take isl_space *model) -{ - if (!qp || !model) - goto error; - - if (!isl_space_match(qp->dim, isl_dim_param, model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_space_drop_dims(model, isl_dim_in, - 0, isl_space_dim(model, isl_dim_in)); - model = isl_space_drop_dims(model, isl_dim_out, - 0, isl_space_dim(model, isl_dim_out)); - exp = isl_parameter_alignment_reordering(qp->dim, model); - exp = isl_reordering_extend_space(exp, - isl_qpolynomial_get_domain_space(qp)); - qp = isl_qpolynomial_realign_domain(qp, exp); - } - - isl_space_free(model); - return qp; -error: - isl_space_free(model); - isl_qpolynomial_free(qp); - return NULL; -} - -struct isl_split_periods_data { - int max_periods; - isl_pw_qpolynomial *res; -}; - -/* Create a slice where the integer division "div" has the fixed value "v". - * In particular, if "div" refers to floor(f/m), then create a slice - * - * m v <= f <= m v + (m - 1) - * - * or - * - * f - m v >= 0 - * -f + m v + (m - 1) >= 0 - */ -static __isl_give isl_set *set_div_slice(__isl_take isl_space *dim, - __isl_keep isl_qpolynomial *qp, int div, isl_int v) -{ - int total; - isl_basic_set *bset = NULL; - int k; - - if (!dim || !qp) - goto error; - - total = isl_space_dim(dim, isl_dim_all); - bset = isl_basic_set_alloc_space(isl_space_copy(dim), 0, 0, 2); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->ineq[k], qp->div->row[div] + 1, 1 + total); - isl_int_submul(bset->ineq[k][0], v, qp->div->row[div][0]); - - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_neg(bset->ineq[k], qp->div->row[div] + 1, 1 + total); - isl_int_addmul(bset->ineq[k][0], v, qp->div->row[div][0]); - isl_int_add(bset->ineq[k][0], bset->ineq[k][0], qp->div->row[div][0]); - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - - isl_space_free(dim); - return isl_set_from_basic_set(bset); -error: - isl_basic_set_free(bset); - isl_space_free(dim); - return NULL; -} - -static int split_periods(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, void *user); - -/* Create a slice of the domain "set" such that integer division "div" - * has the fixed value "v" and add the results to data->res, - * replacing the integer division by "v" in "qp". - */ -static int set_div(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, int div, isl_int v, - struct isl_split_periods_data *data) -{ - int i; - int total; - isl_set *slice; - struct isl_upoly *cst; - - slice = set_div_slice(isl_set_get_space(set), qp, div, v); - set = isl_set_intersect(set, slice); - - if (!qp) - goto error; - - total = isl_space_dim(qp->dim, isl_dim_all); - - for (i = div + 1; i < qp->div->n_row; ++i) { - if (isl_int_is_zero(qp->div->row[i][2 + total + div])) - continue; - isl_int_addmul(qp->div->row[i][1], - qp->div->row[i][2 + total + div], v); - isl_int_set_si(qp->div->row[i][2 + total + div], 0); - } - - cst = isl_upoly_rat_cst(qp->dim->ctx, v, qp->dim->ctx->one); - qp = substitute_div(qp, div, cst); - - return split_periods(set, qp, data); -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - return -1; -} - -/* Split the domain "set" such that integer division "div" - * has a fixed value (ranging from "min" to "max") on each slice - * and add the results to data->res. - */ -static int split_div(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, int div, isl_int min, isl_int max, - struct isl_split_periods_data *data) -{ - for (; isl_int_le(min, max); isl_int_add_ui(min, min, 1)) { - isl_set *set_i = isl_set_copy(set); - isl_qpolynomial *qp_i = isl_qpolynomial_copy(qp); - - if (set_div(set_i, qp_i, div, min, data) < 0) - goto error; - } - isl_set_free(set); - isl_qpolynomial_free(qp); - return 0; -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - return -1; -} - -/* If "qp" refers to any integer division - * that can only attain "max_periods" distinct values on "set" - * then split the domain along those distinct values. - * Add the results (or the original if no splitting occurs) - * to data->res. - */ -static int split_periods(__isl_take isl_set *set, - __isl_take isl_qpolynomial *qp, void *user) -{ - int i; - isl_pw_qpolynomial *pwqp; - struct isl_split_periods_data *data; - isl_int min, max; - int total; - int r = 0; - - data = (struct isl_split_periods_data *)user; - - if (!set || !qp) - goto error; - - if (qp->div->n_row == 0) { - pwqp = isl_pw_qpolynomial_alloc(set, qp); - data->res = isl_pw_qpolynomial_add_disjoint(data->res, pwqp); - return 0; - } - - isl_int_init(min); - isl_int_init(max); - total = isl_space_dim(qp->dim, isl_dim_all); - for (i = 0; i < qp->div->n_row; ++i) { - enum isl_lp_result lp_res; - - if (isl_seq_first_non_zero(qp->div->row[i] + 2 + total, - qp->div->n_row) != -1) - continue; - - lp_res = isl_set_solve_lp(set, 0, qp->div->row[i] + 1, - set->ctx->one, &min, NULL, NULL); - if (lp_res == isl_lp_error) - goto error2; - if (lp_res == isl_lp_unbounded || lp_res == isl_lp_empty) - continue; - isl_int_fdiv_q(min, min, qp->div->row[i][0]); - - lp_res = isl_set_solve_lp(set, 1, qp->div->row[i] + 1, - set->ctx->one, &max, NULL, NULL); - if (lp_res == isl_lp_error) - goto error2; - if (lp_res == isl_lp_unbounded || lp_res == isl_lp_empty) - continue; - isl_int_fdiv_q(max, max, qp->div->row[i][0]); - - isl_int_sub(max, max, min); - if (isl_int_cmp_si(max, data->max_periods) < 0) { - isl_int_add(max, max, min); - break; - } - } - - if (i < qp->div->n_row) { - r = split_div(set, qp, i, min, max, data); - } else { - pwqp = isl_pw_qpolynomial_alloc(set, qp); - data->res = isl_pw_qpolynomial_add_disjoint(data->res, pwqp); - } - - isl_int_clear(max); - isl_int_clear(min); - - return r; -error2: - isl_int_clear(max); - isl_int_clear(min); -error: - isl_set_free(set); - isl_qpolynomial_free(qp); - return -1; -} - -/* If any quasi-polynomial in pwqp refers to any integer division - * that can only attain "max_periods" distinct values on its domain - * then split the domain along those distinct values. - */ -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_periods( - __isl_take isl_pw_qpolynomial *pwqp, int max_periods) -{ - struct isl_split_periods_data data; - - data.max_periods = max_periods; - data.res = isl_pw_qpolynomial_zero(isl_pw_qpolynomial_get_space(pwqp)); - - if (isl_pw_qpolynomial_foreach_piece(pwqp, &split_periods, &data) < 0) - goto error; - - isl_pw_qpolynomial_free(pwqp); - - return data.res; -error: - isl_pw_qpolynomial_free(data.res); - isl_pw_qpolynomial_free(pwqp); - return NULL; -} - -/* Construct a piecewise quasipolynomial that is constant on the given - * domain. In particular, it is - * 0 if cst == 0 - * 1 if cst == 1 - * infinity if cst == -1 - */ -static __isl_give isl_pw_qpolynomial *constant_on_domain( - __isl_take isl_basic_set *bset, int cst) -{ - isl_space *dim; - isl_qpolynomial *qp; - - if (!bset) - return NULL; - - bset = isl_basic_set_params(bset); - dim = isl_basic_set_get_space(bset); - if (cst < 0) - qp = isl_qpolynomial_infty_on_domain(dim); - else if (cst == 0) - qp = isl_qpolynomial_zero_on_domain(dim); - else - qp = isl_qpolynomial_one_on_domain(dim); - return isl_pw_qpolynomial_alloc(isl_set_from_basic_set(bset), qp); -} - -/* Factor bset, call fn on each of the factors and return the product. - * - * If no factors can be found, simply call fn on the input. - * Otherwise, construct the factors based on the factorizer, - * call fn on each factor and compute the product. - */ -static __isl_give isl_pw_qpolynomial *compressed_multiplicative_call( - __isl_take isl_basic_set *bset, - __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)) -{ - int i, n; - isl_space *dim; - isl_set *set; - isl_factorizer *f; - isl_qpolynomial *qp; - isl_pw_qpolynomial *pwqp; - unsigned nparam; - unsigned nvar; - - f = isl_basic_set_factorizer(bset); - if (!f) - goto error; - if (f->n_group == 0) { - isl_factorizer_free(f); - return fn(bset); - } - - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - dim = isl_basic_set_get_space(bset); - dim = isl_space_domain(dim); - set = isl_set_universe(isl_space_copy(dim)); - qp = isl_qpolynomial_one_on_domain(dim); - pwqp = isl_pw_qpolynomial_alloc(set, qp); - - bset = isl_morph_basic_set(isl_morph_copy(f->morph), bset); - - for (i = 0, n = 0; i < f->n_group; ++i) { - isl_basic_set *bset_i; - isl_pw_qpolynomial *pwqp_i; - - bset_i = isl_basic_set_copy(bset); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam + n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam, n); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, - n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, 0, n); - - pwqp_i = fn(bset_i); - pwqp = isl_pw_qpolynomial_mul(pwqp, pwqp_i); - - n += f->len[i]; - } - - isl_basic_set_free(bset); - isl_factorizer_free(f); - - return pwqp; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Factor bset, call fn on each of the factors and return the product. - * The function is assumed to evaluate to zero on empty domains, - * to one on zero-dimensional domains and to infinity on unbounded domains - * and will not be called explicitly on zero-dimensional or unbounded domains. - * - * We first check for some special cases and remove all equalities. - * Then we hand over control to compressed_multiplicative_call. - */ -__isl_give isl_pw_qpolynomial *isl_basic_set_multiplicative_call( - __isl_take isl_basic_set *bset, - __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)) -{ - int bounded; - isl_morph *morph; - isl_pw_qpolynomial *pwqp; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return constant_on_domain(bset, 0); - - if (isl_basic_set_dim(bset, isl_dim_set) == 0) - return constant_on_domain(bset, 1); - - bounded = isl_basic_set_is_bounded(bset); - if (bounded < 0) - goto error; - if (!bounded) - return constant_on_domain(bset, -1); - - if (bset->n_eq == 0) - return compressed_multiplicative_call(bset, fn); - - morph = isl_basic_set_full_compression(bset); - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - - pwqp = compressed_multiplicative_call(bset, fn); - - morph = isl_morph_dom_params(morph); - morph = isl_morph_ran_params(morph); - morph = isl_morph_inverse(morph); - - pwqp = isl_pw_qpolynomial_morph_domain(pwqp, morph); - - return pwqp; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Drop all floors in "qp", turning each integer division [a/m] into - * a rational division a/m. If "down" is set, then the integer division - * is replaces by (a-(m-1))/m instead. - */ -static __isl_give isl_qpolynomial *qp_drop_floors( - __isl_take isl_qpolynomial *qp, int down) -{ - int i; - struct isl_upoly *s; - - if (!qp) - return NULL; - if (qp->div->n_row == 0) - return qp; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - - for (i = qp->div->n_row - 1; i >= 0; --i) { - if (down) { - isl_int_sub(qp->div->row[i][1], - qp->div->row[i][1], qp->div->row[i][0]); - isl_int_add_ui(qp->div->row[i][1], - qp->div->row[i][1], 1); - } - s = isl_upoly_from_affine(qp->dim->ctx, qp->div->row[i] + 1, - qp->div->row[i][0], qp->div->n_col - 1); - qp = substitute_div(qp, i, s); - if (!qp) - return NULL; - } - - return qp; -} - -/* Drop all floors in "pwqp", turning each integer division [a/m] into - * a rational division a/m. - */ -static __isl_give isl_pw_qpolynomial *pwqp_drop_floors( - __isl_take isl_pw_qpolynomial *pwqp) -{ - int i; - - if (!pwqp) - return NULL; - - if (isl_pw_qpolynomial_is_zero(pwqp)) - return pwqp; - - pwqp = isl_pw_qpolynomial_cow(pwqp); - if (!pwqp) - return NULL; - - for (i = 0; i < pwqp->n; ++i) { - pwqp->p[i].qp = qp_drop_floors(pwqp->p[i].qp, 0); - if (!pwqp->p[i].qp) - goto error; - } - - return pwqp; -error: - isl_pw_qpolynomial_free(pwqp); - return NULL; -} - -/* Adjust all the integer divisions in "qp" such that they are at least - * one over the given orthant (identified by "signs"). This ensures - * that they will still be non-negative even after subtracting (m-1)/m. - * - * In particular, f is replaced by f' + v, changing f = [a/m] - * to f' = [(a - m v)/m]. - * If the constant term k in a is smaller than m, - * the constant term of v is set to floor(k/m) - 1. - * For any other term, if the coefficient c and the variable x have - * the same sign, then no changes are needed. - * Otherwise, if the variable is positive (and c is negative), - * then the coefficient of x in v is set to floor(c/m). - * If the variable is negative (and c is positive), - * then the coefficient of x in v is set to ceil(c/m). - */ -static __isl_give isl_qpolynomial *make_divs_pos(__isl_take isl_qpolynomial *qp, - int *signs) -{ - int i, j; - int total; - isl_vec *v = NULL; - struct isl_upoly *s; - - qp = isl_qpolynomial_cow(qp); - if (!qp) - return NULL; - qp->div = isl_mat_cow(qp->div); - if (!qp->div) - goto error; - - total = isl_space_dim(qp->dim, isl_dim_all); - v = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1); - - for (i = 0; i < qp->div->n_row; ++i) { - isl_int *row = qp->div->row[i]; - v = isl_vec_clr(v); - if (!v) - goto error; - if (isl_int_lt(row[1], row[0])) { - isl_int_fdiv_q(v->el[0], row[1], row[0]); - isl_int_sub_ui(v->el[0], v->el[0], 1); - isl_int_submul(row[1], row[0], v->el[0]); - } - for (j = 0; j < total; ++j) { - if (isl_int_sgn(row[2 + j]) * signs[j] >= 0) - continue; - if (signs[j] < 0) - isl_int_cdiv_q(v->el[1 + j], row[2 + j], row[0]); - else - isl_int_fdiv_q(v->el[1 + j], row[2 + j], row[0]); - isl_int_submul(row[2 + j], row[0], v->el[1 + j]); - } - for (j = 0; j < i; ++j) { - if (isl_int_sgn(row[2 + total + j]) >= 0) - continue; - isl_int_fdiv_q(v->el[1 + total + j], - row[2 + total + j], row[0]); - isl_int_submul(row[2 + total + j], - row[0], v->el[1 + total + j]); - } - for (j = i + 1; j < qp->div->n_row; ++j) { - if (isl_int_is_zero(qp->div->row[j][2 + total + i])) - continue; - isl_seq_combine(qp->div->row[j] + 1, - qp->div->ctx->one, qp->div->row[j] + 1, - qp->div->row[j][2 + total + i], v->el, v->size); - } - isl_int_set_si(v->el[1 + total + i], 1); - s = isl_upoly_from_affine(qp->dim->ctx, v->el, - qp->div->ctx->one, v->size); - qp->upoly = isl_upoly_subs(qp->upoly, total + i, 1, &s); - isl_upoly_free(s); - if (!qp->upoly) - goto error; - } - - isl_vec_free(v); - return qp; -error: - isl_vec_free(v); - isl_qpolynomial_free(qp); - return NULL; -} - -struct isl_to_poly_data { - int sign; - isl_pw_qpolynomial *res; - isl_qpolynomial *qp; -}; - -/* Appoximate data->qp by a polynomial on the orthant identified by "signs". - * We first make all integer divisions positive and then split the - * quasipolynomials into terms with sign data->sign (the direction - * of the requested approximation) and terms with the opposite sign. - * In the first set of terms, each integer division [a/m] is - * overapproximated by a/m, while in the second it is underapproximated - * by (a-(m-1))/m. - */ -static int to_polynomial_on_orthant(__isl_take isl_set *orthant, int *signs, - void *user) -{ - struct isl_to_poly_data *data = user; - isl_pw_qpolynomial *t; - isl_qpolynomial *qp, *up, *down; - - qp = isl_qpolynomial_copy(data->qp); - qp = make_divs_pos(qp, signs); - - up = isl_qpolynomial_terms_of_sign(qp, signs, data->sign); - up = qp_drop_floors(up, 0); - down = isl_qpolynomial_terms_of_sign(qp, signs, -data->sign); - down = qp_drop_floors(down, 1); - - isl_qpolynomial_free(qp); - qp = isl_qpolynomial_add(up, down); - - t = isl_pw_qpolynomial_alloc(orthant, qp); - data->res = isl_pw_qpolynomial_add_disjoint(data->res, t); - - return 0; -} - -/* Approximate each quasipolynomial by a polynomial. If "sign" is positive, - * the polynomial will be an overapproximation. If "sign" is negative, - * it will be an underapproximation. If "sign" is zero, the approximation - * will lie somewhere in between. - * - * In particular, is sign == 0, we simply drop the floors, turning - * the integer divisions into rational divisions. - * Otherwise, we split the domains into orthants, make all integer divisions - * positive and then approximate each [a/m] by either a/m or (a-(m-1))/m, - * depending on the requested sign and the sign of the term in which - * the integer division appears. - */ -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( - __isl_take isl_pw_qpolynomial *pwqp, int sign) -{ - int i; - struct isl_to_poly_data data; - - if (sign == 0) - return pwqp_drop_floors(pwqp); - - if (!pwqp) - return NULL; - - data.sign = sign; - data.res = isl_pw_qpolynomial_zero(isl_pw_qpolynomial_get_space(pwqp)); - - for (i = 0; i < pwqp->n; ++i) { - if (pwqp->p[i].qp->div->n_row == 0) { - isl_pw_qpolynomial *t; - t = isl_pw_qpolynomial_alloc( - isl_set_copy(pwqp->p[i].set), - isl_qpolynomial_copy(pwqp->p[i].qp)); - data.res = isl_pw_qpolynomial_add_disjoint(data.res, t); - continue; - } - data.qp = pwqp->p[i].qp; - if (isl_set_foreach_orthant(pwqp->p[i].set, - &to_polynomial_on_orthant, &data) < 0) - goto error; - } - - isl_pw_qpolynomial_free(pwqp); - - return data.res; -error: - isl_pw_qpolynomial_free(pwqp); - isl_pw_qpolynomial_free(data.res); - return NULL; -} - -static int poly_entry(void **entry, void *user) -{ - int *sign = user; - isl_pw_qpolynomial **pwqp = (isl_pw_qpolynomial **)entry; - - *pwqp = isl_pw_qpolynomial_to_polynomial(*pwqp, *sign); - - return *pwqp ? 0 : -1; -} - -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial( - __isl_take isl_union_pw_qpolynomial *upwqp, int sign) -{ - upwqp = isl_union_pw_qpolynomial_cow(upwqp); - if (!upwqp) - return NULL; - - if (isl_hash_table_foreach(upwqp->dim->ctx, &upwqp->table, - &poly_entry, &sign) < 0) - goto error; - - return upwqp; -error: - isl_union_pw_qpolynomial_free(upwqp); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_from_qpolynomial( - __isl_take isl_qpolynomial *qp) -{ - int i, k; - isl_space *dim; - isl_vec *aff = NULL; - isl_basic_map *bmap = NULL; - unsigned pos; - unsigned n_div; - - if (!qp) - return NULL; - if (!isl_upoly_is_affine(qp->upoly)) - isl_die(qp->dim->ctx, isl_error_invalid, - "input quasi-polynomial not affine", goto error); - aff = isl_qpolynomial_extract_affine(qp); - if (!aff) - goto error; - dim = isl_qpolynomial_get_space(qp); - pos = 1 + isl_space_offset(dim, isl_dim_out); - n_div = qp->div->n_row; - bmap = isl_basic_map_alloc_space(dim, n_div, 1, 2 * n_div); - - for (i = 0; i < n_div; ++i) { - k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->div[k], qp->div->row[i], qp->div->n_col); - isl_int_set_si(bmap->div[k][qp->div->n_col], 0); - if (isl_basic_map_add_div_constraints(bmap, k) < 0) - goto error; - } - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_int_neg(bmap->eq[k][pos], aff->el[0]); - isl_seq_cpy(bmap->eq[k], aff->el + 1, pos); - isl_seq_cpy(bmap->eq[k] + pos + 1, aff->el + 1 + pos, n_div); - - isl_vec_free(aff); - isl_qpolynomial_free(qp); - bmap = isl_basic_map_finalize(bmap); - return bmap; -error: - isl_vec_free(aff); - isl_qpolynomial_free(qp); - isl_basic_map_free(bmap); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_polynomial_private.h b/cloog-0.17.0/isl/isl_polynomial_private.h deleted file mode 100644 index 737073106e393a3e83f873719473e564bf6ade0b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_polynomial_private.h +++ /dev/null @@ -1,233 +0,0 @@ -#include -#include -#include -#include -#include -#include - -struct isl_upoly { - int ref; - struct isl_ctx *ctx; - - int var; -}; - -struct isl_upoly_cst { - struct isl_upoly up; - isl_int n; - isl_int d; -}; - -struct isl_upoly_rec { - struct isl_upoly up; - int n; - - size_t size; - struct isl_upoly *p[]; -}; - -/* dim represents the domain space. - */ -struct isl_qpolynomial { - int ref; - - isl_space *dim; - struct isl_mat *div; - struct isl_upoly *upoly; -}; - -struct isl_term { - int ref; - - isl_int n; - isl_int d; - - isl_space *dim; - struct isl_mat *div; - - int pow[1]; -}; - -struct isl_pw_qpolynomial_piece { - struct isl_set *set; - struct isl_qpolynomial *qp; -}; - -struct isl_pw_qpolynomial { - int ref; - - isl_space *dim; - - int n; - - size_t size; - struct isl_pw_qpolynomial_piece p[1]; -}; - -/* dim represents the domain space. - */ -struct isl_qpolynomial_fold { - int ref; - - enum isl_fold type; - isl_space *dim; - - int n; - - size_t size; - struct isl_qpolynomial *qp[1]; -}; - -struct isl_pw_qpolynomial_fold_piece { - struct isl_set *set; - struct isl_qpolynomial_fold *fold; -}; - -struct isl_pw_qpolynomial_fold { - int ref; - - enum isl_fold type; - isl_space *dim; - - int n; - - size_t size; - struct isl_pw_qpolynomial_fold_piece p[1]; -}; - -__isl_give struct isl_upoly *isl_upoly_zero(struct isl_ctx *ctx); -__isl_give struct isl_upoly *isl_upoly_copy(__isl_keep struct isl_upoly *up); -__isl_give struct isl_upoly *isl_upoly_cow(__isl_take struct isl_upoly *up); -__isl_give struct isl_upoly *isl_upoly_dup(__isl_keep struct isl_upoly *up); -void isl_upoly_free(__isl_take struct isl_upoly *up); -__isl_give struct isl_upoly *isl_upoly_mul(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2); - -int isl_upoly_is_cst(__isl_keep struct isl_upoly *up); -int isl_upoly_is_zero(__isl_keep struct isl_upoly *up); -int isl_upoly_is_one(__isl_keep struct isl_upoly *up); -int isl_upoly_is_negone(__isl_keep struct isl_upoly *up); -__isl_keep struct isl_upoly_cst *isl_upoly_as_cst(__isl_keep struct isl_upoly *up); -__isl_keep struct isl_upoly_rec *isl_upoly_as_rec(__isl_keep struct isl_upoly *up); - -__isl_give struct isl_upoly *isl_upoly_sum(__isl_take struct isl_upoly *up1, - __isl_take struct isl_upoly *up2); -__isl_give struct isl_upoly *isl_upoly_mul_isl_int( - __isl_take struct isl_upoly *up, isl_int v); - -__isl_give isl_qpolynomial *isl_qpolynomial_alloc(__isl_take isl_space *dim, - unsigned n_div, __isl_take struct isl_upoly *up); -__isl_give isl_qpolynomial *isl_qpolynomial_cow(__isl_take isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_dup(__isl_keep isl_qpolynomial *qp); - -__isl_give isl_qpolynomial *isl_qpolynomial_cst_on_domain(__isl_take isl_space *dim, - isl_int v); -__isl_give isl_qpolynomial *isl_qpolynomial_var_pow_on_domain(__isl_take isl_space *dim, - int pos, int power); -int isl_qpolynomial_is_one(__isl_keep isl_qpolynomial *qp); -int isl_qpolynomial_is_affine(__isl_keep isl_qpolynomial *qp); - -__isl_give isl_qpolynomial *isl_qpolynomial_add_on_domain( - __isl_keep isl_set *dom, - __isl_take isl_qpolynomial *qp1, - __isl_take isl_qpolynomial *qp2); - -int isl_qpolynomial_le_cst(__isl_keep isl_qpolynomial *qp1, - __isl_keep isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_max_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2); -__isl_give isl_qpolynomial *isl_qpolynomial_min_cst( - __isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2); - -int isl_qpolynomial_degree(__isl_keep isl_qpolynomial *poly); -__isl_give isl_qpolynomial *isl_qpolynomial_coeff( - __isl_keep isl_qpolynomial *poly, - enum isl_dim_type type, unsigned pos, int deg); - -__isl_give isl_vec *isl_qpolynomial_extract_affine( - __isl_keep isl_qpolynomial *qp); -__isl_give isl_qpolynomial *isl_qpolynomial_from_affine(__isl_take isl_space *dim, - isl_int *f, isl_int denom); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_cow( - __isl_take isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_piece( - __isl_take isl_pw_qpolynomial *pwqp, - __isl_take isl_set *set, __isl_take isl_qpolynomial *qp); -int isl_pw_qpolynomial_is_one(__isl_keep isl_pw_qpolynomial *pwqp); - -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_out( - __isl_take isl_pw_qpolynomial *pwqp, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_qpolynomial *isl_qpolynomial_opt_on_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_set *set, int max); - -enum isl_fold isl_fold_type_negate(enum isl_fold type); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_cow( - __isl_take isl_qpolynomial_fold *fold); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_dup( - __isl_keep isl_qpolynomial_fold *fold); - -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_cow( - __isl_take isl_pw_qpolynomial_fold *pwf); - -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_add_on_domain( - __isl_keep isl_set *set, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold_on_domain( - __isl_keep isl_set *set, - __isl_take isl_qpolynomial_fold *fold1, - __isl_take isl_qpolynomial_fold *fold2); - -__isl_give isl_qpolynomial *isl_qpolynomial_fold_opt_on_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *set, int max); - -int isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold *pwf1, - __isl_keep isl_pw_qpolynomial_fold *pwf2); - -__isl_give isl_qpolynomial *isl_qpolynomial_morph_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_morph *morph); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_morph_domain( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_morph *morph); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_morph_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_morph *morph); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_morph_domain( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_morph *morph); - -__isl_give isl_qpolynomial *isl_qpolynomial_lift(__isl_take isl_qpolynomial *qp, - __isl_take isl_space *dim); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_lift( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_space *dim); - -__isl_give isl_qpolynomial *isl_qpolynomial_substitute_equalities( - __isl_take isl_qpolynomial *qp, __isl_take isl_basic_set *eq); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute_equalities( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_basic_set *eq); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context); - -__isl_give isl_qpolynomial *isl_qpolynomial_realign_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_reordering *r); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_realign_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_reordering *r); -__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_realign_domain( - __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_reordering *r); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_realign_domain( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_reordering *r); - -__isl_give isl_qpolynomial *isl_qpolynomial_reset_domain_space( - __isl_take isl_qpolynomial *qp, __isl_take isl_space *dim); -__isl_give isl_qpolynomial *isl_qpolynomial_reset_space_and_domain( - __isl_take isl_qpolynomial *qp, __isl_take isl_space *space, - __isl_take isl_space *domain); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_reset_domain_space( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_space *dim); -__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_reset_space_and_domain( - __isl_take isl_qpolynomial_fold *fold, __isl_take isl_space *space, - __isl_take isl_space *domain); -__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_domain_space( - __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_space *dim); diff --git a/cloog-0.17.0/isl/isl_printer.c b/cloog-0.17.0/isl/isl_printer.c deleted file mode 100644 index ae7596d7d093fd9c4202118aa0879644ea6ee51d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_printer.c +++ /dev/null @@ -1,367 +0,0 @@ -#include -#include - -static __isl_give isl_printer *file_start_line(__isl_take isl_printer *p) -{ - fprintf(p->file, "%*s%s", p->indent, "", p->prefix ? p->prefix : ""); - return p; -} - -static __isl_give isl_printer *file_end_line(__isl_take isl_printer *p) -{ - fprintf(p->file, "%s\n", p->suffix ? p->suffix : ""); - return p; -} - -static __isl_give isl_printer *file_flush(__isl_take isl_printer *p) -{ - fflush(p->file); - return p; -} - -static __isl_give isl_printer *file_print_str(__isl_take isl_printer *p, - const char *s) -{ - fprintf(p->file, "%s", s); - return p; -} - -static __isl_give isl_printer *file_print_int(__isl_take isl_printer *p, int i) -{ - fprintf(p->file, "%d", i); - return p; -} - -static __isl_give isl_printer *file_print_isl_int(__isl_take isl_printer *p, isl_int i) -{ - isl_int_print(p->file, i, p->width); - return p; -} - -static int grow_buf(__isl_keep isl_printer *p, int extra) -{ - int new_size; - char *new_buf; - - if (p->buf_size == 0) - return -1; - - new_size = ((p->buf_n + extra + 1) * 3) / 2; - new_buf = isl_realloc_array(p->ctx, p->buf, char, new_size); - if (!new_buf) { - p->buf_size = 0; - return -1; - } - p->buf = new_buf; - p->buf_size = new_size; - - return 0; -} - -static __isl_give isl_printer *str_print(__isl_take isl_printer *p, - const char *s, int len) -{ - if (p->buf_n + len + 1 >= p->buf_size && grow_buf(p, len)) - goto error; - memcpy(p->buf + p->buf_n, s, len); - p->buf_n += len; - - p->buf[p->buf_n] = '\0'; - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *str_print_indent(__isl_take isl_printer *p, - int indent) -{ - int i; - - if (p->buf_n + indent + 1 >= p->buf_size && grow_buf(p, indent)) - goto error; - for (i = 0; i < indent; ++i) - p->buf[p->buf_n++] = ' '; - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *str_start_line(__isl_take isl_printer *p) -{ - p = str_print_indent(p, p->indent); - if (p->prefix) - p = str_print(p, p->prefix, strlen(p->prefix)); - return p; -} - -static __isl_give isl_printer *str_end_line(__isl_take isl_printer *p) -{ - if (p->suffix) - p = str_print(p, p->suffix, strlen(p->suffix)); - p = str_print(p, "\n", strlen("\n")); - return p; -} - -static __isl_give isl_printer *str_flush(__isl_take isl_printer *p) -{ - p->buf_n = 0; - return p; -} - -static __isl_give isl_printer *str_print_str(__isl_take isl_printer *p, - const char *s) -{ - return str_print(p, s, strlen(s)); -} - -static __isl_give isl_printer *str_print_int(__isl_take isl_printer *p, int i) -{ - int left = p->buf_size - p->buf_n; - int need = snprintf(p->buf + p->buf_n, left, "%d", i); - if (need >= left) { - if (grow_buf(p, need)) - goto error; - left = p->buf_size - p->buf_n; - need = snprintf(p->buf + p->buf_n, left, "%d", i); - } - p->buf_n += need; - return p; -error: - isl_printer_free(p); - return NULL; -} - -static __isl_give isl_printer *str_print_isl_int(__isl_take isl_printer *p, - isl_int i) -{ - char *s; - int len; - isl_int_print_gmp_free_t gmp_free; - - s = isl_int_get_str(i); - len = strlen(s); - if (len < p->width) - p = str_print_indent(p, p->width - len); - p = str_print(p, s, len); - mp_get_memory_functions(NULL, NULL, &gmp_free); - (*gmp_free)(s, len + 1); - return p; -} - -struct isl_printer_ops { - __isl_give isl_printer *(*start_line)(__isl_take isl_printer *p); - __isl_give isl_printer *(*end_line)(__isl_take isl_printer *p); - __isl_give isl_printer *(*print_int)(__isl_take isl_printer *p, int i); - __isl_give isl_printer *(*print_isl_int)(__isl_take isl_printer *p, - isl_int i); - __isl_give isl_printer *(*print_str)(__isl_take isl_printer *p, - const char *s); - __isl_give isl_printer *(*flush)(__isl_take isl_printer *p); -}; - -static struct isl_printer_ops file_ops = { - file_start_line, - file_end_line, - file_print_int, - file_print_isl_int, - file_print_str, - file_flush -}; - -static struct isl_printer_ops str_ops = { - str_start_line, - str_end_line, - str_print_int, - str_print_isl_int, - str_print_str, - str_flush -}; - -__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file) -{ - struct isl_printer *p = isl_alloc_type(ctx, struct isl_printer); - if (!p) - return NULL; - p->ctx = ctx; - isl_ctx_ref(p->ctx); - p->ops = &file_ops; - p->file = file; - p->buf = NULL; - p->buf_n = 0; - p->buf_size = 0; - p->indent = 0; - p->output_format = ISL_FORMAT_ISL; - p->prefix = NULL; - p->suffix = NULL; - p->width = 0; - - return p; -} - -__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx) -{ - struct isl_printer *p = isl_alloc_type(ctx, struct isl_printer); - if (!p) - return NULL; - p->ctx = ctx; - isl_ctx_ref(p->ctx); - p->ops = &str_ops; - p->file = NULL; - p->buf = isl_alloc_array(ctx, char, 256); - if (!p->buf) - goto error; - p->buf_n = 0; - p->buf[0] = '\0'; - p->buf_size = 256; - p->indent = 0; - p->output_format = ISL_FORMAT_ISL; - p->prefix = NULL; - p->suffix = NULL; - p->width = 0; - - return p; -error: - isl_printer_free(p); - return NULL; -} - -void isl_printer_free(__isl_take isl_printer *p) -{ - if (!p) - return; - free(p->buf); - isl_ctx_deref(p->ctx); - free(p); -} - -isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer) -{ - return printer ? printer->ctx : NULL; -} - -__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p, - int width) -{ - if (!p) - return NULL; - - p->width = width; - - return p; -} - -__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p, - int indent) -{ - if (!p) - return NULL; - - p->indent = indent; - - return p; -} - -__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p, - int indent) -{ - if (!p) - return NULL; - - p->indent += indent; - if (p->indent < 0) - p->indent = 0; - - return p; -} - -__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p, - const char *prefix) -{ - if (!p) - return NULL; - - p->prefix = prefix; - - return p; -} - -__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p, - const char *suffix) -{ - if (!p) - return NULL; - - p->suffix = suffix; - - return p; -} - -__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p, - int output_format) -{ - if (!p) - return NULL; - - p->output_format = output_format; - - return p; -} - -__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p, - const char *s) -{ - if (!p) - return NULL; - - return p->ops->print_str(p, s); -} - -__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i) -{ - if (!p) - return NULL; - - return p->ops->print_int(p, i); -} - -__isl_give isl_printer *isl_printer_print_isl_int(__isl_take isl_printer *p, - isl_int i) -{ - if (!p) - return NULL; - - return p->ops->print_isl_int(p, i); -} - -__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p) -{ - if (!p) - return NULL; - - return p->ops->start_line(p); -} - -__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p) -{ - if (!p) - return NULL; - - return p->ops->end_line(p); -} - -char *isl_printer_get_str(__isl_keep isl_printer *printer) -{ - if (!printer || !printer->buf) - return NULL; - return strdup(printer->buf); -} - -__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p) -{ - if (!p) - return NULL; - - return p->ops->flush(p); -} diff --git a/cloog-0.17.0/isl/isl_printer_private.h b/cloog-0.17.0/isl/isl_printer_private.h deleted file mode 100644 index 9d76808c987e91c4e7701970b05e409ee49a27d4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_printer_private.h +++ /dev/null @@ -1,17 +0,0 @@ -#include - -struct isl_printer_ops; - -struct isl_printer { - struct isl_ctx *ctx; - struct isl_printer_ops *ops; - FILE *file; - int buf_n; - int buf_size; - char *buf; - int indent; - int output_format; - const char *prefix; - const char *suffix; - int width; -}; diff --git a/cloog-0.17.0/isl/isl_pw_templ.c b/cloog-0.17.0/isl/isl_pw_templ.c deleted file mode 100644 index 65bdf46babbaee0e14065e3b53d0dfba0af0466a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_pw_templ.c +++ /dev/null @@ -1,1570 +0,0 @@ -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xS(TYPE,NAME) struct TYPE ## _ ## NAME -#define S(TYPE,NAME) xS(TYPE,NAME) - -#ifdef HAS_TYPE -__isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *dim, - enum isl_fold type, int n) -#else -__isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *dim, int n) -#endif -{ - isl_ctx *ctx; - struct PW *pw; - - if (!dim) - return NULL; - ctx = isl_space_get_ctx(dim); - isl_assert(ctx, n >= 0, goto error); - pw = isl_alloc(ctx, struct PW, - sizeof(struct PW) + (n - 1) * sizeof(S(PW,piece))); - if (!pw) - goto error; - - pw->ref = 1; -#ifdef HAS_TYPE - pw->type = type; -#endif - pw->size = n; - pw->n = 0; - pw->dim = dim; - return pw; -error: - isl_space_free(dim); - return NULL; -} - -#ifdef HAS_TYPE -__isl_give PW *FN(PW,ZERO)(__isl_take isl_space *dim, enum isl_fold type) -{ - return FN(PW,alloc_size)(dim, type, 0); -} -#else -__isl_give PW *FN(PW,ZERO)(__isl_take isl_space *dim) -{ - return FN(PW,alloc_size)(dim, 0); -} -#endif - -__isl_give PW *FN(PW,add_piece)(__isl_take PW *pw, - __isl_take isl_set *set, __isl_take EL *el) -{ - isl_ctx *ctx; - isl_space *el_dim = NULL; - - if (!pw || !set || !el) - goto error; - - if (isl_set_plain_is_empty(set) || FN(EL,EL_IS_ZERO)(el)) { - isl_set_free(set); - FN(EL,free)(el); - return pw; - } - - ctx = isl_set_get_ctx(set); -#ifdef HAS_TYPE - if (pw->type != el->type) - isl_die(ctx, isl_error_invalid, "fold types don't match", - goto error); -#endif - el_dim = FN(EL,get_space(el)); - isl_assert(ctx, isl_space_is_equal(pw->dim, el_dim), goto error); - isl_assert(ctx, pw->n < pw->size, goto error); - - pw->p[pw->n].set = set; - pw->p[pw->n].FIELD = el; - pw->n++; - - isl_space_free(el_dim); - return pw; -error: - isl_space_free(el_dim); - FN(PW,free)(pw); - isl_set_free(set); - FN(EL,free)(el); - return NULL; -} - -#ifdef HAS_TYPE -__isl_give PW *FN(PW,alloc)(enum isl_fold type, - __isl_take isl_set *set, __isl_take EL *el) -#else -__isl_give PW *FN(PW,alloc)(__isl_take isl_set *set, __isl_take EL *el) -#endif -{ - PW *pw; - - if (!set || !el) - goto error; - -#ifdef HAS_TYPE - pw = FN(PW,alloc_size)(FN(EL,get_space)(el), type, 1); -#else - pw = FN(PW,alloc_size)(FN(EL,get_space)(el), 1); -#endif - - return FN(PW,add_piece)(pw, set, el); -error: - isl_set_free(set); - FN(EL,free)(el); - return NULL; -} - -__isl_give PW *FN(PW,dup)(__isl_keep PW *pw) -{ - int i; - PW *dup; - - if (!pw) - return NULL; - -#ifdef HAS_TYPE - dup = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->type, pw->n); -#else - dup = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->n); -#endif - if (!dup) - return NULL; - - for (i = 0; i < pw->n; ++i) - dup = FN(PW,add_piece)(dup, isl_set_copy(pw->p[i].set), - FN(EL,copy)(pw->p[i].FIELD)); - - return dup; -} - -__isl_give PW *FN(PW,cow)(__isl_take PW *pw) -{ - if (!pw) - return NULL; - - if (pw->ref == 1) - return pw; - pw->ref--; - return FN(PW,dup)(pw); -} - -__isl_give PW *FN(PW,copy)(__isl_keep PW *pw) -{ - if (!pw) - return NULL; - - pw->ref++; - return pw; -} - -void *FN(PW,free)(__isl_take PW *pw) -{ - int i; - - if (!pw) - return NULL; - if (--pw->ref > 0) - return NULL; - - for (i = 0; i < pw->n; ++i) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - } - isl_space_free(pw->dim); - free(pw); - - return NULL; -} - -const char *FN(PW,get_dim_name)(__isl_keep PW *pw, enum isl_dim_type type, - unsigned pos) -{ - return pw ? isl_space_get_dim_name(pw->dim, type, pos) : NULL; -} - -int FN(PW,has_dim_id)(__isl_keep PW *pw, enum isl_dim_type type, unsigned pos) -{ - return pw ? isl_space_has_dim_id(pw->dim, type, pos) : -1; -} - -__isl_give isl_id *FN(PW,get_dim_id)(__isl_keep PW *pw, enum isl_dim_type type, - unsigned pos) -{ - return pw ? isl_space_get_dim_id(pw->dim, type, pos) : NULL; -} - -const char *FN(PW,get_tuple_name)(__isl_keep PW *pw, enum isl_dim_type type) -{ - return pw ? isl_space_get_tuple_name(pw->dim, type) : NULL; -} - -int FN(PW,has_tuple_id)(__isl_keep PW *pw, enum isl_dim_type type) -{ - return pw ? isl_space_has_tuple_id(pw->dim, type) : -1; -} - -__isl_give isl_id *FN(PW,get_tuple_id)(__isl_keep PW *pw, enum isl_dim_type type) -{ - return pw ? isl_space_get_tuple_id(pw->dim, type) : NULL; -} - -int FN(PW,IS_ZERO)(__isl_keep PW *pw) -{ - if (!pw) - return -1; - - return pw->n == 0; -} - -#ifndef NO_REALIGN -__isl_give PW *FN(PW,realign_domain)(__isl_take PW *pw, - __isl_take isl_reordering *exp) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw || !exp) - return NULL; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_realign(pw->p[i].set, - isl_reordering_copy(exp)); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,realign_domain)(pw->p[i].FIELD, - isl_reordering_copy(exp)); - if (!pw->p[i].FIELD) - goto error; - } - - pw = FN(PW,reset_domain_space)(pw, isl_space_copy(exp->dim)); - - isl_reordering_free(exp); - return pw; -error: - isl_reordering_free(exp); - FN(PW,free)(pw); - return NULL; -} - -/* Align the parameters of "pw" to those of "model". - */ -__isl_give PW *FN(PW,align_params)(__isl_take PW *pw, __isl_take isl_space *model) -{ - isl_ctx *ctx; - - if (!pw || !model) - goto error; - - ctx = isl_space_get_ctx(model); - if (!isl_space_has_named_params(model)) - isl_die(ctx, isl_error_invalid, - "model has unnamed parameters", goto error); - if (!isl_space_has_named_params(pw->dim)) - isl_die(ctx, isl_error_invalid, - "input has unnamed parameters", goto error); - if (!isl_space_match(pw->dim, isl_dim_param, model, isl_dim_param)) { - isl_reordering *exp; - - model = isl_space_drop_dims(model, isl_dim_in, - 0, isl_space_dim(model, isl_dim_in)); - model = isl_space_drop_dims(model, isl_dim_out, - 0, isl_space_dim(model, isl_dim_out)); - exp = isl_parameter_alignment_reordering(pw->dim, model); - exp = isl_reordering_extend_space(exp, - FN(PW,get_domain_space)(pw)); - pw = FN(PW,realign_domain)(pw, exp); - } - - isl_space_free(model); - return pw; -error: - isl_space_free(model); - FN(PW,free)(pw); - return NULL; -} - -static __isl_give PW *FN(PW,align_params_pw_pw_and)(__isl_take PW *pw1, - __isl_take PW *pw2, - __isl_give PW *(*fn)(__isl_take PW *pw1, __isl_take PW *pw2)) -{ - isl_ctx *ctx; - - if (!pw1 || !pw2) - goto error; - if (isl_space_match(pw1->dim, isl_dim_param, pw2->dim, isl_dim_param)) - return fn(pw1, pw2); - ctx = FN(PW,get_ctx)(pw1); - if (!isl_space_has_named_params(pw1->dim) || - !isl_space_has_named_params(pw2->dim)) - isl_die(ctx, isl_error_invalid, - "unaligned unnamed parameters", goto error); - pw1 = FN(PW,align_params)(pw1, FN(PW,get_space)(pw2)); - pw2 = FN(PW,align_params)(pw2, FN(PW,get_space)(pw1)); - return fn(pw1, pw2); -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return NULL; -} - -static __isl_give PW *FN(PW,align_params_pw_set_and)(__isl_take PW *pw, - __isl_take isl_set *set, - __isl_give PW *(*fn)(__isl_take PW *pw, __isl_take isl_set *set)) -{ - isl_ctx *ctx; - - if (!pw || !set) - goto error; - if (isl_space_match(pw->dim, isl_dim_param, set->dim, isl_dim_param)) - return fn(pw, set); - ctx = FN(PW,get_ctx)(pw); - if (!isl_space_has_named_params(pw->dim) || - !isl_space_has_named_params(set->dim)) - isl_die(ctx, isl_error_invalid, - "unaligned unnamed parameters", goto error); - pw = FN(PW,align_params)(pw, isl_set_get_space(set)); - set = isl_set_align_params(set, FN(PW,get_space)(pw)); - return fn(pw, set); -error: - FN(PW,free)(pw); - isl_set_free(set); - return NULL; -} -#endif - -static __isl_give PW *FN(PW,union_add_aligned)(__isl_take PW *pw1, - __isl_take PW *pw2) -{ - int i, j, n; - struct PW *res; - isl_ctx *ctx; - isl_set *set; - - if (!pw1 || !pw2) - goto error; - - ctx = isl_space_get_ctx(pw1->dim); -#ifdef HAS_TYPE - if (pw1->type != pw2->type) - isl_die(ctx, isl_error_invalid, - "fold types don't match", goto error); -#endif - isl_assert(ctx, isl_space_is_equal(pw1->dim, pw2->dim), goto error); - - if (FN(PW,IS_ZERO)(pw1)) { - FN(PW,free)(pw1); - return pw2; - } - - if (FN(PW,IS_ZERO)(pw2)) { - FN(PW,free)(pw2); - return pw1; - } - - n = (pw1->n + 1) * (pw2->n + 1); -#ifdef HAS_TYPE - res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), pw1->type, n); -#else - res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), n); -#endif - - for (i = 0; i < pw1->n; ++i) { - set = isl_set_copy(pw1->p[i].set); - for (j = 0; j < pw2->n; ++j) { - struct isl_set *common; - EL *sum; - set = isl_set_subtract(set, - isl_set_copy(pw2->p[j].set)); - common = isl_set_intersect(isl_set_copy(pw1->p[i].set), - isl_set_copy(pw2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - sum = FN(EL,add_on_domain)(common, - FN(EL,copy)(pw1->p[i].FIELD), - FN(EL,copy)(pw2->p[j].FIELD)); - - res = FN(PW,add_piece)(res, common, sum); - } - res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw1->p[i].FIELD)); - } - - for (j = 0; j < pw2->n; ++j) { - set = isl_set_copy(pw2->p[j].set); - for (i = 0; i < pw1->n; ++i) - set = isl_set_subtract(set, - isl_set_copy(pw1->p[i].set)); - res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw2->p[j].FIELD)); - } - - FN(PW,free)(pw1); - FN(PW,free)(pw2); - - return res; -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return NULL; -} - -/* Private version of "union_add". For isl_pw_qpolynomial and - * isl_pw_qpolynomial_fold, we prefer to simply call it "add". - */ -static __isl_give PW *FN(PW,union_add_)(__isl_take PW *pw1, __isl_take PW *pw2) -{ - return FN(PW,align_params_pw_pw_and)(pw1, pw2, - &FN(PW,union_add_aligned)); -} - -/* Make sure "pw" has room for at least "n" more pieces. - * - * If there is only one reference to pw, we extend it in place. - * Otherwise, we create a new PW and copy the pieces. - */ -static __isl_give PW *FN(PW,grow)(__isl_take PW *pw, int n) -{ - int i; - isl_ctx *ctx; - PW *res; - - if (!pw) - return NULL; - if (pw->n + n <= pw->size) - return pw; - ctx = FN(PW,get_ctx)(pw); - n += pw->n; - if (pw->ref == 1) { - res = isl_realloc(ctx, pw, struct PW, - sizeof(struct PW) + (n - 1) * sizeof(S(PW,piece))); - if (!res) - return FN(PW,free)(pw); - res->size = n; - return res; - } -#ifdef HAS_TYPE - res = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->type, n); -#else - res = FN(PW,alloc_size)(isl_space_copy(pw->dim), n); -#endif - if (!res) - return FN(PW,free)(pw); - for (i = 0; i < pw->n; ++i) - res = FN(PW,add_piece)(res, isl_set_copy(pw->p[i].set), - FN(EL,copy)(pw->p[i].FIELD)); - FN(PW,free)(pw); - return res; -} - -static __isl_give PW *FN(PW,add_disjoint_aligned)(__isl_take PW *pw1, - __isl_take PW *pw2) -{ - int i; - isl_ctx *ctx; - - if (!pw1 || !pw2) - goto error; - - if (pw1->size < pw1->n + pw2->n && pw1->n < pw2->n) - return FN(PW,add_disjoint_aligned)(pw2, pw1); - - ctx = isl_space_get_ctx(pw1->dim); -#ifdef HAS_TYPE - if (pw1->type != pw2->type) - isl_die(ctx, isl_error_invalid, - "fold types don't match", goto error); -#endif - isl_assert(ctx, isl_space_is_equal(pw1->dim, pw2->dim), goto error); - - if (FN(PW,IS_ZERO)(pw1)) { - FN(PW,free)(pw1); - return pw2; - } - - if (FN(PW,IS_ZERO)(pw2)) { - FN(PW,free)(pw2); - return pw1; - } - - pw1 = FN(PW,grow)(pw1, pw2->n); - if (!pw1) - goto error; - - for (i = 0; i < pw2->n; ++i) - pw1 = FN(PW,add_piece)(pw1, - isl_set_copy(pw2->p[i].set), - FN(EL,copy)(pw2->p[i].FIELD)); - - FN(PW,free)(pw2); - - return pw1; -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return NULL; -} - -__isl_give PW *FN(PW,add_disjoint)(__isl_take PW *pw1, __isl_take PW *pw2) -{ - return FN(PW,align_params_pw_pw_and)(pw1, pw2, - &FN(PW,add_disjoint_aligned)); -} - -/* This function is currently only used from isl_aff.c - */ -static __isl_give PW *FN(PW,on_shared_domain)(__isl_take PW *pw1, - __isl_take PW *pw2, - __isl_give EL *(*fn)(__isl_take EL *el1, __isl_take EL *el2)) - __attribute__ ((unused)); - -/* Apply "fn" to pairs of elements from pw1 and pw2 on shared domains. - */ -static __isl_give PW *FN(PW,on_shared_domain)(__isl_take PW *pw1, - __isl_take PW *pw2, - __isl_give EL *(*fn)(__isl_take EL *el1, __isl_take EL *el2)) -{ - int i, j, n; - PW *res; - - if (!pw1 || !pw2) - goto error; - - n = pw1->n * pw2->n; -#ifdef HAS_TYPE - res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), pw1->type, n); -#else - res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), n); -#endif - - for (i = 0; i < pw1->n; ++i) { - for (j = 0; j < pw2->n; ++j) { - isl_set *common; - EL *res_ij; - common = isl_set_intersect( - isl_set_copy(pw1->p[i].set), - isl_set_copy(pw2->p[j].set)); - if (isl_set_plain_is_empty(common)) { - isl_set_free(common); - continue; - } - - res_ij = fn(FN(EL,copy)(pw1->p[i].FIELD), - FN(EL,copy)(pw2->p[j].FIELD)); - - res = FN(PW,add_piece)(res, common, res_ij); - } - } - - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return res; -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return NULL; -} - -#ifndef NO_NEG -__isl_give PW *FN(PW,neg)(__isl_take PW *pw) -{ - int i; - - if (!pw) - return NULL; - - if (FN(PW,IS_ZERO)(pw)) - return pw; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].FIELD = FN(EL,neg)(pw->p[i].FIELD); - if (!pw->p[i].FIELD) - return FN(PW,free)(pw); - } - - return pw; -} - -__isl_give PW *FN(PW,sub)(__isl_take PW *pw1, __isl_take PW *pw2) -{ - return FN(PW,add)(pw1, FN(PW,neg)(pw2)); -} -#endif - -#ifndef NO_EVAL -__isl_give isl_qpolynomial *FN(PW,eval)(__isl_take PW *pw, - __isl_take isl_point *pnt) -{ - int i; - int found = 0; - isl_ctx *ctx; - isl_space *pnt_dim = NULL; - isl_qpolynomial *qp; - - if (!pw || !pnt) - goto error; - ctx = isl_point_get_ctx(pnt); - pnt_dim = isl_point_get_space(pnt); - isl_assert(ctx, isl_space_is_domain(pnt_dim, pw->dim), goto error); - - for (i = 0; i < pw->n; ++i) { - found = isl_set_contains_point(pw->p[i].set, pnt); - if (found < 0) - goto error; - if (found) - break; - } - if (found) - qp = FN(EL,eval)(FN(EL,copy)(pw->p[i].FIELD), - isl_point_copy(pnt)); - else - qp = isl_qpolynomial_zero_on_domain(FN(PW,get_domain_space)(pw)); - FN(PW,free)(pw); - isl_space_free(pnt_dim); - isl_point_free(pnt); - return qp; -error: - FN(PW,free)(pw); - isl_space_free(pnt_dim); - isl_point_free(pnt); - return NULL; -} -#endif - -__isl_give isl_set *FN(PW,domain)(__isl_take PW *pw) -{ - int i; - isl_set *dom; - - if (!pw) - return NULL; - - dom = isl_set_empty(FN(PW,get_domain_space)(pw)); - for (i = 0; i < pw->n; ++i) - dom = isl_set_union_disjoint(dom, isl_set_copy(pw->p[i].set)); - - FN(PW,free)(pw); - - return dom; -} - -/* Restrict the domain of "pw" by combining each cell - * with "set" through a call to "fn", where "fn" may be - * isl_set_intersect or isl_set_intersect_params. - */ -static __isl_give PW *FN(PW,intersect_aligned)(__isl_take PW *pw, - __isl_take isl_set *set, - __isl_give isl_set *(*fn)(__isl_take isl_set *set1, - __isl_take isl_set *set2)) -{ - int i; - - if (!pw || !set) - goto error; - - if (pw->n == 0) { - isl_set_free(set); - return pw; - } - - pw = FN(PW,cow)(pw); - if (!pw) - goto error; - - for (i = pw->n - 1; i >= 0; --i) { - isl_basic_set *aff; - pw->p[i].set = fn(pw->p[i].set, isl_set_copy(set)); - if (!pw->p[i].set) - goto error; - aff = isl_set_affine_hull(isl_set_copy(pw->p[i].set)); - pw->p[i].FIELD = FN(EL,substitute_equalities)(pw->p[i].FIELD, - aff); - if (!pw->p[i].FIELD) - goto error; - if (isl_set_plain_is_empty(pw->p[i].set)) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - } - } - - isl_set_free(set); - return pw; -error: - isl_set_free(set); - FN(PW,free)(pw); - return NULL; -} - -static __isl_give PW *FN(PW,intersect_domain_aligned)(__isl_take PW *pw, - __isl_take isl_set *set) -{ - return FN(PW,intersect_aligned)(pw, set, &isl_set_intersect); -} - -__isl_give PW *FN(PW,intersect_domain)(__isl_take PW *pw, - __isl_take isl_set *context) -{ - return FN(PW,align_params_pw_set_and)(pw, context, - &FN(PW,intersect_domain_aligned)); -} - -static __isl_give PW *FN(PW,intersect_params_aligned)(__isl_take PW *pw, - __isl_take isl_set *set) -{ - return FN(PW,intersect_aligned)(pw, set, &isl_set_intersect_params); -} - -/* Intersect the domain of "pw" with the parameter domain "context". - */ -__isl_give PW *FN(PW,intersect_params)(__isl_take PW *pw, - __isl_take isl_set *context) -{ - return FN(PW,align_params_pw_set_and)(pw, context, - &FN(PW,intersect_params_aligned)); -} - -static __isl_give PW *FN(PW,gist_aligned)(__isl_take PW *pw, - __isl_take isl_set *context, - __isl_give EL *(*fn_el)(__isl_take EL *el, - __isl_take isl_set *set), - __isl_give isl_set *(*fn_dom)(__isl_take isl_set *set, - __isl_take isl_basic_set *bset)) -{ - int i; - isl_basic_set *hull = NULL; - - if (!pw || !context) - goto error; - - if (pw->n == 0) { - isl_set_free(context); - return pw; - } - - if (!isl_space_match(pw->dim, isl_dim_param, - context->dim, isl_dim_param)) { - pw = FN(PW,align_params)(pw, isl_set_get_space(context)); - context = isl_set_align_params(context, FN(PW,get_space)(pw)); - } - - context = isl_set_compute_divs(context); - hull = isl_set_simple_hull(isl_set_copy(context)); - - pw = FN(PW,cow)(pw); - if (!pw) - goto error; - - for (i = pw->n - 1; i >= 0; --i) { - pw->p[i].set = isl_set_intersect(pw->p[i].set, - isl_set_copy(context)); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = fn_el(pw->p[i].FIELD, - isl_set_copy(pw->p[i].set)); - pw->p[i].set = fn_dom(pw->p[i].set, isl_basic_set_copy(hull)); - if (!pw->p[i].set) - goto error; - if (isl_set_plain_is_empty(pw->p[i].set)) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - } - } - - isl_basic_set_free(hull); - isl_set_free(context); - - return pw; -error: - FN(PW,free)(pw); - isl_basic_set_free(hull); - isl_set_free(context); - return NULL; -} - -static __isl_give PW *FN(PW,gist_domain_aligned)(__isl_take PW *pw, - __isl_take isl_set *set) -{ - return FN(PW,gist_aligned)(pw, set, &FN(EL,gist), - &isl_set_gist_basic_set); -} - -__isl_give PW *FN(PW,gist)(__isl_take PW *pw, __isl_take isl_set *context) -{ - return FN(PW,align_params_pw_set_and)(pw, context, - &FN(PW,gist_domain_aligned)); -} - -static __isl_give PW *FN(PW,gist_params_aligned)(__isl_take PW *pw, - __isl_take isl_set *set) -{ - return FN(PW,gist_aligned)(pw, set, &FN(EL,gist_params), - &isl_set_gist_params_basic_set); -} - -__isl_give PW *FN(PW,gist_params)(__isl_take PW *pw, - __isl_take isl_set *context) -{ - return FN(PW,align_params_pw_set_and)(pw, context, - &FN(PW,gist_params_aligned)); -} - -__isl_give PW *FN(PW,coalesce)(__isl_take PW *pw) -{ - int i, j; - - if (!pw) - return NULL; - if (pw->n == 0) - return pw; - - for (i = pw->n - 1; i >= 0; --i) { - for (j = i - 1; j >= 0; --j) { - if (!FN(EL,plain_is_equal)(pw->p[i].FIELD, - pw->p[j].FIELD)) - continue; - pw->p[j].set = isl_set_union(pw->p[j].set, - pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - break; - } - if (j >= 0) - continue; - pw->p[i].set = isl_set_coalesce(pw->p[i].set); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -isl_ctx *FN(PW,get_ctx)(__isl_keep PW *pw) -{ - return pw ? isl_space_get_ctx(pw->dim) : NULL; -} - -#ifndef NO_INVOLVES_DIMS -int FN(PW,involves_dims)(__isl_keep PW *pw, enum isl_dim_type type, - unsigned first, unsigned n) -{ - int i; - enum isl_dim_type set_type; - - if (!pw) - return -1; - if (pw->n == 0 || n == 0) - return 0; - - set_type = type == isl_dim_in ? isl_dim_set : type; - - for (i = 0; i < pw->n; ++i) { - int involves = FN(EL,involves_dims)(pw->p[i].FIELD, - type, first, n); - if (involves < 0 || involves) - return involves; - involves = isl_set_involves_dims(pw->p[i].set, - set_type, first, n); - if (involves < 0 || involves) - return involves; - } - return 0; -} -#endif - -__isl_give PW *FN(PW,set_dim_name)(__isl_take PW *pw, - enum isl_dim_type type, unsigned pos, const char *s) -{ - int i; - enum isl_dim_type set_type; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - set_type = type == isl_dim_in ? isl_dim_set : type; - - pw->dim = isl_space_set_dim_name(pw->dim, type, pos, s); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_set_dim_name(pw->p[i].set, - set_type, pos, s); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,set_dim_name)(pw->p[i].FIELD, type, pos, s); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -#ifndef NO_DROP_DIMS -__isl_give PW *FN(PW,drop_dims)(__isl_take PW *pw, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - enum isl_dim_type set_type; - - if (!pw) - return NULL; - if (n == 0 && !isl_space_get_tuple_name(pw->dim, type)) - return pw; - - set_type = type == isl_dim_in ? isl_dim_set : type; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - pw->dim = isl_space_drop_dims(pw->dim, type, first, n); - if (!pw->dim) - goto error; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_drop(pw->p[i].set, set_type, first, n); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,drop_dims)(pw->p[i].FIELD, type, first, n); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -/* This function is very similar to drop_dims. - * The only difference is that the cells may still involve - * the specified dimensions. They are removed using - * isl_set_project_out instead of isl_set_drop. - */ -__isl_give PW *FN(PW,project_out)(__isl_take PW *pw, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - enum isl_dim_type set_type; - - if (!pw) - return NULL; - if (n == 0 && !isl_space_get_tuple_name(pw->dim, type)) - return pw; - - set_type = type == isl_dim_in ? isl_dim_set : type; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - pw->dim = isl_space_drop_dims(pw->dim, type, first, n); - if (!pw->dim) - goto error; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_project_out(pw->p[i].set, - set_type, first, n); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,drop_dims)(pw->p[i].FIELD, type, first, n); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -/* Project the domain of pw onto its parameter space. - */ -__isl_give PW *FN(PW,project_domain_on_params)(__isl_take PW *pw) -{ - isl_space *space; - unsigned n; - - n = FN(PW,dim)(pw, isl_dim_in); - pw = FN(PW,project_out)(pw, isl_dim_in, 0, n); - space = FN(PW,get_domain_space)(pw); - space = isl_space_params(space); - pw = FN(PW,reset_domain_space)(pw, space); - return pw; -} -#endif - -#ifndef NO_INSERT_DIMS -__isl_give PW *FN(PW,insert_dims)(__isl_take PW *pw, enum isl_dim_type type, - unsigned first, unsigned n) -{ - int i; - enum isl_dim_type set_type; - - if (!pw) - return NULL; - if (n == 0 && !isl_space_is_named_or_nested(pw->dim, type)) - return pw; - - set_type = type == isl_dim_in ? isl_dim_set : type; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - pw->dim = isl_space_insert_dims(pw->dim, type, first, n); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_insert_dims(pw->p[i].set, - set_type, first, n); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,insert_dims)(pw->p[i].FIELD, - type, first, n); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} -#endif - -__isl_give PW *FN(PW,fix_dim)(__isl_take PW *pw, - enum isl_dim_type type, unsigned pos, isl_int v) -{ - int i; - - if (!pw) - return NULL; - - if (type == isl_dim_in) - type = isl_dim_set; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_fix(pw->p[i].set, type, pos, v); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -unsigned FN(PW,dim)(__isl_keep PW *pw, enum isl_dim_type type) -{ - return pw ? isl_space_dim(pw->dim, type) : 0; -} - -__isl_give PW *FN(PW,split_dims)(__isl_take PW *pw, - enum isl_dim_type type, unsigned first, unsigned n) -{ - int i; - - if (!pw) - return NULL; - if (n == 0) - return pw; - - if (type == isl_dim_in) - type = isl_dim_set; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - if (!pw->dim) - goto error; - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_split_dims(pw->p[i].set, type, first, n); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -#ifndef NO_OPT -/* Compute the maximal value attained by the piecewise quasipolynomial - * on its domain or zero if the domain is empty. - * In the worst case, the domain is scanned completely, - * so the domain is assumed to be bounded. - */ -__isl_give isl_qpolynomial *FN(PW,opt)(__isl_take PW *pw, int max) -{ - int i; - isl_qpolynomial *opt; - - if (!pw) - return NULL; - - if (pw->n == 0) { - isl_space *dim = isl_space_copy(pw->dim); - FN(PW,free)(pw); - return isl_qpolynomial_zero_on_domain(isl_space_domain(dim)); - } - - opt = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[0].FIELD), - isl_set_copy(pw->p[0].set), max); - for (i = 1; i < pw->n; ++i) { - isl_qpolynomial *opt_i; - opt_i = FN(EL,opt_on_domain)(FN(EL,copy)(pw->p[i].FIELD), - isl_set_copy(pw->p[i].set), max); - if (max) - opt = isl_qpolynomial_max_cst(opt, opt_i); - else - opt = isl_qpolynomial_min_cst(opt, opt_i); - } - - FN(PW,free)(pw); - return opt; -} - -__isl_give isl_qpolynomial *FN(PW,max)(__isl_take PW *pw) -{ - return FN(PW,opt)(pw, 1); -} - -__isl_give isl_qpolynomial *FN(PW,min)(__isl_take PW *pw) -{ - return FN(PW,opt)(pw, 0); -} -#endif - -__isl_give isl_space *FN(PW,get_space)(__isl_keep PW *pw) -{ - return pw ? isl_space_copy(pw->dim) : NULL; -} - -__isl_give isl_space *FN(PW,get_domain_space)(__isl_keep PW *pw) -{ - return pw ? isl_space_domain(isl_space_copy(pw->dim)) : NULL; -} - -#ifndef NO_RESET_DIM -/* Reset the space of "pw". Since we don't know if the elements - * represent the spaces themselves or their domains, we pass along - * both when we call their reset_space_and_domain. - */ -static __isl_give PW *FN(PW,reset_space_and_domain)(__isl_take PW *pw, - __isl_take isl_space *space, __isl_take isl_space *domain) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw || !space || !domain) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_reset_space(pw->p[i].set, - isl_space_copy(domain)); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,reset_space_and_domain)(pw->p[i].FIELD, - isl_space_copy(space), isl_space_copy(domain)); - if (!pw->p[i].FIELD) - goto error; - } - - isl_space_free(domain); - - isl_space_free(pw->dim); - pw->dim = space; - - return pw; -error: - isl_space_free(domain); - isl_space_free(space); - FN(PW,free)(pw); - return NULL; -} - -__isl_give PW *FN(PW,reset_domain_space)(__isl_take PW *pw, - __isl_take isl_space *domain) -{ - isl_space *space; - - space = isl_space_extend_domain_with_range(isl_space_copy(domain), - FN(PW,get_space)(pw)); - return FN(PW,reset_space_and_domain)(pw, space, domain); -} - -__isl_give PW *FN(PW,reset_space)(__isl_take PW *pw, __isl_take isl_space *dim) -{ - isl_space *domain; - - domain = isl_space_domain(isl_space_copy(dim)); - return FN(PW,reset_space_and_domain)(pw, dim, domain); -} - -__isl_give PW *FN(PW,set_tuple_id)(__isl_keep PW *pw, enum isl_dim_type type, - __isl_take isl_id *id) -{ - isl_space *space; - - pw = FN(PW,cow)(pw); - if (!pw) - return isl_id_free(id); - - space = FN(PW,get_space)(pw); - space = isl_space_set_tuple_id(space, type, id); - - return FN(PW,reset_space)(pw, space); -} - -__isl_give PW *FN(PW,set_dim_id)(__isl_take PW *pw, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - pw = FN(PW,cow)(pw); - if (!pw) - return isl_id_free(id); - pw->dim = isl_space_set_dim_id(pw->dim, type, pos, id); - return FN(PW,reset_space)(pw, isl_space_copy(pw->dim)); -} -#endif - -int FN(PW,has_equal_space)(__isl_keep PW *pw1, __isl_keep PW *pw2) -{ - if (!pw1 || !pw2) - return -1; - - return isl_space_is_equal(pw1->dim, pw2->dim); -} - -#ifndef NO_MORPH -__isl_give PW *FN(PW,morph_domain)(__isl_take PW *pw, - __isl_take isl_morph *morph) -{ - int i; - isl_ctx *ctx; - - if (!pw || !morph) - goto error; - - ctx = isl_space_get_ctx(pw->dim); - isl_assert(ctx, isl_space_is_domain(morph->dom->dim, pw->dim), - goto error); - - pw = FN(PW,cow)(pw); - if (!pw) - goto error; - pw->dim = isl_space_extend_domain_with_range( - isl_space_copy(morph->ran->dim), pw->dim); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_morph_set(isl_morph_copy(morph), pw->p[i].set); - if (!pw->p[i].set) - goto error; - pw->p[i].FIELD = FN(EL,morph_domain)(pw->p[i].FIELD, - isl_morph_copy(morph)); - if (!pw->p[i].FIELD) - goto error; - } - - isl_morph_free(morph); - - return pw; -error: - FN(PW,free)(pw); - isl_morph_free(morph); - return NULL; -} -#endif - -int FN(PW,foreach_piece)(__isl_keep PW *pw, - int (*fn)(__isl_take isl_set *set, __isl_take EL *el, void *user), - void *user) -{ - int i; - - if (!pw) - return -1; - - for (i = 0; i < pw->n; ++i) - if (fn(isl_set_copy(pw->p[i].set), - FN(EL,copy)(pw->p[i].FIELD), user) < 0) - return -1; - - return 0; -} - -#ifndef NO_LIFT -static int any_divs(__isl_keep isl_set *set) -{ - int i; - - if (!set) - return -1; - - for (i = 0; i < set->n; ++i) - if (set->p[i]->n_div > 0) - return 1; - - return 0; -} - -static int foreach_lifted_subset(__isl_take isl_set *set, __isl_take EL *el, - int (*fn)(__isl_take isl_set *set, __isl_take EL *el, - void *user), void *user) -{ - int i; - - if (!set || !el) - goto error; - - for (i = 0; i < set->n; ++i) { - isl_set *lift; - EL *copy; - - lift = isl_set_from_basic_set(isl_basic_set_copy(set->p[i])); - lift = isl_set_lift(lift); - - copy = FN(EL,copy)(el); - copy = FN(EL,lift)(copy, isl_set_get_space(lift)); - - if (fn(lift, copy, user) < 0) - goto error; - } - - isl_set_free(set); - FN(EL,free)(el); - - return 0; -error: - isl_set_free(set); - FN(EL,free)(el); - return -1; -} - -int FN(PW,foreach_lifted_piece)(__isl_keep PW *pw, - int (*fn)(__isl_take isl_set *set, __isl_take EL *el, - void *user), void *user) -{ - int i; - - if (!pw) - return -1; - - for (i = 0; i < pw->n; ++i) { - isl_set *set; - EL *el; - - set = isl_set_copy(pw->p[i].set); - el = FN(EL,copy)(pw->p[i].FIELD); - if (!any_divs(set)) { - if (fn(set, el, user) < 0) - return -1; - continue; - } - if (foreach_lifted_subset(set, el, fn, user) < 0) - return -1; - } - - return 0; -} -#endif - -#ifndef NO_MOVE_DIMS -__isl_give PW *FN(PW,move_dims)(__isl_take PW *pw, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - - pw->dim = isl_space_move_dims(pw->dim, dst_type, dst_pos, src_type, src_pos, n); - if (!pw->dim) - goto error; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].FIELD = FN(EL,move_dims)(pw->p[i].FIELD, - dst_type, dst_pos, src_type, src_pos, n); - if (!pw->p[i].FIELD) - goto error; - } - - if (dst_type == isl_dim_in) - dst_type = isl_dim_set; - if (src_type == isl_dim_in) - src_type = isl_dim_set; - - for (i = 0; i < pw->n; ++i) { - pw->p[i].set = isl_set_move_dims(pw->p[i].set, - dst_type, dst_pos, - src_type, src_pos, n); - if (!pw->p[i].set) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} -#endif - -__isl_give PW *FN(PW,mul_isl_int)(__isl_take PW *pw, isl_int v) -{ - int i; - - if (isl_int_is_one(v)) - return pw; - if (pw && DEFAULT_IS_ZERO && isl_int_is_zero(v)) { - PW *zero; - isl_space *dim = FN(PW,get_space)(pw); -#ifdef HAS_TYPE - zero = FN(PW,ZERO)(dim, pw->type); -#else - zero = FN(PW,ZERO)(dim); -#endif - FN(PW,free)(pw); - return zero; - } - pw = FN(PW,cow)(pw); - if (!pw) - return NULL; - if (pw->n == 0) - return pw; - -#ifdef HAS_TYPE - if (isl_int_is_neg(v)) - pw->type = isl_fold_type_negate(pw->type); -#endif - for (i = 0; i < pw->n; ++i) { - pw->p[i].FIELD = FN(EL,scale)(pw->p[i].FIELD, v); - if (!pw->p[i].FIELD) - goto error; - } - - return pw; -error: - FN(PW,free)(pw); - return NULL; -} - -__isl_give PW *FN(PW,scale)(__isl_take PW *pw, isl_int v) -{ - return FN(PW,mul_isl_int)(pw, v); -} - -static int FN(PW,qsort_set_cmp)(const void *p1, const void *p2) -{ - const isl_set *set1 = *(const isl_set **)p1; - const isl_set *set2 = *(const isl_set **)p2; - - return isl_set_plain_cmp(set1, set2); -} - -/* We normalize in place, but if anything goes wrong we need - * to return NULL, so we need to make sure we don't change the - * meaning of any possible other copies of map. - */ -__isl_give PW *FN(PW,normalize)(__isl_take PW *pw) -{ - int i, j; - isl_set *set; - - if (!pw) - return NULL; - for (i = 0; i < pw->n; ++i) { - set = isl_set_normalize(isl_set_copy(pw->p[i].set)); - if (!set) - return FN(PW,free)(pw); - isl_set_free(pw->p[i].set); - pw->p[i].set = set; - } - qsort(pw->p, pw->n, sizeof(pw->p[0]), &FN(PW,qsort_set_cmp)); - for (i = pw->n - 1; i >= 1; --i) { - if (!isl_set_plain_is_equal(pw->p[i - 1].set, pw->p[i].set)) - continue; - if (!FN(EL,plain_is_equal)(pw->p[i - 1].FIELD, pw->p[i].FIELD)) - continue; - set = isl_set_union(isl_set_copy(pw->p[i - 1].set), - isl_set_copy(pw->p[i].set)); - if (!set) - return FN(PW,free)(pw); - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - isl_set_free(pw->p[i - 1].set); - pw->p[i - 1].set = set; - for (j = i + 1; j < pw->n; ++j) - pw->p[j - 1] = pw->p[j]; - pw->n--; - } - - return pw; -} - -/* Is pw1 obviously equal to pw2? - * That is, do they have obviously identical cells and obviously identical - * elements on each cell? - */ -int FN(PW,plain_is_equal)(__isl_keep PW *pw1, __isl_keep PW *pw2) -{ - int i; - int equal; - - if (!pw1 || !pw2) - return -1; - - if (pw1 == pw2) - return 1; - if (!isl_space_is_equal(pw1->dim, pw2->dim)) - return 0; - - pw1 = FN(PW,copy)(pw1); - pw2 = FN(PW,copy)(pw2); - pw1 = FN(PW,normalize)(pw1); - pw2 = FN(PW,normalize)(pw2); - if (!pw1 || !pw2) - goto error; - - equal = pw1->n == pw2->n; - for (i = 0; equal && i < pw1->n; ++i) { - equal = isl_set_plain_is_equal(pw1->p[i].set, pw2->p[i].set); - if (equal < 0) - goto error; - if (!equal) - break; - equal = FN(EL,plain_is_equal)(pw1->p[i].FIELD, pw2->p[i].FIELD); - if (equal < 0) - goto error; - } - - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return equal; -error: - FN(PW,free)(pw1); - FN(PW,free)(pw2); - return -1; -} diff --git a/cloog-0.17.0/isl/isl_qsort.c b/cloog-0.17.0/isl/isl_qsort.c deleted file mode 100644 index 3183048916c4690018613e2ecea01f879f5e723f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_qsort.c +++ /dev/null @@ -1,249 +0,0 @@ -/* Copyright (C) 1991,1992,1996,1997,1999,2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Douglas C. Schmidt (schmidt@ics.uci.edu). - - The GNU C Library 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 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* If you consider tuning this algorithm, you should consult first: - Engineering a sort function; Jon Bentley and M. Douglas McIlroy; - Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993. */ - -#include -#include -#include -#include - -/* Byte-wise swap two items of size SIZE. */ -#define SWAP(a, b, size) \ - do \ - { \ - register size_t __size = (size); \ - register char *__a = (a), *__b = (b); \ - do \ - { \ - char __tmp = *__a; \ - *__a++ = *__b; \ - *__b++ = __tmp; \ - } while (--__size > 0); \ - } while (0) - -/* Discontinue quicksort algorithm when partition gets below this size. - This particular magic number was chosen to work best on a Sun 4/260. */ -#define MAX_THRESH 4 - -/* Stack node declarations used to store unfulfilled partition obligations. */ -typedef struct - { - char *lo; - char *hi; - } stack_node; - -/* The next 4 #defines implement a very fast in-line stack abstraction. */ -/* The stack needs log (total_elements) entries (we could even subtract - log(MAX_THRESH)). Since total_elements has type size_t, we get as - upper bound for log (total_elements): - bits per byte (CHAR_BIT) * sizeof(size_t). */ -#define STACK_SIZE (CHAR_BIT * sizeof(size_t)) -#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) -#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) -#define STACK_NOT_EMPTY (stack < top) - - -/* Order size using quicksort. This implementation incorporates - four optimizations discussed in Sedgewick: - - 1. Non-recursive, using an explicit stack of pointer that store the - next array partition to sort. To save time, this maximum amount - of space required to store an array of SIZE_MAX is allocated on the - stack. Assuming a 32-bit (64 bit) integer for size_t, this needs - only 32 * sizeof(stack_node) == 256 bytes (for 64 bit: 1024 bytes). - Pretty cheap, actually. - - 2. Chose the pivot element using a median-of-three decision tree. - This reduces the probability of selecting a bad pivot value and - eliminates certain extraneous comparisons. - - 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving - insertion sort to order the MAX_THRESH items within each partition. - This is a big win, since insertion sort is faster for small, mostly - sorted array segments. - - 4. The larger of the two sub-partitions is always pushed onto the - stack first, with the algorithm then concentrating on the - smaller partition. This *guarantees* no more than log (total_elems) - stack size is needed (actually O(1) in this case)! */ - -void isl_quicksort (void *const pbase, size_t total_elems, size_t size, - int (*cmp)(const void *, const void *, void *arg), void *arg) -{ - register char *base_ptr = (char *) pbase; - - const size_t max_thresh = MAX_THRESH * size; - - if (total_elems == 0) - /* Avoid lossage with unsigned arithmetic below. */ - return; - - if (total_elems > MAX_THRESH) - { - char *lo = base_ptr; - char *hi = &lo[size * (total_elems - 1)]; - stack_node stack[STACK_SIZE]; - stack_node *top = stack; - - PUSH (NULL, NULL); - - while (STACK_NOT_EMPTY) - { - char *left_ptr; - char *right_ptr; - - /* Select median value from among LO, MID, and HI. Rearrange - LO and HI so the three values are sorted. This lowers the - probability of picking a pathological pivot value and - skips a comparison for both the LEFT_PTR and RIGHT_PTR in - the while loops. */ - - char *mid = lo + size * ((hi - lo) / size >> 1); - - if ((*cmp) ((void *) mid, (void *) lo, arg) < 0) - SWAP (mid, lo, size); - if ((*cmp) ((void *) hi, (void *) mid, arg) < 0) - SWAP (mid, hi, size); - else - goto jump_over; - if ((*cmp) ((void *) mid, (void *) lo, arg) < 0) - SWAP (mid, lo, size); - jump_over:; - - left_ptr = lo + size; - right_ptr = hi - size; - - /* Here's the famous ``collapse the walls'' section of quicksort. - Gotta like those tight inner loops! They are the main reason - that this algorithm runs much faster than others. */ - do - { - while ((*cmp) ((void *) left_ptr, (void *) mid, arg) < 0) - left_ptr += size; - - while ((*cmp) ((void *) mid, (void *) right_ptr, arg) < 0) - right_ptr -= size; - - if (left_ptr < right_ptr) - { - SWAP (left_ptr, right_ptr, size); - if (mid == left_ptr) - mid = right_ptr; - else if (mid == right_ptr) - mid = left_ptr; - left_ptr += size; - right_ptr -= size; - } - else if (left_ptr == right_ptr) - { - left_ptr += size; - right_ptr -= size; - break; - } - } - while (left_ptr <= right_ptr); - - /* Set up pointers for next iteration. First determine whether - left and right partitions are below the threshold size. If so, - ignore one or both. Otherwise, push the larger partition's - bounds on the stack and continue sorting the smaller one. */ - - if ((size_t) (right_ptr - lo) <= max_thresh) - { - if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore both small partitions. */ - POP (lo, hi); - else - /* Ignore small left partition. */ - lo = left_ptr; - } - else if ((size_t) (hi - left_ptr) <= max_thresh) - /* Ignore small right partition. */ - hi = right_ptr; - else if ((right_ptr - lo) > (hi - left_ptr)) - { - /* Push larger left partition indices. */ - PUSH (lo, right_ptr); - lo = left_ptr; - } - else - { - /* Push larger right partition indices. */ - PUSH (left_ptr, hi); - hi = right_ptr; - } - } - } - - /* Once the BASE_PTR array is partially sorted by quicksort the rest - is completely sorted using insertion sort, since this is efficient - for partitions below MAX_THRESH size. BASE_PTR points to the beginning - of the array to sort, and END_PTR points at the very last element in - the array (*not* one beyond it!). */ - -#define min(x, y) ((x) < (y) ? (x) : (y)) - - { - char *const end_ptr = &base_ptr[size * (total_elems - 1)]; - char *tmp_ptr = base_ptr; - char *thresh = min(end_ptr, base_ptr + max_thresh); - register char *run_ptr; - - /* Find smallest element in first threshold and place it at the - array's beginning. This is the smallest array element, - and the operation speeds up insertion sort's inner loop. */ - - for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size) - if ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) - tmp_ptr = run_ptr; - - if (tmp_ptr != base_ptr) - SWAP (tmp_ptr, base_ptr, size); - - /* Insertion sort, running from left-hand-side up to right-hand-side. */ - - run_ptr = base_ptr + size; - while ((run_ptr += size) <= end_ptr) - { - tmp_ptr = run_ptr - size; - while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0) - tmp_ptr -= size; - - tmp_ptr += size; - if (tmp_ptr != run_ptr) - { - char *trav; - - trav = run_ptr + size; - while (--trav >= run_ptr) - { - char c = *trav; - char *hi, *lo; - - for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo) - *hi = *lo; - *hi = c; - } - } - } - } -} diff --git a/cloog-0.17.0/isl/isl_qsort.h b/cloog-0.17.0/isl/isl_qsort.h deleted file mode 100644 index 5ca1634205921264c2d3418a4074e630162ba7b6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_qsort.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ISL_QSORT_H -#define ISL_QSORT_H - -void isl_quicksort (void *const pbase, size_t total_elems, size_t size, - int (*cmp)(const void *, const void *, void *arg), void *arg); - -#endif diff --git a/cloog-0.17.0/isl/isl_range.c b/cloog-0.17.0/isl/isl_range.c deleted file mode 100644 index 2653fc4e733c2ced2329ebf7959e79b47b3e58db..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_range.c +++ /dev/null @@ -1,491 +0,0 @@ -#include -#include -#include -#include -#include -#include - -struct range_data { - struct isl_bound *bound; - int *signs; - int sign; - int test_monotonicity; - int monotonicity; - int tight; - isl_qpolynomial *poly; - isl_pw_qpolynomial_fold *pwf; - isl_pw_qpolynomial_fold *pwf_tight; -}; - -static int propagate_on_domain(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data); - -/* Check whether the polynomial "poly" has sign "sign" over "bset", - * i.e., if sign == 1, check that the lower bound on the polynomial - * is non-negative and if sign == -1, check that the upper bound on - * the polynomial is non-positive. - */ -static int has_sign(__isl_keep isl_basic_set *bset, - __isl_keep isl_qpolynomial *poly, int sign, int *signs) -{ - struct range_data data_m; - unsigned nvar; - unsigned nparam; - isl_space *dim; - isl_qpolynomial *opt; - int r; - enum isl_fold type; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - bset = isl_basic_set_copy(bset); - poly = isl_qpolynomial_copy(poly); - - bset = isl_basic_set_move_dims(bset, isl_dim_set, 0, - isl_dim_param, 0, nparam); - poly = isl_qpolynomial_move_dims(poly, isl_dim_in, 0, - isl_dim_param, 0, nparam); - - dim = isl_qpolynomial_get_space(poly); - dim = isl_space_params(dim); - dim = isl_space_from_domain(dim); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - - data_m.test_monotonicity = 0; - data_m.signs = signs; - data_m.sign = -sign; - type = data_m.sign < 0 ? isl_fold_min : isl_fold_max; - data_m.pwf = isl_pw_qpolynomial_fold_zero(dim, type); - data_m.tight = 0; - data_m.pwf_tight = NULL; - - if (propagate_on_domain(bset, poly, &data_m) < 0) - goto error; - - if (sign > 0) - opt = isl_pw_qpolynomial_fold_min(data_m.pwf); - else - opt = isl_pw_qpolynomial_fold_max(data_m.pwf); - - if (!opt) - r = -1; - else if (isl_qpolynomial_is_nan(opt) || - isl_qpolynomial_is_infty(opt) || - isl_qpolynomial_is_neginfty(opt)) - r = 0; - else - r = sign * isl_qpolynomial_sgn(opt) >= 0; - - isl_qpolynomial_free(opt); - - return r; -error: - isl_pw_qpolynomial_fold_free(data_m.pwf); - return -1; -} - -/* Return 1 if poly is monotonically increasing in the last set variable, - * -1 if poly is monotonically decreasing in the last set variable, - * 0 if no conclusion, - * -2 on error. - * - * We simply check the sign of p(x+1)-p(x) - */ -static int monotonicity(__isl_keep isl_basic_set *bset, - __isl_keep isl_qpolynomial *poly, struct range_data *data) -{ - isl_ctx *ctx; - isl_space *dim; - isl_qpolynomial *sub = NULL; - isl_qpolynomial *diff = NULL; - int result = 0; - int s; - unsigned nvar; - - ctx = isl_qpolynomial_get_ctx(poly); - dim = isl_qpolynomial_get_domain_space(poly); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - sub = isl_qpolynomial_var_on_domain(isl_space_copy(dim), isl_dim_set, nvar - 1); - sub = isl_qpolynomial_add(sub, - isl_qpolynomial_rat_cst_on_domain(dim, ctx->one, ctx->one)); - - diff = isl_qpolynomial_substitute(isl_qpolynomial_copy(poly), - isl_dim_in, nvar - 1, 1, &sub); - diff = isl_qpolynomial_sub(diff, isl_qpolynomial_copy(poly)); - - s = has_sign(bset, diff, 1, data->signs); - if (s < 0) - goto error; - if (s) - result = 1; - else { - s = has_sign(bset, diff, -1, data->signs); - if (s < 0) - goto error; - if (s) - result = -1; - } - - isl_qpolynomial_free(diff); - isl_qpolynomial_free(sub); - - return result; -error: - isl_qpolynomial_free(diff); - isl_qpolynomial_free(sub); - return -2; -} - -static __isl_give isl_qpolynomial *bound2poly(__isl_take isl_constraint *bound, - __isl_take isl_space *dim, unsigned pos, int sign) -{ - if (!bound) { - if (sign > 0) - return isl_qpolynomial_infty_on_domain(dim); - else - return isl_qpolynomial_neginfty_on_domain(dim); - } - isl_space_free(dim); - return isl_qpolynomial_from_constraint(bound, isl_dim_set, pos); -} - -static int bound_is_integer(__isl_take isl_constraint *bound, unsigned pos) -{ - isl_int c; - int is_int; - - if (!bound) - return 1; - - isl_int_init(c); - isl_constraint_get_coefficient(bound, isl_dim_set, pos, &c); - is_int = isl_int_is_one(c) || isl_int_is_negone(c); - isl_int_clear(c); - - return is_int; -} - -struct isl_fixed_sign_data { - int *signs; - int sign; - isl_qpolynomial *poly; -}; - -/* Add term "term" to data->poly if it has sign data->sign. - * The sign is determined based on the signs of the parameters - * and variables in data->signs. The integer divisions, if - * any, are assumed to be non-negative. - */ -static int collect_fixed_sign_terms(__isl_take isl_term *term, void *user) -{ - struct isl_fixed_sign_data *data = (struct isl_fixed_sign_data *)user; - isl_int n; - int i; - int sign; - unsigned nparam; - unsigned nvar; - - if (!term) - return -1; - - nparam = isl_term_dim(term, isl_dim_param); - nvar = isl_term_dim(term, isl_dim_set); - - isl_int_init(n); - - isl_term_get_num(term, &n); - - sign = isl_int_sgn(n); - for (i = 0; i < nparam; ++i) { - if (data->signs[i] > 0) - continue; - if (isl_term_get_exp(term, isl_dim_param, i) % 2) - sign = -sign; - } - for (i = 0; i < nvar; ++i) { - if (data->signs[nparam + i] > 0) - continue; - if (isl_term_get_exp(term, isl_dim_set, i) % 2) - sign = -sign; - } - - if (sign == data->sign) { - isl_qpolynomial *t = isl_qpolynomial_from_term(term); - - data->poly = isl_qpolynomial_add(data->poly, t); - } else - isl_term_free(term); - - isl_int_clear(n); - - return 0; -} - -/* Construct and return a polynomial that consists of the terms - * in "poly" that have sign "sign". The integer divisions, if - * any, are assumed to be non-negative. - */ -__isl_give isl_qpolynomial *isl_qpolynomial_terms_of_sign( - __isl_keep isl_qpolynomial *poly, int *signs, int sign) -{ - isl_space *space; - struct isl_fixed_sign_data data = { signs, sign }; - - space = isl_qpolynomial_get_domain_space(poly); - data.poly = isl_qpolynomial_zero_on_domain(space); - - if (isl_qpolynomial_foreach_term(poly, collect_fixed_sign_terms, &data) < 0) - goto error; - - return data.poly; -error: - isl_qpolynomial_free(data.poly); - return NULL; -} - -/* Helper function to add a guarded polynomial to either pwf_tight or pwf, - * depending on whether the result has been determined to be tight. - */ -static int add_guarded_poly(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data) -{ - enum isl_fold type = data->sign < 0 ? isl_fold_min : isl_fold_max; - isl_set *set; - isl_qpolynomial_fold *fold; - isl_pw_qpolynomial_fold *pwf; - - bset = isl_basic_set_params(bset); - poly = isl_qpolynomial_project_domain_on_params(poly); - - fold = isl_qpolynomial_fold_alloc(type, poly); - set = isl_set_from_basic_set(bset); - pwf = isl_pw_qpolynomial_fold_alloc(type, set, fold); - if (data->tight) - data->pwf_tight = isl_pw_qpolynomial_fold_fold( - data->pwf_tight, pwf); - else - data->pwf = isl_pw_qpolynomial_fold_fold(data->pwf, pwf); - - return 0; -} - -/* Given a lower and upper bound on the final variable and constraints - * on the remaining variables where these bounds are active, - * eliminate the variable from data->poly based on these bounds. - * If the polynomial has been determined to be monotonic - * in the variable, then simply plug in the appropriate bound. - * If the current polynomial is tight and if this bound is integer, - * then the result is still tight. In all other cases, the results - * may not be tight. - * Otherwise, plug in the largest bound (in absolute value) in - * the positive terms (if an upper bound is wanted) or the negative terms - * (if a lower bounded is wanted) and the other bound in the other terms. - * - * If all variables have been eliminated, then record the result. - * Ohterwise, recurse on the next variable. - */ -static int propagate_on_bound_pair(__isl_take isl_constraint *lower, - __isl_take isl_constraint *upper, __isl_take isl_basic_set *bset, - void *user) -{ - struct range_data *data = (struct range_data *)user; - int save_tight = data->tight; - isl_qpolynomial *poly; - int r; - unsigned nvar; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - if (data->monotonicity) { - isl_qpolynomial *sub; - isl_space *dim = isl_qpolynomial_get_domain_space(data->poly); - if (data->monotonicity * data->sign > 0) { - if (data->tight) - data->tight = bound_is_integer(upper, nvar); - sub = bound2poly(upper, dim, nvar, 1); - isl_constraint_free(lower); - } else { - if (data->tight) - data->tight = bound_is_integer(lower, nvar); - sub = bound2poly(lower, dim, nvar, -1); - isl_constraint_free(upper); - } - poly = isl_qpolynomial_copy(data->poly); - poly = isl_qpolynomial_substitute(poly, isl_dim_in, nvar, 1, &sub); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_in, nvar, 1); - - isl_qpolynomial_free(sub); - } else { - isl_qpolynomial *l, *u; - isl_qpolynomial *pos, *neg; - isl_space *dim = isl_qpolynomial_get_domain_space(data->poly); - unsigned nparam = isl_basic_set_dim(bset, isl_dim_param); - int sign = data->sign * data->signs[nparam + nvar]; - - data->tight = 0; - - u = bound2poly(upper, isl_space_copy(dim), nvar, 1); - l = bound2poly(lower, dim, nvar, -1); - - pos = isl_qpolynomial_terms_of_sign(data->poly, data->signs, sign); - neg = isl_qpolynomial_terms_of_sign(data->poly, data->signs, -sign); - - pos = isl_qpolynomial_substitute(pos, isl_dim_in, nvar, 1, &u); - neg = isl_qpolynomial_substitute(neg, isl_dim_in, nvar, 1, &l); - - poly = isl_qpolynomial_add(pos, neg); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_in, nvar, 1); - - isl_qpolynomial_free(u); - isl_qpolynomial_free(l); - } - - if (isl_basic_set_dim(bset, isl_dim_set) == 0) - r = add_guarded_poly(bset, poly, data); - else - r = propagate_on_domain(bset, poly, data); - - data->tight = save_tight; - - return r; -} - -/* Recursively perform range propagation on the polynomial "poly" - * defined over the basic set "bset" and collect the results in "data". - */ -static int propagate_on_domain(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data) -{ - isl_ctx *ctx; - isl_qpolynomial *save_poly = data->poly; - int save_monotonicity = data->monotonicity; - unsigned d; - - if (!bset || !poly) - goto error; - - ctx = isl_basic_set_get_ctx(bset); - d = isl_basic_set_dim(bset, isl_dim_set); - isl_assert(ctx, d >= 1, goto error); - - if (isl_qpolynomial_is_cst(poly, NULL, NULL)) { - bset = isl_basic_set_project_out(bset, isl_dim_set, 0, d); - poly = isl_qpolynomial_drop_dims(poly, isl_dim_in, 0, d); - return add_guarded_poly(bset, poly, data); - } - - if (data->test_monotonicity) - data->monotonicity = monotonicity(bset, poly, data); - else - data->monotonicity = 0; - if (data->monotonicity < -1) - goto error; - - data->poly = poly; - if (isl_basic_set_foreach_bound_pair(bset, isl_dim_set, d - 1, - &propagate_on_bound_pair, data) < 0) - goto error; - - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - data->monotonicity = save_monotonicity; - data->poly = save_poly; - - return 0; -error: - isl_basic_set_free(bset); - isl_qpolynomial_free(poly); - data->monotonicity = save_monotonicity; - data->poly = save_poly; - return -1; -} - -static int basic_guarded_poly_bound(__isl_take isl_basic_set *bset, void *user) -{ - struct range_data *data = (struct range_data *)user; - isl_ctx *ctx; - unsigned nparam = isl_basic_set_dim(bset, isl_dim_param); - unsigned dim = isl_basic_set_dim(bset, isl_dim_set); - int r; - - data->signs = NULL; - - ctx = isl_basic_set_get_ctx(bset); - data->signs = isl_alloc_array(ctx, int, - isl_basic_set_dim(bset, isl_dim_all)); - - if (isl_basic_set_dims_get_sign(bset, isl_dim_set, 0, dim, - data->signs + nparam) < 0) - goto error; - if (isl_basic_set_dims_get_sign(bset, isl_dim_param, 0, nparam, - data->signs) < 0) - goto error; - - r = propagate_on_domain(bset, isl_qpolynomial_copy(data->poly), data); - - free(data->signs); - - return r; -error: - free(data->signs); - isl_basic_set_free(bset); - return -1; -} - -static int qpolynomial_bound_on_domain_range(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct range_data *data) -{ - unsigned nparam = isl_basic_set_dim(bset, isl_dim_param); - unsigned nvar = isl_basic_set_dim(bset, isl_dim_set); - isl_set *set; - - if (!bset) - goto error; - - if (nvar == 0) - return add_guarded_poly(bset, poly, data); - - set = isl_set_from_basic_set(bset); - set = isl_set_split_dims(set, isl_dim_param, 0, nparam); - set = isl_set_split_dims(set, isl_dim_set, 0, nvar); - - data->poly = poly; - - data->test_monotonicity = 1; - if (isl_set_foreach_basic_set(set, &basic_guarded_poly_bound, data) < 0) - goto error; - - isl_set_free(set); - isl_qpolynomial_free(poly); - - return 0; -error: - isl_set_free(set); - isl_qpolynomial_free(poly); - return -1; -} - -int isl_qpolynomial_bound_on_domain_range(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound) -{ - struct range_data data; - int r; - - data.pwf = bound->pwf; - data.pwf_tight = bound->pwf_tight; - data.tight = bound->check_tight; - if (bound->type == isl_fold_min) - data.sign = -1; - else - data.sign = 1; - - r = qpolynomial_bound_on_domain_range(bset, poly, &data); - - bound->pwf = data.pwf; - bound->pwf_tight = data.pwf_tight; - - return r; -} diff --git a/cloog-0.17.0/isl/isl_range.h b/cloog-0.17.0/isl/isl_range.h deleted file mode 100644 index c0970790d9e38c29556f9a5382888ae19d7f9cea..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_range.h +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int isl_qpolynomial_bound_on_domain_range(__isl_take isl_basic_set *bset, - __isl_take isl_qpolynomial *poly, struct isl_bound *bound); -__isl_give isl_qpolynomial *isl_qpolynomial_terms_of_sign( - __isl_keep isl_qpolynomial *poly, int *signs, int sign); diff --git a/cloog-0.17.0/isl/isl_reordering.c b/cloog-0.17.0/isl/isl_reordering.c deleted file mode 100644 index d99d7ac8b653ce8208b7ef5ed1791207be0ffa0e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_reordering.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include - -__isl_give isl_reordering *isl_reordering_alloc(isl_ctx *ctx, int len) -{ - isl_reordering *exp; - - exp = isl_alloc(ctx, struct isl_reordering, - sizeof(struct isl_reordering) + (len - 1) * sizeof(int)); - if (!exp) - return NULL; - - exp->ref = 1; - exp->len = len; - exp->dim = NULL; - - return exp; -} - -__isl_give isl_reordering *isl_reordering_copy(__isl_keep isl_reordering *exp) -{ - if (!exp) - return NULL; - - exp->ref++; - return exp; -} - -__isl_give isl_reordering *isl_reordering_dup(__isl_keep isl_reordering *r) -{ - int i; - isl_reordering *dup; - - if (!r) - return NULL; - - dup = isl_reordering_alloc(r->dim->ctx, r->len); - if (!dup) - return NULL; - - dup->dim = isl_space_copy(r->dim); - if (!dup->dim) - return isl_reordering_free(dup); - for (i = 0; i < dup->len; ++i) - dup->pos[i] = r->pos[i]; - - return dup; -} - -__isl_give isl_reordering *isl_reordering_cow(__isl_take isl_reordering *r) -{ - if (!r) - return NULL; - - if (r->ref == 1) - return r; - r->ref--; - return isl_reordering_dup(r); -} - -void *isl_reordering_free(__isl_take isl_reordering *exp) -{ - if (!exp) - return NULL; - - if (--exp->ref > 0) - return NULL; - - isl_space_free(exp->dim); - free(exp); - return NULL; -} - -/* Construct a reordering that maps the parameters of "alignee" - * to the corresponding parameters in a new dimension specification - * that has the parameters of "aligner" first, followed by - * any remaining parameters of "alignee" that do not occur in "aligner". - */ -__isl_give isl_reordering *isl_parameter_alignment_reordering( - __isl_keep isl_space *alignee, __isl_keep isl_space *aligner) -{ - int i, j; - isl_reordering *exp; - - if (!alignee || !aligner) - return NULL; - - exp = isl_reordering_alloc(alignee->ctx, alignee->nparam); - if (!exp) - return NULL; - - exp->dim = isl_space_copy(aligner); - - for (i = 0; i < alignee->nparam; ++i) { - isl_id *id_i; - id_i = isl_space_get_dim_id(alignee, isl_dim_param, i); - if (!id_i) - isl_die(alignee->ctx, isl_error_invalid, - "cannot align unnamed parameters", goto error); - for (j = 0; j < aligner->nparam; ++j) { - isl_id *id_j; - id_j = isl_space_get_dim_id(aligner, isl_dim_param, j); - isl_id_free(id_j); - if (id_i == id_j) - break; - } - if (j < aligner->nparam) { - exp->pos[i] = j; - isl_id_free(id_i); - } else { - int pos; - pos = isl_space_dim(exp->dim, isl_dim_param); - exp->dim = isl_space_add_dims(exp->dim, isl_dim_param, 1); - exp->dim = isl_space_set_dim_id(exp->dim, - isl_dim_param, pos, id_i); - exp->pos[i] = pos; - } - } - - return exp; -error: - isl_reordering_free(exp); - return NULL; -} - -__isl_give isl_reordering *isl_reordering_extend(__isl_take isl_reordering *exp, - unsigned extra) -{ - int i; - isl_reordering *res; - int offset; - - if (!exp) - return NULL; - if (extra == 0) - return exp; - - offset = isl_space_dim(exp->dim, isl_dim_all) - exp->len; - res = isl_reordering_alloc(exp->dim->ctx, exp->len + extra); - if (!res) - goto error; - res->dim = isl_space_copy(exp->dim); - for (i = 0; i < exp->len; ++i) - res->pos[i] = exp->pos[i]; - for (i = exp->len; i < res->len; ++i) - res->pos[i] = offset + i; - - isl_reordering_free(exp); - - return res; -error: - isl_reordering_free(exp); - return NULL; -} - -__isl_give isl_reordering *isl_reordering_extend_space( - __isl_take isl_reordering *exp, __isl_take isl_space *dim) -{ - isl_reordering *res; - - if (!exp || !dim) - goto error; - - res = isl_reordering_extend(isl_reordering_copy(exp), - isl_space_dim(dim, isl_dim_all) - exp->len); - res = isl_reordering_cow(res); - if (!res) - goto error; - isl_space_free(res->dim); - res->dim = isl_space_replace(dim, isl_dim_param, exp->dim); - - isl_reordering_free(exp); - - return res; -error: - isl_reordering_free(exp); - isl_space_free(dim); - return NULL; -} - -void isl_reordering_dump(__isl_keep isl_reordering *exp) -{ - int i; - - for (i = 0; i < exp->len; ++i) - fprintf(stderr, "%d -> %d; ", i, exp->pos[i]); - fprintf(stderr, "\n"); -} diff --git a/cloog-0.17.0/isl/isl_reordering.h b/cloog-0.17.0/isl/isl_reordering.h deleted file mode 100644 index ac5b6facaba3a00c682aa4028d06b509db93378a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_reordering.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef ISL_REORDERING_H -#define ISL_REORDERING_H - -#include - -/* pos maps original dimensions to new dimensions. - * The final dimension is given by dim. - * The number of dimensions (i.e., the range of values) in the result - * may be larger than the number of dimensions in the input. - * In particular, the possible values of the entries in pos ranges from 0 to - * the total dimension of dim - 1, unless isl_reordering_extend - * has been called. - */ -struct isl_reordering { - int ref; - isl_space *dim; - unsigned len; - int pos[1]; -}; -typedef struct isl_reordering isl_reordering; - -__isl_give isl_reordering *isl_parameter_alignment_reordering( - __isl_keep isl_space *alignee, __isl_keep isl_space *aligner); -__isl_give isl_reordering *isl_reordering_copy(__isl_keep isl_reordering *exp); -void *isl_reordering_free(__isl_take isl_reordering *exp); -__isl_give isl_reordering *isl_reordering_extend_space( - __isl_take isl_reordering *exp, __isl_take isl_space *dim); -__isl_give isl_reordering *isl_reordering_extend(__isl_take isl_reordering *exp, - unsigned extra); - -#endif diff --git a/cloog-0.17.0/isl/isl_sample.c b/cloog-0.17.0/isl/isl_sample.c deleted file mode 100644 index ec63745e5faf5bf0b3439aaa2b56059e811cec84..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_sample.c +++ /dev/null @@ -1,1358 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_sample.h" -#include "isl_sample_piplib.h" -#include -#include -#include -#include "isl_equalities.h" -#include "isl_tab.h" -#include "isl_basis_reduction.h" -#include -#include -#include - -static struct isl_vec *empty_sample(struct isl_basic_set *bset) -{ - struct isl_vec *vec; - - vec = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - return vec; -} - -/* Construct a zero sample of the same dimension as bset. - * As a special case, if bset is zero-dimensional, this - * function creates a zero-dimensional sample point. - */ -static struct isl_vec *zero_sample(struct isl_basic_set *bset) -{ - unsigned dim; - struct isl_vec *sample; - - dim = isl_basic_set_total_dim(bset); - sample = isl_vec_alloc(bset->ctx, 1 + dim); - if (sample) { - isl_int_set_si(sample->el[0], 1); - isl_seq_clr(sample->el + 1, dim); - } - isl_basic_set_free(bset); - return sample; -} - -static struct isl_vec *interval_sample(struct isl_basic_set *bset) -{ - int i; - isl_int t; - struct isl_vec *sample; - - bset = isl_basic_set_simplify(bset); - if (!bset) - return NULL; - if (isl_basic_set_plain_is_empty(bset)) - return empty_sample(bset); - if (bset->n_eq == 0 && bset->n_ineq == 0) - return zero_sample(bset); - - sample = isl_vec_alloc(bset->ctx, 2); - if (!sample) - goto error; - if (!bset) - return NULL; - isl_int_set_si(sample->block.data[0], 1); - - if (bset->n_eq > 0) { - isl_assert(bset->ctx, bset->n_eq == 1, goto error); - isl_assert(bset->ctx, bset->n_ineq == 0, goto error); - if (isl_int_is_one(bset->eq[0][1])) - isl_int_neg(sample->el[1], bset->eq[0][0]); - else { - isl_assert(bset->ctx, isl_int_is_negone(bset->eq[0][1]), - goto error); - isl_int_set(sample->el[1], bset->eq[0][0]); - } - isl_basic_set_free(bset); - return sample; - } - - isl_int_init(t); - if (isl_int_is_one(bset->ineq[0][1])) - isl_int_neg(sample->block.data[1], bset->ineq[0][0]); - else - isl_int_set(sample->block.data[1], bset->ineq[0][0]); - for (i = 1; i < bset->n_ineq; ++i) { - isl_seq_inner_product(sample->block.data, - bset->ineq[i], 2, &t); - if (isl_int_is_neg(t)) - break; - } - isl_int_clear(t); - if (i < bset->n_ineq) { - isl_vec_free(sample); - return empty_sample(bset); - } - - isl_basic_set_free(bset); - return sample; -error: - isl_basic_set_free(bset); - isl_vec_free(sample); - return NULL; -} - -static struct isl_mat *independent_bounds(struct isl_basic_set *bset) -{ - int i, j, n; - struct isl_mat *dirs = NULL; - struct isl_mat *bounds = NULL; - unsigned dim; - - if (!bset) - return NULL; - - dim = isl_basic_set_n_dim(bset); - bounds = isl_mat_alloc(bset->ctx, 1+dim, 1+dim); - if (!bounds) - return NULL; - - isl_int_set_si(bounds->row[0][0], 1); - isl_seq_clr(bounds->row[0]+1, dim); - bounds->n_row = 1; - - if (bset->n_ineq == 0) - return bounds; - - dirs = isl_mat_alloc(bset->ctx, dim, dim); - if (!dirs) { - isl_mat_free(bounds); - return NULL; - } - isl_seq_cpy(dirs->row[0], bset->ineq[0]+1, dirs->n_col); - isl_seq_cpy(bounds->row[1], bset->ineq[0], bounds->n_col); - for (j = 1, n = 1; n < dim && j < bset->n_ineq; ++j) { - int pos; - - isl_seq_cpy(dirs->row[n], bset->ineq[j]+1, dirs->n_col); - - pos = isl_seq_first_non_zero(dirs->row[n], dirs->n_col); - if (pos < 0) - continue; - for (i = 0; i < n; ++i) { - int pos_i; - pos_i = isl_seq_first_non_zero(dirs->row[i], dirs->n_col); - if (pos_i < pos) - continue; - if (pos_i > pos) - break; - isl_seq_elim(dirs->row[n], dirs->row[i], pos, - dirs->n_col, NULL); - pos = isl_seq_first_non_zero(dirs->row[n], dirs->n_col); - if (pos < 0) - break; - } - if (pos < 0) - continue; - if (i < n) { - int k; - isl_int *t = dirs->row[n]; - for (k = n; k > i; --k) - dirs->row[k] = dirs->row[k-1]; - dirs->row[i] = t; - } - ++n; - isl_seq_cpy(bounds->row[n], bset->ineq[j], bounds->n_col); - } - isl_mat_free(dirs); - bounds->n_row = 1+n; - return bounds; -} - -static void swap_inequality(struct isl_basic_set *bset, int a, int b) -{ - isl_int *t = bset->ineq[a]; - bset->ineq[a] = bset->ineq[b]; - bset->ineq[b] = t; -} - -/* Skew into positive orthant and project out lineality space. - * - * We perform a unimodular transformation that turns a selected - * maximal set of linearly independent bounds into constraints - * on the first dimensions that impose that these first dimensions - * are non-negative. In particular, the constraint matrix is lower - * triangular with positive entries on the diagonal and negative - * entries below. - * If "bset" has a lineality space then these constraints (and therefore - * all constraints in bset) only involve the first dimensions. - * The remaining dimensions then do not appear in any constraints and - * we can select any value for them, say zero. We therefore project - * out this final dimensions and plug in the value zero later. This - * is accomplished by simply dropping the final columns of - * the unimodular transformation. - */ -static struct isl_basic_set *isl_basic_set_skew_to_positive_orthant( - struct isl_basic_set *bset, struct isl_mat **T) -{ - struct isl_mat *U = NULL; - struct isl_mat *bounds = NULL; - int i, j; - unsigned old_dim, new_dim; - - *T = NULL; - if (!bset) - return NULL; - - isl_assert(bset->ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(bset->ctx, bset->n_div == 0, goto error); - isl_assert(bset->ctx, bset->n_eq == 0, goto error); - - old_dim = isl_basic_set_n_dim(bset); - /* Try to move (multiples of) unit rows up. */ - for (i = 0, j = 0; i < bset->n_ineq; ++i) { - int pos = isl_seq_first_non_zero(bset->ineq[i]+1, old_dim); - if (pos < 0) - continue; - if (isl_seq_first_non_zero(bset->ineq[i]+1+pos+1, - old_dim-pos-1) >= 0) - continue; - if (i != j) - swap_inequality(bset, i, j); - ++j; - } - bounds = independent_bounds(bset); - if (!bounds) - goto error; - new_dim = bounds->n_row - 1; - bounds = isl_mat_left_hermite(bounds, 1, &U, NULL); - if (!bounds) - goto error; - U = isl_mat_drop_cols(U, 1 + new_dim, old_dim - new_dim); - bset = isl_basic_set_preimage(bset, isl_mat_copy(U)); - if (!bset) - goto error; - *T = U; - isl_mat_free(bounds); - return bset; -error: - isl_mat_free(bounds); - isl_mat_free(U); - isl_basic_set_free(bset); - return NULL; -} - -/* Find a sample integer point, if any, in bset, which is known - * to have equalities. If bset contains no integer points, then - * return a zero-length vector. - * We simply remove the known equalities, compute a sample - * in the resulting bset, using the specified recurse function, - * and then transform the sample back to the original space. - */ -static struct isl_vec *sample_eq(struct isl_basic_set *bset, - struct isl_vec *(*recurse)(struct isl_basic_set *)) -{ - struct isl_mat *T; - struct isl_vec *sample; - - if (!bset) - return NULL; - - bset = isl_basic_set_remove_equalities(bset, &T, NULL); - sample = recurse(bset); - if (!sample || sample->size == 0) - isl_mat_free(T); - else - sample = isl_mat_vec_product(T, sample); - return sample; -} - -/* Return a matrix containing the equalities of the tableau - * in constraint form. The tableau is assumed to have - * an associated bset that has been kept up-to-date. - */ -static struct isl_mat *tab_equalities(struct isl_tab *tab) -{ - int i, j; - int n_eq; - struct isl_mat *eq; - struct isl_basic_set *bset; - - if (!tab) - return NULL; - - bset = isl_tab_peek_bset(tab); - isl_assert(tab->mat->ctx, bset, return NULL); - - n_eq = tab->n_var - tab->n_col + tab->n_dead; - if (tab->empty || n_eq == 0) - return isl_mat_alloc(tab->mat->ctx, 0, tab->n_var); - if (n_eq == tab->n_var) - return isl_mat_identity(tab->mat->ctx, tab->n_var); - - eq = isl_mat_alloc(tab->mat->ctx, n_eq, tab->n_var); - if (!eq) - return NULL; - for (i = 0, j = 0; i < tab->n_con; ++i) { - if (tab->con[i].is_row) - continue; - if (tab->con[i].index >= 0 && tab->con[i].index >= tab->n_dead) - continue; - if (i < bset->n_eq) - isl_seq_cpy(eq->row[j], bset->eq[i] + 1, tab->n_var); - else - isl_seq_cpy(eq->row[j], - bset->ineq[i - bset->n_eq] + 1, tab->n_var); - ++j; - } - isl_assert(bset->ctx, j == n_eq, goto error); - return eq; -error: - isl_mat_free(eq); - return NULL; -} - -/* Compute and return an initial basis for the bounded tableau "tab". - * - * If the tableau is either full-dimensional or zero-dimensional, - * the we simply return an identity matrix. - * Otherwise, we construct a basis whose first directions correspond - * to equalities. - */ -static struct isl_mat *initial_basis(struct isl_tab *tab) -{ - int n_eq; - struct isl_mat *eq; - struct isl_mat *Q; - - tab->n_unbounded = 0; - tab->n_zero = n_eq = tab->n_var - tab->n_col + tab->n_dead; - if (tab->empty || n_eq == 0 || n_eq == tab->n_var) - return isl_mat_identity(tab->mat->ctx, 1 + tab->n_var); - - eq = tab_equalities(tab); - eq = isl_mat_left_hermite(eq, 0, NULL, &Q); - if (!eq) - return NULL; - isl_mat_free(eq); - - Q = isl_mat_lin_to_aff(Q); - return Q; -} - -/* Given a tableau representing a set, find and return - * an integer point in the set, if there is any. - * - * We perform a depth first search - * for an integer point, by scanning all possible values in the range - * attained by a basis vector, where an initial basis may have been set - * by the calling function. Otherwise an initial basis that exploits - * the equalities in the tableau is created. - * tab->n_zero is currently ignored and is clobbered by this function. - * - * The tableau is allowed to have unbounded direction, but then - * the calling function needs to set an initial basis, with the - * unbounded directions last and with tab->n_unbounded set - * to the number of unbounded directions. - * Furthermore, the calling functions needs to add shifted copies - * of all constraints involving unbounded directions to ensure - * that any feasible rational value in these directions can be rounded - * up to yield a feasible integer value. - * In particular, let B define the given basis x' = B x - * and let T be the inverse of B, i.e., X = T x'. - * Let a x + c >= 0 be a constraint of the set represented by the tableau, - * or a T x' + c >= 0 in terms of the given basis. Assume that - * the bounded directions have an integer value, then we can safely - * round up the values for the unbounded directions if we make sure - * that x' not only satisfies the original constraint, but also - * the constraint "a T x' + c + s >= 0" with s the sum of all - * negative values in the last n_unbounded entries of "a T". - * The calling function therefore needs to add the constraint - * a x + c + s >= 0. The current function then scans the first - * directions for an integer value and once those have been found, - * it can compute "T ceil(B x)" to yield an integer point in the set. - * Note that during the search, the first rows of B may be changed - * by a basis reduction, but the last n_unbounded rows of B remain - * unaltered and are also not mixed into the first rows. - * - * The search is implemented iteratively. "level" identifies the current - * basis vector. "init" is true if we want the first value at the current - * level and false if we want the next value. - * - * The initial basis is the identity matrix. If the range in some direction - * contains more than one integer value, we perform basis reduction based - * on the value of ctx->opt->gbr - * - ISL_GBR_NEVER: never perform basis reduction - * - ISL_GBR_ONCE: only perform basis reduction the first - * time such a range is encountered - * - ISL_GBR_ALWAYS: always perform basis reduction when - * such a range is encountered - * - * When ctx->opt->gbr is set to ISL_GBR_ALWAYS, then we allow the basis - * reduction computation to return early. That is, as soon as it - * finds a reasonable first direction. - */ -struct isl_vec *isl_tab_sample(struct isl_tab *tab) -{ - unsigned dim; - unsigned gbr; - struct isl_ctx *ctx; - struct isl_vec *sample; - struct isl_vec *min; - struct isl_vec *max; - enum isl_lp_result res; - int level; - int init; - int reduced; - struct isl_tab_undo **snap; - - if (!tab) - return NULL; - if (tab->empty) - return isl_vec_alloc(tab->mat->ctx, 0); - - if (!tab->basis) - tab->basis = initial_basis(tab); - if (!tab->basis) - return NULL; - isl_assert(tab->mat->ctx, tab->basis->n_row == tab->n_var + 1, - return NULL); - isl_assert(tab->mat->ctx, tab->basis->n_col == tab->n_var + 1, - return NULL); - - ctx = tab->mat->ctx; - dim = tab->n_var; - gbr = ctx->opt->gbr; - - if (tab->n_unbounded == tab->n_var) { - sample = isl_tab_get_sample_value(tab); - sample = isl_mat_vec_product(isl_mat_copy(tab->basis), sample); - sample = isl_vec_ceil(sample); - sample = isl_mat_vec_inverse_product(isl_mat_copy(tab->basis), - sample); - return sample; - } - - if (isl_tab_extend_cons(tab, dim + 1) < 0) - return NULL; - - min = isl_vec_alloc(ctx, dim); - max = isl_vec_alloc(ctx, dim); - snap = isl_alloc_array(ctx, struct isl_tab_undo *, dim); - - if (!min || !max || !snap) - goto error; - - level = 0; - init = 1; - reduced = 0; - - while (level >= 0) { - int empty = 0; - if (init) { - res = isl_tab_min(tab, tab->basis->row[1 + level], - ctx->one, &min->el[level], NULL, 0); - if (res == isl_lp_empty) - empty = 1; - isl_assert(ctx, res != isl_lp_unbounded, goto error); - if (res == isl_lp_error) - goto error; - if (!empty && isl_tab_sample_is_integer(tab)) - break; - isl_seq_neg(tab->basis->row[1 + level] + 1, - tab->basis->row[1 + level] + 1, dim); - res = isl_tab_min(tab, tab->basis->row[1 + level], - ctx->one, &max->el[level], NULL, 0); - isl_seq_neg(tab->basis->row[1 + level] + 1, - tab->basis->row[1 + level] + 1, dim); - isl_int_neg(max->el[level], max->el[level]); - if (res == isl_lp_empty) - empty = 1; - isl_assert(ctx, res != isl_lp_unbounded, goto error); - if (res == isl_lp_error) - goto error; - if (!empty && isl_tab_sample_is_integer(tab)) - break; - if (!empty && !reduced && - ctx->opt->gbr != ISL_GBR_NEVER && - isl_int_lt(min->el[level], max->el[level])) { - unsigned gbr_only_first; - if (ctx->opt->gbr == ISL_GBR_ONCE) - ctx->opt->gbr = ISL_GBR_NEVER; - tab->n_zero = level; - gbr_only_first = ctx->opt->gbr_only_first; - ctx->opt->gbr_only_first = - ctx->opt->gbr == ISL_GBR_ALWAYS; - tab = isl_tab_compute_reduced_basis(tab); - ctx->opt->gbr_only_first = gbr_only_first; - if (!tab || !tab->basis) - goto error; - reduced = 1; - continue; - } - reduced = 0; - snap[level] = isl_tab_snap(tab); - } else - isl_int_add_ui(min->el[level], min->el[level], 1); - - if (empty || isl_int_gt(min->el[level], max->el[level])) { - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - continue; - } - isl_int_neg(tab->basis->row[1 + level][0], min->el[level]); - if (isl_tab_add_valid_eq(tab, tab->basis->row[1 + level]) < 0) - goto error; - isl_int_set_si(tab->basis->row[1 + level][0], 0); - if (level + tab->n_unbounded < dim - 1) { - ++level; - init = 1; - continue; - } - break; - } - - if (level >= 0) { - sample = isl_tab_get_sample_value(tab); - if (!sample) - goto error; - if (tab->n_unbounded && !isl_int_is_one(sample->el[0])) { - sample = isl_mat_vec_product(isl_mat_copy(tab->basis), - sample); - sample = isl_vec_ceil(sample); - sample = isl_mat_vec_inverse_product( - isl_mat_copy(tab->basis), sample); - } - } else - sample = isl_vec_alloc(ctx, 0); - - ctx->opt->gbr = gbr; - isl_vec_free(min); - isl_vec_free(max); - free(snap); - return sample; -error: - ctx->opt->gbr = gbr; - isl_vec_free(min); - isl_vec_free(max); - free(snap); - return NULL; -} - -static struct isl_vec *sample_bounded(struct isl_basic_set *bset); - -/* Compute a sample point of the given basic set, based on the given, - * non-trivial factorization. - */ -static __isl_give isl_vec *factored_sample(__isl_take isl_basic_set *bset, - __isl_take isl_factorizer *f) -{ - int i, n; - isl_vec *sample = NULL; - isl_ctx *ctx; - unsigned nparam; - unsigned nvar; - - ctx = isl_basic_set_get_ctx(bset); - if (!ctx) - goto error; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - - sample = isl_vec_alloc(ctx, 1 + isl_basic_set_total_dim(bset)); - if (!sample) - goto error; - isl_int_set_si(sample->el[0], 1); - - bset = isl_morph_basic_set(isl_morph_copy(f->morph), bset); - - for (i = 0, n = 0; i < f->n_group; ++i) { - isl_basic_set *bset_i; - isl_vec *sample_i; - - bset_i = isl_basic_set_copy(bset); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam + n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop_constraints_involving(bset_i, - nparam, n); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, - n + f->len[i], nvar - n - f->len[i]); - bset_i = isl_basic_set_drop(bset_i, isl_dim_set, 0, n); - - sample_i = sample_bounded(bset_i); - if (!sample_i) - goto error; - if (sample_i->size == 0) { - isl_basic_set_free(bset); - isl_factorizer_free(f); - isl_vec_free(sample); - return sample_i; - } - isl_seq_cpy(sample->el + 1 + nparam + n, - sample_i->el + 1, f->len[i]); - isl_vec_free(sample_i); - - n += f->len[i]; - } - - f->morph = isl_morph_inverse(f->morph); - sample = isl_morph_vec(isl_morph_copy(f->morph), sample); - - isl_basic_set_free(bset); - isl_factorizer_free(f); - return sample; -error: - isl_basic_set_free(bset); - isl_factorizer_free(f); - isl_vec_free(sample); - return NULL; -} - -/* Given a basic set that is known to be bounded, find and return - * an integer point in the basic set, if there is any. - * - * After handling some trivial cases, we construct a tableau - * and then use isl_tab_sample to find a sample, passing it - * the identity matrix as initial basis. - */ -static struct isl_vec *sample_bounded(struct isl_basic_set *bset) -{ - unsigned dim; - struct isl_ctx *ctx; - struct isl_vec *sample; - struct isl_tab *tab = NULL; - isl_factorizer *f; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return empty_sample(bset); - - dim = isl_basic_set_total_dim(bset); - if (dim == 0) - return zero_sample(bset); - if (dim == 1) - return interval_sample(bset); - if (bset->n_eq > 0) - return sample_eq(bset, sample_bounded); - - f = isl_basic_set_factorizer(bset); - if (!f) - goto error; - if (f->n_group != 0) - return factored_sample(bset, f); - isl_factorizer_free(f); - - ctx = bset->ctx; - - tab = isl_tab_from_basic_set(bset); - if (tab && tab->empty) { - isl_tab_free(tab); - ISL_F_SET(bset, ISL_BASIC_SET_EMPTY); - sample = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - return sample; - } - - if (isl_tab_track_bset(tab, isl_basic_set_copy(bset)) < 0) - goto error; - if (!ISL_F_ISSET(bset, ISL_BASIC_SET_NO_IMPLICIT)) - if (isl_tab_detect_implicit_equalities(tab) < 0) - goto error; - - sample = isl_tab_sample(tab); - if (!sample) - goto error; - - if (sample->size > 0) { - isl_vec_free(bset->sample); - bset->sample = isl_vec_copy(sample); - } - - isl_basic_set_free(bset); - isl_tab_free(tab); - return sample; -error: - isl_basic_set_free(bset); - isl_tab_free(tab); - return NULL; -} - -/* Given a basic set "bset" and a value "sample" for the first coordinates - * of bset, plug in these values and drop the corresponding coordinates. - * - * We do this by computing the preimage of the transformation - * - * [ 1 0 ] - * x = [ s 0 ] x' - * [ 0 I ] - * - * where [1 s] is the sample value and I is the identity matrix of the - * appropriate dimension. - */ -static struct isl_basic_set *plug_in(struct isl_basic_set *bset, - struct isl_vec *sample) -{ - int i; - unsigned total; - struct isl_mat *T; - - if (!bset || !sample) - goto error; - - total = isl_basic_set_total_dim(bset); - T = isl_mat_alloc(bset->ctx, 1 + total, 1 + total - (sample->size - 1)); - if (!T) - goto error; - - for (i = 0; i < sample->size; ++i) { - isl_int_set(T->row[i][0], sample->el[i]); - isl_seq_clr(T->row[i] + 1, T->n_col - 1); - } - for (i = 0; i < T->n_col - 1; ++i) { - isl_seq_clr(T->row[sample->size + i], T->n_col); - isl_int_set_si(T->row[sample->size + i][1 + i], 1); - } - isl_vec_free(sample); - - bset = isl_basic_set_preimage(bset, T); - return bset; -error: - isl_basic_set_free(bset); - isl_vec_free(sample); - return NULL; -} - -/* Given a basic set "bset", return any (possibly non-integer) point - * in the basic set. - */ -static struct isl_vec *rational_sample(struct isl_basic_set *bset) -{ - struct isl_tab *tab; - struct isl_vec *sample; - - if (!bset) - return NULL; - - tab = isl_tab_from_basic_set(bset); - sample = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - - isl_basic_set_free(bset); - - return sample; -} - -/* Given a linear cone "cone" and a rational point "vec", - * construct a polyhedron with shifted copies of the constraints in "cone", - * i.e., a polyhedron with "cone" as its recession cone, such that each - * point x in this polyhedron is such that the unit box positioned at x - * lies entirely inside the affine cone 'vec + cone'. - * Any rational point in this polyhedron may therefore be rounded up - * to yield an integer point that lies inside said affine cone. - * - * Denote the constraints of cone by " >= 0" and the rational - * point "vec" by v/d. - * Let b_i = . Then the affine cone 'vec + cone' is given - * by - b/d >= 0. - * The polyhedron - ceil{b/d} >= 0 is a subset of this affine cone. - * We prefer this polyhedron over the actual affine cone because it doesn't - * require a scaling of the constraints. - * If each of the vertices of the unit cube positioned at x lies inside - * this polyhedron, then the whole unit cube at x lies inside the affine cone. - * We therefore impose that x' = x + \sum e_i, for any selection of unit - * vectors lies inside the polyhedron, i.e., - * - * - ceil{b/d} = + sum a_i - ceil{b/d} >= 0 - * - * The most stringent of these constraints is the one that selects - * all negative a_i, so the polyhedron we are looking for has constraints - * - * + sum_{a_i < 0} a_i - ceil{b/d} >= 0 - * - * Note that if cone were known to have only non-negative rays - * (which can be accomplished by a unimodular transformation), - * then we would only have to check the points x' = x + e_i - * and we only have to add the smallest negative a_i (if any) - * instead of the sum of all negative a_i. - */ -static struct isl_basic_set *shift_cone(struct isl_basic_set *cone, - struct isl_vec *vec) -{ - int i, j, k; - unsigned total; - - struct isl_basic_set *shift = NULL; - - if (!cone || !vec) - goto error; - - isl_assert(cone->ctx, cone->n_eq == 0, goto error); - - total = isl_basic_set_total_dim(cone); - - shift = isl_basic_set_alloc_space(isl_basic_set_get_space(cone), - 0, 0, cone->n_ineq); - - for (i = 0; i < cone->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(shift); - if (k < 0) - goto error; - isl_seq_cpy(shift->ineq[k] + 1, cone->ineq[i] + 1, total); - isl_seq_inner_product(shift->ineq[k] + 1, vec->el + 1, total, - &shift->ineq[k][0]); - isl_int_cdiv_q(shift->ineq[k][0], - shift->ineq[k][0], vec->el[0]); - isl_int_neg(shift->ineq[k][0], shift->ineq[k][0]); - for (j = 0; j < total; ++j) { - if (isl_int_is_nonneg(shift->ineq[k][1 + j])) - continue; - isl_int_add(shift->ineq[k][0], - shift->ineq[k][0], shift->ineq[k][1 + j]); - } - } - - isl_basic_set_free(cone); - isl_vec_free(vec); - - return isl_basic_set_finalize(shift); -error: - isl_basic_set_free(shift); - isl_basic_set_free(cone); - isl_vec_free(vec); - return NULL; -} - -/* Given a rational point vec in a (transformed) basic set, - * such that cone is the recession cone of the original basic set, - * "round up" the rational point to an integer point. - * - * We first check if the rational point just happens to be integer. - * If not, we transform the cone in the same way as the basic set, - * pick a point x in this cone shifted to the rational point such that - * the whole unit cube at x is also inside this affine cone. - * Then we simply round up the coordinates of x and return the - * resulting integer point. - */ -static struct isl_vec *round_up_in_cone(struct isl_vec *vec, - struct isl_basic_set *cone, struct isl_mat *U) -{ - unsigned total; - - if (!vec || !cone || !U) - goto error; - - isl_assert(vec->ctx, vec->size != 0, goto error); - if (isl_int_is_one(vec->el[0])) { - isl_mat_free(U); - isl_basic_set_free(cone); - return vec; - } - - total = isl_basic_set_total_dim(cone); - cone = isl_basic_set_preimage(cone, U); - cone = isl_basic_set_remove_dims(cone, isl_dim_set, - 0, total - (vec->size - 1)); - - cone = shift_cone(cone, vec); - - vec = rational_sample(cone); - vec = isl_vec_ceil(vec); - return vec; -error: - isl_mat_free(U); - isl_vec_free(vec); - isl_basic_set_free(cone); - return NULL; -} - -/* Concatenate two integer vectors, i.e., two vectors with denominator - * (stored in element 0) equal to 1. - */ -static struct isl_vec *vec_concat(struct isl_vec *vec1, struct isl_vec *vec2) -{ - struct isl_vec *vec; - - if (!vec1 || !vec2) - goto error; - isl_assert(vec1->ctx, vec1->size > 0, goto error); - isl_assert(vec2->ctx, vec2->size > 0, goto error); - isl_assert(vec1->ctx, isl_int_is_one(vec1->el[0]), goto error); - isl_assert(vec2->ctx, isl_int_is_one(vec2->el[0]), goto error); - - vec = isl_vec_alloc(vec1->ctx, vec1->size + vec2->size - 1); - if (!vec) - goto error; - - isl_seq_cpy(vec->el, vec1->el, vec1->size); - isl_seq_cpy(vec->el + vec1->size, vec2->el + 1, vec2->size - 1); - - isl_vec_free(vec1); - isl_vec_free(vec2); - - return vec; -error: - isl_vec_free(vec1); - isl_vec_free(vec2); - return NULL; -} - -/* Give a basic set "bset" with recession cone "cone", compute and - * return an integer point in bset, if any. - * - * If the recession cone is full-dimensional, then we know that - * bset contains an infinite number of integer points and it is - * fairly easy to pick one of them. - * If the recession cone is not full-dimensional, then we first - * transform bset such that the bounded directions appear as - * the first dimensions of the transformed basic set. - * We do this by using a unimodular transformation that transforms - * the equalities in the recession cone to equalities on the first - * dimensions. - * - * The transformed set is then projected onto its bounded dimensions. - * Note that to compute this projection, we can simply drop all constraints - * involving any of the unbounded dimensions since these constraints - * cannot be combined to produce a constraint on the bounded dimensions. - * To see this, assume that there is such a combination of constraints - * that produces a constraint on the bounded dimensions. This means - * that some combination of the unbounded dimensions has both an upper - * bound and a lower bound in terms of the bounded dimensions, but then - * this combination would be a bounded direction too and would have been - * transformed into a bounded dimensions. - * - * We then compute a sample value in the bounded dimensions. - * If no such value can be found, then the original set did not contain - * any integer points and we are done. - * Otherwise, we plug in the value we found in the bounded dimensions, - * project out these bounded dimensions and end up with a set with - * a full-dimensional recession cone. - * A sample point in this set is computed by "rounding up" any - * rational point in the set. - * - * The sample points in the bounded and unbounded dimensions are - * then combined into a single sample point and transformed back - * to the original space. - */ -__isl_give isl_vec *isl_basic_set_sample_with_cone( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone) -{ - unsigned total; - unsigned cone_dim; - struct isl_mat *M, *U; - struct isl_vec *sample; - struct isl_vec *cone_sample; - struct isl_ctx *ctx; - struct isl_basic_set *bounded; - - if (!bset || !cone) - goto error; - - ctx = bset->ctx; - total = isl_basic_set_total_dim(cone); - cone_dim = total - cone->n_eq; - - M = isl_mat_sub_alloc6(bset->ctx, cone->eq, 0, cone->n_eq, 1, total); - M = isl_mat_left_hermite(M, 0, &U, NULL); - if (!M) - goto error; - isl_mat_free(M); - - U = isl_mat_lin_to_aff(U); - bset = isl_basic_set_preimage(bset, isl_mat_copy(U)); - - bounded = isl_basic_set_copy(bset); - bounded = isl_basic_set_drop_constraints_involving(bounded, - total - cone_dim, cone_dim); - bounded = isl_basic_set_drop_dims(bounded, total - cone_dim, cone_dim); - sample = sample_bounded(bounded); - if (!sample || sample->size == 0) { - isl_basic_set_free(bset); - isl_basic_set_free(cone); - isl_mat_free(U); - return sample; - } - bset = plug_in(bset, isl_vec_copy(sample)); - cone_sample = rational_sample(bset); - cone_sample = round_up_in_cone(cone_sample, cone, isl_mat_copy(U)); - sample = vec_concat(sample, cone_sample); - sample = isl_mat_vec_product(U, sample); - return sample; -error: - isl_basic_set_free(cone); - isl_basic_set_free(bset); - return NULL; -} - -static void vec_sum_of_neg(struct isl_vec *v, isl_int *s) -{ - int i; - - isl_int_set_si(*s, 0); - - for (i = 0; i < v->size; ++i) - if (isl_int_is_neg(v->el[i])) - isl_int_add(*s, *s, v->el[i]); -} - -/* Given a tableau "tab", a tableau "tab_cone" that corresponds - * to the recession cone and the inverse of a new basis U = inv(B), - * with the unbounded directions in B last, - * add constraints to "tab" that ensure any rational value - * in the unbounded directions can be rounded up to an integer value. - * - * The new basis is given by x' = B x, i.e., x = U x'. - * For any rational value of the last tab->n_unbounded coordinates - * in the update tableau, the value that is obtained by rounding - * up this value should be contained in the original tableau. - * For any constraint "a x + c >= 0", we therefore need to add - * a constraint "a x + c + s >= 0", with s the sum of all negative - * entries in the last elements of "a U". - * - * Since we are not interested in the first entries of any of the "a U", - * we first drop the columns of U that correpond to bounded directions. - */ -static int tab_shift_cone(struct isl_tab *tab, - struct isl_tab *tab_cone, struct isl_mat *U) -{ - int i; - isl_int v; - struct isl_basic_set *bset = NULL; - - if (tab && tab->n_unbounded == 0) { - isl_mat_free(U); - return 0; - } - isl_int_init(v); - if (!tab || !tab_cone || !U) - goto error; - bset = isl_tab_peek_bset(tab_cone); - U = isl_mat_drop_cols(U, 0, tab->n_var - tab->n_unbounded); - for (i = 0; i < bset->n_ineq; ++i) { - int ok; - struct isl_vec *row = NULL; - if (isl_tab_is_equality(tab_cone, tab_cone->n_eq + i)) - continue; - row = isl_vec_alloc(bset->ctx, tab_cone->n_var); - if (!row) - goto error; - isl_seq_cpy(row->el, bset->ineq[i] + 1, tab_cone->n_var); - row = isl_vec_mat_product(row, isl_mat_copy(U)); - if (!row) - goto error; - vec_sum_of_neg(row, &v); - isl_vec_free(row); - if (isl_int_is_zero(v)) - continue; - tab = isl_tab_extend(tab, 1); - isl_int_add(bset->ineq[i][0], bset->ineq[i][0], v); - ok = isl_tab_add_ineq(tab, bset->ineq[i]) >= 0; - isl_int_sub(bset->ineq[i][0], bset->ineq[i][0], v); - if (!ok) - goto error; - } - - isl_mat_free(U); - isl_int_clear(v); - return 0; -error: - isl_mat_free(U); - isl_int_clear(v); - return -1; -} - -/* Compute and return an initial basis for the possibly - * unbounded tableau "tab". "tab_cone" is a tableau - * for the corresponding recession cone. - * Additionally, add constraints to "tab" that ensure - * that any rational value for the unbounded directions - * can be rounded up to an integer value. - * - * If the tableau is bounded, i.e., if the recession cone - * is zero-dimensional, then we just use inital_basis. - * Otherwise, we construct a basis whose first directions - * correspond to equalities, followed by bounded directions, - * i.e., equalities in the recession cone. - * The remaining directions are then unbounded. - */ -int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, - struct isl_tab *tab_cone) -{ - struct isl_mat *eq; - struct isl_mat *cone_eq; - struct isl_mat *U, *Q; - - if (!tab || !tab_cone) - return -1; - - if (tab_cone->n_col == tab_cone->n_dead) { - tab->basis = initial_basis(tab); - return tab->basis ? 0 : -1; - } - - eq = tab_equalities(tab); - if (!eq) - return -1; - tab->n_zero = eq->n_row; - cone_eq = tab_equalities(tab_cone); - eq = isl_mat_concat(eq, cone_eq); - if (!eq) - return -1; - tab->n_unbounded = tab->n_var - (eq->n_row - tab->n_zero); - eq = isl_mat_left_hermite(eq, 0, &U, &Q); - if (!eq) - return -1; - isl_mat_free(eq); - tab->basis = isl_mat_lin_to_aff(Q); - if (tab_shift_cone(tab, tab_cone, U) < 0) - return -1; - if (!tab->basis) - return -1; - return 0; -} - -/* Compute and return a sample point in bset using generalized basis - * reduction. We first check if the input set has a non-trivial - * recession cone. If so, we perform some extra preprocessing in - * sample_with_cone. Otherwise, we directly perform generalized basis - * reduction. - */ -static struct isl_vec *gbr_sample(struct isl_basic_set *bset) -{ - unsigned dim; - struct isl_basic_set *cone; - - dim = isl_basic_set_total_dim(bset); - - cone = isl_basic_set_recession_cone(isl_basic_set_copy(bset)); - if (!cone) - goto error; - - if (cone->n_eq < dim) - return isl_basic_set_sample_with_cone(bset, cone); - - isl_basic_set_free(cone); - return sample_bounded(bset); -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_vec *pip_sample(struct isl_basic_set *bset) -{ - struct isl_mat *T; - struct isl_ctx *ctx; - struct isl_vec *sample; - - bset = isl_basic_set_skew_to_positive_orthant(bset, &T); - if (!bset) - return NULL; - - ctx = bset->ctx; - sample = isl_pip_basic_set_sample(bset); - - if (sample && sample->size != 0) - sample = isl_mat_vec_product(T, sample); - else - isl_mat_free(T); - - return sample; -} - -static struct isl_vec *basic_set_sample(struct isl_basic_set *bset, int bounded) -{ - struct isl_ctx *ctx; - unsigned dim; - if (!bset) - return NULL; - - ctx = bset->ctx; - if (isl_basic_set_plain_is_empty(bset)) - return empty_sample(bset); - - dim = isl_basic_set_n_dim(bset); - isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(ctx, bset->n_div == 0, goto error); - - if (bset->sample && bset->sample->size == 1 + dim) { - int contains = isl_basic_set_contains(bset, bset->sample); - if (contains < 0) - goto error; - if (contains) { - struct isl_vec *sample = isl_vec_copy(bset->sample); - isl_basic_set_free(bset); - return sample; - } - } - isl_vec_free(bset->sample); - bset->sample = NULL; - - if (bset->n_eq > 0) - return sample_eq(bset, bounded ? isl_basic_set_sample_bounded - : isl_basic_set_sample_vec); - if (dim == 0) - return zero_sample(bset); - if (dim == 1) - return interval_sample(bset); - - switch (bset->ctx->opt->ilp_solver) { - case ISL_ILP_PIP: - return pip_sample(bset); - case ISL_ILP_GBR: - return bounded ? sample_bounded(bset) : gbr_sample(bset); - } - isl_assert(bset->ctx, 0, ); -error: - isl_basic_set_free(bset); - return NULL; -} - -__isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset) -{ - return basic_set_sample(bset, 0); -} - -/* Compute an integer sample in "bset", where the caller guarantees - * that "bset" is bounded. - */ -struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset) -{ - return basic_set_sample(bset, 1); -} - -__isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec) -{ - int i; - int k; - struct isl_basic_set *bset = NULL; - struct isl_ctx *ctx; - unsigned dim; - - if (!vec) - return NULL; - ctx = vec->ctx; - isl_assert(ctx, vec->size != 0, goto error); - - bset = isl_basic_set_alloc(ctx, 0, vec->size - 1, 0, vec->size - 1, 0); - if (!bset) - goto error; - dim = isl_basic_set_n_dim(bset); - for (i = dim - 1; i >= 0; --i) { - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->eq[k], 1 + dim); - isl_int_neg(bset->eq[k][0], vec->el[1 + i]); - isl_int_set(bset->eq[k][1 + i], vec->el[0]); - } - bset->sample = vec; - - return bset; -error: - isl_basic_set_free(bset); - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap) -{ - struct isl_basic_set *bset; - struct isl_vec *sample_vec; - - bset = isl_basic_map_underlying_set(isl_basic_map_copy(bmap)); - sample_vec = isl_basic_set_sample_vec(bset); - if (!sample_vec) - goto error; - if (sample_vec->size == 0) { - struct isl_basic_map *sample; - sample = isl_basic_map_empty_like(bmap); - isl_vec_free(sample_vec); - isl_basic_map_free(bmap); - return sample; - } - bset = isl_basic_set_from_vec(sample_vec); - return isl_basic_map_overlying_set(bset, bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map) -{ - int i; - isl_basic_map *sample = NULL; - - if (!map) - goto error; - - for (i = 0; i < map->n; ++i) { - sample = isl_basic_map_sample(isl_basic_map_copy(map->p[i])); - if (!sample) - goto error; - if (!ISL_F_ISSET(sample, ISL_BASIC_MAP_EMPTY)) - break; - isl_basic_map_free(sample); - } - if (i == map->n) - sample = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return sample; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_basic_set *isl_set_sample(__isl_take isl_set *set) -{ - return (isl_basic_set *) isl_map_sample((isl_map *)set); -} - -__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset) -{ - isl_vec *vec; - isl_space *dim; - - dim = isl_basic_set_get_space(bset); - bset = isl_basic_set_underlying_set(bset); - vec = isl_basic_set_sample_vec(bset); - - return isl_point_alloc(dim, vec); -} - -__isl_give isl_point *isl_set_sample_point(__isl_take isl_set *set) -{ - int i; - isl_point *pnt; - - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - pnt = isl_basic_set_sample_point(isl_basic_set_copy(set->p[i])); - if (!pnt) - goto error; - if (!isl_point_is_void(pnt)) - break; - isl_point_free(pnt); - } - if (i == set->n) - pnt = isl_point_void(isl_set_get_space(set)); - - isl_set_free(set); - return pnt; -error: - isl_set_free(set); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_sample.h b/cloog-0.17.0/isl/isl_sample.h deleted file mode 100644 index b657e6e1cfbbaefbcd0a259a9c61be5ca91429db..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_sample.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SAMPLE_H -#define ISL_SAMPLE - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -__isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset); -struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset); -__isl_give isl_vec *isl_basic_set_sample_with_cone( - __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone); - -__isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec); - -int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, - struct isl_tab *tab_cone); -struct isl_vec *isl_tab_sample(struct isl_tab *tab); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_sample_no_piplib.c b/cloog-0.17.0/isl/isl_sample_no_piplib.c deleted file mode 100644 index e2c7ea40a84f73b10df78da8af22ed0763a4b421..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_sample_no_piplib.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include "isl_sample_piplib.h" - -struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset) -{ - isl_basic_set_free(bset); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_sample_piplib.c b/cloog-0.17.0/isl/isl_sample_piplib.c deleted file mode 100644 index 37550080d69d508e57f184592a8dc891ec51bfa0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_sample_piplib.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include "isl_piplib.h" -#include "isl_sample_piplib.h" - -struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset) -{ - PipOptions *options = NULL; - PipMatrix *domain = NULL; - PipQuast *sol = NULL; - struct isl_vec *vec = NULL; - unsigned dim; - struct isl_ctx *ctx; - - if (!bset) - goto error; - ctx = isl_basic_set_get_ctx(bset); - isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error); - isl_assert(ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, goto error); - dim = isl_basic_set_n_dim(bset); - domain = isl_basic_map_to_pip((struct isl_basic_map *)bset, 0, 0, 0); - if (!domain) - goto error; - - options = pip_options_init(); - if (!options) - goto error; - sol = pip_solve(domain, NULL, -1, options); - if (!sol) - goto error; - if (!sol->list) - vec = isl_vec_alloc(ctx, 0); - else { - PipList *l; - int i; - vec = isl_vec_alloc(ctx, 1 + dim); - if (!vec) - goto error; - isl_int_set_si(vec->block.data[0], 1); - for (i = 0, l = sol->list; l && i < dim; ++i, l = l->next) { - isl_seq_cpy_from_pip(&vec->block.data[1+i], - &l->vector->the_vector[0], 1); - isl_assert(ctx, !entier_zero_p(l->vector->the_deno[0]), - goto error); - } - isl_assert(ctx, i == dim, goto error); - } - - pip_quast_free(sol); - pip_options_free(options); - pip_matrix_free(domain); - - isl_basic_set_free(bset); - return vec; -error: - isl_vec_free(vec); - isl_basic_set_free(bset); - if (sol) - pip_quast_free(sol); - if (domain) - pip_matrix_free(domain); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_sample_piplib.h b/cloog-0.17.0/isl/isl_sample_piplib.h deleted file mode 100644 index 52f21561cc48a220b5450eabf4c5054fba758392..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_sample_piplib.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SAMPLE_PIP_H -#define ISL_SAMPLE_PIP - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/cloog-0.17.0/isl/isl_scan.c b/cloog-0.17.0/isl/isl_scan.c deleted file mode 100644 index 64654be4dbf2ae0a702030b8fae69fb4e2db6008..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_scan.c +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_basis_reduction.h" -#include "isl_scan.h" -#include -#include "isl_tab.h" - -struct isl_counter { - struct isl_scan_callback callback; - isl_int count; - isl_int max; -}; - -static int increment_counter(struct isl_scan_callback *cb, - __isl_take isl_vec *sample) -{ - struct isl_counter *cnt = (struct isl_counter *)cb; - - isl_int_add_ui(cnt->count, cnt->count, 1); - - isl_vec_free(sample); - - if (isl_int_is_zero(cnt->max) || isl_int_lt(cnt->count, cnt->max)) - return 0; - return -1; -} - -static int increment_range(struct isl_scan_callback *cb, isl_int min, isl_int max) -{ - struct isl_counter *cnt = (struct isl_counter *)cb; - - isl_int_add(cnt->count, cnt->count, max); - isl_int_sub(cnt->count, cnt->count, min); - isl_int_add_ui(cnt->count, cnt->count, 1); - - if (isl_int_is_zero(cnt->max) || isl_int_lt(cnt->count, cnt->max)) - return 0; - isl_int_set(cnt->count, cnt->max); - return -1; -} - -/* Call callback->add with the current sample value of the tableau "tab". - */ -static int add_solution(struct isl_tab *tab, struct isl_scan_callback *callback) -{ - struct isl_vec *sample; - - if (!tab) - return -1; - sample = isl_tab_get_sample_value(tab); - if (!sample) - return -1; - - return callback->add(callback, sample); -} - -static int scan_0D(struct isl_basic_set *bset, - struct isl_scan_callback *callback) -{ - struct isl_vec *sample; - - sample = isl_vec_alloc(bset->ctx, 1); - isl_basic_set_free(bset); - - if (!sample) - return -1; - - isl_int_set_si(sample->el[0], 1); - - return callback->add(callback, sample); -} - -/* Look for all integer points in "bset", which is assumed to be bounded, - * and call callback->add on each of them. - * - * We first compute a reduced basis for the set and then scan - * the set in the directions of this basis. - * We basically perform a depth first search, where in each level i - * we compute the range in the i-th basis vector direction, given - * fixed values in the directions of the previous basis vector. - * We then add an equality to the tableau fixing the value in the - * direction of the current basis vector to each value in the range - * in turn and then continue to the next level. - * - * The search is implemented iteratively. "level" identifies the current - * basis vector. "init" is true if we want the first value at the current - * level and false if we want the next value. - * Solutions are added in the leaves of the search tree, i.e., after - * we have fixed a value in each direction of the basis. - */ -int isl_basic_set_scan(struct isl_basic_set *bset, - struct isl_scan_callback *callback) -{ - unsigned dim; - struct isl_mat *B = NULL; - struct isl_tab *tab = NULL; - struct isl_vec *min; - struct isl_vec *max; - struct isl_tab_undo **snap; - int level; - int init; - enum isl_lp_result res; - - if (!bset) - return -1; - - dim = isl_basic_set_total_dim(bset); - if (dim == 0) - return scan_0D(bset, callback); - - min = isl_vec_alloc(bset->ctx, dim); - max = isl_vec_alloc(bset->ctx, dim); - snap = isl_alloc_array(bset->ctx, struct isl_tab_undo *, dim); - - if (!min || !max || !snap) - goto error; - - tab = isl_tab_from_basic_set(bset); - if (!tab) - goto error; - if (isl_tab_extend_cons(tab, dim + 1) < 0) - goto error; - - tab->basis = isl_mat_identity(bset->ctx, 1 + dim); - if (1) - tab = isl_tab_compute_reduced_basis(tab); - if (!tab) - goto error; - B = isl_mat_copy(tab->basis); - if (!B) - goto error; - - level = 0; - init = 1; - - while (level >= 0) { - int empty = 0; - if (init) { - res = isl_tab_min(tab, B->row[1 + level], - bset->ctx->one, &min->el[level], NULL, 0); - if (res == isl_lp_empty) - empty = 1; - if (res == isl_lp_error || res == isl_lp_unbounded) - goto error; - isl_seq_neg(B->row[1 + level] + 1, - B->row[1 + level] + 1, dim); - res = isl_tab_min(tab, B->row[1 + level], - bset->ctx->one, &max->el[level], NULL, 0); - isl_seq_neg(B->row[1 + level] + 1, - B->row[1 + level] + 1, dim); - isl_int_neg(max->el[level], max->el[level]); - if (res == isl_lp_empty) - empty = 1; - if (res == isl_lp_error || res == isl_lp_unbounded) - goto error; - snap[level] = isl_tab_snap(tab); - } else - isl_int_add_ui(min->el[level], min->el[level], 1); - - if (empty || isl_int_gt(min->el[level], max->el[level])) { - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - continue; - } - if (level == dim - 1 && callback->add == increment_counter) { - if (increment_range(callback, - min->el[level], max->el[level])) - goto error; - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - continue; - } - isl_int_neg(B->row[1 + level][0], min->el[level]); - if (isl_tab_add_valid_eq(tab, B->row[1 + level]) < 0) - goto error; - isl_int_set_si(B->row[1 + level][0], 0); - if (level < dim - 1) { - ++level; - init = 1; - continue; - } - if (add_solution(tab, callback) < 0) - goto error; - init = 0; - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - } - - isl_tab_free(tab); - free(snap); - isl_vec_free(min); - isl_vec_free(max); - isl_basic_set_free(bset); - isl_mat_free(B); - return 0; -error: - isl_tab_free(tab); - free(snap); - isl_vec_free(min); - isl_vec_free(max); - isl_basic_set_free(bset); - isl_mat_free(B); - return -1; -} - -int isl_set_scan(__isl_take isl_set *set, struct isl_scan_callback *callback) -{ - int i; - - if (!set || !callback) - goto error; - - set = isl_set_cow(set); - set = isl_set_make_disjoint(set); - set = isl_set_compute_divs(set); - if (!set) - goto error; - - for (i = 0; i < set->n; ++i) - if (isl_basic_set_scan(isl_basic_set_copy(set->p[i]), - callback) < 0) - goto error; - - isl_set_free(set); - return 0; -error: - isl_set_free(set); - return -1; -} - -int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset, - isl_int max, isl_int *count) -{ - struct isl_counter cnt = { { &increment_counter } }; - - if (!bset) - return -1; - - isl_int_init(cnt.count); - isl_int_init(cnt.max); - - isl_int_set_si(cnt.count, 0); - isl_int_set(cnt.max, max); - if (isl_basic_set_scan(isl_basic_set_copy(bset), &cnt.callback) < 0 && - isl_int_lt(cnt.count, cnt.max)) - goto error; - - isl_int_set(*count, cnt.count); - isl_int_clear(cnt.max); - isl_int_clear(cnt.count); - - return 0; -error: - isl_int_clear(cnt.count); - return -1; -} - -int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count) -{ - struct isl_counter cnt = { { &increment_counter } }; - - if (!set) - return -1; - - isl_int_init(cnt.count); - isl_int_init(cnt.max); - - isl_int_set_si(cnt.count, 0); - isl_int_set(cnt.max, max); - if (isl_set_scan(isl_set_copy(set), &cnt.callback) < 0 && - isl_int_lt(cnt.count, cnt.max)) - goto error; - - isl_int_set(*count, cnt.count); - isl_int_clear(cnt.max); - isl_int_clear(cnt.count); - - return 0; -error: - isl_int_clear(cnt.count); - return -1; -} - -int isl_set_count(__isl_keep isl_set *set, isl_int *count) -{ - if (!set) - return -1; - return isl_set_count_upto(set, set->ctx->zero, count); -} diff --git a/cloog-0.17.0/isl/isl_scan.h b/cloog-0.17.0/isl/isl_scan.h deleted file mode 100644 index 8e5ad74a85a20a97cb2ff83342c4bb1493616e7a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_scan.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_SCAN_H -#define ISL_SCAN_H - -#include -#include - -struct isl_scan_callback { - int (*add)(struct isl_scan_callback *cb, __isl_take isl_vec *sample); -}; - -int isl_basic_set_scan(struct isl_basic_set *bset, - struct isl_scan_callback *callback); -int isl_set_scan(__isl_take isl_set *set, struct isl_scan_callback *callback); - -#endif diff --git a/cloog-0.17.0/isl/isl_schedule.c b/cloog-0.17.0/isl/isl_schedule.c deleted file mode 100644 index cc7adc8f170041455227aa7f3a5fe54ea597a203..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_schedule.c +++ /dev/null @@ -1,2842 +0,0 @@ -/* - * Copyright 2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * The scheduling algorithm implemented in this file was inspired by - * Bondhugula et al., "Automatic Transformations for Communication-Minimized - * Parallelization and Locality Optimization in the Polyhedral Model". - */ - - -/* Internal information about a node that is used during the construction - * of a schedule. - * dim represents the space in which the domain lives - * sched is a matrix representation of the schedule being constructed - * for this node - * sched_map is an isl_map representation of the same (partial) schedule - * sched_map may be NULL - * rank is the number of linearly independent rows in the linear part - * of sched - * the columns of cmap represent a change of basis for the schedule - * coefficients; the first rank columns span the linear part of - * the schedule rows - * start is the first variable in the LP problem in the sequences that - * represents the schedule coefficients of this node - * nvar is the dimension of the domain - * nparam is the number of parameters or 0 if we are not constructing - * a parametric schedule - * - * scc is the index of SCC (or WCC) this node belongs to - * - * band contains the band index for each of the rows of the schedule. - * band_id is used to differentiate between separate bands at the same - * level within the same parent band, i.e., bands that are separated - * by the parent band or bands that are independent of each other. - * zero contains a boolean for each of the rows of the schedule, - * indicating whether the corresponding scheduling dimension results - * in zero dependence distances within its band and with respect - * to the proximity edges. - * - * index, min_index and on_stack are used during the SCC detection - * index represents the order in which nodes are visited. - * min_index is the index of the root of a (sub)component. - * on_stack indicates whether the node is currently on the stack. - */ -struct isl_sched_node { - isl_space *dim; - isl_mat *sched; - isl_map *sched_map; - int rank; - isl_mat *cmap; - int start; - int nvar; - int nparam; - - int scc; - - int *band; - int *band_id; - int *zero; - - /* scc detection */ - int index; - int min_index; - int on_stack; -}; - -static int node_has_dim(const void *entry, const void *val) -{ - struct isl_sched_node *node = (struct isl_sched_node *)entry; - isl_space *dim = (isl_space *)val; - - return isl_space_is_equal(node->dim, dim); -} - -/* An edge in the dependence graph. An edge may be used to - * ensure validity of the generated schedule, to minimize the dependence - * distance or both - * - * map is the dependence relation - * src is the source node - * dst is the sink node - * validity is set if the edge is used to ensure correctness - * proximity is set if the edge is used to minimize dependence distances - * - * For validity edges, start and end mark the sequence of inequality - * constraints in the LP problem that encode the validity constraint - * corresponding to this edge. - */ -struct isl_sched_edge { - isl_map *map; - - struct isl_sched_node *src; - struct isl_sched_node *dst; - - int validity; - int proximity; - - int start; - int end; -}; - -/* Internal information about the dependence graph used during - * the construction of the schedule. - * - * intra_hmap is a cache, mapping dependence relations to their dual, - * for dependences from a node to itself - * inter_hmap is a cache, mapping dependence relations to their dual, - * for dependences between distinct nodes - * - * n is the number of nodes - * node is the list of nodes - * maxvar is the maximal number of variables over all nodes - * n_row is the current (maximal) number of linearly independent - * rows in the node schedules - * n_total_row is the current number of rows in the node schedules - * n_band is the current number of completed bands - * band_start is the starting row in the node schedules of the current band - * root is set if this graph is the original dependence graph, - * without any splitting - * - * sorted contains a list of node indices sorted according to the - * SCC to which a node belongs - * - * n_edge is the number of edges - * edge is the list of edges - * edge_table contains pointers into the edge array, hashed on the source - * and sink spaces; the table only contains edges that represent - * validity constraints (and that may or may not also represent proximity - * constraints) - * - * node_table contains pointers into the node array, hashed on the space - * - * region contains a list of variable sequences that should be non-trivial - * - * lp contains the (I)LP problem used to obtain new schedule rows - * - * src_scc and dst_scc are the source and sink SCCs of an edge with - * conflicting constraints - * - * scc, sp, index and stack are used during the detection of SCCs - * scc is the number of the next SCC - * stack contains the nodes on the path from the root to the current node - * sp is the stack pointer - * index is the index of the last node visited - */ -struct isl_sched_graph { - isl_hmap_map_basic_set *intra_hmap; - isl_hmap_map_basic_set *inter_hmap; - - struct isl_sched_node *node; - int n; - int maxvar; - int n_row; - - int *sorted; - - int n_band; - int n_total_row; - int band_start; - - int root; - - struct isl_sched_edge *edge; - int n_edge; - struct isl_hash_table *edge_table; - - struct isl_hash_table *node_table; - struct isl_region *region; - - isl_basic_set *lp; - - int src_scc; - int dst_scc; - - /* scc detection */ - int scc; - int sp; - int index; - int *stack; -}; - -/* Initialize node_table based on the list of nodes. - */ -static int graph_init_table(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - - graph->node_table = isl_hash_table_alloc(ctx, graph->n); - if (!graph->node_table) - return -1; - - for (i = 0; i < graph->n; ++i) { - struct isl_hash_table_entry *entry; - uint32_t hash; - - hash = isl_space_get_hash(graph->node[i].dim); - entry = isl_hash_table_find(ctx, graph->node_table, hash, - &node_has_dim, - graph->node[i].dim, 1); - if (!entry) - return -1; - entry->data = &graph->node[i]; - } - - return 0; -} - -/* Return a pointer to the node that lives within the given space, - * or NULL if there is no such node. - */ -static struct isl_sched_node *graph_find_node(isl_ctx *ctx, - struct isl_sched_graph *graph, __isl_keep isl_space *dim) -{ - struct isl_hash_table_entry *entry; - uint32_t hash; - - hash = isl_space_get_hash(dim); - entry = isl_hash_table_find(ctx, graph->node_table, hash, - &node_has_dim, dim, 0); - - return entry ? entry->data : NULL; -} - -static int edge_has_src_and_dst(const void *entry, const void *val) -{ - const struct isl_sched_edge *edge = entry; - const struct isl_sched_edge *temp = val; - - return edge->src == temp->src && edge->dst == temp->dst; -} - -/* Initialize edge_table based on the list of edges. - * Only edges with validity set are added to the table. - */ -static int graph_init_edge_table(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - - graph->edge_table = isl_hash_table_alloc(ctx, graph->n_edge); - if (!graph->edge_table) - return -1; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_hash_table_entry *entry; - uint32_t hash; - - if (!graph->edge[i].validity) - continue; - - hash = isl_hash_init(); - hash = isl_hash_builtin(hash, graph->edge[i].src); - hash = isl_hash_builtin(hash, graph->edge[i].dst); - entry = isl_hash_table_find(ctx, graph->edge_table, hash, - &edge_has_src_and_dst, - &graph->edge[i], 1); - if (!entry) - return -1; - entry->data = &graph->edge[i]; - } - - return 0; -} - -/* Check whether the dependence graph has a (validity) edge - * between the given two nodes. - */ -static int graph_has_edge(struct isl_sched_graph *graph, - struct isl_sched_node *src, struct isl_sched_node *dst) -{ - isl_ctx *ctx = isl_space_get_ctx(src->dim); - struct isl_hash_table_entry *entry; - uint32_t hash; - struct isl_sched_edge temp = { .src = src, .dst = dst }; - struct isl_sched_edge *edge; - int empty; - - hash = isl_hash_init(); - hash = isl_hash_builtin(hash, temp.src); - hash = isl_hash_builtin(hash, temp.dst); - entry = isl_hash_table_find(ctx, graph->edge_table, hash, - &edge_has_src_and_dst, &temp, 0); - if (!entry) - return 0; - - edge = entry->data; - empty = isl_map_plain_is_empty(edge->map); - if (empty < 0) - return -1; - - return !empty; -} - -static int graph_alloc(isl_ctx *ctx, struct isl_sched_graph *graph, - int n_node, int n_edge) -{ - int i; - - graph->n = n_node; - graph->n_edge = n_edge; - graph->node = isl_calloc_array(ctx, struct isl_sched_node, graph->n); - graph->sorted = isl_calloc_array(ctx, int, graph->n); - graph->region = isl_alloc_array(ctx, struct isl_region, graph->n); - graph->stack = isl_alloc_array(ctx, int, graph->n); - graph->edge = isl_calloc_array(ctx, - struct isl_sched_edge, graph->n_edge); - - graph->intra_hmap = isl_hmap_map_basic_set_alloc(ctx, 2 * n_edge); - graph->inter_hmap = isl_hmap_map_basic_set_alloc(ctx, 2 * n_edge); - - if (!graph->node || !graph->region || !graph->stack || !graph->edge || - !graph->sorted) - return -1; - - for(i = 0; i < graph->n; ++i) - graph->sorted[i] = i; - - return 0; -} - -static void graph_free(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - - isl_hmap_map_basic_set_free(ctx, graph->intra_hmap); - isl_hmap_map_basic_set_free(ctx, graph->inter_hmap); - - for (i = 0; i < graph->n; ++i) { - isl_space_free(graph->node[i].dim); - isl_mat_free(graph->node[i].sched); - isl_map_free(graph->node[i].sched_map); - isl_mat_free(graph->node[i].cmap); - if (graph->root) { - free(graph->node[i].band); - free(graph->node[i].band_id); - free(graph->node[i].zero); - } - } - free(graph->node); - free(graph->sorted); - for (i = 0; i < graph->n_edge; ++i) - isl_map_free(graph->edge[i].map); - free(graph->edge); - free(graph->region); - free(graph->stack); - isl_hash_table_free(ctx, graph->edge_table); - isl_hash_table_free(ctx, graph->node_table); - isl_basic_set_free(graph->lp); -} - -/* Add a new node to the graph representing the given set. - */ -static int extract_node(__isl_take isl_set *set, void *user) -{ - int nvar, nparam; - isl_ctx *ctx; - isl_space *dim; - isl_mat *sched; - struct isl_sched_graph *graph = user; - int *band, *band_id, *zero; - - ctx = isl_set_get_ctx(set); - dim = isl_set_get_space(set); - isl_set_free(set); - nvar = isl_space_dim(dim, isl_dim_set); - nparam = isl_space_dim(dim, isl_dim_param); - if (!ctx->opt->schedule_parametric) - nparam = 0; - sched = isl_mat_alloc(ctx, 0, 1 + nparam + nvar); - graph->node[graph->n].dim = dim; - graph->node[graph->n].nvar = nvar; - graph->node[graph->n].nparam = nparam; - graph->node[graph->n].sched = sched; - graph->node[graph->n].sched_map = NULL; - band = isl_alloc_array(ctx, int, graph->n_edge + nvar); - graph->node[graph->n].band = band; - band_id = isl_calloc_array(ctx, int, graph->n_edge + nvar); - graph->node[graph->n].band_id = band_id; - zero = isl_calloc_array(ctx, int, graph->n_edge + nvar); - graph->node[graph->n].zero = zero; - graph->n++; - - if (!sched || !band || !band_id || !zero) - return -1; - - return 0; -} - -/* Add a new edge to the graph based on the given map. - * Edges are first extracted from the validity dependences, - * from which the edge_table is constructed. - * Afterwards, the proximity dependences are added. If a proximity - * dependence relation happens to be identical to one of the - * validity dependence relations added before, then we don't create - * a new edge, but instead mark the original edge as also representing - * a proximity dependence. - */ -static int extract_edge(__isl_take isl_map *map, void *user) -{ - isl_ctx *ctx = isl_map_get_ctx(map); - struct isl_sched_graph *graph = user; - struct isl_sched_node *src, *dst; - isl_space *dim; - - dim = isl_space_domain(isl_map_get_space(map)); - src = graph_find_node(ctx, graph, dim); - isl_space_free(dim); - dim = isl_space_range(isl_map_get_space(map)); - dst = graph_find_node(ctx, graph, dim); - isl_space_free(dim); - - if (!src || !dst) { - isl_map_free(map); - return 0; - } - - graph->edge[graph->n_edge].src = src; - graph->edge[graph->n_edge].dst = dst; - graph->edge[graph->n_edge].map = map; - graph->edge[graph->n_edge].validity = !graph->edge_table; - graph->edge[graph->n_edge].proximity = !!graph->edge_table; - graph->n_edge++; - - if (graph->edge_table) { - uint32_t hash; - struct isl_hash_table_entry *entry; - struct isl_sched_edge *edge; - int is_equal; - - hash = isl_hash_init(); - hash = isl_hash_builtin(hash, src); - hash = isl_hash_builtin(hash, dst); - entry = isl_hash_table_find(ctx, graph->edge_table, hash, - &edge_has_src_and_dst, - &graph->edge[graph->n_edge - 1], 0); - if (!entry) - return 0; - edge = entry->data; - is_equal = isl_map_plain_is_equal(map, edge->map); - if (is_equal < 0) - return -1; - if (!is_equal) - return 0; - - graph->n_edge--; - edge->proximity = 1; - isl_map_free(map); - } - - return 0; -} - -/* Check whether there is a validity dependence from src to dst, - * forcing dst to follow src. - */ -static int node_follows(struct isl_sched_graph *graph, - struct isl_sched_node *dst, struct isl_sched_node *src) -{ - return graph_has_edge(graph, src, dst); -} - -/* Perform Tarjan's algorithm for computing the strongly connected components - * in the dependence graph (only validity edges). - * If directed is not set, we consider the graph to be undirected and - * we effectively compute the (weakly) connected components. - */ -static int detect_sccs_tarjan(struct isl_sched_graph *g, int i, int directed) -{ - int j; - - g->node[i].index = g->index; - g->node[i].min_index = g->index; - g->node[i].on_stack = 1; - g->index++; - g->stack[g->sp++] = i; - - for (j = g->n - 1; j >= 0; --j) { - int f; - - if (j == i) - continue; - if (g->node[j].index >= 0 && - (!g->node[j].on_stack || - g->node[j].index > g->node[i].min_index)) - continue; - - f = node_follows(g, &g->node[i], &g->node[j]); - if (f < 0) - return -1; - if (!f && !directed) { - f = node_follows(g, &g->node[j], &g->node[i]); - if (f < 0) - return -1; - } - if (!f) - continue; - if (g->node[j].index < 0) { - detect_sccs_tarjan(g, j, directed); - if (g->node[j].min_index < g->node[i].min_index) - g->node[i].min_index = g->node[j].min_index; - } else if (g->node[j].index < g->node[i].min_index) - g->node[i].min_index = g->node[j].index; - } - - if (g->node[i].index != g->node[i].min_index) - return 0; - - do { - j = g->stack[--g->sp]; - g->node[j].on_stack = 0; - g->node[j].scc = g->scc; - } while (j != i); - g->scc++; - - return 0; -} - -static int detect_ccs(struct isl_sched_graph *graph, int directed) -{ - int i; - - graph->index = 0; - graph->sp = 0; - graph->scc = 0; - for (i = graph->n - 1; i >= 0; --i) - graph->node[i].index = -1; - - for (i = graph->n - 1; i >= 0; --i) { - if (graph->node[i].index >= 0) - continue; - if (detect_sccs_tarjan(graph, i, directed) < 0) - return -1; - } - - return 0; -} - -/* Apply Tarjan's algorithm to detect the strongly connected components - * in the dependence graph. - */ -static int detect_sccs(struct isl_sched_graph *graph) -{ - return detect_ccs(graph, 1); -} - -/* Apply Tarjan's algorithm to detect the (weakly) connected components - * in the dependence graph. - */ -static int detect_wccs(struct isl_sched_graph *graph) -{ - return detect_ccs(graph, 0); -} - -static int cmp_scc(const void *a, const void *b, void *data) -{ - struct isl_sched_graph *graph = data; - const int *i1 = a; - const int *i2 = b; - - return graph->node[*i1].scc - graph->node[*i2].scc; -} - -/* Sort the elements of graph->sorted according to the corresponding SCCs. - */ -static void sort_sccs(struct isl_sched_graph *graph) -{ - isl_quicksort(graph->sorted, graph->n, sizeof(int), &cmp_scc, graph); -} - -/* Given a dependence relation R from a node to itself, - * construct the set of coefficients of valid constraints for elements - * in that dependence relation. - * In particular, the result contains tuples of coefficients - * c_0, c_n, c_x such that - * - * c_0 + c_n n + c_x y - c_x x >= 0 for each (x,y) in R - * - * or, equivalently, - * - * c_0 + c_n n + c_x d >= 0 for each d in delta R = { y - x | (x,y) in R } - * - * We choose here to compute the dual of delta R. - * Alternatively, we could have computed the dual of R, resulting - * in a set of tuples c_0, c_n, c_x, c_y, and then - * plugged in (c_0, c_n, c_x, -c_x). - */ -static __isl_give isl_basic_set *intra_coefficients( - struct isl_sched_graph *graph, __isl_take isl_map *map) -{ - isl_ctx *ctx = isl_map_get_ctx(map); - isl_set *delta; - isl_basic_set *coef; - - if (isl_hmap_map_basic_set_has(ctx, graph->intra_hmap, map)) - return isl_hmap_map_basic_set_get(ctx, graph->intra_hmap, map); - - delta = isl_set_remove_divs(isl_map_deltas(isl_map_copy(map))); - coef = isl_set_coefficients(delta); - isl_hmap_map_basic_set_set(ctx, graph->intra_hmap, map, - isl_basic_set_copy(coef)); - - return coef; -} - -/* Given a dependence relation R, * construct the set of coefficients - * of valid constraints for elements in that dependence relation. - * In particular, the result contains tuples of coefficients - * c_0, c_n, c_x, c_y such that - * - * c_0 + c_n n + c_x x + c_y y >= 0 for each (x,y) in R - * - */ -static __isl_give isl_basic_set *inter_coefficients( - struct isl_sched_graph *graph, __isl_take isl_map *map) -{ - isl_ctx *ctx = isl_map_get_ctx(map); - isl_set *set; - isl_basic_set *coef; - - if (isl_hmap_map_basic_set_has(ctx, graph->inter_hmap, map)) - return isl_hmap_map_basic_set_get(ctx, graph->inter_hmap, map); - - set = isl_map_wrap(isl_map_remove_divs(isl_map_copy(map))); - coef = isl_set_coefficients(set); - isl_hmap_map_basic_set_set(ctx, graph->inter_hmap, map, - isl_basic_set_copy(coef)); - - return coef; -} - -/* Add constraints to graph->lp that force validity for the given - * dependence from a node i to itself. - * That is, add constraints that enforce - * - * (c_i_0 + c_i_n n + c_i_x y) - (c_i_0 + c_i_n n + c_i_x x) - * = c_i_x (y - x) >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for (y - x) and then plug in (0, 0, c_i_x^+ - c_i_x^-), - * where c_i_x = c_i_x^+ - c_i_x^-, with c_i_x^+ and c_i_x^- non-negative. - * In graph->lp, the c_i_x^- appear before their c_i_x^+ counterpart. - * - * Actually, we do not construct constraints for the c_i_x themselves, - * but for the coefficients of c_i_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_intra_validity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge) -{ - unsigned total; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_space *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *node = edge->src; - - coef = intra_coefficients(graph, map); - - dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_space_dim(dim, isl_dim_set), isl_mat_copy(node->cmap)); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set), 1, - node->nvar, -1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set), 1, - node->nvar, 1); - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_space_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that force validity for the given - * dependence from node i to node j. - * That is, add constraints that enforce - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x) >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x, c_y) - * of valid constraints for R and then plug in - * (c_j_0 - c_i_0, c_j_n^+ - c_j_n^- - (c_i_n^+ - c_i_n^-), - * c_j_x^+ - c_j_x^- - (c_i_x^+ - c_i_x^-)), - * where c_* = c_*^+ - c_*^-, with c_*^+ and c_*^- non-negative. - * In graph->lp, the c_*^- appear before their c_*^+ counterpart. - * - * Actually, we do not construct constraints for the c_*_x themselves, - * but for the coefficients of c_*_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_inter_validity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge) -{ - unsigned total; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_space *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *src = edge->src; - struct isl_sched_node *dst = edge->dst; - - coef = inter_coefficients(graph, map); - - dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_space_dim(dim, isl_dim_set), isl_mat_copy(src->cmap)); - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_space_dim(dim, isl_dim_set) + src->nvar, - isl_mat_copy(dst->cmap)); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - - isl_dim_map_range(dim_map, dst->start, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, dst->start + 1, 2, 1, 1, dst->nparam, -1); - isl_dim_map_range(dim_map, dst->start + 2, 2, 1, 1, dst->nparam, 1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, -1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, 1); - - isl_dim_map_range(dim_map, src->start, 0, 0, 0, 1, -1); - isl_dim_map_range(dim_map, src->start + 1, 2, 1, 1, src->nparam, 1); - isl_dim_map_range(dim_map, src->start + 2, 2, 1, 1, src->nparam, -1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set), 1, - src->nvar, 1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set), 1, - src->nvar, -1); - - edge->start = graph->lp->n_ineq; - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_space_free(dim); - edge->end = graph->lp->n_ineq; - - return 0; -} - -/* Add constraints to graph->lp that bound the dependence distance for the given - * dependence from a node i to itself. - * If s = 1, we add the constraint - * - * c_i_x (y - x) <= m_0 + m_n n - * - * or - * - * -c_i_x (y - x) + m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * If s = -1, we add the constraint - * - * -c_i_x (y - x) <= m_0 + m_n n - * - * or - * - * c_i_x (y - x) + m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for (y - x) and then plug in (m_0, m_n, -s * c_i_x), - * with each coefficient (except m_0) represented as a pair of non-negative - * coefficients. - * - * Actually, we do not construct constraints for the c_i_x themselves, - * but for the coefficients of c_i_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_intra_proximity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, int s) -{ - unsigned total; - unsigned nparam; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_space *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *node = edge->src; - - coef = intra_coefficients(graph, map); - - dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_space_dim(dim, isl_dim_set), isl_mat_copy(node->cmap)); - - nparam = isl_space_dim(node->dim, isl_dim_param); - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - isl_dim_map_range(dim_map, 1, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, 4, 2, 1, 1, nparam, -1); - isl_dim_map_range(dim_map, 5, 2, 1, 1, nparam, 1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set), 1, - node->nvar, s); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set), 1, - node->nvar, -s); - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_space_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that bound the dependence distance for the given - * dependence from node i to node j. - * If s = 1, we add the constraint - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x) - * <= m_0 + m_n n - * - * or - * - * -(c_j_0 + c_j_n n + c_j_x y) + (c_i_0 + c_i_n n + c_i_x x) + - * m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * If s = -1, we add the constraint - * - * -((c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x)) - * <= m_0 + m_n n - * - * or - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_i_0 + c_i_n n + c_i_x x) + - * m_0 + m_n n >= 0 - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x, c_y) - * of valid constraints for R and then plug in - * (m_0 - s*c_j_0 + s*c_i_0, m_n - s*c_j_n + s*c_i_n, - * -s*c_j_x+s*c_i_x) - * with each coefficient (except m_0, c_j_0 and c_i_0) - * represented as a pair of non-negative coefficients. - * - * Actually, we do not construct constraints for the c_*_x themselves, - * but for the coefficients of c_*_x written as a linear combination - * of the columns in node->cmap. - */ -static int add_inter_proximity_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, int s) -{ - unsigned total; - unsigned nparam; - isl_map *map = isl_map_copy(edge->map); - isl_ctx *ctx = isl_map_get_ctx(map); - isl_space *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *src = edge->src; - struct isl_sched_node *dst = edge->dst; - - coef = inter_coefficients(graph, map); - - dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef))); - - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_space_dim(dim, isl_dim_set), isl_mat_copy(src->cmap)); - coef = isl_basic_set_transform_dims(coef, isl_dim_set, - isl_space_dim(dim, isl_dim_set) + src->nvar, - isl_mat_copy(dst->cmap)); - - nparam = isl_space_dim(src->dim, isl_dim_param); - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - - isl_dim_map_range(dim_map, 1, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, 4, 2, 1, 1, nparam, -1); - isl_dim_map_range(dim_map, 5, 2, 1, 1, nparam, 1); - - isl_dim_map_range(dim_map, dst->start, 0, 0, 0, 1, -s); - isl_dim_map_range(dim_map, dst->start + 1, 2, 1, 1, dst->nparam, s); - isl_dim_map_range(dim_map, dst->start + 2, 2, 1, 1, dst->nparam, -s); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, s); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, -s); - - isl_dim_map_range(dim_map, src->start, 0, 0, 0, 1, s); - isl_dim_map_range(dim_map, src->start + 1, 2, 1, 1, src->nparam, -s); - isl_dim_map_range(dim_map, src->start + 2, 2, 1, 1, src->nparam, s); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set), 1, - src->nvar, -s); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set), 1, - src->nvar, s); - - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_space_free(dim); - - return 0; -} - -static int add_all_validity_constraints(struct isl_sched_graph *graph) -{ - int i; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - if (!edge->validity) - continue; - if (edge->src != edge->dst) - continue; - if (add_intra_validity_constraints(graph, edge) < 0) - return -1; - } - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge = &graph->edge[i]; - if (!edge->validity) - continue; - if (edge->src == edge->dst) - continue; - if (add_inter_validity_constraints(graph, edge) < 0) - return -1; - } - - return 0; -} - -/* Add constraints to graph->lp that bound the dependence distance - * for all dependence relations. - * If a given proximity dependence is identical to a validity - * dependence, then the dependence distance is already bounded - * from below (by zero), so we only need to bound the distance - * from above. - * Otherwise, we need to bound the distance both from above and from below. - */ -static int add_all_proximity_constraints(struct isl_sched_graph *graph) -{ - int i; - - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - if (!edge->proximity) - continue; - if (edge->src == edge->dst && - add_intra_proximity_constraints(graph, edge, 1) < 0) - return -1; - if (edge->src != edge->dst && - add_inter_proximity_constraints(graph, edge, 1) < 0) - return -1; - if (edge->validity) - continue; - if (edge->src == edge->dst && - add_intra_proximity_constraints(graph, edge, -1) < 0) - return -1; - if (edge->src != edge->dst && - add_inter_proximity_constraints(graph, edge, -1) < 0) - return -1; - } - - return 0; -} - -/* Compute a basis for the rows in the linear part of the schedule - * and extend this basis to a full basis. The remaining rows - * can then be used to force linear independence from the rows - * in the schedule. - * - * In particular, given the schedule rows S, we compute - * - * S = H Q - * - * with H the Hermite normal form of S. That is, all but the - * first rank columns of Q are zero and so each row in S is - * a linear combination of the first rank rows of Q. - * The matrix Q is then transposed because we will write the - * coefficients of the next schedule row as a column vector s - * and express this s as a linear combination s = Q c of the - * computed basis. - */ -static int node_update_cmap(struct isl_sched_node *node) -{ - isl_mat *H, *Q; - int n_row = isl_mat_rows(node->sched); - - H = isl_mat_sub_alloc(node->sched, 0, n_row, - 1 + node->nparam, node->nvar); - - H = isl_mat_left_hermite(H, 0, NULL, &Q); - isl_mat_free(node->cmap); - node->cmap = isl_mat_transpose(Q); - node->rank = isl_mat_initial_non_zero_cols(H); - isl_mat_free(H); - - if (!node->cmap || node->rank < 0) - return -1; - return 0; -} - -/* Count the number of equality and inequality constraints - * that will be added for the given map. - * If once is set, then we count - * each edge exactly once. Otherwise, we count as follows - * validity -> 1 (>= 0) - * validity+proximity -> 2 (>= 0 and upper bound) - * proximity -> 2 (lower and upper bound) - */ -static int count_map_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, __isl_take isl_map *map, - int *n_eq, int *n_ineq, int once) -{ - isl_basic_set *coef; - int f = once ? 1 : edge->proximity ? 2 : 1; - - if (edge->src == edge->dst) - coef = intra_coefficients(graph, map); - else - coef = inter_coefficients(graph, map); - if (!coef) - return -1; - *n_eq += f * coef->n_eq; - *n_ineq += f * coef->n_ineq; - isl_basic_set_free(coef); - - return 0; -} - -/* Count the number of equality and inequality constraints - * that will be added to the main lp problem. - * If once is set, then we count - * each edge exactly once. Otherwise, we count as follows - * validity -> 1 (>= 0) - * validity+proximity -> 2 (>= 0 and upper bound) - * proximity -> 2 (lower and upper bound) - */ -static int count_constraints(struct isl_sched_graph *graph, - int *n_eq, int *n_ineq, int once) -{ - int i; - - *n_eq = *n_ineq = 0; - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - isl_map *map = isl_map_copy(edge->map); - - if (count_map_constraints(graph, edge, map, - n_eq, n_ineq, once) < 0) - return -1; - } - - return 0; -} - -/* Construct an ILP problem for finding schedule coefficients - * that result in non-negative, but small dependence distances - * over all dependences. - * In particular, the dependence distances over proximity edges - * are bounded by m_0 + m_n n and we compute schedule coefficients - * with small values (preferably zero) of m_n and m_0. - * - * All variables of the ILP are non-negative. The actual coefficients - * may be negative, so each coefficient is represented as the difference - * of two non-negative variables. The negative part always appears - * immediately before the positive part. - * Other than that, the variables have the following order - * - * - sum of positive and negative parts of m_n coefficients - * - m_0 - * - sum of positive and negative parts of all c_n coefficients - * (unconstrained when computing non-parametric schedules) - * - sum of positive and negative parts of all c_x coefficients - * - positive and negative parts of m_n coefficients - * - for each node - * - c_i_0 - * - positive and negative parts of c_i_n (if parametric) - * - positive and negative parts of c_i_x - * - * The c_i_x are not represented directly, but through the columns of - * node->cmap. That is, the computed values are for variable t_i_x - * such that c_i_x = Q t_i_x with Q equal to node->cmap. - * - * The constraints are those from the edges plus two or three equalities - * to express the sums. - * - * If force_zero is set, then we add equalities to ensure that - * the sum of the m_n coefficients and m_0 are both zero. - */ -static int setup_lp(isl_ctx *ctx, struct isl_sched_graph *graph, - int force_zero, int max_constant_term) -{ - int i, j; - int k; - unsigned nparam; - unsigned total; - isl_space *dim; - int parametric; - int param_pos; - int n_eq, n_ineq; - - parametric = ctx->opt->schedule_parametric; - nparam = isl_space_dim(graph->node[0].dim, isl_dim_param); - param_pos = 4; - total = param_pos + 2 * nparam; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[graph->sorted[i]]; - if (node_update_cmap(node) < 0) - return -1; - node->start = total; - total += 1 + 2 * (node->nparam + node->nvar); - } - - if (count_constraints(graph, &n_eq, &n_ineq, 0) < 0) - return -1; - - dim = isl_space_set_alloc(ctx, 0, total); - isl_basic_set_free(graph->lp); - n_eq += 2 + parametric + force_zero; - if (max_constant_term != -1) - n_ineq += graph->n; - - graph->lp = isl_basic_set_alloc_space(dim, 0, n_eq, n_ineq); - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - if (!force_zero) - isl_int_set_si(graph->lp->eq[k][1], -1); - for (i = 0; i < 2 * nparam; ++i) - isl_int_set_si(graph->lp->eq[k][1 + param_pos + i], 1); - - if (force_zero) { - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][2], -1); - } - - if (parametric) { - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][3], -1); - for (i = 0; i < graph->n; ++i) { - int pos = 1 + graph->node[i].start + 1; - - for (j = 0; j < 2 * graph->node[i].nparam; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - } - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][4], -1); - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int pos = 1 + node->start + 1 + 2 * node->nparam; - - for (j = 0; j < 2 * node->nvar; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - - if (max_constant_term != -1) - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - k = isl_basic_set_alloc_inequality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->ineq[k], 1 + total); - isl_int_set_si(graph->lp->ineq[k][1 + node->start], -1); - isl_int_set_si(graph->lp->ineq[k][0], max_constant_term); - } - - if (add_all_validity_constraints(graph) < 0) - return -1; - if (add_all_proximity_constraints(graph) < 0) - return -1; - - return 0; -} - -/* Analyze the conflicting constraint found by - * isl_tab_basic_set_non_trivial_lexmin. If it corresponds to the validity - * constraint of one of the edges between distinct nodes, living, moreover - * in distinct SCCs, then record the source and sink SCC as this may - * be a good place to cut between SCCs. - */ -static int check_conflict(int con, void *user) -{ - int i; - struct isl_sched_graph *graph = user; - - if (graph->src_scc >= 0) - return 0; - - con -= graph->lp->n_eq; - - if (con >= graph->lp->n_ineq) - return 0; - - for (i = 0; i < graph->n_edge; ++i) { - if (!graph->edge[i].validity) - continue; - if (graph->edge[i].src == graph->edge[i].dst) - continue; - if (graph->edge[i].src->scc == graph->edge[i].dst->scc) - continue; - if (graph->edge[i].start > con) - continue; - if (graph->edge[i].end <= con) - continue; - graph->src_scc = graph->edge[i].src->scc; - graph->dst_scc = graph->edge[i].dst->scc; - } - - return 0; -} - -/* Check whether the next schedule row of the given node needs to be - * non-trivial. Lower-dimensional domains may have some trivial rows, - * but as soon as the number of remaining required non-trivial rows - * is as large as the number or remaining rows to be computed, - * all remaining rows need to be non-trivial. - */ -static int needs_row(struct isl_sched_graph *graph, struct isl_sched_node *node) -{ - return node->nvar - node->rank >= graph->maxvar - graph->n_row; -} - -/* Solve the ILP problem constructed in setup_lp. - * For each node such that all the remaining rows of its schedule - * need to be non-trivial, we construct a non-triviality region. - * This region imposes that the next row is independent of previous rows. - * In particular the coefficients c_i_x are represented by t_i_x - * variables with c_i_x = Q t_i_x and Q a unimodular matrix such that - * its first columns span the rows of the previously computed part - * of the schedule. The non-triviality region enforces that at least - * one of the remaining components of t_i_x is non-zero, i.e., - * that the new schedule row depends on at least one of the remaining - * columns of Q. - */ -static __isl_give isl_vec *solve_lp(struct isl_sched_graph *graph) -{ - int i; - isl_vec *sol; - isl_basic_set *lp; - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int skip = node->rank; - graph->region[i].pos = node->start + 1 + 2*(node->nparam+skip); - if (needs_row(graph, node)) - graph->region[i].len = 2 * (node->nvar - skip); - else - graph->region[i].len = 0; - } - lp = isl_basic_set_copy(graph->lp); - sol = isl_tab_basic_set_non_trivial_lexmin(lp, 2, graph->n, - graph->region, &check_conflict, graph); - return sol; -} - -/* Update the schedules of all nodes based on the given solution - * of the LP problem. - * The new row is added to the current band. - * All possibly negative coefficients are encoded as a difference - * of two non-negative variables, so we need to perform the subtraction - * here. Moreover, if use_cmap is set, then the solution does - * not refer to the actual coefficients c_i_x, but instead to variables - * t_i_x such that c_i_x = Q t_i_x and Q is equal to node->cmap. - * In this case, we then also need to perform this multiplication - * to obtain the values of c_i_x. - * - * If check_zero is set, then the first two coordinates of sol are - * assumed to correspond to the dependence distance. If these two - * coordinates are zero, then the corresponding scheduling dimension - * is marked as being zero distance. - */ -static int update_schedule(struct isl_sched_graph *graph, - __isl_take isl_vec *sol, int use_cmap, int check_zero) -{ - int i, j; - int zero = 0; - isl_vec *csol = NULL; - - if (!sol) - goto error; - if (sol->size == 0) - isl_die(sol->ctx, isl_error_internal, - "no solution found", goto error); - - if (check_zero) - zero = isl_int_is_zero(sol->el[1]) && - isl_int_is_zero(sol->el[2]); - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int pos = node->start; - int row = isl_mat_rows(node->sched); - - isl_vec_free(csol); - csol = isl_vec_alloc(sol->ctx, node->nvar); - if (!csol) - goto error; - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_add_rows(node->sched, 1); - if (!node->sched) - goto error; - node->sched = isl_mat_set_element(node->sched, row, 0, - sol->el[1 + pos]); - for (j = 0; j < node->nparam + node->nvar; ++j) - isl_int_sub(sol->el[1 + pos + 1 + 2 * j + 1], - sol->el[1 + pos + 1 + 2 * j + 1], - sol->el[1 + pos + 1 + 2 * j]); - for (j = 0; j < node->nparam; ++j) - node->sched = isl_mat_set_element(node->sched, - row, 1 + j, sol->el[1+pos+1+2*j+1]); - for (j = 0; j < node->nvar; ++j) - isl_int_set(csol->el[j], - sol->el[1+pos+1+2*(node->nparam+j)+1]); - if (use_cmap) - csol = isl_mat_vec_product(isl_mat_copy(node->cmap), - csol); - if (!csol) - goto error; - for (j = 0; j < node->nvar; ++j) - node->sched = isl_mat_set_element(node->sched, - row, 1 + node->nparam + j, csol->el[j]); - node->band[graph->n_total_row] = graph->n_band; - node->zero[graph->n_total_row] = zero; - } - isl_vec_free(sol); - isl_vec_free(csol); - - graph->n_row++; - graph->n_total_row++; - - return 0; -error: - isl_vec_free(sol); - isl_vec_free(csol); - return -1; -} - -/* Convert node->sched into a map and return this map. - * We simply add equality constraints that express each output variable - * as the affine combination of parameters and input variables specified - * by the schedule matrix. - * - * The result is cached in node->sched_map, which needs to be released - * whenever node->sched is updated. - */ -static __isl_give isl_map *node_extract_schedule(struct isl_sched_node *node) -{ - int i, j; - isl_space *dim; - isl_local_space *ls; - isl_basic_map *bmap; - isl_constraint *c; - int nrow, ncol; - isl_int v; - - if (node->sched_map) - return isl_map_copy(node->sched_map); - - nrow = isl_mat_rows(node->sched); - ncol = isl_mat_cols(node->sched) - 1; - dim = isl_space_from_domain(isl_space_copy(node->dim)); - dim = isl_space_add_dims(dim, isl_dim_out, nrow); - bmap = isl_basic_map_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - isl_int_init(v); - - for (i = 0; i < nrow; ++i) { - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_constraint_set_coefficient_si(c, isl_dim_out, i, -1); - isl_mat_get_element(node->sched, i, 0, &v); - isl_constraint_set_constant(c, v); - for (j = 0; j < node->nparam; ++j) { - isl_mat_get_element(node->sched, i, 1 + j, &v); - isl_constraint_set_coefficient(c, isl_dim_param, j, v); - } - for (j = 0; j < node->nvar; ++j) { - isl_mat_get_element(node->sched, - i, 1 + node->nparam + j, &v); - isl_constraint_set_coefficient(c, isl_dim_in, j, v); - } - bmap = isl_basic_map_add_constraint(bmap, c); - } - - isl_int_clear(v); - - isl_local_space_free(ls); - - node->sched_map = isl_map_from_basic_map(bmap); - return isl_map_copy(node->sched_map); -} - -/* Update the given dependence relation based on the current schedule. - * That is, intersect the dependence relation with a map expressing - * that source and sink are executed within the same iteration of - * the current schedule. - * This is not the most efficient way, but this shouldn't be a critical - * operation. - */ -static __isl_give isl_map *specialize(__isl_take isl_map *map, - struct isl_sched_node *src, struct isl_sched_node *dst) -{ - isl_map *src_sched, *dst_sched, *id; - - src_sched = node_extract_schedule(src); - dst_sched = node_extract_schedule(dst); - id = isl_map_apply_range(src_sched, isl_map_reverse(dst_sched)); - return isl_map_intersect(map, id); -} - -/* Update the dependence relations of all edges based on the current schedule. - * If a dependence is carried completely by the current schedule, then - * it is removed and edge_table is updated accordingly. - */ -static int update_edges(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - int reset_table = 0; - - for (i = graph->n_edge - 1; i >= 0; --i) { - struct isl_sched_edge *edge = &graph->edge[i]; - edge->map = specialize(edge->map, edge->src, edge->dst); - if (!edge->map) - return -1; - - if (isl_map_plain_is_empty(edge->map)) { - reset_table = 1; - isl_map_free(edge->map); - if (i != graph->n_edge - 1) - graph->edge[i] = graph->edge[graph->n_edge - 1]; - graph->n_edge--; - } - } - - if (reset_table) { - isl_hash_table_free(ctx, graph->edge_table); - graph->edge_table = NULL; - return graph_init_edge_table(ctx, graph); - } - - return 0; -} - -static void next_band(struct isl_sched_graph *graph) -{ - graph->band_start = graph->n_total_row; - graph->n_band++; -} - -/* Topologically sort statements mapped to same schedule iteration - * and add a row to the schedule corresponding to this order. - */ -static int sort_statements(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i, j; - - if (graph->n <= 1) - return 0; - - if (update_edges(ctx, graph) < 0) - return -1; - - if (graph->n_edge == 0) - return 0; - - if (detect_sccs(graph) < 0) - return -1; - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int row = isl_mat_rows(node->sched); - int cols = isl_mat_cols(node->sched); - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_add_rows(node->sched, 1); - if (!node->sched) - return -1; - node->sched = isl_mat_set_element_si(node->sched, row, 0, - node->scc); - for (j = 1; j < cols; ++j) - node->sched = isl_mat_set_element_si(node->sched, - row, j, 0); - node->band[graph->n_total_row] = graph->n_band; - } - - graph->n_total_row++; - next_band(graph); - - return 0; -} - -/* Construct an isl_schedule based on the computed schedule stored - * in graph and with parameters specified by dim. - */ -static __isl_give isl_schedule *extract_schedule(struct isl_sched_graph *graph, - __isl_take isl_space *dim) -{ - int i; - isl_ctx *ctx; - isl_schedule *sched = NULL; - - if (!dim) - return NULL; - - ctx = isl_space_get_ctx(dim); - sched = isl_calloc(ctx, struct isl_schedule, - sizeof(struct isl_schedule) + - (graph->n - 1) * sizeof(struct isl_schedule_node)); - if (!sched) - goto error; - - sched->ref = 1; - sched->n = graph->n; - sched->n_band = graph->n_band; - sched->n_total_row = graph->n_total_row; - - for (i = 0; i < sched->n; ++i) { - int r, b; - int *band_end, *band_id, *zero; - - band_end = isl_alloc_array(ctx, int, graph->n_band); - band_id = isl_alloc_array(ctx, int, graph->n_band); - zero = isl_alloc_array(ctx, int, graph->n_total_row); - sched->node[i].sched = node_extract_schedule(&graph->node[i]); - sched->node[i].band_end = band_end; - sched->node[i].band_id = band_id; - sched->node[i].zero = zero; - if (!band_end || !band_id || !zero) - goto error; - - for (r = 0; r < graph->n_total_row; ++r) - zero[r] = graph->node[i].zero[r]; - for (r = b = 0; r < graph->n_total_row; ++r) { - if (graph->node[i].band[r] == b) - continue; - band_end[b++] = r; - if (graph->node[i].band[r] == -1) - break; - } - if (r == graph->n_total_row) - band_end[b++] = r; - sched->node[i].n_band = b; - for (--b; b >= 0; --b) - band_id[b] = graph->node[i].band_id[b]; - } - - sched->dim = dim; - - return sched; -error: - isl_space_free(dim); - isl_schedule_free(sched); - return NULL; -} - -/* Copy nodes that satisfy node_pred from the src dependence graph - * to the dst dependence graph. - */ -static int copy_nodes(struct isl_sched_graph *dst, struct isl_sched_graph *src, - int (*node_pred)(struct isl_sched_node *node, int data), int data) -{ - int i; - - dst->n = 0; - for (i = 0; i < src->n; ++i) { - if (!node_pred(&src->node[i], data)) - continue; - dst->node[dst->n].dim = isl_space_copy(src->node[i].dim); - dst->node[dst->n].nvar = src->node[i].nvar; - dst->node[dst->n].nparam = src->node[i].nparam; - dst->node[dst->n].sched = isl_mat_copy(src->node[i].sched); - dst->node[dst->n].sched_map = - isl_map_copy(src->node[i].sched_map); - dst->node[dst->n].band = src->node[i].band; - dst->node[dst->n].band_id = src->node[i].band_id; - dst->node[dst->n].zero = src->node[i].zero; - dst->n++; - } - - return 0; -} - -/* Copy non-empty edges that satisfy edge_pred from the src dependence graph - * to the dst dependence graph. - */ -static int copy_edges(isl_ctx *ctx, struct isl_sched_graph *dst, - struct isl_sched_graph *src, - int (*edge_pred)(struct isl_sched_edge *edge, int data), int data) -{ - int i; - - dst->n_edge = 0; - for (i = 0; i < src->n_edge; ++i) { - struct isl_sched_edge *edge = &src->edge[i]; - isl_map *map; - - if (!edge_pred(edge, data)) - continue; - - if (isl_map_plain_is_empty(edge->map)) - continue; - - map = isl_map_copy(edge->map); - - dst->edge[dst->n_edge].src = - graph_find_node(ctx, dst, edge->src->dim); - dst->edge[dst->n_edge].dst = - graph_find_node(ctx, dst, edge->dst->dim); - dst->edge[dst->n_edge].map = map; - dst->edge[dst->n_edge].validity = edge->validity; - dst->edge[dst->n_edge].proximity = edge->proximity; - dst->n_edge++; - } - - return 0; -} - -/* Given a "src" dependence graph that contains the nodes from "dst" - * that satisfy node_pred, copy the schedule computed in "src" - * for those nodes back to "dst". - */ -static int copy_schedule(struct isl_sched_graph *dst, - struct isl_sched_graph *src, - int (*node_pred)(struct isl_sched_node *node, int data), int data) -{ - int i; - - src->n = 0; - for (i = 0; i < dst->n; ++i) { - if (!node_pred(&dst->node[i], data)) - continue; - isl_mat_free(dst->node[i].sched); - isl_map_free(dst->node[i].sched_map); - dst->node[i].sched = isl_mat_copy(src->node[src->n].sched); - dst->node[i].sched_map = - isl_map_copy(src->node[src->n].sched_map); - src->n++; - } - - dst->n_total_row = src->n_total_row; - dst->n_band = src->n_band; - - return 0; -} - -/* Compute the maximal number of variables over all nodes. - * This is the maximal number of linearly independent schedule - * rows that we need to compute. - * Just in case we end up in a part of the dependence graph - * with only lower-dimensional domains, we make sure we will - * compute the required amount of extra linearly independent rows. - */ -static int compute_maxvar(struct isl_sched_graph *graph) -{ - int i; - - graph->maxvar = 0; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int nvar; - - if (node_update_cmap(node) < 0) - return -1; - nvar = node->nvar + graph->n_row - node->rank; - if (nvar > graph->maxvar) - graph->maxvar = nvar; - } - - return 0; -} - -static int compute_schedule(isl_ctx *ctx, struct isl_sched_graph *graph); -static int compute_schedule_wcc(isl_ctx *ctx, struct isl_sched_graph *graph); - -/* Compute a schedule for a subgraph of "graph". In particular, for - * the graph composed of nodes that satisfy node_pred and edges that - * that satisfy edge_pred. The caller should precompute the number - * of nodes and edges that satisfy these predicates and pass them along - * as "n" and "n_edge". - * If the subgraph is known to consist of a single component, then wcc should - * be set and then we call compute_schedule_wcc on the constructed subgraph. - * Otherwise, we call compute_schedule, which will check whether the subgraph - * is connected. - */ -static int compute_sub_schedule(isl_ctx *ctx, - struct isl_sched_graph *graph, int n, int n_edge, - int (*node_pred)(struct isl_sched_node *node, int data), - int (*edge_pred)(struct isl_sched_edge *edge, int data), - int data, int wcc) -{ - struct isl_sched_graph split = { 0 }; - - if (graph_alloc(ctx, &split, n, n_edge) < 0) - goto error; - if (copy_nodes(&split, graph, node_pred, data) < 0) - goto error; - if (graph_init_table(ctx, &split) < 0) - goto error; - if (copy_edges(ctx, &split, graph, edge_pred, data) < 0) - goto error; - if (graph_init_edge_table(ctx, &split) < 0) - goto error; - split.n_row = graph->n_row; - split.n_total_row = graph->n_total_row; - split.n_band = graph->n_band; - split.band_start = graph->band_start; - - if (wcc && compute_schedule_wcc(ctx, &split) < 0) - goto error; - if (!wcc && compute_schedule(ctx, &split) < 0) - goto error; - - copy_schedule(graph, &split, node_pred, data); - - graph_free(ctx, &split); - return 0; -error: - graph_free(ctx, &split); - return -1; -} - -static int node_scc_exactly(struct isl_sched_node *node, int scc) -{ - return node->scc == scc; -} - -static int node_scc_at_most(struct isl_sched_node *node, int scc) -{ - return node->scc <= scc; -} - -static int node_scc_at_least(struct isl_sched_node *node, int scc) -{ - return node->scc >= scc; -} - -static int edge_src_scc_exactly(struct isl_sched_edge *edge, int scc) -{ - return edge->src->scc == scc; -} - -static int edge_dst_scc_at_most(struct isl_sched_edge *edge, int scc) -{ - return edge->dst->scc <= scc; -} - -static int edge_src_scc_at_least(struct isl_sched_edge *edge, int scc) -{ - return edge->src->scc >= scc; -} - -/* Pad the schedules of all nodes with zero rows such that in the end - * they all have graph->n_total_row rows. - * The extra rows don't belong to any band, so they get assigned band number -1. - */ -static int pad_schedule(struct isl_sched_graph *graph) -{ - int i, j; - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int row = isl_mat_rows(node->sched); - if (graph->n_total_row > row) { - isl_map_free(node->sched_map); - node->sched_map = NULL; - } - node->sched = isl_mat_add_zero_rows(node->sched, - graph->n_total_row - row); - if (!node->sched) - return -1; - for (j = row; j < graph->n_total_row; ++j) - node->band[j] = -1; - } - - return 0; -} - -/* Split the current graph into two parts and compute a schedule for each - * part individually. In particular, one part consists of all SCCs up - * to and including graph->src_scc, while the other part contains the other - * SCCS. - * - * The split is enforced in the schedule by constant rows with two different - * values (0 and 1). These constant rows replace the previously computed rows - * in the current band. - * It would be possible to reuse them as the first rows in the next - * band, but recomputing them may result in better rows as we are looking - * at a smaller part of the dependence graph. - * - * The band_id of the second group is set to n, where n is the number - * of nodes in the first group. This ensures that the band_ids over - * the two groups remain disjoint, even if either or both of the two - * groups contain independent components. - */ -static int compute_split_schedule(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i, j, n, e1, e2; - int n_total_row, orig_total_row; - int n_band, orig_band; - int drop; - - drop = graph->n_total_row - graph->band_start; - graph->n_total_row -= drop; - graph->n_row -= drop; - - n = 0; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int row = isl_mat_rows(node->sched) - drop; - int cols = isl_mat_cols(node->sched); - int before = node->scc <= graph->src_scc; - - if (before) - n++; - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_drop_rows(node->sched, - graph->band_start, drop); - node->sched = isl_mat_add_rows(node->sched, 1); - if (!node->sched) - return -1; - node->sched = isl_mat_set_element_si(node->sched, row, 0, - !before); - for (j = 1; j < cols; ++j) - node->sched = isl_mat_set_element_si(node->sched, - row, j, 0); - node->band[graph->n_total_row] = graph->n_band; - } - - e1 = e2 = 0; - for (i = 0; i < graph->n_edge; ++i) { - if (graph->edge[i].dst->scc <= graph->src_scc) - e1++; - if (graph->edge[i].src->scc > graph->src_scc) - e2++; - } - - graph->n_total_row++; - next_band(graph); - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - if (node->scc > graph->src_scc) - node->band_id[graph->n_band] = n; - } - - orig_total_row = graph->n_total_row; - orig_band = graph->n_band; - if (compute_sub_schedule(ctx, graph, n, e1, - &node_scc_at_most, &edge_dst_scc_at_most, - graph->src_scc, 0) < 0) - return -1; - n_total_row = graph->n_total_row; - graph->n_total_row = orig_total_row; - n_band = graph->n_band; - graph->n_band = orig_band; - if (compute_sub_schedule(ctx, graph, graph->n - n, e2, - &node_scc_at_least, &edge_src_scc_at_least, - graph->src_scc + 1, 0) < 0) - return -1; - if (n_total_row > graph->n_total_row) - graph->n_total_row = n_total_row; - if (n_band > graph->n_band) - graph->n_band = n_band; - - return pad_schedule(graph); -} - -/* Compute the next band of the schedule after updating the dependence - * relations based on the the current schedule. - */ -static int compute_next_band(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - if (update_edges(ctx, graph) < 0) - return -1; - next_band(graph); - - return compute_schedule(ctx, graph); -} - -/* Add constraints to graph->lp that force the dependence "map" (which - * is part of the dependence relation of "edge") - * to be respected and attempt to carry it, where the edge is one from - * a node j to itself. "pos" is the sequence number of the given map. - * That is, add constraints that enforce - * - * (c_j_0 + c_j_n n + c_j_x y) - (c_j_0 + c_j_n n + c_j_x x) - * = c_j_x (y - x) >= e_i - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for (y - x) and then plug in (-e_i, 0, c_j_x), - * with each coefficient in c_j_x represented as a pair of non-negative - * coefficients. - */ -static int add_intra_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, __isl_take isl_map *map, int pos) -{ - unsigned total; - isl_ctx *ctx = isl_map_get_ctx(map); - isl_space *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *node = edge->src; - - coef = intra_coefficients(graph, map); - - dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef))); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - isl_dim_map_range(dim_map, 3 + pos, 0, 0, 0, 1, -1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set), 1, - node->nvar, -1); - isl_dim_map_range(dim_map, node->start + 2 * node->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set), 1, - node->nvar, 1); - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_space_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that force the dependence "map" (which - * is part of the dependence relation of "edge") - * to be respected and attempt to carry it, where the edge is one from - * node j to node k. "pos" is the sequence number of the given map. - * That is, add constraints that enforce - * - * (c_k_0 + c_k_n n + c_k_x y) - (c_j_0 + c_j_n n + c_j_x x) >= e_i - * - * for each (x,y) in R. - * We obtain general constraints on coefficients (c_0, c_n, c_x) - * of valid constraints for R and then plug in - * (-e_i + c_k_0 - c_j_0, c_k_n - c_j_n, c_k_x - c_j_x) - * with each coefficient (except e_i, c_k_0 and c_j_0) - * represented as a pair of non-negative coefficients. - */ -static int add_inter_constraints(struct isl_sched_graph *graph, - struct isl_sched_edge *edge, __isl_take isl_map *map, int pos) -{ - unsigned total; - isl_ctx *ctx = isl_map_get_ctx(map); - isl_space *dim; - isl_dim_map *dim_map; - isl_basic_set *coef; - struct isl_sched_node *src = edge->src; - struct isl_sched_node *dst = edge->dst; - - coef = inter_coefficients(graph, map); - - dim = isl_space_domain(isl_space_unwrap(isl_basic_set_get_space(coef))); - - total = isl_basic_set_total_dim(graph->lp); - dim_map = isl_dim_map_alloc(ctx, total); - - isl_dim_map_range(dim_map, 3 + pos, 0, 0, 0, 1, -1); - - isl_dim_map_range(dim_map, dst->start, 0, 0, 0, 1, 1); - isl_dim_map_range(dim_map, dst->start + 1, 2, 1, 1, dst->nparam, -1); - isl_dim_map_range(dim_map, dst->start + 2, 2, 1, 1, dst->nparam, 1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, -1); - isl_dim_map_range(dim_map, dst->start + 2 * dst->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set) + src->nvar, 1, - dst->nvar, 1); - - isl_dim_map_range(dim_map, src->start, 0, 0, 0, 1, -1); - isl_dim_map_range(dim_map, src->start + 1, 2, 1, 1, src->nparam, 1); - isl_dim_map_range(dim_map, src->start + 2, 2, 1, 1, src->nparam, -1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 1, 2, - isl_space_dim(dim, isl_dim_set), 1, - src->nvar, 1); - isl_dim_map_range(dim_map, src->start + 2 * src->nparam + 2, 2, - isl_space_dim(dim, isl_dim_set), 1, - src->nvar, -1); - - graph->lp = isl_basic_set_extend_constraints(graph->lp, - coef->n_eq, coef->n_ineq); - graph->lp = isl_basic_set_add_constraints_dim_map(graph->lp, - coef, dim_map); - isl_space_free(dim); - - return 0; -} - -/* Add constraints to graph->lp that force all dependence - * to be respected and attempt to carry it. - */ -static int add_all_constraints(struct isl_sched_graph *graph) -{ - int i, j; - int pos; - - pos = 0; - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - for (j = 0; j < edge->map->n; ++j) { - isl_basic_map *bmap; - isl_map *map; - - bmap = isl_basic_map_copy(edge->map->p[j]); - map = isl_map_from_basic_map(bmap); - - if (edge->src == edge->dst && - add_intra_constraints(graph, edge, map, pos) < 0) - return -1; - if (edge->src != edge->dst && - add_inter_constraints(graph, edge, map, pos) < 0) - return -1; - ++pos; - } - } - - return 0; -} - -/* Count the number of equality and inequality constraints - * that will be added to the carry_lp problem. - * If once is set, then we count - * each edge exactly once. Otherwise, we count as follows - * validity -> 1 (>= 0) - * validity+proximity -> 2 (>= 0 and upper bound) - * proximity -> 2 (lower and upper bound) - */ -static int count_all_constraints(struct isl_sched_graph *graph, - int *n_eq, int *n_ineq, int once) -{ - int i, j; - - *n_eq = *n_ineq = 0; - for (i = 0; i < graph->n_edge; ++i) { - struct isl_sched_edge *edge= &graph->edge[i]; - for (j = 0; j < edge->map->n; ++j) { - isl_basic_map *bmap; - isl_map *map; - - bmap = isl_basic_map_copy(edge->map->p[j]); - map = isl_map_from_basic_map(bmap); - - if (count_map_constraints(graph, edge, map, - n_eq, n_ineq, once) < 0) - return -1; - } - } - - return 0; -} - -/* Construct an LP problem for finding schedule coefficients - * such that the schedule carries as many dependences as possible. - * In particular, for each dependence i, we bound the dependence distance - * from below by e_i, with 0 <= e_i <= 1 and then maximize the sum - * of all e_i's. Dependence with e_i = 0 in the solution are simply - * respected, while those with e_i > 0 (in practice e_i = 1) are carried. - * Note that if the dependence relation is a union of basic maps, - * then we have to consider each basic map individually as it may only - * be possible to carry the dependences expressed by some of those - * basic maps and not all off them. - * Below, we consider each of those basic maps as a separate "edge". - * - * All variables of the LP are non-negative. The actual coefficients - * may be negative, so each coefficient is represented as the difference - * of two non-negative variables. The negative part always appears - * immediately before the positive part. - * Other than that, the variables have the following order - * - * - sum of (1 - e_i) over all edges - * - sum of positive and negative parts of all c_n coefficients - * (unconstrained when computing non-parametric schedules) - * - sum of positive and negative parts of all c_x coefficients - * - for each edge - * - e_i - * - for each node - * - c_i_0 - * - positive and negative parts of c_i_n (if parametric) - * - positive and negative parts of c_i_x - * - * The constraints are those from the edges plus three equalities - * to express the sums and n_edge inequalities to express e_i <= 1. - */ -static int setup_carry_lp(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i, j; - int k; - isl_space *dim; - unsigned total; - int n_eq, n_ineq; - int n_edge; - - n_edge = 0; - for (i = 0; i < graph->n_edge; ++i) - n_edge += graph->edge[i].map->n; - - total = 3 + n_edge; - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[graph->sorted[i]]; - node->start = total; - total += 1 + 2 * (node->nparam + node->nvar); - } - - if (count_all_constraints(graph, &n_eq, &n_ineq, 1) < 0) - return -1; - - dim = isl_space_set_alloc(ctx, 0, total); - isl_basic_set_free(graph->lp); - n_eq += 3; - n_ineq += n_edge; - graph->lp = isl_basic_set_alloc_space(dim, 0, n_eq, n_ineq); - graph->lp = isl_basic_set_set_rational(graph->lp); - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][0], -n_edge); - isl_int_set_si(graph->lp->eq[k][1], 1); - for (i = 0; i < n_edge; ++i) - isl_int_set_si(graph->lp->eq[k][4 + i], 1); - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][2], -1); - for (i = 0; i < graph->n; ++i) { - int pos = 1 + graph->node[i].start + 1; - - for (j = 0; j < 2 * graph->node[i].nparam; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - - k = isl_basic_set_alloc_equality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->eq[k], 1 + total); - isl_int_set_si(graph->lp->eq[k][3], -1); - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - int pos = 1 + node->start + 1 + 2 * node->nparam; - - for (j = 0; j < 2 * node->nvar; ++j) - isl_int_set_si(graph->lp->eq[k][pos + j], 1); - } - - for (i = 0; i < n_edge; ++i) { - k = isl_basic_set_alloc_inequality(graph->lp); - if (k < 0) - return -1; - isl_seq_clr(graph->lp->ineq[k], 1 + total); - isl_int_set_si(graph->lp->ineq[k][4 + i], -1); - isl_int_set_si(graph->lp->ineq[k][0], 1); - } - - if (add_all_constraints(graph) < 0) - return -1; - - return 0; -} - -/* If the schedule_split_parallel option is set and if the linear - * parts of the scheduling rows for all nodes in the graphs are the same, - * then split off the constant term from the linear part. - * The constant term is then placed in a separate band and - * the linear part is simplified. - */ -static int split_parallel(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - int equal = 1; - int row, cols; - struct isl_sched_node *node0; - - if (!ctx->opt->schedule_split_parallel) - return 0; - if (graph->n <= 1) - return 0; - - node0 = &graph->node[0]; - row = isl_mat_rows(node0->sched) - 1; - cols = isl_mat_cols(node0->sched); - for (i = 1; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - - if (!isl_seq_eq(node0->sched->row[row] + 1, - node->sched->row[row] + 1, cols - 1)) - return 0; - if (equal && - isl_int_ne(node0->sched->row[row][0], - node->sched->row[row][0])) - equal = 0; - } - if (equal) - return 0; - - next_band(graph); - - for (i = 0; i < graph->n; ++i) { - struct isl_sched_node *node = &graph->node[i]; - - isl_map_free(node->sched_map); - node->sched_map = NULL; - node->sched = isl_mat_add_zero_rows(node->sched, 1); - if (!node->sched) - return -1; - isl_int_set(node->sched->row[row + 1][0], - node->sched->row[row][0]); - isl_int_set_si(node->sched->row[row][0], 0); - node->sched = isl_mat_normalize_row(node->sched, row); - if (!node->sched) - return -1; - node->band[graph->n_total_row] = graph->n_band; - } - - graph->n_total_row++; - - return 0; -} - -/* Construct a schedule row for each node such that as many dependences - * as possible are carried and then continue with the next band. - */ -static int carry_dependences(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int i; - int n_edge; - isl_vec *sol; - isl_basic_set *lp; - - n_edge = 0; - for (i = 0; i < graph->n_edge; ++i) - n_edge += graph->edge[i].map->n; - - if (setup_carry_lp(ctx, graph) < 0) - return -1; - - lp = isl_basic_set_copy(graph->lp); - sol = isl_tab_basic_set_non_neg_lexmin(lp); - if (!sol) - return -1; - - if (sol->size == 0) { - isl_vec_free(sol); - isl_die(ctx, isl_error_internal, - "error in schedule construction", return -1); - } - - if (isl_int_cmp_si(sol->el[1], n_edge) >= 0) { - isl_vec_free(sol); - isl_die(ctx, isl_error_unknown, - "unable to carry dependences", return -1); - } - - if (update_schedule(graph, sol, 0, 0) < 0) - return -1; - - if (split_parallel(ctx, graph) < 0) - return -1; - - return compute_next_band(ctx, graph); -} - -/* Compute a schedule for a connected dependence graph. - * We try to find a sequence of as many schedule rows as possible that result - * in non-negative dependence distances (independent of the previous rows - * in the sequence, i.e., such that the sequence is tilable). - * If we can't find any more rows we either - * - split between SCCs and start over (assuming we found an interesting - * pair of SCCs between which to split) - * - continue with the next band (assuming the current band has at least - * one row) - * - try to carry as many dependences as possible and continue with the next - * band - * - * If we manage to complete the schedule, we finish off by topologically - * sorting the statements based on the remaining dependences. - * - * If ctx->opt->schedule_outer_zero_distance is set, then we force the - * outermost dimension in the current band to be zero distance. If this - * turns out to be impossible, we fall back on the general scheme above - * and try to carry as many dependences as possible. - */ -static int compute_schedule_wcc(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - int force_zero = 0; - int max_constant_term; - - if (detect_sccs(graph) < 0) - return -1; - sort_sccs(graph); - - if (compute_maxvar(graph) < 0) - return -1; - - if (ctx->opt->schedule_outer_zero_distance) - force_zero = 1; - - max_constant_term = ctx->opt->schedule_max_constant_term; - - while (graph->n_row < graph->maxvar) { - isl_vec *sol; - - graph->src_scc = -1; - graph->dst_scc = -1; - - if (setup_lp(ctx, graph, force_zero, max_constant_term) < 0) - return -1; - sol = solve_lp(graph); - if (!sol) - return -1; - if (sol->size == 0) { - isl_vec_free(sol); - if (!ctx->opt->schedule_maximize_band_depth && - graph->n_total_row > graph->band_start) - return compute_next_band(ctx, graph); - if (graph->src_scc >= 0) - return compute_split_schedule(ctx, graph); - if (graph->n_total_row > graph->band_start) - return compute_next_band(ctx, graph); - return carry_dependences(ctx, graph); - } - if (update_schedule(graph, sol, 1, 1) < 0) - return -1; - force_zero = 0; - } - - if (graph->n_total_row > graph->band_start) - next_band(graph); - return sort_statements(ctx, graph); -} - -/* Compute a schedule for each component (identified by node->scc) - * of the dependence graph separately and then combine the results. - * - * The band_id is adjusted such that each component has a separate id. - * Note that the band_id may have already been set to a value different - * from zero by compute_split_schedule. - */ -static int compute_component_schedule(isl_ctx *ctx, - struct isl_sched_graph *graph) -{ - int wcc, i; - int n, n_edge; - int n_total_row, orig_total_row; - int n_band, orig_band; - - n_total_row = 0; - orig_total_row = graph->n_total_row; - n_band = 0; - orig_band = graph->n_band; - for (i = 0; i < graph->n; ++i) - graph->node[i].band_id[graph->n_band] += graph->node[i].scc; - for (wcc = 0; wcc < graph->scc; ++wcc) { - n = 0; - for (i = 0; i < graph->n; ++i) - if (graph->node[i].scc == wcc) - n++; - n_edge = 0; - for (i = 0; i < graph->n_edge; ++i) - if (graph->edge[i].src->scc == wcc) - n_edge++; - - if (compute_sub_schedule(ctx, graph, n, n_edge, - &node_scc_exactly, - &edge_src_scc_exactly, wcc, 1) < 0) - return -1; - if (graph->n_total_row > n_total_row) - n_total_row = graph->n_total_row; - graph->n_total_row = orig_total_row; - if (graph->n_band > n_band) - n_band = graph->n_band; - graph->n_band = orig_band; - } - - graph->n_total_row = n_total_row; - graph->n_band = n_band; - - return pad_schedule(graph); -} - -/* Compute a schedule for the given dependence graph. - * We first check if the graph is connected (through validity dependences) - * and, if not, compute a schedule for each component separately. - */ -static int compute_schedule(isl_ctx *ctx, struct isl_sched_graph *graph) -{ - if (detect_wccs(graph) < 0) - return -1; - - if (graph->scc > 1) - return compute_component_schedule(ctx, graph); - - return compute_schedule_wcc(ctx, graph); -} - -/* Compute a schedule for the given union of domains that respects - * all the validity dependences and tries to minimize the dependence - * distances over the proximity dependences. - */ -__isl_give isl_schedule *isl_union_set_compute_schedule( - __isl_take isl_union_set *domain, - __isl_take isl_union_map *validity, - __isl_take isl_union_map *proximity) -{ - isl_ctx *ctx = isl_union_set_get_ctx(domain); - isl_space *dim; - struct isl_sched_graph graph = { 0 }; - isl_schedule *sched; - - domain = isl_union_set_align_params(domain, - isl_union_map_get_space(validity)); - domain = isl_union_set_align_params(domain, - isl_union_map_get_space(proximity)); - dim = isl_union_set_get_space(domain); - validity = isl_union_map_align_params(validity, isl_space_copy(dim)); - proximity = isl_union_map_align_params(proximity, dim); - - if (!domain) - goto error; - - graph.n = isl_union_set_n_set(domain); - if (graph.n == 0) - goto empty; - if (graph_alloc(ctx, &graph, graph.n, - isl_union_map_n_map(validity) + isl_union_map_n_map(proximity)) < 0) - goto error; - graph.root = 1; - graph.n = 0; - if (isl_union_set_foreach_set(domain, &extract_node, &graph) < 0) - goto error; - if (graph_init_table(ctx, &graph) < 0) - goto error; - graph.n_edge = 0; - if (isl_union_map_foreach_map(validity, &extract_edge, &graph) < 0) - goto error; - if (graph_init_edge_table(ctx, &graph) < 0) - goto error; - if (isl_union_map_foreach_map(proximity, &extract_edge, &graph) < 0) - goto error; - - if (compute_schedule(ctx, &graph) < 0) - goto error; - -empty: - sched = extract_schedule(&graph, isl_union_set_get_space(domain)); - - graph_free(ctx, &graph); - isl_union_set_free(domain); - isl_union_map_free(validity); - isl_union_map_free(proximity); - - return sched; -error: - graph_free(ctx, &graph); - isl_union_set_free(domain); - isl_union_map_free(validity); - isl_union_map_free(proximity); - return NULL; -} - -void *isl_schedule_free(__isl_take isl_schedule *sched) -{ - int i; - if (!sched) - return NULL; - - if (--sched->ref > 0) - return NULL; - - for (i = 0; i < sched->n; ++i) { - isl_map_free(sched->node[i].sched); - free(sched->node[i].band_end); - free(sched->node[i].band_id); - free(sched->node[i].zero); - } - isl_space_free(sched->dim); - isl_band_list_free(sched->band_forest); - free(sched); - return NULL; -} - -isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *schedule) -{ - return schedule ? isl_space_get_ctx(schedule->dim) : NULL; -} - -__isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched) -{ - int i; - isl_union_map *umap; - - if (!sched) - return NULL; - - umap = isl_union_map_empty(isl_space_copy(sched->dim)); - for (i = 0; i < sched->n; ++i) - umap = isl_union_map_add_map(umap, - isl_map_copy(sched->node[i].sched)); - - return umap; -} - -static __isl_give isl_band_list *construct_band_list( - __isl_keep isl_schedule *schedule, __isl_keep isl_band *parent, - int band_nr, int *parent_active, int n_active); - -/* Construct an isl_band structure for the band in the given schedule - * with sequence number band_nr for the n_active nodes marked by active. - * If the nodes don't have a band with the given sequence number, - * then a band without members is created. - * - * Because of the way the schedule is constructed, we know that - * the position of the band inside the schedule of a node is the same - * for all active nodes. - */ -static __isl_give isl_band *construct_band(__isl_keep isl_schedule *schedule, - __isl_keep isl_band *parent, - int band_nr, int *active, int n_active) -{ - int i, j; - isl_ctx *ctx = isl_schedule_get_ctx(schedule); - isl_band *band; - unsigned start, end; - - band = isl_calloc_type(ctx, isl_band); - if (!band) - return NULL; - - band->ref = 1; - band->schedule = schedule; - band->parent = parent; - - for (i = 0; i < schedule->n; ++i) - if (active[i] && schedule->node[i].n_band > band_nr + 1) - break; - - if (i < schedule->n) { - band->children = construct_band_list(schedule, band, - band_nr + 1, active, n_active); - if (!band->children) - goto error; - } - - for (i = 0; i < schedule->n; ++i) - if (active[i]) - break; - - if (i >= schedule->n) - isl_die(ctx, isl_error_internal, - "band without active statements", goto error); - - start = band_nr ? schedule->node[i].band_end[band_nr - 1] : 0; - end = band_nr < schedule->node[i].n_band ? - schedule->node[i].band_end[band_nr] : start; - band->n = end - start; - - band->zero = isl_alloc_array(ctx, int, band->n); - if (!band->zero) - goto error; - - for (j = 0; j < band->n; ++j) - band->zero[j] = schedule->node[i].zero[start + j]; - - band->map = isl_union_map_empty(isl_space_copy(schedule->dim)); - for (i = 0; i < schedule->n; ++i) { - isl_map *map; - unsigned n_out; - - if (!active[i]) - continue; - - map = isl_map_copy(schedule->node[i].sched); - n_out = isl_map_dim(map, isl_dim_out); - map = isl_map_project_out(map, isl_dim_out, end, n_out - end); - map = isl_map_project_out(map, isl_dim_out, 0, start); - band->map = isl_union_map_union(band->map, - isl_union_map_from_map(map)); - } - if (!band->map) - goto error; - - return band; -error: - isl_band_free(band); - return NULL; -} - -/* Construct a list of bands that start at the same position (with - * sequence number band_nr) in the schedules of the nodes that - * were active in the parent band. - * - * A separate isl_band structure is created for each band_id - * and for each node that does not have a band with sequence - * number band_nr. In the latter case, a band without members - * is created. - * This ensures that if a band has any children, then each node - * that was active in the band is active in exactly one of the children. - */ -static __isl_give isl_band_list *construct_band_list( - __isl_keep isl_schedule *schedule, __isl_keep isl_band *parent, - int band_nr, int *parent_active, int n_active) -{ - int i, j; - isl_ctx *ctx = isl_schedule_get_ctx(schedule); - int *active; - int n_band; - isl_band_list *list; - - n_band = 0; - for (i = 0; i < n_active; ++i) { - for (j = 0; j < schedule->n; ++j) { - if (!parent_active[j]) - continue; - if (schedule->node[j].n_band <= band_nr) - continue; - if (schedule->node[j].band_id[band_nr] == i) { - n_band++; - break; - } - } - } - for (j = 0; j < schedule->n; ++j) - if (schedule->node[j].n_band <= band_nr) - n_band++; - - if (n_band == 1) { - isl_band *band; - list = isl_band_list_alloc(ctx, n_band); - band = construct_band(schedule, parent, band_nr, - parent_active, n_active); - return isl_band_list_add(list, band); - } - - active = isl_alloc_array(ctx, int, schedule->n); - if (!active) - return NULL; - - list = isl_band_list_alloc(ctx, n_band); - - for (i = 0; i < n_active; ++i) { - int n = 0; - isl_band *band; - - for (j = 0; j < schedule->n; ++j) { - active[j] = parent_active[j] && - schedule->node[j].n_band > band_nr && - schedule->node[j].band_id[band_nr] == i; - if (active[j]) - n++; - } - if (n == 0) - continue; - - band = construct_band(schedule, parent, band_nr, active, n); - - list = isl_band_list_add(list, band); - } - for (i = 0; i < schedule->n; ++i) { - isl_band *band; - if (!parent_active[i]) - continue; - if (schedule->node[i].n_band > band_nr) - continue; - for (j = 0; j < schedule->n; ++j) - active[j] = j == i; - band = construct_band(schedule, parent, band_nr, active, 1); - list = isl_band_list_add(list, band); - } - - free(active); - - return list; -} - -/* Construct a band forest representation of the schedule and - * return the list of roots. - */ -static __isl_give isl_band_list *construct_forest( - __isl_keep isl_schedule *schedule) -{ - int i; - isl_ctx *ctx = isl_schedule_get_ctx(schedule); - isl_band_list *forest; - int *active; - - active = isl_alloc_array(ctx, int, schedule->n); - if (!active) - return NULL; - - for (i = 0; i < schedule->n; ++i) - active[i] = 1; - - forest = construct_band_list(schedule, NULL, 0, active, schedule->n); - - free(active); - - return forest; -} - -/* Return the roots of a band forest representation of the schedule. - */ -__isl_give isl_band_list *isl_schedule_get_band_forest( - __isl_keep isl_schedule *schedule) -{ - if (!schedule) - return NULL; - if (!schedule->band_forest) - schedule->band_forest = construct_forest(schedule); - return isl_band_list_dup(schedule->band_forest); -} - -static __isl_give isl_printer *print_band_list(__isl_take isl_printer *p, - __isl_keep isl_band_list *list); - -static __isl_give isl_printer *print_band(__isl_take isl_printer *p, - __isl_keep isl_band *band) -{ - isl_band_list *children; - - p = isl_printer_start_line(p); - p = isl_printer_print_union_map(p, band->map); - p = isl_printer_end_line(p); - - if (!isl_band_has_children(band)) - return p; - - children = isl_band_get_children(band); - - p = isl_printer_indent(p, 4); - p = print_band_list(p, children); - p = isl_printer_indent(p, -4); - - isl_band_list_free(children); - - return p; -} - -static __isl_give isl_printer *print_band_list(__isl_take isl_printer *p, - __isl_keep isl_band_list *list) -{ - int i, n; - - n = isl_band_list_n_band(list); - for (i = 0; i < n; ++i) { - isl_band *band; - band = isl_band_list_get_band(list, i); - p = print_band(p, band); - isl_band_free(band); - } - - return p; -} - -__isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p, - __isl_keep isl_schedule *schedule) -{ - isl_band_list *forest; - - forest = isl_schedule_get_band_forest(schedule); - - p = print_band_list(p, forest); - - isl_band_list_free(forest); - - return p; -} - -void isl_schedule_dump(__isl_keep isl_schedule *schedule) -{ - isl_printer *printer; - - if (!schedule) - return; - - printer = isl_printer_to_file(isl_schedule_get_ctx(schedule), stderr); - printer = isl_printer_print_schedule(printer, schedule); - - isl_printer_free(printer); -} diff --git a/cloog-0.17.0/isl/isl_schedule_private.h b/cloog-0.17.0/isl/isl_schedule_private.h deleted file mode 100644 index cbf1f9cc10c54ceddc5855433103d7597036855d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_schedule_private.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef ISL_SCHEDLUE_PRIVATE_H -#define ISL_SCHEDLUE_PRIVATE_H - -#include - -/* The schedule for an individual domain, plus information about the bands - * and scheduling dimensions. - * In particular, we keep track of the number of bands and for each - * band, the starting position of the next band. The first band starts at - * position 0. - * For each scheduling dimension, we keep track of whether it result - * in zero dependence distances (within its band) with respect - * to the proximity edges. - */ -struct isl_schedule_node { - isl_map *sched; - int n_band; - int *band_end; - int *band_id; - int *zero; -}; - -/* Information about the computed schedule. - * n is the number of nodes/domains/statements. - * n_band is the maximal number of bands. - * n_total_row is the number of coordinates of the schedule. - * dim contains a description of the parameters. - * band_forest points to a band forest representation of the schedule - * and may be NULL if the forest hasn't been created yet. - */ -struct isl_schedule { - int ref; - - int n; - int n_band; - int n_total_row; - isl_space *dim; - - isl_band_list *band_forest; - - struct isl_schedule_node node[1]; -}; - -#endif diff --git a/cloog-0.17.0/isl/isl_seq.c b/cloog-0.17.0/isl/isl_seq.c deleted file mode 100644 index dd80c1951cc38adfeceeb968e9a5ad8fb6fe43f6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_seq.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include - -void isl_seq_clr(isl_int *p, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_set_si(p[i], 0); -} - -void isl_seq_set(isl_int *p, isl_int v, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_set(p[i], v); -} - -void isl_seq_neg(isl_int *dst, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_neg(dst[i], src[i]); -} - -void isl_seq_cpy(isl_int *dst, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_set(dst[i], src[i]); -} - -void isl_seq_submul(isl_int *dst, isl_int f, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_submul(dst[i], f, src[i]); -} - -void isl_seq_addmul(isl_int *dst, isl_int f, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_addmul(dst[i], f, src[i]); -} - -void isl_seq_swp_or_cpy(isl_int *dst, isl_int *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_swap_or_set(dst[i], src[i]); -} - -void isl_seq_scale(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_mul(dst[i], src[i], m); -} - -void isl_seq_scale_down(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_divexact(dst[i], src[i], m); -} - -void isl_seq_cdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_cdiv_q(dst[i], src[i], m); -} - -void isl_seq_fdiv_q(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_fdiv_q(dst[i], src[i], m); -} - -void isl_seq_fdiv_r(isl_int *dst, isl_int *src, isl_int m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - isl_int_fdiv_r(dst[i], src[i], m); -} - -void isl_seq_combine(isl_int *dst, isl_int m1, isl_int *src1, - isl_int m2, isl_int *src2, unsigned len) -{ - int i; - isl_int tmp; - - isl_int_init(tmp); - for (i = 0; i < len; ++i) { - isl_int_mul(tmp, m1, src1[i]); - isl_int_addmul(tmp, m2, src2[i]); - isl_int_set(dst[i], tmp); - } - isl_int_clear(tmp); -} - -/* - * Let d = dst[pos] and s = src[pos] - * dst is replaced by |s| dst - sgn(s)d src - */ -void isl_seq_elim(isl_int *dst, isl_int *src, unsigned pos, unsigned len, - isl_int *m) -{ - isl_int a; - isl_int b; - - if (isl_int_is_zero(dst[pos])) - return; - - isl_int_init(a); - isl_int_init(b); - - isl_int_gcd(a, src[pos], dst[pos]); - isl_int_divexact(b, dst[pos], a); - if (isl_int_is_pos(src[pos])) - isl_int_neg(b, b); - isl_int_divexact(a, src[pos], a); - isl_int_abs(a, a); - isl_seq_combine(dst, a, dst, b, src, len); - - if (m) - isl_int_mul(*m, *m, a); - - isl_int_clear(a); - isl_int_clear(b); -} - -int isl_seq_eq(isl_int *p1, isl_int *p2, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - if (isl_int_ne(p1[i], p2[i])) - return 0; - return 1; -} - -int isl_seq_cmp(isl_int *p1, isl_int *p2, unsigned len) -{ - int i; - int cmp; - for (i = 0; i < len; ++i) - if ((cmp = isl_int_cmp(p1[i], p2[i])) != 0) - return cmp; - return 0; -} - -int isl_seq_is_neg(isl_int *p1, isl_int *p2, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) { - if (isl_int_abs_ne(p1[i], p2[i])) - return 0; - if (isl_int_is_zero(p1[i])) - continue; - if (isl_int_eq(p1[i], p2[i])) - return 0; - } - return 1; -} - -int isl_seq_first_non_zero(isl_int *p, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - if (!isl_int_is_zero(p[i])) - return i; - return -1; -} - -int isl_seq_last_non_zero(isl_int *p, unsigned len) -{ - int i; - - for (i = len - 1; i >= 0; --i) - if (!isl_int_is_zero(p[i])) - return i; - return -1; -} - -int isl_seq_abs_min_non_zero(isl_int *p, unsigned len) -{ - int i, min = isl_seq_first_non_zero(p, len); - if (min < 0) - return -1; - for (i = min + 1; i < len; ++i) { - if (isl_int_is_zero(p[i])) - continue; - if (isl_int_abs_lt(p[i], p[min])) - min = i; - } - return min; -} - -void isl_seq_gcd(isl_int *p, unsigned len, isl_int *gcd) -{ - int i, min = isl_seq_abs_min_non_zero(p, len); - - if (min < 0) { - isl_int_set_si(*gcd, 0); - return; - } - isl_int_abs(*gcd, p[min]); - for (i = 0; isl_int_cmp_si(*gcd, 1) > 0 && i < len; ++i) { - if (i == min) - continue; - if (isl_int_is_zero(p[i])) - continue; - isl_int_gcd(*gcd, *gcd, p[i]); - } -} - -void isl_seq_normalize(struct isl_ctx *ctx, isl_int *p, unsigned len) -{ - if (len == 0) - return; - isl_seq_gcd(p, len, &ctx->normalize_gcd); - if (!isl_int_is_zero(ctx->normalize_gcd) && - !isl_int_is_one(ctx->normalize_gcd)) - isl_seq_scale_down(p, p, ctx->normalize_gcd, len); -} - -void isl_seq_lcm(isl_int *p, unsigned len, isl_int *lcm) -{ - int i; - - if (len == 0) { - isl_int_set_si(*lcm, 1); - return; - } - isl_int_set(*lcm, p[0]); - for (i = 1; i < len; ++i) - isl_int_lcm(*lcm, *lcm, p[i]); -} - -void isl_seq_inner_product(isl_int *p1, isl_int *p2, unsigned len, - isl_int *prod) -{ - int i; - if (len == 0) { - isl_int_set_si(*prod, 0); - return; - } - isl_int_mul(*prod, p1[0], p2[0]); - for (i = 1; i < len; ++i) - isl_int_addmul(*prod, p1[i], p2[i]); -} - -uint32_t isl_seq_hash(isl_int *p, unsigned len, uint32_t hash) -{ - int i; - for (i = 0; i < len; ++i) { - if (isl_int_is_zero(p[i])) - continue; - hash *= 16777619; - hash ^= (i & 0xFF); - hash = isl_int_hash(p[i], hash); - } - return hash; -} - -uint32_t isl_seq_get_hash(isl_int *p, unsigned len) -{ - uint32_t hash = isl_hash_init(); - - return isl_seq_hash(p, len, hash); -} - -uint32_t isl_seq_get_hash_bits(isl_int *p, unsigned len, unsigned bits) -{ - uint32_t hash; - - hash = isl_seq_get_hash(p, len); - return isl_hash_bits(hash, bits); -} diff --git a/cloog-0.17.0/isl/isl_space.c b/cloog-0.17.0/isl/isl_space.c deleted file mode 100644 index ae68013b3ee558c0b5089cc241b6111125a339bf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_space.c +++ /dev/null @@ -1,1682 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include -#include -#include - -isl_ctx *isl_space_get_ctx(__isl_keep isl_space *dim) -{ - return dim ? dim->ctx : NULL; -} - -__isl_give isl_space *isl_space_alloc(isl_ctx *ctx, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - isl_space *dim; - - dim = isl_alloc_type(ctx, struct isl_space); - if (!dim) - return NULL; - - dim->ctx = ctx; - isl_ctx_ref(ctx); - dim->ref = 1; - dim->nparam = nparam; - dim->n_in = n_in; - dim->n_out = n_out; - - dim->tuple_id[0] = NULL; - dim->tuple_id[1] = NULL; - - dim->nested[0] = NULL; - dim->nested[1] = NULL; - - dim->n_id = 0; - dim->ids = NULL; - - return dim; -} - -/* Mark the space as being that of a set, by setting the domain tuple - * to isl_id_none. - */ -static __isl_give isl_space *mark_as_set(__isl_take isl_space *space) -{ - space = isl_space_cow(space); - if (!space) - return NULL; - space = isl_space_set_tuple_id(space, isl_dim_in, &isl_id_none); - return space; -} - -/* Is the space that of a set? - */ -int isl_space_is_set(__isl_keep isl_space *space) -{ - if (!space) - return -1; - if (space->n_in != 0 || space->nested[0]) - return 0; - if (space->tuple_id[0] != &isl_id_none) - return 0; - return 1; -} - -__isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim) -{ - isl_space *space; - space = isl_space_alloc(ctx, nparam, 0, dim); - space = mark_as_set(space); - return space; -} - -/* Mark the space as being that of a parameter domain, by setting - * both tuples to isl_id_none. - */ -static __isl_give isl_space *mark_as_params(isl_space *space) -{ - if (!space) - return NULL; - space = isl_space_set_tuple_id(space, isl_dim_in, &isl_id_none); - space = isl_space_set_tuple_id(space, isl_dim_out, &isl_id_none); - return space; -} - -/* Is the space that of a parameter domain? - */ -int isl_space_is_params(__isl_keep isl_space *space) -{ - if (!space) - return -1; - if (space->n_in != 0 || space->nested[0] || - space->n_out != 0 || space->nested[1]) - return 0; - if (space->tuple_id[0] != &isl_id_none) - return 0; - if (space->tuple_id[1] != &isl_id_none) - return 0; - return 1; -} - -/* Create a space for a parameter domain. - */ -__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam) -{ - isl_space *space; - space = isl_space_alloc(ctx, nparam, 0, 0); - space = mark_as_params(space); - return space; -} - -static unsigned global_pos(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - struct isl_ctx *ctx = dim->ctx; - - switch (type) { - case isl_dim_param: - isl_assert(ctx, pos < dim->nparam, - return isl_space_dim(dim, isl_dim_all)); - return pos; - case isl_dim_in: - isl_assert(ctx, pos < dim->n_in, - return isl_space_dim(dim, isl_dim_all)); - return pos + dim->nparam; - case isl_dim_out: - isl_assert(ctx, pos < dim->n_out, - return isl_space_dim(dim, isl_dim_all)); - return pos + dim->nparam + dim->n_in; - default: - isl_assert(ctx, 0, return isl_space_dim(dim, isl_dim_all)); - } - return isl_space_dim(dim, isl_dim_all); -} - -/* Extend length of ids array to the total number of dimensions. - */ -static __isl_give isl_space *extend_ids(__isl_take isl_space *dim) -{ - isl_id **ids; - int i; - - if (isl_space_dim(dim, isl_dim_all) <= dim->n_id) - return dim; - - if (!dim->ids) { - dim->ids = isl_calloc_array(dim->ctx, - isl_id *, isl_space_dim(dim, isl_dim_all)); - if (!dim->ids) - goto error; - } else { - ids = isl_realloc_array(dim->ctx, dim->ids, - isl_id *, isl_space_dim(dim, isl_dim_all)); - if (!ids) - goto error; - dim->ids = ids; - for (i = dim->n_id; i < isl_space_dim(dim, isl_dim_all); ++i) - dim->ids[i] = NULL; - } - - dim->n_id = isl_space_dim(dim, isl_dim_all); - - return dim; -error: - isl_space_free(dim); - return NULL; -} - -static __isl_give isl_space *set_id(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - dim = isl_space_cow(dim); - - if (!dim) - goto error; - - pos = global_pos(dim, type, pos); - if (pos == isl_space_dim(dim, isl_dim_all)) - goto error; - - if (pos >= dim->n_id) { - if (!id) - return dim; - dim = extend_ids(dim); - if (!dim) - goto error; - } - - dim->ids[pos] = id; - - return dim; -error: - isl_id_free(id); - isl_space_free(dim); - return NULL; -} - -static __isl_keep isl_id *get_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - if (!dim) - return NULL; - - pos = global_pos(dim, type, pos); - if (pos == isl_space_dim(dim, isl_dim_all)) - return NULL; - if (pos >= dim->n_id) - return NULL; - return dim->ids[pos]; -} - -static unsigned offset(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return 0; - case isl_dim_in: return dim->nparam; - case isl_dim_out: return dim->nparam + dim->n_in; - default: return 0; - } -} - -static unsigned n(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: return dim->nparam; - case isl_dim_in: return dim->n_in; - case isl_dim_out: return dim->n_out; - case isl_dim_all: return dim->nparam + dim->n_in + dim->n_out; - default: return 0; - } -} - -unsigned isl_space_dim(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - if (!dim) - return 0; - return n(dim, type); -} - -unsigned isl_space_offset(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - if (!dim) - return 0; - return offset(dim, type); -} - -static __isl_give isl_space *copy_ids(__isl_take isl_space *dst, - enum isl_dim_type dst_type, unsigned offset, __isl_keep isl_space *src, - enum isl_dim_type src_type) -{ - int i; - isl_id *id; - - if (!dst) - return NULL; - - for (i = 0; i < n(src, src_type); ++i) { - id = get_id(src, src_type, i); - if (!id) - continue; - dst = set_id(dst, dst_type, offset + i, isl_id_copy(id)); - if (!dst) - return NULL; - } - return dst; -} - -__isl_take isl_space *isl_space_dup(__isl_keep isl_space *dim) -{ - isl_space *dup; - if (!dim) - return NULL; - dup = isl_space_alloc(dim->ctx, dim->nparam, dim->n_in, dim->n_out); - if (dim->tuple_id[0] && - !(dup->tuple_id[0] = isl_id_copy(dim->tuple_id[0]))) - goto error; - if (dim->tuple_id[1] && - !(dup->tuple_id[1] = isl_id_copy(dim->tuple_id[1]))) - goto error; - if (dim->nested[0] && !(dup->nested[0] = isl_space_copy(dim->nested[0]))) - goto error; - if (dim->nested[1] && !(dup->nested[1] = isl_space_copy(dim->nested[1]))) - goto error; - if (!dim->ids) - return dup; - dup = copy_ids(dup, isl_dim_param, 0, dim, isl_dim_param); - dup = copy_ids(dup, isl_dim_in, 0, dim, isl_dim_in); - dup = copy_ids(dup, isl_dim_out, 0, dim, isl_dim_out); - return dup; -error: - isl_space_free(dup); - return NULL; -} - -__isl_give isl_space *isl_space_cow(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - - if (dim->ref == 1) - return dim; - dim->ref--; - return isl_space_dup(dim); -} - -__isl_give isl_space *isl_space_copy(__isl_keep isl_space *dim) -{ - if (!dim) - return NULL; - - dim->ref++; - return dim; -} - -void isl_space_free(__isl_take isl_space *dim) -{ - int i; - - if (!dim) - return; - - if (--dim->ref > 0) - return; - - isl_id_free(dim->tuple_id[0]); - isl_id_free(dim->tuple_id[1]); - - isl_space_free(dim->nested[0]); - isl_space_free(dim->nested[1]); - - for (i = 0; i < dim->n_id; ++i) - isl_id_free(dim->ids[i]); - free(dim->ids); - isl_ctx_deref(dim->ctx); - - free(dim); -} - -static int name_ok(isl_ctx *ctx, const char *s) -{ - char *p; - long dummy; - - dummy = strtol(s, &p, 0); - if (p != s) - isl_die(ctx, isl_error_invalid, "name looks like a number", - return 0); - - return 1; -} - -int isl_space_has_tuple_id(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - if (!dim) - return -1; - if (isl_space_is_params(dim)) - isl_die(dim->ctx, isl_error_invalid, - "parameter spaces don't have tuple ids", return -1); - if (isl_space_is_set(dim) && type != isl_dim_set) - isl_die(dim->ctx, isl_error_invalid, - "set spaces can only have a set id", return -1); - if (type != isl_dim_in && type != isl_dim_out) - isl_die(dim->ctx, isl_error_invalid, - "only input, output and set tuples can have ids", - return -1); - return dim->tuple_id[type - isl_dim_in] != NULL; -} - -__isl_give isl_id *isl_space_get_tuple_id(__isl_keep isl_space *dim, - enum isl_dim_type type) -{ - int has_id; - - if (!dim) - return NULL; - has_id = isl_space_has_tuple_id(dim, type); - if (has_id < 0) - return NULL; - if (!has_id) - isl_die(dim->ctx, isl_error_invalid, - "tuple has no id", return NULL); - return isl_id_copy(dim->tuple_id[type - isl_dim_in]); -} - -__isl_give isl_space *isl_space_set_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type, __isl_take isl_id *id) -{ - dim = isl_space_cow(dim); - if (!dim || !id) - goto error; - if (type != isl_dim_in && type != isl_dim_out) - isl_die(dim->ctx, isl_error_invalid, - "only input, output and set tuples can have names", - goto error); - - isl_id_free(dim->tuple_id[type - isl_dim_in]); - dim->tuple_id[type - isl_dim_in] = id; - - return dim; -error: - isl_id_free(id); - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_reset_tuple_id(__isl_take isl_space *dim, - enum isl_dim_type type) -{ - dim = isl_space_cow(dim); - if (!dim) - return NULL; - if (type != isl_dim_in && type != isl_dim_out) - isl_die(dim->ctx, isl_error_invalid, - "only input, output and set tuples can have names", - goto error); - - isl_id_free(dim->tuple_id[type - isl_dim_in]); - dim->tuple_id[type - isl_dim_in] = NULL; - - return dim; -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_set_dim_id(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, __isl_take isl_id *id) -{ - dim = isl_space_cow(dim); - if (!dim || !id) - goto error; - isl_id_free(get_id(dim, type, pos)); - return set_id(dim, type, pos, id); -error: - isl_id_free(id); - isl_space_free(dim); - return NULL; -} - -int isl_space_has_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - if (!dim) - return -1; - return get_id(dim, type, pos) != NULL; -} - -__isl_give isl_id *isl_space_get_dim_id(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - if (!dim) - return NULL; - if (!get_id(dim, type, pos)) - isl_die(dim->ctx, isl_error_invalid, - "dim has no id", return NULL); - return isl_id_copy(get_id(dim, type, pos)); -} - -__isl_give isl_space *isl_space_set_tuple_name(__isl_take isl_space *dim, - enum isl_dim_type type, const char *s) -{ - isl_id *id; - - if (!dim) - return NULL; - - if (!s) - return isl_space_reset_tuple_id(dim, type); - - if (!name_ok(dim->ctx, s)) - goto error; - - id = isl_id_alloc(dim->ctx, s, NULL); - return isl_space_set_tuple_id(dim, type, id); -error: - isl_space_free(dim); - return NULL; -} - -const char *isl_space_get_tuple_name(__isl_keep isl_space *dim, - enum isl_dim_type type) -{ - isl_id *id; - if (!dim) - return NULL; - if (type != isl_dim_in && type != isl_dim_out) - return NULL; - id = dim->tuple_id[type - isl_dim_in]; - return id ? id->name : NULL; -} - -__isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, - const char *s) -{ - isl_id *id; - - if (!dim) - return NULL; - if (!name_ok(dim->ctx, s)) - goto error; - id = isl_id_alloc(dim->ctx, s, NULL); - return isl_space_set_dim_id(dim, type, pos, id); -error: - isl_space_free(dim); - return NULL; -} - -__isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos) -{ - isl_id *id = get_id(dim, type, pos); - return id ? id->name : NULL; -} - -int isl_space_find_dim_by_id(__isl_keep isl_space *dim, enum isl_dim_type type, - __isl_keep isl_id *id) -{ - int i; - int offset; - int n; - - if (!dim || !id) - return -1; - - offset = isl_space_offset(dim, type); - n = isl_space_dim(dim, type); - for (i = 0; i < n && offset + i < dim->n_id; ++i) - if (dim->ids[offset + i] == id) - return i; - - return -1; -} - -int isl_space_find_dim_by_name(__isl_keep isl_space *space, - enum isl_dim_type type, const char *name) -{ - int i; - int offset; - int n; - - if (!space || !name) - return -1; - - offset = isl_space_offset(space, type); - n = isl_space_dim(space, type); - for (i = 0; i < n && offset + i < space->n_id; ++i) - if (space->ids[offset + i]->name && - !strcmp(space->ids[offset + i]->name, name)) - return i; - - return -1; -} - -static __isl_keep isl_id *tuple_id(__isl_keep isl_space *dim, - enum isl_dim_type type) -{ - if (!dim) - return NULL; - if (type == isl_dim_in) - return dim->tuple_id[0]; - if (type == isl_dim_out) - return dim->tuple_id[1]; - return NULL; -} - -static __isl_keep isl_space *nested(__isl_keep isl_space *dim, - enum isl_dim_type type) -{ - if (!dim) - return NULL; - if (type == isl_dim_in) - return dim->nested[0]; - if (type == isl_dim_out) - return dim->nested[1]; - return NULL; -} - -int isl_space_tuple_match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_space *dim2, enum isl_dim_type dim2_type) -{ - isl_id *id1, *id2; - isl_space *nested1, *nested2; - - if (!dim1 || !dim2) - return -1; - - if (dim1 == dim2 && dim1_type == dim2_type) - return 1; - - if (n(dim1, dim1_type) != n(dim2, dim2_type)) - return 0; - id1 = tuple_id(dim1, dim1_type); - id2 = tuple_id(dim2, dim2_type); - if (!id1 ^ !id2) - return 0; - if (id1 && id1 != id2) - return 0; - nested1 = nested(dim1, dim1_type); - nested2 = nested(dim2, dim2_type); - if (!nested1 ^ !nested2) - return 0; - if (nested1 && !isl_space_is_equal(nested1, nested2)) - return 0; - return 1; -} - -static int match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_space *dim2, enum isl_dim_type dim2_type) -{ - int i; - - if (dim1 == dim2 && dim1_type == dim2_type) - return 1; - - if (!isl_space_tuple_match(dim1, dim1_type, dim2, dim2_type)) - return 0; - - if (!dim1->ids && !dim2->ids) - return 1; - - for (i = 0; i < n(dim1, dim1_type); ++i) { - if (get_id(dim1, dim1_type, i) != get_id(dim2, dim2_type, i)) - return 0; - } - return 1; -} - -int isl_space_match(__isl_keep isl_space *dim1, enum isl_dim_type dim1_type, - __isl_keep isl_space *dim2, enum isl_dim_type dim2_type) -{ - if (!dim1 || !dim2) - return -1; - - return match(dim1, dim1_type, dim2, dim2_type); -} - -static void get_ids(__isl_keep isl_space *dim, enum isl_dim_type type, - unsigned first, unsigned n, __isl_keep isl_id **ids) -{ - int i; - - for (i = 0; i < n ; ++i) - ids[i] = get_id(dim, type, first + i); -} - -__isl_give isl_space *isl_space_extend(__isl_take isl_space *dim, - unsigned nparam, unsigned n_in, unsigned n_out) -{ - isl_id **ids = NULL; - - if (!dim) - return NULL; - if (dim->nparam == nparam && dim->n_in == n_in && dim->n_out == n_out) - return dim; - - isl_assert(dim->ctx, dim->nparam <= nparam, goto error); - isl_assert(dim->ctx, dim->n_in <= n_in, goto error); - isl_assert(dim->ctx, dim->n_out <= n_out, goto error); - - dim = isl_space_cow(dim); - - if (dim->ids) { - ids = isl_calloc_array(dim->ctx, isl_id *, - nparam + n_in + n_out); - if (!ids) - goto error; - get_ids(dim, isl_dim_param, 0, dim->nparam, ids); - get_ids(dim, isl_dim_in, 0, dim->n_in, ids + nparam); - get_ids(dim, isl_dim_out, 0, dim->n_out, ids + nparam + n_in); - free(dim->ids); - dim->ids = ids; - dim->n_id = nparam + n_in + n_out; - } - dim->nparam = nparam; - dim->n_in = n_in; - dim->n_out = n_out; - - return dim; -error: - free(ids); - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_add_dims(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned n) -{ - if (!dim) - return NULL; - dim = isl_space_reset(dim, type); - switch (type) { - case isl_dim_param: - dim = isl_space_extend(dim, - dim->nparam + n, dim->n_in, dim->n_out); - if (dim && dim->nested[0] && - !(dim->nested[0] = isl_space_add_dims(dim->nested[0], - isl_dim_param, n))) - goto error; - if (dim && dim->nested[1] && - !(dim->nested[1] = isl_space_add_dims(dim->nested[1], - isl_dim_param, n))) - goto error; - return dim; - case isl_dim_in: - return isl_space_extend(dim, - dim->nparam, dim->n_in + n, dim->n_out); - case isl_dim_out: - return isl_space_extend(dim, - dim->nparam, dim->n_in, dim->n_out + n); - default: - isl_die(dim->ctx, isl_error_invalid, - "cannot add dimensions of specified type", goto error); - } -error: - isl_space_free(dim); - return NULL; -} - -static int valid_dim_type(enum isl_dim_type type) -{ - switch (type) { - case isl_dim_param: - case isl_dim_in: - case isl_dim_out: - return 1; - default: - return 0; - } -} - -__isl_give isl_space *isl_space_insert_dims(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned pos, unsigned n) -{ - isl_id **ids = NULL; - - if (!dim) - return NULL; - if (n == 0) - return isl_space_reset(dim, type); - - if (!valid_dim_type(type)) - isl_die(dim->ctx, isl_error_invalid, - "cannot insert dimensions of specified type", - goto error); - - isl_assert(dim->ctx, pos <= isl_space_dim(dim, type), goto error); - - dim = isl_space_cow(dim); - if (!dim) - return NULL; - - if (dim->ids) { - enum isl_dim_type t; - int off; - int s[3]; - int *size = s - isl_dim_param; - ids = isl_calloc_array(dim->ctx, isl_id *, - dim->nparam + dim->n_in + dim->n_out + n); - if (!ids) - goto error; - off = 0; - size[isl_dim_param] = dim->nparam; - size[isl_dim_in] = dim->n_in; - size[isl_dim_out] = dim->n_out; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - if (t != type) { - get_ids(dim, t, 0, size[t], ids + off); - off += size[t]; - } else { - get_ids(dim, t, 0, pos, ids + off); - off += pos + n; - get_ids(dim, t, pos, size[t] - pos, ids + off); - off += size[t] - pos; - } - } - free(dim->ids); - dim->ids = ids; - dim->n_id = dim->nparam + dim->n_in + dim->n_out + n; - } - switch (type) { - case isl_dim_param: dim->nparam += n; break; - case isl_dim_in: dim->n_in += n; break; - case isl_dim_out: dim->n_out += n; break; - default: ; - } - dim = isl_space_reset(dim, type); - - return dim; -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_move_dims(__isl_take isl_space *dim, - enum isl_dim_type dst_type, unsigned dst_pos, - enum isl_dim_type src_type, unsigned src_pos, unsigned n) -{ - int i; - - if (!dim) - return NULL; - if (n == 0) - return dim; - - isl_assert(dim->ctx, src_pos + n <= isl_space_dim(dim, src_type), - goto error); - - if (dst_type == src_type && dst_pos == src_pos) - return dim; - - isl_assert(dim->ctx, dst_type != src_type, goto error); - - dim = isl_space_reset(dim, src_type); - dim = isl_space_reset(dim, dst_type); - - dim = isl_space_cow(dim); - if (!dim) - return NULL; - - if (dim->ids) { - isl_id **ids; - enum isl_dim_type t; - int off; - int s[3]; - int *size = s - isl_dim_param; - ids = isl_calloc_array(dim->ctx, isl_id *, - dim->nparam + dim->n_in + dim->n_out); - if (!ids) - goto error; - off = 0; - size[isl_dim_param] = dim->nparam; - size[isl_dim_in] = dim->n_in; - size[isl_dim_out] = dim->n_out; - for (t = isl_dim_param; t <= isl_dim_out; ++t) { - if (t == dst_type) { - get_ids(dim, t, 0, dst_pos, ids + off); - off += dst_pos; - get_ids(dim, src_type, src_pos, n, ids + off); - off += n; - get_ids(dim, t, dst_pos, size[t] - dst_pos, - ids + off); - off += size[t] - dst_pos; - } else if (t == src_type) { - get_ids(dim, t, 0, src_pos, ids + off); - off += src_pos; - get_ids(dim, t, src_pos + n, - size[t] - src_pos - n, ids + off); - off += size[t] - src_pos - n; - } else { - get_ids(dim, t, 0, size[t], ids + off); - off += size[t]; - } - } - free(dim->ids); - dim->ids = ids; - dim->n_id = dim->nparam + dim->n_in + dim->n_out; - } - - switch (dst_type) { - case isl_dim_param: dim->nparam += n; break; - case isl_dim_in: dim->n_in += n; break; - case isl_dim_out: dim->n_out += n; break; - default: ; - } - - switch (src_type) { - case isl_dim_param: dim->nparam -= n; break; - case isl_dim_in: dim->n_in -= n; break; - case isl_dim_out: dim->n_out -= n; break; - default: ; - } - - if (dst_type != isl_dim_param && src_type != isl_dim_param) - return dim; - - for (i = 0; i < 2; ++i) { - if (!dim->nested[i]) - continue; - dim->nested[i] = isl_space_replace(dim->nested[i], - isl_dim_param, dim); - if (!dim->nested[i]) - goto error; - } - - return dim; -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_join(__isl_take isl_space *left, - __isl_take isl_space *right) -{ - isl_space *dim; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, match(left, isl_dim_param, right, isl_dim_param), - goto error); - isl_assert(left->ctx, - isl_space_tuple_match(left, isl_dim_out, right, isl_dim_in), - goto error); - - dim = isl_space_alloc(left->ctx, left->nparam, left->n_in, right->n_out); - if (!dim) - goto error; - - dim = copy_ids(dim, isl_dim_param, 0, left, isl_dim_param); - dim = copy_ids(dim, isl_dim_in, 0, left, isl_dim_in); - dim = copy_ids(dim, isl_dim_out, 0, right, isl_dim_out); - - if (dim && left->tuple_id[0] && - !(dim->tuple_id[0] = isl_id_copy(left->tuple_id[0]))) - goto error; - if (dim && right->tuple_id[1] && - !(dim->tuple_id[1] = isl_id_copy(right->tuple_id[1]))) - goto error; - if (dim && left->nested[0] && - !(dim->nested[0] = isl_space_copy(left->nested[0]))) - goto error; - if (dim && right->nested[1] && - !(dim->nested[1] = isl_space_copy(right->nested[1]))) - goto error; - - isl_space_free(left); - isl_space_free(right); - - return dim; -error: - isl_space_free(left); - isl_space_free(right); - return NULL; -} - -__isl_give isl_space *isl_space_product(__isl_take isl_space *left, - __isl_take isl_space *right) -{ - isl_space *dom1, *dom2, *nest1, *nest2; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, match(left, isl_dim_param, right, isl_dim_param), - goto error); - - dom1 = isl_space_domain(isl_space_copy(left)); - dom2 = isl_space_domain(isl_space_copy(right)); - nest1 = isl_space_wrap(isl_space_join(isl_space_reverse(dom1), dom2)); - - dom1 = isl_space_range(left); - dom2 = isl_space_range(right); - nest2 = isl_space_wrap(isl_space_join(isl_space_reverse(dom1), dom2)); - - return isl_space_join(isl_space_reverse(nest1), nest2); -error: - isl_space_free(left); - isl_space_free(right); - return NULL; -} - -/* Given two spaces { A -> C } and { B -> C }, construct the space - * { [A -> B] -> C } - */ -__isl_give isl_space *isl_space_domain_product(__isl_take isl_space *left, - __isl_take isl_space *right) -{ - isl_space *ran, *dom1, *dom2, *nest; - - if (!left || !right) - goto error; - - if (!match(left, isl_dim_param, right, isl_dim_param)) - isl_die(left->ctx, isl_error_invalid, - "parameters need to match", goto error); - if (!isl_space_tuple_match(left, isl_dim_out, right, isl_dim_out)) - isl_die(left->ctx, isl_error_invalid, - "ranges need to match", goto error); - - ran = isl_space_range(isl_space_copy(left)); - - dom1 = isl_space_domain(left); - dom2 = isl_space_domain(right); - nest = isl_space_wrap(isl_space_join(isl_space_reverse(dom1), dom2)); - - return isl_space_join(isl_space_reverse(nest), ran); -error: - isl_space_free(left); - isl_space_free(right); - return NULL; -} - -__isl_give isl_space *isl_space_range_product(__isl_take isl_space *left, - __isl_take isl_space *right) -{ - isl_space *dom, *ran1, *ran2, *nest; - - if (!left || !right) - goto error; - - isl_assert(left->ctx, match(left, isl_dim_param, right, isl_dim_param), - goto error); - if (!isl_space_tuple_match(left, isl_dim_in, right, isl_dim_in)) - isl_die(left->ctx, isl_error_invalid, - "domains need to match", goto error); - - dom = isl_space_domain(isl_space_copy(left)); - - ran1 = isl_space_range(left); - ran2 = isl_space_range(right); - nest = isl_space_wrap(isl_space_join(isl_space_reverse(ran1), ran2)); - - return isl_space_join(isl_space_reverse(dom), nest); -error: - isl_space_free(left); - isl_space_free(right); - return NULL; -} - -__isl_give isl_space *isl_space_map_from_set(__isl_take isl_space *dim) -{ - isl_ctx *ctx; - isl_id **ids = NULL; - - if (!dim) - return NULL; - ctx = isl_space_get_ctx(dim); - if (!isl_space_is_set(dim)) - isl_die(ctx, isl_error_invalid, "not a set space", goto error); - dim = isl_space_cow(dim); - if (!dim) - return NULL; - if (dim->ids) { - ids = isl_calloc_array(dim->ctx, isl_id *, - dim->nparam + dim->n_out + dim->n_out); - if (!ids) - goto error; - get_ids(dim, isl_dim_param, 0, dim->nparam, ids); - get_ids(dim, isl_dim_out, 0, dim->n_out, ids + dim->nparam); - } - dim->n_in = dim->n_out; - if (ids) { - free(dim->ids); - dim->ids = ids; - dim->n_id = dim->nparam + dim->n_out + dim->n_out; - dim = copy_ids(dim, isl_dim_out, 0, dim, isl_dim_in); - } - isl_id_free(dim->tuple_id[0]); - dim->tuple_id[0] = isl_id_copy(dim->tuple_id[1]); - isl_space_free(dim->nested[0]); - dim->nested[0] = isl_space_copy(dim->nested[1]); - return dim; -error: - isl_space_free(dim); - return NULL; -} - -static __isl_give isl_space *set_ids(__isl_take isl_space *dim, - enum isl_dim_type type, - unsigned first, unsigned n, __isl_take isl_id **ids) -{ - int i; - - for (i = 0; i < n ; ++i) - dim = set_id(dim, type, first + i, ids[i]); - - return dim; -} - -__isl_give isl_space *isl_space_reverse(__isl_take isl_space *dim) -{ - unsigned t; - isl_space *nested; - isl_id **ids = NULL; - isl_id *id; - - if (!dim) - return NULL; - if (match(dim, isl_dim_in, dim, isl_dim_out)) - return dim; - - dim = isl_space_cow(dim); - if (!dim) - return NULL; - - id = dim->tuple_id[0]; - dim->tuple_id[0] = dim->tuple_id[1]; - dim->tuple_id[1] = id; - - nested = dim->nested[0]; - dim->nested[0] = dim->nested[1]; - dim->nested[1] = nested; - - if (dim->ids) { - ids = isl_alloc_array(dim->ctx, isl_id *, - dim->n_in + dim->n_out); - if (!ids) - goto error; - get_ids(dim, isl_dim_in, 0, dim->n_in, ids); - get_ids(dim, isl_dim_out, 0, dim->n_out, ids + dim->n_in); - } - - t = dim->n_in; - dim->n_in = dim->n_out; - dim->n_out = t; - - if (dim->ids) { - dim = set_ids(dim, isl_dim_out, 0, dim->n_out, ids); - dim = set_ids(dim, isl_dim_in, 0, dim->n_in, ids + dim->n_out); - free(ids); - } - - return dim; -error: - free(ids); - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_drop_dims(__isl_take isl_space *dim, - enum isl_dim_type type, unsigned first, unsigned num) -{ - int i; - - if (!dim) - return NULL; - - if (num == 0) - return isl_space_reset(dim, type); - - if (!valid_dim_type(type)) - isl_die(dim->ctx, isl_error_invalid, - "cannot drop dimensions of specified type", goto error); - - isl_assert(dim->ctx, first + num <= n(dim, type), goto error); - dim = isl_space_cow(dim); - if (!dim) - goto error; - if (dim->ids) { - dim = extend_ids(dim); - if (!dim) - goto error; - for (i = 0; i < num; ++i) - isl_id_free(get_id(dim, type, first + i)); - for (i = first+num; i < n(dim, type); ++i) - set_id(dim, type, i - num, get_id(dim, type, i)); - switch (type) { - case isl_dim_param: - get_ids(dim, isl_dim_in, 0, dim->n_in, - dim->ids + offset(dim, isl_dim_in) - num); - case isl_dim_in: - get_ids(dim, isl_dim_out, 0, dim->n_out, - dim->ids + offset(dim, isl_dim_out) - num); - default: - ; - } - dim->n_id -= num; - } - switch (type) { - case isl_dim_param: dim->nparam -= num; break; - case isl_dim_in: dim->n_in -= num; break; - case isl_dim_out: dim->n_out -= num; break; - default: ; - } - dim = isl_space_reset(dim, type); - if (type == isl_dim_param) { - if (dim && dim->nested[0] && - !(dim->nested[0] = isl_space_drop_dims(dim->nested[0], - isl_dim_param, first, num))) - goto error; - if (dim && dim->nested[1] && - !(dim->nested[1] = isl_space_drop_dims(dim->nested[1], - isl_dim_param, first, num))) - goto error; - } - return dim; -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_drop_inputs(__isl_take isl_space *dim, - unsigned first, unsigned n) -{ - if (!dim) - return NULL; - return isl_space_drop_dims(dim, isl_dim_in, first, n); -} - -__isl_give isl_space *isl_space_drop_outputs(__isl_take isl_space *dim, - unsigned first, unsigned n) -{ - if (!dim) - return NULL; - return isl_space_drop_dims(dim, isl_dim_out, first, n); -} - -__isl_give isl_space *isl_space_domain(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - dim = isl_space_drop_outputs(dim, 0, dim->n_out); - dim = isl_space_reverse(dim); - dim = mark_as_set(dim); - return dim; -} - -__isl_give isl_space *isl_space_from_domain(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - if (!isl_space_is_set(dim)) - isl_die(isl_space_get_ctx(dim), isl_error_invalid, - "not a set space", goto error); - dim = isl_space_reverse(dim); - dim = isl_space_reset(dim, isl_dim_out); - return dim; -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_range(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - dim = isl_space_drop_inputs(dim, 0, dim->n_in); - dim = mark_as_set(dim); - return dim; -} - -__isl_give isl_space *isl_space_from_range(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - if (!isl_space_is_set(dim)) - isl_die(isl_space_get_ctx(dim), isl_error_invalid, - "not a set space", goto error); - return isl_space_reset(dim, isl_dim_in); -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_params(__isl_take isl_space *space) -{ - if (isl_space_is_params(space)) - return space; - space = isl_space_drop_dims(space, - isl_dim_in, 0, isl_space_dim(space, isl_dim_in)); - space = isl_space_drop_dims(space, - isl_dim_out, 0, isl_space_dim(space, isl_dim_out)); - space = mark_as_params(space); - return space; -} - -__isl_give isl_space *isl_space_set_from_params(__isl_take isl_space *space) -{ - if (!space) - return NULL; - if (!isl_space_is_params(space)) - isl_die(isl_space_get_ctx(space), isl_error_invalid, - "not a parameter space", goto error); - return isl_space_reset(space, isl_dim_set); -error: - isl_space_free(space); - return NULL; -} - -__isl_give isl_space *isl_space_as_set_space(__isl_take isl_space *dim) -{ - dim = isl_space_cow(dim); - if (!dim) - return NULL; - - dim->n_out += dim->n_in; - dim->n_in = 0; - dim = isl_space_reset(dim, isl_dim_in); - dim = isl_space_reset(dim, isl_dim_out); - - return dim; -} - -__isl_give isl_space *isl_space_underlying(__isl_take isl_space *dim, - unsigned n_div) -{ - int i; - - if (!dim) - return NULL; - if (n_div == 0 && - dim->nparam == 0 && dim->n_in == 0 && dim->n_id == 0) - return isl_space_reset(isl_space_reset(dim, isl_dim_in), isl_dim_out); - dim = isl_space_cow(dim); - if (!dim) - return NULL; - dim->n_out += dim->nparam + dim->n_in + n_div; - dim->nparam = 0; - dim->n_in = 0; - - for (i = 0; i < dim->n_id; ++i) - isl_id_free(get_id(dim, isl_dim_out, i)); - dim->n_id = 0; - dim = isl_space_reset(dim, isl_dim_in); - dim = isl_space_reset(dim, isl_dim_out); - - return dim; -} - -int isl_space_is_equal(__isl_keep isl_space *dim1, __isl_keep isl_space *dim2) -{ - if (!dim1 || !dim2) - return -1; - if (dim1 == dim2) - return 1; - return match(dim1, isl_dim_param, dim2, isl_dim_param) && - isl_space_tuple_match(dim1, isl_dim_in, dim2, isl_dim_in) && - isl_space_tuple_match(dim1, isl_dim_out, dim2, isl_dim_out); -} - -/* Is space1 equal to the domain of space2? - */ -int isl_space_is_domain(__isl_keep isl_space *space1, - __isl_keep isl_space *space2) -{ - if (!space1 || !space2) - return -1; - if (!isl_space_is_set(space1)) - return 0; - return match(space1, isl_dim_param, space2, isl_dim_param) && - isl_space_tuple_match(space1, isl_dim_set, space2, isl_dim_in); -} - -int isl_space_compatible(__isl_keep isl_space *dim1, - __isl_keep isl_space *dim2) -{ - return dim1->nparam == dim2->nparam && - dim1->n_in + dim1->n_out == dim2->n_in + dim2->n_out; -} - -static uint32_t isl_hash_dim(uint32_t hash, __isl_keep isl_space *dim) -{ - int i; - isl_id *id; - - if (!dim) - return hash; - - hash = isl_hash_builtin(hash, dim->nparam); - hash = isl_hash_builtin(hash, dim->n_in); - hash = isl_hash_builtin(hash, dim->n_out); - - for (i = 0; i < dim->nparam; ++i) { - id = get_id(dim, isl_dim_param, i); - hash = isl_hash_id(hash, id); - } - - id = tuple_id(dim, isl_dim_in); - hash = isl_hash_id(hash, id); - id = tuple_id(dim, isl_dim_out); - hash = isl_hash_id(hash, id); - - hash = isl_hash_dim(hash, dim->nested[0]); - hash = isl_hash_dim(hash, dim->nested[1]); - - return hash; -} - -uint32_t isl_space_get_hash(__isl_keep isl_space *dim) -{ - uint32_t hash; - - if (!dim) - return 0; - - hash = isl_hash_init(); - hash = isl_hash_dim(hash, dim); - - return hash; -} - -int isl_space_is_wrapping(__isl_keep isl_space *dim) -{ - if (!dim) - return -1; - - if (!isl_space_is_set(dim)) - return 0; - - return dim->nested[1] != NULL; -} - -__isl_give isl_space *isl_space_wrap(__isl_take isl_space *dim) -{ - isl_space *wrap; - - if (!dim) - return NULL; - - wrap = isl_space_set_alloc(dim->ctx, - dim->nparam, dim->n_in + dim->n_out); - - wrap = copy_ids(wrap, isl_dim_param, 0, dim, isl_dim_param); - wrap = copy_ids(wrap, isl_dim_set, 0, dim, isl_dim_in); - wrap = copy_ids(wrap, isl_dim_set, dim->n_in, dim, isl_dim_out); - - if (!wrap) - goto error; - - wrap->nested[1] = dim; - - return wrap; -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_space *isl_space_unwrap(__isl_take isl_space *dim) -{ - isl_space *unwrap; - - if (!dim) - return NULL; - - if (!isl_space_is_wrapping(dim)) - isl_die(dim->ctx, isl_error_invalid, "not a wrapping dim", - goto error); - - unwrap = isl_space_copy(dim->nested[1]); - isl_space_free(dim); - - return unwrap; -error: - isl_space_free(dim); - return NULL; -} - -int isl_space_is_named_or_nested(__isl_keep isl_space *dim, enum isl_dim_type type) -{ - if (type != isl_dim_in && type != isl_dim_out) - return 0; - if (!dim) - return -1; - if (dim->tuple_id[type - isl_dim_in]) - return 1; - if (dim->nested[type - isl_dim_in]) - return 1; - return 0; -} - -int isl_space_may_be_set(__isl_keep isl_space *dim) -{ - if (!dim) - return -1; - if (isl_space_is_set(dim)) - return 1; - if (isl_space_dim(dim, isl_dim_in) != 0) - return 0; - if (isl_space_is_named_or_nested(dim, isl_dim_in)) - return 0; - return 1; -} - -__isl_give isl_space *isl_space_reset(__isl_take isl_space *dim, - enum isl_dim_type type) -{ - if (!isl_space_is_named_or_nested(dim, type)) - return dim; - - dim = isl_space_cow(dim); - if (!dim) - return NULL; - - isl_id_free(dim->tuple_id[type - isl_dim_in]); - dim->tuple_id[type - isl_dim_in] = NULL; - isl_space_free(dim->nested[type - isl_dim_in]); - dim->nested[type - isl_dim_in] = NULL; - - return dim; -} - -__isl_give isl_space *isl_space_flatten(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - if (!dim->nested[0] && !dim->nested[1]) - return dim; - - if (dim->nested[0]) - dim = isl_space_reset(dim, isl_dim_in); - if (dim && dim->nested[1]) - dim = isl_space_reset(dim, isl_dim_out); - - return dim; -} - -__isl_give isl_space *isl_space_flatten_domain(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - if (!dim->nested[0]) - return dim; - - return isl_space_reset(dim, isl_dim_in); -} - -__isl_give isl_space *isl_space_flatten_range(__isl_take isl_space *dim) -{ - if (!dim) - return NULL; - if (!dim->nested[1]) - return dim; - - return isl_space_reset(dim, isl_dim_out); -} - -/* Replace the dimensions of the given type of dst by those of src. - */ -__isl_give isl_space *isl_space_replace(__isl_take isl_space *dst, - enum isl_dim_type type, __isl_keep isl_space *src) -{ - dst = isl_space_cow(dst); - - if (!dst || !src) - goto error; - - dst = isl_space_drop_dims(dst, type, 0, isl_space_dim(dst, type)); - dst = isl_space_add_dims(dst, type, isl_space_dim(src, type)); - dst = copy_ids(dst, type, 0, src, type); - - if (dst && type == isl_dim_param) { - int i; - for (i = 0; i <= 1; ++i) { - if (!dst->nested[i]) - continue; - dst->nested[i] = isl_space_replace(dst->nested[i], - type, src); - if (!dst->nested[i]) - goto error; - } - } - - return dst; -error: - isl_space_free(dst); - return NULL; -} - -/* Given a dimension specification "dim" of a set, create a dimension - * specification for the lift of the set. In particular, the result - * is of the form [dim -> local[..]], with n_local variables in the - * range of the wrapped map. - */ -__isl_give isl_space *isl_space_lift(__isl_take isl_space *dim, unsigned n_local) -{ - isl_space *local_dim; - - if (!dim) - return NULL; - - local_dim = isl_space_dup(dim); - local_dim = isl_space_drop_dims(local_dim, isl_dim_set, 0, dim->n_out); - local_dim = isl_space_add_dims(local_dim, isl_dim_set, n_local); - local_dim = isl_space_set_tuple_name(local_dim, isl_dim_set, "local"); - dim = isl_space_join(isl_space_from_domain(dim), - isl_space_from_range(local_dim)); - dim = isl_space_wrap(dim); - dim = isl_space_set_tuple_name(dim, isl_dim_set, "lifted"); - - return dim; -} - -int isl_space_can_zip(__isl_keep isl_space *dim) -{ - if (!dim) - return -1; - - return dim->nested[0] && dim->nested[1]; -} - -__isl_give isl_space *isl_space_zip(__isl_take isl_space *dim) -{ - isl_space *dom, *ran; - isl_space *dom_dom, *dom_ran, *ran_dom, *ran_ran; - - if (!isl_space_can_zip(dim)) - isl_die(dim->ctx, isl_error_invalid, "dim cannot be zipped", - goto error); - - if (!dim) - return 0; - dom = isl_space_unwrap(isl_space_domain(isl_space_copy(dim))); - ran = isl_space_unwrap(isl_space_range(dim)); - dom_dom = isl_space_domain(isl_space_copy(dom)); - dom_ran = isl_space_range(dom); - ran_dom = isl_space_domain(isl_space_copy(ran)); - ran_ran = isl_space_range(ran); - dom = isl_space_join(isl_space_from_domain(dom_dom), - isl_space_from_range(ran_dom)); - ran = isl_space_join(isl_space_from_domain(dom_ran), - isl_space_from_range(ran_ran)); - return isl_space_join(isl_space_from_domain(isl_space_wrap(dom)), - isl_space_from_range(isl_space_wrap(ran))); -error: - isl_space_free(dim); - return NULL; -} - -int isl_space_has_named_params(__isl_keep isl_space *dim) -{ - int i; - unsigned off; - - if (!dim) - return -1; - if (dim->nparam == 0) - return 1; - off = isl_space_offset(dim, isl_dim_param); - if (off + dim->nparam > dim->n_id) - return 0; - for (i = 0; i < dim->nparam; ++i) - if (!dim->ids[off + i]) - return 0; - return 1; -} - -/* Align the initial parameters of dim1 to match the order in dim2. - */ -__isl_give isl_space *isl_space_align_params(__isl_take isl_space *dim1, - __isl_take isl_space *dim2) -{ - isl_reordering *exp; - - if (!isl_space_has_named_params(dim1) || !isl_space_has_named_params(dim2)) - isl_die(isl_space_get_ctx(dim1), isl_error_invalid, - "parameter alignment requires named parameters", - goto error); - - dim2 = isl_space_params(dim2); - exp = isl_parameter_alignment_reordering(dim1, dim2); - exp = isl_reordering_extend_space(exp, dim1); - isl_space_free(dim2); - if (!exp) - return NULL; - dim1 = isl_space_copy(exp->dim); - isl_reordering_free(exp); - return dim1; -error: - isl_space_free(dim1); - isl_space_free(dim2); - return NULL; -} - -/* Given the space of set (domain), construct a space for a map - * with as domain the given space and as range the range of "model". - */ -__isl_give isl_space *isl_space_extend_domain_with_range( - __isl_take isl_space *domain, __isl_take isl_space *model) -{ - isl_space *space; - - space = isl_space_from_domain(domain); - space = isl_space_add_dims(space, isl_dim_out, - isl_space_dim(model, isl_dim_out)); - if (isl_space_has_tuple_id(model, isl_dim_out)) - space = isl_space_set_tuple_id(space, isl_dim_out, - isl_space_get_tuple_id(model, isl_dim_out)); - isl_space_free(model); - return space; -} diff --git a/cloog-0.17.0/isl/isl_space_private.h b/cloog-0.17.0/isl/isl_space_private.h deleted file mode 100644 index 73762de4251d75fbeb1ecc36e8f5257f965d2237..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_space_private.h +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include -#include - -struct isl_name; -struct isl_space { - int ref; - - struct isl_ctx *ctx; - - unsigned nparam; - unsigned n_in; /* zero for sets */ - unsigned n_out; /* dim for sets */ - - isl_id *tuple_id[2]; - isl_space *nested[2]; - - unsigned n_id; - isl_id **ids; -}; - -__isl_give isl_space *isl_space_cow(__isl_take isl_space *dim); - -__isl_give isl_space *isl_space_underlying(__isl_take isl_space *dim, - unsigned n_div); - -uint32_t isl_space_get_hash(__isl_keep isl_space *dim); - -int isl_space_is_domain(__isl_keep isl_space *space1, - __isl_keep isl_space *space2); - -__isl_give isl_space *isl_space_as_set_space(__isl_take isl_space *dim); - -unsigned isl_space_offset(__isl_keep isl_space *dim, enum isl_dim_type type); - -int isl_space_may_be_set(__isl_keep isl_space *dim); -int isl_space_is_named_or_nested(__isl_keep isl_space *dim, enum isl_dim_type type); -int isl_space_has_named_params(__isl_keep isl_space *dim); -__isl_give isl_space *isl_space_reset(__isl_take isl_space *dim, - enum isl_dim_type type); -__isl_give isl_space *isl_space_flatten(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_flatten_domain(__isl_take isl_space *dim); -__isl_give isl_space *isl_space_flatten_range(__isl_take isl_space *dim); - -__isl_give isl_space *isl_space_replace(__isl_take isl_space *dst, - enum isl_dim_type type, __isl_keep isl_space *src); - -__isl_give isl_space *isl_space_lift(__isl_take isl_space *dim, unsigned n_local); - -__isl_give isl_space *isl_space_extend_domain_with_range( - __isl_take isl_space *domain, __isl_take isl_space *model); diff --git a/cloog-0.17.0/isl/isl_stream.c b/cloog-0.17.0/isl/isl_stream.c deleted file mode 100644 index db594688845a42dbf1bfddd5384eaa8ec9c7352f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_stream.c +++ /dev/null @@ -1,735 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include - -struct isl_keyword { - char *name; - enum isl_token_type type; -}; - -static int same_name(const void *entry, const void *val) -{ - const struct isl_keyword *keyword = (const struct isl_keyword *)entry; - - return !strcmp(keyword->name, val); -} - -enum isl_token_type isl_stream_register_keyword(struct isl_stream *s, - const char *name) -{ - struct isl_hash_table_entry *entry; - struct isl_keyword *keyword; - uint32_t name_hash; - - if (!s->keywords) { - s->keywords = isl_hash_table_alloc(s->ctx, 10); - if (!s->keywords) - return ISL_TOKEN_ERROR; - s->next_type = ISL_TOKEN_LAST; - } - - name_hash = isl_hash_string(isl_hash_init(), name); - - entry = isl_hash_table_find(s->ctx, s->keywords, name_hash, - same_name, name, 1); - if (!entry) - return ISL_TOKEN_ERROR; - if (entry->data) { - keyword = entry->data; - return keyword->type; - } - - keyword = isl_calloc_type(s->ctx, struct isl_keyword); - if (!keyword) - return ISL_TOKEN_ERROR; - keyword->type = s->next_type++; - keyword->name = strdup(name); - if (!keyword->name) { - free(keyword); - return ISL_TOKEN_ERROR; - } - entry->data = keyword; - - return keyword->type; -} - -struct isl_token *isl_token_new(isl_ctx *ctx, - int line, int col, unsigned on_new_line) -{ - struct isl_token *tok = isl_alloc_type(ctx, struct isl_token); - if (!tok) - return NULL; - tok->line = line; - tok->col = col; - tok->on_new_line = on_new_line; - tok->is_keyword = 0; - tok->u.s = NULL; - return tok; -} - -void isl_token_free(struct isl_token *tok) -{ - if (!tok) - return; - if (tok->type == ISL_TOKEN_VALUE) - isl_int_clear(tok->u.v); - else if (tok->type == ISL_TOKEN_MAP) - isl_map_free(tok->u.map); - else if (tok->type == ISL_TOKEN_AFF) - isl_pw_aff_free(tok->u.pwaff); - else - free(tok->u.s); - free(tok); -} - -void isl_stream_error(struct isl_stream *s, struct isl_token *tok, char *msg) -{ - int line = tok ? tok->line : s->line; - int col = tok ? tok->col : s->col; - fprintf(stderr, "syntax error (%d, %d): %s\n", line, col, msg); - if (tok) { - if (tok->type < 256) - fprintf(stderr, "got '%c'\n", tok->type); - else if (tok->type == ISL_TOKEN_IDENT) - fprintf(stderr, "got ident '%s'\n", tok->u.s); - else if (tok->is_keyword) - fprintf(stderr, "got keyword '%s'\n", tok->u.s); - else if (tok->type == ISL_TOKEN_VALUE) { - fprintf(stderr, "got value '"); - isl_int_print(stderr, tok->u.v, 0); - fprintf(stderr, "'\n"); - } else if (tok->type == ISL_TOKEN_MAP) { - isl_printer *p; - fprintf(stderr, "got map '"); - p = isl_printer_to_file(s->ctx, stderr); - p = isl_printer_print_map(p, tok->u.map); - isl_printer_free(p); - fprintf(stderr, "'\n"); - } else if (tok->type == ISL_TOKEN_AFF) { - isl_printer *p; - fprintf(stderr, "got affine expression '"); - p = isl_printer_to_file(s->ctx, stderr); - p = isl_printer_print_pw_aff(p, tok->u.pwaff); - isl_printer_free(p); - fprintf(stderr, "'\n"); - } else if (tok->u.s) - fprintf(stderr, "got token '%s'\n", tok->u.s); - else - fprintf(stderr, "got token type %d\n", tok->type); - } -} - -static struct isl_stream* isl_stream_new(struct isl_ctx *ctx) -{ - int i; - struct isl_stream *s = isl_alloc_type(ctx, struct isl_stream); - if (!s) - return NULL; - s->ctx = ctx; - isl_ctx_ref(s->ctx); - s->file = NULL; - s->str = NULL; - s->len = 0; - s->line = 1; - s->col = 0; - s->eof = 0; - s->c = -1; - s->n_un = 0; - for (i = 0; i < 5; ++i) - s->tokens[i] = NULL; - s->n_token = 0; - s->keywords = NULL; - s->size = 256; - s->buffer = isl_alloc_array(ctx, char, s->size); - if (!s->buffer) - goto error; - return s; -error: - isl_stream_free(s); - return NULL; -} - -struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file) -{ - struct isl_stream *s = isl_stream_new(ctx); - if (!s) - return NULL; - s->file = file; - return s; -} - -struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str) -{ - struct isl_stream *s = isl_stream_new(ctx); - if (!s) - return NULL; - s->str = str; - return s; -} - -static int stream_getc(struct isl_stream *s) -{ - int c; - if (s->eof) - return -1; - if (s->n_un) - return s->c = s->un[--s->n_un]; - if (s->file) - c = fgetc(s->file); - else { - c = *s->str++; - if (c == '\0') - c = -1; - } - if (c == -1) - s->eof = 1; - if (!s->eof) { - if (s->c == '\n') { - s->line++; - s->col = 0; - } else - s->col++; - } - s->c = c; - return c; -} - -static void isl_stream_ungetc(struct isl_stream *s, int c) -{ - isl_assert(s->ctx, s->n_un < 5, return); - s->un[s->n_un++] = c; - s->c = -1; -} - -static int isl_stream_getc(struct isl_stream *s) -{ - int c; - - do { - c = stream_getc(s); - if (c != '\\') - return c; - c = stream_getc(s); - } while (c == '\n'); - - isl_stream_ungetc(s, c); - - return '\\'; -} - -static int isl_stream_push_char(struct isl_stream *s, int c) -{ - if (s->len >= s->size) { - char *buffer; - s->size = (3*s->size)/2; - buffer = isl_realloc_array(s->ctx, s->buffer, char, s->size); - if (!buffer) - return -1; - s->buffer = buffer; - } - s->buffer[s->len++] = c; - return 0; -} - -void isl_stream_push_token(struct isl_stream *s, struct isl_token *tok) -{ - isl_assert(s->ctx, s->n_token < 5, return); - s->tokens[s->n_token++] = tok; -} - -static enum isl_token_type check_keywords(struct isl_stream *s) -{ - struct isl_hash_table_entry *entry; - struct isl_keyword *keyword; - uint32_t name_hash; - - if (!strcasecmp(s->buffer, "exists")) - return ISL_TOKEN_EXISTS; - if (!strcasecmp(s->buffer, "and")) - return ISL_TOKEN_AND; - if (!strcasecmp(s->buffer, "or")) - return ISL_TOKEN_OR; - if (!strcasecmp(s->buffer, "not")) - return ISL_TOKEN_NOT; - if (!strcasecmp(s->buffer, "infty")) - return ISL_TOKEN_INFTY; - if (!strcasecmp(s->buffer, "infinity")) - return ISL_TOKEN_INFTY; - if (!strcasecmp(s->buffer, "NaN")) - return ISL_TOKEN_NAN; - if (!strcasecmp(s->buffer, "min")) - return ISL_TOKEN_MIN; - if (!strcasecmp(s->buffer, "max")) - return ISL_TOKEN_MAX; - if (!strcasecmp(s->buffer, "rat")) - return ISL_TOKEN_RAT; - if (!strcasecmp(s->buffer, "true")) - return ISL_TOKEN_TRUE; - if (!strcasecmp(s->buffer, "false")) - return ISL_TOKEN_FALSE; - if (!strcasecmp(s->buffer, "ceild")) - return ISL_TOKEN_CEILD; - if (!strcasecmp(s->buffer, "floord")) - return ISL_TOKEN_FLOORD; - if (!strcasecmp(s->buffer, "mod")) - return ISL_TOKEN_MOD; - - if (!s->keywords) - return ISL_TOKEN_IDENT; - - name_hash = isl_hash_string(isl_hash_init(), s->buffer); - entry = isl_hash_table_find(s->ctx, s->keywords, name_hash, same_name, - s->buffer, 0); - if (entry) { - keyword = entry->data; - return keyword->type; - } - - return ISL_TOKEN_IDENT; -} - -int isl_stream_skip_line(struct isl_stream *s) -{ - int c; - - while ((c = isl_stream_getc(s)) != -1 && c != '\n') - /* nothing */ - ; - - return c == -1 ? -1 : 0; -} - -static struct isl_token *next_token(struct isl_stream *s, int same_line) -{ - int c; - struct isl_token *tok = NULL; - int line, col; - int old_line = s->line; - - if (s->n_token) { - if (same_line && s->tokens[s->n_token - 1]->on_new_line) - return NULL; - return s->tokens[--s->n_token]; - } - - if (same_line && s->c == '\n') - return NULL; - - s->len = 0; - - /* skip spaces and comment lines */ - while ((c = isl_stream_getc(s)) != -1) { - if (c == '#') { - if (isl_stream_skip_line(s) < 0) - break; - c = '\n'; - if (same_line) - break; - } else if (!isspace(c) || (same_line && c == '\n')) - break; - } - - line = s->line; - col = s->col; - - if (c == -1 || (same_line && c == '\n')) - return NULL; - if (c == '(' || - c == ')' || - c == '+' || - c == '*' || - c == '%' || - c == '?' || - c == '^' || - c == '@' || - c == '$' || - c == ',' || - c == '.' || - c == ';' || - c == '[' || - c == ']' || - c == '{' || - c == '}') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = (enum isl_token_type)c; - return tok; - } - if (c == '-') { - int c; - if ((c = isl_stream_getc(s)) == '>') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->u.s = strdup("->"); - tok->type = ISL_TOKEN_TO; - return tok; - } - if (c != -1) - isl_stream_ungetc(s, c); - if (!isdigit(c)) { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = (enum isl_token_type) '-'; - return tok; - } - } - if (c == '-' || isdigit(c)) { - int minus = c == '-'; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_VALUE; - isl_int_init(tok->u.v); - if (isl_stream_push_char(s, c)) - goto error; - while ((c = isl_stream_getc(s)) != -1 && isdigit(c)) - if (isl_stream_push_char(s, c)) - goto error; - if (c != -1) - isl_stream_ungetc(s, c); - isl_stream_push_char(s, '\0'); - isl_int_read(tok->u.v, s->buffer); - if (minus && isl_int_is_zero(tok->u.v)) { - tok->col++; - tok->on_new_line = 0; - isl_stream_push_token(s, tok); - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = (enum isl_token_type) '-'; - } - return tok; - } - if (isalpha(c) || c == '_') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - isl_stream_push_char(s, c); - while ((c = isl_stream_getc(s)) != -1 && - (isalnum(c) || c == '_')) - isl_stream_push_char(s, c); - if (c != -1) - isl_stream_ungetc(s, c); - while ((c = isl_stream_getc(s)) != -1 && c == '\'') - isl_stream_push_char(s, c); - if (c != -1) - isl_stream_ungetc(s, c); - isl_stream_push_char(s, '\0'); - tok->type = check_keywords(s); - if (tok->type != ISL_TOKEN_IDENT) - tok->is_keyword = 1; - tok->u.s = strdup(s->buffer); - if (!tok->u.s) - goto error; - return tok; - } - if (c == '"') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_STRING; - tok->u.s = NULL; - while ((c = isl_stream_getc(s)) != -1 && c != '"' && c != '\n') - isl_stream_push_char(s, c); - if (c != '"') { - isl_stream_error(s, NULL, "unterminated string"); - goto error; - } - isl_stream_push_char(s, '\0'); - tok->u.s = strdup(s->buffer); - return tok; - } - if (c == '=') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup("=="); - tok->type = ISL_TOKEN_EQ_EQ; - return tok; - } - if (c != -1) - isl_stream_ungetc(s, c); - tok->type = (enum isl_token_type) '='; - return tok; - } - if (c == ':') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup(":="); - tok->type = ISL_TOKEN_DEF; - return tok; - } - if (c != -1) - isl_stream_ungetc(s, c); - tok->type = (enum isl_token_type) ':'; - return tok; - } - if (c == '>') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup(">="); - tok->type = ISL_TOKEN_GE; - return tok; - } else if (c == '>') { - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup(">>="); - tok->type = ISL_TOKEN_LEX_GE; - return tok; - } - tok->u.s = strdup(">>"); - tok->type = ISL_TOKEN_LEX_GT; - } else { - tok->u.s = strdup(">"); - tok->type = ISL_TOKEN_GT; - } - if (c != -1) - isl_stream_ungetc(s, c); - return tok; - } - if (c == '<') { - int c; - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup("<="); - tok->type = ISL_TOKEN_LE; - return tok; - } else if (c == '<') { - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup("<<="); - tok->type = ISL_TOKEN_LEX_LE; - return tok; - } - tok->u.s = strdup("<<"); - tok->type = ISL_TOKEN_LEX_LT; - } else { - tok->u.s = strdup("<"); - tok->type = ISL_TOKEN_LT; - } - if (c != -1) - isl_stream_ungetc(s, c); - return tok; - } - if (c == '&') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_AND; - if ((c = isl_stream_getc(s)) != '&' && c != -1) { - tok->u.s = strdup("&"); - isl_stream_ungetc(s, c); - } else - tok->u.s = strdup("&&"); - return tok; - } - if (c == '|') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_OR; - if ((c = isl_stream_getc(s)) != '|' && c != -1) { - tok->u.s = strdup("|"); - isl_stream_ungetc(s, c); - } else - tok->u.s = strdup("||"); - return tok; - } - if (c == '/') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) != '\\' && c != -1) { - tok->type = (enum isl_token_type) '/'; - isl_stream_ungetc(s, c); - } else { - tok->u.s = strdup("/\\"); - tok->type = ISL_TOKEN_AND; - } - return tok; - } - if (c == '\\') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) != '/' && c != -1) { - tok->type = (enum isl_token_type) '\\'; - isl_stream_ungetc(s, c); - } else { - tok->u.s = strdup("\\/"); - tok->type = ISL_TOKEN_OR; - } - return tok; - } - if (c == '!') { - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - if ((c = isl_stream_getc(s)) == '=') { - tok->u.s = strdup("!="); - tok->type = ISL_TOKEN_NE; - return tok; - } else { - tok->type = ISL_TOKEN_NOT; - tok->u.s = strdup("!"); - } - if (c != -1) - isl_stream_ungetc(s, c); - return tok; - } - - tok = isl_token_new(s->ctx, line, col, old_line != line); - if (!tok) - return NULL; - tok->type = ISL_TOKEN_UNKNOWN; - return tok; -error: - isl_token_free(tok); - return NULL; -} - -struct isl_token *isl_stream_next_token(struct isl_stream *s) -{ - return next_token(s, 0); -} - -struct isl_token *isl_stream_next_token_on_same_line(struct isl_stream *s) -{ - return next_token(s, 1); -} - -int isl_stream_eat_if_available(struct isl_stream *s, int type) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - if (tok->type == type) { - isl_token_free(tok); - return 1; - } - isl_stream_push_token(s, tok); - return 0; -} - -int isl_stream_next_token_is(struct isl_stream *s, int type) -{ - struct isl_token *tok; - int r; - - tok = isl_stream_next_token(s); - if (!tok) - return 0; - r = tok->type == type; - isl_stream_push_token(s, tok); - return r; -} - -char *isl_stream_read_ident_if_available(struct isl_stream *s) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return NULL; - if (tok->type == ISL_TOKEN_IDENT) { - char *ident = strdup(tok->u.s); - isl_token_free(tok); - return ident; - } - isl_stream_push_token(s, tok); - return NULL; -} - -int isl_stream_eat(struct isl_stream *s, int type) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - if (!tok) - return -1; - if (tok->type == type) { - isl_token_free(tok); - return 0; - } - isl_stream_error(s, tok, "expecting other token"); - isl_stream_push_token(s, tok); - return -1; -} - -int isl_stream_is_empty(struct isl_stream *s) -{ - struct isl_token *tok; - - tok = isl_stream_next_token(s); - - if (!tok) - return 1; - - isl_stream_push_token(s, tok); - return 0; -} - -static int free_keyword(void **p, void *user) -{ - struct isl_keyword *keyword = *p; - - free(keyword->name); - free(keyword); - - return 0; -} - -void isl_stream_flush_tokens(struct isl_stream *s) -{ - int i; - - if (!s) - return; - for (i = 0; i < s->n_token; ++i) - isl_token_free(s->tokens[i]); - s->n_token = 0; -} - -void isl_stream_free(struct isl_stream *s) -{ - if (!s) - return; - free(s->buffer); - if (s->n_token != 0) { - struct isl_token *tok = isl_stream_next_token(s); - isl_stream_error(s, tok, "unexpected token"); - isl_token_free(tok); - } - if (s->keywords) { - isl_hash_table_foreach(s->ctx, s->keywords, &free_keyword, NULL); - isl_hash_table_free(s->ctx, s->keywords); - } - isl_ctx_deref(s->ctx); - free(s); -} diff --git a/cloog-0.17.0/isl/isl_stream_private.h b/cloog-0.17.0/isl/isl_stream_private.h deleted file mode 100644 index 56232510edff725b416848b0fd31624a295a2aa5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_stream_private.h +++ /dev/null @@ -1,4 +0,0 @@ -#include - -struct isl_token *isl_token_new(isl_ctx *ctx, - int line, int col, unsigned on_new_line); diff --git a/cloog-0.17.0/isl/isl_tab.c b/cloog-0.17.0/isl/isl_tab.c deleted file mode 100644 index 220f0b049d4e614aea8a836ad4728a7533c1d38b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_tab.c +++ /dev/null @@ -1,3342 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_map_private.h" -#include "isl_tab.h" -#include -#include - -/* - * The implementation of tableaus in this file was inspired by Section 8 - * of David Detlefs, Greg Nelson and James B. Saxe, "Simplify: a theorem - * prover for program checking". - */ - -struct isl_tab *isl_tab_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_var, unsigned M) -{ - int i; - struct isl_tab *tab; - unsigned off = 2 + M; - - tab = isl_calloc_type(ctx, struct isl_tab); - if (!tab) - return NULL; - tab->mat = isl_mat_alloc(ctx, n_row, off + n_var); - if (!tab->mat) - goto error; - tab->var = isl_alloc_array(ctx, struct isl_tab_var, n_var); - if (!tab->var) - goto error; - tab->con = isl_alloc_array(ctx, struct isl_tab_var, n_row); - if (!tab->con) - goto error; - tab->col_var = isl_alloc_array(ctx, int, n_var); - if (!tab->col_var) - goto error; - tab->row_var = isl_alloc_array(ctx, int, n_row); - if (!tab->row_var) - goto error; - for (i = 0; i < n_var; ++i) { - tab->var[i].index = i; - tab->var[i].is_row = 0; - tab->var[i].is_nonneg = 0; - tab->var[i].is_zero = 0; - tab->var[i].is_redundant = 0; - tab->var[i].frozen = 0; - tab->var[i].negated = 0; - tab->col_var[i] = i; - } - tab->n_row = 0; - tab->n_con = 0; - tab->n_eq = 0; - tab->max_con = n_row; - tab->n_col = n_var; - tab->n_var = n_var; - tab->max_var = n_var; - tab->n_param = 0; - tab->n_div = 0; - tab->n_dead = 0; - tab->n_redundant = 0; - tab->strict_redundant = 0; - tab->need_undo = 0; - tab->rational = 0; - tab->empty = 0; - tab->in_undo = 0; - tab->M = M; - tab->cone = 0; - tab->bottom.type = isl_tab_undo_bottom; - tab->bottom.next = NULL; - tab->top = &tab->bottom; - - tab->n_zero = 0; - tab->n_unbounded = 0; - tab->basis = NULL; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new) -{ - unsigned off; - - if (!tab) - return -1; - - off = 2 + tab->M; - - if (tab->max_con < tab->n_con + n_new) { - struct isl_tab_var *con; - - con = isl_realloc_array(tab->mat->ctx, tab->con, - struct isl_tab_var, tab->max_con + n_new); - if (!con) - return -1; - tab->con = con; - tab->max_con += n_new; - } - if (tab->mat->n_row < tab->n_row + n_new) { - int *row_var; - - tab->mat = isl_mat_extend(tab->mat, - tab->n_row + n_new, off + tab->n_col); - if (!tab->mat) - return -1; - row_var = isl_realloc_array(tab->mat->ctx, tab->row_var, - int, tab->mat->n_row); - if (!row_var) - return -1; - tab->row_var = row_var; - if (tab->row_sign) { - enum isl_tab_row_sign *s; - s = isl_realloc_array(tab->mat->ctx, tab->row_sign, - enum isl_tab_row_sign, tab->mat->n_row); - if (!s) - return -1; - tab->row_sign = s; - } - } - return 0; -} - -/* Make room for at least n_new extra variables. - * Return -1 if anything went wrong. - */ -int isl_tab_extend_vars(struct isl_tab *tab, unsigned n_new) -{ - struct isl_tab_var *var; - unsigned off = 2 + tab->M; - - if (tab->max_var < tab->n_var + n_new) { - var = isl_realloc_array(tab->mat->ctx, tab->var, - struct isl_tab_var, tab->n_var + n_new); - if (!var) - return -1; - tab->var = var; - tab->max_var += n_new; - } - - if (tab->mat->n_col < off + tab->n_col + n_new) { - int *p; - - tab->mat = isl_mat_extend(tab->mat, - tab->mat->n_row, off + tab->n_col + n_new); - if (!tab->mat) - return -1; - p = isl_realloc_array(tab->mat->ctx, tab->col_var, - int, tab->n_col + n_new); - if (!p) - return -1; - tab->col_var = p; - } - - return 0; -} - -struct isl_tab *isl_tab_extend(struct isl_tab *tab, unsigned n_new) -{ - if (isl_tab_extend_cons(tab, n_new) >= 0) - return tab; - - isl_tab_free(tab); - return NULL; -} - -static void free_undo_record(struct isl_tab_undo *undo) -{ - switch (undo->type) { - case isl_tab_undo_saved_basis: - free(undo->u.col_var); - break; - default:; - } - free(undo); -} - -static void free_undo(struct isl_tab *tab) -{ - struct isl_tab_undo *undo, *next; - - for (undo = tab->top; undo && undo != &tab->bottom; undo = next) { - next = undo->next; - free_undo_record(undo); - } - tab->top = undo; -} - -void isl_tab_free(struct isl_tab *tab) -{ - if (!tab) - return; - free_undo(tab); - isl_mat_free(tab->mat); - isl_vec_free(tab->dual); - isl_basic_map_free(tab->bmap); - free(tab->var); - free(tab->con); - free(tab->row_var); - free(tab->col_var); - free(tab->row_sign); - isl_mat_free(tab->samples); - free(tab->sample_index); - isl_mat_free(tab->basis); - free(tab); -} - -struct isl_tab *isl_tab_dup(struct isl_tab *tab) -{ - int i; - struct isl_tab *dup; - unsigned off; - - if (!tab) - return NULL; - - off = 2 + tab->M; - dup = isl_calloc_type(tab->mat->ctx, struct isl_tab); - if (!dup) - return NULL; - dup->mat = isl_mat_dup(tab->mat); - if (!dup->mat) - goto error; - dup->var = isl_alloc_array(tab->mat->ctx, struct isl_tab_var, tab->max_var); - if (!dup->var) - goto error; - for (i = 0; i < tab->n_var; ++i) - dup->var[i] = tab->var[i]; - dup->con = isl_alloc_array(tab->mat->ctx, struct isl_tab_var, tab->max_con); - if (!dup->con) - goto error; - for (i = 0; i < tab->n_con; ++i) - dup->con[i] = tab->con[i]; - dup->col_var = isl_alloc_array(tab->mat->ctx, int, tab->mat->n_col - off); - if (!dup->col_var) - goto error; - for (i = 0; i < tab->n_col; ++i) - dup->col_var[i] = tab->col_var[i]; - dup->row_var = isl_alloc_array(tab->mat->ctx, int, tab->mat->n_row); - if (!dup->row_var) - goto error; - for (i = 0; i < tab->n_row; ++i) - dup->row_var[i] = tab->row_var[i]; - if (tab->row_sign) { - dup->row_sign = isl_alloc_array(tab->mat->ctx, enum isl_tab_row_sign, - tab->mat->n_row); - if (!dup->row_sign) - goto error; - for (i = 0; i < tab->n_row; ++i) - dup->row_sign[i] = tab->row_sign[i]; - } - if (tab->samples) { - dup->samples = isl_mat_dup(tab->samples); - if (!dup->samples) - goto error; - dup->sample_index = isl_alloc_array(tab->mat->ctx, int, - tab->samples->n_row); - if (!dup->sample_index) - goto error; - dup->n_sample = tab->n_sample; - dup->n_outside = tab->n_outside; - } - dup->n_row = tab->n_row; - dup->n_con = tab->n_con; - dup->n_eq = tab->n_eq; - dup->max_con = tab->max_con; - dup->n_col = tab->n_col; - dup->n_var = tab->n_var; - dup->max_var = tab->max_var; - dup->n_param = tab->n_param; - dup->n_div = tab->n_div; - dup->n_dead = tab->n_dead; - dup->n_redundant = tab->n_redundant; - dup->rational = tab->rational; - dup->empty = tab->empty; - dup->strict_redundant = 0; - dup->need_undo = 0; - dup->in_undo = 0; - dup->M = tab->M; - tab->cone = tab->cone; - dup->bottom.type = isl_tab_undo_bottom; - dup->bottom.next = NULL; - dup->top = &dup->bottom; - - dup->n_zero = tab->n_zero; - dup->n_unbounded = tab->n_unbounded; - dup->basis = isl_mat_dup(tab->basis); - - return dup; -error: - isl_tab_free(dup); - return NULL; -} - -/* Construct the coefficient matrix of the product tableau - * of two tableaus. - * mat{1,2} is the coefficient matrix of tableau {1,2} - * row{1,2} is the number of rows in tableau {1,2} - * col{1,2} is the number of columns in tableau {1,2} - * off is the offset to the coefficient column (skipping the - * denominator, the constant term and the big parameter if any) - * r{1,2} is the number of redundant rows in tableau {1,2} - * d{1,2} is the number of dead columns in tableau {1,2} - * - * The order of the rows and columns in the result is as explained - * in isl_tab_product. - */ -static struct isl_mat *tab_mat_product(struct isl_mat *mat1, - struct isl_mat *mat2, unsigned row1, unsigned row2, - unsigned col1, unsigned col2, - unsigned off, unsigned r1, unsigned r2, unsigned d1, unsigned d2) -{ - int i; - struct isl_mat *prod; - unsigned n; - - prod = isl_mat_alloc(mat1->ctx, mat1->n_row + mat2->n_row, - off + col1 + col2); - if (!prod) - return NULL; - - n = 0; - for (i = 0; i < r1; ++i) { - isl_seq_cpy(prod->row[n + i], mat1->row[i], off + d1); - isl_seq_clr(prod->row[n + i] + off + d1, d2); - isl_seq_cpy(prod->row[n + i] + off + d1 + d2, - mat1->row[i] + off + d1, col1 - d1); - isl_seq_clr(prod->row[n + i] + off + col1 + d1, col2 - d2); - } - - n += r1; - for (i = 0; i < r2; ++i) { - isl_seq_cpy(prod->row[n + i], mat2->row[i], off); - isl_seq_clr(prod->row[n + i] + off, d1); - isl_seq_cpy(prod->row[n + i] + off + d1, - mat2->row[i] + off, d2); - isl_seq_clr(prod->row[n + i] + off + d1 + d2, col1 - d1); - isl_seq_cpy(prod->row[n + i] + off + col1 + d1, - mat2->row[i] + off + d2, col2 - d2); - } - - n += r2; - for (i = 0; i < row1 - r1; ++i) { - isl_seq_cpy(prod->row[n + i], mat1->row[r1 + i], off + d1); - isl_seq_clr(prod->row[n + i] + off + d1, d2); - isl_seq_cpy(prod->row[n + i] + off + d1 + d2, - mat1->row[r1 + i] + off + d1, col1 - d1); - isl_seq_clr(prod->row[n + i] + off + col1 + d1, col2 - d2); - } - - n += row1 - r1; - for (i = 0; i < row2 - r2; ++i) { - isl_seq_cpy(prod->row[n + i], mat2->row[r2 + i], off); - isl_seq_clr(prod->row[n + i] + off, d1); - isl_seq_cpy(prod->row[n + i] + off + d1, - mat2->row[r2 + i] + off, d2); - isl_seq_clr(prod->row[n + i] + off + d1 + d2, col1 - d1); - isl_seq_cpy(prod->row[n + i] + off + col1 + d1, - mat2->row[r2 + i] + off + d2, col2 - d2); - } - - return prod; -} - -/* Update the row or column index of a variable that corresponds - * to a variable in the first input tableau. - */ -static void update_index1(struct isl_tab_var *var, - unsigned r1, unsigned r2, unsigned d1, unsigned d2) -{ - if (var->index == -1) - return; - if (var->is_row && var->index >= r1) - var->index += r2; - if (!var->is_row && var->index >= d1) - var->index += d2; -} - -/* Update the row or column index of a variable that corresponds - * to a variable in the second input tableau. - */ -static void update_index2(struct isl_tab_var *var, - unsigned row1, unsigned col1, - unsigned r1, unsigned r2, unsigned d1, unsigned d2) -{ - if (var->index == -1) - return; - if (var->is_row) { - if (var->index < r2) - var->index += r1; - else - var->index += row1; - } else { - if (var->index < d2) - var->index += d1; - else - var->index += col1; - } -} - -/* Create a tableau that represents the Cartesian product of the sets - * represented by tableaus tab1 and tab2. - * The order of the rows in the product is - * - redundant rows of tab1 - * - redundant rows of tab2 - * - non-redundant rows of tab1 - * - non-redundant rows of tab2 - * The order of the columns is - * - denominator - * - constant term - * - coefficient of big parameter, if any - * - dead columns of tab1 - * - dead columns of tab2 - * - live columns of tab1 - * - live columns of tab2 - * The order of the variables and the constraints is a concatenation - * of order in the two input tableaus. - */ -struct isl_tab *isl_tab_product(struct isl_tab *tab1, struct isl_tab *tab2) -{ - int i; - struct isl_tab *prod; - unsigned off; - unsigned r1, r2, d1, d2; - - if (!tab1 || !tab2) - return NULL; - - isl_assert(tab1->mat->ctx, tab1->M == tab2->M, return NULL); - isl_assert(tab1->mat->ctx, tab1->rational == tab2->rational, return NULL); - isl_assert(tab1->mat->ctx, tab1->cone == tab2->cone, return NULL); - isl_assert(tab1->mat->ctx, !tab1->row_sign, return NULL); - isl_assert(tab1->mat->ctx, !tab2->row_sign, return NULL); - isl_assert(tab1->mat->ctx, tab1->n_param == 0, return NULL); - isl_assert(tab1->mat->ctx, tab2->n_param == 0, return NULL); - isl_assert(tab1->mat->ctx, tab1->n_div == 0, return NULL); - isl_assert(tab1->mat->ctx, tab2->n_div == 0, return NULL); - - off = 2 + tab1->M; - r1 = tab1->n_redundant; - r2 = tab2->n_redundant; - d1 = tab1->n_dead; - d2 = tab2->n_dead; - prod = isl_calloc_type(tab1->mat->ctx, struct isl_tab); - if (!prod) - return NULL; - prod->mat = tab_mat_product(tab1->mat, tab2->mat, - tab1->n_row, tab2->n_row, - tab1->n_col, tab2->n_col, off, r1, r2, d1, d2); - if (!prod->mat) - goto error; - prod->var = isl_alloc_array(tab1->mat->ctx, struct isl_tab_var, - tab1->max_var + tab2->max_var); - if (!prod->var) - goto error; - for (i = 0; i < tab1->n_var; ++i) { - prod->var[i] = tab1->var[i]; - update_index1(&prod->var[i], r1, r2, d1, d2); - } - for (i = 0; i < tab2->n_var; ++i) { - prod->var[tab1->n_var + i] = tab2->var[i]; - update_index2(&prod->var[tab1->n_var + i], - tab1->n_row, tab1->n_col, - r1, r2, d1, d2); - } - prod->con = isl_alloc_array(tab1->mat->ctx, struct isl_tab_var, - tab1->max_con + tab2->max_con); - if (!prod->con) - goto error; - for (i = 0; i < tab1->n_con; ++i) { - prod->con[i] = tab1->con[i]; - update_index1(&prod->con[i], r1, r2, d1, d2); - } - for (i = 0; i < tab2->n_con; ++i) { - prod->con[tab1->n_con + i] = tab2->con[i]; - update_index2(&prod->con[tab1->n_con + i], - tab1->n_row, tab1->n_col, - r1, r2, d1, d2); - } - prod->col_var = isl_alloc_array(tab1->mat->ctx, int, - tab1->n_col + tab2->n_col); - if (!prod->col_var) - goto error; - for (i = 0; i < tab1->n_col; ++i) { - int pos = i < d1 ? i : i + d2; - prod->col_var[pos] = tab1->col_var[i]; - } - for (i = 0; i < tab2->n_col; ++i) { - int pos = i < d2 ? d1 + i : tab1->n_col + i; - int t = tab2->col_var[i]; - if (t >= 0) - t += tab1->n_var; - else - t -= tab1->n_con; - prod->col_var[pos] = t; - } - prod->row_var = isl_alloc_array(tab1->mat->ctx, int, - tab1->mat->n_row + tab2->mat->n_row); - if (!prod->row_var) - goto error; - for (i = 0; i < tab1->n_row; ++i) { - int pos = i < r1 ? i : i + r2; - prod->row_var[pos] = tab1->row_var[i]; - } - for (i = 0; i < tab2->n_row; ++i) { - int pos = i < r2 ? r1 + i : tab1->n_row + i; - int t = tab2->row_var[i]; - if (t >= 0) - t += tab1->n_var; - else - t -= tab1->n_con; - prod->row_var[pos] = t; - } - prod->samples = NULL; - prod->sample_index = NULL; - prod->n_row = tab1->n_row + tab2->n_row; - prod->n_con = tab1->n_con + tab2->n_con; - prod->n_eq = 0; - prod->max_con = tab1->max_con + tab2->max_con; - prod->n_col = tab1->n_col + tab2->n_col; - prod->n_var = tab1->n_var + tab2->n_var; - prod->max_var = tab1->max_var + tab2->max_var; - prod->n_param = 0; - prod->n_div = 0; - prod->n_dead = tab1->n_dead + tab2->n_dead; - prod->n_redundant = tab1->n_redundant + tab2->n_redundant; - prod->rational = tab1->rational; - prod->empty = tab1->empty || tab2->empty; - prod->strict_redundant = tab1->strict_redundant || tab2->strict_redundant; - prod->need_undo = 0; - prod->in_undo = 0; - prod->M = tab1->M; - prod->cone = tab1->cone; - prod->bottom.type = isl_tab_undo_bottom; - prod->bottom.next = NULL; - prod->top = &prod->bottom; - - prod->n_zero = 0; - prod->n_unbounded = 0; - prod->basis = NULL; - - return prod; -error: - isl_tab_free(prod); - return NULL; -} - -static struct isl_tab_var *var_from_index(struct isl_tab *tab, int i) -{ - if (i >= 0) - return &tab->var[i]; - else - return &tab->con[~i]; -} - -struct isl_tab_var *isl_tab_var_from_row(struct isl_tab *tab, int i) -{ - return var_from_index(tab, tab->row_var[i]); -} - -static struct isl_tab_var *var_from_col(struct isl_tab *tab, int i) -{ - return var_from_index(tab, tab->col_var[i]); -} - -/* Check if there are any upper bounds on column variable "var", - * i.e., non-negative rows where var appears with a negative coefficient. - * Return 1 if there are no such bounds. - */ -static int max_is_manifestly_unbounded(struct isl_tab *tab, - struct isl_tab_var *var) -{ - int i; - unsigned off = 2 + tab->M; - - if (var->is_row) - return 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - if (!isl_int_is_neg(tab->mat->row[i][off + var->index])) - continue; - if (isl_tab_var_from_row(tab, i)->is_nonneg) - return 0; - } - return 1; -} - -/* Check if there are any lower bounds on column variable "var", - * i.e., non-negative rows where var appears with a positive coefficient. - * Return 1 if there are no such bounds. - */ -static int min_is_manifestly_unbounded(struct isl_tab *tab, - struct isl_tab_var *var) -{ - int i; - unsigned off = 2 + tab->M; - - if (var->is_row) - return 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - if (!isl_int_is_pos(tab->mat->row[i][off + var->index])) - continue; - if (isl_tab_var_from_row(tab, i)->is_nonneg) - return 0; - } - return 1; -} - -static int row_cmp(struct isl_tab *tab, int r1, int r2, int c, isl_int t) -{ - unsigned off = 2 + tab->M; - - if (tab->M) { - int s; - isl_int_mul(t, tab->mat->row[r1][2], tab->mat->row[r2][off+c]); - isl_int_submul(t, tab->mat->row[r2][2], tab->mat->row[r1][off+c]); - s = isl_int_sgn(t); - if (s) - return s; - } - isl_int_mul(t, tab->mat->row[r1][1], tab->mat->row[r2][off + c]); - isl_int_submul(t, tab->mat->row[r2][1], tab->mat->row[r1][off + c]); - return isl_int_sgn(t); -} - -/* Given the index of a column "c", return the index of a row - * that can be used to pivot the column in, with either an increase - * (sgn > 0) or a decrease (sgn < 0) of the corresponding variable. - * If "var" is not NULL, then the row returned will be different from - * the one associated with "var". - * - * Each row in the tableau is of the form - * - * x_r = a_r0 + \sum_i a_ri x_i - * - * Only rows with x_r >= 0 and with the sign of a_ri opposite to "sgn" - * impose any limit on the increase or decrease in the value of x_c - * and this bound is equal to a_r0 / |a_rc|. We are therefore looking - * for the row with the smallest (most stringent) such bound. - * Note that the common denominator of each row drops out of the fraction. - * To check if row j has a smaller bound than row r, i.e., - * a_j0 / |a_jc| < a_r0 / |a_rc| or a_j0 |a_rc| < a_r0 |a_jc|, - * we check if -sign(a_jc) (a_j0 a_rc - a_r0 a_jc) < 0, - * where -sign(a_jc) is equal to "sgn". - */ -static int pivot_row(struct isl_tab *tab, - struct isl_tab_var *var, int sgn, int c) -{ - int j, r, tsgn; - isl_int t; - unsigned off = 2 + tab->M; - - isl_int_init(t); - r = -1; - for (j = tab->n_redundant; j < tab->n_row; ++j) { - if (var && j == var->index) - continue; - if (!isl_tab_var_from_row(tab, j)->is_nonneg) - continue; - if (sgn * isl_int_sgn(tab->mat->row[j][off + c]) >= 0) - continue; - if (r < 0) { - r = j; - continue; - } - tsgn = sgn * row_cmp(tab, r, j, c, t); - if (tsgn < 0 || (tsgn == 0 && - tab->row_var[j] < tab->row_var[r])) - r = j; - } - isl_int_clear(t); - return r; -} - -/* Find a pivot (row and col) that will increase (sgn > 0) or decrease - * (sgn < 0) the value of row variable var. - * If not NULL, then skip_var is a row variable that should be ignored - * while looking for a pivot row. It is usually equal to var. - * - * As the given row in the tableau is of the form - * - * x_r = a_r0 + \sum_i a_ri x_i - * - * we need to find a column such that the sign of a_ri is equal to "sgn" - * (such that an increase in x_i will have the desired effect) or a - * column with a variable that may attain negative values. - * If a_ri is positive, then we need to move x_i in the same direction - * to obtain the desired effect. Otherwise, x_i has to move in the - * opposite direction. - */ -static void find_pivot(struct isl_tab *tab, - struct isl_tab_var *var, struct isl_tab_var *skip_var, - int sgn, int *row, int *col) -{ - int j, r, c; - isl_int *tr; - - *row = *col = -1; - - isl_assert(tab->mat->ctx, var->is_row, return); - tr = tab->mat->row[var->index] + 2 + tab->M; - - c = -1; - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (isl_int_is_zero(tr[j])) - continue; - if (isl_int_sgn(tr[j]) != sgn && - var_from_col(tab, j)->is_nonneg) - continue; - if (c < 0 || tab->col_var[j] < tab->col_var[c]) - c = j; - } - if (c < 0) - return; - - sgn *= isl_int_sgn(tr[c]); - r = pivot_row(tab, skip_var, sgn, c); - *row = r < 0 ? var->index : r; - *col = c; -} - -/* Return 1 if row "row" represents an obviously redundant inequality. - * This means - * - it represents an inequality or a variable - * - that is the sum of a non-negative sample value and a positive - * combination of zero or more non-negative constraints. - */ -int isl_tab_row_is_redundant(struct isl_tab *tab, int row) -{ - int i; - unsigned off = 2 + tab->M; - - if (tab->row_var[row] < 0 && !isl_tab_var_from_row(tab, row)->is_nonneg) - return 0; - - if (isl_int_is_neg(tab->mat->row[row][1])) - return 0; - if (tab->strict_redundant && isl_int_is_zero(tab->mat->row[row][1])) - return 0; - if (tab->M && isl_int_is_neg(tab->mat->row[row][2])) - return 0; - - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (isl_int_is_zero(tab->mat->row[row][off + i])) - continue; - if (tab->col_var[i] >= 0) - return 0; - if (isl_int_is_neg(tab->mat->row[row][off + i])) - return 0; - if (!var_from_col(tab, i)->is_nonneg) - return 0; - } - return 1; -} - -static void swap_rows(struct isl_tab *tab, int row1, int row2) -{ - int t; - enum isl_tab_row_sign s; - - t = tab->row_var[row1]; - tab->row_var[row1] = tab->row_var[row2]; - tab->row_var[row2] = t; - isl_tab_var_from_row(tab, row1)->index = row1; - isl_tab_var_from_row(tab, row2)->index = row2; - tab->mat = isl_mat_swap_rows(tab->mat, row1, row2); - - if (!tab->row_sign) - return; - s = tab->row_sign[row1]; - tab->row_sign[row1] = tab->row_sign[row2]; - tab->row_sign[row2] = s; -} - -static int push_union(struct isl_tab *tab, - enum isl_tab_undo_type type, union isl_tab_undo_val u) WARN_UNUSED; -static int push_union(struct isl_tab *tab, - enum isl_tab_undo_type type, union isl_tab_undo_val u) -{ - struct isl_tab_undo *undo; - - if (!tab->need_undo) - return 0; - - undo = isl_alloc_type(tab->mat->ctx, struct isl_tab_undo); - if (!undo) - return -1; - undo->type = type; - undo->u = u; - undo->next = tab->top; - tab->top = undo; - - return 0; -} - -int isl_tab_push_var(struct isl_tab *tab, - enum isl_tab_undo_type type, struct isl_tab_var *var) -{ - union isl_tab_undo_val u; - if (var->is_row) - u.var_index = tab->row_var[var->index]; - else - u.var_index = tab->col_var[var->index]; - return push_union(tab, type, u); -} - -int isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) -{ - union isl_tab_undo_val u = { 0 }; - return push_union(tab, type, u); -} - -/* Push a record on the undo stack describing the current basic - * variables, so that the this state can be restored during rollback. - */ -int isl_tab_push_basis(struct isl_tab *tab) -{ - int i; - union isl_tab_undo_val u; - - u.col_var = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!u.col_var) - return -1; - for (i = 0; i < tab->n_col; ++i) - u.col_var[i] = tab->col_var[i]; - return push_union(tab, isl_tab_undo_saved_basis, u); -} - -int isl_tab_push_callback(struct isl_tab *tab, struct isl_tab_callback *callback) -{ - union isl_tab_undo_val u; - u.callback = callback; - return push_union(tab, isl_tab_undo_callback, u); -} - -struct isl_tab *isl_tab_init_samples(struct isl_tab *tab) -{ - if (!tab) - return NULL; - - tab->n_sample = 0; - tab->n_outside = 0; - tab->samples = isl_mat_alloc(tab->mat->ctx, 1, 1 + tab->n_var); - if (!tab->samples) - goto error; - tab->sample_index = isl_alloc_array(tab->mat->ctx, int, 1); - if (!tab->sample_index) - goto error; - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -struct isl_tab *isl_tab_add_sample(struct isl_tab *tab, - __isl_take isl_vec *sample) -{ - if (!tab || !sample) - goto error; - - if (tab->n_sample + 1 > tab->samples->n_row) { - int *t = isl_realloc_array(tab->mat->ctx, - tab->sample_index, int, tab->n_sample + 1); - if (!t) - goto error; - tab->sample_index = t; - } - - tab->samples = isl_mat_extend(tab->samples, - tab->n_sample + 1, tab->samples->n_col); - if (!tab->samples) - goto error; - - isl_seq_cpy(tab->samples->row[tab->n_sample], sample->el, sample->size); - isl_vec_free(sample); - tab->sample_index[tab->n_sample] = tab->n_sample; - tab->n_sample++; - - return tab; -error: - isl_vec_free(sample); - isl_tab_free(tab); - return NULL; -} - -struct isl_tab *isl_tab_drop_sample(struct isl_tab *tab, int s) -{ - if (s != tab->n_outside) { - int t = tab->sample_index[tab->n_outside]; - tab->sample_index[tab->n_outside] = tab->sample_index[s]; - tab->sample_index[s] = t; - isl_mat_swap_rows(tab->samples, tab->n_outside, s); - } - tab->n_outside++; - if (isl_tab_push(tab, isl_tab_undo_drop_sample) < 0) { - isl_tab_free(tab); - return NULL; - } - - return tab; -} - -/* Record the current number of samples so that we can remove newer - * samples during a rollback. - */ -int isl_tab_save_samples(struct isl_tab *tab) -{ - union isl_tab_undo_val u; - - if (!tab) - return -1; - - u.n = tab->n_sample; - return push_union(tab, isl_tab_undo_saved_samples, u); -} - -/* Mark row with index "row" as being redundant. - * If we may need to undo the operation or if the row represents - * a variable of the original problem, the row is kept, - * but no longer considered when looking for a pivot row. - * Otherwise, the row is simply removed. - * - * The row may be interchanged with some other row. If it - * is interchanged with a later row, return 1. Otherwise return 0. - * If the rows are checked in order in the calling function, - * then a return value of 1 means that the row with the given - * row number may now contain a different row that hasn't been checked yet. - */ -int isl_tab_mark_redundant(struct isl_tab *tab, int row) -{ - struct isl_tab_var *var = isl_tab_var_from_row(tab, row); - var->is_redundant = 1; - isl_assert(tab->mat->ctx, row >= tab->n_redundant, return -1); - if (tab->need_undo || tab->row_var[row] >= 0) { - if (tab->row_var[row] >= 0 && !var->is_nonneg) { - var->is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, var) < 0) - return -1; - } - if (row != tab->n_redundant) - swap_rows(tab, row, tab->n_redundant); - tab->n_redundant++; - return isl_tab_push_var(tab, isl_tab_undo_redundant, var); - } else { - if (row != tab->n_row - 1) - swap_rows(tab, row, tab->n_row - 1); - isl_tab_var_from_row(tab, tab->n_row - 1)->index = -1; - tab->n_row--; - return 1; - } -} - -int isl_tab_mark_empty(struct isl_tab *tab) -{ - if (!tab) - return -1; - if (!tab->empty && tab->need_undo) - if (isl_tab_push(tab, isl_tab_undo_empty) < 0) - return -1; - tab->empty = 1; - return 0; -} - -int isl_tab_freeze_constraint(struct isl_tab *tab, int con) -{ - struct isl_tab_var *var; - - if (!tab) - return -1; - - var = &tab->con[con]; - if (var->frozen) - return 0; - if (var->index < 0) - return 0; - var->frozen = 1; - - if (tab->need_undo) - return isl_tab_push_var(tab, isl_tab_undo_freeze, var); - - return 0; -} - -/* Update the rows signs after a pivot of "row" and "col", with "row_sgn" - * the original sign of the pivot element. - * We only keep track of row signs during PILP solving and in this case - * we only pivot a row with negative sign (meaning the value is always - * non-positive) using a positive pivot element. - * - * For each row j, the new value of the parametric constant is equal to - * - * a_j0 - a_jc a_r0/a_rc - * - * where a_j0 is the original parametric constant, a_rc is the pivot element, - * a_r0 is the parametric constant of the pivot row and a_jc is the - * pivot column entry of the row j. - * Since a_r0 is non-positive and a_rc is positive, the sign of row j - * remains the same if a_jc has the same sign as the row j or if - * a_jc is zero. In all other cases, we reset the sign to "unknown". - */ -static void update_row_sign(struct isl_tab *tab, int row, int col, int row_sgn) -{ - int i; - struct isl_mat *mat = tab->mat; - unsigned off = 2 + tab->M; - - if (!tab->row_sign) - return; - - if (tab->row_sign[row] == 0) - return; - isl_assert(mat->ctx, row_sgn > 0, return); - isl_assert(mat->ctx, tab->row_sign[row] == isl_tab_row_neg, return); - tab->row_sign[row] = isl_tab_row_pos; - for (i = 0; i < tab->n_row; ++i) { - int s; - if (i == row) - continue; - s = isl_int_sgn(mat->row[i][off + col]); - if (!s) - continue; - if (!tab->row_sign[i]) - continue; - if (s < 0 && tab->row_sign[i] == isl_tab_row_neg) - continue; - if (s > 0 && tab->row_sign[i] == isl_tab_row_pos) - continue; - tab->row_sign[i] = isl_tab_row_unknown; - } -} - -/* Given a row number "row" and a column number "col", pivot the tableau - * such that the associated variables are interchanged. - * The given row in the tableau expresses - * - * x_r = a_r0 + \sum_i a_ri x_i - * - * or - * - * x_c = 1/a_rc x_r - a_r0/a_rc + sum_{i \ne r} -a_ri/a_rc - * - * Substituting this equality into the other rows - * - * x_j = a_j0 + \sum_i a_ji x_i - * - * with a_jc \ne 0, we obtain - * - * x_j = a_jc/a_rc x_r + a_j0 - a_jc a_r0/a_rc + sum a_ji - a_jc a_ri/a_rc - * - * The tableau - * - * n_rc/d_r n_ri/d_r - * n_jc/d_j n_ji/d_j - * - * where i is any other column and j is any other row, - * is therefore transformed into - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * s(n_rc)d_r n_jc/(|n_rc| d_j) (n_ji |n_rc| - s(n_rc)n_jc n_ri)/(|n_rc| d_j) - * - * The transformation is performed along the following steps - * - * d_r/n_rc n_ri/n_rc - * n_jc/d_j n_ji/d_j - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/d_j n_ji/d_j - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/(|n_rc| d_j) n_ji/(|n_rc| d_j) - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/(|n_rc| d_j) (n_ji |n_rc|)/(|n_rc| d_j) - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * n_jc/(|n_rc| d_j) (n_ji |n_rc| - s(n_rc)n_jc n_ri)/(|n_rc| d_j) - * - * s(n_rc)d_r/|n_rc| -s(n_rc)n_ri/|n_rc| - * s(n_rc)d_r n_jc/(|n_rc| d_j) (n_ji |n_rc| - s(n_rc)n_jc n_ri)/(|n_rc| d_j) - * - */ -int isl_tab_pivot(struct isl_tab *tab, int row, int col) -{ - int i, j; - int sgn; - int t; - struct isl_mat *mat = tab->mat; - struct isl_tab_var *var; - unsigned off = 2 + tab->M; - - if (tab->mat->ctx->abort) { - isl_ctx_set_error(tab->mat->ctx, isl_error_abort); - return -1; - } - - isl_int_swap(mat->row[row][0], mat->row[row][off + col]); - sgn = isl_int_sgn(mat->row[row][0]); - if (sgn < 0) { - isl_int_neg(mat->row[row][0], mat->row[row][0]); - isl_int_neg(mat->row[row][off + col], mat->row[row][off + col]); - } else - for (j = 0; j < off - 1 + tab->n_col; ++j) { - if (j == off - 1 + col) - continue; - isl_int_neg(mat->row[row][1 + j], mat->row[row][1 + j]); - } - if (!isl_int_is_one(mat->row[row][0])) - isl_seq_normalize(mat->ctx, mat->row[row], off + tab->n_col); - for (i = 0; i < tab->n_row; ++i) { - if (i == row) - continue; - if (isl_int_is_zero(mat->row[i][off + col])) - continue; - isl_int_mul(mat->row[i][0], mat->row[i][0], mat->row[row][0]); - for (j = 0; j < off - 1 + tab->n_col; ++j) { - if (j == off - 1 + col) - continue; - isl_int_mul(mat->row[i][1 + j], - mat->row[i][1 + j], mat->row[row][0]); - isl_int_addmul(mat->row[i][1 + j], - mat->row[i][off + col], mat->row[row][1 + j]); - } - isl_int_mul(mat->row[i][off + col], - mat->row[i][off + col], mat->row[row][off + col]); - if (!isl_int_is_one(mat->row[i][0])) - isl_seq_normalize(mat->ctx, mat->row[i], off + tab->n_col); - } - t = tab->row_var[row]; - tab->row_var[row] = tab->col_var[col]; - tab->col_var[col] = t; - var = isl_tab_var_from_row(tab, row); - var->is_row = 1; - var->index = row; - var = var_from_col(tab, col); - var->is_row = 0; - var->index = col; - update_row_sign(tab, row, col, sgn); - if (tab->in_undo) - return 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - if (isl_int_is_zero(mat->row[i][off + col])) - continue; - if (!isl_tab_var_from_row(tab, i)->frozen && - isl_tab_row_is_redundant(tab, i)) { - int redo = isl_tab_mark_redundant(tab, i); - if (redo < 0) - return -1; - if (redo) - --i; - } - } - return 0; -} - -/* If "var" represents a column variable, then pivot is up (sgn > 0) - * or down (sgn < 0) to a row. The variable is assumed not to be - * unbounded in the specified direction. - * If sgn = 0, then the variable is unbounded in both directions, - * and we pivot with any row we can find. - */ -static int to_row(struct isl_tab *tab, struct isl_tab_var *var, int sign) WARN_UNUSED; -static int to_row(struct isl_tab *tab, struct isl_tab_var *var, int sign) -{ - int r; - unsigned off = 2 + tab->M; - - if (var->is_row) - return 0; - - if (sign == 0) { - for (r = tab->n_redundant; r < tab->n_row; ++r) - if (!isl_int_is_zero(tab->mat->row[r][off+var->index])) - break; - isl_assert(tab->mat->ctx, r < tab->n_row, return -1); - } else { - r = pivot_row(tab, NULL, sign, var->index); - isl_assert(tab->mat->ctx, r >= 0, return -1); - } - - return isl_tab_pivot(tab, r, var->index); -} - -/* Check whether all variables that are marked as non-negative - * also have a non-negative sample value. This function is not - * called from the current code but is useful during debugging. - */ -static void check_table(struct isl_tab *tab) __attribute__ ((unused)); -static void check_table(struct isl_tab *tab) -{ - int i; - - if (tab->empty) - return; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var; - var = isl_tab_var_from_row(tab, i); - if (!var->is_nonneg) - continue; - if (tab->M) { - isl_assert(tab->mat->ctx, - !isl_int_is_neg(tab->mat->row[i][2]), abort()); - if (isl_int_is_pos(tab->mat->row[i][2])) - continue; - } - isl_assert(tab->mat->ctx, !isl_int_is_neg(tab->mat->row[i][1]), - abort()); - } -} - -/* Return the sign of the maximal value of "var". - * If the sign is not negative, then on return from this function, - * the sample value will also be non-negative. - * - * If "var" is manifestly unbounded wrt positive values, we are done. - * Otherwise, we pivot the variable up to a row if needed - * Then we continue pivoting down until either - * - no more down pivots can be performed - * - the sample value is positive - * - the variable is pivoted into a manifestly unbounded column - */ -static int sign_of_max(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - - if (max_is_manifestly_unbounded(tab, var)) - return 1; - if (to_row(tab, var, 1) < 0) - return -2; - while (!isl_int_is_pos(tab->mat->row[var->index][1])) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - return isl_int_sgn(tab->mat->row[var->index][1]); - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (!var->is_row) /* manifestly unbounded */ - return 1; - } - return 1; -} - -int isl_tab_sign_of_max(struct isl_tab *tab, int con) -{ - struct isl_tab_var *var; - - if (!tab) - return -2; - - var = &tab->con[con]; - isl_assert(tab->mat->ctx, !var->is_redundant, return -2); - isl_assert(tab->mat->ctx, !var->is_zero, return -2); - - return sign_of_max(tab, var); -} - -static int row_is_neg(struct isl_tab *tab, int row) -{ - if (!tab->M) - return isl_int_is_neg(tab->mat->row[row][1]); - if (isl_int_is_pos(tab->mat->row[row][2])) - return 0; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 1; - return isl_int_is_neg(tab->mat->row[row][1]); -} - -static int row_sgn(struct isl_tab *tab, int row) -{ - if (!tab->M) - return isl_int_sgn(tab->mat->row[row][1]); - if (!isl_int_is_zero(tab->mat->row[row][2])) - return isl_int_sgn(tab->mat->row[row][2]); - else - return isl_int_sgn(tab->mat->row[row][1]); -} - -/* Perform pivots until the row variable "var" has a non-negative - * sample value or until no more upward pivots can be performed. - * Return the sign of the sample value after the pivots have been - * performed. - */ -static int restore_row(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - - while (row_is_neg(tab, var->index)) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - break; - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (!var->is_row) /* manifestly unbounded */ - return 1; - } - return row_sgn(tab, var->index); -} - -/* Perform pivots until we are sure that the row variable "var" - * can attain non-negative values. After return from this - * function, "var" is still a row variable, but its sample - * value may not be non-negative, even if the function returns 1. - */ -static int at_least_zero(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - - while (isl_int_is_neg(tab->mat->row[var->index][1])) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - break; - if (row == var->index) /* manifestly unbounded */ - return 1; - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } - return !isl_int_is_neg(tab->mat->row[var->index][1]); -} - -/* Return a negative value if "var" can attain negative values. - * Return a non-negative value otherwise. - * - * If "var" is manifestly unbounded wrt negative values, we are done. - * Otherwise, if var is in a column, we can pivot it down to a row. - * Then we continue pivoting down until either - * - the pivot would result in a manifestly unbounded column - * => we don't perform the pivot, but simply return -1 - * - no more down pivots can be performed - * - the sample value is negative - * If the sample value becomes negative and the variable is supposed - * to be nonnegative, then we undo the last pivot. - * However, if the last pivot has made the pivoting variable - * obviously redundant, then it may have moved to another row. - * In that case we look for upward pivots until we reach a non-negative - * value again. - */ -static int sign_of_min(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - struct isl_tab_var *pivot_var = NULL; - - if (min_is_manifestly_unbounded(tab, var)) - return -1; - if (!var->is_row) { - col = var->index; - row = pivot_row(tab, NULL, -1, col); - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (var->is_redundant) - return 0; - if (isl_int_is_neg(tab->mat->row[var->index][1])) { - if (var->is_nonneg) { - if (!pivot_var->is_redundant && - pivot_var->index == row) { - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - } else - if (restore_row(tab, var) < -1) - return -2; - } - return -1; - } - } - if (var->is_redundant) - return 0; - while (!isl_int_is_neg(tab->mat->row[var->index][1])) { - find_pivot(tab, var, var, -1, &row, &col); - if (row == var->index) - return -1; - if (row == -1) - return isl_int_sgn(tab->mat->row[var->index][1]); - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - if (var->is_redundant) - return 0; - } - if (pivot_var && var->is_nonneg) { - /* pivot back to non-negative value */ - if (!pivot_var->is_redundant && pivot_var->index == row) { - if (isl_tab_pivot(tab, row, col) < 0) - return -2; - } else - if (restore_row(tab, var) < -1) - return -2; - } - return -1; -} - -static int row_at_most_neg_one(struct isl_tab *tab, int row) -{ - if (tab->M) { - if (isl_int_is_pos(tab->mat->row[row][2])) - return 0; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 1; - } - return isl_int_is_neg(tab->mat->row[row][1]) && - isl_int_abs_ge(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -/* Return 1 if "var" can attain values <= -1. - * Return 0 otherwise. - * - * The sample value of "var" is assumed to be non-negative when the - * the function is called. If 1 is returned then the constraint - * is not redundant and the sample value is made non-negative again before - * the function returns. - */ -int isl_tab_min_at_most_neg_one(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - struct isl_tab_var *pivot_var; - - if (min_is_manifestly_unbounded(tab, var)) - return 1; - if (!var->is_row) { - col = var->index; - row = pivot_row(tab, NULL, -1, col); - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (var->is_redundant) - return 0; - if (row_at_most_neg_one(tab, var->index)) { - if (var->is_nonneg) { - if (!pivot_var->is_redundant && - pivot_var->index == row) { - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } else - if (restore_row(tab, var) < -1) - return -1; - } - return 1; - } - } - if (var->is_redundant) - return 0; - do { - find_pivot(tab, var, var, -1, &row, &col); - if (row == var->index) { - if (restore_row(tab, var) < -1) - return -1; - return 1; - } - if (row == -1) - return 0; - pivot_var = var_from_col(tab, col); - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (var->is_redundant) - return 0; - } while (!row_at_most_neg_one(tab, var->index)); - if (var->is_nonneg) { - /* pivot back to non-negative value */ - if (!pivot_var->is_redundant && pivot_var->index == row) - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (restore_row(tab, var) < -1) - return -1; - } - return 1; -} - -/* Return 1 if "var" can attain values >= 1. - * Return 0 otherwise. - */ -static int at_least_one(struct isl_tab *tab, struct isl_tab_var *var) -{ - int row, col; - isl_int *r; - - if (max_is_manifestly_unbounded(tab, var)) - return 1; - if (to_row(tab, var, 1) < 0) - return -1; - r = tab->mat->row[var->index]; - while (isl_int_lt(r[1], r[0])) { - find_pivot(tab, var, var, 1, &row, &col); - if (row == -1) - return isl_int_ge(r[1], r[0]); - if (row == var->index) /* manifestly unbounded */ - return 1; - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } - return 1; -} - -static void swap_cols(struct isl_tab *tab, int col1, int col2) -{ - int t; - unsigned off = 2 + tab->M; - t = tab->col_var[col1]; - tab->col_var[col1] = tab->col_var[col2]; - tab->col_var[col2] = t; - var_from_col(tab, col1)->index = col1; - var_from_col(tab, col2)->index = col2; - tab->mat = isl_mat_swap_cols(tab->mat, off + col1, off + col2); -} - -/* Mark column with index "col" as representing a zero variable. - * If we may need to undo the operation the column is kept, - * but no longer considered. - * Otherwise, the column is simply removed. - * - * The column may be interchanged with some other column. If it - * is interchanged with a later column, return 1. Otherwise return 0. - * If the columns are checked in order in the calling function, - * then a return value of 1 means that the column with the given - * column number may now contain a different column that - * hasn't been checked yet. - */ -int isl_tab_kill_col(struct isl_tab *tab, int col) -{ - var_from_col(tab, col)->is_zero = 1; - if (tab->need_undo) { - if (isl_tab_push_var(tab, isl_tab_undo_zero, - var_from_col(tab, col)) < 0) - return -1; - if (col != tab->n_dead) - swap_cols(tab, col, tab->n_dead); - tab->n_dead++; - return 0; - } else { - if (col != tab->n_col - 1) - swap_cols(tab, col, tab->n_col - 1); - var_from_col(tab, tab->n_col - 1)->index = -1; - tab->n_col--; - return 1; - } -} - -static int row_is_manifestly_non_integral(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - - if (tab->M && !isl_int_eq(tab->mat->row[row][2], - tab->mat->row[row][0])) - return 0; - if (isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) != -1) - return 0; - - return !isl_int_is_divisible_by(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -/* For integer tableaus, check if any of the coordinates are stuck - * at a non-integral value. - */ -static int tab_is_manifestly_empty(struct isl_tab *tab) -{ - int i; - - if (tab->empty) - return 1; - if (tab->rational) - return 0; - - for (i = 0; i < tab->n_var; ++i) { - if (!tab->var[i].is_row) - continue; - if (row_is_manifestly_non_integral(tab, tab->var[i].index)) - return 1; - } - - return 0; -} - -/* Row variable "var" is non-negative and cannot attain any values - * larger than zero. This means that the coefficients of the unrestricted - * column variables are zero and that the coefficients of the non-negative - * column variables are zero or negative. - * Each of the non-negative variables with a negative coefficient can - * then also be written as the negative sum of non-negative variables - * and must therefore also be zero. - */ -static int close_row(struct isl_tab *tab, struct isl_tab_var *var) WARN_UNUSED; -static int close_row(struct isl_tab *tab, struct isl_tab_var *var) -{ - int j; - struct isl_mat *mat = tab->mat; - unsigned off = 2 + tab->M; - - isl_assert(tab->mat->ctx, var->is_nonneg, return -1); - var->is_zero = 1; - if (tab->need_undo) - if (isl_tab_push_var(tab, isl_tab_undo_zero, var) < 0) - return -1; - for (j = tab->n_dead; j < tab->n_col; ++j) { - int recheck; - if (isl_int_is_zero(mat->row[var->index][off + j])) - continue; - isl_assert(tab->mat->ctx, - isl_int_is_neg(mat->row[var->index][off + j]), return -1); - recheck = isl_tab_kill_col(tab, j); - if (recheck < 0) - return -1; - if (recheck) - --j; - } - if (isl_tab_mark_redundant(tab, var->index) < 0) - return -1; - if (tab_is_manifestly_empty(tab) && isl_tab_mark_empty(tab) < 0) - return -1; - return 0; -} - -/* Add a constraint to the tableau and allocate a row for it. - * Return the index into the constraint array "con". - */ -int isl_tab_allocate_con(struct isl_tab *tab) -{ - int r; - - isl_assert(tab->mat->ctx, tab->n_row < tab->mat->n_row, return -1); - isl_assert(tab->mat->ctx, tab->n_con < tab->max_con, return -1); - - r = tab->n_con; - tab->con[r].index = tab->n_row; - tab->con[r].is_row = 1; - tab->con[r].is_nonneg = 0; - tab->con[r].is_zero = 0; - tab->con[r].is_redundant = 0; - tab->con[r].frozen = 0; - tab->con[r].negated = 0; - tab->row_var[tab->n_row] = ~r; - - tab->n_row++; - tab->n_con++; - if (isl_tab_push_var(tab, isl_tab_undo_allocate, &tab->con[r]) < 0) - return -1; - - return r; -} - -/* Add a variable to the tableau and allocate a column for it. - * Return the index into the variable array "var". - */ -int isl_tab_allocate_var(struct isl_tab *tab) -{ - int r; - int i; - unsigned off = 2 + tab->M; - - isl_assert(tab->mat->ctx, tab->n_col < tab->mat->n_col, return -1); - isl_assert(tab->mat->ctx, tab->n_var < tab->max_var, return -1); - - r = tab->n_var; - tab->var[r].index = tab->n_col; - tab->var[r].is_row = 0; - tab->var[r].is_nonneg = 0; - tab->var[r].is_zero = 0; - tab->var[r].is_redundant = 0; - tab->var[r].frozen = 0; - tab->var[r].negated = 0; - tab->col_var[tab->n_col] = r; - - for (i = 0; i < tab->n_row; ++i) - isl_int_set_si(tab->mat->row[i][off + tab->n_col], 0); - - tab->n_var++; - tab->n_col++; - if (isl_tab_push_var(tab, isl_tab_undo_allocate, &tab->var[r]) < 0) - return -1; - - return r; -} - -/* Add a row to the tableau. The row is given as an affine combination - * of the original variables and needs to be expressed in terms of the - * column variables. - * - * We add each term in turn. - * If r = n/d_r is the current sum and we need to add k x, then - * if x is a column variable, we increase the numerator of - * this column by k d_r - * if x = f/d_x is a row variable, then the new representation of r is - * - * n k f d_x/g n + d_r/g k f m/d_r n + m/d_g k f - * --- + --- = ------------------- = ------------------- - * d_r d_r d_r d_x/g m - * - * with g the gcd of d_r and d_x and m the lcm of d_r and d_x. - * - * If tab->M is set, then, internally, each variable x is represented - * as x' - M. We then also need no subtract k d_r from the coefficient of M. - */ -int isl_tab_add_row(struct isl_tab *tab, isl_int *line) -{ - int i; - int r; - isl_int *row; - isl_int a, b; - unsigned off = 2 + tab->M; - - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - isl_int_init(a); - isl_int_init(b); - row = tab->mat->row[tab->con[r].index]; - isl_int_set_si(row[0], 1); - isl_int_set(row[1], line[0]); - isl_seq_clr(row + 2, tab->M + tab->n_col); - for (i = 0; i < tab->n_var; ++i) { - if (tab->var[i].is_zero) - continue; - if (tab->var[i].is_row) { - isl_int_lcm(a, - row[0], tab->mat->row[tab->var[i].index][0]); - isl_int_swap(a, row[0]); - isl_int_divexact(a, row[0], a); - isl_int_divexact(b, - row[0], tab->mat->row[tab->var[i].index][0]); - isl_int_mul(b, b, line[1 + i]); - isl_seq_combine(row + 1, a, row + 1, - b, tab->mat->row[tab->var[i].index] + 1, - 1 + tab->M + tab->n_col); - } else - isl_int_addmul(row[off + tab->var[i].index], - line[1 + i], row[0]); - if (tab->M && i >= tab->n_param && i < tab->n_var - tab->n_div) - isl_int_submul(row[2], line[1 + i], row[0]); - } - isl_seq_normalize(tab->mat->ctx, row, off + tab->n_col); - isl_int_clear(a); - isl_int_clear(b); - - if (tab->row_sign) - tab->row_sign[tab->con[r].index] = isl_tab_row_unknown; - - return r; -} - -static int drop_row(struct isl_tab *tab, int row) -{ - isl_assert(tab->mat->ctx, ~tab->row_var[row] == tab->n_con - 1, return -1); - if (row != tab->n_row - 1) - swap_rows(tab, row, tab->n_row - 1); - tab->n_row--; - tab->n_con--; - return 0; -} - -static int drop_col(struct isl_tab *tab, int col) -{ - isl_assert(tab->mat->ctx, tab->col_var[col] == tab->n_var - 1, return -1); - if (col != tab->n_col - 1) - swap_cols(tab, col, tab->n_col - 1); - tab->n_col--; - tab->n_var--; - return 0; -} - -/* Add inequality "ineq" and check if it conflicts with the - * previously added constraints or if it is obviously redundant. - */ -int isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq) -{ - int r; - int sgn; - isl_int cst; - - if (!tab) - return -1; - if (tab->bmap) { - struct isl_basic_map *bmap = tab->bmap; - - isl_assert(tab->mat->ctx, tab->n_eq == bmap->n_eq, return -1); - isl_assert(tab->mat->ctx, - tab->n_con == bmap->n_eq + bmap->n_ineq, return -1); - tab->bmap = isl_basic_map_add_ineq(tab->bmap, ineq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - if (!tab->bmap) - return -1; - } - if (tab->cone) { - isl_int_init(cst); - isl_int_swap(ineq[0], cst); - } - r = isl_tab_add_row(tab, ineq); - if (tab->cone) { - isl_int_swap(ineq[0], cst); - isl_int_clear(cst); - } - if (r < 0) - return -1; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - if (isl_tab_row_is_redundant(tab, tab->con[r].index)) { - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - return -1; - return 0; - } - - sgn = restore_row(tab, &tab->con[r]); - if (sgn < -1) - return -1; - if (sgn < 0) - return isl_tab_mark_empty(tab); - if (tab->con[r].is_row && isl_tab_row_is_redundant(tab, tab->con[r].index)) - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - return -1; - return 0; -} - -/* Pivot a non-negative variable down until it reaches the value zero - * and then pivot the variable into a column position. - */ -static int to_col(struct isl_tab *tab, struct isl_tab_var *var) WARN_UNUSED; -static int to_col(struct isl_tab *tab, struct isl_tab_var *var) -{ - int i; - int row, col; - unsigned off = 2 + tab->M; - - if (!var->is_row) - return 0; - - while (isl_int_is_pos(tab->mat->row[var->index][1])) { - find_pivot(tab, var, NULL, -1, &row, &col); - isl_assert(tab->mat->ctx, row != -1, return -1); - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - if (!var->is_row) - return 0; - } - - for (i = tab->n_dead; i < tab->n_col; ++i) - if (!isl_int_is_zero(tab->mat->row[var->index][off + i])) - break; - - isl_assert(tab->mat->ctx, i < tab->n_col, return -1); - if (isl_tab_pivot(tab, var->index, i) < 0) - return -1; - - return 0; -} - -/* We assume Gaussian elimination has been performed on the equalities. - * The equalities can therefore never conflict. - * Adding the equalities is currently only really useful for a later call - * to isl_tab_ineq_type. - */ -static struct isl_tab *add_eq(struct isl_tab *tab, isl_int *eq) -{ - int i; - int r; - - if (!tab) - return NULL; - r = isl_tab_add_row(tab, eq); - if (r < 0) - goto error; - - r = tab->con[r].index; - i = isl_seq_first_non_zero(tab->mat->row[r] + 2 + tab->M + tab->n_dead, - tab->n_col - tab->n_dead); - isl_assert(tab->mat->ctx, i >= 0, goto error); - i += tab->n_dead; - if (isl_tab_pivot(tab, r, i) < 0) - goto error; - if (isl_tab_kill_col(tab, i) < 0) - goto error; - tab->n_eq++; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -static int row_is_manifestly_zero(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - - if (!isl_int_is_zero(tab->mat->row[row][1])) - return 0; - if (tab->M && !isl_int_is_zero(tab->mat->row[row][2])) - return 0; - return isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) == -1; -} - -/* Add an equality that is known to be valid for the given tableau. - */ -int isl_tab_add_valid_eq(struct isl_tab *tab, isl_int *eq) -{ - struct isl_tab_var *var; - int r; - - if (!tab) - return -1; - r = isl_tab_add_row(tab, eq); - if (r < 0) - return -1; - - var = &tab->con[r]; - r = var->index; - if (row_is_manifestly_zero(tab, r)) { - var->is_zero = 1; - if (isl_tab_mark_redundant(tab, r) < 0) - return -1; - return 0; - } - - if (isl_int_is_neg(tab->mat->row[r][1])) { - isl_seq_neg(tab->mat->row[r] + 1, tab->mat->row[r] + 1, - 1 + tab->n_col); - var->negated = 1; - } - var->is_nonneg = 1; - if (to_col(tab, var) < 0) - return -1; - var->is_nonneg = 0; - if (isl_tab_kill_col(tab, var->index) < 0) - return -1; - - return 0; -} - -static int add_zero_row(struct isl_tab *tab) -{ - int r; - isl_int *row; - - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - row = tab->mat->row[tab->con[r].index]; - isl_seq_clr(row + 1, 1 + tab->M + tab->n_col); - isl_int_set_si(row[0], 1); - - return r; -} - -/* Add equality "eq" and check if it conflicts with the - * previously added constraints or if it is obviously redundant. - */ -int isl_tab_add_eq(struct isl_tab *tab, isl_int *eq) -{ - struct isl_tab_undo *snap = NULL; - struct isl_tab_var *var; - int r; - int row; - int sgn; - isl_int cst; - - if (!tab) - return -1; - isl_assert(tab->mat->ctx, !tab->M, return -1); - - if (tab->need_undo) - snap = isl_tab_snap(tab); - - if (tab->cone) { - isl_int_init(cst); - isl_int_swap(eq[0], cst); - } - r = isl_tab_add_row(tab, eq); - if (tab->cone) { - isl_int_swap(eq[0], cst); - isl_int_clear(cst); - } - if (r < 0) - return -1; - - var = &tab->con[r]; - row = var->index; - if (row_is_manifestly_zero(tab, row)) { - if (snap) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - } else - drop_row(tab, row); - return 0; - } - - if (tab->bmap) { - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - isl_seq_neg(eq, eq, 1 + tab->n_var); - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - isl_seq_neg(eq, eq, 1 + tab->n_var); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - if (!tab->bmap) - return -1; - if (add_zero_row(tab) < 0) - return -1; - } - - sgn = isl_int_sgn(tab->mat->row[row][1]); - - if (sgn > 0) { - isl_seq_neg(tab->mat->row[row] + 1, tab->mat->row[row] + 1, - 1 + tab->n_col); - var->negated = 1; - sgn = -1; - } - - if (sgn < 0) { - sgn = sign_of_max(tab, var); - if (sgn < -1) - return -1; - if (sgn < 0) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - } - - var->is_nonneg = 1; - if (to_col(tab, var) < 0) - return -1; - var->is_nonneg = 0; - if (isl_tab_kill_col(tab, var->index) < 0) - return -1; - - return 0; -} - -/* Construct and return an inequality that expresses an upper bound - * on the given div. - * In particular, if the div is given by - * - * d = floor(e/m) - * - * then the inequality expresses - * - * m d <= e - */ -static struct isl_vec *ineq_for_div(struct isl_basic_map *bmap, unsigned div) -{ - unsigned total; - unsigned div_pos; - struct isl_vec *ineq; - - if (!bmap) - return NULL; - - total = isl_basic_map_total_dim(bmap); - div_pos = 1 + total - bmap->n_div + div; - - ineq = isl_vec_alloc(bmap->ctx, 1 + total); - if (!ineq) - return NULL; - - isl_seq_cpy(ineq->el, bmap->div[div] + 1, 1 + total); - isl_int_neg(ineq->el[div_pos], bmap->div[div][0]); - return ineq; -} - -/* For a div d = floor(f/m), add the constraints - * - * f - m d >= 0 - * -(f-(m-1)) + m d >= 0 - * - * Note that the second constraint is the negation of - * - * f - m d >= m - * - * If add_ineq is not NULL, then this function is used - * instead of isl_tab_add_ineq to effectively add the inequalities. - */ -static int add_div_constraints(struct isl_tab *tab, unsigned div, - int (*add_ineq)(void *user, isl_int *), void *user) -{ - unsigned total; - unsigned div_pos; - struct isl_vec *ineq; - - total = isl_basic_map_total_dim(tab->bmap); - div_pos = 1 + total - tab->bmap->n_div + div; - - ineq = ineq_for_div(tab->bmap, div); - if (!ineq) - goto error; - - if (add_ineq) { - if (add_ineq(user, ineq->el) < 0) - goto error; - } else { - if (isl_tab_add_ineq(tab, ineq->el) < 0) - goto error; - } - - isl_seq_neg(ineq->el, tab->bmap->div[div] + 1, 1 + total); - isl_int_set(ineq->el[div_pos], tab->bmap->div[div][0]); - isl_int_add(ineq->el[0], ineq->el[0], ineq->el[div_pos]); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - if (add_ineq) { - if (add_ineq(user, ineq->el) < 0) - goto error; - } else { - if (isl_tab_add_ineq(tab, ineq->el) < 0) - goto error; - } - - isl_vec_free(ineq); - - return 0; -error: - isl_vec_free(ineq); - return -1; -} - -/* Check whether the div described by "div" is obviously non-negative. - * If we are using a big parameter, then we will encode the div - * as div' = M + div, which is always non-negative. - * Otherwise, we check whether div is a non-negative affine combination - * of non-negative variables. - */ -static int div_is_nonneg(struct isl_tab *tab, __isl_keep isl_vec *div) -{ - int i; - - if (tab->M) - return 1; - - if (isl_int_is_neg(div->el[1])) - return 0; - - for (i = 0; i < tab->n_var; ++i) { - if (isl_int_is_neg(div->el[2 + i])) - return 0; - if (isl_int_is_zero(div->el[2 + i])) - continue; - if (!tab->var[i].is_nonneg) - return 0; - } - - return 1; -} - -/* Add an extra div, prescribed by "div" to the tableau and - * the associated bmap (which is assumed to be non-NULL). - * - * If add_ineq is not NULL, then this function is used instead - * of isl_tab_add_ineq to add the div constraints. - * This complication is needed because the code in isl_tab_pip - * wants to perform some extra processing when an inequality - * is added to the tableau. - */ -int isl_tab_add_div(struct isl_tab *tab, __isl_keep isl_vec *div, - int (*add_ineq)(void *user, isl_int *), void *user) -{ - int r; - int k; - int nonneg; - - if (!tab || !div) - return -1; - - isl_assert(tab->mat->ctx, tab->bmap, return -1); - - nonneg = div_is_nonneg(tab, div); - - if (isl_tab_extend_cons(tab, 3) < 0) - return -1; - if (isl_tab_extend_vars(tab, 1) < 0) - return -1; - r = isl_tab_allocate_var(tab); - if (r < 0) - return -1; - - if (nonneg) - tab->var[r].is_nonneg = 1; - - tab->bmap = isl_basic_map_extend_space(tab->bmap, - isl_basic_map_get_space(tab->bmap), 1, 0, 2); - k = isl_basic_map_alloc_div(tab->bmap); - if (k < 0) - return -1; - isl_seq_cpy(tab->bmap->div[k], div->el, div->size); - if (isl_tab_push(tab, isl_tab_undo_bmap_div) < 0) - return -1; - - if (add_div_constraints(tab, k, add_ineq, user) < 0) - return -1; - - return r; -} - -struct isl_tab *isl_tab_from_basic_map(struct isl_basic_map *bmap) -{ - int i; - struct isl_tab *tab; - - if (!bmap) - return NULL; - tab = isl_tab_alloc(bmap->ctx, - isl_basic_map_total_dim(bmap) + bmap->n_ineq + 1, - isl_basic_map_total_dim(bmap), 0); - if (!tab) - return NULL; - tab->rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - for (i = 0; i < bmap->n_eq; ++i) { - tab = add_eq(tab, bmap->eq[i]); - if (!tab) - return tab; - } - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_tab_add_ineq(tab, bmap->ineq[i]) < 0) - goto error; - if (tab->empty) - return tab; - } - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -struct isl_tab *isl_tab_from_basic_set(struct isl_basic_set *bset) -{ - return isl_tab_from_basic_map((struct isl_basic_map *)bset); -} - -/* Construct a tableau corresponding to the recession cone of "bset". - */ -struct isl_tab *isl_tab_from_recession_cone(__isl_keep isl_basic_set *bset, - int parametric) -{ - isl_int cst; - int i; - struct isl_tab *tab; - unsigned offset = 0; - - if (!bset) - return NULL; - if (parametric) - offset = isl_basic_set_dim(bset, isl_dim_param); - tab = isl_tab_alloc(bset->ctx, bset->n_eq + bset->n_ineq, - isl_basic_set_total_dim(bset) - offset, 0); - if (!tab) - return NULL; - tab->rational = ISL_F_ISSET(bset, ISL_BASIC_SET_RATIONAL); - tab->cone = 1; - - isl_int_init(cst); - for (i = 0; i < bset->n_eq; ++i) { - isl_int_swap(bset->eq[i][offset], cst); - if (offset > 0) { - if (isl_tab_add_eq(tab, bset->eq[i] + offset) < 0) - goto error; - } else - tab = add_eq(tab, bset->eq[i]); - isl_int_swap(bset->eq[i][offset], cst); - if (!tab) - goto done; - } - for (i = 0; i < bset->n_ineq; ++i) { - int r; - isl_int_swap(bset->ineq[i][offset], cst); - r = isl_tab_add_row(tab, bset->ineq[i] + offset); - isl_int_swap(bset->ineq[i][offset], cst); - if (r < 0) - goto error; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - } -done: - isl_int_clear(cst); - return tab; -error: - isl_int_clear(cst); - isl_tab_free(tab); - return NULL; -} - -/* Assuming "tab" is the tableau of a cone, check if the cone is - * bounded, i.e., if it is empty or only contains the origin. - */ -int isl_tab_cone_is_bounded(struct isl_tab *tab) -{ - int i; - - if (!tab) - return -1; - if (tab->empty) - return 1; - if (tab->n_dead == tab->n_col) - return 1; - - for (;;) { - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var; - int sgn; - var = isl_tab_var_from_row(tab, i); - if (!var->is_nonneg) - continue; - sgn = sign_of_max(tab, var); - if (sgn < -1) - return -1; - if (sgn != 0) - return 0; - if (close_row(tab, var) < 0) - return -1; - break; - } - if (tab->n_dead == tab->n_col) - return 1; - if (i == tab->n_row) - return 0; - } -} - -int isl_tab_sample_is_integer(struct isl_tab *tab) -{ - int i; - - if (!tab) - return -1; - - for (i = 0; i < tab->n_var; ++i) { - int row; - if (!tab->var[i].is_row) - continue; - row = tab->var[i].index; - if (!isl_int_is_divisible_by(tab->mat->row[row][1], - tab->mat->row[row][0])) - return 0; - } - return 1; -} - -static struct isl_vec *extract_integer_sample(struct isl_tab *tab) -{ - int i; - struct isl_vec *vec; - - vec = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!vec) - return NULL; - - isl_int_set_si(vec->block.data[0], 1); - for (i = 0; i < tab->n_var; ++i) { - if (!tab->var[i].is_row) - isl_int_set_si(vec->block.data[1 + i], 0); - else { - int row = tab->var[i].index; - isl_int_divexact(vec->block.data[1 + i], - tab->mat->row[row][1], tab->mat->row[row][0]); - } - } - - return vec; -} - -struct isl_vec *isl_tab_get_sample_value(struct isl_tab *tab) -{ - int i; - struct isl_vec *vec; - isl_int m; - - if (!tab) - return NULL; - - vec = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!vec) - return NULL; - - isl_int_init(m); - - isl_int_set_si(vec->block.data[0], 1); - for (i = 0; i < tab->n_var; ++i) { - int row; - if (!tab->var[i].is_row) { - isl_int_set_si(vec->block.data[1 + i], 0); - continue; - } - row = tab->var[i].index; - isl_int_gcd(m, vec->block.data[0], tab->mat->row[row][0]); - isl_int_divexact(m, tab->mat->row[row][0], m); - isl_seq_scale(vec->block.data, vec->block.data, m, 1 + i); - isl_int_divexact(m, vec->block.data[0], tab->mat->row[row][0]); - isl_int_mul(vec->block.data[1 + i], m, tab->mat->row[row][1]); - } - vec = isl_vec_normalize(vec); - - isl_int_clear(m); - return vec; -} - -/* Update "bmap" based on the results of the tableau "tab". - * In particular, implicit equalities are made explicit, redundant constraints - * are removed and if the sample value happens to be integer, it is stored - * in "bmap" (unless "bmap" already had an integer sample). - * - * The tableau is assumed to have been created from "bmap" using - * isl_tab_from_basic_map. - */ -struct isl_basic_map *isl_basic_map_update_from_tab(struct isl_basic_map *bmap, - struct isl_tab *tab) -{ - int i; - unsigned n_eq; - - if (!bmap) - return NULL; - if (!tab) - return bmap; - - n_eq = tab->n_eq; - if (tab->empty) - bmap = isl_basic_map_set_to_empty(bmap); - else - for (i = bmap->n_ineq - 1; i >= 0; --i) { - if (isl_tab_is_equality(tab, n_eq + i)) - isl_basic_map_inequality_to_equality(bmap, i); - else if (isl_tab_is_redundant(tab, n_eq + i)) - isl_basic_map_drop_inequality(bmap, i); - } - if (bmap->n_eq != n_eq) - isl_basic_map_gauss(bmap, NULL); - if (!tab->rational && - !bmap->sample && isl_tab_sample_is_integer(tab)) - bmap->sample = extract_integer_sample(tab); - return bmap; -} - -struct isl_basic_set *isl_basic_set_update_from_tab(struct isl_basic_set *bset, - struct isl_tab *tab) -{ - return (struct isl_basic_set *)isl_basic_map_update_from_tab( - (struct isl_basic_map *)bset, tab); -} - -/* Given a non-negative variable "var", add a new non-negative variable - * that is the opposite of "var", ensuring that var can only attain the - * value zero. - * If var = n/d is a row variable, then the new variable = -n/d. - * If var is a column variables, then the new variable = -var. - * If the new variable cannot attain non-negative values, then - * the resulting tableau is empty. - * Otherwise, we know the value will be zero and we close the row. - */ -static int cut_to_hyperplane(struct isl_tab *tab, struct isl_tab_var *var) -{ - unsigned r; - isl_int *row; - int sgn; - unsigned off = 2 + tab->M; - - if (var->is_zero) - return 0; - isl_assert(tab->mat->ctx, !var->is_redundant, return -1); - isl_assert(tab->mat->ctx, var->is_nonneg, return -1); - - if (isl_tab_extend_cons(tab, 1) < 0) - return -1; - - r = tab->n_con; - tab->con[r].index = tab->n_row; - tab->con[r].is_row = 1; - tab->con[r].is_nonneg = 0; - tab->con[r].is_zero = 0; - tab->con[r].is_redundant = 0; - tab->con[r].frozen = 0; - tab->con[r].negated = 0; - tab->row_var[tab->n_row] = ~r; - row = tab->mat->row[tab->n_row]; - - if (var->is_row) { - isl_int_set(row[0], tab->mat->row[var->index][0]); - isl_seq_neg(row + 1, - tab->mat->row[var->index] + 1, 1 + tab->n_col); - } else { - isl_int_set_si(row[0], 1); - isl_seq_clr(row + 1, 1 + tab->n_col); - isl_int_set_si(row[off + var->index], -1); - } - - tab->n_row++; - tab->n_con++; - if (isl_tab_push_var(tab, isl_tab_undo_allocate, &tab->con[r]) < 0) - return -1; - - sgn = sign_of_max(tab, &tab->con[r]); - if (sgn < -1) - return -1; - if (sgn < 0) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - /* sgn == 0 */ - if (close_row(tab, &tab->con[r]) < 0) - return -1; - - return 0; -} - -/* Given a tableau "tab" and an inequality constraint "con" of the tableau, - * relax the inequality by one. That is, the inequality r >= 0 is replaced - * by r' = r + 1 >= 0. - * If r is a row variable, we simply increase the constant term by one - * (taking into account the denominator). - * If r is a column variable, then we need to modify each row that - * refers to r = r' - 1 by substituting this equality, effectively - * subtracting the coefficient of the column from the constant. - * We should only do this if the minimum is manifestly unbounded, - * however. Otherwise, we may end up with negative sample values - * for non-negative variables. - * So, if r is a column variable with a minimum that is not - * manifestly unbounded, then we need to move it to a row. - * However, the sample value of this row may be negative, - * even after the relaxation, so we need to restore it. - * We therefore prefer to pivot a column up to a row, if possible. - */ -struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) -{ - struct isl_tab_var *var; - unsigned off = 2 + tab->M; - - if (!tab) - return NULL; - - var = &tab->con[con]; - - if (!var->is_row && !max_is_manifestly_unbounded(tab, var)) - if (to_row(tab, var, 1) < 0) - goto error; - if (!var->is_row && !min_is_manifestly_unbounded(tab, var)) - if (to_row(tab, var, -1) < 0) - goto error; - - if (var->is_row) { - isl_int_add(tab->mat->row[var->index][1], - tab->mat->row[var->index][1], tab->mat->row[var->index][0]); - if (restore_row(tab, var) < 0) - goto error; - } else { - int i; - - for (i = 0; i < tab->n_row; ++i) { - if (isl_int_is_zero(tab->mat->row[i][off + var->index])) - continue; - isl_int_sub(tab->mat->row[i][1], tab->mat->row[i][1], - tab->mat->row[i][off + var->index]); - } - - } - - if (isl_tab_push_var(tab, isl_tab_undo_relax, var) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -int isl_tab_select_facet(struct isl_tab *tab, int con) -{ - if (!tab) - return -1; - - return cut_to_hyperplane(tab, &tab->con[con]); -} - -static int may_be_equality(struct isl_tab *tab, int row) -{ - return tab->rational ? isl_int_is_zero(tab->mat->row[row][1]) - : isl_int_lt(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -/* Check for (near) equalities among the constraints. - * A constraint is an equality if it is non-negative and if - * its maximal value is either - * - zero (in case of rational tableaus), or - * - strictly less than 1 (in case of integer tableaus) - * - * We first mark all non-redundant and non-dead variables that - * are not frozen and not obviously not an equality. - * Then we iterate over all marked variables if they can attain - * any values larger than zero or at least one. - * If the maximal value is zero, we mark any column variables - * that appear in the row as being zero and mark the row as being redundant. - * Otherwise, if the maximal value is strictly less than one (and the - * tableau is integer), then we restrict the value to being zero - * by adding an opposite non-negative variable. - */ -int isl_tab_detect_implicit_equalities(struct isl_tab *tab) -{ - int i; - unsigned n_marked; - - if (!tab) - return -1; - if (tab->empty) - return 0; - if (tab->n_dead == tab->n_col) - return 0; - - n_marked = 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var = isl_tab_var_from_row(tab, i); - var->marked = !var->frozen && var->is_nonneg && - may_be_equality(tab, i); - if (var->marked) - n_marked++; - } - for (i = tab->n_dead; i < tab->n_col; ++i) { - struct isl_tab_var *var = var_from_col(tab, i); - var->marked = !var->frozen && var->is_nonneg; - if (var->marked) - n_marked++; - } - while (n_marked) { - struct isl_tab_var *var; - int sgn; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - var = isl_tab_var_from_row(tab, i); - if (var->marked) - break; - } - if (i == tab->n_row) { - for (i = tab->n_dead; i < tab->n_col; ++i) { - var = var_from_col(tab, i); - if (var->marked) - break; - } - if (i == tab->n_col) - break; - } - var->marked = 0; - n_marked--; - sgn = sign_of_max(tab, var); - if (sgn < 0) - return -1; - if (sgn == 0) { - if (close_row(tab, var) < 0) - return -1; - } else if (!tab->rational && !at_least_one(tab, var)) { - if (cut_to_hyperplane(tab, var) < 0) - return -1; - return isl_tab_detect_implicit_equalities(tab); - } - for (i = tab->n_redundant; i < tab->n_row; ++i) { - var = isl_tab_var_from_row(tab, i); - if (!var->marked) - continue; - if (may_be_equality(tab, i)) - continue; - var->marked = 0; - n_marked--; - } - } - - return 0; -} - -static int con_is_redundant(struct isl_tab *tab, struct isl_tab_var *var) -{ - if (!tab) - return -1; - if (tab->rational) { - int sgn = sign_of_min(tab, var); - if (sgn < -1) - return -1; - return sgn >= 0; - } else { - int irred = isl_tab_min_at_most_neg_one(tab, var); - if (irred < 0) - return -1; - return !irred; - } -} - -/* Check for (near) redundant constraints. - * A constraint is redundant if it is non-negative and if - * its minimal value (temporarily ignoring the non-negativity) is either - * - zero (in case of rational tableaus), or - * - strictly larger than -1 (in case of integer tableaus) - * - * We first mark all non-redundant and non-dead variables that - * are not frozen and not obviously negatively unbounded. - * Then we iterate over all marked variables if they can attain - * any values smaller than zero or at most negative one. - * If not, we mark the row as being redundant (assuming it hasn't - * been detected as being obviously redundant in the mean time). - */ -int isl_tab_detect_redundant(struct isl_tab *tab) -{ - int i; - unsigned n_marked; - - if (!tab) - return -1; - if (tab->empty) - return 0; - if (tab->n_redundant == tab->n_row) - return 0; - - n_marked = 0; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - struct isl_tab_var *var = isl_tab_var_from_row(tab, i); - var->marked = !var->frozen && var->is_nonneg; - if (var->marked) - n_marked++; - } - for (i = tab->n_dead; i < tab->n_col; ++i) { - struct isl_tab_var *var = var_from_col(tab, i); - var->marked = !var->frozen && var->is_nonneg && - !min_is_manifestly_unbounded(tab, var); - if (var->marked) - n_marked++; - } - while (n_marked) { - struct isl_tab_var *var; - int red; - for (i = tab->n_redundant; i < tab->n_row; ++i) { - var = isl_tab_var_from_row(tab, i); - if (var->marked) - break; - } - if (i == tab->n_row) { - for (i = tab->n_dead; i < tab->n_col; ++i) { - var = var_from_col(tab, i); - if (var->marked) - break; - } - if (i == tab->n_col) - break; - } - var->marked = 0; - n_marked--; - red = con_is_redundant(tab, var); - if (red < 0) - return -1; - if (red && !var->is_redundant) - if (isl_tab_mark_redundant(tab, var->index) < 0) - return -1; - for (i = tab->n_dead; i < tab->n_col; ++i) { - var = var_from_col(tab, i); - if (!var->marked) - continue; - if (!min_is_manifestly_unbounded(tab, var)) - continue; - var->marked = 0; - n_marked--; - } - } - - return 0; -} - -int isl_tab_is_equality(struct isl_tab *tab, int con) -{ - int row; - unsigned off; - - if (!tab) - return -1; - if (tab->con[con].is_zero) - return 1; - if (tab->con[con].is_redundant) - return 0; - if (!tab->con[con].is_row) - return tab->con[con].index < tab->n_dead; - - row = tab->con[con].index; - - off = 2 + tab->M; - return isl_int_is_zero(tab->mat->row[row][1]) && - (!tab->M || isl_int_is_zero(tab->mat->row[row][2])) && - isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) == -1; -} - -/* Return the minimal value of the affine expression "f" with denominator - * "denom" in *opt, *opt_denom, assuming the tableau is not empty and - * the expression cannot attain arbitrarily small values. - * If opt_denom is NULL, then *opt is rounded up to the nearest integer. - * The return value reflects the nature of the result (empty, unbounded, - * minimal value returned in *opt). - */ -enum isl_lp_result isl_tab_min(struct isl_tab *tab, - isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, - unsigned flags) -{ - int r; - enum isl_lp_result res = isl_lp_ok; - struct isl_tab_var *var; - struct isl_tab_undo *snap; - - if (!tab) - return isl_lp_error; - - if (tab->empty) - return isl_lp_empty; - - snap = isl_tab_snap(tab); - r = isl_tab_add_row(tab, f); - if (r < 0) - return isl_lp_error; - var = &tab->con[r]; - for (;;) { - int row, col; - find_pivot(tab, var, var, -1, &row, &col); - if (row == var->index) { - res = isl_lp_unbounded; - break; - } - if (row == -1) - break; - if (isl_tab_pivot(tab, row, col) < 0) - return isl_lp_error; - } - isl_int_mul(tab->mat->row[var->index][0], - tab->mat->row[var->index][0], denom); - if (ISL_FL_ISSET(flags, ISL_TAB_SAVE_DUAL)) { - int i; - - isl_vec_free(tab->dual); - tab->dual = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_con); - if (!tab->dual) - return isl_lp_error; - isl_int_set(tab->dual->el[0], tab->mat->row[var->index][0]); - for (i = 0; i < tab->n_con; ++i) { - int pos; - if (tab->con[i].is_row) { - isl_int_set_si(tab->dual->el[1 + i], 0); - continue; - } - pos = 2 + tab->M + tab->con[i].index; - if (tab->con[i].negated) - isl_int_neg(tab->dual->el[1 + i], - tab->mat->row[var->index][pos]); - else - isl_int_set(tab->dual->el[1 + i], - tab->mat->row[var->index][pos]); - } - } - if (opt && res == isl_lp_ok) { - if (opt_denom) { - isl_int_set(*opt, tab->mat->row[var->index][1]); - isl_int_set(*opt_denom, tab->mat->row[var->index][0]); - } else - isl_int_cdiv_q(*opt, tab->mat->row[var->index][1], - tab->mat->row[var->index][0]); - } - if (isl_tab_rollback(tab, snap) < 0) - return isl_lp_error; - return res; -} - -int isl_tab_is_redundant(struct isl_tab *tab, int con) -{ - if (!tab) - return -1; - if (tab->con[con].is_zero) - return 0; - if (tab->con[con].is_redundant) - return 1; - return tab->con[con].is_row && tab->con[con].index < tab->n_redundant; -} - -/* Take a snapshot of the tableau that can be restored by s call to - * isl_tab_rollback. - */ -struct isl_tab_undo *isl_tab_snap(struct isl_tab *tab) -{ - if (!tab) - return NULL; - tab->need_undo = 1; - return tab->top; -} - -/* Undo the operation performed by isl_tab_relax. - */ -static int unrelax(struct isl_tab *tab, struct isl_tab_var *var) WARN_UNUSED; -static int unrelax(struct isl_tab *tab, struct isl_tab_var *var) -{ - unsigned off = 2 + tab->M; - - if (!var->is_row && !max_is_manifestly_unbounded(tab, var)) - if (to_row(tab, var, 1) < 0) - return -1; - - if (var->is_row) { - isl_int_sub(tab->mat->row[var->index][1], - tab->mat->row[var->index][1], tab->mat->row[var->index][0]); - if (var->is_nonneg) { - int sgn = restore_row(tab, var); - isl_assert(tab->mat->ctx, sgn >= 0, return -1); - } - } else { - int i; - - for (i = 0; i < tab->n_row; ++i) { - if (isl_int_is_zero(tab->mat->row[i][off + var->index])) - continue; - isl_int_add(tab->mat->row[i][1], tab->mat->row[i][1], - tab->mat->row[i][off + var->index]); - } - - } - - return 0; -} - -static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) WARN_UNUSED; -static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) -{ - struct isl_tab_var *var = var_from_index(tab, undo->u.var_index); - switch (undo->type) { - case isl_tab_undo_nonneg: - var->is_nonneg = 0; - break; - case isl_tab_undo_redundant: - var->is_redundant = 0; - tab->n_redundant--; - restore_row(tab, isl_tab_var_from_row(tab, tab->n_redundant)); - break; - case isl_tab_undo_freeze: - var->frozen = 0; - break; - case isl_tab_undo_zero: - var->is_zero = 0; - if (!var->is_row) - tab->n_dead--; - break; - case isl_tab_undo_allocate: - if (undo->u.var_index >= 0) { - isl_assert(tab->mat->ctx, !var->is_row, return -1); - drop_col(tab, var->index); - break; - } - if (!var->is_row) { - if (!max_is_manifestly_unbounded(tab, var)) { - if (to_row(tab, var, 1) < 0) - return -1; - } else if (!min_is_manifestly_unbounded(tab, var)) { - if (to_row(tab, var, -1) < 0) - return -1; - } else - if (to_row(tab, var, 0) < 0) - return -1; - } - drop_row(tab, var->index); - break; - case isl_tab_undo_relax: - return unrelax(tab, var); - default: - isl_die(tab->mat->ctx, isl_error_internal, - "perform_undo_var called on invalid undo record", - return -1); - } - - return 0; -} - -/* Restore the tableau to the state where the basic variables - * are those in "col_var". - * We first construct a list of variables that are currently in - * the basis, but shouldn't. Then we iterate over all variables - * that should be in the basis and for each one that is currently - * not in the basis, we exchange it with one of the elements of the - * list constructed before. - * We can always find an appropriate variable to pivot with because - * the current basis is mapped to the old basis by a non-singular - * matrix and so we can never end up with a zero row. - */ -static int restore_basis(struct isl_tab *tab, int *col_var) -{ - int i, j; - int n_extra = 0; - int *extra = NULL; /* current columns that contain bad stuff */ - unsigned off = 2 + tab->M; - - extra = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!extra) - goto error; - for (i = 0; i < tab->n_col; ++i) { - for (j = 0; j < tab->n_col; ++j) - if (tab->col_var[i] == col_var[j]) - break; - if (j < tab->n_col) - continue; - extra[n_extra++] = i; - } - for (i = 0; i < tab->n_col && n_extra > 0; ++i) { - struct isl_tab_var *var; - int row; - - for (j = 0; j < tab->n_col; ++j) - if (col_var[i] == tab->col_var[j]) - break; - if (j < tab->n_col) - continue; - var = var_from_index(tab, col_var[i]); - row = var->index; - for (j = 0; j < n_extra; ++j) - if (!isl_int_is_zero(tab->mat->row[row][off+extra[j]])) - break; - isl_assert(tab->mat->ctx, j < n_extra, goto error); - if (isl_tab_pivot(tab, row, extra[j]) < 0) - goto error; - extra[j] = extra[--n_extra]; - } - - free(extra); - return 0; -error: - free(extra); - return -1; -} - -/* Remove all samples with index n or greater, i.e., those samples - * that were added since we saved this number of samples in - * isl_tab_save_samples. - */ -static void drop_samples_since(struct isl_tab *tab, int n) -{ - int i; - - for (i = tab->n_sample - 1; i >= 0 && tab->n_sample > n; --i) { - if (tab->sample_index[i] < n) - continue; - - if (i != tab->n_sample - 1) { - int t = tab->sample_index[tab->n_sample-1]; - tab->sample_index[tab->n_sample-1] = tab->sample_index[i]; - tab->sample_index[i] = t; - isl_mat_swap_rows(tab->samples, tab->n_sample-1, i); - } - tab->n_sample--; - } -} - -static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) WARN_UNUSED; -static int perform_undo(struct isl_tab *tab, struct isl_tab_undo *undo) -{ - switch (undo->type) { - case isl_tab_undo_empty: - tab->empty = 0; - break; - case isl_tab_undo_nonneg: - case isl_tab_undo_redundant: - case isl_tab_undo_freeze: - case isl_tab_undo_zero: - case isl_tab_undo_allocate: - case isl_tab_undo_relax: - return perform_undo_var(tab, undo); - case isl_tab_undo_bmap_eq: - return isl_basic_map_free_equality(tab->bmap, 1); - case isl_tab_undo_bmap_ineq: - return isl_basic_map_free_inequality(tab->bmap, 1); - case isl_tab_undo_bmap_div: - if (isl_basic_map_free_div(tab->bmap, 1) < 0) - return -1; - if (tab->samples) - tab->samples->n_col--; - break; - case isl_tab_undo_saved_basis: - if (restore_basis(tab, undo->u.col_var) < 0) - return -1; - break; - case isl_tab_undo_drop_sample: - tab->n_outside--; - break; - case isl_tab_undo_saved_samples: - drop_samples_since(tab, undo->u.n); - break; - case isl_tab_undo_callback: - return undo->u.callback->run(undo->u.callback); - default: - isl_assert(tab->mat->ctx, 0, return -1); - } - return 0; -} - -/* Return the tableau to the state it was in when the snapshot "snap" - * was taken. - */ -int isl_tab_rollback(struct isl_tab *tab, struct isl_tab_undo *snap) -{ - struct isl_tab_undo *undo, *next; - - if (!tab) - return -1; - - tab->in_undo = 1; - for (undo = tab->top; undo && undo != &tab->bottom; undo = next) { - next = undo->next; - if (undo == snap) - break; - if (perform_undo(tab, undo) < 0) { - tab->top = undo; - free_undo(tab); - tab->in_undo = 0; - return -1; - } - free_undo_record(undo); - } - tab->in_undo = 0; - tab->top = undo; - if (!undo) - return -1; - return 0; -} - -/* The given row "row" represents an inequality violated by all - * points in the tableau. Check for some special cases of such - * separating constraints. - * In particular, if the row has been reduced to the constant -1, - * then we know the inequality is adjacent (but opposite) to - * an equality in the tableau. - * If the row has been reduced to r = c*(-1 -r'), with r' an inequality - * of the tableau and c a positive constant, then the inequality - * is adjacent (but opposite) to the inequality r'. - */ -static enum isl_ineq_type separation_type(struct isl_tab *tab, unsigned row) -{ - int pos; - unsigned off = 2 + tab->M; - - if (tab->rational) - return isl_ineq_separate; - - if (!isl_int_is_one(tab->mat->row[row][0])) - return isl_ineq_separate; - - pos = isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead); - if (pos == -1) { - if (isl_int_is_negone(tab->mat->row[row][1])) - return isl_ineq_adj_eq; - else - return isl_ineq_separate; - } - - if (!isl_int_eq(tab->mat->row[row][1], - tab->mat->row[row][off + tab->n_dead + pos])) - return isl_ineq_separate; - - pos = isl_seq_first_non_zero( - tab->mat->row[row] + off + tab->n_dead + pos + 1, - tab->n_col - tab->n_dead - pos - 1); - - return pos == -1 ? isl_ineq_adj_ineq : isl_ineq_separate; -} - -/* Check the effect of inequality "ineq" on the tableau "tab". - * The result may be - * isl_ineq_redundant: satisfied by all points in the tableau - * isl_ineq_separate: satisfied by no point in the tableau - * isl_ineq_cut: satisfied by some by not all points - * isl_ineq_adj_eq: adjacent to an equality - * isl_ineq_adj_ineq: adjacent to an inequality. - */ -enum isl_ineq_type isl_tab_ineq_type(struct isl_tab *tab, isl_int *ineq) -{ - enum isl_ineq_type type = isl_ineq_error; - struct isl_tab_undo *snap = NULL; - int con; - int row; - - if (!tab) - return isl_ineq_error; - - if (isl_tab_extend_cons(tab, 1) < 0) - return isl_ineq_error; - - snap = isl_tab_snap(tab); - - con = isl_tab_add_row(tab, ineq); - if (con < 0) - goto error; - - row = tab->con[con].index; - if (isl_tab_row_is_redundant(tab, row)) - type = isl_ineq_redundant; - else if (isl_int_is_neg(tab->mat->row[row][1]) && - (tab->rational || - isl_int_abs_ge(tab->mat->row[row][1], - tab->mat->row[row][0]))) { - int nonneg = at_least_zero(tab, &tab->con[con]); - if (nonneg < 0) - goto error; - if (nonneg) - type = isl_ineq_cut; - else - type = separation_type(tab, row); - } else { - int red = con_is_redundant(tab, &tab->con[con]); - if (red < 0) - goto error; - if (!red) - type = isl_ineq_cut; - else - type = isl_ineq_redundant; - } - - if (isl_tab_rollback(tab, snap)) - return isl_ineq_error; - return type; -error: - return isl_ineq_error; -} - -int isl_tab_track_bmap(struct isl_tab *tab, __isl_take isl_basic_map *bmap) -{ - if (!tab || !bmap) - goto error; - - isl_assert(tab->mat->ctx, tab->n_eq == bmap->n_eq, return -1); - isl_assert(tab->mat->ctx, - tab->n_con == bmap->n_eq + bmap->n_ineq, return -1); - - tab->bmap = bmap; - - return 0; -error: - isl_basic_map_free(bmap); - return -1; -} - -int isl_tab_track_bset(struct isl_tab *tab, __isl_take isl_basic_set *bset) -{ - return isl_tab_track_bmap(tab, (isl_basic_map *)bset); -} - -__isl_keep isl_basic_set *isl_tab_peek_bset(struct isl_tab *tab) -{ - if (!tab) - return NULL; - - return (isl_basic_set *)tab->bmap; -} - -static void isl_tab_print_internal(__isl_keep struct isl_tab *tab, - FILE *out, int indent) -{ - unsigned r, c; - int i; - - if (!tab) { - fprintf(out, "%*snull tab\n", indent, ""); - return; - } - fprintf(out, "%*sn_redundant: %d, n_dead: %d", indent, "", - tab->n_redundant, tab->n_dead); - if (tab->rational) - fprintf(out, ", rational"); - if (tab->empty) - fprintf(out, ", empty"); - fprintf(out, "\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_var; ++i) { - if (i) - fprintf(out, (i == tab->n_param || - i == tab->n_var - tab->n_div) ? "; " - : ", "); - fprintf(out, "%c%d%s", tab->var[i].is_row ? 'r' : 'c', - tab->var[i].index, - tab->var[i].is_zero ? " [=0]" : - tab->var[i].is_redundant ? " [R]" : ""); - } - fprintf(out, "]\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_con; ++i) { - if (i) - fprintf(out, ", "); - fprintf(out, "%c%d%s", tab->con[i].is_row ? 'r' : 'c', - tab->con[i].index, - tab->con[i].is_zero ? " [=0]" : - tab->con[i].is_redundant ? " [R]" : ""); - } - fprintf(out, "]\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_row; ++i) { - const char *sign = ""; - if (i) - fprintf(out, ", "); - if (tab->row_sign) { - if (tab->row_sign[i] == isl_tab_row_unknown) - sign = "?"; - else if (tab->row_sign[i] == isl_tab_row_neg) - sign = "-"; - else if (tab->row_sign[i] == isl_tab_row_pos) - sign = "+"; - else - sign = "+-"; - } - fprintf(out, "r%d: %d%s%s", i, tab->row_var[i], - isl_tab_var_from_row(tab, i)->is_nonneg ? " [>=0]" : "", sign); - } - fprintf(out, "]\n"); - fprintf(out, "%*s[", indent, ""); - for (i = 0; i < tab->n_col; ++i) { - if (i) - fprintf(out, ", "); - fprintf(out, "c%d: %d%s", i, tab->col_var[i], - var_from_col(tab, i)->is_nonneg ? " [>=0]" : ""); - } - fprintf(out, "]\n"); - r = tab->mat->n_row; - tab->mat->n_row = tab->n_row; - c = tab->mat->n_col; - tab->mat->n_col = 2 + tab->M + tab->n_col; - isl_mat_print_internal(tab->mat, out, indent); - tab->mat->n_row = r; - tab->mat->n_col = c; - if (tab->bmap) - isl_basic_map_print_internal(tab->bmap, out, indent); -} - -void isl_tab_dump(__isl_keep struct isl_tab *tab) -{ - isl_tab_print_internal(tab, stderr, 0); -} diff --git a/cloog-0.17.0/isl/isl_tab.h b/cloog-0.17.0/isl/isl_tab.h deleted file mode 100644 index 3f68d851b6b7951e4702a6cf608d70b2877351cd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_tab.h +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#ifndef ISL_TAB_H -#define ISL_TAB_H - -#include -#include -#include -#include - -struct isl_tab_var { - int index; - unsigned is_row : 1; - unsigned is_nonneg : 1; - unsigned is_zero : 1; - unsigned is_redundant : 1; - unsigned marked : 1; - unsigned frozen : 1; - unsigned negated : 1; -}; - -enum isl_tab_undo_type { - isl_tab_undo_bottom, - isl_tab_undo_empty, - isl_tab_undo_nonneg, - isl_tab_undo_redundant, - isl_tab_undo_freeze, - isl_tab_undo_zero, - isl_tab_undo_allocate, - isl_tab_undo_relax, - isl_tab_undo_bmap_ineq, - isl_tab_undo_bmap_eq, - isl_tab_undo_bmap_div, - isl_tab_undo_saved_basis, - isl_tab_undo_drop_sample, - isl_tab_undo_saved_samples, - isl_tab_undo_callback, -}; - -struct isl_tab_callback { - int (*run)(struct isl_tab_callback *cb); -}; - -union isl_tab_undo_val { - int var_index; - int *col_var; - int n; - struct isl_tab_callback *callback; -}; - -struct isl_tab_undo { - enum isl_tab_undo_type type; - union isl_tab_undo_val u; - struct isl_tab_undo *next; -}; - -/* The tableau maintains equality relations. - * Each column and each row is associated to a variable or a constraint. - * The "value" of an inequality constraint is the value of the corresponding - * slack variable. - * The "row_var" and "col_var" arrays map column and row indices - * to indices in the "var" and "con" arrays. The elements of these - * arrays maintain extra information about the variables and the constraints. - * Each row expresses the corresponding row variable as an affine expression - * of the column variables. - * The first two columns in the matrix contain the common denominator of - * the row and the numerator of the constant term. - * If "M" is set, then the third column represents the "big parameter". - * The third (M = 0) or fourth (M = 1) column - * in the matrix is called column 0 with respect to the col_var array. - * The sample value of the tableau is the value that assigns zero - * to all the column variables and the constant term of each affine - * expression to the corresponding row variable. - * The operations on the tableau maintain the property that the sample - * value satisfies the non-negativity constraints (usually on the slack - * variables). - * - * The big parameter represents an arbitrarily big (and divisible) - * positive number. If present, then the sign of a row is determined - * lexicographically, with the sign of the big parameter coefficient - * considered first. The big parameter is only used while - * solving PILP problems. - * - * The first n_dead column variables have their values fixed to zero. - * The corresponding tab_vars are flagged "is_zero". - * Some of the rows that have have zero coefficients in all but - * the dead columns are also flagged "is_zero". - * - * The first n_redundant rows correspond to inequality constraints - * that are always satisfied for any value satisfying the non-redundant - * rows. The corresponding tab_vars are flagged "is_redundant". - * A row variable that is flagged "is_zero" is also flagged "is_redundant" - * since the constraint has been reduced to 0 = 0 and is therefore always - * satisfied. - * - * There are "n_var" variables in total. The first "n_param" of these - * are called parameters and the last "n_div" of these are called divs. - * The basic tableau operations makes no distinction between different - * kinds of variables. These special variables are only used while - * solving PILP problems. - * - * Dead columns and redundant rows are detected on the fly. - * However, the basic operations do not ensure that all dead columns - * or all redundant rows are detected. - * isl_tab_detect_implicit_equalities and isl_tab_detect_redundant can be used - * to perform and exhaustive search for dead columns and redundant rows. - * - * The samples matrix contains "n_sample" integer points that have at some - * point been elements satisfying the tableau. The first "n_outside" - * of them no longer satisfy the tableau. They are kept because they - * can be reinstated during rollback when the constraint that cut them - * out is removed. These samples are only maintained for the context - * tableau while solving PILP problems. - */ -enum isl_tab_row_sign { - isl_tab_row_unknown = 0, - isl_tab_row_pos, - isl_tab_row_neg, - isl_tab_row_any, -}; -struct isl_tab { - struct isl_mat *mat; - - unsigned n_row; - unsigned n_col; - unsigned n_dead; - unsigned n_redundant; - - unsigned n_var; - unsigned n_param; - unsigned n_div; - unsigned max_var; - unsigned n_con; - unsigned n_eq; - unsigned max_con; - struct isl_tab_var *var; - struct isl_tab_var *con; - int *row_var; /* v >= 0 -> var v; v < 0 -> con ~v */ - int *col_var; /* v >= 0 -> var v; v < 0 -> con ~v */ - enum isl_tab_row_sign *row_sign; - - struct isl_tab_undo bottom; - struct isl_tab_undo *top; - - struct isl_vec *dual; - struct isl_basic_map *bmap; - - unsigned n_sample; - unsigned n_outside; - int *sample_index; - struct isl_mat *samples; - - int n_zero; - int n_unbounded; - struct isl_mat *basis; - - int (*conflict)(int con, void *user); - void *conflict_user; - - unsigned strict_redundant : 1; - unsigned need_undo : 1; - unsigned rational : 1; - unsigned empty : 1; - unsigned in_undo : 1; - unsigned M : 1; - unsigned cone : 1; -}; - -struct isl_tab *isl_tab_alloc(struct isl_ctx *ctx, - unsigned n_row, unsigned n_var, unsigned M); -void isl_tab_free(struct isl_tab *tab); - -struct isl_tab *isl_tab_from_basic_map(struct isl_basic_map *bmap); -struct isl_tab *isl_tab_from_basic_set(struct isl_basic_set *bset); -struct isl_tab *isl_tab_from_recession_cone(struct isl_basic_set *bset, - int parametric); -int isl_tab_cone_is_bounded(struct isl_tab *tab); -struct isl_basic_map *isl_basic_map_update_from_tab(struct isl_basic_map *bmap, - struct isl_tab *tab); -struct isl_basic_set *isl_basic_set_update_from_tab(struct isl_basic_set *bset, - struct isl_tab *tab); -int isl_tab_detect_implicit_equalities(struct isl_tab *tab) WARN_UNUSED; -int isl_tab_detect_redundant(struct isl_tab *tab) WARN_UNUSED; -#define ISL_TAB_SAVE_DUAL (1 << 0) -enum isl_lp_result isl_tab_min(struct isl_tab *tab, - isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, - unsigned flags) WARN_UNUSED; - -struct isl_tab *isl_tab_extend(struct isl_tab *tab, unsigned n_new) WARN_UNUSED; -int isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq) WARN_UNUSED; -int isl_tab_add_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED; -int isl_tab_add_valid_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED; - -int isl_tab_freeze_constraint(struct isl_tab *tab, int con) WARN_UNUSED; - -int isl_tab_track_bmap(struct isl_tab *tab, __isl_take isl_basic_map *bmap) WARN_UNUSED; -int isl_tab_track_bset(struct isl_tab *tab, __isl_take isl_basic_set *bset) WARN_UNUSED; -__isl_keep isl_basic_set *isl_tab_peek_bset(struct isl_tab *tab); - -int isl_tab_is_equality(struct isl_tab *tab, int con); -int isl_tab_is_redundant(struct isl_tab *tab, int con); - -int isl_tab_sample_is_integer(struct isl_tab *tab); -struct isl_vec *isl_tab_get_sample_value(struct isl_tab *tab); - -enum isl_ineq_type { - isl_ineq_error = -1, - isl_ineq_redundant, - isl_ineq_separate, - isl_ineq_cut, - isl_ineq_adj_eq, - isl_ineq_adj_ineq, -}; - -enum isl_ineq_type isl_tab_ineq_type(struct isl_tab *tab, isl_int *ineq); - -struct isl_tab_undo *isl_tab_snap(struct isl_tab *tab); -int isl_tab_rollback(struct isl_tab *tab, struct isl_tab_undo *snap) WARN_UNUSED; - -struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) WARN_UNUSED; -int isl_tab_select_facet(struct isl_tab *tab, int con) WARN_UNUSED; - -void isl_tab_dump(__isl_keep struct isl_tab *tab); - -struct isl_map *isl_tab_basic_map_partial_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max); -__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexopt_pw_multi_aff( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max); - -/* An isl_region represents a sequence of consecutive variables. - * pos is the location (starting at 0) of the first variable in the sequence. - */ -struct isl_region { - int pos; - int len; -}; - -__isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin( - __isl_take isl_basic_set *bset, int n_op, int n_region, - struct isl_region *region, - int (*conflict)(int con, void *user), void *user); -__isl_give isl_vec *isl_tab_basic_set_non_neg_lexmin( - __isl_take isl_basic_set *bset); - -/* private */ - -struct isl_tab_var *isl_tab_var_from_row(struct isl_tab *tab, int i); -int isl_tab_mark_redundant(struct isl_tab *tab, int row) WARN_UNUSED; -int isl_tab_mark_empty(struct isl_tab *tab) WARN_UNUSED; -struct isl_tab *isl_tab_dup(struct isl_tab *tab); -struct isl_tab *isl_tab_product(struct isl_tab *tab1, struct isl_tab *tab2); -int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new) WARN_UNUSED; -int isl_tab_allocate_con(struct isl_tab *tab) WARN_UNUSED; -int isl_tab_extend_vars(struct isl_tab *tab, unsigned n_new) WARN_UNUSED; -int isl_tab_allocate_var(struct isl_tab *tab) WARN_UNUSED; -int isl_tab_pivot(struct isl_tab *tab, int row, int col) WARN_UNUSED; -int isl_tab_add_row(struct isl_tab *tab, isl_int *line) WARN_UNUSED; -int isl_tab_row_is_redundant(struct isl_tab *tab, int row); -int isl_tab_min_at_most_neg_one(struct isl_tab *tab, struct isl_tab_var *var); -int isl_tab_sign_of_max(struct isl_tab *tab, int con); -int isl_tab_kill_col(struct isl_tab *tab, int col) WARN_UNUSED; - -int isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type) WARN_UNUSED; -int isl_tab_push_var(struct isl_tab *tab, - enum isl_tab_undo_type type, struct isl_tab_var *var) WARN_UNUSED; -int isl_tab_push_basis(struct isl_tab *tab) WARN_UNUSED; - -struct isl_tab *isl_tab_init_samples(struct isl_tab *tab) WARN_UNUSED; -struct isl_tab *isl_tab_add_sample(struct isl_tab *tab, - __isl_take isl_vec *sample) WARN_UNUSED; -struct isl_tab *isl_tab_drop_sample(struct isl_tab *tab, int s); -int isl_tab_save_samples(struct isl_tab *tab) WARN_UNUSED; - -struct isl_tab *isl_tab_detect_equalities(struct isl_tab *tab, - struct isl_tab *tab_cone) WARN_UNUSED; - -int isl_tab_push_callback(struct isl_tab *tab, - struct isl_tab_callback *callback) WARN_UNUSED; - -int isl_tab_add_div(struct isl_tab *tab, __isl_keep isl_vec *div, - int (*add_ineq)(void *user, isl_int *), void *user); - -#endif diff --git a/cloog-0.17.0/isl/isl_tab_pip.c b/cloog-0.17.0/isl/isl_tab_pip.c deleted file mode 100644 index 9759dcf2ae10dac0c3be2be9615238322a7874db..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_tab_pip.c +++ /dev/null @@ -1,5516 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, - * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France - */ - -#include -#include "isl_map_private.h" -#include -#include "isl_tab.h" -#include "isl_sample.h" -#include -#include -#include -#include - -/* - * The implementation of parametric integer linear programming in this file - * was inspired by the paper "Parametric Integer Programming" and the - * report "Solving systems of affine (in)equalities" by Paul Feautrier - * (and others). - * - * The strategy used for obtaining a feasible solution is different - * from the one used in isl_tab.c. In particular, in isl_tab.c, - * upon finding a constraint that is not yet satisfied, we pivot - * in a row that increases the constant term of the row holding the - * constraint, making sure the sample solution remains feasible - * for all the constraints it already satisfied. - * Here, we always pivot in the row holding the constraint, - * choosing a column that induces the lexicographically smallest - * increment to the sample solution. - * - * By starting out from a sample value that is lexicographically - * smaller than any integer point in the problem space, the first - * feasible integer sample point we find will also be the lexicographically - * smallest. If all variables can be assumed to be non-negative, - * then the initial sample value may be chosen equal to zero. - * However, we will not make this assumption. Instead, we apply - * the "big parameter" trick. Any variable x is then not directly - * used in the tableau, but instead it is represented by another - * variable x' = M + x, where M is an arbitrarily large (positive) - * value. x' is therefore always non-negative, whatever the value of x. - * Taking as initial sample value x' = 0 corresponds to x = -M, - * which is always smaller than any possible value of x. - * - * The big parameter trick is used in the main tableau and - * also in the context tableau if isl_context_lex is used. - * In this case, each tableaus has its own big parameter. - * Before doing any real work, we check if all the parameters - * happen to be non-negative. If so, we drop the column corresponding - * to M from the initial context tableau. - * If isl_context_gbr is used, then the big parameter trick is only - * used in the main tableau. - */ - -struct isl_context; -struct isl_context_op { - /* detect nonnegative parameters in context and mark them in tab */ - struct isl_tab *(*detect_nonnegative_parameters)( - struct isl_context *context, struct isl_tab *tab); - /* return temporary reference to basic set representation of context */ - struct isl_basic_set *(*peek_basic_set)(struct isl_context *context); - /* return temporary reference to tableau representation of context */ - struct isl_tab *(*peek_tab)(struct isl_context *context); - /* add equality; check is 1 if eq may not be valid; - * update is 1 if we may want to call ineq_sign on context later. - */ - void (*add_eq)(struct isl_context *context, isl_int *eq, - int check, int update); - /* add inequality; check is 1 if ineq may not be valid; - * update is 1 if we may want to call ineq_sign on context later. - */ - void (*add_ineq)(struct isl_context *context, isl_int *ineq, - int check, int update); - /* check sign of ineq based on previous information. - * strict is 1 if saturation should be treated as a positive sign. - */ - enum isl_tab_row_sign (*ineq_sign)(struct isl_context *context, - isl_int *ineq, int strict); - /* check if inequality maintains feasibility */ - int (*test_ineq)(struct isl_context *context, isl_int *ineq); - /* return index of a div that corresponds to "div" */ - int (*get_div)(struct isl_context *context, struct isl_tab *tab, - struct isl_vec *div); - /* add div "div" to context and return non-negativity */ - int (*add_div)(struct isl_context *context, struct isl_vec *div); - int (*detect_equalities)(struct isl_context *context, - struct isl_tab *tab); - /* return row index of "best" split */ - int (*best_split)(struct isl_context *context, struct isl_tab *tab); - /* check if context has already been determined to be empty */ - int (*is_empty)(struct isl_context *context); - /* check if context is still usable */ - int (*is_ok)(struct isl_context *context); - /* save a copy/snapshot of context */ - void *(*save)(struct isl_context *context); - /* restore saved context */ - void (*restore)(struct isl_context *context, void *); - /* invalidate context */ - void (*invalidate)(struct isl_context *context); - /* free context */ - void (*free)(struct isl_context *context); -}; - -struct isl_context { - struct isl_context_op *op; -}; - -struct isl_context_lex { - struct isl_context context; - struct isl_tab *tab; -}; - -struct isl_partial_sol { - int level; - struct isl_basic_set *dom; - struct isl_mat *M; - - struct isl_partial_sol *next; -}; - -struct isl_sol; -struct isl_sol_callback { - struct isl_tab_callback callback; - struct isl_sol *sol; -}; - -/* isl_sol is an interface for constructing a solution to - * a parametric integer linear programming problem. - * Every time the algorithm reaches a state where a solution - * can be read off from the tableau (including cases where the tableau - * is empty), the function "add" is called on the isl_sol passed - * to find_solutions_main. - * - * The context tableau is owned by isl_sol and is updated incrementally. - * - * There are currently two implementations of this interface, - * isl_sol_map, which simply collects the solutions in an isl_map - * and (optionally) the parts of the context where there is no solution - * in an isl_set, and - * isl_sol_for, which calls a user-defined function for each part of - * the solution. - */ -struct isl_sol { - int error; - int rational; - int level; - int max; - int n_out; - struct isl_context *context; - struct isl_partial_sol *partial; - void (*add)(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M); - void (*add_empty)(struct isl_sol *sol, struct isl_basic_set *bset); - void (*free)(struct isl_sol *sol); - struct isl_sol_callback dec_level; -}; - -static void sol_free(struct isl_sol *sol) -{ - struct isl_partial_sol *partial, *next; - if (!sol) - return; - for (partial = sol->partial; partial; partial = next) { - next = partial->next; - isl_basic_set_free(partial->dom); - isl_mat_free(partial->M); - free(partial); - } - sol->free(sol); -} - -/* Push a partial solution represented by a domain and mapping M - * onto the stack of partial solutions. - */ -static void sol_push_sol(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - struct isl_partial_sol *partial; - - if (sol->error || !dom) - goto error; - - partial = isl_alloc_type(dom->ctx, struct isl_partial_sol); - if (!partial) - goto error; - - partial->level = sol->level; - partial->dom = dom; - partial->M = M; - partial->next = sol->partial; - - sol->partial = partial; - - return; -error: - isl_basic_set_free(dom); - sol->error = 1; -} - -/* Pop one partial solution from the partial solution stack and - * pass it on to sol->add or sol->add_empty. - */ -static void sol_pop_one(struct isl_sol *sol) -{ - struct isl_partial_sol *partial; - - partial = sol->partial; - sol->partial = partial->next; - - if (partial->M) - sol->add(sol, partial->dom, partial->M); - else - sol->add_empty(sol, partial->dom); - free(partial); -} - -/* Return a fresh copy of the domain represented by the context tableau. - */ -static struct isl_basic_set *sol_domain(struct isl_sol *sol) -{ - struct isl_basic_set *bset; - - if (sol->error) - return NULL; - - bset = isl_basic_set_dup(sol->context->op->peek_basic_set(sol->context)); - bset = isl_basic_set_update_from_tab(bset, - sol->context->op->peek_tab(sol->context)); - - return bset; -} - -/* Check whether two partial solutions have the same mapping, where n_div - * is the number of divs that the two partial solutions have in common. - */ -static int same_solution(struct isl_partial_sol *s1, struct isl_partial_sol *s2, - unsigned n_div) -{ - int i; - unsigned dim; - - if (!s1->M != !s2->M) - return 0; - if (!s1->M) - return 1; - - dim = isl_basic_set_total_dim(s1->dom) - s1->dom->n_div; - - for (i = 0; i < s1->M->n_row; ++i) { - if (isl_seq_first_non_zero(s1->M->row[i]+1+dim+n_div, - s1->M->n_col-1-dim-n_div) != -1) - return 0; - if (isl_seq_first_non_zero(s2->M->row[i]+1+dim+n_div, - s2->M->n_col-1-dim-n_div) != -1) - return 0; - if (!isl_seq_eq(s1->M->row[i], s2->M->row[i], 1+dim+n_div)) - return 0; - } - return 1; -} - -/* Pop all solutions from the partial solution stack that were pushed onto - * the stack at levels that are deeper than the current level. - * If the two topmost elements on the stack have the same level - * and represent the same solution, then their domains are combined. - * This combined domain is the same as the current context domain - * as sol_pop is called each time we move back to a higher level. - */ -static void sol_pop(struct isl_sol *sol) -{ - struct isl_partial_sol *partial; - unsigned n_div; - - if (sol->error) - return; - - if (sol->level == 0) { - for (partial = sol->partial; partial; partial = sol->partial) - sol_pop_one(sol); - return; - } - - partial = sol->partial; - if (!partial) - return; - - if (partial->level <= sol->level) - return; - - if (partial->next && partial->next->level == partial->level) { - n_div = isl_basic_set_dim( - sol->context->op->peek_basic_set(sol->context), - isl_dim_div); - - if (!same_solution(partial, partial->next, n_div)) { - sol_pop_one(sol); - sol_pop_one(sol); - } else { - struct isl_basic_set *bset; - - bset = sol_domain(sol); - - isl_basic_set_free(partial->next->dom); - partial->next->dom = bset; - partial->next->level = sol->level; - - sol->partial = partial->next; - isl_basic_set_free(partial->dom); - isl_mat_free(partial->M); - free(partial); - } - } else - sol_pop_one(sol); -} - -static void sol_dec_level(struct isl_sol *sol) -{ - if (sol->error) - return; - - sol->level--; - - sol_pop(sol); -} - -static int sol_dec_level_wrap(struct isl_tab_callback *cb) -{ - struct isl_sol_callback *callback = (struct isl_sol_callback *)cb; - - sol_dec_level(callback->sol); - - return callback->sol->error ? -1 : 0; -} - -/* Move down to next level and push callback onto context tableau - * to decrease the level again when it gets rolled back across - * the current state. That is, dec_level will be called with - * the context tableau in the same state as it is when inc_level - * is called. - */ -static void sol_inc_level(struct isl_sol *sol) -{ - struct isl_tab *tab; - - if (sol->error) - return; - - sol->level++; - tab = sol->context->op->peek_tab(sol->context); - if (isl_tab_push_callback(tab, &sol->dec_level.callback) < 0) - sol->error = 1; -} - -static void scale_rows(struct isl_mat *mat, isl_int m, int n_row) -{ - int i; - - if (isl_int_is_one(m)) - return; - - for (i = 0; i < n_row; ++i) - isl_seq_scale(mat->row[i], mat->row[i], m, mat->n_col); -} - -/* Add the solution identified by the tableau and the context tableau. - * - * The layout of the variables is as follows. - * tab->n_var is equal to the total number of variables in the input - * map (including divs that were copied from the context) - * + the number of extra divs constructed - * Of these, the first tab->n_param and the last tab->n_div variables - * correspond to the variables in the context, i.e., - * tab->n_param + tab->n_div = context_tab->n_var - * tab->n_param is equal to the number of parameters and input - * dimensions in the input map - * tab->n_div is equal to the number of divs in the context - * - * If there is no solution, then call add_empty with a basic set - * that corresponds to the context tableau. (If add_empty is NULL, - * then do nothing). - * - * If there is a solution, then first construct a matrix that maps - * all dimensions of the context to the output variables, i.e., - * the output dimensions in the input map. - * The divs in the input map (if any) that do not correspond to any - * div in the context do not appear in the solution. - * The algorithm will make sure that they have an integer value, - * but these values themselves are of no interest. - * We have to be careful not to drop or rearrange any divs in the - * context because that would change the meaning of the matrix. - * - * To extract the value of the output variables, it should be noted - * that we always use a big parameter M in the main tableau and so - * the variable stored in this tableau is not an output variable x itself, but - * x' = M + x (in case of minimization) - * or - * x' = M - x (in case of maximization) - * If x' appears in a column, then its optimal value is zero, - * which means that the optimal value of x is an unbounded number - * (-M for minimization and M for maximization). - * We currently assume that the output dimensions in the original map - * are bounded, so this cannot occur. - * Similarly, when x' appears in a row, then the coefficient of M in that - * row is necessarily 1. - * If the row in the tableau represents - * d x' = c + d M + e(y) - * then, in case of minimization, the corresponding row in the matrix - * will be - * a c + a e(y) - * with a d = m, the (updated) common denominator of the matrix. - * In case of maximization, the row will be - * -a c - a e(y) - */ -static void sol_add(struct isl_sol *sol, struct isl_tab *tab) -{ - struct isl_basic_set *bset = NULL; - struct isl_mat *mat = NULL; - unsigned off; - int row; - isl_int m; - - if (sol->error || !tab) - goto error; - - if (tab->empty && !sol->add_empty) - return; - - bset = sol_domain(sol); - - if (tab->empty) { - sol_push_sol(sol, bset, NULL); - return; - } - - off = 2 + tab->M; - - mat = isl_mat_alloc(tab->mat->ctx, 1 + sol->n_out, - 1 + tab->n_param + tab->n_div); - if (!mat) - goto error; - - isl_int_init(m); - - isl_seq_clr(mat->row[0] + 1, mat->n_col - 1); - isl_int_set_si(mat->row[0][0], 1); - for (row = 0; row < sol->n_out; ++row) { - int i = tab->n_param + row; - int r, j; - - isl_seq_clr(mat->row[1 + row], mat->n_col); - if (!tab->var[i].is_row) { - if (tab->M) - isl_die(mat->ctx, isl_error_invalid, - "unbounded optimum", goto error2); - continue; - } - - r = tab->var[i].index; - if (tab->M && - isl_int_ne(tab->mat->row[r][2], tab->mat->row[r][0])) - isl_die(mat->ctx, isl_error_invalid, - "unbounded optimum", goto error2); - isl_int_gcd(m, mat->row[0][0], tab->mat->row[r][0]); - isl_int_divexact(m, tab->mat->row[r][0], m); - scale_rows(mat, m, 1 + row); - isl_int_divexact(m, mat->row[0][0], tab->mat->row[r][0]); - isl_int_mul(mat->row[1 + row][0], m, tab->mat->row[r][1]); - for (j = 0; j < tab->n_param; ++j) { - int col; - if (tab->var[j].is_row) - continue; - col = tab->var[j].index; - isl_int_mul(mat->row[1 + row][1 + j], m, - tab->mat->row[r][off + col]); - } - for (j = 0; j < tab->n_div; ++j) { - int col; - if (tab->var[tab->n_var - tab->n_div+j].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div+j].index; - isl_int_mul(mat->row[1 + row][1 + tab->n_param + j], m, - tab->mat->row[r][off + col]); - } - if (sol->max) - isl_seq_neg(mat->row[1 + row], mat->row[1 + row], - mat->n_col); - } - - isl_int_clear(m); - - sol_push_sol(sol, bset, mat); - return; -error2: - isl_int_clear(m); -error: - isl_basic_set_free(bset); - isl_mat_free(mat); - sol->error = 1; -} - -struct isl_sol_map { - struct isl_sol sol; - struct isl_map *map; - struct isl_set *empty; -}; - -static void sol_map_free(struct isl_sol_map *sol_map) -{ - if (!sol_map) - return; - if (sol_map->sol.context) - sol_map->sol.context->op->free(sol_map->sol.context); - isl_map_free(sol_map->map); - isl_set_free(sol_map->empty); - free(sol_map); -} - -static void sol_map_free_wrap(struct isl_sol *sol) -{ - sol_map_free((struct isl_sol_map *)sol); -} - -/* This function is called for parts of the context where there is - * no solution, with "bset" corresponding to the context tableau. - * Simply add the basic set to the set "empty". - */ -static void sol_map_add_empty(struct isl_sol_map *sol, - struct isl_basic_set *bset) -{ - if (!bset) - goto error; - isl_assert(bset->ctx, sol->empty, goto error); - - sol->empty = isl_set_grow(sol->empty, 1); - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - sol->empty = isl_set_add_basic_set(sol->empty, isl_basic_set_copy(bset)); - if (!sol->empty) - goto error; - isl_basic_set_free(bset); - return; -error: - isl_basic_set_free(bset); - sol->sol.error = 1; -} - -static void sol_map_add_empty_wrap(struct isl_sol *sol, - struct isl_basic_set *bset) -{ - sol_map_add_empty((struct isl_sol_map *)sol, bset); -} - -/* Given a basic map "dom" that represents the context and an affine - * matrix "M" that maps the dimensions of the context to the - * output variables, construct a basic map with the same parameters - * and divs as the context, the dimensions of the context as input - * dimensions and a number of output dimensions that is equal to - * the number of output dimensions in the input map. - * - * The constraints and divs of the context are simply copied - * from "dom". For each row - * x = c + e(y) - * an equality - * c + e(y) - d x = 0 - * is added, with d the common denominator of M. - */ -static void sol_map_add(struct isl_sol_map *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - int i; - struct isl_basic_map *bmap = NULL; - unsigned n_eq; - unsigned n_ineq; - unsigned nparam; - unsigned total; - unsigned n_div; - unsigned n_out; - - if (sol->sol.error || !dom || !M) - goto error; - - n_out = sol->sol.n_out; - n_eq = dom->n_eq + n_out; - n_ineq = dom->n_ineq; - n_div = dom->n_div; - nparam = isl_basic_set_total_dim(dom) - n_div; - total = isl_map_dim(sol->map, isl_dim_all); - bmap = isl_basic_map_alloc_space(isl_map_get_space(sol->map), - n_div, n_eq, 2 * n_div + n_ineq); - if (!bmap) - goto error; - if (sol->sol.rational) - ISL_F_SET(bmap, ISL_BASIC_MAP_RATIONAL); - for (i = 0; i < dom->n_div; ++i) { - int k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->div[k], dom->div[i], 1 + 1 + nparam); - isl_seq_clr(bmap->div[k] + 1 + 1 + nparam, total - nparam); - isl_seq_cpy(bmap->div[k] + 1 + 1 + total, - dom->div[i] + 1 + 1 + nparam, i); - } - for (i = 0; i < dom->n_eq; ++i) { - int k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], dom->eq[i], 1 + nparam); - isl_seq_clr(bmap->eq[k] + 1 + nparam, total - nparam); - isl_seq_cpy(bmap->eq[k] + 1 + total, - dom->eq[i] + 1 + nparam, n_div); - } - for (i = 0; i < dom->n_ineq; ++i) { - int k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], dom->ineq[i], 1 + nparam); - isl_seq_clr(bmap->ineq[k] + 1 + nparam, total - nparam); - isl_seq_cpy(bmap->ineq[k] + 1 + total, - dom->ineq[i] + 1 + nparam, n_div); - } - for (i = 0; i < M->n_row - 1; ++i) { - int k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->eq[k], M->row[1 + i], 1 + nparam); - isl_seq_clr(bmap->eq[k] + 1 + nparam, n_out); - isl_int_neg(bmap->eq[k][1 + nparam + i], M->row[0][0]); - isl_seq_cpy(bmap->eq[k] + 1 + nparam + n_out, - M->row[1 + i] + 1 + nparam, n_div); - } - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - sol->map = isl_map_grow(sol->map, 1); - sol->map = isl_map_add_basic_map(sol->map, bmap); - isl_basic_set_free(dom); - isl_mat_free(M); - if (!sol->map) - sol->sol.error = 1; - return; -error: - isl_basic_set_free(dom); - isl_mat_free(M); - isl_basic_map_free(bmap); - sol->sol.error = 1; -} - -static void sol_map_add_wrap(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - sol_map_add((struct isl_sol_map *)sol, dom, M); -} - - -/* Store the "parametric constant" of row "row" of tableau "tab" in "line", - * i.e., the constant term and the coefficients of all variables that - * appear in the context tableau. - * Note that the coefficient of the big parameter M is NOT copied. - * The context tableau may not have a big parameter and even when it - * does, it is a different big parameter. - */ -static void get_row_parameter_line(struct isl_tab *tab, int row, isl_int *line) -{ - int i; - unsigned off = 2 + tab->M; - - isl_int_set(line[0], tab->mat->row[row][1]); - for (i = 0; i < tab->n_param; ++i) { - if (tab->var[i].is_row) - isl_int_set_si(line[1 + i], 0); - else { - int col = tab->var[i].index; - isl_int_set(line[1 + i], tab->mat->row[row][off + col]); - } - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - isl_int_set_si(line[1 + tab->n_param + i], 0); - else { - int col = tab->var[tab->n_var - tab->n_div + i].index; - isl_int_set(line[1 + tab->n_param + i], - tab->mat->row[row][off + col]); - } - } -} - -/* Check if rows "row1" and "row2" have identical "parametric constants", - * as explained above. - * In this case, we also insist that the coefficients of the big parameter - * be the same as the values of the constants will only be the same - * if these coefficients are also the same. - */ -static int identical_parameter_line(struct isl_tab *tab, int row1, int row2) -{ - int i; - unsigned off = 2 + tab->M; - - if (isl_int_ne(tab->mat->row[row1][1], tab->mat->row[row2][1])) - return 0; - - if (tab->M && isl_int_ne(tab->mat->row[row1][2], - tab->mat->row[row2][2])) - return 0; - - for (i = 0; i < tab->n_param + tab->n_div; ++i) { - int pos = i < tab->n_param ? i : - tab->n_var - tab->n_div + i - tab->n_param; - int col; - - if (tab->var[pos].is_row) - continue; - col = tab->var[pos].index; - if (isl_int_ne(tab->mat->row[row1][off + col], - tab->mat->row[row2][off + col])) - return 0; - } - return 1; -} - -/* Return an inequality that expresses that the "parametric constant" - * should be non-negative. - * This function is only called when the coefficient of the big parameter - * is equal to zero. - */ -static struct isl_vec *get_row_parameter_ineq(struct isl_tab *tab, int row) -{ - struct isl_vec *ineq; - - ineq = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_param + tab->n_div); - if (!ineq) - return NULL; - - get_row_parameter_line(tab, row, ineq->el); - if (ineq) - ineq = isl_vec_normalize(ineq); - - return ineq; -} - -/* Return a integer division for use in a parametric cut based on the given row. - * In particular, let the parametric constant of the row be - * - * \sum_i a_i y_i - * - * where y_0 = 1, but none of the y_i corresponds to the big parameter M. - * The div returned is equal to - * - * floor(\sum_i {-a_i} y_i) = floor((\sum_i (-a_i mod d) y_i)/d) - */ -static struct isl_vec *get_row_parameter_div(struct isl_tab *tab, int row) -{ - struct isl_vec *div; - - div = isl_vec_alloc(tab->mat->ctx, 1 + 1 + tab->n_param + tab->n_div); - if (!div) - return NULL; - - isl_int_set(div->el[0], tab->mat->row[row][0]); - get_row_parameter_line(tab, row, div->el + 1); - div = isl_vec_normalize(div); - isl_seq_neg(div->el + 1, div->el + 1, div->size - 1); - isl_seq_fdiv_r(div->el + 1, div->el + 1, div->el[0], div->size - 1); - - return div; -} - -/* Return a integer division for use in transferring an integrality constraint - * to the context. - * In particular, let the parametric constant of the row be - * - * \sum_i a_i y_i - * - * where y_0 = 1, but none of the y_i corresponds to the big parameter M. - * The the returned div is equal to - * - * floor(\sum_i {a_i} y_i) = floor((\sum_i (a_i mod d) y_i)/d) - */ -static struct isl_vec *get_row_split_div(struct isl_tab *tab, int row) -{ - struct isl_vec *div; - - div = isl_vec_alloc(tab->mat->ctx, 1 + 1 + tab->n_param + tab->n_div); - if (!div) - return NULL; - - isl_int_set(div->el[0], tab->mat->row[row][0]); - get_row_parameter_line(tab, row, div->el + 1); - div = isl_vec_normalize(div); - isl_seq_fdiv_r(div->el + 1, div->el + 1, div->el[0], div->size - 1); - - return div; -} - -/* Construct and return an inequality that expresses an upper bound - * on the given div. - * In particular, if the div is given by - * - * d = floor(e/m) - * - * then the inequality expresses - * - * m d <= e - */ -static struct isl_vec *ineq_for_div(struct isl_basic_set *bset, unsigned div) -{ - unsigned total; - unsigned div_pos; - struct isl_vec *ineq; - - if (!bset) - return NULL; - - total = isl_basic_set_total_dim(bset); - div_pos = 1 + total - bset->n_div + div; - - ineq = isl_vec_alloc(bset->ctx, 1 + total); - if (!ineq) - return NULL; - - isl_seq_cpy(ineq->el, bset->div[div] + 1, 1 + total); - isl_int_neg(ineq->el[div_pos], bset->div[div][0]); - return ineq; -} - -/* Given a row in the tableau and a div that was created - * using get_row_split_div and that has been constrained to equality, i.e., - * - * d = floor(\sum_i {a_i} y_i) = \sum_i {a_i} y_i - * - * replace the expression "\sum_i {a_i} y_i" in the row by d, - * i.e., we subtract "\sum_i {a_i} y_i" and add 1 d. - * The coefficients of the non-parameters in the tableau have been - * verified to be integral. We can therefore simply replace coefficient b - * by floor(b). For the coefficients of the parameters we have - * floor(a_i) = a_i - {a_i}, while for the other coefficients, we have - * floor(b) = b. - */ -static struct isl_tab *set_row_cst_to_div(struct isl_tab *tab, int row, int div) -{ - isl_seq_fdiv_q(tab->mat->row[row] + 1, tab->mat->row[row] + 1, - tab->mat->row[row][0], 1 + tab->M + tab->n_col); - - isl_int_set_si(tab->mat->row[row][0], 1); - - if (tab->var[tab->n_var - tab->n_div + div].is_row) { - int drow = tab->var[tab->n_var - tab->n_div + div].index; - - isl_assert(tab->mat->ctx, - isl_int_is_one(tab->mat->row[drow][0]), goto error); - isl_seq_combine(tab->mat->row[row] + 1, - tab->mat->ctx->one, tab->mat->row[row] + 1, - tab->mat->ctx->one, tab->mat->row[drow] + 1, - 1 + tab->M + tab->n_col); - } else { - int dcol = tab->var[tab->n_var - tab->n_div + div].index; - - isl_int_add_ui(tab->mat->row[row][2 + tab->M + dcol], - tab->mat->row[row][2 + tab->M + dcol], 1); - } - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if the (parametric) constant of the given row is obviously - * negative, meaning that we don't need to consult the context tableau. - * If there is a big parameter and its coefficient is non-zero, - * then this coefficient determines the outcome. - * Otherwise, we check whether the constant is negative and - * all non-zero coefficients of parameters are negative and - * belong to non-negative parameters. - */ -static int is_obviously_neg(struct isl_tab *tab, int row) -{ - int i; - int col; - unsigned off = 2 + tab->M; - - if (tab->M) { - if (isl_int_is_pos(tab->mat->row[row][2])) - return 0; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 1; - } - - if (isl_int_is_nonneg(tab->mat->row[row][1])) - return 0; - for (i = 0; i < tab->n_param; ++i) { - /* Eliminated parameter */ - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[i].is_nonneg) - return 0; - if (isl_int_is_pos(tab->mat->row[row][off + col])) - return 0; - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[tab->n_var - tab->n_div + i].is_nonneg) - return 0; - if (isl_int_is_pos(tab->mat->row[row][off + col])) - return 0; - } - return 1; -} - -/* Check if the (parametric) constant of the given row is obviously - * non-negative, meaning that we don't need to consult the context tableau. - * If there is a big parameter and its coefficient is non-zero, - * then this coefficient determines the outcome. - * Otherwise, we check whether the constant is non-negative and - * all non-zero coefficients of parameters are positive and - * belong to non-negative parameters. - */ -static int is_obviously_nonneg(struct isl_tab *tab, int row) -{ - int i; - int col; - unsigned off = 2 + tab->M; - - if (tab->M) { - if (isl_int_is_pos(tab->mat->row[row][2])) - return 1; - if (isl_int_is_neg(tab->mat->row[row][2])) - return 0; - } - - if (isl_int_is_neg(tab->mat->row[row][1])) - return 0; - for (i = 0; i < tab->n_param; ++i) { - /* Eliminated parameter */ - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[i].is_nonneg) - return 0; - if (isl_int_is_neg(tab->mat->row[row][off + col])) - return 0; - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (!tab->var[tab->n_var - tab->n_div + i].is_nonneg) - return 0; - if (isl_int_is_neg(tab->mat->row[row][off + col])) - return 0; - } - return 1; -} - -/* Given a row r and two columns, return the column that would - * lead to the lexicographically smallest increment in the sample - * solution when leaving the basis in favor of the row. - * Pivoting with column c will increment the sample value by a non-negative - * constant times a_{V,c}/a_{r,c}, with a_{V,c} the elements of column c - * corresponding to the non-parametric variables. - * If variable v appears in a column c_v, the a_{v,c} = 1 iff c = c_v, - * with all other entries in this virtual row equal to zero. - * If variable v appears in a row, then a_{v,c} is the element in column c - * of that row. - * - * Let v be the first variable with a_{v,c1}/a_{r,c1} != a_{v,c2}/a_{r,c2}. - * Then if a_{v,c1}/a_{r,c1} < a_{v,c2}/a_{r,c2}, i.e., - * a_{v,c2} a_{r,c1} - a_{v,c1} a_{r,c2} > 0, c1 results in the minimal - * increment. Otherwise, it's c2. - */ -static int lexmin_col_pair(struct isl_tab *tab, - int row, int col1, int col2, isl_int tmp) -{ - int i; - isl_int *tr; - - tr = tab->mat->row[row] + 2 + tab->M; - - for (i = tab->n_param; i < tab->n_var - tab->n_div; ++i) { - int s1, s2; - isl_int *r; - - if (!tab->var[i].is_row) { - if (tab->var[i].index == col1) - return col2; - if (tab->var[i].index == col2) - return col1; - continue; - } - - if (tab->var[i].index == row) - continue; - - r = tab->mat->row[tab->var[i].index] + 2 + tab->M; - s1 = isl_int_sgn(r[col1]); - s2 = isl_int_sgn(r[col2]); - if (s1 == 0 && s2 == 0) - continue; - if (s1 < s2) - return col1; - if (s2 < s1) - return col2; - - isl_int_mul(tmp, r[col2], tr[col1]); - isl_int_submul(tmp, r[col1], tr[col2]); - if (isl_int_is_pos(tmp)) - return col1; - if (isl_int_is_neg(tmp)) - return col2; - } - return -1; -} - -/* Given a row in the tableau, find and return the column that would - * result in the lexicographically smallest, but positive, increment - * in the sample point. - * If there is no such column, then return tab->n_col. - * If anything goes wrong, return -1. - */ -static int lexmin_pivot_col(struct isl_tab *tab, int row) -{ - int j; - int col = tab->n_col; - isl_int *tr; - isl_int tmp; - - tr = tab->mat->row[row] + 2 + tab->M; - - isl_int_init(tmp); - - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (tab->col_var[j] >= 0 && - (tab->col_var[j] < tab->n_param || - tab->col_var[j] >= tab->n_var - tab->n_div)) - continue; - - if (!isl_int_is_pos(tr[j])) - continue; - - if (col == tab->n_col) - col = j; - else - col = lexmin_col_pair(tab, row, col, j, tmp); - isl_assert(tab->mat->ctx, col >= 0, goto error); - } - - isl_int_clear(tmp); - return col; -error: - isl_int_clear(tmp); - return -1; -} - -/* Return the first known violated constraint, i.e., a non-negative - * constraint that currently has an either obviously negative value - * or a previously determined to be negative value. - * - * If any constraint has a negative coefficient for the big parameter, - * if any, then we return one of these first. - */ -static int first_neg(struct isl_tab *tab) -{ - int row; - - if (tab->M) - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (!isl_int_is_neg(tab->mat->row[row][2])) - continue; - if (tab->row_sign) - tab->row_sign[row] = isl_tab_row_neg; - return row; - } - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (tab->row_sign) { - if (tab->row_sign[row] == 0 && - is_obviously_neg(tab, row)) - tab->row_sign[row] = isl_tab_row_neg; - if (tab->row_sign[row] != isl_tab_row_neg) - continue; - } else if (!is_obviously_neg(tab, row)) - continue; - return row; - } - return -1; -} - -/* Check whether the invariant that all columns are lexico-positive - * is satisfied. This function is not called from the current code - * but is useful during debugging. - */ -static void check_lexpos(struct isl_tab *tab) __attribute__ ((unused)); -static void check_lexpos(struct isl_tab *tab) -{ - unsigned off = 2 + tab->M; - int col; - int var; - int row; - - for (col = tab->n_dead; col < tab->n_col; ++col) { - if (tab->col_var[col] >= 0 && - (tab->col_var[col] < tab->n_param || - tab->col_var[col] >= tab->n_var - tab->n_div)) - continue; - for (var = tab->n_param; var < tab->n_var - tab->n_div; ++var) { - if (!tab->var[var].is_row) { - if (tab->var[var].index == col) - break; - else - continue; - } - row = tab->var[var].index; - if (isl_int_is_zero(tab->mat->row[row][off + col])) - continue; - if (isl_int_is_pos(tab->mat->row[row][off + col])) - break; - fprintf(stderr, "lexneg column %d (row %d)\n", - col, row); - } - if (var >= tab->n_var - tab->n_div) - fprintf(stderr, "zero column %d\n", col); - } -} - -/* Report to the caller that the given constraint is part of an encountered - * conflict. - */ -static int report_conflicting_constraint(struct isl_tab *tab, int con) -{ - return tab->conflict(con, tab->conflict_user); -} - -/* Given a conflicting row in the tableau, report all constraints - * involved in the row to the caller. That is, the row itself - * (if represents a constraint) and all constraint columns with - * non-zero (and therefore negative) coefficient. - */ -static int report_conflict(struct isl_tab *tab, int row) -{ - int j; - isl_int *tr; - - if (!tab->conflict) - return 0; - - if (tab->row_var[row] < 0 && - report_conflicting_constraint(tab, ~tab->row_var[row]) < 0) - return -1; - - tr = tab->mat->row[row] + 2 + tab->M; - - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (tab->col_var[j] >= 0 && - (tab->col_var[j] < tab->n_param || - tab->col_var[j] >= tab->n_var - tab->n_div)) - continue; - - if (!isl_int_is_neg(tr[j])) - continue; - - if (tab->col_var[j] < 0 && - report_conflicting_constraint(tab, ~tab->col_var[j]) < 0) - return -1; - } - - return 0; -} - -/* Resolve all known or obviously violated constraints through pivoting. - * In particular, as long as we can find any violated constraint, we - * look for a pivoting column that would result in the lexicographically - * smallest increment in the sample point. If there is no such column - * then the tableau is infeasible. - */ -static int restore_lexmin(struct isl_tab *tab) WARN_UNUSED; -static int restore_lexmin(struct isl_tab *tab) -{ - int row, col; - - if (!tab) - return -1; - if (tab->empty) - return 0; - while ((row = first_neg(tab)) != -1) { - col = lexmin_pivot_col(tab, row); - if (col >= tab->n_col) { - if (report_conflict(tab, row) < 0) - return -1; - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - if (col < 0) - return -1; - if (isl_tab_pivot(tab, row, col) < 0) - return -1; - } - return 0; -} - -/* Given a row that represents an equality, look for an appropriate - * pivoting column. - * In particular, if there are any non-zero coefficients among - * the non-parameter variables, then we take the last of these - * variables. Eliminating this variable in terms of the other - * variables and/or parameters does not influence the property - * that all column in the initial tableau are lexicographically - * positive. The row corresponding to the eliminated variable - * will only have non-zero entries below the diagonal of the - * initial tableau. That is, we transform - * - * I I - * 1 into a - * I I - * - * If there is no such non-parameter variable, then we are dealing with - * pure parameter equality and we pick any parameter with coefficient 1 or -1 - * for elimination. This will ensure that the eliminated parameter - * always has an integer value whenever all the other parameters are integral. - * If there is no such parameter then we return -1. - */ -static int last_var_col_or_int_par_col(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - int i; - - for (i = tab->n_var - tab->n_div - 1; i >= 0 && i >= tab->n_param; --i) { - int col; - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (col <= tab->n_dead) - continue; - if (!isl_int_is_zero(tab->mat->row[row][off + col])) - return col; - } - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (isl_int_is_one(tab->mat->row[row][off + i])) - return i; - if (isl_int_is_negone(tab->mat->row[row][off + i])) - return i; - } - return -1; -} - -/* Add an equality that is known to be valid to the tableau. - * We first check if we can eliminate a variable or a parameter. - * If not, we add the equality as two inequalities. - * In this case, the equality was a pure parameter equality and there - * is no need to resolve any constraint violations. - */ -static struct isl_tab *add_lexmin_valid_eq(struct isl_tab *tab, isl_int *eq) -{ - int i; - int r; - - if (!tab) - return NULL; - r = isl_tab_add_row(tab, eq); - if (r < 0) - goto error; - - r = tab->con[r].index; - i = last_var_col_or_int_par_col(tab, r); - if (i < 0) { - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - isl_seq_neg(eq, eq, 1 + tab->n_var); - r = isl_tab_add_row(tab, eq); - if (r < 0) - goto error; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - } else { - if (isl_tab_pivot(tab, r, i) < 0) - goto error; - if (isl_tab_kill_col(tab, i) < 0) - goto error; - tab->n_eq++; - } - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if the given row is a pure constant. - */ -static int is_constant(struct isl_tab *tab, int row) -{ - unsigned off = 2 + tab->M; - - return isl_seq_first_non_zero(tab->mat->row[row] + off + tab->n_dead, - tab->n_col - tab->n_dead) == -1; -} - -/* Add an equality that may or may not be valid to the tableau. - * If the resulting row is a pure constant, then it must be zero. - * Otherwise, the resulting tableau is empty. - * - * If the row is not a pure constant, then we add two inequalities, - * each time checking that they can be satisfied. - * In the end we try to use one of the two constraints to eliminate - * a column. - */ -static int add_lexmin_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED; -static int add_lexmin_eq(struct isl_tab *tab, isl_int *eq) -{ - int r1, r2; - int row; - struct isl_tab_undo *snap; - - if (!tab) - return -1; - snap = isl_tab_snap(tab); - r1 = isl_tab_add_row(tab, eq); - if (r1 < 0) - return -1; - tab->con[r1].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r1]) < 0) - return -1; - - row = tab->con[r1].index; - if (is_constant(tab, row)) { - if (!isl_int_is_zero(tab->mat->row[row][1]) || - (tab->M && !isl_int_is_zero(tab->mat->row[row][2]))) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - - if (restore_lexmin(tab) < 0) - return -1; - if (tab->empty) - return 0; - - isl_seq_neg(eq, eq, 1 + tab->n_var); - - r2 = isl_tab_add_row(tab, eq); - if (r2 < 0) - return -1; - tab->con[r2].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r2]) < 0) - return -1; - - if (restore_lexmin(tab) < 0) - return -1; - if (tab->empty) - return 0; - - if (!tab->con[r1].is_row) { - if (isl_tab_kill_col(tab, tab->con[r1].index) < 0) - return -1; - } else if (!tab->con[r2].is_row) { - if (isl_tab_kill_col(tab, tab->con[r2].index) < 0) - return -1; - } - - if (tab->bmap) { - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - isl_seq_neg(eq, eq, 1 + tab->n_var); - tab->bmap = isl_basic_map_add_ineq(tab->bmap, eq); - isl_seq_neg(eq, eq, 1 + tab->n_var); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - return -1; - if (!tab->bmap) - return -1; - } - - return 0; -} - -/* Add an inequality to the tableau, resolving violations using - * restore_lexmin. - */ -static struct isl_tab *add_lexmin_ineq(struct isl_tab *tab, isl_int *ineq) -{ - int r; - - if (!tab) - return NULL; - if (tab->bmap) { - tab->bmap = isl_basic_map_add_ineq(tab->bmap, ineq); - if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) - goto error; - if (!tab->bmap) - goto error; - } - r = isl_tab_add_row(tab, ineq); - if (r < 0) - goto error; - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - goto error; - if (isl_tab_row_is_redundant(tab, tab->con[r].index)) { - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - goto error; - return tab; - } - - if (restore_lexmin(tab) < 0) - goto error; - if (!tab->empty && tab->con[r].is_row && - isl_tab_row_is_redundant(tab, tab->con[r].index)) - if (isl_tab_mark_redundant(tab, tab->con[r].index) < 0) - goto error; - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if the coefficients of the parameters are all integral. - */ -static int integer_parameter(struct isl_tab *tab, int row) -{ - int i; - int col; - unsigned off = 2 + tab->M; - - for (i = 0; i < tab->n_param; ++i) { - /* Eliminated parameter */ - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (!isl_int_is_divisible_by(tab->mat->row[row][off + col], - tab->mat->row[row][0])) - return 0; - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - if (!isl_int_is_divisible_by(tab->mat->row[row][off + col], - tab->mat->row[row][0])) - return 0; - } - return 1; -} - -/* Check if the coefficients of the non-parameter variables are all integral. - */ -static int integer_variable(struct isl_tab *tab, int row) -{ - int i; - unsigned off = 2 + tab->M; - - for (i = tab->n_dead; i < tab->n_col; ++i) { - if (tab->col_var[i] >= 0 && - (tab->col_var[i] < tab->n_param || - tab->col_var[i] >= tab->n_var - tab->n_div)) - continue; - if (!isl_int_is_divisible_by(tab->mat->row[row][off + i], - tab->mat->row[row][0])) - return 0; - } - return 1; -} - -/* Check if the constant term is integral. - */ -static int integer_constant(struct isl_tab *tab, int row) -{ - return isl_int_is_divisible_by(tab->mat->row[row][1], - tab->mat->row[row][0]); -} - -#define I_CST 1 << 0 -#define I_PAR 1 << 1 -#define I_VAR 1 << 2 - -/* Check for next (non-parameter) variable after "var" (first if var == -1) - * that is non-integer and therefore requires a cut and return - * the index of the variable. - * For parametric tableaus, there are three parts in a row, - * the constant, the coefficients of the parameters and the rest. - * For each part, we check whether the coefficients in that part - * are all integral and if so, set the corresponding flag in *f. - * If the constant and the parameter part are integral, then the - * current sample value is integral and no cut is required - * (irrespective of whether the variable part is integral). - */ -static int next_non_integer_var(struct isl_tab *tab, int var, int *f) -{ - var = var < 0 ? tab->n_param : var + 1; - - for (; var < tab->n_var - tab->n_div; ++var) { - int flags = 0; - int row; - if (!tab->var[var].is_row) - continue; - row = tab->var[var].index; - if (integer_constant(tab, row)) - ISL_FL_SET(flags, I_CST); - if (integer_parameter(tab, row)) - ISL_FL_SET(flags, I_PAR); - if (ISL_FL_ISSET(flags, I_CST) && ISL_FL_ISSET(flags, I_PAR)) - continue; - if (integer_variable(tab, row)) - ISL_FL_SET(flags, I_VAR); - *f = flags; - return var; - } - return -1; -} - -/* Check for first (non-parameter) variable that is non-integer and - * therefore requires a cut and return the corresponding row. - * For parametric tableaus, there are three parts in a row, - * the constant, the coefficients of the parameters and the rest. - * For each part, we check whether the coefficients in that part - * are all integral and if so, set the corresponding flag in *f. - * If the constant and the parameter part are integral, then the - * current sample value is integral and no cut is required - * (irrespective of whether the variable part is integral). - */ -static int first_non_integer_row(struct isl_tab *tab, int *f) -{ - int var = next_non_integer_var(tab, -1, f); - - return var < 0 ? -1 : tab->var[var].index; -} - -/* Add a (non-parametric) cut to cut away the non-integral sample - * value of the given row. - * - * If the row is given by - * - * m r = f + \sum_i a_i y_i - * - * then the cut is - * - * c = - {-f/m} + \sum_i {a_i/m} y_i >= 0 - * - * The big parameter, if any, is ignored, since it is assumed to be big - * enough to be divisible by any integer. - * If the tableau is actually a parametric tableau, then this function - * is only called when all coefficients of the parameters are integral. - * The cut therefore has zero coefficients for the parameters. - * - * The current value is known to be negative, so row_sign, if it - * exists, is set accordingly. - * - * Return the row of the cut or -1. - */ -static int add_cut(struct isl_tab *tab, int row) -{ - int i; - int r; - isl_int *r_row; - unsigned off = 2 + tab->M; - - if (isl_tab_extend_cons(tab, 1) < 0) - return -1; - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - r_row = tab->mat->row[tab->con[r].index]; - isl_int_set(r_row[0], tab->mat->row[row][0]); - isl_int_neg(r_row[1], tab->mat->row[row][1]); - isl_int_fdiv_r(r_row[1], r_row[1], tab->mat->row[row][0]); - isl_int_neg(r_row[1], r_row[1]); - if (tab->M) - isl_int_set_si(r_row[2], 0); - for (i = 0; i < tab->n_col; ++i) - isl_int_fdiv_r(r_row[off + i], - tab->mat->row[row][off + i], tab->mat->row[row][0]); - - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - if (tab->row_sign) - tab->row_sign[tab->con[r].index] = isl_tab_row_neg; - - return tab->con[r].index; -} - -/* Given a non-parametric tableau, add cuts until an integer - * sample point is obtained or until the tableau is determined - * to be integer infeasible. - * As long as there is any non-integer value in the sample point, - * we add appropriate cuts, if possible, for each of these - * non-integer values and then resolve the violated - * cut constraints using restore_lexmin. - * If one of the corresponding rows is equal to an integral - * combination of variables/constraints plus a non-integral constant, - * then there is no way to obtain an integer point and we return - * a tableau that is marked empty. - */ -static struct isl_tab *cut_to_integer_lexmin(struct isl_tab *tab) -{ - int var; - int row; - int flags; - - if (!tab) - return NULL; - if (tab->empty) - return tab; - - while ((var = next_non_integer_var(tab, -1, &flags)) != -1) { - do { - if (ISL_FL_ISSET(flags, I_VAR)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - row = tab->var[var].index; - row = add_cut(tab, row); - if (row < 0) - goto error; - } while ((var = next_non_integer_var(tab, var, &flags)) != -1); - if (restore_lexmin(tab) < 0) - goto error; - if (tab->empty) - break; - } - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check whether all the currently active samples also satisfy the inequality - * "ineq" (treated as an equality if eq is set). - * Remove those samples that do not. - */ -static struct isl_tab *check_samples(struct isl_tab *tab, isl_int *ineq, int eq) -{ - int i; - isl_int v; - - if (!tab) - return NULL; - - isl_assert(tab->mat->ctx, tab->bmap, goto error); - isl_assert(tab->mat->ctx, tab->samples, goto error); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, goto error); - - isl_int_init(v); - for (i = tab->n_outside; i < tab->n_sample; ++i) { - int sgn; - isl_seq_inner_product(ineq, tab->samples->row[i], - 1 + tab->n_var, &v); - sgn = isl_int_sgn(v); - if (eq ? (sgn == 0) : (sgn >= 0)) - continue; - tab = isl_tab_drop_sample(tab, i); - if (!tab) - break; - } - isl_int_clear(v); - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check whether the sample value of the tableau is finite, - * i.e., either the tableau does not use a big parameter, or - * all values of the variables are equal to the big parameter plus - * some constant. This constant is the actual sample value. - */ -static int sample_is_finite(struct isl_tab *tab) -{ - int i; - - if (!tab->M) - return 1; - - for (i = 0; i < tab->n_var; ++i) { - int row; - if (!tab->var[i].is_row) - return 0; - row = tab->var[i].index; - if (isl_int_ne(tab->mat->row[row][0], tab->mat->row[row][2])) - return 0; - } - return 1; -} - -/* Check if the context tableau of sol has any integer points. - * Leave tab in empty state if no integer point can be found. - * If an integer point can be found and if moreover it is finite, - * then it is added to the list of sample values. - * - * This function is only called when none of the currently active sample - * values satisfies the most recently added constraint. - */ -static struct isl_tab *check_integer_feasible(struct isl_tab *tab) -{ - struct isl_tab_undo *snap; - - if (!tab) - return NULL; - - snap = isl_tab_snap(tab); - if (isl_tab_push_basis(tab) < 0) - goto error; - - tab = cut_to_integer_lexmin(tab); - if (!tab) - goto error; - - if (!tab->empty && sample_is_finite(tab)) { - struct isl_vec *sample; - - sample = isl_tab_get_sample_value(tab); - - tab = isl_tab_add_sample(tab, sample); - } - - if (!tab->empty && isl_tab_rollback(tab, snap) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Check if any of the currently active sample values satisfies - * the inequality "ineq" (an equality if eq is set). - */ -static int tab_has_valid_sample(struct isl_tab *tab, isl_int *ineq, int eq) -{ - int i; - isl_int v; - - if (!tab) - return -1; - - isl_assert(tab->mat->ctx, tab->bmap, return -1); - isl_assert(tab->mat->ctx, tab->samples, return -1); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, return -1); - - isl_int_init(v); - for (i = tab->n_outside; i < tab->n_sample; ++i) { - int sgn; - isl_seq_inner_product(ineq, tab->samples->row[i], - 1 + tab->n_var, &v); - sgn = isl_int_sgn(v); - if (eq ? (sgn == 0) : (sgn >= 0)) - break; - } - isl_int_clear(v); - - return i < tab->n_sample; -} - -/* Add a div specified by "div" to the tableau "tab" and return - * 1 if the div is obviously non-negative. - */ -static int context_tab_add_div(struct isl_tab *tab, struct isl_vec *div, - int (*add_ineq)(void *user, isl_int *), void *user) -{ - int i; - int r; - struct isl_mat *samples; - int nonneg; - - r = isl_tab_add_div(tab, div, add_ineq, user); - if (r < 0) - return -1; - nonneg = tab->var[r].is_nonneg; - tab->var[r].frozen = 1; - - samples = isl_mat_extend(tab->samples, - tab->n_sample, 1 + tab->n_var); - tab->samples = samples; - if (!samples) - return -1; - for (i = tab->n_outside; i < samples->n_row; ++i) { - isl_seq_inner_product(div->el + 1, samples->row[i], - div->size - 1, &samples->row[i][samples->n_col - 1]); - isl_int_fdiv_q(samples->row[i][samples->n_col - 1], - samples->row[i][samples->n_col - 1], div->el[0]); - } - - return nonneg; -} - -/* Add a div specified by "div" to both the main tableau and - * the context tableau. In case of the main tableau, we only - * need to add an extra div. In the context tableau, we also - * need to express the meaning of the div. - * Return the index of the div or -1 if anything went wrong. - */ -static int add_div(struct isl_tab *tab, struct isl_context *context, - struct isl_vec *div) -{ - int r; - int nonneg; - - if ((nonneg = context->op->add_div(context, div)) < 0) - goto error; - - if (!context->op->is_ok(context)) - goto error; - - if (isl_tab_extend_vars(tab, 1) < 0) - goto error; - r = isl_tab_allocate_var(tab); - if (r < 0) - goto error; - if (nonneg) - tab->var[r].is_nonneg = 1; - tab->var[r].frozen = 1; - tab->n_div++; - - return tab->n_div - 1; -error: - context->op->invalidate(context); - return -1; -} - -static int find_div(struct isl_tab *tab, isl_int *div, isl_int denom) -{ - int i; - unsigned total = isl_basic_map_total_dim(tab->bmap); - - for (i = 0; i < tab->bmap->n_div; ++i) { - if (isl_int_ne(tab->bmap->div[i][0], denom)) - continue; - if (!isl_seq_eq(tab->bmap->div[i] + 1, div, 1 + total)) - continue; - return i; - } - return -1; -} - -/* Return the index of a div that corresponds to "div". - * We first check if we already have such a div and if not, we create one. - */ -static int get_div(struct isl_tab *tab, struct isl_context *context, - struct isl_vec *div) -{ - int d; - struct isl_tab *context_tab = context->op->peek_tab(context); - - if (!context_tab) - return -1; - - d = find_div(context_tab, div->el + 1, div->el[0]); - if (d != -1) - return d; - - return add_div(tab, context, div); -} - -/* Add a parametric cut to cut away the non-integral sample value - * of the give row. - * Let a_i be the coefficients of the constant term and the parameters - * and let b_i be the coefficients of the variables or constraints - * in basis of the tableau. - * Let q be the div q = floor(\sum_i {-a_i} y_i). - * - * The cut is expressed as - * - * c = \sum_i -{-a_i} y_i + \sum_i {b_i} x_i + q >= 0 - * - * If q did not already exist in the context tableau, then it is added first. - * If q is in a column of the main tableau then the "+ q" can be accomplished - * by setting the corresponding entry to the denominator of the constraint. - * If q happens to be in a row of the main tableau, then the corresponding - * row needs to be added instead (taking care of the denominators). - * Note that this is very unlikely, but perhaps not entirely impossible. - * - * The current value of the cut is known to be negative (or at least - * non-positive), so row_sign is set accordingly. - * - * Return the row of the cut or -1. - */ -static int add_parametric_cut(struct isl_tab *tab, int row, - struct isl_context *context) -{ - struct isl_vec *div; - int d; - int i; - int r; - isl_int *r_row; - int col; - int n; - unsigned off = 2 + tab->M; - - if (!context) - return -1; - - div = get_row_parameter_div(tab, row); - if (!div) - return -1; - - n = tab->n_div; - d = context->op->get_div(context, tab, div); - if (d < 0) - return -1; - - if (isl_tab_extend_cons(tab, 1) < 0) - return -1; - r = isl_tab_allocate_con(tab); - if (r < 0) - return -1; - - r_row = tab->mat->row[tab->con[r].index]; - isl_int_set(r_row[0], tab->mat->row[row][0]); - isl_int_neg(r_row[1], tab->mat->row[row][1]); - isl_int_fdiv_r(r_row[1], r_row[1], tab->mat->row[row][0]); - isl_int_neg(r_row[1], r_row[1]); - if (tab->M) - isl_int_set_si(r_row[2], 0); - for (i = 0; i < tab->n_param; ++i) { - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - isl_int_neg(r_row[off + col], tab->mat->row[row][off + col]); - isl_int_fdiv_r(r_row[off + col], r_row[off + col], - tab->mat->row[row][0]); - isl_int_neg(r_row[off + col], r_row[off + col]); - } - for (i = 0; i < tab->n_div; ++i) { - if (tab->var[tab->n_var - tab->n_div + i].is_row) - continue; - col = tab->var[tab->n_var - tab->n_div + i].index; - isl_int_neg(r_row[off + col], tab->mat->row[row][off + col]); - isl_int_fdiv_r(r_row[off + col], r_row[off + col], - tab->mat->row[row][0]); - isl_int_neg(r_row[off + col], r_row[off + col]); - } - for (i = 0; i < tab->n_col; ++i) { - if (tab->col_var[i] >= 0 && - (tab->col_var[i] < tab->n_param || - tab->col_var[i] >= tab->n_var - tab->n_div)) - continue; - isl_int_fdiv_r(r_row[off + i], - tab->mat->row[row][off + i], tab->mat->row[row][0]); - } - if (tab->var[tab->n_var - tab->n_div + d].is_row) { - isl_int gcd; - int d_row = tab->var[tab->n_var - tab->n_div + d].index; - isl_int_init(gcd); - isl_int_gcd(gcd, tab->mat->row[d_row][0], r_row[0]); - isl_int_divexact(r_row[0], r_row[0], gcd); - isl_int_divexact(gcd, tab->mat->row[d_row][0], gcd); - isl_seq_combine(r_row + 1, gcd, r_row + 1, - r_row[0], tab->mat->row[d_row] + 1, - off - 1 + tab->n_col); - isl_int_mul(r_row[0], r_row[0], tab->mat->row[d_row][0]); - isl_int_clear(gcd); - } else { - col = tab->var[tab->n_var - tab->n_div + d].index; - isl_int_set(r_row[off + col], tab->mat->row[row][0]); - } - - tab->con[r].is_nonneg = 1; - if (isl_tab_push_var(tab, isl_tab_undo_nonneg, &tab->con[r]) < 0) - return -1; - if (tab->row_sign) - tab->row_sign[tab->con[r].index] = isl_tab_row_neg; - - isl_vec_free(div); - - row = tab->con[r].index; - - if (d >= n && context->op->detect_equalities(context, tab) < 0) - return -1; - - return row; -} - -/* Construct a tableau for bmap that can be used for computing - * the lexicographic minimum (or maximum) of bmap. - * If not NULL, then dom is the domain where the minimum - * should be computed. In this case, we set up a parametric - * tableau with row signs (initialized to "unknown"). - * If M is set, then the tableau will use a big parameter. - * If max is set, then a maximum should be computed instead of a minimum. - * This means that for each variable x, the tableau will contain the variable - * x' = M - x, rather than x' = M + x. This in turn means that the coefficient - * of the variables in all constraints are negated prior to adding them - * to the tableau. - */ -static struct isl_tab *tab_for_lexmin(struct isl_basic_map *bmap, - struct isl_basic_set *dom, unsigned M, int max) -{ - int i; - struct isl_tab *tab; - - tab = isl_tab_alloc(bmap->ctx, 2 * bmap->n_eq + bmap->n_ineq + 1, - isl_basic_map_total_dim(bmap), M); - if (!tab) - return NULL; - - tab->rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - if (dom) { - tab->n_param = isl_basic_set_total_dim(dom) - dom->n_div; - tab->n_div = dom->n_div; - tab->row_sign = isl_calloc_array(bmap->ctx, - enum isl_tab_row_sign, tab->mat->n_row); - if (!tab->row_sign) - goto error; - } - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - - for (i = tab->n_param; i < tab->n_var - tab->n_div; ++i) { - tab->var[i].is_nonneg = 1; - tab->var[i].frozen = 1; - } - for (i = 0; i < bmap->n_eq; ++i) { - if (max) - isl_seq_neg(bmap->eq[i] + 1 + tab->n_param, - bmap->eq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - tab = add_lexmin_valid_eq(tab, bmap->eq[i]); - if (max) - isl_seq_neg(bmap->eq[i] + 1 + tab->n_param, - bmap->eq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - if (!tab || tab->empty) - return tab; - } - if (bmap->n_eq && restore_lexmin(tab) < 0) - goto error; - for (i = 0; i < bmap->n_ineq; ++i) { - if (max) - isl_seq_neg(bmap->ineq[i] + 1 + tab->n_param, - bmap->ineq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - tab = add_lexmin_ineq(tab, bmap->ineq[i]); - if (max) - isl_seq_neg(bmap->ineq[i] + 1 + tab->n_param, - bmap->ineq[i] + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - if (!tab || tab->empty) - return tab; - } - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -/* Given a main tableau where more than one row requires a split, - * determine and return the "best" row to split on. - * - * Given two rows in the main tableau, if the inequality corresponding - * to the first row is redundant with respect to that of the second row - * in the current tableau, then it is better to split on the second row, - * since in the positive part, both row will be positive. - * (In the negative part a pivot will have to be performed and just about - * anything can happen to the sign of the other row.) - * - * As a simple heuristic, we therefore select the row that makes the most - * of the other rows redundant. - * - * Perhaps it would also be useful to look at the number of constraints - * that conflict with any given constraint. - */ -static int best_split(struct isl_tab *tab, struct isl_tab *context_tab) -{ - struct isl_tab_undo *snap; - int split; - int row; - int best = -1; - int best_r; - - if (isl_tab_extend_cons(context_tab, 2) < 0) - return -1; - - snap = isl_tab_snap(context_tab); - - for (split = tab->n_redundant; split < tab->n_row; ++split) { - struct isl_tab_undo *snap2; - struct isl_vec *ineq = NULL; - int r = 0; - int ok; - - if (!isl_tab_var_from_row(tab, split)->is_nonneg) - continue; - if (tab->row_sign[split] != isl_tab_row_any) - continue; - - ineq = get_row_parameter_ineq(tab, split); - if (!ineq) - return -1; - ok = isl_tab_add_ineq(context_tab, ineq->el) >= 0; - isl_vec_free(ineq); - if (!ok) - return -1; - - snap2 = isl_tab_snap(context_tab); - - for (row = tab->n_redundant; row < tab->n_row; ++row) { - struct isl_tab_var *var; - - if (row == split) - continue; - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (tab->row_sign[row] != isl_tab_row_any) - continue; - - ineq = get_row_parameter_ineq(tab, row); - if (!ineq) - return -1; - ok = isl_tab_add_ineq(context_tab, ineq->el) >= 0; - isl_vec_free(ineq); - if (!ok) - return -1; - var = &context_tab->con[context_tab->n_con - 1]; - if (!context_tab->empty && - !isl_tab_min_at_most_neg_one(context_tab, var)) - r++; - if (isl_tab_rollback(context_tab, snap2) < 0) - return -1; - } - if (best == -1 || r > best_r) { - best = split; - best_r = r; - } - if (isl_tab_rollback(context_tab, snap) < 0) - return -1; - } - - return best; -} - -static struct isl_basic_set *context_lex_peek_basic_set( - struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (!clex->tab) - return NULL; - return isl_tab_peek_bset(clex->tab); -} - -static struct isl_tab *context_lex_peek_tab(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - return clex->tab; -} - -static void context_lex_add_eq(struct isl_context *context, isl_int *eq, - int check, int update) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (isl_tab_extend_cons(clex->tab, 2) < 0) - goto error; - if (add_lexmin_eq(clex->tab, eq) < 0) - goto error; - if (check) { - int v = tab_has_valid_sample(clex->tab, eq, 1); - if (v < 0) - goto error; - if (!v) - clex->tab = check_integer_feasible(clex->tab); - } - if (update) - clex->tab = check_samples(clex->tab, eq, 1); - return; -error: - isl_tab_free(clex->tab); - clex->tab = NULL; -} - -static void context_lex_add_ineq(struct isl_context *context, isl_int *ineq, - int check, int update) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (isl_tab_extend_cons(clex->tab, 1) < 0) - goto error; - clex->tab = add_lexmin_ineq(clex->tab, ineq); - if (check) { - int v = tab_has_valid_sample(clex->tab, ineq, 0); - if (v < 0) - goto error; - if (!v) - clex->tab = check_integer_feasible(clex->tab); - } - if (update) - clex->tab = check_samples(clex->tab, ineq, 0); - return; -error: - isl_tab_free(clex->tab); - clex->tab = NULL; -} - -static int context_lex_add_ineq_wrap(void *user, isl_int *ineq) -{ - struct isl_context *context = (struct isl_context *)user; - context_lex_add_ineq(context, ineq, 0, 0); - return context->op->is_ok(context) ? 0 : -1; -} - -/* Check which signs can be obtained by "ineq" on all the currently - * active sample values. See row_sign for more information. - */ -static enum isl_tab_row_sign tab_ineq_sign(struct isl_tab *tab, isl_int *ineq, - int strict) -{ - int i; - int sgn; - isl_int tmp; - enum isl_tab_row_sign res = isl_tab_row_unknown; - - isl_assert(tab->mat->ctx, tab->samples, return isl_tab_row_unknown); - isl_assert(tab->mat->ctx, tab->samples->n_col == 1 + tab->n_var, - return isl_tab_row_unknown); - - isl_int_init(tmp); - for (i = tab->n_outside; i < tab->n_sample; ++i) { - isl_seq_inner_product(tab->samples->row[i], ineq, - 1 + tab->n_var, &tmp); - sgn = isl_int_sgn(tmp); - if (sgn > 0 || (sgn == 0 && strict)) { - if (res == isl_tab_row_unknown) - res = isl_tab_row_pos; - if (res == isl_tab_row_neg) - res = isl_tab_row_any; - } - if (sgn < 0) { - if (res == isl_tab_row_unknown) - res = isl_tab_row_neg; - if (res == isl_tab_row_pos) - res = isl_tab_row_any; - } - if (res == isl_tab_row_any) - break; - } - isl_int_clear(tmp); - - return res; -} - -static enum isl_tab_row_sign context_lex_ineq_sign(struct isl_context *context, - isl_int *ineq, int strict) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - return tab_ineq_sign(clex->tab, ineq, strict); -} - -/* Check whether "ineq" can be added to the tableau without rendering - * it infeasible. - */ -static int context_lex_test_ineq(struct isl_context *context, isl_int *ineq) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - int feasible; - - if (!clex->tab) - return -1; - - if (isl_tab_extend_cons(clex->tab, 1) < 0) - return -1; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - return -1; - clex->tab = add_lexmin_ineq(clex->tab, ineq); - clex->tab = check_integer_feasible(clex->tab); - if (!clex->tab) - return -1; - feasible = !clex->tab->empty; - if (isl_tab_rollback(clex->tab, snap) < 0) - return -1; - - return feasible; -} - -static int context_lex_get_div(struct isl_context *context, struct isl_tab *tab, - struct isl_vec *div) -{ - return get_div(tab, context, div); -} - -/* Add a div specified by "div" to the context tableau and return - * 1 if the div is obviously non-negative. - * context_tab_add_div will always return 1, because all variables - * in a isl_context_lex tableau are non-negative. - * However, if we are using a big parameter in the context, then this only - * reflects the non-negativity of the variable used to _encode_ the - * div, i.e., div' = M + div, so we can't draw any conclusions. - */ -static int context_lex_add_div(struct isl_context *context, struct isl_vec *div) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - int nonneg; - nonneg = context_tab_add_div(clex->tab, div, - context_lex_add_ineq_wrap, context); - if (nonneg < 0) - return -1; - if (clex->tab->M) - return 0; - return nonneg; -} - -static int context_lex_detect_equalities(struct isl_context *context, - struct isl_tab *tab) -{ - return 0; -} - -static int context_lex_best_split(struct isl_context *context, - struct isl_tab *tab) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - int r; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - return -1; - r = best_split(tab, clex->tab); - - if (r >= 0 && isl_tab_rollback(clex->tab, snap) < 0) - return -1; - - return r; -} - -static int context_lex_is_empty(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (!clex->tab) - return -1; - return clex->tab->empty; -} - -static void *context_lex_save(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - return NULL; - if (isl_tab_save_samples(clex->tab) < 0) - return NULL; - - return snap; -} - -static void context_lex_restore(struct isl_context *context, void *save) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - if (isl_tab_rollback(clex->tab, (struct isl_tab_undo *)save) < 0) { - isl_tab_free(clex->tab); - clex->tab = NULL; - } -} - -static int context_lex_is_ok(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - return !!clex->tab; -} - -/* For each variable in the context tableau, check if the variable can - * only attain non-negative values. If so, mark the parameter as non-negative - * in the main tableau. This allows for a more direct identification of some - * cases of violated constraints. - */ -static struct isl_tab *tab_detect_nonnegative_parameters(struct isl_tab *tab, - struct isl_tab *context_tab) -{ - int i; - struct isl_tab_undo *snap; - struct isl_vec *ineq = NULL; - struct isl_tab_var *var; - int n; - - if (context_tab->n_var == 0) - return tab; - - ineq = isl_vec_alloc(tab->mat->ctx, 1 + context_tab->n_var); - if (!ineq) - goto error; - - if (isl_tab_extend_cons(context_tab, 1) < 0) - goto error; - - snap = isl_tab_snap(context_tab); - - n = 0; - isl_seq_clr(ineq->el, ineq->size); - for (i = 0; i < context_tab->n_var; ++i) { - isl_int_set_si(ineq->el[1 + i], 1); - if (isl_tab_add_ineq(context_tab, ineq->el) < 0) - goto error; - var = &context_tab->con[context_tab->n_con - 1]; - if (!context_tab->empty && - !isl_tab_min_at_most_neg_one(context_tab, var)) { - int j = i; - if (i >= tab->n_param) - j = i - tab->n_param + tab->n_var - tab->n_div; - tab->var[j].is_nonneg = 1; - n++; - } - isl_int_set_si(ineq->el[1 + i], 0); - if (isl_tab_rollback(context_tab, snap) < 0) - goto error; - } - - if (context_tab->M && n == context_tab->n_var) { - context_tab->mat = isl_mat_drop_cols(context_tab->mat, 2, 1); - context_tab->M = 0; - } - - isl_vec_free(ineq); - return tab; -error: - isl_vec_free(ineq); - isl_tab_free(tab); - return NULL; -} - -static struct isl_tab *context_lex_detect_nonnegative_parameters( - struct isl_context *context, struct isl_tab *tab) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - struct isl_tab_undo *snap; - - if (!tab) - return NULL; - - snap = isl_tab_snap(clex->tab); - if (isl_tab_push_basis(clex->tab) < 0) - goto error; - - tab = tab_detect_nonnegative_parameters(tab, clex->tab); - - if (isl_tab_rollback(clex->tab, snap) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -static void context_lex_invalidate(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - isl_tab_free(clex->tab); - clex->tab = NULL; -} - -static void context_lex_free(struct isl_context *context) -{ - struct isl_context_lex *clex = (struct isl_context_lex *)context; - isl_tab_free(clex->tab); - free(clex); -} - -struct isl_context_op isl_context_lex_op = { - context_lex_detect_nonnegative_parameters, - context_lex_peek_basic_set, - context_lex_peek_tab, - context_lex_add_eq, - context_lex_add_ineq, - context_lex_ineq_sign, - context_lex_test_ineq, - context_lex_get_div, - context_lex_add_div, - context_lex_detect_equalities, - context_lex_best_split, - context_lex_is_empty, - context_lex_is_ok, - context_lex_save, - context_lex_restore, - context_lex_invalidate, - context_lex_free, -}; - -static struct isl_tab *context_tab_for_lexmin(struct isl_basic_set *bset) -{ - struct isl_tab *tab; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - tab = tab_for_lexmin((struct isl_basic_map *)bset, NULL, 1, 0); - if (!tab) - goto error; - if (isl_tab_track_bset(tab, bset) < 0) - goto error; - tab = isl_tab_init_samples(tab); - return tab; -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_context *isl_context_lex_alloc(struct isl_basic_set *dom) -{ - struct isl_context_lex *clex; - - if (!dom) - return NULL; - - clex = isl_alloc_type(dom->ctx, struct isl_context_lex); - if (!clex) - return NULL; - - clex->context.op = &isl_context_lex_op; - - clex->tab = context_tab_for_lexmin(isl_basic_set_copy(dom)); - if (restore_lexmin(clex->tab) < 0) - goto error; - clex->tab = check_integer_feasible(clex->tab); - if (!clex->tab) - goto error; - - return &clex->context; -error: - clex->context.op->free(&clex->context); - return NULL; -} - -struct isl_context_gbr { - struct isl_context context; - struct isl_tab *tab; - struct isl_tab *shifted; - struct isl_tab *cone; -}; - -static struct isl_tab *context_gbr_detect_nonnegative_parameters( - struct isl_context *context, struct isl_tab *tab) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (!tab) - return NULL; - return tab_detect_nonnegative_parameters(tab, cgbr->tab); -} - -static struct isl_basic_set *context_gbr_peek_basic_set( - struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (!cgbr->tab) - return NULL; - return isl_tab_peek_bset(cgbr->tab); -} - -static struct isl_tab *context_gbr_peek_tab(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - return cgbr->tab; -} - -/* Initialize the "shifted" tableau of the context, which - * contains the constraints of the original tableau shifted - * by the sum of all negative coefficients. This ensures - * that any rational point in the shifted tableau can - * be rounded up to yield an integer point in the original tableau. - */ -static void gbr_init_shifted(struct isl_context_gbr *cgbr) -{ - int i, j; - struct isl_vec *cst; - struct isl_basic_set *bset = isl_tab_peek_bset(cgbr->tab); - unsigned dim = isl_basic_set_total_dim(bset); - - cst = isl_vec_alloc(cgbr->tab->mat->ctx, bset->n_ineq); - if (!cst) - return; - - for (i = 0; i < bset->n_ineq; ++i) { - isl_int_set(cst->el[i], bset->ineq[i][0]); - for (j = 0; j < dim; ++j) { - if (!isl_int_is_neg(bset->ineq[i][1 + j])) - continue; - isl_int_add(bset->ineq[i][0], bset->ineq[i][0], - bset->ineq[i][1 + j]); - } - } - - cgbr->shifted = isl_tab_from_basic_set(bset); - - for (i = 0; i < bset->n_ineq; ++i) - isl_int_set(bset->ineq[i][0], cst->el[i]); - - isl_vec_free(cst); -} - -/* Check if the shifted tableau is non-empty, and if so - * use the sample point to construct an integer point - * of the context tableau. - */ -static struct isl_vec *gbr_get_shifted_sample(struct isl_context_gbr *cgbr) -{ - struct isl_vec *sample; - - if (!cgbr->shifted) - gbr_init_shifted(cgbr); - if (!cgbr->shifted) - return NULL; - if (cgbr->shifted->empty) - return isl_vec_alloc(cgbr->tab->mat->ctx, 0); - - sample = isl_tab_get_sample_value(cgbr->shifted); - sample = isl_vec_ceil(sample); - - return sample; -} - -static struct isl_basic_set *drop_constant_terms(struct isl_basic_set *bset) -{ - int i; - - if (!bset) - return NULL; - - for (i = 0; i < bset->n_eq; ++i) - isl_int_set_si(bset->eq[i][0], 0); - - for (i = 0; i < bset->n_ineq; ++i) - isl_int_set_si(bset->ineq[i][0], 0); - - return bset; -} - -static int use_shifted(struct isl_context_gbr *cgbr) -{ - return cgbr->tab->bmap->n_eq == 0 && cgbr->tab->bmap->n_div == 0; -} - -static struct isl_vec *gbr_get_sample(struct isl_context_gbr *cgbr) -{ - struct isl_basic_set *bset; - struct isl_basic_set *cone; - - if (isl_tab_sample_is_integer(cgbr->tab)) - return isl_tab_get_sample_value(cgbr->tab); - - if (use_shifted(cgbr)) { - struct isl_vec *sample; - - sample = gbr_get_shifted_sample(cgbr); - if (!sample || sample->size > 0) - return sample; - - isl_vec_free(sample); - } - - if (!cgbr->cone) { - bset = isl_tab_peek_bset(cgbr->tab); - cgbr->cone = isl_tab_from_recession_cone(bset, 0); - if (!cgbr->cone) - return NULL; - if (isl_tab_track_bset(cgbr->cone, isl_basic_set_dup(bset)) < 0) - return NULL; - } - if (isl_tab_detect_implicit_equalities(cgbr->cone) < 0) - return NULL; - - if (cgbr->cone->n_dead == cgbr->cone->n_col) { - struct isl_vec *sample; - struct isl_tab_undo *snap; - - if (cgbr->tab->basis) { - if (cgbr->tab->basis->n_col != 1 + cgbr->tab->n_var) { - isl_mat_free(cgbr->tab->basis); - cgbr->tab->basis = NULL; - } - cgbr->tab->n_zero = 0; - cgbr->tab->n_unbounded = 0; - } - - snap = isl_tab_snap(cgbr->tab); - - sample = isl_tab_sample(cgbr->tab); - - if (isl_tab_rollback(cgbr->tab, snap) < 0) { - isl_vec_free(sample); - return NULL; - } - - return sample; - } - - cone = isl_basic_set_dup(isl_tab_peek_bset(cgbr->cone)); - cone = drop_constant_terms(cone); - cone = isl_basic_set_update_from_tab(cone, cgbr->cone); - cone = isl_basic_set_underlying_set(cone); - cone = isl_basic_set_gauss(cone, NULL); - - bset = isl_basic_set_dup(isl_tab_peek_bset(cgbr->tab)); - bset = isl_basic_set_update_from_tab(bset, cgbr->tab); - bset = isl_basic_set_underlying_set(bset); - bset = isl_basic_set_gauss(bset, NULL); - - return isl_basic_set_sample_with_cone(bset, cone); -} - -static void check_gbr_integer_feasible(struct isl_context_gbr *cgbr) -{ - struct isl_vec *sample; - - if (!cgbr->tab) - return; - - if (cgbr->tab->empty) - return; - - sample = gbr_get_sample(cgbr); - if (!sample) - goto error; - - if (sample->size == 0) { - isl_vec_free(sample); - if (isl_tab_mark_empty(cgbr->tab) < 0) - goto error; - return; - } - - cgbr->tab = isl_tab_add_sample(cgbr->tab, sample); - - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static struct isl_tab *add_gbr_eq(struct isl_tab *tab, isl_int *eq) -{ - if (!tab) - return NULL; - - if (isl_tab_extend_cons(tab, 2) < 0) - goto error; - - if (isl_tab_add_eq(tab, eq) < 0) - goto error; - - return tab; -error: - isl_tab_free(tab); - return NULL; -} - -static void context_gbr_add_eq(struct isl_context *context, isl_int *eq, - int check, int update) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - - cgbr->tab = add_gbr_eq(cgbr->tab, eq); - - if (cgbr->cone && cgbr->cone->n_col != cgbr->cone->n_dead) { - if (isl_tab_extend_cons(cgbr->cone, 2) < 0) - goto error; - if (isl_tab_add_eq(cgbr->cone, eq) < 0) - goto error; - } - - if (check) { - int v = tab_has_valid_sample(cgbr->tab, eq, 1); - if (v < 0) - goto error; - if (!v) - check_gbr_integer_feasible(cgbr); - } - if (update) - cgbr->tab = check_samples(cgbr->tab, eq, 1); - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static void add_gbr_ineq(struct isl_context_gbr *cgbr, isl_int *ineq) -{ - if (!cgbr->tab) - return; - - if (isl_tab_extend_cons(cgbr->tab, 1) < 0) - goto error; - - if (isl_tab_add_ineq(cgbr->tab, ineq) < 0) - goto error; - - if (cgbr->shifted && !cgbr->shifted->empty && use_shifted(cgbr)) { - int i; - unsigned dim; - dim = isl_basic_map_total_dim(cgbr->tab->bmap); - - if (isl_tab_extend_cons(cgbr->shifted, 1) < 0) - goto error; - - for (i = 0; i < dim; ++i) { - if (!isl_int_is_neg(ineq[1 + i])) - continue; - isl_int_add(ineq[0], ineq[0], ineq[1 + i]); - } - - if (isl_tab_add_ineq(cgbr->shifted, ineq) < 0) - goto error; - - for (i = 0; i < dim; ++i) { - if (!isl_int_is_neg(ineq[1 + i])) - continue; - isl_int_sub(ineq[0], ineq[0], ineq[1 + i]); - } - } - - if (cgbr->cone && cgbr->cone->n_col != cgbr->cone->n_dead) { - if (isl_tab_extend_cons(cgbr->cone, 1) < 0) - goto error; - if (isl_tab_add_ineq(cgbr->cone, ineq) < 0) - goto error; - } - - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static void context_gbr_add_ineq(struct isl_context *context, isl_int *ineq, - int check, int update) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - - add_gbr_ineq(cgbr, ineq); - if (!cgbr->tab) - return; - - if (check) { - int v = tab_has_valid_sample(cgbr->tab, ineq, 0); - if (v < 0) - goto error; - if (!v) - check_gbr_integer_feasible(cgbr); - } - if (update) - cgbr->tab = check_samples(cgbr->tab, ineq, 0); - return; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static int context_gbr_add_ineq_wrap(void *user, isl_int *ineq) -{ - struct isl_context *context = (struct isl_context *)user; - context_gbr_add_ineq(context, ineq, 0, 0); - return context->op->is_ok(context) ? 0 : -1; -} - -static enum isl_tab_row_sign context_gbr_ineq_sign(struct isl_context *context, - isl_int *ineq, int strict) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - return tab_ineq_sign(cgbr->tab, ineq, strict); -} - -/* Check whether "ineq" can be added to the tableau without rendering - * it infeasible. - */ -static int context_gbr_test_ineq(struct isl_context *context, isl_int *ineq) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_tab_undo *snap; - struct isl_tab_undo *shifted_snap = NULL; - struct isl_tab_undo *cone_snap = NULL; - int feasible; - - if (!cgbr->tab) - return -1; - - if (isl_tab_extend_cons(cgbr->tab, 1) < 0) - return -1; - - snap = isl_tab_snap(cgbr->tab); - if (cgbr->shifted) - shifted_snap = isl_tab_snap(cgbr->shifted); - if (cgbr->cone) - cone_snap = isl_tab_snap(cgbr->cone); - add_gbr_ineq(cgbr, ineq); - check_gbr_integer_feasible(cgbr); - if (!cgbr->tab) - return -1; - feasible = !cgbr->tab->empty; - if (isl_tab_rollback(cgbr->tab, snap) < 0) - return -1; - if (shifted_snap) { - if (isl_tab_rollback(cgbr->shifted, shifted_snap)) - return -1; - } else if (cgbr->shifted) { - isl_tab_free(cgbr->shifted); - cgbr->shifted = NULL; - } - if (cone_snap) { - if (isl_tab_rollback(cgbr->cone, cone_snap)) - return -1; - } else if (cgbr->cone) { - isl_tab_free(cgbr->cone); - cgbr->cone = NULL; - } - - return feasible; -} - -/* Return the column of the last of the variables associated to - * a column that has a non-zero coefficient. - * This function is called in a context where only coefficients - * of parameters or divs can be non-zero. - */ -static int last_non_zero_var_col(struct isl_tab *tab, isl_int *p) -{ - int i; - int col; - - if (tab->n_var == 0) - return -1; - - for (i = tab->n_var - 1; i >= 0; --i) { - if (i >= tab->n_param && i < tab->n_var - tab->n_div) - continue; - if (tab->var[i].is_row) - continue; - col = tab->var[i].index; - if (!isl_int_is_zero(p[col])) - return col; - } - - return -1; -} - -/* Look through all the recently added equalities in the context - * to see if we can propagate any of them to the main tableau. - * - * The newly added equalities in the context are encoded as pairs - * of inequalities starting at inequality "first". - * - * We tentatively add each of these equalities to the main tableau - * and if this happens to result in a row with a final coefficient - * that is one or negative one, we use it to kill a column - * in the main tableau. Otherwise, we discard the tentatively - * added row. - */ -static void propagate_equalities(struct isl_context_gbr *cgbr, - struct isl_tab *tab, unsigned first) -{ - int i; - struct isl_vec *eq = NULL; - - eq = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!eq) - goto error; - - if (isl_tab_extend_cons(tab, (cgbr->tab->bmap->n_ineq - first)/2) < 0) - goto error; - - isl_seq_clr(eq->el + 1 + tab->n_param, - tab->n_var - tab->n_param - tab->n_div); - for (i = first; i < cgbr->tab->bmap->n_ineq; i += 2) { - int j; - int r; - struct isl_tab_undo *snap; - snap = isl_tab_snap(tab); - - isl_seq_cpy(eq->el, cgbr->tab->bmap->ineq[i], 1 + tab->n_param); - isl_seq_cpy(eq->el + 1 + tab->n_var - tab->n_div, - cgbr->tab->bmap->ineq[i] + 1 + tab->n_param, - tab->n_div); - - r = isl_tab_add_row(tab, eq->el); - if (r < 0) - goto error; - r = tab->con[r].index; - j = last_non_zero_var_col(tab, tab->mat->row[r] + 2 + tab->M); - if (j < 0 || j < tab->n_dead || - !isl_int_is_one(tab->mat->row[r][0]) || - (!isl_int_is_one(tab->mat->row[r][2 + tab->M + j]) && - !isl_int_is_negone(tab->mat->row[r][2 + tab->M + j]))) { - if (isl_tab_rollback(tab, snap) < 0) - goto error; - continue; - } - if (isl_tab_pivot(tab, r, j) < 0) - goto error; - if (isl_tab_kill_col(tab, j) < 0) - goto error; - - if (restore_lexmin(tab) < 0) - goto error; - } - - isl_vec_free(eq); - - return; -error: - isl_vec_free(eq); - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static int context_gbr_detect_equalities(struct isl_context *context, - struct isl_tab *tab) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_ctx *ctx; - unsigned n_ineq; - - ctx = cgbr->tab->mat->ctx; - - if (!cgbr->cone) { - struct isl_basic_set *bset = isl_tab_peek_bset(cgbr->tab); - cgbr->cone = isl_tab_from_recession_cone(bset, 0); - if (!cgbr->cone) - goto error; - if (isl_tab_track_bset(cgbr->cone, isl_basic_set_dup(bset)) < 0) - goto error; - } - if (isl_tab_detect_implicit_equalities(cgbr->cone) < 0) - goto error; - - n_ineq = cgbr->tab->bmap->n_ineq; - cgbr->tab = isl_tab_detect_equalities(cgbr->tab, cgbr->cone); - if (cgbr->tab && cgbr->tab->bmap->n_ineq > n_ineq) - propagate_equalities(cgbr, tab, n_ineq); - - return 0; -error: - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; - return -1; -} - -static int context_gbr_get_div(struct isl_context *context, struct isl_tab *tab, - struct isl_vec *div) -{ - return get_div(tab, context, div); -} - -static int context_gbr_add_div(struct isl_context *context, struct isl_vec *div) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (cgbr->cone) { - int k; - - if (isl_tab_extend_cons(cgbr->cone, 3) < 0) - return -1; - if (isl_tab_extend_vars(cgbr->cone, 1) < 0) - return -1; - if (isl_tab_allocate_var(cgbr->cone) <0) - return -1; - - cgbr->cone->bmap = isl_basic_map_extend_space(cgbr->cone->bmap, - isl_basic_map_get_space(cgbr->cone->bmap), 1, 0, 2); - k = isl_basic_map_alloc_div(cgbr->cone->bmap); - if (k < 0) - return -1; - isl_seq_cpy(cgbr->cone->bmap->div[k], div->el, div->size); - if (isl_tab_push(cgbr->cone, isl_tab_undo_bmap_div) < 0) - return -1; - } - return context_tab_add_div(cgbr->tab, div, - context_gbr_add_ineq_wrap, context); -} - -static int context_gbr_best_split(struct isl_context *context, - struct isl_tab *tab) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_tab_undo *snap; - int r; - - snap = isl_tab_snap(cgbr->tab); - r = best_split(tab, cgbr->tab); - - if (r >= 0 && isl_tab_rollback(cgbr->tab, snap) < 0) - return -1; - - return r; -} - -static int context_gbr_is_empty(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - if (!cgbr->tab) - return -1; - return cgbr->tab->empty; -} - -struct isl_gbr_tab_undo { - struct isl_tab_undo *tab_snap; - struct isl_tab_undo *shifted_snap; - struct isl_tab_undo *cone_snap; -}; - -static void *context_gbr_save(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_gbr_tab_undo *snap; - - snap = isl_alloc_type(cgbr->tab->mat->ctx, struct isl_gbr_tab_undo); - if (!snap) - return NULL; - - snap->tab_snap = isl_tab_snap(cgbr->tab); - if (isl_tab_save_samples(cgbr->tab) < 0) - goto error; - - if (cgbr->shifted) - snap->shifted_snap = isl_tab_snap(cgbr->shifted); - else - snap->shifted_snap = NULL; - - if (cgbr->cone) - snap->cone_snap = isl_tab_snap(cgbr->cone); - else - snap->cone_snap = NULL; - - return snap; -error: - free(snap); - return NULL; -} - -static void context_gbr_restore(struct isl_context *context, void *save) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - struct isl_gbr_tab_undo *snap = (struct isl_gbr_tab_undo *)save; - if (!snap) - goto error; - if (isl_tab_rollback(cgbr->tab, snap->tab_snap) < 0) { - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; - } - - if (snap->shifted_snap) { - if (isl_tab_rollback(cgbr->shifted, snap->shifted_snap) < 0) - goto error; - } else if (cgbr->shifted) { - isl_tab_free(cgbr->shifted); - cgbr->shifted = NULL; - } - - if (snap->cone_snap) { - if (isl_tab_rollback(cgbr->cone, snap->cone_snap) < 0) - goto error; - } else if (cgbr->cone) { - isl_tab_free(cgbr->cone); - cgbr->cone = NULL; - } - - free(snap); - - return; -error: - free(snap); - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static int context_gbr_is_ok(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - return !!cgbr->tab; -} - -static void context_gbr_invalidate(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - isl_tab_free(cgbr->tab); - cgbr->tab = NULL; -} - -static void context_gbr_free(struct isl_context *context) -{ - struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; - isl_tab_free(cgbr->tab); - isl_tab_free(cgbr->shifted); - isl_tab_free(cgbr->cone); - free(cgbr); -} - -struct isl_context_op isl_context_gbr_op = { - context_gbr_detect_nonnegative_parameters, - context_gbr_peek_basic_set, - context_gbr_peek_tab, - context_gbr_add_eq, - context_gbr_add_ineq, - context_gbr_ineq_sign, - context_gbr_test_ineq, - context_gbr_get_div, - context_gbr_add_div, - context_gbr_detect_equalities, - context_gbr_best_split, - context_gbr_is_empty, - context_gbr_is_ok, - context_gbr_save, - context_gbr_restore, - context_gbr_invalidate, - context_gbr_free, -}; - -static struct isl_context *isl_context_gbr_alloc(struct isl_basic_set *dom) -{ - struct isl_context_gbr *cgbr; - - if (!dom) - return NULL; - - cgbr = isl_calloc_type(dom->ctx, struct isl_context_gbr); - if (!cgbr) - return NULL; - - cgbr->context.op = &isl_context_gbr_op; - - cgbr->shifted = NULL; - cgbr->cone = NULL; - cgbr->tab = isl_tab_from_basic_set(dom); - cgbr->tab = isl_tab_init_samples(cgbr->tab); - if (!cgbr->tab) - goto error; - if (isl_tab_track_bset(cgbr->tab, - isl_basic_set_cow(isl_basic_set_copy(dom))) < 0) - goto error; - check_gbr_integer_feasible(cgbr); - - return &cgbr->context; -error: - cgbr->context.op->free(&cgbr->context); - return NULL; -} - -static struct isl_context *isl_context_alloc(struct isl_basic_set *dom) -{ - if (!dom) - return NULL; - - if (dom->ctx->opt->context == ISL_CONTEXT_LEXMIN) - return isl_context_lex_alloc(dom); - else - return isl_context_gbr_alloc(dom); -} - -/* Construct an isl_sol_map structure for accumulating the solution. - * If track_empty is set, then we also keep track of the parts - * of the context where there is no solution. - * If max is set, then we are solving a maximization, rather than - * a minimization problem, which means that the variables in the - * tableau have value "M - x" rather than "M + x". - */ -static struct isl_sol *sol_map_init(struct isl_basic_map *bmap, - struct isl_basic_set *dom, int track_empty, int max) -{ - struct isl_sol_map *sol_map = NULL; - - if (!bmap) - goto error; - - sol_map = isl_calloc_type(bmap->ctx, struct isl_sol_map); - if (!sol_map) - goto error; - - sol_map->sol.rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - sol_map->sol.dec_level.callback.run = &sol_dec_level_wrap; - sol_map->sol.dec_level.sol = &sol_map->sol; - sol_map->sol.max = max; - sol_map->sol.n_out = isl_basic_map_dim(bmap, isl_dim_out); - sol_map->sol.add = &sol_map_add_wrap; - sol_map->sol.add_empty = track_empty ? &sol_map_add_empty_wrap : NULL; - sol_map->sol.free = &sol_map_free_wrap; - sol_map->map = isl_map_alloc_space(isl_basic_map_get_space(bmap), 1, - ISL_MAP_DISJOINT); - if (!sol_map->map) - goto error; - - sol_map->sol.context = isl_context_alloc(dom); - if (!sol_map->sol.context) - goto error; - - if (track_empty) { - sol_map->empty = isl_set_alloc_space(isl_basic_set_get_space(dom), - 1, ISL_SET_DISJOINT); - if (!sol_map->empty) - goto error; - } - - isl_basic_set_free(dom); - return &sol_map->sol; -error: - isl_basic_set_free(dom); - sol_map_free(sol_map); - return NULL; -} - -/* Check whether all coefficients of (non-parameter) variables - * are non-positive, meaning that no pivots can be performed on the row. - */ -static int is_critical(struct isl_tab *tab, int row) -{ - int j; - unsigned off = 2 + tab->M; - - for (j = tab->n_dead; j < tab->n_col; ++j) { - if (tab->col_var[j] >= 0 && - (tab->col_var[j] < tab->n_param || - tab->col_var[j] >= tab->n_var - tab->n_div)) - continue; - - if (isl_int_is_pos(tab->mat->row[row][off + j])) - return 0; - } - - return 1; -} - -/* Check whether the inequality represented by vec is strict over the integers, - * i.e., there are no integer values satisfying the constraint with - * equality. This happens if the gcd of the coefficients is not a divisor - * of the constant term. If so, scale the constraint down by the gcd - * of the coefficients. - */ -static int is_strict(struct isl_vec *vec) -{ - isl_int gcd; - int strict = 0; - - isl_int_init(gcd); - isl_seq_gcd(vec->el + 1, vec->size - 1, &gcd); - if (!isl_int_is_one(gcd)) { - strict = !isl_int_is_divisible_by(vec->el[0], gcd); - isl_int_fdiv_q(vec->el[0], vec->el[0], gcd); - isl_seq_scale_down(vec->el + 1, vec->el + 1, gcd, vec->size-1); - } - isl_int_clear(gcd); - - return strict; -} - -/* Determine the sign of the given row of the main tableau. - * The result is one of - * isl_tab_row_pos: always non-negative; no pivot needed - * isl_tab_row_neg: always non-positive; pivot - * isl_tab_row_any: can be both positive and negative; split - * - * We first handle some simple cases - * - the row sign may be known already - * - the row may be obviously non-negative - * - the parametric constant may be equal to that of another row - * for which we know the sign. This sign will be either "pos" or - * "any". If it had been "neg" then we would have pivoted before. - * - * If none of these cases hold, we check the value of the row for each - * of the currently active samples. Based on the signs of these values - * we make an initial determination of the sign of the row. - * - * all zero -> unk(nown) - * all non-negative -> pos - * all non-positive -> neg - * both negative and positive -> all - * - * If we end up with "all", we are done. - * Otherwise, we perform a check for positive and/or negative - * values as follows. - * - * samples neg unk pos - * <0 ? Y N Y N - * pos any pos - * >0 ? Y N Y N - * any neg any neg - * - * There is no special sign for "zero", because we can usually treat zero - * as either non-negative or non-positive, whatever works out best. - * However, if the row is "critical", meaning that pivoting is impossible - * then we don't want to limp zero with the non-positive case, because - * then we we would lose the solution for those values of the parameters - * where the value of the row is zero. Instead, we treat 0 as non-negative - * ensuring a split if the row can attain both zero and negative values. - * The same happens when the original constraint was one that could not - * be satisfied with equality by any integer values of the parameters. - * In this case, we normalize the constraint, but then a value of zero - * for the normalized constraint is actually a positive value for the - * original constraint, so again we need to treat zero as non-negative. - * In both these cases, we have the following decision tree instead: - * - * all non-negative -> pos - * all negative -> neg - * both negative and non-negative -> all - * - * samples neg pos - * <0 ? Y N - * any pos - * >=0 ? Y N - * any neg - */ -static enum isl_tab_row_sign row_sign(struct isl_tab *tab, - struct isl_sol *sol, int row) -{ - struct isl_vec *ineq = NULL; - enum isl_tab_row_sign res = isl_tab_row_unknown; - int critical; - int strict; - int row2; - - if (tab->row_sign[row] != isl_tab_row_unknown) - return tab->row_sign[row]; - if (is_obviously_nonneg(tab, row)) - return isl_tab_row_pos; - for (row2 = tab->n_redundant; row2 < tab->n_row; ++row2) { - if (tab->row_sign[row2] == isl_tab_row_unknown) - continue; - if (identical_parameter_line(tab, row, row2)) - return tab->row_sign[row2]; - } - - critical = is_critical(tab, row); - - ineq = get_row_parameter_ineq(tab, row); - if (!ineq) - goto error; - - strict = is_strict(ineq); - - res = sol->context->op->ineq_sign(sol->context, ineq->el, - critical || strict); - - if (res == isl_tab_row_unknown || res == isl_tab_row_pos) { - /* test for negative values */ - int feasible; - isl_seq_neg(ineq->el, ineq->el, ineq->size); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - feasible = sol->context->op->test_ineq(sol->context, ineq->el); - if (feasible < 0) - goto error; - if (!feasible) - res = isl_tab_row_pos; - else - res = (res == isl_tab_row_unknown) ? isl_tab_row_neg - : isl_tab_row_any; - if (res == isl_tab_row_neg) { - isl_seq_neg(ineq->el, ineq->el, ineq->size); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - } - } - - if (res == isl_tab_row_neg) { - /* test for positive values */ - int feasible; - if (!critical && !strict) - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - feasible = sol->context->op->test_ineq(sol->context, ineq->el); - if (feasible < 0) - goto error; - if (feasible) - res = isl_tab_row_any; - } - - isl_vec_free(ineq); - return res; -error: - isl_vec_free(ineq); - return isl_tab_row_unknown; -} - -static void find_solutions(struct isl_sol *sol, struct isl_tab *tab); - -/* Find solutions for values of the parameters that satisfy the given - * inequality. - * - * We currently take a snapshot of the context tableau that is reset - * when we return from this function, while we make a copy of the main - * tableau, leaving the original main tableau untouched. - * These are fairly arbitrary choices. Making a copy also of the context - * tableau would obviate the need to undo any changes made to it later, - * while taking a snapshot of the main tableau could reduce memory usage. - * If we were to switch to taking a snapshot of the main tableau, - * we would have to keep in mind that we need to save the row signs - * and that we need to do this before saving the current basis - * such that the basis has been restore before we restore the row signs. - */ -static void find_in_pos(struct isl_sol *sol, struct isl_tab *tab, isl_int *ineq) -{ - void *saved; - - if (!sol->context) - goto error; - saved = sol->context->op->save(sol->context); - - tab = isl_tab_dup(tab); - if (!tab) - goto error; - - sol->context->op->add_ineq(sol->context, ineq, 0, 1); - - find_solutions(sol, tab); - - if (!sol->error) - sol->context->op->restore(sol->context, saved); - return; -error: - sol->error = 1; -} - -/* Record the absence of solutions for those values of the parameters - * that do not satisfy the given inequality with equality. - */ -static void no_sol_in_strict(struct isl_sol *sol, - struct isl_tab *tab, struct isl_vec *ineq) -{ - int empty; - void *saved; - - if (!sol->context || sol->error) - goto error; - saved = sol->context->op->save(sol->context); - - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - - sol->context->op->add_ineq(sol->context, ineq->el, 1, 0); - if (!sol->context) - goto error; - - empty = tab->empty; - tab->empty = 1; - sol_add(sol, tab); - tab->empty = empty; - - isl_int_add_ui(ineq->el[0], ineq->el[0], 1); - - sol->context->op->restore(sol->context, saved); - return; -error: - sol->error = 1; -} - -/* Compute the lexicographic minimum of the set represented by the main - * tableau "tab" within the context "sol->context_tab". - * On entry the sample value of the main tableau is lexicographically - * less than or equal to this lexicographic minimum. - * Pivots are performed until a feasible point is found, which is then - * necessarily equal to the minimum, or until the tableau is found to - * be infeasible. Some pivots may need to be performed for only some - * feasible values of the context tableau. If so, the context tableau - * is split into a part where the pivot is needed and a part where it is not. - * - * Whenever we enter the main loop, the main tableau is such that no - * "obvious" pivots need to be performed on it, where "obvious" means - * that the given row can be seen to be negative without looking at - * the context tableau. In particular, for non-parametric problems, - * no pivots need to be performed on the main tableau. - * The caller of find_solutions is responsible for making this property - * hold prior to the first iteration of the loop, while restore_lexmin - * is called before every other iteration. - * - * Inside the main loop, we first examine the signs of the rows of - * the main tableau within the context of the context tableau. - * If we find a row that is always non-positive for all values of - * the parameters satisfying the context tableau and negative for at - * least one value of the parameters, we perform the appropriate pivot - * and start over. An exception is the case where no pivot can be - * performed on the row. In this case, we require that the sign of - * the row is negative for all values of the parameters (rather than just - * non-positive). This special case is handled inside row_sign, which - * will say that the row can have any sign if it determines that it can - * attain both negative and zero values. - * - * If we can't find a row that always requires a pivot, but we can find - * one or more rows that require a pivot for some values of the parameters - * (i.e., the row can attain both positive and negative signs), then we split - * the context tableau into two parts, one where we force the sign to be - * non-negative and one where we force is to be negative. - * The non-negative part is handled by a recursive call (through find_in_pos). - * Upon returning from this call, we continue with the negative part and - * perform the required pivot. - * - * If no such rows can be found, all rows are non-negative and we have - * found a (rational) feasible point. If we only wanted a rational point - * then we are done. - * Otherwise, we check if all values of the sample point of the tableau - * are integral for the variables. If so, we have found the minimal - * integral point and we are done. - * If the sample point is not integral, then we need to make a distinction - * based on whether the constant term is non-integral or the coefficients - * of the parameters. Furthermore, in order to decide how to handle - * the non-integrality, we also need to know whether the coefficients - * of the other columns in the tableau are integral. This leads - * to the following table. The first two rows do not correspond - * to a non-integral sample point and are only mentioned for completeness. - * - * constant parameters other - * - * int int int | - * int int rat | -> no problem - * - * rat int int -> fail - * - * rat int rat -> cut - * - * int rat rat | - * rat rat rat | -> parametric cut - * - * int rat int | - * rat rat int | -> split context - * - * If the parametric constant is completely integral, then there is nothing - * to be done. If the constant term is non-integral, but all the other - * coefficient are integral, then there is nothing that can be done - * and the tableau has no integral solution. - * If, on the other hand, one or more of the other columns have rational - * coefficients, but the parameter coefficients are all integral, then - * we can perform a regular (non-parametric) cut. - * Finally, if there is any parameter coefficient that is non-integral, - * then we need to involve the context tableau. There are two cases here. - * If at least one other column has a rational coefficient, then we - * can perform a parametric cut in the main tableau by adding a new - * integer division in the context tableau. - * If all other columns have integral coefficients, then we need to - * enforce that the rational combination of parameters (c + \sum a_i y_i)/m - * is always integral. We do this by introducing an integer division - * q = floor((c + \sum a_i y_i)/m) and stipulating that its argument should - * always be integral in the context tableau, i.e., m q = c + \sum a_i y_i. - * Since q is expressed in the tableau as - * c + \sum a_i y_i - m q >= 0 - * -c - \sum a_i y_i + m q + m - 1 >= 0 - * it is sufficient to add the inequality - * -c - \sum a_i y_i + m q >= 0 - * In the part of the context where this inequality does not hold, the - * main tableau is marked as being empty. - */ -static void find_solutions(struct isl_sol *sol, struct isl_tab *tab) -{ - struct isl_context *context; - int r; - - if (!tab || sol->error) - goto error; - - context = sol->context; - - if (tab->empty) - goto done; - if (context->op->is_empty(context)) - goto done; - - for (r = 0; r >= 0 && tab && !tab->empty; r = restore_lexmin(tab)) { - int flags; - int row; - enum isl_tab_row_sign sgn; - int split = -1; - int n_split = 0; - - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - sgn = row_sign(tab, sol, row); - if (!sgn) - goto error; - tab->row_sign[row] = sgn; - if (sgn == isl_tab_row_any) - n_split++; - if (sgn == isl_tab_row_any && split == -1) - split = row; - if (sgn == isl_tab_row_neg) - break; - } - if (row < tab->n_row) - continue; - if (split != -1) { - struct isl_vec *ineq; - if (n_split != 1) - split = context->op->best_split(context, tab); - if (split < 0) - goto error; - ineq = get_row_parameter_ineq(tab, split); - if (!ineq) - goto error; - is_strict(ineq); - for (row = tab->n_redundant; row < tab->n_row; ++row) { - if (!isl_tab_var_from_row(tab, row)->is_nonneg) - continue; - if (tab->row_sign[row] == isl_tab_row_any) - tab->row_sign[row] = isl_tab_row_unknown; - } - tab->row_sign[split] = isl_tab_row_pos; - sol_inc_level(sol); - find_in_pos(sol, tab, ineq->el); - tab->row_sign[split] = isl_tab_row_neg; - row = split; - isl_seq_neg(ineq->el, ineq->el, ineq->size); - isl_int_sub_ui(ineq->el[0], ineq->el[0], 1); - if (!sol->error) - context->op->add_ineq(context, ineq->el, 0, 1); - isl_vec_free(ineq); - if (sol->error) - goto error; - continue; - } - if (tab->rational) - break; - row = first_non_integer_row(tab, &flags); - if (row < 0) - break; - if (ISL_FL_ISSET(flags, I_PAR)) { - if (ISL_FL_ISSET(flags, I_VAR)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - break; - } - row = add_cut(tab, row); - } else if (ISL_FL_ISSET(flags, I_VAR)) { - struct isl_vec *div; - struct isl_vec *ineq; - int d; - div = get_row_split_div(tab, row); - if (!div) - goto error; - d = context->op->get_div(context, tab, div); - isl_vec_free(div); - if (d < 0) - goto error; - ineq = ineq_for_div(context->op->peek_basic_set(context), d); - if (!ineq) - goto error; - sol_inc_level(sol); - no_sol_in_strict(sol, tab, ineq); - isl_seq_neg(ineq->el, ineq->el, ineq->size); - context->op->add_ineq(context, ineq->el, 1, 1); - isl_vec_free(ineq); - if (sol->error || !context->op->is_ok(context)) - goto error; - tab = set_row_cst_to_div(tab, row, d); - if (context->op->is_empty(context)) - break; - } else - row = add_parametric_cut(tab, row, context); - if (row < 0) - goto error; - } - if (r < 0) - goto error; -done: - sol_add(sol, tab); - isl_tab_free(tab); - return; -error: - isl_tab_free(tab); - sol->error = 1; -} - -/* Compute the lexicographic minimum of the set represented by the main - * tableau "tab" within the context "sol->context_tab". - * - * As a preprocessing step, we first transfer all the purely parametric - * equalities from the main tableau to the context tableau, i.e., - * parameters that have been pivoted to a row. - * These equalities are ignored by the main algorithm, because the - * corresponding rows may not be marked as being non-negative. - * In parts of the context where the added equality does not hold, - * the main tableau is marked as being empty. - */ -static void find_solutions_main(struct isl_sol *sol, struct isl_tab *tab) -{ - int row; - - if (!tab) - goto error; - - sol->level = 0; - - for (row = tab->n_redundant; row < tab->n_row; ++row) { - int p; - struct isl_vec *eq; - - if (tab->row_var[row] < 0) - continue; - if (tab->row_var[row] >= tab->n_param && - tab->row_var[row] < tab->n_var - tab->n_div) - continue; - if (tab->row_var[row] < tab->n_param) - p = tab->row_var[row]; - else - p = tab->row_var[row] - + tab->n_param - (tab->n_var - tab->n_div); - - eq = isl_vec_alloc(tab->mat->ctx, 1+tab->n_param+tab->n_div); - if (!eq) - goto error; - get_row_parameter_line(tab, row, eq->el); - isl_int_neg(eq->el[1 + p], tab->mat->row[row][0]); - eq = isl_vec_normalize(eq); - - sol_inc_level(sol); - no_sol_in_strict(sol, tab, eq); - - isl_seq_neg(eq->el, eq->el, eq->size); - sol_inc_level(sol); - no_sol_in_strict(sol, tab, eq); - isl_seq_neg(eq->el, eq->el, eq->size); - - sol->context->op->add_eq(sol->context, eq->el, 1, 1); - - isl_vec_free(eq); - - if (isl_tab_mark_redundant(tab, row) < 0) - goto error; - - if (sol->context->op->is_empty(sol->context)) - break; - - row = tab->n_redundant - 1; - } - - find_solutions(sol, tab); - - sol->level = 0; - sol_pop(sol); - - return; -error: - isl_tab_free(tab); - sol->error = 1; -} - -/* Check if integer division "div" of "dom" also occurs in "bmap". - * If so, return its position within the divs. - * If not, return -1. - */ -static int find_context_div(struct isl_basic_map *bmap, - struct isl_basic_set *dom, unsigned div) -{ - int i; - unsigned b_dim = isl_space_dim(bmap->dim, isl_dim_all); - unsigned d_dim = isl_space_dim(dom->dim, isl_dim_all); - - if (isl_int_is_zero(dom->div[div][0])) - return -1; - if (isl_seq_first_non_zero(dom->div[div] + 2 + d_dim, dom->n_div) != -1) - return -1; - - for (i = 0; i < bmap->n_div; ++i) { - if (isl_int_is_zero(bmap->div[i][0])) - continue; - if (isl_seq_first_non_zero(bmap->div[i] + 2 + d_dim, - (b_dim - d_dim) + bmap->n_div) != -1) - continue; - if (isl_seq_eq(bmap->div[i], dom->div[div], 2 + d_dim)) - return i; - } - return -1; -} - -/* The correspondence between the variables in the main tableau, - * the context tableau, and the input map and domain is as follows. - * The first n_param and the last n_div variables of the main tableau - * form the variables of the context tableau. - * In the basic map, these n_param variables correspond to the - * parameters and the input dimensions. In the domain, they correspond - * to the parameters and the set dimensions. - * The n_div variables correspond to the integer divisions in the domain. - * To ensure that everything lines up, we may need to copy some of the - * integer divisions of the domain to the map. These have to be placed - * in the same order as those in the context and they have to be placed - * after any other integer divisions that the map may have. - * This function performs the required reordering. - */ -static struct isl_basic_map *align_context_divs(struct isl_basic_map *bmap, - struct isl_basic_set *dom) -{ - int i; - int common = 0; - int other; - - for (i = 0; i < dom->n_div; ++i) - if (find_context_div(bmap, dom, i) != -1) - common++; - other = bmap->n_div - common; - if (dom->n_div - common > 0) { - bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim), - dom->n_div - common, 0, 0); - if (!bmap) - return NULL; - } - for (i = 0; i < dom->n_div; ++i) { - int pos = find_context_div(bmap, dom, i); - if (pos < 0) { - pos = isl_basic_map_alloc_div(bmap); - if (pos < 0) - goto error; - isl_int_set_si(bmap->div[pos][0], 0); - } - if (pos != other + i) - isl_basic_map_swap_div(bmap, pos, other + i); - } - return bmap; -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Base case of isl_tab_basic_map_partial_lexopt, after removing - * some obvious symmetries. - * - * We make sure the divs in the domain are properly ordered, - * because they will be added one by one in the given order - * during the construction of the solution map. - */ -static struct isl_sol *basic_map_partial_lexopt_base( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, - struct isl_sol *(*init)(__isl_keep isl_basic_map *bmap, - __isl_take isl_basic_set *dom, int track_empty, int max)) -{ - struct isl_tab *tab; - struct isl_sol *sol = NULL; - struct isl_context *context; - - if (dom->n_div) { - dom = isl_basic_set_order_divs(dom); - bmap = align_context_divs(bmap, dom); - } - sol = init(bmap, dom, !!empty, max); - if (!sol) - goto error; - - context = sol->context; - if (isl_basic_set_plain_is_empty(context->op->peek_basic_set(context))) - /* nothing */; - else if (isl_basic_map_plain_is_empty(bmap)) { - if (sol->add_empty) - sol->add_empty(sol, - isl_basic_set_copy(context->op->peek_basic_set(context))); - } else { - tab = tab_for_lexmin(bmap, - context->op->peek_basic_set(context), 1, max); - tab = context->op->detect_nonnegative_parameters(context, tab); - find_solutions_main(sol, tab); - } - if (sol->error) - goto error; - - isl_basic_map_free(bmap); - return sol; -error: - sol_free(sol); - isl_basic_map_free(bmap); - return NULL; -} - -/* Base case of isl_tab_basic_map_partial_lexopt, after removing - * some obvious symmetries. - * - * We call basic_map_partial_lexopt_base and extract the results. - */ -static __isl_give isl_map *basic_map_partial_lexopt_base_map( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - isl_map *result = NULL; - struct isl_sol *sol; - struct isl_sol_map *sol_map; - - sol = basic_map_partial_lexopt_base(bmap, dom, empty, max, - &sol_map_init); - if (!sol) - return NULL; - sol_map = (struct isl_sol_map *) sol; - - result = isl_map_copy(sol_map->map); - if (empty) - *empty = isl_set_copy(sol_map->empty); - sol_free(&sol_map->sol); - return result; -} - -/* Structure used during detection of parallel constraints. - * n_in: number of "input" variables: isl_dim_param + isl_dim_in - * n_out: number of "output" variables: isl_dim_out + isl_dim_div - * val: the coefficients of the output variables - */ -struct isl_constraint_equal_info { - isl_basic_map *bmap; - unsigned n_in; - unsigned n_out; - isl_int *val; -}; - -/* Check whether the coefficients of the output variables - * of the constraint in "entry" are equal to info->val. - */ -static int constraint_equal(const void *entry, const void *val) -{ - isl_int **row = (isl_int **)entry; - const struct isl_constraint_equal_info *info = val; - - return isl_seq_eq((*row) + 1 + info->n_in, info->val, info->n_out); -} - -/* Check whether "bmap" has a pair of constraints that have - * the same coefficients for the output variables. - * Note that the coefficients of the existentially quantified - * variables need to be zero since the existentially quantified - * of the result are usually not the same as those of the input. - * the isl_dim_out and isl_dim_div dimensions. - * If so, return 1 and return the row indices of the two constraints - * in *first and *second. - */ -static int parallel_constraints(__isl_keep isl_basic_map *bmap, - int *first, int *second) -{ - int i; - isl_ctx *ctx = isl_basic_map_get_ctx(bmap); - struct isl_hash_table *table = NULL; - struct isl_hash_table_entry *entry; - struct isl_constraint_equal_info info; - unsigned n_out; - unsigned n_div; - - ctx = isl_basic_map_get_ctx(bmap); - table = isl_hash_table_alloc(ctx, bmap->n_ineq); - if (!table) - goto error; - - info.n_in = isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in); - info.bmap = bmap; - n_out = isl_basic_map_dim(bmap, isl_dim_out); - n_div = isl_basic_map_dim(bmap, isl_dim_div); - info.n_out = n_out + n_div; - for (i = 0; i < bmap->n_ineq; ++i) { - uint32_t hash; - - info.val = bmap->ineq[i] + 1 + info.n_in; - if (isl_seq_first_non_zero(info.val, n_out) < 0) - continue; - if (isl_seq_first_non_zero(info.val + n_out, n_div) >= 0) - continue; - hash = isl_seq_get_hash(info.val, info.n_out); - entry = isl_hash_table_find(ctx, table, hash, - constraint_equal, &info, 1); - if (!entry) - goto error; - if (entry->data) - break; - entry->data = &bmap->ineq[i]; - } - - if (i < bmap->n_ineq) { - *first = ((isl_int **)entry->data) - bmap->ineq; - *second = i; - } - - isl_hash_table_free(ctx, table); - - return i < bmap->n_ineq; -error: - isl_hash_table_free(ctx, table); - return -1; -} - -/* Given a set of upper bounds in "var", add constraints to "bset" - * that make the i-th bound smallest. - * - * In particular, if there are n bounds b_i, then add the constraints - * - * b_i <= b_j for j > i - * b_i < b_j for j < i - */ -static __isl_give isl_basic_set *select_minimum(__isl_take isl_basic_set *bset, - __isl_keep isl_mat *var, int i) -{ - isl_ctx *ctx; - int j, k; - - ctx = isl_mat_get_ctx(var); - - for (j = 0; j < var->n_row; ++j) { - if (j == i) - continue; - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_combine(bset->ineq[k], ctx->one, var->row[j], - ctx->negone, var->row[i], var->n_col); - isl_int_set_si(bset->ineq[k][var->n_col], 0); - if (j < i) - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - } - - bset = isl_basic_set_finalize(bset); - - return bset; -error: - isl_basic_set_free(bset); - return NULL; -} - -/* Given a set of upper bounds on the last "input" variable m, - * construct a set that assigns the minimal upper bound to m, i.e., - * construct a set that divides the space into cells where one - * of the upper bounds is smaller than all the others and assign - * this upper bound to m. - * - * In particular, if there are n bounds b_i, then the result - * consists of n basic sets, each one of the form - * - * m = b_i - * b_i <= b_j for j > i - * b_i < b_j for j < i - */ -static __isl_give isl_set *set_minimum(__isl_take isl_space *dim, - __isl_take isl_mat *var) -{ - int i, k; - isl_basic_set *bset = NULL; - isl_ctx *ctx; - isl_set *set = NULL; - - if (!dim || !var) - goto error; - - ctx = isl_space_get_ctx(dim); - set = isl_set_alloc_space(isl_space_copy(dim), - var->n_row, ISL_SET_DISJOINT); - - for (i = 0; i < var->n_row; ++i) { - bset = isl_basic_set_alloc_space(isl_space_copy(dim), 0, - 1, var->n_row - 1); - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - isl_seq_cpy(bset->eq[k], var->row[i], var->n_col); - isl_int_set_si(bset->eq[k][var->n_col], -1); - bset = select_minimum(bset, var, i); - set = isl_set_add_basic_set(set, bset); - } - - isl_space_free(dim); - isl_mat_free(var); - return set; -error: - isl_basic_set_free(bset); - isl_set_free(set); - isl_space_free(dim); - isl_mat_free(var); - return NULL; -} - -/* Given that the last input variable of "bmap" represents the minimum - * of the bounds in "cst", check whether we need to split the domain - * based on which bound attains the minimum. - * - * A split is needed when the minimum appears in an integer division - * or in an equality. Otherwise, it is only needed if it appears in - * an upper bound that is different from the upper bounds on which it - * is defined. - */ -static int need_split_basic_map(__isl_keep isl_basic_map *bmap, - __isl_keep isl_mat *cst) -{ - int i, j; - unsigned total; - unsigned pos; - - pos = cst->n_col - 1; - total = isl_basic_map_dim(bmap, isl_dim_all); - - for (i = 0; i < bmap->n_div; ++i) - if (!isl_int_is_zero(bmap->div[i][2 + pos])) - return 1; - - for (i = 0; i < bmap->n_eq; ++i) - if (!isl_int_is_zero(bmap->eq[i][1 + pos])) - return 1; - - for (i = 0; i < bmap->n_ineq; ++i) { - if (isl_int_is_nonneg(bmap->ineq[i][1 + pos])) - continue; - if (!isl_int_is_negone(bmap->ineq[i][1 + pos])) - return 1; - if (isl_seq_first_non_zero(bmap->ineq[i] + 1 + pos + 1, - total - pos - 1) >= 0) - return 1; - - for (j = 0; j < cst->n_row; ++j) - if (isl_seq_eq(bmap->ineq[i], cst->row[j], cst->n_col)) - break; - if (j >= cst->n_row) - return 1; - } - - return 0; -} - -/* Given that the last set variable of "bset" represents the minimum - * of the bounds in "cst", check whether we need to split the domain - * based on which bound attains the minimum. - * - * We simply call need_split_basic_map here. This is safe because - * the position of the minimum is computed from "cst" and not - * from "bmap". - */ -static int need_split_basic_set(__isl_keep isl_basic_set *bset, - __isl_keep isl_mat *cst) -{ - return need_split_basic_map((isl_basic_map *)bset, cst); -} - -/* Given that the last set variable of "set" represents the minimum - * of the bounds in "cst", check whether we need to split the domain - * based on which bound attains the minimum. - */ -static int need_split_set(__isl_keep isl_set *set, __isl_keep isl_mat *cst) -{ - int i; - - for (i = 0; i < set->n; ++i) - if (need_split_basic_set(set->p[i], cst)) - return 1; - - return 0; -} - -/* Given a set of which the last set variable is the minimum - * of the bounds in "cst", split each basic set in the set - * in pieces where one of the bounds is (strictly) smaller than the others. - * This subdivision is given in "min_expr". - * The variable is subsequently projected out. - * - * We only do the split when it is needed. - * For example if the last input variable m = min(a,b) and the only - * constraints in the given basic set are lower bounds on m, - * i.e., l <= m = min(a,b), then we can simply project out m - * to obtain l <= a and l <= b, without having to split on whether - * m is equal to a or b. - */ -static __isl_give isl_set *split(__isl_take isl_set *empty, - __isl_take isl_set *min_expr, __isl_take isl_mat *cst) -{ - int n_in; - int i; - isl_space *dim; - isl_set *res; - - if (!empty || !min_expr || !cst) - goto error; - - n_in = isl_set_dim(empty, isl_dim_set); - dim = isl_set_get_space(empty); - dim = isl_space_drop_dims(dim, isl_dim_set, n_in - 1, 1); - res = isl_set_empty(dim); - - for (i = 0; i < empty->n; ++i) { - isl_set *set; - - set = isl_set_from_basic_set(isl_basic_set_copy(empty->p[i])); - if (need_split_basic_set(empty->p[i], cst)) - set = isl_set_intersect(set, isl_set_copy(min_expr)); - set = isl_set_remove_dims(set, isl_dim_set, n_in - 1, 1); - - res = isl_set_union_disjoint(res, set); - } - - isl_set_free(empty); - isl_set_free(min_expr); - isl_mat_free(cst); - return res; -error: - isl_set_free(empty); - isl_set_free(min_expr); - isl_mat_free(cst); - return NULL; -} - -/* Given a map of which the last input variable is the minimum - * of the bounds in "cst", split each basic set in the set - * in pieces where one of the bounds is (strictly) smaller than the others. - * This subdivision is given in "min_expr". - * The variable is subsequently projected out. - * - * The implementation is essentially the same as that of "split". - */ -static __isl_give isl_map *split_domain(__isl_take isl_map *opt, - __isl_take isl_set *min_expr, __isl_take isl_mat *cst) -{ - int n_in; - int i; - isl_space *dim; - isl_map *res; - - if (!opt || !min_expr || !cst) - goto error; - - n_in = isl_map_dim(opt, isl_dim_in); - dim = isl_map_get_space(opt); - dim = isl_space_drop_dims(dim, isl_dim_in, n_in - 1, 1); - res = isl_map_empty(dim); - - for (i = 0; i < opt->n; ++i) { - isl_map *map; - - map = isl_map_from_basic_map(isl_basic_map_copy(opt->p[i])); - if (need_split_basic_map(opt->p[i], cst)) - map = isl_map_intersect_domain(map, - isl_set_copy(min_expr)); - map = isl_map_remove_dims(map, isl_dim_in, n_in - 1, 1); - - res = isl_map_union_disjoint(res, map); - } - - isl_map_free(opt); - isl_set_free(min_expr); - isl_mat_free(cst); - return res; -error: - isl_map_free(opt); - isl_set_free(min_expr); - isl_mat_free(cst); - return NULL; -} - -static __isl_give isl_map *basic_map_partial_lexopt( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max); - -union isl_lex_res { - void *p; - isl_map *map; - isl_pw_multi_aff *pma; -}; - -/* This function is called from basic_map_partial_lexopt_symm. - * The last variable of "bmap" and "dom" corresponds to the minimum - * of the bounds in "cst". "map_space" is the space of the original - * input relation (of basic_map_partial_lexopt_symm) and "set_space" - * is the space of the original domain. - * - * We recursively call basic_map_partial_lexopt and then plug in - * the definition of the minimum in the result. - */ -static __isl_give union isl_lex_res basic_map_partial_lexopt_symm_map_core( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, __isl_take isl_mat *cst, - __isl_take isl_space *map_space, __isl_take isl_space *set_space) -{ - isl_map *opt; - isl_set *min_expr; - union isl_lex_res res; - - min_expr = set_minimum(isl_basic_set_get_space(dom), isl_mat_copy(cst)); - - opt = basic_map_partial_lexopt(bmap, dom, empty, max); - - if (empty) { - *empty = split(*empty, - isl_set_copy(min_expr), isl_mat_copy(cst)); - *empty = isl_set_reset_space(*empty, set_space); - } - - opt = split_domain(opt, min_expr, cst); - opt = isl_map_reset_space(opt, map_space); - - res.map = opt; - return res; -} - -/* Given a basic map with at least two parallel constraints (as found - * by the function parallel_constraints), first look for more constraints - * parallel to the two constraint and replace the found list of parallel - * constraints by a single constraint with as "input" part the minimum - * of the input parts of the list of constraints. Then, recursively call - * basic_map_partial_lexopt (possibly finding more parallel constraints) - * and plug in the definition of the minimum in the result. - * - * More specifically, given a set of constraints - * - * a x + b_i(p) >= 0 - * - * Replace this set by a single constraint - * - * a x + u >= 0 - * - * with u a new parameter with constraints - * - * u <= b_i(p) - * - * Any solution to the new system is also a solution for the original system - * since - * - * a x >= -u >= -b_i(p) - * - * Moreover, m = min_i(b_i(p)) satisfies the constraints on u and can - * therefore be plugged into the solution. - */ -static union isl_lex_res basic_map_partial_lexopt_symm( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, int first, int second, - __isl_give union isl_lex_res (*core)(__isl_take isl_basic_map *bmap, - __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, - int max, __isl_take isl_mat *cst, - __isl_take isl_space *map_space, - __isl_take isl_space *set_space)) -{ - int i, n, k; - int *list = NULL; - unsigned n_in, n_out, n_div; - isl_ctx *ctx; - isl_vec *var = NULL; - isl_mat *cst = NULL; - isl_space *map_space, *set_space; - union isl_lex_res res; - - map_space = isl_basic_map_get_space(bmap); - set_space = empty ? isl_basic_set_get_space(dom) : NULL; - - n_in = isl_basic_map_dim(bmap, isl_dim_param) + - isl_basic_map_dim(bmap, isl_dim_in); - n_out = isl_basic_map_dim(bmap, isl_dim_all) - n_in; - - ctx = isl_basic_map_get_ctx(bmap); - list = isl_alloc_array(ctx, int, bmap->n_ineq); - var = isl_vec_alloc(ctx, n_out); - if (!list || !var) - goto error; - - list[0] = first; - list[1] = second; - isl_seq_cpy(var->el, bmap->ineq[first] + 1 + n_in, n_out); - for (i = second + 1, n = 2; i < bmap->n_ineq; ++i) { - if (isl_seq_eq(var->el, bmap->ineq[i] + 1 + n_in, n_out)) - list[n++] = i; - } - - cst = isl_mat_alloc(ctx, n, 1 + n_in); - if (!cst) - goto error; - - for (i = 0; i < n; ++i) - isl_seq_cpy(cst->row[i], bmap->ineq[list[i]], 1 + n_in); - - bmap = isl_basic_map_cow(bmap); - if (!bmap) - goto error; - for (i = n - 1; i >= 0; --i) - if (isl_basic_map_drop_inequality(bmap, list[i]) < 0) - goto error; - - bmap = isl_basic_map_add(bmap, isl_dim_in, 1); - bmap = isl_basic_map_extend_constraints(bmap, 0, 1); - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], 1 + n_in); - isl_int_set_si(bmap->ineq[k][1 + n_in], 1); - isl_seq_cpy(bmap->ineq[k] + 1 + n_in + 1, var->el, n_out); - bmap = isl_basic_map_finalize(bmap); - - n_div = isl_basic_set_dim(dom, isl_dim_div); - dom = isl_basic_set_add(dom, isl_dim_set, 1); - dom = isl_basic_set_extend_constraints(dom, 0, n); - for (i = 0; i < n; ++i) { - k = isl_basic_set_alloc_inequality(dom); - if (k < 0) - goto error; - isl_seq_cpy(dom->ineq[k], cst->row[i], 1 + n_in); - isl_int_set_si(dom->ineq[k][1 + n_in], -1); - isl_seq_clr(dom->ineq[k] + 1 + n_in + 1, n_div); - } - - isl_vec_free(var); - free(list); - - return core(bmap, dom, empty, max, cst, map_space, set_space); -error: - isl_space_free(map_space); - isl_space_free(set_space); - isl_mat_free(cst); - isl_vec_free(var); - free(list); - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - res.p = NULL; - return res; -} - -static __isl_give isl_map *basic_map_partial_lexopt_symm_map( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, int first, int second) -{ - return basic_map_partial_lexopt_symm(bmap, dom, empty, max, - first, second, &basic_map_partial_lexopt_symm_map_core).map; -} - -/* Recursive part of isl_tab_basic_map_partial_lexopt, after detecting - * equalities and removing redundant constraints. - * - * We first check if there are any parallel constraints (left). - * If not, we are in the base case. - * If there are parallel constraints, we replace them by a single - * constraint in basic_map_partial_lexopt_symm and then call - * this function recursively to look for more parallel constraints. - */ -static __isl_give isl_map *basic_map_partial_lexopt( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - int par = 0; - int first, second; - - if (!bmap) - goto error; - - if (bmap->ctx->opt->pip_symmetry) - par = parallel_constraints(bmap, &first, &second); - if (par < 0) - goto error; - if (!par) - return basic_map_partial_lexopt_base_map(bmap, dom, empty, max); - - return basic_map_partial_lexopt_symm_map(bmap, dom, empty, max, - first, second); -error: - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -/* Compute the lexicographic minimum (or maximum if "max" is set) - * of "bmap" over the domain "dom" and return the result as a map. - * If "empty" is not NULL, then *empty is assigned a set that - * contains those parts of the domain where there is no solution. - * If "bmap" is marked as rational (ISL_BASIC_MAP_RATIONAL), - * then we compute the rational optimum. Otherwise, we compute - * the integral optimum. - * - * We perform some preprocessing. As the PILP solver does not - * handle implicit equalities very well, we first make sure all - * the equalities are explicitly available. - * - * We also add context constraints to the basic map and remove - * redundant constraints. This is only needed because of the - * way we handle simple symmetries. In particular, we currently look - * for symmetries on the constraints, before we set up the main tableau. - * It is then no good to look for symmetries on possibly redundant constraints. - */ -struct isl_map *isl_tab_basic_map_partial_lexopt( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty, int max) -{ - if (empty) - *empty = NULL; - if (!bmap || !dom) - goto error; - - isl_assert(bmap->ctx, - isl_basic_map_compatible_domain(bmap, dom), goto error); - - if (isl_basic_set_dim(dom, isl_dim_all) == 0) - return basic_map_partial_lexopt(bmap, dom, empty, max); - - bmap = isl_basic_map_intersect_domain(bmap, isl_basic_set_copy(dom)); - bmap = isl_basic_map_detect_equalities(bmap); - bmap = isl_basic_map_remove_redundancies(bmap); - - return basic_map_partial_lexopt(bmap, dom, empty, max); -error: - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -struct isl_sol_for { - struct isl_sol sol; - int (*fn)(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user); - void *user; -}; - -static void sol_for_free(struct isl_sol_for *sol_for) -{ - if (sol_for->sol.context) - sol_for->sol.context->op->free(sol_for->sol.context); - free(sol_for); -} - -static void sol_for_free_wrap(struct isl_sol *sol) -{ - sol_for_free((struct isl_sol_for *)sol); -} - -/* Add the solution identified by the tableau and the context tableau. - * - * See documentation of sol_add for more details. - * - * Instead of constructing a basic map, this function calls a user - * defined function with the current context as a basic set and - * a list of affine expressions representing the relation between - * the input and output. The space over which the affine expressions - * are defined is the same as that of the domain. The number of - * affine expressions in the list is equal to the number of output variables. - */ -static void sol_for_add(struct isl_sol_for *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - int i; - isl_ctx *ctx; - isl_local_space *ls; - isl_aff *aff; - isl_aff_list *list; - - if (sol->sol.error || !dom || !M) - goto error; - - ctx = isl_basic_set_get_ctx(dom); - ls = isl_basic_set_get_local_space(dom); - list = isl_aff_list_alloc(ctx, M->n_row - 1); - for (i = 1; i < M->n_row; ++i) { - aff = isl_aff_alloc(isl_local_space_copy(ls)); - if (aff) { - isl_int_set(aff->v->el[0], M->row[0][0]); - isl_seq_cpy(aff->v->el + 1, M->row[i], M->n_col); - } - list = isl_aff_list_add(list, aff); - } - isl_local_space_free(ls); - - dom = isl_basic_set_finalize(dom); - - if (sol->fn(isl_basic_set_copy(dom), list, sol->user) < 0) - goto error; - - isl_basic_set_free(dom); - isl_mat_free(M); - return; -error: - isl_basic_set_free(dom); - isl_mat_free(M); - sol->sol.error = 1; -} - -static void sol_for_add_wrap(struct isl_sol *sol, - struct isl_basic_set *dom, struct isl_mat *M) -{ - sol_for_add((struct isl_sol_for *)sol, dom, M); -} - -static struct isl_sol_for *sol_for_init(struct isl_basic_map *bmap, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - struct isl_sol_for *sol_for = NULL; - isl_space *dom_dim; - struct isl_basic_set *dom = NULL; - - sol_for = isl_calloc_type(bmap->ctx, struct isl_sol_for); - if (!sol_for) - goto error; - - dom_dim = isl_space_domain(isl_space_copy(bmap->dim)); - dom = isl_basic_set_universe(dom_dim); - - sol_for->sol.rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - sol_for->sol.dec_level.callback.run = &sol_dec_level_wrap; - sol_for->sol.dec_level.sol = &sol_for->sol; - sol_for->fn = fn; - sol_for->user = user; - sol_for->sol.max = max; - sol_for->sol.n_out = isl_basic_map_dim(bmap, isl_dim_out); - sol_for->sol.add = &sol_for_add_wrap; - sol_for->sol.add_empty = NULL; - sol_for->sol.free = &sol_for_free_wrap; - - sol_for->sol.context = isl_context_alloc(dom); - if (!sol_for->sol.context) - goto error; - - isl_basic_set_free(dom); - return sol_for; -error: - isl_basic_set_free(dom); - sol_for_free(sol_for); - return NULL; -} - -static void sol_for_find_solutions(struct isl_sol_for *sol_for, - struct isl_tab *tab) -{ - find_solutions_main(&sol_for->sol, tab); -} - -int isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - struct isl_sol_for *sol_for = NULL; - - bmap = isl_basic_map_copy(bmap); - if (!bmap) - return -1; - - bmap = isl_basic_map_detect_equalities(bmap); - sol_for = sol_for_init(bmap, max, fn, user); - - if (isl_basic_map_plain_is_empty(bmap)) - /* nothing */; - else { - struct isl_tab *tab; - struct isl_context *context = sol_for->sol.context; - tab = tab_for_lexmin(bmap, - context->op->peek_basic_set(context), 1, max); - tab = context->op->detect_nonnegative_parameters(context, tab); - sol_for_find_solutions(sol_for, tab); - if (sol_for->sol.error) - goto error; - } - - sol_free(&sol_for->sol); - isl_basic_map_free(bmap); - return 0; -error: - sol_free(&sol_for->sol); - isl_basic_map_free(bmap); - return -1; -} - -int isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set *bset, int max, - int (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, - void *user), - void *user) -{ - return isl_basic_map_foreach_lexopt(bset, max, fn, user); -} - -/* Check if the given sequence of len variables starting at pos - * represents a trivial (i.e., zero) solution. - * The variables are assumed to be non-negative and to come in pairs, - * with each pair representing a variable of unrestricted sign. - * The solution is trivial if each such pair in the sequence consists - * of two identical values, meaning that the variable being represented - * has value zero. - */ -static int region_is_trivial(struct isl_tab *tab, int pos, int len) -{ - int i; - - if (len == 0) - return 0; - - for (i = 0; i < len; i += 2) { - int neg_row; - int pos_row; - - neg_row = tab->var[pos + i].is_row ? - tab->var[pos + i].index : -1; - pos_row = tab->var[pos + i + 1].is_row ? - tab->var[pos + i + 1].index : -1; - - if ((neg_row < 0 || - isl_int_is_zero(tab->mat->row[neg_row][1])) && - (pos_row < 0 || - isl_int_is_zero(tab->mat->row[pos_row][1]))) - continue; - - if (neg_row < 0 || pos_row < 0) - return 0; - if (isl_int_ne(tab->mat->row[neg_row][1], - tab->mat->row[pos_row][1])) - return 0; - } - - return 1; -} - -/* Return the index of the first trivial region or -1 if all regions - * are non-trivial. - */ -static int first_trivial_region(struct isl_tab *tab, - int n_region, struct isl_region *region) -{ - int i; - - for (i = 0; i < n_region; ++i) { - if (region_is_trivial(tab, region[i].pos, region[i].len)) - return i; - } - - return -1; -} - -/* Check if the solution is optimal, i.e., whether the first - * n_op entries are zero. - */ -static int is_optimal(__isl_keep isl_vec *sol, int n_op) -{ - int i; - - for (i = 0; i < n_op; ++i) - if (!isl_int_is_zero(sol->el[1 + i])) - return 0; - return 1; -} - -/* Add constraints to "tab" that ensure that any solution is significantly - * better that that represented by "sol". That is, find the first - * relevant (within first n_op) non-zero coefficient and force it (along - * with all previous coefficients) to be zero. - * If the solution is already optimal (all relevant coefficients are zero), - * then just mark the table as empty. - */ -static int force_better_solution(struct isl_tab *tab, - __isl_keep isl_vec *sol, int n_op) -{ - int i; - isl_ctx *ctx; - isl_vec *v = NULL; - - if (!sol) - return -1; - - for (i = 0; i < n_op; ++i) - if (!isl_int_is_zero(sol->el[1 + i])) - break; - - if (i == n_op) { - if (isl_tab_mark_empty(tab) < 0) - return -1; - return 0; - } - - ctx = isl_vec_get_ctx(sol); - v = isl_vec_alloc(ctx, 1 + tab->n_var); - if (!v) - return -1; - - for (; i >= 0; --i) { - v = isl_vec_clr(v); - isl_int_set_si(v->el[1 + i], -1); - if (add_lexmin_eq(tab, v->el) < 0) - goto error; - } - - isl_vec_free(v); - return 0; -error: - isl_vec_free(v); - return -1; -} - -struct isl_trivial { - int update; - int region; - int side; - struct isl_tab_undo *snap; -}; - -/* Return the lexicographically smallest non-trivial solution of the - * given ILP problem. - * - * All variables are assumed to be non-negative. - * - * n_op is the number of initial coordinates to optimize. - * That is, once a solution has been found, we will only continue looking - * for solution that result in significantly better values for those - * initial coordinates. That is, we only continue looking for solutions - * that increase the number of initial zeros in this sequence. - * - * A solution is non-trivial, if it is non-trivial on each of the - * specified regions. Each region represents a sequence of pairs - * of variables. A solution is non-trivial on such a region if - * at least one of these pairs consists of different values, i.e., - * such that the non-negative variable represented by the pair is non-zero. - * - * Whenever a conflict is encountered, all constraints involved are - * reported to the caller through a call to "conflict". - * - * We perform a simple branch-and-bound backtracking search. - * Each level in the search represents initially trivial region that is forced - * to be non-trivial. - * At each level we consider n cases, where n is the length of the region. - * In terms of the n/2 variables of unrestricted signs being encoded by - * the region, we consider the cases - * x_0 >= 1 - * x_0 <= -1 - * x_0 = 0 and x_1 >= 1 - * x_0 = 0 and x_1 <= -1 - * x_0 = 0 and x_1 = 0 and x_2 >= 1 - * x_0 = 0 and x_1 = 0 and x_2 <= -1 - * ... - * The cases are considered in this order, assuming that each pair - * x_i_a x_i_b represents the value x_i_b - x_i_a. - * That is, x_0 >= 1 is enforced by adding the constraint - * x_0_b - x_0_a >= 1 - */ -__isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin( - __isl_take isl_basic_set *bset, int n_op, int n_region, - struct isl_region *region, - int (*conflict)(int con, void *user), void *user) -{ - int i, j; - int r; - isl_ctx *ctx = isl_basic_set_get_ctx(bset); - isl_vec *v = NULL; - isl_vec *sol = isl_vec_alloc(ctx, 0); - struct isl_tab *tab; - struct isl_trivial *triv = NULL; - int level, init; - - tab = tab_for_lexmin(bset, NULL, 0, 0); - if (!tab) - goto error; - tab->conflict = conflict; - tab->conflict_user = user; - - v = isl_vec_alloc(ctx, 1 + tab->n_var); - triv = isl_calloc_array(ctx, struct isl_trivial, n_region); - if (!v || !triv) - goto error; - - level = 0; - init = 1; - - while (level >= 0) { - int side, base; - - if (init) { - tab = cut_to_integer_lexmin(tab); - if (!tab) - goto error; - if (tab->empty) - goto backtrack; - r = first_trivial_region(tab, n_region, region); - if (r < 0) { - for (i = 0; i < level; ++i) - triv[i].update = 1; - isl_vec_free(sol); - sol = isl_tab_get_sample_value(tab); - if (!sol) - goto error; - if (is_optimal(sol, n_op)) - break; - goto backtrack; - } - if (level >= n_region) - isl_die(ctx, isl_error_internal, - "nesting level too deep", goto error); - if (isl_tab_extend_cons(tab, - 2 * region[r].len + 2 * n_op) < 0) - goto error; - triv[level].region = r; - triv[level].side = 0; - } - - r = triv[level].region; - side = triv[level].side; - base = 2 * (side/2); - - if (side >= region[r].len) { -backtrack: - level--; - init = 0; - if (level >= 0) - if (isl_tab_rollback(tab, triv[level].snap) < 0) - goto error; - continue; - } - - if (triv[level].update) { - if (force_better_solution(tab, sol, n_op) < 0) - goto error; - triv[level].update = 0; - } - - if (side == base && base >= 2) { - for (j = base - 2; j < base; ++j) { - v = isl_vec_clr(v); - isl_int_set_si(v->el[1 + region[r].pos + j], 1); - if (add_lexmin_eq(tab, v->el) < 0) - goto error; - } - } - - triv[level].snap = isl_tab_snap(tab); - if (isl_tab_push_basis(tab) < 0) - goto error; - - v = isl_vec_clr(v); - isl_int_set_si(v->el[0], -1); - isl_int_set_si(v->el[1 + region[r].pos + side], -1); - isl_int_set_si(v->el[1 + region[r].pos + (side ^ 1)], 1); - tab = add_lexmin_ineq(tab, v->el); - - triv[level].side++; - level++; - init = 1; - } - - free(triv); - isl_vec_free(v); - isl_tab_free(tab); - isl_basic_set_free(bset); - - return sol; -error: - free(triv); - isl_vec_free(v); - isl_tab_free(tab); - isl_basic_set_free(bset); - isl_vec_free(sol); - return NULL; -} - -/* Return the lexicographically smallest rational point in "bset", - * assuming that all variables are non-negative. - * If "bset" is empty, then return a zero-length vector. - */ -__isl_give isl_vec *isl_tab_basic_set_non_neg_lexmin( - __isl_take isl_basic_set *bset) -{ - struct isl_tab *tab; - isl_ctx *ctx = isl_basic_set_get_ctx(bset); - isl_vec *sol; - - tab = tab_for_lexmin(bset, NULL, 0, 0); - if (!tab) - goto error; - if (tab->empty) - sol = isl_vec_alloc(ctx, 0); - else - sol = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - isl_basic_set_free(bset); - return sol; -error: - isl_tab_free(tab); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_sol_pma { - struct isl_sol sol; - isl_pw_multi_aff *pma; - isl_set *empty; -}; - -static void sol_pma_free(struct isl_sol_pma *sol_pma) -{ - if (!sol_pma) - return; - if (sol_pma->sol.context) - sol_pma->sol.context->op->free(sol_pma->sol.context); - isl_pw_multi_aff_free(sol_pma->pma); - isl_set_free(sol_pma->empty); - free(sol_pma); -} - -/* This function is called for parts of the context where there is - * no solution, with "bset" corresponding to the context tableau. - * Simply add the basic set to the set "empty". - */ -static void sol_pma_add_empty(struct isl_sol_pma *sol, - __isl_take isl_basic_set *bset) -{ - if (!bset) - goto error; - isl_assert(bset->ctx, sol->empty, goto error); - - sol->empty = isl_set_grow(sol->empty, 1); - bset = isl_basic_set_simplify(bset); - bset = isl_basic_set_finalize(bset); - sol->empty = isl_set_add_basic_set(sol->empty, bset); - if (!sol->empty) - sol->sol.error = 1; - return; -error: - isl_basic_set_free(bset); - sol->sol.error = 1; -} - -/* Given a basic map "dom" that represents the context and an affine - * matrix "M" that maps the dimensions of the context to the - * output variables, construct an isl_pw_multi_aff with a single - * cell corresponding to "dom" and affine expressions copied from "M". - */ -static void sol_pma_add(struct isl_sol_pma *sol, - __isl_take isl_basic_set *dom, __isl_take isl_mat *M) -{ - int i; - isl_local_space *ls; - isl_aff *aff; - isl_multi_aff *maff; - isl_pw_multi_aff *pma; - - maff = isl_multi_aff_alloc(isl_pw_multi_aff_get_space(sol->pma)); - ls = isl_basic_set_get_local_space(dom); - for (i = 1; i < M->n_row; ++i) { - aff = isl_aff_alloc(isl_local_space_copy(ls)); - if (aff) { - isl_int_set(aff->v->el[0], M->row[0][0]); - isl_seq_cpy(aff->v->el + 1, M->row[i], M->n_col); - } - aff = isl_aff_normalize(aff); - maff = isl_multi_aff_set_aff(maff, i - 1, aff); - } - isl_local_space_free(ls); - isl_mat_free(M); - dom = isl_basic_set_simplify(dom); - dom = isl_basic_set_finalize(dom); - pma = isl_pw_multi_aff_alloc(isl_set_from_basic_set(dom), maff); - sol->pma = isl_pw_multi_aff_add_disjoint(sol->pma, pma); - if (!sol->pma) - sol->sol.error = 1; -} - -static void sol_pma_free_wrap(struct isl_sol *sol) -{ - sol_pma_free((struct isl_sol_pma *)sol); -} - -static void sol_pma_add_empty_wrap(struct isl_sol *sol, - __isl_take isl_basic_set *bset) -{ - sol_pma_add_empty((struct isl_sol_pma *)sol, bset); -} - -static void sol_pma_add_wrap(struct isl_sol *sol, - __isl_take isl_basic_set *dom, __isl_take isl_mat *M) -{ - sol_pma_add((struct isl_sol_pma *)sol, dom, M); -} - -/* Construct an isl_sol_pma structure for accumulating the solution. - * If track_empty is set, then we also keep track of the parts - * of the context where there is no solution. - * If max is set, then we are solving a maximization, rather than - * a minimization problem, which means that the variables in the - * tableau have value "M - x" rather than "M + x". - */ -static struct isl_sol *sol_pma_init(__isl_keep isl_basic_map *bmap, - __isl_take isl_basic_set *dom, int track_empty, int max) -{ - struct isl_sol_pma *sol_pma = NULL; - - if (!bmap) - goto error; - - sol_pma = isl_calloc_type(bmap->ctx, struct isl_sol_pma); - if (!sol_pma) - goto error; - - sol_pma->sol.rational = ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL); - sol_pma->sol.dec_level.callback.run = &sol_dec_level_wrap; - sol_pma->sol.dec_level.sol = &sol_pma->sol; - sol_pma->sol.max = max; - sol_pma->sol.n_out = isl_basic_map_dim(bmap, isl_dim_out); - sol_pma->sol.add = &sol_pma_add_wrap; - sol_pma->sol.add_empty = track_empty ? &sol_pma_add_empty_wrap : NULL; - sol_pma->sol.free = &sol_pma_free_wrap; - sol_pma->pma = isl_pw_multi_aff_empty(isl_basic_map_get_space(bmap)); - if (!sol_pma->pma) - goto error; - - sol_pma->sol.context = isl_context_alloc(dom); - if (!sol_pma->sol.context) - goto error; - - if (track_empty) { - sol_pma->empty = isl_set_alloc_space(isl_basic_set_get_space(dom), - 1, ISL_SET_DISJOINT); - if (!sol_pma->empty) - goto error; - } - - isl_basic_set_free(dom); - return &sol_pma->sol; -error: - isl_basic_set_free(dom); - sol_pma_free(sol_pma); - return NULL; -} - -/* Base case of isl_tab_basic_map_partial_lexopt, after removing - * some obvious symmetries. - * - * We call basic_map_partial_lexopt_base and extract the results. - */ -static __isl_give isl_pw_multi_aff *basic_map_partial_lexopt_base_pma( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - isl_pw_multi_aff *result = NULL; - struct isl_sol *sol; - struct isl_sol_pma *sol_pma; - - sol = basic_map_partial_lexopt_base(bmap, dom, empty, max, - &sol_pma_init); - if (!sol) - return NULL; - sol_pma = (struct isl_sol_pma *) sol; - - result = isl_pw_multi_aff_copy(sol_pma->pma); - if (empty) - *empty = isl_set_copy(sol_pma->empty); - sol_free(&sol_pma->sol); - return result; -} - -/* Given that the last input variable of "maff" represents the minimum - * of some bounds, check whether we need to plug in the expression - * of the minimum. - * - * In particular, check if the last input variable appears in any - * of the expressions in "maff". - */ -static int need_substitution(__isl_keep isl_multi_aff *maff) -{ - int i; - unsigned pos; - - pos = isl_multi_aff_dim(maff, isl_dim_in) - 1; - - for (i = 0; i < maff->n; ++i) - if (isl_aff_involves_dims(maff->p[i], isl_dim_in, pos, 1)) - return 1; - - return 0; -} - -/* Given a set of upper bounds on the last "input" variable m, - * construct a piecewise affine expression that selects - * the minimal upper bound to m, i.e., - * divide the space into cells where one - * of the upper bounds is smaller than all the others and select - * this upper bound on that cell. - * - * In particular, if there are n bounds b_i, then the result - * consists of n cell, each one of the form - * - * b_i <= b_j for j > i - * b_i < b_j for j < i - * - * The affine expression on this cell is - * - * b_i - */ -static __isl_give isl_pw_aff *set_minimum_pa(__isl_take isl_space *space, - __isl_take isl_mat *var) -{ - int i; - isl_aff *aff = NULL; - isl_basic_set *bset = NULL; - isl_ctx *ctx; - isl_pw_aff *paff = NULL; - isl_space *pw_space; - isl_local_space *ls = NULL; - - if (!space || !var) - goto error; - - ctx = isl_space_get_ctx(space); - ls = isl_local_space_from_space(isl_space_copy(space)); - pw_space = isl_space_copy(space); - pw_space = isl_space_from_domain(pw_space); - pw_space = isl_space_add_dims(pw_space, isl_dim_out, 1); - paff = isl_pw_aff_alloc_size(pw_space, var->n_row); - - for (i = 0; i < var->n_row; ++i) { - isl_pw_aff *paff_i; - - aff = isl_aff_alloc(isl_local_space_copy(ls)); - bset = isl_basic_set_alloc_space(isl_space_copy(space), 0, - 0, var->n_row - 1); - if (!aff || !bset) - goto error; - isl_int_set_si(aff->v->el[0], 1); - isl_seq_cpy(aff->v->el + 1, var->row[i], var->n_col); - isl_int_set_si(aff->v->el[1 + var->n_col], 0); - bset = select_minimum(bset, var, i); - paff_i = isl_pw_aff_alloc(isl_set_from_basic_set(bset), aff); - paff = isl_pw_aff_add_disjoint(paff, paff_i); - } - - isl_local_space_free(ls); - isl_space_free(space); - isl_mat_free(var); - return paff; -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - isl_pw_aff_free(paff); - isl_local_space_free(ls); - isl_space_free(space); - isl_mat_free(var); - return NULL; -} - -/* Given a piecewise multi-affine expression of which the last input variable - * is the minimum of the bounds in "cst", plug in the value of the minimum. - * This minimum expression is given in "min_expr_pa". - * The set "min_expr" contains the same information, but in the form of a set. - * The variable is subsequently projected out. - * - * The implementation is similar to those of "split" and "split_domain". - * If the variable appears in a given expression, then minimum expression - * is plugged in. Otherwise, if the variable appears in the constraints - * and a split is required, then the domain is split. Otherwise, no split - * is performed. - */ -static __isl_give isl_pw_multi_aff *split_domain_pma( - __isl_take isl_pw_multi_aff *opt, __isl_take isl_pw_aff *min_expr_pa, - __isl_take isl_set *min_expr, __isl_take isl_mat *cst) -{ - int n_in; - int i; - isl_space *space; - isl_pw_multi_aff *res; - - if (!opt || !min_expr || !cst) - goto error; - - n_in = isl_pw_multi_aff_dim(opt, isl_dim_in); - space = isl_pw_multi_aff_get_space(opt); - space = isl_space_drop_dims(space, isl_dim_in, n_in - 1, 1); - res = isl_pw_multi_aff_empty(space); - - for (i = 0; i < opt->n; ++i) { - isl_pw_multi_aff *pma; - - pma = isl_pw_multi_aff_alloc(isl_set_copy(opt->p[i].set), - isl_multi_aff_copy(opt->p[i].maff)); - if (need_substitution(opt->p[i].maff)) - pma = isl_pw_multi_aff_substitute(pma, - isl_dim_in, n_in - 1, min_expr_pa); - else if (need_split_set(opt->p[i].set, cst)) - pma = isl_pw_multi_aff_intersect_domain(pma, - isl_set_copy(min_expr)); - pma = isl_pw_multi_aff_project_out(pma, - isl_dim_in, n_in - 1, 1); - - res = isl_pw_multi_aff_add_disjoint(res, pma); - } - - isl_pw_multi_aff_free(opt); - isl_pw_aff_free(min_expr_pa); - isl_set_free(min_expr); - isl_mat_free(cst); - return res; -error: - isl_pw_multi_aff_free(opt); - isl_pw_aff_free(min_expr_pa); - isl_set_free(min_expr); - isl_mat_free(cst); - return NULL; -} - -static __isl_give isl_pw_multi_aff *basic_map_partial_lexopt_pma( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max); - -/* This function is called from basic_map_partial_lexopt_symm. - * The last variable of "bmap" and "dom" corresponds to the minimum - * of the bounds in "cst". "map_space" is the space of the original - * input relation (of basic_map_partial_lexopt_symm) and "set_space" - * is the space of the original domain. - * - * We recursively call basic_map_partial_lexopt and then plug in - * the definition of the minimum in the result. - */ -static __isl_give union isl_lex_res basic_map_partial_lexopt_symm_pma_core( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, __isl_take isl_mat *cst, - __isl_take isl_space *map_space, __isl_take isl_space *set_space) -{ - isl_pw_multi_aff *opt; - isl_pw_aff *min_expr_pa; - isl_set *min_expr; - union isl_lex_res res; - - min_expr = set_minimum(isl_basic_set_get_space(dom), isl_mat_copy(cst)); - min_expr_pa = set_minimum_pa(isl_basic_set_get_space(dom), - isl_mat_copy(cst)); - - opt = basic_map_partial_lexopt_pma(bmap, dom, empty, max); - - if (empty) { - *empty = split(*empty, - isl_set_copy(min_expr), isl_mat_copy(cst)); - *empty = isl_set_reset_space(*empty, set_space); - } - - opt = split_domain_pma(opt, min_expr_pa, min_expr, cst); - opt = isl_pw_multi_aff_reset_space(opt, map_space); - - res.pma = opt; - return res; -} - -static __isl_give isl_pw_multi_aff *basic_map_partial_lexopt_symm_pma( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max, int first, int second) -{ - return basic_map_partial_lexopt_symm(bmap, dom, empty, max, - first, second, &basic_map_partial_lexopt_symm_pma_core).pma; -} - -/* Recursive part of isl_basic_map_partial_lexopt_pw_multi_aff, after detecting - * equalities and removing redundant constraints. - * - * We first check if there are any parallel constraints (left). - * If not, we are in the base case. - * If there are parallel constraints, we replace them by a single - * constraint in basic_map_partial_lexopt_symm_pma and then call - * this function recursively to look for more parallel constraints. - */ -static __isl_give isl_pw_multi_aff *basic_map_partial_lexopt_pma( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - int par = 0; - int first, second; - - if (!bmap) - goto error; - - if (bmap->ctx->opt->pip_symmetry) - par = parallel_constraints(bmap, &first, &second); - if (par < 0) - goto error; - if (!par) - return basic_map_partial_lexopt_base_pma(bmap, dom, empty, max); - - return basic_map_partial_lexopt_symm_pma(bmap, dom, empty, max, - first, second); -error: - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} - -/* Compute the lexicographic minimum (or maximum if "max" is set) - * of "bmap" over the domain "dom" and return the result as a piecewise - * multi-affine expression. - * If "empty" is not NULL, then *empty is assigned a set that - * contains those parts of the domain where there is no solution. - * If "bmap" is marked as rational (ISL_BASIC_MAP_RATIONAL), - * then we compute the rational optimum. Otherwise, we compute - * the integral optimum. - * - * We perform some preprocessing. As the PILP solver does not - * handle implicit equalities very well, we first make sure all - * the equalities are explicitly available. - * - * We also add context constraints to the basic map and remove - * redundant constraints. This is only needed because of the - * way we handle simple symmetries. In particular, we currently look - * for symmetries on the constraints, before we set up the main tableau. - * It is then no good to look for symmetries on possibly redundant constraints. - */ -__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexopt_pw_multi_aff( - __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, - __isl_give isl_set **empty, int max) -{ - if (empty) - *empty = NULL; - if (!bmap || !dom) - goto error; - - isl_assert(bmap->ctx, - isl_basic_map_compatible_domain(bmap, dom), goto error); - - if (isl_basic_set_dim(dom, isl_dim_all) == 0) - return basic_map_partial_lexopt_pma(bmap, dom, empty, max); - - bmap = isl_basic_map_intersect_domain(bmap, isl_basic_set_copy(dom)); - bmap = isl_basic_map_detect_equalities(bmap); - bmap = isl_basic_map_remove_redundancies(bmap); - - return basic_map_partial_lexopt_pma(bmap, dom, empty, max); -error: - isl_basic_set_free(dom); - isl_basic_map_free(bmap); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_test.c b/cloog-0.17.0/isl/isl_test.c deleted file mode 100644 index 2b21331cf0efac7f24d8009cac27d0d3b9d77002..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_test.c +++ /dev/null @@ -1,2579 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static char *srcdir; - -static char *get_filename(isl_ctx *ctx, const char *name, const char *suffix) { - char *filename; - int length; - char *pattern = "%s/test_inputs/%s.%s"; - - length = strlen(pattern) - 6 + strlen(srcdir) + strlen(name) - + strlen(suffix) + 1; - filename = isl_alloc_array(ctx, char, length); - - if (!filename) - return NULL; - - sprintf(filename, pattern, srcdir, name, suffix); - - return filename; -} - -void test_parse_map(isl_ctx *ctx, const char *str) -{ - isl_map *map; - - map = isl_map_read_from_str(ctx, str); - assert(map); - isl_map_free(map); -} - -void test_parse_map_equal(isl_ctx *ctx, const char *str, const char *str2) -{ - isl_map *map, *map2; - - map = isl_map_read_from_str(ctx, str); - map2 = isl_map_read_from_str(ctx, str2); - assert(map && map2 && isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); -} - -void test_parse_pwqp(isl_ctx *ctx, const char *str) -{ - isl_pw_qpolynomial *pwqp; - - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - assert(pwqp); - isl_pw_qpolynomial_free(pwqp); -} - -static void test_parse_pwaff(isl_ctx *ctx, const char *str) -{ - isl_pw_aff *pwaff; - - pwaff = isl_pw_aff_read_from_str(ctx, str); - assert(pwaff); - isl_pw_aff_free(pwaff); -} - -void test_parse(struct isl_ctx *ctx) -{ - isl_map *map, *map2; - const char *str, *str2; - - str = "{ [i] -> [-i] }"; - map = isl_map_read_from_str(ctx, str); - assert(map); - isl_map_free(map); - - str = "{ A[i] -> L[([i/3])] }"; - map = isl_map_read_from_str(ctx, str); - assert(map); - isl_map_free(map); - - test_parse_map(ctx, "{[[s] -> A[i]] -> [[s+1] -> A[i]]}"); - test_parse_map(ctx, "{ [p1, y1, y2] -> [2, y1, y2] : " - "p1 = 1 && (y1 <= y2 || y2 = 0) }"); - - str = "{ [x,y] : [([x/2]+y)/3] >= 1 }"; - str2 = "{ [x, y] : 2y >= 6 - x }"; - test_parse_map_equal(ctx, str, str2); - - test_parse_map_equal(ctx, "{ [x,y] : x <= min(y, 2*y+3) }", - "{ [x,y] : x <= y, 2*y + 3 }"); - str = "{ [x, y] : (y <= x and y >= -3) or (2y <= -3 + x and y <= -4) }"; - test_parse_map_equal(ctx, "{ [x,y] : x >= min(y, 2*y+3) }", str); - - str = "{[new,old] -> [new+1-2*[(new+1)/2],old+1-2*[(old+1)/2]]}"; - map = isl_map_read_from_str(ctx, str); - str = "{ [new, old] -> [o0, o1] : " - "exists (e0 = [(-1 - new + o0)/2], e1 = [(-1 - old + o1)/2]: " - "2e0 = -1 - new + o0 and 2e1 = -1 - old + o1 and o0 >= 0 and " - "o0 <= 1 and o1 >= 0 and o1 <= 1) }"; - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{[new,old] -> [new+1-2*[(new+1)/2],old+1-2*[(old+1)/2]]}"; - map = isl_map_read_from_str(ctx, str); - str = "{[new,old] -> [(new+1)%2,(old+1)%2]}"; - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n] -> { [c1] : c1>=0 and c1<=floord(n-4,3) }"; - str2 = "[n] -> { [c1] : c1 >= 0 and 3c1 <= -4 + n }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [i,j] -> [i] : i < j; [i,j] -> [j] : j <= i }"; - str2 = "{ [i,j] -> [min(i,j)] }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [i,j] : i != j }"; - str2 = "{ [i,j] : i < j or i > j }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [i,j] : (i+1)*2 >= j }"; - str2 = "{ [i, j] : j <= 2 + 2i }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [i] -> [i > 0 ? 4 : 5] }"; - str2 = "{ [i] -> [5] : i <= 0; [i] -> [4] : i >= 1 }"; - test_parse_map_equal(ctx, str, str2); - - str = "[N=2,M] -> { [i=[(M+N)/4]] }"; - str2 = "[N, M] -> { [i] : N = 2 and 4i <= 2 + M and 4i >= -1 + M }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [x] : x >= 0 }"; - str2 = "{ [x] : x-0 >= 0 }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [i] : ((i > 10)) }"; - str2 = "{ [i] : i >= 11 }"; - test_parse_map_equal(ctx, str, str2); - - str = "{ [i] -> [0] }"; - str2 = "{ [i] -> [0 * i] }"; - test_parse_map_equal(ctx, str, str2); - - test_parse_pwqp(ctx, "{ [i] -> i + [ (i + [i/3])/2 ] }"); - test_parse_map(ctx, "{ S1[i] -> [([i/10]),i%10] : 0 <= i <= 45 }"); - test_parse_pwaff(ctx, "{ [i] -> [i + 1] : i > 0; [a] -> [a] : a < 0 }"); -} - -void test_read(struct isl_ctx *ctx) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - const char *str = "{[y]: Exists ( alpha : 2alpha = y)}"; - - filename = get_filename(ctx, "set", "omega"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input); - bset2 = isl_basic_set_read_from_str(ctx, str); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_bounded(struct isl_ctx *ctx) -{ - isl_set *set; - int bounded; - - set = isl_set_read_from_str(ctx, "[n] -> {[i] : 0 <= i <= n }"); - bounded = isl_set_is_bounded(set); - assert(bounded); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, "{[n, i] : 0 <= i <= n }"); - bounded = isl_set_is_bounded(set); - assert(!bounded); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, "[n] -> {[i] : i <= n }"); - bounded = isl_set_is_bounded(set); - assert(!bounded); - isl_set_free(set); -} - -/* Construct the basic set { [i] : 5 <= i <= N } */ -void test_construction(struct isl_ctx *ctx) -{ - isl_int v; - isl_space *dim; - isl_local_space *ls; - struct isl_basic_set *bset; - struct isl_constraint *c; - - isl_int_init(v); - - dim = isl_space_set_alloc(ctx, 1, 1); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_inequality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_param, 0, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_inequality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -5); - isl_constraint_set_constant(c, v); - bset = isl_basic_set_add_constraint(bset, c); - - isl_local_space_free(ls); - isl_basic_set_free(bset); - - isl_int_clear(v); -} - -void test_dim(struct isl_ctx *ctx) -{ - const char *str; - isl_map *map1, *map2; - - map1 = isl_map_read_from_str(ctx, - "[n] -> { [i] -> [j] : exists (a = [i/10] : i - 10a <= n ) }"); - map1 = isl_map_add_dims(map1, isl_dim_in, 1); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,k] -> [j] : exists (a = [i/10] : i - 10a <= n ) }"); - assert(isl_map_is_equal(map1, map2)); - isl_map_free(map2); - - map1 = isl_map_project_out(map1, isl_dim_in, 0, 1); - map2 = isl_map_read_from_str(ctx, "[n] -> { [i] -> [j] : n >= 0 }"); - assert(isl_map_is_equal(map1, map2)); - - isl_map_free(map1); - isl_map_free(map2); - - str = "[n] -> { [i] -> [] : exists a : 0 <= i <= n and i = 2 a }"; - map1 = isl_map_read_from_str(ctx, str); - str = "{ [i] -> [j] : exists a : 0 <= i <= j and i = 2 a }"; - map2 = isl_map_read_from_str(ctx, str); - map1 = isl_map_move_dims(map1, isl_dim_out, 0, isl_dim_param, 0, 1); - assert(isl_map_is_equal(map1, map2)); - - isl_map_free(map1); - isl_map_free(map2); -} - -void test_div(struct isl_ctx *ctx) -{ - isl_int v; - isl_space *dim; - isl_local_space *ls; - struct isl_basic_set *bset; - struct isl_constraint *c; - - isl_int_init(v); - - /* test 1 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(bset && bset->n_div == 1); - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 2 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(bset && bset->n_div == 1); - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 3 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -3); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 4); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(bset && bset->n_div == 1); - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 4 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 2); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_constant(c, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 1, 2); - - assert(isl_basic_set_is_empty(bset)); - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 5 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 1); - - assert(bset && bset->n_div == 0); - isl_basic_set_free(bset); - isl_local_space_free(ls); - - /* test 6 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 1); - - assert(bset && bset->n_div == 1); - isl_basic_set_free(bset); - isl_local_space_free(ls); - - /* test 7 */ - /* This test is a bit tricky. We set up an equality - * a + 3b + 3c = 6 e0 - * Normalization of divs creates _two_ divs - * a = 3 e0 - * c - b - e0 = 2 e1 - * Afterwards e0 is removed again because it has coefficient -1 - * and we end up with the original equality and div again. - * Perhaps we can avoid the introduction of this temporary div. - */ - dim = isl_space_set_alloc(ctx, 0, 4); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 3, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 3, 1); - - /* Test disabled for now */ - /* - assert(bset && bset->n_div == 1); - */ - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 8 */ - dim = isl_space_set_alloc(ctx, 0, 5); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - isl_int_set_si(v, -3); - isl_constraint_set_coefficient(c, isl_dim_set, 3, v); - isl_int_set_si(v, 6); - isl_constraint_set_coefficient(c, isl_dim_set, 4, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - isl_int_set_si(v, 1); - isl_constraint_set_constant(c, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 4, 1); - - /* Test disabled for now */ - /* - assert(bset && bset->n_div == 1); - */ - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 9 */ - dim = isl_space_set_alloc(ctx, 0, 4); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 1, v); - isl_int_set_si(v, -2); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, -1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, 3); - isl_constraint_set_coefficient(c, isl_dim_set, 3, v); - isl_int_set_si(v, 2); - isl_constraint_set_constant(c, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 2); - - bset = isl_basic_set_fix_si(bset, isl_dim_set, 0, 2); - - assert(!isl_basic_set_is_empty(bset)); - - isl_local_space_free(ls); - isl_basic_set_free(bset); - - /* test 10 */ - dim = isl_space_set_alloc(ctx, 0, 3); - bset = isl_basic_set_universe(isl_space_copy(dim)); - ls = isl_local_space_from_space(dim); - - c = isl_equality_alloc(isl_local_space_copy(ls)); - isl_int_set_si(v, 1); - isl_constraint_set_coefficient(c, isl_dim_set, 0, v); - isl_int_set_si(v, -2); - isl_constraint_set_coefficient(c, isl_dim_set, 2, v); - bset = isl_basic_set_add_constraint(bset, c); - - bset = isl_basic_set_project_out(bset, isl_dim_set, 2, 1); - - bset = isl_basic_set_fix_si(bset, isl_dim_set, 0, 2); - - isl_local_space_free(ls); - isl_basic_set_free(bset); - - isl_int_clear(v); -} - -void test_application_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - struct isl_basic_map *bmap; - - filename = get_filename(ctx, name, "omega"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input); - bmap = isl_basic_map_read_from_file(ctx, input); - - bset1 = isl_basic_set_apply(bset1, bmap); - - bset2 = isl_basic_set_read_from_file(ctx, input); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_application(struct isl_ctx *ctx) -{ - test_application_case(ctx, "application"); - test_application_case(ctx, "application2"); -} - -void test_affine_hull_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - - filename = get_filename(ctx, name, "polylib"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input); - bset2 = isl_basic_set_read_from_file(ctx, input); - - bset1 = isl_basic_set_affine_hull(bset1); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_affine_hull(struct isl_ctx *ctx) -{ - test_affine_hull_case(ctx, "affine2"); - test_affine_hull_case(ctx, "affine"); - test_affine_hull_case(ctx, "affine3"); -} - -void test_convex_hull_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - struct isl_set *set; - - filename = get_filename(ctx, name, "polylib"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input); - bset2 = isl_basic_set_read_from_file(ctx, input); - - set = isl_basic_set_union(bset1, bset2); - bset1 = isl_set_convex_hull(set); - - bset2 = isl_basic_set_read_from_file(ctx, input); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_convex_hull_algo(struct isl_ctx *ctx, int convex) -{ - const char *str1, *str2; - isl_set *set1, *set2; - int orig_convex = ctx->opt->convex; - ctx->opt->convex = convex; - - test_convex_hull_case(ctx, "convex0"); - test_convex_hull_case(ctx, "convex1"); - test_convex_hull_case(ctx, "convex2"); - test_convex_hull_case(ctx, "convex3"); - test_convex_hull_case(ctx, "convex4"); - test_convex_hull_case(ctx, "convex5"); - test_convex_hull_case(ctx, "convex6"); - test_convex_hull_case(ctx, "convex7"); - test_convex_hull_case(ctx, "convex8"); - test_convex_hull_case(ctx, "convex9"); - test_convex_hull_case(ctx, "convex10"); - test_convex_hull_case(ctx, "convex11"); - test_convex_hull_case(ctx, "convex12"); - test_convex_hull_case(ctx, "convex13"); - test_convex_hull_case(ctx, "convex14"); - test_convex_hull_case(ctx, "convex15"); - - str1 = "{ [i0, i1, i2] : (i2 = 1 and i0 = 0 and i1 >= 0) or " - "(i0 = 1 and i1 = 0 and i2 = 1) or " - "(i0 = 0 and i1 = 0 and i2 = 0) }"; - str2 = "{ [i0, i1, i2] : i0 >= 0 and i2 >= i0 and i2 <= 1 and i1 >= 0 }"; - set1 = isl_set_read_from_str(ctx, str1); - set2 = isl_set_read_from_str(ctx, str2); - set1 = isl_set_from_basic_set(isl_set_convex_hull(set1)); - assert(isl_set_is_equal(set1, set2)); - isl_set_free(set1); - isl_set_free(set2); - - ctx->opt->convex = orig_convex; -} - -void test_convex_hull(struct isl_ctx *ctx) -{ - test_convex_hull_algo(ctx, ISL_CONVEX_HULL_FM); - test_convex_hull_algo(ctx, ISL_CONVEX_HULL_WRAP); -} - -void test_gist_case(struct isl_ctx *ctx, const char *name) -{ - char *filename; - FILE *input; - struct isl_basic_set *bset1, *bset2; - - filename = get_filename(ctx, name, "polylib"); - assert(filename); - input = fopen(filename, "r"); - assert(input); - - bset1 = isl_basic_set_read_from_file(ctx, input); - bset2 = isl_basic_set_read_from_file(ctx, input); - - bset1 = isl_basic_set_gist(bset1, bset2); - - bset2 = isl_basic_set_read_from_file(ctx, input); - - assert(isl_basic_set_is_equal(bset1, bset2) == 1); - - isl_basic_set_free(bset1); - isl_basic_set_free(bset2); - free(filename); - - fclose(input); -} - -void test_gist(struct isl_ctx *ctx) -{ - const char *str; - isl_basic_set *bset1, *bset2; - - test_gist_case(ctx, "gist1"); - - str = "[p0, p2, p3, p5, p6, p10] -> { [] : " - "exists (e0 = [(15 + p0 + 15p6 + 15p10)/16], e1 = [(p5)/8], " - "e2 = [(p6)/128], e3 = [(8p2 - p5)/128], " - "e4 = [(128p3 - p6)/4096]: 8e1 = p5 and 128e2 = p6 and " - "128e3 = 8p2 - p5 and 4096e4 = 128p3 - p6 and p2 >= 0 and " - "16e0 >= 16 + 16p6 + 15p10 and p2 <= 15 and p3 >= 0 and " - "p3 <= 31 and p6 >= 128p3 and p5 >= 8p2 and p10 >= 0 and " - "16e0 <= 15 + p0 + 15p6 + 15p10 and 16e0 >= p0 + 15p6 + 15p10 and " - "p10 <= 15 and p10 <= -1 + p0 - p6) }"; - bset1 = isl_basic_set_read_from_str(ctx, str); - str = "[p0, p2, p3, p5, p6, p10] -> { [] : exists (e0 = [(p5)/8], " - "e1 = [(p6)/128], e2 = [(8p2 - p5)/128], " - "e3 = [(128p3 - p6)/4096]: 8e0 = p5 and 128e1 = p6 and " - "128e2 = 8p2 - p5 and 4096e3 = 128p3 - p6 and p5 >= -7 and " - "p2 >= 0 and 8p2 <= -1 + p0 and p2 <= 15 and p3 >= 0 and " - "p3 <= 31 and 128p3 <= -1 + p0 and p6 >= -127 and " - "p5 <= -1 + p0 and p6 <= -1 + p0 and p6 >= 128p3 and " - "p0 >= 1 and p5 >= 8p2 and p10 >= 0 and p10 <= 15 ) }"; - bset2 = isl_basic_set_read_from_str(ctx, str); - bset1 = isl_basic_set_gist(bset1, bset2); - assert(bset1 && bset1->n_div == 0); - isl_basic_set_free(bset1); -} - -void test_coalesce_set(isl_ctx *ctx, const char *str, int check_one) -{ - isl_set *set, *set2; - - set = isl_set_read_from_str(ctx, str); - set = isl_set_coalesce(set); - set2 = isl_set_read_from_str(ctx, str); - assert(isl_set_is_equal(set, set2)); - if (check_one) - assert(set && set->n == 1); - isl_set_free(set); - isl_set_free(set2); -} - -void test_coalesce(struct isl_ctx *ctx) -{ - const char *str; - struct isl_set *set, *set2; - struct isl_map *map, *map2; - - set = isl_set_read_from_str(ctx, - "{[x,y]: x >= 0 & x <= 10 & y >= 0 & y <= 10 or " - "y >= x & x >= 2 & 5 >= y }"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " - "x + y >= 10 & y <= x & x + y <= 20 & y >= 0}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " - "x + y >= 10 & y <= x & x + y <= 19 & y >= 0}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 6 & x <= 10 & y <= x}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 7 & x <= 10 & y <= x}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 6 & x <= 10 & y + 1 <= x}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 6}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 7 & y <= 6}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 5}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 5}"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 7}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}"); - set = isl_set_coalesce(set); - set2 = isl_set_read_from_str(ctx, - "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "[n] -> { [i] : 1 <= i and i <= n - 1 or " - "2 <= i and i <= n }"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "[n] -> { [i] : 1 <= i and i <= n - 1 or " - "2 <= i and i <= n }"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - map = isl_map_read_from_str(ctx, - "[n] -> { [i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and i0 >= 8 + 2n and o0 >= 2 + i0 and " - "o0 <= 56 + 2n and o0 <= -12 + 4n and i0 <= 57 + 2n and " - "i0 <= -11 + 4n and o0 >= 6 + 2n and 4e0 <= i0 and " - "4e0 >= -3 + i0 and 4e1 <= o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0);" - "[i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and 2e0 >= 3 + n and e0 <= -4 + n and " - "2e0 <= 27 + n and e1 <= -4 + n and 2e1 <= 27 + n and " - "2e1 >= 2 + n and e1 >= 1 + e0 and i0 >= 7 + 2n and " - "i0 <= -11 + 4n and i0 <= 57 + 2n and 4e0 <= -2 + i0 and " - "4e0 >= -3 + i0 and o0 >= 6 + 2n and o0 <= -11 + 4n and " - "o0 <= 57 + 2n and 4e1 <= -2 + o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }"); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and i0 >= 8 + 2n and o0 >= 2 + i0 and " - "o0 <= 56 + 2n and o0 <= -12 + 4n and i0 <= 57 + 2n and " - "i0 <= -11 + 4n and o0 >= 6 + 2n and 4e0 <= i0 and " - "4e0 >= -3 + i0 and 4e1 <= o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0);" - "[i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and 2e0 >= 3 + n and e0 <= -4 + n and " - "2e0 <= 27 + n and e1 <= -4 + n and 2e1 <= 27 + n and " - "2e1 >= 2 + n and e1 >= 1 + e0 and i0 >= 7 + 2n and " - "i0 <= -11 + 4n and i0 <= 57 + 2n and 4e0 <= -2 + i0 and " - "4e0 >= -3 + i0 and o0 >= 6 + 2n and o0 <= -11 + 4n and " - "o0 <= 57 + 2n and 4e1 <= -2 + o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n, m] -> { [] -> [o0, o2, o3] : (o3 = 1 and o0 >= 1 + m and " - "o0 <= n + m and o2 <= m and o0 >= 2 + n and o2 >= 3) or " - "(o0 >= 2 + n and o0 >= 1 + m and o0 <= n + m and n >= 1 and " - "o3 <= -1 + o2 and o3 >= 1 - m + o2 and o3 >= 2 and o3 <= n) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[M, N] -> { [i0, i1, i2, i3, i4, i5, i6] -> " - "[o0, o1, o2, o3, o4, o5, o6] : " - "(o6 <= -4 + 2M - 2N + i0 + i1 - i2 + i6 - o0 - o1 + o2 and " - "o3 <= -2 + i3 and o6 >= 2 + i0 + i3 + i6 - o0 - o3 and " - "o6 >= 2 - M + N + i3 + i4 + i6 - o3 - o4 and o0 <= -1 + i0 and " - "o4 >= 4 - 3M + 3N - i0 - i1 + i2 + 2i3 + i4 + o0 + o1 - o2 - 2o3 " - "and o6 <= -3 + 2M - 2N + i3 + i4 - i5 + i6 - o3 - o4 + o5 and " - "2o6 <= -5 + 5M - 5N + 2i0 + i1 - i2 - i5 + 2i6 - 2o0 - o1 + o2 + o5 " - "and o6 >= 2i0 + i1 + i6 - 2o0 - o1 and " - "3o6 <= -5 + 4M - 4N + 2i0 + i1 - i2 + 2i3 + i4 - i5 + 3i6 " - "- 2o0 - o1 + o2 - 2o3 - o4 + o5) or " - "(N >= 2 and o3 <= -1 + i3 and o0 <= -1 + i0 and " - "o6 >= i3 + i6 - o3 and M >= 0 and " - "2o6 >= 1 + i0 + i3 + 2i6 - o0 - o3 and " - "o6 >= 1 - M + i0 + i6 - o0 and N >= 2M and o6 >= i0 + i6 - o0) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[M, N] -> { [] -> [o0] : (o0 = 0 and M >= 1 and N >= 2) or " - "(o0 = 0 and M >= 1 and N >= 2M and N >= 2 + M) or " - "(o0 = 0 and M >= 2 and N >= 3) or " - "(M = 0 and o0 = 0 and N >= 3) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [i0, i1, i2, i3] : (i1 = 10i0 and i0 >= 1 and 10i0 <= 100 and " - "i3 <= 9 + 10 i2 and i3 >= 1 + 10i2 and i3 >= 0) or " - "(i1 <= 9 + 10i0 and i1 >= 1 + 10i0 and i2 >= 0 and " - "i0 >= 0 and i1 <= 100 and i3 <= 9 + 10i2 and i3 >= 1 + 10i2) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - test_coalesce_set(ctx, - "[M] -> { [i1] : (i1 >= 2 and i1 <= M) or " - "(i1 = M and M >= 1) }", 0); - test_coalesce_set(ctx, - "{[x,y] : x,y >= 0; [x,y] : 10 <= x <= 20 and y >= -1 }", 0); - test_coalesce_set(ctx, - "{ [x, y] : (x >= 1 and y >= 1 and x <= 2 and y <= 2) or " - "(y = 3 and x = 1) }", 1); - test_coalesce_set(ctx, - "[M] -> { [i0, i1, i2, i3, i4] : (i1 >= 3 and i4 >= 2 + i2 and " - "i2 >= 2 and i0 >= 2 and i3 >= 1 + i2 and i0 <= M and " - "i1 <= M and i3 <= M and i4 <= M) or " - "(i1 >= 2 and i4 >= 1 + i2 and i2 >= 2 and i0 >= 2 and " - "i3 >= 1 + i2 and i0 <= M and i1 <= -1 + M and i3 <= M and " - "i4 <= -1 + M) }", 1); - test_coalesce_set(ctx, - "{ [x, y] : (x >= 0 and y >= 0 and x <= 10 and y <= 10) or " - "(x >= 1 and y >= 1 and x <= 11 and y <= 11) }", 1); - test_coalesce_set(ctx, - "{[x,y,z] : y + 2 >= 0 and x - y + 1 >= 0 and " - "-x - y + 1 >= 0 and -3 <= z <= 3;" - "[x,y,z] : -x+z + 20 >= 0 and -x-z + 20 >= 0 and " - "x-z + 20 >= 0 and x+z + 20 >= 0 and -10 <= y <= 0}", 1); - test_coalesce_set(ctx, - "{[x,y] : 0 <= x,y <= 10; [5,y]: 4 <=y <= 11}", 1); - test_coalesce_set(ctx, "{[x,0] : x >= 0; [x,1] : x <= 20}", 0); - test_coalesce_set(ctx, - "{[x,0,0] : -5 <= x <= 5; [0,y,1] : -5 <= y <= 5 }", 1); - test_coalesce_set(ctx, "{ [x, 1 - x] : 0 <= x <= 1; [0,0] }", 1); - test_coalesce_set(ctx, "{ [0,0]; [i,i] : 1 <= i <= 10 }", 1); - test_coalesce_set(ctx, "{ [0,0]; [i,j] : 1 <= i,j <= 10 }", 0); - test_coalesce_set(ctx, "{ [0,0]; [i,2i] : 1 <= i <= 10 }", 1); - test_coalesce_set(ctx, "{ [0,0]; [i,2i] : 2 <= i <= 10 }", 0); - test_coalesce_set(ctx, "{ [1,0]; [i,2i] : 1 <= i <= 10 }", 0); - test_coalesce_set(ctx, "{ [0,1]; [i,2i] : 1 <= i <= 10 }", 0); -} - -void test_closure(struct isl_ctx *ctx) -{ - const char *str; - isl_set *dom; - isl_map *up, *right; - isl_map *map, *map2; - int exact; - - /* COCOA example 1 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 1 and j2 = j + 1 and " - "1 <= i and i < n and 1 <= j and j < n or " - "i2 = i + 1 and j2 = j - 1 and " - "1 <= i and i < n and 2 <= j and j <= n }"); - map = isl_map_power(map, &exact); - assert(exact); - isl_map_free(map); - - /* COCOA example 1 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 1 and j2 = j + 1 and " - "1 <= i and i < n and 1 <= j and j < n or " - "i2 = i + 1 and j2 = j - 1 and " - "1 <= i and i < n and 2 <= j and j <= n }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : exists (k1,k2,k : " - "1 <= i and i < n and 1 <= j and j <= n and " - "2 <= i2 and i2 <= n and 1 <= j2 and j2 <= n and " - "i2 = i + k1 + k2 and j2 = j + k1 - k2 and " - "k1 >= 0 and k2 >= 0 and k1 + k2 = k and k >= 1 )}"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - map = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y] : y = x + 1 and 0 <= x and x <= n and " - " 0 <= y and y <= n }"); - map = isl_map_transitive_closure(map, &exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y] : y > x and 0 <= x and x <= n and " - " 0 <= y and y <= n }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* COCOA example 2 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 2 and j2 = j + 2 and " - "1 <= i and i < n - 1 and 1 <= j and j < n - 1 or " - "i2 = i + 2 and j2 = j - 2 and " - "1 <= i and i < n - 1 and 3 <= j and j <= n }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : exists (k1,k2,k : " - "1 <= i and i < n - 1 and 1 <= j and j <= n and " - "3 <= i2 and i2 <= n and 1 <= j2 and j2 <= n and " - "i2 = i + 2 k1 + 2 k2 and j2 = j + 2 k1 - 2 k2 and " - "k1 >= 0 and k2 >= 0 and k1 + k2 = k and k >= 1) }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - /* COCOA Fig.2 left */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 2 and j2 = j and " - "i <= 2 j - 3 and i <= n - 2 and j <= 2 i - 1 and " - "j <= n or " - "i2 = i and j2 = j + 2 and i <= 2 j - 1 and i <= n and " - "j <= 2 i - 3 and j <= n - 2 or " - "i2 = i + 1 and j2 = j + 1 and i <= 2 j - 1 and " - "i <= n - 1 and j <= 2 i - 1 and j <= n - 1 }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - /* COCOA Fig.2 right */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 3 and j2 = j and " - "i <= 2 j - 4 and i <= n - 3 and j <= 2 i - 1 and " - "j <= n or " - "i2 = i and j2 = j + 3 and i <= 2 j - 1 and i <= n and " - "j <= 2 i - 4 and j <= n - 3 or " - "i2 = i + 1 and j2 = j + 1 and i <= 2 j - 1 and " - "i <= n - 1 and j <= 2 i - 1 and j <= n - 1 }"); - map = isl_map_power(map, &exact); - assert(exact); - isl_map_free(map); - - /* COCOA Fig.2 right */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i + 3 and j2 = j and " - "i <= 2 j - 4 and i <= n - 3 and j <= 2 i - 1 and " - "j <= n or " - "i2 = i and j2 = j + 3 and i <= 2 j - 1 and i <= n and " - "j <= 2 i - 4 and j <= n - 3 or " - "i2 = i + 1 and j2 = j + 1 and i <= 2 j - 1 and " - "i <= n - 1 and j <= 2 i - 1 and j <= n - 1 }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : exists (k1,k2,k3,k : " - "i <= 2 j - 1 and i <= n and j <= 2 i - 1 and " - "j <= n and 3 + i + 2 j <= 3 n and " - "3 + 2 i + j <= 3n and i2 <= 2 j2 -1 and i2 <= n and " - "i2 <= 3 j2 - 4 and j2 <= 2 i2 -1 and j2 <= n and " - "13 + 4 j2 <= 11 i2 and i2 = i + 3 k1 + k3 and " - "j2 = j + 3 k2 + k3 and k1 >= 0 and k2 >= 0 and " - "k3 >= 0 and k1 + k2 + k3 = k and k > 0) }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* COCOA Fig.1 right */ - dom = isl_set_read_from_str(ctx, - "{ [x,y] : x >= 0 and -2 x + 3 y >= 0 and x <= 3 and " - "2 x - 3 y + 3 >= 0 }"); - right = isl_map_read_from_str(ctx, - "{ [x,y] -> [x2,y2] : x2 = x + 1 and y2 = y }"); - up = isl_map_read_from_str(ctx, - "{ [x,y] -> [x2,y2] : x2 = x and y2 = y + 1 }"); - right = isl_map_intersect_domain(right, isl_set_copy(dom)); - right = isl_map_intersect_range(right, isl_set_copy(dom)); - up = isl_map_intersect_domain(up, isl_set_copy(dom)); - up = isl_map_intersect_range(up, dom); - map = isl_map_union(up, right); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "{ [0,0] -> [0,1]; [0,0] -> [1,1]; [0,1] -> [1,1]; " - " [2,2] -> [3,2]; [2,2] -> [3,3]; [3,2] -> [3,3] }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* COCOA Theorem 1 counter example */ - map = isl_map_read_from_str(ctx, - "{ [i,j] -> [i2,j2] : i = 0 and 0 <= j and j <= 1 and " - "i2 = 1 and j2 = j or " - "i = 0 and j = 0 and i2 = 0 and j2 = 1 }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - map = isl_map_read_from_str(ctx, - "[m,n] -> { [i,j] -> [i2,j2] : i2 = i and j2 = j + 2 and " - "1 <= i,i2 <= n and 1 <= j,j2 <= m or " - "i2 = i + 1 and 3 <= j2 - j <= 4 and " - "1 <= i,i2 <= n and 1 <= j,j2 <= m }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - /* Kelly et al 1996, fig 12 */ - map = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : i2 = i and j2 = j + 1 and " - "1 <= i,j,j+1 <= n or " - "j = n and j2 = 1 and i2 = i + 1 and " - "1 <= i,i+1 <= n }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i,j] -> [i2,j2] : 1 <= j < j2 <= n and " - "1 <= i <= n and i = i2 or " - "1 <= i < i2 <= n and 1 <= j <= n and " - "1 <= j2 <= n }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map2); - isl_map_free(map); - - /* Omega's closure4 */ - map = isl_map_read_from_str(ctx, - "[m,n] -> { [x,y] -> [x2,y2] : x2 = x and y2 = y + 1 and " - "1 <= x,y <= 10 or " - "x2 = x + 1 and y2 = y and " - "1 <= x <= 20 && 5 <= y <= 15 }"); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - isl_map_free(map); - - map = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y]: 1 <= n <= y - x <= 10 }"); - map = isl_map_transitive_closure(map, &exact); - assert(!exact); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [x] -> [y] : 1 <= n <= 10 and y >= n + x }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n, m] -> { [i0, i1, i2, i3] -> [o0, o1, o2, o3] : " - "i3 = 1 and o0 = i0 and o1 = -1 + i1 and o2 = -1 + i2 and " - "o3 = -2 + i2 and i1 <= -1 + i0 and i1 >= 1 - m + i0 and " - "i1 >= 2 and i1 <= n and i2 >= 3 and i2 <= 1 + n and i2 <= m }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{[0] -> [1]; [2] -> [3]}"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_transitive_closure(map, &exact); - assert(exact); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n] -> { [[i0, i1, 1, 0, i0] -> [i5, 1]] -> " - "[[i0, -1 + i1, 2, 0, i0] -> [-1 + i5, 2]] : " - "exists (e0 = [(3 - n)/3]: i5 >= 2 and i1 >= 2 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); " - "[[i0, i1, 2, 0, i0] -> [i5, 1]] -> " - "[[i0, i1, 1, 0, i0] -> [-1 + i5, 2]] : " - "exists (e0 = [(3 - n)/3]: i5 >= 2 and i1 >= 1 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); " - "[[i0, i1, 1, 0, i0] -> [i5, 2]] -> " - "[[i0, -1 + i1, 2, 0, i0] -> [i5, 1]] : " - "exists (e0 = [(3 - n)/3]: i1 >= 2 and i5 >= 1 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); " - "[[i0, i1, 2, 0, i0] -> [i5, 2]] -> " - "[[i0, i1, 1, 0, i0] -> [i5, 1]] : " - "exists (e0 = [(3 - n)/3]: i5 >= 1 and i1 >= 1 and " - "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and " - "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_transitive_closure(map, NULL); - assert(map); - isl_map_free(map); -} - -void test_lex(struct isl_ctx *ctx) -{ - isl_space *dim; - isl_map *map; - - dim = isl_space_set_alloc(ctx, 0, 0); - map = isl_map_lex_le(dim); - assert(!isl_map_is_empty(map)); - isl_map_free(map); -} - -void test_lexmin(struct isl_ctx *ctx) -{ - const char *str; - isl_basic_map *bmap; - isl_map *map, *map2; - isl_set *set; - isl_set *set2; - isl_pw_multi_aff *pma; - - str = "[p0, p1] -> { [] -> [] : " - "exists (e0 = [(2p1)/3], e1, e2, e3 = [(3 - p1 + 3e0)/3], " - "e4 = [(p1)/3], e5 = [(p1 + 3e4)/3]: " - "3e0 >= -2 + 2p1 and 3e0 >= p1 and 3e3 >= 1 - p1 + 3e0 and " - "3e0 <= 2p1 and 3e3 >= -2 + p1 and 3e3 <= -1 + p1 and p1 >= 3 and " - "3e5 >= -2 + 2p1 and 3e5 >= p1 and 3e5 <= -1 + p1 + 3e4 and " - "3e4 <= p1 and 3e4 >= -2 + p1 and e3 <= -1 + e0 and " - "3e4 >= 6 - p1 + 3e1 and 3e1 >= p1 and 3e5 >= -2 + p1 + 3e4 and " - "2e4 >= 3 - p1 + 2e1 and e4 <= e1 and 3e3 <= 2 - p1 + 3e0 and " - "e5 >= 1 + e1 and 3e4 >= 6 - 2p1 + 3e1 and " - "p0 >= 2 and p1 >= p0 and 3e2 >= p1 and 3e4 >= 6 - p1 + 3e2 and " - "e2 <= e1 and e3 >= 1 and e4 <= e2) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_lexmin(map); - isl_map_free(map); - - str = "[C] -> { [obj,a,b,c] : obj <= 38 a + 7 b + 10 c and " - "a + b <= 1 and c <= 10 b and c <= C and a,b,c,C >= 0 }"; - set = isl_set_read_from_str(ctx, str); - set = isl_set_lexmax(set); - str = "[C] -> { [obj,a,b,c] : C = 8 }"; - set2 = isl_set_read_from_str(ctx, str); - set = isl_set_intersect(set, set2); - assert(!isl_set_is_empty(set)); - isl_set_free(set); - - str = "{ [x] -> [y] : x <= y <= 10; [x] -> [5] : -8 <= x <= 8 }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_lexmin(map); - str = "{ [x] -> [5] : 6 <= x <= 8; " - "[x] -> [x] : x <= 5 or (9 <= x <= 10) }"; - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [x] -> [y] : 4y = x or 4y = -1 + x or 4y = -2 + x }"; - map = isl_map_read_from_str(ctx, str); - map2 = isl_map_copy(map); - map = isl_map_lexmin(map); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [x] -> [y] : x = 4y; [x] -> [y] : x = 2y }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_lexmin(map); - str = "{ [x] -> [y] : (4y = x and x >= 0) or " - "(exists (e0 = [(x)/4], e1 = [(-2 + x)/4]: 2y = x and " - "4e1 = -2 + x and 4e0 <= -1 + x and 4e0 >= -3 + x)) or " - "(exists (e0 = [(x)/4]: 2y = x and 4e0 = x and x <= -4)) }"; - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [i] -> [i', j] : j = i - 8i' and i' >= 0 and i' <= 7 and " - " 8i' <= i and 8i' >= -7 + i }"; - bmap = isl_basic_map_read_from_str(ctx, str); - pma = isl_basic_map_lexmin_pw_multi_aff(isl_basic_map_copy(bmap)); - map2 = isl_map_from_pw_multi_aff(pma); - map = isl_map_from_basic_map(bmap); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ T[a] -> S[b, c] : a = 4b-2c and c >= b }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_lexmin(map); - str = "{ T[a] -> S[b, c] : 2b = a and 2c = a }"; - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); -} - -struct must_may { - isl_map *must; - isl_map *may; -}; - -static int collect_must_may(__isl_take isl_map *dep, int must, - void *dep_user, void *user) -{ - struct must_may *mm = (struct must_may *)user; - - if (must) - mm->must = isl_map_union(mm->must, dep); - else - mm->may = isl_map_union(mm->may, dep); - - return 0; -} - -static int common_space(void *first, void *second) -{ - int depth = *(int *)first; - return 2 * depth; -} - -static int map_is_equal(__isl_keep isl_map *map, const char *str) -{ - isl_map *map2; - int equal; - - if (!map) - return -1; - - map2 = isl_map_read_from_str(map->ctx, str); - equal = isl_map_is_equal(map, map2); - isl_map_free(map2); - - return equal; -} - -void test_dep(struct isl_ctx *ctx) -{ - const char *str; - isl_space *dim; - isl_map *map; - isl_access_info *ai; - isl_flow *flow; - int depth; - struct must_may mm; - - depth = 3; - - str = "{ [2,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - str = "{ [1,i,0] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_space_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_space_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [2,i,0] : (0 <= i <= 4) or (6 <= i <= 10); " - " [1,10,0] -> [2,5,0] }"; - assert(map_is_equal(mm.must, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.may, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [2,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - str = "{ [1,i,0] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_space_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_space_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [2,i,0] : (0 <= i <= 4) or (6 <= i <= 10) }"; - assert(map_is_equal(mm.must, str)); - str = "{ [0,5,0] -> [2,5,0]; [1,i,0] -> [2,5,0] : 0 <= i <= 10 }"; - assert(map_is_equal(mm.may, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [2,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - str = "{ [1,i,0] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_space_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_space_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [2,i,0] : 0 <= i <= 10; " - " [1,i,0] -> [2,5,0] : 0 <= i <= 10 }"; - assert(map_is_equal(mm.may, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.must, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [0,i,2] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - str = "{ [0,i,1] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_space_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_space_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [0,i,2] : 0 <= i <= 10; " - " [0,i,1] -> [0,5,2] : 0 <= i <= 5 }"; - assert(map_is_equal(mm.may, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.must, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - str = "{ [0,i,1] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_alloc(map, &depth, &common_space, 2); - - str = "{ [0,i,0] -> [i] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - str = "{ [0,i,2] -> [5] : 0 <= i <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 0, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_space_alloc(ctx, 0, 3, 3); - mm.must = isl_map_empty(isl_space_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0] -> [0,i,1] : 0 <= i <= 10; " - " [0,i,2] -> [0,5,1] : 0 <= i <= 4 }"; - assert(map_is_equal(mm.may, str)); - str = "{ [i,j,k] -> [l,m,n] : 1 = 0 }"; - assert(map_is_equal(mm.must, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); - - - depth = 5; - - str = "{ [1,i,0,0,0] -> [i,j] : 0 <= i <= 10 and 0 <= j <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_alloc(map, &depth, &common_space, 1); - - str = "{ [0,i,0,j,0] -> [i,j] : 0 <= i <= 10 and 0 <= j <= 10 }"; - map = isl_map_read_from_str(ctx, str); - ai = isl_access_info_add_source(ai, map, 1, &depth); - - flow = isl_access_info_compute_flow(ai); - dim = isl_space_alloc(ctx, 0, 5, 5); - mm.must = isl_map_empty(isl_space_copy(dim)); - mm.may = isl_map_empty(dim); - - isl_flow_foreach(flow, collect_must_may, &mm); - - str = "{ [0,i,0,j,0] -> [1,i,0,0,0] : 0 <= i,j <= 10 }"; - assert(map_is_equal(mm.must, str)); - str = "{ [0,0,0,0,0] -> [0,0,0,0,0] : 1 = 0 }"; - assert(map_is_equal(mm.may, str)); - - isl_map_free(mm.must); - isl_map_free(mm.may); - isl_flow_free(flow); -} - -int test_sv(isl_ctx *ctx) -{ - const char *str; - isl_map *map; - isl_union_map *umap; - int sv; - - str = "[N] -> { [i] -> [f] : 0 <= i <= N and 0 <= i - 10 f <= 9 }"; - map = isl_map_read_from_str(ctx, str); - sv = isl_map_is_single_valued(map); - isl_map_free(map); - if (sv < 0) - return -1; - if (!sv) - isl_die(ctx, isl_error_internal, - "map not detected as single valued", return -1); - - str = "[N] -> { [i] -> [f] : 0 <= i <= N and 0 <= i - 10 f <= 10 }"; - map = isl_map_read_from_str(ctx, str); - sv = isl_map_is_single_valued(map); - isl_map_free(map); - if (sv < 0) - return -1; - if (sv) - isl_die(ctx, isl_error_internal, - "map detected as single valued", return -1); - - str = "{ S1[i] -> [i] : 0 <= i <= 9; S2[i] -> [i] : 0 <= i <= 9 }"; - umap = isl_union_map_read_from_str(ctx, str); - sv = isl_union_map_is_single_valued(umap); - isl_union_map_free(umap); - if (sv < 0) - return -1; - if (!sv) - isl_die(ctx, isl_error_internal, - "map not detected as single valued", return -1); - - str = "{ [i] -> S1[i] : 0 <= i <= 9; [i] -> S2[i] : 0 <= i <= 9 }"; - umap = isl_union_map_read_from_str(ctx, str); - sv = isl_union_map_is_single_valued(umap); - isl_union_map_free(umap); - if (sv < 0) - return -1; - if (sv) - isl_die(ctx, isl_error_internal, - "map detected as single valued", return -1); - - return 0; -} - -void test_bijective_case(struct isl_ctx *ctx, const char *str, int bijective) -{ - isl_map *map; - - map = isl_map_read_from_str(ctx, str); - if (bijective) - assert(isl_map_is_bijective(map)); - else - assert(!isl_map_is_bijective(map)); - isl_map_free(map); -} - -void test_bijective(struct isl_ctx *ctx) -{ - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i] : j=i}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i] : j=0}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i] : j=N}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [j,i]}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i+j]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> []}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i,j,N]}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [2i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [i,i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [2i,i]}", 0); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [2i,j]}", 1); - test_bijective_case(ctx, "[N,M]->{[i,j] -> [x,y] : 2x=i & y =j}", 1); -} - -void test_pwqp(struct isl_ctx *ctx) -{ - const char *str; - isl_set *set; - isl_pw_qpolynomial *pwqp1, *pwqp2; - - str = "{ [i,j,k] -> 1 + 9 * [i/5] + 7 * [j/11] + 4 * [k/13] }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_move_dims(pwqp1, isl_dim_param, 0, - isl_dim_in, 1, 1); - - str = "[j] -> { [i,k] -> 1 + 9 * [i/5] + 7 * [j/11] + 4 * [k/13] }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> i }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [k] : exists a : k = 2a }"; - set = isl_set_read_from_str(ctx, str); - pwqp1 = isl_pw_qpolynomial_gist(pwqp1, set); - str = "{ [i] -> i }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> i + [ (i + [i/3])/2 ] }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [10] }"; - set = isl_set_read_from_str(ctx, str); - pwqp1 = isl_pw_qpolynomial_gist(pwqp1, set); - str = "{ [i] -> 16 }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> ([(i)/2]) }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [k] : exists a : k = 2a+1 }"; - set = isl_set_read_from_str(ctx, str); - pwqp1 = isl_pw_qpolynomial_gist(pwqp1, set); - str = "{ [i] -> -1/2 + 1/2 * i }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> ([([i/2] + [i/2])/5]) }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [i] -> ([(2 * [i/2])/5]) }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [x] -> ([x/2] + [(x+1)/2]) }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - str = "{ [x] -> x }"; - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - - isl_pw_qpolynomial_free(pwqp1); - - str = "{ [i] -> ([i/2]) : i >= 0; [i] -> ([i/3]) : i < 0 }"; - pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); - pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); - pwqp1 = isl_pw_qpolynomial_coalesce(pwqp1); - pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); - assert(isl_pw_qpolynomial_is_zero(pwqp1)); - isl_pw_qpolynomial_free(pwqp1); -} - -void test_split_periods(isl_ctx *ctx) -{ - const char *str; - isl_pw_qpolynomial *pwqp; - - str = "{ [U,V] -> 1/3 * U + 2/3 * V - [(U + 2V)/3] + [U/2] : " - "U + 2V + 3 >= 0 and - U -2V >= 0 and - U + 10 >= 0 and " - "U >= 0; [U,V] -> U^2 : U >= 100 }"; - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - - pwqp = isl_pw_qpolynomial_split_periods(pwqp, 2); - assert(pwqp); - - isl_pw_qpolynomial_free(pwqp); -} - -void test_union(isl_ctx *ctx) -{ - const char *str; - isl_union_set *uset1, *uset2; - isl_union_map *umap1, *umap2; - - str = "{ [i] : 0 <= i <= 1 }"; - uset1 = isl_union_set_read_from_str(ctx, str); - str = "{ [1] -> [0] }"; - umap1 = isl_union_map_read_from_str(ctx, str); - - umap2 = isl_union_set_lex_gt_union_set(isl_union_set_copy(uset1), uset1); - assert(isl_union_map_is_equal(umap1, umap2)); - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - - str = "{ A[i] -> B[i]; B[i] -> C[i]; A[0] -> C[1] }"; - umap1 = isl_union_map_read_from_str(ctx, str); - str = "{ A[i]; B[i] }"; - uset1 = isl_union_set_read_from_str(ctx, str); - - uset2 = isl_union_map_domain(umap1); - - assert(isl_union_set_is_equal(uset1, uset2)); - - isl_union_set_free(uset1); - isl_union_set_free(uset2); -} - -void test_bound(isl_ctx *ctx) -{ - const char *str; - isl_pw_qpolynomial *pwqp; - isl_pw_qpolynomial_fold *pwf; - - str = "{ [[a, b, c, d] -> [e]] -> 0 }"; - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - pwf = isl_pw_qpolynomial_bound(pwqp, isl_fold_max, NULL); - assert(isl_pw_qpolynomial_fold_dim(pwf, isl_dim_in) == 4); - isl_pw_qpolynomial_fold_free(pwf); - - str = "{ [[x]->[x]] -> 1 : exists a : x = 2 a }"; - pwqp = isl_pw_qpolynomial_read_from_str(ctx, str); - pwf = isl_pw_qpolynomial_bound(pwqp, isl_fold_max, NULL); - assert(isl_pw_qpolynomial_fold_dim(pwf, isl_dim_in) == 1); - isl_pw_qpolynomial_fold_free(pwf); -} - -void test_lift(isl_ctx *ctx) -{ - const char *str; - isl_basic_map *bmap; - isl_basic_set *bset; - - str = "{ [i0] : exists e0 : i0 = 4e0 }"; - bset = isl_basic_set_read_from_str(ctx, str); - bset = isl_basic_set_lift(bset); - bmap = isl_basic_map_from_range(bset); - bset = isl_basic_map_domain(bmap); - isl_basic_set_free(bset); -} - -void test_subset(isl_ctx *ctx) -{ - const char *str; - isl_set *set1, *set2; - - str = "{ [112, 0] }"; - set1 = isl_set_read_from_str(ctx, str); - str = "{ [i0, i1] : exists (e0 = [(i0 - i1)/16], e1: " - "16e0 <= i0 - i1 and 16e0 >= -15 + i0 - i1 and " - "16e1 <= i1 and 16e0 >= -i1 and 16e1 >= -i0 + i1) }"; - set2 = isl_set_read_from_str(ctx, str); - assert(isl_set_is_subset(set1, set2)); - isl_set_free(set1); - isl_set_free(set2); -} - -void test_factorize(isl_ctx *ctx) -{ - const char *str; - isl_basic_set *bset; - isl_factorizer *f; - - str = "{ [i0, i1, i2, i3, i4, i5, i6, i7] : 3i5 <= 2 - 2i0 and " - "i0 >= -2 and i6 >= 1 + i3 and i7 >= 0 and 3i5 >= -2i0 and " - "2i4 <= i2 and i6 >= 1 + 2i0 + 3i1 and i4 <= -1 and " - "i6 >= 1 + 2i0 + 3i5 and i6 <= 2 + 2i0 + 3i5 and " - "3i5 <= 2 - 2i0 - i2 + 3i4 and i6 <= 2 + 2i0 + 3i1 and " - "i0 <= -1 and i7 <= i2 + i3 - 3i4 - i6 and " - "3i5 >= -2i0 - i2 + 3i4 }"; - bset = isl_basic_set_read_from_str(ctx, str); - f = isl_basic_set_factorizer(bset); - assert(f); - isl_basic_set_free(bset); - isl_factorizer_free(f); - - str = "{ [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12] : " - "i12 <= 2 + i0 - i11 and 2i8 >= -i4 and i11 >= i1 and " - "3i5 <= -i2 and 2i11 >= -i4 - 2i7 and i11 <= 3 + i0 + 3i9 and " - "i11 <= -i4 - 2i7 and i12 >= -i10 and i2 >= -2 and " - "i11 >= i1 + 3i10 and i11 >= 1 + i0 + 3i9 and " - "i11 <= 1 - i4 - 2i8 and 6i6 <= 6 - i2 and 3i6 >= 1 - i2 and " - "i11 <= 2 + i1 and i12 <= i4 + i11 and i12 >= i0 - i11 and " - "3i5 >= -2 - i2 and i12 >= -1 + i4 + i11 and 3i3 <= 3 - i2 and " - "9i6 <= 11 - i2 + 6i5 and 3i3 >= 1 - i2 and " - "9i6 <= 5 - i2 + 6i3 and i12 <= -1 and i2 <= 0 }"; - bset = isl_basic_set_read_from_str(ctx, str); - f = isl_basic_set_factorizer(bset); - assert(f); - isl_basic_set_free(bset); - isl_factorizer_free(f); -} - -static int check_injective(__isl_take isl_map *map, void *user) -{ - int *injective = user; - - *injective = isl_map_is_injective(map); - isl_map_free(map); - - if (*injective < 0 || !*injective) - return -1; - - return 0; -} - -int test_one_schedule(isl_ctx *ctx, const char *d, const char *w, - const char *r, const char *s, int tilable, int parallel) -{ - int i; - isl_union_set *D; - isl_union_map *W, *R, *S; - isl_union_map *empty; - isl_union_map *dep_raw, *dep_war, *dep_waw, *dep; - isl_union_map *validity, *proximity; - isl_union_map *schedule; - isl_union_map *test; - isl_union_set *delta; - isl_union_set *domain; - isl_set *delta_set; - isl_set *slice; - isl_set *origin; - isl_schedule *sched; - int is_nonneg, is_parallel, is_tilable, is_injection, is_complete; - - D = isl_union_set_read_from_str(ctx, d); - W = isl_union_map_read_from_str(ctx, w); - R = isl_union_map_read_from_str(ctx, r); - S = isl_union_map_read_from_str(ctx, s); - - W = isl_union_map_intersect_domain(W, isl_union_set_copy(D)); - R = isl_union_map_intersect_domain(R, isl_union_set_copy(D)); - - empty = isl_union_map_empty(isl_union_map_get_space(S)); - isl_union_map_compute_flow(isl_union_map_copy(R), - isl_union_map_copy(W), empty, - isl_union_map_copy(S), - &dep_raw, NULL, NULL, NULL); - isl_union_map_compute_flow(isl_union_map_copy(W), - isl_union_map_copy(W), - isl_union_map_copy(R), - isl_union_map_copy(S), - &dep_waw, &dep_war, NULL, NULL); - - dep = isl_union_map_union(dep_waw, dep_war); - dep = isl_union_map_union(dep, dep_raw); - validity = isl_union_map_copy(dep); - proximity = isl_union_map_copy(dep); - - sched = isl_union_set_compute_schedule(isl_union_set_copy(D), - validity, proximity); - schedule = isl_schedule_get_map(sched); - isl_schedule_free(sched); - isl_union_map_free(W); - isl_union_map_free(R); - isl_union_map_free(S); - - is_injection = 1; - isl_union_map_foreach_map(schedule, &check_injective, &is_injection); - - domain = isl_union_map_domain(isl_union_map_copy(schedule)); - is_complete = isl_union_set_is_subset(D, domain); - isl_union_set_free(D); - isl_union_set_free(domain); - - test = isl_union_map_reverse(isl_union_map_copy(schedule)); - test = isl_union_map_apply_range(test, dep); - test = isl_union_map_apply_range(test, schedule); - - delta = isl_union_map_deltas(test); - if (isl_union_set_n_set(delta) == 0) { - is_tilable = 1; - is_parallel = 1; - is_nonneg = 1; - isl_union_set_free(delta); - } else { - delta_set = isl_set_from_union_set(delta); - - slice = isl_set_universe(isl_set_get_space(delta_set)); - for (i = 0; i < tilable; ++i) - slice = isl_set_lower_bound_si(slice, isl_dim_set, i, 0); - is_tilable = isl_set_is_subset(delta_set, slice); - isl_set_free(slice); - - slice = isl_set_universe(isl_set_get_space(delta_set)); - for (i = 0; i < parallel; ++i) - slice = isl_set_fix_si(slice, isl_dim_set, i, 0); - is_parallel = isl_set_is_subset(delta_set, slice); - isl_set_free(slice); - - origin = isl_set_universe(isl_set_get_space(delta_set)); - for (i = 0; i < isl_set_dim(origin, isl_dim_set); ++i) - origin = isl_set_fix_si(origin, isl_dim_set, i, 0); - - delta_set = isl_set_union(delta_set, isl_set_copy(origin)); - delta_set = isl_set_lexmin(delta_set); - - is_nonneg = isl_set_is_equal(delta_set, origin); - - isl_set_free(origin); - isl_set_free(delta_set); - } - - if (is_nonneg < 0 || is_parallel < 0 || is_tilable < 0 || - is_injection < 0 || is_complete < 0) - return -1; - if (!is_complete) - isl_die(ctx, isl_error_unknown, - "generated schedule incomplete", return -1); - if (!is_injection) - isl_die(ctx, isl_error_unknown, - "generated schedule not injective on each statement", - return -1); - if (!is_nonneg) - isl_die(ctx, isl_error_unknown, - "negative dependences in generated schedule", - return -1); - if (!is_tilable) - isl_die(ctx, isl_error_unknown, - "generated schedule not as tilable as expected", - return -1); - if (!is_parallel) - isl_die(ctx, isl_error_unknown, - "generated schedule not as parallel as expected", - return -1); - - return 0; -} - -int test_special_schedule(isl_ctx *ctx) -{ - const char *str; - isl_union_set *dom; - isl_union_map *empty; - isl_union_map *dep; - isl_union_map *sched1, *sched2; - isl_schedule *schedule; - int equal; - - str = "{ S[i,j] : 0 <= i <= 10 }"; - dom = isl_union_set_read_from_str(ctx, str); - str = "{ S[i,j] -> S[i+1,j] : 0 <= i,j <= 10 }"; - dep = isl_union_map_read_from_str(ctx, str); - empty = isl_union_map_read_from_str(ctx, "{}"); - schedule = isl_union_set_compute_schedule(dom, empty, dep); - sched1 = isl_schedule_get_map(schedule); - isl_schedule_free(schedule); - - str = "{ S[i, j] -> [j, i] }"; - sched2 = isl_union_map_read_from_str(ctx, str); - - equal = isl_union_map_is_equal(sched1, sched2); - isl_union_map_free(sched1); - isl_union_map_free(sched2); - - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected schedule", - return -1); - - return 0; -} - -int test_schedule(isl_ctx *ctx) -{ - const char *D, *W, *R, *S; - - /* Jacobi */ - D = "[T,N] -> { S1[t,i] : 1 <= t <= T and 2 <= i <= N - 1 }"; - W = "{ S1[t,i] -> a[t,i] }"; - R = "{ S1[t,i] -> a[t-1,i]; S1[t,i] -> a[t-1,i-1]; " - "S1[t,i] -> a[t-1,i+1] }"; - S = "{ S1[t,i] -> [t,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 0) < 0) - return -1; - - /* Fig. 5 of CC2008 */ - D = "[N] -> { S_0[i, j] : i >= 0 and i <= -1 + N and j >= 2 and " - "j <= -1 + N }"; - W = "[N] -> { S_0[i, j] -> a[i, j] : i >= 0 and i <= -1 + N and " - "j >= 2 and j <= -1 + N }"; - R = "[N] -> { S_0[i, j] -> a[j, i] : i >= 0 and i <= -1 + N and " - "j >= 2 and j <= -1 + N; " - "S_0[i, j] -> a[i, -1 + j] : i >= 0 and i <= -1 + N and " - "j >= 2 and j <= -1 + N }"; - S = "[N] -> { S_0[i, j] -> [0, i, 0, j, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 0) < 0) - return -1; - - D = "{ S1[i] : 0 <= i <= 10; S2[i] : 0 <= i <= 9 }"; - W = "{ S1[i] -> a[i] }"; - R = "{ S2[i] -> a[i+1] }"; - S = "{ S1[i] -> [0,i]; S2[i] -> [1,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 1) < 0) - return -1; - - D = "{ S1[i] : 0 <= i < 10; S2[i] : 0 <= i < 10 }"; - W = "{ S1[i] -> a[i] }"; - R = "{ S2[i] -> a[9-i] }"; - S = "{ S1[i] -> [0,i]; S2[i] -> [1,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 1) < 0) - return -1; - - D = "[N] -> { S1[i] : 0 <= i < N; S2[i] : 0 <= i < N }"; - W = "{ S1[i] -> a[i] }"; - R = "[N] -> { S2[i] -> a[N-1-i] }"; - S = "{ S1[i] -> [0,i]; S2[i] -> [1,i] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 1) < 0) - return -1; - - D = "{ S1[i] : 0 < i < 10; S2[i] : 0 <= i < 10 }"; - W = "{ S1[i] -> a[i]; S2[i] -> b[i] }"; - R = "{ S2[i] -> a[i]; S1[i] -> b[i-1] }"; - S = "{ S1[i] -> [i,0]; S2[i] -> [i,1] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "[N] -> { S1[i] : 1 <= i <= N; S2[i,j] : 1 <= i,j <= N }"; - W = "{ S1[i] -> a[0,i]; S2[i,j] -> a[i,j] }"; - R = "{ S2[i,j] -> a[i-1,j] }"; - S = "{ S1[i] -> [0,i,0]; S2[i,j] -> [1,i,j] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 1) < 0) - return -1; - - D = "[N] -> { S1[i] : 1 <= i <= N; S2[i,j] : 1 <= i,j <= N }"; - W = "{ S1[i] -> a[i,0]; S2[i,j] -> a[i,j] }"; - R = "{ S2[i,j] -> a[i,j-1] }"; - S = "{ S1[i] -> [0,i,0]; S2[i,j] -> [1,i,j] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 1) < 0) - return -1; - - D = "[N] -> { S_0[]; S_1[i] : i >= 0 and i <= -1 + N; S_2[] }"; - W = "[N] -> { S_0[] -> a[0]; S_2[] -> b[0]; " - "S_1[i] -> a[1 + i] : i >= 0 and i <= -1 + N }"; - R = "[N] -> { S_2[] -> a[N]; S_1[i] -> a[i] : i >= 0 and i <= -1 + N }"; - S = "[N] -> { S_1[i] -> [1, i, 0]; S_2[] -> [2, 0, 1]; " - "S_0[] -> [0, 0, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 1, 0) < 0) - return -1; - ctx->opt->schedule_parametric = 0; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - ctx->opt->schedule_parametric = 1; - - D = "[N] -> { S1[i] : 1 <= i <= N; S2[i] : 1 <= i <= N; " - "S3[i,j] : 1 <= i,j <= N; S4[i] : 1 <= i <= N }"; - W = "{ S1[i] -> a[i,0]; S2[i] -> a[0,i]; S3[i,j] -> a[i,j] }"; - R = "[N] -> { S3[i,j] -> a[i-1,j]; S3[i,j] -> a[i,j-1]; " - "S4[i] -> a[i,N] }"; - S = "{ S1[i] -> [0,i,0]; S2[i] -> [1,i,0]; S3[i,j] -> [2,i,j]; " - "S4[i] -> [4,i,0] }"; - if (test_one_schedule(ctx, D, W, R, S, 2, 0) < 0) - return -1; - - D = "[N] -> { S_0[i, j] : i >= 1 and i <= N and j >= 1 and j <= N }"; - W = "[N] -> { S_0[i, j] -> s[0] : i >= 1 and i <= N and j >= 1 and " - "j <= N }"; - R = "[N] -> { S_0[i, j] -> s[0] : i >= 1 and i <= N and j >= 1 and " - "j <= N; " - "S_0[i, j] -> a[i, j] : i >= 1 and i <= N and j >= 1 and " - "j <= N }"; - S = "[N] -> { S_0[i, j] -> [0, i, 0, j, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "[N] -> { S_0[t] : t >= 0 and t <= -1 + N; " - " S_2[t] : t >= 0 and t <= -1 + N; " - " S_1[t, i] : t >= 0 and t <= -1 + N and i >= 0 and " - "i <= -1 + N }"; - W = "[N] -> { S_0[t] -> a[t, 0] : t >= 0 and t <= -1 + N; " - " S_2[t] -> b[t] : t >= 0 and t <= -1 + N; " - " S_1[t, i] -> a[t, 1 + i] : t >= 0 and t <= -1 + N and " - "i >= 0 and i <= -1 + N }"; - R = "[N] -> { S_1[t, i] -> a[t, i] : t >= 0 and t <= -1 + N and " - "i >= 0 and i <= -1 + N; " - " S_2[t] -> a[t, N] : t >= 0 and t <= -1 + N }"; - S = "[N] -> { S_2[t] -> [0, t, 2]; S_1[t, i] -> [0, t, 1, i, 0]; " - " S_0[t] -> [0, t, 0] }"; - - if (test_one_schedule(ctx, D, W, R, S, 2, 1) < 0) - return -1; - ctx->opt->schedule_parametric = 0; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - ctx->opt->schedule_parametric = 1; - - D = "[N] -> { S1[i,j] : 0 <= i,j < N; S2[i,j] : 0 <= i,j < N }"; - S = "{ S1[i,j] -> [0,i,j]; S2[i,j] -> [1,i,j] }"; - if (test_one_schedule(ctx, D, "{}", "{}", S, 2, 2) < 0) - return -1; - - D = "[M, N] -> { S_1[i] : i >= 0 and i <= -1 + M; " - "S_0[i, j] : i >= 0 and i <= -1 + M and j >= 0 and j <= -1 + N }"; - W = "[M, N] -> { S_0[i, j] -> a[j] : i >= 0 and i <= -1 + M and " - "j >= 0 and j <= -1 + N; " - "S_1[i] -> b[0] : i >= 0 and i <= -1 + M }"; - R = "[M, N] -> { S_0[i, j] -> a[0] : i >= 0 and i <= -1 + M and " - "j >= 0 and j <= -1 + N; " - "S_1[i] -> b[0] : i >= 0 and i <= -1 + M }"; - S = "[M, N] -> { S_1[i] -> [1, i, 0]; S_0[i, j] -> [0, i, 0, j, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "{ S_0[i] : i >= 0 }"; - W = "{ S_0[i] -> a[i] : i >= 0 }"; - R = "{ S_0[i] -> a[0] : i >= 0 }"; - S = "{ S_0[i] -> [0, i, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "{ S_0[i] : i >= 0; S_1[i] : i >= 0 }"; - W = "{ S_0[i] -> a[i] : i >= 0; S_1[i] -> b[i] : i >= 0 }"; - R = "{ S_0[i] -> b[0] : i >= 0; S_1[i] -> a[i] : i >= 0 }"; - S = "{ S_1[i] -> [0, i, 1]; S_0[i] -> [0, i, 0] }"; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - - D = "[n] -> { S_0[j, k] : j <= -1 + n and j >= 0 and " - "k <= -1 + n and k >= 0 }"; - W = "[n] -> { S_0[j, k] -> B[j] : j <= -1 + n and j >= 0 and " "k <= -1 + n and k >= 0 }"; - R = "[n] -> { S_0[j, k] -> B[j] : j <= -1 + n and j >= 0 and " - "k <= -1 + n and k >= 0; " - "S_0[j, k] -> B[k] : j <= -1 + n and j >= 0 and " - "k <= -1 + n and k >= 0; " - "S_0[j, k] -> A[k] : j <= -1 + n and j >= 0 and " - "k <= -1 + n and k >= 0 }"; - S = "[n] -> { S_0[j, k] -> [2, j, k] }"; - ctx->opt->schedule_outer_zero_distance = 1; - if (test_one_schedule(ctx, D, W, R, S, 0, 0) < 0) - return -1; - ctx->opt->schedule_outer_zero_distance = 0; - - return test_special_schedule(ctx); -} - -int test_plain_injective(isl_ctx *ctx, const char *str, int injective) -{ - isl_union_map *umap; - int test; - - umap = isl_union_map_read_from_str(ctx, str); - test = isl_union_map_plain_is_injective(umap); - isl_union_map_free(umap); - if (test < 0) - return -1; - if (test == injective) - return 0; - if (injective) - isl_die(ctx, isl_error_unknown, - "map not detected as injective", return -1); - else - isl_die(ctx, isl_error_unknown, - "map detected as injective", return -1); -} - -int test_injective(isl_ctx *ctx) -{ - const char *str; - - if (test_plain_injective(ctx, "{S[i,j] -> A[0]; T[i,j] -> B[1]}", 0)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0]; T[] -> B[0]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0]; T[] -> A[1]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0]; T[] -> A[0]}", 0)) - return -1; - if (test_plain_injective(ctx, "{S[i] -> A[i,0]; T[i] -> A[i,1]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[i] -> A[i]; T[i] -> A[i]}", 0)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0,0]; T[] -> A[0,1]}", 1)) - return -1; - if (test_plain_injective(ctx, "{S[] -> A[0,0]; T[] -> A[1,0]}", 1)) - return -1; - - str = "{S[] -> A[0,0]; T[] -> A[0,1]; U[] -> A[1,0]}"; - if (test_plain_injective(ctx, str, 1)) - return -1; - str = "{S[] -> A[0,0]; T[] -> A[0,1]; U[] -> A[0,0]}"; - if (test_plain_injective(ctx, str, 0)) - return -1; - - return 0; -} - -int test_aff(isl_ctx *ctx) -{ - const char *str; - isl_set *set; - isl_space *dim; - isl_local_space *ls; - isl_aff *aff; - int zero; - - dim = isl_space_set_alloc(ctx, 0, 1); - ls = isl_local_space_from_space(dim); - aff = isl_aff_zero_on_domain(ls); - - aff = isl_aff_add_coefficient_si(aff, isl_dim_in, 0, 1); - aff = isl_aff_scale_down_ui(aff, 3); - aff = isl_aff_floor(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_in, 0, 1); - aff = isl_aff_scale_down_ui(aff, 2); - aff = isl_aff_floor(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_in, 0, 1); - - str = "{ [10] }"; - set = isl_set_read_from_str(ctx, str); - aff = isl_aff_gist(aff, set); - - aff = isl_aff_add_constant_si(aff, -16); - zero = isl_aff_plain_is_zero(aff); - isl_aff_free(aff); - - if (zero < 0) - return -1; - if (!zero) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -int test_dim_max(isl_ctx *ctx) -{ - int equal; - const char *str; - isl_set *set1, *set2; - isl_set *set; - isl_map *map; - isl_pw_aff *pwaff; - - str = "[N] -> { [i] : 0 <= i <= min(N,10) }"; - set = isl_set_read_from_str(ctx, str); - pwaff = isl_set_dim_max(set, 0); - set1 = isl_set_from_pw_aff(pwaff); - str = "[N] -> { [10] : N >= 10; [N] : N <= 9 and N >= 0 }"; - set2 = isl_set_read_from_str(ctx, str); - equal = isl_set_is_equal(set1, set2); - isl_set_free(set1); - isl_set_free(set2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - str = "[N] -> { [i] : 0 <= i <= max(2N,N+6) }"; - set = isl_set_read_from_str(ctx, str); - pwaff = isl_set_dim_max(set, 0); - set1 = isl_set_from_pw_aff(pwaff); - str = "[N] -> { [6 + N] : -6 <= N <= 5; [2N] : N >= 6 }"; - set2 = isl_set_read_from_str(ctx, str); - equal = isl_set_is_equal(set1, set2); - isl_set_free(set1); - isl_set_free(set2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - str = "[N] -> { [i] : 0 <= i <= 2N or 0 <= i <= N+6 }"; - set = isl_set_read_from_str(ctx, str); - pwaff = isl_set_dim_max(set, 0); - set1 = isl_set_from_pw_aff(pwaff); - str = "[N] -> { [6 + N] : -6 <= N <= 5; [2N] : N >= 6 }"; - set2 = isl_set_read_from_str(ctx, str); - equal = isl_set_is_equal(set1, set2); - isl_set_free(set1); - isl_set_free(set2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - str = "[N,M] -> { [i,j] -> [([i/16]), i%16, ([j/16]), j%16] : " - "0 <= i < N and 0 <= j < M }"; - map = isl_map_read_from_str(ctx, str); - set = isl_map_range(map); - - pwaff = isl_set_dim_max(isl_set_copy(set), 0); - set1 = isl_set_from_pw_aff(pwaff); - str = "[N,M] -> { [([(N-1)/16])] : M,N > 0 }"; - set2 = isl_set_read_from_str(ctx, str); - equal = isl_set_is_equal(set1, set2); - isl_set_free(set1); - isl_set_free(set2); - - pwaff = isl_set_dim_max(isl_set_copy(set), 3); - set1 = isl_set_from_pw_aff(pwaff); - str = "[N,M] -> { [t] : t = min(M-1,15) and M,N > 0 }"; - set2 = isl_set_read_from_str(ctx, str); - if (equal >= 0 && equal) - equal = isl_set_is_equal(set1, set2); - isl_set_free(set1); - isl_set_free(set2); - - isl_set_free(set); - - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -int test_product(isl_ctx *ctx) -{ - const char *str; - isl_set *set; - int ok; - - str = "{ A[i] }"; - set = isl_set_read_from_str(ctx, str); - set = isl_set_product(set, isl_set_copy(set)); - ok = isl_set_is_wrapping(set); - isl_set_free(set); - if (ok < 0) - return -1; - if (!ok) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -int test_equal(isl_ctx *ctx) -{ - const char *str; - isl_set *set, *set2; - int equal; - - str = "{ S_6[i] }"; - set = isl_set_read_from_str(ctx, str); - str = "{ S_7[i] }"; - set2 = isl_set_read_from_str(ctx, str); - equal = isl_set_is_equal(set, set2); - isl_set_free(set); - isl_set_free(set2); - if (equal < 0) - return -1; - if (equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -static int test_plain_fixed(isl_ctx *ctx, __isl_take isl_map *map, - enum isl_dim_type type, unsigned pos, int fixed) -{ - int test; - - test = isl_map_plain_is_fixed(map, type, pos, NULL); - isl_map_free(map); - if (test < 0) - return -1; - if (test == fixed) - return 0; - if (fixed) - isl_die(ctx, isl_error_unknown, - "map not detected as fixed", return -1); - else - isl_die(ctx, isl_error_unknown, - "map detected as fixed", return -1); -} - -int test_fixed(isl_ctx *ctx) -{ - const char *str; - isl_map *map; - - str = "{ [i] -> [i] }"; - map = isl_map_read_from_str(ctx, str); - if (test_plain_fixed(ctx, map, isl_dim_out, 0, 0)) - return -1; - str = "{ [i] -> [1] }"; - map = isl_map_read_from_str(ctx, str); - if (test_plain_fixed(ctx, map, isl_dim_out, 0, 1)) - return -1; - str = "{ S_1[p1] -> [o0] : o0 = -2 and p1 >= 1 and p1 <= 7 }"; - map = isl_map_read_from_str(ctx, str); - if (test_plain_fixed(ctx, map, isl_dim_out, 0, 1)) - return -1; - map = isl_map_read_from_str(ctx, str); - map = isl_map_neg(map); - if (test_plain_fixed(ctx, map, isl_dim_out, 0, 1)) - return -1; - - return 0; -} - -int test_union_pw(isl_ctx *ctx) -{ - int equal; - const char *str; - isl_union_set *uset; - isl_union_pw_qpolynomial *upwqp1, *upwqp2; - - str = "{ [x] -> x^2 }"; - upwqp1 = isl_union_pw_qpolynomial_read_from_str(ctx, str); - upwqp2 = isl_union_pw_qpolynomial_copy(upwqp1); - uset = isl_union_pw_qpolynomial_domain(upwqp1); - upwqp1 = isl_union_pw_qpolynomial_copy(upwqp2); - upwqp1 = isl_union_pw_qpolynomial_intersect_domain(upwqp1, uset); - equal = isl_union_pw_qpolynomial_plain_is_equal(upwqp1, upwqp2); - isl_union_pw_qpolynomial_free(upwqp1); - isl_union_pw_qpolynomial_free(upwqp2); - if (equal < 0) - return -1; - if (!equal) - isl_die(ctx, isl_error_unknown, "unexpected result", return -1); - - return 0; -} - -int main() -{ - struct isl_ctx *ctx; - - srcdir = getenv("srcdir"); - assert(srcdir); - - ctx = isl_ctx_alloc(); - if (test_fixed(ctx) < 0) - goto error; - if (test_equal(ctx) < 0) - goto error; - if (test_product(ctx) < 0) - goto error; - if (test_dim_max(ctx) < 0) - goto error; - if (test_aff(ctx) < 0) - goto error; - if (test_injective(ctx) < 0) - goto error; - if (test_schedule(ctx) < 0) - goto error; - if (test_union_pw(ctx) < 0) - goto error; - test_factorize(ctx); - test_subset(ctx); - test_lift(ctx); - test_bound(ctx); - test_union(ctx); - test_split_periods(ctx); - test_parse(ctx); - test_pwqp(ctx); - test_lex(ctx); - if (test_sv(ctx) < 0) - goto error; - test_bijective(ctx); - test_dep(ctx); - test_read(ctx); - test_bounded(ctx); - test_construction(ctx); - test_dim(ctx); - test_div(ctx); - test_application(ctx); - test_affine_hull(ctx); - test_convex_hull(ctx); - test_gist(ctx); - test_coalesce(ctx); - test_closure(ctx); - test_lexmin(ctx); - isl_ctx_free(ctx); - return 0; -error: - isl_ctx_free(ctx); - return -1; -} diff --git a/cloog-0.17.0/isl/isl_transitive_closure.c b/cloog-0.17.0/isl/isl_transitive_closure.c deleted file mode 100644 index 20e020e33bd50ec881a24666cd2ea63b80e80337..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_transitive_closure.c +++ /dev/null @@ -1,3104 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -int isl_map_is_transitively_closed(__isl_keep isl_map *map) -{ - isl_map *map2; - int closed; - - map2 = isl_map_apply_range(isl_map_copy(map), isl_map_copy(map)); - closed = isl_map_is_subset(map2, map); - isl_map_free(map2); - - return closed; -} - -int isl_union_map_is_transitively_closed(__isl_keep isl_union_map *umap) -{ - isl_union_map *umap2; - int closed; - - umap2 = isl_union_map_apply_range(isl_union_map_copy(umap), - isl_union_map_copy(umap)); - closed = isl_union_map_is_subset(umap2, umap); - isl_union_map_free(umap2); - - return closed; -} - -/* Given a map that represents a path with the length of the path - * encoded as the difference between the last output coordindate - * and the last input coordinate, set this length to either - * exactly "length" (if "exactly" is set) or at least "length" - * (if "exactly" is not set). - */ -static __isl_give isl_map *set_path_length(__isl_take isl_map *map, - int exactly, int length) -{ - isl_space *dim; - struct isl_basic_map *bmap; - unsigned d; - unsigned nparam; - int k; - isl_int *c; - - if (!map) - return NULL; - - dim = isl_map_get_space(map); - d = isl_space_dim(dim, isl_dim_in); - nparam = isl_space_dim(dim, isl_dim_param); - bmap = isl_basic_map_alloc_space(dim, 0, 1, 1); - if (exactly) { - k = isl_basic_map_alloc_equality(bmap); - c = bmap->eq[k]; - } else { - k = isl_basic_map_alloc_inequality(bmap); - c = bmap->ineq[k]; - } - if (k < 0) - goto error; - isl_seq_clr(c, 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(c[0], -length); - isl_int_set_si(c[1 + nparam + d - 1], -1); - isl_int_set_si(c[1 + nparam + d + d - 1], 1); - - bmap = isl_basic_map_finalize(bmap); - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; -error: - isl_basic_map_free(bmap); - isl_map_free(map); - return NULL; -} - -/* Check whether the overapproximation of the power of "map" is exactly - * the power of "map". Let R be "map" and A_k the overapproximation. - * The approximation is exact if - * - * A_1 = R - * A_k = A_{k-1} \circ R k >= 2 - * - * Since A_k is known to be an overapproximation, we only need to check - * - * A_1 \subset R - * A_k \subset A_{k-1} \circ R k >= 2 - * - * In practice, "app" has an extra input and output coordinate - * to encode the length of the path. So, we first need to add - * this coordinate to "map" and set the length of the path to - * one. - */ -static int check_power_exactness(__isl_take isl_map *map, - __isl_take isl_map *app) -{ - int exact; - isl_map *app_1; - isl_map *app_2; - - map = isl_map_add_dims(map, isl_dim_in, 1); - map = isl_map_add_dims(map, isl_dim_out, 1); - map = set_path_length(map, 1, 1); - - app_1 = set_path_length(isl_map_copy(app), 1, 1); - - exact = isl_map_is_subset(app_1, map); - isl_map_free(app_1); - - if (!exact || exact < 0) { - isl_map_free(app); - isl_map_free(map); - return exact; - } - - app_1 = set_path_length(isl_map_copy(app), 0, 1); - app_2 = set_path_length(app, 0, 2); - app_1 = isl_map_apply_range(map, app_1); - - exact = isl_map_is_subset(app_2, app_1); - - isl_map_free(app_1); - isl_map_free(app_2); - - return exact; -} - -/* Check whether the overapproximation of the power of "map" is exactly - * the power of "map", possibly after projecting out the power (if "project" - * is set). - * - * If "project" is set and if "steps" can only result in acyclic paths, - * then we check - * - * A = R \cup (A \circ R) - * - * where A is the overapproximation with the power projected out, i.e., - * an overapproximation of the transitive closure. - * More specifically, since A is known to be an overapproximation, we check - * - * A \subset R \cup (A \circ R) - * - * Otherwise, we check if the power is exact. - * - * Note that "app" has an extra input and output coordinate to encode - * the length of the part. If we are only interested in the transitive - * closure, then we can simply project out these coordinates first. - */ -static int check_exactness(__isl_take isl_map *map, __isl_take isl_map *app, - int project) -{ - isl_map *test; - int exact; - unsigned d; - - if (!project) - return check_power_exactness(map, app); - - d = isl_map_dim(map, isl_dim_in); - app = set_path_length(app, 0, 1); - app = isl_map_project_out(app, isl_dim_in, d, 1); - app = isl_map_project_out(app, isl_dim_out, d, 1); - - app = isl_map_reset_space(app, isl_map_get_space(map)); - - test = isl_map_apply_range(isl_map_copy(map), isl_map_copy(app)); - test = isl_map_union(test, isl_map_copy(map)); - - exact = isl_map_is_subset(app, test); - - isl_map_free(app); - isl_map_free(test); - - isl_map_free(map); - - return exact; -} - -/* - * The transitive closure implementation is based on the paper - * "Computing the Transitive Closure of a Union of Affine Integer - * Tuple Relations" by Anna Beletska, Denis Barthou, Wlodzimierz Bielecki and - * Albert Cohen. - */ - -/* Given a set of n offsets v_i (the rows of "steps"), construct a relation - * of the given dimension specification (Z^{n+1} -> Z^{n+1}) - * that maps an element x to any element that can be reached - * by taking a non-negative number of steps along any of - * the extended offsets v'_i = [v_i 1]. - * That is, construct - * - * { [x] -> [y] : exists k_i >= 0, y = x + \sum_i k_i v'_i } - * - * For any element in this relation, the number of steps taken - * is equal to the difference in the final coordinates. - */ -static __isl_give isl_map *path_along_steps(__isl_take isl_space *dim, - __isl_keep isl_mat *steps) -{ - int i, j, k; - struct isl_basic_map *path = NULL; - unsigned d; - unsigned n; - unsigned nparam; - - if (!dim || !steps) - goto error; - - d = isl_space_dim(dim, isl_dim_in); - n = steps->n_row; - nparam = isl_space_dim(dim, isl_dim_param); - - path = isl_basic_map_alloc_space(isl_space_copy(dim), n, d, n); - - for (i = 0; i < n; ++i) { - k = isl_basic_map_alloc_div(path); - if (k < 0) - goto error; - isl_assert(steps->ctx, i == k, goto error); - isl_int_set_si(path->div[k][0], 0); - } - - for (i = 0; i < d; ++i) { - k = isl_basic_map_alloc_equality(path); - if (k < 0) - goto error; - isl_seq_clr(path->eq[k], 1 + isl_basic_map_total_dim(path)); - isl_int_set_si(path->eq[k][1 + nparam + i], 1); - isl_int_set_si(path->eq[k][1 + nparam + d + i], -1); - if (i == d - 1) - for (j = 0; j < n; ++j) - isl_int_set_si(path->eq[k][1 + nparam + 2 * d + j], 1); - else - for (j = 0; j < n; ++j) - isl_int_set(path->eq[k][1 + nparam + 2 * d + j], - steps->row[j][i]); - } - - for (i = 0; i < n; ++i) { - k = isl_basic_map_alloc_inequality(path); - if (k < 0) - goto error; - isl_seq_clr(path->ineq[k], 1 + isl_basic_map_total_dim(path)); - isl_int_set_si(path->ineq[k][1 + nparam + 2 * d + i], 1); - } - - isl_space_free(dim); - - path = isl_basic_map_simplify(path); - path = isl_basic_map_finalize(path); - return isl_map_from_basic_map(path); -error: - isl_space_free(dim); - isl_basic_map_free(path); - return NULL; -} - -#define IMPURE 0 -#define PURE_PARAM 1 -#define PURE_VAR 2 -#define MIXED 3 - -/* Check whether the parametric constant term of constraint c is never - * positive in "bset". - */ -static int parametric_constant_never_positive(__isl_keep isl_basic_set *bset, - isl_int *c, int *div_purity) -{ - unsigned d; - unsigned n_div; - unsigned nparam; - int i; - int k; - int empty; - - n_div = isl_basic_set_dim(bset, isl_dim_div); - d = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_cow(bset); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - isl_seq_clr(bset->ineq[k], 1 + isl_basic_set_total_dim(bset)); - isl_seq_cpy(bset->ineq[k], c, 1 + nparam); - for (i = 0; i < n_div; ++i) { - if (div_purity[i] != PURE_PARAM) - continue; - isl_int_set(bset->ineq[k][1 + nparam + d + i], - c[1 + nparam + d + i]); - } - isl_int_sub_ui(bset->ineq[k][0], bset->ineq[k][0], 1); - empty = isl_basic_set_is_empty(bset); - isl_basic_set_free(bset); - - return empty; -error: - isl_basic_set_free(bset); - return -1; -} - -/* Return PURE_PARAM if only the coefficients of the parameters are non-zero. - * Return PURE_VAR if only the coefficients of the set variables are non-zero. - * Return MIXED if only the coefficients of the parameters and the set - * variables are non-zero and if moreover the parametric constant - * can never attain positive values. - * Return IMPURE otherwise. - * - * If div_purity is NULL then we are dealing with a non-parametric set - * and so the constraint is obviously PURE_VAR. - */ -static int purity(__isl_keep isl_basic_set *bset, isl_int *c, int *div_purity, - int eq) -{ - unsigned d; - unsigned n_div; - unsigned nparam; - int empty; - int i; - int p = 0, v = 0; - - if (!div_purity) - return PURE_VAR; - - n_div = isl_basic_set_dim(bset, isl_dim_div); - d = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - for (i = 0; i < n_div; ++i) { - if (isl_int_is_zero(c[1 + nparam + d + i])) - continue; - switch (div_purity[i]) { - case PURE_PARAM: p = 1; break; - case PURE_VAR: v = 1; break; - default: return IMPURE; - } - } - if (!p && isl_seq_first_non_zero(c + 1, nparam) == -1) - return PURE_VAR; - if (!v && isl_seq_first_non_zero(c + 1 + nparam, d) == -1) - return PURE_PARAM; - - empty = parametric_constant_never_positive(bset, c, div_purity); - if (eq && empty >= 0 && !empty) { - isl_seq_neg(c, c, 1 + nparam + d + n_div); - empty = parametric_constant_never_positive(bset, c, div_purity); - } - - return empty < 0 ? -1 : empty ? MIXED : IMPURE; -} - -/* Return an array of integers indicating the type of each div in bset. - * If the div is (recursively) defined in terms of only the parameters, - * then the type is PURE_PARAM. - * If the div is (recursively) defined in terms of only the set variables, - * then the type is PURE_VAR. - * Otherwise, the type is IMPURE. - */ -static __isl_give int *get_div_purity(__isl_keep isl_basic_set *bset) -{ - int i, j; - int *div_purity; - unsigned d; - unsigned n_div; - unsigned nparam; - - if (!bset) - return NULL; - - n_div = isl_basic_set_dim(bset, isl_dim_div); - d = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - div_purity = isl_alloc_array(bset->ctx, int, n_div); - if (!div_purity) - return NULL; - - for (i = 0; i < bset->n_div; ++i) { - int p = 0, v = 0; - if (isl_int_is_zero(bset->div[i][0])) { - div_purity[i] = IMPURE; - continue; - } - if (isl_seq_first_non_zero(bset->div[i] + 2, nparam) != -1) - p = 1; - if (isl_seq_first_non_zero(bset->div[i] + 2 + nparam, d) != -1) - v = 1; - for (j = 0; j < i; ++j) { - if (isl_int_is_zero(bset->div[i][2 + nparam + d + j])) - continue; - switch (div_purity[j]) { - case PURE_PARAM: p = 1; break; - case PURE_VAR: v = 1; break; - default: p = v = 1; break; - } - } - div_purity[i] = v ? p ? IMPURE : PURE_VAR : PURE_PARAM; - } - - return div_purity; -} - -/* Given a path with the as yet unconstrained length at position "pos", - * check if setting the length to zero results in only the identity - * mapping. - */ -static int empty_path_is_identity(__isl_keep isl_basic_map *path, unsigned pos) -{ - isl_basic_map *test = NULL; - isl_basic_map *id = NULL; - int k; - int is_id; - - test = isl_basic_map_copy(path); - test = isl_basic_map_extend_constraints(test, 1, 0); - k = isl_basic_map_alloc_equality(test); - if (k < 0) - goto error; - isl_seq_clr(test->eq[k], 1 + isl_basic_map_total_dim(test)); - isl_int_set_si(test->eq[k][pos], 1); - id = isl_basic_map_identity(isl_basic_map_get_space(path)); - is_id = isl_basic_map_is_equal(test, id); - isl_basic_map_free(test); - isl_basic_map_free(id); - return is_id; -error: - isl_basic_map_free(test); - return -1; -} - -/* If any of the constraints is found to be impure then this function - * sets *impurity to 1. - */ -static __isl_give isl_basic_map *add_delta_constraints( - __isl_take isl_basic_map *path, - __isl_keep isl_basic_set *delta, unsigned off, unsigned nparam, - unsigned d, int *div_purity, int eq, int *impurity) -{ - int i, k; - int n = eq ? delta->n_eq : delta->n_ineq; - isl_int **delta_c = eq ? delta->eq : delta->ineq; - unsigned n_div; - - n_div = isl_basic_set_dim(delta, isl_dim_div); - - for (i = 0; i < n; ++i) { - isl_int *path_c; - int p = purity(delta, delta_c[i], div_purity, eq); - if (p < 0) - goto error; - if (p != PURE_VAR && p != PURE_PARAM && !*impurity) - *impurity = 1; - if (p == IMPURE) - continue; - if (eq && p != MIXED) { - k = isl_basic_map_alloc_equality(path); - path_c = path->eq[k]; - } else { - k = isl_basic_map_alloc_inequality(path); - path_c = path->ineq[k]; - } - if (k < 0) - goto error; - isl_seq_clr(path_c, 1 + isl_basic_map_total_dim(path)); - if (p == PURE_VAR) { - isl_seq_cpy(path_c + off, - delta_c[i] + 1 + nparam, d); - isl_int_set(path_c[off + d], delta_c[i][0]); - } else if (p == PURE_PARAM) { - isl_seq_cpy(path_c, delta_c[i], 1 + nparam); - } else { - isl_seq_cpy(path_c + off, - delta_c[i] + 1 + nparam, d); - isl_seq_cpy(path_c, delta_c[i], 1 + nparam); - } - isl_seq_cpy(path_c + off - n_div, - delta_c[i] + 1 + nparam + d, n_div); - } - - return path; -error: - isl_basic_map_free(path); - return NULL; -} - -/* Given a set of offsets "delta", construct a relation of the - * given dimension specification (Z^{n+1} -> Z^{n+1}) that - * is an overapproximation of the relations that - * maps an element x to any element that can be reached - * by taking a non-negative number of steps along any of - * the elements in "delta". - * That is, construct an approximation of - * - * { [x] -> [y] : exists f \in \delta, k \in Z : - * y = x + k [f, 1] and k >= 0 } - * - * For any element in this relation, the number of steps taken - * is equal to the difference in the final coordinates. - * - * In particular, let delta be defined as - * - * \delta = [p] -> { [x] : A x + a >= 0 and B p + b >= 0 and - * C x + C'p + c >= 0 and - * D x + D'p + d >= 0 } - * - * where the constraints C x + C'p + c >= 0 are such that the parametric - * constant term of each constraint j, "C_j x + C'_j p + c_j", - * can never attain positive values, then the relation is constructed as - * - * { [x] -> [y] : exists [f, k] \in Z^{n+1} : y = x + f and - * A f + k a >= 0 and B p + b >= 0 and - * C f + C'p + c >= 0 and k >= 1 } - * union { [x] -> [x] } - * - * If the zero-length paths happen to correspond exactly to the identity - * mapping, then we return - * - * { [x] -> [y] : exists [f, k] \in Z^{n+1} : y = x + f and - * A f + k a >= 0 and B p + b >= 0 and - * C f + C'p + c >= 0 and k >= 0 } - * - * instead. - * - * Existentially quantified variables in \delta are handled by - * classifying them as independent of the parameters, purely - * parameter dependent and others. Constraints containing - * any of the other existentially quantified variables are removed. - * This is safe, but leads to an additional overapproximation. - * - * If there are any impure constraints, then we also eliminate - * the parameters from \delta, resulting in a set - * - * \delta' = { [x] : E x + e >= 0 } - * - * and add the constraints - * - * E f + k e >= 0 - * - * to the constructed relation. - */ -static __isl_give isl_map *path_along_delta(__isl_take isl_space *dim, - __isl_take isl_basic_set *delta) -{ - isl_basic_map *path = NULL; - unsigned d; - unsigned n_div; - unsigned nparam; - unsigned off; - int i, k; - int is_id; - int *div_purity = NULL; - int impurity = 0; - - if (!delta) - goto error; - n_div = isl_basic_set_dim(delta, isl_dim_div); - d = isl_basic_set_dim(delta, isl_dim_set); - nparam = isl_basic_set_dim(delta, isl_dim_param); - path = isl_basic_map_alloc_space(isl_space_copy(dim), n_div + d + 1, - d + 1 + delta->n_eq, delta->n_eq + delta->n_ineq + 1); - off = 1 + nparam + 2 * (d + 1) + n_div; - - for (i = 0; i < n_div + d + 1; ++i) { - k = isl_basic_map_alloc_div(path); - if (k < 0) - goto error; - isl_int_set_si(path->div[k][0], 0); - } - - for (i = 0; i < d + 1; ++i) { - k = isl_basic_map_alloc_equality(path); - if (k < 0) - goto error; - isl_seq_clr(path->eq[k], 1 + isl_basic_map_total_dim(path)); - isl_int_set_si(path->eq[k][1 + nparam + i], 1); - isl_int_set_si(path->eq[k][1 + nparam + d + 1 + i], -1); - isl_int_set_si(path->eq[k][off + i], 1); - } - - div_purity = get_div_purity(delta); - if (!div_purity) - goto error; - - path = add_delta_constraints(path, delta, off, nparam, d, - div_purity, 1, &impurity); - path = add_delta_constraints(path, delta, off, nparam, d, - div_purity, 0, &impurity); - if (impurity) { - isl_space *dim = isl_basic_set_get_space(delta); - delta = isl_basic_set_project_out(delta, - isl_dim_param, 0, nparam); - delta = isl_basic_set_add(delta, isl_dim_param, nparam); - delta = isl_basic_set_reset_space(delta, dim); - if (!delta) - goto error; - path = isl_basic_map_extend_constraints(path, delta->n_eq, - delta->n_ineq + 1); - path = add_delta_constraints(path, delta, off, nparam, d, - NULL, 1, &impurity); - path = add_delta_constraints(path, delta, off, nparam, d, - NULL, 0, &impurity); - path = isl_basic_map_gauss(path, NULL); - } - - is_id = empty_path_is_identity(path, off + d); - if (is_id < 0) - goto error; - - k = isl_basic_map_alloc_inequality(path); - if (k < 0) - goto error; - isl_seq_clr(path->ineq[k], 1 + isl_basic_map_total_dim(path)); - if (!is_id) - isl_int_set_si(path->ineq[k][0], -1); - isl_int_set_si(path->ineq[k][off + d], 1); - - free(div_purity); - isl_basic_set_free(delta); - path = isl_basic_map_finalize(path); - if (is_id) { - isl_space_free(dim); - return isl_map_from_basic_map(path); - } - return isl_basic_map_union(path, isl_basic_map_identity(dim)); -error: - free(div_purity); - isl_space_free(dim); - isl_basic_set_free(delta); - isl_basic_map_free(path); - return NULL; -} - -/* Given a dimension specification Z^{n+1} -> Z^{n+1} and a parameter "param", - * construct a map that equates the parameter to the difference - * in the final coordinates and imposes that this difference is positive. - * That is, construct - * - * { [x,x_s] -> [y,y_s] : k = y_s - x_s > 0 } - */ -static __isl_give isl_map *equate_parameter_to_length(__isl_take isl_space *dim, - unsigned param) -{ - struct isl_basic_map *bmap; - unsigned d; - unsigned nparam; - int k; - - d = isl_space_dim(dim, isl_dim_in); - nparam = isl_space_dim(dim, isl_dim_param); - bmap = isl_basic_map_alloc_space(dim, 0, 1, 1); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[k][1 + param], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + d - 1], -1); - isl_int_set_si(bmap->eq[k][1 + nparam + d + d - 1], 1); - - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], 1 + isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->ineq[k][1 + param], 1); - isl_int_set_si(bmap->ineq[k][0], -1); - - bmap = isl_basic_map_finalize(bmap); - return isl_map_from_basic_map(bmap); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Check whether "path" is acyclic, where the last coordinates of domain - * and range of path encode the number of steps taken. - * That is, check whether - * - * { d | d = y - x and (x,y) in path } - * - * does not contain any element with positive last coordinate (positive length) - * and zero remaining coordinates (cycle). - */ -static int is_acyclic(__isl_take isl_map *path) -{ - int i; - int acyclic; - unsigned dim; - struct isl_set *delta; - - delta = isl_map_deltas(path); - dim = isl_set_dim(delta, isl_dim_set); - for (i = 0; i < dim; ++i) { - if (i == dim -1) - delta = isl_set_lower_bound_si(delta, isl_dim_set, i, 1); - else - delta = isl_set_fix_si(delta, isl_dim_set, i, 0); - } - - acyclic = isl_set_is_empty(delta); - isl_set_free(delta); - - return acyclic; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D - * and a dimension specification (Z^{n+1} -> Z^{n+1}), - * construct a map that is an overapproximation of the map - * that takes an element from the space D \times Z to another - * element from the same space, such that the first n coordinates of the - * difference between them is a sum of differences between images - * and pre-images in one of the R_i and such that the last coordinate - * is equal to the number of steps taken. - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i, \sum_i k_i) } - * - * The elements of the singleton \Delta_i's are collected as the - * rows of the steps matrix. For all these \Delta_i's together, - * a single path is constructed. - * For each of the other \Delta_i's, we compute an overapproximation - * of the paths along elements of \Delta_i. - * Since each of these paths performs an addition, composition is - * symmetric and we can simply compose all resulting paths in any order. - */ -static __isl_give isl_map *construct_extended_path(__isl_take isl_space *dim, - __isl_keep isl_map *map, int *project) -{ - struct isl_mat *steps = NULL; - struct isl_map *path = NULL; - unsigned d; - int i, j, n; - - d = isl_map_dim(map, isl_dim_in); - - path = isl_map_identity(isl_space_copy(dim)); - - steps = isl_mat_alloc(map->ctx, map->n, d); - if (!steps) - goto error; - - n = 0; - for (i = 0; i < map->n; ++i) { - struct isl_basic_set *delta; - - delta = isl_basic_map_deltas(isl_basic_map_copy(map->p[i])); - - for (j = 0; j < d; ++j) { - int fixed; - - fixed = isl_basic_set_plain_dim_is_fixed(delta, j, - &steps->row[n][j]); - if (fixed < 0) { - isl_basic_set_free(delta); - goto error; - } - if (!fixed) - break; - } - - - if (j < d) { - path = isl_map_apply_range(path, - path_along_delta(isl_space_copy(dim), delta)); - path = isl_map_coalesce(path); - } else { - isl_basic_set_free(delta); - ++n; - } - } - - if (n > 0) { - steps->n_row = n; - path = isl_map_apply_range(path, - path_along_steps(isl_space_copy(dim), steps)); - } - - if (project && *project) { - *project = is_acyclic(isl_map_copy(path)); - if (*project < 0) - goto error; - } - - isl_space_free(dim); - isl_mat_free(steps); - return path; -error: - isl_space_free(dim); - isl_mat_free(steps); - isl_map_free(path); - return NULL; -} - -static int isl_set_overlaps(__isl_keep isl_set *set1, __isl_keep isl_set *set2) -{ - isl_set *i; - int no_overlap; - - if (!isl_space_tuple_match(set1->dim, isl_dim_set, set2->dim, isl_dim_set)) - return 0; - - i = isl_set_intersect(isl_set_copy(set1), isl_set_copy(set2)); - no_overlap = isl_set_is_empty(i); - isl_set_free(i); - - return no_overlap < 0 ? -1 : !no_overlap; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D - * and a dimension specification (Z^{n+1} -> Z^{n+1}), - * construct a map that is an overapproximation of the map - * that takes an element from the dom R \times Z to an - * element from ran R \times Z, such that the first n coordinates of the - * difference between them is a sum of differences between images - * and pre-images in one of the R_i and such that the last coordinate - * is equal to the number of steps taken. - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i, \sum_i k_i) and - * x in dom R and x + d in ran R and - * \sum_i k_i >= 1 } - */ -static __isl_give isl_map *construct_component(__isl_take isl_space *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - struct isl_set *domain = NULL; - struct isl_set *range = NULL; - struct isl_map *app = NULL; - struct isl_map *path = NULL; - - domain = isl_map_domain(isl_map_copy(map)); - domain = isl_set_coalesce(domain); - range = isl_map_range(isl_map_copy(map)); - range = isl_set_coalesce(range); - if (!isl_set_overlaps(domain, range)) { - isl_set_free(domain); - isl_set_free(range); - isl_space_free(dim); - - map = isl_map_copy(map); - map = isl_map_add_dims(map, isl_dim_in, 1); - map = isl_map_add_dims(map, isl_dim_out, 1); - map = set_path_length(map, 1, 1); - return map; - } - app = isl_map_from_domain_and_range(domain, range); - app = isl_map_add_dims(app, isl_dim_in, 1); - app = isl_map_add_dims(app, isl_dim_out, 1); - - path = construct_extended_path(isl_space_copy(dim), map, - exact && *exact ? &project : NULL); - app = isl_map_intersect(app, path); - - if (exact && *exact && - (*exact = check_exactness(isl_map_copy(map), isl_map_copy(app), - project)) < 0) - goto error; - - isl_space_free(dim); - app = set_path_length(app, 0, 1); - return app; -error: - isl_space_free(dim); - isl_map_free(app); - return NULL; -} - -/* Call construct_component and, if "project" is set, project out - * the final coordinates. - */ -static __isl_give isl_map *construct_projected_component( - __isl_take isl_space *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - isl_map *app; - unsigned d; - - if (!dim) - return NULL; - d = isl_space_dim(dim, isl_dim_in); - - app = construct_component(dim, map, exact, project); - if (project) { - app = isl_map_project_out(app, isl_dim_in, d - 1, 1); - app = isl_map_project_out(app, isl_dim_out, d - 1, 1); - } - return app; -} - -/* Compute an extended version, i.e., with path lengths, of - * an overapproximation of the transitive closure of "bmap" - * with path lengths greater than or equal to zero and with - * domain and range equal to "dom". - */ -static __isl_give isl_map *q_closure(__isl_take isl_space *dim, - __isl_take isl_set *dom, __isl_keep isl_basic_map *bmap, int *exact) -{ - int project = 1; - isl_map *path; - isl_map *map; - isl_map *app; - - dom = isl_set_add_dims(dom, isl_dim_set, 1); - app = isl_map_from_domain_and_range(dom, isl_set_copy(dom)); - map = isl_map_from_basic_map(isl_basic_map_copy(bmap)); - path = construct_extended_path(dim, map, &project); - app = isl_map_intersect(app, path); - - if ((*exact = check_exactness(map, isl_map_copy(app), project)) < 0) - goto error; - - return app; -error: - isl_map_free(app); - return NULL; -} - -/* Check whether qc has any elements of length at least one - * with domain and/or range outside of dom and ran. - */ -static int has_spurious_elements(__isl_keep isl_map *qc, - __isl_keep isl_set *dom, __isl_keep isl_set *ran) -{ - isl_set *s; - int subset; - unsigned d; - - if (!qc || !dom || !ran) - return -1; - - d = isl_map_dim(qc, isl_dim_in); - - qc = isl_map_copy(qc); - qc = set_path_length(qc, 0, 1); - qc = isl_map_project_out(qc, isl_dim_in, d - 1, 1); - qc = isl_map_project_out(qc, isl_dim_out, d - 1, 1); - - s = isl_map_domain(isl_map_copy(qc)); - subset = isl_set_is_subset(s, dom); - isl_set_free(s); - if (subset < 0) - goto error; - if (!subset) { - isl_map_free(qc); - return 1; - } - - s = isl_map_range(qc); - subset = isl_set_is_subset(s, ran); - isl_set_free(s); - - return subset < 0 ? -1 : !subset; -error: - isl_map_free(qc); - return -1; -} - -#define LEFT 2 -#define RIGHT 1 - -/* For each basic map in "map", except i, check whether it combines - * with the transitive closure that is reflexive on C combines - * to the left and to the right. - * - * In particular, if - * - * dom map_j \subseteq C - * - * then right[j] is set to 1. Otherwise, if - * - * ran map_i \cap dom map_j = \emptyset - * - * then right[j] is set to 0. Otherwise, composing to the right - * is impossible. - * - * Similar, for composing to the left, we have if - * - * ran map_j \subseteq C - * - * then left[j] is set to 1. Otherwise, if - * - * dom map_i \cap ran map_j = \emptyset - * - * then left[j] is set to 0. Otherwise, composing to the left - * is impossible. - * - * The return value is or'd with LEFT if composing to the left - * is possible and with RIGHT if composing to the right is possible. - */ -static int composability(__isl_keep isl_set *C, int i, - isl_set **dom, isl_set **ran, int *left, int *right, - __isl_keep isl_map *map) -{ - int j; - int ok; - - ok = LEFT | RIGHT; - for (j = 0; j < map->n && ok; ++j) { - int overlaps, subset; - if (j == i) - continue; - - if (ok & RIGHT) { - if (!dom[j]) - dom[j] = isl_set_from_basic_set( - isl_basic_map_domain( - isl_basic_map_copy(map->p[j]))); - if (!dom[j]) - return -1; - overlaps = isl_set_overlaps(ran[i], dom[j]); - if (overlaps < 0) - return -1; - if (!overlaps) - right[j] = 0; - else { - subset = isl_set_is_subset(dom[j], C); - if (subset < 0) - return -1; - if (subset) - right[j] = 1; - else - ok &= ~RIGHT; - } - } - - if (ok & LEFT) { - if (!ran[j]) - ran[j] = isl_set_from_basic_set( - isl_basic_map_range( - isl_basic_map_copy(map->p[j]))); - if (!ran[j]) - return -1; - overlaps = isl_set_overlaps(dom[i], ran[j]); - if (overlaps < 0) - return -1; - if (!overlaps) - left[j] = 0; - else { - subset = isl_set_is_subset(ran[j], C); - if (subset < 0) - return -1; - if (subset) - left[j] = 1; - else - ok &= ~LEFT; - } - } - } - - return ok; -} - -static __isl_give isl_map *anonymize(__isl_take isl_map *map) -{ - map = isl_map_reset(map, isl_dim_in); - map = isl_map_reset(map, isl_dim_out); - return map; -} - -/* Return a map that is a union of the basic maps in "map", except i, - * composed to left and right with qc based on the entries of "left" - * and "right". - */ -static __isl_give isl_map *compose(__isl_keep isl_map *map, int i, - __isl_take isl_map *qc, int *left, int *right) -{ - int j; - isl_map *comp; - - comp = isl_map_empty(isl_map_get_space(map)); - for (j = 0; j < map->n; ++j) { - isl_map *map_j; - - if (j == i) - continue; - - map_j = isl_map_from_basic_map(isl_basic_map_copy(map->p[j])); - map_j = anonymize(map_j); - if (left && left[j]) - map_j = isl_map_apply_range(map_j, isl_map_copy(qc)); - if (right && right[j]) - map_j = isl_map_apply_range(isl_map_copy(qc), map_j); - comp = isl_map_union(comp, map_j); - } - - comp = isl_map_compute_divs(comp); - comp = isl_map_coalesce(comp); - - isl_map_free(qc); - - return comp; -} - -/* Compute the transitive closure of "map" incrementally by - * computing - * - * map_i^+ \cup qc^+ - * - * or - * - * map_i^+ \cup ((id \cup map_i^) \circ qc^+) - * - * or - * - * map_i^+ \cup (qc^+ \circ (id \cup map_i^)) - * - * depending on whether left or right are NULL. - */ -static __isl_give isl_map *compute_incremental( - __isl_take isl_space *dim, __isl_keep isl_map *map, - int i, __isl_take isl_map *qc, int *left, int *right, int *exact) -{ - isl_map *map_i; - isl_map *tc; - isl_map *rtc = NULL; - - if (!map) - goto error; - isl_assert(map->ctx, left || right, goto error); - - map_i = isl_map_from_basic_map(isl_basic_map_copy(map->p[i])); - tc = construct_projected_component(isl_space_copy(dim), map_i, - exact, 1); - isl_map_free(map_i); - - if (*exact) - qc = isl_map_transitive_closure(qc, exact); - - if (!*exact) { - isl_space_free(dim); - isl_map_free(tc); - isl_map_free(qc); - return isl_map_universe(isl_map_get_space(map)); - } - - if (!left || !right) - rtc = isl_map_union(isl_map_copy(tc), - isl_map_identity(isl_map_get_space(tc))); - if (!right) - qc = isl_map_apply_range(rtc, qc); - if (!left) - qc = isl_map_apply_range(qc, rtc); - qc = isl_map_union(tc, qc); - - isl_space_free(dim); - - return qc; -error: - isl_space_free(dim); - isl_map_free(qc); - return NULL; -} - -/* Given a map "map", try to find a basic map such that - * map^+ can be computed as - * - * map^+ = map_i^+ \cup - * \bigcup_j ((map_i^+ \cup Id_C)^+ \circ map_j \circ (map_i^+ \cup Id_C))^+ - * - * with C the simple hull of the domain and range of the input map. - * map_i^ \cup Id_C is computed by allowing the path lengths to be zero - * and by intersecting domain and range with C. - * Of course, we need to check that this is actually equal to map_i^ \cup Id_C. - * Also, we only use the incremental computation if all the transitive - * closures are exact and if the number of basic maps in the union, - * after computing the integer divisions, is smaller than the number - * of basic maps in the input map. - */ -static int incemental_on_entire_domain(__isl_keep isl_space *dim, - __isl_keep isl_map *map, - isl_set **dom, isl_set **ran, int *left, int *right, - __isl_give isl_map **res) -{ - int i; - isl_set *C; - unsigned d; - - *res = NULL; - - C = isl_set_union(isl_map_domain(isl_map_copy(map)), - isl_map_range(isl_map_copy(map))); - C = isl_set_from_basic_set(isl_set_simple_hull(C)); - if (!C) - return -1; - if (C->n != 1) { - isl_set_free(C); - return 0; - } - - d = isl_map_dim(map, isl_dim_in); - - for (i = 0; i < map->n; ++i) { - isl_map *qc; - int exact_i, spurious; - int j; - dom[i] = isl_set_from_basic_set(isl_basic_map_domain( - isl_basic_map_copy(map->p[i]))); - ran[i] = isl_set_from_basic_set(isl_basic_map_range( - isl_basic_map_copy(map->p[i]))); - qc = q_closure(isl_space_copy(dim), isl_set_copy(C), - map->p[i], &exact_i); - if (!qc) - goto error; - if (!exact_i) { - isl_map_free(qc); - continue; - } - spurious = has_spurious_elements(qc, dom[i], ran[i]); - if (spurious) { - isl_map_free(qc); - if (spurious < 0) - goto error; - continue; - } - qc = isl_map_project_out(qc, isl_dim_in, d, 1); - qc = isl_map_project_out(qc, isl_dim_out, d, 1); - qc = isl_map_compute_divs(qc); - for (j = 0; j < map->n; ++j) - left[j] = right[j] = 1; - qc = compose(map, i, qc, left, right); - if (!qc) - goto error; - if (qc->n >= map->n) { - isl_map_free(qc); - continue; - } - *res = compute_incremental(isl_space_copy(dim), map, i, qc, - left, right, &exact_i); - if (!*res) - goto error; - if (exact_i) - break; - isl_map_free(*res); - *res = NULL; - } - - isl_set_free(C); - - return *res != NULL; -error: - isl_set_free(C); - return -1; -} - -/* Try and compute the transitive closure of "map" as - * - * map^+ = map_i^+ \cup - * \bigcup_j ((map_i^+ \cup Id_C)^+ \circ map_j \circ (map_i^+ \cup Id_C))^+ - * - * with C either the simple hull of the domain and range of the entire - * map or the simple hull of domain and range of map_i. - */ -static __isl_give isl_map *incremental_closure(__isl_take isl_space *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - int i; - isl_set **dom = NULL; - isl_set **ran = NULL; - int *left = NULL; - int *right = NULL; - isl_set *C; - unsigned d; - isl_map *res = NULL; - - if (!project) - return construct_projected_component(dim, map, exact, project); - - if (!map) - goto error; - if (map->n <= 1) - return construct_projected_component(dim, map, exact, project); - - d = isl_map_dim(map, isl_dim_in); - - dom = isl_calloc_array(map->ctx, isl_set *, map->n); - ran = isl_calloc_array(map->ctx, isl_set *, map->n); - left = isl_calloc_array(map->ctx, int, map->n); - right = isl_calloc_array(map->ctx, int, map->n); - if (!ran || !dom || !left || !right) - goto error; - - if (incemental_on_entire_domain(dim, map, dom, ran, left, right, &res) < 0) - goto error; - - for (i = 0; !res && i < map->n; ++i) { - isl_map *qc; - int exact_i, spurious, comp; - if (!dom[i]) - dom[i] = isl_set_from_basic_set( - isl_basic_map_domain( - isl_basic_map_copy(map->p[i]))); - if (!dom[i]) - goto error; - if (!ran[i]) - ran[i] = isl_set_from_basic_set( - isl_basic_map_range( - isl_basic_map_copy(map->p[i]))); - if (!ran[i]) - goto error; - C = isl_set_union(isl_set_copy(dom[i]), - isl_set_copy(ran[i])); - C = isl_set_from_basic_set(isl_set_simple_hull(C)); - if (!C) - goto error; - if (C->n != 1) { - isl_set_free(C); - continue; - } - comp = composability(C, i, dom, ran, left, right, map); - if (!comp || comp < 0) { - isl_set_free(C); - if (comp < 0) - goto error; - continue; - } - qc = q_closure(isl_space_copy(dim), C, map->p[i], &exact_i); - if (!qc) - goto error; - if (!exact_i) { - isl_map_free(qc); - continue; - } - spurious = has_spurious_elements(qc, dom[i], ran[i]); - if (spurious) { - isl_map_free(qc); - if (spurious < 0) - goto error; - continue; - } - qc = isl_map_project_out(qc, isl_dim_in, d, 1); - qc = isl_map_project_out(qc, isl_dim_out, d, 1); - qc = isl_map_compute_divs(qc); - qc = compose(map, i, qc, (comp & LEFT) ? left : NULL, - (comp & RIGHT) ? right : NULL); - if (!qc) - goto error; - if (qc->n >= map->n) { - isl_map_free(qc); - continue; - } - res = compute_incremental(isl_space_copy(dim), map, i, qc, - (comp & LEFT) ? left : NULL, - (comp & RIGHT) ? right : NULL, &exact_i); - if (!res) - goto error; - if (exact_i) - break; - isl_map_free(res); - res = NULL; - } - - for (i = 0; i < map->n; ++i) { - isl_set_free(dom[i]); - isl_set_free(ran[i]); - } - free(dom); - free(ran); - free(left); - free(right); - - if (res) { - isl_space_free(dim); - return res; - } - - return construct_projected_component(dim, map, exact, project); -error: - if (dom) - for (i = 0; i < map->n; ++i) - isl_set_free(dom[i]); - free(dom); - if (ran) - for (i = 0; i < map->n; ++i) - isl_set_free(ran[i]); - free(ran); - free(left); - free(right); - isl_space_free(dim); - return NULL; -} - -/* Given an array of sets "set", add "dom" at position "pos" - * and search for elements at earlier positions that overlap with "dom". - * If any can be found, then merge all of them, together with "dom", into - * a single set and assign the union to the first in the array, - * which becomes the new group leader for all groups involved in the merge. - * During the search, we only consider group leaders, i.e., those with - * group[i] = i, as the other sets have already been combined - * with one of the group leaders. - */ -static int merge(isl_set **set, int *group, __isl_take isl_set *dom, int pos) -{ - int i; - - group[pos] = pos; - set[pos] = isl_set_copy(dom); - - for (i = pos - 1; i >= 0; --i) { - int o; - - if (group[i] != i) - continue; - - o = isl_set_overlaps(set[i], dom); - if (o < 0) - goto error; - if (!o) - continue; - - set[i] = isl_set_union(set[i], set[group[pos]]); - set[group[pos]] = NULL; - if (!set[i]) - goto error; - group[group[pos]] = i; - group[pos] = i; - } - - isl_set_free(dom); - return 0; -error: - isl_set_free(dom); - return -1; -} - -/* Replace each entry in the n by n grid of maps by the cross product - * with the relation { [i] -> [i + 1] }. - */ -static int add_length(__isl_keep isl_map *map, isl_map ***grid, int n) -{ - int i, j, k; - isl_space *dim; - isl_basic_map *bstep; - isl_map *step; - unsigned nparam; - - if (!map) - return -1; - - dim = isl_map_get_space(map); - nparam = isl_space_dim(dim, isl_dim_param); - dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in)); - dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out)); - dim = isl_space_add_dims(dim, isl_dim_in, 1); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - bstep = isl_basic_map_alloc_space(dim, 0, 1, 0); - k = isl_basic_map_alloc_equality(bstep); - if (k < 0) { - isl_basic_map_free(bstep); - return -1; - } - isl_seq_clr(bstep->eq[k], 1 + isl_basic_map_total_dim(bstep)); - isl_int_set_si(bstep->eq[k][0], 1); - isl_int_set_si(bstep->eq[k][1 + nparam], 1); - isl_int_set_si(bstep->eq[k][1 + nparam + 1], -1); - bstep = isl_basic_map_finalize(bstep); - step = isl_map_from_basic_map(bstep); - - for (i = 0; i < n; ++i) - for (j = 0; j < n; ++j) - grid[i][j] = isl_map_product(grid[i][j], - isl_map_copy(step)); - - isl_map_free(step); - - return 0; -} - -/* The core of the Floyd-Warshall algorithm. - * Updates the given n x x matrix of relations in place. - * - * The algorithm iterates over all vertices. In each step, the whole - * matrix is updated to include all paths that go to the current vertex, - * possibly stay there a while (including passing through earlier vertices) - * and then come back. At the start of each iteration, the diagonal - * element corresponding to the current vertex is replaced by its - * transitive closure to account for all indirect paths that stay - * in the current vertex. - */ -static void floyd_warshall_iterate(isl_map ***grid, int n, int *exact) -{ - int r, p, q; - - for (r = 0; r < n; ++r) { - int r_exact; - grid[r][r] = isl_map_transitive_closure(grid[r][r], - (exact && *exact) ? &r_exact : NULL); - if (exact && *exact && !r_exact) - *exact = 0; - - for (p = 0; p < n; ++p) - for (q = 0; q < n; ++q) { - isl_map *loop; - if (p == r && q == r) - continue; - loop = isl_map_apply_range( - isl_map_copy(grid[p][r]), - isl_map_copy(grid[r][q])); - grid[p][q] = isl_map_union(grid[p][q], loop); - loop = isl_map_apply_range( - isl_map_copy(grid[p][r]), - isl_map_apply_range( - isl_map_copy(grid[r][r]), - isl_map_copy(grid[r][q]))); - grid[p][q] = isl_map_union(grid[p][q], loop); - grid[p][q] = isl_map_coalesce(grid[p][q]); - } - } -} - -/* Given a partition of the domains and ranges of the basic maps in "map", - * apply the Floyd-Warshall algorithm with the elements in the partition - * as vertices. - * - * In particular, there are "n" elements in the partition and "group" is - * an array of length 2 * map->n with entries in [0,n-1]. - * - * We first construct a matrix of relations based on the partition information, - * apply Floyd-Warshall on this matrix of relations and then take the - * union of all entries in the matrix as the final result. - * - * If we are actually computing the power instead of the transitive closure, - * i.e., when "project" is not set, then the result should have the - * path lengths encoded as the difference between an extra pair of - * coordinates. We therefore apply the nested transitive closures - * to relations that include these lengths. In particular, we replace - * the input relation by the cross product with the unit length relation - * { [i] -> [i + 1] }. - */ -static __isl_give isl_map *floyd_warshall_with_groups(__isl_take isl_space *dim, - __isl_keep isl_map *map, int *exact, int project, int *group, int n) -{ - int i, j, k; - isl_map ***grid = NULL; - isl_map *app; - - if (!map) - goto error; - - if (n == 1) { - free(group); - return incremental_closure(dim, map, exact, project); - } - - grid = isl_calloc_array(map->ctx, isl_map **, n); - if (!grid) - goto error; - for (i = 0; i < n; ++i) { - grid[i] = isl_calloc_array(map->ctx, isl_map *, n); - if (!grid[i]) - goto error; - for (j = 0; j < n; ++j) - grid[i][j] = isl_map_empty(isl_map_get_space(map)); - } - - for (k = 0; k < map->n; ++k) { - i = group[2 * k]; - j = group[2 * k + 1]; - grid[i][j] = isl_map_union(grid[i][j], - isl_map_from_basic_map( - isl_basic_map_copy(map->p[k]))); - } - - if (!project && add_length(map, grid, n) < 0) - goto error; - - floyd_warshall_iterate(grid, n, exact); - - app = isl_map_empty(isl_map_get_space(map)); - - for (i = 0; i < n; ++i) { - for (j = 0; j < n; ++j) - app = isl_map_union(app, grid[i][j]); - free(grid[i]); - } - free(grid); - - free(group); - isl_space_free(dim); - - return app; -error: - if (grid) - for (i = 0; i < n; ++i) { - if (!grid[i]) - continue; - for (j = 0; j < n; ++j) - isl_map_free(grid[i][j]); - free(grid[i]); - } - free(grid); - free(group); - isl_space_free(dim); - return NULL; -} - -/* Partition the domains and ranges of the n basic relations in list - * into disjoint cells. - * - * To find the partition, we simply consider all of the domains - * and ranges in turn and combine those that overlap. - * "set" contains the partition elements and "group" indicates - * to which partition element a given domain or range belongs. - * The domain of basic map i corresponds to element 2 * i in these arrays, - * while the domain corresponds to element 2 * i + 1. - * During the construction group[k] is either equal to k, - * in which case set[k] contains the union of all the domains and - * ranges in the corresponding group, or is equal to some l < k, - * with l another domain or range in the same group. - */ -static int *setup_groups(isl_ctx *ctx, __isl_keep isl_basic_map **list, int n, - isl_set ***set, int *n_group) -{ - int i; - int *group = NULL; - int g; - - *set = isl_calloc_array(ctx, isl_set *, 2 * n); - group = isl_alloc_array(ctx, int, 2 * n); - - if (!*set || !group) - goto error; - - for (i = 0; i < n; ++i) { - isl_set *dom; - dom = isl_set_from_basic_set(isl_basic_map_domain( - isl_basic_map_copy(list[i]))); - if (merge(*set, group, dom, 2 * i) < 0) - goto error; - dom = isl_set_from_basic_set(isl_basic_map_range( - isl_basic_map_copy(list[i]))); - if (merge(*set, group, dom, 2 * i + 1) < 0) - goto error; - } - - g = 0; - for (i = 0; i < 2 * n; ++i) - if (group[i] == i) { - if (g != i) { - (*set)[g] = (*set)[i]; - (*set)[i] = NULL; - } - group[i] = g++; - } else - group[i] = group[group[i]]; - - *n_group = g; - - return group; -error: - if (*set) { - for (i = 0; i < 2 * n; ++i) - isl_set_free((*set)[i]); - free(*set); - *set = NULL; - } - free(group); - return NULL; -} - -/* Check if the domains and ranges of the basic maps in "map" can - * be partitioned, and if so, apply Floyd-Warshall on the elements - * of the partition. Note that we also apply this algorithm - * if we want to compute the power, i.e., when "project" is not set. - * However, the results are unlikely to be exact since the recursive - * calls inside the Floyd-Warshall algorithm typically result in - * non-linear path lengths quite quickly. - */ -static __isl_give isl_map *floyd_warshall(__isl_take isl_space *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - int i; - isl_set **set = NULL; - int *group = NULL; - int n; - - if (!map) - goto error; - if (map->n <= 1) - return incremental_closure(dim, map, exact, project); - - group = setup_groups(map->ctx, map->p, map->n, &set, &n); - if (!group) - goto error; - - for (i = 0; i < 2 * map->n; ++i) - isl_set_free(set[i]); - - free(set); - - return floyd_warshall_with_groups(dim, map, exact, project, group, n); -error: - isl_space_free(dim); - return NULL; -} - -/* Structure for representing the nodes in the graph being traversed - * using Tarjan's algorithm. - * index represents the order in which nodes are visited. - * min_index is the index of the root of a (sub)component. - * on_stack indicates whether the node is currently on the stack. - */ -struct basic_map_sort_node { - int index; - int min_index; - int on_stack; -}; -/* Structure for representing the graph being traversed - * using Tarjan's algorithm. - * len is the number of nodes - * node is an array of nodes - * stack contains the nodes on the path from the root to the current node - * sp is the stack pointer - * index is the index of the last node visited - * order contains the elements of the components separated by -1 - * op represents the current position in order - * - * check_closed is set if we may have used the fact that - * a pair of basic maps can be interchanged - */ -struct basic_map_sort { - int len; - struct basic_map_sort_node *node; - int *stack; - int sp; - int index; - int *order; - int op; - int check_closed; -}; - -static void basic_map_sort_free(struct basic_map_sort *s) -{ - if (!s) - return; - free(s->node); - free(s->stack); - free(s->order); - free(s); -} - -static struct basic_map_sort *basic_map_sort_alloc(struct isl_ctx *ctx, int len) -{ - struct basic_map_sort *s; - int i; - - s = isl_calloc_type(ctx, struct basic_map_sort); - if (!s) - return NULL; - s->len = len; - s->node = isl_alloc_array(ctx, struct basic_map_sort_node, len); - if (!s->node) - goto error; - for (i = 0; i < len; ++i) - s->node[i].index = -1; - s->stack = isl_alloc_array(ctx, int, len); - if (!s->stack) - goto error; - s->order = isl_alloc_array(ctx, int, 2 * len); - if (!s->order) - goto error; - - s->sp = 0; - s->index = 0; - s->op = 0; - - s->check_closed = 0; - - return s; -error: - basic_map_sort_free(s); - return NULL; -} - -/* Check whether in the computation of the transitive closure - * "bmap1" (R_1) should follow (or be part of the same component as) - * "bmap2" (R_2). - * - * That is check whether - * - * R_1 \circ R_2 - * - * is a subset of - * - * R_2 \circ R_1 - * - * If so, then there is no reason for R_1 to immediately follow R_2 - * in any path. - * - * *check_closed is set if the subset relation holds while - * R_1 \circ R_2 is not empty. - */ -static int basic_map_follows(__isl_keep isl_basic_map *bmap1, - __isl_keep isl_basic_map *bmap2, int *check_closed) -{ - struct isl_map *map12 = NULL; - struct isl_map *map21 = NULL; - int subset; - - if (!isl_space_tuple_match(bmap1->dim, isl_dim_in, bmap2->dim, isl_dim_out)) - return 0; - - map21 = isl_map_from_basic_map( - isl_basic_map_apply_range( - isl_basic_map_copy(bmap2), - isl_basic_map_copy(bmap1))); - subset = isl_map_is_empty(map21); - if (subset < 0) - goto error; - if (subset) { - isl_map_free(map21); - return 0; - } - - if (!isl_space_tuple_match(bmap1->dim, isl_dim_in, bmap1->dim, isl_dim_out) || - !isl_space_tuple_match(bmap2->dim, isl_dim_in, bmap2->dim, isl_dim_out)) { - isl_map_free(map21); - return 1; - } - - map12 = isl_map_from_basic_map( - isl_basic_map_apply_range( - isl_basic_map_copy(bmap1), - isl_basic_map_copy(bmap2))); - - subset = isl_map_is_subset(map21, map12); - - isl_map_free(map12); - isl_map_free(map21); - - if (subset) - *check_closed = 1; - - return subset < 0 ? -1 : !subset; -error: - isl_map_free(map21); - return -1; -} - -/* Perform Tarjan's algorithm for computing the strongly connected components - * in the graph with the disjuncts of "map" as vertices and with an - * edge between any pair of disjuncts such that the first has - * to be applied after the second. - */ -static int power_components_tarjan(struct basic_map_sort *s, - __isl_keep isl_basic_map **list, int i) -{ - int j; - - s->node[i].index = s->index; - s->node[i].min_index = s->index; - s->node[i].on_stack = 1; - s->index++; - s->stack[s->sp++] = i; - - for (j = s->len - 1; j >= 0; --j) { - int f; - - if (j == i) - continue; - if (s->node[j].index >= 0 && - (!s->node[j].on_stack || - s->node[j].index > s->node[i].min_index)) - continue; - - f = basic_map_follows(list[i], list[j], &s->check_closed); - if (f < 0) - return -1; - if (!f) - continue; - - if (s->node[j].index < 0) { - power_components_tarjan(s, list, j); - if (s->node[j].min_index < s->node[i].min_index) - s->node[i].min_index = s->node[j].min_index; - } else if (s->node[j].index < s->node[i].min_index) - s->node[i].min_index = s->node[j].index; - } - - if (s->node[i].index != s->node[i].min_index) - return 0; - - do { - j = s->stack[--s->sp]; - s->node[j].on_stack = 0; - s->order[s->op++] = j; - } while (j != i); - s->order[s->op++] = -1; - - return 0; -} - -/* Decompose the "len" basic relations in "list" into strongly connected - * components. - */ -static struct basic_map_sort *basic_map_sort_init(isl_ctx *ctx, int len, - __isl_keep isl_basic_map **list) -{ - int i; - struct basic_map_sort *s = NULL; - - s = basic_map_sort_alloc(ctx, len); - if (!s) - return NULL; - for (i = len - 1; i >= 0; --i) { - if (s->node[i].index >= 0) - continue; - if (power_components_tarjan(s, list, i) < 0) - goto error; - } - - return s; -error: - basic_map_sort_free(s); - return NULL; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D - * and a dimension specification (Z^{n+1} -> Z^{n+1}), - * construct a map that is an overapproximation of the map - * that takes an element from the dom R \times Z to an - * element from ran R \times Z, such that the first n coordinates of the - * difference between them is a sum of differences between images - * and pre-images in one of the R_i and such that the last coordinate - * is equal to the number of steps taken. - * If "project" is set, then these final coordinates are not included, - * i.e., a relation of type Z^n -> Z^n is returned. - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i, \sum_i k_i) and - * x in dom R and x + d in ran R } - * - * or - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = (\sum_i k_i \delta_i) and - * x in dom R and x + d in ran R } - * - * if "project" is set. - * - * We first split the map into strongly connected components, perform - * the above on each component and then join the results in the correct - * order, at each join also taking in the union of both arguments - * to allow for paths that do not go through one of the two arguments. - */ -static __isl_give isl_map *construct_power_components(__isl_take isl_space *dim, - __isl_keep isl_map *map, int *exact, int project) -{ - int i, n, c; - struct isl_map *path = NULL; - struct basic_map_sort *s = NULL; - int *orig_exact; - int local_exact; - - if (!map) - goto error; - if (map->n <= 1) - return floyd_warshall(dim, map, exact, project); - - s = basic_map_sort_init(map->ctx, map->n, map->p); - if (!s) - goto error; - - orig_exact = exact; - if (s->check_closed && !exact) - exact = &local_exact; - - c = 0; - i = 0; - n = map->n; - if (project) - path = isl_map_empty(isl_map_get_space(map)); - else - path = isl_map_empty(isl_space_copy(dim)); - path = anonymize(path); - while (n) { - struct isl_map *comp; - isl_map *path_comp, *path_comb; - comp = isl_map_alloc_space(isl_map_get_space(map), n, 0); - while (s->order[i] != -1) { - comp = isl_map_add_basic_map(comp, - isl_basic_map_copy(map->p[s->order[i]])); - --n; - ++i; - } - path_comp = floyd_warshall(isl_space_copy(dim), - comp, exact, project); - path_comp = anonymize(path_comp); - path_comb = isl_map_apply_range(isl_map_copy(path), - isl_map_copy(path_comp)); - path = isl_map_union(path, path_comp); - path = isl_map_union(path, path_comb); - isl_map_free(comp); - ++i; - ++c; - } - - if (c > 1 && s->check_closed && !*exact) { - int closed; - - closed = isl_map_is_transitively_closed(path); - if (closed < 0) - goto error; - if (!closed) { - basic_map_sort_free(s); - isl_map_free(path); - return floyd_warshall(dim, map, orig_exact, project); - } - } - - basic_map_sort_free(s); - isl_space_free(dim); - - return path; -error: - basic_map_sort_free(s); - isl_space_free(dim); - isl_map_free(path); - return NULL; -} - -/* Given a union of basic maps R = \cup_i R_i \subseteq D \times D, - * construct a map that is an overapproximation of the map - * that takes an element from the space D to another - * element from the same space, such that the difference between - * them is a strictly positive sum of differences between images - * and pre-images in one of the R_i. - * The number of differences in the sum is equated to parameter "param". - * That is, let - * - * \Delta_i = { y - x | (x, y) in R_i } - * - * then the constructed map is an overapproximation of - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = \sum_i k_i \delta_i and k = \sum_i k_i > 0 } - * or - * - * { (x) -> (x + d) | \exists k_i >= 0, \delta_i \in \Delta_i : - * d = \sum_i k_i \delta_i and \sum_i k_i > 0 } - * - * if "project" is set. - * - * If "project" is not set, then - * we construct an extended mapping with an extra coordinate - * that indicates the number of steps taken. In particular, - * the difference in the last coordinate is equal to the number - * of steps taken to move from a domain element to the corresponding - * image element(s). - */ -static __isl_give isl_map *construct_power(__isl_keep isl_map *map, - int *exact, int project) -{ - struct isl_map *app = NULL; - isl_space *dim = NULL; - unsigned d; - - if (!map) - return NULL; - - dim = isl_map_get_space(map); - - d = isl_space_dim(dim, isl_dim_in); - dim = isl_space_add_dims(dim, isl_dim_in, 1); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - - app = construct_power_components(isl_space_copy(dim), map, - exact, project); - - isl_space_free(dim); - - return app; -} - -/* Compute the positive powers of "map", or an overapproximation. - * If the result is exact, then *exact is set to 1. - * - * If project is set, then we are actually interested in the transitive - * closure, so we can use a more relaxed exactness check. - * The lengths of the paths are also projected out instead of being - * encoded as the difference between an extra pair of final coordinates. - */ -static __isl_give isl_map *map_power(__isl_take isl_map *map, - int *exact, int project) -{ - struct isl_map *app = NULL; - - if (exact) - *exact = 1; - - if (!map) - return NULL; - - isl_assert(map->ctx, - isl_map_dim(map, isl_dim_in) == isl_map_dim(map, isl_dim_out), - goto error); - - app = construct_power(map, exact, project); - - isl_map_free(map); - return app; -error: - isl_map_free(map); - isl_map_free(app); - return NULL; -} - -/* Compute the positive powers of "map", or an overapproximation. - * The result maps the exponent to a nested copy of the corresponding power. - * If the result is exact, then *exact is set to 1. - * map_power constructs an extended relation with the path lengths - * encoded as the difference between the final coordinates. - * In the final step, this difference is equated to an extra parameter - * and made positive. The extra coordinates are subsequently projected out - * and the parameter is turned into the domain of the result. - */ -__isl_give isl_map *isl_map_power(__isl_take isl_map *map, int *exact) -{ - isl_space *target_dim; - isl_space *dim; - isl_map *diff; - unsigned d; - unsigned param; - - if (!map) - return NULL; - - d = isl_map_dim(map, isl_dim_in); - param = isl_map_dim(map, isl_dim_param); - - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - - if (isl_map_plain_is_empty(map)) { - map = isl_map_from_range(isl_map_wrap(map)); - map = isl_map_add_dims(map, isl_dim_in, 1); - map = isl_map_set_dim_name(map, isl_dim_in, 0, "k"); - return map; - } - - target_dim = isl_map_get_space(map); - target_dim = isl_space_from_range(isl_space_wrap(target_dim)); - target_dim = isl_space_add_dims(target_dim, isl_dim_in, 1); - target_dim = isl_space_set_dim_name(target_dim, isl_dim_in, 0, "k"); - - map = map_power(map, exact, 0); - - map = isl_map_add_dims(map, isl_dim_param, 1); - dim = isl_map_get_space(map); - diff = equate_parameter_to_length(dim, param); - map = isl_map_intersect(map, diff); - map = isl_map_project_out(map, isl_dim_in, d, 1); - map = isl_map_project_out(map, isl_dim_out, d, 1); - map = isl_map_from_range(isl_map_wrap(map)); - map = isl_map_move_dims(map, isl_dim_in, 0, isl_dim_param, param, 1); - - map = isl_map_reset_space(map, target_dim); - - return map; -} - -/* Compute a relation that maps each element in the range of the input - * relation to the lengths of all paths composed of edges in the input - * relation that end up in the given range element. - * The result may be an overapproximation, in which case *exact is set to 0. - * The resulting relation is very similar to the power relation. - * The difference are that the domain has been projected out, the - * range has become the domain and the exponent is the range instead - * of a parameter. - */ -__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map, - int *exact) -{ - isl_space *dim; - isl_map *diff; - unsigned d; - unsigned param; - - if (!map) - return NULL; - - d = isl_map_dim(map, isl_dim_in); - param = isl_map_dim(map, isl_dim_param); - - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - - if (isl_map_plain_is_empty(map)) { - if (exact) - *exact = 1; - map = isl_map_project_out(map, isl_dim_out, 0, d); - map = isl_map_add_dims(map, isl_dim_out, 1); - return map; - } - - map = map_power(map, exact, 0); - - map = isl_map_add_dims(map, isl_dim_param, 1); - dim = isl_map_get_space(map); - diff = equate_parameter_to_length(dim, param); - map = isl_map_intersect(map, diff); - map = isl_map_project_out(map, isl_dim_in, 0, d + 1); - map = isl_map_project_out(map, isl_dim_out, d, 1); - map = isl_map_reverse(map); - map = isl_map_move_dims(map, isl_dim_out, 0, isl_dim_param, param, 1); - - return map; -} - -/* Check whether equality i of bset is a pure stride constraint - * on a single dimensions, i.e., of the form - * - * v = k e - * - * with k a constant and e an existentially quantified variable. - */ -static int is_eq_stride(__isl_keep isl_basic_set *bset, int i) -{ - unsigned nparam; - unsigned d; - unsigned n_div; - int pos1; - int pos2; - - if (!bset) - return -1; - - if (!isl_int_is_zero(bset->eq[i][0])) - return 0; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - d = isl_basic_set_dim(bset, isl_dim_set); - n_div = isl_basic_set_dim(bset, isl_dim_div); - - if (isl_seq_first_non_zero(bset->eq[i] + 1, nparam) != -1) - return 0; - pos1 = isl_seq_first_non_zero(bset->eq[i] + 1 + nparam, d); - if (pos1 == -1) - return 0; - if (isl_seq_first_non_zero(bset->eq[i] + 1 + nparam + pos1 + 1, - d - pos1 - 1) != -1) - return 0; - - pos2 = isl_seq_first_non_zero(bset->eq[i] + 1 + nparam + d, n_div); - if (pos2 == -1) - return 0; - if (isl_seq_first_non_zero(bset->eq[i] + 1 + nparam + d + pos2 + 1, - n_div - pos2 - 1) != -1) - return 0; - if (!isl_int_is_one(bset->eq[i][1 + nparam + pos1]) && - !isl_int_is_negone(bset->eq[i][1 + nparam + pos1])) - return 0; - - return 1; -} - -/* Given a map, compute the smallest superset of this map that is of the form - * - * { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p } - * - * (where p ranges over the (non-parametric) dimensions), - * compute the transitive closure of this map, i.e., - * - * { i -> j : exists k > 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * and intersect domain and range of this transitive closure with - * the given domain and range. - * - * If with_id is set, then try to include as much of the identity mapping - * as possible, by computing - * - * { i -> j : exists k >= 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * instead (i.e., allow k = 0). - * - * In practice, we compute the difference set - * - * delta = { j - i | i -> j in map }, - * - * look for stride constraint on the individual dimensions and compute - * (constant) lower and upper bounds for each individual dimension, - * adding a constraint for each bound not equal to infinity. - */ -static __isl_give isl_map *box_closure_on_domain(__isl_take isl_map *map, - __isl_take isl_set *dom, __isl_take isl_set *ran, int with_id) -{ - int i; - int k; - unsigned d; - unsigned nparam; - unsigned total; - isl_space *dim; - isl_set *delta; - isl_map *app = NULL; - isl_basic_set *aff = NULL; - isl_basic_map *bmap = NULL; - isl_vec *obj = NULL; - isl_int opt; - - isl_int_init(opt); - - delta = isl_map_deltas(isl_map_copy(map)); - - aff = isl_set_affine_hull(isl_set_copy(delta)); - if (!aff) - goto error; - dim = isl_map_get_space(map); - d = isl_space_dim(dim, isl_dim_in); - nparam = isl_space_dim(dim, isl_dim_param); - total = isl_space_dim(dim, isl_dim_all); - bmap = isl_basic_map_alloc_space(dim, - aff->n_div + 1, aff->n_div, 2 * d + 1); - for (i = 0; i < aff->n_div + 1; ++i) { - k = isl_basic_map_alloc_div(bmap); - if (k < 0) - goto error; - isl_int_set_si(bmap->div[k][0], 0); - } - for (i = 0; i < aff->n_eq; ++i) { - if (!is_eq_stride(aff, i)) - continue; - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], 1 + nparam); - isl_seq_cpy(bmap->eq[k] + 1 + nparam + d, - aff->eq[i] + 1 + nparam, d); - isl_seq_neg(bmap->eq[k] + 1 + nparam, - aff->eq[i] + 1 + nparam, d); - isl_seq_cpy(bmap->eq[k] + 1 + nparam + 2 * d, - aff->eq[i] + 1 + nparam + d, aff->n_div); - isl_int_set_si(bmap->eq[k][1 + total + aff->n_div], 0); - } - obj = isl_vec_alloc(map->ctx, 1 + nparam + d); - if (!obj) - goto error; - isl_seq_clr(obj->el, 1 + nparam + d); - for (i = 0; i < d; ++ i) { - enum isl_lp_result res; - - isl_int_set_si(obj->el[1 + nparam + i], 1); - - res = isl_set_solve_lp(delta, 0, obj->el, map->ctx->one, &opt, - NULL, NULL); - if (res == isl_lp_error) - goto error; - if (res == isl_lp_ok) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], - 1 + nparam + 2 * d + bmap->n_div); - isl_int_set_si(bmap->ineq[k][1 + nparam + i], -1); - isl_int_set_si(bmap->ineq[k][1 + nparam + d + i], 1); - isl_int_neg(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], opt); - } - - res = isl_set_solve_lp(delta, 1, obj->el, map->ctx->one, &opt, - NULL, NULL); - if (res == isl_lp_error) - goto error; - if (res == isl_lp_ok) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], - 1 + nparam + 2 * d + bmap->n_div); - isl_int_set_si(bmap->ineq[k][1 + nparam + i], 1); - isl_int_set_si(bmap->ineq[k][1 + nparam + d + i], -1); - isl_int_set(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], opt); - } - - isl_int_set_si(obj->el[1 + nparam + i], 0); - } - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->ineq[k], - 1 + nparam + 2 * d + bmap->n_div); - if (!with_id) - isl_int_set_si(bmap->ineq[k][0], -1); - isl_int_set_si(bmap->ineq[k][1 + nparam + 2 * d + aff->n_div], 1); - - app = isl_map_from_domain_and_range(dom, ran); - - isl_vec_free(obj); - isl_basic_set_free(aff); - isl_map_free(map); - bmap = isl_basic_map_finalize(bmap); - isl_set_free(delta); - isl_int_clear(opt); - - map = isl_map_from_basic_map(bmap); - map = isl_map_intersect(map, app); - - return map; -error: - isl_vec_free(obj); - isl_basic_map_free(bmap); - isl_basic_set_free(aff); - isl_set_free(dom); - isl_set_free(ran); - isl_map_free(map); - isl_set_free(delta); - isl_int_clear(opt); - return NULL; -} - -/* Given a map, compute the smallest superset of this map that is of the form - * - * { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p } - * - * (where p ranges over the (non-parametric) dimensions), - * compute the transitive closure of this map, i.e., - * - * { i -> j : exists k > 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * and intersect domain and range of this transitive closure with - * domain and range of the original map. - */ -static __isl_give isl_map *box_closure(__isl_take isl_map *map) -{ - isl_set *domain; - isl_set *range; - - domain = isl_map_domain(isl_map_copy(map)); - domain = isl_set_coalesce(domain); - range = isl_map_range(isl_map_copy(map)); - range = isl_set_coalesce(range); - - return box_closure_on_domain(map, domain, range, 0); -} - -/* Given a map, compute the smallest superset of this map that is of the form - * - * { i -> j : L <= j - i <= U and exists a_p: j_p - i_p = M_p a_p } - * - * (where p ranges over the (non-parametric) dimensions), - * compute the transitive and partially reflexive closure of this map, i.e., - * - * { i -> j : exists k >= 0: - * k L <= j - i <= k U and exists a: j_p - i_p = M_p a_p } - * - * and intersect domain and range of this transitive closure with - * the given domain. - */ -static __isl_give isl_map *box_closure_with_identity(__isl_take isl_map *map, - __isl_take isl_set *dom) -{ - return box_closure_on_domain(map, dom, isl_set_copy(dom), 1); -} - -/* Check whether app is the transitive closure of map. - * In particular, check that app is acyclic and, if so, - * check that - * - * app \subset (map \cup (map \circ app)) - */ -static int check_exactness_omega(__isl_keep isl_map *map, - __isl_keep isl_map *app) -{ - isl_set *delta; - int i; - int is_empty, is_exact; - unsigned d; - isl_map *test; - - delta = isl_map_deltas(isl_map_copy(app)); - d = isl_set_dim(delta, isl_dim_set); - for (i = 0; i < d; ++i) - delta = isl_set_fix_si(delta, isl_dim_set, i, 0); - is_empty = isl_set_is_empty(delta); - isl_set_free(delta); - if (is_empty < 0) - return -1; - if (!is_empty) - return 0; - - test = isl_map_apply_range(isl_map_copy(app), isl_map_copy(map)); - test = isl_map_union(test, isl_map_copy(map)); - is_exact = isl_map_is_subset(app, test); - isl_map_free(test); - - return is_exact; -} - -/* Check if basic map M_i can be combined with all the other - * basic maps such that - * - * (\cup_j M_j)^+ - * - * can be computed as - * - * M_i \cup (\cup_{j \ne i} M_i^* \circ M_j \circ M_i^*)^+ - * - * In particular, check if we can compute a compact representation - * of - * - * M_i^* \circ M_j \circ M_i^* - * - * for each j != i. - * Let M_i^? be an extension of M_i^+ that allows paths - * of length zero, i.e., the result of box_closure(., 1). - * The criterion, as proposed by Kelly et al., is that - * id = M_i^? - M_i^+ can be represented as a basic map - * and that - * - * id \circ M_j \circ id = M_j - * - * for each j != i. - * - * If this function returns 1, then tc and qc are set to - * M_i^+ and M_i^?, respectively. - */ -static int can_be_split_off(__isl_keep isl_map *map, int i, - __isl_give isl_map **tc, __isl_give isl_map **qc) -{ - isl_map *map_i, *id = NULL; - int j = -1; - isl_set *C; - - *tc = NULL; - *qc = NULL; - - C = isl_set_union(isl_map_domain(isl_map_copy(map)), - isl_map_range(isl_map_copy(map))); - C = isl_set_from_basic_set(isl_set_simple_hull(C)); - if (!C) - goto error; - - map_i = isl_map_from_basic_map(isl_basic_map_copy(map->p[i])); - *tc = box_closure(isl_map_copy(map_i)); - *qc = box_closure_with_identity(map_i, C); - id = isl_map_subtract(isl_map_copy(*qc), isl_map_copy(*tc)); - - if (!id || !*qc) - goto error; - if (id->n != 1 || (*qc)->n != 1) - goto done; - - for (j = 0; j < map->n; ++j) { - isl_map *map_j, *test; - int is_ok; - - if (i == j) - continue; - map_j = isl_map_from_basic_map( - isl_basic_map_copy(map->p[j])); - test = isl_map_apply_range(isl_map_copy(id), - isl_map_copy(map_j)); - test = isl_map_apply_range(test, isl_map_copy(id)); - is_ok = isl_map_is_equal(test, map_j); - isl_map_free(map_j); - isl_map_free(test); - if (is_ok < 0) - goto error; - if (!is_ok) - break; - } - -done: - isl_map_free(id); - if (j == map->n) - return 1; - - isl_map_free(*qc); - isl_map_free(*tc); - *qc = NULL; - *tc = NULL; - - return 0; -error: - isl_map_free(id); - isl_map_free(*qc); - isl_map_free(*tc); - *qc = NULL; - *tc = NULL; - return -1; -} - -static __isl_give isl_map *box_closure_with_check(__isl_take isl_map *map, - int *exact) -{ - isl_map *app; - - app = box_closure(isl_map_copy(map)); - if (exact) - *exact = check_exactness_omega(map, app); - - isl_map_free(map); - return app; -} - -/* Compute an overapproximation of the transitive closure of "map" - * using a variation of the algorithm from - * "Transitive Closure of Infinite Graphs and its Applications" - * by Kelly et al. - * - * We first check whether we can can split of any basic map M_i and - * compute - * - * (\cup_j M_j)^+ - * - * as - * - * M_i \cup (\cup_{j \ne i} M_i^* \circ M_j \circ M_i^*)^+ - * - * using a recursive call on the remaining map. - * - * If not, we simply call box_closure on the whole map. - */ -static __isl_give isl_map *transitive_closure_omega(__isl_take isl_map *map, - int *exact) -{ - int i, j; - int exact_i; - isl_map *app; - - if (!map) - return NULL; - if (map->n == 1) - return box_closure_with_check(map, exact); - - for (i = 0; i < map->n; ++i) { - int ok; - isl_map *qc, *tc; - ok = can_be_split_off(map, i, &tc, &qc); - if (ok < 0) - goto error; - if (!ok) - continue; - - app = isl_map_alloc_space(isl_map_get_space(map), map->n - 1, 0); - - for (j = 0; j < map->n; ++j) { - if (j == i) - continue; - app = isl_map_add_basic_map(app, - isl_basic_map_copy(map->p[j])); - } - - app = isl_map_apply_range(isl_map_copy(qc), app); - app = isl_map_apply_range(app, qc); - - app = isl_map_union(tc, transitive_closure_omega(app, NULL)); - exact_i = check_exactness_omega(map, app); - if (exact_i == 1) { - if (exact) - *exact = exact_i; - isl_map_free(map); - return app; - } - isl_map_free(app); - if (exact_i < 0) - goto error; - } - - return box_closure_with_check(map, exact); -error: - isl_map_free(map); - return NULL; -} - -/* Compute the transitive closure of "map", or an overapproximation. - * If the result is exact, then *exact is set to 1. - * Simply use map_power to compute the powers of map, but tell - * it to project out the lengths of the paths instead of equating - * the length to a parameter. - */ -__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map, - int *exact) -{ - isl_space *target_dim; - int closed; - - if (!map) - goto error; - - if (map->ctx->opt->closure == ISL_CLOSURE_BOX) - return transitive_closure_omega(map, exact); - - map = isl_map_compute_divs(map); - map = isl_map_coalesce(map); - closed = isl_map_is_transitively_closed(map); - if (closed < 0) - goto error; - if (closed) { - if (exact) - *exact = 1; - return map; - } - - target_dim = isl_map_get_space(map); - map = map_power(map, exact, 1); - map = isl_map_reset_space(map, target_dim); - - return map; -error: - isl_map_free(map); - return NULL; -} - -static int inc_count(__isl_take isl_map *map, void *user) -{ - int *n = user; - - *n += map->n; - - isl_map_free(map); - - return 0; -} - -static int collect_basic_map(__isl_take isl_map *map, void *user) -{ - int i; - isl_basic_map ***next = user; - - for (i = 0; i < map->n; ++i) { - **next = isl_basic_map_copy(map->p[i]); - if (!**next) - goto error; - (*next)++; - } - - isl_map_free(map); - return 0; -error: - isl_map_free(map); - return -1; -} - -/* Perform Floyd-Warshall on the given list of basic relations. - * The basic relations may live in different dimensions, - * but basic relations that get assigned to the diagonal of the - * grid have domains and ranges of the same dimension and so - * the standard algorithm can be used because the nested transitive - * closures are only applied to diagonal elements and because all - * compositions are peformed on relations with compatible domains and ranges. - */ -static __isl_give isl_union_map *union_floyd_warshall_on_list(isl_ctx *ctx, - __isl_keep isl_basic_map **list, int n, int *exact) -{ - int i, j, k; - int n_group; - int *group = NULL; - isl_set **set = NULL; - isl_map ***grid = NULL; - isl_union_map *app; - - group = setup_groups(ctx, list, n, &set, &n_group); - if (!group) - goto error; - - grid = isl_calloc_array(ctx, isl_map **, n_group); - if (!grid) - goto error; - for (i = 0; i < n_group; ++i) { - grid[i] = isl_calloc_array(ctx, isl_map *, n_group); - if (!grid[i]) - goto error; - for (j = 0; j < n_group; ++j) { - isl_space *dim1, *dim2, *dim; - dim1 = isl_space_reverse(isl_set_get_space(set[i])); - dim2 = isl_set_get_space(set[j]); - dim = isl_space_join(dim1, dim2); - grid[i][j] = isl_map_empty(dim); - } - } - - for (k = 0; k < n; ++k) { - i = group[2 * k]; - j = group[2 * k + 1]; - grid[i][j] = isl_map_union(grid[i][j], - isl_map_from_basic_map( - isl_basic_map_copy(list[k]))); - } - - floyd_warshall_iterate(grid, n_group, exact); - - app = isl_union_map_empty(isl_map_get_space(grid[0][0])); - - for (i = 0; i < n_group; ++i) { - for (j = 0; j < n_group; ++j) - app = isl_union_map_add_map(app, grid[i][j]); - free(grid[i]); - } - free(grid); - - for (i = 0; i < 2 * n; ++i) - isl_set_free(set[i]); - free(set); - - free(group); - return app; -error: - if (grid) - for (i = 0; i < n_group; ++i) { - if (!grid[i]) - continue; - for (j = 0; j < n_group; ++j) - isl_map_free(grid[i][j]); - free(grid[i]); - } - free(grid); - if (set) { - for (i = 0; i < 2 * n; ++i) - isl_set_free(set[i]); - free(set); - } - free(group); - return NULL; -} - -/* Perform Floyd-Warshall on the given union relation. - * The implementation is very similar to that for non-unions. - * The main difference is that it is applied unconditionally. - * We first extract a list of basic maps from the union map - * and then perform the algorithm on this list. - */ -static __isl_give isl_union_map *union_floyd_warshall( - __isl_take isl_union_map *umap, int *exact) -{ - int i, n; - isl_ctx *ctx; - isl_basic_map **list = NULL; - isl_basic_map **next; - isl_union_map *res; - - n = 0; - if (isl_union_map_foreach_map(umap, inc_count, &n) < 0) - goto error; - - ctx = isl_union_map_get_ctx(umap); - list = isl_calloc_array(ctx, isl_basic_map *, n); - if (!list) - goto error; - - next = list; - if (isl_union_map_foreach_map(umap, collect_basic_map, &next) < 0) - goto error; - - res = union_floyd_warshall_on_list(ctx, list, n, exact); - - if (list) { - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - } - - isl_union_map_free(umap); - return res; -error: - if (list) { - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - } - isl_union_map_free(umap); - return NULL; -} - -/* Decompose the give union relation into strongly connected components. - * The implementation is essentially the same as that of - * construct_power_components with the major difference that all - * operations are performed on union maps. - */ -static __isl_give isl_union_map *union_components( - __isl_take isl_union_map *umap, int *exact) -{ - int i; - int n; - isl_ctx *ctx; - isl_basic_map **list; - isl_basic_map **next; - isl_union_map *path = NULL; - struct basic_map_sort *s = NULL; - int c, l; - int recheck = 0; - - n = 0; - if (isl_union_map_foreach_map(umap, inc_count, &n) < 0) - goto error; - - if (n <= 1) - return union_floyd_warshall(umap, exact); - - ctx = isl_union_map_get_ctx(umap); - list = isl_calloc_array(ctx, isl_basic_map *, n); - if (!list) - goto error; - - next = list; - if (isl_union_map_foreach_map(umap, collect_basic_map, &next) < 0) - goto error; - - s = basic_map_sort_init(ctx, n, list); - if (!s) - goto error; - - c = 0; - i = 0; - l = n; - path = isl_union_map_empty(isl_union_map_get_space(umap)); - while (l) { - isl_union_map *comp; - isl_union_map *path_comp, *path_comb; - comp = isl_union_map_empty(isl_union_map_get_space(umap)); - while (s->order[i] != -1) { - comp = isl_union_map_add_map(comp, - isl_map_from_basic_map( - isl_basic_map_copy(list[s->order[i]]))); - --l; - ++i; - } - path_comp = union_floyd_warshall(comp, exact); - path_comb = isl_union_map_apply_range(isl_union_map_copy(path), - isl_union_map_copy(path_comp)); - path = isl_union_map_union(path, path_comp); - path = isl_union_map_union(path, path_comb); - ++i; - ++c; - } - - if (c > 1 && s->check_closed && !*exact) { - int closed; - - closed = isl_union_map_is_transitively_closed(path); - if (closed < 0) - goto error; - recheck = !closed; - } - - basic_map_sort_free(s); - - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - - if (recheck) { - isl_union_map_free(path); - return union_floyd_warshall(umap, exact); - } - - isl_union_map_free(umap); - - return path; -error: - basic_map_sort_free(s); - if (list) { - for (i = 0; i < n; ++i) - isl_basic_map_free(list[i]); - free(list); - } - isl_union_map_free(umap); - isl_union_map_free(path); - return NULL; -} - -/* Compute the transitive closure of "umap", or an overapproximation. - * If the result is exact, then *exact is set to 1. - */ -__isl_give isl_union_map *isl_union_map_transitive_closure( - __isl_take isl_union_map *umap, int *exact) -{ - int closed; - - if (!umap) - return NULL; - - if (exact) - *exact = 1; - - umap = isl_union_map_compute_divs(umap); - umap = isl_union_map_coalesce(umap); - closed = isl_union_map_is_transitively_closed(umap); - if (closed < 0) - goto error; - if (closed) - return umap; - umap = union_components(umap, exact); - return umap; -error: - isl_union_map_free(umap); - return NULL; -} - -struct isl_union_power { - isl_union_map *pow; - int *exact; -}; - -static int power(__isl_take isl_map *map, void *user) -{ - struct isl_union_power *up = user; - - map = isl_map_power(map, up->exact); - up->pow = isl_union_map_from_map(map); - - return -1; -} - -/* Construct a map [x] -> [x+1], with parameters prescribed by "dim". - */ -static __isl_give isl_union_map *increment(__isl_take isl_space *dim) -{ - int k; - isl_basic_map *bmap; - - dim = isl_space_add_dims(dim, isl_dim_in, 1); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - bmap = isl_basic_map_alloc_space(dim, 0, 1, 0); - k = isl_basic_map_alloc_equality(bmap); - if (k < 0) - goto error; - isl_seq_clr(bmap->eq[k], isl_basic_map_total_dim(bmap)); - isl_int_set_si(bmap->eq[k][0], 1); - isl_int_set_si(bmap->eq[k][isl_basic_map_offset(bmap, isl_dim_in)], 1); - isl_int_set_si(bmap->eq[k][isl_basic_map_offset(bmap, isl_dim_out)], -1); - return isl_union_map_from_map(isl_map_from_basic_map(bmap)); -error: - isl_basic_map_free(bmap); - return NULL; -} - -/* Construct a map [[x]->[y]] -> [y-x], with parameters prescribed by "dim". - */ -static __isl_give isl_union_map *deltas_map(__isl_take isl_space *dim) -{ - isl_basic_map *bmap; - - dim = isl_space_add_dims(dim, isl_dim_in, 1); - dim = isl_space_add_dims(dim, isl_dim_out, 1); - bmap = isl_basic_map_universe(dim); - bmap = isl_basic_map_deltas_map(bmap); - - return isl_union_map_from_map(isl_map_from_basic_map(bmap)); -} - -/* Compute the positive powers of "map", or an overapproximation. - * The result maps the exponent to a nested copy of the corresponding power. - * If the result is exact, then *exact is set to 1. - */ -__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap, - int *exact) -{ - int n; - isl_union_map *inc; - isl_union_map *dm; - - if (!umap) - return NULL; - n = isl_union_map_n_map(umap); - if (n == 0) - return umap; - if (n == 1) { - struct isl_union_power up = { NULL, exact }; - isl_union_map_foreach_map(umap, &power, &up); - isl_union_map_free(umap); - return up.pow; - } - inc = increment(isl_union_map_get_space(umap)); - umap = isl_union_map_product(inc, umap); - umap = isl_union_map_transitive_closure(umap, exact); - umap = isl_union_map_zip(umap); - dm = deltas_map(isl_union_map_get_space(umap)); - umap = isl_union_map_apply_domain(umap, dm); - - return umap; -} diff --git a/cloog-0.17.0/isl/isl_union_map.c b/cloog-0.17.0/isl/isl_union_map.c deleted file mode 100644 index 445d4febee53d38bf37349038ab8893de214a9b5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_union_map.c +++ /dev/null @@ -1,2289 +0,0 @@ -/* - * Copyright 2010-2011 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#define ISL_DIM_H -#include -#include -#include -#include -#include -#include -#include -#include - -/* Is this union set a parameter domain? - */ -int isl_union_set_is_params(__isl_keep isl_union_set *uset) -{ - isl_set *set; - int params; - - if (!uset) - return -1; - if (uset->table.n != 1) - return 0; - - set = isl_set_from_union_set(isl_union_set_copy(uset)); - params = isl_set_is_params(set); - isl_set_free(set); - return params; -} - -static __isl_give isl_union_map *isl_union_map_alloc(__isl_take isl_space *dim, - int size) -{ - isl_union_map *umap; - - if (!dim) - return NULL; - - umap = isl_calloc_type(dim->ctx, isl_union_map); - if (!umap) - return NULL; - - umap->ref = 1; - umap->dim = dim; - if (isl_hash_table_init(dim->ctx, &umap->table, size) < 0) - goto error; - - return umap; -error: - isl_space_free(dim); - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *dim) -{ - return isl_union_map_alloc(dim, 16); -} - -__isl_give isl_union_set *isl_union_set_empty(__isl_take isl_space *dim) -{ - return isl_union_map_empty(dim); -} - -isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap) -{ - return umap ? umap->dim->ctx : NULL; -} - -isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset) -{ - return uset ? uset->dim->ctx : NULL; -} - -__isl_give isl_space *isl_union_map_get_space(__isl_keep isl_union_map *umap) -{ - if (!umap) - return NULL; - return isl_space_copy(umap->dim); -} - -__isl_give isl_space *isl_union_set_get_space(__isl_keep isl_union_set *uset) -{ - return isl_union_map_get_space(uset); -} - -static int free_umap_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_map_free(map); - return 0; -} - -static int add_map(__isl_take isl_map *map, void *user) -{ - isl_union_map **umap = (isl_union_map **)user; - - *umap = isl_union_map_add_map(*umap, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_dup(__isl_keep isl_union_map *umap) -{ - isl_union_map *dup; - - if (!umap) - return NULL; - - dup = isl_union_map_empty(isl_space_copy(umap->dim)); - if (isl_union_map_foreach_map(umap, &add_map, &dup) < 0) - goto error; - return dup; -error: - isl_union_map_free(dup); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_cow(__isl_take isl_union_map *umap) -{ - if (!umap) - return NULL; - - if (umap->ref == 1) - return umap; - umap->ref--; - return isl_union_map_dup(umap); -} - -struct isl_union_align { - isl_reordering *exp; - isl_union_map *res; -}; - -static int align_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_reordering *exp; - struct isl_union_align *data = user; - - exp = isl_reordering_extend_space(isl_reordering_copy(data->exp), - isl_map_get_space(map)); - - data->res = isl_union_map_add_map(data->res, - isl_map_realign(isl_map_copy(map), exp)); - - return 0; -} - -/* Align the parameters of umap along those of model. - * The result has the parameters of model first, in the same order - * as they appear in model, followed by any remaining parameters of - * umap that do not appear in model. - */ -__isl_give isl_union_map *isl_union_map_align_params( - __isl_take isl_union_map *umap, __isl_take isl_space *model) -{ - struct isl_union_align data = { NULL, NULL }; - - if (!umap || !model) - goto error; - - if (isl_space_match(umap->dim, isl_dim_param, model, isl_dim_param)) { - isl_space_free(model); - return umap; - } - - model = isl_space_params(model); - data.exp = isl_parameter_alignment_reordering(umap->dim, model); - if (!data.exp) - goto error; - - data.res = isl_union_map_alloc(isl_space_copy(data.exp->dim), - umap->table.n); - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &align_entry, &data) < 0) - goto error; - - isl_reordering_free(data.exp); - isl_union_map_free(umap); - isl_space_free(model); - return data.res; -error: - isl_reordering_free(data.exp); - isl_union_map_free(umap); - isl_union_map_free(data.res); - isl_space_free(model); - return NULL; -} - -__isl_give isl_union_set *isl_union_set_align_params( - __isl_take isl_union_set *uset, __isl_take isl_space *model) -{ - return isl_union_map_align_params(uset, model); -} - -__isl_give isl_union_map *isl_union_map_union(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2) -{ - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_space(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_space(umap1)); - - umap1 = isl_union_map_cow(umap1); - - if (!umap1 || !umap2) - goto error; - - if (isl_union_map_foreach_map(umap2, &add_map, &umap1) < 0) - goto error; - - isl_union_map_free(umap2); - - return umap1; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return NULL; -} - -__isl_give isl_union_set *isl_union_set_union(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2) -{ - return isl_union_map_union(uset1, uset2); -} - -__isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap) -{ - if (!umap) - return NULL; - - umap->ref++; - return umap; -} - -__isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset) -{ - return isl_union_map_copy(uset); -} - -void *isl_union_map_free(__isl_take isl_union_map *umap) -{ - if (!umap) - return NULL; - - if (--umap->ref > 0) - return NULL; - - isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &free_umap_entry, NULL); - isl_hash_table_clear(&umap->table); - isl_space_free(umap->dim); - free(umap); - return NULL; -} - -void *isl_union_set_free(__isl_take isl_union_set *uset) -{ - return isl_union_map_free(uset); -} - -static int has_dim(const void *entry, const void *val) -{ - isl_map *map = (isl_map *)entry; - isl_space *dim = (isl_space *)val; - - return isl_space_is_equal(map->dim, dim); -} - -__isl_give isl_union_map *isl_union_map_add_map(__isl_take isl_union_map *umap, - __isl_take isl_map *map) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!map || !umap) - goto error; - - if (isl_map_plain_is_empty(map)) { - isl_map_free(map); - return umap; - } - - if (!isl_space_match(map->dim, isl_dim_param, umap->dim, isl_dim_param)) { - umap = isl_union_map_align_params(umap, isl_map_get_space(map)); - map = isl_map_align_params(map, isl_union_map_get_space(umap)); - } - - umap = isl_union_map_cow(umap); - - if (!map || !umap) - goto error; - - hash = isl_space_get_hash(map->dim); - entry = isl_hash_table_find(umap->dim->ctx, &umap->table, hash, - &has_dim, map->dim, 1); - if (!entry) - goto error; - - if (!entry->data) - entry->data = map; - else { - entry->data = isl_map_union(entry->data, isl_map_copy(map)); - if (!entry->data) - goto error; - isl_map_free(map); - } - - return umap; -error: - isl_map_free(map); - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_union_set *isl_union_set_add_set(__isl_take isl_union_set *uset, - __isl_take isl_set *set) -{ - return isl_union_map_add_map(uset, (isl_map *)set); -} - -__isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map) -{ - isl_space *dim; - isl_union_map *umap; - - if (!map) - return NULL; - - dim = isl_map_get_space(map); - dim = isl_space_params(dim); - umap = isl_union_map_empty(dim); - umap = isl_union_map_add_map(umap, map); - - return umap; -} - -__isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set) -{ - return isl_union_map_from_map((isl_map *)set); -} - -struct isl_union_map_foreach_data -{ - int (*fn)(__isl_take isl_map *map, void *user); - void *user; -}; - -static int call_on_copy(void **entry, void *user) -{ - isl_map *map = *entry; - struct isl_union_map_foreach_data *data; - data = (struct isl_union_map_foreach_data *)user; - - return data->fn(isl_map_copy(map), data->user); -} - -int isl_union_map_n_map(__isl_keep isl_union_map *umap) -{ - return umap ? umap->table.n : 0; -} - -int isl_union_set_n_set(__isl_keep isl_union_set *uset) -{ - return uset ? uset->table.n : 0; -} - -int isl_union_map_foreach_map(__isl_keep isl_union_map *umap, - int (*fn)(__isl_take isl_map *map, void *user), void *user) -{ - struct isl_union_map_foreach_data data = { fn, user }; - - if (!umap) - return -1; - - return isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &call_on_copy, &data); -} - -static int copy_map(void **entry, void *user) -{ - isl_map *map = *entry; - isl_map **map_p = user; - - *map_p = isl_map_copy(map); - - return -1; -} - -__isl_give isl_map *isl_map_from_union_map(__isl_take isl_union_map *umap) -{ - isl_ctx *ctx; - isl_map *map = NULL; - - if (!umap) - return NULL; - ctx = isl_union_map_get_ctx(umap); - if (umap->table.n != 1) - isl_die(ctx, isl_error_invalid, - "union map needs to contain elements in exactly " - "one space", return isl_union_map_free(umap)); - - isl_hash_table_foreach(ctx, &umap->table, ©_map, &map); - - isl_union_map_free(umap); - - return map; -} - -__isl_give isl_set *isl_set_from_union_set(__isl_take isl_union_set *uset) -{ - return isl_map_from_union_map(uset); -} - -__isl_give isl_map *isl_union_map_extract_map(__isl_keep isl_union_map *umap, - __isl_take isl_space *dim) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!umap || !dim) - goto error; - - hash = isl_space_get_hash(dim); - entry = isl_hash_table_find(umap->dim->ctx, &umap->table, hash, - &has_dim, dim, 0); - if (!entry) - return isl_map_empty(dim); - isl_space_free(dim); - return isl_map_copy(entry->data); -error: - isl_space_free(dim); - return NULL; -} - -__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset, - __isl_take isl_space *dim) -{ - return (isl_set *)isl_union_map_extract_map(uset, dim); -} - -/* Check if umap contains a map in the given space. - */ -__isl_give int isl_union_map_contains(__isl_keep isl_union_map *umap, - __isl_keep isl_space *dim) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!umap || !dim) - return -1; - - hash = isl_space_get_hash(dim); - entry = isl_hash_table_find(umap->dim->ctx, &umap->table, hash, - &has_dim, dim, 0); - return !!entry; -} - -__isl_give int isl_union_set_contains(__isl_keep isl_union_set *uset, - __isl_keep isl_space *dim) -{ - return isl_union_map_contains(uset, dim); -} - -int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_set *set, void *user), void *user) -{ - return isl_union_map_foreach_map(uset, - (int(*)(__isl_take isl_map *, void*))fn, user); -} - -struct isl_union_set_foreach_point_data { - int (*fn)(__isl_take isl_point *pnt, void *user); - void *user; -}; - -static int foreach_point(__isl_take isl_set *set, void *user) -{ - struct isl_union_set_foreach_point_data *data = user; - int r; - - r = isl_set_foreach_point(set, data->fn, data->user); - isl_set_free(set); - - return r; -} - -int isl_union_set_foreach_point(__isl_keep isl_union_set *uset, - int (*fn)(__isl_take isl_point *pnt, void *user), void *user) -{ - struct isl_union_set_foreach_point_data data = { fn, user }; - return isl_union_set_foreach_set(uset, &foreach_point, &data); -} - -struct isl_union_map_gen_bin_data { - isl_union_map *umap2; - isl_union_map *res; -}; - -static int subtract_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_map *map = *entry; - - hash = isl_space_get_hash(map->dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, map->dim, 0); - map = isl_map_copy(map); - if (entry2) { - int empty; - map = isl_map_subtract(map, isl_map_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - } - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -static __isl_give isl_union_map *gen_bin_op(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2, int (*fn)(void **, void *)) -{ - struct isl_union_map_gen_bin_data data = { NULL, NULL }; - - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_space(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_space(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - data.res = isl_union_map_alloc(isl_space_copy(umap1->dim), - umap1->table.n); - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - fn, &data) < 0) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return data.res; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_subtract( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return gen_bin_op(umap1, umap2, &subtract_entry); -} - -__isl_give isl_union_set *isl_union_set_subtract( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_subtract(uset1, uset2); -} - -struct isl_union_map_gen_bin_set_data { - isl_set *set; - isl_union_map *res; -}; - -static int intersect_params_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_set_data *data = user; - isl_map *map = *entry; - int empty; - - map = isl_map_copy(map); - map = isl_map_intersect_params(map, isl_set_copy(data->set)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -static __isl_give isl_union_map *gen_bin_set_op(__isl_take isl_union_map *umap, - __isl_take isl_set *set, int (*fn)(void **, void *)) -{ - struct isl_union_map_gen_bin_set_data data = { NULL, NULL }; - - umap = isl_union_map_align_params(umap, isl_set_get_space(set)); - set = isl_set_align_params(set, isl_union_map_get_space(umap)); - - if (!umap || !set) - goto error; - - data.set = set; - data.res = isl_union_map_alloc(isl_space_copy(umap->dim), - umap->table.n); - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - fn, &data) < 0) - goto error; - - isl_union_map_free(umap); - isl_set_free(set); - return data.res; -error: - isl_union_map_free(umap); - isl_set_free(set); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_intersect_params( - __isl_take isl_union_map *umap, __isl_take isl_set *set) -{ - return gen_bin_set_op(umap, set, &intersect_params_entry); -} - -__isl_give isl_union_set *isl_union_set_intersect_params( - __isl_take isl_union_set *uset, __isl_take isl_set *set) -{ - return isl_union_map_intersect_params(uset, set); -} - -static __isl_give isl_union_map *union_map_intersect_params( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - return isl_union_map_intersect_params(umap, - isl_set_from_union_set(uset)); -} - -static __isl_give isl_union_map *union_map_gist_params( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - return isl_union_map_gist_params(umap, isl_set_from_union_set(uset)); -} - -struct isl_union_map_match_bin_data { - isl_union_map *umap2; - isl_union_map *res; - __isl_give isl_map *(*fn)(__isl_take isl_map*, __isl_take isl_map*); -}; - -static int match_bin_entry(void **entry, void *user) -{ - struct isl_union_map_match_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_map *map = *entry; - int empty; - - hash = isl_space_get_hash(map->dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, map->dim, 0); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = data->fn(map, isl_map_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -static __isl_give isl_union_map *match_bin_op(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2, - __isl_give isl_map *(*fn)(__isl_take isl_map*, __isl_take isl_map*)) -{ - struct isl_union_map_match_bin_data data = { NULL, NULL, fn }; - - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_space(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_space(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - data.res = isl_union_map_alloc(isl_space_copy(umap1->dim), - umap1->table.n); - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - &match_bin_entry, &data) < 0) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return data.res; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_intersect( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return match_bin_op(umap1, umap2, &isl_map_intersect); -} - -/* Compute the intersection of the two union_sets. - * As a special case, if exactly one of the two union_sets - * is a parameter domain, then intersect the parameter domain - * of the other one with this set. - */ -__isl_give isl_union_set *isl_union_set_intersect( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - int p1, p2; - - p1 = isl_union_set_is_params(uset1); - p2 = isl_union_set_is_params(uset2); - if (p1 < 0 || p2 < 0) - goto error; - if (!p1 && p2) - return union_map_intersect_params(uset1, uset2); - if (p1 && !p2) - return union_map_intersect_params(uset2, uset1); - return isl_union_map_intersect(uset1, uset2); -error: - isl_union_set_free(uset1); - isl_union_set_free(uset2); - return NULL; -} - -static int gist_params_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_set_data *data = user; - isl_map *map = *entry; - int empty; - - map = isl_map_copy(map); - map = isl_map_gist_params(map, isl_set_copy(data->set)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_gist_params( - __isl_take isl_union_map *umap, __isl_take isl_set *set) -{ - return gen_bin_set_op(umap, set, &gist_params_entry); -} - -__isl_give isl_union_set *isl_union_set_gist_params( - __isl_take isl_union_set *uset, __isl_take isl_set *set) -{ - return isl_union_map_gist_params(uset, set); -} - -__isl_give isl_union_map *isl_union_map_gist(__isl_take isl_union_map *umap, - __isl_take isl_union_map *context) -{ - return match_bin_op(umap, context, &isl_map_gist); -} - -__isl_give isl_union_set *isl_union_set_gist(__isl_take isl_union_set *uset, - __isl_take isl_union_set *context) -{ - if (isl_union_set_is_params(context)) - return union_map_gist_params(uset, context); - return isl_union_map_gist(uset, context); -} - -static __isl_give isl_map *lex_le_set(__isl_take isl_map *set1, - __isl_take isl_map *set2) -{ - return isl_set_lex_le_set((isl_set *)set1, (isl_set *)set2); -} - -static __isl_give isl_map *lex_lt_set(__isl_take isl_map *set1, - __isl_take isl_map *set2) -{ - return isl_set_lex_lt_set((isl_set *)set1, (isl_set *)set2); -} - -__isl_give isl_union_map *isl_union_set_lex_lt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return match_bin_op(uset1, uset2, &lex_lt_set); -} - -__isl_give isl_union_map *isl_union_set_lex_le_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return match_bin_op(uset1, uset2, &lex_le_set); -} - -__isl_give isl_union_map *isl_union_set_lex_gt_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_reverse(isl_union_set_lex_lt_union_set(uset2, uset1)); -} - -__isl_give isl_union_map *isl_union_set_lex_ge_union_set( - __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2) -{ - return isl_union_map_reverse(isl_union_set_lex_le_union_set(uset2, uset1)); -} - -__isl_give isl_union_map *isl_union_map_lex_gt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return isl_union_map_reverse(isl_union_map_lex_lt_union_map(umap2, umap1)); -} - -__isl_give isl_union_map *isl_union_map_lex_ge_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return isl_union_map_reverse(isl_union_map_lex_le_union_map(umap2, umap1)); -} - -static int intersect_domain_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_space *dim; - isl_map *map = *entry; - int empty; - - dim = isl_map_get_space(map); - dim = isl_space_domain(dim); - hash = isl_space_get_hash(dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, dim, 0); - isl_space_free(dim); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = isl_map_intersect_domain(map, isl_set_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -/* Intersect the domain of "umap" with "uset". - * If "uset" is a parameters domain, then intersect the parameter - * domain of "umap" with this set. - */ -__isl_give isl_union_map *isl_union_map_intersect_domain( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - if (isl_union_set_is_params(uset)) - return union_map_intersect_params(umap, uset); - return gen_bin_op(umap, uset, &intersect_domain_entry); -} - -static int gist_domain_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_space *dim; - isl_map *map = *entry; - int empty; - - dim = isl_map_get_space(map); - dim = isl_space_domain(dim); - hash = isl_space_get_hash(dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, dim, 0); - isl_space_free(dim); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = isl_map_gist_domain(map, isl_set_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -/* Compute the gist of "umap" with respect to the domain "uset". - * If "uset" is a parameters domain, then compute the gist - * with respect to this parameter domain. - */ -__isl_give isl_union_map *isl_union_map_gist_domain( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - if (isl_union_set_is_params(uset)) - return union_map_gist_params(umap, uset); - return gen_bin_op(umap, uset, &gist_domain_entry); -} - -static int intersect_range_entry(void **entry, void *user) -{ - struct isl_union_map_gen_bin_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_space *dim; - isl_map *map = *entry; - int empty; - - dim = isl_map_get_space(map); - dim = isl_space_range(dim); - hash = isl_space_get_hash(dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, dim, 0); - isl_space_free(dim); - if (!entry2) - return 0; - - map = isl_map_copy(map); - map = isl_map_intersect_range(map, isl_set_copy(entry2->data)); - - empty = isl_map_is_empty(map); - if (empty < 0) { - isl_map_free(map); - return -1; - } - if (empty) { - isl_map_free(map); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_intersect_range( - __isl_take isl_union_map *umap, __isl_take isl_union_set *uset) -{ - return gen_bin_op(umap, uset, &intersect_range_entry); -} - -struct isl_union_map_bin_data { - isl_union_map *umap2; - isl_union_map *res; - isl_map *map; - int (*fn)(void **entry, void *user); -}; - -static int apply_range_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - int empty; - - if (!isl_space_tuple_match(data->map->dim, isl_dim_out, - map2->dim, isl_dim_in)) - return 0; - - map2 = isl_map_apply_range(isl_map_copy(data->map), isl_map_copy(map2)); - - empty = isl_map_is_empty(map2); - if (empty < 0) { - isl_map_free(map2); - return -1; - } - if (empty) { - isl_map_free(map2); - return 0; - } - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -static int bin_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map = *entry; - - data->map = map; - if (isl_hash_table_foreach(data->umap2->dim->ctx, &data->umap2->table, - data->fn, data) < 0) - return -1; - - return 0; -} - -static __isl_give isl_union_map *bin_op(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2, int (*fn)(void **entry, void *user)) -{ - struct isl_union_map_bin_data data = { NULL, NULL, NULL, fn }; - - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_space(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_space(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - data.res = isl_union_map_alloc(isl_space_copy(umap1->dim), - umap1->table.n); - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - &bin_entry, &data) < 0) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return data.res; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - isl_union_map_free(data.res); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_apply_range( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &apply_range_entry); -} - -__isl_give isl_union_map *isl_union_map_apply_domain( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - umap1 = isl_union_map_reverse(umap1); - umap1 = isl_union_map_apply_range(umap1, umap2); - return isl_union_map_reverse(umap1); -} - -__isl_give isl_union_set *isl_union_set_apply( - __isl_take isl_union_set *uset, __isl_take isl_union_map *umap) -{ - return isl_union_map_apply_range(uset, umap); -} - -static int map_lex_lt_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_space_tuple_match(data->map->dim, isl_dim_out, - map2->dim, isl_dim_out)) - return 0; - - map2 = isl_map_lex_lt_map(isl_map_copy(data->map), isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_lex_lt_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &map_lex_lt_entry); -} - -static int map_lex_le_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_space_tuple_match(data->map->dim, isl_dim_out, - map2->dim, isl_dim_out)) - return 0; - - map2 = isl_map_lex_le_map(isl_map_copy(data->map), isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_lex_le_union_map( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &map_lex_le_entry); -} - -static int product_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - map2 = isl_map_product(isl_map_copy(data->map), isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_product(__isl_take isl_union_map *umap1, - __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &product_entry); -} - -__isl_give isl_union_set *isl_union_set_product(__isl_take isl_union_set *uset1, - __isl_take isl_union_set *uset2) -{ - return isl_union_map_product(uset1, uset2); -} - -static int range_product_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_space_tuple_match(data->map->dim, isl_dim_in, - map2->dim, isl_dim_in)) - return 0; - - map2 = isl_map_range_product(isl_map_copy(data->map), - isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &range_product_entry); -} - -static int flat_range_product_entry(void **entry, void *user) -{ - struct isl_union_map_bin_data *data = user; - isl_map *map2 = *entry; - - if (!isl_space_tuple_match(data->map->dim, isl_dim_in, - map2->dim, isl_dim_in)) - return 0; - - map2 = isl_map_flat_range_product(isl_map_copy(data->map), - isl_map_copy(map2)); - - data->res = isl_union_map_add_map(data->res, map2); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_flat_range_product( - __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2) -{ - return bin_op(umap1, umap2, &flat_range_product_entry); -} - -static __isl_give isl_union_set *cond_un_op(__isl_take isl_union_map *umap, - int (*fn)(void **, void *)) -{ - isl_union_set *res; - - if (!umap) - return NULL; - - res = isl_union_map_alloc(isl_space_copy(umap->dim), umap->table.n); - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, fn, &res) < 0) - goto error; - - isl_union_map_free(umap); - return res; -error: - isl_union_map_free(umap); - isl_union_set_free(res); - return NULL; -} - -static int from_range_entry(void **entry, void *user) -{ - isl_map *set = *entry; - isl_union_set **res = user; - - *res = isl_union_map_add_map(*res, - isl_map_from_range(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_from_range( - __isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &from_range_entry); -} - -__isl_give isl_union_map *isl_union_map_from_domain( - __isl_take isl_union_set *uset) -{ - return isl_union_map_reverse(isl_union_map_from_range(uset)); -} - -__isl_give isl_union_map *isl_union_map_from_domain_and_range( - __isl_take isl_union_set *domain, __isl_take isl_union_set *range) -{ - return isl_union_map_apply_range(isl_union_map_from_domain(domain), - isl_union_map_from_range(range)); -} - -static __isl_give isl_union_map *un_op(__isl_take isl_union_map *umap, - int (*fn)(void **, void *)) -{ - umap = isl_union_map_cow(umap); - if (!umap) - return NULL; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, fn, NULL) < 0) - goto error; - - return umap; -error: - isl_union_map_free(umap); - return NULL; -} - -static int affine_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_from_basic_map(isl_map_affine_hull(*map)); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_affine_hull( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &affine_entry); -} - -__isl_give isl_union_set *isl_union_set_affine_hull( - __isl_take isl_union_set *uset) -{ - return isl_union_map_affine_hull(uset); -} - -static int polyhedral_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_from_basic_map(isl_map_polyhedral_hull(*map)); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_polyhedral_hull( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &polyhedral_entry); -} - -__isl_give isl_union_set *isl_union_set_polyhedral_hull( - __isl_take isl_union_set *uset) -{ - return isl_union_map_polyhedral_hull(uset); -} - -static int simple_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_from_basic_map(isl_map_simple_hull(*map)); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_simple_hull( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &simple_entry); -} - -__isl_give isl_union_set *isl_union_set_simple_hull( - __isl_take isl_union_set *uset) -{ - return isl_union_map_simple_hull(uset); -} - -static int inplace_entry(void **entry, void *user) -{ - __isl_give isl_map *(*fn)(__isl_take isl_map *); - isl_map **map = (isl_map **)entry; - isl_map *copy; - - fn = *(__isl_give isl_map *(**)(__isl_take isl_map *)) user; - copy = fn(isl_map_copy(*map)); - if (!copy) - return -1; - - isl_map_free(*map); - *map = copy; - - return 0; -} - -static __isl_give isl_union_map *inplace(__isl_take isl_union_map *umap, - __isl_give isl_map *(*fn)(__isl_take isl_map *)) -{ - if (!umap) - return NULL; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &inplace_entry, &fn) < 0) - goto error; - - return umap; -error: - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_union_map *isl_union_map_coalesce( - __isl_take isl_union_map *umap) -{ - return inplace(umap, &isl_map_coalesce); -} - -__isl_give isl_union_set *isl_union_set_coalesce( - __isl_take isl_union_set *uset) -{ - return isl_union_map_coalesce(uset); -} - -__isl_give isl_union_map *isl_union_map_detect_equalities( - __isl_take isl_union_map *umap) -{ - return inplace(umap, &isl_map_detect_equalities); -} - -__isl_give isl_union_set *isl_union_set_detect_equalities( - __isl_take isl_union_set *uset) -{ - return isl_union_map_detect_equalities(uset); -} - -__isl_give isl_union_map *isl_union_map_compute_divs( - __isl_take isl_union_map *umap) -{ - return inplace(umap, &isl_map_compute_divs); -} - -__isl_give isl_union_set *isl_union_set_compute_divs( - __isl_take isl_union_set *uset) -{ - return isl_union_map_compute_divs(uset); -} - -static int lexmin_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_lexmin(*map); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_lexmin( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &lexmin_entry); -} - -__isl_give isl_union_set *isl_union_set_lexmin( - __isl_take isl_union_set *uset) -{ - return isl_union_map_lexmin(uset); -} - -static int lexmax_entry(void **entry, void *user) -{ - isl_map **map = (isl_map **)entry; - - *map = isl_map_lexmax(*map); - - return *map ? 0 : -1; -} - -__isl_give isl_union_map *isl_union_map_lexmax( - __isl_take isl_union_map *umap) -{ - return un_op(umap, &lexmax_entry); -} - -__isl_give isl_union_set *isl_union_set_lexmax( - __isl_take isl_union_set *uset) -{ - return isl_union_map_lexmax(uset); -} - -static int universe_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - map = isl_map_universe(isl_map_get_space(map)); - *res = isl_union_map_add_map(*res, map); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_universe(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &universe_entry); -} - -__isl_give isl_union_set *isl_union_set_universe(__isl_take isl_union_set *uset) -{ - return isl_union_map_universe(uset); -} - -static int reverse_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - *res = isl_union_map_add_map(*res, isl_map_reverse(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &reverse_entry); -} - -static int params_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_params(isl_map_copy(map))); - - return 0; -} - -/* Compute the parameter domain of the given union map. - */ -__isl_give isl_set *isl_union_map_params(__isl_take isl_union_map *umap) -{ - int empty; - - empty = isl_union_map_is_empty(umap); - if (empty < 0) - return isl_union_map_free(umap); - if (empty) - return isl_set_empty(isl_union_map_get_space(umap)); - return isl_set_from_union_set(cond_un_op(umap, ¶ms_entry)); -} - -/* Compute the parameter domain of the given union set. - */ -__isl_give isl_set *isl_union_set_params(__isl_take isl_union_set *uset) -{ - return isl_union_map_params(uset); -} - -static int domain_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_domain(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_domain(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &domain_entry); -} - -static int range_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_range(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_range(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &range_entry); -} - -static int domain_map_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_map_add_map(*res, - isl_map_domain_map(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_domain_map( - __isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &domain_map_entry); -} - -static int range_map_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_map_add_map(*res, - isl_map_range_map(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_range_map( - __isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &range_map_entry); -} - -static int deltas_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - if (!isl_space_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - return 0; - - *res = isl_union_set_add_set(*res, isl_map_deltas(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_deltas(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &deltas_entry); -} - -static int deltas_map_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - if (!isl_space_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - return 0; - - *res = isl_union_map_add_map(*res, - isl_map_deltas_map(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_deltas_map( - __isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &deltas_map_entry); -} - -static int identity_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_map **res = user; - - *res = isl_union_map_add_map(*res, isl_set_identity(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_map *isl_union_set_identity(__isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &identity_entry); -} - -static int unwrap_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - if (!isl_set_is_wrapping(set)) - return 0; - - *res = isl_union_map_add_map(*res, isl_set_unwrap(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_map *isl_union_set_unwrap(__isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &unwrap_entry); -} - -static int wrap_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_map_wrap(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_set *isl_union_map_wrap(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &wrap_entry); -} - -struct isl_union_map_is_subset_data { - isl_union_map *umap2; - int is_subset; -}; - -static int is_subset_entry(void **entry, void *user) -{ - struct isl_union_map_is_subset_data *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - isl_map *map = *entry; - - hash = isl_space_get_hash(map->dim); - entry2 = isl_hash_table_find(data->umap2->dim->ctx, &data->umap2->table, - hash, &has_dim, map->dim, 0); - if (!entry2) { - data->is_subset = 0; - return -1; - } - - data->is_subset = isl_map_is_subset(map, entry2->data); - if (data->is_subset < 0 || !data->is_subset) - return -1; - - return 0; -} - -int isl_union_map_is_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2) -{ - struct isl_union_map_is_subset_data data = { NULL, 1 }; - - umap1 = isl_union_map_copy(umap1); - umap2 = isl_union_map_copy(umap2); - umap1 = isl_union_map_align_params(umap1, isl_union_map_get_space(umap2)); - umap2 = isl_union_map_align_params(umap2, isl_union_map_get_space(umap1)); - - if (!umap1 || !umap2) - goto error; - - data.umap2 = umap2; - if (isl_hash_table_foreach(umap1->dim->ctx, &umap1->table, - &is_subset_entry, &data) < 0 && - data.is_subset) - goto error; - - isl_union_map_free(umap1); - isl_union_map_free(umap2); - - return data.is_subset; -error: - isl_union_map_free(umap1); - isl_union_map_free(umap2); - return -1; -} - -int isl_union_set_is_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2) -{ - return isl_union_map_is_subset(uset1, uset2); -} - -int isl_union_map_is_equal(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2) -{ - int is_subset; - - if (!umap1 || !umap2) - return -1; - is_subset = isl_union_map_is_subset(umap1, umap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_union_map_is_subset(umap2, umap1); - return is_subset; -} - -int isl_union_set_is_equal(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2) -{ - return isl_union_map_is_equal(uset1, uset2); -} - -int isl_union_map_is_strict_subset(__isl_keep isl_union_map *umap1, - __isl_keep isl_union_map *umap2) -{ - int is_subset; - - if (!umap1 || !umap2) - return -1; - is_subset = isl_union_map_is_subset(umap1, umap2); - if (is_subset != 1) - return is_subset; - is_subset = isl_union_map_is_subset(umap2, umap1); - if (is_subset == -1) - return is_subset; - return !is_subset; -} - -int isl_union_set_is_strict_subset(__isl_keep isl_union_set *uset1, - __isl_keep isl_union_set *uset2) -{ - return isl_union_map_is_strict_subset(uset1, uset2); -} - -static int sample_entry(void **entry, void *user) -{ - isl_basic_map **sample = (isl_basic_map **)user; - isl_map *map = *entry; - - *sample = isl_map_sample(isl_map_copy(map)); - if (!*sample) - return -1; - if (!isl_basic_map_plain_is_empty(*sample)) - return -1; - return 0; -} - -__isl_give isl_basic_map *isl_union_map_sample(__isl_take isl_union_map *umap) -{ - isl_basic_map *sample = NULL; - - if (!umap) - return NULL; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &sample_entry, &sample) < 0 && - !sample) - goto error; - - if (!sample) - sample = isl_basic_map_empty(isl_union_map_get_space(umap)); - - isl_union_map_free(umap); - - return sample; -error: - isl_union_map_free(umap); - return NULL; -} - -__isl_give isl_basic_set *isl_union_set_sample(__isl_take isl_union_set *uset) -{ - return (isl_basic_set *)isl_union_map_sample(uset); -} - -struct isl_forall_data { - int res; - int (*fn)(__isl_keep isl_map *map); -}; - -static int forall_entry(void **entry, void *user) -{ - struct isl_forall_data *data = user; - isl_map *map = *entry; - - data->res = data->fn(map); - if (data->res < 0) - return -1; - - if (!data->res) - return -1; - - return 0; -} - -static int union_map_forall(__isl_keep isl_union_map *umap, - int (*fn)(__isl_keep isl_map *map)) -{ - struct isl_forall_data data = { 1, fn }; - - if (!umap) - return -1; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &forall_entry, &data) < 0 && data.res) - return -1; - - return data.res; -} - -struct isl_forall_user_data { - int res; - int (*fn)(__isl_keep isl_map *map, void *user); - void *user; -}; - -static int forall_user_entry(void **entry, void *user) -{ - struct isl_forall_user_data *data = user; - isl_map *map = *entry; - - data->res = data->fn(map, data->user); - if (data->res < 0) - return -1; - - if (!data->res) - return -1; - - return 0; -} - -/* Check if fn(map, user) returns true for all maps "map" in umap. - */ -static int union_map_forall_user(__isl_keep isl_union_map *umap, - int (*fn)(__isl_keep isl_map *map, void *user), void *user) -{ - struct isl_forall_user_data data = { 1, fn, user }; - - if (!umap) - return -1; - - if (isl_hash_table_foreach(umap->dim->ctx, &umap->table, - &forall_user_entry, &data) < 0 && data.res) - return -1; - - return data.res; -} - -int isl_union_map_is_empty(__isl_keep isl_union_map *umap) -{ - return union_map_forall(umap, &isl_map_is_empty); -} - -int isl_union_set_is_empty(__isl_keep isl_union_set *uset) -{ - return isl_union_map_is_empty(uset); -} - -static int is_subset_of_identity(__isl_keep isl_map *map) -{ - int is_subset; - isl_space *dim; - isl_map *id; - - if (!map) - return -1; - - if (!isl_space_tuple_match(map->dim, isl_dim_in, map->dim, isl_dim_out)) - return 0; - - dim = isl_map_get_space(map); - id = isl_map_identity(dim); - - is_subset = isl_map_is_subset(map, id); - - isl_map_free(id); - - return is_subset; -} - -/* Check if the given map is single-valued. - * We simply compute - * - * M \circ M^-1 - * - * and check if the result is a subset of the identity mapping. - */ -int isl_union_map_is_single_valued(__isl_keep isl_union_map *umap) -{ - isl_union_map *test; - int sv; - - if (isl_union_map_n_map(umap) == 1) { - isl_map *map; - umap = isl_union_map_copy(umap); - map = isl_map_from_union_map(umap); - sv = isl_map_is_single_valued(map); - isl_map_free(map); - return sv; - } - - test = isl_union_map_reverse(isl_union_map_copy(umap)); - test = isl_union_map_apply_range(test, isl_union_map_copy(umap)); - - sv = union_map_forall(test, &is_subset_of_identity); - - isl_union_map_free(test); - - return sv; -} - -int isl_union_map_is_injective(__isl_keep isl_union_map *umap) -{ - int in; - - umap = isl_union_map_copy(umap); - umap = isl_union_map_reverse(umap); - in = isl_union_map_is_single_valued(umap); - isl_union_map_free(umap); - - return in; -} - -/* Represents a map that has a fixed value (v) for one of its - * range dimensions. - * The map in this structure is not reference counted, so it - * is only valid while the isl_union_map from which it was - * obtained is still alive. - */ -struct isl_fixed_map { - isl_int v; - isl_map *map; -}; - -static struct isl_fixed_map *alloc_isl_fixed_map_array(isl_ctx *ctx, - int n) -{ - int i; - struct isl_fixed_map *v; - - v = isl_calloc_array(ctx, struct isl_fixed_map, n); - if (!v) - return NULL; - for (i = 0; i < n; ++i) - isl_int_init(v[i].v); - return v; -} - -static void free_isl_fixed_map_array(struct isl_fixed_map *v, int n) -{ - int i; - - if (!v) - return; - for (i = 0; i < n; ++i) - isl_int_clear(v[i].v); - free(v); -} - -/* Compare the "v" field of two isl_fixed_map structs. - */ -static int qsort_fixed_map_cmp(const void *p1, const void *p2) -{ - const struct isl_fixed_map *e1 = (const struct isl_fixed_map *) p1; - const struct isl_fixed_map *e2 = (const struct isl_fixed_map *) p2; - - return isl_int_cmp(e1->v, e2->v); -} - -/* Internal data structure used while checking whether all maps - * in a union_map have a fixed value for a given output dimension. - * v is the list of maps, with the fixed value for the dimension - * n is the number of maps considered so far - * pos is the output dimension under investigation - */ -struct isl_fixed_dim_data { - struct isl_fixed_map *v; - int n; - int pos; -}; - -static int fixed_at_pos(__isl_keep isl_map *map, void *user) -{ - struct isl_fixed_dim_data *data = user; - - data->v[data->n].map = map; - return isl_map_plain_is_fixed(map, isl_dim_out, data->pos, - &data->v[data->n++].v); -} - -static int plain_injective_on_range(__isl_take isl_union_map *umap, - int first, int n_range); - -/* Given a list of the maps, with their fixed values at output dimension "pos", - * check whether the ranges of the maps form an obvious partition. - * - * We first sort the maps according to their fixed values. - * If all maps have a different value, then we know the ranges form - * a partition. - * Otherwise, we collect the maps with the same fixed value and - * check whether each such collection is obviously injective - * based on later dimensions. - */ -static int separates(struct isl_fixed_map *v, int n, - __isl_take isl_space *dim, int pos, int n_range) -{ - int i; - - if (!v) - goto error; - - qsort(v, n, sizeof(*v), &qsort_fixed_map_cmp); - - for (i = 0; i + 1 < n; ++i) { - int j, k; - isl_union_map *part; - int injective; - - for (j = i + 1; j < n; ++j) - if (isl_int_ne(v[i].v, v[j].v)) - break; - - if (j == i + 1) - continue; - - part = isl_union_map_alloc(isl_space_copy(dim), j - i); - for (k = i; k < j; ++k) - part = isl_union_map_add_map(part, - isl_map_copy(v[k].map)); - - injective = plain_injective_on_range(part, pos + 1, n_range); - if (injective < 0) - goto error; - if (!injective) - break; - - i = j - 1; - } - - isl_space_free(dim); - free_isl_fixed_map_array(v, n); - return i + 1 >= n; -error: - isl_space_free(dim); - free_isl_fixed_map_array(v, n); - return -1; -} - -/* Check whether the maps in umap have obviously distinct ranges. - * In particular, check for an output dimension in the range - * [first,n_range) for which all maps have a fixed value - * and then check if these values, possibly along with fixed values - * at later dimensions, entail distinct ranges. - */ -static int plain_injective_on_range(__isl_take isl_union_map *umap, - int first, int n_range) -{ - isl_ctx *ctx; - int n; - struct isl_fixed_dim_data data = { NULL }; - - ctx = isl_union_map_get_ctx(umap); - - if (!umap) - goto error; - - n = isl_union_map_n_map(umap); - if (n <= 1) { - isl_union_map_free(umap); - return 1; - } - - if (first >= n_range) { - isl_union_map_free(umap); - return 0; - } - - data.v = alloc_isl_fixed_map_array(ctx, n); - if (!data.v) - goto error; - - for (data.pos = first; data.pos < n_range; ++data.pos) { - int fixed; - int injective; - isl_space *dim; - - data.n = 0; - fixed = union_map_forall_user(umap, &fixed_at_pos, &data); - if (fixed < 0) - goto error; - if (!fixed) - continue; - dim = isl_union_map_get_space(umap); - injective = separates(data.v, n, dim, data.pos, n_range); - isl_union_map_free(umap); - return injective; - } - - free_isl_fixed_map_array(data.v, n); - isl_union_map_free(umap); - - return 0; -error: - free_isl_fixed_map_array(data.v, n); - isl_union_map_free(umap); - return -1; -} - -/* Check whether the maps in umap that map to subsets of "ran" - * have obviously distinct ranges. - */ -static int plain_injective_on_range_wrap(__isl_keep isl_set *ran, void *user) -{ - isl_union_map *umap = user; - - umap = isl_union_map_copy(umap); - umap = isl_union_map_intersect_range(umap, - isl_union_set_from_set(isl_set_copy(ran))); - return plain_injective_on_range(umap, 0, isl_set_dim(ran, isl_dim_set)); -} - -/* Check if the given union_map is obviously injective. - * - * In particular, we first check if all individual maps are obviously - * injective and then check if all the ranges of these maps are - * obviously disjoint. - */ -int isl_union_map_plain_is_injective(__isl_keep isl_union_map *umap) -{ - int in; - isl_union_map *univ; - isl_union_set *ran; - - in = union_map_forall(umap, &isl_map_plain_is_injective); - if (in < 0) - return -1; - if (!in) - return 0; - - univ = isl_union_map_universe(isl_union_map_copy(umap)); - ran = isl_union_map_range(univ); - - in = union_map_forall_user(ran, &plain_injective_on_range_wrap, umap); - - isl_union_set_free(ran); - - return in; -} - -int isl_union_map_is_bijective(__isl_keep isl_union_map *umap) -{ - int sv; - - sv = isl_union_map_is_single_valued(umap); - if (sv < 0 || !sv) - return sv; - - return isl_union_map_is_injective(umap); -} - -static int zip_entry(void **entry, void *user) -{ - isl_map *map = *entry; - isl_union_map **res = user; - - if (!isl_map_can_zip(map)) - return 0; - - *res = isl_union_map_add_map(*res, isl_map_zip(isl_map_copy(map))); - - return 0; -} - -__isl_give isl_union_map *isl_union_map_zip(__isl_take isl_union_map *umap) -{ - return cond_un_op(umap, &zip_entry); -} - -static int lift_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - *res = isl_union_set_add_set(*res, isl_set_lift(isl_set_copy(set))); - - return 0; -} - -__isl_give isl_union_set *isl_union_set_lift(__isl_take isl_union_set *uset) -{ - return cond_un_op(uset, &lift_entry); -} - -static int coefficients_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - set = isl_set_copy(set); - set = isl_set_from_basic_set(isl_set_coefficients(set)); - *res = isl_union_set_add_set(*res, set); - - return 0; -} - -__isl_give isl_union_set *isl_union_set_coefficients( - __isl_take isl_union_set *uset) -{ - isl_ctx *ctx; - isl_space *dim; - isl_union_set *res; - - if (!uset) - return NULL; - - ctx = isl_union_set_get_ctx(uset); - dim = isl_space_set_alloc(ctx, 0, 0); - res = isl_union_map_alloc(dim, uset->table.n); - if (isl_hash_table_foreach(uset->dim->ctx, &uset->table, - &coefficients_entry, &res) < 0) - goto error; - - isl_union_set_free(uset); - return res; -error: - isl_union_set_free(uset); - isl_union_set_free(res); - return NULL; -} - -static int solutions_entry(void **entry, void *user) -{ - isl_set *set = *entry; - isl_union_set **res = user; - - set = isl_set_copy(set); - set = isl_set_from_basic_set(isl_set_solutions(set)); - if (!*res) - *res = isl_union_set_from_set(set); - else - *res = isl_union_set_add_set(*res, set); - - if (!*res) - return -1; - - return 0; -} - -__isl_give isl_union_set *isl_union_set_solutions( - __isl_take isl_union_set *uset) -{ - isl_union_set *res = NULL; - - if (!uset) - return NULL; - - if (uset->table.n == 0) { - res = isl_union_set_empty(isl_union_set_get_space(uset)); - isl_union_set_free(uset); - return res; - } - - if (isl_hash_table_foreach(uset->dim->ctx, &uset->table, - &solutions_entry, &res) < 0) - goto error; - - isl_union_set_free(uset); - return res; -error: - isl_union_set_free(uset); - isl_union_set_free(res); - return NULL; -} diff --git a/cloog-0.17.0/isl/isl_union_map_private.h b/cloog-0.17.0/isl/isl_union_map_private.h deleted file mode 100644 index c0266c0af61e235e3406cc39d0f0a7146edaa65c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_union_map_private.h +++ /dev/null @@ -1,9 +0,0 @@ -#define isl_union_set isl_union_map -#include - -struct isl_union_map { - int ref; - isl_space *dim; - - struct isl_hash_table table; -}; diff --git a/cloog-0.17.0/isl/isl_union_templ.c b/cloog-0.17.0/isl/isl_union_templ.c deleted file mode 100644 index 498badf773f3c0b5cafd9647f8e2f97407e7bda6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_union_templ.c +++ /dev/null @@ -1,801 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) -#define xS(TYPE,NAME) struct TYPE ## _ ## NAME -#define S(TYPE,NAME) xS(TYPE,NAME) - -struct UNION { - int ref; -#ifdef HAS_TYPE - enum isl_fold type; -#endif - isl_space *dim; - - struct isl_hash_table table; -}; - -__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u); - -isl_ctx *FN(UNION,get_ctx)(__isl_keep UNION *u) -{ - return u ? u->dim->ctx : NULL; -} - -__isl_give isl_space *FN(UNION,get_space)(__isl_keep UNION *u) -{ - if (!u) - return NULL; - return isl_space_copy(u->dim); -} - -#ifdef HAS_TYPE -static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim, - enum isl_fold type, int size) -#else -static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim, int size) -#endif -{ - UNION *u; - - dim = isl_space_params(dim); - if (!dim) - return NULL; - - u = isl_calloc_type(dim->ctx, UNION); - if (!u) - return NULL; - - u->ref = 1; -#ifdef HAS_TYPE - u->type = type; -#endif - u->dim = dim; - if (isl_hash_table_init(dim->ctx, &u->table, size) < 0) - goto error; - - return u; -error: - isl_space_free(dim); - FN(UNION,free)(u); - return NULL; -} - -#ifdef HAS_TYPE -__isl_give UNION *FN(UNION,zero)(__isl_take isl_space *dim, enum isl_fold type) -{ - return FN(UNION,alloc)(dim, type, 16); -} -#else -__isl_give UNION *FN(UNION,zero)(__isl_take isl_space *dim) -{ - return FN(UNION,alloc)(dim, 16); -} -#endif - -__isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u) -{ - if (!u) - return NULL; - - u->ref++; - return u; -} - -S(UNION,foreach_data) -{ - int (*fn)(__isl_take PART *part, void *user); - void *user; -}; - -static int call_on_copy(void **entry, void *user) -{ - PART *part = *entry; - S(UNION,foreach_data) *data = (S(UNION,foreach_data) *)user; - - return data->fn(FN(PART,copy)(part), data->user); -} - -int FN(FN(UNION,foreach),PARTS)(__isl_keep UNION *u, - int (*fn)(__isl_take PART *part, void *user), void *user) -{ - S(UNION,foreach_data) data = { fn, user }; - - if (!u) - return -1; - - return isl_hash_table_foreach(u->dim->ctx, &u->table, - &call_on_copy, &data); -} - -static int has_dim(const void *entry, const void *val) -{ - PART *part = (PART *)entry; - isl_space *dim = (isl_space *)val; - - return isl_space_is_equal(part->dim, dim); -} - -__isl_give PART *FN(FN(UNION,extract),PARTS)(__isl_keep UNION *u, - __isl_take isl_space *dim) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!u || !dim) - goto error; - - hash = isl_space_get_hash(dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, hash, - &has_dim, dim, 0); - if (!entry) -#ifdef HAS_TYPE - return FN(PART,zero)(dim, u->type); -#else - return FN(PART,zero)(dim); -#endif - isl_space_free(dim); - return FN(PART,copy)(entry->data); -error: - isl_space_free(dim); - return NULL; -} - -__isl_give UNION *FN(FN(UNION,add),PARTS)(__isl_take UNION *u, - __isl_take PART *part) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - - if (!part) - goto error; - - if (FN(PART,is_zero)(part)) { - FN(PART,free)(part); - return u; - } - - u = FN(UNION,cow)(u); - - if (!u) - goto error; - - isl_assert(u->dim->ctx, isl_space_match(part->dim, isl_dim_param, u->dim, - isl_dim_param), goto error); - - hash = isl_space_get_hash(part->dim); - entry = isl_hash_table_find(u->dim->ctx, &u->table, hash, - &has_dim, part->dim, 1); - if (!entry) - goto error; - - if (!entry->data) - entry->data = part; - else { - entry->data = FN(PART,add)(entry->data, FN(PART,copy)(part)); - if (!entry->data) - goto error; - FN(PART,free)(part); - if (FN(PART,is_zero)(entry->data)) { - FN(PART,free)(entry->data); - isl_hash_table_remove(u->dim->ctx, &u->table, entry); - } - } - - return u; -error: - FN(PART,free)(part); - FN(UNION,free)(u); - return NULL; -} - -static int add_part(__isl_take PART *part, void *user) -{ - UNION **u = (UNION **)user; - - *u = FN(FN(UNION,add),PARTS)(*u, part); - - return 0; -} - -__isl_give UNION *FN(UNION,dup)(__isl_keep UNION *u) -{ - UNION *dup; - - if (!u) - return NULL; - -#ifdef HAS_TYPE - dup = FN(UNION,zero)(isl_space_copy(u->dim), u->type); -#else - dup = FN(UNION,zero)(isl_space_copy(u->dim)); -#endif - if (FN(FN(UNION,foreach),PARTS)(u, &add_part, &dup) < 0) - goto error; - return dup; -error: - FN(UNION,free)(dup); - return NULL; -} - -__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u) -{ - if (!u) - return NULL; - - if (u->ref == 1) - return u; - u->ref--; - return FN(UNION,dup)(u); -} - -static int free_u_entry(void **entry, void *user) -{ - PART *part = *entry; - FN(PART,free)(part); - return 0; -} - -void FN(UNION,free)(__isl_take UNION *u) -{ - if (!u) - return; - - if (--u->ref > 0) - return; - - isl_hash_table_foreach(u->dim->ctx, &u->table, &free_u_entry, NULL); - isl_hash_table_clear(&u->table); - isl_space_free(u->dim); - free(u); -} - -S(UNION,align) { - isl_reordering *exp; - UNION *res; -}; - -#ifdef ALIGN_DOMAIN -static int align_entry(__isl_take PART *part, void *user) -{ - isl_reordering *exp; - S(UNION,align) *data = user; - - exp = isl_reordering_extend_space(isl_reordering_copy(data->exp), - FN(PART,get_domain_space)(part)); - - data->res = FN(FN(UNION,add),PARTS)(data->res, - FN(PART,realign_domain)(part, exp)); - - return 0; -} -#else -static int align_entry(__isl_take PART *part, void *user) -{ - isl_reordering *exp; - S(UNION,align) *data = user; - - exp = isl_reordering_extend_space(isl_reordering_copy(data->exp), - FN(PART,get_space)(part)); - - data->res = FN(FN(UNION,add),PARTS)(data->res, - FN(PART,realign)(part, exp)); - - return 0; -} -#endif - -__isl_give UNION *FN(UNION,align_params)(__isl_take UNION *u, - __isl_take isl_space *model) -{ - S(UNION,align) data = { NULL, NULL }; - - if (!u || !model) - goto error; - - if (isl_space_match(u->dim, isl_dim_param, model, isl_dim_param)) { - isl_space_free(model); - return u; - } - - data.exp = isl_parameter_alignment_reordering(u->dim, model); - if (!data.exp) - goto error; - -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_space_copy(data.exp->dim), - u->type, u->table.n); -#else - data.res = FN(UNION,alloc)(isl_space_copy(data.exp->dim), u->table.n); -#endif - if (FN(FN(UNION,foreach),PARTS)(u, &align_entry, &data) < 0) - goto error; - - isl_reordering_free(data.exp); - FN(UNION,free)(u); - isl_space_free(model); - return data.res; -error: - isl_reordering_free(data.exp); - FN(UNION,free)(u); - FN(UNION,free)(data.res); - isl_space_free(model); - return NULL; -} - -__isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2) -{ - u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2)); - u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1)); - - u1 = FN(UNION,cow)(u1); - - if (!u1 || !u2) - goto error; - - if (FN(FN(UNION,foreach),PARTS)(u2, &add_part, &u1) < 0) - goto error; - - FN(UNION,free)(u2); - - return u1; -error: - FN(UNION,free)(u1); - FN(UNION,free)(u2); - return NULL; -} - -__isl_give UNION *FN(FN(UNION,from),PARTS)(__isl_take PART *part) -{ - isl_space *dim; - UNION *u; - - if (!part) - return NULL; - - dim = FN(PART,get_space)(part); - dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in)); - dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out)); -#ifdef HAS_TYPE - u = FN(UNION,zero)(dim, part->type); -#else - u = FN(UNION,zero)(dim); -#endif - u = FN(FN(UNION,add),PARTS)(u, part); - - return u; -} - -S(UNION,match_bin_data) { - UNION *u2; - UNION *res; -}; - -/* This function is currently only used from isl_polynomial.c - * and not from isl_fold.c. - */ -static __isl_give UNION *match_bin_op(__isl_take UNION *u1, - __isl_take UNION *u2, - int (*fn)(void **, void *)) __attribute__ ((unused)); -static __isl_give UNION *match_bin_op(__isl_take UNION *u1, - __isl_take UNION *u2, int (*fn)(void **, void *)) -{ - S(UNION,match_bin_data) data = { NULL, NULL }; - - u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2)); - u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1)); - - if (!u1 || !u2) - goto error; - - data.u2 = u2; -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_space_copy(u1->dim), u1->type, u1->table.n); -#else - data.res = FN(UNION,alloc)(isl_space_copy(u1->dim), u1->table.n); -#endif - if (isl_hash_table_foreach(u1->dim->ctx, &u1->table, fn, &data) < 0) - goto error; - - FN(UNION,free)(u1); - FN(UNION,free)(u2); - return data.res; -error: - FN(UNION,free)(u1); - FN(UNION,free)(u2); - FN(UNION,free)(data.res); - return NULL; -} - -S(UNION,any_set_data) { - isl_set *set; - UNION *res; - __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*); -}; - -static int any_set_entry(void **entry, void *user) -{ - S(UNION,any_set_data) *data = user; - PW *pw = *entry; - int empty; - - pw = FN(PW,copy)(pw); - pw = data->fn(pw, isl_set_copy(data->set)); - - empty = FN(PW,is_zero)(pw); - if (empty < 0) { - FN(PW,free)(pw); - return -1; - } - if (empty) { - FN(PW,free)(pw); - return 0; - } - - data->res = FN(FN(UNION,add),PARTS)(data->res, pw); - - return 0; -} - -/* Update each element of "u" by calling "fn" on the element and "set". - */ -static __isl_give UNION *any_set_op(__isl_take UNION *u, - __isl_take isl_set *set, - __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*)) -{ - S(UNION,any_set_data) data = { NULL, NULL, fn }; - - u = FN(UNION,align_params)(u, isl_set_get_space(set)); - set = isl_set_align_params(set, FN(UNION,get_space)(u)); - - if (!u || !set) - goto error; - - data.set = set; -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_space_copy(u->dim), u->type, u->table.n); -#else - data.res = FN(UNION,alloc)(isl_space_copy(u->dim), u->table.n); -#endif - if (isl_hash_table_foreach(u->dim->ctx, &u->table, - &any_set_entry, &data) < 0) - goto error; - - FN(UNION,free)(u); - isl_set_free(set); - return data.res; -error: - FN(UNION,free)(u); - isl_set_free(set); - FN(UNION,free)(data.res); - return NULL; -} - -/* Intersect the domain of "u" with the parameter domain "context". - */ -__isl_give UNION *FN(UNION,intersect_params)(__isl_take UNION *u, - __isl_take isl_set *set) -{ - return any_set_op(u, set, &FN(PW,intersect_params)); -} - -/* Compute the gist of the domain of "u" with respect to - * the parameter domain "context". - */ -__isl_give UNION *FN(UNION,gist_params)(__isl_take UNION *u, - __isl_take isl_set *set) -{ - return any_set_op(u, set, &FN(PW,gist_params)); -} - -S(UNION,match_domain_data) { - isl_union_set *uset; - UNION *res; - __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*); -}; - -static int set_has_dim(const void *entry, const void *val) -{ - isl_set *set = (isl_set *)entry; - isl_space *dim = (isl_space *)val; - - return isl_space_is_equal(set->dim, dim); -} - -/* Find the set in data->uset that live in the same space as the domain - * of *entry, apply data->fn to *entry and this set (if any), and add - * the result to data->res. - */ -static int match_domain_entry(void **entry, void *user) -{ - S(UNION,match_domain_data) *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - PW *pw = *entry; - isl_space *space; - int empty; - - space = FN(PW,get_domain_space)(pw); - hash = isl_space_get_hash(space); - entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table, - hash, &set_has_dim, space, 0); - isl_space_free(space); - if (!entry2) - return 0; - - pw = FN(PW,copy)(pw); - pw = data->fn(pw, isl_set_copy(entry2->data)); - - empty = FN(PW,is_zero)(pw); - if (empty < 0) { - FN(PW,free)(pw); - return -1; - } - if (empty) { - FN(PW,free)(pw); - return 0; - } - - data->res = FN(FN(UNION,add),PARTS)(data->res, pw); - - return 0; -} - -/* Apply fn to each pair of PW in u and set in uset such that - * the set lives in the same space as the domain of PW - * and collect the results. - */ -static __isl_give UNION *match_domain_op(__isl_take UNION *u, - __isl_take isl_union_set *uset, - __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*)) -{ - S(UNION,match_domain_data) data = { NULL, NULL, fn }; - - u = FN(UNION,align_params)(u, isl_union_set_get_space(uset)); - uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u)); - - if (!u || !uset) - goto error; - - data.uset = uset; -#ifdef HAS_TYPE - data.res = FN(UNION,alloc)(isl_space_copy(u->dim), u->type, u->table.n); -#else - data.res = FN(UNION,alloc)(isl_space_copy(u->dim), u->table.n); -#endif - if (isl_hash_table_foreach(u->dim->ctx, &u->table, - &match_domain_entry, &data) < 0) - goto error; - - FN(UNION,free)(u); - isl_union_set_free(uset); - return data.res; -error: - FN(UNION,free)(u); - isl_union_set_free(uset); - FN(UNION,free)(data.res); - return NULL; -} - -/* Intersect the domain of "u" with "uset". - * If "uset" is a parameters domain, then intersect the parameter - * domain of "u" with this set. - */ -__isl_give UNION *FN(UNION,intersect_domain)(__isl_take UNION *u, - __isl_take isl_union_set *uset) -{ - if (isl_union_set_is_params(uset)) - return FN(UNION,intersect_params)(u, - isl_set_from_union_set(uset)); - return match_domain_op(u, uset, &FN(PW,intersect_domain)); -} - -__isl_give UNION *FN(UNION,gist)(__isl_take UNION *u, - __isl_take isl_union_set *uset) -{ - if (isl_union_set_is_params(uset)) - return FN(UNION,gist_params)(u, isl_set_from_union_set(uset)); - return match_domain_op(u, uset, &FN(PW,gist)); -} - -__isl_give isl_qpolynomial *FN(UNION,eval)(__isl_take UNION *u, - __isl_take isl_point *pnt) -{ - uint32_t hash; - struct isl_hash_table_entry *entry; - isl_space *space; - isl_qpolynomial *qp; - - if (!u || !pnt) - goto error; - - space = isl_space_copy(pnt->dim); - space = isl_space_from_domain(space); - space = isl_space_add_dims(space, isl_dim_out, 1); - if (!space) - goto error; - hash = isl_space_get_hash(space); - entry = isl_hash_table_find(u->dim->ctx, &u->table, - hash, &has_dim, space, 0); - isl_space_free(space); - if (!entry) { - qp = isl_qpolynomial_zero_on_domain(isl_space_copy(pnt->dim)); - isl_point_free(pnt); - } else { - qp = FN(PART,eval)(FN(PART,copy)(entry->data), pnt); - } - FN(UNION,free)(u); - return qp; -error: - FN(UNION,free)(u); - isl_point_free(pnt); - return NULL; -} - -static int coalesce_entry(void **entry, void *user) -{ - PW **pw = (PW **)entry; - - *pw = FN(PW,coalesce)(*pw); - if (!*pw) - return -1; - - return 0; -} - -__isl_give UNION *FN(UNION,coalesce)(__isl_take UNION *u) -{ - if (!u) - return NULL; - - if (isl_hash_table_foreach(u->dim->ctx, &u->table, - &coalesce_entry, NULL) < 0) - goto error; - - return u; -error: - FN(UNION,free)(u); - return NULL; -} - -static int domain(__isl_take PART *part, void *user) -{ - isl_union_set **uset = (isl_union_set **)user; - - *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part)); - - return 0; -} - -__isl_give isl_union_set *FN(UNION,domain)(__isl_take UNION *u) -{ - isl_union_set *uset; - - uset = isl_union_set_empty(FN(UNION,get_space)(u)); - if (FN(FN(UNION,foreach),PARTS)(u, &domain, &uset) < 0) - goto error; - - FN(UNION,free)(u); - - return uset; -error: - isl_union_set_free(uset); - FN(UNION,free)(u); - return NULL; -} - -static int mul_isl_int(void **entry, void *user) -{ - PW **pw = (PW **)entry; - isl_int *v = user; - - *pw = FN(PW,mul_isl_int)(*pw, *v); - if (!*pw) - return -1; - - return 0; -} - -__isl_give UNION *FN(UNION,mul_isl_int)(__isl_take UNION *u, isl_int v) -{ - if (isl_int_is_one(v)) - return u; - - if (u && isl_int_is_zero(v)) { - UNION *zero; - isl_space *dim = FN(UNION,get_space)(u); -#ifdef HAS_TYPE - zero = FN(UNION,zero)(dim, u->type); -#else - zero = FN(UNION,zero)(dim); -#endif - FN(UNION,free)(u); - return zero; - } - - u = FN(UNION,cow)(u); - if (!u) - return NULL; - -#ifdef HAS_TYPE - if (isl_int_is_neg(v)) - u->type = isl_fold_type_negate(u->type); -#endif - if (isl_hash_table_foreach(u->dim->ctx, &u->table, &mul_isl_int, v) < 0) - goto error; - - return u; -error: - FN(UNION,free)(u); - return NULL; -} - -S(UNION,plain_is_equal_data) -{ - UNION *u2; - int is_equal; -}; - -static int plain_is_equal_entry(void **entry, void *user) -{ - S(UNION,plain_is_equal_data) *data = user; - uint32_t hash; - struct isl_hash_table_entry *entry2; - PW *pw = *entry; - - hash = isl_space_get_hash(pw->dim); - entry2 = isl_hash_table_find(data->u2->dim->ctx, &data->u2->table, - hash, &has_dim, pw->dim, 0); - if (!entry2) { - data->is_equal = 0; - return -1; - } - - data->is_equal = FN(PW,plain_is_equal)(pw, entry2->data); - if (data->is_equal < 0 || !data->is_equal) - return -1; - - return 0; -} - -int FN(UNION,plain_is_equal)(__isl_keep UNION *u1, __isl_keep UNION *u2) -{ - S(UNION,plain_is_equal_data) data = { NULL, 1 }; - - if (!u1 || !u2) - return -1; - if (u1 == u2) - return 1; - if (u1->table.n != u2->table.n) - return 0; - - u1 = FN(UNION,copy)(u1); - u2 = FN(UNION,copy)(u2); - u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2)); - u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1)); - if (!u1 || !u2) - goto error; - - data.u2 = u2; - if (isl_hash_table_foreach(u1->dim->ctx, &u1->table, - &plain_is_equal_entry, &data) < 0 && - data.is_equal) - goto error; - - FN(UNION,free)(u1); - FN(UNION,free)(u2); - - return data.is_equal; -error: - FN(UNION,free)(u1); - FN(UNION,free)(u2); - return -1; -} diff --git a/cloog-0.17.0/isl/isl_vec.c b/cloog-0.17.0/isl/isl_vec.c deleted file mode 100644 index 61bd57f5dfd54cd5c7ffcb5af7c0fa33933702a7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_vec.c +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include - -isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec) -{ - return vec ? vec->ctx : NULL; -} - -struct isl_vec *isl_vec_alloc(struct isl_ctx *ctx, unsigned size) -{ - struct isl_vec *vec; - - vec = isl_alloc_type(ctx, struct isl_vec); - if (!vec) - return NULL; - - vec->block = isl_blk_alloc(ctx, size); - if (isl_blk_is_error(vec->block)) - goto error; - - vec->ctx = ctx; - isl_ctx_ref(ctx); - vec->ref = 1; - vec->size = size; - vec->el = vec->block.data; - - return vec; -error: - isl_blk_free(ctx, vec->block); - return NULL; -} - -__isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size) -{ - if (!vec) - return NULL; - if (size <= vec->size) - return vec; - - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - vec->block = isl_blk_extend(vec->ctx, vec->block, size); - if (!vec->block.data) - goto error; - - vec->size = size; - vec->el = vec->block.data; - - return vec; -error: - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size) -{ - int extra; - - if (!vec) - return NULL; - if (size <= vec->size) - return vec; - - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - extra = size - vec->size; - vec = isl_vec_extend(vec, size); - if (!vec) - return NULL; - - isl_seq_clr(vec->el + size - extra, extra); - - return vec; -} - -struct isl_vec *isl_vec_copy(struct isl_vec *vec) -{ - if (!vec) - return NULL; - - vec->ref++; - return vec; -} - -struct isl_vec *isl_vec_dup(struct isl_vec *vec) -{ - struct isl_vec *vec2; - - if (!vec) - return NULL; - vec2 = isl_vec_alloc(vec->ctx, vec->size); - isl_seq_cpy(vec2->el, vec->el, vec->size); - return vec2; -} - -struct isl_vec *isl_vec_cow(struct isl_vec *vec) -{ - struct isl_vec *vec2; - if (!vec) - return NULL; - - if (vec->ref == 1) - return vec; - - vec2 = isl_vec_dup(vec); - isl_vec_free(vec); - return vec2; -} - -void isl_vec_free(struct isl_vec *vec) -{ - if (!vec) - return; - - if (--vec->ref > 0) - return; - - isl_ctx_deref(vec->ctx); - isl_blk_free(vec->ctx, vec->block); - free(vec); -} - -int isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2) -{ - if (!vec1 || !vec2) - return -1; - - if (vec1->size != vec2->size) - return 0; - - return isl_seq_eq(vec1->el, vec2->el, vec1->size); -} - -__isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer, - __isl_keep isl_vec *vec) -{ - int i; - - if (!printer || !vec) - goto error; - - printer = isl_printer_print_str(printer, "["); - for (i = 0; i < vec->size; ++i) { - if (i) - printer = isl_printer_print_str(printer, ","); - printer = isl_printer_print_isl_int(printer, vec->el[i]); - } - printer = isl_printer_print_str(printer, "]"); - - return printer; -error: - isl_printer_free(printer); - return NULL; -} - -void isl_vec_dump(struct isl_vec *vec) -{ - isl_printer *printer; - - if (!vec) - return; - - printer = isl_printer_to_file(vec->ctx, stderr); - printer = isl_printer_print_vec(printer, vec); - printer = isl_printer_end_line(printer); - - isl_printer_free(printer); -} - -__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec) -{ - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - isl_seq_clr(vec->el, vec->size); - return vec; -} - -void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm) -{ - isl_seq_lcm(vec->block.data, vec->size, lcm); -} - -/* Given a rational vector, with the denominator in the first element - * of the vector, round up all coordinates. - */ -struct isl_vec *isl_vec_ceil(struct isl_vec *vec) -{ - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - isl_seq_cdiv_q(vec->el + 1, vec->el + 1, vec->el[0], vec->size - 1); - - isl_int_set_si(vec->el[0], 1); - - return vec; -} - -struct isl_vec *isl_vec_normalize(struct isl_vec *vec) -{ - if (!vec) - return NULL; - isl_seq_normalize(vec->ctx, vec->el, vec->size); - return vec; -} - -__isl_give isl_vec *isl_vec_neg(__isl_take isl_vec *vec) -{ - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - isl_seq_neg(vec->el, vec->el, vec->size); - return vec; -} - -__isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m) -{ - if (isl_int_is_one(m)) - return vec; - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - isl_seq_scale(vec->el, vec->el, m, vec->size); - return vec; -} - -__isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1, - __isl_take isl_vec *vec2) -{ - vec1 = isl_vec_cow(vec1); - if (!vec1 || !vec2) - goto error; - - isl_assert(vec1->ctx, vec1->size == vec2->size, goto error); - - isl_seq_combine(vec1->el, vec1->ctx->one, vec1->el, - vec1->ctx->one, vec2->el, vec1->size); - - isl_vec_free(vec2); - return vec1; -error: - isl_vec_free(vec1); - isl_vec_free(vec2); - return NULL; -} - -static int qsort_int_cmp(const void *p1, const void *p2) -{ - const isl_int *i1 = (const isl_int *) p1; - const isl_int *i2 = (const isl_int *) p2; - - return isl_int_cmp(*i1, *i2); -} - -__isl_give isl_vec *isl_vec_sort(__isl_take isl_vec *vec) -{ - if (!vec) - return NULL; - - qsort(vec->el, vec->size, sizeof(*vec->el), &qsort_int_cmp); - - return vec; -} - -__isl_give isl_vec *isl_vec_drop_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n) -{ - if (n == 0) - return vec; - vec = isl_vec_cow(vec); - if (!vec) - return NULL; - - if (pos + n > vec->size) - isl_die(vec->ctx, isl_error_invalid, - "range out of bounds", goto error); - - if (pos + n != vec->size) - isl_seq_cpy(vec->el + pos, vec->el + pos + n, - vec->size - pos - n); - - vec->size -= n; - - return vec; -error: - isl_vec_free(vec); - return NULL; -} - -__isl_give isl_vec *isl_vec_insert_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n) -{ - isl_vec *ext = NULL; - - if (n == 0) - return vec; - if (!vec) - return NULL; - - if (pos > vec->size) - isl_die(vec->ctx, isl_error_invalid, - "position out of bounds", goto error); - - ext = isl_vec_alloc(vec->ctx, vec->size + n); - if (!ext) - goto error; - - isl_seq_cpy(ext->el, vec->el, pos); - isl_seq_cpy(ext->el + pos + n, vec->el + pos, vec->size - pos); - - isl_vec_free(vec); - return ext; -error: - isl_vec_free(vec); - isl_vec_free(ext); - return NULL; -} - -__isl_give isl_vec *isl_vec_insert_zero_els(__isl_take isl_vec *vec, - unsigned pos, unsigned n) -{ - vec = isl_vec_insert_els(vec, pos, n); - if (!vec) - return NULL; - - isl_seq_clr(vec->el + pos, n); - - return vec; -} diff --git a/cloog-0.17.0/isl/isl_version.c b/cloog-0.17.0/isl/isl_version.c deleted file mode 100644 index 1a59f55c186e19d5496c9aaedcc4533484412180..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_version.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "gitversion.h" - -const char *isl_version(void) -{ - return GIT_HEAD_ID"\n"; -} diff --git a/cloog-0.17.0/isl/isl_vertices.c b/cloog-0.17.0/isl/isl_vertices.c deleted file mode 100644 index e7d849e3f248e18386dfe4254babce21266056f5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_vertices.c +++ /dev/null @@ -1,1569 +0,0 @@ -/* - * Copyright 2010 INRIA Saclay - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, - * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, - * 91893 Orsay, France - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define SELECTED 1 -#define DESELECTED -1 -#define UNSELECTED 0 - -static __isl_give isl_vertices *compute_chambers(__isl_take isl_basic_set *bset, - __isl_take isl_vertices *vertices); - -__isl_give isl_vertices *isl_vertices_copy(__isl_keep isl_vertices *vertices) -{ - if (!vertices) - return NULL; - - vertices->ref++; - return vertices; -} - -void isl_vertices_free(__isl_take isl_vertices *vertices) -{ - int i; - - if (!vertices) - return; - - if (--vertices->ref > 0) - return; - - for (i = 0; i < vertices->n_vertices; ++i) { - isl_basic_set_free(vertices->v[i].vertex); - isl_basic_set_free(vertices->v[i].dom); - } - free(vertices->v); - - for (i = 0; i < vertices->n_chambers; ++i) { - free(vertices->c[i].vertices); - isl_basic_set_free(vertices->c[i].dom); - } - free(vertices->c); - - isl_basic_set_free(vertices->bset); - free(vertices); -} - -struct isl_vertex_list { - struct isl_vertex v; - struct isl_vertex_list *next; -}; - -static void free_vertex_list(struct isl_vertex_list *list) -{ - struct isl_vertex_list *next; - - for (; list; list = next) { - next = list->next; - isl_basic_set_free(list->v.vertex); - isl_basic_set_free(list->v.dom); - free(list); - } -} - -static __isl_give isl_vertices *vertices_from_list(__isl_keep isl_basic_set *bset, - int n_vertices, struct isl_vertex_list *list) -{ - int i; - struct isl_vertex_list *next; - isl_vertices *vertices; - - vertices = isl_calloc_type(bset->ctx, isl_vertices); - if (!vertices) - goto error; - vertices->ref = 1; - vertices->bset = isl_basic_set_copy(bset); - vertices->v = isl_alloc_array(bset->ctx, struct isl_vertex, n_vertices); - if (!vertices->v) - goto error; - vertices->n_vertices = n_vertices; - - for (i = 0; list; list = next, i++) { - next = list->next; - vertices->v[i] = list->v; - free(list); - } - - return vertices; -error: - free(vertices); - free_vertex_list(list); - return NULL; -} - -/* Prepend a vertex to the linked list "list" based on the equalities in "tab". - */ -static int add_vertex(struct isl_vertex_list **list, - __isl_keep isl_basic_set *bset, struct isl_tab *tab) -{ - unsigned nvar; - unsigned nparam; - struct isl_vertex_list *v = NULL; - - if (isl_tab_detect_implicit_equalities(tab) < 0) - return -1; - - nvar = isl_basic_set_dim(bset, isl_dim_set); - nparam = isl_basic_set_dim(bset, isl_dim_param); - - v = isl_calloc_type(tab->mat->ctx, struct isl_vertex_list); - if (!v) - goto error; - - v->v.vertex = isl_basic_set_copy(bset); - v->v.vertex = isl_basic_set_cow(v->v.vertex); - v->v.vertex = isl_basic_set_update_from_tab(v->v.vertex, tab); - v->v.vertex = isl_basic_set_simplify(v->v.vertex); - v->v.vertex = isl_basic_set_finalize(v->v.vertex); - if (!v->v.vertex) - goto error; - isl_assert(bset->ctx, v->v.vertex->n_eq >= nvar, goto error); - v->v.dom = isl_basic_set_copy(v->v.vertex); - v->v.dom = isl_basic_set_project_out(v->v.dom, isl_dim_set, 0, nvar); - if (!v->v.dom) - goto error; - - v->next = *list; - *list = v; - - return 0; -error: - free_vertex_list(v); - return -1; -} - -/* Compute the parametric vertices and the chamber decomposition - * of an empty parametric polytope. - */ -static __isl_give isl_vertices *vertices_empty(__isl_keep isl_basic_set *bset) -{ - isl_vertices *vertices; - unsigned nparam; - - if (!bset) - return NULL; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - - vertices = isl_calloc_type(bset->ctx, isl_vertices); - if (!vertices) - return NULL; - vertices->bset = isl_basic_set_copy(bset); - vertices->ref = 1; - - vertices->n_vertices = 0; - vertices->n_chambers = 0; - - return vertices; -} - -/* Compute the parametric vertices and the chamber decomposition - * of the parametric polytope defined using the same constraints - * as "bset" in the 0D case. - * There is exactly one 0D vertex and a single chamber containing - * the vertex. - */ -static __isl_give isl_vertices *vertices_0D(__isl_keep isl_basic_set *bset) -{ - isl_vertices *vertices; - unsigned nparam; - - if (!bset) - return NULL; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - - vertices = isl_calloc_type(bset->ctx, isl_vertices); - if (!vertices) - return NULL; - vertices->ref = 1; - vertices->bset = isl_basic_set_copy(bset); - - vertices->v = isl_calloc_array(bset->ctx, struct isl_vertex, 1); - if (!vertices->v) - goto error; - vertices->n_vertices = 1; - vertices->v[0].vertex = isl_basic_set_copy(bset); - if (!vertices->v[0].vertex) - goto error; - - vertices->c = isl_calloc_array(bset->ctx, struct isl_chamber, 1); - if (!vertices->c) - goto error; - vertices->n_chambers = 1; - vertices->c[0].n_vertices = 1; - vertices->c[0].vertices = isl_calloc_array(bset->ctx, int, 1); - if (!vertices->c[0].vertices) - goto error; - vertices->c[0].dom = isl_basic_set_params(isl_basic_set_copy(bset)); - if (!vertices->c[0].dom) - goto error; - - return vertices; -error: - isl_vertices_free(vertices); - return NULL; -} - -static int isl_mat_rank(__isl_keep isl_mat *mat) -{ - int row, col; - isl_mat *H; - - H = isl_mat_left_hermite(isl_mat_copy(mat), 0, NULL, NULL); - if (!H) - return -1; - - for (col = 0; col < H->n_col; ++col) { - for (row = 0; row < H->n_row; ++row) - if (!isl_int_is_zero(H->row[row][col])) - break; - if (row == H->n_row) - break; - } - - isl_mat_free(H); - - return col; -} - -/* Is the row pointed to by "f" linearly independent of the "n" first - * rows in "facets"? - */ -static int is_independent(__isl_keep isl_mat *facets, int n, isl_int *f) -{ - int rank; - - if (isl_seq_first_non_zero(f, facets->n_col) < 0) - return 0; - - isl_seq_cpy(facets->row[n], f, facets->n_col); - facets->n_row = n + 1; - rank = isl_mat_rank(facets); - if (rank < 0) - return -1; - - return rank == n + 1; -} - -/* Check whether we can select constraint "level", given the current selection - * reflected by facets in "tab", the rows of "facets" and the earlier - * "selected" elements of "selection". - * - * If the constraint is (strictly) redundant in the tableau, selecting it would - * result in an empty tableau, so it can't be selected. - * If the set variable part of the constraint is not linearly indepedent - * of the set variable parts of the already selected constraints, - * the constraint cannot be selected. - * If selecting the constraint results in an empty tableau, the constraint - * cannot be selected. - * Finally, if selecting the constraint results in some explicitly - * deselected constraints turning into equalities, then the corresponding - * vertices have already been generated, so the constraint cannot be selected. - */ -static int can_select(__isl_keep isl_basic_set *bset, int level, - struct isl_tab *tab, __isl_keep isl_mat *facets, int selected, - int *selection) -{ - int i; - int indep; - unsigned ovar; - struct isl_tab_undo *snap; - - if (isl_tab_is_redundant(tab, level)) - return 0; - - ovar = isl_space_offset(bset->dim, isl_dim_set); - - indep = is_independent(facets, selected, bset->ineq[level] + 1 + ovar); - if (indep < 0) - return -1; - if (!indep) - return 0; - - snap = isl_tab_snap(tab); - if (isl_tab_select_facet(tab, level) < 0) - return -1; - - if (tab->empty) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - - for (i = 0; i < level; ++i) { - int sgn; - - if (selection[i] != DESELECTED) - continue; - - if (isl_tab_is_equality(tab, i)) - sgn = 0; - else if (isl_tab_is_redundant(tab, i)) - sgn = 1; - else - sgn = isl_tab_sign_of_max(tab, i); - if (sgn < -1) - return -1; - if (sgn <= 0) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - } - - return 1; -} - -/* Compute the parametric vertices and the chamber decomposition - * of a parametric polytope that is not full-dimensional. - * - * Simply map the parametric polytope to a lower dimensional space - * and map the resulting vertices back. - */ -static __isl_give isl_vertices *lower_dim_vertices( - __isl_keep isl_basic_set *bset) -{ - isl_morph *morph; - isl_vertices *vertices; - - bset = isl_basic_set_copy(bset); - morph = isl_basic_set_full_compression(bset); - bset = isl_morph_basic_set(isl_morph_copy(morph), bset); - - vertices = isl_basic_set_compute_vertices(bset); - isl_basic_set_free(bset); - - morph = isl_morph_inverse(morph); - - vertices = isl_morph_vertices(morph, vertices); - - return vertices; -} - -/* Compute the parametric vertices and the chamber decomposition - * of the parametric polytope defined using the same constraints - * as "bset". "bset" is assumed to have no existentially quantified - * variables. - * - * The vertices themselves are computed in a fairly simplistic way. - * We simply run through all combinations of d constraints, - * with d the number of set variables, and check if those d constraints - * define a vertex. To avoid the generation of duplicate vertices, - * which we may happen if a vertex is defined by more that d constraints, - * we make sure we only generate the vertex for the d constraints with - * smallest index. - * - * We set up a tableau and keep track of which facets have been - * selected. The tableau is marked strict_redundant so that we can be - * sure that any constraint that is marked redundant (and that is not - * also marked zero) is not an equality. - * If a constraint is marked DESELECTED, it means the constraint was - * SELECTED before (in combination with the same selection of earlier - * constraints). If such a deselected constraint turns out to be an - * equality, then any vertex that may still be found with the current - * selection has already been generated when the constraint was selected. - * A constraint is marked UNSELECTED when there is no way selecting - * the constraint could lead to a vertex (in combination with the current - * selection of earlier constraints). - * - * The set variable coefficients of the selected constraints are stored - * in the facets matrix. - */ -__isl_give isl_vertices *isl_basic_set_compute_vertices( - __isl_keep isl_basic_set *bset) -{ - struct isl_tab *tab; - int level; - int init; - unsigned nvar; - int *selection = NULL; - int selected; - struct isl_tab_undo **snap = NULL; - isl_mat *facets = NULL; - struct isl_vertex_list *list = NULL; - int n_vertices = 0; - isl_vertices *vertices; - - if (!bset) - return NULL; - - if (isl_basic_set_plain_is_empty(bset)) - return vertices_empty(bset); - - if (bset->n_eq != 0) - return lower_dim_vertices(bset); - - isl_assert(bset->ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, - return NULL); - - if (isl_basic_set_dim(bset, isl_dim_set) == 0) - return vertices_0D(bset); - - nvar = isl_basic_set_dim(bset, isl_dim_set); - - bset = isl_basic_set_copy(bset); - bset = isl_basic_set_set_rational(bset); - if (!bset) - return NULL; - - tab = isl_tab_from_basic_set(bset); - if (!tab) - goto error; - tab->strict_redundant = 1; - - if (tab->empty) { - vertices = vertices_empty(bset); - isl_basic_set_free(bset); - isl_tab_free(tab); - return vertices; - } - - selection = isl_alloc_array(bset->ctx, int, bset->n_ineq); - snap = isl_alloc_array(bset->ctx, struct isl_tab_undo *, bset->n_ineq); - facets = isl_mat_alloc(bset->ctx, nvar, nvar); - if (!selection || !snap || !facets) - goto error; - - level = 0; - init = 1; - selected = 0; - - while (level >= 0) { - if (level >= bset->n_ineq || - (!init && selection[level] != SELECTED)) { - --level; - init = 0; - continue; - } - if (init) { - int ok; - snap[level] = isl_tab_snap(tab); - ok = can_select(bset, level, tab, facets, selected, - selection); - if (ok < 0) - goto error; - if (ok) { - selection[level] = SELECTED; - selected++; - } else - selection[level] = UNSELECTED; - } else { - selection[level] = DESELECTED; - selected--; - if (isl_tab_rollback(tab, snap[level]) < 0) - goto error; - } - if (selected == nvar) { - if (tab->n_dead == nvar) { - if (add_vertex(&list, bset, tab) < 0) - goto error; - n_vertices++; - } - init = 0; - continue; - } - ++level; - init = 1; - } - - isl_mat_free(facets); - free(selection); - free(snap); - - isl_tab_free(tab); - - vertices = vertices_from_list(bset, n_vertices, list); - - vertices = compute_chambers(bset, vertices); - - return vertices; -error: - isl_mat_free(facets); - free(selection); - free(snap); - isl_tab_free(tab); - isl_basic_set_free(bset); - return NULL; -} - -struct isl_chamber_list { - struct isl_chamber c; - struct isl_chamber_list *next; -}; - -static void free_chamber_list(struct isl_chamber_list *list) -{ - struct isl_chamber_list *next; - - for (; list; list = next) { - next = list->next; - isl_basic_set_free(list->c.dom); - free(list->c.vertices); - free(list); - } -} - -/* Check whether the basic set "bset" is a superset of the basic set described - * by "tab", i.e., check whether all constraints of "bset" are redundant. - */ -static int bset_covers_tab(__isl_keep isl_basic_set *bset, struct isl_tab *tab) -{ - int i; - - if (!bset || !tab) - return -1; - - for (i = 0; i < bset->n_ineq; ++i) { - enum isl_ineq_type type = isl_tab_ineq_type(tab, bset->ineq[i]); - switch (type) { - case isl_ineq_error: return -1; - case isl_ineq_redundant: continue; - default: return 0; - } - } - - return 1; -} - -static __isl_give isl_vertices *vertices_add_chambers( - __isl_take isl_vertices *vertices, int n_chambers, - struct isl_chamber_list *list) -{ - int i; - isl_ctx *ctx; - struct isl_chamber_list *next; - - ctx = isl_vertices_get_ctx(vertices); - vertices->c = isl_alloc_array(ctx, struct isl_chamber, n_chambers); - if (!vertices->c) - goto error; - vertices->n_chambers = n_chambers; - - for (i = 0; list; list = next, i++) { - next = list->next; - vertices->c[i] = list->c; - free(list); - } - - return vertices; -error: - isl_vertices_free(vertices); - free_chamber_list(list); - return NULL; -} - -/* Can "tab" be intersected with "bset" without resulting in - * a lower-dimensional set. - */ -static int can_intersect(struct isl_tab *tab, __isl_keep isl_basic_set *bset) -{ - int i; - struct isl_tab_undo *snap; - - if (isl_tab_extend_cons(tab, bset->n_ineq) < 0) - return -1; - - snap = isl_tab_snap(tab); - - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_tab_ineq_type(tab, bset->ineq[i]) == isl_ineq_redundant) - continue; - if (isl_tab_add_ineq(tab, bset->ineq[i]) < 0) - return -1; - } - - if (isl_tab_detect_implicit_equalities(tab) < 0) - return -1; - if (tab->n_dead) { - if (isl_tab_rollback(tab, snap) < 0) - return -1; - return 0; - } - - return 1; -} - -static int add_chamber(struct isl_chamber_list **list, - __isl_keep isl_vertices *vertices, struct isl_tab *tab, int *selection) -{ - int n_frozen; - int i, j; - int n_vertices = 0; - struct isl_tab_undo *snap; - struct isl_chamber_list *c = NULL; - - for (i = 0; i < vertices->n_vertices; ++i) - if (selection[i]) - n_vertices++; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con && tab->con[i].frozen; ++i) - tab->con[i].frozen = 0; - n_frozen = i; - - if (isl_tab_detect_redundant(tab) < 0) - return -1; - - c = isl_calloc_type(tab->mat->ctx, struct isl_chamber_list); - if (!c) - goto error; - c->c.vertices = isl_alloc_array(tab->mat->ctx, int, n_vertices); - if (!c->c.vertices) - goto error; - c->c.dom = isl_basic_set_from_basic_map(isl_basic_map_copy(tab->bmap)); - c->c.dom = isl_basic_set_set_rational(c->c.dom); - c->c.dom = isl_basic_set_cow(c->c.dom); - c->c.dom = isl_basic_set_update_from_tab(c->c.dom, tab); - c->c.dom = isl_basic_set_simplify(c->c.dom); - c->c.dom = isl_basic_set_finalize(c->c.dom); - if (!c->c.dom) - goto error; - - c->c.n_vertices = n_vertices; - - for (i = 0, j = 0; i < vertices->n_vertices; ++i) - if (selection[i]) { - c->c.vertices[j] = i; - j++; - } - - c->next = *list; - *list = c; - - for (i = 0; i < n_frozen; ++i) - tab->con[i].frozen = 1; - - if (isl_tab_rollback(tab, snap) < 0) - return -1; - - return 0; -error: - free_chamber_list(c); - return -1; -} - -struct isl_facet_todo { - struct isl_tab *tab; /* A tableau representation of the facet */ - isl_basic_set *bset; /* A normalized basic set representation */ - isl_vec *constraint; /* Constraint pointing to the other side */ - struct isl_facet_todo *next; -}; - -static void free_todo(struct isl_facet_todo *todo) -{ - while (todo) { - struct isl_facet_todo *next = todo->next; - - isl_tab_free(todo->tab); - isl_basic_set_free(todo->bset); - isl_vec_free(todo->constraint); - free(todo); - - todo = next; - } -} - -static struct isl_facet_todo *create_todo(struct isl_tab *tab, int con) -{ - int i; - int n_frozen; - struct isl_tab_undo *snap; - struct isl_facet_todo *todo; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con && tab->con[i].frozen; ++i) - tab->con[i].frozen = 0; - n_frozen = i; - - if (isl_tab_detect_redundant(tab) < 0) - return NULL; - - todo = isl_calloc_type(tab->mat->ctx, struct isl_facet_todo); - if (!todo) - return NULL; - - todo->constraint = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var); - if (!todo->constraint) - goto error; - isl_seq_neg(todo->constraint->el, tab->bmap->ineq[con], 1 + tab->n_var); - todo->bset = isl_basic_set_from_basic_map(isl_basic_map_copy(tab->bmap)); - todo->bset = isl_basic_set_set_rational(todo->bset); - todo->bset = isl_basic_set_cow(todo->bset); - todo->bset = isl_basic_set_update_from_tab(todo->bset, tab); - todo->bset = isl_basic_set_simplify(todo->bset); - todo->bset = isl_basic_set_sort_constraints(todo->bset); - if (!todo->bset) - goto error; - ISL_F_SET(todo->bset, ISL_BASIC_SET_NORMALIZED); - todo->tab = isl_tab_dup(tab); - if (!todo->tab) - goto error; - - for (i = 0; i < n_frozen; ++i) - tab->con[i].frozen = 1; - - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - return todo; -error: - free_todo(todo); - return NULL; -} - -/* Create todo items for all interior facets of the chamber represented - * by "tab" and collect them in "next". - */ -static int init_todo(struct isl_facet_todo **next, struct isl_tab *tab) -{ - int i; - struct isl_tab_undo *snap; - struct isl_facet_todo *todo; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con; ++i) { - if (tab->con[i].frozen) - continue; - if (tab->con[i].is_redundant) - continue; - - if (isl_tab_select_facet(tab, i) < 0) - return -1; - - todo = create_todo(tab, i); - if (!todo) - return -1; - - todo->next = *next; - *next = todo; - - if (isl_tab_rollback(tab, snap) < 0) - return -1; - } - - return 0; -} - -/* Does the linked list contain a todo item that is the opposite of "todo". - * If so, return 1 and remove the opposite todo item. - */ -static int has_opposite(struct isl_facet_todo *todo, - struct isl_facet_todo **list) -{ - for (; *list; list = &(*list)->next) { - int eq; - eq = isl_basic_set_plain_is_equal(todo->bset, (*list)->bset); - if (eq < 0) - return -1; - if (!eq) - continue; - todo = *list; - *list = todo->next; - todo->next = NULL; - free_todo(todo); - return 1; - } - - return 0; -} - -/* Create todo items for all interior facets of the chamber represented - * by "tab" and collect them in first->next, taking care to cancel - * opposite todo items. - */ -static int update_todo(struct isl_facet_todo *first, struct isl_tab *tab) -{ - int i; - struct isl_tab_undo *snap; - struct isl_facet_todo *todo; - - snap = isl_tab_snap(tab); - - for (i = 0; i < tab->n_con; ++i) { - int drop; - - if (tab->con[i].frozen) - continue; - if (tab->con[i].is_redundant) - continue; - - if (isl_tab_select_facet(tab, i) < 0) - return -1; - - todo = create_todo(tab, i); - if (!todo) - return -1; - - drop = has_opposite(todo, &first->next); - if (drop < 0) - return -1; - - if (drop) - free_todo(todo); - else { - todo->next = first->next; - first->next = todo; - } - - if (isl_tab_rollback(tab, snap) < 0) - return -1; - } - - return 0; -} - -/* Compute the chamber decomposition of the parametric polytope respresented - * by "bset" given the parametric vertices and their activity domains. - * - * We are only interested in full-dimensional chambers. - * Each of these chambers is the intersection of the activity domains of - * one or more vertices and the union of all chambers is equal to the - * projection of the entire parametric polytope onto the parameter space. - * - * We first create an initial chamber by intersecting as many activity - * domains as possible without ending up with an empty or lower-dimensional - * set. As a minor optimization, we only consider those activity domains - * that contain some arbitrary point. - * - * For each of interior facets of the chamber, we construct a todo item, - * containing the facet and a constraint containing the other side of the facet, - * for constructing the chamber on the other side. - * While their are any todo items left, we pick a todo item and - * create the required chamber by intersecting all activity domains - * that contain the facet and have a full-dimensional intersection with - * the other side of the facet. For each of the interior facets, we - * again create todo items, taking care to cancel opposite todo items. - */ -static __isl_give isl_vertices *compute_chambers(__isl_take isl_basic_set *bset, - __isl_take isl_vertices *vertices) -{ - int i; - isl_ctx *ctx; - isl_vec *sample = NULL; - struct isl_tab *tab = NULL; - struct isl_tab_undo *snap; - int *selection = NULL; - int n_chambers = 0; - struct isl_chamber_list *list = NULL; - struct isl_facet_todo *todo = NULL; - - if (!bset || !vertices) - goto error; - - ctx = isl_vertices_get_ctx(vertices); - selection = isl_alloc_array(ctx, int, vertices->n_vertices); - if (!selection) - goto error; - - bset = isl_basic_set_params(bset); - - tab = isl_tab_from_basic_set(bset); - for (i = 0; i < bset->n_ineq; ++i) - if (isl_tab_freeze_constraint(tab, i) < 0) - goto error; - if (isl_tab_track_bset(tab, bset) < 0) - goto error; - - snap = isl_tab_snap(tab); - - sample = isl_tab_get_sample_value(tab); - - for (i = 0; i < vertices->n_vertices; ++i) { - selection[i] = isl_basic_set_contains(vertices->v[i].dom, sample); - if (selection[i] < 0) - goto error; - if (!selection[i]) - continue; - selection[i] = can_intersect(tab, vertices->v[i].dom); - if (selection[i] < 0) - goto error; - } - - if (isl_tab_detect_redundant(tab) < 0) - goto error; - - if (add_chamber(&list, vertices, tab, selection) < 0) - goto error; - n_chambers++; - - if (init_todo(&todo, tab) < 0) - goto error; - - while (todo) { - struct isl_facet_todo *next; - - if (isl_tab_rollback(tab, snap) < 0) - goto error; - - if (isl_tab_add_ineq(tab, todo->constraint->el) < 0) - goto error; - if (isl_tab_freeze_constraint(tab, tab->n_con - 1) < 0) - goto error; - - for (i = 0; i < vertices->n_vertices; ++i) { - selection[i] = bset_covers_tab(vertices->v[i].dom, - todo->tab); - if (selection[i] < 0) - goto error; - if (!selection[i]) - continue; - selection[i] = can_intersect(tab, vertices->v[i].dom); - if (selection[i] < 0) - goto error; - } - - if (isl_tab_detect_redundant(tab) < 0) - goto error; - - if (add_chamber(&list, vertices, tab, selection) < 0) - goto error; - n_chambers++; - - if (update_todo(todo, tab) < 0) - goto error; - - next = todo->next; - todo->next = NULL; - free_todo(todo); - todo = next; - } - - isl_vec_free(sample); - - isl_tab_free(tab); - free(selection); - - vertices = vertices_add_chambers(vertices, n_chambers, list); - - for (i = 0; vertices && i < vertices->n_vertices; ++i) { - isl_basic_set_free(vertices->v[i].dom); - vertices->v[i].dom = NULL; - } - - return vertices; -error: - free_chamber_list(list); - free_todo(todo); - isl_vec_free(sample); - isl_tab_free(tab); - free(selection); - if (!tab) - isl_basic_set_free(bset); - isl_vertices_free(vertices); - return NULL; -} - -isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex) -{ - return vertex ? isl_vertices_get_ctx(vertex->vertices) : NULL; -} - -int isl_vertex_get_id(__isl_keep isl_vertex *vertex) -{ - return vertex ? vertex->id : -1; -} - -__isl_give isl_basic_set *isl_vertex_get_domain(__isl_keep isl_vertex *vertex) -{ - struct isl_vertex *v; - - if (!vertex) - return NULL; - - v = &vertex->vertices->v[vertex->id]; - if (!v->dom) { - unsigned nvar; - nvar = isl_basic_set_dim(v->vertex, isl_dim_set); - v->dom = isl_basic_set_copy(v->vertex); - v->dom = isl_basic_set_project_out(v->dom, isl_dim_set, 0, nvar); - } - - return isl_basic_set_copy(v->dom); -} - -__isl_give isl_basic_set *isl_vertex_get_expr(__isl_keep isl_vertex *vertex) -{ - struct isl_vertex *v; - - if (!vertex) - return NULL; - - v = &vertex->vertices->v[vertex->id]; - - return isl_basic_set_copy(v->vertex); -} - -static __isl_give isl_vertex *isl_vertex_alloc(__isl_take isl_vertices *vertices, - int id) -{ - isl_ctx *ctx; - isl_vertex *vertex; - - if (!vertices) - return NULL; - - ctx = isl_vertices_get_ctx(vertices); - vertex = isl_alloc_type(ctx, isl_vertex); - if (!vertex) - goto error; - - vertex->vertices = vertices; - vertex->id = id; - - return vertex; -error: - isl_vertices_free(vertices); - return NULL; -} - -void isl_vertex_free(__isl_take isl_vertex *vertex) -{ - if (!vertex) - return; - isl_vertices_free(vertex->vertices); - free(vertex); -} - -__isl_give isl_basic_set *isl_basic_set_set_integral(__isl_take isl_basic_set *bset) -{ - if (!bset) - return NULL; - - if (!ISL_F_ISSET(bset, ISL_BASIC_MAP_RATIONAL)) - return bset; - - bset = isl_basic_set_cow(bset); - if (!bset) - return NULL; - - ISL_F_CLR(bset, ISL_BASIC_MAP_RATIONAL); - - return isl_basic_set_finalize(bset); -} - -isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell) -{ - return cell ? cell->dom->ctx : NULL; -} - -__isl_give isl_basic_set *isl_cell_get_domain(__isl_keep isl_cell *cell) -{ - return cell ? isl_basic_set_copy(cell->dom) : NULL; -} - -static __isl_give isl_cell *isl_cell_alloc(__isl_take isl_vertices *vertices, - __isl_take isl_basic_set *dom, int id) -{ - int i; - isl_cell *cell = NULL; - - if (!vertices || !dom) - goto error; - - cell = isl_calloc_type(dom->ctx, isl_cell); - if (!cell) - goto error; - - cell->n_vertices = vertices->c[id].n_vertices; - cell->ids = isl_alloc_array(dom->ctx, int, cell->n_vertices); - if (!cell->ids) - goto error; - for (i = 0; i < cell->n_vertices; ++i) - cell->ids[i] = vertices->c[id].vertices[i]; - cell->vertices = vertices; - cell->dom = dom; - - return cell; -error: - isl_cell_free(cell); - isl_vertices_free(vertices); - isl_basic_set_free(dom); - return NULL; -} - -void isl_cell_free(__isl_take isl_cell *cell) -{ - if (!cell) - return; - - isl_vertices_free(cell->vertices); - free(cell->ids); - isl_basic_set_free(cell->dom); - free(cell); -} - -/* Create a tableau of the cone obtained by first homogenizing the given - * polytope and then making all inequalities strict by setting the - * constant term to -1. - */ -static struct isl_tab *tab_for_shifted_cone(__isl_keep isl_basic_set *bset) -{ - int i; - isl_vec *c = NULL; - struct isl_tab *tab; - - if (!bset) - return NULL; - tab = isl_tab_alloc(bset->ctx, bset->n_ineq + 1, - 1 + isl_basic_set_total_dim(bset), 0); - if (!tab) - return NULL; - tab->rational = ISL_F_ISSET(bset, ISL_BASIC_SET_RATIONAL); - if (ISL_F_ISSET(bset, ISL_BASIC_MAP_EMPTY)) { - if (isl_tab_mark_empty(tab) < 0) - goto error; - return tab; - } - - c = isl_vec_alloc(bset->ctx, 1 + 1 + isl_basic_set_total_dim(bset)); - if (!c) - goto error; - - isl_int_set_si(c->el[0], 0); - for (i = 0; i < bset->n_eq; ++i) { - isl_seq_cpy(c->el + 1, bset->eq[i], c->size - 1); - if (isl_tab_add_eq(tab, c->el) < 0) - goto error; - } - - isl_int_set_si(c->el[0], -1); - for (i = 0; i < bset->n_ineq; ++i) { - isl_seq_cpy(c->el + 1, bset->ineq[i], c->size - 1); - if (isl_tab_add_ineq(tab, c->el) < 0) - goto error; - if (tab->empty) { - isl_vec_free(c); - return tab; - } - } - - isl_seq_clr(c->el + 1, c->size - 1); - isl_int_set_si(c->el[1], 1); - if (isl_tab_add_ineq(tab, c->el) < 0) - goto error; - - isl_vec_free(c); - return tab; -error: - isl_vec_free(c); - isl_tab_free(tab); - return NULL; -} - -/* Compute an interior point of "bset" by selecting an interior - * point in homogeneous space and projecting the point back down. - */ -static __isl_give isl_vec *isl_basic_set_interior_point( - __isl_keep isl_basic_set *bset) -{ - isl_vec *vec; - struct isl_tab *tab; - - tab = tab_for_shifted_cone(bset); - vec = isl_tab_get_sample_value(tab); - isl_tab_free(tab); - if (!vec) - return NULL; - - isl_seq_cpy(vec->el, vec->el + 1, vec->size - 1); - vec->size--; - - return vec; -} - -/* Call "fn" on all chambers of the parametric polytope with the shared - * facets of neighboring chambers only appearing in one of the chambers. - * - * We pick an interior point from one of the chambers and then make - * all constraints that do not satisfy this point strict. - */ -int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user) -{ - int i, j; - isl_vec *vec; - isl_int v; - isl_cell *cell; - - if (!vertices) - return -1; - - if (vertices->n_chambers == 0) - return 0; - - if (vertices->n_chambers == 1) { - isl_basic_set *dom = isl_basic_set_copy(vertices->c[0].dom); - dom = isl_basic_set_set_integral(dom); - cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, 0); - if (!cell) - return -1; - return fn(cell, user); - } - - vec = isl_basic_set_interior_point(vertices->c[0].dom); - if (!vec) - return -1; - - isl_int_init(v); - - for (i = 0; i < vertices->n_chambers; ++i) { - int r; - isl_basic_set *dom = isl_basic_set_copy(vertices->c[i].dom); - dom = isl_basic_set_cow(dom); - if (!dom) - goto error; - for (j = 0; i && j < dom->n_ineq; ++j) { - isl_seq_inner_product(vec->el, dom->ineq[j], vec->size, - &v); - if (!isl_int_is_neg(v)) - continue; - isl_int_sub_ui(dom->ineq[j][0], dom->ineq[j][0], 1); - } - dom = isl_basic_set_set_integral(dom); - cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, i); - if (!cell) - goto error; - r = fn(cell, user); - if (r < 0) - goto error; - } - - isl_int_clear(v); - isl_vec_free(vec); - - return 0; -error: - isl_int_clear(v); - isl_vec_free(vec); - return -1; -} - -int isl_vertices_foreach_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user) -{ - int i; - isl_cell *cell; - - if (!vertices) - return -1; - - if (vertices->n_chambers == 0) - return 0; - - for (i = 0; i < vertices->n_chambers; ++i) { - int r; - isl_basic_set *dom = isl_basic_set_copy(vertices->c[i].dom); - - cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, i); - if (!cell) - return -1; - - r = fn(cell, user); - if (r < 0) - return -1; - } - - return 0; -} - -int isl_vertices_foreach_vertex(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user) -{ - int i; - isl_vertex *vertex; - - if (!vertices) - return -1; - - if (vertices->n_vertices == 0) - return 0; - - for (i = 0; i < vertices->n_vertices; ++i) { - int r; - - vertex = isl_vertex_alloc(isl_vertices_copy(vertices), i); - if (!vertex) - return -1; - - r = fn(vertex, user); - if (r < 0) - return -1; - } - - return 0; -} - -int isl_cell_foreach_vertex(__isl_keep isl_cell *cell, - int (*fn)(__isl_take isl_vertex *vertex, void *user), void *user) -{ - int i; - isl_vertex *vertex; - - if (!cell) - return -1; - - if (cell->n_vertices == 0) - return 0; - - for (i = 0; i < cell->n_vertices; ++i) { - int r; - - vertex = isl_vertex_alloc(isl_vertices_copy(cell->vertices), - cell->ids[i]); - if (!vertex) - return -1; - - r = fn(vertex, user); - if (r < 0) - return -1; - } - - return 0; -} - -isl_ctx *isl_vertices_get_ctx(__isl_keep isl_vertices *vertices) -{ - return vertices ? vertices->bset->ctx : NULL; -} - -int isl_vertices_get_n_vertices(__isl_keep isl_vertices *vertices) -{ - return vertices ? vertices->n_vertices : -1; -} - -__isl_give isl_vertices *isl_morph_vertices(__isl_take isl_morph *morph, - __isl_take isl_vertices *vertices) -{ - int i; - isl_morph *param_morph = NULL; - - if (!morph || !vertices) - goto error; - - isl_assert(vertices->bset->ctx, vertices->ref == 1, goto error); - - param_morph = isl_morph_copy(morph); - param_morph = isl_morph_remove_dom_dims(param_morph, isl_dim_set, - 0, isl_morph_dom_dim(morph, isl_dim_set)); - param_morph = isl_morph_remove_ran_dims(param_morph, isl_dim_set, - 0, isl_morph_ran_dim(morph, isl_dim_set)); - - for (i = 0; i < vertices->n_vertices; ++i) { - vertices->v[i].dom = isl_morph_basic_set( - isl_morph_copy(param_morph), vertices->v[i].dom); - vertices->v[i].vertex = isl_morph_basic_set( - isl_morph_copy(morph), vertices->v[i].vertex); - if (!vertices->v[i].vertex) - goto error; - } - - for (i = 0; i < vertices->n_chambers; ++i) { - vertices->c[i].dom = isl_morph_basic_set( - isl_morph_copy(param_morph), vertices->c[i].dom); - if (!vertices->c[i].dom) - goto error; - } - - isl_morph_free(param_morph); - isl_morph_free(morph); - return vertices; -error: - isl_morph_free(param_morph); - isl_morph_free(morph); - isl_vertices_free(vertices); - return NULL; -} - -/* Construct a simplex isl_cell spanned by the vertices with indices in - * "simplex_ids" and "other_ids" and call "fn" on this isl_cell. - */ -static int call_on_simplex(__isl_keep isl_cell *cell, - int *simplex_ids, int n_simplex, int *other_ids, int n_other, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user) -{ - int i; - isl_ctx *ctx; - struct isl_cell *simplex; - - ctx = isl_cell_get_ctx(cell); - - simplex = isl_calloc_type(ctx, struct isl_cell); - if (!simplex) - return -1; - simplex->vertices = isl_vertices_copy(cell->vertices); - if (!simplex->vertices) - goto error; - simplex->dom = isl_basic_set_copy(cell->dom); - if (!simplex->dom) - goto error; - simplex->n_vertices = n_simplex + n_other; - simplex->ids = isl_alloc_array(ctx, int, simplex->n_vertices); - if (!simplex->ids) - goto error; - - for (i = 0; i < n_simplex; ++i) - simplex->ids[i] = simplex_ids[i]; - for (i = 0; i < n_other; ++i) - simplex->ids[n_simplex + i] = other_ids[i]; - - return fn(simplex, user); -error: - isl_cell_free(simplex); - return -1; -} - -/* Check whether the parametric vertex described by "vertex" - * lies on the facet corresponding to constraint "facet" of "bset". - * The isl_vec "v" is a temporary vector than can be used by this function. - * - * We eliminate the variables from the facet constraint using the - * equalities defining the vertex and check if the result is identical - * to zero. - * - * It would probably be better to keep track of the constraints defining - * a vertex during the vertex construction so that we could simply look - * it up here. - */ -static int vertex_on_facet(__isl_keep isl_basic_set *vertex, - __isl_keep isl_basic_set *bset, int facet, __isl_keep isl_vec *v) -{ - int i; - isl_int m; - - isl_seq_cpy(v->el, bset->ineq[facet], v->size); - - isl_int_init(m); - for (i = 0; i < vertex->n_eq; ++i) { - int k = isl_seq_last_non_zero(vertex->eq[i], v->size); - isl_seq_elim(v->el, vertex->eq[i], k, v->size, &m); - } - isl_int_clear(m); - - return isl_seq_first_non_zero(v->el, v->size) == -1; -} - -/* Triangulate the polytope spanned by the vertices with ids - * in "simplex_ids" and "other_ids" and call "fn" on each of - * the resulting simplices. - * If the input polytope is already a simplex, we simply call "fn". - * Otherwise, we pick a point from "other_ids" and add it to "simplex_ids". - * Then we consider each facet of "bset" that does not contain the point - * we just picked, but does contain some of the other points in "other_ids" - * and call ourselves recursively on the polytope spanned by the new - * "simplex_ids" and those points in "other_ids" that lie on the facet. - */ -static int triangulate(__isl_keep isl_cell *cell, __isl_keep isl_vec *v, - int *simplex_ids, int n_simplex, int *other_ids, int n_other, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user) -{ - int i, j, k; - int d, nparam; - int *ids; - isl_ctx *ctx; - isl_basic_set *vertex; - isl_basic_set *bset; - - ctx = isl_cell_get_ctx(cell); - d = isl_basic_set_dim(cell->vertices->bset, isl_dim_set); - nparam = isl_basic_set_dim(cell->vertices->bset, isl_dim_param); - - if (n_simplex + n_other == d + 1) - return call_on_simplex(cell, simplex_ids, n_simplex, - other_ids, n_other, fn, user); - - simplex_ids[n_simplex] = other_ids[0]; - vertex = cell->vertices->v[other_ids[0]].vertex; - bset = cell->vertices->bset; - - ids = isl_alloc_array(ctx, int, n_other - 1); - for (i = 0; i < bset->n_ineq; ++i) { - if (isl_seq_first_non_zero(bset->ineq[i] + 1 + nparam, d) == -1) - continue; - if (vertex_on_facet(vertex, bset, i, v)) - continue; - - for (j = 1, k = 0; j < n_other; ++j) { - isl_basic_set *ov; - ov = cell->vertices->v[other_ids[j]].vertex; - if (vertex_on_facet(ov, bset, i, v)) - ids[k++] = other_ids[j]; - } - if (k == 0) - continue; - - if (triangulate(cell, v, simplex_ids, n_simplex + 1, - ids, k, fn, user) < 0) - goto error; - } - free(ids); - - return 0; -error: - free(ids); - return -1; -} - -/* Triangulate the given cell and call "fn" on each of the resulting - * simplices. - */ -int isl_cell_foreach_simplex(__isl_take isl_cell *cell, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user) -{ - int d, total; - int r; - isl_ctx *ctx; - isl_vec *v = NULL; - int *simplex_ids = NULL; - - if (!cell) - return -1; - - d = isl_basic_set_dim(cell->vertices->bset, isl_dim_set); - total = isl_basic_set_total_dim(cell->vertices->bset); - - if (cell->n_vertices == d + 1) - return fn(cell, user); - - ctx = isl_cell_get_ctx(cell); - simplex_ids = isl_alloc_array(ctx, int, d + 1); - if (!simplex_ids) - goto error; - - v = isl_vec_alloc(ctx, 1 + total); - if (!v) - goto error; - - r = triangulate(cell, v, simplex_ids, 0, - cell->ids, cell->n_vertices, fn, user); - - isl_vec_free(v); - free(simplex_ids); - - isl_cell_free(cell); - - return r; -error: - free(simplex_ids); - isl_vec_free(v); - isl_cell_free(cell); - return -1; -} diff --git a/cloog-0.17.0/isl/isl_vertices_private.h b/cloog-0.17.0/isl/isl_vertices_private.h deleted file mode 100644 index 7c707fd54929d6f53c89fc07ea52ab70fc596038..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/isl_vertices_private.h +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -struct isl_morph; - -/* A parametric vertex. "vertex" contains the actual description - * of the vertex as a singleton parametric set. "dom" is the projection - * of "vertex" onto the parameter space, i.e., the activity domain - * of the vertex. - */ -struct isl_vertex { - isl_basic_set *dom; - isl_basic_set *vertex; -}; - -/* A chamber in the chamber decomposition. The indices of the "n_vertices" - * active vertices are stored in "vertices". - */ -struct isl_chamber { - int n_vertices; - int *vertices; - isl_basic_set *dom; -}; - -struct isl_vertices { - int ref; - - /* The rational basic set spanned by the vertices. */ - isl_basic_set *bset; - - int n_vertices; - struct isl_vertex *v; - - int n_chambers; - struct isl_chamber *c; -}; - -struct isl_cell { - int n_vertices; - int *ids; - isl_vertices *vertices; - isl_basic_set *dom; -}; - -struct isl_external_vertex { - isl_vertices *vertices; - int id; -}; - -int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices, - int (*fn)(__isl_take isl_cell *cell, void *user), void *user); -int isl_cell_foreach_simplex(__isl_take isl_cell *cell, - int (*fn)(__isl_take isl_cell *simplex, void *user), void *user); - -__isl_give isl_vertices *isl_morph_vertices(__isl_take struct isl_morph *morph, - __isl_take isl_vertices *vertices); - -#if defined(__cplusplus) -} -#endif diff --git a/cloog-0.17.0/isl/ltmain.sh b/cloog-0.17.0/isl/ltmain.sh deleted file mode 100755 index fa4b1e1f8ae4378e5bc1119d65ac20337f2445fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/ltmain.sh +++ /dev/null @@ -1,8413 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/cloog-0.17.0/isl/m4/ax_c___attribute__.m4 b/cloog-0.17.0/isl/m4/ax_c___attribute__.m4 deleted file mode 100644 index cf3d62bbdf4f516178bb78563b7a5a04e51bde42..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_c___attribute__.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_c___attribute__.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_C___ATTRIBUTE__ -# -# DESCRIPTION -# -# Provides a test for the compiler support of __attribute__ extensions. -# Defines HAVE___ATTRIBUTE__ if it is found. -# -# LICENSE -# -# Copyright (c) 2008 Stepan Kasal -# Copyright (c) 2008 Christian Haggstrom -# Copyright (c) 2008 Ryan McCabe -# -# 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 . -# -# 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. - -#serial 8 - -AC_DEFUN([AX_C___ATTRIBUTE__], [ - AC_CACHE_CHECK([for __attribute__], [ax_cv___attribute__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - static void foo(void) __attribute__ ((unused)); - static void - foo(void) { - exit(1); - } - ]], [])], - [ax_cv___attribute__=yes], - [ax_cv___attribute__=no] - ) - ]) - if test "$ax_cv___attribute__" = "yes"; then - AC_DEFINE([HAVE___ATTRIBUTE__], 1, [define if your compiler has __attribute__]) - fi -]) diff --git a/cloog-0.17.0/isl/m4/ax_cc_maxopt.m4 b/cloog-0.17.0/isl/m4/ax_cc_maxopt.m4 deleted file mode 100644 index 92d522d86038dd0d986b6454779c307a4abfc710..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_cc_maxopt.m4 +++ /dev/null @@ -1,188 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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) - - # drop to -O1 for gcc 4.2 - $CC --version | - sed -e 's/.* \(@<:@0-9@:>@@<:@0-9@:>@*\)\.\(@<:@0-9@:>@@<:@0-9@:>@*\).*/\1 \2/' | - (read major minor - if test $major -eq 4 -a $minor -eq 2; then - exit 0 - fi - exit 1 - ) && CFLAGS="-O1" - ;; - 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/cloog-0.17.0/isl/m4/ax_check_compiler_flags.m4 b/cloog-0.17.0/isl/m4/ax_check_compiler_flags.m4 deleted file mode 100644 index 7da8324b70fed482e01a7e5c58673f79fa960093..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_check_compiler_flags.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.17.0/isl/m4/ax_compiler_vendor.m4 b/cloog-0.17.0/isl/m4/ax_compiler_vendor.m4 deleted file mode 100644 index 321470697e30e959cbee3cdb35a144ccd008ba71..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_compiler_vendor.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/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 -# 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 . -# -# 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. - -#serial 9 - -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__ clang:__clang__ 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/cloog-0.17.0/isl/m4/ax_create_pkgconfig_info.m4 b/cloog-0.17.0/isl/m4/ax_create_pkgconfig_info.m4 deleted file mode 100644 index 60ac5485023df99d79529ac33abe547672a27de2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_create_pkgconfig_info.m4 +++ /dev/null @@ -1,349 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])] -# -# DESCRIPTION -# -# Defaults: -# -# $1 = $PACKAGE_NAME.pc -# $2 = (empty) -# $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) -# $4 = $PACKAGE_SUMMARY (or $1 Library) -# $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) -# $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) -# -# PACKAGE_NAME defaults to $PACKAGE if not set. -# PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. -# -# The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc -# -# You will find this macro most useful in conjunction with -# ax_spec_defaults that can read good initializers from the .spec file. In -# consequencd, most of the generatable installable stuff can be made from -# information being updated in a single place for the whole project. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2008 Sven Verdoolaege -# -# 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 . -# -# 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_CREATE_PKGCONFIG_INFO],[dnl -AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl -AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl -AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl -AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl -AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -AC_MSG_CHECKING(our pkgconfig libname) -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)" -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="$PACKAGE" -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -AC_MSG_RESULT($PKGCONFIG_libname) - -AC_MSG_CHECKING(our pkgconfig version) -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="${PACKAGE_VERSION}" -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="$VERSION" -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -AC_MSG_RESULT($PKGCONFIG_version) - -AC_MSG_CHECKING(our pkgconfig_libdir) -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -AC_MSG_RESULT($pkgconfig_libdir) -test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && ( -AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir)) -AC_SUBST([pkgconfig_libdir]) - -AC_MSG_CHECKING(our pkgconfig_libfile) -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)" -PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"` -PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"` -AC_MSG_RESULT($pkgconfig_libfile) -test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && ( -AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile)) -AC_SUBST([pkgconfig_libfile]) - -AC_MSG_CHECKING(our package / suffix) -PKGCONFIG_suffix="$program_suffix" -test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix="" -AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix}) - -AC_MSG_CHECKING(our pkgconfig description) -PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)" -test ".$PKGCONFIG_description" != "." || \ -PKGCONFIG_description="$PKGCONFIG_libname Library" -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -AC_MSG_RESULT($PKGCONFIG_description) - -AC_MSG_CHECKING(our pkgconfig requires) -PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)" -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -AC_MSG_RESULT($PKGCONFIG_requires) - -AC_MSG_CHECKING(our pkgconfig ext libs) -PKGCONFIG_pkglibs="$PACKAGE_LIBS" -test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname" -PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)" -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -AC_MSG_RESULT($PKGCONFIG_libs) - -AC_MSG_CHECKING(our pkgconfig cppflags) -PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -AC_MSG_RESULT($PKGCONFIG_cppflags) - -AC_MSG_CHECKING(our pkgconfig ldflags) -PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -AC_MSG_RESULT($PKGCONFIG_ldflags) - -test ".$PKGCONFIG_generate" != "." || \ -PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)" -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && ( -AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate)) - -if test ".$PKGCONFIG_src_libdir" = "." ; then -PKGCONFIG_src_libdir=`pwd` -PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")` -test ! -d $PKGCONFIG_src_libdir/src || \ -PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src" -case ".$objdir" in -*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac -AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir) -fi - -if test ".$PKGCONFIG_src_headers" = "." ; then -PKGCONFIG_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) PKGCONFIG_src_headers="" ;; esac -PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` -test ! -d $PKGCONFIG_src_headers/incl[]ude || \ -PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" -AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers) -fi - - -dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here... -AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[ -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -AC_MSG_NOTICE(creating $pkgconfig_generate.in) -cat > $pkgconfig_generate.in <conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - AC_MSG_ERROR([$pkgconfig_generate is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled -],[ -dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here... -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' -])dnl -AS_VAR_POPDEF([PKGCONFIG_suffix])dnl -AS_VAR_POPDEF([PKGCONFIG_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_libfile])dnl -AS_VAR_POPDEF([PKGCONFIG_libname])dnl -AS_VAR_POPDEF([PKGCONFIG_version])dnl -AS_VAR_POPDEF([PKGCONFIG_description])dnl -AS_VAR_POPDEF([PKGCONFIG_requires])dnl -AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl -AS_VAR_POPDEF([PKGCONFIG_libs])dnl -AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl -AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl -AS_VAR_POPDEF([PKGCONFIG_generate])dnl -AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl -]) diff --git a/cloog-0.17.0/isl/m4/ax_create_stdint_h.m4 b/cloog-0.17.0/isl/m4/ax_create_stdint_h.m4 deleted file mode 100644 index 7b8216599e7a5239e50ce007f02ed46884bd4016..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_create_stdint_h.m4 +++ /dev/null @@ -1,739 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_create_stdint_h.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] -# -# DESCRIPTION -# -# the "ISO C9X: 7.18 Integer types " section requires the -# existence of an include file that defines a set of typedefs, -# especially uint8_t,int32_t,uintptr_t. Many older installations will not -# provide this file, but some will have the very same definitions in -# . In other enviroments we can use the inet-types in -# which would define the typedefs int8_t and u_int8_t -# respectivly. -# -# This macros will create a local "_stdint.h" or the headerfile given as -# an argument. In many cases that file will just "#include " or -# "#include ", while in other environments it will provide the -# set of basic 'stdint's definitions/typedefs: -# -# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t -# int_least32_t.. int_fast32_t.. intmax_t -# -# which may or may not rely on the definitions of other files, or using -# the AC_CHECK_SIZEOF macro to determine the actual sizeof each type. -# -# if your header files require the stdint-types you will want to create an -# installable file mylib-int.h that all your other installable header may -# include. So if you have a library package named "mylib", just use -# -# AX_CREATE_STDINT_H(mylib-int.h) -# -# in configure.ac and go to install that very header file in Makefile.am -# along with the other headers (mylib.h) - and the mylib-specific headers -# can simply use "#include " to obtain the stdint-types. -# -# Remember, if the system already had a valid , the generated -# file will include it directly. No need for fuzzy HAVE_STDINT_H things... -# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99 -# compilation and the c99-mode is not the default. Therefore this macro -# will not use the compiler's stdint.h - please complain to the GCC -# developers). -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Guido U. Draheim -# -# 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 . -# -# 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 Macro 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_DATA_MODEL],[ - AC_CHECK_SIZEOF(char) - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(void*) - ac_cv_char_data_model="" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" - ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" - ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" - AC_MSG_CHECKING([data model]) - case "$ac_cv_char_data_model/$ac_cv_long_data_model" in - 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; - 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; - 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; - 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; - 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; - 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; - 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; - 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; - 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; - 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; - 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; - 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; - 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; - 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; - 222/*|333/*|444/*|666/*|888/*) : - ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; - *) ac_cv_data_model="none" ; n="very unusual model" ;; - esac - AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) -]) - -dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) -AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ -AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ - ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) - do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - done - AC_MSG_CHECKING([for stdint uintptr_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ -AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ - ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) - do - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - break; - done - AC_MSG_CHECKING([for stdint uint32_t]) - ]) -]) - -AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ -AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ - ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) - AC_MSG_RESULT([(..)]) - for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) - AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) - m4_ifvaln([$2],[$2]) break - break; - done - AC_MSG_CHECKING([for stdint u_int32_t]) - ]) -]) - -AC_DEFUN([AX_CREATE_STDINT_H], -[# ------ AX CREATE STDINT H ------------------------------------- -AC_MSG_CHECKING([for stdint types]) -ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` -# try to shortcircuit - if the default include path of the compiler -# can find a "stdint.h" header then we assume that all compilers can. -AC_CACHE_VAL([ac_cv_header_stdint_t],[ -old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" -old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" -old_CFLAGS="$CFLAGS" ; CFLAGS="" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[ac_cv_stdint_result="(assuming C99 compatible system)" - ac_cv_header_stdint_t="stdint.h"; ], -[ac_cv_header_stdint_t=""]) -if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then -CFLAGS="-std=c99" -AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], -[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) -fi -CXXFLAGS="$old_CXXFLAGS" -CPPFLAGS="$old_CPPFLAGS" -CFLAGS="$old_CFLAGS" ]) - -v="... $ac_cv_header_stdint_h" -if test "$ac_stdint_h" = "stdint.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) -elif test "$ac_stdint_h" = "inttypes.h" ; then - AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) -elif test "_$ac_cv_header_stdint_t" = "_" ; then - AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) -else - ac_cv_header_stdint="$ac_cv_header_stdint_t" - AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) -fi - -if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. - -dnl .....intro message done, now do a few system checks..... -dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, -dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW -dnl instead that is triggered with 3 or more arguments (see types.m4) - -inttype_headers=`echo $2 | sed -e 's/,/ /g'` - -ac_cv_stdint_result="(no helpful system typedefs seen)" -AX_CHECK_HEADER_STDINT_X(dnl - stdint.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") - -if test "_$ac_cv_header_stdint_x" = "_" ; then -AX_CHECK_HEADER_STDINT_O(dnl, - inttypes.h sys/inttypes.h stdint.h $inttype_headers, - ac_cv_stdint_result="(seen uint32_t$and64 in $i)") -fi - -if test "_$ac_cv_header_stdint_x" = "_" ; then -if test "_$ac_cv_header_stdint_o" = "_" ; then -AX_CHECK_HEADER_STDINT_U(dnl, - sys/types.h inttypes.h sys/inttypes.h $inttype_headers, - ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") -fi fi - -dnl if there was no good C99 header file, do some typedef checks... -if test "_$ac_cv_header_stdint_x" = "_" ; then - AC_MSG_CHECKING([for stdint datatype model]) - AC_MSG_RESULT([(..)]) - AX_CHECK_DATA_MODEL -fi - -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_x" -elif test "_$ac_cv_header_stdint_o" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_o" -elif test "_$ac_cv_header_stdint_u" != "_" ; then - ac_cv_header_stdint="$ac_cv_header_stdint_u" -else - ac_cv_header_stdint="stddef.h" -fi - -AC_MSG_CHECKING([for extra inttypes in chosen header]) -AC_MSG_RESULT([($ac_cv_header_stdint)]) -dnl see if int_least and int_fast types are present in _this_ header. -unset ac_cv_type_int_least32_t -unset ac_cv_type_int_fast32_t -AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) -AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) -AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) - -fi # shortcircut to system "stdint.h" -# ------------------ PREPARE VARIABLES ------------------------------ -if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` -else -ac_cv_stdint_message="using $CC" -fi - -AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl -$ac_cv_stdint_result]) - -dnl ----------------------------------------------------------------- -# ----------------- DONE inttypes.h checks START header ------------- -AC_CONFIG_COMMANDS([$ac_stdint_h],[ -AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) -ac_stdint=$tmp/_stdint.h - -echo "#ifndef" $_ac_stdint_h >$ac_stdint -echo "#define" $_ac_stdint_h "1" >>$ac_stdint -echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint -echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint -echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint -if test "_$ac_cv_header_stdint_t" != "_" ; then -echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint -echo "#include " >>$ac_stdint -echo "#endif" >>$ac_stdint -echo "#endif" >>$ac_stdint -else - -cat >>$ac_stdint < -#else -#include - -/* .................... configured part ............................ */ - -STDINT_EOF - -echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_x" != "_" ; then - ac_header="$ac_cv_header_stdint_x" - echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint -fi - -echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint -if test "_$ac_cv_header_stdint_o" != "_" ; then - ac_header="$ac_cv_header_stdint_o" - echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint -fi - -echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint -if test "_$ac_cv_header_stdint_u" != "_" ; then - ac_header="$ac_cv_header_stdint_u" - echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint -else - echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint -fi - -echo "" >>$ac_stdint - -if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then - echo "#include <$ac_header>" >>$ac_stdint - echo "" >>$ac_stdint -fi fi - -echo "/* which 64bit typedef has been found */" >>$ac_stdint -if test "$ac_cv_type_uint64_t" = "yes" ; then -echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint -fi -if test "$ac_cv_type_u_int64_t" = "yes" ; then -echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* which type model has been detected */" >>$ac_stdint -if test "_$ac_cv_char_data_model" != "_" ; then -echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint -echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint -else -echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint -echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint -fi -echo "" >>$ac_stdint - -echo "/* whether int_least types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_least32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint -fi -echo "/* whether int_fast types were detected */" >>$ac_stdint -if test "$ac_cv_type_int_fast32_t" = "yes"; then -echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint -fi -echo "/* whether intmax_t type was detected */" >>$ac_stdint -if test "$ac_cv_type_intmax_t" = "yes"; then -echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint -else -echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint -fi -echo "" >>$ac_stdint - - cat >>$ac_stdint <= 199901L -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; - -#elif !defined __STRICT_ANSI__ -#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ -#define _HAVE_UINT64_T -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ -/* note: all ELF-systems seem to have loff-support which needs 64-bit */ -#if !defined _NO_LONGLONG -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef long long int64_t; -typedef unsigned long long uint64_t; -#endif - -#elif defined __alpha || (defined __mips && defined _ABIN32) -#if !defined _NO_LONGLONG -typedef long int64_t; -typedef unsigned long uint64_t; -#endif - /* compiler/cpu type to define int64_t */ -#endif -#endif -#endif - -#if defined _STDINT_HAVE_U_INT_TYPES -/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ -typedef u_int8_t uint8_t; -typedef u_int16_t uint16_t; -typedef u_int32_t uint32_t; - -/* glibc compatibility */ -#ifndef __int8_t_defined -#define __int8_t_defined -#endif -#endif - -#ifdef _STDINT_NEED_INT_MODEL_T -/* we must guess all the basic types. Apart from byte-adressable system, */ -/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ -/* (btw, those nibble-addressable systems are way off, or so we assume) */ - -dnl /* have a look at "64bit and data size neutrality" at */ -dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ -dnl /* (the shorthand "ILP" types always have a "P" part) */ - -#if defined _STDINT_BYTE_MODEL -#if _STDINT_LONG_MODEL+0 == 242 -/* 2:4:2 = IP16 = a normal 16-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef long int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 -/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ -/* 4:4:4 = ILP32 = a normal 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 -/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ -/* 4:8:8 = LP64 = a normal 64-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* this system has a "long" of 64bit */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -typedef unsigned long uint64_t; -typedef long int64_t; -#endif -#elif _STDINT_LONG_MODEL+0 == 448 -/* LLP64 a 64-bit system derived from a 32-bit system */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#ifndef __int8_t_defined -#define __int8_t_defined -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif -/* assuming the system has a "long long" */ -#ifndef _HAVE_UINT64_T -#define _HAVE_UINT64_T -#define _HAVE_LONGLONG_UINT64_T -typedef unsigned long long uint64_t; -typedef long long int64_t; -#endif -#else -#define _STDINT_NO_INT32_T -#endif -#else -#define _STDINT_NO_INT8_T -#define _STDINT_NO_INT32_T -#endif -#endif - -/* - * quote from SunOS-5.8 sys/inttypes.h: - * Use at your own risk. As of February 1996, the committee is squarely - * behind the fixed sized types; the "least" and "fast" types are still being - * discussed. The probability that the "fast" types may be removed before - * the standard is finalized is high enough that they are not currently - * implemented. - */ - -#if defined _STDINT_NEED_INT_LEAST_T -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_least64_t; -#endif - -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_least64_t; -#endif - /* least types */ -#endif - -#if defined _STDINT_NEED_INT_FAST_T -typedef int8_t int_fast8_t; -typedef int int_fast16_t; -typedef int32_t int_fast32_t; -#ifdef _HAVE_UINT64_T -typedef int64_t int_fast64_t; -#endif - -typedef uint8_t uint_fast8_t; -typedef unsigned uint_fast16_t; -typedef uint32_t uint_fast32_t; -#ifdef _HAVE_UINT64_T -typedef uint64_t uint_fast64_t; -#endif - /* fast types */ -#endif - -#ifdef _STDINT_NEED_INTMAX_T -#ifdef _HAVE_UINT64_T -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; -#else -typedef long intmax_t; -typedef unsigned long uintmax_t; -#endif -#endif - -#ifdef _STDINT_NEED_INTPTR_T -#ifndef __intptr_t_defined -#define __intptr_t_defined -/* we encourage using "long" to store pointer values, never use "int" ! */ -#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 -typedef unsigned int uintptr_t; -typedef int intptr_t; -#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 -typedef unsigned long uintptr_t; -typedef long intptr_t; -#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T -typedef uint64_t uintptr_t; -typedef int64_t intptr_t; -#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ -typedef unsigned long uintptr_t; -typedef long intptr_t; -#endif -#endif -#endif - -/* The ISO C99 standard specifies that in C++ implementations these - should only be defined if explicitly requested. */ -#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS -#ifndef UINT32_C - -/* Signed. */ -# define INT8_C(c) c -# define INT16_C(c) c -# define INT32_C(c) c -# ifdef _HAVE_LONGLONG_UINT64_T -# define INT64_C(c) c ## L -# else -# define INT64_C(c) c ## LL -# endif - -/* Unsigned. */ -# define UINT8_C(c) c ## U -# define UINT16_C(c) c ## U -# define UINT32_C(c) c ## U -# ifdef _HAVE_LONGLONG_UINT64_T -# define UINT64_C(c) c ## UL -# else -# define UINT64_C(c) c ## ULL -# endif - -/* Maximal type. */ -# ifdef _HAVE_LONGLONG_UINT64_T -# define INTMAX_C(c) c ## L -# define UINTMAX_C(c) c ## UL -# else -# define INTMAX_C(c) c ## LL -# define UINTMAX_C(c) c ## ULL -# endif - - /* literalnumbers */ -#endif -#endif - -/* These limits are merily those of a two complement byte-oriented system */ - -/* Minimum of signed integral types. */ -# define INT8_MIN (-128) -# define INT16_MIN (-32767-1) -# define INT32_MIN (-2147483647-1) -#ifndef INT64_MIN -# define INT64_MIN (-__INT64_C(9223372036854775807)-1) -#endif -/* Maximum of signed integral types. */ -# define INT8_MAX (127) -# define INT16_MAX (32767) -# define INT32_MAX (2147483647) -#ifndef INT64_MAX -# define INT64_MAX (__INT64_C(9223372036854775807)) -#endif - -/* Maximum of unsigned integral types. */ -#ifndef UINT8_MAX -# define UINT8_MAX (255) -#endif -#ifndef UINT16_MAX -# define UINT16_MAX (65535) -#endif -# define UINT32_MAX (4294967295U) -#ifndef UINT64_MAX -# define UINT64_MAX (__UINT64_C(18446744073709551615)) -#endif - -/* Minimum of signed integral types having a minimum size. */ -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST64_MIN INT64_MIN -/* Maximum of signed integral types having a minimum size. */ -# define INT_LEAST8_MAX INT8_MAX -# define INT_LEAST16_MAX INT16_MAX -# define INT_LEAST32_MAX INT32_MAX -# define INT_LEAST64_MAX INT64_MAX - -/* Maximum of unsigned integral types having a minimum size. */ -# define UINT_LEAST8_MAX UINT8_MAX -# define UINT_LEAST16_MAX UINT16_MAX -# define UINT_LEAST32_MAX UINT32_MAX -# define UINT_LEAST64_MAX UINT64_MAX - - /* shortcircuit*/ -#endif - /* once */ -#endif -#endif -STDINT_EOF -fi - if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then - AC_MSG_NOTICE([$ac_stdint_h is unchanged]) - else - ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f $ac_stdint_h - mv $ac_stdint $ac_stdint_h - fi -],[# variables for create stdint.h replacement -PACKAGE="$PACKAGE" -VERSION="$VERSION" -ac_stdint_h="$ac_stdint_h" -_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) -ac_cv_stdint_message="$ac_cv_stdint_message" -ac_cv_header_stdint_t="$ac_cv_header_stdint_t" -ac_cv_header_stdint_x="$ac_cv_header_stdint_x" -ac_cv_header_stdint_o="$ac_cv_header_stdint_o" -ac_cv_header_stdint_u="$ac_cv_header_stdint_u" -ac_cv_type_uint64_t="$ac_cv_type_uint64_t" -ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" -ac_cv_char_data_model="$ac_cv_char_data_model" -ac_cv_long_data_model="$ac_cv_long_data_model" -ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" -ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" -ac_cv_type_intmax_t="$ac_cv_type_intmax_t" -]) -]) diff --git a/cloog-0.17.0/isl/m4/ax_detect_git_head.m4 b/cloog-0.17.0/isl/m4/ax_detect_git_head.m4 deleted file mode 100644 index d585983510a8bdee5f6163f7f8028942a4ba73d1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_detect_git_head.m4 +++ /dev/null @@ -1,27 +0,0 @@ -AC_DEFUN([AX_DETECT_GIT_HEAD], [ - AC_SUBST(GIT_HEAD_ID) - AC_SUBST(GIT_HEAD) - AC_SUBST(GIT_HEAD_VERSION) - if test -f $srcdir/.git/HEAD; then - GIT_HEAD="$srcdir/.git/index" - GIT_REPO="$srcdir/.git" - GIT_HEAD_ID=`GIT_DIR=$GIT_REPO git describe` - elif test -f $srcdir/GIT_HEAD_ID; then - GIT_HEAD_ID=`cat $srcdir/GIT_HEAD_ID` - else - mysrcdir=`(cd $srcdir; pwd)` - head=`basename $mysrcdir | sed -e 's/.*-//'` - head2=`echo $head | sed -e 's/[^0-9a-f]//'` - head3=`echo $head2 | sed -e 's/........................................//'` - if test "x$head3" = "x" -a "x$head" = "x$head2"; then - GIT_HEAD_ID="$head" - else - GIT_HEAD_ID="UNKNOWN" - fi - fi - if test -z "$GIT_REPO" ; then - GIT_HEAD_VERSION="$GIT_HEAD_ID" - else - GIT_HEAD_VERSION="\`GIT_DIR=$GIT_REPO git describe\`" - fi -]) diff --git a/cloog-0.17.0/isl/m4/ax_gcc_archflag.m4 b/cloog-0.17.0/isl/m4/ax_gcc_archflag.m4 deleted file mode 100644 index dedeef424e945cbd57dc69f45a7860210c4b7b9c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_gcc_archflag.m4 +++ /dev/null @@ -1,213 +0,0 @@ -# =========================================================================== -# 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= 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 -# 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 . -# -# 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=], [use architecture 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/cloog-0.17.0/isl/m4/ax_gcc_warn_unused_result.m4 b/cloog-0.17.0/isl/m4/ax_gcc_warn_unused_result.m4 deleted file mode 100644 index a957f8f9eaf96bcc2c318f8e22eb3478f412fc57..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_gcc_warn_unused_result.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_gcc_warn_unused_result.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_WARN_UNUSED_RESULT -# -# DESCRIPTION -# -# The macro will compile a test program to see whether the compiler does -# understand the per-function postfix pragma. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# -# 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 . -# -# 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_WARN_UNUSED_RESULT],[dnl -AC_CACHE_CHECK( - [whether the compiler supports function __attribute__((__warn_unused_result__))], - ax_cv_gcc_warn_unused_result,[ - AC_TRY_COMPILE([__attribute__((__warn_unused_result__)) - int f(int i) { return i; }], - [], - ax_cv_gcc_warn_unused_result=yes, ax_cv_gcc_warn_unused_result=no)]) - if test "$ax_cv_gcc_warn_unused_result" = yes; then - AC_DEFINE([GCC_WARN_UNUSED_RESULT],[__attribute__((__warn_unused_result__))], - [most gcc compilers know a function __attribute__((__warn_unused_result__))]) - fi -]) diff --git a/cloog-0.17.0/isl/m4/ax_gcc_x86_cpuid.m4 b/cloog-0.17.0/isl/m4/ax_gcc_x86_cpuid.m4 deleted file mode 100644 index 5420b095900a37f43dd9835934b532e05c6b3f6e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_gcc_x86_cpuid.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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 ], [ - 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/cloog-0.17.0/isl/m4/ax_set_warning_flags.m4 b/cloog-0.17.0/isl/m4/ax_set_warning_flags.m4 deleted file mode 100644 index c64ad7d8478b0cb4340ef8301a75233cbb9c8f94..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_set_warning_flags.m4 +++ /dev/null @@ -1,17 +0,0 @@ -dnl Add a set of flags to WARNING_FLAGS, that enable compiler warnings for -dnl isl. The warnings that are enabled vary with the compiler and only include -dnl warnings that did not trigger at the time of adding these flags. -AC_DEFUN([AX_SET_WARNING_FLAGS],[dnl - AX_COMPILER_VENDOR - - WARNING_FLAGS="" - - if test "${ax_cv_c_compiler_vendor}" = "clang"; then - dnl isl is at the moment clean of -Wall warnings. If clang adds - dnl new warnings to -Wall which cause false positives, the - dnl specific warning types will be disabled explicitally (by - dnl adding for example -Wno-return-type). To temporarily disable - dnl all warnings run configure with CFLAGS=-Wno-all. - WARNING_FLAGS="-Wall" - fi -]) diff --git a/cloog-0.17.0/isl/m4/ax_submodule.m4 b/cloog-0.17.0/isl/m4/ax_submodule.m4 deleted file mode 100644 index 7cf899576d79317e74f3303fd2acbf66e7313840..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ax_submodule.m4 +++ /dev/null @@ -1,71 +0,0 @@ -AC_DEFUN([AX_SUBMODULE], -[ - -m4_if(m4_bregexp($2,|,choice),choice, - [AC_ARG_WITH($1, - [AS_HELP_STRING([--with-$1=$2], - [Which $1 to use [default=$3]])])]) -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 -m4_if(m4_bregexp($2,build,build),build, - [AC_ARG_WITH($1_builddir, - [AS_HELP_STRING([--with-$1-builddir=DIR], - [Location of $1 builddir])])]) -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" != "xyes" -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" != "xyes" -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 -if test "x$with_$1_exec_prefix" != "x"; then - export PKG_CONFIG_PATH="$with_$1_exec_prefix/lib/pkgconfig${PKG_CONFIG_PATH+:$PKG_CONFIG_PATH}" -fi -case "$with_$1" in -$2) - ;; -*) - case "$3" in - bundled) - 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; then - with_$1="bundled" - else - with_$1="no" - fi - ;; - *) - with_$1="$3" - ;; - esac - ;; -esac -AC_MSG_CHECKING([which $1 to use]) -AC_MSG_RESULT($with_$1) - -]) diff --git a/cloog-0.17.0/isl/m4/libtool.m4 b/cloog-0.17.0/isl/m4/libtool.m4 deleted file mode 100644 index a3fee5360f644854cc9497a7b3b1ed2ba6d46f08..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/libtool.m4 +++ /dev/null @@ -1,7377 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/cloog-0.17.0/isl/m4/ltoptions.m4 b/cloog-0.17.0/isl/m4/ltoptions.m4 deleted file mode 100644 index 34151a3ba625f326e6645d6afc79586f10746a3e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/cloog-0.17.0/isl/m4/ltsugar.m4 b/cloog-0.17.0/isl/m4/ltsugar.m4 deleted file mode 100644 index 9000a057d31ddf75cb85ccda8757de4493bcdbe7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/cloog-0.17.0/isl/m4/ltversion.m4 b/cloog-0.17.0/isl/m4/ltversion.m4 deleted file mode 100644 index f3c5309802447a3b341b1a2c5e4d74ec138b311a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/cloog-0.17.0/isl/m4/lt~obsolete.m4 b/cloog-0.17.0/isl/m4/lt~obsolete.m4 deleted file mode 100644 index 637bb2066c425f79faecd6cc9e4e6b5074c6b55c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/m4/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/cloog-0.17.0/isl/missing b/cloog-0.17.0/isl/missing deleted file mode 100755 index 28055d2ae6f2a2c584afcd769d7881e11f62ecd9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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 . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/isl/mp_get_memory_functions.c b/cloog-0.17.0/isl/mp_get_memory_functions.c deleted file mode 100644 index e14e336ceb681ff5518a5ed6806d588109b7a46e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/mp_get_memory_functions.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)) -{ - if (alloc_func_ptr) - *alloc_func_ptr = __gmp_allocate_func; - if (realloc_func_ptr) - *realloc_func_ptr = __gmp_reallocate_func; - if (free_func_ptr) - *free_func_ptr = __gmp_free_func; -} diff --git a/cloog-0.17.0/isl/pip.c b/cloog-0.17.0/isl/pip.c deleted file mode 100644 index 2baf9e26d0e9b127a08119d0a1d4932d86bbe09d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/pip.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include -#include -#include "isl_tab.h" -#include "isl_sample.h" -#include "isl_scan.h" -#include -#include -#include -#include -#include - -/* The input of this program is the same as that of the "example" program - * from the PipLib distribution, except that the "big parameter column" - * should always be -1. - * - * Context constraints in PolyLib format - * -1 - * Problem constraints in PolyLib format - * Optional list of options - * - * The options are - * Maximize compute maximum instead of minimum - * Rational compute rational optimum instead of integer optimum - * Urs_parms don't assume parameters are non-negative - * Urs_unknowns don't assume unknowns are non-negative - */ - -struct options { - struct isl_options *isl; - unsigned verify; - unsigned format; -}; - -#define FORMAT_SET 0 -#define FORMAT_AFF 1 - -struct isl_arg_choice pip_format[] = { - {"set", FORMAT_SET}, - {"affine", FORMAT_AFF}, - {0} -}; - -ISL_ARGS_START(struct options, options_args) -ISL_ARG_CHILD(struct options, isl, "isl", &isl_options_args, "isl options") -ISL_ARG_BOOL(struct options, verify, 'T', "verify", 0, NULL) -ISL_ARG_CHOICE(struct options, format, 0, "format", - pip_format, FORMAT_SET, "output format") -ISL_ARGS_END - -ISL_ARG_DEF(options, struct options, options_args) - -static __isl_give isl_basic_set *set_bounds(__isl_take isl_basic_set *bset) -{ - unsigned nparam; - int i, r; - isl_point *pt, *pt2; - isl_basic_set *box; - - nparam = isl_basic_set_dim(bset, isl_dim_param); - r = nparam >= 8 ? 4 : nparam >= 5 ? 6 : 30; - - pt = isl_basic_set_sample_point(isl_basic_set_copy(bset)); - pt2 = isl_point_copy(pt); - - for (i = 0; i < nparam; ++i) { - pt = isl_point_add_ui(pt, isl_dim_param, i, r); - pt2 = isl_point_sub_ui(pt2, isl_dim_param, i, r); - } - - box = isl_basic_set_box_from_points(pt, pt2); - - return isl_basic_set_intersect(bset, box); -} - -static struct isl_basic_set *to_parameter_domain(struct isl_basic_set *context) -{ - context = isl_basic_set_move_dims(context, isl_dim_param, 0, - isl_dim_set, 0, isl_basic_set_dim(context, isl_dim_set)); - context = isl_basic_set_params(context); - return context; -} - -isl_basic_set *plug_in_parameters(isl_basic_set *bset, struct isl_vec *params) -{ - int i; - - for (i = 0; i < params->size - 1; ++i) - bset = isl_basic_set_fix(bset, - isl_dim_param, i, params->el[1 + i]); - - bset = isl_basic_set_remove_dims(bset, - isl_dim_param, 0, params->size - 1); - - isl_vec_free(params); - - return bset; -} - -isl_set *set_plug_in_parameters(isl_set *set, struct isl_vec *params) -{ - int i; - - for (i = 0; i < params->size - 1; ++i) - set = isl_set_fix(set, isl_dim_param, i, params->el[1 + i]); - - set = isl_set_remove_dims(set, isl_dim_param, 0, params->size - 1); - - isl_vec_free(params); - - return set; -} - -/* Compute the lexicographically minimal (or maximal if max is set) - * element of bset for the given values of the parameters, by - * successively solving an ilp problem in each direction. - */ -struct isl_vec *opt_at(struct isl_basic_set *bset, - struct isl_vec *params, int max) -{ - unsigned dim; - struct isl_vec *opt; - struct isl_vec *obj; - int i; - - dim = isl_basic_set_dim(bset, isl_dim_set); - - bset = plug_in_parameters(bset, params); - - if (isl_basic_set_plain_is_empty(bset)) { - opt = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - return opt; - } - - opt = isl_vec_alloc(bset->ctx, 1 + dim); - assert(opt); - - obj = isl_vec_alloc(bset->ctx, 1 + dim); - assert(obj); - - isl_int_set_si(opt->el[0], 1); - isl_int_set_si(obj->el[0], 0); - - for (i = 0; i < dim; ++i) { - enum isl_lp_result res; - - isl_seq_clr(obj->el + 1, dim); - isl_int_set_si(obj->el[1 + i], 1); - res = isl_basic_set_solve_ilp(bset, max, obj->el, - &opt->el[1 + i], NULL); - if (res == isl_lp_empty) - goto empty; - assert(res == isl_lp_ok); - bset = isl_basic_set_fix(bset, isl_dim_set, i, opt->el[1 + i]); - } - - isl_basic_set_free(bset); - isl_vec_free(obj); - - return opt; -empty: - isl_vec_free(opt); - opt = isl_vec_alloc(bset->ctx, 0); - isl_basic_set_free(bset); - isl_vec_free(obj); - - return opt; -} - -struct isl_scan_pip { - struct isl_scan_callback callback; - isl_basic_set *bset; - isl_set *sol; - isl_set *empty; - int stride; - int n; - int max; -}; - -/* Check if the "manually" computed optimum of bset at the "sample" - * values of the parameters agrees with the solution of pilp problem - * represented by the pair (sol, empty). - * In particular, if there is no solution for this value of the parameters, - * then it should be an element of the parameter domain "empty". - * Otherwise, the optimal solution, should be equal to the result of - * plugging in the value of the parameters in "sol". - */ -static int scan_one(struct isl_scan_callback *callback, - __isl_take isl_vec *sample) -{ - struct isl_scan_pip *sp = (struct isl_scan_pip *)callback; - struct isl_vec *opt; - - sp->n--; - - opt = opt_at(isl_basic_set_copy(sp->bset), isl_vec_copy(sample), sp->max); - assert(opt); - - if (opt->size == 0) { - isl_point *sample_pnt; - sample_pnt = isl_point_alloc(isl_set_get_space(sp->empty), sample); - assert(isl_set_contains_point(sp->empty, sample_pnt)); - isl_point_free(sample_pnt); - isl_vec_free(opt); - } else { - isl_set *sol; - isl_set *opt_set; - opt_set = isl_set_from_basic_set(isl_basic_set_from_vec(opt)); - sol = set_plug_in_parameters(isl_set_copy(sp->sol), sample); - assert(isl_set_is_equal(opt_set, sol)); - isl_set_free(sol); - isl_set_free(opt_set); - } - - if (!(sp->n % sp->stride)) { - printf("o"); - fflush(stdout); - } - - return sp->n >= 1 ? 0 : -1; -} - -static void check_solution(isl_basic_set *bset, isl_basic_set *context, - isl_set *sol, isl_set *empty, int max) -{ - struct isl_scan_pip sp; - isl_int count, count_max; - int i, n; - int r; - - context = set_bounds(context); - context = isl_basic_set_underlying_set(context); - - isl_int_init(count); - isl_int_init(count_max); - - isl_int_set_si(count_max, 2000); - r = isl_basic_set_count_upto(context, count_max, &count); - assert(r >= 0); - n = isl_int_get_si(count); - - isl_int_clear(count_max); - isl_int_clear(count); - - sp.callback.add = scan_one; - sp.bset = bset; - sp.sol = sol; - sp.empty = empty; - sp.n = n; - sp.stride = n > 70 ? 1 + (n + 1)/70 : 1; - sp.max = max; - - for (i = 0; i < n; i += sp.stride) - printf("."); - printf("\r"); - fflush(stdout); - - isl_basic_set_scan(context, &sp.callback); - - printf("\n"); - - isl_basic_set_free(bset); -} - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx; - struct isl_basic_set *context, *bset, *copy, *context_copy; - struct isl_set *set = NULL; - struct isl_set *empty; - isl_pw_multi_aff *pma = NULL; - int neg_one; - char s[1024]; - int urs_parms = 0; - int urs_unknowns = 0; - int max = 0; - int rational = 0; - int n; - int nparam; - struct options *options; - - options = options_new_with_defaults(); - assert(options); - argc = options_parse(options, argc, argv, ISL_ARG_ALL); - - ctx = isl_ctx_alloc_with_options(&options_args, options); - - context = isl_basic_set_read_from_file(ctx, stdin); - assert(context); - n = fscanf(stdin, "%d", &neg_one); - assert(n == 1); - assert(neg_one == -1); - bset = isl_basic_set_read_from_file(ctx, stdin); - - while (fgets(s, sizeof(s), stdin)) { - if (strncasecmp(s, "Maximize", 8) == 0) - max = 1; - if (strncasecmp(s, "Rational", 8) == 0) { - rational = 1; - bset = isl_basic_set_set_rational(bset); - } - if (strncasecmp(s, "Urs_parms", 9) == 0) - urs_parms = 1; - if (strncasecmp(s, "Urs_unknowns", 12) == 0) - urs_unknowns = 1; - } - if (!urs_parms) - context = isl_basic_set_intersect(context, - isl_basic_set_positive_orthant(isl_basic_set_get_space(context))); - context = to_parameter_domain(context); - nparam = isl_basic_set_dim(context, isl_dim_param); - if (nparam != isl_basic_set_dim(bset, isl_dim_param)) { - int dim = isl_basic_set_dim(bset, isl_dim_set); - bset = isl_basic_set_move_dims(bset, isl_dim_param, 0, - isl_dim_set, dim - nparam, nparam); - } - if (!urs_unknowns) - bset = isl_basic_set_intersect(bset, - isl_basic_set_positive_orthant(isl_basic_set_get_space(bset))); - - if (options->verify) { - copy = isl_basic_set_copy(bset); - context_copy = isl_basic_set_copy(context); - } - - if (options->format == FORMAT_AFF) { - if (max) - pma = isl_basic_set_partial_lexmax_pw_multi_aff(bset, - context, &empty); - else - pma = isl_basic_set_partial_lexmin_pw_multi_aff(bset, - context, &empty); - } else { - if (max) - set = isl_basic_set_partial_lexmax(bset, - context, &empty); - else - set = isl_basic_set_partial_lexmin(bset, - context, &empty); - } - - if (options->verify) { - assert(!rational); - if (options->format == FORMAT_AFF) - set = isl_set_from_pw_multi_aff(pma); - check_solution(copy, context_copy, set, empty, max); - isl_set_free(set); - } else { - isl_printer *p; - p = isl_printer_to_file(ctx, stdout); - if (options->format == FORMAT_AFF) - p = isl_printer_print_pw_multi_aff(p, pma); - else - p = isl_printer_print_set(p, set); - p = isl_printer_end_line(p); - p = isl_printer_print_str(p, "no solution: "); - p = isl_printer_print_set(p, empty); - p = isl_printer_end_line(p); - isl_printer_free(p); - isl_set_free(set); - isl_pw_multi_aff_free(pma); - } - - isl_set_free(empty); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.17.0/isl/pip_test.sh.in b/cloog-0.17.0/isl/pip_test.sh.in deleted file mode 100755 index 28ad1ef42450c02576aa84f5f50118ae0a2ff0c2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/pip_test.sh.in +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -EXEEXT=@EXEEXT@ - -PIP_TESTS="\ - boulet.pip \ - brisebarre.pip \ - cg1.pip \ - esced.pip \ - ex2.pip \ - ex.pip \ - fimmel.pip \ - max.pip \ - negative.pip \ - seghir-vd.pip \ - small.pip \ - sor1d.pip \ - square.pip \ - sven.pip \ - tobi.pip" - -for i in $PIP_TESTS; do - echo $i; - ./isl_pip$EXEEXT --format=set --context=gbr -T < $srcdir/test_inputs/$i || exit - ./isl_pip$EXEEXT --format=set --context=lexmin -T < $srcdir/test_inputs/$i || exit - ./isl_pip$EXEEXT --format=affine --context=gbr -T < $srcdir/test_inputs/$i || exit - ./isl_pip$EXEEXT --format=affine --context=lexmin -T < $srcdir/test_inputs/$i || exit -done diff --git a/cloog-0.17.0/isl/polyhedron_detect_equalities.c b/cloog-0.17.0/isl/polyhedron_detect_equalities.c deleted file mode 100644 index f66d08f82a756aff56df0586f72b7a5f2328fc37..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/polyhedron_detect_equalities.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - - bset = isl_basic_set_read_from_file(ctx, stdin); - bset = isl_basic_set_detect_equalities(bset); - isl_basic_set_print(bset, stdout, 0, "", "", ISL_FORMAT_POLYLIB); - isl_basic_set_free(bset); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.17.0/isl/polyhedron_minimize.c b/cloog-0.17.0/isl/polyhedron_minimize.c deleted file mode 100644 index 99c3f985ee595e65cf5fbef814b94e97ec225e87..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/polyhedron_minimize.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include - -/* The input of this program is the same as that of the "polytope_minimize" - * program from the barvinok distribution. - * - * Constraints of set is PolyLib format. - * Linear or affine objective function in PolyLib format. - */ - -static struct isl_vec *isl_vec_lin_to_aff(struct isl_vec *vec) -{ - struct isl_vec *aff; - - if (!vec) - return NULL; - aff = isl_vec_alloc(vec->ctx, 1 + vec->size); - if (!aff) - goto error; - isl_int_set_si(aff->el[0], 0); - isl_seq_cpy(aff->el + 1, vec->el, vec->size); - isl_vec_free(vec); - return aff; -error: - isl_vec_free(vec); - return NULL; -} - -/* Rotate elements of vector right. - * In particular, move the constant term from the end of the - * vector to the start of the vector. - */ -static struct isl_vec *vec_ror(struct isl_vec *vec) -{ - int i; - - if (!vec) - return NULL; - for (i = vec->size - 2; i >= 0; --i) - isl_int_swap(vec->el[i], vec->el[i + 1]); - return vec; -} - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - struct isl_vec *obj; - struct isl_vec *sol; - isl_int opt; - unsigned dim; - enum isl_lp_result res; - isl_printer *p; - - isl_int_init(opt); - bset = isl_basic_set_read_from_file(ctx, stdin); - assert(bset); - obj = isl_vec_read_from_file(ctx, stdin); - assert(obj); - dim = isl_basic_set_total_dim(bset); - assert(obj->size >= dim && obj->size <= dim + 1); - if (obj->size != dim + 1) - obj = isl_vec_lin_to_aff(obj); - else - obj = vec_ror(obj); - res = isl_basic_set_solve_ilp(bset, 0, obj->el, &opt, &sol); - switch (res) { - case isl_lp_error: - fprintf(stderr, "error\n"); - return -1; - case isl_lp_empty: - fprintf(stdout, "empty\n"); - break; - case isl_lp_unbounded: - fprintf(stdout, "unbounded\n"); - break; - case isl_lp_ok: - p = isl_printer_to_file(ctx, stdout); - p = isl_printer_print_vec(p, sol); - p = isl_printer_end_line(p); - p = isl_printer_print_isl_int(p, opt); - p = isl_printer_end_line(p); - isl_printer_free(p); - } - isl_basic_set_free(bset); - isl_vec_free(obj); - isl_vec_free(sol); - isl_ctx_free(ctx); - isl_int_clear(opt); - - return 0; -} diff --git a/cloog-0.17.0/isl/polyhedron_sample.c b/cloog-0.17.0/isl/polyhedron_sample.c deleted file mode 100644 index f0e1af7fffca34fe71ed720356776332de7fff70..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/polyhedron_sample.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_sample.h" -#include - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - struct isl_vec *sample; - isl_printer *p; - - bset = isl_basic_set_read_from_file(ctx, stdin); - sample = isl_basic_set_sample_vec(isl_basic_set_copy(bset)); - p = isl_printer_to_file(ctx, stdout); - p = isl_printer_print_vec(p, sample); - p = isl_printer_end_line(p); - isl_printer_free(p); - assert(sample); - if (sample->size > 0) - assert(isl_basic_set_contains(bset, sample)); - isl_basic_set_free(bset); - isl_vec_free(sample); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.17.0/isl/polytope_scan.c b/cloog-0.17.0/isl/polytope_scan.c deleted file mode 100644 index 2e7adc69cacdd18180f4f9def47c59568859c519..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/polytope_scan.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the GNU LGPLv2.1 license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include "isl_equalities.h" -#include -#include "isl_scan.h" -#include - -/* The input of this program is the same as that of the "polytope_scan" - * program from the barvinok distribution. - * - * Constraints of set is PolyLib format. - * - * The input set is assumed to be bounded. - */ - -struct scan_samples { - struct isl_scan_callback callback; - struct isl_mat *samples; -}; - -static int scan_samples_add_sample(struct isl_scan_callback *cb, - __isl_take isl_vec *sample) -{ - struct scan_samples *ss = (struct scan_samples *)cb; - - ss->samples = isl_mat_extend(ss->samples, ss->samples->n_row + 1, - ss->samples->n_col); - if (!ss->samples) - goto error; - - isl_seq_cpy(ss->samples->row[ss->samples->n_row - 1], - sample->el, sample->size); - - isl_vec_free(sample); - return 0; -error: - isl_vec_free(sample); - return -1; -} - -static struct isl_mat *isl_basic_set_scan_samples(struct isl_basic_set *bset) -{ - isl_ctx *ctx; - unsigned dim; - struct scan_samples ss; - - ctx = isl_basic_set_get_ctx(bset); - dim = isl_basic_set_total_dim(bset); - ss.callback.add = scan_samples_add_sample; - ss.samples = isl_mat_alloc(ctx, 0, 1 + dim); - if (!ss.samples) - goto error; - - if (isl_basic_set_scan(bset, &ss.callback) < 0) { - isl_mat_free(ss.samples); - return NULL; - } - - return ss.samples; -error: - isl_basic_set_free(bset); - return NULL; -} - -static struct isl_mat *isl_basic_set_samples(struct isl_basic_set *bset) -{ - struct isl_mat *T; - struct isl_mat *samples; - - if (!bset) - return NULL; - - if (bset->n_eq == 0) - return isl_basic_set_scan_samples(bset); - - bset = isl_basic_set_remove_equalities(bset, &T, NULL); - samples = isl_basic_set_scan_samples(bset); - return isl_mat_product(samples, isl_mat_transpose(T)); -} - -int main(int argc, char **argv) -{ - struct isl_ctx *ctx = isl_ctx_alloc(); - struct isl_basic_set *bset; - struct isl_mat *samples; - - bset = isl_basic_set_read_from_file(ctx, stdin); - samples = isl_basic_set_samples(bset); - isl_mat_print_internal(samples, stdout, 0); - isl_mat_free(samples); - isl_ctx_free(ctx); - - return 0; -} diff --git a/cloog-0.17.0/isl/print.c b/cloog-0.17.0/isl/print.c deleted file mode 100644 index 4e0aecd4dde52d8e9394611ca98a38e22e2ad910..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/print.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef BASE -#define BASE id -#include -#undef BASE -#define BASE space -#include -#undef BASE -#define BASE local_space -#include -#undef BASE -#define BASE basic_set -#include -#undef BASE -#define BASE basic_map -#include -#undef BASE -#define BASE set -#include -#undef BASE -#define BASE map -#include -#undef BASE -#define BASE union_set -#include -#undef BASE -#define BASE union_map -#include -#undef BASE -#define BASE qpolynomial -#include -#undef BASE -#define BASE qpolynomial_fold -#include -#undef BASE -#define BASE pw_qpolynomial -#include -#undef BASE -#define BASE pw_qpolynomial_fold -#include -#undef BASE -#define BASE union_pw_qpolynomial -#include -#undef BASE -#define BASE union_pw_qpolynomial_fold -#include -#undef BASE -#define BASE band -#include -#undef BASE -#define BASE constraint -#include -#undef BASE -#define BASE aff -#include -#undef BASE -#define BASE pw_aff -#include -#undef BASE -#define BASE multi_aff -#include -#undef BASE -#define BASE pw_multi_aff -#include diff --git a/cloog-0.17.0/isl/print_templ.c b/cloog-0.17.0/isl/print_templ.c deleted file mode 100644 index f147fdc5480fe85d3e772a6d8b87ab37cc2712ad..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/print_templ.c +++ /dev/null @@ -1,33 +0,0 @@ -#define xCAT(A,B) A ## B -#define CAT(A,B) xCAT(A,B) -#undef TYPE -#define TYPE CAT(isl_,BASE) -#define xFN(TYPE,NAME) TYPE ## _ ## NAME -#define FN(TYPE,NAME) xFN(TYPE,NAME) - -void FN(TYPE,dump)(__isl_keep TYPE *obj) -{ - isl_printer *p; - - if (!obj) - return; - p = isl_printer_to_file(FN(TYPE,get_ctx)(obj), stderr); - p = FN(isl_printer_print,BASE)(p, obj); - p = isl_printer_end_line(p); - isl_printer_free(p); -} - -__isl_give char *FN(TYPE,to_str)(__isl_keep TYPE *obj) -{ - isl_printer *p; - char *s; - - if (!obj) - return NULL; - p = isl_printer_to_str(FN(TYPE,get_ctx)(obj)); - p = FN(isl_printer_print,BASE)(p, obj); - s = isl_printer_get_str(p); - isl_printer_free(p); - - return s; -} diff --git a/cloog-0.17.0/isl/test_inputs/affine.polylib b/cloog-0.17.0/isl/test_inputs/affine.polylib deleted file mode 100644 index f14720c0a0ad37cacda5603766b015d0a77106fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/affine.polylib +++ /dev/null @@ -1,9 +0,0 @@ -# the affine hull of {[a,b] : a=b && 1 <= a <= 163} ... -3 4 -0 1 -1 0 -1 1 0 -1 -1 -1 0 163 - -# ... is {[a,b] : a=b} (and not {[In_1,In_2]}, as Omega 1.2 claims) -1 4 -0 1 -1 0 diff --git a/cloog-0.17.0/isl/test_inputs/affine2.polylib b/cloog-0.17.0/isl/test_inputs/affine2.polylib deleted file mode 100644 index c67db77bb6ee9ef2ebbcddf929c1a007f289f7a3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/affine2.polylib +++ /dev/null @@ -1,9 +0,0 @@ -5 5 -1 -2 0 1 0 -1 2 0 -1 1 -1 0 -2 1 0 -1 0 2 -1 1 -1 0 0 1 -1 - -1 5 -0 1 -1 0 0 diff --git a/cloog-0.17.0/isl/test_inputs/affine3.polylib b/cloog-0.17.0/isl/test_inputs/affine3.polylib deleted file mode 100644 index f2bc9a2db2fd4ab1cb04b67fdb6895df7ec5e9a7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/affine3.polylib +++ /dev/null @@ -1,7 +0,0 @@ -3 4 -1 1 0 0 -1 -7 4 2 -1 5 -4 2 - -1 4 -0 3 -2 0 diff --git a/cloog-0.17.0/isl/test_inputs/application.omega b/cloog-0.17.0/isl/test_inputs/application.omega deleted file mode 100644 index 8f4fd1db39a07cfd6f51ce5810cf79ad06633591..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/application.omega +++ /dev/null @@ -1,3 +0,0 @@ -{[x]} -{[x] -> [y] : y = 2x} -{[y]: Exists ( alpha : 2alpha = y)} diff --git a/cloog-0.17.0/isl/test_inputs/application2.omega b/cloog-0.17.0/isl/test_inputs/application2.omega deleted file mode 100644 index f2af1e86958048dc12441664fc29e7d6c275dc81..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/application2.omega +++ /dev/null @@ -1,3 +0,0 @@ -{[x] : x >= 0 && x <= 20 } -{[x] -> [y] : y = 2x} -{[y]: Exists ( alpha : 2alpha = y && 0 <= y && y <= 40)} diff --git a/cloog-0.17.0/isl/test_inputs/basicLinear.pwqp b/cloog-0.17.0/isl/test_inputs/basicLinear.pwqp deleted file mode 100644 index 0af7fabb53f0a5d5ec67ac924c21f81b293d64d6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/basicLinear.pwqp +++ /dev/null @@ -1 +0,0 @@ -[P, Q] -> { [n, m] -> n : n >= 1 and m >= n and m <= P and m <= Q } diff --git a/cloog-0.17.0/isl/test_inputs/basicLinear2.pwqp b/cloog-0.17.0/isl/test_inputs/basicLinear2.pwqp deleted file mode 100644 index d411a369158c1743500a0d7cc69b673bb90ef219..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/basicLinear2.pwqp +++ /dev/null @@ -1 +0,0 @@ -[P, Q] -> { [n, m] -> n : n >= 1 and m >= n and m <= P and n >= -1 + Q } diff --git a/cloog-0.17.0/isl/test_inputs/basicTest.pwqp b/cloog-0.17.0/isl/test_inputs/basicTest.pwqp deleted file mode 100644 index 52e7fc8e697d833a9d8e348eddae7bdbb4699621..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/basicTest.pwqp +++ /dev/null @@ -1 +0,0 @@ -[p] -> { [n, m] -> (n + n^2) : n >= 1 and m >= n and m <= p } diff --git a/cloog-0.17.0/isl/test_inputs/basicTestParameterPosNeg.pwqp b/cloog-0.17.0/isl/test_inputs/basicTestParameterPosNeg.pwqp deleted file mode 100644 index 6cb4490215cf147a0fd039b4b259c5d591b3ce1f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/basicTestParameterPosNeg.pwqp +++ /dev/null @@ -1 +0,0 @@ -[p] -> { [n, m] -> (n + n^3) : n >= -1 and m >= n and m <= p } diff --git a/cloog-0.17.0/isl/test_inputs/boulet.pip b/cloog-0.17.0/isl/test_inputs/boulet.pip deleted file mode 100644 index 78e90ddf58b5b6a54250cc4a6f414fe2f647a921..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/boulet.pip +++ /dev/null @@ -1,13 +0,0 @@ -0 3 - --1 - -5 6 -1 1 -1 2 0 0 -1 0 1 1 4 20 -1 0 -1 -1 0 0 -1 0 1 -1 2 10 -1 0 -1 1 2 10 - -Urs_parms -Urs_unknowns diff --git a/cloog-0.17.0/isl/test_inputs/brisebarre.pip b/cloog-0.17.0/isl/test_inputs/brisebarre.pip deleted file mode 100644 index 5d25dae309b346ddecc8d30c20bbfe860acdbbd7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/brisebarre.pip +++ /dev/null @@ -1,34 +0,0 @@ -# ---------------------- CONTEXT ---------------------- -1 2 -1 0 - --1 - -# ----------------------- DOMAIN ---------------------- -26 6 -1 3 0 0 0 -98300 -1 -3 0 0 0 98308 -1 432 36 6 1 -14757611 -1 -432 -36 -6 -1 14758510 -1 54 9 3 1 -1923190 -1 -54 -9 -3 -1 1923303 -1 48 12 6 3 -1782238 -1 -48 -12 -6 -3 1782339 -1 27 9 6 4 -1045164 -1 -27 -9 -6 -4 1045221 -1 432 180 150 125 -17434139 -1 -432 -180 -150 -125 17435038 -1 6 3 3 3 -252443 -1 -6 -3 -3 -3 252456 -1 432 252 294 343 -18949275 -1 -432 -252 -294 -343 18950174 -1 27 18 24 32 -1234720 -1 -27 -18 -24 -32 1234777 -1 48 36 54 81 -2288453 -1 -48 -36 -54 -81 2288554 -1 54 45 75 125 -2684050 -1 -54 -45 -75 -125 2684163 -1 432 396 726 1331 -22386005 -1 -432 -396 -726 -1331 22386904 -1 3 3 6 12 -162072 -1 -3 -3 -6 -12 162080 diff --git a/cloog-0.17.0/isl/test_inputs/cg1.pip b/cloog-0.17.0/isl/test_inputs/cg1.pip deleted file mode 100644 index 78e31f187b1d7aa3247067bc4bd31f8e33dc0053..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/cg1.pip +++ /dev/null @@ -1,15 +0,0 @@ -2 4 - 1 1 0 -1 - 1 -1 1 0 - --1 - -8 7 - 1 0 1 0 -1 0 0 - 1 0 -1 0 1 0 0 - 1 1 0 0 0 -1 0 - 1 -1 0 0 0 1 0 - 1 0 1 0 0 0 -1 - 1 0 -1 0 0 1 0 - 1 0 -1 1 0 0 -1 - 1 0 0 -1 0 1 0 diff --git a/cloog-0.17.0/isl/test_inputs/convex0.polylib b/cloog-0.17.0/isl/test_inputs/convex0.polylib deleted file mode 100644 index cbc4d3b6cebef2a537f388bf3c843f6bc0369ec4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex0.polylib +++ /dev/null @@ -1,11 +0,0 @@ -2 3 -1 1 0 -1 -1 1 - -2 3 -1 1 -1 -1 -1 2 - -2 3 -1 1 0 -1 -1 2 diff --git a/cloog-0.17.0/isl/test_inputs/convex1.polylib b/cloog-0.17.0/isl/test_inputs/convex1.polylib deleted file mode 100644 index b563d8de7fff5e83bd068dacd8c06e8256bf761b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex1.polylib +++ /dev/null @@ -1,17 +0,0 @@ -# {j,N | 0<=j<=N-1; 2<=N} -4 4 -1 1 0 0 -1 -1 1 -1 -1 0 1 -2 -1 0 0 1 -# {j, N | 1<=j<=N; 1<=N} -4 4 -1 1 0 -1 -1 -1 1 0 -1 0 1 -1 -1 0 0 1 -# {j,N | 0<=j<=N; 2<=j+N} -3 4 - 1 1 1 -2 - 1 1 0 0 - 1 -1 1 0 diff --git a/cloog-0.17.0/isl/test_inputs/convex10.polylib b/cloog-0.17.0/isl/test_inputs/convex10.polylib deleted file mode 100644 index 3d58cbf70e13d63764e41e1b4a09a66ced6f6c86..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex10.polylib +++ /dev/null @@ -1,17 +0,0 @@ -3 4 -1 54 1 -4 -1 2 -1 58 -1 0 -1 6 - -4 4 -1 54 1 -4 -1 2 -1 58 -1 0 1 -7 -1 -4 1 0 - -4 4 -1 54 1 -4 -1 2 -1 58 -1 0 -1 116 -1 0 0 1 - diff --git a/cloog-0.17.0/isl/test_inputs/convex11.polylib b/cloog-0.17.0/isl/test_inputs/convex11.polylib deleted file mode 100644 index f664114d048765c970ada143c2662679de45d21b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex11.polylib +++ /dev/null @@ -1,14 +0,0 @@ -3 4 -1 0 -1 6 -1 -1 1 1 -1 1 1 -10 - -3 4 -1 1 0 -4 -1 -1 -1 8 -1 -1 1 1 - -3 4 -1 0 -1 6 -1 1 0 -4 -1 -1 1 1 diff --git a/cloog-0.17.0/isl/test_inputs/convex12.polylib b/cloog-0.17.0/isl/test_inputs/convex12.polylib deleted file mode 100644 index e4766307477bfc69bf45959f0be20435205e9c3d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex12.polylib +++ /dev/null @@ -1,12 +0,0 @@ -3 5 -1 0 0 1 1 -1 0 1 0 1 -1 -1 -1 0 -2 - -3 5 -1 0 0 1 2 -1 1 -1 0 0 -1 1 0 0 -1 - -1 5 -1 0 0 1 2 diff --git a/cloog-0.17.0/isl/test_inputs/convex13.polylib b/cloog-0.17.0/isl/test_inputs/convex13.polylib deleted file mode 100644 index 1b3591200f80ee2a7ead8e77e33ecb97e709041f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex13.polylib +++ /dev/null @@ -1,17 +0,0 @@ -3 5 -1 0 0 -1 3 -1 0 -1 0 2 -1 1 1 1 -4 - -3 5 -1 0 0 1 0 -1 1 0 0 -1 -1 1 2 0 1 - -6 5 -1 3 2 0 -1 -1 3 0 2 -3 -1 1 0 1 -1 -1 1 1 1 0 -1 1 1 0 0 -1 1 0 0 1 diff --git a/cloog-0.17.0/isl/test_inputs/convex14.polylib b/cloog-0.17.0/isl/test_inputs/convex14.polylib deleted file mode 100644 index caaa8f5d316912a79c2fa79286453bb684b13b95..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex14.polylib +++ /dev/null @@ -1,14 +0,0 @@ -3 4 -0 1 0 2 -1 0 1 0 -1 0 -1 2 - -3 4 -1 1 0 0 -1 0 1 0 -1 0 -1 2 - -3 4 -1 1 0 2 -1 0 1 0 -1 0 -1 2 diff --git a/cloog-0.17.0/isl/test_inputs/convex15.polylib b/cloog-0.17.0/isl/test_inputs/convex15.polylib deleted file mode 100644 index 0118fa861dbfa4681444f9e78475d389b3adc58b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex15.polylib +++ /dev/null @@ -1,66 +0,0 @@ -17 8 -1 -1 -8 0 16 0 0 37 -1 1 0 -48 0 2 0 -3 -1 0 -16 -32 16 1 0 14 -1 -1 24 0 0 1 0 18 -1 -1 8 16 0 0 1 21 -1 0 0 -16 0 1 1 -2 -1 1 32 16 -32 0 0 -1 -1 -1 16 16 0 0 0 28 -1 1 -8 -32 0 1 0 -1 -1 0 0 0 0 1 0 -1 -1 0 16 16 -16 0 1 -1 -1 1 8 0 -16 0 0 0 -1 0 3 2 -2 0 0 0 -1 0 1 2 -1 0 0 0 -1 0 -1 -1 1 0 0 0 -1 -1 8 0 0 1 2 4 -1 -1 -24 -32 32 1 0 36 - -13 8 -1 -1 0 0 0 1 3 -4 -1 1 0 -48 0 2 0 -2 -1 0 0 0 0 1 0 -1 -1 0 -8 0 0 0 1 -1 -1 0 3 2 -2 0 0 0 -1 1 -16 -16 0 0 0 0 -1 1 -24 0 0 0 0 0 -1 0 1 0 0 0 0 0 -1 0 -3 -2 2 0 0 1 -1 -1 0 16 0 0 2 13 -1 -1 24 0 0 1 0 20 -1 -1 16 16 0 0 0 29 -1 -1 0 48 0 0 0 45 - -31 8 - 1 0 1 0 0 0 0 0 - 1 0 0 -16 0 1 1 -2 - 1 0 0 0 0 1 0 -1 - 1 -1 8 0 0 1 2 4 - 1 0 3 2 -2 0 0 0 - 1 -1 24 0 0 1 0 20 - 1 1 0 -48 0 2 0 -2 - 1 -1 -24 -32 32 1 0 36 - 1 0 0 0 0 0 1 -1 - 1 -1 24 64 -16 0 0 45 - 1 -15 120 112 0 15 38 52 - 1 1 24 32 -32 0 0 0 - 1 0 -2 -2 2 0 0 1 - 1 -1 8 16 0 0 1 21 - 1 -15 120 352 0 0 23 307 - 1 1 -8 -32 0 1 0 -1 - 1 1 -8 0 0 0 0 0 - 1 1 -8 -16 0 0 0 0 - 1 0 16 16 -16 0 1 -1 - 1 -1 16 16 0 0 0 29 - 1 -1 -8 0 16 0 0 37 - 1 -1 8 32 0 0 0 37 - 1 1 8 0 -16 0 0 0 - 1 -15 360 592 -240 0 23 307 - 1 -1 -6 2 14 0 2 20 - 1 -15 360 352 -240 15 38 52 - 1 -1 8 48 0 0 0 45 - 1 0 -16 -32 16 1 0 14 - 1 -1 -6 -14 14 1 3 3 - 1 1 -38 -78 30 2 0 13 - 1 1 -3 -50 2 2 0 -1 diff --git a/cloog-0.17.0/isl/test_inputs/convex2.polylib b/cloog-0.17.0/isl/test_inputs/convex2.polylib deleted file mode 100644 index 0bfd737291c95658200494ed257a7a1e093574ad..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex2.polylib +++ /dev/null @@ -1,24 +0,0 @@ -# {i,j,N | 1<=i<=N; 0<=j<=N-1; 2<=N} -6 5 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 -1 -1 0 0 1 -2 -1 0 0 0 1 -# {i,j,N | 1<=i<=N; 1<=j<=N; 2<=N} -6 5 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 0 -1 1 0 -1 0 0 1 -2 -1 0 0 0 1 -# {i,j,N | 1<=i<=N; 0<=j<=N; 2<=N} -6 5 - 1 0 0 1 -2 - 1 -1 0 1 0 - 1 0 -1 1 0 - 1 1 0 0 -1 - 1 0 1 0 0 - 1 0 0 0 1 diff --git a/cloog-0.17.0/isl/test_inputs/convex3.polylib b/cloog-0.17.0/isl/test_inputs/convex3.polylib deleted file mode 100644 index ea612c6b81f87be012a348dc1b369262711260e5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex3.polylib +++ /dev/null @@ -1,10 +0,0 @@ -1 4 -1 1 1 -6 - -3 4 -1 1 1 -3 -1 1 0 -5 -1 -1 0 10 - -1 4 -1 1 1 -3 diff --git a/cloog-0.17.0/isl/test_inputs/convex4.polylib b/cloog-0.17.0/isl/test_inputs/convex4.polylib deleted file mode 100644 index 0c086538a66d1e32d539def8bc92bc834527e667..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex4.polylib +++ /dev/null @@ -1,9 +0,0 @@ -1 4 -1 1 1 -6 - -2 4 -0 1 0 -1 -0 0 1 -4 - -1 4 -1 1 1 -5 diff --git a/cloog-0.17.0/isl/test_inputs/convex5.polylib b/cloog-0.17.0/isl/test_inputs/convex5.polylib deleted file mode 100644 index 3aae7c26bcfc28c70cfaa9c021fff48db94ed67a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex5.polylib +++ /dev/null @@ -1,12 +0,0 @@ -2 4 -0 1 0 -2 -0 0 1 -6 - -2 4 -0 1 0 -1 -0 0 1 -4 - -3 4 -0 -2 1 -2 -1 1 0 -1 -1 -1 0 2 diff --git a/cloog-0.17.0/isl/test_inputs/convex6.polylib b/cloog-0.17.0/isl/test_inputs/convex6.polylib deleted file mode 100644 index 1bdb4e1c9dd2da2fb981b982db7a4af2e20857b1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex6.polylib +++ /dev/null @@ -1,17 +0,0 @@ -3 4 -1 1 1 -2 -1 -1 1 2 -1 0 -1 2 - -3 4 -1 0 1 -1 -1 1 -1 1 -1 -1 -1 5 - -6 4 -1 -1 0 4 -1 1 0 0 -1 1 2 -2 -1 -1 2 2 -1 1 -2 4 -1 -1 -2 8 diff --git a/cloog-0.17.0/isl/test_inputs/convex7.polylib b/cloog-0.17.0/isl/test_inputs/convex7.polylib deleted file mode 100644 index 70eb483175bc920c8b8c83f2a9b5b65b4f56cceb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex7.polylib +++ /dev/null @@ -1,9 +0,0 @@ -1 4 -0 0 1 0 - -2 4 -1 1 -1 1 -1 -1 -1 1 - -1 4 -1 0 -1 1 diff --git a/cloog-0.17.0/isl/test_inputs/convex8.polylib b/cloog-0.17.0/isl/test_inputs/convex8.polylib deleted file mode 100644 index ea1b757108c44fbb680080e69496c1c9b15726f0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex8.polylib +++ /dev/null @@ -1,24 +0,0 @@ -4 5 -1 1 1 1 0 -1 0 -1 0 0 -1 -1 0 0 2 -1 1 1 -1 0 - -4 5 -1 -1 1 0 2 -1 1 -2 -2 -1 -1 -1 0 2 3 -1 1 0 0 -1 - -10 5 -1 1 0 1 0 -1 1 1 0 0 -1 0 1 1 2 -1 -3 1 -1 8 -1 -3 1 1 8 -1 0 1 -1 2 -1 1 0 -1 0 -1 1 -2 -1 0 -1 -1 -3 2 6 -1 1 -5 -2 2 - diff --git a/cloog-0.17.0/isl/test_inputs/convex9.polylib b/cloog-0.17.0/isl/test_inputs/convex9.polylib deleted file mode 100644 index f68fca097a9a167f710ebef9a1b4cafaccb6c7a9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/convex9.polylib +++ /dev/null @@ -1,14 +0,0 @@ -4 4 -1 1 0 0 -1 -1 0 1 -1 0 1 0 -1 0 -1 10 - -2 4 -1 1 0 -10 -0 0 -1 5 - -3 4 -1 1 0 0 -1 0 1 0 -1 0 -1 10 diff --git a/cloog-0.17.0/isl/test_inputs/devos.pwqp b/cloog-0.17.0/isl/test_inputs/devos.pwqp deleted file mode 100644 index b4525446904b000fa34d84c4a21d80f2894463d7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/devos.pwqp +++ /dev/null @@ -1 +0,0 @@ -[U] -> { [i0] -> ((1/3 * U + 2/3 * i0) - [(U + 2i0)/3]) : 2i0 >= -3 - U and 2i0 <= -U and U >= 0 and U <= 10 } diff --git a/cloog-0.17.0/isl/test_inputs/equality1.pwqp b/cloog-0.17.0/isl/test_inputs/equality1.pwqp deleted file mode 100644 index eb16a4ba7b85f07a938375c582a5081a3e545b3a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/equality1.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [x] -> 1 + [(x+1)/3] : exists a : x = 3a +1 && 0 <= x <= n } diff --git a/cloog-0.17.0/isl/test_inputs/equality2.pwqp b/cloog-0.17.0/isl/test_inputs/equality2.pwqp deleted file mode 100644 index 1629a6549ea90030e7b3781c044ab2c0c2ba80a8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/equality2.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [x,y] -> x^2 * y : n = 2x + 4y and 0 <= x,y <= 10 } diff --git a/cloog-0.17.0/isl/test_inputs/equality3.pwqp b/cloog-0.17.0/isl/test_inputs/equality3.pwqp deleted file mode 100644 index c6f8c3acf19bb469d923bb919c12f3ede2865623..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/equality3.pwqp +++ /dev/null @@ -1 +0,0 @@ -[m,n] -> { [x,y] -> x^2 * y : n = 2x + 4y and 0 <= x,y <= 10 and 3 n = 5 m } diff --git a/cloog-0.17.0/isl/test_inputs/equality4.pwqp b/cloog-0.17.0/isl/test_inputs/equality4.pwqp deleted file mode 100644 index 49da2e7eff63fe985e14f01a94d170df0a955c8a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/equality4.pwqp +++ /dev/null @@ -1 +0,0 @@ -[m,n] -> { [x,y] -> x^2 * y + m + 13 * n: n = 2x + 4y and 0 <= x,y <= 10 and 3 n = 5 m } diff --git a/cloog-0.17.0/isl/test_inputs/equality5.pwqp b/cloog-0.17.0/isl/test_inputs/equality5.pwqp deleted file mode 100644 index 09cb7520113ffb7baa9b9521469aea22c41a9a84..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/equality5.pwqp +++ /dev/null @@ -1 +0,0 @@ -[m,n] -> { [x,y,z] -> x^2 * y + z + m + 13 * n: n = 2x + 4y and 0 <= x,y <= 10 and 3 n = 5 m and z = x + y } diff --git a/cloog-0.17.0/isl/test_inputs/esced.pip b/cloog-0.17.0/isl/test_inputs/esced.pip deleted file mode 100644 index dbf56ffa0fd62c8d1decb8d8197c2a72c154b355..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/esced.pip +++ /dev/null @@ -1,27 +0,0 @@ -0 2 - --1 - -16 18 -1 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 - - -0 0 0 0 -1 0 0 0 0 1 -1 0 0 0 0 0 0 0 -0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 - -0 -1 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 - -0 0 0 0 0 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 -0 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 -0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 - -0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 -0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 - -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 diff --git a/cloog-0.17.0/isl/test_inputs/ex.pip b/cloog-0.17.0/isl/test_inputs/ex.pip deleted file mode 100644 index a405450b2adea18893992b211d8c5eaa02791c71..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/ex.pip +++ /dev/null @@ -1,9 +0,0 @@ -1 5 -1 -1 1 1 0 - --1 - -3 7 -1 0 -1 0 1 0 0 -1 -1 0 0 0 1 0 -1 1 1 -1 0 0 0 diff --git a/cloog-0.17.0/isl/test_inputs/ex2.pip b/cloog-0.17.0/isl/test_inputs/ex2.pip deleted file mode 100644 index bb59848c8f290d3f72a21db995ef6575f9e30745..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/ex2.pip +++ /dev/null @@ -1,9 +0,0 @@ -1 5 -1 -1 1 1 0 - --1 - -3 7 -1 0 -1 0 1 0 0 -1 -1 0 0 0 1 0 -1 1 1 -1 0 0 0 diff --git a/cloog-0.17.0/isl/test_inputs/faddeev.pwqp b/cloog-0.17.0/isl/test_inputs/faddeev.pwqp deleted file mode 100644 index e7db61d1bc5abe74f6a08b396d1203069f31fc20..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/faddeev.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j, k] -> (((4 + 6 * N + 2 * N^2) + (-2 - 2 * N) * j) + ((-2 - N) + j) * k) : j = 1 + i and k = 1 + i and i >= 3 and N <= 100 and i <= N and N >= 10 } diff --git a/cloog-0.17.0/isl/test_inputs/fimmel.pip b/cloog-0.17.0/isl/test_inputs/fimmel.pip deleted file mode 100644 index a6dee417c02d56e968352f4b7005da5d6da391e4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/fimmel.pip +++ /dev/null @@ -1,12 +0,0 @@ -0 4 - --1 - -7 6 -1 2 6 0 0 -9 -1 5 -3 0 0 0 -1 2 -10 0 0 15 -1 -2 6 0 0 -3 -1 -2 -6 0 0 17 -1 0 1 -1 0 0 -1 1 0 0 -1 0 diff --git a/cloog-0.17.0/isl/test_inputs/gist1.polylib b/cloog-0.17.0/isl/test_inputs/gist1.polylib deleted file mode 100644 index 802a4eb6ff2ab0497be6da42dde7ec876e1da29d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/gist1.polylib +++ /dev/null @@ -1,14 +0,0 @@ -4 5 -0 1 0 0 -1 -0 0 1 0 1 -0 0 0 1 -3 -1 0 0 0 1 - -4 5 -0 1 0 0 -1 -0 0 1 1 -2 -1 0 0 1 0 -1 0 0 -1 3 - -1 5 -0 0 1 0 1 diff --git a/cloog-0.17.0/isl/test_inputs/linearExample.pwqp b/cloog-0.17.0/isl/test_inputs/linearExample.pwqp deleted file mode 100644 index 24c53946a0b879fb17e439a07696be9ca9b638a3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/linearExample.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N, M, L] -> { [i, j, k] -> ((1/2 * i + 5 * j) + 1/7 * k) : i >= 0 and k >= -N + i and k >= -M - j and j <= L + i and L >= 0 and L >= -M } diff --git a/cloog-0.17.0/isl/test_inputs/max.pip b/cloog-0.17.0/isl/test_inputs/max.pip deleted file mode 100644 index e8af57b9f518a85f59957d0a91170b8c6fc20c42..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/max.pip +++ /dev/null @@ -1,9 +0,0 @@ -0 3 - --1 - -4 5 -1 -1 0 1 0 -1 0 -1 1 0 -1 -1 3 -2 12 -1 2 -1 -1 3 diff --git a/cloog-0.17.0/isl/test_inputs/neg.pwqp b/cloog-0.17.0/isl/test_inputs/neg.pwqp deleted file mode 100644 index 596a7d77d091c659204944c0c72c5f1ae2f5cbf7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/neg.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [i0] -> i0^2 : i0 >= -20 - n and i0 <= n and i0 <= -1 and n >= 0 } diff --git a/cloog-0.17.0/isl/test_inputs/negative.pip b/cloog-0.17.0/isl/test_inputs/negative.pip deleted file mode 100644 index 45090a59230fbecddb05fe8ec767d3a01060f96f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/negative.pip +++ /dev/null @@ -1,9 +0,0 @@ -1 3 -# n 1 -1 1 -1 # n >= 1 --1 - -2 4 -# i n 1 -1 1 0 1 # i >= -1 -1 -1 1 0 # i <= n diff --git a/cloog-0.17.0/isl/test_inputs/philippe.pwqp b/cloog-0.17.0/isl/test_inputs/philippe.pwqp deleted file mode 100644 index 1c56e7af7077d7f7e09ba60af1efe88e90bde152..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/philippe.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j] -> ((1/2 * i + 1/2 * i^2) + j) : i <= N and j >= 0 and j <= i } diff --git a/cloog-0.17.0/isl/test_inputs/philippe3vars.pwqp b/cloog-0.17.0/isl/test_inputs/philippe3vars.pwqp deleted file mode 100644 index 8d074962578d8bb0567ec78c1a5b9fe08aeaf432..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/philippe3vars.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j, k] -> (((1/2 * i + 1/2 * i^2) + j) + k^3) : i >= 0 and k >= -N + i and k >= -j and j <= i } diff --git a/cloog-0.17.0/isl/test_inputs/philippe3vars3pars.pwqp b/cloog-0.17.0/isl/test_inputs/philippe3vars3pars.pwqp deleted file mode 100644 index f81b8cc5a68ff1e1b1f5ff4823a133e7f1564f1e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/philippe3vars3pars.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N, M, L] -> { [i, j, k] -> (((1/2 * i + 1/2 * i^2) + j) + k^3) : i >= 0 and k >= -N + i and k >= -M - j and j <= L + i and L >= 0 and L >= -M } diff --git a/cloog-0.17.0/isl/test_inputs/philippeNeg.pwqp b/cloog-0.17.0/isl/test_inputs/philippeNeg.pwqp deleted file mode 100644 index 24dc805ed18a5b0f96ed06ddf74f0ff2dad4f7b0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/philippeNeg.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j] -> ((1/2 * i + 1/2 * i^2) + j) : i <= N and j >= -1 and j <= i } diff --git a/cloog-0.17.0/isl/test_inputs/philippePolynomialCoeff.pwqp b/cloog-0.17.0/isl/test_inputs/philippePolynomialCoeff.pwqp deleted file mode 100644 index e6327c78f35597566fad7bd13f301814bf3e89d5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/philippePolynomialCoeff.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N, M] -> { [i, j] -> ((N * i + (1/5 * N + N^2) * i^2) + 5 * j) : i <= N and j >= 0 and j <= i and M >= 0 } diff --git a/cloog-0.17.0/isl/test_inputs/philippePolynomialCoeff1P.pwqp b/cloog-0.17.0/isl/test_inputs/philippePolynomialCoeff1P.pwqp deleted file mode 100644 index ae01d2fcb87460750dc396c5f3fbab836b32d227..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/philippePolynomialCoeff1P.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i, j] -> ((N * i + (1/5 * N + N^2) * i^2) + 5 * j) : i <= N and j >= 0 and j <= i } diff --git a/cloog-0.17.0/isl/test_inputs/product.pwqp b/cloog-0.17.0/isl/test_inputs/product.pwqp deleted file mode 100644 index ee48b859ee3a4afb5904cdd9d7e6f69452cbecd1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/product.pwqp +++ /dev/null @@ -1 +0,0 @@ -[N] -> { [i0, i1, i2] -> (i0^3 * i1^2 + N * i1 * i2) : i0 >= 0 and i0 <= N and i1 >= 0 and i1 <= N and i2 >= 0 and i2 <= N } diff --git a/cloog-0.17.0/isl/test_inputs/seghir-vd.pip b/cloog-0.17.0/isl/test_inputs/seghir-vd.pip deleted file mode 100644 index b5395fbdb383c7717547e2b4d3187d403a0e7df4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/seghir-vd.pip +++ /dev/null @@ -1,17 +0,0 @@ -0 6 - --1 - -9 8 - 0 0 0 1 1 0 0 2 - 1 2 1 0 0 1 0 0 - 1 0 1 0 -1 0 0 -1 - 1 -2 -1 0 0 0 0 -1 - 1 7 3 0 0 0 0 -1 - 1 -6 -4 0 1 0 3 1 - 1 -7 -3 0 0 1 6 4 - 1 0 0 0 0 0 1 0 - 1 0 0 0 0 0 0 1 - -Urs_parms -Urs_unknowns diff --git a/cloog-0.17.0/isl/test_inputs/set.omega b/cloog-0.17.0/isl/test_inputs/set.omega deleted file mode 100644 index ac8485fb9a4eee36e59e59c2c8611b55dbea956b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/set.omega +++ /dev/null @@ -1 +0,0 @@ -{[y]: Exists ( alpha : 2alpha = y)} diff --git a/cloog-0.17.0/isl/test_inputs/small.pip b/cloog-0.17.0/isl/test_inputs/small.pip deleted file mode 100644 index 59557d262bd373325e8af46ee349e3752cdc022a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/small.pip +++ /dev/null @@ -1,9 +0,0 @@ -0 2 - --1 - -4 4 -1 1 0 0 -1 0 1 0 -1 1 -3 12 -1 -2 1 3 diff --git a/cloog-0.17.0/isl/test_inputs/sor1d.pip b/cloog-0.17.0/isl/test_inputs/sor1d.pip deleted file mode 100644 index 1bef89e5bf1f74df381a915b58adee14eb929d74..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/sor1d.pip +++ /dev/null @@ -1,28 +0,0 @@ -2 4 - 1 1 0 0 - 1 0 1 0 - --1 - -20 8 - - 0 -1 0 0 0 0 0 2 - 0 0 -1 0 0 0 0 1 - 0 0 0 -1 0 0 0 2 - 0 0 0 0 -1 0 0 4 - 1 0 0 0 1 0 0 -2 - 1 -2 0 2 1 0 0 -4 - 1 0 0 0 -1 0 1 -1 - 1 2 0 -2 -1 0 0 5 - 1 0 0 1 0 0 0 -1 - 1 0 -2 1 0 0 0 0 - 1 -2 0 2 0 0 1 -5 - 1 0 0 -1 0 1 0 0 - 1 0 2 -1 0 0 0 1 - 1 2 0 -2 0 0 0 3 - 1 0 1 0 0 0 0 0 - 1 -2 4 0 0 0 1 -3 - 1 0 -2 0 0 1 0 0 - 1 2 -4 0 0 0 0 3 - 1 2 0 0 0 0 0 1 - 1 -2 0 0 0 2 1 -5 diff --git a/cloog-0.17.0/isl/test_inputs/split.pwqp b/cloog-0.17.0/isl/test_inputs/split.pwqp deleted file mode 100644 index 1804563600ce85b350915eef902cb4f64c48dc81..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/split.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [x] -> -1 + [(x+5)/7] : -n - 20 <= x <= n } diff --git a/cloog-0.17.0/isl/test_inputs/square.pip b/cloog-0.17.0/isl/test_inputs/square.pip deleted file mode 100644 index 7bb3f0c90b50b6a736a801c2ac7c0b75aff7be2c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/square.pip +++ /dev/null @@ -1,9 +0,0 @@ -0 3 - --1 - -4 5 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 0 diff --git a/cloog-0.17.0/isl/test_inputs/sven.pip b/cloog-0.17.0/isl/test_inputs/sven.pip deleted file mode 100644 index 86027691036a25deda30cd08e7285ad19e617c82..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/sven.pip +++ /dev/null @@ -1,7 +0,0 @@ -0 3 - --1 - -2 3 -1 1 -4 -1 -1 10 diff --git a/cloog-0.17.0/isl/test_inputs/test3Deg3Var.pwqp b/cloog-0.17.0/isl/test_inputs/test3Deg3Var.pwqp deleted file mode 100644 index d9a9ea9da01d334213306f8457bd527d77613a88..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/test3Deg3Var.pwqp +++ /dev/null @@ -1 +0,0 @@ -[p] -> { [n, m] -> (n + n^3) : n >= 1 and m >= n and m <= p } diff --git a/cloog-0.17.0/isl/test_inputs/tobi.pip b/cloog-0.17.0/isl/test_inputs/tobi.pip deleted file mode 100644 index c31beae1b0f2a9ab0db6a47feb45bc600d8125ab..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/tobi.pip +++ /dev/null @@ -1,15 +0,0 @@ -2 3 -1 1 -281 -1 -1 14000 - --1 - -6 6 -0 -392 0 8 -1 0 -0 392 8 0 1 0 -1 -1 0 0 0 0 -1 1 0 0 0 35 -1 392 0 0 1 0 -1 -392 0 0 -1 280 - -Urs_unknowns diff --git a/cloog-0.17.0/isl/test_inputs/toplas.pwqp b/cloog-0.17.0/isl/test_inputs/toplas.pwqp deleted file mode 100644 index 9c0999540b2e3b7476fac3a05fe7df89eab8f4e6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/toplas.pwqp +++ /dev/null @@ -1 +0,0 @@ -[n] -> { [i0, i1] -> (((4 * n - n^2) + (-3/2 + 2 * n) * i0 - 1/2 * i0^2) - i1) : i1 >= -1 + 3n - i0 and i1 >= -1 + 2n - i0 and i0 >= 0 and i1 <= -2 + 4n - i0 and i0 <= -2 + 4n and i0 <= -1 + 3n and i1 >= 0 and i1 <= -1 + n } diff --git a/cloog-0.17.0/isl/test_inputs/unexpanded.pwqp b/cloog-0.17.0/isl/test_inputs/unexpanded.pwqp deleted file mode 100644 index 5626d3baa41806cc1bb043f890902de43f1845ca..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/isl/test_inputs/unexpanded.pwqp +++ /dev/null @@ -1 +0,0 @@ -{ [x, y] -> ((x - x^2) * y + (-x + x^2) * y^2) : x >= 0 and x <= 2 and y >= 0 and y <= 2 } diff --git a/cloog-0.17.0/m4/ax_cc_maxopt.m4 b/cloog-0.17.0/m4/ax_cc_maxopt.m4 deleted file mode 100644 index da415be979258ff0fb81a2a711c2ad83522d5871..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_cc_maxopt.m4 +++ /dev/null @@ -1,178 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.17.0/m4/ax_cflags_warn_all.m4 b/cloog-0.17.0/m4/ax_cflags_warn_all.m4 deleted file mode 100644 index 026c6e984150e14b607856f4c63441f47daef14d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_cflags_warn_all.m4 +++ /dev/null @@ -1,149 +0,0 @@ -# =========================================================================== -# 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 -# -# 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 . -# -# 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/cloog-0.17.0/m4/ax_check_compiler_flags.m4 b/cloog-0.17.0/m4/ax_check_compiler_flags.m4 deleted file mode 100644 index 7da8324b70fed482e01a7e5c58673f79fa960093..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_check_compiler_flags.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.17.0/m4/ax_compiler_vendor.m4 b/cloog-0.17.0/m4/ax_compiler_vendor.m4 deleted file mode 100644 index b074260a41c5b69b9038e4bab67a0c1ce767ac74..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_compiler_vendor.m4 +++ /dev/null @@ -1,61 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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/cloog-0.17.0/m4/ax_create_pkgconfig_info.m4 b/cloog-0.17.0/m4/ax_create_pkgconfig_info.m4 deleted file mode 100644 index 60ac5485023df99d79529ac33abe547672a27de2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_create_pkgconfig_info.m4 +++ /dev/null @@ -1,349 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])] -# -# DESCRIPTION -# -# Defaults: -# -# $1 = $PACKAGE_NAME.pc -# $2 = (empty) -# $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) -# $4 = $PACKAGE_SUMMARY (or $1 Library) -# $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) -# $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) -# -# PACKAGE_NAME defaults to $PACKAGE if not set. -# PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. -# -# The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc -# -# You will find this macro most useful in conjunction with -# ax_spec_defaults that can read good initializers from the .spec file. In -# consequencd, most of the generatable installable stuff can be made from -# information being updated in a single place for the whole project. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2008 Sven Verdoolaege -# -# 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 . -# -# 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_CREATE_PKGCONFIG_INFO],[dnl -AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl -AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl -AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl -AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl -AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl -AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl -AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl -AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl - -# we need the expanded forms... -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -AC_MSG_CHECKING(our pkgconfig libname) -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)" -test ".$PKGCONFIG_libname" != "." || \ -PKGCONFIG_libname="$PACKAGE" -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` -AC_MSG_RESULT($PKGCONFIG_libname) - -AC_MSG_CHECKING(our pkgconfig version) -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="${PACKAGE_VERSION}" -test ".$PKGCONFIG_version" != "." || \ -PKGCONFIG_version="$VERSION" -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` -AC_MSG_RESULT($PKGCONFIG_version) - -AC_MSG_CHECKING(our pkgconfig_libdir) -test ".$pkgconfig_libdir" = "." && \ -pkgconfig_libdir='${libdir}/pkgconfig' -PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` -AC_MSG_RESULT($pkgconfig_libdir) -test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && ( -AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir)) -AC_SUBST([pkgconfig_libdir]) - -AC_MSG_CHECKING(our pkgconfig_libfile) -test ".$pkgconfig_libfile" != "." || \ -pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)" -PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"` -PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"` -AC_MSG_RESULT($pkgconfig_libfile) -test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && ( -AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile)) -AC_SUBST([pkgconfig_libfile]) - -AC_MSG_CHECKING(our package / suffix) -PKGCONFIG_suffix="$program_suffix" -test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix="" -AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix}) - -AC_MSG_CHECKING(our pkgconfig description) -PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)" -test ".$PKGCONFIG_description" != "." || \ -PKGCONFIG_description="$PKGCONFIG_libname Library" -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` -AC_MSG_RESULT($PKGCONFIG_description) - -AC_MSG_CHECKING(our pkgconfig requires) -PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)" -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` -AC_MSG_RESULT($PKGCONFIG_requires) - -AC_MSG_CHECKING(our pkgconfig ext libs) -PKGCONFIG_pkglibs="$PACKAGE_LIBS" -test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname" -PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)" -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` -AC_MSG_RESULT($PKGCONFIG_libs) - -AC_MSG_CHECKING(our pkgconfig cppflags) -PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` -AC_MSG_RESULT($PKGCONFIG_cppflags) - -AC_MSG_CHECKING(our pkgconfig ldflags) -PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` -AC_MSG_RESULT($PKGCONFIG_ldflags) - -test ".$PKGCONFIG_generate" != "." || \ -PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)" -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` -test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && ( -AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate)) - -if test ".$PKGCONFIG_src_libdir" = "." ; then -PKGCONFIG_src_libdir=`pwd` -PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")` -test ! -d $PKGCONFIG_src_libdir/src || \ -PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src" -case ".$objdir" in -*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac -AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir) -fi - -if test ".$PKGCONFIG_src_headers" = "." ; then -PKGCONFIG_src_headers=`pwd` -v="$ac_top_srcdir" ; -test ".$v" != "." || v="$ax_spec_dir" -test ".$v" != "." || v="$srcdir" -case "$v" in /*) PKGCONFIG_src_headers="" ;; esac -PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` -test ! -d $PKGCONFIG_src_headers/incl[]ude || \ -PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" -AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers) -fi - - -dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here... -AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[ -pkgconfig_generate="$ax_create_pkgconfig_generate" -if test ! -f "$pkgconfig_generate.in" -then generate="true" -elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null -then generate="true" -else generate="false"; -fi -if $generate ; then -AC_MSG_NOTICE(creating $pkgconfig_generate.in) -cat > $pkgconfig_generate.in <conftest.sed < $pkgconfig_generate -if test ! -s $pkgconfig_generate ; then - AC_MSG_ERROR([$pkgconfig_generate is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_generate -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed < $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled - pkgconfig_requires_add=`echo ${pkgconfig_requires}` -if test ".$pkgconfig_requires_add" != "." ; then - pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" - else pkgconfig_requires_add=":" ; fi -pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` -AC_MSG_NOTICE(creating $pkgconfig_uninstalled) -cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > -s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > -s>Version: *>\\;\\; --modversion|--version) echo > -s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> -s>Libs: *>\\;\\; --libs) echo > -s>Cflags: *>\\;\\; --cflags) echo > -/--libs)/a\\ - $pkgconfig_requires_add -/--cflags)/a\\ - $pkgconfig_requires_add\\ -;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ -;; --uninstalled) exit 0 \\ -;; *) ;; esac done -AXEOF -sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled -if test ! -s $pkgconfig_uninstalled ; then - AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) -fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled -],[ -dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here... -ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" -pkgconfig_prefix='$prefix' -pkgconfig_execprefix='$exec_prefix' -pkgconfig_bindir='$bindir' -pkgconfig_libdir='$libdir' -pkgconfig_includedir='$includedir' -pkgconfig_datarootdir='$datarootdir' -pkgconfig_datadir='$datadir' -pkgconfig_sysconfdir='$sysconfdir' -pkgconfig_suffix='$ax_create_pkgconfig_suffix' -pkgconfig_package='$PACKAGE_NAME' -pkgconfig_libname='$ax_create_pkgconfig_libname' -pkgconfig_description='$ax_create_pkgconfig_description' -pkgconfig_version='$ax_create_pkgconfig_version' -pkgconfig_requires='$ax_create_pkgconfig_requires' -pkgconfig_libs='$ax_create_pkgconfig_libs' -pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' -pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' -pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' -pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' -])dnl -AS_VAR_POPDEF([PKGCONFIG_suffix])dnl -AS_VAR_POPDEF([PKGCONFIG_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_libfile])dnl -AS_VAR_POPDEF([PKGCONFIG_libname])dnl -AS_VAR_POPDEF([PKGCONFIG_version])dnl -AS_VAR_POPDEF([PKGCONFIG_description])dnl -AS_VAR_POPDEF([PKGCONFIG_requires])dnl -AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl -AS_VAR_POPDEF([PKGCONFIG_libs])dnl -AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl -AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl -AS_VAR_POPDEF([PKGCONFIG_generate])dnl -AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl -AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl -]) diff --git a/cloog-0.17.0/m4/ax_gcc_archflag.m4 b/cloog-0.17.0/m4/ax_gcc_archflag.m4 deleted file mode 100644 index dedeef424e945cbd57dc69f45a7860210c4b7b9c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_gcc_archflag.m4 +++ /dev/null @@ -1,213 +0,0 @@ -# =========================================================================== -# 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= 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 -# 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 . -# -# 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=], [use architecture 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/cloog-0.17.0/m4/ax_gcc_x86_cpuid.m4 b/cloog-0.17.0/m4/ax_gcc_x86_cpuid.m4 deleted file mode 100644 index 5420b095900a37f43dd9835934b532e05c6b3f6e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_gcc_x86_cpuid.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# =========================================================================== -# 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 -# 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 . -# -# 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 ], [ - 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/cloog-0.17.0/m4/ax_submodule.m4 b/cloog-0.17.0/m4/ax_submodule.m4 deleted file mode 100644 index 57e3a56e0472fb08b112b15c3bb9255ed2869628..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ax_submodule.m4 +++ /dev/null @@ -1,63 +0,0 @@ -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/cloog-0.17.0/m4/libtool.m4 b/cloog-0.17.0/m4/libtool.m4 deleted file mode 100644 index a3fee5360f644854cc9497a7b3b1ed2ba6d46f08..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/libtool.m4 +++ /dev/null @@ -1,7377 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/cloog-0.17.0/m4/ltoptions.m4 b/cloog-0.17.0/m4/ltoptions.m4 deleted file mode 100644 index 34151a3ba625f326e6645d6afc79586f10746a3e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/cloog-0.17.0/m4/ltsugar.m4 b/cloog-0.17.0/m4/ltsugar.m4 deleted file mode 100644 index 9000a057d31ddf75cb85ccda8757de4493bcdbe7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/cloog-0.17.0/m4/ltversion.m4 b/cloog-0.17.0/m4/ltversion.m4 deleted file mode 100644 index f3c5309802447a3b341b1a2c5e4d74ec138b311a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/cloog-0.17.0/m4/lt~obsolete.m4 b/cloog-0.17.0/m4/lt~obsolete.m4 deleted file mode 100644 index 637bb2066c425f79faecd6cc9e4e6b5074c6b55c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/m4/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/cloog-0.17.0/osl/AUTHORS b/cloog-0.17.0/osl/AUTHORS deleted file mode 100644 index 863a33839a40ee35c2cd832a9e7f2ef54f36fc56..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -* * * * * * * * * * * * * * -* OpenScop Library 0.5.0 * -* * * * * * * * * * * * * * - -Version 0.5.0 - -Current maintainer: -* Cedric Bastoul - -Authors of the OpenScop Library: -* Cedric Bastoul -* Louis-Noel Pouchet diff --git a/cloog-0.17.0/osl/ChangeLog b/cloog-0.17.0/osl/ChangeLog deleted file mode 100644 index b2fa4f17d536dbb76d16155bdee2f6c82db3ec6e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/ChangeLog +++ /dev/null @@ -1,107 +0,0 @@ -2010-03-08 Louis-Noel Pouchet - - * configure.in: Bump to ScopLib 0.2.0. - * README: Update with build information. - -2010-02-05 Louis-Noel Pouchet - - * include/scoplib/matrix.h, - * source/matrix.c: Add function scoplib_matrix_equal. - -2010-01-26 Louis-Noel Pouchet - - * include/macros.h: Add SCOPVAL_multo macro. - -2009-09-21 Louis-Noel Pouchet - - * source/vector.c, - * source/matrix.c, - * source/scop.c, - * source/statement.c, - * source/Makefile.am, - * include/Makefile.am, - * include/scoplib/scop.h.in, - * include/scoplib/vector.h, - * include/scoplib/macros.h, - * include/scoplib/matrix.h, - * include/scoplib/statement.h, - * COPYING.LESSER, - * configure.in, - * Makefile.am, - * README: Downgrade license from LGPL3+ to LGPL2.1+, to be - compatible with CLooG's license. - -2009-06-24 Louis-Noel Pouchet - - * source/scop.c, - * source/statement.c, - * include/scoplib/statement.h: Add support for control and exit - predicates as statement attributes. Needed for non-static control - code support. - -2009-05-02 Louis-Noel Pouchet - - * source/matrix.c, - * include/scoplib/macros.h, - * include/scoplib/matrix.h, - * configure.in: Fix a few minor problems. - -2009-05-02 Louis-Noel Pouchet - This is the initial checkin of ScopLib, a fork of Clan which - contains only the functions related to the .scop format, and the - main scop/statement/matrix/vector functions. - - clan_*_p types have been renamed scoplib_*_p, similarely for - function calls. - - * AUTHORS, - * autoconf, - * autogen.sh, - * configure.in, - * COPYING.LESSER, - * doc, - * doc/ascii-art.txt, - * doc/clan.texi, - * doc/Doxyfile.in, - * doc/images, - * doc/images/basic.eps, - * doc/images/basic.fig, - * doc/images/basic.jpg, - * doc/images/basic.pdf, - * doc/images/basic.txt, - * doc/images/basic1.eps, - * doc/images/basic1.fig, - * doc/images/basic1.jpg, - * doc/images/basic1.pdf, - * doc/images/basic1.txt, - * doc/images/basic2.eps, - * doc/images/basic2.fig, - * doc/images/basic2.jpg, - * doc/images/basic2.pdf, - * doc/images/basic2.txt, - * doc/images/tree.eps, - * doc/images/tree.fig, - * doc/images/tree.jpg, - * doc/images/tree.pdf, - * doc/images/tree.txt, - * doc/Makefile.am, - * doc/S4.cloog, - * include, - * include/Makefile.am, - * include/scoplib, - * include/scoplib/macros.h, - * include/scoplib/matrix.h, - * include/scoplib/scop.h.in, - * include/scoplib/statement.h, - * include/scoplib/vector.h, - * Makefile.am, - * NEWS, - * README, - * source, - * source/Makefile.am, - * source/matrix.c, - * source/scop.c, - * source/statement.c, - * source/vector.c, - * THANKS: Initial checkin of the project. - diff --git a/cloog-0.17.0/osl/Makefile.am b/cloog-0.17.0/osl/Makefile.am deleted file mode 100644 index 5a7b87f502a7eafce7779b8fe1eebdd77e569093..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/Makefile.am +++ /dev/null @@ -1,92 +0,0 @@ -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - - -############################################################################# -SUBDIRS = doc source include tests - - -############################################################################# -ACLOCAL_AMFLAGS = -I autoconf - -m4datadir = $(datadir)/aclocal - - -MAINTAINERCLEANFILES = \ - autoconf/texinfo.tex \ - Makefile.in \ - aclocal.m4 \ - configure \ - source/stamp-h.in \ - $(AUX_DIST) - - -############################################################################# -ctags: - ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -f$(HOME)/.ctags . -############################################################################# diff --git a/cloog-0.17.0/osl/Makefile.in b/cloog-0.17.0/osl/Makefile.in deleted file mode 100644 index c422be3a174ad7ab4301b1baf99ab03ad6689349..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/Makefile.in +++ /dev/null @@ -1,793 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ - $(top_srcdir)/include/osl/scop.h.in AUTHORS ChangeLog NEWS \ - THANKS autoconf/config.guess autoconf/config.sub \ - autoconf/depcomp autoconf/install-sh autoconf/ltmain.sh \ - autoconf/missing autoconf/texinfo.tex -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/autoconf/libtool.m4 \ - $(top_srcdir)/autoconf/ltoptions.m4 \ - $(top_srcdir)/autoconf/ltsugar.m4 \ - $(top_srcdir)/autoconf/ltversion.m4 \ - $(top_srcdir)/autoconf/lt~obsolete.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = include/osl/scop.h -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_aux_dir = @ac_aux_dir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -############################################################################# -SUBDIRS = doc source include tests - -############################################################################# -ACLOCAL_AMFLAGS = -I autoconf -m4datadir = $(datadir)/aclocal -MAINTAINERCLEANFILES = \ - autoconf/texinfo.tex \ - Makefile.in \ - aclocal.m4 \ - configure \ - source/stamp-h.in \ - $(AUX_DIST) - -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): -include/osl/scop.h: $(top_builddir)/config.status $(top_srcdir)/include/osl/scop.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am - - -############################################################################# -ctags: - ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -f$(HOME)/.ctags . -############################################################################# - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/osl/NEWS b/cloog-0.17.0/osl/NEWS deleted file mode 100644 index 75daa9c52e78f032d11b8b42f37496f065b5927b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/NEWS +++ /dev/null @@ -1,2 +0,0 @@ -Some news... - diff --git a/cloog-0.17.0/osl/README b/cloog-0.17.0/osl/README deleted file mode 100644 index c1a58d0d4e832c63aac4faf2c927b8c8f1d4af29..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/README +++ /dev/null @@ -1,18 +0,0 @@ -* * * * * * * * * * * * * * -* OpenScop Library 0.5.0 * -* * * * * * * * * * * * * * - -Install -------- - -$> ./autogen.sh -$> ./configure -$> make -$> make install - -Support -------- - -Please contact: -openscop-development@googlegroups.com - diff --git a/cloog-0.17.0/osl/THANKS b/cloog-0.17.0/osl/THANKS deleted file mode 100644 index d12c4ad6d4d2b3a33cacb60be52bd1370fcbbec1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/THANKS +++ /dev/null @@ -1,12 +0,0 @@ -THANKS -====== - -The authors would like to gratefully thank the people that have -been involved in the (lively) discussions for the definition of -the OpenScop formats and data structures, in particular: - -Uday Bondhugula -Albert Cohen -Tobias Grosser -Sebastian Pop -Sven Verdoolaege diff --git a/cloog-0.17.0/osl/aclocal.m4 b/cloog-0.17.0/osl/aclocal.m4 deleted file mode 100644 index 4cc55dc991fce98b8e793b81b55d22f7cbc1dc7f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/aclocal.m4 +++ /dev/null @@ -1,973 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([autoconf/libtool.m4]) -m4_include([autoconf/ltoptions.m4]) -m4_include([autoconf/ltsugar.m4]) -m4_include([autoconf/ltversion.m4]) -m4_include([autoconf/lt~obsolete.m4]) diff --git a/cloog-0.17.0/osl/autoconf/config.guess b/cloog-0.17.0/osl/autoconf/config.guess deleted file mode 100755 index c2246a4f7f4c78281ccfc4238a54cf7d83c4f421..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/config.guess +++ /dev/null @@ -1,1502 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2009-12-30' - -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.17.0/osl/autoconf/config.sub b/cloog-0.17.0/osl/autoconf/config.sub deleted file mode 100755 index c2d125724c0ed2d2c6da5308c54567649554e5f3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/config.sub +++ /dev/null @@ -1,1714 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-01-22' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/cloog-0.17.0/osl/autoconf/depcomp b/cloog-0.17.0/osl/autoconf/depcomp deleted file mode 100755 index df8eea7e4ce8862105fcd7929b20bdb45488048b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# 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, 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 . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/osl/autoconf/install-sh b/cloog-0.17.0/osl/autoconf/install-sh deleted file mode 100755 index 6781b987bdbcbc23efe6bbe1654a1e3637b9af07..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/osl/autoconf/libtool.m4 b/cloog-0.17.0/osl/autoconf/libtool.m4 deleted file mode 100644 index a3fee5360f644854cc9497a7b3b1ed2ba6d46f08..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/libtool.m4 +++ /dev/null @@ -1,7377 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/cloog-0.17.0/osl/autoconf/ltmain.sh b/cloog-0.17.0/osl/autoconf/ltmain.sh deleted file mode 100755 index fa4b1e1f8ae4378e5bc1119d65ac20337f2445fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/ltmain.sh +++ /dev/null @@ -1,8413 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/cloog-0.17.0/osl/autoconf/ltoptions.m4 b/cloog-0.17.0/osl/autoconf/ltoptions.m4 deleted file mode 100644 index 34151a3ba625f326e6645d6afc79586f10746a3e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/cloog-0.17.0/osl/autoconf/ltsugar.m4 b/cloog-0.17.0/osl/autoconf/ltsugar.m4 deleted file mode 100644 index 9000a057d31ddf75cb85ccda8757de4493bcdbe7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/cloog-0.17.0/osl/autoconf/ltversion.m4 b/cloog-0.17.0/osl/autoconf/ltversion.m4 deleted file mode 100644 index f3c5309802447a3b341b1a2c5e4d74ec138b311a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/cloog-0.17.0/osl/autoconf/lt~obsolete.m4 b/cloog-0.17.0/osl/autoconf/lt~obsolete.m4 deleted file mode 100644 index 637bb2066c425f79faecd6cc9e4e6b5074c6b55c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/cloog-0.17.0/osl/autoconf/missing b/cloog-0.17.0/osl/autoconf/missing deleted file mode 100755 index 28055d2ae6f2a2c584afcd769d7881e11f62ecd9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# 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, 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 . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/cloog-0.17.0/osl/autoconf/texinfo.tex b/cloog-0.17.0/osl/autoconf/texinfo.tex deleted file mode 100644 index 91408263bc9c8ab0ad735c0974872d2f1cf58dc0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/autoconf/texinfo.tex +++ /dev/null @@ -1,9291 +0,0 @@ -% texinfo.tex -- TeX macros to handle Texinfo files. -% -% Load plain if necessary, i.e., if running under initex. -\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi -% -\def\texinfoversion{2009-08-14.15} -% -% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009 Free Software Foundation, Inc. -% -% This texinfo.tex file 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 texinfo.tex file 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 . -% -% As a special exception, when this file is read by TeX when processing -% a Texinfo source document, you may use the result without -% restriction. (This has been our intent since Texinfo was invented.) -% -% Please try the latest version of texinfo.tex before submitting bug -% reports; you can get the latest version from: -% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or -% ftp://tug.org/tex/texinfo.tex -% (and all CTAN mirrors, see http://www.ctan.org). -% The texinfo.tex in any given distribution could well be out -% of date, so if that's what you're using, please check. -% -% Send bug reports to bug-texinfo@gnu.org. Please include including a -% complete document in each bug report with which we can reproduce the -% problem. Patches are, of course, greatly appreciated. -% -% To process a Texinfo manual with TeX, it's most reliable to use the -% texi2dvi shell script that comes with the distribution. For a simple -% manual foo.texi, however, you can get away with this: -% tex foo.texi -% texindex foo.?? -% tex foo.texi -% tex foo.texi -% dvips foo.dvi -o # or whatever; this makes foo.ps. -% The extra TeX runs get the cross-reference information correct. -% Sometimes one run after texindex suffices, and sometimes you need more -% than two; texi2dvi does it as many times as necessary. -% -% It is possible to adapt texinfo.tex for other languages, to some -% extent. You can get the existing language-specific files from the -% full Texinfo distribution. -% -% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. - - -\message{Loading texinfo [version \texinfoversion]:} - -% If in a .fmt file, print the version number -% and turn on active characters that we couldn't do earlier because -% they might have appeared in the input file name. -\everyjob{\message{[Texinfo version \texinfoversion]}% - \catcode`+=\active \catcode`\_=\active} - - -\chardef\other=12 - -% We never want plain's \outer definition of \+ in Texinfo. -% For @tex, we can use \tabalign. -\let\+ = \relax - -% Save some plain tex macros whose names we will redefine. -\let\ptexb=\b -\let\ptexbullet=\bullet -\let\ptexc=\c -\let\ptexcomma=\, -\let\ptexdot=\. -\let\ptexdots=\dots -\let\ptexend=\end -\let\ptexequiv=\equiv -\let\ptexexclam=\! -\let\ptexfootnote=\footnote -\let\ptexgtr=> -\let\ptexhat=^ -\let\ptexi=\i -\let\ptexindent=\indent -\let\ptexinsert=\insert -\let\ptexlbrace=\{ -\let\ptexless=< -\let\ptexnewwrite\newwrite -\let\ptexnoindent=\noindent -\let\ptexplus=+ -\let\ptexrbrace=\} -\let\ptexslash=\/ -\let\ptexstar=\* -\let\ptext=\t -\let\ptextop=\top -{\catcode`\'=\active -\global\let\ptexquoteright'}% Math-mode def from plain.tex. -\let\ptexraggedright=\raggedright - -% If this character appears in an error message or help string, it -% starts a new line in the output. -\newlinechar = `^^J - -% Use TeX 3.0's \inputlineno to get the line number, for better error -% messages, but if we're using an old version of TeX, don't do anything. -% -\ifx\inputlineno\thisisundefined - \let\linenumber = \empty % Pre-3.0. -\else - \def\linenumber{l.\the\inputlineno:\space} -\fi - -% Set up fixed words for English if not already set. -\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi -\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi -\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi -\ifx\putwordin\undefined \gdef\putwordin{in}\fi -\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi -\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi -\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi -\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi -\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi -\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi -\ifx\putwordof\undefined \gdef\putwordof{of}\fi -\ifx\putwordon\undefined \gdef\putwordon{on}\fi -\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi -\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi -\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi -\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi -\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi -\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi -\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi -% -\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi -\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi -\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi -\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi -\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi -\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi -\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi -\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi -\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi -\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi -\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi -\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi -% -\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi -\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi -\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi -\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi -\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi - -% Since the category of space is not known, we have to be careful. -\chardef\spacecat = 10 -\def\spaceisspace{\catcode`\ =\spacecat} - -% sometimes characters are active, so we need control sequences. -\chardef\colonChar = `\: -\chardef\commaChar = `\, -\chardef\dashChar = `\- -\chardef\dotChar = `\. -\chardef\exclamChar= `\! -\chardef\lquoteChar= `\` -\chardef\questChar = `\? -\chardef\rquoteChar= `\' -\chardef\semiChar = `\; -\chardef\underChar = `\_ - -% Ignore a token. -% -\def\gobble#1{} - -% The following is used inside several \edef's. -\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} - -% Hyphenation fixes. -\hyphenation{ - Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script - ap-pen-dix bit-map bit-maps - data-base data-bases eshell fall-ing half-way long-est man-u-script - man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm - par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces - spell-ing spell-ings - stand-alone strong-est time-stamp time-stamps which-ever white-space - wide-spread wrap-around -} - -% Margin to add to right of even pages, to left of odd pages. -\newdimen\bindingoffset -\newdimen\normaloffset -\newdimen\pagewidth \newdimen\pageheight - -% For a final copy, take out the rectangles -% that mark overfull boxes (in case you have decided -% that the text looks ok even though it passes the margin). -% -\def\finalout{\overfullrule=0pt} - -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). -% -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% -} - -% Sometimes it is convenient to have everything in the transcript file -% and nothing on the terminal. We don't just call \tracingall here, -% since that produces some useless output on the terminal. We also make -% some effort to order the tracing commands to reduce output in the log -% file; cf. trace.sty in LaTeX. -% -\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% -\def\loggingall{% - \tracingstats2 - \tracingpages1 - \tracinglostchars2 % 2 gives us more in etex - \tracingparagraphs1 - \tracingoutput1 - \tracingmacros2 - \tracingrestores1 - \showboxbreadth\maxdimen \showboxdepth\maxdimen - \ifx\eTeXversion\undefined\else % etex gives us more logging - \tracingscantokens1 - \tracingifs1 - \tracinggroups1 - \tracingnesting2 - \tracingassigns1 - \fi - \tracingcommands3 % 3 gives us more in etex - \errorcontextlines16 -}% - -% add check for \lastpenalty to plain's definitions. If the last thing -% we did was a \nobreak, we don't want to insert more space. -% -\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount - \removelastskip\penalty-50\smallskip\fi\fi} -\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount - \removelastskip\penalty-100\medskip\fi\fi} -\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount - \removelastskip\penalty-200\bigskip\fi\fi} - -% For @cropmarks command. -% Do @cropmarks to get crop marks. -% -\newif\ifcropmarks -\let\cropmarks = \cropmarkstrue -% -% Dimensions to add cropmarks at corners. -% Added by P. A. MacKay, 12 Nov. 1986 -% -\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines -\newdimen\cornerlong \cornerlong=1pc -\newdimen\cornerthick \cornerthick=.3pt -\newdimen\topandbottommargin \topandbottommargin=.75in - -% Output a mark which sets \thischapter, \thissection and \thiscolor. -% We dump everything together because we only have one kind of mark. -% This works because we only use \botmark / \topmark, not \firstmark. -% -% A mark contains a subexpression of the \ifcase ... \fi construct. -% \get*marks macros below extract the needed part using \ifcase. -% -% Another complication is to let the user choose whether \thischapter -% (\thissection) refers to the chapter (section) in effect at the top -% of a page, or that at the bottom of a page. The solution is -% described on page 260 of The TeXbook. It involves outputting two -% marks for the sectioning macros, one before the section break, and -% one after. I won't pretend I can describe this better than DEK... -\def\domark{% - \toks0=\expandafter{\lastchapterdefs}% - \toks2=\expandafter{\lastsectiondefs}% - \toks4=\expandafter{\prevchapterdefs}% - \toks6=\expandafter{\prevsectiondefs}% - \toks8=\expandafter{\lastcolordefs}% - \mark{% - \the\toks0 \the\toks2 - \noexpand\or \the\toks4 \the\toks6 - \noexpand\else \the\toks8 - }% -} -% \topmark doesn't work for the very first chapter (after the title -% page or the contents), so we use \firstmark there -- this gets us -% the mark with the chapter defs, unless the user sneaks in, e.g., -% @setcolor (or @url, or @link, etc.) between @contents and the very -% first @chapter. -\def\gettopheadingmarks{% - \ifcase0\topmark\fi - \ifx\thischapter\empty \ifcase0\firstmark\fi \fi -} -\def\getbottomheadingmarks{\ifcase1\botmark\fi} -\def\getcolormarks{\ifcase2\topmark\fi} - -% Avoid "undefined control sequence" errors. -\def\lastchapterdefs{} -\def\lastsectiondefs{} -\def\prevchapterdefs{} -\def\prevsectiondefs{} -\def\lastcolordefs{} - -% Main output routine. -\chardef\PAGE = 255 -\output = {\onepageout{\pagecontents\PAGE}} - -\newbox\headlinebox -\newbox\footlinebox - -% \onepageout takes a vbox as an argument. Note that \pagecontents -% does insertions, but you have to call it yourself. -\def\onepageout#1{% - \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi - % - \ifodd\pageno \advance\hoffset by \bindingoffset - \else \advance\hoffset by -\bindingoffset\fi - % - % Do this outside of the \shipout so @code etc. will be expanded in - % the headline as they should be, not taken literally (outputting ''code). - \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi - \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% - \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi - \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% - % - {% - % Have to do this stuff outside the \shipout because we want it to - % take effect in \write's, yet the group defined by the \vbox ends - % before the \shipout runs. - % - \indexdummies % don't expand commands in the output. - \normalturnoffactive % \ in index entries must not stay \, e.g., if - % the page break happens to be in the middle of an example. - % We don't want .vr (or whatever) entries like this: - % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} - % "\acronym" won't work when it's read back in; - % it needs to be - % {\code {{\tt \backslashcurfont }acronym} - \shipout\vbox{% - % Do this early so pdf references go to the beginning of the page. - \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi - % - \ifcropmarks \vbox to \outervsize\bgroup - \hsize = \outerhsize - \vskip-\topandbottommargin - \vtop to0pt{% - \line{\ewtop\hfil\ewtop}% - \nointerlineskip - \line{% - \vbox{\moveleft\cornerthick\nstop}% - \hfill - \vbox{\moveright\cornerthick\nstop}% - }% - \vss}% - \vskip\topandbottommargin - \line\bgroup - \hfil % center the page within the outer (page) hsize. - \ifodd\pageno\hskip\bindingoffset\fi - \vbox\bgroup - \fi - % - \unvbox\headlinebox - \pagebody{#1}% - \ifdim\ht\footlinebox > 0pt - % Only leave this space if the footline is nonempty. - % (We lessened \vsize for it in \oddfootingyyy.) - % The \baselineskip=24pt in plain's \makefootline has no effect. - \vskip 24pt - \unvbox\footlinebox - \fi - % - \ifcropmarks - \egroup % end of \vbox\bgroup - \hfil\egroup % end of (centering) \line\bgroup - \vskip\topandbottommargin plus1fill minus1fill - \boxmaxdepth = \cornerthick - \vbox to0pt{\vss - \line{% - \vbox{\moveleft\cornerthick\nsbot}% - \hfill - \vbox{\moveright\cornerthick\nsbot}% - }% - \nointerlineskip - \line{\ewbot\hfil\ewbot}% - }% - \egroup % \vbox from first cropmarks clause - \fi - }% end of \shipout\vbox - }% end of group with \indexdummies - \advancepageno - \ifnum\outputpenalty>-20000 \else\dosupereject\fi -} - -\newinsert\margin \dimen\margin=\maxdimen - -\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} -{\catcode`\@ =11 -\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi -% marginal hacks, juha@viisa.uucp (Juha Takala) -\ifvoid\margin\else % marginal info is present - \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1\relax \unvbox#1\relax -\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi -\ifr@ggedbottom \kern-\dimen@ \vfil \fi} -} - -% Here are the rules for the cropmarks. Note that they are -% offset so that the space between them is truly \outerhsize or \outervsize -% (P. A. MacKay, 12 November, 1986) -% -\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} -\def\nstop{\vbox - {\hrule height\cornerthick depth\cornerlong width\cornerthick}} -\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} -\def\nsbot{\vbox - {\hrule height\cornerlong depth\cornerthick width\cornerthick}} - -% Parse an argument, then pass it to #1. The argument is the rest of -% the input line (except we remove a trailing comment). #1 should be a -% macro which expects an ordinary undelimited TeX argument. -% -\def\parsearg{\parseargusing{}} -\def\parseargusing#1#2{% - \def\argtorun{#2}% - \begingroup - \obeylines - \spaceisspace - #1% - \parseargline\empty% Insert the \empty token, see \finishparsearg below. -} - -{\obeylines % - \gdef\parseargline#1^^M{% - \endgroup % End of the group started in \parsearg. - \argremovecomment #1\comment\ArgTerm% - }% -} - -% First remove any @comment, then any @c comment. -\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} -\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} - -% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. -% -% \argremovec might leave us with trailing space, e.g., -% @end itemize @c foo -% This space token undergoes the same procedure and is eventually removed -% by \finishparsearg. -% -\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} -\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} -\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% - \def\temp{#3}% - \ifx\temp\empty - % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: - \let\temp\finishparsearg - \else - \let\temp\argcheckspaces - \fi - % Put the space token in: - \temp#1 #3\ArgTerm -} - -% If a _delimited_ argument is enclosed in braces, they get stripped; so -% to get _exactly_ the rest of the line, we had to prevent such situation. -% We prepended an \empty token at the very beginning and we expand it now, -% just before passing the control to \argtorun. -% (Similarly, we have to think about #3 of \argcheckspacesY above: it is -% either the null string, or it ends with \^^M---thus there is no danger -% that a pair of braces would be stripped. -% -% But first, we have to remove the trailing space token. -% -\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} - -% \parseargdef\foo{...} -% is roughly equivalent to -% \def\foo{\parsearg\Xfoo} -% \def\Xfoo#1{...} -% -% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my -% favourite TeX trick. --kasal, 16nov03 - -\def\parseargdef#1{% - \expandafter \doparseargdef \csname\string#1\endcsname #1% -} -\def\doparseargdef#1#2{% - \def#2{\parsearg#1}% - \def#1##1% -} - -% Several utility definitions with active space: -{ - \obeyspaces - \gdef\obeyedspace{ } - - % Make each space character in the input produce a normal interword - % space in the output. Don't allow a line break at this space, as this - % is used only in environments like @example, where each line of input - % should produce a line of output anyway. - % - \gdef\sepspaces{\obeyspaces\let =\tie} - - % If an index command is used in an @example environment, any spaces - % therein should become regular spaces in the raw index file, not the - % expansion of \tie (\leavevmode \penalty \@M \ ). - \gdef\unsepspaces{\let =\space} -} - - -\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} - -% Define the framework for environments in texinfo.tex. It's used like this: -% -% \envdef\foo{...} -% \def\Efoo{...} -% -% It's the responsibility of \envdef to insert \begingroup before the -% actual body; @end closes the group after calling \Efoo. \envdef also -% defines \thisenv, so the current environment is known; @end checks -% whether the environment name matches. The \checkenv macro can also be -% used to check whether the current environment is the one expected. -% -% Non-false conditionals (@iftex, @ifset) don't fit into this, so they -% are not treated as environments; they don't open a group. (The -% implementation of @end takes care not to call \endgroup in this -% special case.) - - -% At run-time, environments start with this: -\def\startenvironment#1{\begingroup\def\thisenv{#1}} -% initialize -\let\thisenv\empty - -% ... but they get defined via ``\envdef\foo{...}'': -\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} -\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} - -% Check whether we're in the right environment: -\def\checkenv#1{% - \def\temp{#1}% - \ifx\thisenv\temp - \else - \badenverr - \fi -} - -% Environment mismatch, #1 expected: -\def\badenverr{% - \errhelp = \EMsimple - \errmessage{This command can appear only \inenvironment\temp, - not \inenvironment\thisenv}% -} -\def\inenvironment#1{% - \ifx#1\empty - out of any environment% - \else - in environment \expandafter\string#1% - \fi -} - -% @end foo executes the definition of \Efoo. -% But first, it executes a specialized version of \checkenv -% -\parseargdef\end{% - \if 1\csname iscond.#1\endcsname - \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 - \expandafter\checkenv\csname#1\endcsname - \csname E#1\endcsname - \endgroup - \fi -} - -\newhelp\EMsimple{Press RETURN to continue.} - - -%% Simple single-character @ commands - -% @@ prints an @ -% Kludge this until the fonts are right (grr). -\def\@{{\tt\char64}} - -% This is turned off because it was never documented -% and you can use @w{...} around a quote to suppress ligatures. -%% Define @` and @' to be the same as ` and ' -%% but suppressing ligatures. -%\def\`{{`}} -%\def\'{{'}} - -% Used to generate quoted braces. -\def\mylbrace {{\tt\char123}} -\def\myrbrace {{\tt\char125}} -\let\{=\mylbrace -\let\}=\myrbrace -\begingroup - % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux/toc files. - \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\! = 0 \catcode`\\ = \other - !gdef!lbracecmd[\{]% - !gdef!rbracecmd[\}]% - !gdef!lbraceatcmd[@{]% - !gdef!rbraceatcmd[@}]% -!endgroup - -% @comma{} to avoid , parsing problems. -\let\comma = , - -% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. -\let\, = \c -\let\dotaccent = \. -\def\ringaccent#1{{\accent23 #1}} -\let\tieaccent = \t -\let\ubaraccent = \b -\let\udotaccent = \d - -% Other special characters: @questiondown @exclamdown @ordf @ordm -% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. -\def\questiondown{?`} -\def\exclamdown{!`} -\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - -% Dotless i and dotless j, used for accents. -\def\imacro{i} -\def\jmacro{j} -\def\dotless#1{% - \def\temp{#1}% - \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi - \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi - \else \errmessage{@dotless can be used only with i or j}% - \fi\fi -} - -% The \TeX{} logo, as in plain, but resetting the spacing so that a -% period following counts as ending a sentence. (Idea found in latex.) -% -\edef\TeX{\TeX \spacefactor=1000 } - -% @LaTeX{} logo. Not quite the same results as the definition in -% latex.ltx, since we use a different font for the raised A; it's most -% convenient for us to use an explicitly smaller font, rather than using -% the \scriptstyle font (since we don't reset \scriptstyle and -% \scriptscriptstyle). -% -\def\LaTeX{% - L\kern-.36em - {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% - \kern-.15em - \TeX -} - -% Be sure we're in horizontal mode when doing a tie, since we make space -% equivalent to this in @example-like environments. Otherwise, a space -% at the beginning of a line will start with \penalty -- and -% since \penalty is valid in vertical mode, we'd end up putting the -% penalty on the vertical list instead of in the new paragraph. -{\catcode`@ = 11 - % Avoid using \@M directly, because that causes trouble - % if the definition is written into an index file. - \global\let\tiepenalty = \@M - \gdef\tie{\leavevmode\penalty\tiepenalty\ } -} - -% @: forces normal size whitespace following. -\def\:{\spacefactor=1000 } - -% @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} - -% @/ allows a line break. -\let\/=\allowbreak - -% @. is an end-of-sentence period. -\def\.{.\spacefactor=\endofsentencespacefactor\space} - -% @! is an end-of-sentence bang. -\def\!{!\spacefactor=\endofsentencespacefactor\space} - -% @? is an end-of-sentence query. -\def\?{?\spacefactor=\endofsentencespacefactor\space} - -% @frenchspacing on|off says whether to put extra space after punctuation. -% -\def\onword{on} -\def\offword{off} -% -\parseargdef\frenchspacing{% - \def\temp{#1}% - \ifx\temp\onword \plainfrenchspacing - \else\ifx\temp\offword \plainnonfrenchspacing - \else - \errhelp = \EMsimple - \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% - \fi\fi -} - -% @w prevents a word break. Without the \leavevmode, @w at the -% beginning of a paragraph, when TeX is still in vertical mode, would -% produce a whole line of output instead of starting the paragraph. -\def\w#1{\leavevmode\hbox{#1}} - -% @group ... @end group forces ... to be all on one page, by enclosing -% it in a TeX vbox. We use \vtop instead of \vbox to construct the box -% to keep its height that of a normal line. According to the rules for -% \topskip (p.114 of the TeXbook), the glue inserted is -% max (\topskip - \ht (first item), 0). If that height is large, -% therefore, no glue is inserted, and the space between the headline and -% the text is small, which looks bad. -% -% Another complication is that the group might be very large. This can -% cause the glue on the previous page to be unduly stretched, because it -% does not have much material. In this case, it's better to add an -% explicit \vfill so that the extra space is at the bottom. The -% threshold for doing this is if the group is more than \vfilllimit -% percent of a page (\vfilllimit can be changed inside of @tex). -% -\newbox\groupbox -\def\vfilllimit{0.7} -% -\envdef\group{% - \ifnum\catcode`\^^M=\active \else - \errhelp = \groupinvalidhelp - \errmessage{@group invalid in context where filling is enabled}% - \fi - \startsavinginserts - % - \setbox\groupbox = \vtop\bgroup - % Do @comment since we are called inside an environment such as - % @example, where each end-of-line in the input causes an - % end-of-line in the output. We don't want the end-of-line after - % the `@group' to put extra space in the output. Since @group - % should appear on a line by itself (according to the Texinfo - % manual), we don't worry about eating any user text. - \comment -} -% -% The \vtop produces a box with normal height and large depth; thus, TeX puts -% \baselineskip glue before it, and (when the next line of text is done) -% \lineskip glue after it. Thus, space below is not quite equal to space -% above. But it's pretty close. -\def\Egroup{% - % To get correct interline space between the last line of the group - % and the first line afterwards, we have to propagate \prevdepth. - \endgraf % Not \par, as it may have been set to \lisppar. - \global\dimen1 = \prevdepth - \egroup % End the \vtop. - % \dimen0 is the vertical size of the group's box. - \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox - % \dimen2 is how much space is left on the page (more or less). - \dimen2 = \pageheight \advance\dimen2 by -\pagetotal - % if the group doesn't fit on the current page, and it's a big big - % group, force a page break. - \ifdim \dimen0 > \dimen2 - \ifdim \pagetotal < \vfilllimit\pageheight - \page - \fi - \fi - \box\groupbox - \prevdepth = \dimen1 - \checkinserts -} -% -% TeX puts in an \escapechar (i.e., `@') at the beginning of the help -% message, so this ends up printing `@group can only ...'. -% -\newhelp\groupinvalidhelp{% -group can only be used in environments such as @example,^^J% -where each line of input produces a line of output.} - -% @need space-in-mils -% forces a page break if there is not space-in-mils remaining. - -\newdimen\mil \mil=0.001in - -% Old definition--didn't work. -%\parseargdef\need{\par % -%% This method tries to make TeX break the page naturally -%% if the depth of the box does not fit. -%{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak -%\prevdepth=-1000pt -%}} - -\parseargdef\need{% - % Ensure vertical mode, so we don't make a big box in the middle of a - % paragraph. - \par - % - % If the @need value is less than one line space, it's useless. - \dimen0 = #1\mil - \dimen2 = \ht\strutbox - \advance\dimen2 by \dp\strutbox - \ifdim\dimen0 > \dimen2 - % - % Do a \strut just to make the height of this box be normal, so the - % normal leading is inserted relative to the preceding line. - % And a page break here is fine. - \vtop to #1\mil{\strut\vfil}% - % - % TeX does not even consider page breaks if a penalty added to the - % main vertical list is 10000 or more. But in order to see if the - % empty box we just added fits on the page, we must make it consider - % page breaks. On the other hand, we don't want to actually break the - % page after the empty box. So we use a penalty of 9999. - % - % There is an extremely small chance that TeX will actually break the - % page at this \penalty, if there are no other feasible breakpoints in - % sight. (If the user is using lots of big @group commands, which - % almost-but-not-quite fill up a page, TeX will have a hard time doing - % good page breaking, for example.) However, I could not construct an - % example where a page broke at this \penalty; if it happens in a real - % document, then we can reconsider our strategy. - \penalty9999 - % - % Back up by the size of the box, whether we did a page break or not. - \kern -#1\mil - % - % Do not allow a page break right after this kern. - \nobreak - \fi -} - -% @br forces paragraph break (and is undocumented). - -\let\br = \par - -% @page forces the start of a new page. -% -\def\page{\par\vfill\supereject} - -% @exdent text.... -% outputs text on separate line in roman font, starting at standard page margin - -% This records the amount of indent in the innermost environment. -% That's how much \exdent should take out. -\newskip\exdentamount - -% This defn is used inside fill environments such as @defun. -\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} - -% This defn is used inside nofill environments such as @example. -\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount - \leftline{\hskip\leftskip{\rm#1}}}} - -% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current -% paragraph. For more general purposes, use the \margin insertion -% class. WHICH is `l' or `r'. -% -\newskip\inmarginspacing \inmarginspacing=1cm -\def\strutdepth{\dp\strutbox} -% -\def\doinmargin#1#2{\strut\vadjust{% - \nobreak - \kern-\strutdepth - \vtop to \strutdepth{% - \baselineskip=\strutdepth - \vss - % if you have multiple lines of stuff to put here, you'll need to - % make the vbox yourself of the appropriate size. - \ifx#1l% - \llap{\ignorespaces #2\hskip\inmarginspacing}% - \else - \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% - \fi - \null - }% -}} -\def\inleftmargin{\doinmargin l} -\def\inrightmargin{\doinmargin r} -% -% @inmargin{TEXT [, RIGHT-TEXT]} -% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; -% else use TEXT for both). -% -\def\inmargin#1{\parseinmargin #1,,\finish} -\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \def\lefttext{#1}% have both texts - \def\righttext{#2}% - \else - \def\lefttext{#1}% have only one text - \def\righttext{#1}% - \fi - % - \ifodd\pageno - \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin - \else - \def\temp{\inleftmargin\lefttext}% - \fi - \temp -} - -% @include FILE -- \input text of FILE. -% -\def\include{\parseargusing\filenamecatcodes\includezzz} -\def\includezzz#1{% - \pushthisfilestack - \def\thisfile{#1}% - {% - \makevalueexpandable % we want to expand any @value in FILE. - \turnoffactive % and allow special characters in the expansion - \indexnofonts % Allow `@@' and other weird things in file names. - \edef\temp{\noexpand\input #1 }% - % - % This trickery is to read FILE outside of a group, in case it makes - % definitions, etc. - \expandafter - }\temp - \popthisfilestack -} -\def\filenamecatcodes{% - \catcode`\\=\other - \catcode`~=\other - \catcode`^=\other - \catcode`_=\other - \catcode`|=\other - \catcode`<=\other - \catcode`>=\other - \catcode`+=\other - \catcode`-=\other - \catcode`\`=\other - \catcode`\'=\other -} - -\def\pushthisfilestack{% - \expandafter\pushthisfilestackX\popthisfilestack\StackTerm -} -\def\pushthisfilestackX{% - \expandafter\pushthisfilestackY\thisfile\StackTerm -} -\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% - \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% -} - -\def\popthisfilestack{\errthisfilestackempty} -\def\errthisfilestackempty{\errmessage{Internal error: - the stack of filenames is empty.}} - -\def\thisfile{} - -% @center line -% outputs that line, centered. -% -\parseargdef\center{% - \ifhmode - \let\next\centerH - \else - \let\next\centerV - \fi - \next{\hfil \ignorespaces#1\unskip \hfil}% -} -\def\centerH#1{% - {% - \hfil\break - \advance\hsize by -\leftskip - \advance\hsize by -\rightskip - \line{#1}% - \break - }% -} -\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} - -% @sp n outputs n lines of vertical space - -\parseargdef\sp{\vskip #1\baselineskip} - -% @comment ...line which is ignored... -% @c is the same as @comment -% @ignore ... @end ignore is another way to write a comment - -\def\comment{\begingroup \catcode`\^^M=\other% -\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% -\commentxxx} -{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} - -\let\c=\comment - -% @paragraphindent NCHARS -% We'll use ems for NCHARS, close enough. -% NCHARS can also be the word `asis' or `none'. -% We cannot feasibly implement @paragraphindent asis, though. -% -\def\asisword{asis} % no translation, these are keywords -\def\noneword{none} -% -\parseargdef\paragraphindent{% - \def\temp{#1}% - \ifx\temp\asisword - \else - \ifx\temp\noneword - \defaultparindent = 0pt - \else - \defaultparindent = #1em - \fi - \fi - \parindent = \defaultparindent -} - -% @exampleindent NCHARS -% We'll use ems for NCHARS like @paragraphindent. -% It seems @exampleindent asis isn't necessary, but -% I preserve it to make it similar to @paragraphindent. -\parseargdef\exampleindent{% - \def\temp{#1}% - \ifx\temp\asisword - \else - \ifx\temp\noneword - \lispnarrowing = 0pt - \else - \lispnarrowing = #1em - \fi - \fi -} - -% @firstparagraphindent WORD -% If WORD is `none', then suppress indentation of the first paragraph -% after a section heading. If WORD is `insert', then do indent at such -% paragraphs. -% -% The paragraph indentation is suppressed or not by calling -% \suppressfirstparagraphindent, which the sectioning commands do. -% We switch the definition of this back and forth according to WORD. -% By default, we suppress indentation. -% -\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} -\def\insertword{insert} -% -\parseargdef\firstparagraphindent{% - \def\temp{#1}% - \ifx\temp\noneword - \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent - \else\ifx\temp\insertword - \let\suppressfirstparagraphindent = \relax - \else - \errhelp = \EMsimple - \errmessage{Unknown @firstparagraphindent option `\temp'}% - \fi\fi -} - -% Here is how we actually suppress indentation. Redefine \everypar to -% \kern backwards by \parindent, and then reset itself to empty. -% -% We also make \indent itself not actually do anything until the next -% paragraph. -% -\gdef\dosuppressfirstparagraphindent{% - \gdef\indent{% - \restorefirstparagraphindent - \indent - }% - \gdef\noindent{% - \restorefirstparagraphindent - \noindent - }% - \global\everypar = {% - \kern -\parindent - \restorefirstparagraphindent - }% -} - -\gdef\restorefirstparagraphindent{% - \global \let \indent = \ptexindent - \global \let \noindent = \ptexnoindent - \global \everypar = {}% -} - - -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math outputs its argument in math mode. -% -% One complication: _ usually means subscripts, but it could also mean -% an actual _ character, as in @math{@var{some_variable} + 1}. So make -% _ active, and distinguish by seeing if the current family is \slfam, -% which is what @var uses. -{ - \catcode`\_ = \active - \gdef\mathunderscore{% - \catcode`\_=\active - \def_{\ifnum\fam=\slfam \_\else\sb\fi}% - } -} -% Another complication: we want \\ (and @\) to output a \ character. -% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -% this is not advertised and we don't care. Texinfo does not -% otherwise define @\. -% -% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -% -\def\math{% - \tex - \mathunderscore - \let\\ = \mathbackslash - \mathactive - % make the texinfo accent commands work in math mode - \let\"=\ddot - \let\'=\acute - \let\==\bar - \let\^=\hat - \let\`=\grave - \let\u=\breve - \let\v=\check - \let\~=\tilde - \let\dotaccent=\dot - $\finishmath -} -\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. - -% Some active characters (such as <) are spaced differently in math. -% We have to reset their definitions in case the @math was an argument -% to a command which sets the catcodes (such as @item or @section). -% -{ - \catcode`^ = \active - \catcode`< = \active - \catcode`> = \active - \catcode`+ = \active - \catcode`' = \active - \gdef\mathactive{% - \let^ = \ptexhat - \let< = \ptexless - \let> = \ptexgtr - \let+ = \ptexplus - \let' = \ptexquoteright - } -} - -% Some math mode symbols. -\def\bullet{$\ptexbullet$} -\def\geq{\ifmmode \ge\else $\ge$\fi} -\def\leq{\ifmmode \le\else $\le$\fi} -\def\minus{\ifmmode -\else $-$\fi} - -% @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in the cm -% typewriter fonts as three actual period characters; on the other hand, -% in other typewriter fonts three periods are wider than 1.5em. So do -% whichever is larger. -% -\def\dots{% - \leavevmode - \setbox0=\hbox{...}% get width of three periods - \ifdim\wd0 > 1.5em - \dimen0 = \wd0 - \else - \dimen0 = 1.5em - \fi - \hbox to \dimen0{% - \hskip 0pt plus.25fil - .\hskip 0pt plus1fil - .\hskip 0pt plus1fil - .\hskip 0pt plus.5fil - }% -} - -% @enddots{} is an end-of-sentence ellipsis. -% -\def\enddots{% - \dots - \spacefactor=\endofsentencespacefactor -} - -% @comma{} is so commas can be inserted into text without messing up -% Texinfo's parsing. -% -\let\comma = , - -% @refill is a no-op. -\let\refill=\relax - -% If working on a large document in chapters, it is convenient to -% be able to disable indexing, cross-referencing, and contents, for test runs. -% This is done with @novalidate (before @setfilename). -% -\newif\iflinks \linkstrue % by default we want the aux files. -\let\novalidate = \linksfalse - -% @setfilename is done at the beginning of every texinfo file. -% So open here the files we need to have open while reading the input. -% This makes it possible to make a .fmt file for texinfo. -\def\setfilename{% - \fixbackslash % Turn off hack to swallow `\input texinfo'. - \iflinks - \tryauxfile - % Open the new aux file. TeX will close it automatically at exit. - \immediate\openout\auxfile=\jobname.aux - \fi % \openindices needs to do some work in any case. - \openindices - \let\setfilename=\comment % Ignore extra @setfilename cmds. - % - % If texinfo.cnf is present on the system, read it. - % Useful for site-wide @afourpaper, etc. - \openin 1 texinfo.cnf - \ifeof 1 \else \input texinfo.cnf \fi - \closein 1 - % - \comment % Ignore the actual filename. -} - -% Called from \setfilename. -% -\def\openindices{% - \newindex{cp}% - \newcodeindex{fn}% - \newcodeindex{vr}% - \newcodeindex{tp}% - \newcodeindex{ky}% - \newcodeindex{pg}% -} - -% @bye. -\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} - - -\message{pdf,} -% adobe `portable' document format -\newcount\tempnum -\newcount\lnkcount -\newtoks\filename -\newcount\filenamelength -\newcount\pgn -\newtoks\toksA -\newtoks\toksB -\newtoks\toksC -\newtoks\toksD -\newbox\boxA -\newcount\countA -\newif\ifpdf -\newif\ifpdfmakepagedest - -% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -% can be set). So we test for \relax and 0 as well as \undefined, -% borrowed from ifpdf.sty. -\ifx\pdfoutput\undefined -\else - \ifx\pdfoutput\relax - \else - \ifcase\pdfoutput - \else - \pdftrue - \fi - \fi -\fi - -% PDF uses PostScript string constants for the names of xref targets, -% for display in the outlines, and in other places. Thus, we have to -% double any backslashes. Otherwise, a name like "\node" will be -% interpreted as a newline (\n), followed by o, d, e. Not good. -% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html -% (and related messages, the final outcome is that it is up to the TeX -% user to double the backslashes and otherwise make the string valid, so -% that's what we do). - -% double active backslashes. -% -{\catcode`\@=0 \catcode`\\=\active - @gdef@activebackslashdouble{% - @catcode`@\=@active - @let\=@doublebackslash} -} - -% To handle parens, we must adopt a different approach, since parens are -% not active characters. hyperref.dtx (which has the same problem as -% us) handles it with this amazing macro to replace tokens, with minor -% changes for Texinfo. It is included here under the GPL by permission -% from the author, Heiko Oberdiek. -% -% #1 is the tokens to replace. -% #2 is the replacement. -% #3 is the control sequence with the string. -% -\def\HyPsdSubst#1#2#3{% - \def\HyPsdReplace##1#1##2\END{% - ##1% - \ifx\\##2\\% - \else - #2% - \HyReturnAfterFi{% - \HyPsdReplace##2\END - }% - \fi - }% - \xdef#3{\expandafter\HyPsdReplace#3#1\END}% -} -\long\def\HyReturnAfterFi#1\fi{\fi#1} - -% #1 is a control sequence in which to do the replacements. -\def\backslashparens#1{% - \xdef#1{#1}% redefine it as its expansion; the definition is simply - % \lastnode when called from \setref -> \pdfmkdest. - \HyPsdSubst{(}{\realbackslash(}{#1}% - \HyPsdSubst{)}{\realbackslash)}{#1}% -} - -\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images -with PDF output, and none of those formats could be found. (.eps cannot -be supported due to the design of the PDF format; use regular TeX (DVI -output) for that.)} - -\ifpdf - % - % Color manipulation macros based on pdfcolor.tex, - % except using rgb instead of cmyk; the latter is said to render as a - % very dark gray on-screen and a very dark halftone in print, instead - % of actual black. - \def\rgbDarkRed{0.50 0.09 0.12} - \def\rgbBlack{0 0 0} - % - % k sets the color for filling (usual text, etc.); - % K sets the color for stroking (thin rules, e.g., normal _'s). - \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} - % - % Set color, and create a mark which defines \thiscolor accordingly, - % so that \makeheadline knows which color to restore. - \def\setcolor#1{% - \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% - \domark - \pdfsetcolor{#1}% - } - % - \def\maincolor{\rgbBlack} - \pdfsetcolor{\maincolor} - \edef\thiscolor{\maincolor} - \def\lastcolordefs{} - % - \def\makefootline{% - \baselineskip24pt - \line{\pdfsetcolor{\maincolor}\the\footline}% - } - % - \def\makeheadline{% - \vbox to 0pt{% - \vskip-22.5pt - \line{% - \vbox to8.5pt{}% - % Extract \thiscolor definition from the marks. - \getcolormarks - % Typeset the headline with \maincolor, then restore the color. - \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% - }% - \vss - }% - \nointerlineskip - } - % - % - \pdfcatalog{/PageMode /UseOutlines} - % - % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). - \def\dopdfimage#1#2#3{% - \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% - \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% - % - % pdftex (and the PDF format) support .png, .jpg, .pdf (among - % others). Let's try in that order. - \let\pdfimgext=\empty - \begingroup - \openin 1 #1.png \ifeof 1 - \openin 1 #1.jpg \ifeof 1 - \openin 1 #1.jpeg \ifeof 1 - \openin 1 #1.JPG \ifeof 1 - \openin 1 #1.pdf \ifeof 1 - \openin 1 #1.PDF \ifeof 1 - \errhelp = \nopdfimagehelp - \errmessage{Could not find image file #1 for pdf}% - \else \gdef\pdfimgext{PDF}% - \fi - \else \gdef\pdfimgext{pdf}% - \fi - \else \gdef\pdfimgext{JPG}% - \fi - \else \gdef\pdfimgext{jpeg}% - \fi - \else \gdef\pdfimgext{jpg}% - \fi - \else \gdef\pdfimgext{png}% - \fi - \closein 1 - \endgroup - % - % without \immediate, ancient pdftex seg faults when the same image is - % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) - \ifnum\pdftexversion < 14 - \immediate\pdfimage - \else - \immediate\pdfximage - \fi - \ifdim \wd0 >0pt width \imagewidth \fi - \ifdim \wd2 >0pt height \imageheight \fi - \ifnum\pdftexversion<13 - #1.\pdfimgext - \else - {#1.\pdfimgext}% - \fi - \ifnum\pdftexversion < 14 \else - \pdfrefximage \pdflastximage - \fi} - % - \def\pdfmkdest#1{{% - % We have to set dummies so commands such as @code, and characters - % such as \, aren't expanded when present in a section title. - \indexnofonts - \turnoffactive - \activebackslashdouble - \makevalueexpandable - \def\pdfdestname{#1}% - \backslashparens\pdfdestname - \safewhatsit{\pdfdest name{\pdfdestname} xyz}% - }} - % - % used to mark target names; must be expandable. - \def\pdfmkpgn#1{#1} - % - % by default, use a color that is dark enough to print on paper as - % nearly black, but still distinguishable for online viewing. - \def\urlcolor{\rgbDarkRed} - \def\linkcolor{\rgbDarkRed} - \def\endlink{\setcolor{\maincolor}\pdfendlink} - % - % Adding outlines to PDF; macros for calculating structure of outlines - % come from Petr Olsak - \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% - \else \csname#1\endcsname \fi} - \def\advancenumber#1{\tempnum=\expnumber{#1}\relax - \advance\tempnum by 1 - \expandafter\xdef\csname#1\endcsname{\the\tempnum}} - % - % #1 is the section text, which is what will be displayed in the - % outline by the pdf viewer. #2 is the pdf expression for the number - % of subentries (or empty, for subsubsections). #3 is the node text, - % which might be empty if this toc entry had no corresponding node. - % #4 is the page number - % - \def\dopdfoutline#1#2#3#4{% - % Generate a link to the node text if that exists; else, use the - % page number. We could generate a destination for the section - % text in the case where a section has no node, but it doesn't - % seem worth the trouble, since most documents are normally structured. - \def\pdfoutlinedest{#3}% - \ifx\pdfoutlinedest\empty - \def\pdfoutlinedest{#4}% - \else - % Doubled backslashes in the name. - {\activebackslashdouble \xdef\pdfoutlinedest{#3}% - \backslashparens\pdfoutlinedest}% - \fi - % - % Also double the backslashes in the display string. - {\activebackslashdouble \xdef\pdfoutlinetext{#1}% - \backslashparens\pdfoutlinetext}% - % - \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% - } - % - \def\pdfmakeoutlines{% - \begingroup - % Thanh's hack / proper braces in bookmarks - \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace - \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace - % - % Read toc silently, to get counts of subentries for \pdfoutline. - \def\numchapentry##1##2##3##4{% - \def\thischapnum{##2}% - \def\thissecnum{0}% - \def\thissubsecnum{0}% - }% - \def\numsecentry##1##2##3##4{% - \advancenumber{chap\thischapnum}% - \def\thissecnum{##2}% - \def\thissubsecnum{0}% - }% - \def\numsubsecentry##1##2##3##4{% - \advancenumber{sec\thissecnum}% - \def\thissubsecnum{##2}% - }% - \def\numsubsubsecentry##1##2##3##4{% - \advancenumber{subsec\thissubsecnum}% - }% - \def\thischapnum{0}% - \def\thissecnum{0}% - \def\thissubsecnum{0}% - % - % use \def rather than \let here because we redefine \chapentry et - % al. a second time, below. - \def\appentry{\numchapentry}% - \def\appsecentry{\numsecentry}% - \def\appsubsecentry{\numsubsecentry}% - \def\appsubsubsecentry{\numsubsubsecentry}% - \def\unnchapentry{\numchapentry}% - \def\unnsecentry{\numsecentry}% - \def\unnsubsecentry{\numsubsecentry}% - \def\unnsubsubsecentry{\numsubsubsecentry}% - \readdatafile{toc}% - % - % Read toc second time, this time actually producing the outlines. - % The `-' means take the \expnumber as the absolute number of - % subentries, which we calculated on our first read of the .toc above. - % - % We use the node names as the destinations. - \def\numchapentry##1##2##3##4{% - \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% - \def\numsecentry##1##2##3##4{% - \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% - \def\numsubsecentry##1##2##3##4{% - \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% - \def\numsubsubsecentry##1##2##3##4{% count is always zero - \dopdfoutline{##1}{}{##3}{##4}}% - % - % PDF outlines are displayed using system fonts, instead of - % document fonts. Therefore we cannot use special characters, - % since the encoding is unknown. For example, the eogonek from - % Latin 2 (0xea) gets translated to a | character. Info from - % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. - % - % xx to do this right, we have to translate 8-bit characters to - % their "best" equivalent, based on the @documentencoding. Right - % now, I guess we'll just let the pdf reader have its way. - \indexnofonts - \setupdatafile - \catcode`\\=\active \otherbackslash - \input \tocreadfilename - \endgroup - } - % - \def\skipspaces#1{\def\PP{#1}\def\D{|}% - \ifx\PP\D\let\nextsp\relax - \else\let\nextsp\skipspaces - \ifx\p\space\else\addtokens{\filename}{\PP}% - \advance\filenamelength by 1 - \fi - \fi - \nextsp} - \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} - \ifnum\pdftexversion < 14 - \let \startlink \pdfannotlink - \else - \let \startlink \pdfstartlink - \fi - % make a live url in pdf output. - \def\pdfurl#1{% - \begingroup - % it seems we really need yet another set of dummies; have not - % tried to figure out what each command should do in the context - % of @url. for now, just make @/ a no-op, that's the only one - % people have actually reported a problem with. - % - \normalturnoffactive - \def\@{@}% - \let\/=\empty - \makevalueexpandable - % do we want to go so far as to use \indexnofonts instead of just - % special-casing \var here? - \def\var##1{##1}% - % - \leavevmode\setcolor{\urlcolor}% - \startlink attr{/Border [0 0 0]}% - user{/Subtype /Link /A << /S /URI /URI (#1) >>}% - \endgroup} - \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} - \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} - \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} - \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} - \def\maketoks{% - \expandafter\poptoks\the\toksA|ENDTOKS|\relax - \ifx\first0\adn0 - \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 - \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 - \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 - \else - \ifnum0=\countA\else\makelink\fi - \ifx\first.\let\next=\done\else - \let\next=\maketoks - \addtokens{\toksB}{\the\toksD} - \ifx\first,\addtokens{\toksB}{\space}\fi - \fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \next} - \def\makelink{\addtokens{\toksB}% - {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} - \def\pdflink#1{% - \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \setcolor{\linkcolor}#1\endlink} - \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} -\else - % non-pdf mode - \let\pdfmkdest = \gobble - \let\pdfurl = \gobble - \let\endlink = \relax - \let\setcolor = \gobble - \let\pdfsetcolor = \gobble - \let\pdfmakeoutlines = \relax -\fi % \ifx\pdfoutput - - -\message{fonts,} - -% Change the current font style to #1, remembering it in \curfontstyle. -% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in -% italics, not bold italics. -% -\def\setfontstyle#1{% - \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. - \csname ten#1\endcsname % change the current font -} - -% Select #1 fonts with the current style. -% -\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} - -\def\rm{\fam=0 \setfontstyle{rm}} -\def\it{\fam=\itfam \setfontstyle{it}} -\def\sl{\fam=\slfam \setfontstyle{sl}} -\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} -\def\tt{\fam=\ttfam \setfontstyle{tt}} - -% Unfortunately, we have to override this for titles and the like, since -% in those cases "rm" is bold. Sigh. -\def\rmisbold{\rm\def\curfontstyle{bf}} - -% Texinfo sort of supports the sans serif font style, which plain TeX does not. -% So we set up a \sf. -\newfam\sffam -\def\sf{\fam=\sffam \setfontstyle{sf}} -\let\li = \sf % Sometimes we call it \li, not \sf. - -% We don't need math for this font style. -\def\ttsl{\setfontstyle{ttsl}} - - -% Default leading. -\newdimen\textleading \textleading = 13.2pt - -% Set the baselineskip to #1, and the lineskip and strut size -% correspondingly. There is no deep meaning behind these magic numbers -% used as factors; they just match (closely enough) what Knuth defined. -% -\def\lineskipfactor{.08333} -\def\strutheightpercent{.70833} -\def\strutdepthpercent {.29167} -% -% can get a sort of poor man's double spacing by redefining this. -\def\baselinefactor{1} -% -\def\setleading#1{% - \dimen0 = #1\relax - \normalbaselineskip = \baselinefactor\dimen0 - \normallineskip = \lineskipfactor\normalbaselineskip - \normalbaselines - \setbox\strutbox =\hbox{% - \vrule width0pt height\strutheightpercent\baselineskip - depth \strutdepthpercent \baselineskip - }% -} - -% PDF CMaps. See also LaTeX's t1.cmap. -% -% do nothing with this by default. -\expandafter\let\csname cmapOT1\endcsname\gobble -\expandafter\let\csname cmapOT1IT\endcsname\gobble -\expandafter\let\csname cmapOT1TT\endcsname\gobble - -% if we are producing pdf, and we have \pdffontattr, then define cmaps. -% (\pdffontattr was introduced many years ago, but people still run -% older pdftex's; it's easy to conditionalize, so we do.) -\ifpdf \ifx\pdffontattr\undefined \else - \begingroup - \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. - \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap -%%DocumentNeededResources: ProcSet (CIDInit) -%%IncludeResource: ProcSet (CIDInit) -%%BeginResource: CMap (TeX-OT1-0) -%%Title: (TeX-OT1-0 TeX OT1 0) -%%Version: 1.000 -%%EndComments -/CIDInit /ProcSet findresource begin -12 dict begin -begincmap -/CIDSystemInfo -<< /Registry (TeX) -/Ordering (OT1) -/Supplement 0 ->> def -/CMapName /TeX-OT1-0 def -/CMapType 2 def -1 begincodespacerange -<00> <7F> -endcodespacerange -8 beginbfrange -<00> <01> <0393> -<09> <0A> <03A8> -<23> <26> <0023> -<28> <3B> <0028> -<3F> <5B> <003F> -<5D> <5E> <005D> -<61> <7A> <0061> -<7B> <7C> <2013> -endbfrange -40 beginbfchar -<02> <0398> -<03> <039B> -<04> <039E> -<05> <03A0> -<06> <03A3> -<07> <03D2> -<08> <03A6> -<0B> <00660066> -<0C> <00660069> -<0D> <0066006C> -<0E> <006600660069> -<0F> <00660066006C> -<10> <0131> -<11> <0237> -<12> <0060> -<13> <00B4> -<14> <02C7> -<15> <02D8> -<16> <00AF> -<17> <02DA> -<18> <00B8> -<19> <00DF> -<1A> <00E6> -<1B> <0153> -<1C> <00F8> -<1D> <00C6> -<1E> <0152> -<1F> <00D8> -<21> <0021> -<22> <201D> -<27> <2019> -<3C> <00A1> -<3D> <003D> -<3E> <00BF> -<5C> <201C> -<5F> <02D9> -<60> <2018> -<7D> <02DD> -<7E> <007E> -<7F> <00A8> -endbfchar -endcmap -CMapName currentdict /CMap defineresource pop -end -end -%%EndResource -%%EOF - }\endgroup - \expandafter\edef\csname cmapOT1\endcsname#1{% - \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% - }% -% -% \cmapOT1IT - \begingroup - \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. - \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap -%%DocumentNeededResources: ProcSet (CIDInit) -%%IncludeResource: ProcSet (CIDInit) -%%BeginResource: CMap (TeX-OT1IT-0) -%%Title: (TeX-OT1IT-0 TeX OT1IT 0) -%%Version: 1.000 -%%EndComments -/CIDInit /ProcSet findresource begin -12 dict begin -begincmap -/CIDSystemInfo -<< /Registry (TeX) -/Ordering (OT1IT) -/Supplement 0 ->> def -/CMapName /TeX-OT1IT-0 def -/CMapType 2 def -1 begincodespacerange -<00> <7F> -endcodespacerange -8 beginbfrange -<00> <01> <0393> -<09> <0A> <03A8> -<25> <26> <0025> -<28> <3B> <0028> -<3F> <5B> <003F> -<5D> <5E> <005D> -<61> <7A> <0061> -<7B> <7C> <2013> -endbfrange -42 beginbfchar -<02> <0398> -<03> <039B> -<04> <039E> -<05> <03A0> -<06> <03A3> -<07> <03D2> -<08> <03A6> -<0B> <00660066> -<0C> <00660069> -<0D> <0066006C> -<0E> <006600660069> -<0F> <00660066006C> -<10> <0131> -<11> <0237> -<12> <0060> -<13> <00B4> -<14> <02C7> -<15> <02D8> -<16> <00AF> -<17> <02DA> -<18> <00B8> -<19> <00DF> -<1A> <00E6> -<1B> <0153> -<1C> <00F8> -<1D> <00C6> -<1E> <0152> -<1F> <00D8> -<21> <0021> -<22> <201D> -<23> <0023> -<24> <00A3> -<27> <2019> -<3C> <00A1> -<3D> <003D> -<3E> <00BF> -<5C> <201C> -<5F> <02D9> -<60> <2018> -<7D> <02DD> -<7E> <007E> -<7F> <00A8> -endbfchar -endcmap -CMapName currentdict /CMap defineresource pop -end -end -%%EndResource -%%EOF - }\endgroup - \expandafter\edef\csname cmapOT1IT\endcsname#1{% - \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% - }% -% -% \cmapOT1TT - \begingroup - \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. - \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap -%%DocumentNeededResources: ProcSet (CIDInit) -%%IncludeResource: ProcSet (CIDInit) -%%BeginResource: CMap (TeX-OT1TT-0) -%%Title: (TeX-OT1TT-0 TeX OT1TT 0) -%%Version: 1.000 -%%EndComments -/CIDInit /ProcSet findresource begin -12 dict begin -begincmap -/CIDSystemInfo -<< /Registry (TeX) -/Ordering (OT1TT) -/Supplement 0 ->> def -/CMapName /TeX-OT1TT-0 def -/CMapType 2 def -1 begincodespacerange -<00> <7F> -endcodespacerange -5 beginbfrange -<00> <01> <0393> -<09> <0A> <03A8> -<21> <26> <0021> -<28> <5F> <0028> -<61> <7E> <0061> -endbfrange -32 beginbfchar -<02> <0398> -<03> <039B> -<04> <039E> -<05> <03A0> -<06> <03A3> -<07> <03D2> -<08> <03A6> -<0B> <2191> -<0C> <2193> -<0D> <0027> -<0E> <00A1> -<0F> <00BF> -<10> <0131> -<11> <0237> -<12> <0060> -<13> <00B4> -<14> <02C7> -<15> <02D8> -<16> <00AF> -<17> <02DA> -<18> <00B8> -<19> <00DF> -<1A> <00E6> -<1B> <0153> -<1C> <00F8> -<1D> <00C6> -<1E> <0152> -<1F> <00D8> -<20> <2423> -<27> <2019> -<60> <2018> -<7F> <00A8> -endbfchar -endcmap -CMapName currentdict /CMap defineresource pop -end -end -%%EndResource -%%EOF - }\endgroup - \expandafter\edef\csname cmapOT1TT\endcsname#1{% - \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% - }% -\fi\fi - - -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). -% #3 is the font's design size, #4 is a scale factor, #5 is the CMap -% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass -% empty to omit). -\def\setfont#1#2#3#4#5{% - \font#1=\fontprefix#2#3 scaled #4 - \csname cmap#5\endcsname#1% -} -% This is what gets called when #5 of \setfont is empty. -\let\cmap\gobble -% emacs-page end of cmaps - -% Use cm as the default font prefix. -% To specify the font prefix, you must define \fontprefix -% before you read in texinfo.tex. -\ifx\fontprefix\undefined -\def\fontprefix{cm} -\fi -% Support font families that don't use the same naming scheme as CM. -\def\rmshape{r} -\def\rmbshape{bx} %where the normal face is bold -\def\bfshape{b} -\def\bxshape{bx} -\def\ttshape{tt} -\def\ttbshape{tt} -\def\ttslshape{sltt} -\def\itshape{ti} -\def\itbshape{bxti} -\def\slshape{sl} -\def\slbshape{bxsl} -\def\sfshape{ss} -\def\sfbshape{ss} -\def\scshape{csc} -\def\scbshape{csc} - -% Definitions for a main text size of 11pt. This is the default in -% Texinfo. -% -\def\definetextfontsizexi{% -% Text fonts (11.2pt, magstep1). -\def\textnominalsize{11pt} -\edef\mainmagstep{\magstephalf} -\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} -\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} -\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} -\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} -\setfont\textsl\slshape{10}{\mainmagstep}{OT1} -\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} -\setfont\textsc\scshape{10}{\mainmagstep}{OT1} -\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} -\font\texti=cmmi10 scaled \mainmagstep -\font\textsy=cmsy10 scaled \mainmagstep -\def\textecsize{1095} - -% A few fonts for @defun names and args. -\setfont\defbf\bfshape{10}{\magstep1}{OT1} -\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} -\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} - -% Fonts for indices, footnotes, small examples (9pt). -\def\smallnominalsize{9pt} -\setfont\smallrm\rmshape{9}{1000}{OT1} -\setfont\smalltt\ttshape{9}{1000}{OT1TT} -\setfont\smallbf\bfshape{10}{900}{OT1} -\setfont\smallit\itshape{9}{1000}{OT1IT} -\setfont\smallsl\slshape{9}{1000}{OT1} -\setfont\smallsf\sfshape{9}{1000}{OT1} -\setfont\smallsc\scshape{10}{900}{OT1} -\setfont\smallttsl\ttslshape{10}{900}{OT1TT} -\font\smalli=cmmi9 -\font\smallsy=cmsy9 -\def\smallecsize{0900} - -% Fonts for small examples (8pt). -\def\smallernominalsize{8pt} -\setfont\smallerrm\rmshape{8}{1000}{OT1} -\setfont\smallertt\ttshape{8}{1000}{OT1TT} -\setfont\smallerbf\bfshape{10}{800}{OT1} -\setfont\smallerit\itshape{8}{1000}{OT1IT} -\setfont\smallersl\slshape{8}{1000}{OT1} -\setfont\smallersf\sfshape{8}{1000}{OT1} -\setfont\smallersc\scshape{10}{800}{OT1} -\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} -\font\smalleri=cmmi8 -\font\smallersy=cmsy8 -\def\smallerecsize{0800} - -% Fonts for title page (20.4pt): -\def\titlenominalsize{20pt} -\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} -\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} -\setfont\titlesl\slbshape{10}{\magstep4}{OT1} -\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} -\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} -\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} -\let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4}{OT1} -\font\titlei=cmmi12 scaled \magstep3 -\font\titlesy=cmsy10 scaled \magstep4 -\def\titleecsize{2074} - -% Chapter (and unnumbered) fonts (17.28pt). -\def\chapnominalsize{17pt} -\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} -\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} -\setfont\chapsl\slbshape{10}{\magstep3}{OT1} -\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} -\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} -\setfont\chapsf\sfbshape{17}{1000}{OT1} -\let\chapbf=\chaprm -\setfont\chapsc\scbshape{10}{\magstep3}{OT1} -\font\chapi=cmmi12 scaled \magstep2 -\font\chapsy=cmsy10 scaled \magstep3 -\def\chapecsize{1728} - -% Section fonts (14.4pt). -\def\secnominalsize{14pt} -\setfont\secrm\rmbshape{12}{\magstep1}{OT1} -\setfont\secit\itbshape{10}{\magstep2}{OT1IT} -\setfont\secsl\slbshape{10}{\magstep2}{OT1} -\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} -\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} -\setfont\secsf\sfbshape{12}{\magstep1}{OT1} -\let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep2}{OT1} -\font\seci=cmmi12 scaled \magstep1 -\font\secsy=cmsy10 scaled \magstep2 -\def\sececsize{1440} - -% Subsection fonts (13.15pt). -\def\ssecnominalsize{13pt} -\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} -\setfont\ssecit\itbshape{10}{1315}{OT1IT} -\setfont\ssecsl\slbshape{10}{1315}{OT1} -\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} -\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} -\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} -\let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{1315}{OT1} -\font\sseci=cmmi12 scaled \magstephalf -\font\ssecsy=cmsy10 scaled 1315 -\def\ssececsize{1200} - -% Reduced fonts for @acro in text (10pt). -\def\reducednominalsize{10pt} -\setfont\reducedrm\rmshape{10}{1000}{OT1} -\setfont\reducedtt\ttshape{10}{1000}{OT1TT} -\setfont\reducedbf\bfshape{10}{1000}{OT1} -\setfont\reducedit\itshape{10}{1000}{OT1IT} -\setfont\reducedsl\slshape{10}{1000}{OT1} -\setfont\reducedsf\sfshape{10}{1000}{OT1} -\setfont\reducedsc\scshape{10}{1000}{OT1} -\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} -\font\reducedi=cmmi10 -\font\reducedsy=cmsy10 -\def\reducedecsize{1000} - -% reset the current fonts -\textfonts -\rm -} % end of 11pt text font size definitions - - -% Definitions to make the main text be 10pt Computer Modern, with -% section, chapter, etc., sizes following suit. This is for the GNU -% Press printing of the Emacs 22 manual. Maybe other manuals in the -% future. Used with @smallbook, which sets the leading to 12pt. -% -\def\definetextfontsizex{% -% Text fonts (10pt). -\def\textnominalsize{10pt} -\edef\mainmagstep{1000} -\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} -\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} -\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} -\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} -\setfont\textsl\slshape{10}{\mainmagstep}{OT1} -\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} -\setfont\textsc\scshape{10}{\mainmagstep}{OT1} -\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} -\font\texti=cmmi10 scaled \mainmagstep -\font\textsy=cmsy10 scaled \mainmagstep -\def\textecsize{1000} - -% A few fonts for @defun names and args. -\setfont\defbf\bfshape{10}{\magstephalf}{OT1} -\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} -\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} - -% Fonts for indices, footnotes, small examples (9pt). -\def\smallnominalsize{9pt} -\setfont\smallrm\rmshape{9}{1000}{OT1} -\setfont\smalltt\ttshape{9}{1000}{OT1TT} -\setfont\smallbf\bfshape{10}{900}{OT1} -\setfont\smallit\itshape{9}{1000}{OT1IT} -\setfont\smallsl\slshape{9}{1000}{OT1} -\setfont\smallsf\sfshape{9}{1000}{OT1} -\setfont\smallsc\scshape{10}{900}{OT1} -\setfont\smallttsl\ttslshape{10}{900}{OT1TT} -\font\smalli=cmmi9 -\font\smallsy=cmsy9 -\def\smallecsize{0900} - -% Fonts for small examples (8pt). -\def\smallernominalsize{8pt} -\setfont\smallerrm\rmshape{8}{1000}{OT1} -\setfont\smallertt\ttshape{8}{1000}{OT1TT} -\setfont\smallerbf\bfshape{10}{800}{OT1} -\setfont\smallerit\itshape{8}{1000}{OT1IT} -\setfont\smallersl\slshape{8}{1000}{OT1} -\setfont\smallersf\sfshape{8}{1000}{OT1} -\setfont\smallersc\scshape{10}{800}{OT1} -\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} -\font\smalleri=cmmi8 -\font\smallersy=cmsy8 -\def\smallerecsize{0800} - -% Fonts for title page (20.4pt): -\def\titlenominalsize{20pt} -\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} -\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} -\setfont\titlesl\slbshape{10}{\magstep4}{OT1} -\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} -\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} -\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} -\let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4}{OT1} -\font\titlei=cmmi12 scaled \magstep3 -\font\titlesy=cmsy10 scaled \magstep4 -\def\titleecsize{2074} - -% Chapter fonts (14.4pt). -\def\chapnominalsize{14pt} -\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} -\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} -\setfont\chapsl\slbshape{10}{\magstep2}{OT1} -\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} -\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} -\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} -\let\chapbf\chaprm -\setfont\chapsc\scbshape{10}{\magstep2}{OT1} -\font\chapi=cmmi12 scaled \magstep1 -\font\chapsy=cmsy10 scaled \magstep2 -\def\chapecsize{1440} - -% Section fonts (12pt). -\def\secnominalsize{12pt} -\setfont\secrm\rmbshape{12}{1000}{OT1} -\setfont\secit\itbshape{10}{\magstep1}{OT1IT} -\setfont\secsl\slbshape{10}{\magstep1}{OT1} -\setfont\sectt\ttbshape{12}{1000}{OT1TT} -\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} -\setfont\secsf\sfbshape{12}{1000}{OT1} -\let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep1}{OT1} -\font\seci=cmmi12 -\font\secsy=cmsy10 scaled \magstep1 -\def\sececsize{1200} - -% Subsection fonts (10pt). -\def\ssecnominalsize{10pt} -\setfont\ssecrm\rmbshape{10}{1000}{OT1} -\setfont\ssecit\itbshape{10}{1000}{OT1IT} -\setfont\ssecsl\slbshape{10}{1000}{OT1} -\setfont\ssectt\ttbshape{10}{1000}{OT1TT} -\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} -\setfont\ssecsf\sfbshape{10}{1000}{OT1} -\let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{1000}{OT1} -\font\sseci=cmmi10 -\font\ssecsy=cmsy10 -\def\ssececsize{1000} - -% Reduced fonts for @acro in text (9pt). -\def\reducednominalsize{9pt} -\setfont\reducedrm\rmshape{9}{1000}{OT1} -\setfont\reducedtt\ttshape{9}{1000}{OT1TT} -\setfont\reducedbf\bfshape{10}{900}{OT1} -\setfont\reducedit\itshape{9}{1000}{OT1IT} -\setfont\reducedsl\slshape{9}{1000}{OT1} -\setfont\reducedsf\sfshape{9}{1000}{OT1} -\setfont\reducedsc\scshape{10}{900}{OT1} -\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} -\font\reducedi=cmmi9 -\font\reducedsy=cmsy9 -\def\reducedecsize{0900} - -% reduce space between paragraphs -\divide\parskip by 2 - -% reset the current fonts -\textfonts -\rm -} % end of 10pt text font size definitions - - -% We provide the user-level command -% @fonttextsize 10 -% (or 11) to redefine the text font size. pt is assumed. -% -\def\xword{10} -\def\xiword{11} -% -\parseargdef\fonttextsize{% - \def\textsizearg{#1}% - \wlog{doing @fonttextsize \textsizearg}% - % - % Set \globaldefs so that documents can use this inside @tex, since - % makeinfo 4.8 does not support it, but we need it nonetheless. - % - \begingroup \globaldefs=1 - \ifx\textsizearg\xword \definetextfontsizex - \else \ifx\textsizearg\xiword \definetextfontsizexi - \else - \errhelp=\EMsimple - \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} - \fi\fi - \endgroup -} - - -% In order for the font changes to affect most math symbols and letters, -% we have to define the \textfont of the standard families. Since -% texinfo doesn't allow for producing subscripts and superscripts except -% in the main text, we don't bother to reset \scriptfont and -% \scriptscriptfont (which would also require loading a lot more fonts). -% -\def\resetmathfonts{% - \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy - \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf - \textfont\ttfam=\tentt \textfont\sffam=\tensf -} - -% The font-changing commands redefine the meanings of \tenSTYLE, instead -% of just \STYLE. We do this because \STYLE needs to also set the -% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire -% \tenSTYLE to set the current font. -% -% Each font-changing command also sets the names \lsize (one size lower) -% and \lllsize (three sizes lower). These relative commands are used in -% the LaTeX logo and acronyms. -% -% This all needs generalizing, badly. -% -\def\textfonts{% - \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl - \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc - \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy - \let\tenttsl=\textttsl - \def\curfontsize{text}% - \def\lsize{reduced}\def\lllsize{smaller}% - \resetmathfonts \setleading{\textleading}} -\def\titlefonts{% - \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl - \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc - \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy - \let\tenttsl=\titlettsl - \def\curfontsize{title}% - \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} -\def\titlefont#1{{\titlefonts\rmisbold #1}} -\def\chapfonts{% - \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl - \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc - \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy - \let\tenttsl=\chapttsl - \def\curfontsize{chap}% - \def\lsize{sec}\def\lllsize{text}% - \resetmathfonts \setleading{19pt}} -\def\secfonts{% - \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl - \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc - \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy - \let\tenttsl=\secttsl - \def\curfontsize{sec}% - \def\lsize{subsec}\def\lllsize{reduced}% - \resetmathfonts \setleading{16pt}} -\def\subsecfonts{% - \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl - \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc - \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy - \let\tenttsl=\ssecttsl - \def\curfontsize{ssec}% - \def\lsize{text}\def\lllsize{small}% - \resetmathfonts \setleading{15pt}} -\let\subsubsecfonts = \subsecfonts -\def\reducedfonts{% - \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl - \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc - \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy - \let\tenttsl=\reducedttsl - \def\curfontsize{reduced}% - \def\lsize{small}\def\lllsize{smaller}% - \resetmathfonts \setleading{10.5pt}} -\def\smallfonts{% - \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl - \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc - \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy - \let\tenttsl=\smallttsl - \def\curfontsize{small}% - \def\lsize{smaller}\def\lllsize{smaller}% - \resetmathfonts \setleading{10.5pt}} -\def\smallerfonts{% - \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl - \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc - \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy - \let\tenttsl=\smallerttsl - \def\curfontsize{smaller}% - \def\lsize{smaller}\def\lllsize{smaller}% - \resetmathfonts \setleading{9.5pt}} - -% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000}{OT1} -\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 -\setfont\shortcontsl\slshape{12}{1000}{OT1} -\setfont\shortconttt\ttshape{12}{1000}{OT1TT} - -% Define these just so they can be easily changed for other fonts. -\def\angleleft{$\langle$} -\def\angleright{$\rangle$} - -% Set the fonts to use with the @small... environments. -\let\smallexamplefonts = \smallfonts - -% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample -% can fit this many characters: -% 8.5x11=86 smallbook=72 a4=90 a5=69 -% If we use \scriptfonts (8pt), then we can fit this many characters: -% 8.5x11=90+ smallbook=80 a4=90+ a5=77 -% For me, subjectively, the few extra characters that fit aren't worth -% the additional smallness of 8pt. So I'm making the default 9pt. -% -% By the way, for comparison, here's what fits with @example (10pt): -% 8.5x11=71 smallbook=60 a4=75 a5=58 -% --karl, 24jan03. - -% Set up the default fonts, so we can use them for creating boxes. -% -\definetextfontsizexi - - -\message{markup,} - -% Check if we are currently using a typewriter font. Since all the -% Computer Modern typewriter fonts have zero interword stretch (and -% shrink), and it is reasonable to expect all typewriter fonts to have -% this property, we can check that font parameter. -% -\def\ifmonospace{\ifdim\fontdimen3\font=0pt } - -% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will -% define and register \INITMACRO to be called on markup style changes. -% \INITMACRO can check \currentmarkupstyle for the innermost -% style and the set of \ifmarkupSTYLE switches for all styles -% currently in effect. -\newif\ifmarkupvar -\newif\ifmarkupsamp -\newif\ifmarkupkey -%\newif\ifmarkupfile % @file == @samp. -%\newif\ifmarkupoption % @option == @samp. -\newif\ifmarkupcode -\newif\ifmarkupkbd -%\newif\ifmarkupenv % @env == @code. -%\newif\ifmarkupcommand % @command == @code. -\newif\ifmarkuptex % @tex (and part of @math, for now). -\newif\ifmarkupexample -\newif\ifmarkupverb -\newif\ifmarkupverbatim - -\let\currentmarkupstyle\empty - -\def\setupmarkupstyle#1{% - \csname markup#1true\endcsname - \def\currentmarkupstyle{#1}% - \markupstylesetup -} - -\let\markupstylesetup\empty - -\def\defmarkupstylesetup#1{% - \expandafter\def\expandafter\markupstylesetup - \expandafter{\markupstylesetup #1}% - \def#1% -} - -% Markup style setup for left and right quotes. -\defmarkupstylesetup\markupsetuplq{% - \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname - \ifx\temp\relax \markupsetuplqdefault \else \temp \fi -} - -\defmarkupstylesetup\markupsetuprq{% - \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname - \ifx\temp\relax \markupsetuprqdefault \else \temp \fi -} - -{ -\catcode`\'=\active -\catcode`\`=\active - -\gdef\markupsetuplqdefault{\let`\lq} -\gdef\markupsetuprqdefault{\let'\rq} - -\gdef\markupsetcodequoteleft{\let`\codequoteleft} -\gdef\markupsetcodequoteright{\let'\codequoteright} - -\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} -} - -\let\markupsetuplqcode \markupsetcodequoteleft -\let\markupsetuprqcode \markupsetcodequoteright -\let\markupsetuplqexample \markupsetcodequoteleft -\let\markupsetuprqexample \markupsetcodequoteright -\let\markupsetuplqverb \markupsetcodequoteleft -\let\markupsetuprqverb \markupsetcodequoteright -\let\markupsetuplqverbatim \markupsetcodequoteleft -\let\markupsetuprqverbatim \markupsetcodequoteright - -\let\markupsetuplqsamp \markupsetnoligaturesquoteleft -\let\markupsetuplqkbd \markupsetnoligaturesquoteleft - -% Allow an option to not replace quotes with a regular directed right -% quote/apostrophe (char 0x27), but instead use the undirected quote -% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -% the default, but it works for pasting with more pdf viewers (at least -% evince), the lilypond developers report. xpdf does work with the -% regular 0x27. -% -\def\codequoteright{% - \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax - \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax - '% - \else \char'15 \fi - \else \char'15 \fi -} -% -% and a similar option for the left quote char vs. a grave accent. -% Modern fonts display ASCII 0x60 as a grave accent, so some people like -% the code environments to do likewise. -% -\def\codequoteleft{% - \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax - \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax - % [Knuth] pp. 380,381,391 - % \relax disables Spanish ligatures ?` and !` of \tt font. - \relax`% - \else \char'22 \fi - \else \char'22 \fi -} - -% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. -\def\noligaturesquoteleft{\relax\lq} - -% Count depth in font-changes, for error checks -\newcount\fontdepth \fontdepth=0 - -%% Add scribe-like font environments, plus @l for inline lisp (usually sans -%% serif) and @ii for TeX italic - -% \smartitalic{ARG} outputs arg in italics, followed by an italic correction -% unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else - \ptexslash\fi\fi\fi} -\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} - -% like \smartslanted except unconditionally uses \ttsl. -% @var is set to this for defun arguments. -\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} - -% @cite is like \smartslanted except unconditionally use \sl. We never want -% ttsl for book titles, do we? -\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} - -\let\i=\smartitalic -\let\slanted=\smartslanted -\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} -\let\dfn=\smartslanted -\let\emph=\smartitalic - -% Explicit font changes: @r, @sc, undocumented @ii. -\def\r#1{{\rm #1}} % roman font -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font - -% @b, explicit bold. Also @strong. -\def\b#1{{\bf #1}} -\let\strong=\b - -% @sansserif, explicit sans. -\def\sansserif#1{{\sf #1}} - -% We can't just use \exhyphenpenalty, because that only has effect at -% the end of a paragraph. Restore normal hyphenation at the end of the -% group within which \nohyphenation is presumably called. -% -\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} -\def\restorehyphenation{\hyphenchar\font = `- } - -% Set sfcode to normal for the chars that usually have another value. -% Can't use plain's \frenchspacing because it uses the `\x notation, and -% sometimes \x has an active definition that messes things up. -% -\catcode`@=11 - \def\plainfrenchspacing{% - \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m - \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m - \def\endofsentencespacefactor{1000}% for @. and friends - } - \def\plainnonfrenchspacing{% - \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 - \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 - \def\endofsentencespacefactor{3000}% for @. and friends - } -\catcode`@=\other -\def\endofsentencespacefactor{3000}% default - -% @t, explicit typewriter. -\def\t#1{% - {\tt \rawbackslash \plainfrenchspacing #1}% - \null -} - -% @samp. -\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} - -% definition of @key that produces a lozenge. Doesn't adjust to text size. -%\setfont\keyrm\rmshape{8}{1000}{OT1} -%\font\keysy=cmsy9 -%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% -% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% -% \vbox{\hrule\kern-0.4pt -% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% -% \kern-0.4pt\hrule}% -% \kern-.06em\raise0.4pt\hbox{\angleright}}}} - -% definition of @key with no lozenge. If the current font is already -% monospace, don't change it; that way, we respect @kbdinputstyle. But -% if it isn't monospace, then use \tt. -% -\def\key#1{{\setupmarkupstyle{key}% - \nohyphenation - \ifmonospace\else\tt\fi - #1}\null} - -% ctrl is no longer a Texinfo command. -\def\ctrl #1{{\tt \rawbackslash \hat}#1} - -% @file, @option are the same as @samp. -\let\file=\samp -\let\option=\samp - -% @code is a modification of @t, -% which makes spaces the same size as normal in the surrounding text. -\def\tclose#1{% - {% - % Change normal interword space to be same as for the current font. - \spaceskip = \fontdimen2\font - % - % Switch to typewriter. - \tt - % - % But `\ ' produces the large typewriter interword space. - \def\ {{\spaceskip = 0pt{} }}% - % - % Turn off hyphenation. - \nohyphenation - % - \rawbackslash - \plainfrenchspacing - #1% - }% - \null -} - -% We *must* turn on hyphenation at `-' and `_' in @code. -% Otherwise, it is too hard to avoid overfull hboxes -% in the Emacs manual, the Library manual, etc. - -% Unfortunately, TeX uses one parameter (\hyphenchar) to control -% both hyphenation at - and hyphenation within words. -% We must therefore turn them both off (\tclose does that) -% and arrange explicitly to hyphenate at a dash. -% -- rms. -{ - \catcode`\-=\active \catcode`\_=\active - \catcode`\'=\active \catcode`\`=\active - \global\let'=\rq \global\let`=\lq % default definitions - % - \global\def\code{\begingroup - \setupmarkupstyle{code}% - % The following should really be moved into \setupmarkupstyle handlers. - \catcode\dashChar=\active \catcode\underChar=\active - \ifallowcodebreaks - \let-\codedash - \let_\codeunder - \else - \let-\realdash - \let_\realunder - \fi - \codex - } -} - -\def\realdash{-} -\def\codedash{-\discretionary{}{}{}} -\def\codeunder{% - % this is all so @math{@code{var_name}+1} can work. In math mode, _ - % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) - % will therefore expand the active definition of _, which is us - % (inside @code that is), therefore an endless loop. - \ifusingtt{\ifmmode - \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. - \else\normalunderscore \fi - \discretionary{}{}{}}% - {\_}% -} -\def\codex #1{\tclose{#1}\endgroup} - -% An additional complication: the above will allow breaks after, e.g., -% each of the four underscores in __typeof__. This is undesirable in -% some manuals, especially if they don't have long identifiers in -% general. @allowcodebreaks provides a way to control this. -% -\newif\ifallowcodebreaks \allowcodebreakstrue - -\def\keywordtrue{true} -\def\keywordfalse{false} - -\parseargdef\allowcodebreaks{% - \def\txiarg{#1}% - \ifx\txiarg\keywordtrue - \allowcodebreakstrue - \else\ifx\txiarg\keywordfalse - \allowcodebreaksfalse - \else - \errhelp = \EMsimple - \errmessage{Unknown @allowcodebreaks option `\txiarg'}% - \fi\fi -} - -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. -\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} - -% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), -% `example' (@kbd uses ttsl only inside of @example and friends), -% or `code' (@kbd uses normal tty font always). -\parseargdef\kbdinputstyle{% - \def\txiarg{#1}% - \ifx\txiarg\worddistinct - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% - \else\ifx\txiarg\wordexample - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% - \else\ifx\txiarg\wordcode - \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% - \else - \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle option `\txiarg'}% - \fi\fi\fi -} -\def\worddistinct{distinct} -\def\wordexample{example} -\def\wordcode{code} - -% Default is `distinct'. -\kbdinputstyle distinct - -\def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} - -% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -\let\indicateurl=\code -\let\env=\code -\let\command=\code - -% @clicksequence{File @click{} Open ...} -\def\clicksequence#1{\begingroup #1\endgroup} - -% @clickstyle @arrow (by default) -\parseargdef\clickstyle{\def\click{#1}} -\def\click{\arrow} - -% @uref (abbreviation for `urlref') takes an optional (comma-separated) -% second argument specifying the text to display and an optional third -% arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. Perhaps eventually put in -% a hypertex \special here. -% -\def\uref#1{\douref #1,,,\finish} -\def\douref#1,#2,#3,#4\finish{\begingroup - \unsepspaces - \pdfurl{#1}% - \setbox0 = \hbox{\ignorespaces #3}% - \ifdim\wd0 > 0pt - \unhbox0 % third arg given, show only that - \else - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it - \else - \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url - \fi - \else - \code{#1}% only url given, so show it - \fi - \fi - \endlink -\endgroup} - -% @url synonym for @uref, since that's how everyone uses it. -% -\let\url=\uref - -% rms does not like angle brackets --karl, 17may97. -% So now @email is just like @uref, unless we are pdf. -% -%\def\email#1{\angleleft{\tt #1}\angleright} -\ifpdf - \def\email#1{\doemail#1,,\finish} - \def\doemail#1,#2,#3\finish{\begingroup - \unsepspaces - \pdfurl{mailto:#1}% - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi - \endlink - \endgroup} -\else - \let\email=\uref -\fi - -% Typeset a dimension, e.g., `in' or `pt'. The only reason for the -% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. -% -\def\dmn#1{\thinspace #1} - -% @l was never documented to mean ``switch to the Lisp font'', -% and it is not used as such in any manual I can find. We need it for -% Polish suppressed-l. --karl, 22sep96. -%\def\l#1{{\li #1}\null} - -% @acronym for "FBI", "NATO", and the like. -% We print this one point size smaller, since it's intended for -% all-uppercase. -% -\def\acronym#1{\doacronym #1,,\finish} -\def\doacronym#1,#2,#3\finish{% - {\selectfonts\lsize #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% - \fi -} - -% @abbr for "Comput. J." and the like. -% No font change, but don't do end-of-sentence spacing. -% -\def\abbr#1{\doabbr #1,,\finish} -\def\doabbr#1,#2,#3\finish{% - {\plainfrenchspacing #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% - \fi -} - - -\message{glyphs,} - -% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -% -% Since these characters are used in examples, they should be an even number of -% \tt widths. Each \tt character is 1en, so two makes it 1em. -% -\def\point{$\star$} -\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} -\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} -\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} -\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -% The @error{} command. -% Adapted from the TeXbook's \boxit. -% -\newbox\errorbox -% -{\tentt \global\dimen0 = 3em}% Width of the box. -\dimen2 = .55pt % Thickness of rules -% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} -% -\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. - \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} -% -\def\error{\leavevmode\lower.7ex\copy\errorbox} - -% @pounds{} is a sterling sign, which Knuth put in the CM italic font. -% -\def\pounds{{\it\$}} - -% @euro{} comes from a separate font, depending on the current style. -% We use the free feym* fonts from the eurosym package by Henrik -% Theiling, which support regular, slanted, bold and bold slanted (and -% "outlined" (blackboard board, sort of) versions, which we don't need). -% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -% -% Although only regular is the truly official Euro symbol, we ignore -% that. The Euro is designed to be slightly taller than the regular -% font height. -% -% feymr - regular -% feymo - slanted -% feybr - bold -% feybo - bold slanted -% -% There is no good (free) typewriter version, to my knowledge. -% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. -% Hmm. -% -% Also doesn't work in math. Do we need to do math with euro symbols? -% Hope not. -% -% -\def\euro{{\eurofont e}} -\def\eurofont{% - % We set the font at each command, rather than predefining it in - % \textfonts and the other font-switching commands, so that - % installations which never need the symbol don't have to have the - % font installed. - % - % There is only one designed size (nominal 10pt), so we always scale - % that to the current nominal size. - % - % By the way, simply using "at 1em" works for cmr10 and the like, but - % does not work for cmbx10 and other extended/shrunken fonts. - % - \def\eurosize{\csname\curfontsize nominalsize\endcsname}% - % - \ifx\curfontstyle\bfstylename - % bold: - \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else - % regular: - \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize - \fi - \thiseurofont -} - -% Glyphs from the EC fonts. We don't use \let for the aliases, because -% sometimes we redefine the original macro, and the alias should reflect -% the redefinition. -% -% Use LaTeX names for the Icelandic letters. -\def\DH{{\ecfont \char"D0}} % Eth -\def\dh{{\ecfont \char"F0}} % eth -\def\TH{{\ecfont \char"DE}} % Thorn -\def\th{{\ecfont \char"FE}} % thorn -% -\def\guillemetleft{{\ecfont \char"13}} -\def\guillemotleft{\guillemetleft} -\def\guillemetright{{\ecfont \char"14}} -\def\guillemotright{\guillemetright} -\def\guilsinglleft{{\ecfont \char"0E}} -\def\guilsinglright{{\ecfont \char"0F}} -\def\quotedblbase{{\ecfont \char"12}} -\def\quotesinglbase{{\ecfont \char"0D}} -% -% This positioning is not perfect (see the ogonek LaTeX package), but -% we have the precomposed glyphs for the most common cases. We put the -% tests to use those glyphs in the single \ogonek macro so we have fewer -% dummy definitions to worry about for index entries, etc. -% -% ogonek is also used with other letters in Lithuanian (IOU), but using -% the precomposed glyphs for those is not so easy since they aren't in -% the same EC font. -\def\ogonek#1{{% - \def\temp{#1}% - \ifx\temp\macrocharA\Aogonek - \else\ifx\temp\macrochara\aogonek - \else\ifx\temp\macrocharE\Eogonek - \else\ifx\temp\macrochare\eogonek - \else - \ecfont \setbox0=\hbox{#1}% - \ifdim\ht0=1ex\accent"0C #1% - \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% - \fi - \fi\fi\fi\fi - }% -} -\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} -\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} -\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} -\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} -% -% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. -\def\ecfont{% - % We can't distinguish serif/sans and italic/slanted, but this - % is used for crude hacks anyway (like adding French and German - % quotes to documents typeset with CM, where we lose kerning), so - % hopefully nobody will notice/care. - \edef\ecsize{\csname\curfontsize ecsize\endcsname}% - \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% - \ifx\curfontstyle\bfstylename - % bold: - \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize - \else - % regular: - \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize - \fi - \thisecfont -} - -% @registeredsymbol - R in a circle. The font for the R should really -% be smaller yet, but lllsize is the best we can do for now. -% Adapted from the plain.tex definition of \copyright. -% -\def\registeredsymbol{% - $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% - \hfil\crcr\Orb}}% - }$% -} - -% @textdegree - the normal degrees sign. -% -\def\textdegree{$^\circ$} - -% Laurent Siebenmann reports \Orb undefined with: -% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 -% so we'll define it if necessary. -% -\ifx\Orb\undefined -\def\Orb{\mathhexbox20D} -\fi - -% Quotes. -\chardef\quotedblleft="5C -\chardef\quotedblright=`\" -\chardef\quoteleft=`\` -\chardef\quoteright=`\' - - -\message{page headings,} - -\newskip\titlepagetopglue \titlepagetopglue = 1.5in -\newskip\titlepagebottomglue \titlepagebottomglue = 2pc - -% First the title page. Must do @settitle before @titlepage. -\newif\ifseenauthor -\newif\iffinishedtitlepage - -% Do an implicit @contents or @shortcontents after @end titlepage if the -% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. -% -\newif\ifsetcontentsaftertitlepage - \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue -\newif\ifsetshortcontentsaftertitlepage - \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue - -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} - -\envdef\titlepage{% - % Open one extra group, as we want to close it in the middle of \Etitlepage. - \begingroup - \parindent=0pt \textfonts - % Leave some space at the very top of the page. - \vglue\titlepagetopglue - % No rule at page bottom unless we print one at the top with @title. - \finishedtitlepagetrue - % - % Most title ``pages'' are actually two pages long, with space - % at the top of the second. We don't want the ragged left on the second. - \let\oldpage = \page - \def\page{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - \let\page = \oldpage - \page - \null - }% -} - -\def\Etitlepage{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - % It is important to do the page break before ending the group, - % because the headline and footline are only empty inside the group. - % If we use the new definition of \page, we always get a blank page - % after the title page, which we certainly don't want. - \oldpage - \endgroup - % - % Need this before the \...aftertitlepage checks so that if they are - % in effect the toc pages will come out with page numbers. - \HEADINGSon - % - % If they want short, they certainly want long too. - \ifsetshortcontentsaftertitlepage - \shortcontents - \contents - \global\let\shortcontents = \relax - \global\let\contents = \relax - \fi - % - \ifsetcontentsaftertitlepage - \contents - \global\let\contents = \relax - \global\let\shortcontents = \relax - \fi -} - -\def\finishtitlepage{% - \vskip4pt \hrule height 2pt width \hsize - \vskip\titlepagebottomglue - \finishedtitlepagetrue -} - -%%% Macros to be used within @titlepage: - -\let\subtitlerm=\tenrm -\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} - -\parseargdef\title{% - \checkenv\titlepage - \leftline{\titlefonts\rmisbold #1} - % print a rule at the page bottom also. - \finishedtitlepagefalse - \vskip4pt \hrule height 4pt width \hsize \vskip4pt -} - -\parseargdef\subtitle{% - \checkenv\titlepage - {\subtitlefont \rightline{#1}}% -} - -% @author should come last, but may come many times. -% It can also be used inside @quotation. -% -\parseargdef\author{% - \def\temp{\quotation}% - \ifx\thisenv\temp - \def\quotationauthor{#1}% printed in \Equotation. - \else - \checkenv\titlepage - \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi - {\secfonts\rmisbold \leftline{#1}}% - \fi -} - - -%%% Set up page headings and footings. - -\let\thispage=\folio - -\newtoks\evenheadline % headline on even pages -\newtoks\oddheadline % headline on odd pages -\newtoks\evenfootline % footline on even pages -\newtoks\oddfootline % footline on odd pages - -% Now make TeX use those variables -\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline - \else \the\evenheadline \fi}} -\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline - \else \the\evenfootline \fi}\HEADINGShook} -\let\HEADINGShook=\relax - -% Commands to set those variables. -% For example, this is what @headings on does -% @evenheading @thistitle|@thispage|@thischapter -% @oddheading @thischapter|@thispage|@thistitle -% @evenfooting @thisfile|| -% @oddfooting ||@thisfile - - -\def\evenheading{\parsearg\evenheadingxxx} -\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} -\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% -\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\def\oddheading{\parsearg\oddheadingxxx} -\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} -\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% -\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% - -\def\evenfooting{\parsearg\evenfootingxxx} -\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} -\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% -\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\def\oddfooting{\parsearg\oddfootingxxx} -\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} -\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% - \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% - % - % Leave some space for the footline. Hopefully ok to assume - % @evenfooting will not be used by itself. - \global\advance\pageheight by -12pt - \global\advance\vsize by -12pt -} - -\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} - -% @evenheadingmarks top \thischapter <- chapter at the top of a page -% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page -% -% The same set of arguments for: -% -% @oddheadingmarks -% @evenfootingmarks -% @oddfootingmarks -% @everyheadingmarks -% @everyfootingmarks - -\def\evenheadingmarks{\headingmarks{even}{heading}} -\def\oddheadingmarks{\headingmarks{odd}{heading}} -\def\evenfootingmarks{\headingmarks{even}{footing}} -\def\oddfootingmarks{\headingmarks{odd}{footing}} -\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} - \headingmarks{odd}{heading}{#1} } -\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} - \headingmarks{odd}{footing}{#1} } -% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. -\def\headingmarks#1#2#3 {% - \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname - \global\expandafter\let\csname get#1#2marks\endcsname \temp -} - -\everyheadingmarks bottom -\everyfootingmarks bottom - -% @headings double turns headings on for double-sided printing. -% @headings single turns headings on for single-sided printing. -% @headings off turns them off. -% @headings on same as @headings double, retained for compatibility. -% @headings after turns on double-sided headings after this page. -% @headings doubleafter turns on double-sided headings after this page. -% @headings singleafter turns on single-sided headings after this page. -% By default, they are off at the start of a document, -% and turned `on' after @end titlepage. - -\def\headings #1 {\csname HEADINGS#1\endcsname} - -\def\HEADINGSoff{% -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff -% When we turn headings on, set the page number to 1. -% For double-sided printing, put current file name in lower left corner, -% chapter name on inside top of right hand pages, document -% title on inside top of left hand pages, and page numbers on outside top -% edge of all pages. -\def\HEADINGSdouble{% -\global\pageno=1 -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chapoddpage -} -\let\contentsalignmacro = \chappager - -% For single-sided printing, chapter title goes across top left of page, -% page number on top right. -\def\HEADINGSsingle{% -\global\pageno=1 -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chappager -} -\def\HEADINGSon{\HEADINGSdouble} - -\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} -\let\HEADINGSdoubleafter=\HEADINGSafter -\def\HEADINGSdoublex{% -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chapoddpage -} - -\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} -\def\HEADINGSsinglex{% -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chappager -} - -% Subroutines used in generating headings -% This produces Day Month Year style of output. -% Only define if not already defined, in case a txi-??.tex file has set -% up a different format (e.g., txi-cs.tex does this). -\ifx\today\undefined -\def\today{% - \number\day\space - \ifcase\month - \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr - \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug - \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec - \fi - \space\number\year} -\fi - -% @settitle line... specifies the title of the document, for headings. -% It generates no output of its own. -\def\thistitle{\putwordNoTitle} -\def\settitle{\parsearg{\gdef\thistitle}} - - -\message{tables,} -% Tables -- @table, @ftable, @vtable, @item(x). - -% default indentation of table text -\newdimen\tableindent \tableindent=.8in -% default indentation of @itemize and @enumerate text -\newdimen\itemindent \itemindent=.3in -% margin between end of table item and start of table text. -\newdimen\itemmargin \itemmargin=.1in - -% used internally for \itemindent minus \itemmargin -\newdimen\itemmax - -% Note @table, @ftable, and @vtable define @item, @itemx, etc., with -% these defs. -% They also define \itemindex -% to index the item name in whatever manner is desired (perhaps none). - -\newif\ifitemxneedsnegativevskip - -\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} - -\def\internalBitem{\smallbreak \parsearg\itemzzz} -\def\internalBitemx{\itemxpar \parsearg\itemzzz} - -\def\itemzzz #1{\begingroup % - \advance\hsize by -\rightskip - \advance\hsize by -\tableindent - \setbox0=\hbox{\itemindicate{#1}}% - \itemindex{#1}% - \nobreak % This prevents a break before @itemx. - % - % If the item text does not fit in the space we have, put it on a line - % by itself, and do not allow a page break either before or after that - % line. We do not start a paragraph here because then if the next - % command is, e.g., @kindex, the whatsit would get put into the - % horizontal list on a line by itself, resulting in extra blank space. - \ifdim \wd0>\itemmax - % - % Make this a paragraph so we get the \parskip glue and wrapping, - % but leave it ragged-right. - \begingroup - \advance\leftskip by-\tableindent - \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil - \leavevmode\unhbox0\par - \endgroup - % - % We're going to be starting a paragraph, but we don't want the - % \parskip glue -- logically it's part of the @item we just started. - \nobreak \vskip-\parskip - % - % Stop a page break at the \parskip glue coming up. However, if - % what follows is an environment such as @example, there will be no - % \parskip glue; then the negative vskip we just inserted would - % cause the example and the item to crash together. So we use this - % bizarre value of 10001 as a signal to \aboveenvbreak to insert - % \parskip glue after all. Section titles are handled this way also. - % - \penalty 10001 - \endgroup - \itemxneedsnegativevskipfalse - \else - % The item text fits into the space. Start a paragraph, so that the - % following text (if any) will end up on the same line. - \noindent - % Do this with kerns and \unhbox so that if there is a footnote in - % the item text, it can migrate to the main vertical list and - % eventually be printed. - \nobreak\kern-\tableindent - \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 - \unhbox0 - \nobreak\kern\dimen0 - \endgroup - \itemxneedsnegativevskiptrue - \fi -} - -\def\item{\errmessage{@item while not in a list environment}} -\def\itemx{\errmessage{@itemx while not in a list environment}} - -% @table, @ftable, @vtable. -\envdef\table{% - \let\itemindex\gobble - \tablecheck{table}% -} -\envdef\ftable{% - \def\itemindex ##1{\doind {fn}{\code{##1}}}% - \tablecheck{ftable}% -} -\envdef\vtable{% - \def\itemindex ##1{\doind {vr}{\code{##1}}}% - \tablecheck{vtable}% -} -\def\tablecheck#1{% - \ifnum \the\catcode`\^^M=\active - \endgroup - \errmessage{This command won't work in this context; perhaps the problem is - that we are \inenvironment\thisenv}% - \def\next{\doignore{#1}}% - \else - \let\next\tablex - \fi - \next -} -\def\tablex#1{% - \def\itemindicate{#1}% - \parsearg\tabley -} -\def\tabley#1{% - {% - \makevalueexpandable - \edef\temp{\noexpand\tablez #1\space\space\space}% - \expandafter - }\temp \endtablez -} -\def\tablez #1 #2 #3 #4\endtablez{% - \aboveenvbreak - \ifnum 0#1>0 \advance \leftskip by #1\mil \fi - \ifnum 0#2>0 \tableindent=#2\mil \fi - \ifnum 0#3>0 \advance \rightskip by #3\mil \fi - \itemmax=\tableindent - \advance \itemmax by -\itemmargin - \advance \leftskip by \tableindent - \exdentamount=\tableindent - \parindent = 0pt - \parskip = \smallskipamount - \ifdim \parskip=0pt \parskip=2pt \fi - \let\item = \internalBitem - \let\itemx = \internalBitemx -} -\def\Etable{\endgraf\afterenvbreak} -\let\Eftable\Etable -\let\Evtable\Etable -\let\Eitemize\Etable -\let\Eenumerate\Etable - -% This is the counter used by @enumerate, which is really @itemize - -\newcount \itemno - -\envdef\itemize{\parsearg\doitemize} - -\def\doitemize#1{% - \aboveenvbreak - \itemmax=\itemindent - \advance\itemmax by -\itemmargin - \advance\leftskip by \itemindent - \exdentamount=\itemindent - \parindent=0pt - \parskip=\smallskipamount - \ifdim\parskip=0pt \parskip=2pt \fi - % - % Try typesetting the item mark that if the document erroneously says - % something like @itemize @samp (intending @table), there's an error - % right away at the @itemize. It's not the best error message in the - % world, but it's better than leaving it to the @item. This means if - % the user wants an empty mark, they have to say @w{} not just @w. - \def\itemcontents{#1}% - \setbox0 = \hbox{\itemcontents}% - % - % @itemize with no arg is equivalent to @itemize @bullet. - \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi - % - \let\item=\itemizeitem -} - -% Definition of @item while inside @itemize and @enumerate. -% -\def\itemizeitem{% - \advance\itemno by 1 % for enumerations - {\let\par=\endgraf \smallbreak}% reasonable place to break - {% - % If the document has an @itemize directly after a section title, a - % \nobreak will be last on the list, and \sectionheading will have - % done a \vskip-\parskip. In that case, we don't want to zero - % parskip, or the item text will crash with the heading. On the - % other hand, when there is normal text preceding the item (as there - % usually is), we do want to zero parskip, or there would be too much - % space. In that case, we won't have a \nobreak before. At least - % that's the theory. - \ifnum\lastpenalty<10000 \parskip=0in \fi - \noindent - \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% - % - \vadjust{\penalty 1200}}% not good to break after first line of item. - \flushcr -} - -% \splitoff TOKENS\endmark defines \first to be the first token in -% TOKENS, and \rest to be the remainder. -% -\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% - -% Allow an optional argument of an uppercase letter, lowercase letter, -% or number, to specify the first label in the enumerated list. No -% argument is the same as `1'. -% -\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} -\def\enumeratey #1 #2\endenumeratey{% - % If we were given no argument, pretend we were given `1'. - \def\thearg{#1}% - \ifx\thearg\empty \def\thearg{1}\fi - % - % Detect if the argument is a single token. If so, it might be a - % letter. Otherwise, the only valid thing it can be is a number. - % (We will always have one token, because of the test we just made. - % This is a good thing, since \splitoff doesn't work given nothing at - % all -- the first parameter is undelimited.) - \expandafter\splitoff\thearg\endmark - \ifx\rest\empty - % Only one token in the argument. It could still be anything. - % A ``lowercase letter'' is one whose \lccode is nonzero. - % An ``uppercase letter'' is one whose \lccode is both nonzero, and - % not equal to itself. - % Otherwise, we assume it's a number. - % - % We need the \relax at the end of the \ifnum lines to stop TeX from - % continuing to look for a . - % - \ifnum\lccode\expandafter`\thearg=0\relax - \numericenumerate % a number (we hope) - \else - % It's a letter. - \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax - \lowercaseenumerate % lowercase letter - \else - \uppercaseenumerate % uppercase letter - \fi - \fi - \else - % Multiple tokens in the argument. We hope it's a number. - \numericenumerate - \fi -} - -% An @enumerate whose labels are integers. The starting integer is -% given in \thearg. -% -\def\numericenumerate{% - \itemno = \thearg - \startenumeration{\the\itemno}% -} - -% The starting (lowercase) letter is in \thearg. -\def\lowercaseenumerate{% - \itemno = \expandafter`\thearg - \startenumeration{% - % Be sure we're not beyond the end of the alphabet. - \ifnum\itemno=0 - \errmessage{No more lowercase letters in @enumerate; get a bigger - alphabet}% - \fi - \char\lccode\itemno - }% -} - -% The starting (uppercase) letter is in \thearg. -\def\uppercaseenumerate{% - \itemno = \expandafter`\thearg - \startenumeration{% - % Be sure we're not beyond the end of the alphabet. - \ifnum\itemno=0 - \errmessage{No more uppercase letters in @enumerate; get a bigger - alphabet} - \fi - \char\uccode\itemno - }% -} - -% Call \doitemize, adding a period to the first argument and supplying the -% common last two arguments. Also subtract one from the initial value in -% \itemno, since @item increments \itemno. -% -\def\startenumeration#1{% - \advance\itemno by -1 - \doitemize{#1.}\flushcr -} - -% @alphaenumerate and @capsenumerate are abbreviations for giving an arg -% to @enumerate. -% -\def\alphaenumerate{\enumerate{a}} -\def\capsenumerate{\enumerate{A}} -\def\Ealphaenumerate{\Eenumerate} -\def\Ecapsenumerate{\Eenumerate} - - -% @multitable macros -% Amy Hendrickson, 8/18/94, 3/6/96 -% -% @multitable ... @end multitable will make as many columns as desired. -% Contents of each column will wrap at width given in preamble. Width -% can be specified either with sample text given in a template line, -% or in percent of \hsize, the current width of text on page. - -% Table can continue over pages but will only break between lines. - -% To make preamble: -% -% Either define widths of columns in terms of percent of \hsize: -% @multitable @columnfractions .25 .3 .45 -% @item ... -% -% Numbers following @columnfractions are the percent of the total -% current hsize to be used for each column. You may use as many -% columns as desired. - - -% Or use a template: -% @multitable {Column 1 template} {Column 2 template} {Column 3 template} -% @item ... -% using the widest term desired in each column. - -% Each new table line starts with @item, each subsequent new column -% starts with @tab. Empty columns may be produced by supplying @tab's -% with nothing between them for as many times as empty columns are needed, -% ie, @tab@tab@tab will produce two empty columns. - -% @item, @tab do not need to be on their own lines, but it will not hurt -% if they are. - -% Sample multitable: - -% @multitable {Column 1 template} {Column 2 template} {Column 3 template} -% @item first col stuff @tab second col stuff @tab third col -% @item -% first col stuff -% @tab -% second col stuff -% @tab -% third col -% @item first col stuff @tab second col stuff -% @tab Many paragraphs of text may be used in any column. -% -% They will wrap at the width determined by the template. -% @item@tab@tab This will be in third column. -% @end multitable - -% Default dimensions may be reset by user. -% @multitableparskip is vertical space between paragraphs in table. -% @multitableparindent is paragraph indent in table. -% @multitablecolmargin is horizontal space to be left between columns. -% @multitablelinespace is space to leave between table items, baseline -% to baseline. -% 0pt means it depends on current normal line spacing. -% -\newskip\multitableparskip -\newskip\multitableparindent -\newdimen\multitablecolspace -\newskip\multitablelinespace -\multitableparskip=0pt -\multitableparindent=6pt -\multitablecolspace=12pt -\multitablelinespace=0pt - -% Macros used to set up halign preamble: -% -\let\endsetuptable\relax -\def\xendsetuptable{\endsetuptable} -\let\columnfractions\relax -\def\xcolumnfractions{\columnfractions} -\newif\ifsetpercent - -% #1 is the @columnfraction, usually a decimal number like .5, but might -% be just 1. We just use it, whatever it is. -% -\def\pickupwholefraction#1 {% - \global\advance\colcount by 1 - \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% - \setuptable -} - -\newcount\colcount -\def\setuptable#1{% - \def\firstarg{#1}% - \ifx\firstarg\xendsetuptable - \let\go = \relax - \else - \ifx\firstarg\xcolumnfractions - \global\setpercenttrue - \else - \ifsetpercent - \let\go\pickupwholefraction - \else - \global\advance\colcount by 1 - \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a - % separator; typically that is always in the input, anyway. - \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% - \fi - \fi - \ifx\go\pickupwholefraction - % Put the argument back for the \pickupwholefraction call, so - % we'll always have a period there to be parsed. - \def\go{\pickupwholefraction#1}% - \else - \let\go = \setuptable - \fi% - \fi - \go -} - -% multitable-only commands. -% -% @headitem starts a heading row, which we typeset in bold. -% Assignments have to be global since we are inside the implicit group -% of an alignment entry. \everycr resets \everytab so we don't have to -% undo it ourselves. -\def\headitemfont{\b}% for people to use in the template row; not changeable -\def\headitem{% - \checkenv\multitable - \crcr - \global\everytab={\bf}% can't use \headitemfont since the parsing differs - \the\everytab % for the first item -}% -% -% A \tab used to include \hskip1sp. But then the space in a template -% line is not enough. That is bad. So let's go back to just `&' until -% we again encounter the problem the 1sp was intended to solve. -% --karl, nathan@acm.org, 20apr99. -\def\tab{\checkenv\multitable &\the\everytab}% - -% @multitable ... @end multitable definitions: -% -\newtoks\everytab % insert after every tab. -% -\envdef\multitable{% - \vskip\parskip - \startsavinginserts - % - % @item within a multitable starts a normal row. - % We use \def instead of \let so that if one of the multitable entries - % contains an @itemize, we don't choke on the \item (seen as \crcr aka - % \endtemplate) expanding \doitemize. - \def\item{\crcr}% - % - \tolerance=9500 - \hbadness=9500 - \setmultitablespacing - \parskip=\multitableparskip - \parindent=\multitableparindent - \overfullrule=0pt - \global\colcount=0 - % - \everycr = {% - \noalign{% - \global\everytab={}% - \global\colcount=0 % Reset the column counter. - % Check for saved footnotes, etc. - \checkinserts - % Keeps underfull box messages off when table breaks over pages. - %\filbreak - % Maybe so, but it also creates really weird page breaks when the - % table breaks over pages. Wouldn't \vfil be better? Wait until the - % problem manifests itself, so it can be fixed for real --karl. - }% - }% - % - \parsearg\domultitable -} -\def\domultitable#1{% - % To parse everything between @multitable and @item: - \setuptable#1 \endsetuptable - % - % This preamble sets up a generic column definition, which will - % be used as many times as user calls for columns. - % \vtop will set a single line and will also let text wrap and - % continue for many paragraphs if desired. - \halign\bgroup &% - \global\advance\colcount by 1 - \multistrut - \vtop{% - % Use the current \colcount to find the correct column width: - \hsize=\expandafter\csname col\the\colcount\endcsname - % - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns after - % the first one. - % - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % - % If the user has set preamble in terms of percent of \hsize we will - % use that dimension as the width of the column, and the \leftskip - % will keep entries from bumping into each other. Table will start at - % left margin and final column will justify at right margin. - % - % Make sure we don't inherit \rightskip from the outer environment. - \rightskip=0pt - \ifnum\colcount=1 - % The first column will be indented with the surrounding text. - \advance\hsize by\leftskip - \else - \ifsetpercent \else - % If user has not set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace. - \advance\hsize by \multitablecolspace - \fi - % In either case we will make \leftskip=\multitablecolspace: - \leftskip=\multitablecolspace - \fi - % Ignoring space at the beginning and end avoids an occasional spurious - % blank line, when TeX decides to break the line at the space before the - % box from the multistrut, so the strut ends up on a line by itself. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole country. - % Is automatically provided with highlighting sequences respectively - % marking characters. - \noindent\ignorespaces##\unskip\multistrut - }\cr -} -\def\Emultitable{% - \crcr - \egroup % end the \halign - \global\setpercentfalse -} - -\def\setmultitablespacing{% - \def\multistrut{\strut}% just use the standard line spacing - % - % Compute \multitablelinespace (if not defined by user) for use in - % \multitableparskip calculation. We used define \multistrut based on - % this, but (ironically) that caused the spacing to be off. - % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. -\ifdim\multitablelinespace=0pt -\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip -\global\advance\multitablelinespace by-\ht0 -\fi -%% Test to see if parskip is larger than space between lines of -%% table. If not, do nothing. -%% If so, set to same dimension as multitablelinespace. -\ifdim\multitableparskip>\multitablelinespace -\global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. -\fi% -\ifdim\multitableparskip=0pt -\global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. -\fi} - - -\message{conditionals,} - -% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, -% @ifnotxml always succeed. They currently do nothing; we don't -% attempt to check whether the conditionals are properly nested. But we -% have to remember that they are conditionals, so that @end doesn't -% attempt to close an environment group. -% -\def\makecond#1{% - \expandafter\let\csname #1\endcsname = \relax - \expandafter\let\csname iscond.#1\endcsname = 1 -} -\makecond{iftex} -\makecond{ifnotdocbook} -\makecond{ifnothtml} -\makecond{ifnotinfo} -\makecond{ifnotplaintext} -\makecond{ifnotxml} - -% Ignore @ignore, @ifhtml, @ifinfo, and the like. -% -\def\direntry{\doignore{direntry}} -\def\documentdescription{\doignore{documentdescription}} -\def\docbook{\doignore{docbook}} -\def\html{\doignore{html}} -\def\ifdocbook{\doignore{ifdocbook}} -\def\ifhtml{\doignore{ifhtml}} -\def\ifinfo{\doignore{ifinfo}} -\def\ifnottex{\doignore{ifnottex}} -\def\ifplaintext{\doignore{ifplaintext}} -\def\ifxml{\doignore{ifxml}} -\def\ignore{\doignore{ignore}} -\def\menu{\doignore{menu}} -\def\xml{\doignore{xml}} - -% Ignore text until a line `@end #1', keeping track of nested conditionals. -% -% A count to remember the depth of nesting. -\newcount\doignorecount - -\def\doignore#1{\begingroup - % Scan in ``verbatim'' mode: - \obeylines - \catcode`\@ = \other - \catcode`\{ = \other - \catcode`\} = \other - % - % Make sure that spaces turn into tokens that match what \doignoretext wants. - \spaceisspace - % - % Count number of #1's that we've seen. - \doignorecount = 0 - % - % Swallow text until we reach the matching `@end #1'. - \dodoignore{#1}% -} - -{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. - \obeylines % - % - \gdef\dodoignore#1{% - % #1 contains the command name as a string, e.g., `ifinfo'. - % - % Define a command to find the next `@end #1'. - \long\def\doignoretext##1^^M@end #1{% - \doignoretextyyy##1^^M@#1\_STOP_}% - % - % And this command to find another #1 command, at the beginning of a - % line. (Otherwise, we would consider a line `@c @ifset', for - % example, to count as an @ifset for nesting.) - \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% - % - % And now expand that command. - \doignoretext ^^M% - }% -} - -\def\doignoreyyy#1{% - \def\temp{#1}% - \ifx\temp\empty % Nothing found. - \let\next\doignoretextzzz - \else % Found a nested condition, ... - \advance\doignorecount by 1 - \let\next\doignoretextyyy % ..., look for another. - % If we're here, #1 ends with ^^M\ifinfo (for example). - \fi - \next #1% the token \_STOP_ is present just after this macro. -} - -% We have to swallow the remaining "\_STOP_". -% -\def\doignoretextzzz#1{% - \ifnum\doignorecount = 0 % We have just found the outermost @end. - \let\next\enddoignore - \else % Still inside a nested condition. - \advance\doignorecount by -1 - \let\next\doignoretext % Look for the next @end. - \fi - \next -} - -% Finish off ignored text. -{ \obeylines% - % Ignore anything after the last `@end #1'; this matters in verbatim - % environments, where otherwise the newline after an ignored conditional - % would result in a blank line in the output. - \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% -} - - -% @set VAR sets the variable VAR to an empty value. -% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. -% -% Since we want to separate VAR from REST-OF-LINE (which might be -% empty), we can't just use \parsearg; we have to insert a space of our -% own to delimit the rest of the line, and then take it out again if we -% didn't need it. -% We rely on the fact that \parsearg sets \catcode`\ =10. -% -\parseargdef\set{\setyyy#1 \endsetyyy} -\def\setyyy#1 #2\endsetyyy{% - {% - \makevalueexpandable - \def\temp{#2}% - \edef\next{\gdef\makecsname{SET#1}}% - \ifx\temp\empty - \next{}% - \else - \setzzz#2\endsetzzz - \fi - }% -} -% Remove the trailing space \setxxx inserted. -\def\setzzz#1 \endsetzzz{\next{#1}} - -% @clear VAR clears (i.e., unsets) the variable VAR. -% -\parseargdef\clear{% - {% - \makevalueexpandable - \global\expandafter\let\csname SET#1\endcsname=\relax - }% -} - -% @value{foo} gets the text saved in variable foo. -\def\value{\begingroup\makevalueexpandable\valuexxx} -\def\valuexxx#1{\expandablevalue{#1}\endgroup} -{ - \catcode`\- = \active \catcode`\_ = \active - % - \gdef\makevalueexpandable{% - \let\value = \expandablevalue - % We don't want these characters active, ... - \catcode`\-=\other \catcode`\_=\other - % ..., but we might end up with active ones in the argument if - % we're called from @code, as @code{@value{foo-bar_}}, though. - % So \let them to their normal equivalents. - \let-\realdash \let_\normalunderscore - } -} - -% We have this subroutine so that we can handle at least some @value's -% properly in indexes (we call \makevalueexpandable in \indexdummies). -% The command has to be fully expandable (if the variable is set), since -% the result winds up in the index file. This means that if the -% variable's value contains other Texinfo commands, it's almost certain -% it will fail (although perhaps we could fix that with sufficient work -% to do a one-level expansion on the result, instead of complete). -% -\def\expandablevalue#1{% - \expandafter\ifx\csname SET#1\endcsname\relax - {[No value for ``#1'']}% - \message{Variable `#1', used in @value, is not set.}% - \else - \csname SET#1\endcsname - \fi -} - -% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined -% with @set. -% -% To get special treatment of `@end ifset,' call \makeond and the redefine. -% -\makecond{ifset} -\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} -\def\doifset#1#2{% - {% - \makevalueexpandable - \let\next=\empty - \expandafter\ifx\csname SET#2\endcsname\relax - #1% If not set, redefine \next. - \fi - \expandafter - }\next -} -\def\ifsetfail{\doignore{ifset}} - -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been -% defined with @set, or has been undefined with @clear. -% -% The `\else' inside the `\doifset' parameter is a trick to reuse the -% above code: if the variable is not set, do nothing, if it is set, -% then redefine \next to \ifclearfail. -% -\makecond{ifclear} -\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} -\def\ifclearfail{\doignore{ifclear}} - -% @dircategory CATEGORY -- specify a category of the dir file -% which this file should belong to. Ignore this in TeX. -\let\dircategory=\comment - -% @defininfoenclose. -\let\definfoenclose=\comment - - -\message{indexing,} -% Index generation facilities - -% Define \newwrite to be identical to plain tex's \newwrite -% except not \outer, so it can be used within macros and \if's. -\edef\newwrite{\makecsname{ptexnewwrite}} - -% \newindex {foo} defines an index named foo. -% It automatically defines \fooindex such that -% \fooindex ...rest of line... puts an entry in the index foo. -% It also defines \fooindfile to be the number of the output channel for -% the file that accumulates this index. The file's extension is foo. -% The name of an index should be no more than 2 characters long -% for the sake of vms. -% -\def\newindex#1{% - \iflinks - \expandafter\newwrite \csname#1indfile\endcsname - \openout \csname#1indfile\endcsname \jobname.#1 % Open the file - \fi - \expandafter\xdef\csname#1index\endcsname{% % Define @#1index - \noexpand\doindex{#1}} -} - -% @defindex foo == \newindex{foo} -% -\def\defindex{\parsearg\newindex} - -% Define @defcodeindex, like @defindex except put all entries in @code. -% -\def\defcodeindex{\parsearg\newcodeindex} -% -\def\newcodeindex#1{% - \iflinks - \expandafter\newwrite \csname#1indfile\endcsname - \openout \csname#1indfile\endcsname \jobname.#1 - \fi - \expandafter\xdef\csname#1index\endcsname{% - \noexpand\docodeindex{#1}}% -} - - -% @synindex foo bar makes index foo feed into index bar. -% Do this instead of @defindex foo if you don't want it as a separate index. -% -% @syncodeindex foo bar similar, but put all entries made for index foo -% inside @code. -% -\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} -\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} - -% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), -% #3 the target index (bar). -\def\dosynindex#1#2#3{% - % Only do \closeout if we haven't already done it, else we'll end up - % closing the target index. - \expandafter \ifx\csname donesynindex#2\endcsname \relax - % The \closeout helps reduce unnecessary open files; the limit on the - % Acorn RISC OS is a mere 16 files. - \expandafter\closeout\csname#2indfile\endcsname - \expandafter\let\csname donesynindex#2\endcsname = 1 - \fi - % redefine \fooindfile: - \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname - \expandafter\let\csname#2indfile\endcsname=\temp - % redefine \fooindex: - \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% -} - -% Define \doindex, the driver for all \fooindex macros. -% Argument #1 is generated by the calling \fooindex macro, -% and it is "foo", the name of the index. - -% \doindex just uses \parsearg; it calls \doind for the actual work. -% This is because \doind is more useful to call from other macros. - -% There is also \dosubind {index}{topic}{subtopic} -% which makes an entry in a two-level index such as the operation index. - -\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} -\def\singleindexer #1{\doind{\indexname}{#1}} - -% like the previous two, but they put @code around the argument. -\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} -\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} - -% Take care of Texinfo commands that can appear in an index entry. -% Since there are some commands we want to expand, and others we don't, -% we have to laboriously prevent expansion for those that we don't. -% -\def\indexdummies{% - \escapechar = `\\ % use backslash in output files. - \def\@{@}% change to @@ when we switch to @ as escape char in index files. - \def\ {\realbackslash\space }% - % - % Need these in case \tex is in effect and \{ is a \delimiter again. - % But can't use \lbracecmd and \rbracecmd because texindex assumes - % braces and backslashes are used only as delimiters. - \let\{ = \mylbrace - \let\} = \myrbrace - % - % I don't entirely understand this, but when an index entry is - % generated from a macro call, the \endinput which \scanmacro inserts - % causes processing to be prematurely terminated. This is, - % apparently, because \indexsorttmp is fully expanded, and \endinput - % is an expandable command. The redefinition below makes \endinput - % disappear altogether for that purpose -- although logging shows that - % processing continues to some further point. On the other hand, it - % seems \endinput does not hurt in the printed index arg, since that - % is still getting written without apparent harm. - % - % Sample source (mac-idx3.tex, reported by Graham Percival to - % help-texinfo, 22may06): - % @macro funindex {WORD} - % @findex xyz - % @end macro - % ... - % @funindex commtest - % - % The above is not enough to reproduce the bug, but it gives the flavor. - % - % Sample whatsit resulting: - % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} - % - % So: - \let\endinput = \empty - % - % Do the redefinitions. - \commondummies -} - -% For the aux and toc files, @ is the escape character. So we want to -% redefine everything using @ as the escape character (instead of -% \realbackslash, still used for index files). When everything uses @, -% this will be simpler. -% -\def\atdummies{% - \def\@{@@}% - \def\ {@ }% - \let\{ = \lbraceatcmd - \let\} = \rbraceatcmd - % - % Do the redefinitions. - \commondummies - \otherbackslash -} - -% Called from \indexdummies and \atdummies. -% -\def\commondummies{% - % - % \definedummyword defines \#1 as \string\#1\space, thus effectively - % preventing its expansion. This is used only for control% words, - % not control letters, because the \space would be incorrect for - % control characters, but is needed to separate the control word - % from whatever follows. - % - % For control letters, we have \definedummyletter, which omits the - % space. - % - % These can be used both for control words that take an argument and - % those that do not. If it is followed by {arg} in the input, then - % that will dutifully get written to the index (or wherever). - % - \def\definedummyword ##1{\def##1{\string##1\space}}% - \def\definedummyletter##1{\def##1{\string##1}}% - \let\definedummyaccent\definedummyletter - % - \commondummiesnofonts - % - \definedummyletter\_% - % - % Non-English letters. - \definedummyword\AA - \definedummyword\AE - \definedummyword\DH - \definedummyword\L - \definedummyword\O - \definedummyword\OE - \definedummyword\TH - \definedummyword\aa - \definedummyword\ae - \definedummyword\dh - \definedummyword\exclamdown - \definedummyword\l - \definedummyword\o - \definedummyword\oe - \definedummyword\ordf - \definedummyword\ordm - \definedummyword\questiondown - \definedummyword\ss - \definedummyword\th - % - % Although these internal commands shouldn't show up, sometimes they do. - \definedummyword\bf - \definedummyword\gtr - \definedummyword\hat - \definedummyword\less - \definedummyword\sf - \definedummyword\sl - \definedummyword\tclose - \definedummyword\tt - % - \definedummyword\LaTeX - \definedummyword\TeX - % - % Assorted special characters. - \definedummyword\bullet - \definedummyword\comma - \definedummyword\copyright - \definedummyword\registeredsymbol - \definedummyword\dots - \definedummyword\enddots - \definedummyword\equiv - \definedummyword\error - \definedummyword\euro - \definedummyword\guillemetleft - \definedummyword\guillemetright - \definedummyword\guilsinglleft - \definedummyword\guilsinglright - \definedummyword\expansion - \definedummyword\minus - \definedummyword\ogonek - \definedummyword\pounds - \definedummyword\point - \definedummyword\print - \definedummyword\quotedblbase - \definedummyword\quotedblleft - \definedummyword\quotedblright - \definedummyword\quoteleft - \definedummyword\quoteright - \definedummyword\quotesinglbase - \definedummyword\result - \definedummyword\textdegree - % - % We want to disable all macros so that they are not expanded by \write. - \macrolist - % - \normalturnoffactive - % - % Handle some cases of @value -- where it does not contain any - % (non-fully-expandable) commands. - \makevalueexpandable -} - -% \commondummiesnofonts: common to \commondummies and \indexnofonts. -% -\def\commondummiesnofonts{% - % Control letters and accents. - \definedummyletter\!% - \definedummyaccent\"% - \definedummyaccent\'% - \definedummyletter\*% - \definedummyaccent\,% - \definedummyletter\.% - \definedummyletter\/% - \definedummyletter\:% - \definedummyaccent\=% - \definedummyletter\?% - \definedummyaccent\^% - \definedummyaccent\`% - \definedummyaccent\~% - \definedummyword\u - \definedummyword\v - \definedummyword\H - \definedummyword\dotaccent - \definedummyword\ogonek - \definedummyword\ringaccent - \definedummyword\tieaccent - \definedummyword\ubaraccent - \definedummyword\udotaccent - \definedummyword\dotless - % - % Texinfo font commands. - \definedummyword\b - \definedummyword\i - \definedummyword\r - \definedummyword\sc - \definedummyword\t - % - % Commands that take arguments. - \definedummyword\acronym - \definedummyword\cite - \definedummyword\code - \definedummyword\command - \definedummyword\dfn - \definedummyword\email - \definedummyword\emph - \definedummyword\env - \definedummyword\file - \definedummyword\kbd - \definedummyword\key - \definedummyword\math - \definedummyword\option - \definedummyword\pxref - \definedummyword\ref - \definedummyword\samp - \definedummyword\strong - \definedummyword\tie - \definedummyword\uref - \definedummyword\url - \definedummyword\var - \definedummyword\verb - \definedummyword\w - \definedummyword\xref -} - -% \indexnofonts is used when outputting the strings to sort the index -% by, and when constructing control sequence names. It eliminates all -% control sequences and just writes whatever the best ASCII sort string -% would be for a given command (usually its argument). -% -\def\indexnofonts{% - % Accent commands should become @asis. - \def\definedummyaccent##1{\let##1\asis}% - % We can just ignore other control letters. - \def\definedummyletter##1{\let##1\empty}% - % Hopefully, all control words can become @asis. - \let\definedummyword\definedummyaccent - % - \commondummiesnofonts - % - % Don't no-op \tt, since it isn't a user-level command - % and is used in the definitions of the active chars like <, >, |, etc. - % Likewise with the other plain tex font commands. - %\let\tt=\asis - % - \def\ { }% - \def\@{@}% - % how to handle braces? - \def\_{\normalunderscore}% - % - % Non-English letters. - \def\AA{AA}% - \def\AE{AE}% - \def\DH{DZZ}% - \def\L{L}% - \def\OE{OE}% - \def\O{O}% - \def\TH{ZZZ}% - \def\aa{aa}% - \def\ae{ae}% - \def\dh{dzz}% - \def\exclamdown{!}% - \def\l{l}% - \def\oe{oe}% - \def\ordf{a}% - \def\ordm{o}% - \def\o{o}% - \def\questiondown{?}% - \def\ss{ss}% - \def\th{zzz}% - % - \def\LaTeX{LaTeX}% - \def\TeX{TeX}% - % - % Assorted special characters. - % (The following {} will end up in the sort string, but that's ok.) - \def\bullet{bullet}% - \def\comma{,}% - \def\copyright{copyright}% - \def\dots{...}% - \def\enddots{...}% - \def\equiv{==}% - \def\error{error}% - \def\euro{euro}% - \def\expansion{==>}% - \def\guillemetleft{<<}% - \def\guillemetright{>>}% - \def\guilsinglleft{<}% - \def\guilsinglright{>}% - \def\minus{-}% - \def\point{.}% - \def\pounds{pounds}% - \def\print{-|}% - \def\quotedblbase{"}% - \def\quotedblleft{"}% - \def\quotedblright{"}% - \def\quoteleft{`}% - \def\quoteright{'}% - \def\quotesinglbase{,}% - \def\registeredsymbol{R}% - \def\result{=>}% - \def\textdegree{o}% - % - % We need to get rid of all macros, leaving only the arguments (if present). - % Of course this is not nearly correct, but it is the best we can do for now. - % makeinfo does not expand macros in the argument to @deffn, which ends up - % writing an index entry, and texindex isn't prepared for an index sort entry - % that starts with \. - % - % Since macro invocations are followed by braces, we can just redefine them - % to take a single TeX argument. The case of a macro invocation that - % goes to end-of-line is not handled. - % - \macrolist -} - -\let\indexbackslash=0 %overridden during \printindex. -\let\SETmarginindex=\relax % put index entries in margin (undocumented)? - -% Most index entries go through here, but \dosubind is the general case. -% #1 is the index name, #2 is the entry text. -\def\doind#1#2{\dosubind{#1}{#2}{}} - -% Workhorse for all \fooindexes. -% #1 is name of index, #2 is stuff to put there, #3 is subentry -- -% empty if called from \doind, as we usually are (the main exception -% is with most defuns, which call us directly). -% -\def\dosubind#1#2#3{% - \iflinks - {% - % Store the main index entry text (including the third arg). - \toks0 = {#2}% - % If third arg is present, precede it with a space. - \def\thirdarg{#3}% - \ifx\thirdarg\empty \else - \toks0 = \expandafter{\the\toks0 \space #3}% - \fi - % - \edef\writeto{\csname#1indfile\endcsname}% - % - \safewhatsit\dosubindwrite - }% - \fi -} - -% Write the entry in \toks0 to the index file: -% -\def\dosubindwrite{% - % Put the index entry in the margin if desired. - \ifx\SETmarginindex\relax\else - \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% - \fi - % - % Remember, we are within a group. - \indexdummies % Must do this here, since \bf, etc expand at this stage - \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now - % so it will be output as is; and it will print as backslash. - % - % Process the index entry with all font commands turned off, to - % get the string to sort by. - {\indexnofonts - \edef\temp{\the\toks0}% need full expansion - \xdef\indexsorttmp{\temp}% - }% - % - % Set up the complete index entry, with both the sort key and - % the original text, including any font commands. We write - % three arguments to \entry to the .?? file (four in the - % subentry case), texindex reduces to two when writing the .??s - % sorted result. - \edef\temp{% - \write\writeto{% - \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% - }% - \temp -} - -% Take care of unwanted page breaks/skips around a whatsit: -% -% If a skip is the last thing on the list now, preserve it -% by backing up by \lastskip, doing the \write, then inserting -% the skip again. Otherwise, the whatsit generated by the -% \write or \pdfdest will make \lastskip zero. The result is that -% sequences like this: -% @end defun -% @tindex whatever -% @defun ... -% will have extra space inserted, because the \medbreak in the -% start of the @defun won't see the skip inserted by the @end of -% the previous defun. -% -% But don't do any of this if we're not in vertical mode. We -% don't want to do a \vskip and prematurely end a paragraph. -% -% Avoid page breaks due to these extra skips, too. -% -% But wait, there is a catch there: -% We'll have to check whether \lastskip is zero skip. \ifdim is not -% sufficient for this purpose, as it ignores stretch and shrink parts -% of the skip. The only way seems to be to check the textual -% representation of the skip. -% -% The following is almost like \def\zeroskipmacro{0.0pt} except that -% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). -% -\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} -% -\newskip\whatsitskip -\newcount\whatsitpenalty -% -% ..., ready, GO: -% -\def\safewhatsit#1{% -\ifhmode - #1% -\else - % \lastskip and \lastpenalty cannot both be nonzero simultaneously. - \whatsitskip = \lastskip - \edef\lastskipmacro{\the\lastskip}% - \whatsitpenalty = \lastpenalty - % - % If \lastskip is nonzero, that means the last item was a - % skip. And since a skip is discardable, that means this - % -\whatsitskip glue we're inserting is preceded by a - % non-discardable item, therefore it is not a potential - % breakpoint, therefore no \nobreak needed. - \ifx\lastskipmacro\zeroskipmacro - \else - \vskip-\whatsitskip - \fi - % - #1% - % - \ifx\lastskipmacro\zeroskipmacro - % If \lastskip was zero, perhaps the last item was a penalty, and - % perhaps it was >=10000, e.g., a \nobreak. In that case, we want - % to re-insert the same penalty (values >10000 are used for various - % signals); since we just inserted a non-discardable item, any - % following glue (such as a \parskip) would be a breakpoint. For example: - % - % @deffn deffn-whatever - % @vindex index-whatever - % Description. - % would allow a break between the index-whatever whatsit - % and the "Description." paragraph. - \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi - \else - % On the other hand, if we had a nonzero \lastskip, - % this make-up glue would be preceded by a non-discardable item - % (the whatsit from the \write), so we must insert a \nobreak. - \nobreak\vskip\whatsitskip - \fi -\fi -} - -% The index entry written in the file actually looks like -% \entry {sortstring}{page}{topic} -% or -% \entry {sortstring}{page}{topic}{subtopic} -% The texindex program reads in these files and writes files -% containing these kinds of lines: -% \initial {c} -% before the first topic whose initial is c -% \entry {topic}{pagelist} -% for a topic that is used without subtopics -% \primary {topic} -% for the beginning of a topic that is used with subtopics -% \secondary {subtopic}{pagelist} -% for each subtopic. - -% Define the user-accessible indexing commands -% @findex, @vindex, @kindex, @cindex. - -\def\findex {\fnindex} -\def\kindex {\kyindex} -\def\cindex {\cpindex} -\def\vindex {\vrindex} -\def\tindex {\tpindex} -\def\pindex {\pgindex} - -\def\cindexsub {\begingroup\obeylines\cindexsub} -{\obeylines % -\gdef\cindexsub "#1" #2^^M{\endgroup % -\dosubind{cp}{#2}{#1}}} - -% Define the macros used in formatting output of the sorted index material. - -% @printindex causes a particular index (the ??s file) to get printed. -% It does not print any chapter heading (usually an @unnumbered). -% -\parseargdef\printindex{\begingroup - \dobreak \chapheadingskip{10000}% - % - \smallfonts \rm - \tolerance = 9500 - \plainfrenchspacing - \everypar = {}% don't want the \kern\-parindent from indentation suppression. - % - % See if the index file exists and is nonempty. - % Change catcode of @ here so that if the index file contains - % \initial {@} - % as its first line, TeX doesn't complain about mismatched braces - % (because it thinks @} is a control sequence). - \catcode`\@ = 11 - \openin 1 \jobname.#1s - \ifeof 1 - % \enddoublecolumns gets confused if there is no text in the index, - % and it loses the chapter title and the aux file entries for the - % index. The easiest way to prevent this problem is to make sure - % there is some text. - \putwordIndexNonexistent - \else - % - % If the index file exists but is empty, then \openin leaves \ifeof - % false. We have to make TeX try to read something from the file, so - % it can discover if there is anything in it. - \read 1 to \temp - \ifeof 1 - \putwordIndexIsEmpty - \else - % Index files are almost Texinfo source, but we use \ as the escape - % character. It would be better to use @, but that's too big a change - % to make right now. - \def\indexbackslash{\backslashcurfont}% - \catcode`\\ = 0 - \escapechar = `\\ - \begindoublecolumns - \input \jobname.#1s - \enddoublecolumns - \fi - \fi - \closein 1 -\endgroup} - -% These macros are used by the sorted index file itself. -% Change them to control the appearance of the index. - -\def\initial#1{{% - % Some minor font changes for the special characters. - \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt - % - % Remove any glue we may have, we'll be inserting our own. - \removelastskip - % - % We like breaks before the index initials, so insert a bonus. - \nobreak - \vskip 0pt plus 3\baselineskip - \penalty 0 - \vskip 0pt plus -3\baselineskip - % - % Typeset the initial. Making this add up to a whole number of - % baselineskips increases the chance of the dots lining up from column - % to column. It still won't often be perfect, because of the stretch - % we need before each entry, but it's better. - % - % No shrink because it confuses \balancecolumns. - \vskip 1.67\baselineskip plus .5\baselineskip - \leftline{\secbf #1}% - % Do our best not to break after the initial. - \nobreak - \vskip .33\baselineskip plus .1\baselineskip -}} - -% \entry typesets a paragraph consisting of the text (#1), dot leaders, and -% then page number (#2) flushed to the right margin. It is used for index -% and table of contents entries. The paragraph is indented by \leftskip. -% -% A straightforward implementation would start like this: -% \def\entry#1#2{... -% But this freezes the catcodes in the argument, and can cause problems to -% @code, which sets - active. This problem was fixed by a kludge--- -% ``-'' was active throughout whole index, but this isn't really right. -% -% The right solution is to prevent \entry from swallowing the whole text. -% --kasal, 21nov03 -\def\entry{% - \begingroup - % - % Start a new paragraph if necessary, so our assignments below can't - % affect previous text. - \par - % - % Do not fill out the last line with white space. - \parfillskip = 0in - % - % No extra space above this paragraph. - \parskip = 0in - % - % Do not prefer a separate line ending with a hyphen to fewer lines. - \finalhyphendemerits = 0 - % - % \hangindent is only relevant when the entry text and page number - % don't both fit on one line. In that case, bob suggests starting the - % dots pretty far over on the line. Unfortunately, a large - % indentation looks wrong when the entry text itself is broken across - % lines. So we use a small indentation and put up with long leaders. - % - % \hangafter is reset to 1 (which is the value we want) at the start - % of each paragraph, so we need not do anything with that. - \hangindent = 2em - % - % When the entry text needs to be broken, just fill out the first line - % with blank space. - \rightskip = 0pt plus1fil - % - % A bit of stretch before each entry for the benefit of balancing - % columns. - \vskip 0pt plus1pt - % - % Swallow the left brace of the text (first parameter): - \afterassignment\doentry - \let\temp = -} -\def\doentry{% - \bgroup % Instead of the swallowed brace. - \noindent - \aftergroup\finishentry - % And now comes the text of the entry. -} -\def\finishentry#1{% - % #1 is the page number. - % - % The following is kludged to not output a line of dots in the index if - % there are no page numbers. The next person who breaks this will be - % cursed by a Unix daemon. - \setbox\boxA = \hbox{#1}% - \ifdim\wd\boxA = 0pt - \ % - \else - % - % If we must, put the page number on a line of its own, and fill out - % this line with blank space. (The \hfil is overwhelmed with the - % fill leaders glue in \indexdotfill if the page number does fit.) - \hfil\penalty50 - \null\nobreak\indexdotfill % Have leaders before the page number. - % - % The `\ ' here is removed by the implicit \unskip that TeX does as - % part of (the primitive) \par. Without it, a spurious underfull - % \hbox ensues. - \ifpdf - \pdfgettoks#1.% - \ \the\toksA - \else - \ #1% - \fi - \fi - \par - \endgroup -} - -% Like plain.tex's \dotfill, except uses up at least 1 em. -\def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} - -\def\primary #1{\line{#1\hfil}} - -\newskip\secondaryindent \secondaryindent=0.5cm -\def\secondary#1#2{{% - \parfillskip=0in - \parskip=0in - \hangindent=1in - \hangafter=1 - \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill - \ifpdf - \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. - \else - #2 - \fi - \par -}} - -% Define two-column mode, which we use to typeset indexes. -% Adapted from the TeXbook, page 416, which is to say, -% the manmac.tex format used to print the TeXbook itself. -\catcode`\@=11 - -\newbox\partialpage -\newdimen\doublecolumnhsize - -\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns - % Grab any single-column material above us. - \output = {% - % - % Here is a possibility not foreseen in manmac: if we accumulate a - % whole lot of material, we might end up calling this \output - % routine twice in a row (see the doublecol-lose test, which is - % essentially a couple of indexes with @setchapternewpage off). In - % that case we just ship out what is in \partialpage with the normal - % output routine. Generally, \partialpage will be empty when this - % runs and this will be a no-op. See the indexspread.tex test case. - \ifvoid\partialpage \else - \onepageout{\pagecontents\partialpage}% - \fi - % - \global\setbox\partialpage = \vbox{% - % Unvbox the main output page. - \unvbox\PAGE - \kern-\topskip \kern\baselineskip - }% - }% - \eject % run that output routine to set \partialpage - % - % Use the double-column output routine for subsequent pages. - \output = {\doublecolumnout}% - % - % Change the page size parameters. We could do this once outside this - % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 - % format, but then we repeat the same computation. Repeating a couple - % of assignments once per index is clearly meaningless for the - % execution time, so we may as well do it in one place. - % - % First we halve the line length, less a little for the gutter between - % the columns. We compute the gutter based on the line length, so it - % changes automatically with the paper format. The magic constant - % below is chosen so that the gutter has the same value (well, +-<1pt) - % as it did when we hard-coded it. - % - % We put the result in a separate register, \doublecolumhsize, so we - % can restore it in \pagesofar, after \hsize itself has (potentially) - % been clobbered. - % - \doublecolumnhsize = \hsize - \advance\doublecolumnhsize by -.04154\hsize - \divide\doublecolumnhsize by 2 - \hsize = \doublecolumnhsize - % - % Double the \vsize as well. (We don't need a separate register here, - % since nobody clobbers \vsize.) - \vsize = 2\vsize -} - -% The double-column output routine for all double-column pages except -% the last. -% -\def\doublecolumnout{% - \splittopskip=\topskip \splitmaxdepth=\maxdepth - % Get the available space for the double columns -- the normal - % (undoubled) page height minus any material left over from the - % previous page. - \dimen@ = \vsize - \divide\dimen@ by 2 - \advance\dimen@ by -\ht\partialpage - % - % box0 will be the left-hand column, box2 the right. - \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ - \onepageout\pagesofar - \unvbox255 - \penalty\outputpenalty -} -% -% Re-output the contents of the output page -- any previous material, -% followed by the two boxes we just split, in box0 and box2. -\def\pagesofar{% - \unvbox\partialpage - % - \hsize = \doublecolumnhsize - \wd0=\hsize \wd2=\hsize - \hbox to\pagewidth{\box0\hfil\box2}% -} -% -% All done with double columns. -\def\enddoublecolumns{% - % The following penalty ensures that the page builder is exercised - % _before_ we change the output routine. This is necessary in the - % following situation: - % - % The last section of the index consists only of a single entry. - % Before this section, \pagetotal is less than \pagegoal, so no - % break occurs before the last section starts. However, the last - % section, consisting of \initial and the single \entry, does not - % fit on the page and has to be broken off. Without the following - % penalty the page builder will not be exercised until \eject - % below, and by that time we'll already have changed the output - % routine to the \balancecolumns version, so the next-to-last - % double-column page will be processed with \balancecolumns, which - % is wrong: The two columns will go to the main vertical list, with - % the broken-off section in the recent contributions. As soon as - % the output routine finishes, TeX starts reconsidering the page - % break. The two columns and the broken-off section both fit on the - % page, because the two columns now take up only half of the page - % goal. When TeX sees \eject from below which follows the final - % section, it invokes the new output routine that we've set after - % \balancecolumns below; \onepageout will try to fit the two columns - % and the final section into the vbox of \pageheight (see - % \pagebody), causing an overfull box. - % - % Note that glue won't work here, because glue does not exercise the - % page builder, unlike penalties (see The TeXbook, pp. 280-281). - \penalty0 - % - \output = {% - % Split the last of the double-column material. Leave it on the - % current page, no automatic page break. - \balancecolumns - % - % If we end up splitting too much material for the current page, - % though, there will be another page break right after this \output - % invocation ends. Having called \balancecolumns once, we do not - % want to call it again. Therefore, reset \output to its normal - % definition right away. (We hope \balancecolumns will never be - % called on to balance too much material, but if it is, this makes - % the output somewhat more palatable.) - \global\output = {\onepageout{\pagecontents\PAGE}}% - }% - \eject - \endgroup % started in \begindoublecolumns - % - % \pagegoal was set to the doubled \vsize above, since we restarted - % the current page. We're now back to normal single-column - % typesetting, so reset \pagegoal to the normal \vsize (after the - % \endgroup where \vsize got restored). - \pagegoal = \vsize -} -% -% Called at the end of the double column material. -\def\balancecolumns{% - \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. - \dimen@ = \ht0 - \advance\dimen@ by \topskip - \advance\dimen@ by-\baselineskip - \divide\dimen@ by 2 % target to split to - %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% - \splittopskip = \topskip - % Loop until we get a decent breakpoint. - {% - \vbadness = 10000 - \loop - \global\setbox3 = \copy0 - \global\setbox1 = \vsplit3 to \dimen@ - \ifdim\ht3>\dimen@ - \global\advance\dimen@ by 1pt - \repeat - }% - %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% - \setbox0=\vbox to\dimen@{\unvbox1}% - \setbox2=\vbox to\dimen@{\unvbox3}% - % - \pagesofar -} -\catcode`\@ = \other - - -\message{sectioning,} -% Chapters, sections, etc. - -% \unnumberedno is an oxymoron, of course. But we count the unnumbered -% sections so that we can refer to them unambiguously in the pdf -% outlines by their "section number". We avoid collisions with chapter -% numbers by starting them at 10000. (If a document ever has 10000 -% chapters, we're in trouble anyway, I'm sure.) -\newcount\unnumberedno \unnumberedno = 10000 -\newcount\chapno -\newcount\secno \secno=0 -\newcount\subsecno \subsecno=0 -\newcount\subsubsecno \subsubsecno=0 - -% This counter is funny since it counts through charcodes of letters A, B, ... -\newcount\appendixno \appendixno = `\@ -% -% \def\appendixletter{\char\the\appendixno} -% We do the following ugly conditional instead of the above simple -% construct for the sake of pdftex, which needs the actual -% letter in the expansion, not just typeset. -% -\def\appendixletter{% - \ifnum\appendixno=`A A% - \else\ifnum\appendixno=`B B% - \else\ifnum\appendixno=`C C% - \else\ifnum\appendixno=`D D% - \else\ifnum\appendixno=`E E% - \else\ifnum\appendixno=`F F% - \else\ifnum\appendixno=`G G% - \else\ifnum\appendixno=`H H% - \else\ifnum\appendixno=`I I% - \else\ifnum\appendixno=`J J% - \else\ifnum\appendixno=`K K% - \else\ifnum\appendixno=`L L% - \else\ifnum\appendixno=`M M% - \else\ifnum\appendixno=`N N% - \else\ifnum\appendixno=`O O% - \else\ifnum\appendixno=`P P% - \else\ifnum\appendixno=`Q Q% - \else\ifnum\appendixno=`R R% - \else\ifnum\appendixno=`S S% - \else\ifnum\appendixno=`T T% - \else\ifnum\appendixno=`U U% - \else\ifnum\appendixno=`V V% - \else\ifnum\appendixno=`W W% - \else\ifnum\appendixno=`X X% - \else\ifnum\appendixno=`Y Y% - \else\ifnum\appendixno=`Z Z% - % The \the is necessary, despite appearances, because \appendixletter is - % expanded while writing the .toc file. \char\appendixno is not - % expandable, thus it is written literally, thus all appendixes come out - % with the same letter (or @) in the toc without it. - \else\char\the\appendixno - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} - -% Each @chapter defines these (using marks) as the number+name, number -% and name of the chapter. Page headings and footings can use -% these. @section does likewise. -\def\thischapter{} -\def\thischapternum{} -\def\thischaptername{} -\def\thissection{} -\def\thissectionnum{} -\def\thissectionname{} - -\newcount\absseclevel % used to calculate proper heading level -\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count - -% @raisesections: treat @section as chapter, @subsection as section, etc. -\def\raisesections{\global\advance\secbase by -1} -\let\up=\raisesections % original BFox name - -% @lowersections: treat @chapter as section, @section as subsection, etc. -\def\lowersections{\global\advance\secbase by 1} -\let\down=\lowersections % original BFox name - -% we only have subsub. -\chardef\maxseclevel = 3 -% -% A numbered section within an unnumbered changes to unnumbered too. -% To achive this, remember the "biggest" unnum. sec. we are currently in: -\chardef\unmlevel = \maxseclevel -% -% Trace whether the current chapter is an appendix or not: -% \chapheadtype is "N" or "A", unnumbered chapters are ignored. -\def\chapheadtype{N} - -% Choose a heading macro -% #1 is heading type -% #2 is heading level -% #3 is text for heading -\def\genhead#1#2#3{% - % Compute the abs. sec. level: - \absseclevel=#2 - \advance\absseclevel by \secbase - % Make sure \absseclevel doesn't fall outside the range: - \ifnum \absseclevel < 0 - \absseclevel = 0 - \else - \ifnum \absseclevel > 3 - \absseclevel = 3 - \fi - \fi - % The heading type: - \def\headtype{#1}% - \if \headtype U% - \ifnum \absseclevel < \unmlevel - \chardef\unmlevel = \absseclevel - \fi - \else - % Check for appendix sections: - \ifnum \absseclevel = 0 - \edef\chapheadtype{\headtype}% - \else - \if \headtype A\if \chapheadtype N% - \errmessage{@appendix... within a non-appendix chapter}% - \fi\fi - \fi - % Check for numbered within unnumbered: - \ifnum \absseclevel > \unmlevel - \def\headtype{U}% - \else - \chardef\unmlevel = 3 - \fi - \fi - % Now print the heading: - \if \headtype U% - \ifcase\absseclevel - \unnumberedzzz{#3}% - \or \unnumberedseczzz{#3}% - \or \unnumberedsubseczzz{#3}% - \or \unnumberedsubsubseczzz{#3}% - \fi - \else - \if \headtype A% - \ifcase\absseclevel - \appendixzzz{#3}% - \or \appendixsectionzzz{#3}% - \or \appendixsubseczzz{#3}% - \or \appendixsubsubseczzz{#3}% - \fi - \else - \ifcase\absseclevel - \chapterzzz{#3}% - \or \seczzz{#3}% - \or \numberedsubseczzz{#3}% - \or \numberedsubsubseczzz{#3}% - \fi - \fi - \fi - \suppressfirstparagraphindent -} - -% an interface: -\def\numhead{\genhead N} -\def\apphead{\genhead A} -\def\unnmhead{\genhead U} - -% @chapter, @appendix, @unnumbered. Increment top-level counter, reset -% all lower-level sectioning counters to zero. -% -% Also set \chaplevelprefix, which we prepend to @float sequence numbers -% (e.g., figures), q.v. By default (before any chapter), that is empty. -\let\chaplevelprefix = \empty -% -\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz -\def\chapterzzz#1{% - % section resetting is \global in case the chapter is in a group, such - % as an @include file. - \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 - \global\advance\chapno by 1 - % - % Used for \float. - \gdef\chaplevelprefix{\the\chapno.}% - \resetallfloatnos - % - % \putwordChapter can contain complex things in translations. - \toks0=\expandafter{\putwordChapter}% - \message{\the\toks0 \space \the\chapno}% - % - % Write the actual heading. - \chapmacro{#1}{Ynumbered}{\the\chapno}% - % - % So @section and the like are numbered underneath this chapter. - \global\let\section = \numberedsec - \global\let\subsection = \numberedsubsec - \global\let\subsubsection = \numberedsubsubsec -} - -\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz -% -\def\appendixzzz#1{% - \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 - \global\advance\appendixno by 1 - \gdef\chaplevelprefix{\appendixletter.}% - \resetallfloatnos - % - % \putwordAppendix can contain complex things in translations. - \toks0=\expandafter{\putwordAppendix}% - \message{\the\toks0 \space \appendixletter}% - % - \chapmacro{#1}{Yappendix}{\appendixletter}% - % - \global\let\section = \appendixsec - \global\let\subsection = \appendixsubsec - \global\let\subsubsection = \appendixsubsubsec -} - -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz -\def\unnumberedzzz#1{% - \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 - \global\advance\unnumberedno by 1 - % - % Since an unnumbered has no number, no prefix for figures. - \global\let\chaplevelprefix = \empty - \resetallfloatnos - % - % This used to be simply \message{#1}, but TeX fully expands the - % argument to \message. Therefore, if #1 contained @-commands, TeX - % expanded them. For example, in `@unnumbered The @cite{Book}', TeX - % expanded @cite (which turns out to cause errors because \cite is meant - % to be executed, not expanded). - % - % Anyway, we don't want the fully-expanded definition of @cite to appear - % as a result of the \message, we just want `@cite' itself. We use - % \the to achieve this: TeX expands \the only once, - % simply yielding the contents of . (We also do this for - % the toc entries.) - \toks0 = {#1}% - \message{(\the\toks0)}% - % - \chapmacro{#1}{Ynothing}{\the\unnumberedno}% - % - \global\let\section = \unnumberedsec - \global\let\subsection = \unnumberedsubsec - \global\let\subsubsection = \unnumberedsubsubsec -} - -% @centerchap is like @unnumbered, but the heading is centered. -\outer\parseargdef\centerchap{% - % Well, we could do the following in a group, but that would break - % an assumption that \chapmacro is called at the outermost level. - % Thus we are safer this way: --kasal, 24feb04 - \let\centerparametersmaybe = \centerparameters - \unnmhead0{#1}% - \let\centerparametersmaybe = \relax -} - -% @top is like @unnumbered. -\let\top\unnumbered - -% Sections. -\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz -\def\seczzz#1{% - \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 - \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% -} - -\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz -\def\appendixsectionzzz#1{% - \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 - \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% -} -\let\appendixsec\appendixsection - -\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz -\def\unnumberedseczzz#1{% - \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 - \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% -} - -% Subsections. -\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz -\def\numberedsubseczzz#1{% - \global\subsubsecno=0 \global\advance\subsecno by 1 - \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% -} - -\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz -\def\appendixsubseczzz#1{% - \global\subsubsecno=0 \global\advance\subsecno by 1 - \sectionheading{#1}{subsec}{Yappendix}% - {\appendixletter.\the\secno.\the\subsecno}% -} - -\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz -\def\unnumberedsubseczzz#1{% - \global\subsubsecno=0 \global\advance\subsecno by 1 - \sectionheading{#1}{subsec}{Ynothing}% - {\the\unnumberedno.\the\secno.\the\subsecno}% -} - -% Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz -\def\numberedsubsubseczzz#1{% - \global\advance\subsubsecno by 1 - \sectionheading{#1}{subsubsec}{Ynumbered}% - {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% -} - -\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz -\def\appendixsubsubseczzz#1{% - \global\advance\subsubsecno by 1 - \sectionheading{#1}{subsubsec}{Yappendix}% - {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% -} - -\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz -\def\unnumberedsubsubseczzz#1{% - \global\advance\subsubsecno by 1 - \sectionheading{#1}{subsubsec}{Ynothing}% - {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% -} - -% These macros control what the section commands do, according -% to what kind of chapter we are in (ordinary, appendix, or unnumbered). -% Define them by default for a numbered chapter. -\let\section = \numberedsec -\let\subsection = \numberedsubsec -\let\subsubsection = \numberedsubsubsec - -% Define @majorheading, @heading and @subheading - -% NOTE on use of \vbox for chapter headings, section headings, and such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - -\def\majorheading{% - {\advance\chapheadingskip by 10pt \chapbreak }% - \parsearg\chapheadingzzz -} - -\def\chapheading{\chapbreak \parsearg\chapheadingzzz} -\def\chapheadingzzz#1{% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}% - \bigskip \par\penalty 200\relax - \suppressfirstparagraphindent -} - -% @heading, @subheading, @subsubheading. -\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} - \suppressfirstparagraphindent} -\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} - \suppressfirstparagraphindent} -\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} - \suppressfirstparagraphindent} - -% These macros generate a chapter, section, etc. heading only -% (including whitespace, linebreaking, etc. around it), -% given all the information in convenient, parsed form. - -%%% Args are the skip and penalty (usually negative) -\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} - -%%% Define plain chapter starts, and page on/off switching for it -% Parameter controlling skip before chapter headings (if needed) - -\newskip\chapheadingskip - -\def\chapbreak{\dobreak \chapheadingskip {-4000}} -\def\chappager{\par\vfill\supereject} -% Because \domark is called before \chapoddpage, the filler page will -% get the headings for the next chapter, which is wrong. But we don't -% care -- we just disable all headings on the filler page. -\def\chapoddpage{% - \chappager - \ifodd\pageno \else - \begingroup - \evenheadline={\hfil}\evenfootline={\hfil}% - \oddheadline={\hfil}\oddfootline={\hfil}% - \hbox to 0pt{}% - \chappager - \endgroup - \fi -} - -\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} - -\def\CHAPPAGoff{% -\global\let\contentsalignmacro = \chappager -\global\let\pchapsepmacro=\chapbreak -\global\let\pagealignmacro=\chappager} - -\def\CHAPPAGon{% -\global\let\contentsalignmacro = \chappager -\global\let\pchapsepmacro=\chappager -\global\let\pagealignmacro=\chappager -\global\def\HEADINGSon{\HEADINGSsingle}} - -\def\CHAPPAGodd{% -\global\let\contentsalignmacro = \chapoddpage -\global\let\pchapsepmacro=\chapoddpage -\global\let\pagealignmacro=\chapoddpage -\global\def\HEADINGSon{\HEADINGSdouble}} - -\CHAPPAGon - -% Chapter opening. -% -% #1 is the text, #2 is the section type (Ynumbered, Ynothing, -% Yappendix, Yomitfromtoc), #3 the chapter number. -% -% To test against our argument. -\def\Ynothingkeyword{Ynothing} -\def\Yomitfromtockeyword{Yomitfromtoc} -\def\Yappendixkeyword{Yappendix} -% -\def\chapmacro#1#2#3{% - % Insert the first mark before the heading break (see notes for \domark). - \let\prevchapterdefs=\lastchapterdefs - \let\prevsectiondefs=\lastsectiondefs - \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% - \gdef\thissection{}}% - % - \def\temptype{#2}% - \ifx\temptype\Ynothingkeyword - \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% - \gdef\thischapter{\thischaptername}}% - \else\ifx\temptype\Yomitfromtockeyword - \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% - \gdef\thischapter{}}% - \else\ifx\temptype\Yappendixkeyword - \toks0={#1}% - \xdef\lastchapterdefs{% - \gdef\noexpand\thischaptername{\the\toks0}% - \gdef\noexpand\thischapternum{\appendixletter}% - % \noexpand\putwordAppendix avoids expanding indigestible - % commands in some of the translations. - \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} - \noexpand\thischapternum: - \noexpand\thischaptername}% - }% - \else - \toks0={#1}% - \xdef\lastchapterdefs{% - \gdef\noexpand\thischaptername{\the\toks0}% - \gdef\noexpand\thischapternum{\the\chapno}% - % \noexpand\putwordChapter avoids expanding indigestible - % commands in some of the translations. - \gdef\noexpand\thischapter{\noexpand\putwordChapter{} - \noexpand\thischapternum: - \noexpand\thischaptername}% - }% - \fi\fi\fi - % - % Output the mark. Pass it through \safewhatsit, to take care of - % the preceding space. - \safewhatsit\domark - % - % Insert the chapter heading break. - \pchapsepmacro - % - % Now the second mark, after the heading break. No break points - % between here and the heading. - \let\prevchapterdefs=\lastchapterdefs - \let\prevsectiondefs=\lastsectiondefs - \domark - % - {% - \chapfonts \rmisbold - % - % Have to define \lastsection before calling \donoderef, because the - % xref code eventually uses it. On the other hand, it has to be called - % after \pchapsepmacro, or the headline will change too soon. - \gdef\lastsection{#1}% - % - % Only insert the separating space if we have a chapter/appendix - % number, and don't print the unnumbered ``number''. - \ifx\temptype\Ynothingkeyword - \setbox0 = \hbox{}% - \def\toctype{unnchap}% - \else\ifx\temptype\Yomitfromtockeyword - \setbox0 = \hbox{}% contents like unnumbered, but no toc entry - \def\toctype{omit}% - \else\ifx\temptype\Yappendixkeyword - \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% - \def\toctype{app}% - \else - \setbox0 = \hbox{#3\enspace}% - \def\toctype{numchap}% - \fi\fi\fi - % - % Write the toc entry for this chapter. Must come before the - % \donoderef, because we include the current node name in the toc - % entry, and \donoderef resets it to empty. - \writetocentry{\toctype}{#1}{#3}% - % - % For pdftex, we have to write out the node definition (aka, make - % the pdfdest) after any page break, but before the actual text has - % been typeset. If the destination for the pdf outline is after the - % text, then jumping from the outline may wind up with the text not - % being visible, for instance under high magnification. - \donoderef{#2}% - % - % Typeset the actual heading. - \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright - \hangindent=\wd0 \centerparametersmaybe - \unhbox0 #1\par}% - }% - \nobreak\bigskip % no page break after a chapter title - \nobreak -} - -% @centerchap -- centered and unnumbered. -\let\centerparametersmaybe = \relax -\def\centerparameters{% - \advance\rightskip by 3\rightskip - \leftskip = \rightskip - \parfillskip = 0pt -} - - -% I don't think this chapter style is supported any more, so I'm not -% updating it with the new noderef stuff. We'll see. --karl, 11aug03. -% -\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} -% -\def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}\bigskip \par\nobreak -} -\def\chfopen #1#2{\chapoddpage {\chapfonts -\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% -\par\penalty 5000 % -} -\def\centerchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt - \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak -} -\def\CHAPFopen{% - \global\let\chapmacro=\chfopen - \global\let\centerchapmacro=\centerchfopen} - - -% Section titles. These macros combine the section number parts and -% call the generic \sectionheading to do the printing. -% -\newskip\secheadingskip -\def\secheadingbreak{\dobreak \secheadingskip{-1000}} - -% Subsection titles. -\newskip\subsecheadingskip -\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} - -% Subsubsection titles. -\def\subsubsecheadingskip{\subsecheadingskip} -\def\subsubsecheadingbreak{\subsecheadingbreak} - - -% Print any size, any type, section title. -% -% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is -% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the -% section number. -% -\def\seckeyword{sec} -% -\def\sectionheading#1#2#3#4{% - {% - % Switch to the right set of fonts. - \csname #2fonts\endcsname \rmisbold - % - \def\sectionlevel{#2}% - \def\temptype{#3}% - % - % Insert first mark before the heading break (see notes for \domark). - \let\prevsectiondefs=\lastsectiondefs - \ifx\temptype\Ynothingkeyword - \ifx\sectionlevel\seckeyword - \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% - \gdef\thissection{\thissectionname}}% - \fi - \else\ifx\temptype\Yomitfromtockeyword - % Don't redefine \thissection. - \else\ifx\temptype\Yappendixkeyword - \ifx\sectionlevel\seckeyword - \toks0={#1}% - \xdef\lastsectiondefs{% - \gdef\noexpand\thissectionname{\the\toks0}% - \gdef\noexpand\thissectionnum{#4}% - % \noexpand\putwordSection avoids expanding indigestible - % commands in some of the translations. - \gdef\noexpand\thissection{\noexpand\putwordSection{} - \noexpand\thissectionnum: - \noexpand\thissectionname}% - }% - \fi - \else - \ifx\sectionlevel\seckeyword - \toks0={#1}% - \xdef\lastsectiondefs{% - \gdef\noexpand\thissectionname{\the\toks0}% - \gdef\noexpand\thissectionnum{#4}% - % \noexpand\putwordSection avoids expanding indigestible - % commands in some of the translations. - \gdef\noexpand\thissection{\noexpand\putwordSection{} - \noexpand\thissectionnum: - \noexpand\thissectionname}% - }% - \fi - \fi\fi\fi - % - % Go into vertical mode. Usually we'll already be there, but we - % don't want the following whatsit to end up in a preceding paragraph - % if the document didn't happen to have a blank line. - \par - % - % Output the mark. Pass it through \safewhatsit, to take care of - % the preceding space. - \safewhatsit\domark - % - % Insert space above the heading. - \csname #2headingbreak\endcsname - % - % Now the second mark, after the heading break. No break points - % between here and the heading. - \let\prevsectiondefs=\lastsectiondefs - \domark - % - % Only insert the space after the number if we have a section number. - \ifx\temptype\Ynothingkeyword - \setbox0 = \hbox{}% - \def\toctype{unn}% - \gdef\lastsection{#1}% - \else\ifx\temptype\Yomitfromtockeyword - % for @headings -- no section number, don't include in toc, - % and don't redefine \lastsection. - \setbox0 = \hbox{}% - \def\toctype{omit}% - \let\sectionlevel=\empty - \else\ifx\temptype\Yappendixkeyword - \setbox0 = \hbox{#4\enspace}% - \def\toctype{app}% - \gdef\lastsection{#1}% - \else - \setbox0 = \hbox{#4\enspace}% - \def\toctype{num}% - \gdef\lastsection{#1}% - \fi\fi\fi - % - % Write the toc entry (before \donoderef). See comments in \chapmacro. - \writetocentry{\toctype\sectionlevel}{#1}{#4}% - % - % Write the node reference (= pdf destination for pdftex). - % Again, see comments in \chapmacro. - \donoderef{#3}% - % - % Interline glue will be inserted when the vbox is completed. - % That glue will be a valid breakpoint for the page, since it'll be - % preceded by a whatsit (usually from the \donoderef, or from the - % \writetocentry if there was no node). We don't want to allow that - % break, since then the whatsits could end up on page n while the - % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. - \nobreak - % - % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright - \hangindent=\wd0 % zero if no section number - \unhbox0 #1}% - }% - % Add extra space after the heading -- half of whatever came above it. - % Don't allow stretch, though. - \kern .5 \csname #2headingskip\endcsname - % - % Do not let the kern be a potential breakpoint, as it would be if it - % was followed by glue. - \nobreak - % - % We'll almost certainly start a paragraph next, so don't let that - % glue accumulate. (Not a breakpoint because it's preceded by a - % discardable item.) - \vskip-\parskip - % - % This is purely so the last item on the list is a known \penalty > - % 10000. This is so \startdefun can avoid allowing breakpoints after - % section headings. Otherwise, it would insert a valid breakpoint between: - % - % @section sec-whatever - % @deffn def-whatever - \penalty 10001 -} - - -\message{toc,} -% Table of contents. -\newwrite\tocfile - -% Write an entry to the toc file, opening it if necessary. -% Called from @chapter, etc. -% -% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} -% We append the current node name (if any) and page number as additional -% arguments for the \{chap,sec,...}entry macros which will eventually -% read this. The node name is used in the pdf outlines as the -% destination to jump to. -% -% We open the .toc file for writing here instead of at @setfilename (or -% any other fixed time) so that @contents can be anywhere in the document. -% But if #1 is `omit', then we don't do anything. This is used for the -% table of contents chapter openings themselves. -% -\newif\iftocfileopened -\def\omitkeyword{omit}% -% -\def\writetocentry#1#2#3{% - \edef\writetoctype{#1}% - \ifx\writetoctype\omitkeyword \else - \iftocfileopened\else - \immediate\openout\tocfile = \jobname.toc - \global\tocfileopenedtrue - \fi - % - \iflinks - {\atdummies - \edef\temp{% - \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% - \temp - }% - \fi - \fi - % - % Tell \shipout to create a pdf destination on each page, if we're - % writing pdf. These are used in the table of contents. We can't - % just write one on every page because the title pages are numbered - % 1 and 2 (the page numbers aren't printed), and so are the first - % two pages of the document. Thus, we'd have two destinations named - % `1', and two named `2'. - \ifpdf \global\pdfmakepagedesttrue \fi -} - - -% These characters do not print properly in the Computer Modern roman -% fonts, so we must take special care. This is more or less redundant -% with the Texinfo input format setup at the end of this file. -% -\def\activecatcodes{% - \catcode`\"=\active - \catcode`\$=\active - \catcode`\<=\active - \catcode`\>=\active - \catcode`\\=\active - \catcode`\^=\active - \catcode`\_=\active - \catcode`\|=\active - \catcode`\~=\active -} - - -% Read the toc file, which is essentially Texinfo input. -\def\readtocfile{% - \setupdatafile - \activecatcodes - \input \tocreadfilename -} - -\newskip\contentsrightmargin \contentsrightmargin=1in -\newcount\savepageno -\newcount\lastnegativepageno \lastnegativepageno = -1 - -% Prepare to read what we've written to \tocfile. -% -\def\startcontents#1{% - % If @setchapternewpage on, and @headings double, the contents should - % start on an odd page, unlike chapters. Thus, we maintain - % \contentsalignmacro in parallel with \pagealignmacro. - % From: Torbjorn Granlund - \contentsalignmacro - \immediate\closeout\tocfile - % - % Don't need to put `Contents' or `Short Contents' in the headline. - % It is abundantly clear what they are. - \chapmacro{#1}{Yomitfromtoc}{}% - % - \savepageno = \pageno - \begingroup % Set up to handle contents files properly. - \raggedbottom % Worry more about breakpoints than the bottom. - \advance\hsize by -\contentsrightmargin % Don't use the full line length. - % - % Roman numerals for page numbers. - \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi -} - -% redefined for the two-volume lispref. We always output on -% \jobname.toc even if this is redefined. -% -\def\tocreadfilename{\jobname.toc} - -% Normal (long) toc. -% -\def\contents{% - \startcontents{\putwordTOC}% - \openin 1 \tocreadfilename\space - \ifeof 1 \else - \readtocfile - \fi - \vfill \eject - \contentsalignmacro % in case @setchapternewpage odd is in effect - \ifeof 1 \else - \pdfmakeoutlines - \fi - \closein 1 - \endgroup - \lastnegativepageno = \pageno - \global\pageno = \savepageno -} - -% And just the chapters. -\def\summarycontents{% - \startcontents{\putwordShortTOC}% - % - \let\numchapentry = \shortchapentry - \let\appentry = \shortchapentry - \let\unnchapentry = \shortunnchapentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf - \let\sl=\shortcontsl \let\tt=\shortconttt - \rm - \hyphenpenalty = 10000 - \advance\baselineskip by 1pt % Open it up a little. - \def\numsecentry##1##2##3##4{} - \let\appsecentry = \numsecentry - \let\unnsecentry = \numsecentry - \let\numsubsecentry = \numsecentry - \let\appsubsecentry = \numsecentry - \let\unnsubsecentry = \numsecentry - \let\numsubsubsecentry = \numsecentry - \let\appsubsubsecentry = \numsecentry - \let\unnsubsubsecentry = \numsecentry - \openin 1 \tocreadfilename\space - \ifeof 1 \else - \readtocfile - \fi - \closein 1 - \vfill \eject - \contentsalignmacro % in case @setchapternewpage odd is in effect - \endgroup - \lastnegativepageno = \pageno - \global\pageno = \savepageno -} -\let\shortcontents = \summarycontents - -% Typeset the label for a chapter or appendix for the short contents. -% The arg is, e.g., `A' for an appendix, or `3' for a chapter. -% -\def\shortchaplabel#1{% - % This space should be enough, since a single number is .5em, and the - % widest letter (M) is 1em, at least in the Computer Modern fonts. - % But use \hss just in case. - % (This space doesn't include the extra space that gets added after - % the label; that gets put in by \shortchapentry above.) - % - % We'd like to right-justify chapter numbers, but that looks strange - % with appendix letters. And right-justifying numbers and - % left-justifying letters looks strange when there is less than 10 - % chapters. Have to read the whole toc once to know how many chapters - % there are before deciding ... - \hbox to 1em{#1\hss}% -} - -% These macros generate individual entries in the table of contents. -% The first argument is the chapter or section name. -% The last argument is the page number. -% The arguments in between are the chapter number, section number, ... - -% Chapters, in the main contents. -\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} -% -% Chapters, in the short toc. -% See comments in \dochapentry re vbox and related settings. -\def\shortchapentry#1#2#3#4{% - \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% -} - -% Appendices, in the main contents. -% Need the word Appendix, and a fixed-size box. -% -\def\appendixbox#1{% - % We use M since it's probably the widest letter. - \setbox0 = \hbox{\putwordAppendix{} M}% - \hbox to \wd0{\putwordAppendix{} #1\hss}} -% -\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} - -% Unnumbered chapters. -\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} -\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} - -% Sections. -\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} -\let\appsecentry=\numsecentry -\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} - -% Subsections. -\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} -\let\appsubsecentry=\numsubsecentry -\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} - -% And subsubsections. -\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} -\let\appsubsubsecentry=\numsubsubsecentry -\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} - -% This parameter controls the indentation of the various levels. -% Same as \defaultparindent. -\newdimen\tocindent \tocindent = 15pt - -% Now for the actual typesetting. In all these, #1 is the text and #2 is the -% page number. -% -% If the toc has to be broken over pages, we want it to be at chapters -% if at all possible; hence the \penalty. -\def\dochapentry#1#2{% - \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip - \begingroup - \chapentryfonts - \tocentry{#1}{\dopageno\bgroup#2\egroup}% - \endgroup - \nobreak\vskip .25\baselineskip plus.1\baselineskip -} - -\def\dosecentry#1#2{\begingroup - \secentryfonts \leftskip=\tocindent - \tocentry{#1}{\dopageno\bgroup#2\egroup}% -\endgroup} - -\def\dosubsecentry#1#2{\begingroup - \subsecentryfonts \leftskip=2\tocindent - \tocentry{#1}{\dopageno\bgroup#2\egroup}% -\endgroup} - -\def\dosubsubsecentry#1#2{\begingroup - \subsubsecentryfonts \leftskip=3\tocindent - \tocentry{#1}{\dopageno\bgroup#2\egroup}% -\endgroup} - -% We use the same \entry macro as for the index entries. -\let\tocentry = \entry - -% Space between chapter (or whatever) number and the title. -\def\labelspace{\hskip1em \relax} - -\def\dopageno#1{{\rm #1}} -\def\doshortpageno#1{{\rm #1}} - -\def\chapentryfonts{\secfonts \rm} -\def\secentryfonts{\textfonts} -\def\subsecentryfonts{\textfonts} -\def\subsubsecentryfonts{\textfonts} - - -\message{environments,} -% @foo ... @end foo. - -% @tex ... @end tex escapes into raw Tex temporarily. -% One exception: @ is still an escape character, so that @end tex works. -% But \@ or @@ will get a plain tex @ character. - -\envdef\tex{% - \setupmarkupstyle{tex}% - \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 - \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 - \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie - \catcode `\%=14 - \catcode `\+=\other - \catcode `\"=\other - \catcode `\|=\other - \catcode `\<=\other - \catcode `\>=\other - \catcode`\`=\other - \catcode`\'=\other - \escapechar=`\\ - % - \let\b=\ptexb - \let\bullet=\ptexbullet - \let\c=\ptexc - \let\,=\ptexcomma - \let\.=\ptexdot - \let\dots=\ptexdots - \let\equiv=\ptexequiv - \let\!=\ptexexclam - \let\i=\ptexi - \let\indent=\ptexindent - \let\noindent=\ptexnoindent - \let\{=\ptexlbrace - \let\+=\tabalign - \let\}=\ptexrbrace - \let\/=\ptexslash - \let\*=\ptexstar - \let\t=\ptext - \expandafter \let\csname top\endcsname=\ptextop % outer - \let\frenchspacing=\plainfrenchspacing - % - \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% - \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% - \def\@{@}% -} -% There is no need to define \Etex. - -% Define @lisp ... @end lisp. -% @lisp environment forms a group so it can rebind things, -% including the definition of @end lisp (which normally is erroneous). - -% Amount to narrow the margins by for @lisp. -\newskip\lispnarrowing \lispnarrowing=0.4in - -% This is the definition that ^^M gets inside @lisp, @example, and other -% such environments. \null is better than a space, since it doesn't -% have any width. -\def\lisppar{\null\endgraf} - -% This space is always present above and below environments. -\newskip\envskipamount \envskipamount = 0pt - -% Make spacing and below environment symmetrical. We use \parskip here -% to help in doing that, since in @example-like environments \parskip -% is reset to zero; thus the \afterenvbreak inserts no space -- but the -% start of the next paragraph will insert \parskip. -% -\def\aboveenvbreak{{% - % =10000 instead of <10000 because of a special case in \itemzzz and - % \sectionheading, q.v. - \ifnum \lastpenalty=10000 \else - \advance\envskipamount by \parskip - \endgraf - \ifdim\lastskip<\envskipamount - \removelastskip - % it's not a good place to break if the last penalty was \nobreak - % or better ... - \ifnum\lastpenalty<10000 \penalty-50 \fi - \vskip\envskipamount - \fi - \fi -}} - -\let\afterenvbreak = \aboveenvbreak - -% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will -% also clear it, so that its embedded environments do the narrowing again. -\let\nonarrowing=\relax - -% @cartouche ... @end cartouche: draw rectangle w/rounded corners around -% environment contents. -\font\circle=lcircle10 -\newdimen\circthick -\newdimen\cartouter\newdimen\cartinner -\newskip\normbskip\newskip\normpskip\newskip\normlskip -\circthick=\fontdimen8\circle -% -\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth -\def\ctr{{\hskip 6pt\circle\char'010}} -\def\cbl{{\circle\char'012\hskip -6pt}} -\def\cbr{{\hskip 6pt\circle\char'011}} -\def\carttop{\hbox to \cartouter{\hskip\lskip - \ctl\leaders\hrule height\circthick\hfil\ctr - \hskip\rskip}} -\def\cartbot{\hbox to \cartouter{\hskip\lskip - \cbl\leaders\hrule height\circthick\hfil\cbr - \hskip\rskip}} -% -\newskip\lskip\newskip\rskip - -\envdef\cartouche{% - \ifhmode\par\fi % can't be in the midst of a paragraph. - \startsavinginserts - \lskip=\leftskip \rskip=\rightskip - \leftskip=0pt\rightskip=0pt % we want these *outside*. - \cartinner=\hsize \advance\cartinner by-\lskip - \advance\cartinner by-\rskip - \cartouter=\hsize - \advance\cartouter by 18.4pt % allow for 3pt kerns on either - % side, and for 6pt waste from - % each corner char, and rule thickness - \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing = t% - \vbox\bgroup - \baselineskip=0pt\parskip=0pt\lineskip=0pt - \carttop - \hbox\bgroup - \hskip\lskip - \vrule\kern3pt - \vbox\bgroup - \kern3pt - \hsize=\cartinner - \baselineskip=\normbskip - \lineskip=\normlskip - \parskip=\normpskip - \vskip -\parskip - \comment % For explanation, see the end of \def\group. -} -\def\Ecartouche{% - \ifhmode\par\fi - \kern3pt - \egroup - \kern3pt\vrule - \hskip\rskip - \egroup - \cartbot - \egroup - \checkinserts -} - - -% This macro is called at the beginning of all the @example variants, -% inside a group. -\newdimen\nonfillparindent -\def\nonfillstart{% - \aboveenvbreak - \hfuzz = 12pt % Don't be fussy - \sepspaces % Make spaces be word-separators rather than space tokens. - \let\par = \lisppar % don't ignore blank lines - \obeylines % each line of input is a line of output - \parskip = 0pt - % Turn off paragraph indentation but redefine \indent to emulate - % the normal \indent. - \nonfillparindent=\parindent - \parindent = 0pt - \let\indent\nonfillindent - % - \emergencystretch = 0pt % don't try to avoid overfull boxes - \ifx\nonarrowing\relax - \advance \leftskip by \lispnarrowing - \exdentamount=\lispnarrowing - \else - \let\nonarrowing = \relax - \fi - \let\exdent=\nofillexdent -} - -\begingroup -\obeyspaces -% We want to swallow spaces (but not other tokens) after the fake -% @indent in our nonfill-environments, where spaces are normally -% active and set to @tie, resulting in them not being ignored after -% @indent. -\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% -\gdef\nonfillindentcheck{% -\ifx\temp % -\expandafter\nonfillindentgobble% -\else% -\leavevmode\nonfillindentbox% -\fi% -}% -\endgroup -\def\nonfillindentgobble#1{\nonfillindent} -\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} - -% If you want all examples etc. small: @set dispenvsize small. -% If you want even small examples the full size: @set dispenvsize nosmall. -% This affects the following displayed environments: -% @example, @display, @format, @lisp -% -\def\smallword{small} -\def\nosmallword{nosmall} -\let\SETdispenvsize\relax -\def\setnormaldispenv{% - \ifx\SETdispenvsize\smallword - % end paragraph for sake of leading, in case document has no blank - % line. This is redundant with what happens in \aboveenvbreak, but - % we need to do it before changing the fonts, and it's inconvenient - % to change the fonts afterward. - \ifnum \lastpenalty=10000 \else \endgraf \fi - \smallexamplefonts \rm - \fi -} -\def\setsmalldispenv{% - \ifx\SETdispenvsize\nosmallword - \else - \ifnum \lastpenalty=10000 \else \endgraf \fi - \smallexamplefonts \rm - \fi -} - -% We often define two environments, @foo and @smallfoo. -% Let's do it by one command: -\def\makedispenv #1#2{ - \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} - \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} - \expandafter\let\csname E#1\endcsname \afterenvbreak - \expandafter\let\csname Esmall#1\endcsname \afterenvbreak -} - -% Define two synonyms: -\def\maketwodispenvs #1#2#3{ - \makedispenv{#1}{#3} - \makedispenv{#2}{#3} -} - -% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. -% -% @smallexample and @smalllisp: use smaller fonts. -% Originally contributed by Pavel@xerox. -% -\maketwodispenvs {lisp}{example}{% - \nonfillstart - \tt\setupmarkupstyle{example}% - \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return -} -% @display/@smalldisplay: same as @lisp except keep current font. -% -\makedispenv {display}{% - \nonfillstart - \gobble -} - -% @format/@smallformat: same as @display except don't narrow margins. -% -\makedispenv{format}{% - \let\nonarrowing = t% - \nonfillstart - \gobble -} - -% @flushleft: same as @format, but doesn't obey \SETdispenvsize. -\envdef\flushleft{% - \let\nonarrowing = t% - \nonfillstart - \gobble -} -\let\Eflushleft = \afterenvbreak - -% @flushright. -% -\envdef\flushright{% - \let\nonarrowing = t% - \nonfillstart - \advance\leftskip by 0pt plus 1fill - \gobble -} -\let\Eflushright = \afterenvbreak - - -% @raggedright does more-or-less normal line breaking but no right -% justification. From plain.tex. -\envdef\raggedright{% - \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax -} -\let\Eraggedright\par - -\envdef\raggedleft{% - \parindent=0pt \leftskip0pt plus2em - \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt - \hbadness=10000 % Last line will usually be underfull, so turn off - % badness reporting. -} -\let\Eraggedleft\par - -\envdef\raggedcenter{% - \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em - \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt - \hbadness=10000 % Last line will usually be underfull, so turn off - % badness reporting. -} -\let\Eraggedcenter\par - - -% @quotation does normal linebreaking (hence we can't use \nonfillstart) -% and narrows the margins. We keep \parskip nonzero in general, since -% we're doing normal filling. So, when using \aboveenvbreak and -% \afterenvbreak, temporarily make \parskip 0. -% -\def\quotationstart{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. - \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing - \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \else - \let\nonarrowing = \relax - \fi - \parsearg\quotationlabel -} - -\envdef\quotation{% - \setnormaldispenv - \quotationstart -} - -\envdef\smallquotation{% - \setsmalldispenv - \quotationstart -} -\let\Esmallquotation = \Equotation - -% We have retained a nonzero parskip for the environment, since we're -% doing normal filling. -% -\def\Equotation{% - \par - \ifx\quotationauthor\undefined\else - % indent a bit. - \leftline{\kern 2\leftskip \sl ---\quotationauthor}% - \fi - {\parskip=0pt \afterenvbreak}% -} - -% If we're given an argument, typeset it in bold with a colon after. -\def\quotationlabel#1{% - \def\temp{#1}% - \ifx\temp\empty \else - {\bf #1: }% - \fi -} - - -% LaTeX-like @verbatim...@end verbatim and @verb{...} -% If we want to allow any as delimiter, -% we need the curly braces so that makeinfo sees the @verb command, eg: -% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org -% -% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. -% -% [Knuth] p.344; only we need to do the other characters Texinfo sets -% active too. Otherwise, they get lost as the first character on a -% verbatim line. -\def\dospecials{% - \do\ \do\\\do\{\do\}\do\$\do\&% - \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% - \do\<\do\>\do\|\do\@\do+\do\"% - % Don't do the quotes -- if we do, @set txicodequoteundirected and - % @set txicodequotebacktick will not have effect on @verb and - % @verbatim, and ?` and !` ligatures won't get disabled. - %\do\`\do\'% -} -% -% [Knuth] p. 380 -\def\uncatcodespecials{% - \def\do##1{\catcode`##1=\other}\dospecials} -% -% Setup for the @verb command. -% -% Eight spaces for a tab -\begingroup - \catcode`\^^I=\active - \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} -\endgroup -% -\def\setupverb{% - \tt % easiest (and conventionally used) font for verbatim - \def\par{\leavevmode\endgraf}% - \setupmarkupstyle{verb}% - \tabeightspaces - % Respect line breaks, - % print special symbols as themselves, and - % make each space count - % must do in this order: - \obeylines \uncatcodespecials \sepspaces -} - -% Setup for the @verbatim environment -% -% Real tab expansion -\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount -% -\def\starttabbox{\setbox0=\hbox\bgroup} -% -\begingroup - \catcode`\^^I=\active - \gdef\tabexpand{% - \catcode`\^^I=\active - \def^^I{\leavevmode\egroup - \dimen0=\wd0 % the width so far, or since the previous tab - \divide\dimen0 by\tabw - \multiply\dimen0 by\tabw % compute previous multiple of \tabw - \advance\dimen0 by\tabw % advance to next multiple of \tabw - \wd0=\dimen0 \box0 \starttabbox - }% - } -\endgroup - -% start the verbatim environment. -\def\setupverbatim{% - \let\nonarrowing = t% - \nonfillstart - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% - \tabexpand - \setupmarkupstyle{verbatim}% - % Respect line breaks, - % print special symbols as themselves, and - % make each space count - % must do in this order: - \obeylines \uncatcodespecials \sepspaces - \everypar{\starttabbox}% -} - -% Do the @verb magic: verbatim text is quoted by unique -% delimiter characters. Before first delimiter expect a -% right brace, after last delimiter expect closing brace: -% -% \def\doverb'{'#1'}'{#1} -% -% [Knuth] p. 382; only eat outer {} -\begingroup - \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other - \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] -\endgroup -% -\def\verb{\begingroup\setupverb\doverb} -% -% -% Do the @verbatim magic: define the macro \doverbatim so that -% the (first) argument ends when '@end verbatim' is reached, ie: -% -% \def\doverbatim#1@end verbatim{#1} -% -% For Texinfo it's a lot easier than for LaTeX, -% because texinfo's \verbatim doesn't stop at '\end{verbatim}': -% we need not redefine '\', '{' and '}'. -% -% Inspired by LaTeX's verbatim command set [latex.ltx] -% -\begingroup - \catcode`\ =\active - \obeylines % - % ignore everything up to the first ^^M, that's the newline at the end - % of the @verbatim input line itself. Otherwise we get an extra blank - % line in the output. - \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% - % We really want {...\end verbatim} in the body of the macro, but - % without the active space; thus we have to use \xdef and \gobble. -\endgroup -% -\envdef\verbatim{% - \setupverbatim\doverbatim -} -\let\Everbatim = \afterenvbreak - - -% @verbatiminclude FILE - insert text of file in verbatim environment. -% -\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} -% -\def\doverbatiminclude#1{% - {% - \makevalueexpandable - \setupverbatim - \indexnofonts % Allow `@@' and other weird things in file names. - \input #1 - \afterenvbreak - }% -} - -% @copying ... @end copying. -% Save the text away for @insertcopying later. -% -% We save the uninterpreted tokens, rather than creating a box. -% Saving the text in a box would be much easier, but then all the -% typesetting commands (@smallbook, font changes, etc.) have to be done -% beforehand -- and a) we want @copying to be done first in the source -% file; b) letting users define the frontmatter in as flexible order as -% possible is very desirable. -% -\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} -\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} -% -\def\insertcopying{% - \begingroup - \parindent = 0pt % paragraph indentation looks wrong on title page - \scanexp\copyingtext - \endgroup -} - - -\message{defuns,} -% @defun etc. - -\newskip\defbodyindent \defbodyindent=.4in -\newskip\defargsindent \defargsindent=50pt -\newskip\deflastargmargin \deflastargmargin=18pt -\newcount\defunpenalty - -% Start the processing of @deffn: -\def\startdefun{% - \ifnum\lastpenalty<10000 - \medbreak - \defunpenalty=10003 % Will keep this @deffn together with the - % following @def command, see below. - \else - % If there are two @def commands in a row, we'll have a \nobreak, - % which is there to keep the function description together with its - % header. But if there's nothing but headers, we need to allow a - % break somewhere. Check specifically for penalty 10002, inserted - % by \printdefunline, instead of 10000, since the sectioning - % commands also insert a nobreak penalty, and we don't want to allow - % a break between a section heading and a defun. - % - % As a minor refinement, we avoid "club" headers by signalling - % with penalty of 10003 after the very first @deffn in the - % sequence (see above), and penalty of 10002 after any following - % @def command. - \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi - % - % Similarly, after a section heading, do not allow a break. - % But do insert the glue. - \medskip % preceded by discardable penalty, so not a breakpoint - \fi - % - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent -} - -\def\dodefunx#1{% - % First, check whether we are in the right environment: - \checkenv#1% - % - % As above, allow line break if we have multiple x headers in a row. - % It's not a great place, though. - \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi - % - % And now, it's time to reuse the body of the original defun: - \expandafter\gobbledefun#1% -} -\def\gobbledefun#1\startdefun{} - -% \printdefunline \deffnheader{text} -% -\def\printdefunline#1#2{% - \begingroup - % call \deffnheader: - #1#2 \endheader - % common ending: - \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil - \endgraf - \nobreak\vskip -\parskip - \penalty\defunpenalty % signal to \startdefun and \dodefunx - % Some of the @defun-type tags do not enable magic parentheses, - % rendering the following check redundant. But we don't optimize. - \checkparencounts - \endgroup -} - -\def\Edefun{\endgraf\medbreak} - -% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -% the only thing remaining is to define \deffnheader. -% -\def\makedefun#1{% - \expandafter\let\csname E#1\endcsname = \Edefun - \edef\temp{\noexpand\domakedefun - \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% - \temp -} - -% \domakedefun \deffn \deffnx \deffnheader -% -% Define \deffn and \deffnx, without parameters. -% \deffnheader has to be defined explicitly. -% -\def\domakedefun#1#2#3{% - \envdef#1{% - \startdefun - \parseargusing\activeparens{\printdefunline#3}% - }% - \def#2{\dodefunx#1}% - \def#3% -} - -%%% Untyped functions: - -% @deffn category name args -\makedefun{deffn}{\deffngeneral{}} - -% @deffn category class name args -\makedefun{defop}#1 {\defopon{#1\ \putwordon}} - -% \defopon {category on}class name args -\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } - -% \deffngeneral {subind}category name args -% -\def\deffngeneral#1#2 #3 #4\endheader{% - % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. - \dosubind{fn}{\code{#3}}{#1}% - \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% -} - -%%% Typed functions: - -% @deftypefn category type name args -\makedefun{deftypefn}{\deftypefngeneral{}} - -% @deftypeop category class type name args -\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} - -% \deftypeopon {category on}class type name args -\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } - -% \deftypefngeneral {subind}category type name args -% -\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% - \dosubind{fn}{\code{#4}}{#1}% - \defname{#2}{#3}{#4}\defunargs{#5\unskip}% -} - -%%% Typed variables: - -% @deftypevr category type var args -\makedefun{deftypevr}{\deftypecvgeneral{}} - -% @deftypecv category class type var args -\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} - -% \deftypecvof {category of}class type var args -\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } - -% \deftypecvgeneral {subind}category type var args -% -\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% - \dosubind{vr}{\code{#4}}{#1}% - \defname{#2}{#3}{#4}\defunargs{#5\unskip}% -} - -%%% Untyped variables: - -% @defvr category var args -\makedefun{defvr}#1 {\deftypevrheader{#1} {} } - -% @defcv category class var args -\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} - -% \defcvof {category of}class var args -\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } - -%%% Type: -% @deftp category name args -\makedefun{deftp}#1 #2 #3\endheader{% - \doind{tp}{\code{#2}}% - \defname{#1}{}{#2}\defunargs{#3\unskip}% -} - -% Remaining @defun-like shortcuts: -\makedefun{defun}{\deffnheader{\putwordDeffunc} } -\makedefun{defmac}{\deffnheader{\putwordDefmac} } -\makedefun{defspec}{\deffnheader{\putwordDefspec} } -\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } -\makedefun{defvar}{\defvrheader{\putwordDefvar} } -\makedefun{defopt}{\defvrheader{\putwordDefopt} } -\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } -\makedefun{defmethod}{\defopon\putwordMethodon} -\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} -\makedefun{defivar}{\defcvof\putwordInstanceVariableof} -\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} - -% \defname, which formats the name of the @def (not the args). -% #1 is the category, such as "Function". -% #2 is the return type, if any. -% #3 is the function name. -% -% We are followed by (but not passed) the arguments, if any. -% -\def\defname#1#2#3{% - % Get the values of \leftskip and \rightskip as they were outside the @def... - \advance\leftskip by -\defbodyindent - % - % How we'll format the type name. Putting it in brackets helps - % distinguish it from the body text that may end up on the next line - % just below it. - \def\temp{#1}% - \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} - % - % Figure out line sizes for the paragraph shape. - % The first line needs space for \box0; but if \rightskip is nonzero, - % we need only space for the part of \box0 which exceeds it: - \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip - % The continuations: - \dimen2=\hsize \advance\dimen2 by -\defargsindent - % (plain.tex says that \dimen1 should be used only as global.) - \parshape 2 0in \dimen0 \defargsindent \dimen2 - % - % Put the type name to the right margin. - \noindent - \hbox to 0pt{% - \hfil\box0 \kern-\hsize - % \hsize has to be shortened this way: - \kern\leftskip - % Intentionally do not respect \rightskip, since we need the space. - }% - % - % Allow all lines to be underfull without complaint: - \tolerance=10000 \hbadness=10000 - \exdentamount=\defbodyindent - {% - % defun fonts. We use typewriter by default (used to be bold) because: - % . we're printing identifiers, they should be in tt in principle. - % . in languages with many accents, such as Czech or French, it's - % common to leave accents off identifiers. The result looks ok in - % tt, but exceedingly strange in rm. - % . we don't want -- and --- to be treated as ligatures. - % . this still does not fix the ?` and !` ligatures, but so far no - % one has made identifiers using them :). - \df \tt - \def\temp{#2}% return value type - \ifx\temp\empty\else \tclose{\temp} \fi - #3% output function name - }% - {\rm\enskip}% hskip 0.5 em of \tenrm - % - \boldbrax - % arguments will be output next, if any. -} - -% Print arguments in slanted roman (not ttsl), inconsistently with using -% tt for the name. This is because literal text is sometimes needed in -% the argument list (groff manual), and ttsl and tt are not very -% distinguishable. Prevent hyphenation at `-' chars. -% -\def\defunargs#1{% - % use sl by default (not ttsl), - % tt for the names. - \df \sl \hyphenchar\font=0 - % - % On the other hand, if an argument has two dashes (for instance), we - % want a way to get ttsl. Let's try @var for that. - \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% - #1% - \sl\hyphenchar\font=45 -} - -% We want ()&[] to print specially on the defun line. -% -\def\activeparens{% - \catcode`\(=\active \catcode`\)=\active - \catcode`\[=\active \catcode`\]=\active - \catcode`\&=\active -} - -% Make control sequences which act like normal parenthesis chars. -\let\lparen = ( \let\rparen = ) - -% Be sure that we always have a definition for `(', etc. For example, -% if the fn name has parens in it, \boldbrax will not be in effect yet, -% so TeX would otherwise complain about undefined control sequence. -{ - \activeparens - \global\let(=\lparen \global\let)=\rparen - \global\let[=\lbrack \global\let]=\rbrack - \global\let& = \& - - \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} - \gdef\magicamp{\let&=\amprm} -} - -\newcount\parencount - -% If we encounter &foo, then turn on ()-hacking afterwards -\newif\ifampseen -\def\amprm#1 {\ampseentrue{\bf\ }} - -\def\parenfont{% - \ifampseen - % At the first level, print parens in roman, - % otherwise use the default font. - \ifnum \parencount=1 \rm \fi - \else - % The \sf parens (in \boldbrax) actually are a little bolder than - % the contained text. This is especially needed for [ and ] . - \sf - \fi -} -\def\infirstlevel#1{% - \ifampseen - \ifnum\parencount=1 - #1% - \fi - \fi -} -\def\bfafterword#1 {#1 \bf} - -\def\opnr{% - \global\advance\parencount by 1 - {\parenfont(}% - \infirstlevel \bfafterword -} -\def\clnr{% - {\parenfont)}% - \infirstlevel \sl - \global\advance\parencount by -1 -} - -\newcount\brackcount -\def\lbrb{% - \global\advance\brackcount by 1 - {\bf[}% -} -\def\rbrb{% - {\bf]}% - \global\advance\brackcount by -1 -} - -\def\checkparencounts{% - \ifnum\parencount=0 \else \badparencount \fi - \ifnum\brackcount=0 \else \badbrackcount \fi -} -% these should not use \errmessage; the glibc manual, at least, actually -% has such constructs (when documenting function pointers). -\def\badparencount{% - \message{Warning: unbalanced parentheses in @def...}% - \global\parencount=0 -} -\def\badbrackcount{% - \message{Warning: unbalanced square brackets in @def...}% - \global\brackcount=0 -} - - -\message{macros,} -% @macro. - -% To do this right we need a feature of e-TeX, \scantokens, -% which we arrange to emulate with a temporary file in ordinary TeX. -\ifx\eTeXversion\undefined - \newwrite\macscribble - \def\scantokens#1{% - \toks0={#1}% - \immediate\openout\macscribble=\jobname.tmp - \immediate\write\macscribble{\the\toks0}% - \immediate\closeout\macscribble - \input \jobname.tmp - } -\fi - -\def\scanmacro#1{% - \begingroup - \newlinechar`\^^M - \let\xeatspaces\eatspaces - % Undo catcode changes of \startcontents and \doprintindex - % When called from @insertcopying or (short)caption, we need active - % backslash to get it printed correctly. Previously, we had - % \catcode`\\=\other instead. We'll see whether a problem appears - % with macro expansion. --kasal, 19aug04 - \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ - % ... and \example - \spaceisspace - % - % Append \endinput to make sure that TeX does not see the ending newline. - % I've verified that it is necessary both for e-TeX and for ordinary TeX - % --kasal, 29nov03 - \scantokens{#1\endinput}% - \endgroup -} - -\def\scanexp#1{% - \edef\temp{\noexpand\scanmacro{#1}}% - \temp -} - -\newcount\paramno % Count of parameters -\newtoks\macname % Macro name -\newif\ifrecursive % Is it recursive? - -% List of all defined macros in the form -% \definedummyword\macro1\definedummyword\macro2... -% Currently is also contains all @aliases; the list can be split -% if there is a need. -\def\macrolist{} - -% Add the macro to \macrolist -\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} -\def\addtomacrolistxxx#1{% - \toks0 = \expandafter{\macrolist\definedummyword#1}% - \xdef\macrolist{\the\toks0}% -} - -% Utility routines. -% This does \let #1 = #2, with \csnames; that is, -% \let \csname#1\endcsname = \csname#2\endcsname -% (except of course we have to play expansion games). -% -\def\cslet#1#2{% - \expandafter\let - \csname#1\expandafter\endcsname - \csname#2\endcsname -} - -% Trim leading and trailing spaces off a string. -% Concepts from aro-bend problem 15 (see CTAN). -{\catcode`\@=11 -\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} -\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} -\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} -\def\unbrace#1{#1} -\unbrace{\gdef\trim@@@ #1 } #2@{#1} -} - -% Trim a single trailing ^^M off a string. -{\catcode`\^^M=\other \catcode`\Q=3% -\gdef\eatcr #1{\eatcra #1Q^^MQ}% -\gdef\eatcra#1^^MQ{\eatcrb#1Q}% -\gdef\eatcrb#1Q#2Q{#1}% -} - -% Macro bodies are absorbed as an argument in a context where -% all characters are catcode 10, 11 or 12, except \ which is active -% (as in normal texinfo). It is necessary to change the definition of \. - -% Non-ASCII encodings make 8-bit characters active, so un-activate -% them to avoid their expansion. Must do this non-globally, to -% confine the change to the current group. - -% It's necessary to have hard CRs when the macro is executed. This is -% done by making ^^M (\endlinechar) catcode 12 when reading the macro -% body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% - \catcode`\"=\other - \catcode`\+=\other - \catcode`\<=\other - \catcode`\>=\other - \catcode`\@=\other - \catcode`\^=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\~=\other - \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi -} - -\def\scanargctxt{% - \scanctxt - \catcode`\\=\other - \catcode`\^^M=\other -} - -\def\macrobodyctxt{% - \scanctxt - \catcode`\{=\other - \catcode`\}=\other - \catcode`\^^M=\other - \usembodybackslash -} - -\def\macroargctxt{% - \scanctxt - \catcode`\\=\other -} - -% \mbodybackslash is the definition of \ in @macro bodies. -% It maps \foo\ => \csname macarg.foo\endcsname => #N -% where N is the macro parameter number. -% We define \csname macarg.\endcsname to be \realbackslash, so -% \\ in macro replacement text gets you a backslash. - -{\catcode`@=0 @catcode`@\=@active - @gdef@usembodybackslash{@let\=@mbodybackslash} - @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} -} -\expandafter\def\csname macarg.\endcsname{\realbackslash} - -\def\macro{\recursivefalse\parsearg\macroxxx} -\def\rmacro{\recursivetrue\parsearg\macroxxx} - -\def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist - \ifx\argl\empty % no arguments - \paramno=0% - \else - \expandafter\parsemargdef \argl;% - \fi - \if1\csname ismacro.\the\macname\endcsname - \message{Warning: redefining \the\macname}% - \else - \expandafter\ifx\csname \the\macname\endcsname \relax - \else \errmessage{Macro name \the\macname\space already defined}\fi - \global\cslet{macsave.\the\macname}{\the\macname}% - \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% - \addtomacrolist{\the\macname}% - \fi - \begingroup \macrobodyctxt - \ifrecursive \expandafter\parsermacbody - \else \expandafter\parsemacbody - \fi} - -\parseargdef\unmacro{% - \if1\csname ismacro.#1\endcsname - \global\cslet{#1}{macsave.#1}% - \global\expandafter\let \csname ismacro.#1\endcsname=0% - % Remove the macro name from \macrolist: - \begingroup - \expandafter\let\csname#1\endcsname \relax - \let\definedummyword\unmacrodo - \xdef\macrolist{\macrolist}% - \endgroup - \else - \errmessage{Macro #1 not defined}% - \fi -} - -% Called by \do from \dounmacro on each macro. The idea is to omit any -% macro definitions that have been changed to \relax. -% -\def\unmacrodo#1{% - \ifx #1\relax - % remove this - \else - \noexpand\definedummyword \noexpand#1% - \fi -} - -% This makes use of the obscure feature that if the last token of a -% is #, then the preceding argument is delimited by -% an opening brace, and that opening brace is not consumed. -\def\getargs#1{\getargsxxx#1{}} -\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} -\def\getmacargs#1{\def\argl{#1}} - -% Parse the optional {params} list. Set up \paramno and \paramlist -% so \defmacro knows what to do. Define \macarg.blah for each blah -% in the params list, to be ##N where N is the position in that list. -% That gets used by \mbodybackslash (above). - -% We need to get `macro parameter char #' into several definitions. -% The technique used is stolen from LaTeX: let \hash be something -% unexpandable, insert that wherever you need a #, and then redefine -% it to # just before using the token list produced. -% -% The same technique is used to protect \eatspaces till just before -% the macro is used. - -\def\parsemargdef#1;{\paramno=0\def\paramlist{}% - \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} -\def\parsemargdefxxx#1,{% - \if#1;\let\next=\relax - \else \let\next=\parsemargdefxxx - \advance\paramno by 1% - \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname - {\xeatspaces{\hash\the\paramno}}% - \edef\paramlist{\paramlist\hash\the\paramno,}% - \fi\next} - -% These two commands read recursive and nonrecursive macro bodies. -% (They're different since rec and nonrec macros end differently.) - -\long\def\parsemacbody#1@end macro% -{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% -\long\def\parsermacbody#1@end rmacro% -{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% - -% This defines the macro itself. There are six cases: recursive and -% nonrecursive macros of zero, one, and many arguments. -% Much magic with \expandafter here. -% \xdef is used so that macro definitions will survive the file -% they're defined in; @include reads the file inside a group. -\def\defmacro{% - \let\hash=##% convert placeholders to macro parameter chars - \ifrecursive - \ifcase\paramno - % 0 - \expandafter\xdef\csname\the\macname\endcsname{% - \noexpand\scanmacro{\temp}}% - \or % 1 - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\braceorline - \expandafter\noexpand\csname\the\macname xxx\endcsname}% - \expandafter\xdef\csname\the\macname xxx\endcsname##1{% - \egroup\noexpand\scanmacro{\temp}}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{\egroup\noexpand\scanmacro{\temp}}% - \fi - \else - \ifcase\paramno - % 0 - \expandafter\xdef\csname\the\macname\endcsname{% - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% - \or % 1 - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\braceorline - \expandafter\noexpand\csname\the\macname xxx\endcsname}% - \expandafter\xdef\csname\the\macname xxx\endcsname##1{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \expandafter\noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% - \fi - \fi} - -\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} - -% \braceorline decides whether the next nonwhitespace character is a -% {. If so it reads up to the closing }, if not, it reads the whole -% line. Whatever was read is then fed to the next control sequence -% as an argument (by \parsebrace or \parsearg) -\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} -\def\braceorlinexxx{% - \ifx\nchar\bgroup\else - \expandafter\parsearg - \fi \macnamexxx} - - -% @alias. -% We need some trickery to remove the optional spaces around the equal -% sign. Just make them active and then expand them all to nothing. -\def\alias{\parseargusing\obeyspaces\aliasxxx} -\def\aliasxxx #1{\aliasyyy#1\relax} -\def\aliasyyy #1=#2\relax{% - {% - \expandafter\let\obeyedspace=\empty - \addtomacrolist{#1}% - \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% - }% - \next -} - - -\message{cross references,} - -\newwrite\auxfile -\newif\ifhavexrefs % True if xref values are known. -\newif\ifwarnedxrefs % True if we warned once that they aren't known. - -% @inforef is relatively simple. -\def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, - node \samp{\ignorespaces#1{}}} - -% @node's only job in TeX is to define \lastnode, which is used in -% cross-references. The @node line might or might not have commas, and -% might or might not have spaces before the first comma, like: -% @node foo , bar , ... -% We don't want such trailing spaces in the node name. -% -\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} -% -% also remove a trailing comma, in case of something like this: -% @node Help-Cross, , , Cross-refs -\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} -\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} - -\let\nwnode=\node -\let\lastnode=\empty - -% Write a cross-reference definition for the current node. #1 is the -% type (Ynumbered, Yappendix, Ynothing). -% -\def\donoderef#1{% - \ifx\lastnode\empty\else - \setref{\lastnode}{#1}% - \global\let\lastnode=\empty - \fi -} - -% @anchor{NAME} -- define xref target at arbitrary point. -% -\newcount\savesfregister -% -\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} -\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} -\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} - -% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an -% anchor), which consists of three parts: -% 1) NAME-title - the current sectioning name taken from \lastsection, -% or the anchor name. -% 2) NAME-snt - section number and type, passed as the SNT arg, or -% empty for anchors. -% 3) NAME-pg - the page number. -% -% This is called from \donoderef, \anchor, and \dofloat. In the case of -% floats, there is an additional part, which is not written here: -% 4) NAME-lof - the text as it should appear in a @listoffloats. -% -\def\setref#1#2{% - \pdfmkdest{#1}% - \iflinks - {% - \atdummies % preserve commands, but don't expand them - \edef\writexrdef##1##2{% - \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef - ##1}{##2}}% these are parameters of \writexrdef - }% - \toks0 = \expandafter{\lastsection}% - \immediate \writexrdef{title}{\the\toks0 }% - \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout - }% - \fi -} - -% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is -% the node name, #2 the name of the Info cross-reference, #3 the printed -% node name, #4 the name of the Info file, #5 the name of the printed -% manual. All but the node name can be omitted. -% -\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} -\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} -\def\ref#1{\xrefX[#1,,,,,,,]} -\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup - \unsepspaces - \def\printedmanual{\ignorespaces #5}% - \def\printedrefname{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual\unskip}% - \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt - % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax - % Use the node name inside the square brackets. - \def\printedrefname{\ignorespaces #1}% - \else - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1 > 0pt - % It is in another manual, so we don't have it. - \def\printedrefname{\ignorespaces #1}% - \else - \ifhavexrefs - % We know the real title if we have the xref values. - \def\printedrefname{\refx{#1-title}{}}% - \else - % Otherwise just copy the Info node name. - \def\printedrefname{\ignorespaces #1}% - \fi% - \fi - \fi - \fi - % - % Make link in pdf output. - \ifpdf - {\indexnofonts - \turnoffactive - % This expands tokens, so do it after making catcode changes, so _ - % etc. don't get their TeX definitions. - \getfilename{#4}% - % - % See comments at \activebackslashdouble. - {\activebackslashdouble \xdef\pdfxrefdest{#1}% - \backslashparens\pdfxrefdest}% - % - \leavevmode - \startlink attr{/Border [0 0 0]}% - \ifnum\filenamelength>0 - goto file{\the\filename.pdf} name{\pdfxrefdest}% - \else - goto name{\pdfmkpgn{\pdfxrefdest}}% - \fi - }% - \setcolor{\linkcolor}% - \fi - % - % Float references are printed completely differently: "Figure 1.2" - % instead of "[somenode], p.3". We distinguish them by the - % LABEL-title being set to a magic string. - {% - % Have to otherify everything special to allow the \csname to - % include an _ in the xref name, etc. - \indexnofonts - \turnoffactive - \expandafter\global\expandafter\let\expandafter\Xthisreftitle - \csname XR#1-title\endcsname - }% - \iffloat\Xthisreftitle - % If the user specified the print name (third arg) to the ref, - % print it instead of our usual "Figure 1.2". - \ifdim\wd0 = 0pt - \refx{#1-snt}{}% - \else - \printedrefname - \fi - % - % if the user also gave the printed manual name (fifth arg), append - % "in MANUALNAME". - \ifdim \wd1 > 0pt - \space \putwordin{} \cite{\printedmanual}% - \fi - \else - % node/anchor (non-float) references. - % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. - \ifdim \wd1 > 0pt - \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% - \else - % _ (for example) has to be the character _ for the purposes of the - % control sequence corresponding to the node, but it has to expand - % into the usual \leavevmode...\vrule stuff for purposes of - % printing. So we \turnoffactive for the \refx-snt, back on for the - % printing, back off for the \refx-pg. - {\turnoffactive - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% - \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi - }% - % output the `[mynode]' via a macro so it can be overridden. - \xrefprintnodename\printedrefname - % - % But we always want a comma and a space: - ,\space - % - % output the `page 3'. - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \fi - \fi - \endlink -\endgroup} - -% This macro is called from \xrefX for the `[nodename]' part of xref -% output. It's a separate macro only so it can be changed more easily, -% since square brackets don't work well in some documents. Particularly -% one that Bob is working on :). -% -\def\xrefprintnodename#1{[#1]} - -% Things referred to by \setref. -% -\def\Ynothing{} -\def\Yomitfromtoc{} -\def\Ynumbered{% - \ifnum\secno=0 - \putwordChapter@tie \the\chapno - \else \ifnum\subsecno=0 - \putwordSection@tie \the\chapno.\the\secno - \else \ifnum\subsubsecno=0 - \putwordSection@tie \the\chapno.\the\secno.\the\subsecno - \else - \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno - \fi\fi\fi -} -\def\Yappendix{% - \ifnum\secno=0 - \putwordAppendix@tie @char\the\appendixno{}% - \else \ifnum\subsecno=0 - \putwordSection@tie @char\the\appendixno.\the\secno - \else \ifnum\subsubsecno=0 - \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno - \else - \putwordSection@tie - @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno - \fi\fi\fi -} - -% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. -% If its value is nonempty, SUFFIX is output afterward. -% -\def\refx#1#2{% - {% - \indexnofonts - \otherbackslash - \expandafter\global\expandafter\let\expandafter\thisrefX - \csname XR#1\endcsname - }% - \ifx\thisrefX\relax - % If not defined, say something at least. - \angleleft un\-de\-fined\angleright - \iflinks - \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% - \else - \ifwarnedxrefs\else - \global\warnedxrefstrue - \message{Cross reference values unknown; you must run TeX again.}% - \fi - \fi - \fi - \else - % It's defined, so just use it. - \thisrefX - \fi - #2% Output the suffix in any case. -} - -% This is the macro invoked by entries in the aux file. Usually it's -% just a \def (we prepend XR to the control sequence name to avoid -% collisions). But if this is a float type, we have more work to do. -% -\def\xrdef#1#2{% - {% The node name might contain 8-bit characters, which in our current - % implementation are changed to commands like @'e. Don't let these - % mess up the control sequence name. - \indexnofonts - \turnoffactive - \xdef\safexrefname{#1}% - }% - % - \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref - % - % Was that xref control sequence that we just defined for a float? - \expandafter\iffloat\csname XR\safexrefname\endcsname - % it was a float, and we have the (safe) float type in \iffloattype. - \expandafter\let\expandafter\floatlist - \csname floatlist\iffloattype\endcsname - % - % Is this the first time we've seen this float type? - \expandafter\ifx\floatlist\relax - \toks0 = {\do}% yes, so just \do - \else - % had it before, so preserve previous elements in list. - \toks0 = \expandafter{\floatlist\do}% - \fi - % - % Remember this xref in the control sequence \floatlistFLOATTYPE, - % for later use in \listoffloats. - \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 - {\safexrefname}}% - \fi -} - -% Read the last existing aux file, if any. No error if none exists. -% -\def\tryauxfile{% - \openin 1 \jobname.aux - \ifeof 1 \else - \readdatafile{aux}% - \global\havexrefstrue - \fi - \closein 1 -} - -\def\setupdatafile{% - \catcode`\^^@=\other - \catcode`\^^A=\other - \catcode`\^^B=\other - \catcode`\^^C=\other - \catcode`\^^D=\other - \catcode`\^^E=\other - \catcode`\^^F=\other - \catcode`\^^G=\other - \catcode`\^^H=\other - \catcode`\^^K=\other - \catcode`\^^L=\other - \catcode`\^^N=\other - \catcode`\^^P=\other - \catcode`\^^Q=\other - \catcode`\^^R=\other - \catcode`\^^S=\other - \catcode`\^^T=\other - \catcode`\^^U=\other - \catcode`\^^V=\other - \catcode`\^^W=\other - \catcode`\^^X=\other - \catcode`\^^Z=\other - \catcode`\^^[=\other - \catcode`\^^\=\other - \catcode`\^^]=\other - \catcode`\^^^=\other - \catcode`\^^_=\other - % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. - % in xref tags, i.e., node names. But since ^^e4 notation isn't - % supported in the main text, it doesn't seem desirable. Furthermore, - % that is not enough: for node names that actually contain a ^ - % character, we would end up writing a line like this: 'xrdef {'hat - % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first - % argument, and \hat is not an expandable control sequence. It could - % all be worked out, but why? Either we support ^^ or we don't. - % - % The other change necessary for this was to define \auxhat: - % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter - % and then to call \auxhat in \setq. - % - \catcode`\^=\other - % - % Special characters. Should be turned off anyway, but... - \catcode`\~=\other - \catcode`\[=\other - \catcode`\]=\other - \catcode`\"=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\<=\other - \catcode`\>=\other - \catcode`\$=\other - \catcode`\#=\other - \catcode`\&=\other - \catcode`\%=\other - \catcode`+=\other % avoid \+ for paranoia even though we've turned it off - % - % This is to support \ in node names and titles, since the \ - % characters end up in a \csname. It's easier than - % leaving it active and making its active definition an actual \ - % character. What I don't understand is why it works in the *value* - % of the xrdef. Seems like it should be a catcode12 \, and that - % should not typeset properly. But it works, so I'm moving on for - % now. --karl, 15jan04. - \catcode`\\=\other - % - % Make the characters 128-255 be printing characters. - {% - \count1=128 - \def\loop{% - \catcode\count1=\other - \advance\count1 by 1 - \ifnum \count1<256 \loop \fi - }% - }% - % - % @ is our escape character in .aux files, and we need braces. - \catcode`\{=1 - \catcode`\}=2 - \catcode`\@=0 -} - -\def\readdatafile#1{% -\begingroup - \setupdatafile - \input\jobname.#1 -\endgroup} - - -\message{insertions,} -% including footnotes. - -\newcount \footnoteno - -% The trailing space in the following definition for supereject is -% vital for proper filling; pages come out unaligned when you do a -% pagealignmacro call if that space before the closing brace is -% removed. (Generally, numeric constants should always be followed by a -% space to prevent strange expansion errors.) -\def\supereject{\par\penalty -20000\footnoteno =0 } - -% @footnotestyle is meaningful for info output only. -\let\footnotestyle=\comment - -{\catcode `\@=11 -% -% Auto-number footnotes. Otherwise like plain. -\gdef\footnote{% - \let\indent=\ptexindent - \let\noindent=\ptexnoindent - \global\advance\footnoteno by \@ne - \edef\thisfootno{$^{\the\footnoteno}$}% - % - % In case the footnote comes at the end of a sentence, preserve the - % extra spacing after we do the footnote number. - \let\@sf\empty - \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi - % - % Remove inadvertent blank space before typesetting the footnote number. - \unskip - \thisfootno\@sf - \dofootnote -}% - -% Don't bother with the trickery in plain.tex to not require the -% footnote text as a parameter. Our footnotes don't need to be so general. -% -% Oh yes, they do; otherwise, @ifset (and anything else that uses -% \parseargline) fails inside footnotes because the tokens are fixed when -% the footnote is read. --karl, 16nov96. -% -\gdef\dofootnote{% - \insert\footins\bgroup - % We want to typeset this text as a normal paragraph, even if the - % footnote reference occurs in (for example) a display environment. - % So reset some parameters. - \hsize=\pagewidth - \interlinepenalty\interfootnotelinepenalty - \splittopskip\ht\strutbox % top baseline for broken footnotes - \splitmaxdepth\dp\strutbox - \floatingpenalty\@MM - \leftskip\z@skip - \rightskip\z@skip - \spaceskip\z@skip - \xspaceskip\z@skip - \parindent\defaultparindent - % - \smallfonts \rm - % - % Because we use hanging indentation in footnotes, a @noindent appears - % to exdent this text, so make it be a no-op. makeinfo does not use - % hanging indentation so @noindent can still be needed within footnote - % text after an @example or the like (not that this is good style). - \let\noindent = \relax - % - % Hang the footnote text off the number. Use \everypar in case the - % footnote extends for more than one paragraph. - \everypar = {\hang}% - \textindent{\thisfootno}% - % - % Don't crash into the line above the footnote text. Since this - % expands into a box, it must come within the paragraph, lest it - % provide a place where TeX can split the footnote. - \footstrut - \futurelet\next\fo@t -} -}%end \catcode `\@=11 - -% In case a @footnote appears in a vbox, save the footnote text and create -% the real \insert just after the vbox finished. Otherwise, the insertion -% would be lost. -% Similarly, if a @footnote appears inside an alignment, save the footnote -% text to a box and make the \insert when a row of the table is finished. -% And the same can be done for other insert classes. --kasal, 16nov03. - -% Replace the \insert primitive by a cheating macro. -% Deeper inside, just make sure that the saved insertions are not spilled -% out prematurely. -% -\def\startsavinginserts{% - \ifx \insert\ptexinsert - \let\insert\saveinsert - \else - \let\checkinserts\relax - \fi -} - -% This \insert replacement works for both \insert\footins{foo} and -% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. -% -\def\saveinsert#1{% - \edef\next{\noexpand\savetobox \makeSAVEname#1}% - \afterassignment\next - % swallow the left brace - \let\temp = -} -\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} -\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} - -\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} - -\def\placesaveins#1{% - \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname - {\box#1}% -} - -% eat @SAVE -- beware, all of them have catcode \other: -{ - \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) - \gdef\gobblesave @SAVE{} -} - -% initialization: -\def\newsaveins #1{% - \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% - \next -} -\def\newsaveinsX #1{% - \csname newbox\endcsname #1% - \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts - \checksaveins #1}% -} - -% initialize: -\let\checkinserts\empty -\newsaveins\footins -\newsaveins\margin - - -% @image. We use the macros from epsf.tex to support this. -% If epsf.tex is not installed and @image is used, we complain. -% -% Check for and read epsf.tex up front. If we read it only at @image -% time, we might be inside a group, and then its definitions would get -% undone and the next image would fail. -\openin 1 = epsf.tex -\ifeof 1 \else - % Do not bother showing banner with epsf.tex v2.7k (available in - % doc/epsf.tex and on ctan). - \def\epsfannounce{\toks0 = }% - \input epsf.tex -\fi -\closein 1 -% -% We will only complain once about lack of epsf.tex. -\newif\ifwarnednoepsf -\newhelp\noepsfhelp{epsf.tex must be installed for images to - work. It is also included in the Texinfo distribution, or you can get - it from ftp://tug.org/tex/epsf.tex.} -% -\def\image#1{% - \ifx\epsfbox\undefined - \ifwarnednoepsf \else - \errhelp = \noepsfhelp - \errmessage{epsf.tex not found, images will be ignored}% - \global\warnednoepsftrue - \fi - \else - \imagexxx #1,,,,,\finish - \fi -} -% -% Arguments to @image: -% #1 is (mandatory) image filename; we tack on .eps extension. -% #2 is (optional) width, #3 is (optional) height. -% #4 is (ignored optional) html alt text. -% #5 is (ignored optional) extension. -% #6 is just the usual extra ignored arg for parsing this stuff. -\newif\ifimagevmode -\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup - \catcode`\^^M = 5 % in case we're inside an example - \normalturnoffactive % allow _ et al. in names - % If the image is by itself, center it. - \ifvmode - \imagevmodetrue - \nobreak\medskip - % Usually we'll have text after the image which will insert - % \parskip glue, so insert it here too to equalize the space - % above and below. - \nobreak\vskip\parskip - \nobreak - \fi - % - % Leave vertical mode so that indentation from an enclosing - % environment such as @quotation is respected. On the other hand, if - % it's at the top level, we don't want the normal paragraph indentation. - \noindent - % - % Output the image. - \ifpdf - \dopdfimage{#1}{#2}{#3}% - \else - % \epsfbox itself resets \epsf?size at each figure. - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi - \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi - \epsfbox{#1.eps}% - \fi - % - \ifimagevmode \medskip \fi % space after the standalone image -\endgroup} - - -% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, -% etc. We don't actually implement floating yet, we always include the -% float "here". But it seemed the best name for the future. -% -\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} - -% There may be a space before second and/or third parameter; delete it. -\def\eatcommaspace#1, {#1,} - -% #1 is the optional FLOATTYPE, the text label for this float, typically -% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, -% this float will not be numbered and cannot be referred to. -% -% #2 is the optional xref label. Also must be present for the float to -% be referable. -% -% #3 is the optional positioning argument; for now, it is ignored. It -% will somehow specify the positions allowed to float to (here, top, bottom). -% -% We keep a separate counter for each FLOATTYPE, which we reset at each -% chapter-level command. -\let\resetallfloatnos=\empty -% -\def\dofloat#1,#2,#3,#4\finish{% - \let\thiscaption=\empty - \let\thisshortcaption=\empty - % - % don't lose footnotes inside @float. - % - % BEWARE: when the floats start float, we have to issue warning whenever an - % insert appears inside a float which could possibly float. --kasal, 26may04 - % - \startsavinginserts - % - % We can't be used inside a paragraph. - \par - % - \vtop\bgroup - \def\floattype{#1}% - \def\floatlabel{#2}% - \def\floatloc{#3}% we do nothing with this yet. - % - \ifx\floattype\empty - \let\safefloattype=\empty - \else - {% - % the floattype might have accents or other special characters, - % but we need to use it in a control sequence name. - \indexnofonts - \turnoffactive - \xdef\safefloattype{\floattype}% - }% - \fi - % - % If label is given but no type, we handle that as the empty type. - \ifx\floatlabel\empty \else - % We want each FLOATTYPE to be numbered separately (Figure 1, - % Table 1, Figure 2, ...). (And if no label, no number.) - % - \expandafter\getfloatno\csname\safefloattype floatno\endcsname - \global\advance\floatno by 1 - % - {% - % This magic value for \lastsection is output by \setref as the - % XREFLABEL-title value. \xrefX uses it to distinguish float - % labels (which have a completely different output format) from - % node and anchor labels. And \xrdef uses it to construct the - % lists of floats. - % - \edef\lastsection{\floatmagic=\safefloattype}% - \setref{\floatlabel}{Yfloat}% - }% - \fi - % - % start with \parskip glue, I guess. - \vskip\parskip - % - % Don't suppress indentation if a float happens to start a section. - \restorefirstparagraphindent -} - -% we have these possibilities: -% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap -% @float Foo,lbl & no caption: Foo 1.1 -% @float Foo & @caption{Cap}: Foo: Cap -% @float Foo & no caption: Foo -% @float ,lbl & Caption{Cap}: 1.1: Cap -% @float ,lbl & no caption: 1.1 -% @float & @caption{Cap}: Cap -% @float & no caption: -% -\def\Efloat{% - \let\floatident = \empty - % - % In all cases, if we have a float type, it comes first. - \ifx\floattype\empty \else \def\floatident{\floattype}\fi - % - % If we have an xref label, the number comes next. - \ifx\floatlabel\empty \else - \ifx\floattype\empty \else % if also had float type, need tie first. - \appendtomacro\floatident{\tie}% - \fi - % the number. - \appendtomacro\floatident{\chaplevelprefix\the\floatno}% - \fi - % - % Start the printed caption with what we've constructed in - % \floatident, but keep it separate; we need \floatident again. - \let\captionline = \floatident - % - \ifx\thiscaption\empty \else - \ifx\floatident\empty \else - \appendtomacro\captionline{: }% had ident, so need a colon between - \fi - % - % caption text. - \appendtomacro\captionline{\scanexp\thiscaption}% - \fi - % - % If we have anything to print, print it, with space before. - % Eventually this needs to become an \insert. - \ifx\captionline\empty \else - \vskip.5\parskip - \captionline - % - % Space below caption. - \vskip\parskip - \fi - % - % If have an xref label, write the list of floats info. Do this - % after the caption, to avoid chance of it being a breakpoint. - \ifx\floatlabel\empty \else - % Write the text that goes in the lof to the aux file as - % \floatlabel-lof. Besides \floatident, we include the short - % caption if specified, else the full caption if specified, else nothing. - {% - \atdummies - % - % since we read the caption text in the macro world, where ^^M - % is turned into a normal character, we have to scan it back, so - % we don't write the literal three characters "^^M" into the aux file. - \scanexp{% - \xdef\noexpand\gtemp{% - \ifx\thisshortcaption\empty - \thiscaption - \else - \thisshortcaption - \fi - }% - }% - \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident - \ifx\gtemp\empty \else : \gtemp \fi}}% - }% - \fi - \egroup % end of \vtop - % - % place the captured inserts - % - % BEWARE: when the floats start floating, we have to issue warning - % whenever an insert appears inside a float which could possibly - % float. --kasal, 26may04 - % - \checkinserts -} - -% Append the tokens #2 to the definition of macro #1, not expanding either. -% -\def\appendtomacro#1#2{% - \expandafter\def\expandafter#1\expandafter{#1#2}% -} - -% @caption, @shortcaption -% -\def\caption{\docaption\thiscaption} -\def\shortcaption{\docaption\thisshortcaption} -\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} -\def\defcaption#1#2{\egroup \def#1{#2}} - -% The parameter is the control sequence identifying the counter we are -% going to use. Create it if it doesn't exist and assign it to \floatno. -\def\getfloatno#1{% - \ifx#1\relax - % Haven't seen this figure type before. - \csname newcount\endcsname #1% - % - % Remember to reset this floatno at the next chap. - \expandafter\gdef\expandafter\resetallfloatnos - \expandafter{\resetallfloatnos #1=0 }% - \fi - \let\floatno#1% -} - -% \setref calls this to get the XREFLABEL-snt value. We want an @xref -% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we -% first read the @float command. -% -\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% - -% Magic string used for the XREFLABEL-title value, so \xrefX can -% distinguish floats from other xref types. -\def\floatmagic{!!float!!} - -% #1 is the control sequence we are passed; we expand into a conditional -% which is true if #1 represents a float ref. That is, the magic -% \lastsection value which we \setref above. -% -\def\iffloat#1{\expandafter\doiffloat#1==\finish} -% -% #1 is (maybe) the \floatmagic string. If so, #2 will be the -% (safe) float type for this float. We set \iffloattype to #2. -% -\def\doiffloat#1=#2=#3\finish{% - \def\temp{#1}% - \def\iffloattype{#2}% - \ifx\temp\floatmagic -} - -% @listoffloats FLOATTYPE - print a list of floats like a table of contents. -% -\parseargdef\listoffloats{% - \def\floattype{#1}% floattype - {% - % the floattype might have accents or other special characters, - % but we need to use it in a control sequence name. - \indexnofonts - \turnoffactive - \xdef\safefloattype{\floattype}% - }% - % - % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. - \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax - \ifhavexrefs - % if the user said @listoffloats foo but never @float foo. - \message{\linenumber No `\safefloattype' floats to list.}% - \fi - \else - \begingroup - \leftskip=\tocindent % indent these entries like a toc - \let\do=\listoffloatsdo - \csname floatlist\safefloattype\endcsname - \endgroup - \fi -} - -% This is called on each entry in a list of floats. We're passed the -% xref label, in the form LABEL-title, which is how we save it in the -% aux file. We strip off the -title and look up \XRLABEL-lof, which -% has the text we're supposed to typeset here. -% -% Figures without xref labels will not be included in the list (since -% they won't appear in the aux file). -% -\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} -\def\listoffloatsdoentry#1-title\finish{{% - % Can't fully expand XR#1-lof because it can contain anything. Just - % pass the control sequence. On the other hand, XR#1-pg is just the - % page number, and we want to fully expand that so we can get a link - % in pdf output. - \toksA = \expandafter{\csname XR#1-lof\endcsname}% - % - % use the same \entry macro we use to generate the TOC and index. - \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% - \writeentry -}} - - -\message{localization,} - -% For single-language documents, @documentlanguage is usually given very -% early, just after @documentencoding. Single argument is the language -% (de) or locale (de_DE) abbreviation. -% -{ - \catcode`\_ = \active - \globaldefs=1 -\parseargdef\documentlanguage{\begingroup - \let_=\normalunderscore % normal _ character for filenames - \tex % read txi-??.tex file in plain TeX. - % Read the file by the name they passed if it exists. - \openin 1 txi-#1.tex - \ifeof 1 - \documentlanguagetrywithoutunderscore{#1_\finish}% - \else - \globaldefs = 1 % everything in the txi-LL files needs to persist - \input txi-#1.tex - \fi - \closein 1 - \endgroup % end raw TeX -\endgroup} -% -% If they passed de_DE, and txi-de_DE.tex doesn't exist, -% try txi-de.tex. -% -\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% - \openin 1 txi-#1.tex - \ifeof 1 - \errhelp = \nolanghelp - \errmessage{Cannot read language file txi-#1.tex}% - \else - \globaldefs = 1 % everything in the txi-LL files needs to persist - \input txi-#1.tex - \fi - \closein 1 -} -}% end of special _ catcode -% -\newhelp\nolanghelp{The given language definition file cannot be found or -is empty. Maybe you need to install it? Putting it in the current -directory should work if nowhere else does.} - -% This macro is called from txi-??.tex files; the first argument is the -% \language name to set (without the "\lang@" prefix), the second and -% third args are \{left,right}hyphenmin. -% -% The language names to pass are determined when the format is built. -% See the etex.log file created at that time, e.g., -% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. -% -% With TeX Live 2008, etex now includes hyphenation patterns for all -% available languages. This means we can support hyphenation in -% Texinfo, at least to some extent. (This still doesn't solve the -% accented characters problem.) -% -\catcode`@=11 -\def\txisetlanguage#1#2#3{% - % do not set the language if the name is undefined in the current TeX. - \expandafter\ifx\csname lang@#1\endcsname \relax - \message{no patterns for #1}% - \else - \global\language = \csname lang@#1\endcsname - \fi - % but there is no harm in adjusting the hyphenmin values regardless. - \global\lefthyphenmin = #2\relax - \global\righthyphenmin = #3\relax -} - -% Helpers for encodings. -% Set the catcode of characters 128 through 255 to the specified number. -% -\def\setnonasciicharscatcode#1{% - \count255=128 - \loop\ifnum\count255<256 - \global\catcode\count255=#1\relax - \advance\count255 by 1 - \repeat -} - -\def\setnonasciicharscatcodenonglobal#1{% - \count255=128 - \loop\ifnum\count255<256 - \catcode\count255=#1\relax - \advance\count255 by 1 - \repeat -} - -% @documentencoding sets the definition of non-ASCII characters -% according to the specified encoding. -% -\parseargdef\documentencoding{% - % Encoding being declared for the document. - \def\declaredencoding{\csname #1.enc\endcsname}% - % - % Supported encodings: names converted to tokens in order to be able - % to compare them with \ifx. - \def\ascii{\csname US-ASCII.enc\endcsname}% - \def\latnine{\csname ISO-8859-15.enc\endcsname}% - \def\latone{\csname ISO-8859-1.enc\endcsname}% - \def\lattwo{\csname ISO-8859-2.enc\endcsname}% - \def\utfeight{\csname UTF-8.enc\endcsname}% - % - \ifx \declaredencoding \ascii - \asciichardefs - % - \else \ifx \declaredencoding \lattwo - \setnonasciicharscatcode\active - \lattwochardefs - % - \else \ifx \declaredencoding \latone - \setnonasciicharscatcode\active - \latonechardefs - % - \else \ifx \declaredencoding \latnine - \setnonasciicharscatcode\active - \latninechardefs - % - \else \ifx \declaredencoding \utfeight - \setnonasciicharscatcode\active - \utfeightchardefs - % - \else - \message{Unknown document encoding #1, ignoring.}% - % - \fi % utfeight - \fi % latnine - \fi % latone - \fi % lattwo - \fi % ascii -} - -% A message to be logged when using a character that isn't available -% the default font encoding (OT1). -% -\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} - -% Take account of \c (plain) vs. \, (Texinfo) difference. -\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} - -% First, make active non-ASCII characters in order for them to be -% correctly categorized when TeX reads the replacement text of -% macros containing the character definitions. -\setnonasciicharscatcode\active -% -% Latin1 (ISO-8859-1) character definitions. -\def\latonechardefs{% - \gdef^^a0{~} - \gdef^^a1{\exclamdown} - \gdef^^a2{\missingcharmsg{CENT SIGN}} - \gdef^^a3{{\pounds}} - \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} - \gdef^^a5{\missingcharmsg{YEN SIGN}} - \gdef^^a6{\missingcharmsg{BROKEN BAR}} - \gdef^^a7{\S} - \gdef^^a8{\"{}} - \gdef^^a9{\copyright} - \gdef^^aa{\ordf} - \gdef^^ab{\guillemetleft} - \gdef^^ac{$\lnot$} - \gdef^^ad{\-} - \gdef^^ae{\registeredsymbol} - \gdef^^af{\={}} - % - \gdef^^b0{\textdegree} - \gdef^^b1{$\pm$} - \gdef^^b2{$^2$} - \gdef^^b3{$^3$} - \gdef^^b4{\'{}} - \gdef^^b5{$\mu$} - \gdef^^b6{\P} - % - \gdef^^b7{$^.$} - \gdef^^b8{\cedilla\ } - \gdef^^b9{$^1$} - \gdef^^ba{\ordm} - % - \gdef^^bb{\guilletright} - \gdef^^bc{$1\over4$} - \gdef^^bd{$1\over2$} - \gdef^^be{$3\over4$} - \gdef^^bf{\questiondown} - % - \gdef^^c0{\`A} - \gdef^^c1{\'A} - \gdef^^c2{\^A} - \gdef^^c3{\~A} - \gdef^^c4{\"A} - \gdef^^c5{\ringaccent A} - \gdef^^c6{\AE} - \gdef^^c7{\cedilla C} - \gdef^^c8{\`E} - \gdef^^c9{\'E} - \gdef^^ca{\^E} - \gdef^^cb{\"E} - \gdef^^cc{\`I} - \gdef^^cd{\'I} - \gdef^^ce{\^I} - \gdef^^cf{\"I} - % - \gdef^^d0{\DH} - \gdef^^d1{\~N} - \gdef^^d2{\`O} - \gdef^^d3{\'O} - \gdef^^d4{\^O} - \gdef^^d5{\~O} - \gdef^^d6{\"O} - \gdef^^d7{$\times$} - \gdef^^d8{\O} - \gdef^^d9{\`U} - \gdef^^da{\'U} - \gdef^^db{\^U} - \gdef^^dc{\"U} - \gdef^^dd{\'Y} - \gdef^^de{\TH} - \gdef^^df{\ss} - % - \gdef^^e0{\`a} - \gdef^^e1{\'a} - \gdef^^e2{\^a} - \gdef^^e3{\~a} - \gdef^^e4{\"a} - \gdef^^e5{\ringaccent a} - \gdef^^e6{\ae} - \gdef^^e7{\cedilla c} - \gdef^^e8{\`e} - \gdef^^e9{\'e} - \gdef^^ea{\^e} - \gdef^^eb{\"e} - \gdef^^ec{\`{\dotless i}} - \gdef^^ed{\'{\dotless i}} - \gdef^^ee{\^{\dotless i}} - \gdef^^ef{\"{\dotless i}} - % - \gdef^^f0{\dh} - \gdef^^f1{\~n} - \gdef^^f2{\`o} - \gdef^^f3{\'o} - \gdef^^f4{\^o} - \gdef^^f5{\~o} - \gdef^^f6{\"o} - \gdef^^f7{$\div$} - \gdef^^f8{\o} - \gdef^^f9{\`u} - \gdef^^fa{\'u} - \gdef^^fb{\^u} - \gdef^^fc{\"u} - \gdef^^fd{\'y} - \gdef^^fe{\th} - \gdef^^ff{\"y} -} - -% Latin9 (ISO-8859-15) encoding character definitions. -\def\latninechardefs{% - % Encoding is almost identical to Latin1. - \latonechardefs - % - \gdef^^a4{\euro} - \gdef^^a6{\v S} - \gdef^^a8{\v s} - \gdef^^b4{\v Z} - \gdef^^b8{\v z} - \gdef^^bc{\OE} - \gdef^^bd{\oe} - \gdef^^be{\"Y} -} - -% Latin2 (ISO-8859-2) character definitions. -\def\lattwochardefs{% - \gdef^^a0{~} - \gdef^^a1{\ogonek{A}} - \gdef^^a2{\u{}} - \gdef^^a3{\L} - \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} - \gdef^^a5{\v L} - \gdef^^a6{\'S} - \gdef^^a7{\S} - \gdef^^a8{\"{}} - \gdef^^a9{\v S} - \gdef^^aa{\cedilla S} - \gdef^^ab{\v T} - \gdef^^ac{\'Z} - \gdef^^ad{\-} - \gdef^^ae{\v Z} - \gdef^^af{\dotaccent Z} - % - \gdef^^b0{\textdegree} - \gdef^^b1{\ogonek{a}} - \gdef^^b2{\ogonek{ }} - \gdef^^b3{\l} - \gdef^^b4{\'{}} - \gdef^^b5{\v l} - \gdef^^b6{\'s} - \gdef^^b7{\v{}} - \gdef^^b8{\cedilla\ } - \gdef^^b9{\v s} - \gdef^^ba{\cedilla s} - \gdef^^bb{\v t} - \gdef^^bc{\'z} - \gdef^^bd{\H{}} - \gdef^^be{\v z} - \gdef^^bf{\dotaccent z} - % - \gdef^^c0{\'R} - \gdef^^c1{\'A} - \gdef^^c2{\^A} - \gdef^^c3{\u A} - \gdef^^c4{\"A} - \gdef^^c5{\'L} - \gdef^^c6{\'C} - \gdef^^c7{\cedilla C} - \gdef^^c8{\v C} - \gdef^^c9{\'E} - \gdef^^ca{\ogonek{E}} - \gdef^^cb{\"E} - \gdef^^cc{\v E} - \gdef^^cd{\'I} - \gdef^^ce{\^I} - \gdef^^cf{\v D} - % - \gdef^^d0{\DH} - \gdef^^d1{\'N} - \gdef^^d2{\v N} - \gdef^^d3{\'O} - \gdef^^d4{\^O} - \gdef^^d5{\H O} - \gdef^^d6{\"O} - \gdef^^d7{$\times$} - \gdef^^d8{\v R} - \gdef^^d9{\ringaccent U} - \gdef^^da{\'U} - \gdef^^db{\H U} - \gdef^^dc{\"U} - \gdef^^dd{\'Y} - \gdef^^de{\cedilla T} - \gdef^^df{\ss} - % - \gdef^^e0{\'r} - \gdef^^e1{\'a} - \gdef^^e2{\^a} - \gdef^^e3{\u a} - \gdef^^e4{\"a} - \gdef^^e5{\'l} - \gdef^^e6{\'c} - \gdef^^e7{\cedilla c} - \gdef^^e8{\v c} - \gdef^^e9{\'e} - \gdef^^ea{\ogonek{e}} - \gdef^^eb{\"e} - \gdef^^ec{\v e} - \gdef^^ed{\'\i} - \gdef^^ee{\^\i} - \gdef^^ef{\v d} - % - \gdef^^f0{\dh} - \gdef^^f1{\'n} - \gdef^^f2{\v n} - \gdef^^f3{\'o} - \gdef^^f4{\^o} - \gdef^^f5{\H o} - \gdef^^f6{\"o} - \gdef^^f7{$\div$} - \gdef^^f8{\v r} - \gdef^^f9{\ringaccent u} - \gdef^^fa{\'u} - \gdef^^fb{\H u} - \gdef^^fc{\"u} - \gdef^^fd{\'y} - \gdef^^fe{\cedilla t} - \gdef^^ff{\dotaccent{}} -} - -% UTF-8 character definitions. -% -% This code to support UTF-8 is based on LaTeX's utf8.def, with some -% changes for Texinfo conventions. It is included here under the GPL by -% permission from Frank Mittelbach and the LaTeX team. -% -\newcount\countUTFx -\newcount\countUTFy -\newcount\countUTFz - -\gdef\UTFviiiTwoOctets#1#2{\expandafter - \UTFviiiDefined\csname u8:#1\string #2\endcsname} -% -\gdef\UTFviiiThreeOctets#1#2#3{\expandafter - \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} -% -\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter - \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} - -\gdef\UTFviiiDefined#1{% - \ifx #1\relax - \message{\linenumber Unicode char \string #1 not defined for Texinfo}% - \else - \expandafter #1% - \fi -} - -\begingroup - \catcode`\~13 - \catcode`\"12 - - \def\UTFviiiLoop{% - \global\catcode\countUTFx\active - \uccode`\~\countUTFx - \uppercase\expandafter{\UTFviiiTmp}% - \advance\countUTFx by 1 - \ifnum\countUTFx < \countUTFy - \expandafter\UTFviiiLoop - \fi} - - \countUTFx = "C2 - \countUTFy = "E0 - \def\UTFviiiTmp{% - \xdef~{\noexpand\UTFviiiTwoOctets\string~}} - \UTFviiiLoop - - \countUTFx = "E0 - \countUTFy = "F0 - \def\UTFviiiTmp{% - \xdef~{\noexpand\UTFviiiThreeOctets\string~}} - \UTFviiiLoop - - \countUTFx = "F0 - \countUTFy = "F4 - \def\UTFviiiTmp{% - \xdef~{\noexpand\UTFviiiFourOctets\string~}} - \UTFviiiLoop -\endgroup - -\begingroup - \catcode`\"=12 - \catcode`\<=12 - \catcode`\.=12 - \catcode`\,=12 - \catcode`\;=12 - \catcode`\!=12 - \catcode`\~=13 - - \gdef\DeclareUnicodeCharacter#1#2{% - \countUTFz = "#1\relax - \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% - \begingroup - \parseXMLCharref - \def\UTFviiiTwoOctets##1##2{% - \csname u8:##1\string ##2\endcsname}% - \def\UTFviiiThreeOctets##1##2##3{% - \csname u8:##1\string ##2\string ##3\endcsname}% - \def\UTFviiiFourOctets##1##2##3##4{% - \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% - \expandafter\expandafter\expandafter\expandafter - \expandafter\expandafter\expandafter - \gdef\UTFviiiTmp{#2}% - \endgroup} - - \gdef\parseXMLCharref{% - \ifnum\countUTFz < "A0\relax - \errhelp = \EMsimple - \errmessage{Cannot define Unicode char value < 00A0}% - \else\ifnum\countUTFz < "800\relax - \parseUTFviiiA,% - \parseUTFviiiB C\UTFviiiTwoOctets.,% - \else\ifnum\countUTFz < "10000\relax - \parseUTFviiiA;% - \parseUTFviiiA,% - \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% - \else - \parseUTFviiiA;% - \parseUTFviiiA,% - \parseUTFviiiA!% - \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% - \fi\fi\fi - } - - \gdef\parseUTFviiiA#1{% - \countUTFx = \countUTFz - \divide\countUTFz by 64 - \countUTFy = \countUTFz - \multiply\countUTFz by 64 - \advance\countUTFx by -\countUTFz - \advance\countUTFx by 128 - \uccode `#1\countUTFx - \countUTFz = \countUTFy} - - \gdef\parseUTFviiiB#1#2#3#4{% - \advance\countUTFz by "#10\relax - \uccode `#3\countUTFz - \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} -\endgroup - -\def\utfeightchardefs{% - \DeclareUnicodeCharacter{00A0}{\tie} - \DeclareUnicodeCharacter{00A1}{\exclamdown} - \DeclareUnicodeCharacter{00A3}{\pounds} - \DeclareUnicodeCharacter{00A8}{\"{ }} - \DeclareUnicodeCharacter{00A9}{\copyright} - \DeclareUnicodeCharacter{00AA}{\ordf} - \DeclareUnicodeCharacter{00AB}{\guillemetleft} - \DeclareUnicodeCharacter{00AD}{\-} - \DeclareUnicodeCharacter{00AE}{\registeredsymbol} - \DeclareUnicodeCharacter{00AF}{\={ }} - - \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} - \DeclareUnicodeCharacter{00B4}{\'{ }} - \DeclareUnicodeCharacter{00B8}{\cedilla{ }} - \DeclareUnicodeCharacter{00BA}{\ordm} - \DeclareUnicodeCharacter{00BB}{\guillemetright} - \DeclareUnicodeCharacter{00BF}{\questiondown} - - \DeclareUnicodeCharacter{00C0}{\`A} - \DeclareUnicodeCharacter{00C1}{\'A} - \DeclareUnicodeCharacter{00C2}{\^A} - \DeclareUnicodeCharacter{00C3}{\~A} - \DeclareUnicodeCharacter{00C4}{\"A} - \DeclareUnicodeCharacter{00C5}{\AA} - \DeclareUnicodeCharacter{00C6}{\AE} - \DeclareUnicodeCharacter{00C7}{\cedilla{C}} - \DeclareUnicodeCharacter{00C8}{\`E} - \DeclareUnicodeCharacter{00C9}{\'E} - \DeclareUnicodeCharacter{00CA}{\^E} - \DeclareUnicodeCharacter{00CB}{\"E} - \DeclareUnicodeCharacter{00CC}{\`I} - \DeclareUnicodeCharacter{00CD}{\'I} - \DeclareUnicodeCharacter{00CE}{\^I} - \DeclareUnicodeCharacter{00CF}{\"I} - - \DeclareUnicodeCharacter{00D0}{\DH} - \DeclareUnicodeCharacter{00D1}{\~N} - \DeclareUnicodeCharacter{00D2}{\`O} - \DeclareUnicodeCharacter{00D3}{\'O} - \DeclareUnicodeCharacter{00D4}{\^O} - \DeclareUnicodeCharacter{00D5}{\~O} - \DeclareUnicodeCharacter{00D6}{\"O} - \DeclareUnicodeCharacter{00D8}{\O} - \DeclareUnicodeCharacter{00D9}{\`U} - \DeclareUnicodeCharacter{00DA}{\'U} - \DeclareUnicodeCharacter{00DB}{\^U} - \DeclareUnicodeCharacter{00DC}{\"U} - \DeclareUnicodeCharacter{00DD}{\'Y} - \DeclareUnicodeCharacter{00DE}{\TH} - \DeclareUnicodeCharacter{00DF}{\ss} - - \DeclareUnicodeCharacter{00E0}{\`a} - \DeclareUnicodeCharacter{00E1}{\'a} - \DeclareUnicodeCharacter{00E2}{\^a} - \DeclareUnicodeCharacter{00E3}{\~a} - \DeclareUnicodeCharacter{00E4}{\"a} - \DeclareUnicodeCharacter{00E5}{\aa} - \DeclareUnicodeCharacter{00E6}{\ae} - \DeclareUnicodeCharacter{00E7}{\cedilla{c}} - \DeclareUnicodeCharacter{00E8}{\`e} - \DeclareUnicodeCharacter{00E9}{\'e} - \DeclareUnicodeCharacter{00EA}{\^e} - \DeclareUnicodeCharacter{00EB}{\"e} - \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} - \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} - \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} - \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} - - \DeclareUnicodeCharacter{00F0}{\dh} - \DeclareUnicodeCharacter{00F1}{\~n} - \DeclareUnicodeCharacter{00F2}{\`o} - \DeclareUnicodeCharacter{00F3}{\'o} - \DeclareUnicodeCharacter{00F4}{\^o} - \DeclareUnicodeCharacter{00F5}{\~o} - \DeclareUnicodeCharacter{00F6}{\"o} - \DeclareUnicodeCharacter{00F8}{\o} - \DeclareUnicodeCharacter{00F9}{\`u} - \DeclareUnicodeCharacter{00FA}{\'u} - \DeclareUnicodeCharacter{00FB}{\^u} - \DeclareUnicodeCharacter{00FC}{\"u} - \DeclareUnicodeCharacter{00FD}{\'y} - \DeclareUnicodeCharacter{00FE}{\th} - \DeclareUnicodeCharacter{00FF}{\"y} - - \DeclareUnicodeCharacter{0100}{\=A} - \DeclareUnicodeCharacter{0101}{\=a} - \DeclareUnicodeCharacter{0102}{\u{A}} - \DeclareUnicodeCharacter{0103}{\u{a}} - \DeclareUnicodeCharacter{0104}{\ogonek{A}} - \DeclareUnicodeCharacter{0105}{\ogonek{a}} - \DeclareUnicodeCharacter{0106}{\'C} - \DeclareUnicodeCharacter{0107}{\'c} - \DeclareUnicodeCharacter{0108}{\^C} - \DeclareUnicodeCharacter{0109}{\^c} - \DeclareUnicodeCharacter{0118}{\ogonek{E}} - \DeclareUnicodeCharacter{0119}{\ogonek{e}} - \DeclareUnicodeCharacter{010A}{\dotaccent{C}} - \DeclareUnicodeCharacter{010B}{\dotaccent{c}} - \DeclareUnicodeCharacter{010C}{\v{C}} - \DeclareUnicodeCharacter{010D}{\v{c}} - \DeclareUnicodeCharacter{010E}{\v{D}} - - \DeclareUnicodeCharacter{0112}{\=E} - \DeclareUnicodeCharacter{0113}{\=e} - \DeclareUnicodeCharacter{0114}{\u{E}} - \DeclareUnicodeCharacter{0115}{\u{e}} - \DeclareUnicodeCharacter{0116}{\dotaccent{E}} - \DeclareUnicodeCharacter{0117}{\dotaccent{e}} - \DeclareUnicodeCharacter{011A}{\v{E}} - \DeclareUnicodeCharacter{011B}{\v{e}} - \DeclareUnicodeCharacter{011C}{\^G} - \DeclareUnicodeCharacter{011D}{\^g} - \DeclareUnicodeCharacter{011E}{\u{G}} - \DeclareUnicodeCharacter{011F}{\u{g}} - - \DeclareUnicodeCharacter{0120}{\dotaccent{G}} - \DeclareUnicodeCharacter{0121}{\dotaccent{g}} - \DeclareUnicodeCharacter{0124}{\^H} - \DeclareUnicodeCharacter{0125}{\^h} - \DeclareUnicodeCharacter{0128}{\~I} - \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} - \DeclareUnicodeCharacter{012A}{\=I} - \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} - \DeclareUnicodeCharacter{012C}{\u{I}} - \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} - - \DeclareUnicodeCharacter{0130}{\dotaccent{I}} - \DeclareUnicodeCharacter{0131}{\dotless{i}} - \DeclareUnicodeCharacter{0132}{IJ} - \DeclareUnicodeCharacter{0133}{ij} - \DeclareUnicodeCharacter{0134}{\^J} - \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} - \DeclareUnicodeCharacter{0139}{\'L} - \DeclareUnicodeCharacter{013A}{\'l} - - \DeclareUnicodeCharacter{0141}{\L} - \DeclareUnicodeCharacter{0142}{\l} - \DeclareUnicodeCharacter{0143}{\'N} - \DeclareUnicodeCharacter{0144}{\'n} - \DeclareUnicodeCharacter{0147}{\v{N}} - \DeclareUnicodeCharacter{0148}{\v{n}} - \DeclareUnicodeCharacter{014C}{\=O} - \DeclareUnicodeCharacter{014D}{\=o} - \DeclareUnicodeCharacter{014E}{\u{O}} - \DeclareUnicodeCharacter{014F}{\u{o}} - - \DeclareUnicodeCharacter{0150}{\H{O}} - \DeclareUnicodeCharacter{0151}{\H{o}} - \DeclareUnicodeCharacter{0152}{\OE} - \DeclareUnicodeCharacter{0153}{\oe} - \DeclareUnicodeCharacter{0154}{\'R} - \DeclareUnicodeCharacter{0155}{\'r} - \DeclareUnicodeCharacter{0158}{\v{R}} - \DeclareUnicodeCharacter{0159}{\v{r}} - \DeclareUnicodeCharacter{015A}{\'S} - \DeclareUnicodeCharacter{015B}{\'s} - \DeclareUnicodeCharacter{015C}{\^S} - \DeclareUnicodeCharacter{015D}{\^s} - \DeclareUnicodeCharacter{015E}{\cedilla{S}} - \DeclareUnicodeCharacter{015F}{\cedilla{s}} - - \DeclareUnicodeCharacter{0160}{\v{S}} - \DeclareUnicodeCharacter{0161}{\v{s}} - \DeclareUnicodeCharacter{0162}{\cedilla{t}} - \DeclareUnicodeCharacter{0163}{\cedilla{T}} - \DeclareUnicodeCharacter{0164}{\v{T}} - - \DeclareUnicodeCharacter{0168}{\~U} - \DeclareUnicodeCharacter{0169}{\~u} - \DeclareUnicodeCharacter{016A}{\=U} - \DeclareUnicodeCharacter{016B}{\=u} - \DeclareUnicodeCharacter{016C}{\u{U}} - \DeclareUnicodeCharacter{016D}{\u{u}} - \DeclareUnicodeCharacter{016E}{\ringaccent{U}} - \DeclareUnicodeCharacter{016F}{\ringaccent{u}} - - \DeclareUnicodeCharacter{0170}{\H{U}} - \DeclareUnicodeCharacter{0171}{\H{u}} - \DeclareUnicodeCharacter{0174}{\^W} - \DeclareUnicodeCharacter{0175}{\^w} - \DeclareUnicodeCharacter{0176}{\^Y} - \DeclareUnicodeCharacter{0177}{\^y} - \DeclareUnicodeCharacter{0178}{\"Y} - \DeclareUnicodeCharacter{0179}{\'Z} - \DeclareUnicodeCharacter{017A}{\'z} - \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} - \DeclareUnicodeCharacter{017C}{\dotaccent{z}} - \DeclareUnicodeCharacter{017D}{\v{Z}} - \DeclareUnicodeCharacter{017E}{\v{z}} - - \DeclareUnicodeCharacter{01C4}{D\v{Z}} - \DeclareUnicodeCharacter{01C5}{D\v{z}} - \DeclareUnicodeCharacter{01C6}{d\v{z}} - \DeclareUnicodeCharacter{01C7}{LJ} - \DeclareUnicodeCharacter{01C8}{Lj} - \DeclareUnicodeCharacter{01C9}{lj} - \DeclareUnicodeCharacter{01CA}{NJ} - \DeclareUnicodeCharacter{01CB}{Nj} - \DeclareUnicodeCharacter{01CC}{nj} - \DeclareUnicodeCharacter{01CD}{\v{A}} - \DeclareUnicodeCharacter{01CE}{\v{a}} - \DeclareUnicodeCharacter{01CF}{\v{I}} - - \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} - \DeclareUnicodeCharacter{01D1}{\v{O}} - \DeclareUnicodeCharacter{01D2}{\v{o}} - \DeclareUnicodeCharacter{01D3}{\v{U}} - \DeclareUnicodeCharacter{01D4}{\v{u}} - - \DeclareUnicodeCharacter{01E2}{\={\AE}} - \DeclareUnicodeCharacter{01E3}{\={\ae}} - \DeclareUnicodeCharacter{01E6}{\v{G}} - \DeclareUnicodeCharacter{01E7}{\v{g}} - \DeclareUnicodeCharacter{01E8}{\v{K}} - \DeclareUnicodeCharacter{01E9}{\v{k}} - - \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} - \DeclareUnicodeCharacter{01F1}{DZ} - \DeclareUnicodeCharacter{01F2}{Dz} - \DeclareUnicodeCharacter{01F3}{dz} - \DeclareUnicodeCharacter{01F4}{\'G} - \DeclareUnicodeCharacter{01F5}{\'g} - \DeclareUnicodeCharacter{01F8}{\`N} - \DeclareUnicodeCharacter{01F9}{\`n} - \DeclareUnicodeCharacter{01FC}{\'{\AE}} - \DeclareUnicodeCharacter{01FD}{\'{\ae}} - \DeclareUnicodeCharacter{01FE}{\'{\O}} - \DeclareUnicodeCharacter{01FF}{\'{\o}} - - \DeclareUnicodeCharacter{021E}{\v{H}} - \DeclareUnicodeCharacter{021F}{\v{h}} - - \DeclareUnicodeCharacter{0226}{\dotaccent{A}} - \DeclareUnicodeCharacter{0227}{\dotaccent{a}} - \DeclareUnicodeCharacter{0228}{\cedilla{E}} - \DeclareUnicodeCharacter{0229}{\cedilla{e}} - \DeclareUnicodeCharacter{022E}{\dotaccent{O}} - \DeclareUnicodeCharacter{022F}{\dotaccent{o}} - - \DeclareUnicodeCharacter{0232}{\=Y} - \DeclareUnicodeCharacter{0233}{\=y} - \DeclareUnicodeCharacter{0237}{\dotless{j}} - - \DeclareUnicodeCharacter{02DB}{\ogonek{ }} - - \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} - \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} - \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} - \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} - \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} - \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} - \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} - \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} - \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} - \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} - \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} - \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} - - \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} - \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} - - \DeclareUnicodeCharacter{1E20}{\=G} - \DeclareUnicodeCharacter{1E21}{\=g} - \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} - \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} - \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} - \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} - \DeclareUnicodeCharacter{1E26}{\"H} - \DeclareUnicodeCharacter{1E27}{\"h} - - \DeclareUnicodeCharacter{1E30}{\'K} - \DeclareUnicodeCharacter{1E31}{\'k} - \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} - \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} - \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} - \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} - \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} - \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} - \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} - \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} - \DeclareUnicodeCharacter{1E3E}{\'M} - \DeclareUnicodeCharacter{1E3F}{\'m} - - \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} - \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} - \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} - \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} - \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} - \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} - \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} - \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} - \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} - \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} - - \DeclareUnicodeCharacter{1E54}{\'P} - \DeclareUnicodeCharacter{1E55}{\'p} - \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} - \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} - \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} - \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} - \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} - \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} - \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} - \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} - - \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} - \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} - \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} - \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} - \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} - \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} - \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} - \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} - \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} - \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} - - \DeclareUnicodeCharacter{1E7C}{\~V} - \DeclareUnicodeCharacter{1E7D}{\~v} - \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} - \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} - - \DeclareUnicodeCharacter{1E80}{\`W} - \DeclareUnicodeCharacter{1E81}{\`w} - \DeclareUnicodeCharacter{1E82}{\'W} - \DeclareUnicodeCharacter{1E83}{\'w} - \DeclareUnicodeCharacter{1E84}{\"W} - \DeclareUnicodeCharacter{1E85}{\"w} - \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} - \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} - \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} - \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} - \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} - \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} - \DeclareUnicodeCharacter{1E8C}{\"X} - \DeclareUnicodeCharacter{1E8D}{\"x} - \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} - \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} - - \DeclareUnicodeCharacter{1E90}{\^Z} - \DeclareUnicodeCharacter{1E91}{\^z} - \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} - \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} - \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} - \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} - \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} - \DeclareUnicodeCharacter{1E97}{\"t} - \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} - \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} - - \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} - \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} - - \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} - \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} - \DeclareUnicodeCharacter{1EBC}{\~E} - \DeclareUnicodeCharacter{1EBD}{\~e} - - \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} - \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} - \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} - \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} - - \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} - \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} - - \DeclareUnicodeCharacter{1EF2}{\`Y} - \DeclareUnicodeCharacter{1EF3}{\`y} - \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} - - \DeclareUnicodeCharacter{1EF8}{\~Y} - \DeclareUnicodeCharacter{1EF9}{\~y} - - \DeclareUnicodeCharacter{2013}{--} - \DeclareUnicodeCharacter{2014}{---} - \DeclareUnicodeCharacter{2018}{\quoteleft} - \DeclareUnicodeCharacter{2019}{\quoteright} - \DeclareUnicodeCharacter{201A}{\quotesinglbase} - \DeclareUnicodeCharacter{201C}{\quotedblleft} - \DeclareUnicodeCharacter{201D}{\quotedblright} - \DeclareUnicodeCharacter{201E}{\quotedblbase} - \DeclareUnicodeCharacter{2022}{\bullet} - \DeclareUnicodeCharacter{2026}{\dots} - \DeclareUnicodeCharacter{2039}{\guilsinglleft} - \DeclareUnicodeCharacter{203A}{\guilsinglright} - \DeclareUnicodeCharacter{20AC}{\euro} - - \DeclareUnicodeCharacter{2192}{\expansion} - \DeclareUnicodeCharacter{21D2}{\result} - - \DeclareUnicodeCharacter{2212}{\minus} - \DeclareUnicodeCharacter{2217}{\point} - \DeclareUnicodeCharacter{2261}{\equiv} -}% end of \utfeightchardefs - - -% US-ASCII character definitions. -\def\asciichardefs{% nothing need be done - \relax -} - -% Make non-ASCII characters printable again for compatibility with -% existing Texinfo documents that may use them, even without declaring a -% document encoding. -% -\setnonasciicharscatcode \other - - -\message{formatting,} - -\newdimen\defaultparindent \defaultparindent = 15pt - -\chapheadingskip = 15pt plus 4pt minus 2pt -\secheadingskip = 12pt plus 3pt minus 2pt -\subsecheadingskip = 9pt plus 2pt minus 2pt - -% Prevent underfull vbox error messages. -\vbadness = 10000 - -% Don't be so finicky about underfull hboxes, either. -\hbadness = 2000 - -% Following George Bush, get rid of widows and orphans. -\widowpenalty=10000 -\clubpenalty=10000 - -% Use TeX 3.0's \emergencystretch to help line breaking, but if we're -% using an old version of TeX, don't do anything. We want the amount of -% stretch added to depend on the line length, hence the dependence on -% \hsize. We call this whenever the paper size is set. -% -\def\setemergencystretch{% - \ifx\emergencystretch\thisisundefined - % Allow us to assign to \emergencystretch anyway. - \def\emergencystretch{\dimen0}% - \else - \emergencystretch = .15\hsize - \fi -} - -% Parameters in order: 1) textheight; 2) textwidth; -% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; -% 7) physical page height; 8) physical page width. -% -% We also call \setleading{\textleading}, so the caller should define -% \textleading. The caller should also set \parskip. -% -\def\internalpagesizes#1#2#3#4#5#6#7#8{% - \voffset = #3\relax - \topskip = #6\relax - \splittopskip = \topskip - % - \vsize = #1\relax - \advance\vsize by \topskip - \outervsize = \vsize - \advance\outervsize by 2\topandbottommargin - \pageheight = \vsize - % - \hsize = #2\relax - \outerhsize = \hsize - \advance\outerhsize by 0.5in - \pagewidth = \hsize - % - \normaloffset = #4\relax - \bindingoffset = #5\relax - % - \ifpdf - \pdfpageheight #7\relax - \pdfpagewidth #8\relax - % if we don't reset these, they will remain at "1 true in" of - % whatever layout pdftex was dumped with. - \pdfhorigin = 1 true in - \pdfvorigin = 1 true in - \fi - % - \setleading{\textleading} - % - \parindent = \defaultparindent - \setemergencystretch -} - -% @letterpaper (the default). -\def\letterpaper{{\globaldefs = 1 - \parskip = 3pt plus 2pt minus 1pt - \textleading = 13.2pt - % - % If page is nothing but text, make it come out even. - \internalpagesizes{607.2pt}{6in}% that's 46 lines - {\voffset}{.25in}% - {\bindingoffset}{36pt}% - {11in}{8.5in}% -}} - -% Use @smallbook to reset parameters for 7x9.25 trim size. -\def\smallbook{{\globaldefs = 1 - \parskip = 2pt plus 1pt - \textleading = 12pt - % - \internalpagesizes{7.5in}{5in}% - {-.2in}{0in}% - {\bindingoffset}{16pt}% - {9.25in}{7in}% - % - \lispnarrowing = 0.3in - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = .5cm -}} - -% Use @smallerbook to reset parameters for 6x9 trim size. -% (Just testing, parameters still in flux.) -\def\smallerbook{{\globaldefs = 1 - \parskip = 1.5pt plus 1pt - \textleading = 12pt - % - \internalpagesizes{7.4in}{4.8in}% - {-.2in}{-.4in}% - {0pt}{14pt}% - {9in}{6in}% - % - \lispnarrowing = 0.25in - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = .4cm -}} - -% Use @afourpaper to print on European A4 paper. -\def\afourpaper{{\globaldefs = 1 - \parskip = 3pt plus 2pt minus 1pt - \textleading = 13.2pt - % - % Double-side printing via postscript on Laserjet 4050 - % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. - % To change the settings for a different printer or situation, adjust - % \normaloffset until the front-side and back-side texts align. Then - % do the same for \bindingoffset. You can set these for testing in - % your texinfo source file like this: - % @tex - % \global\normaloffset = -6mm - % \global\bindingoffset = 10mm - % @end tex - \internalpagesizes{673.2pt}{160mm}% that's 51 lines - {\voffset}{\hoffset}% - {\bindingoffset}{44pt}% - {297mm}{210mm}% - % - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = 5mm -}} - -% Use @afivepaper to print on European A5 paper. -% From romildo@urano.iceb.ufop.br, 2 July 2000. -% He also recommends making @example and @lisp be small. -\def\afivepaper{{\globaldefs = 1 - \parskip = 2pt plus 1pt minus 0.1pt - \textleading = 12.5pt - % - \internalpagesizes{160mm}{120mm}% - {\voffset}{\hoffset}% - {\bindingoffset}{8pt}% - {210mm}{148mm}% - % - \lispnarrowing = 0.2in - \tolerance = 800 - \hfuzz = 1.2pt - \contentsrightmargin = 0pt - \defbodyindent = 2mm - \tableindent = 12mm -}} - -% A specific text layout, 24x15cm overall, intended for A4 paper. -\def\afourlatex{{\globaldefs = 1 - \afourpaper - \internalpagesizes{237mm}{150mm}% - {\voffset}{4.6mm}% - {\bindingoffset}{7mm}% - {297mm}{210mm}% - % - % Must explicitly reset to 0 because we call \afourpaper. - \globaldefs = 0 -}} - -% Use @afourwide to print on A4 paper in landscape format. -\def\afourwide{{\globaldefs = 1 - \afourpaper - \internalpagesizes{241mm}{165mm}% - {\voffset}{-2.95mm}% - {\bindingoffset}{7mm}% - {297mm}{210mm}% - \globaldefs = 0 -}} - -% @pagesizes TEXTHEIGHT[,TEXTWIDTH] -% Perhaps we should allow setting the margins, \topskip, \parskip, -% and/or leading, also. Or perhaps we should compute them somehow. -% -\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} -\def\pagesizesyyy#1,#2,#3\finish{{% - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi - \globaldefs = 1 - % - \parskip = 3pt plus 2pt minus 1pt - \setleading{\textleading}% - % - \dimen0 = #1\relax - \advance\dimen0 by \voffset - % - \dimen2 = \hsize - \advance\dimen2 by \normaloffset - % - \internalpagesizes{#1}{\hsize}% - {\voffset}{\normaloffset}% - {\bindingoffset}{44pt}% - {\dimen0}{\dimen2}% -}} - -% Set default to letter. -% -\letterpaper - - -\message{and turning on texinfo input format.} - -% DEL is a comment character, in case @c does not suffice. -\catcode`\^^? = 14 - -% Define macros to output various characters with catcode for normal text. -\catcode`\"=\other -\catcode`\~=\other -\catcode`\^=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode`\+=\other -\catcode`\$=\other -\def\normaldoublequote{"} -\def\normaltilde{~} -\def\normalcaret{^} -\def\normalunderscore{_} -\def\normalverticalbar{|} -\def\normalless{<} -\def\normalgreater{>} -\def\normalplus{+} -\def\normaldollar{$}%$ font-lock fix - -% This macro is used to make a character print one way in \tt -% (where it can probably be output as-is), and another way in other fonts, -% where something hairier probably needs to be done. -% -% #1 is what to print if we are indeed using \tt; #2 is what to print -% otherwise. Since all the Computer Modern typewriter fonts have zero -% interword stretch (and shrink), and it is reasonable to expect all -% typewriter fonts to have this, we can check that font parameter. -% -\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} - -% Same as above, but check for italic font. Actually this also catches -% non-italic slanted fonts since it is impossible to distinguish them from -% italic fonts. But since this is only used by $ and it uses \sl anyway -% this is not a problem. -\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} - -% Turn off all special characters except @ -% (and those which the user can use as if they were ordinary). -% Most of these we simply print from the \tt font, but for some, we can -% use math or other variants that look better in normal text. - -\catcode`\"=\active -\def\activedoublequote{{\tt\char34}} -\let"=\activedoublequote -\catcode`\~=\active -\def~{{\tt\char126}} -\chardef\hat=`\^ -\catcode`\^=\active -\def^{{\tt \hat}} - -\catcode`\_=\active -\def_{\ifusingtt\normalunderscore\_} -\let\realunder=_ -% Subroutine for the previous macro. -\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } - -\catcode`\|=\active -\def|{{\tt\char124}} -\chardef \less=`\< -\catcode`\<=\active -\def<{{\tt \less}} -\chardef \gtr=`\> -\catcode`\>=\active -\def>{{\tt \gtr}} -\catcode`\+=\active -\def+{{\tt \char 43}} -\catcode`\$=\active -\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix - -% If a .fmt file is being used, characters that might appear in a file -% name cannot be active until we have parsed the command line. -% So turn them off again, and have \everyjob (or @setfilename) turn them on. -% \otherifyactive is called near the end of this file. -\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} - -% Used sometimes to turn off (effectively) the active characters even after -% parsing them. -\def\turnoffactive{% - \normalturnoffactive - \otherbackslash -} - -\catcode`\@=0 - -% \backslashcurfont outputs one backslash character in current font, -% as in \char`\\. -\global\chardef\backslashcurfont=`\\ -\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work - -% \realbackslash is an actual character `\' with catcode other, and -% \doublebackslash is two of them (for the pdf outlines). -{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} - -% In texinfo, backslash is an active character; it prints the backslash -% in fixed width font. -\catcode`\\=\active -@def@normalbackslash{{@tt@backslashcurfont}} -% On startup, @fixbackslash assigns: -% @let \ = @normalbackslash - -% \rawbackslash defines an active \ to do \backslashcurfont. -% \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. -@gdef@rawbackslash{@let\=@backslashcurfont} -@gdef@otherbackslash{@let\=@realbackslash} - -% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. -% -@def@normalturnoffactive{% - @let\=@normalbackslash - @let"=@normaldoublequote - @let~=@normaltilde - @let^=@normalcaret - @let_=@normalunderscore - @let|=@normalverticalbar - @let<=@normalless - @let>=@normalgreater - @let+=@normalplus - @let$=@normaldollar %$ font-lock fix - @markupsetuplqdefault - @markupsetuprqdefault - @unsepspaces -} - -% Make _ and + \other characters, temporarily. -% This is canceled by @fixbackslash. -@otherifyactive - -% If a .fmt file is being used, we don't want the `\input texinfo' to show up. -% That is what \eatinput is for; after that, the `\' should revert to printing -% a backslash. -% -@gdef@eatinput input texinfo{@fixbackslash} -@global@let\ = @eatinput - -% On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\' in the file would cause an error. This macro tries to fix -% that, assuming it is called before the first `\' could plausibly occur. -% Also turn back on active characters that might appear in the input -% file name, in case not using a pre-dumped format. -% -@gdef@fixbackslash{% - @ifx\@eatinput @let\ = @normalbackslash @fi - @catcode`+=@active - @catcode`@_=@active -} - -% Say @foo, not \foo, in error messages. -@escapechar = `@@ - -% These look ok in all fonts, so just make them not special. -@catcode`@& = @other -@catcode`@# = @other -@catcode`@% = @other - -@c Finally, make ` and ' active, so that txicodequoteundirected and -@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we -@c don't make ` and ' active, @code will not get them as active chars. -@c Do this last of all since we use ` in the previous @catcode assignments. -@catcode`@'=@active -@catcode`@`=@active -@markupsetuplqdefault -@markupsetuprqdefault - -@c Local variables: -@c eval: (add-hook 'write-file-hooks 'time-stamp) -@c page-delimiter: "^\\\\message" -@c time-stamp-start: "def\\\\texinfoversion{" -@c time-stamp-format: "%:y-%02m-%02d.%02H" -@c time-stamp-end: "}" -@c End: - -@c vim:sw=2: - -@ignore - arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 -@end ignore diff --git a/cloog-0.17.0/osl/configure b/cloog-0.17.0/osl/configure deleted file mode 100755 index 9cde8157d2a68ec1673c6fd33c7ed21310958555..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/configure +++ /dev/null @@ -1,13290 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for osl 0.8.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: cedric.bastoul@u-psud.fr,pouchet@cse.ohio-state.edu -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='osl' -PACKAGE_TARNAME='osl' -PACKAGE_VERSION='0.8.1' -PACKAGE_STRING='osl 0.8.1' -PACKAGE_BUGREPORT='cedric.bastoul@u-psud.fr,pouchet@cse.ohio-state.edu' -PACKAGE_URL='' - -ac_unique_file="include/osl/macros.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -ac_aux_dir -DOXYGEN -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -CD -LN_S -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -with_gmp -with_gmp_include -with_gmp_library -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures osl 0.8.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/osl] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of osl 0.8.1:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-gmp=DIR DIR where the gmp package is installed - --with-gmp-include=DIR DIR where gmp.h is installed - --with-gmp-library=DIR DIR where the gmp library is installed - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -osl configure 0.8.1 -generated by GNU Autoconf 2.67 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ppppppppppppppppppppppppppppppppppppppp ## -## Report this to cedric.bastoul@u-psud.fr ## -## ppppppppppppppppppppppppppppppppppppppp ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by osl $as_me 0.8.1, which was -generated by GNU Autoconf 2.67. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -for ac_dir in autoconf "$srcdir"/autoconf; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='osl' - VERSION='0.8.1' - - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar plaintar pax cpio none' -_am_tools=${am_cv_prog_tar_ustar-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 - ($_am_tar --version) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 - (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 - ($am__untar &5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -if test "${am_cv_prog_tar_ustar+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - am_cv_prog_tar_ustar=$_am_tool -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -# Extract the first word of "cd", so it can be a program name with args. -set dummy cd; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CD"; then - ac_cv_prog_CD="$CD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CD="" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CD=$ac_cv_prog_CD -if test -n "$CD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CD" >&5 -$as_echo "$CD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4689: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:4692: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:4695: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 5890 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7419: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7423: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7758: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7762: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7863: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7867: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7918: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7922: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu) - link_all_deplibs=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 10302 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 10398 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -for ac_prog in doxygen -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DOXYGEN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DOXYGEN"; then - ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DOXYGEN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DOXYGEN=$ac_cv_prog_DOXYGEN -if test -n "$DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -$as_echo "$DOXYGEN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DOXYGEN" && break -done -test -n "$DOXYGEN" || DOXYGEN="doxygen" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -for ac_header in errno.h stddef.h stdlib.h string.h strings.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in strtol -do : - ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOL 1 -_ACEOF - -fi -done - - - - -gmp_package="yes" -gmp_include_package="yes" -gmp_library_package="yes" -gmp_flag="OSL_GMP_IS_HERE" - -ASKED_FOR_GMP="no" - - -# Check whether --with-gmp was given. -if test "${with_gmp+set}" = set; then : - withval=$with_gmp; echo "Package gmp : $withval" && - gmp_package=$withval && - GMP_INC=$gmp_package/include && - GMP_LIB=$gmp_package/lib && - ASKED_FOR_GMP="yes" -fi - - - -# Check whether --with-gmp-include was given. -if test "${with_gmp_include+set}" = set; then : - withval=$with_gmp_include; echo "Package gmp-include : $withval" && - gmp_include_package=$withval && - GMP_INC=$gmp_include_package && - ASKED_FOR_GMP="yes" -fi - - - -# Check whether --with-gmp-library was given. -if test "${with_gmp_library+set}" = set; then : - withval=$with_gmp_library; echo "Package gmp-library : $withval" && - gmp_library_package=$withval && - GMP_LIB=$gmp_library_package && - ASKED_FOR_GMP="yes" -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gmp works" >&5 -$as_echo_n "checking whether gmp works... " >&6; } -if test "$gmp_package" = "no"; then - echo "GMP package not defined" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - if test "$ASKED_FOR_GMP" = "no"; then - echo "Mode normal GMP" - ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" -if test "x$ac_cv_header_gmp_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 -$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } -if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __gmpz_init (); -int -main () -{ -return __gmpz_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gmp___gmpz_init=yes -else - ac_cv_lib_gmp___gmpz_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 -$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } -if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then : - LIBS="$LIBS -lgmp" && - CPPFLAGS="-D$gmp_flag $CPPFLAGS" -else - echo "Cannot find gmp library." && - echo "MP precision will not be supported." -fi - -else - echo "Can't find gmp headers." && - echo "MP precision will not be supported." -fi - - - else - - if test "$gmp_package" != "yes" ; then - echo "(GMP path has been set by user)" - GMP_DIR=$gmp_package - 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_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" -if test "x$ac_cv_header_gmp_h" = x""yes; then : - -else - as_fn_error $? "\"Cannot find gmp headers.\"" "$LINENO" 5 -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 -$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } -if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgmp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __gmpz_init (); -int -main () -{ -return __gmpz_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gmp___gmpz_init=yes -else - ac_cv_lib_gmp___gmpz_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 -$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } -if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then : - LIBS="$LIBS -lgmp" && - CPPFLAGS="-D$gmp_flag $CPPFLAGS" -else - as_fn_error $? "\"Cannot find gmp library.\"" "$LINENO" 5 -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi -fi - - - - - - -ac_config_files="$ac_config_files Makefile doc/Makefile doc/Doxyfile include/Makefile include/osl/scop.h source/Makefile tests/Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by osl $as_me 0.8.1, which was -generated by GNU Autoconf 2.67. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -osl config.status 0.8.1 -configured by $0, generated by GNU Autoconf 2.67, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;; - "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "include/osl/scop.h") CONFIG_FILES="$CONFIG_FILES include/osl/scop.h" ;; - "source/Makefile") CONFIG_FILES="$CONFIG_FILES source/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - "Makefile":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - "doc/Makefile":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - "doc/Doxyfile":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - "include/Makefile":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - "include/osl/scop.h":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - "source/Makefile":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - "tests/Makefile":F) test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -echo " /*-----------------------------------------------*" -echo " * OpenScop Library configuration is OK *" -echo " *-----------------------------------------------*/" -echo "It appears that your system is OK to start the OpenScop Library compilation." -echo "You need now to type \"make\". Then type \"make install\" to install it on your" -echo "system (log as root if necessary)." diff --git a/cloog-0.17.0/osl/configure.in b/cloog-0.17.0/osl/configure.in deleted file mode 100644 index 9440bbb3cb131033410d5d06beaac4c551367ac1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/configure.in +++ /dev/null @@ -1,227 +0,0 @@ -dnl -dnl /*+------------------------------------------------------------------** -dnl ** OpenScop Library ** -dnl **------------------------------------------------------------------** -dnl ** configure.in ** -dnl **------------------------------------------------------------------** -dnl ** First version: 30/04/2008 ** -dnl **------------------------------------------------------------------** -dnl -dnl -dnl ************************************************************************** -dnl * OpenScop: Structures and formats for polyhedral tools to talk together * -dnl ************************************************************************** -dnl * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -dnl * / / / // // // // / / / // // / / // / /|,_, * -dnl * / / / // // // // / / / // // / / // / / / /\ * -dnl * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -dnl * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -dnl * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -dnl * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -dnl * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -dnl * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -dnl * | I | | | | e | | | | | | | | | | | | | \ \ \ * -dnl * | T | | | | | | | | | | | | | | | | | \ \ \ * -dnl * | E | | | | | | | | | | | | | | | | | \ \ \ * -dnl * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -dnl * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -dnl * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -dnl * * -dnl * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -dnl * * -dnl * (3-clause BSD license) * -dnl * Redistribution and use in source and binary forms, with or without * -dnl * modification, are permitted provided that the following conditions * -dnl * are met: * -dnl * * -dnl * 1. Redistributions of source code must retain the above copyright * -dnl * notice, this list of conditions and the following disclaimer. * -dnl * 2. Redistributions in binary form must reproduce the above copyright * -dnl * notice, this list of conditions and the following disclaimer in the * -dnl * documentation and/or other materials provided with the distribution.* -dnl * 3. The name of the author may not be used to endorse or promote * -dnl * products derived from this software without specific prior written * -dnl * permission. * -dnl * * -dnl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -dnl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -dnl * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -dnl * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -dnl * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -dnl * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -dnl * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -dnl * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -dnl * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -dnl * POSSIBILITY OF SUCH DAMAGE. * -dnl * * -dnl * OpenScop Library, a library to manipulate OpenScop formats and data * -dnl * structures. Written by: * -dnl * Cedric Bastoul and * -dnl * Louis-Noel Pouchet * -dnl * * -dnl **************************************************************************/ -dnl -dnl Input file for autoconf to build a configuration shellscript. - - -AC_PREREQ(2.13) -dnl Fill here the @bug email adress. -AC_INIT([osl], [0.8.1], [cedric.bastoul@u-psud.fr,pouchet@cse.ohio-state.edu]) -dnl A common file, which serve as a test. -AC_CONFIG_SRCDIR([include/osl/macros.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 /************************************************************************** -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" -gmp_flag="OSL_GMP_IS_HERE" - -ASKED_FOR_GMP="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 && - ASKED_FOR_GMP="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 && - ASKED_FOR_GMP="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 && - ASKED_FOR_GMP="yes"]) - - -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) -else - if test "$ASKED_FOR_GMP" = "no"; then - echo "Mode normal GMP" - AC_CHECK_HEADER(gmp.h, - [AC_CHECK_LIB(gmp, - __gmpz_init, - [LIBS="$LIBS -lgmp" && - CPPFLAGS="-D$gmp_flag $CPPFLAGS"], - [echo "Cannot find gmp library." && - echo "MP precision will not be supported."])], - [echo "Can't find gmp headers." && - echo "MP precision will not be supported."]) - 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 - 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("Cannot find gmp headers.")]) - AC_CHECK_LIB(gmp, - __gmpz_init, - [LIBS="$LIBS -lgmp" && - CPPFLAGS="-D$gmp_flag $CPPFLAGS"], - [AC_MSG_ERROR("Cannot find gmp library.")]) - - AC_MSG_RESULT(yes) - fi -fi - - -dnl /************************************************************************** -dnl * Substitutions * -dnl **************************************************************************/ - - -dnl Substitutions to do. -AC_SUBST(ac_aux_dir) - -dnl Configure Makefiles. -AC_CONFIG_FILES([ - Makefile - doc/Makefile - doc/Doxyfile - include/Makefile - include/osl/scop.h - source/Makefile - tests/Makefile - ], - [test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in]) - -AC_OUTPUT - - -echo " /*-----------------------------------------------*" -echo " * OpenScop Library configuration is OK *" -echo " *-----------------------------------------------*/" -echo "It appears that your system is OK to start the OpenScop Library compilation." -echo "You need now to type \"make\". Then type \"make install\" to install it on your" -echo "system (log as root if necessary)." diff --git a/cloog-0.17.0/osl/doc/Doxyfile.in b/cloog-0.17.0/osl/doc/Doxyfile.in deleted file mode 100644 index 6f33f6c1070292c8cd46002e71736745b5f29c66..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/Doxyfile.in +++ /dev/null @@ -1,1294 +0,0 @@ -# Doxyfile 1.5.3 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file that -# follow. The default is UTF-8 which is also the encoding used for all text before -# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into -# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of -# possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = OpenScop - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @PACKAGE_VERSION@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = htmldoc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, -# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, -# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = YES - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = YES - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be extracted -# and appear in the documentation as a namespace called 'anonymous_namespace{file}', -# where file will be replaced with the base name of the file that contains the anonymous -# namespace. By default anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text " - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = @top_srcdir@/source @top_srcdir@/include/osl - -# 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 -# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. -# See http://www.gnu.org/software/libiconv for the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the output. -# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, -# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH -# then you must also enable this option. If you don't then doxygen will produce -# a warning and turn it on anyway - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 1 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = osl_ - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = YES - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to -# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to -# specify the directory where the mscgen tool resides. If left empty the tool is assumed to -# be found in the default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = /usr/bin/ - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the number -# of direct children of the root node in a graph is already larger than -# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/cloog-0.17.0/osl/doc/Makefile.am b/cloog-0.17.0/osl/doc/Makefile.am deleted file mode 100644 index 68dfe67603bd1172608f05a36f8630e7f044d85f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/Makefile.am +++ /dev/null @@ -1,119 +0,0 @@ -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | e | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud and INRIA * -# * * -# * (3-clause BSD license) * -# * * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - - -############################################################################# -SUBDIRS = - -############################################################################# - -MAINTAINERCLEANFILES = Makefile.in - -EXTRA_DIST = \ - htmldoc.tar.gz \ - openscop.pdf \ - S4.cloog \ - ascii-art.txt \ - images/basic.eps \ - images/basic.fig \ - images/basic.jpg \ - images/basic.pdf \ - images/basic.txt \ - images/basic1.eps \ - images/basic1.fig \ - images/basic1.jpg \ - images/basic1.pdf \ - images/basic1.txt \ - images/basic2.eps \ - images/basic2.fig \ - images/basic2.jpg \ - images/basic2.pdf \ - images/basic2.txt \ - images/tree.eps \ - images/tree.fig \ - images/tree.jpg \ - images/tree.pdf \ - images/tree.txt - - -info_TEXINFOS = openscop.texi - -DOCDIR = htmldoc -DOXYFILE = Doxyfile -DOXYGEN = @DOXYGEN@ - -# The following requires a fixed version of the Emacs 19.30 etags. -ETAGS_ARGS = --lang=none \ - --regex='/^@node[ \t]+\([^,]+\)/\1/' $(srcdir)/doc/openscop.texi -TAGS_DEPENDENCIES = openscop.texi $(DOXYFILE).in - -htmldoc.tar.gz: - mkdir -p $(top_srcdir)/doc/htmldoc - $(DOXYGEN) $(DOXYFILE) - tar czf htmldoc.tar.gz htmldoc diff --git a/cloog-0.17.0/osl/doc/Makefile.in b/cloog-0.17.0/osl/doc/Makefile.in deleted file mode 100644 index 769469e4534a82e8bc5d8d6864a4a3c867942e44..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/Makefile.in +++ /dev/null @@ -1,947 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | e | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud and INRIA * -# * * -# * (3-clause BSD license) * -# * * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/autoconf/libtool.m4 \ - $(top_srcdir)/autoconf/ltoptions.m4 \ - $(top_srcdir)/autoconf/ltsugar.m4 \ - $(top_srcdir)/autoconf/ltversion.m4 \ - $(top_srcdir)/autoconf/lt~obsolete.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = Doxyfile -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -INFO_DEPS = $(srcdir)/openscop.info -TEXINFO_TEX = $(top_srcdir)/autoconf/texinfo.tex -am__TEXINFO_TEX_DIR = $(top_srcdir)/autoconf -DVIS = openscop.dvi -PDFS = openscop.pdf -PSS = openscop.ps -HTMLS = openscop.html -TEXINFOS = openscop.texi -TEXI2DVI = texi2dvi -TEXI2PDF = $(TEXI2DVI) --pdf --batch -MAKEINFOHTML = $(MAKEINFO) --html -AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) -DVIPS = dvips -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__installdirs = "$(DESTDIR)$(infodir)" -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_aux_dir = @ac_aux_dir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in -EXTRA_DIST = \ - htmldoc.tar.gz \ - openscop.pdf \ - S4.cloog \ - ascii-art.txt \ - images/basic.eps \ - images/basic.fig \ - images/basic.jpg \ - images/basic.pdf \ - images/basic.txt \ - images/basic1.eps \ - images/basic1.fig \ - images/basic1.jpg \ - images/basic1.pdf \ - images/basic1.txt \ - images/basic2.eps \ - images/basic2.fig \ - images/basic2.jpg \ - images/basic2.pdf \ - images/basic2.txt \ - images/tree.eps \ - images/tree.fig \ - images/tree.jpg \ - images/tree.pdf \ - images/tree.txt - -info_TEXINFOS = openscop.texi -DOCDIR = htmldoc -DOXYFILE = Doxyfile - -# The following requires a fixed version of the Emacs 19.30 etags. -ETAGS_ARGS = --lang=none \ - --regex='/^@node[ \t]+\([^,]+\)/\1/' $(srcdir)/doc/openscop.texi - -TAGS_DEPENDENCIES = openscop.texi $(DOXYFILE).in -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .dvi .html .info .pdf .ps .texi -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -.texi.info: - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && $(am__cd) $(srcdir) && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ - else :; fi && \ - cd "$$am__cwd"; \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ $<; \ - then \ - rc=0; \ - $(am__cd) $(srcdir); \ - else \ - rc=$$?; \ - $(am__cd) $(srcdir) && \ - $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ - fi; \ - rm -rf $$backupdir; exit $$rc - -.texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) $< - -.texi.pdf: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) $< - -.texi.html: - rm -rf $(@:.html=.htp) - if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $(@:.html=.htp) $<; \ - then \ - rm -rf $@; \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ - else \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ - exit 1; \ - fi -$(srcdir)/openscop.info: openscop.texi -openscop.dvi: openscop.texi -openscop.pdf: openscop.texi -openscop.html: openscop.texi -.dvi.ps: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< - -uninstall-dvi-am: - @$(NORMAL_UNINSTALL) - @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ - rm -f "$(DESTDIR)$(dvidir)/$$f"; \ - done - -uninstall-html-am: - @$(NORMAL_UNINSTALL) - @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ - done - -uninstall-info-am: - @$(PRE_UNINSTALL) - @if test -d '$(DESTDIR)$(infodir)' && \ - (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ - then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ - done; \ - else :; fi - @$(NORMAL_UNINSTALL) - @list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ - echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ - rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ - else :; fi); \ - done - -uninstall-pdf-am: - @$(NORMAL_UNINSTALL) - @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ - done - -uninstall-ps-am: - @$(NORMAL_UNINSTALL) - @list='$(PSS)'; test -n "$(psdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ - rm -f "$(DESTDIR)$(psdir)/$$f"; \ - done - -dist-info: $(INFO_DEPS) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ - for base in $$list; do \ - case $$base in \ - $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$base; then d=.; else d=$(srcdir); fi; \ - base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ - for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ - if test -f $$file; then \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f "$(distdir)/$$relfile" || \ - cp -p $$file "$(distdir)/$$relfile"; \ - else :; fi; \ - done; \ - done - -mostlyclean-aminfo: - -rm -rf openscop.aux openscop.cp openscop.cps openscop.fn openscop.fns \ - openscop.ky openscop.kys openscop.log openscop.pg \ - openscop.pgs openscop.tmp openscop.toc openscop.tp \ - openscop.tps openscop.vr openscop.vrs - -clean-aminfo: - -test -z "openscop.dvi openscop.pdf openscop.ps openscop.html" \ - || rm -rf openscop.dvi openscop.pdf openscop.ps openscop.html - -maintainer-clean-aminfo: - @list='$(INFO_DEPS)'; for i in $$list; do \ - i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ - echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ - rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info -check-am: all-am -check: check-recursive -all-am: Makefile $(INFO_DEPS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(infodir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: $(DVIS) - -html: html-recursive - -html-am: $(HTMLS) - -info: info-recursive - -info-am: $(INFO_DEPS) - -install-data-am: install-info-am - -install-dvi: install-dvi-recursive - -install-dvi-am: $(DVIS) - @$(NORMAL_INSTALL) - test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" - @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ - done -install-exec-am: - -install-html: install-html-recursive - -install-html-am: $(HTMLS) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ - for p in $$list; do \ - if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__strip_dir) \ - if test -d "$$d$$p"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ - $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ - else \ - list2="$$list2 $$d$$p"; \ - fi; \ - done; \ - test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ - done; } -install-info: install-info-recursive - -install-info-am: $(INFO_DEPS) - @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ - for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ - for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ - if test -f $$ifile; then \ - echo "$$ifile"; \ - else : ; fi; \ - done; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done - @$(POST_INSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ - install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ - done; \ - else : ; fi -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: $(PDFS) - @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done -install-ps: install-ps-recursive - -install-ps-am: $(PSS) - @$(NORMAL_INSTALL) - test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" - @list='$(PSS)'; test -n "$(psdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-aminfo \ - maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: $(PDFS) - -ps: ps-recursive - -ps-am: $(PSS) - -uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ - uninstall-pdf-am uninstall-ps-am - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-aminfo clean-generic \ - clean-libtool ctags ctags-recursive dist-info distclean \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-dvi-am \ - uninstall-html-am uninstall-info-am uninstall-pdf-am \ - uninstall-ps-am - - -htmldoc.tar.gz: - mkdir -p $(top_srcdir)/doc/htmldoc - $(DOXYGEN) $(DOXYFILE) - tar czf htmldoc.tar.gz htmldoc - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/osl/doc/S4.cloog b/cloog-0.17.0/osl/doc/S4.cloog deleted file mode 100644 index 1524381c9375cd539ff7f1c8f4275c81addc9dbb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/S4.cloog +++ /dev/null @@ -1,44 +0,0 @@ -# language: C -c - -# no parameters -0 2 -0 - -1 # One statement - -1 -# D = {i, j | 2<=i<=4 2<=j<=4} -4 4 -# i j 1 -1 1 0 -2 -1 -1 0 4 -1 0 1 -2 -1 0 -1 4 -0 0 0 -0 - -1 # Scattering function - -# T = (j+2,3i+j) -2 6 -# t1 t2 i j 1 -0 1 0 0 -1 0 -0 0 1 -1 0 0 - -1 -t1 t2 - -############################# - - -# T = (j,i) -2 6 -# t1 t2 i j 1 -0 1 0 0 -1 0 -0 0 1 -1 0 0 - -2 6 -# t1 t2 i j 1 -0 1 0 0 -1 -2 -0 0 1 -3 -1 0 diff --git a/cloog-0.17.0/osl/doc/ascii-art.txt b/cloog-0.17.0/osl/doc/ascii-art.txt deleted file mode 100644 index dd56019cfea8916dd60b30ff5f28ece617d20207..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/ascii-art.txt +++ /dev/null @@ -1,25 +0,0 @@ - <| - A - /.\ - <| [""M# - A | # - /.\ [""M# - [""M# | # U"U#U - | # | # \ .:/ - | # | #___| # - | "--' .-" - |"-"-"-"-"-#-#-## - | # ## ###### - \ .::::'/ - \ ::::'/ - :8a| # # ## - ::88a ### - ::::888a 8a ##::. - ::::::888a88a[]:::: - :::::::::SUNDOGa8a::::. .. - :::::8::::888:Y8888:::::::::... -::':::88::::888::Y88a______________________________________________________ -:: ::::88a::::88a:Y88a __---__-- __ -' .: ::Y88a:::::8a:Y88a __----_-- -------_-__ - :' ::::8P::::::::::88aa. _ _- -- --_ --- __ --- __-- -.:: :::::::::::::::::::Y88as88a...s88aa. diff --git a/cloog-0.17.0/osl/doc/htmldoc.tar.gz b/cloog-0.17.0/osl/doc/htmldoc.tar.gz deleted file mode 100644 index 390f99e29bd7b2f30778949cb055d6a928426ac1..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/htmldoc.tar.gz and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic.eps b/cloog-0.17.0/osl/doc/images/basic.eps deleted file mode 100644 index 0cc049736ce9920a33a8db6edb294966b970fc4e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic.eps +++ /dev/null @@ -1,402 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: basic.fig -%%Creator: fig2dev Version 3.2 Patchlevel 4 -%%CreationDate: Thu Nov 17 16:54:54 2005 -%%For: bastoul@ulysse.futurs.inria.fr (Cedric Bastoul) -%%BoundingBox: 0 0 445 301 -%%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 301 moveto 0 0 lineto 445 0 lineto 445 301 lineto closepath clip newpath --153.0 333.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def -/reencdict 12 dict def /ReEncode { reencdict begin -/newcodesandnames exch def /newfontname exch def /basefontname exch def -/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def -basefontdict { exch dup /FID ne { dup /Encoding eq -{ exch dup length array copy newfont 3 1 roll put } -{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall -newfont /FontName newfontname put newcodesandnames aload pop -128 1 255 { newfont /Encoding get exch /.notdef put } for -newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat -newfontname newfont definefont pop end } def -/isovec [ -8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde -8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis -8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron -8#220 /dotlessi 8#230 /oe 8#231 /OE -8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling -8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis -8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot -8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus -8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph -8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine -8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf -8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute -8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring -8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute -8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute -8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve -8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply -8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex -8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave -8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring -8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute -8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute -8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve -8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide -8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex -8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def -/Times-Bold /Times-Bold-iso isovec ReEncode -/Times-Roman /Times-Roman-iso isovec ReEncode - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -10 setmiterlimit -0 slj 0 slc - 0.06000 0.06000 sc -% -% Fig objects follow -% -% -% here starts figure with depth 51 -% Polyline -n 4200 1500 m 4200 3900 l 8400 3900 l 6000 1500 l - cp gs col7 0.75 shd ef gr -% Ellipse -7.500 slw - [15 45] 45 sd -1 slc -n 5400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 8400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 7200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Polyline -0 slc -gs clippath -9615 5160 m 9615 5040 l 9395 5040 l 9575 5100 l 9395 5160 l cp -eoclip -n 3000 5100 m - 9600 5100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 9395 5160 m 9575 5100 l 9395 5040 l 9395 5160 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -3060 885 m 2940 885 l 2940 1105 l 3000 925 l 3060 1105 l cp -eoclip -n 3000 5100 m - 3000 900 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3060 1105 m 3000 925 l 2940 1105 l 3060 1105 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -n 3000 4500 m - 2925 4500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3900 m - 2925 3900 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3300 m - 2925 3300 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3600 5100 m - 3600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4200 5100 m - 4200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 5400 5100 m - 5400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4800 5100 m - 4800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6000 5100 m - 6000 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6600 5100 m - 6600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2700 m - 2925 2700 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 1500 m - 2925 1500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2100 m - 2925 2100 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 1500 m - 9000 1500 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 8400 5100 m - 8400 900 l gs col0 s gr [] 0 sd -% Polyline -n 7200 5100 m - 7200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 7800 5100 m - 7800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 8400 5100 m - 8400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 3900 m - 9000 3900 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 5400 900 m - 9600 5100 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 4200 5100 m - 4200 900 l gs col0 s gr [] 0 sd -/Times-Bold-iso ff 390.00 scf sf -2625 4650 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2625 4050 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -3525 5550 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2700 1050 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -8025 825 m -gs 1 -1 sc (i<=n) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -4125 5550 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -8325 5550 m -gs 1 -1 sc (n) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -2550 1575 m -gs 1 -1 sc (m) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -9075 3975 m -gs 1 -1 sc (j>=2) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -9075 1575 m -gs 1 -1 sc (j<=m) col0 sh gr -/Times-Bold-iso ff 390.00 scf sf -9450 5475 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -3825 825 m -gs 1 -1 sc (i>=2) col0 sh gr -/Times-Roman-iso ff 390.00 scf sf -4875 825 m -gs 1 -1 sc (j<=n+2-i) col0 sh gr -% here ends figure; -$F2psEnd -rs -showpage diff --git a/cloog-0.17.0/osl/doc/images/basic.fig b/cloog-0.17.0/osl/doc/images/basic.fig deleted file mode 100644 index 7fe0a9745f860ee30aa2d0e7a98d2eb0d92d6fce..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic.fig +++ /dev/null @@ -1,100 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3900 75 75 5400 3900 5400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3900 75 75 4800 3900 4800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3300 75 75 4200 3300 4200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3300 75 75 4800 3300 4800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2700 75 75 4200 2700 4200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3900 75 75 4200 3900 4200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3900 75 75 6000 3900 6000 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3900 75 75 6600 3900 6600 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 3900 75 75 7200 3900 7200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7800 3900 75 75 7800 3900 7800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 3300 75 75 7200 3300 7200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3300 75 75 6600 3300 6600 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3300 75 75 6000 3300 6000 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3300 75 75 5400 3300 5400 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2700 75 75 4800 2700 4800 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2700 75 75 5400 2700 5400 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2700 75 75 6000 2700 6000 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2700 75 75 6600 2700 6600 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2100 75 75 6000 2100 6000 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2100 75 75 5400 2100 5400 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2100 75 75 4800 2100 4800 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2100 75 75 4200 2100 4200 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 1500 75 75 4200 1500 4200 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 1500 75 75 4800 1500 4800 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 1500 75 75 5400 1500 5400 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7800 3300 75 75 7800 3300 7800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 8400 3900 75 75 8400 3900 8400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 7200 2700 75 75 7200 2700 7200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2100 75 75 6600 2100 6600 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 1500 75 75 6000 1500 6000 1575 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 9600 5100 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 3000 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 4500 2925 4500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3900 2925 3900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3300 2925 3300 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3600 5100 3600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4200 5100 4200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 5400 5100 5400 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4800 5100 4800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6000 5100 6000 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6600 5100 6600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2700 2925 2700 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 1500 2925 1500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2100 2925 2100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 1500 9000 1500 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 8400 5100 8400 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 7200 5100 7200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 7800 5100 7800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 8400 5100 8400 5175 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 3900 9000 3900 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 5400 900 9600 5100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 4200 5100 4200 900 -2 3 0 0 0 7 51 -1 15 0.000 0 0 -1 0 0 5 - 4200 1500 4200 3900 8400 3900 6000 1500 4200 1500 -4 0 0 50 -1 2 26 0.0000 0 270 195 2625 4650 1\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 2625 4050 2\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 3525 5550 1\001 -4 0 0 50 -1 2 26 0.0000 0 345 135 2700 1050 j\001 -4 0 0 50 -1 0 26 0.0000 0 270 750 8025 825 i<=n\001 -4 0 0 50 -1 2 26 0.0000 0 270 195 4125 5550 2\001 -4 0 0 50 -1 2 26 0.0000 0 180 225 8325 5550 n\001 -4 0 0 50 -1 2 26 0.0000 0 180 330 2550 1575 m\001 -4 0 0 50 -1 0 26 0.0000 0 360 750 9075 3975 j>=2\001 -4 0 0 50 -1 0 26 0.0000 0 360 855 9075 1575 j<=m\001 -4 0 0 50 -1 2 26 0.0000 0 270 105 9450 5475 i\001 -4 0 0 50 -1 0 26 0.0000 0 270 750 3825 825 i>=2\001 -4 0 0 50 -1 0 26 0.0000 0 360 1410 4875 825 j<=n+2-i\001 diff --git a/cloog-0.17.0/osl/doc/images/basic.jpg b/cloog-0.17.0/osl/doc/images/basic.jpg deleted file mode 100644 index 995b1d816207e6585df9c61ea65745d38e0db845..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/basic.jpg and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic.pdf b/cloog-0.17.0/osl/doc/images/basic.pdf deleted file mode 100644 index d15d42b4145419f03f56fde14b10e2e983e8dbb0..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/basic.pdf and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic.txt b/cloog-0.17.0/osl/doc/images/basic.txt deleted file mode 100644 index e40913a6b6ec17394b5950ab170f10460e219791..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic.txt +++ /dev/null @@ -1,13 +0,0 @@ - j^ i>=2 - | | j<=n+2-i - | |\ | i<=n - | | \ | -m-+-****---+-j<=m - | ***** | - | ****** | - | *******| -2-+-********-j>=2 - | | |\ -0-+-+------+--->i - | | | - 0 2 n diff --git a/cloog-0.17.0/osl/doc/images/basic1.eps b/cloog-0.17.0/osl/doc/images/basic1.eps deleted file mode 100644 index 9ff60bcb6b29094cfbfe9ce828d288f5011414d6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic1.eps +++ /dev/null @@ -1,332 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: basic1.fig -%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 -%%CreationDate: Fri May 9 15:48:25 2008 -%%For: cedb@localhost (Bastoul Cedric) -%%BoundingBox: 0 0 347 303 -%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 303 moveto 0 0 lineto 347 0 lineto 347 303 lineto closepath clip newpath --152.1 333.9 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -10 setmiterlimit -0 slj 0 slc - 0.06000 0.06000 sc -% -% Fig objects follow -% -% -% here starts figure with depth 51 -% Polyline -0 slj -0 slc -0.000 slw -n 4200 1500 m 4200 3900 l 6675 3900 l 6675 1500 l - cp gs col7 0.75 shd ef gr -% Ellipse -7.500 slw - [15 45] 45 sd -1 slc -n 5400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6600 2100 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6000 1500 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 6653 1522 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Polyline -0 slc -gs clippath -6970 5160 m 7215 5160 l 7215 5040 l 6970 5040 l 6970 5040 l 7150 5100 l 6970 5160 l cp -eoclip -n 3000 5100 m - 7200 5100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6970 5160 m 7150 5100 l 6970 5040 l 6970 5160 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -3060 1130 m 3060 885 l 2940 885 l 2940 1130 l 2940 1130 l 3000 950 l 3060 1130 l cp -eoclip -n 3000 5100 m - 3000 900 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3060 1130 m 3000 950 l 2940 1130 l 3060 1130 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -n 3000 4500 m - 2925 4500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3900 m - 2925 3900 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3300 m - 2925 3300 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3600 5100 m - 3600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4200 5100 m - 4200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 5400 5100 m - 5400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4800 5100 m - 4800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6000 5100 m - 6000 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 6600 5100 m - 6600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2700 m - 2925 2700 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 1500 m - 2925 1500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2100 m - 2925 2100 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 1500 m - 7200 1500 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 3000 3900 m - 7200 3900 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 4200 5100 m - 4200 900 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 6675 5100 m - 6675 900 l gs col0 s gr [] 0 sd -/Times-Bold ff 433.33 scf sf -2625 4650 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold ff 433.33 scf sf -2625 4050 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold ff 433.33 scf sf -3525 5550 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold ff 433.33 scf sf -2700 1050 m -gs 1 -1 sc (j) col0 sh gr -/Times-Bold ff 433.33 scf sf -4125 5550 m -gs 1 -1 sc (2) col0 sh gr -/Times-Roman ff 433.33 scf sf -3825 825 m -gs 1 -1 sc (i>=2) col0 sh gr -/Times-Bold ff 433.33 scf sf -2550 1575 m -gs 1 -1 sc (N) col0 sh gr -/Times-Bold ff 433.33 scf sf -6450 5550 m -gs 1 -1 sc (N) col0 sh gr -/Times-Bold ff 433.33 scf sf -7275 5475 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman ff 433.33 scf sf -6300 900 m -gs 1 -1 sc (i<=N) col0 sh gr -/Times-Roman ff 433.33 scf sf -7350 1575 m -gs 1 -1 sc (j<=N) col0 sh gr -/Times-Roman ff 433.33 scf sf -7350 3975 m -gs 1 -1 sc (j>=2) col0 sh gr -% here ends figure; -$F2psEnd -rs -showpage -%%Trailer -%EOF diff --git a/cloog-0.17.0/osl/doc/images/basic1.fig b/cloog-0.17.0/osl/doc/images/basic1.fig deleted file mode 100644 index caf0ebd3b4bd8e81704d76995d45c16d49e31d0d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic1.fig +++ /dev/null @@ -1,86 +0,0 @@ -#FIG 3.2 Produced by xfig version 3.2.5-alpha5 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3900 75 75 5400 3900 5400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3900 75 75 4800 3900 4800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3300 75 75 4200 3300 4200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3300 75 75 4800 3300 4800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2700 75 75 4200 2700 4200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3900 75 75 4200 3900 4200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3900 75 75 6000 3900 6000 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3900 75 75 6600 3900 6600 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 3300 75 75 6600 3300 6600 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 3300 75 75 6000 3300 6000 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3300 75 75 5400 3300 5400 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2700 75 75 4800 2700 4800 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2700 75 75 5400 2700 5400 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2700 75 75 6000 2700 6000 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2700 75 75 6600 2700 6600 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 2100 75 75 6000 2100 6000 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2100 75 75 5400 2100 5400 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2100 75 75 4800 2100 4800 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2100 75 75 4200 2100 4200 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 1500 75 75 4200 1500 4200 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 1500 75 75 4800 1500 4800 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 1500 75 75 5400 1500 5400 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6600 2100 75 75 6600 2100 6600 2175 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6000 1500 75 75 6000 1500 6000 1575 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 6653 1522 75 75 6653 1522 6653 1597 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 7200 5100 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 3000 900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 4500 2925 4500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3900 2925 3900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3300 2925 3300 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3600 5100 3600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4200 5100 4200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 5400 5100 5400 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4800 5100 4800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6000 5100 6000 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 6600 5100 6600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2700 2925 2700 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 1500 2925 1500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2100 2925 2100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 1500 7200 1500 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 3900 7200 3900 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 4200 5100 4200 900 -2 3 0 0 0 7 51 -1 15 0.000 0 0 -1 0 0 5 - 4200 1500 4200 3900 6675 3900 6675 1500 4200 1500 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 6675 5100 6675 900 -4 0 0 50 -1 2 26 0.0000 0 285 225 2625 4650 1\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 2625 4050 2\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 3525 5550 1\001 -4 0 0 50 -1 2 26 0.0000 0 375 150 2700 1050 j\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 4125 5550 2\001 -4 0 0 50 -1 0 26 0.0000 0 285 825 3825 825 i>=2\001 -4 0 0 50 -1 2 26 0.0000 0 285 315 2550 1575 N\001 -4 0 0 50 -1 2 26 0.0000 0 285 315 6450 5550 N\001 -4 0 0 50 -1 2 26 0.0000 0 285 120 7275 5475 i\001 -4 0 0 50 -1 0 26 0.0000 0 285 915 6300 900 i<=N\001 -4 0 0 50 -1 0 26 0.0000 0 375 915 7350 1575 j<=N\001 -4 0 0 50 -1 0 26 0.0000 0 375 825 7350 3975 j>=2\001 diff --git a/cloog-0.17.0/osl/doc/images/basic1.jpg b/cloog-0.17.0/osl/doc/images/basic1.jpg deleted file mode 100644 index 55830d422b4b1ca0b6cd800fbcb8c2e414df81c3..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/basic1.jpg and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic1.pdf b/cloog-0.17.0/osl/doc/images/basic1.pdf deleted file mode 100644 index 7f5be6ab67a378e540e16b0454284d3bd37d34c5..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/basic1.pdf and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic1.txt b/cloog-0.17.0/osl/doc/images/basic1.txt deleted file mode 100644 index d02e6ae69bb54a97c8441df26e30c6ccf0c4df94..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic1.txt +++ /dev/null @@ -1,12 +0,0 @@ - j^ i>=2 i<=N - | | | - | | | -N-+-********--j<=N - | ******** - | ******** - | ******** -2-+-********--j>=2 - | | | -0-+-+------+--->i - | | | - 0 2 N diff --git a/cloog-0.17.0/osl/doc/images/basic2.eps b/cloog-0.17.0/osl/doc/images/basic2.eps deleted file mode 100644 index a3781fedf62a3e4bfcddf5bc6b06a30cee9cce3c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic2.eps +++ /dev/null @@ -1,256 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: basic2.fig -%%Creator: fig2dev Version 3.2 Patchlevel 5-alpha7 -%%CreationDate: Sat May 10 21:23:40 2008 -%%For: cedb@localhost (Bastoul Cedric) -%%BoundingBox: 0 0 260 235 -%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 235 moveto 0 0 lineto 260 0 lineto 260 235 lineto closepath clip newpath --156.6 333.9 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -10 setmiterlimit -0 slj 0 slc - 0.06000 0.06000 sc -% -% Fig objects follow -% -% -% here starts figure with depth 51 -% Polyline -0 slj -0 slc -0.000 slw -n 4200 2700 m 4200 3900 l 5400 3900 l 5400 2700 l - cp gs col7 0.75 shd ef gr -% Ellipse -7.500 slw - [15 45] 45 sd -1 slc -n 5400 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4200 3900 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 3300 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 4800 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Ellipse - [15 45] 45 sd -n 5400 2700 75 75 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr - [] 0 sd -% Polyline -0 slc -gs clippath -5770 5160 m 6015 5160 l 6015 5040 l 5770 5040 l 5770 5040 l 5950 5100 l 5770 5160 l cp -eoclip -n 3000 5100 m - 6000 5100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5770 5160 m 5950 5100 l 5770 5040 l 5770 5160 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -3060 2330 m 3060 2085 l 2940 2085 l 2940 2330 l 2940 2330 l 3000 2150 l 3060 2330 l cp -eoclip -n 3000 5100 m - 3000 2100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3060 2330 m 3000 2150 l 2940 2330 l 3060 2330 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -n 3000 4500 m - 2925 4500 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3900 m - 2925 3900 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 3300 m - 2925 3300 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3600 5100 m - 3600 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4200 5100 m - 4200 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 5400 5100 m - 5400 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 4800 5100 m - 4800 5175 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline -n 3000 2700 m - 2925 2700 l gs 0.00 setgray ef gr gs col0 s gr -% Polyline - [15 45] 45 sd -n 3000 3900 m - 6000 3900 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 4200 5100 m - 4200 2100 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 5400 5175 m - 5400 2100 l gs col0 s gr [] 0 sd -% Polyline - [15 45] 45 sd -n 3000 2700 m - 6000 2700 l gs col0 s gr [] 0 sd -/Times-Bold ff 433.33 scf sf -2625 4650 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold ff 433.33 scf sf -2625 4050 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold ff 433.33 scf sf -3525 5550 m -gs 1 -1 sc (1) col0 sh gr -/Times-Bold ff 433.33 scf sf -4125 5550 m -gs 1 -1 sc (2) col0 sh gr -/Times-Bold ff 433.33 scf sf -5250 5550 m -gs 1 -1 sc (4) col0 sh gr -/Times-Bold ff 433.33 scf sf -2625 2850 m -gs 1 -1 sc (4) col0 sh gr -/Times-Bold ff 433.33 scf sf -2700 2175 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 433.33 scf sf -3825 1950 m -gs 1 -1 sc (i>=2) col0 sh gr -/Times-Roman ff 433.33 scf sf -5025 1950 m -gs 1 -1 sc (i<=4) col0 sh gr -/Times-Roman ff 433.33 scf sf -6075 3975 m -gs 1 -1 sc (j>=2) col0 sh gr -/Times-Roman ff 433.33 scf sf -6075 2775 m -gs 1 -1 sc (j<=4) col0 sh gr -/Times-Bold ff 433.33 scf sf -6000 5550 m -gs 1 -1 sc (i) col0 sh gr -% here ends figure; -$F2psEnd -rs -showpage -%%Trailer -%EOF diff --git a/cloog-0.17.0/osl/doc/images/basic2.fig b/cloog-0.17.0/osl/doc/images/basic2.fig deleted file mode 100644 index c6a4161fd52d1fc4a4b037c039b41b71acee0212..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic2.fig +++ /dev/null @@ -1,62 +0,0 @@ -#FIG 3.2 Produced by xfig version 3.2.5-alpha5 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3900 75 75 5400 3900 5400 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3900 75 75 4800 3900 4800 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3300 75 75 4200 3300 4200 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 3300 75 75 4800 3300 4800 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 2700 75 75 4200 2700 4200 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4200 3900 75 75 4200 3900 4200 3975 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 3300 75 75 5400 3300 5400 3375 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 4800 2700 75 75 4800 2700 4800 2775 -1 3 2 1 0 0 50 -1 20 3.000 1 0.0000 5400 2700 75 75 5400 2700 5400 2775 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 6000 5100 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 120.00 180.00 - 3000 5100 3000 2100 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 4500 2925 4500 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3900 2925 3900 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 3300 2925 3300 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3600 5100 3600 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4200 5100 4200 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 5400 5100 5400 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 4800 5100 4800 5175 -2 1 0 1 0 0 50 -1 20 3.000 0 0 -1 0 0 2 - 3000 2700 2925 2700 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 3900 6000 3900 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 4200 5100 4200 2100 -2 3 0 0 0 7 51 -1 15 0.000 0 0 -1 0 0 5 - 4200 2700 4200 3900 5400 3900 5400 2700 4200 2700 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 5400 5175 5400 2100 -2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 - 3000 2700 6000 2700 -4 0 0 50 -1 2 26 0.0000 0 285 225 2625 4650 1\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 2625 4050 2\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 3525 5550 1\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 4125 5550 2\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 5250 5550 4\001 -4 0 0 50 -1 2 26 0.0000 0 285 225 2625 2850 4\001 -4 0 0 50 -1 2 26 0.0000 0 375 150 2700 2175 j\001 -4 0 0 50 -1 0 26 0.0000 0 285 825 3825 1950 i>=2\001 -4 0 0 50 -1 0 26 0.0000 0 285 825 5025 1950 i<=4\001 -4 0 0 50 -1 0 26 0.0000 0 375 825 6075 3975 j>=2\001 -4 0 0 50 -1 0 26 0.0000 0 375 825 6075 2775 j<=4\001 -4 0 0 50 -1 2 26 0.0000 0 285 120 6000 5550 i\001 diff --git a/cloog-0.17.0/osl/doc/images/basic2.jpg b/cloog-0.17.0/osl/doc/images/basic2.jpg deleted file mode 100644 index ab9f0579d4e0490494ff9d912d2a3192717528a5..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/basic2.jpg and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic2.pdf b/cloog-0.17.0/osl/doc/images/basic2.pdf deleted file mode 100644 index 38ab72d3b2c7f682bd59d27cf1ac82520d11e20e..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/basic2.pdf and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/basic2.txt b/cloog-0.17.0/osl/doc/images/basic2.txt deleted file mode 100644 index 1cbde89f094942d6fdf03d40dd20f7987af20bc4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/basic2.txt +++ /dev/null @@ -1,10 +0,0 @@ - j^ i>=2 - | | i<=4 - | | | -4-+-***--j<=4 - | *** -2-+-***--j>=2 - | | | -0-+-+-+--->i - | | | - 0 2 4 diff --git a/cloog-0.17.0/osl/doc/images/tree.eps b/cloog-0.17.0/osl/doc/images/tree.eps deleted file mode 100644 index d80f6e93a8401479b391745adbb401fb5bdafea8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/tree.eps +++ /dev/null @@ -1,258 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: tree.eps -%%Creator: fig2dev Version 3.2 Patchlevel 3c -%%CreationDate: Fri Sep 6 10:09:40 2002 -%%For: bastoul@whisky (Cedric Bastoul) -%%BoundingBox: 0 0 388 312 -%%Magnification: 1.0000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save -newpath 0 312 moveto 0 0 lineto 388 0 lineto 388 312 lineto closepath clip newpath --165.0 369.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def - -$F2psBegin -%%Page: 1 1 -10 setmiterlimit - 0.06000 0.06000 sc -% -% Fig objects follow -% -7.500 slw -% Ellipse -n 5400 1200 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 3000 3600 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 7800 3600 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 6600 4800 237 237 0 360 DrawEllipse gs col0 s gr - -% Ellipse -n 5400 2325 237 237 0 360 DrawEllipse gs col0 s gr - -% Polyline -gs clippath -5355 2115 m 5445 2115 l 5445 1888 l 5400 2068 l 5355 1888 l cp -eoclip -n 5400 1425 m - 5400 2100 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5355 1888 m 5400 2068 l 5445 1888 l 5355 1888 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -5355 3390 m 5445 3390 l 5445 3163 l 5400 3343 l 5355 3163 l cp -eoclip -n 5400 2550 m - 5400 3375 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 5355 3163 m 5400 3343 l 5445 3163 l 5355 3163 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -2955 4590 m 3045 4590 l 3045 4363 l 3000 4543 l 2955 4363 l cp -eoclip -n 3000 3825 m - 3000 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 2955 4363 m 3000 4543 l 3045 4363 l 2955 4363 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -6563 4544 m 6611 4621 l 6803 4500 l 6627 4558 l 6755 4424 l cp -eoclip -n 7800 3825 m - 6600 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6755 4424 m 6627 4558 l 6803 4500 l 6755 4424 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -8988 4621 m 9036 4544 l 8844 4424 l 8973 4558 l 8796 4500 l cp -eoclip -n 7800 3825 m - 9000 4575 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 8796 4500 m 8973 4558 l 8844 4424 l 8796 4500 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -6555 5790 m 6645 5790 l 6645 5563 l 6600 5743 l 6555 5563 l cp -eoclip -n 6600 5025 m - 6600 5775 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 6555 5563 m 6600 5743 l 6645 5563 l 6555 5563 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -7802 3411 m 7831 3326 l 7615 3253 l 7772 3354 l 7587 3338 l cp -eoclip -n 5400 2550 m - 7803 3364 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 7587 3338 m 7772 3354 l 7615 3253 l 7587 3338 l cp gs 0.00 setgray ef gr col0 s -% Polyline -7.500 slw -gs clippath -2971 3337 m 3000 3422 l 3215 3348 l 3031 3364 l 3186 3262 l cp -eoclip -n 5400 2550 m - 3000 3375 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 3186 3262 m 3031 3364 l 3215 3348 l 3186 3262 l cp gs 0.00 setgray ef gr col0 s -/Times-Roman ff 330.00 scf sf -3075 4200 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -6675 5400 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -5475 3000 m -gs 1 -1 sc (1) col0 sh gr -/Times-Roman ff 330.00 scf sf -3825 3000 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -6900 3000 m -gs 1 -1 sc (2) col0 sh gr -/Times-Roman ff 330.00 scf sf -6975 4200 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -8475 4200 m -gs 1 -1 sc (1) col0 sh gr -/Times-Roman ff 330.00 scf sf -5475 1800 m -gs 1 -1 sc (0) col0 sh gr -/Times-Roman ff 330.00 scf sf -2850 4950 m -gs 1 -1 sc (S1) col0 sh gr -/Times-Roman ff 330.00 scf sf -5250 3750 m -gs 1 -1 sc (S2) col0 sh gr -/Times-Roman ff 330.00 scf sf -6450 6150 m -gs 1 -1 sc (S3) col0 sh gr -/Times-Roman ff 330.00 scf sf -8850 4950 m -gs 1 -1 sc (S4) col0 sh gr -/Times-Roman ff 330.00 scf sf -5355 2430 m -gs 1 -1 sc (i) col0 sh gr -/Times-Roman ff 330.00 scf sf -2963 3667 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 330.00 scf sf -7763 3675 m -gs 1 -1 sc (j) col0 sh gr -/Times-Roman ff 330.00 scf sf -6533 4890 m -gs 1 -1 sc (k) col0 sh gr -$F2psEnd -rs diff --git a/cloog-0.17.0/osl/doc/images/tree.fig b/cloog-0.17.0/osl/doc/images/tree.fig deleted file mode 100644 index 9c202bbb3f7ecb9f2dc1065d2d82346ead4aa5a9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/tree.fig +++ /dev/null @@ -1,54 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 1200 237 237 5400 1200 5625 1275 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 3000 3600 237 237 3000 3600 3225 3675 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 7800 3600 237 237 7800 3600 8025 3675 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6600 4800 237 237 6600 4800 6825 4875 -1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 2325 237 237 5400 2325 5625 2400 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 1425 5400 2100 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 5400 3375 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 3000 3825 3000 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 7800 3825 6600 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 7800 3825 9000 4575 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 6600 5025 6600 5775 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 7803 3364 -2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 - 1 1 2.00 90.00 180.00 - 5400 2550 3000 3375 -4 0 0 50 0 0 22 0.0000 0 225 150 3075 4200 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6675 5400 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 5475 3000 1\001 -4 0 0 50 0 0 22 0.0000 0 225 150 3825 3000 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6900 3000 2\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6975 4200 0\001 -4 0 0 50 0 0 22 0.0000 0 225 150 8475 4200 1\001 -4 0 0 50 0 0 22 0.0000 0 225 150 5475 1800 0\001 -4 0 0 50 0 0 22 0.0000 0 225 345 2850 4950 S1\001 -4 0 0 50 0 0 22 0.0000 0 225 345 5250 3750 S2\001 -4 0 0 50 0 0 22 0.0000 0 225 345 6450 6150 S3\001 -4 0 0 50 0 0 22 0.0000 0 225 345 8850 4950 S4\001 -4 0 0 50 0 0 22 0.0000 0 225 90 5355 2430 i\001 -4 0 0 50 0 0 22 0.0000 0 300 90 2963 3667 j\001 -4 0 0 50 0 0 22 0.0000 0 300 90 7763 3675 j\001 -4 0 0 50 0 0 22 0.0000 0 225 150 6533 4890 k\001 diff --git a/cloog-0.17.0/osl/doc/images/tree.jpg b/cloog-0.17.0/osl/doc/images/tree.jpg deleted file mode 100644 index 7329268b65736eafa7d05bbd39135092db60da2d..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/tree.jpg and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/tree.pdf b/cloog-0.17.0/osl/doc/images/tree.pdf deleted file mode 100644 index 7569edebb461590b8208c320a8e109fd4a44c25c..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/images/tree.pdf and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/images/tree.txt b/cloog-0.17.0/osl/doc/images/tree.txt deleted file mode 100644 index 7bcfef2882193fa78830ff5ad0c9f469b7af2e87..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/images/tree.txt +++ /dev/null @@ -1,25 +0,0 @@ - * - | - |0 - | - V - i - | - +-----+-----+ - | | | - |0 |1 |2 - | | | - V V V - j S2 j - | | - |0 +--+--+ - | | | - V |0 |1 - S1 | | - V V - k S4 - | - |0 - | - V - S3 diff --git a/cloog-0.17.0/osl/doc/openscop.info b/cloog-0.17.0/osl/doc/openscop.info deleted file mode 100644 index 9b7b3917594d59f1cf9c4888e1c1067511eff99a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/openscop.info +++ /dev/null @@ -1,2873 +0,0 @@ -This is openscop.info, produced by makeinfo version 4.13 from -openscop.texi. - -This document describes OpenScop, a specification of a file format and -a set of data structures for polyhedral compilation tools to talk -together. It also describes briefly the OpenScop Library version -0.8.1, a Free Software that provides an example of OpenScop -implementation. - - It would be quite kind to refer at the present document in any -publication that results from the use of the OpenScop Library: - - @TechReport{Bas11, - author = {C\'edric Bastoul}, - title = {OpenScop: A Specification and a Library for Data - Exchange in Polyhedral Compilation Tools}, - month = {September}, - year = 2011, - institution = {Paris-Sud University, France} - } - - Copyright (C) 2011 Paris-Sud University and INRIA. - - Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version -1.2 published by the Free Software Foundation; with no Invariant -Sections, with no Front-Cover Texts, and with no Back-Cover Texts. To -receive a copy of the GNU Free Documentation License, write to the Free -Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA. - - -File: openscop.info, Node: Top, Next: Introduction, Up: (dir) - -OpenSCop -******** - -This document describes OpenScop, a specification of a file format and -a set of data structures for polyhedral compilation tools to talk -together. It also describes briefly the OpenScop Library version -0.8.1, a Free Software that provides an example of OpenScop -implementation. - - It would be quite kind to refer at the present document in any -publication that results from the use of the OpenScop Library: - - @TechReport{Bas11, - author = {C\'edric Bastoul}, - title = {OpenScop: A Specification and a Library for Data - Exchange in Polyhedral Compilation Tools}, - month = {September}, - year = 2011, - institution = {Paris-Sud University, France} - } - - Copyright (C) 2011 Paris-Sud University and INRIA. - - Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version -1.2 published by the Free Software Foundation; with no Invariant -Sections, with no Front-Cover Texts, and with no Back-Cover Texts. To -receive a copy of the GNU Free Documentation License, write to the Free -Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -02111-1307 USA. - -* Menu: - -* Introduction:: -* Polyhedral Representation:: -* OpenScop Specification:: -* OpenScop Library:: -* References:: - - -File: openscop.info, Node: Introduction, Next: Polyhedral Representation, Prev: Top, Up: Top - -1 Introduction -************** - -OpenScop is an open specification that defines a file format and a set -of data structures to represent a _static control part_ (SCoP for -short), i.e., a program part that can be represented in the _polyhedral -model_. The goal of OpenScop is to provide a common interface to -various polyhedral compilation tools in order to simplify their -interaction. - - Designing a single format for tools that have different purposes -(e.g., as different as code generation and data dependence analysis) may -sound strange at first. However we could observe that most available -polyhedral compilation tools during the last decade were manipulating -more or less the same kind of data (polyhedra, affine functions...) and -were actually sharing a part of their input (e.g., iteration domains and -context concepts are nearly everywhere). We could also observe that -those tools may rely on different internal representations, mostly -based on one of the major polyhedral libraries (e.g., Polylib, PPL or -isl), and this representation may change over time (e.g., when -switching to a more convenient polyhedral library). The OpenScop aim -is to provide a stable, unified format that offers a durable guarantee -that a tool can use an output or provide an input to another tool -without breaking a tool chain because of some internal changes in one -element of the chain. The other promise of OpenScop is the ability to -assemble or replace the basic blocks of a polyhedral compilation -framework at no, or at least low engineering cost. - - The policy that drives OpenScop can be summarized by these three -rules: - * Embed the _minimum_ information to build a complete polyhedral - compilation framework in the so-called _core part_ (to - avoid as much as possible empty or useless information for - each tool). - - * Provide a _very stable_ core part (so users have some - guarantee that they will not need to update their tool - because of frequent specification evolution), - - * Provide a _very flexible_ extension part (so it can also be - used to test wild new ideas). - -Another, more technical, rule may be added: - * Avoid any need for external library or tool to support it - (i.e., it's not XML or YAML or anything like that). - - The success of OpenScop in meeting its goals totally depends on its -acceptance by the tool developers (that have to support it in their -tools). To help them, we provide an example implementation: the -OpenScop Library. This library (and in particular its API) is not part -of the OpenScop specification (which includes only the file format and -the set of data structures). It is licensed under the 3-clause BSD -license so developers may feel free to use it in their code (either by -linking it or copy-pasting its code). This document also describes this -library briefly (readers are invited to read at its technical -documentation). The current version of the OpenScop Library is still -under evaluation, and there is no guarantee that the upward -compatibility will be respected, even if we do think so. A lot of -reports are necessary to freeze the library API. Thus you are very -welcome and encouraged to send reports on bugs, wishes, critics, -comments, suggestions or (please!) successful experiences to the -OpenScop mailing list . - - This document is organized as follows. First, we provide some -background on the polyhedral model and how it is used to represent and -to manipulate programs (*note Polyhedral Representation::). Next, we -describe the OpenScop specification, from the file format (*note -OpenScop File Format Specification::) to the data structures and the -OpenScop Library API (*note OpenScop Data Structure Specification::). -Finally we will detail how to install the OpenScop Library (*note -Installation::). - - -File: openscop.info, Node: Polyhedral Representation, Next: OpenScop Specification, Prev: Introduction, Up: Top - -2 Polyhedral Representation of Programs -*************************************** - -If you are reading at the OpenScop documentation, you probably don't -need any explanation about the polyhedral model. It is unlikely that -someone will read this paper by mistake. However some vicious advisor -may ask their poor engineers/interns/students to work for the very -first time on this exciting topic. Most papers on polyhedral -compilation are hard to read. Despite my efforts, mine are no exception -according to some reviewers. Hence I give there a new try to provide a -comprehensive explanation of the polyhedral model without the size and -style limits of a classical research paper. - - Be aware that to be able to understand the polyhedral model, there -are a few prerequisites. You should not read the following while you -still ignore what is: - * a `for' loop construction in C programs (`do' loops in FORTRAN are - OK too!), - - * an _affine expression_, - - * a _vector_, - - * a _matrix_, - - * a _matrix-vector multiply_. - If you do not know those concepts, please do some search and come -back afterwards. And if you are courageous enough, send me a few lines -that describe them so I can insert them here! - -* Menu: - -* Motivation:: -* Thinking in Polyhedra:: -* What's Next?:: - - -File: openscop.info, Node: Motivation, Next: Thinking in Polyhedra, Up: Polyhedral Representation - -2.1 Motivation: Program Transformations -======================================= - -A direct translation of high level programs written, e.g., in C, to -assembly then to object code is likely to produce (very) inefficient -applications. Architectures are quite complex, including several -levels of cache memory, many cores, deep pipelines, various number of -functional units, of registers etc. The list of such "architectural -features" is growing with each new generation of processors. To -achieve the best performance, the object program must use these -features in a smart way. Programmers use high level languages for -productivity and portability: typically they do not have to take care -of the target architecture but to ensure they write programs which -produce the right output. Hence, the problem of mapping the program to -the target architecture in the most efficient way is left to the -compiler. - - The compiler may see a high level program as a specification _of an -output_. The program is a list of instructions to be executed to -produce the output. As long as the output is guaranteed to be as the -programmer specified in his code, the compiler is free to modify the -program. For instance, let us imagine we are working on an -architecture with only three registers and we consider the following -statements written by a programmer: - - x = a + b; - y = c + d; - z = a * b; - - It is easy to see that we can reorder the three statements in any -way without modifying the semantics (no statement reads or writes a -variable that another statement writes). Because of the lack of -registers, the solutions such that the first and the third statements -are one after the other are better because `a' and `b' will be put in -the processor registers by one statement and can be reused directly by -the other one without reading from memory (this is called a _data -locality improving_ transformation). Hence a better statement order is, -e.g.: - - x = a + b; - z = a * b; // a and b are still in processor registers - y = c + d; - - We can also notice that it is possible to run the three statements in -parallel (possibly on different processors). The programmer may -explicit this in a way the compiler and/or the architecture is able to -understand. For instance, we can use OpenMP to describe parallelism -(this is called a _parallelizing_ transformation): - - #pragma omp parallel sections - { - #pragma omp section - { - x = a + b; - } - #pragma omp section - { - y = c + d; - } - #pragma omp section - { - z = a * b; - } - } - - However, the right way to optimize this program is probably a -tradeoff between these two techniques. This is true if, e.g., the target -architecture has some limitations to run too many operations in -parallel, or, like in our case, when some data may be reused by some -processors. Hence, the best optimization for our small example is -probably the following: - - #pragma omp parallel sections - { - #pragma omp section - { - x = a + b; - z = a * b; - } - #pragma omp section - { - y = c + d; - } - } - - This example is quite trivial because the statements are executed -only once. The real sport begins when we have to deal with loops, as we -will see momentarily. However, polyhedral compilation framework users -have to be conscious that we _need_ to transform programs to achieve -the best performance and that the best transformation that has to be -discovered (at the price of many, many efforts) and performed may be -quite complex. Hence the need of powerful model and tools. - - -File: openscop.info, Node: Thinking in Polyhedra, Next: What's Next?, Prev: Motivation, Up: Polyhedral Representation - -2.2 Thinking in Polyhedra -========================= - -Since the very first compilers, the internal representation of programs -is the _Abstract Syntax Tree_, or AST. In such representation, each -statement appears only once even if it is executed many times (e.g., -when it is enclosed inside a loop). This is a limitation for finding -and applying complex transformations: - * It limits program analysis power. For instance if a statement - _depends_ on another statement (i.e., they access the same - memory location and at least one of these accesses is a write), - we will consider both statements as unique entities while the - dependence relation may involve only few statement executions. - - * It limits program transformation power. Loop transformations - operate on statement executions. For instance, because they - consider all statement executions at the same time, present day - production compilers are not able to achieve loop fusion - (that tries to merge the loop bodies of two loops) if the loop - bounds of the two loops do not match (yes, that's - ridiculous). - - * It limits program manipulation flexibility. Trees are very - rigid data structures that are not easy to manipulate. - Program transformation may require very complex transformations - that will imply deep modifications of the control flow. - - The Polyhedral Model is a convenient alternative representation which -combines analysis power, expressiveness and high flexibility. The -drawback is it breaks the classical structure of programs that every -programmer is familiar with. It requires some (real) efforts to be -smoothly manipulated, but it definitely worth it. It is based on three -main concepts, _iteration domain_, _scattering function_ and _access -function_ that are described in depth in the following sections. - - A program part that can be represented using the Polyhedral Model is -called a *Static Control Part* or *SCoP* for short. - -* Menu: - -* Iteration Domain:: -* Scattering Function:: -* Access Function:: - - -File: openscop.info, Node: Iteration Domain, Next: Scattering Function, Up: Thinking in Polyhedra - -2.2.1 Iteration Domain ----------------------- - -The key aspect of the polyhedral model is to consider _statement -instances_. A statement instance is _one_ execution of a statement. A -statement outside a loop has only one instance while those inside loops -may have many. Let us consider the following code with two statements -`S1' and `S2': - - pi = 3.14; // S1 - for (i = 0; i < 5; i++) - A[i] = pi; // S2 - - The list of statement instances is the following (we just have to -fully unroll the loop): - - pi = 3.14; - A[0] = pi; - A[1] = pi; - A[2] = pi; - A[3] = pi; - A[4] = pi; - - Each instance of a statement which is enclosed inside a loop may be -referred thanks to its outer loop counters (or _iterators_). In the -polyhedral model we consider statements as functions of the outer loop -counters that may produce statement instances: instead of simply -"`S2'", we use preferably the notation `S2(i)'. For instance we -denote the statement instance `A[3] = pi;' of the previous example as -`S2(3)'. This means _instance of statement `S2' for_ `i = 3'. If a -statement `S3' is enclosed inside two loops of iterators `i' (outermost -loop) and `j' (innermost loop), we would denote it `S3(i,j)', and so on -with more enclosing loops. - - The ordered list of iterators (ordered from the outermost iterator -to the innermost iterator) is called the *iteration vector*. For -instance the iteration vector for `S3' is `(i,j)', for `S2' it is -`(i)', and for `S1' it is empty since it has no enclosing loop: `()'. A -more precise reading at the notation `S2(3)' would show that it denotes -the instance of statement `S2' for the iteration vector `(2)'. - - Obviously, dealing with statement instances does not mean we have to -unroll all loops. First because there would be probably too many -instances to deal with, and second because we probably just do not know -how many instances there are. For instance in the following loop it is -impossible to know (at compile time) how many times the statement `S3' -will be executed: - - for (i = 2; i <= N; i++) - for (j = 2; j <= N; j++) - A[i] = pi; // S3 - -Such a loop is said to be _parametric_: it depends on (at least) a -value called a _parameter_ which is not modified during the execution -of the whole loop, but is unknown at compile time. Here, the only -parameter is `N'. - - A compact way to represent all the instances of a given statement is -to consider the set of all possible values of its iteration vector. -This set is called the *iteration domain*. It can be conveniently -described thanks to all the constraints on the various iterators the -statement depends on. For instance, let us consider the statement `S3' -of the previous program. The iteration domain is the set of iteration -vectors `(i,j)'. Because of the parameter, we are not able to achieve a -precise list of all possible values. It would look like this: - - (2,2) (2,3) (2,4) ... (2,N) - (3,2) (3,3) (3,4) ... (3,N) - ... ... ... ... ... - (N,2) (N,3) (N,4) ... (N,N) - -A better way is to say it is the set of iteration vectors `(i,j)' such -that `i' is an integer greater or equal than 2 and lower or equal than -`N', and `j' is an integer greater or equal than 2 and lower or equal -than `N'. This may be written in the following mathematical form: - - D_S3 = {(i,j) in Z^2 | 2 <= i <= N && 2 <= j <= N } - -It is easy to see that this iteration domain is a part of the -2-dimensional space - Z^2. -We often use in our research papers a graphical representation that -gives a better view of this subspace: - -[image src="images/basic1.jpg" text=" j^ i>=2 i<=N - | | | - | | | -N-+-********--j<=N - | ******** - | ******** - | ******** -2-+-********--j>=2 - | | | -0-+-+------+--->i - | | | - 0 2 N -"] - -Here, the iteration domain is specified thanks to a set of constraints. -When those constraints are affine and depend only on the outer loop -counters and some parameters, the set of constraints defines a -_polyhedron_ (more precisely this is a _Z-polyhedron_, but we use -_polyhedron_ for short). Hence the _polyhedral model_! - - To manipulate a set of affine constraints easily, we rely on a matrix -representation. To write it, we use the _homogeneous_ iteration vector: -it is simply the iteration vector with some additional dimensions to -represent the parameters and the constant. For instance for the -statement `S3', the iteration vector in homogeneous coordinates is `(i, -j, N, 1)' (we will now call it _iteration vector_ directly for short). -Then we write all the constraints as affine inequalities of the form -_affine constraint_ ` >= 0'. For instance for the statement `S3' the -set of constraints is: - - i - 2 >= 0 - -i + N >= 0 - j - 2 >= 0 - -j + N >= 0 - -Lastly, we translate the constraint system to the form *domain matrix*` -* '_iteration vector_` >= 0': - - [ 1 0 0 -2 ] [ i ] [ 0 ] - [ -1 0 1 0 ] [ j ] [ 0 ] - [ 0 1 0 -2 ] * [ N ] >= [ 0 ] - [ 0 -1 1 0 ] [ 1 ] [ 0 ] - -*The domain matrix will be used in all our tools to provide the -information on the iteration domain of a given statement (the iteration -vector is in general an implicit information).* - - -File: openscop.info, Node: Scattering Function, Next: Access Function, Prev: Iteration Domain, Up: Thinking in Polyhedra - -2.2.2 Scattering Function -------------------------- - -There is no ordering information inside the iteration domain: it only -describes the set of statement instances but *not* the order in which -they have to be executed relatively to each other. In the past the -lexicographic order of the iteration domain was considered, this is no -more true (especially when using CLooG). If we do not provide any -ordering information, this means that the statement instances may be -executed in any order (this is useful, e.g., to specify parallelism). -However, some statement instances may depend on some others and it may -be critical to enforce a given order (or non-order). Hence we need -another information. - - We call _scattering_ any kind of ordering information in the -polyhedral model. There exists many kind of ordering, such as -_allocation_, _scheduling_, _chunking_ etc. They are all expressed in -the same way, i.e., using _logical stamps_, but they may have different -semantics. - - In the case of *scheduling*, the logical stamps are logical dates -that express at which date a statement instance has to be executed. For -instance, let us consider the following three statements: - - x = a + b; // S1 - y = c + d; // S2 - z = a * b; // S3 - -The scheduling of a statement `S' is typically denoted by T_S. Let us -consider the following logical dates for each statement: - - T_S1 = 1 - T_S2 = 2 - T_S3 = 3 - -It means that statement `S3' has to be executed at logical date `1', -statement `S1' has to be executed at logical date `2' and statement -`S2' has to be executed at logical date `3'. The target code has to -respect this scheduling (the order of the logical dates), hence it -would look like the following where the variable `t' denotes the time: - - t = 1; - z = a * b; // S3 - t = 2; - x = a + b; // S1 - t = 3; - y = c + d; // S2 - -When some statements share the same logical date, this means that, once -the program reaches this logical date, the two statements can be -executed in any order, or better, in parallel. For instance let us -consider the following scheduling: - - T_S1 = 1 - T_S2 = 2 - T_S3 = 1 - -Statements `S1' and `S3' have the same logical date, moreover, `S2' has -a greater logical date than `S1' and `S3'. Hence the target code would -be: - - t = 1; - #pragma omp parallel sections - { - #pragma omp section - { - x = a + b; // S1 - } - #pragma omp section - { - z = a * b; // S3 - } - } - t = 2; - y = c + d; // S2 - - Logical dates may be multidimensional, as clocks: the first dimension -may correspond to days (most significant), the next one to hours (less -significant), the third to minutes and so on. For instance we can -consider the following multidimensional schedules for our example: - - T_S1 = (1,1) - T_S2 = (2,1) - T_S3 = (1,2) - -It is not very hard to decypher the meaning of such scheduling. -Because of the first dimension, statements `S1' and `S3' will be -executed before statement `S2' (`S1' and `S3' are executed at day 1, -while `S2' is executed at day 2). The second dimension is not really -useful there for `S2' because it is the only statement executed at day -2. Nevertheless it allows to order `S1' and `S3' relatively to each -other since `S1' is executed at hour 1 of day 1 while `S3' is executed -at hour 2 of day 1. The corresponding target code is the following, -with some additional time variables for a better view of the ordering -(`t1' corresponds to the first time dimension, `t2' to the second one): - - t1 = 1; - t2 = 1; - x = a + b; // S1 - t2 = 2; - z = a * b; // S3 - t1 = 2; - t2 = 1; - y = c + d; // S2 - - In the case of *allocation* (in the literature we can find some -papers calling it _placement_), the logical stamp is a processor number -expressing on which processor a statement instance has to be executed. -Typically, allocations are written in the same way as scheduling. -Here, we denote it P_S for a statement `S'. For instance, let us -consider the following allocation: - - P_S1 = 1 - P_S2 = 2 - P_S3 = 1 - -The corresponding target code has to take into account that both -statements `S1' and `S3' have to be executed on the same processor -(they have the same logical number 1) and that statement `S2' has to be -executed on another processor (logical number 2). A possible target code -is the following: - - #pragma omp parallel sections - { - #pragma omp section - { - // Logical processor 1 - x = a + b; // S1 - z = a * b; // S3 - } - #pragma omp section - { - // Logical processor 2 - y = c + d; // S2 - } - } - -We can note that no order has been specified for the statements `S1' -and `S3' that are executed on the same processor. Hence any order is -satisfying. For sake of flexibility, it is usual to build a scattering -whose various dimensions do not have the same semantics. A typical -construction is _space/time mapping_ where the first `n' dimensions are -devoted to allocation, then the last `m' dimensions are devoted to -scheduling. Typically, space/time mapping is written in the same way as -scheduling. Here we denote it M_S for a statement `S'. For instance, -let us consider the following space/time mapping for our example where -one dimension is devoted to mapping and one dimension is devoted to -scheduling: - - M_S1 = (1,2) - M_S2 = (2,1) - M_S3 = (1,1) - -Here we have the same first dimension as the previous example, thus the -allocation of the statements to processors is the same. The second -dimension precises on a given processor at which logical date a -statement instance has to be executed. Here, the statement `S1' is -executed at day 2 on processor 1 while the statement `S3' is executed -at day 1 onto the same processor. It follows this space/time mapping -corresponds to the following target code (we added an additional -variable to represent the local logical clocks): - - #pragma omp parallel sections - { - #pragma omp section - { - // Logical processor 1 - t = 1; - z = a * b; // S3 - t = 2; - x = a + b; // S1 - } - #pragma omp section - { - // Logical processor 2 - t = 1; - y = c + d; // S2 - } - } - - For the same reason as discussed for iteration domains (*note -Iteration Domain::), it is not possible to define a scattering for each -statement instance, especially if the statement belongs to a (possibly -parametric) loop. The iteration vector fully defines an instance of a -given statement. Thus, a practical way to provide a scattering for each -instance of a given statement is to use a _function_ that depends on -the iteration vector. In this way the function may associate to each -iteration vector a different scattering. We call these functions -*scattering functions*. Scattering functions are _affine_ functions of -the outer loop counter and the global parameters. For instance, let us -consider the following source code: - - for (i = 2; i <= 4; i++) - for (j = 2; j <= 4; j++) - P[i+j] += A[i] + B[j]; // S4 - -The iteration domain of the statement `S4' is: - - D_S4= {(i,j) in Z^2 | 2 <= i <= 4 && 2 <= j <= 4 }. - -If you are still not comfortable with the mathematical notation, it -corresponds to the following graphical representation: - -[image src="images/basic2.jpg" text=" j^ i>=2 - | | i<=4 - | | | -4-+-***--j<=4 - | *** -2-+-***--j>=2 - | | | -0-+-+-+--->i - | | | - 0 2 4 -"] - -The list of the statement instances of `S4' (the integer points of its -iteration domain) corresponds to the following iteration vectors: - - iteration vector - (2,2) - (2,3) - (2,4) - (3,2) - (3,3) - (3,4) - (4,2) - (4,3) - (4,4) - -Let us suppose we want to schedule the instances of the statement `S4' -(the integer points of its iteration domain) using the following -scheduling function: - - T_S4(i,j) = (j+2,3*i+j) - -We only need to apply the function to each iteration vector to find the -logical date of each instance: - - iteration vector logical date - (2,2) --> (4,8) - (2,3) --> (5,9) - (2,4) --> (6,10) - (3,2) --> (4,11) - (3,3) --> (5,12) - (3,4) --> (6,13) - (4,2) --> (4,14) - (4,3) --> (5,15) - (4,4) --> (6,16) - - The polyhedral model users do not have to take care about the -generation of a target code that respects the scattering: the CLooG(1) -tool is there to solve the problem quite easily. For the previous -example, the target code would be the following (`t1' and `t2' -correspond to the two dimensions of the logical date, the reader may -take care that this code actually implements the scattering function): - - for (t1 = 4; t1 <= 6; t1++) { - for (t2 = t1+4; t2 <= t1+10; t2++) { - if ((-t1+t2+2)%3 == 0) { - i = (-t1+t2+2)/3 ; - j = t1-2 ; - P[i+j] += A[i] + B[j]; // S4 - } - } - } - - Obviously with such a twisted scheduling, it is hard to see the -"meaning" of the transformation. To name any kind of program -transformation as a magic spell ("tile", "fuse", "skew"...) is an old -bad habit which is not relevant anymore in the polyhedral model: a -scheduling may be an arbitrary complex sequence of basic-old-good -transformations. Nevertheless it is most of the time quite easy to -translate well known transformations to schedules. For instance, let -us consider this new scheduling function: - - T_S4(i,j) = (j,i) - -Using CLooG, we can generate the target code: - - for (t1 = 2; t1 <= 4; t1++) { - for (t2 = 2; t2 <= 4; t2++) { - i = t2; - j = t1; - P[i+j] += A[i] + B[j]; // S4 - } - } - -It is easy to see (and analyze) that it corresponds to a classical -_loop interchange_ transformation. - - A very useful example of multi-dimensional scattering functions is -the *scheduling of the original program*. The method to compute it is -quite simple (*note Fea92::). The idea is to build an abstract syntax -tree of the program and to read the scheduling for each statement. For -instance, let us consider the following implementation of a Cholesky -factorization: - - /* A Cholesky factorization kernel. */ - for (i=1;i<=N;i++) { - for (j=1;j<=i-1;j++) { - a[i][i] -= a[i][j] ; // S1 - } - a[i][i] = sqrt(a[i][i]) ; // S2 - for (j=i+1;j<=N;j++) { - for (k=1;k<=i-1;k++) { - a[j][i] -= a[j][k]*a[i][k] ; // S3 - } - a[j][i] /= a[i][i] ; // S4 - } - } - } - -The corresponding abstract syntax tree is shown in the following -figure. It directly gives the scattering functions (schedules) for all -the statements of the program (just follow the paths). - -[image src="images/tree.jpg" text=" * - | - |0 - | - V - i - | - +-----+-----+ - | | | - |0 |1 |2 - | | | - V V V - j S2 j - | | - |0 +--+--+ - | | | - V |0 |1 - S1 | | - V V - k S4 - | - |0 - | - V - S3 -"] - - T_S1(i,j) = (0,i,0,j,0) - T_S2(i) = (0,i,1) - T_S3(i,j,k) = (0,i,2,j,0,k,0) - T_S4(i,j) = (0,i,2,j,1) - -These schedules depend on the iterators and give for each instance of -each statement a unique execution date. Using such scattering functions -allows CLooG to re-generate the input code. - -To easily manipulate the scattering function of any statement `S', we -translate it to the matrix form: T_S(_iteration vector_) ` = -'*scattering matrix*` * '_iteration vector_. For instance let us -consider again our previous example T_S4(i,j) = (j+2,3*i+j). We write -it in the following way: - [ i ] [ 0 1 2 ] [ i ] - T_S4([ j ]) = [ 3 1 0 ] * [ j ] - [ 1 ] [ 1 ] - -*The scattering matrix will be used in all our tools to provide the -information on the scattering of a given statement (the iteration -vector is in general an implicit information).* - - ---------- Footnotes ---------- - - (1) `http://www.cloog.org' - - -File: openscop.info, Node: Access Function, Prev: Scattering Function, Up: Thinking in Polyhedra - -2.2.3 Access Function ---------------------- - -Before applying any transformation, it is essential to deeply analyze -both the original program and the transformation to ensure the -transformation does not imply any modification of the original program -semantics. In the polyhedral model, we are able to achieve an exact -analysis when all the memory accesses are made through arrays (note -that variables are a particular case of arrays since they are simply -arrays with only one memory location) with affine subscripts that depend -on outer loop counters and global parameters (note that _subscripts_ -are sometimes called _index_ or _accesses_ in the literature). - - For instance let us consider the array access `A[2*i+j][j][i+N]'. It -has three dimensions, each subscript dimension is an affine form of -some outer loop iterarors (`i' and `j') and global parameters (`N') -hence it corresponds to an acceptable array access to be analyzed in the -polyhedral model. - - Each array access can target a different memory cell depending on the -statement instance, i.e., depending on the iteration vector. Thus we -use access functions (or subscript functions, or index functions, as you -prefer to call it) depending on the iteration vector to describe an -array access. In our example, the access function would be written -F_A(i, j) = (2*i+j, j, i+N). - -To easily manipulate the access function of any array `A', we translate -it to the matrix form: F_A(_iteration vector_) ` = '*access matrix*` * -'_iteration vector_. For instance let us consider again our previous -example. We would write it in the following way: - [ i ] [ 2 1 0 0 ] [ i ] - F_A([ j ]) = [ 0 1 0 0 ] * [ j ] - [ N ] [ 1 0 1 0 ] [ N ] - [ 1 ] [ 1 ] - -*The access matrix will be used in all our tools to provide the -information on the access of a given statement (the iteration vector is -in general an implicit information).* - - -File: openscop.info, Node: What's Next?, Prev: Thinking in Polyhedra, Up: Polyhedral Representation - -2.3 What's Next? -================ - -OK, now you have an idea about how we do represent a program part in the -polyhedral model. You know the three main concepts, namely: domain, -scattering and access. What can you do with this?! Well, pretty much -anything related to code restructuring! The core idea will be to rely -on the mathematical representation to extract useful information about -your code (data reuse, parallelism...) and to generate a scattering to -benefit from the properties you analysed. However, OpenScop's -documentation is not the right place to learn at this (OpenScop is all -about representation, not about manipulation). Probably it is the right -time for you to have a look at: - * PoCC `http://pocc.sourceforge.net' - - * Pluto `http://pluto-compiler.sourceforge.net' - -Have fun :-) ! - - -File: openscop.info, Node: OpenScop Specification, Next: OpenScop Library, Prev: Polyhedral Representation, Up: Top - -3 OpenScop Specification -************************ - -OpenScop provides an explicit polyhedral representation of a static -control part. It has been designed by various polyhedral compilation -tool writers from various institutions. It builds on previous popular -polyhedral file and data structure formats (such as _.cloog_ and CLooG -data structures) to provide a unique, extensible format to most -polyhedral compilation tools. It is composed of two parts. The first -part, the so-called _core part_, is devoted to the polyhedral -representation of a SCoP. It contains what is strictly necessary to -build a complete source-to-source framework in the polyhedral model and -to output a semantically equivalent code for the SCoP, from analysis to -code generation. The second part of the format, the so-called -_extension part_, contains extensions to provide additional -informations to some tools. - -* Menu: - -* Preliminary Example:: -* OpenScop File Format Specification:: -* OpenScop Data Structure Specification:: -* Extensions:: -* History:: - - -File: openscop.info, Node: Preliminary Example, Next: OpenScop File Format Specification, Up: OpenScop Specification - -3.1 Preliminary Example -======================= - -OpenScop is a specification for representing static control program -parts in the polyhedral model. Thus, we can translate some code parts -to an equivalent OpenScop representation. As an example, let us -consider the following matrix-multiply kernel: - - #pragma scop - if (N > 0) { - for (i = 0; i < N; i++) { - for (j = 0; j < N; j++) { - C[i][j] = 0.0; - for (k = 0; k < N; k++) - C[i][j] = C[i][j] + A[i][k] * B[k][j]; - } - } - } - - The Clan(1) tool may be used to translate this code part to an -OpenScop representation automatically. The `#pragma scop' is used here -for Clan, but some other tool may not need it. Here is the result of the -translation to an OpenScop textual representation. - - - *DON'T PANIC* - -Explanations will follow and it is not as cryptic as it seems to be ! - - - - # =============================================== Global - # Backend Language - C - - # Context - CONTEXT - 1 3 0 0 0 1 - # e/i | N | 1 - 1 1 -1 ## N-1 >= 0 - - # Parameter names are provided - 1 - # Parameter names - - N - - - # Number of statements - 2 - - # =============================================== Statement 1 - # Number of relations describing the statement - 3 - - # ---------------------------------------------- 1.1 Domain - DOMAIN - 4 5 2 0 0 1 - # e/i | i j | N | 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - - # ---------------------------------------------- 1.2 Scattering - SCATTERING - 5 10 5 2 0 1 - # e/i| s1 s2 s3 s4 s5 | i j | N | 1 - 0 -1 0 0 0 0 0 0 0 0 ## s1 = 0 - 0 0 -1 0 0 0 1 0 0 0 ## s2 = i - 0 0 0 -1 0 0 0 0 0 0 ## s3 = 0 - 0 0 0 0 -1 0 0 1 0 0 ## s4 = j - 0 0 0 0 0 -1 0 0 0 0 ## s5 = 0 - - # ---------------------------------------------- 1.3 Access - WRITE - 3 8 3 2 0 1 - # e/i| Arr [1] [2] | i j | N | 1 - 0 -1 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 ## [j] - - # ---------------------------------------------- 1.4 Body - # Statement body is provided - 1 - # Statement body - - # Number of original iterators - 2 - # Original iterator names - i j - # Statement body expression - C[i][j] = 0.0; - - - # =============================================== Statement 2 - # Number of relations describing the statement - 5 - - # ---------------------------------------------- 2.1 Domain - DOMAIN - 6 6 3 0 0 1 - # e/i| i j k | N | 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 -1 ## -j+N-1 >= 0 - 1 0 0 1 0 0 ## k >= 0 - 1 0 0 -1 1 -1 ## -k+N-1 >= 0 - - # ---------------------------------------------- 2.2 Scattering - SCATTERING - 7 13 7 3 0 1 - # e/i| s1 s2 s3 s4 s5 s6 s7 | i j k | N | 1 - 0 -1 0 0 0 0 0 0 0 0 0 0 0 ## s1 = 0 - 0 0 -1 0 0 0 0 0 1 0 0 0 0 ## s2 = i - 0 0 0 -1 0 0 0 0 0 0 0 0 0 ## s3 = 0 - 0 0 0 0 -1 0 0 0 0 1 0 0 0 ## s4 = j - 0 0 0 0 0 -1 0 0 0 0 0 0 1 ## s5 = 1 - 0 0 0 0 0 0 -1 0 0 0 1 0 0 ## s6 = k - 0 0 0 0 0 0 0 -1 0 0 0 0 0 ## s7 = 0 - - # ---------------------------------------------- 2.3 Access - WRITE - 3 9 3 3 0 1 - # e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 0 ## [j] - - READ - 3 9 3 3 0 1 - # e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 0 ## [j] - - READ - 3 9 3 3 0 1 - # e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 2 ## A - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 0 1 0 0 ## [k] - - READ - 3 9 3 3 0 1 - # e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 3 ## B - 0 0 -1 0 0 0 1 0 0 ## [k] - 0 0 0 -1 0 1 0 0 0 ## [j] - - # ---------------------------------------------- 2.4 Body - # Statement body is provided - 1 - # Statement body - - # Number of original iterators - 3 - # Original iterator names - i j k - # Statement body expression - C[i][j] = C[i][j] + A[i][k] * B[k][j]; - - - # =============================================== Extensions - - May the power of the polyhedral model be with you. - - - - - We will not describe here precisely the structure and the components -of this output, this is described in depth in a further section (*note -OpenScop File Format Specification::). This format has been designed to -be a possible input or output file format of most of polyhedral -compilation tools. If you read the description of the polyhedral -representation of programs, you should already feel familiar with this -file format (*note Polyhedral Representation::). - - ---------- Footnotes ---------- - - (1) `http://www.lri.fr/~bastoul/development/clan/' - - -File: openscop.info, Node: OpenScop File Format Specification, Next: OpenScop Data Structure Specification, Prev: Preliminary Example, Up: OpenScop Specification - -3.2 OpenScop File Format Specification -====================================== - -* Menu: - -* Relations:: -* Generics:: - - The following grammar describes the structure of the OpenScop file -format where terminals are preceeded by "_". Except stated otherwise, -there can be at most one terminal per line in the file. Moreover, each -line may finish with a comment, starting by the `#' character. Each -relevant part will be explained in more details momentarily: - - OpenScop ::= Start_tag Data End_tag - Start_tag ::= "" - End_tag ::= "" - Data ::= Context Statements Extension_list - Context ::= Language Parameter_Domain Parameters - Statements ::= Nb_statements Statement_list - Statement_list ::= Statement Statement_list | (void) - Relation_list ::= _Relation Relation_list | (void) - Extension_list ::= _Generic Extension_list | (void) - Statement ::= Statement_relations Body - Body ::= "0" | "1" Body_information - Parameters ::= "0" | "1" Parameter_information - Statement_relations ::= Nb_relations Relation_List - Parameter_domain ::= _Relation - Language ::= _String - Nb_Relations ::= _Integer - Parameter_information ::= _Generic - Body_information ::= _Generic - - The `Context' and the `Statements' parts compose the _core part_, -i.e., what is strictly necessary to build a complete source to source -framework based on OpenSCop: - * `Context' represents the global information of the SCoP. It - consists on the target language, the global constraints on the - parameters and optionally the parameter information which may be - necessary for the code generation process. The constraints - on the parameters are represented as a relation (*note - Context Domain Relation::). The parameter information is - optional. It is preceded by a boolean which precises - whether it is provided or not. It is a generic information - (*note Generics::), a `strings' (*note Strings Generic::) - for instance. - - * `Statements' represents the information about the statements. - `Nb_statements' is the number of statements in the SCoP, - i.e. the number of `Statement' items in the `Statement_list'. - `Statement' represents the information on a given statement. - To each statement is associated a list of relations and, - optionaly, a body. The list of relations may include one - iteration domain (*note Iteration Domain Relation::), one - scattering relation (*note Scattering Relation::) and - several access relations (*note Access Relation::). There - is no mandatory ordering, but for consistency reason it would - be much appreciated that iteration domain comes first (if present) - then scattering (if present), then accesses (if present). - The statement body is an optional information. It is preceded - by a boolean which precises whether it is provided or not. - It is a generic information (*note Generics::), a `body' - (*note Body Generic::) for instance. - - The `Extension_list' represents the _extension part_ and may contain -an arbitrary number of generic informations (*note Generics::). Few -examples of possible extensions are presented in a further section -(*note Extensions::). - - As shown by the grammar, the input file describes the various pieces -of information based on strings, integers, _relations_ and _generics_. -Relations and Generics are specific to OpenScop and are described in -depth in the following Sections (*note Relations:: and *note -Generics::). - - -File: openscop.info, Node: Relations, Next: Generics, Up: OpenScop File Format Specification - -3.2.1 Relations ---------------- - -* Menu: - -* Iteration Domain Relation:: -* Context Domain Relation:: -* Scattering Relation:: -* Access Relation:: - - _Relations_ are the essence of the OpenScop format and contain the -"polyhedral" information. They are used to describe either an iteration -domain, or a context domain, or a scattering or a memory access. - - We use the relation term as a shortcut to denote a union of convex -relations, each element of the union being described by a set of -constraints in an extended PolyLib format (*note Wil93::). The number -of elements in the union is given by an integer on the first line, -optionally followed by a comment starting with `#'. This number of -elements can be omitted when there is only one element. Each element -in the union has the following syntax: - - 1. Some optional comment lines beginning with `#'. - - 2. A line with the type of the relation, possibly followed by - comments. The type can be one of the following: - * `UNDEFINED': generic relation, - - * `CONTEXT': for context information, - - * `DOMAIN': for iteration domains, - - * `SCATTERING': for scattering relation, - - * `READ': for read accesses, - - * `WRITE': for write accesses, - - * `MAY_WRITE': for may-write accesses, - - 3. A line with 6 numbers, possibly followed by comments: - 1. the number of rows of the constraint matrix, - - 2. the number of columns of the constraint matrix, - - 3. the number of _output dimensions_, - - 4. the number of _input dimension_, - - 5. the number of _local dimensions_ (existentially - quantified dimensions), - - 6. the number of _parameters_. - The sum of the last four numbers should be equal to the - number of columns minus two. The remaining two columns are - the equality/inequality indicator and the constant term. The - number of parameters should be the same for all relations in - the entire OpenScop file or data structure. - - 4. The constraint rows. Each row corresponds to a constraint the - relation has to satisfy. Each row must be on a single line and is - possibly followed by comments. The constraint is an equality - p(x) = 0 if the first element is 0, an inequality p(x) \geq - 0 if the first element is 1. The next elements are the - coefficients of the output dimensions, followed by - coefficients of the input dimensions, the existentially - quantified dimensions and finally the parameters. The last - element is the constant term. - - This representation is the basis for several purposes. Examples for -iteration domains (*note Iteration Domain Relation::), context domains -(*note Context Domain Relation::), scattering relations (*note -Scattering Relation::) and access relations (*note Access Relation::) -are provided in further sections. - - -File: openscop.info, Node: Iteration Domain Relation, Next: Context Domain Relation, Up: Relations - -3.2.1.1 Iteration Domain Relation -................................. - -Iteration domain represents the set of instances of the corresponding -statement. OpenScop iteration domains are represented as relations -with the following conventions: - * the type is `DOMAIN', - - * there is 0 input dimension, - - * loop iterators correspond to output dimensions. - -For instance, assuming that `i', `j' and `k' are the loop iterators and -`M' and `N' are the parameters, the domain defined by the following -constraints : - - -i + M >= 0 - -j + N >= 0 - i + j - k >= 0 - -can be written in the input file as follows: - - # This is an iteration domain - DOMAIN - 1 # Number of relations in the union - 3 7 3 0 0 2 # 3 rows, 7 cols: 3 output dims and 2 params - # e/i| i j k | M N | 1 - 1 -1 0 0 1 0 0 # -i + M >= 0 - 1 0 -1 0 0 1 0 # -j + N >= 0 - 1 1 1 -1 0 0 0 # i + j - k >= 0 - -Equivalently, it can be written in the following way as the number of -relations in the union can be omitted if it is 1: - - # This is an iteration domain - DOMAIN - 3 7 3 0 0 2 # 3 rows, 7 cols: 3 output dims and 2 params - # e/i| i j k | M N | 1 - 1 -1 0 0 1 0 0 # -i + M >= 0 - 1 0 -1 0 0 1 0 # -j + N >= 0 - 1 1 1 -1 0 0 0 # i + j - k >= 0 - -As an example for unions, let us consider the following pseudo-code: - - for (i = 1; i <= N; i++) { - if ((i >= M) || (i <= 2*M)) - S1(i); - } - -The iteration domain of `S1' can be divided into two relations and -written in the OpenScop file as follows: - - # This is an iteration domain - DOMAIN - 2 # Number of relations in the union - # Union part No.1 - 3 5 1 0 0 2 # 3 rows, 5 cols: 1 output dim and 2 params - # e/i| i | M N | 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= N - 1 1 -1 0 0 # i >= M - # Union part No.2 - 3 5 1 0 0 2 # 3 rows, 5 cols: 1 output dim and 2 params - # e/i| i | M N | 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= N - 1 -1 2 0 0 # i <= 2*M - -As an example for local dimensions (existentially quantified -dimensions), let us consider the following pseudo-code: - - for (i = 1; i <= N; i++) { - if ((i % 2) == 0) - S1(i); - } - -The iteration domain of `S1' is composed of all even integer values -between 1 and N. The "divisible by two" constraint can be expressed as -follows: there exists an integer `ld' such that `i = 2*ld'. We encode -this thanks to a new local dimension: - - # This is an iteration domain - DOMAIN - 3 5 1 0 1 1 # 3 rows, 5 cols: 1 output dim, 1 local dim, 1 param - # e/i| i |ld | N | 1 - 0 1 -2 0 0 # i = 2*ld - 1 1 0 0 1 # i >= 1 - 1 -1 0 1 0 # i <= N - - -File: openscop.info, Node: Context Domain Relation, Next: Scattering Relation, Prev: Iteration Domain Relation, Up: Relations - -3.2.1.2 Context Domain Relation -............................... - -The context domain is a particular case of iteration domain (*note -Iteration Domain Relation::) where there are only constraints about -parameters (no loop iterators). Hence it is the same as an iteration -domain, with the following conventions: - * the type is `CONTEXT', - - * there is 0 input dimension, - - * there is 0 output dimension. - - -File: openscop.info, Node: Scattering Relation, Next: Access Relation, Prev: Context Domain Relation, Up: Relations - -3.2.1.3 Scattering Relation -........................... - -Scattering relation maps an iteration domain to a logical time and/or -space (and/or) anything. OpenScop scattering information is -represented as relations (*note Relations::) with the following -conventions: - - * the type is `SCATTERING', - - * output dimensions correspond to scattering dimensions, - - * loop iterators correspond to input dimensions. - - As an example of a scattering relation and assuming that `i', `j' -and `k' are the loop iterators and `M' and `N' are the parameters, take -for instance: - T_{S}(i,j,k) = (j+2,3*i+j,k+N+1). - We can represent it in the following way: - - # A scattering relation - SCATTERING - # 3 rows, 10 columns: 3 scattering dimensions, 3 iterators, 2 parameters - 3 10 3 3 0 2 - # e/i|s1 s2 s3 | i j k | M N | 1 - 0 -1 0 0 0 1 0 0 0 2 # s1 = j+2 - 0 0 -1 0 3 1 0 0 0 0 # s2 = 3*i+j - 0 0 0 -1 0 0 1 0 1 1 # s3 = k+N+1 - - -File: openscop.info, Node: Access Relation, Prev: Scattering Relation, Up: Relations - -3.2.1.4 Access Relation -....................... - -Access relation maps an iteration domain to an array space. Each array -accessed in the SCoP has a unique identification number. OpenScop -relation information is represented as relations (*note Relations::) -with the following conventions: - - * the type is one of the following: - * `READ', for read accesses, - - * `WRITE', for write accesses, - - * `MAY_WRITE', for may write accesses, - - * output dimensions correspond to the array identifier and - dimensions, - - * the first output dimension corresponds to the array identifier, - - * the (i+1)th output dimension corresponds to the ith array - dimension (i>1), - - * loop iterators correspond to input dimensions. - - As an example of a scattering relation and assuming that `i', `j' -and `k' are the loop iterators and `M' and `N' are the parameters, let -us consider the array access `A[2*i+j][j][i+N]' (the identifier of `A' -is 42), and let us suppose this is a read access. Its representation -would be the following: - - # A read access relation - READ - # 4 rows, 11 columns: 4 array dimensions, 3 iterators, 2 parameters - 4 11 4 3 0 2 - # e/i|Arr [1] [2] [3]| i j k | M N | 1 - 0 -1 0 0 0 0 0 0 0 0 42 # A - 0 0 -1 0 0 2 1 0 0 0 0 # [2*i+j] - 0 0 0 -1 0 0 1 0 0 0 0 # [j] - 0 0 0 0 -1 1 0 0 0 1 0 # [i+N] - - To understand this representation, consider that OpenScop accesses -are general memory accesses and not array accesses. The memory is seen -as a big array `Mem' while usual array names correspond to the first -dimension. Hence our example translates to `Mem[42][2*i+j][j][i+N]'. - - Unions of access relations are allowed. In this case, each union -part must refer at the same array identifier, and the number of -dimensions must be consistent. - - -File: openscop.info, Node: Generics, Prev: Relations, Up: OpenScop File Format Specification - -3.2.2 Generics --------------- - -* Menu: - -* Strings Generic:: -* Body Generic:: - - _Generics_ represent any elaborated non-polyhedral information in the -OpenScop format. They are used to represent the parameter information, -the statement body information as well as the extensions. Each generic -information is delimited using XML-like tags corresponding to its URI -(Unique Resource Identifier), For instance, if the generic has the URI -`foo', the begin tag is `' and the end tag is `'). - - Two generics, namely `strings' (*note Strings Generic::) and `body' -(*note Body Generic::) are part of the OpenScop specification to -provide the minimum, stricly necessary information to build a complete -source-to-source polyhedral framework based on OpenScop. However, -generics can be basically _anything_ as long as they are properly -delimited. OpenScop implementations will simply ignore non-supported -generics and warn the user with the mention of the non-supported URIs. -Support of new generics will be added throught the extension mechanism. - - -File: openscop.info, Node: Strings Generic, Next: Body Generic, Up: Generics - -3.2.2.1 Strings Generic -....................... - -The purpose of the `strings' generic is to represent a list of textual -strings on one line (which may be used, e.g., to represent the list of -parameter names in the order used in the relation). Its URI is `strings' -and its file format respects the following grammar: - Strings_generic ::= "" Strings "" - Strings ::= _String String_list | (void) - -A possible example of textual `strings' is the following: - - Not one sentence but 6 strings! - - - -File: openscop.info, Node: Body Generic, Prev: Strings Generic, Up: Generics - -3.2.2.2 Body Generic -.................... - -The purpose of the `body' generic is to represent the textual -information about a statement. It contains the number of original -iterators on the first line, the list of original iterators on the -second line (the loop counters of the statement surrounding loops in -the original program) and the original textual body expression on the -third line. Its URI is `body' and its file format respects the -following grammar (the `String' rule is reused, *note Strings -Generic::): - Body_generic ::= "" Body "" - Body ::= Nb_iterators Iterator_list Expression - Nb_iterators ::= _Integer - Iterator_list ::= Strings - Expression ::= Strings - -A possible example of textual `body' is the following: - - # Number of original iterators - 2 - # Original iterators - i j - # Original statement expression - A[i+j] += B[i] * C[j]; - - - -File: openscop.info, Node: OpenScop Data Structure Specification, Next: Extensions, Prev: OpenScop File Format Specification, Up: OpenScop Specification - -3.3 OpenScop Data Structure Specification -========================================= - -* Menu: - -* osl_relation_t:: -* osl_relation_list_t:: -* osl_interface_t:: -* osl_generic_t:: -* osl_strings_t:: -* osl_body_t:: -* osl_statement_t:: -* osl_scop_t:: - - The OpenScop specification offers a small set of C data structures -devoted to represent a SCoP in memory in a convenient way. Using them -in some tool or library may greatly facilitate its interaction with -other tools or libraries which rely on this representation as well. -Every field may not be useful for a given tool or library. A general -rule for all the data structure is that a `NULL' pointer or a -1 -integer value means the information is not present. Contrary to -engineering time, memory is cheap today, so it's much probably not a -big deal that some fields are left empty. Every field may not be enough -for a given tool or library. In this case it is much recommended to -provide a new extension which may be reused by other users (*note -Extensions::). - - Each tool or library may have its own implementation of the OpenScop -data structures. The type names should not be the same as those provided -as an example here (they correspond to the OpenScop Library -implementation). The names of the fields, and their ordering, should -however be the same. In this way, the interaction between tools and -libraries should be as simple as a cast. - - Before reading at the OpenScop data structures, it is much -recommended to read at the OpenScop file format description, as it is -quite close to this representation (*note OpenScop File Format -Specification::). - - -File: openscop.info, Node: osl_relation_t, Next: osl_relation_list_t, Up: OpenScop Data Structure Specification - -3.3.1 osl_relation_t --------------------- - - struct osl_relation { - int type; /* What this relation is encoding */ - int precision; /* Precision of the matrix elements */ - int nb_rows; /* Number of rows */ - int nb_columns; /* Number of columns */ - int nb_output_dims; /* Number of output dimensions */ - int nb_input_dims; /* Number of input dimensions */ - int nb_local_dims; /* Number of local dimensions */ - int nb_parameters; /* Number of parameters */ - void ** m; /* Matrix of constraints */ - struct osl_relation * next; /* Next relation in the union */ - }; - typedef struct osl_relation osl_relation_t; - typedef struct osl_relation * osl_relation_p; - -The `osl_relation_t' structure stores a part of an union of relations. -A union of relation is a `NULL'-terminated linked list of union parts -(`next' field). The `type' field may provide some information about -what the relation is encoding: - * -1: undefined (`OSL_UNDEFINED'), - - * 2: context domain (`OSL_TYPE_CONTEXT'), - - * 3: iteration domain (`OSL_TYPE_DOMAIN'), - - * 4: scattering relation (`OSL_TYPE_SCATTERING'), - - * 6: read access relation (`OSL_TYPE_READ'), - - * 7: write access relation (`OSL_TYPE_WRITE'), - - * 8: may write access relation (`OSL_TYPE_MAY_WRITE'), - The various numbers provide the details on the relation itself -(*note Relations::) while the `m' field points to the constraint -matrix. The precision of the constraint matrix elements is provided by -the `precision' field. It can take the following values: - * 32: 32 bits precision, elements are `long int' - (`OSL_PRECISION_SP'), - - * 64: 64 bits precision, elements are `long long int' - (`OSL_PRECISION_DP'), - - * 0: multiple precision, elements are GNU GMP Library's - `mpz_t' (`OSL_PRECISION_MP'). - - -File: openscop.info, Node: osl_relation_list_t, Next: osl_interface_t, Prev: osl_relation_t, Up: OpenScop Data Structure Specification - -3.3.2 osl_relation_list_t -------------------------- - - struct osl_relation_list { - osl_relation_p elt; /* Element of the list */ - struct osl_relation_list * next; /* Next element of the list */ - }; - typedef struct osl_relation_list osl_relation_list_t; - typedef struct osl_relation_list * osl_relation_list_p; - -The `osl_relation_list_t' structure is a `NULL'-terminated linked list -of `osl_relation_t' data structures. `elt' is a relation element of -the list and `next' is the pointer to the next element of the list. - - -File: openscop.info, Node: osl_interface_t, Next: osl_generic_t, Prev: osl_relation_list_t, Up: OpenScop Data Structure Specification - -3.3.3 osl_interface_t ---------------------- - - typedef void (*osl_idump_f) (FILE *, void *, int); - typedef char * (*osl_sprint_f)(void *); - typedef void * (*osl_sread_f) (char *); - typedef void * (*osl_malloc_f)(); - typedef void (*osl_free_f) (void *); - typedef void * (*osl_clone_f) (void *); - typedef int (*osl_equal_f) (void *, void *); - - struct osl_interface { - char * URI; /* Unique interface identifier string */ - osl_idump_f idump; /* Pointer to the idump function */ - osl_sprint_f sprint; /* Pointer to the sprint function */ - osl_sread_f sread; /* Pointer to the sread function */ - osl_malloc_f malloc; /* Pointer to the malloc function */ - osl_free_f free; /* Pointer to the free function */ - osl_clone_f clone; /* Pointer to the clone function */ - osl_equal_f equal; /* Pointer to the equal function */ - struct osl_interface * next; /* Next interface in the list */ - }; - typedef struct osl_interface osl_interface_t; - typedef struct osl_interface * osl_interface_p; - -The `osl_interface_t' structure represents a node in a -`NULL'-terminated list of interfaces. Each node stores the _interface_ -of a generic OpenScop object, i.e., its unique name (`URI') and the -function pointers to all the base functions it has to provide. -Extension providers will find information relative to those functions -in the OpenScop Library description (*note Base Functions::) and the -section dedicated to writing extensions (*note Extension Development::). - - -File: openscop.info, Node: osl_generic_t, Next: osl_strings_t, Prev: osl_interface_t, Up: OpenScop Data Structure Specification - -3.3.4 osl_generic_t -------------------- - - struct osl_generic { - void * data; /* Pointer to some data */ - osl_interface_p interface; /* Interface to work with the data */ - struct osl_generic * next; /* Pointer to the next generic */ - }; - typedef struct osl_generic osl_generic_t; - typedef struct osl_generic * osl_generic_p; - -The `osl_generic_t' structure represents a node in a `NULL'-terminated -list of generic elements. It stores some data and operations with no -pre-defined type. The information is accessible through the `data' -pointer while the type and operations are accessible through the -`interface' pointer. It is used to represent data that are allowed to -differ in implementations, such as symbols and extensions. - - -File: openscop.info, Node: osl_strings_t, Next: osl_body_t, Prev: osl_generic_t, Up: OpenScop Data Structure Specification - -3.3.5 osl_strings_t -------------------- - - struct osl_string { - char ** string; /* NULL-terminated array of strings */ - }; - typedef struct osl_strings osl_strings_t; - typedef struct osl_strings * osl_strings_p; - -The `osl_strings_t' structure represents a NULL-terminated list of C -character strings. It is encapsulated into a structure to allow its -manipulation through a generic type. - - -File: openscop.info, Node: osl_body_t, Next: osl_statement_t, Prev: osl_strings_t, Up: OpenScop Data Structure Specification - -3.3.6 osl_body_t ----------------- - - struct osl_body { - osl_strings_p iterators; /* Original iterators */ - osl_strings_p expression; /* Original statement expression */ - }; - typedef struct osl_body osl_body_t; - typedef struct osl_body * osl_body_p; - -The `osl_body_t' structure stores a statement body in a textual form. -The complete original expression (directly copy-pasted from the -original code) is in the expression field while the textual forms of -the original iterators are in the iterators field. They may be used for -substitutions inside the expression. - - -File: openscop.info, Node: osl_statement_t, Next: osl_scop_t, Prev: osl_body_t, Up: OpenScop Data Structure Specification - -3.3.7 osl_statement_t ---------------------- - - struct osl_statement { - osl_relation_p domain; /* Iteration domain */ - osl_relation_p scattering; /* Scattering relation */ - osl_relation_list_p access; /* List of array access relations */ - osl_generic_p body; /* Original statement body */ - void * usr; /* A user-defined field */ - struct osl_statement * next; /* Next statement in the list */ - }; - typedef struct osl_statement osl_statement_t; - typedef struct osl_statement * osl_statement_p; - -The `osl_statement_t' structure represents a node in a -`NULL'-terminated linked list of statements. Each node contains the -useful information for a given statement to process it within a -polyhedral framework. The order in the list may matter for naming -conventions (e.g. "S1" for the first statement in the list). The -iteration domain and the scattering are represented using an -`osl_relation_p' structure while the accesses are using a list of -relations: one for each memory access in the statement. The `body' -field should provide information about the statement body (since it has -a generic type, the specification is not strict about how it is used), -e.g., using the `osl_body_t' data structure (*note osl_body_t::). It -is also possible to use the `usr' field, but it has to be totally -managed by the user. - - -File: openscop.info, Node: osl_scop_t, Prev: osl_statement_t, Up: OpenScop Data Structure Specification - -3.3.8 osl_scop_t ----------------- - - struct osl_scop { - int version; /* Version of the data structure */ - char * language; /* Target language */ - osl_relation_p context; /* Constraints on the parameters */ - osl_generic_p parameters; /* Information about parameters */ - osl_statement_p statement; /* Statement list */ - osl_interface_p registry; /* Registered extension interfaces */ - osl_generic_p extension; /* Extension list */ - void * usr; /* A user-defined field */ - struct osl_scop * next; /* Next scop in the list */ - }; - typedef struct osl_scop osl_scop_t; - typedef struct osl_scop * osl_scop_p; - -`osl_scop_t' represents a node in a `NULL'-terminated list of scops. It -stores the useful informations of a static control part of a program to -process it within a polyhedral framework. To prepare OpenScop -specification evolution, the `version' field tells the version of the -data structure. It should be set to 1 for now (and hopefully a very, -very, long time). First, it contains the informations about the -context. The target language in expressed in the `language' field. The -constraints on the global parameters are detailed in the `context' -field. The `paremeters' field should provide information about the -parameters (since it has a generic type, the specification is not strict -about how it is used), e.g., using the `osl_strings_t' data structure -(*note osl_strings_t::). Finally, it contains the list of statements -`statement', the list of registered interfaces for generic types -`registry' and the list of extentions `extension'. It is also possible -to use the `usr' field, but it has to be totally managed by the user. - - As an example, let us consider again the matrix multiply program -(*note Preliminary Example::). The next figure gives a possible -representation in memory for this SCoP thanks to the OpenScop data -structures (it has been actually printed by the `osl_scop_dump' -function), note that symbols like parameters, original iterators and -statement expression are represented with an `osl_strings_t' which does -not belong to the specification but to the OpenScop Library -implementation: - - +-- osl_scop_t - | | - | Version: 1 - | | - | Language: C - | | - | +-- osl_relation_t (CONTEXT, 32 bits) - | | 1 3 0 0 0 1 - | | [ 1 1 -1 ] - | | - | +-- osl_generic_t - | | | - | | +-- osl_interface_t: URI = strings - | | | - | | +-- osl_strings_t: N - | | | - | | - | +-- osl_statement_t (S1) - | | | - | | +-- osl_relation_t (DOMAIN, 32 bits) - | | | 4 5 2 0 0 1 - | | | [ 1 1 0 0 0 ] - | | | [ 1 -1 0 1 -1 ] - | | | [ 1 0 1 0 0 ] - | | | [ 1 0 -1 1 -1 ] - | | | - | | +-- osl_relation_t (SCATTERING, 32 bits) - | | | 5 10 5 2 0 1 - | | | [ 0 -1 0 0 0 0 0 0 0 0 ] - | | | [ 0 0 -1 0 0 0 1 0 0 0 ] - | | | [ 0 0 0 -1 0 0 0 0 0 0 ] - | | | [ 0 0 0 0 -1 0 0 1 0 0 ] - | | | [ 0 0 0 0 0 -1 0 0 0 0 ] - | | | - | | +-- osl_relation_list_t - | | | | - | | | +-- osl_relation_t (WRITE, 32 bits) - | | | | 3 8 3 2 0 1 - | | | | [ 0 -1 0 0 0 0 0 1 ] - | | | | [ 0 0 -1 0 1 0 0 0 ] - | | | | [ 0 0 0 -1 0 1 0 0 ] - | | | | - | | | - | | +-- osl_generic_t - | | | | - | | | +-- osl_interface_t: URI = body - | | | | - | | | +-- osl_strings_t: i j - | | | | - | | | +-- osl_strings_t: C[i][j] = 0.0; - | | | | - | | | - | | V - | | osl_statement_t (S2) - | | | - | | +-- osl_relation_t (DOMAIN, 32 bits) - | | | 6 6 3 0 0 1 - | | | [ 1 1 0 0 0 0 ] - | | | [ 1 -1 0 0 1 -1 ] - | | | [ 1 0 1 0 0 0 ] - | | | [ 1 0 -1 0 1 -1 ] - | | | [ 1 0 0 1 0 0 ] - | | | [ 1 0 0 -1 1 -1 ] - | | | - | | +-- osl_relation_t (SCATTERING, 32 bits) - | | | 7 13 7 3 0 1 - | | | [ 0 -1 0 0 0 0 0 0 0 0 0 0 0 ] - | | | [ 0 0 -1 0 0 0 0 0 1 0 0 0 0 ] - | | | [ 0 0 0 -1 0 0 0 0 0 0 0 0 0 ] - | | | [ 0 0 0 0 -1 0 0 0 0 1 0 0 0 ] - | | | [ 0 0 0 0 0 -1 0 0 0 0 0 0 1 ] - | | | [ 0 0 0 0 0 0 -1 0 0 0 1 0 0 ] - | | | [ 0 0 0 0 0 0 0 -1 0 0 0 0 0 ] - | | | - | | +-- osl_relation_list_t - | | | | - | | | +-- osl_relation_t (WRITE, 32 bits) - | | | | 3 9 3 3 0 1 - | | | | [ 0 -1 0 0 0 0 0 0 1 ] - | | | | [ 0 0 -1 0 1 0 0 0 0 ] - | | | | [ 0 0 0 -1 0 1 0 0 0 ] - | | | | - | | | V - | | | osl_relation_list_t - | | | | - | | | +-- osl_relation_t (READ, 32 bits) - | | | | 3 9 3 3 0 1 - | | | | [ 0 -1 0 0 0 0 0 0 1 ] - | | | | [ 0 0 -1 0 1 0 0 0 0 ] - | | | | [ 0 0 0 -1 0 1 0 0 0 ] - | | | | - | | | V - | | | osl_relation_list_t - | | | | - | | | +-- osl_relation_t (READ, 32 bits) - | | | | 3 9 3 3 0 1 - | | | | [ 0 -1 0 0 0 0 0 0 2 ] - | | | | [ 0 0 -1 0 1 0 0 0 0 ] - | | | | [ 0 0 0 -1 0 0 1 0 0 ] - | | | | - | | | V - | | | osl_relation_list_t - | | | | - | | | +-- osl_relation_t (READ, 32 bits) - | | | | 3 9 3 3 0 1 - | | | | [ 0 -1 0 0 0 0 0 0 3 ] - | | | | [ 0 0 -1 0 0 0 1 0 0 ] - | | | | [ 0 0 0 -1 0 1 0 0 0 ] - | | | | - | | | - | | +-- osl_generic_t - | | | | - | | | +-- osl_interface_t: URI = body - | | | | - | | | +-- osl_strings_t: i j k - | | | | - | | | +-- osl_strings_t: C[i][j] = C[i][j] + A[i][k]*B[k][j]; - | | | | - | | | - | | - | +-- NULL interface - | | - | +-- NULL generic - | | - | - - -File: openscop.info, Node: Extensions, Next: History, Prev: OpenScop Data Structure Specification, Up: OpenScop Specification - -3.4 Extensions -============== - -The core part of the OpenScop representation embeds what is strictly -necessary to build a complete source-to-source polyhedral framework. -However it may not be enough. Hence, OpenScop offers a very flexible -extension part. Actually, the only constraint to build an extension is -to request the OpenScop maintainer for a unique extension name: its URI -(ask the maintainer through the OpenScop mailing list -). - - The policy to support extensions is the following and is pretty -simple: an OpenScop implementation is not required to support any -extension. If it is processing an OpenScop file or data structure which -contains an extension which is not supported, it must (1) warn the user -with the mention of the URI of the non-supported extension and (2) -ignore this extension. - - Extensions in an OpenScop file are provided after the core part, -without any specific order. Each extension is delimited using XML-like -tags corresponding to its URI (e.g., if the extension has the URI -`foo', the begin tag is `' and the end tag is `'). There is -no specification or preferred way to write the extension body. -Extensions in an OpenScop data structure must be accessible through one -pointer. This pointer will be stored in the `data' field of an -`osl_generic_t' container (*note osl_generic_t::). There must be only -one extension with the same URI in an OpenScop file or data structure. - - Extension writers may write a short documentation about their -extension to be added to this document. For consistency reason, this -documentation should comply to the documentation of the `comment' -option (*note Comment Extension::). To describe the file format, it is -allowed to reuse the existing rules and terminals present in the -OpenScop file format description without defining them (*note OpenScop -File Format Specification::). By sending a documentation, you accept it -to be added to this document. In particular, the sender fully accepts -the license and copyright notice. - -* Menu: - -* Comment Extension:: -* Arrays Extension:: -* Scatnames Extension:: -* Lines Extension:: -* Irregular Extension:: - - -File: openscop.info, Node: Comment Extension, Next: Arrays Extension, Up: Extensions - -3.4.1 Comment Extension ------------------------ - -*Description* - * URI: `comment'. - - * Author: Ce'dric Bastoul . - - * Purpose: the `comment' extension stores a textual string. - -*File Format* - -The `comment' extension file format respects the following grammar: - Comment_generic ::= "" Comment "" - Comment ::= _Text - -An example of textual `comment' extension is the following: - - This is a comment string. - - -*Data Structure* - -The `comment' extension data structure is the following: - struct osl_comment { - char * comment; /* Comment message as a 0-terminated string */ - }; - typedef struct osl_comment osl_comment_t; - typedef struct osl_comment * osl_comment_p; - - -File: openscop.info, Node: Scatnames Extension, Next: Lines Extension, Prev: Arrays Extension, Up: Extensions - -3.4.2 Scatnames Extension -------------------------- - -*Description* - * URI: `scatnames'. - - * Author: Ce'dric Bastoul . - - * Purpose: the `scatnames' extension provides a list of textual - scattering dimension names. - -*File Format* - -The `scatnames' extension file format respects the following grammar. -It reuses the `Strings' description (*note Strings Generic::): - Scatnames_generic ::= "" Scatnames "" - Scatnames ::= Strings - -The list of scattering dimension names is provided on one single line. -The names are separated with spaces. A possible example of such an -extension is the following: - - - # List of scattering dimension names: - beta_0 i beta_1 j beta_2 - - -*Data Structure* - -The `scatnames' extension data structure is the following: - - struct osl_scatnames { - osl_strings_p names; /* List of textual scattering dimension names. */ - }; - typedef struct osl_scatnames osl_scatnames_t; - typedef struct osl_scatnames * osl_scatnames_p; - -The order of the scattering dimension names in the list corresponds to -the order of the scattering dimensions. - - -File: openscop.info, Node: Arrays Extension, Next: Scatnames Extension, Prev: Comment Extension, Up: Extensions - -3.4.3 Arrays Extension ----------------------- - -*Description* - * URI: `arrays'. - - * Author: Ce'dric Bastoul . - - * Purpose: the `arrays' extension provides a set of textual array - names corresponding to the array identifiers used in the access - relations. - -*File Format* - -The `arrays' extension file format respects the following grammar: - Arrays_generic ::= "" Arrays "" - Arrays ::= Nb_items Item_list - Item_List ::= Item Item_list | (void) - Item ::= Identifier Name - Nb_items ::= _Integer - Identifier ::= _Integer - Name ::= _String - -The number of array names is provided on the first line, then each -following line contains a couple identifier-name. For instance, the -following example is a correct textual `arrays' extension. It -corresponds to the array names of the preliminary example (*note -Preliminary Example::): - - - # Number of array names: - 3 - 1 C # Identifier 1 corresponds to array name "C" - 3 B # Identifier 3 corresponds to array name "B" - 2 A # Identifier 2 corresponds to array name "A" - - -*Data Structure* - -The `arrays' extension data structure is the following: - - struct osl_arrays { - int nb_names; /* Number of names */ - int * id; /* Array of nb_names identifiers */ - char ** names; /* Array of nb_names names */ - }; - typedef struct osl_arrays osl_arrays_t; - typedef struct osl_arrays * osl_arrays_p; - -Each name has a name string and an identifier: the ith name has name -string `names[i]' and identifier `id[i]'. - - -File: openscop.info, Node: Lines Extension, Next: Irregular Extension, Prev: Scatnames Extension, Up: Extensions - -3.4.4 Lines Extension ---------------------- - - -File: openscop.info, Node: Irregular Extension, Prev: Lines Extension, Up: Extensions - -3.4.5 Irregular Extension -------------------------- - - -File: openscop.info, Node: History, Prev: Extensions, Up: OpenScop Specification - -3.5 History -=========== - -OpenScop is a follow-up of Louis-Noe"l Pouchet et al.'s ScopLib effort -which was itself based on Ce'dric Bastoul et al.'s Clan tool. People -involved in OpenScop's genesis are: - * Ce'dric Bastoul - - * Uday Bondhugula - - * Tobias Grosser - - * Louis-Noe"l Pouchet - - * Sven Verdoolaege - - -File: openscop.info, Node: OpenScop Library, Next: References, Prev: OpenScop Specification, Up: Top - -4 OpenScop Library -****************** - -The OpenScop Library, or OSL for short, is an example implementation of -the OpenScop specification. Its API is not part of the OpenScop -specification. It offers basic functionalities to manipulate the -OpenScop data structures (allocate, free, copy, dump, etc.) and file -format (read, print, etc.). The OpenScop Library is _not_ a polyhedral -library. OpenScop is an exchange format, and the OpenScop Library -reflects this. - - It is a Free Software using the 3-clause BSD License. Programmers -should feel free to use it or copy/paste its code in any project, Open -Source or not(1). - -* Menu: - -* Precision:: -* Base Functions:: -* Example of OpenScop Library Utilization:: -* Installation:: -* Documentation:: -* Development:: - - ---------- Footnotes ---------- - - (1) Closed source projects should consider to provide some OpenScop -file input and output, so they can be incorporated to any -OpenScop-based tool chain. - - -File: openscop.info, Node: Precision, Next: Base Functions, Up: OpenScop Library - -4.1 Precision -============= - -The OpenScop specification does not impose a specific type for the -constraint matrix elements. For a maximum flexibility, the OpenScop -Library offers an hybrid precision implementation. It supports 32 bits, -64 bits and multiple precision (relying on GNU GMP) relations -transparently. At relation allocation time, users have two ways to set -the precision. The first way is to call an allocation function with a -precision parameter. The second way is to rely on the environment -variable `OSL_PRECISION'. The accepted values for this variable are -`32' for 32 bits precision, `64' for 64 bits precision and `0' for -multiple precision. When this variable is set, its value becomes the -default precision for relation elements. For instance, to ensure the -OpenScop Library will use 64 bits precision by default, the user may -set: - export OSL_PRECISION=64 - if his shell is, e.g., bash or - setenv OSL_PRECISION 64 - if his shell is, e.g., tcsh. The user should ad this line to his -.bashrc or .tcshrc (or whatever convenient file) to make this setting -permanent. - - -File: openscop.info, Node: Base Functions, Next: Example of OpenScop Library Utilization, Prev: Precision, Up: OpenScop Library - -4.2 Base Functions -================== - -The OpenScop Library provides, for each OpenScop data structure, a set -of functions devoted to basic manipulation, conversion from file format -to data structures and from data structures to file format. The naming -convention is consistent for all data structures. Hence, the function -prototypes differ only with the name of the data structure. In the -following, we will use the generic term of _structure_ to refer at any -OpenScop data structure. For instance the `osl_'_structure_`_malloc()' -function is a generic name can be instantiated to -`osl_relation_malloc()' or `osl_statement_malloc()' etc. - - We present in this documentation only the main functions. Many other -utility functions are provided to ease OpenScop format manipulation. -The reader is invited to refer at the technical documentation to learn -everything about the OpenScop Library. - -* Menu: - -* Dumping:: -* Printing:: -* Reading:: -* Allocating:: -* Deallocating:: -* Cloning:: -* Testing:: - - -File: openscop.info, Node: Dumping, Next: Printing, Up: Base Functions - -4.2.1 Dumping: osl__structure__dump and idump ---------------------------------------------- - - void osl__structure__dump(FILE * output, osl__structure__p s); - void osl__structure__idump(FILE * output, osl__structure__p s, int i); - -Each OpenScop data structure has a dumping functions as shown above. -Dumping means writing down the content of the data structure pointed by -`s' (and its fields recursively) in a textual form to the `output' file -(the file, possibly `stdout', has to be open for writing). The textual -form is not the OpenScop file format but another representation closer -to the internal representation in memory and mainly intended for -debugging purpose. The `idump' function has an additional integer -parameter which corresponds to an indentation level. - - -File: openscop.info, Node: Printing, Next: Reading, Prev: Dumping, Up: Base Functions - -4.2.2 Printing: osl__structure__print -------------------------------------- - - void osl__structure__print(FILE * output, osl__structure__p s); - -Each OpenScop data structure has a pretty printing function as shown -above. It prints the content of the data structure pointed by `s' (and -its fields recursively) according to the OpenScop file format (*note -OpenScop File Format Specification::) to the `output' file (the file, -possibly `stdout', has to be open for writing). - - -File: openscop.info, Node: Reading, Next: Allocating, Prev: Printing, Up: Base Functions - -4.2.3 Reading: osl__structure__read ------------------------------------ - - osl__structure__p osl__structure__read(FILE * input); - -Each OpenScop data structure has a reading function as shown above. It -reads the content of an OpenScop data structure written according to -the OpenScop file format (*note OpenScop File Format Specification::) -from the `input' file (the file, possibly `stdin', has to be open for -reading). It returns a pointer to a freshly allocated -`osl__structure__t' structure containing the information. - - -File: openscop.info, Node: Allocating, Next: Deallocating, Prev: Reading, Up: Base Functions - -4.2.4 Allocating: osl__structure__malloc ----------------------------------------- - - osl__structure__p osl__structure__malloc(); - -Each OpenScop data structure has a memory allocation function as shown -above (except one see below). It allocates the memory to store the -corresponding data structure, it initializes the pointer fields to -`NULL' and the integer fields to `OSL_UNDEFINED' (`-1') and it returns -a pointer to the allocated space. - - An exception to this base description is the `osl_relation_malloc()' -function which requires two parameters: the number of rows and columns -of the constraint matrix (*note Relations::): - - osl_relation_p osl_relation_malloc(int nb_rows, int nb_columns); - -The precision of the relation elements will depend on the -`OSL_PRECISION' environment variable (*note Precision::) if it is set, -or the maximum available precision if it is not set. Another allocation -function is provided to explicitly set a given precision: - - osl_relation_p osl_relation_pmalloc(int precision, - int nb_rows, int nb_columns); - -The `precision' field may take the following values: - * `OSL_PRECISION_SP' for 32 bits precision, - - * `OSL_PRECISION_DP' for 64 bits precision, - - * `OSL_PRECISION_MP' for multiple precision, - - -File: openscop.info, Node: Deallocating, Next: Cloning, Prev: Allocating, Up: Base Functions - -4.2.5 Deallocating: osl__structure__free ----------------------------------------- - - void osl__structure__free(osl__structure__p s); - -Each OpenScop data structure has a memory deallocation function as -shown above. It recursively frees the memory allocated for the -structure pointed by `s', i.e., internal structures are also freed. - - -File: openscop.info, Node: Cloning, Next: Testing, Prev: Deallocating, Up: Base Functions - -4.2.6 Cloning: osl__structure__clone ------------------------------------- - - osl__structure__p osl__structure__clone(osl__structure__p s); - -Each OpenScop data structure has a clone function as shown above. It -recursively copies the content of the structure pointed by `s', i.e., -internal structures are also copied. It returns a pointer to the clone -of the structure pointed by `s'. - - -File: openscop.info, Node: Testing, Prev: Cloning, Up: Base Functions - -4.2.7 Testing: osl__structure__equal ------------------------------------- - - int osl__structure__equal(osl__structure__p s1, osl__structure__p s2); - -Each OpenScop data structure has a testing function as shown above. It -checks whether two pointers are referring to equivalent structures -(either by pointing to the same structure or to different structures -which contain the same information). It returns 1 if the pointed -structures are equivalent, 0 otherwise. This test is _content-based_ -and is intended for debugging purpose. It is not (and will never be) -able to state, e.g., that two relations with different constraint -matrices are actually representing the same relation. - - -File: openscop.info, Node: Example of OpenScop Library Utilization, Next: Installation, Prev: Base Functions, Up: OpenScop Library - -4.3 Example of OpenScop Library Utilization -=========================================== - -Here is a basic example showing how it is possible to use the OpenScop -Library, assuming that a standard installation has been done. The -following C program reads an OpenScop file from the standard input and -dumps the content of the data structures to the standard output. - - /* example.c */ - # include - # include - - int main() { - osl_scop_p scop; - - // Read the OpenScop file. - scop = osl_scop_read(stdin); - - // Dump the content of the scop data structure. - osl_scop_dump(stdout, scop); - - // Save the planet. - osl_scop_free(scop); - - return 0; - } - -The compilation command could be: - gcc example.c -losl -o example - A calling command with the input file test.scop could be: - more test.scop | ./example - - -File: openscop.info, Node: Installation, Next: Documentation, Prev: Example of OpenScop Library Utilization, Up: OpenScop Library - -4.4 Installation -================ - -* Menu: - -* License:: -* Requirements:: -* Installation Instructions:: -* Optional Features:: -* Uninstallation:: - - -File: openscop.info, Node: License, Next: Requirements, Up: Installation - -4.4.1 License -------------- - -First of all, it would be very kind to refer the present document in any -publication that results from the use of the OpenScop specification or -library, *note Bas11:: (a bibtex entry is provided behind the title -page of this manual, along with the copyright notice). The OpenScop -Library is provided under the 3-clause BSD license: - - Copyright (C) 2011 University Paris-Sud 11 and INRIA - - Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyrigh - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -File: openscop.info, Node: Requirements, Next: Installation Instructions, Prev: License, Up: Installation - -4.4.2 Requirements ------------------- - -The OpenScop Library is a stand-alone library. For a basic use, it does -not need any additional tool or library. Anyway, to be able to work in -conjunction with other tools that manipulate multiple precision -numbers, the GNU GMP library can be used as an option. - -* Menu: - -* GMP Library:: - - -File: openscop.info, Node: GMP Library, Up: Requirements - -4.4.2.1 GMP Library (optional) -.............................. - -To be able to deal with insanely large coefficient, the user will need -to install the GNU Multiple Precision Library (GMP for short) version -4.2.2 or above(1). The user can compile it by typing the following -commands on the GMP root directory: - - * `./configure' - - * `make' - - * And as root: `make install' - - The GMP default installation is `/usr/local'. This directory may not -be inside the user's library path. To fix the problem, the user should -set - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib - if your shell is, e.g., bash or - setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib - if your shell is, e.g., tcsh. Add the line to your .bashrc or -.tcshrc (or whatever convenient file) to make this change permanent. -Another solution is to ask GMP to install in the standard path by using -the prefix option of the configure script: `./configure --prefix=/usr'. - - The OpenScop Library has to be built using the GMP library by -specifying the convenient configure script options to buid the GMP -version (*note Optional Features::). - - ---------- Footnotes ---------- - - (1) `http://www.swox.com/gmp' - - -File: openscop.info, Node: Installation Instructions, Next: Optional Features, Prev: Requirements, Up: Installation - -4.4.3 Installation Instructions -------------------------------- - -Once downloaded and unpacked (e.g. using the `tar -zxvf -openscop-0.8.1.tar.gz' command), you can compile the OpenScop Library -by typing the following commands on the OpenScop Library's root -directory: - - * `./autogen.sh' - - * `./configure' - - * `make' - - * And as root: `make install' - - The program binaries and object files can be removed from the source -code directory by typing `make clean'. To also remove the files that -the `configure' script created (so you can compile the package for a -different kind of computer) type `make distclean'. - - -File: openscop.info, Node: Optional Features, Next: Uninstallation, Prev: Installation Instructions, Up: Installation - -4.4.4 Optional Features ------------------------ - -The `configure' shell script attempts to guess correct values for -various system-dependent variables and user options used during -compilation. It uses those values to create the `Makefile'. Various -user options are provided by the OpenScop Library's configure script. -They are summarized in the following list and may be printed by typing -`./configure --help' in the OpenScop Library top-level directory. - - * By default, the installation directory is `/usr/local': `make - install' will install the package's files in `/usr/local/bin', - `/usr/local/lib' and `/usr/local/include'. The user can specify - an installation prefix other than `/usr/local' by giving - `configure' the option `--prefix=PATH'. - - * By default, The OpenScop Library is built in 64bits version. If - the user gives to `configure' the option `--enable-int-version', - the 32bits version of the OpenScop Library will be compiled. In - the same way, the option `--enable-mp-version' has to be used to - build the multiple precision version. - - * By default, `configure' will look for the GMP library (necessary - to build the multiple precision version) in standard locations. If - necessary, the user can specify the GMP path by giving `configure' - the option `--with-gmp=PATH'. - - -File: openscop.info, Node: Uninstallation, Prev: Optional Features, Up: Installation - -4.4.5 Uninstallation --------------------- - -The user can easily remove the OpenScop Library from his system by -typing (as root if necessary) from the OpenScop Library top-level -directory `make uninstall'. - - -File: openscop.info, Node: Documentation, Next: Development, Prev: Installation, Up: OpenScop Library - -4.5 Documentation -================= - -The OpenScop Library distribution provides several sources of -documentation. First, the source code itself is as documented as much -as possible. The code comments use the Doxygen technical documentation -system. The user may install Doxygen(1) to automatically generate a -technical documentation by typing `make doc' or `doxygen -./autoconf/Doxyfile' at the OpenScop Library top-level directory after -running the configure script (*note Installation Instructions::). -Doxygen will generate documentation sources (in HTML, LaTeX and man) in -the `doc/source' directory of the OpenScop Library distribution. - - The Texinfo source of the present document is also provided in the -`doc' directory. The user can build it in either PDF format (by typing -`texi2pdf openscop.texi') or HTML format (by typing `makeinfo --html -openscop.texi', using `--no-split' option to generate a single HTML -file) or info format (by typing `makeinfo openscop.texi'). - - ---------- Footnotes ---------- - - (1) `http://www.stack.nl/~dimitri/doxygen' - - -File: openscop.info, Node: Development, Prev: Documentation, Up: OpenScop Library - -4.6 Development -=============== - -* Menu: - -* Copyright Issue:: -* Repository:: -* Coding Style:: -* Extension Development:: - - -File: openscop.info, Node: Copyright Issue, Next: Repository, Up: Development - -4.6.1 Copyright Issue ---------------------- - -The OpenScop Library is an Open Source project and you should feel free -to contribute by adding functionalities (in particular extensions), -correcting bugs or improving documentation. However, for painful -administrative reasons, the copyright of the core part (everything -except extensions) should not be impacted by your work. Hence, if you -are doing a significant contribution to the main part, the OpenScop -Library maintainer may ask you for an agreement about this copyright. -If you plan to do such a significant contribution, it may be wise to -discuss this issue with the maintainer first. Extensions may include -developer's own copyright. - - -File: openscop.info, Node: Repository, Next: Coding Style, Prev: Copyright Issue, Up: Development - -4.6.2 Repository ----------------- - -The main repository of the OpenScop Library is -`http://repo.or.cz/w/openscop.git'. Developers may ask the OpenScop -Library maintainer to open them a write access to this repository. Only -the maintainer should ever change the `master' branch. Developers -should work on their own branches. To avoid any problem developers -should use the _fork_ functionality of the repository. - - -File: openscop.info, Node: Coding Style, Next: Extension Development, Prev: Repository, Up: Development - -4.6.3 Coding Style ------------------- - -The OpenScop Library is written in C using an object oriented style. -Each important data structure (e.g., `struct foo') has its own header -file (`include/osl/foo.h') where lies the definition of the data -structure, the two typedefs for the data structure (one for the -structure, `osl_foo_t', and one for a pointer to the structure, -`osl_foo_p'), the prototypes of the various functions related to this -data structure, all named using the prefix "`osl_foo_'". The source -code of the functions is provided in a separated C file -(`source/foo.c'). - - Utility functions independent from the main data structures may be -placed in separate source files (e.g., definition in -`include/osl/util.h' and code in `source/util.c'). Tool-wide -preprocessor directives are placed in `include/osl/macros.h', macros -are prefixed with "`OSL_'". - - The core code itself has to be written according to the Google C++ -Coding Style: -`http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml' (for -what can apply to C), plus the naming conventions discussed above with -highest priority. The extension parts must only respect the naming -convention, but a consistent coding style is much appreciated. - - -File: openscop.info, Node: Extension Development, Prev: Coding Style, Up: Development - -4.6.4 Extension Development ---------------------------- - -It's fairly easy to integrate a new extension to OpenScop and the -OpenScop Library. Developing a new extension is very much like adding a -new "object": it requires writing a data structure for the extension -data and the 7 base functions to manage this extension. Here is how -developers should proceed to add an extension called `foo' (beware that -the naming convention is strict): - - 1. Send the name `foo' to the maintainer to ensure it is unique and - hence can be used as an URI. The name (one single word, - or words separated with underscores "_") should be suggested - by the extension developers to the OpenScop development - mailing list ). It - should not correspond to an existing structure name (see - `include/osl/osl.h' for the list). The maintainer will - update `include/osl/osl.h' in the development version - accordingly. - - 2. Look at the `comment' extension. The `comment' extension - (*note Comment Extension::) has been written to be used as a basic - example for extension developers. Having a look at - `include/osl/extensions/comment.h' and - `source/extensions/comment.c' will be a great help to do it right. - - 3. Create the extension data structure: it is necessary that the - extension data can be accessible through only one pointer. - - 4. Code the 7 base functions for the extension. Any extension must - provide this set of functions (naming convention apply only - if the extension is planed to be integrated to the OpenScop - Library default extensions): - * `osl_foo_idump' (*note Dumping::) - - * `osl_foo_sprint' has the following prototype: - char * osl__structure__sprint(osl__structure__p s); - It corresponds to the pretty printing functions of - the core data structures (*note Printing::) with - the difference that the OpenScop textual - representation is written to a string (returned by - the function) instead of a file. - - * `osl_foo_sread' has the following prototype: - osl__structure__p osl__structure__sread(char ** string); - It corresponds to the reading functions of the core - data structures (*note Reading::) with the - difference that the OpenScop textual representation is read - from a string (provided as a parameter) instead of a - file. The address of the string to read is passed - as a parameter and is updated to point immediately - after what has been actually read. - - * `osl_foo_malloc' (*note Allocating::) - - * `osl_foo_free' (*note Deallocating::) - - * `osl_foo_clone' (*note Cloning::) - - * `osl_foo_equal' (*note Testing::) - - 5. Code the other functions you need! - - Now let us consider two scenarios. - - First scenario, the extension is external and is not planned to be -integrated to the OpenScop Library. In this case you are all set. -Simply generate an `osl_interface_t' for your extension and have a look -at the function `osl_scop_register_extension()' which is devoted to -register a new extension interface to an existing `osl_scop_t'. - - Second scenario, the extension will integrate the set of default -OpenScop Library extensions (the best solution to share it to other -potential users). In this case, a few additional things have to be done: - 1. Create the extension header `include/osl/extensions/foo.h' - to store the extension structure and function prototypes and - the extension source file `source/extensions/foo.c' for the - code of the functions. - - 2. Add the documentation for the extension to the texinfo source of - this document (in `doc/openscop.texi'), following the example - of the `comment' documentation (*note Comment Extension::). - - 3. Integrate the extension by adding the `extensions/foo.c' entry - to the `libosl_la_SOURCES' in the `source/Makefile.am' - file, the `osl/foo.h' entry to the - `nobase_pkginclude_HEADERS' and add the corresponding - `#include ' in the `include/scop.h.in' - file. - - 4. Add the new extension in the - `osl_interface_get_default_registry()' function. - - 5. You are done! Prepare a single commit or patch corresponding to the - integration of the new extension and ask the maintainer to - merge it to the master branch. - - -File: openscop.info, Node: References, Prev: OpenScop Library, Up: Top - -5 References -************ - - * [Bas03a] C. Bastoul, P. Feautrier. Improving data locality by - chunking. CC'12 International Conference on Compiler Construction, - LNCS 2622, pages 320-335, Warsaw, April 2003. - - * [Bas11] C. Bastoul. OpenScop: A Specification and a Library for - Data Exchange in Polyhedral Compilation Tools. Technical Report, - Paris-Sud University, France, June 2011. - - * [Fea92] P. Feautrier. Some efficient solutions to the affine - scheduling problem, part II: multidimensional time. International - Journal of Parallel Programming, 21(6):389-420, December 1992. - - * [Gri04] M. Griebl. Automatic parallelization of loop programs for - distributed memory architectures. Habilitation Thesis. Faculta"t - fu"r Mathematik und Informatik, Universita"t Passau, 2004. - _http://www.infosun.fmi.uni-passau.de/cl/loopo/_ - - * [Wil93] Doran K. Wilde. A library for doing polyhedral operations. - Technical Report 785, IRISA, Rennes, France, 1993. - - - - -Tag Table: -Node: Top1290 -Node: Introduction2709 -Node: Polyhedral Representation6664 -Node: Motivation8062 -Node: Thinking in Polyhedra11844 -Node: Iteration Domain14040 -Node: Scattering Function19422 -Ref: Scattering Function-Footnote-131896 -Node: Access Function31927 -Node: What's Next?33977 -Node: OpenScop Specification34887 -Node: Preliminary Example36041 -Ref: Preliminary Example-Footnote-142380 -Node: OpenScop File Format Specification42435 -Node: Relations46426 -Node: Iteration Domain Relation49447 -Node: Context Domain Relation52486 -Node: Scattering Relation53026 -Node: Access Relation54164 -Node: Generics56186 -Node: Strings Generic57335 -Node: Body Generic57983 -Node: OpenScop Data Structure Specification59038 -Node: osl_relation_t60806 -Node: osl_relation_list_t62867 -Node: osl_interface_t63571 -Node: osl_generic_t65352 -Node: osl_strings_t66270 -Node: osl_body_t66823 -Node: osl_statement_t67554 -Node: osl_scop_t69077 -Node: Extensions76326 -Node: Comment Extension78627 -Node: Scatnames Extension79508 -Node: Arrays Extension80817 -Node: Lines Extension82630 -Node: Irregular Extension82795 -Node: History82940 -Node: OpenScop Library83342 -Ref: OpenScop Library-Footnote-184248 -Node: Precision84405 -Node: Base Functions85588 -Node: Dumping86718 -Node: Printing87573 -Node: Reading88141 -Node: Allocating88763 -Node: Deallocating90154 -Node: Cloning90590 -Node: Testing91075 -Node: Example of OpenScop Library Utilization91834 -Node: Installation92861 -Node: License93143 -Node: Requirements95030 -Node: GMP Library95471 -Ref: GMP Library-Footnote-196696 -Node: Installation Instructions96730 -Node: Optional Features97470 -Node: Uninstallation98937 -Node: Documentation99233 -Ref: Documentation-Footnote-1100359 -Node: Development100406 -Node: Copyright Issue100615 -Node: Repository101390 -Node: Coding Style101906 -Node: Extension Development103239 -Node: References107964 -Ref: Bas03a108073 -Ref: Bas11108264 -Ref: Fea92108451 -Ref: Gri04108658 -Ref: Wil93108918 - -End Tag Table diff --git a/cloog-0.17.0/osl/doc/openscop.pdf b/cloog-0.17.0/osl/doc/openscop.pdf deleted file mode 100644 index 2bac7d5f110a644bceac5527176dabbd19f0ed43..0000000000000000000000000000000000000000 Binary files a/cloog-0.17.0/osl/doc/openscop.pdf and /dev/null differ diff --git a/cloog-0.17.0/osl/doc/openscop.texi b/cloog-0.17.0/osl/doc/openscop.texi deleted file mode 100644 index c7969dadaccc7d00ea82d417ee8699881e3b1965..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/doc/openscop.texi +++ /dev/null @@ -1,3257 +0,0 @@ -\input texinfo -@c % -@c % /**-----------------------------------------------------------------** -@c % ** OpenScop Library ** -@c % **-----------------------------------------------------------------** -@c % ** openscop.texi ** -@c % **-----------------------------------------------------------------** -@c % ** First version: september 10th 2006 ** -@c % **-----------------------------------------------------------------**/ -@c % -@c % release 0.0: May 4th 2008 -@c % - -@c % /************************************************************************* -@c % * PART I: HEADER * -@c % *************************************************************************/ -@c %**start of header -@setfilename openscop.info -@settitle OpenScop Specification and Library - -@set EDITION 1.0 -@set SPEC_VERSION 1.0 -@set LIB_VERSION 0.8.1 -@set UPDATED December 2nd 2011 -@setchapternewpage odd - -@c % This is to ask for A4 instead of Letter size document. -@iftex - @afourpaper -@end iftex - -@c %**end of header - -@c % /************************************************************************ -@c % * PART II: SUMMARY DESCRIPTION AND COPYRIGHT * -@c % ************************************************************************/ - -@copying -This document describes OpenScop, a specification of a file format and a set -of data structures for polyhedral compilation tools to talk -together. It also describes briefly the OpenScop Library version @value{LIB_VERSION}, -a Free Software that provides an example of OpenScop implementation. - -It would be quite kind to refer at the present document in any publication that -results from the use of the OpenScop Library: - -@example -@@TechReport@{Bas11, -@ @ author =@ @ @ @ @ @ @{C\'edric Bastoul@}, -@ @ title =@ @ @ @ @ @ @ @{OpenScop: A Specification and a Library for Data -@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ Exchange in Polyhedral Compilation Tools@}, -@ @ month =@ @ @ @ @ @ @ @{September@}, -@ @ year =@ @ @ @ @ @ @ @ 2011, -@ @ institution = @{Paris-Sud University, France@} -@} -@end example - -Copyright @copyright{} 2011 Paris-Sud University and INRIA. - -@c quotation -Permission is granted to copy, distribute and/or modify this document under -the terms of the GNU Free Documentation License, Version 1.2 published by the -Free Software Foundation; with no Invariant Sections, with no Front-Cover -Texts, and with no Back-Cover Texts. To receive a copy of the -GNU Free Documentation License, write to the Free Software Foundation, Inc., -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -@c end quotation -@end copying - -@c % /************************************************************************* -@c % * PART III: TITLEPAGE, CONTENTS, COPYRIGHT * -@c % *************************************************************************/ -@titlepage -@title OpenScop -@subtitle A Specification and a Library for Data Exchange in Polyhedral Compilation Tools -@subtitle Edition @value{EDITION}, for OpenScop Specification @value{SPEC_VERSION} and OpenScop Library @value{LIB_VERSION} -@subtitle @value{UPDATED} -@author C@'edric Bastoul - -@c The following two commands start the copyright page. -@page -@vskip 0pt plus 1filll -@insertcopying -@end titlepage - -@c Output the table of contents at the beginning. -@contents - -@c % /************************************************************************* -@c % * PART IV: TOP NODE AND MASTER MENU * -@c % *************************************************************************/ -@ifnottex -@node Top -@top OpenSCop - -@insertcopying -@end ifnottex - -@menu -* Introduction:: -* Polyhedral Representation:: -* OpenScop Specification:: -* OpenScop Library:: -* References:: -@end menu - -@c % /************************************************************************* -@c % * PART V: BODY OF THE DOCUMENT * -@c % *************************************************************************/ - -@c % ****************************** INTRODUCTION ****************************** -@node Introduction -@chapter Introduction -OpenScop is an open specification that defines a file format and a set of -data structures to represent a @emph{static control part} (SCoP for short), -i.e., a program part that can be represented in the @emph{polyhedral model}. -The goal of OpenScop is to provide a common interface to various -polyhedral compilation tools in order to simplify their interaction. - -Designing a single format for tools that have different purposes -(e.g., as different as code generation and data dependence analysis) may -sound strange at first. However we could observe that most available -polyhedral compilation tools during the last decade were manipulating -more or less the same kind of data (polyhedra, affine functions...) and -were actually sharing a part of their input (e.g., iteration domains and -context concepts are nearly everywhere). We could also observe that -those tools may rely on different internal representations, mostly based on -one of the major polyhedral libraries (e.g., Polylib, PPL or isl), and -this representation may change over time (e.g., when switching to a -more convenient polyhedral library). -The OpenScop aim is to provide a stable, unified format that offers a -durable guarantee that a tool can use an output or provide an input to -another tool without breaking a tool chain because of some internal -changes in one element of the chain. The other promise of OpenScop is -the ability to assemble or replace the basic blocks of a polyhedral -compilation framework at no, or at least low engineering cost. - -The policy that drives OpenScop can be summarized by these three rules: -@itemize @bullet -@item Embed the @emph{minimum} information to build a complete polyhedral - compilation framework in the so-called @emph{core part} - (to avoid as much as possible empty or useless information - for each tool). -@item Provide a @emph{very stable} core part (so users have some - guarantee that they will not need to update their tool - because of frequent specification evolution), -@item Provide a @emph{very flexible} extension part (so it can also - be used to test wild new ideas). -@end itemize - -@noindent Another, more technical, rule may be added: -@itemize @bullet -@item Avoid any need for external library or tool to support it - (i.e., it's not XML or YAML or anything like that). -@end itemize - -The success of OpenScop in meeting its goals totally depends on its -acceptance by the tool developers (that have to support it in their tools). -To help them, we provide an example implementation: the OpenScop Library. -This library (and in particular its API) is not part of the OpenScop -specification (which includes only the file format and the set of data -structures). It is licensed under the 3-clause BSD license so developers may -feel free to use it in their code (either by linking it or copy-pasting its -code). This document also describes this library briefly (readers are -invited to read at its technical documentation). -The current version of the OpenScop Library is still under evaluation, -and there is no guarantee that the upward compatibility will be respected, -even if we do think so. A lot of reports are -necessary to freeze the library API. Thus you are very welcome and -encouraged to send reports on bugs, wishes, critics, comments, suggestions -or (please!) successful experiences to the OpenScop mailing list -@email{openscop-development@@googlegroups.com}. - -This document is organized as follows. First, we provide some -background on the polyhedral model and how it is used to represent and to -manipulate programs (@pxref{Polyhedral Representation}). Next, -we describe the OpenScop specification, from the file format -(@pxref{OpenScop File Format Specification}) to the data structures -and the OpenScop Library API -(@pxref{OpenScop Data Structure Specification}). -Finally we will detail how to install the OpenScop Library -(@pxref{Installation}). - - -@c % ******************* POLYHEDRAL REPRESENTATION OF PROGRAMS **************** -@node Polyhedral Representation -@chapter Polyhedral Representation of Programs -If you are reading at the OpenScop documentation, you probably don't need any -explanation about the polyhedral model. It is unlikely that someone will read -this paper by mistake. However some vicious advisor may ask their poor -engineers/interns/students -to work for the very first time on this exciting topic. Most papers on -polyhedral compilation are hard to read. Despite my efforts, -mine are no exception according to some reviewers. Hence I give there a new -try to provide a comprehensive explanation of the polyhedral model without the -size and style limits of a classical research paper. - -Be aware that to be able to understand the polyhedral model, there are a few -prerequisites. You should not read the following while you still ignore -what is: -@itemize @bullet -@item a @code{for} loop construction in C programs (@code{do} loops in FORTRAN are OK too!), -@item an @emph{affine expression}, -@item a @emph{vector}, -@item a @emph{matrix}, -@item a @emph{matrix-vector multiply}. -@end itemize -If you do not know those concepts, please do some search and come back -afterwards. And if you are courageous enough, send me a few lines that -describe them so I can insert them here! - -@menu -* Motivation:: -* Thinking in Polyhedra:: -* What's Next?:: -@end menu - - -@node Motivation -@section Motivation: Program Transformations - -A direct translation of high level programs written, e.g., in C, to assembly -then to object code is likely to produce (very) inefficient applications. -Architectures are -quite complex, including several levels of cache memory, many cores, deep -pipelines, various number of functional units, of registers etc. -The list of such -"architectural features" is growing with each new generation of processors. -To achieve the best performance, the object program must use -these features in a smart way. -Programmers use high level languages for productivity and portability: -typically they do not have to take care of the target architecture but -to ensure they write programs which produce the right output. Hence, -the problem of mapping the program to the target architecture in the most -efficient way is left to the compiler. - -The compiler may see a high level program as a specification -@emph{of an output}. The program is a list of instructions to be executed to -produce the output. As long as the output is guaranteed to be as the -programmer specified in his code, the compiler is free to modify -the program. -For instance, let us imagine we are working on an architecture with only -three registers and we consider the following statements written by -a programmer: - -@example -@group -x = a + b; -y = c + d; -z = a * b; -@end group -@end example - -It is easy to see that we can reorder the three statements in any way without -modifying the semantics (no statement reads or writes a variable that another -statement writes). Because of the lack of registers, the solutions such that -the first and the third statements are one after the other are better -because @code{a} and @code{b} will be put in the processor registers by -one statement and can be reused directly by the other one -without reading from memory (this is called a @emph{data locality -improving} transformation). Hence a better statement order is, e.g.: - -@example -@group -x = a + b; -z = a * b; // a and b are still in processor registers -y = c + d; -@end group -@end example - -We can also notice that it is possible to run the three statements in -parallel (possibly on different processors). The programmer may -explicit this in a way the compiler -and/or the architecture is able to understand. For instance, -we can use OpenMP to describe parallelism -(this is called a @emph{parallelizing} transformation): - -@example -@group -#pragma omp parallel sections -@{ - #pragma omp section - @{ - x = a + b; - @} - #pragma omp section - @{ - y = c + d; - @} - #pragma omp section - @{ - z = a * b; - @} -@} -@end group -@end example - -However, the right way to optimize this program is probably a tradeoff -between these two techniques. This is true if, e.g., the target -architecture has some limitations to run too many operations in parallel, -or, like in our case, when some data may be reused by some processors. -Hence, the best optimization for our small example is probably the -following: - -@example -@group -#pragma omp parallel sections -@{ - #pragma omp section - @{ - x = a + b; - z = a * b; - @} - #pragma omp section - @{ - y = c + d; - @} -@} -@end group -@end example - -This example is quite trivial because the statements are -executed only once. The real sport begins when we have to deal with loops, -as we will see momentarily. However, polyhedral compilation framework users -have to be conscious that we @emph{need} to transform programs to achieve -the best performance and that the best transformation that has to be -discovered (at the price of many, many efforts) and performed may be -quite complex. Hence the need of powerful model and tools. - - -@node Thinking in Polyhedra -@section Thinking in Polyhedra - - -Since the very first compilers, the internal representation of programs -is the @emph{Abstract Syntax Tree}, or AST. In such representation, -each statement appears only once even if it is executed many times (e.g., -when it is enclosed inside a loop). This is a limitation -for finding and applying complex transformations: -@itemize @bullet -@item It limits program analysis power. For instance if a statement - @emph{depends} on another statement (i.e., they access the same - memory location and at least one of these accesses is a write), - we will consider both statements as unique entities while the - dependence relation may involve only few statement executions. -@item It limits program transformation power. Loop transformations - operate on statement executions. For instance, because they - consider all statement executions at the same time, present day - production compilers are not able to achieve loop fusion - (that tries to merge the loop bodies of two loops) if the loop bounds - of the two loops do not match (yes, that's ridiculous). -@item It limits program manipulation flexibility. - Trees are very rigid data structures that are not easy to manipulate. - Program transformation may require very complex transformations that will - imply deep modifications of the control flow. -@end itemize - -The Polyhedral Model is a convenient alternative representation which -combines analysis power, expressiveness and high flexibility. The drawback -is it breaks the classical structure of programs that every programmer -is familiar with. It requires some (real) efforts -to be smoothly manipulated, but it definitely worth it. It is based on three -main concepts, @emph{iteration domain}, @emph{scattering function} and -@emph{access function} that are described in depth in the -following sections. - -A program part that can be represented using the Polyhedral Model is called -a @strong{Static Control Part} or @strong{SCoP} for short. - -@menu -* Iteration Domain:: -* Scattering Function:: -* Access Function:: -@end menu - -@node Iteration Domain -@subsection Iteration Domain - -The key aspect of the polyhedral model is to consider @emph{statement -instances}. A statement instance is @emph{one} execution of a statement. -A statement -outside a loop has only one instance while those inside loops may have many. -Let us consider the following code with two statements @code{S1} -and @code{S2}: - -@example -@group -pi = 3.14; // S1 -for (i = 0; i < 5; i++) - A[i] = pi; // S2 -@end group -@end example - -The list of statement instances is the following (we just have to fully -unroll the loop): - -@example -@group -pi = 3.14; -A[0] = pi; -A[1] = pi; -A[2] = pi; -A[3] = pi; -A[4] = pi; -@end group -@end example - -Each instance of a statement which is enclosed inside a loop may be referred -thanks to its outer loop counters (or @emph{iterators}). In the polyhedral -model we consider statements as functions of the outer loop counters that may -produce statement instances: -instead of simply "@code{S2}", we use preferably the notation @code{S2(i)}. -For instance we denote the statement instance @code{A[3] = pi;} of the -previous example as @code{S2(3)}. This means @emph{instance of -statement @code{S2} for} @code{i = 3}. -If a statement @code{S3} is enclosed inside two loops of iterators @code{i} -(outermost loop) and @code{j} (innermost loop), we would denote it -@code{S3(i,j)}, and so on with more enclosing loops. - -The ordered list -of iterators (ordered from the outermost iterator to the innermost iterator) -is called the @strong{iteration vector}. For instance the iteration vector for -@code{S3} is @code{(i,j)}, for @code{S2} it is @code{(i)}, and for @code{S1} -it is empty since it has no enclosing loop: @code{()}. A more precise reading -at the notation @code{S2(3)} would show that it denotes the instance of -statement @code{S2} for the iteration vector @code{(2)}. - -Obviously, dealing with statement instances does not mean we have to unroll all -loops. First because there would be probably too many instances to deal with, -and second because we probably just do not know how many instances there are. -For instance in the following loop it is impossible to know (at compile time) -how many times the statement @code{S3} will be executed: - -@example -@group -for (i = 2; i <= N; i++) - for (j = 2; j <= N; j++) - A[i] = pi; // S3 -@end group -@end example - -@noindent Such a loop is said to be @emph{parametric}: it depends on -(at least) a value called a @emph{parameter} which is not modified -during the execution of the whole loop, but is unknown at compile time. -Here, the only parameter is @code{N}. - -A compact way to represent all the instances of a given statement -is to consider the set of all possible values of its iteration vector. -This set is called the @strong{iteration domain}. It can be conveniently -described thanks to all the constraints on the various iterators the statement -depends on. For instance, let us consider -the statement @code{S3} of the previous program. The iteration domain is the set -of iteration vectors @code{(i,j)}. Because of the parameter, we are not able to -achieve a precise list of all possible values. It would look like this: - -@example -@group -(2,2) (2,3) (2,4) ... (2,N) -(3,2) (3,3) (3,4) ... (3,N) -... ... ... ... ... -(N,2) (N,3) (N,4) ... (N,N) -@end group -@end example - -@noindent A better way is to say it is the set -of iteration vectors @code{(i,j)} such that @code{i} is an integer greater or -equal than 2 and lower or equal than @code{N}, and @code{j} is an integer -greater or equal than 2 and lower or equal than @code{N}. This may be written -in the following mathematical form: - -@tex -$$D _{S3} = \{(i,j) \in Z^2 \; | \; 2 \leq i \leq N \land 2 \leq j \leq N \}$$ -@end tex - -@ifnottex -@example -@group -D_S3 = @{(i,j) in Z^2 | 2 <= i <= N && 2 <= j <= N @} -@end group -@end example -@end ifnottex - -@noindent It is easy to see that this iteration domain is a part of the -2-dimensional space -@tex -$Z^2$. -@end tex -@ifnottex -@example -@group -Z^2. -@end group -@end example -@end ifnottex -We often use in our research papers a graphical representation that gives a -better view of this subspace: - -@image{images/basic1,4cm} - -@noindent Here, the iteration domain is specified thanks to a set of -constraints. When those constraints are affine and -depend only on the outer loop counters and some parameters, the set of -constraints defines a @emph{polyhedron} (more precisely this is a -@emph{Z-polyhedron}, but we use @emph{polyhedron} for short). -Hence the @emph{polyhedral model}! - -To manipulate a set of affine constraints easily, we rely on a matrix -representation. To write it, we use the @emph{homogeneous} iteration vector: -it is simply the iteration vector with some additional dimensions to -represent the parameters and the constant. -For instance for the statement @code{S3}, the -iteration vector in homogeneous coordinates is @code{(i, j, N, 1)} -(we will now call it @emph{iteration vector} directly for short). -Then we write all the constraints as affine inequalities of the form -@emph{affine constraint} -@tex -$\geq 0$. -@end tex -@ifnottex -@code{ >= 0}. -@end ifnottex -For instance for the statement @code{S3} the set of constraints is: - -@tex -$$ -\hbox{$ \cases{ i - 2 &$\geq 0$\cr - -i + N &$\geq 0$\cr - j - 2 &$\geq 0$\cr - -j + N &$\geq 0$}$} -$$ -@end tex - -@ifnottex -@example -@group - i - 2 >= 0 - -i + N >= 0 - j - 2 >= 0 - -j + N >= 0 -@end group -@end example -@end ifnottex - -@noindent Lastly, we translate the constraint system to the form -@strong{domain matrix}@code{ * }@emph{iteration vector}@code{ >= 0}: - -@c Thanks to Harald Devos for the TeX :-) ! -@tex -$$ -\left[ -\matrix{ - 1 & 0 & 0 & -2 \cr --1 & 0 & 1 & 0 \cr - 0 & 1 & 0 & -2 \cr - 0 & -1 & 1 & 0 - } -\right] -\left( -\matrix{ -i \cr -j \cr -N \cr -1 - } -\right) -\ge -\left( -\matrix{ -0 \cr -0 \cr -0 \cr -0 -} -\right) -$$ -@end tex -@ifnottex -@example -@group -[ 1 0 0 -2 ] [ i ] [ 0 ] -[ -1 0 1 0 ] [ j ] [ 0 ] -[ 0 1 0 -2 ] * [ N ] >= [ 0 ] -[ 0 -1 1 0 ] [ 1 ] [ 0 ] -@end group -@end example -@end ifnottex - -@noindent @strong{The domain matrix will be used in all our tools to provide the -information on the iteration domain of a given statement (the iteration vector -is in general an implicit information).} - -@node Scattering Function -@subsection Scattering Function - -There is no ordering information inside the iteration domain: it only describes -the set of statement instances but @strong{not} the order in which they have -to be executed relatively to each other. In the past the lexicographic order -of the iteration domain was considered, this is no more true -(especially when using CLooG). If we do not provide any ordering information, this -means that the statement instances may be executed in any order -(this is useful, e.g., to specify parallelism). However, some statement instances -may depend on some others and it may be critical to enforce a given order (or -non-order). Hence we need another information. - -We call @emph{scattering} any kind of ordering information in the polyhedral -model. There exists many kind of ordering, such as @emph{allocation}, -@emph{scheduling}, @emph{chunking} etc. They are all expressed -in the same way, i.e., using @emph{logical stamps}, but they may have -different semantics. - -In the case of @strong{scheduling}, the logical stamps are logical dates that -express at which date a statement instance has to be executed. For instance, -let us consider the following three statements: - -@example -@group -x = a + b; // S1 -y = c + d; // S2 -z = a * b; // S3 -@end group -@end example - -@noindent The scheduling of a statement @code{S} is typically -denoted by -@tex -$\theta_{S}$. -@end tex -@ifnottex -T_S. -@end ifnottex -Let us consider the following logical dates for each statement: - -@tex -@example -@group -$\theta_{S1} = 2$ -$\theta_{S2} = 3$ -$\theta_{S3} = 1$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -T_S1 = 1 -T_S2 = 2 -T_S3 = 3 -@end group -@end example -@end ifnottex - -@noindent It means that statement @code{S3} has to be executed at logical date -@code{1}, statement @code{S1} has to be executed at logical date -@code{2} and statement @code{S2} has to be executed at logical date -@code{3}. The target code has to respect this scheduling (the order of -the logical dates), hence it would look like the following where the -variable @code{t} denotes the time: - -@example -@group -t = 1; -z = a * b; // S3 -t = 2; -x = a + b; // S1 -t = 3; -y = c + d; // S2 -@end group -@end example - -@noindent When some statements share the same logical date, this means that, -once the program reaches this logical date, the two statements can be executed -in any order, or better, in parallel. For instance let us consider the -following scheduling: - -@tex -@example -@group -$\theta_{S1} = 1$ -$\theta_{S2} = 2$ -$\theta_{S3} = 1$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -T_S1 = 1 -T_S2 = 2 -T_S3 = 1 -@end group -@end example -@end ifnottex - -@noindent Statements @code{S1} and @code{S3} have the same logical date, -moreover, @code{S2} has a greater logical date than @code{S1} and @code{S3}. -Hence the target code would be: - -@example -@group -t = 1; -#pragma omp parallel sections -@{ - #pragma omp section - @{ - x = a + b; // S1 - @} - #pragma omp section - @{ - z = a * b; // S3 - @} -@} -t = 2; -y = c + d; // S2 -@end group -@end example - -Logical dates may be multidimensional, as clocks: the first dimension -may correspond to days (most significant), the next one to hours (less -significant), the third to minutes and so on. For instance we can consider -the following multidimensional schedules for our example: - -@tex -@example -@group -$\theta_{S1} = (1,1)$ -$\theta_{S2} = (2,1)$ -$\theta_{S3} = (1,2)$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -T_S1 = (1,1) -T_S2 = (2,1) -T_S3 = (1,2) -@end group -@end example -@end ifnottex - -@noindent It is not very hard to decypher the meaning of such scheduling. -Because of the first dimension, statements @code{S1} and @code{S3} will be -executed before statement @code{S2} (@code{S1} and @code{S3} are executed at -day 1, while @code{S2} is executed at day 2). The second dimension is not -really useful there for @code{S2} because it is the only statement executed -at day 2. Nevertheless it allows to order @code{S1} and -@code{S3} relatively to each other since @code{S1} is executed at hour 1 of day -1 while @code{S3} is executed at hour 2 of day 1. -The corresponding target code is the following, with some -additional time variables for a better view of the ordering (@code{t1} -corresponds to the first time dimension, @code{t2} to the second one): - -@example -@group -t1 = 1; -t2 = 1; -x = a + b; // S1 -t2 = 2; -z = a * b; // S3 -t1 = 2; -t2 = 1; -y = c + d; // S2 -@end group -@end example - -In the case of @strong{allocation} (in the literature we can find some -papers calling it @emph{placement}), the logical stamp is a processor -number expressing on which processor a statement instance has to be -executed. Typically, allocations are written in the same way as scheduling. -Here, we denote it @math{P_S} for a statement @code{S}. -For instance, let us consider the following allocation: - -@tex -@example -@group -$P_{S1} = 1$ -$P_{S2} = 2$ -$P_{S3} = 1$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -P_S1 = 1 -P_S2 = 2 -P_S3 = 1 -@end group -@end example -@end ifnottex - -@noindent The corresponding target code has to take into account that both -statements @code{S1} and @code{S3} have to be executed on the same processor -(they have the same logical number 1) and that statement @code{S2} has -to be executed on another processor (logical number 2). A possible target code -is the following: - -@example -@group -#pragma omp parallel sections -@{ - #pragma omp section - @{ - // Logical processor 1 - x = a + b; // S1 - z = a * b; // S3 - @} - #pragma omp section - @{ - // Logical processor 2 - y = c + d; // S2 - @} -@} -@end group -@end example - -@noindent We can note that no order has been specified for the -statements @code{S1} and @code{S3} that are executed on the same processor. -Hence any order is satisfying. For sake of flexibility, it is usual to build -a scattering whose various dimensions do not have the same semantics. A -typical construction is @emph{space/time mapping} where the first @code{n} -dimensions are devoted to allocation, then the last @code{m} -dimensions are devoted to scheduling. Typically, space/time mapping is -written in the same way as scheduling. -Here we denote it @math{M_S} for a statement @code{S}. -For instance, let us consider the following space/time mapping for our -example where one dimension is devoted to mapping and one dimension is -devoted to scheduling: - -@tex -@example -@group -$M_{S1} = (1,2)$ -$M_{S2} = (2,1)$ -$M_{S3} = (1,1)$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -M_S1 = (1,2) -M_S2 = (2,1) -M_S3 = (1,1) -@end group -@end example -@end ifnottex - -@noindent Here we have the same first dimension as the previous example, thus -the allocation of the statements to processors is the same. The second -dimension precises on a given processor at which logical date a statement -instance has to be executed. Here, the statement @code{S1} is executed at -day 2 on processor 1 while the statement @code{S3} is executed at day 1 onto -the same processor. It follows this space/time mapping corresponds to the -following target code (we added an additional variable to represent the -local logical clocks): - -@example -@group -#pragma omp parallel sections -@{ - #pragma omp section - @{ - // Logical processor 1 - t = 1; - z = a * b; // S3 - t = 2; - x = a + b; // S1 - @} - #pragma omp section - @{ - // Logical processor 2 - t = 1; - y = c + d; // S2 - @} -@} -@end group -@end example - -For the same reason as discussed for iteration domains -(@pxref{Iteration Domain}), it is not possible to define a scattering for -each statement instance, especially if the statement belongs to a -(possibly parametric) loop. The iteration vector fully defines an -instance of a given statement. Thus, a practical way to provide a scattering -for each instance of a given statement is to use a @emph{function} -that depends on the iteration vector. In this way the function may associate -to each iteration vector a different scattering. We call these functions -@strong{scattering functions}. Scattering functions are @emph{affine} -functions of the outer loop counter and the global parameters. -For instance, let us consider the following source code: - -@example -@group -for (i = 2; i <= 4; i++) - for (j = 2; j <= 4; j++) - P[i+j] += A[i] + B[j]; // S4 -@end group -@end example - -@noindent The iteration domain of the statement @code{S4} is: - - -@tex -$$D _{S4} = \{(i,j) \in Z^2 \; | \; 2 \leq i \leq 4 \land 2 \leq j \leq 4 \}.$$ -@end tex -@ifnottex -@example -@group -D_S4= @{(i,j) in Z^2 | 2 <= i <= 4 && 2 <= j <= 4 @}. -@end group -@end example -@end ifnottex - -@noindent If you are still not comfortable with the mathematical notation, it -corresponds to the following graphical representation: - -@image{images/basic2,3cm} - -@noindent The list of the statement instances of @code{S4} (the integer -points of its iteration domain) corresponds to the following iteration vectors: - -@example -@group -iteration vector - (2,2) - (2,3) - (2,4) - (3,2) - (3,3) - (3,4) - (4,2) - (4,3) - (4,4) -@end group -@end example - -@noindent Let us suppose we want to schedule the instances of the statement -@code{S4} (the integer points of its iteration domain) using the following -scheduling function: - -@tex -@example -@group -$\theta_{S4}(i, j) = (j+2, 3*i+j)$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -T_S4(i,j) = (j+2,3*i+j) -@end group -@end example -@end ifnottex - -@noindent We only need to apply the function to each iteration vector to find -the logical date of each instance: - -@example -@group -iteration vector logical date - (2,2) --> (4,8) - (2,3) --> (5,9) - (2,4) --> (6,10) - (3,2) --> (4,11) - (3,3) --> (5,12) - (3,4) --> (6,13) - (4,2) --> (4,14) - (4,3) --> (5,15) - (4,4) --> (6,16) -@end group -@end example - -The polyhedral model users do not have to take care about the generation of a -target code that respects the scattering: the -CLooG@footnote{@url{http://www.cloog.org}} tool is there to -solve the problem quite easily. For the previous -example, the target code would be the following (@code{t1} and @code{t2} -correspond to the two dimensions of the logical date, the reader may -take care that this code actually implements the scattering function): - -@example -@group -for (t1 = 4; t1 <= 6; t1++) @{ - for (t2 = t1+4; t2 <= t1+10; t2++) @{ - if ((-t1+t2+2)%3 == 0) @{ - i = (-t1+t2+2)/3 ; - j = t1-2 ; - P[i+j] += A[i] + B[j]; // S4 - @} - @} -@} -@end group -@end example - - - -Obviously with such a twisted scheduling, it is hard to see the "meaning" -of the transformation. To name any kind of program transformation as -a magic spell ("tile", "fuse", "skew"...) is an old bad habit which is not -relevant anymore in the polyhedral model: a scheduling may be an arbitrary -complex sequence of basic-old-good transformations. Nevertheless it is most -of the time quite easy to translate well known transformations to schedules. -For instance, let us consider this new scheduling function: - -@tex -@example -@group -$\theta_{S4}(i,j) = (j,i)$ -@end group -@end example -@end tex - -@ifnottex -@example -@group -T_S4(i,j) = (j,i) -@end group -@end example -@end ifnottex - -@noindent Using CLooG, we can generate the target code: - -@example -@group -for (t1 = 2; t1 <= 4; t1++) @{ - for (t2 = 2; t2 <= 4; t2++) @{ - i = t2; - j = t1; - P[i+j] += A[i] + B[j]; // S4 - @} -@} -@end group -@end example - - -@noindent It is easy to see (and analyze) that it corresponds to a classical -@emph{loop interchange} transformation. - -A very useful example of multi-dimensional scattering functions is -the @strong{scheduling of the original program}. -The method to compute it is quite simple (@pxref{Fea92}). The idea is to -build an abstract syntax tree of the program and to read the scheduling for -each statement. For instance, let us consider the following implementation of -a Cholesky factorization: - -@example -@group -/* A Cholesky factorization kernel. */ -for (i=1;i<=N;i++) @{ - for (j=1;j<=i-1;j++) @{ - a[i][i] -= a[i][j] ; // S1 - @} - a[i][i] = sqrt(a[i][i]) ; // S2 - for (j=i+1;j<=N;j++) @{ - for (k=1;k<=i-1;k++) @{ - a[j][i] -= a[j][k]*a[i][k] ; // S3 - @} - a[j][i] /= a[i][i] ; // S4 - @} - @} -@} -@end group -@end example - -@noindent The corresponding abstract syntax tree is shown in the following -figure. It directly gives the scattering functions (schedules) for all the -statements of the program (just follow the paths). - -@image{images/tree,6cm} - -@tex -$$ -\hbox{$ \cases{ \theta _{S1}(i,j) &$= (0,i,0,j,0)$\cr - \theta _{S2}(i) &$= (0,i,1)$\cr - \theta _{S3}(i,j,k) &$= (0,i,2,j,0,k,0)$\cr - \theta _{S4}(i,j) &$= (0,i,2,j,1)$}$} -$$ -@end tex - -@ifnottex -@example -@group -T_S1(i,j) = (0,i,0,j,0) -T_S2(i) = (0,i,1) -T_S3(i,j,k) = (0,i,2,j,0,k,0) -T_S4(i,j) = (0,i,2,j,1) -@end group -@end example -@end ifnottex - -@noindent These schedules depend on the iterators and give for each instance -of each statement a unique execution date. Using such scattering functions -allows CLooG to re-generate the input code. - -@noindent To easily manipulate the scattering function of any -statement @code{S}, we translate it to the matrix form: -@tex -@math{\theta_S}(@emph{iteration vector}) -@end tex -@ifnottex -T_S(@emph{iteration vector}) -@end ifnottex -@code{ = }@strong{scattering matrix}@code{ * }@emph{iteration vector}. -For instance let us consider again our previous example -@tex -$\theta_{S4}(i, j) = (j+2, 3*i+j).$ -@end tex -@ifnottex -T_S4(i,j) = (j+2,3*i+j). -@end ifnottex -We write it in the following way: -@tex -$$ -\theta_{S4} -\left( -\matrix{ - i \cr - j \cr - 1 - } -\right) -= -\left[ -\matrix{ - 0 & 0 & 2 \cr - 3 & 1 & 0 - } -\right] -\left( -\matrix{ - i \cr - j \cr - 1 - } -\right) -$$ -@end tex -@ifnottex -@example -@group - [ i ] [ 0 1 2 ] [ i ] -T_S4([ j ]) = [ 3 1 0 ] * [ j ] - [ 1 ] [ 1 ] -@end group -@end example -@end ifnottex - -@noindent @strong{The scattering matrix will be used in all our tools to provide -the information on the scattering of a given statement -(the iteration vector is in general an implicit information).} - - -@node Access Function -@subsection Access Function - -Before applying any transformation, it is essential to deeply analyze both the -original program and the transformation to ensure the transformation does not -imply any modification of the original program semantics. In the polyhedral -model, we are able to achieve -an exact analysis when all the memory accesses are made through arrays -(note that variables are a particular case of arrays since they are simply -arrays with only one memory location) with affine subscripts that depend -on outer loop counters and global parameters (note that @emph{subscripts} -are sometimes called @emph{index} or @emph{accesses} in the literature). - -For instance let us consider the array access @code{A[2*i+j][j][i+N]}. It has -three dimensions, each subscript dimension is an affine form of some outer loop -iterarors (@code{i} and @code{j}) and global parameters (@code{N}) hence -it corresponds to an acceptable array access to be analyzed in the -polyhedral model. - -Each array access can target a different memory cell depending on the -statement instance, i.e., depending on the iteration vector. -Thus we use access functions (or subscript functions, or index functions, as you -prefer to call it) depending on the iteration vector to describe an array -access. In our example, the access function would be written -@math{F_A(i, j) = (2*i+j, j, i+N)}. - -@noindent To easily manipulate the access function of any -array @code{A}, we translate it to the matrix form: -@math{F_A}(@emph{iteration vector}) -@code{ = }@strong{access matrix}@code{ * }@emph{iteration vector}. -For instance let us consider again our previous example. We would -write it in the following way: -@tex -$$ -F_A -\left( -\matrix{ - i \cr - j \cr - N \cr - 1 - } -\right) -= -\left[ -\matrix{ - 2 & 1 & 0 & 0 \cr - 0 & 1 & 0 & 0 \cr - 1 & 0 & 1 & 0 - } -\right] -\left( -\matrix{ - i \cr - j \cr - N \cr - 1 - } -\right) -$$ -@end tex -@ifnottex -@example -@group - [ i ] [ 2 1 0 0 ] [ i ] -F_A([ j ]) = [ 0 1 0 0 ] * [ j ] - [ N ] [ 1 0 1 0 ] [ N ] - [ 1 ] [ 1 ] -@end group -@end example -@end ifnottex - -@noindent @strong{The access matrix will be used in all our tools to provide the -information on the access of a given statement -(the iteration vector is in general an implicit information).} - -@node What's Next? -@section What's Next? - -OK, now you have an idea about how we do represent a program part in the -polyhedral model. You know the three main concepts, namely: domain, scattering -and access. What can you do with this?! Well, pretty much anything related -to code restructuring! The core idea will be to rely on the mathematical -representation to extract useful information about your -code (data reuse, parallelism...) and to generate a scattering -to benefit from the properties you analysed. -However, OpenScop's documentation is not the right -place to learn at this (OpenScop is all about representation, not about -manipulation). Probably it is the right time for you to -have a look at: -@itemize @bullet -@item PoCC @url{http://pocc.sourceforge.net} -@item Pluto @url{http://pluto-compiler.sourceforge.net} -@end itemize - -@noindent Have fun :-) ! - - -@c % *********************** OpenScop Specification ************************** -@node OpenScop Specification -@chapter OpenScop Specification - -OpenScop provides an explicit polyhedral representation of a static control -part. It has been designed by various polyhedral compilation tool writers from -various institutions. It builds on previous popular polyhedral file and data -structure formats (such as @emph{.cloog} and CLooG data structures) to provide -a unique, extensible format to most polyhedral compilation tools. It -is composed of two parts. The first part, the so-called -@emph{core part}, is devoted to the polyhedral representation of a SCoP. -It contains what is strictly necessary to build a -complete source-to-source framework in the polyhedral model and to output a -semantically equivalent code for the SCoP, from analysis to code generation. -The second part of the format, the so-called @emph{extension part}, -contains extensions to provide additional informations to some tools. - -@menu -* Preliminary Example:: -* OpenScop File Format Specification:: -* OpenScop Data Structure Specification:: -* Extensions:: -* History:: -@end menu - -@c %/************************************************************************* -@c % * PRELIMINARY EXAMPLE * -@c % *************************************************************************/ -@node Preliminary Example -@section Preliminary Example -OpenScop is a specification for representing static control program parts in -the polyhedral model. Thus, we can translate some code parts to an equivalent -OpenScop representation. As an example, let us consider the -following matrix-multiply kernel: - -@example -#pragma scop -if (N > 0) @{ - for (i = 0; i < N; i++) @{ - for (j = 0; j < N; j++) @{ - C[i][j] = 0.0; - for (k = 0; k < N; k++) - C[i][j] = C[i][j] + A[i][k] * B[k][j]; - @} - @} -@} -@end example - -The Clan@footnote{@url{http://www.lri.fr/~bastoul/development/clan/}} -tool may be used to translate this code part to an OpenScop -representation automatically. The @code{#pragma scop} is used here for -Clan, but some other tool may not need it. Here is the result of the -translation to an OpenScop textual representation. - -@sp 1 -@center @strong{DON'T PANIC} -@sp 1 - -@noindent Explanations will follow and it is not -as cryptic as it seems to be ! -@sp 1 - -@example - - -# =============================================== Global -# Backend Language -C - -# Context -CONTEXT -1 3 0 0 0 1 -# e/i | N | 1 - 1 1 -1 ## N-1 >= 0 - -# Parameter names are provided -1 -# Parameter names - -N - - -# Number of statements -2 - -# =============================================== Statement 1 -# Number of relations describing the statement -3 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -4 5 2 0 0 1 -# e/i | i j | N | 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -5 10 5 2 0 1 -# e/i| s1 s2 s3 s4 s5 | i j | N | 1 - 0 -1 0 0 0 0 0 0 0 0 ## s1 = 0 - 0 0 -1 0 0 0 1 0 0 0 ## s2 = i - 0 0 0 -1 0 0 0 0 0 0 ## s3 = 0 - 0 0 0 0 -1 0 0 1 0 0 ## s4 = j - 0 0 0 0 0 -1 0 0 0 0 ## s5 = 0 - -# ---------------------------------------------- 1.3 Access -WRITE -3 8 3 2 0 1 -# e/i| Arr [1] [2] | i j | N | 1 - 0 -1 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 ## [j] - -# ---------------------------------------------- 1.4 Body -# Statement body is provided -1 -# Statement body - -# Number of original iterators -2 -# Original iterator names -i j -# Statement body expression -C[i][j] = 0.0; - - -# =============================================== Statement 2 -# Number of relations describing the statement -5 - -# ---------------------------------------------- 2.1 Domain -DOMAIN -6 6 3 0 0 1 -# e/i| i j k | N | 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 -1 ## -j+N-1 >= 0 - 1 0 0 1 0 0 ## k >= 0 - 1 0 0 -1 1 -1 ## -k+N-1 >= 0 - -# ---------------------------------------------- 2.2 Scattering -SCATTERING -7 13 7 3 0 1 -# e/i| s1 s2 s3 s4 s5 s6 s7 | i j k | N | 1 - 0 -1 0 0 0 0 0 0 0 0 0 0 0 ## s1 = 0 - 0 0 -1 0 0 0 0 0 1 0 0 0 0 ## s2 = i - 0 0 0 -1 0 0 0 0 0 0 0 0 0 ## s3 = 0 - 0 0 0 0 -1 0 0 0 0 1 0 0 0 ## s4 = j - 0 0 0 0 0 -1 0 0 0 0 0 0 1 ## s5 = 1 - 0 0 0 0 0 0 -1 0 0 0 1 0 0 ## s6 = k - 0 0 0 0 0 0 0 -1 0 0 0 0 0 ## s7 = 0 - -# ---------------------------------------------- 2.3 Access -WRITE -3 9 3 3 0 1 -# e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 0 ## [j] - -READ -3 9 3 3 0 1 -# e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 0 ## [j] - -READ -3 9 3 3 0 1 -# e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 2 ## A - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 0 1 0 0 ## [k] - -READ -3 9 3 3 0 1 -# e/i| Arr [1] [2] | i j k | N | 1 - 0 -1 0 0 0 0 0 0 3 ## B - 0 0 -1 0 0 0 1 0 0 ## [k] - 0 0 0 -1 0 1 0 0 0 ## [j] - -# ---------------------------------------------- 2.4 Body -# Statement body is provided -1 -# Statement body - -# Number of original iterators -3 -# Original iterator names -i j k -# Statement body expression -C[i][j] = C[i][j] + A[i][k] * B[k][j]; - - -# =============================================== Extensions - -May the power of the polyhedral model be with you. - - - -@end example - - -We will not describe here precisely the structure and the components of this -output, this is described in depth in a further section -(@pxref{OpenScop File Format Specification}). This format -has been designed to be a possible input or output file format of most of -polyhedral compilation tools. If you read the description of the polyhedral -representation of programs, you should already feel familiar with this file -format (@pxref{Polyhedral Representation}). - - -@c %/************************************************************************* -@c % * FILE FORMAT SPECIFICATION * -@c % *************************************************************************/ -@node OpenScop File Format Specification -@section OpenScop File Format Specification - -@menu -* Relations:: -* Generics:: -@end menu - -The following grammar describes the structure of the -OpenScop file format where terminals are preceeded by "_". Except -stated otherwise, there can be at most one terminal per line in the file. -Moreover, each line may finish with a comment, starting by the @samp{#} -character. Each relevant part will be explained in more details momentarily: - -@example -OpenScop ::= Start_tag Data End_tag -Start_tag ::= "" -End_tag ::= "" -Data ::= Context Statements Extension_list -Context ::= Language Parameter_Domain Parameters -Statements ::= Nb_statements Statement_list -Statement_list ::= Statement Statement_list | (void) -Relation_list ::= _Relation Relation_list | (void) -Extension_list ::= _Generic Extension_list | (void) -Statement ::= Statement_relations Body -Body ::= "0" | "1" Body_information -Parameters ::= "0" | "1" Parameter_information -Statement_relations ::= Nb_relations Relation_List -Parameter_domain ::= _Relation -Language ::= _String -Nb_Relations ::= _Integer -Parameter_information ::= _Generic -Body_information ::= _Generic -@end example - -The @samp{Context} and the @samp{Statements} parts compose the -@emph{core part}, i.e., what is strictly necessary to build -a complete source to source framework based on OpenSCop: -@itemize @bullet -@item @samp{Context} represents the global information of the SCoP. It - consists on the target language, the global constraints on the - parameters and optionally the parameter information which may be necessary - for the code generation process. The constraints on the parameters - are represented as a relation (@pxref{Context Domain Relation}). - The parameter information is optional. It is preceded by a - boolean which precises whether it is provided or not. - It is a generic information (@pxref{Generics}), a @code{strings} - (@pxref{Strings Generic}) for instance. -@item @samp{Statements} represents the information about the statements. - @samp{Nb_statements} is the number of statements in the SCoP, - i.e. the number of @samp{Statement} items in the @samp{Statement_list}. - @samp{Statement} represents the information on a given statement. - To each statement is associated a list of relations and, - optionaly, a body. The list of relations may include - one iteration domain (@pxref{Iteration Domain Relation}), - one scattering relation (@pxref{Scattering Relation}) - and several access relations (@pxref{Access Relation}). - There is no mandatory ordering, but for consistency reason it would - be much appreciated that iteration domain comes first (if present) - then scattering (if present), then accesses (if present). - The statement body is an optional information. It is preceded by a - boolean which precises whether it is provided or not. - It is a generic information (@pxref{Generics}), a @code{body} - (@pxref{Body Generic}) for instance. -@end itemize - -The @samp{Extension_list} represents the @emph{extension part} and may contain -an arbitrary number of generic informations (@pxref{Generics}). -Few examples of possible extensions are presented in a further -section (@pxref{Extensions}). - -As shown by the grammar, the input file describes the various pieces of -information based on strings, integers, @emph{relations} and @emph{generics}. -Relations and Generics are specific to OpenScop and are described in depth -in the following Sections (@pxref{Relations} and @pxref{Generics}). - - -@c %/************************************************************************* -@c % * RELATIONS * -@c % *************************************************************************/ -@node Relations -@subsection Relations - -@menu -* Iteration Domain Relation:: -* Context Domain Relation:: -* Scattering Relation:: -* Access Relation:: -@end menu - -@emph{Relations} are the essence of the OpenScop format and contain the -"polyhedral" information. They are used to describe either an iteration -domain, or a context domain, or a scattering or a memory access. - -We use the relation term as a shortcut to denote a -union of convex relations, each element of the union being described by a set of -constraints in an extended PolyLib format (@pxref{Wil93}). -The number of elements in the union is given by an integer on the first line, -optionally followed by a comment starting with @samp{#}. -This number of elements can be omitted when there is only one element. -Each element in the union has the following syntax: - -@enumerate -@item Some optional comment lines beginning with @samp{#}. -@item A line with the type of the relation, possibly followed by comments. - The type can be one of the following: - @itemize @bullet - @item @code{UNDEFINED}: generic relation, - @item @code{CONTEXT}: for context information, - @item @code{DOMAIN}: for iteration domains, - @item @code{SCATTERING}: for scattering relation, - @item @code{READ}: for read accesses, - @item @code{WRITE}: for write accesses, - @item @code{MAY_WRITE}: for may-write accesses, - @end itemize -@item A line with 6 numbers, possibly followed by comments: - @enumerate - @item the number of rows of the constraint matrix, - @item the number of columns of the constraint matrix, - @item the number of @emph{output dimensions}, - @item the number of @emph{input dimension}, - @item the number of @emph{local dimensions} - (existentially quantified dimensions), - @item the number of @emph{parameters}. - @end enumerate - The sum of the last four numbers should be equal to the number of columns - minus two. The remaining two columns are the equality/inequality - indicator and the constant term. The number of parameters should be the - same for all relations in the entire OpenScop file or data structure. -@item The constraint rows. Each row corresponds to a constraint the - relation has to satisfy. Each row must be on a single line and is possibly - followed by comments. The constraint is an equality @math{p(x) = 0} if the - first element is 0, an inequality @math{p(x) \geq 0} if the first element - is 1. The next elements are the coefficients of the output dimensions, - followed by coefficients of the input dimensions, the existentially - quantified dimensions and finally the parameters. - The last element is the constant term. -@end enumerate - -This representation is the basis for several purposes. Examples for -iteration domains (@pxref{Iteration Domain Relation}), context domains -(@pxref{Context Domain Relation}), scattering -relations (@pxref{Scattering Relation}) and -access relations (@pxref{Access Relation}) are provided in further sections. - -@c %/************************** ITERATION DOMAIN **************************** -@node Iteration Domain Relation -@subsubsection Iteration Domain Relation - -Iteration domain represents the set of instances of the corresponding statement. -OpenScop iteration domains are represented as relations with the following -conventions: -@itemize @bullet -@item the type is @code{DOMAIN}, -@item there is 0 input dimension, -@item loop iterators correspond to output dimensions. -@end itemize - -@noindent For instance, assuming that @samp{i}, @samp{j} and @samp{k} are the loop -iterators and @samp{M} and @samp{N} are the parameters, the domain defined by -the following constraints : - -@tex -$$ -\hbox{$ \cases{ -i + M &$\geq 0$\cr - -j + N &$\geq 0$\cr - i + j - k &$\geq 0$}$} -$$ -@end tex -@ifnottex -@example -@group - -i + M >= 0 - -j + N >= 0 -i + j - k >= 0 -@end group -@end example -@end ifnottex - -@noindent can be written in the input file as follows: - -@example -@group -# This is an iteration domain -DOMAIN -1 # Number of relations in the union -3 7 3 0 0 2 # 3 rows, 7 cols: 3 output dims and 2 params -# e/i| i j k | M N | 1 - 1 -1 0 0 1 0 0 # -i + M >= 0 - 1 0 -1 0 0 1 0 # -j + N >= 0 - 1 1 1 -1 0 0 0 # i + j - k >= 0 -@end group -@end example - -@noindent Equivalently, it can be written in the following way as the number -of relations in the union can be omitted if it is 1: - -@example -@group -# This is an iteration domain -DOMAIN -3 7 3 0 0 2 # 3 rows, 7 cols: 3 output dims and 2 params -# e/i| i j k | M N | 1 - 1 -1 0 0 1 0 0 # -i + M >= 0 - 1 0 -1 0 0 1 0 # -j + N >= 0 - 1 1 1 -1 0 0 0 # i + j - k >= 0 -@end group -@end example - -@noindent As an example for unions, let us consider the following pseudo-code: - -@example -@group -for (i = 1; i <= N; i++) @{ - if ((i >= M) || (i <= 2*M)) - S1(i); -@} -@end group -@end example - -@noindent The iteration domain of @samp{S1} can be divided into two -relations and written in the OpenScop file as follows: - -@example -@group -# This is an iteration domain -DOMAIN -2 # Number of relations in the union -# Union part No.1 -3 5 1 0 0 2 # 3 rows, 5 cols: 1 output dim and 2 params -# e/i| i | M N | 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= N - 1 1 -1 0 0 # i >= M -# Union part No.2 -3 5 1 0 0 2 # 3 rows, 5 cols: 1 output dim and 2 params -# e/i| i | M N | 1 - 1 1 0 0 -1 # i >= 1 - 1 -1 0 1 0 # i <= N - 1 -1 2 0 0 # i <= 2*M -@end group -@end example - -@noindent As an example for local dimensions (existentially quantified -dimensions), let us consider the following pseudo-code: - -@example -@group -for (i = 1; i <= N; i++) @{ - if ((i % 2) == 0) - S1(i); -@} -@end group -@end example - -@noindent The iteration domain of @samp{S1} is composed of all even -integer values between 1 and N. The "divisible by two" constraint can -be expressed as follows: there exists an integer @samp{ld} such that -@samp{i = 2*ld}. We encode this thanks to a new local dimension: - -@example -@group -# This is an iteration domain -DOMAIN -3 5 1 0 1 1 # 3 rows, 5 cols: 1 output dim, 1 local dim, 1 param -# e/i| i |ld | N | 1 - 0 1 -2 0 0 # i = 2*ld - 1 1 0 0 1 # i >= 1 - 1 -1 0 1 0 # i <= N -@end group -@end example - - -@c %/************************** CONTEXT DOMAIN ****************************** -@node Context Domain Relation -@subsubsection Context Domain Relation - -The context domain is a particular case of iteration domain -(@pxref{Iteration Domain Relation}) where there are only -constraints about parameters (no loop iterators). Hence it is the same -as an iteration domain, with the following conventions: -@itemize @bullet -@item the type is @code{CONTEXT}, -@item there is 0 input dimension, -@item there is 0 output dimension. -@end itemize - - -@c %/************************* SCATTERING RELATION ************************** -@node Scattering Relation -@subsubsection Scattering Relation - -Scattering relation maps an iteration domain to a logical time and/or -space (and/or) anything. -OpenScop scattering information is represented as relations -(@pxref{Relations}) with the following conventions: - -@itemize @bullet -@item the type is @code{SCATTERING}, -@item output dimensions correspond to scattering dimensions, -@item loop iterators correspond to input dimensions. -@end itemize - -As an example of a scattering relation and -assuming that @samp{i}, @samp{j} and @samp{k} are the loop -iterators and @samp{M} and @samp{N} are the parameters, take for instance: -@tex -$\theta_{S}(i,j,k) = (j+2,3*i+j,k+N+1).$ -@end tex -@ifnottex -@example -T_@{S@}(i,j,k) = (j+2,3*i+j,k+N+1). -@end example -@end ifnottex -We can represent it in the following way: - -@example -@group -# A scattering relation -SCATTERING -# 3 rows, 10 columns: 3 scattering dimensions, 3 iterators, 2 parameters -3 10 3 3 0 2 -# e/i|s1 s2 s3 | i j k | M N | 1 - 0 -1 0 0 0 1 0 0 0 2 # s1 = j+2 - 0 0 -1 0 3 1 0 0 0 0 # s2 = 3*i+j - 0 0 0 -1 0 0 1 0 1 1 # s3 = k+N+1 -@end group -@end example - -@c %/************************** ACCESS RELATION ***************************** -@node Access Relation -@subsubsection Access Relation - -Access relation maps an iteration domain to an array space. -Each array accessed in the SCoP has a unique identification number. -OpenScop relation information is represented as relations -(@pxref{Relations}) with the following conventions: - -@itemize @bullet -@item the type is one of the following: - @itemize @bullet - @item @code{READ}, for read accesses, - @item @code{WRITE}, for write accesses, - @item @code{MAY_WRITE}, for may write accesses, - @end itemize -@item output dimensions correspond to the array identifier and dimensions, -@item the first output dimension corresponds to the array identifier, -@item the (i+1)th output dimension corresponds to the ith array dimension (i>1), -@item loop iterators correspond to input dimensions. -@end itemize - -As an example of a scattering relation and -assuming that @samp{i}, @samp{j} and @samp{k} are the loop -iterators and @samp{M} and @samp{N} are the parameters, let us consider -the array access @code{A[2*i+j][j][i+N]} (the identifier of @code{A} is 42), -and let us suppose this is a read access. Its representation would be the -following: - -@example -@group -# A read access relation -READ -# 4 rows, 11 columns: 4 array dimensions, 3 iterators, 2 parameters -4 11 4 3 0 2 -# e/i|Arr [1] [2] [3]| i j k | M N | 1 - 0 -1 0 0 0 0 0 0 0 0 42 # A - 0 0 -1 0 0 2 1 0 0 0 0 # [2*i+j] - 0 0 0 -1 0 0 1 0 0 0 0 # [j] - 0 0 0 0 -1 1 0 0 0 1 0 # [i+N] -@end group -@end example - -To understand this representation, consider that OpenScop accesses -are general memory accesses and not array accesses. The memory is -seen as a big array @code{Mem} while usual array names correspond to -the first dimension. Hence our example translates to @code{Mem[42][2*i+j][j][i+N]}. - -Unions of access relations are allowed. In this case, each union part must -refer at the same array identifier, and the number of dimensions must be -consistent. - -@c %/************************************************************************* -@c % * GENERICS * -@c % *************************************************************************/ -@node Generics -@subsection Generics -@menu -* Strings Generic:: -* Body Generic:: -@end menu - -@emph{Generics} represent any elaborated non-polyhedral information in the -OpenScop format. They are used to represent the parameter information, the -statement body information as well as the extensions. Each generic information -is delimited using XML-like tags corresponding to its URI (Unique Resource -Identifier), For instance, if the generic has the URI @code{foo}, the begin -tag is @code{} and the end tag is @code{}). - -Two generics, namely @code{strings} (@pxref{Strings Generic}) and -@code{body} (@pxref{Body Generic}) are part of the OpenScop -specification to provide the minimum, stricly necessary information to -build a complete source-to-source polyhedral framework based on OpenScop. -However, generics can be basically @emph{anything} as long as they are -properly delimited. OpenScop implementations will simply ignore -non-supported generics and warn the user with the mention of the -non-supported URIs. Support of new generics will be added throught the -extension mechanism. - -@c --------------------------------------------------------------------------- - -@node Strings Generic -@subsubsection Strings Generic - -The purpose of the @code{strings} generic is to represent a list of -textual strings on one line (which may be used, e.g., to represent the list of -parameter names in the order used in the relation). Its URI is @code{strings} -and its file format respects the following grammar: -@example -Strings_generic ::= "" Strings "" -Strings ::= _String String_list | (void) -@end example - -@noindent A possible example of textual @code{strings} is the following: -@example -@group - -Not one sentence but 6 strings! - -@end group -@end example - -@c --------------------------------------------------------------------------- - -@node Body Generic -@subsubsection Body Generic - -The purpose of the @code{body} generic is to represent the textual -information about a statement. It contains the number of original iterators on -the first line, the list of original iterators on the second -line (the loop counters of the statement surrounding loops in the original -program) and the original textual body expression on the third line. -Its URI is @code{body} and its file format respects the following grammar -(the @code{String} rule is reused, @pxref{Strings Generic}): -@example -Body_generic ::= "" Body "" -Body ::= Nb_iterators Iterator_list Expression -Nb_iterators ::= _Integer -Iterator_list ::= Strings -Expression ::= Strings -@end example - -@noindent A possible example of textual @code{body} is the following: -@example -@group - -# Number of original iterators -2 -# Original iterators -i j -# Original statement expression -A[i+j] += B[i] * C[j]; - -@end group -@end example - - -@c %/************************************************************************* -@c % * DATA STRUCTURE SPECIFICATION * -@c % *************************************************************************/ -@node OpenScop Data Structure Specification -@section OpenScop Data Structure Specification - -@menu -* osl_relation_t:: -* osl_relation_list_t:: -* osl_interface_t:: -* osl_generic_t:: -* osl_strings_t:: -* osl_body_t:: -* osl_statement_t:: -* osl_scop_t:: -@end menu - -The OpenScop specification offers a small set of C data structures devoted to -represent a SCoP in memory in a convenient way. Using them in some tool or -library may greatly facilitate its interaction with other tools or libraries -which rely on this representation as well. Every field may not be useful for -a given tool or library. A general rule for all the data structure is -that a @code{NULL} pointer or a -1 integer value means the information is -not present. Contrary to engineering time, memory is cheap today, so it's much -probably not a big deal that some fields are left empty. Every field may not -be enough for a given tool or library. In this case it is much recommended -to provide a new extension which may be reused by other users -(@pxref{Extensions}). - -Each tool or library may have its own implementation of the OpenScop -data structures. The type names should not be the same as those provided -as an example here (they correspond to the OpenScop Library implementation). -The names of the fields, and their ordering, should however be the same. In this -way, the interaction between tools and libraries should be as simple as a cast. - -Before reading at the OpenScop data structures, it is much recommended to -read at the OpenScop file format description, as it is quite close to this -representation (@pxref{OpenScop File Format Specification}). - - -@node osl_relation_t -@subsection osl_relation_t - -@example -@group -struct osl_relation @{ - int type; /* What this relation is encoding */ - int precision; /* Precision of the matrix elements */ - int nb_rows; /* Number of rows */ - int nb_columns; /* Number of columns */ - int nb_output_dims; /* Number of output dimensions */ - int nb_input_dims; /* Number of input dimensions */ - int nb_local_dims; /* Number of local dimensions */ - int nb_parameters; /* Number of parameters */ - void ** m; /* Matrix of constraints */ - struct osl_relation * next; /* Next relation in the union */ -@}; -typedef struct osl_relation osl_relation_t; -typedef struct osl_relation * osl_relation_p; -@end group -@end example - -@noindent The @code{osl_relation_t} structure stores a part of an -union of relations. A union of relation is a @code{NULL}-terminated -linked list of union parts (@code{next} field). The @code{type} field -may provide some information about what the relation is encoding: -@itemize @bullet -@item -1: undefined (@code{OSL_UNDEFINED}), -@item 2: context domain (@code{OSL_TYPE_CONTEXT}), -@item 3: iteration domain (@code{OSL_TYPE_DOMAIN}), -@item 4: scattering relation (@code{OSL_TYPE_SCATTERING}), -@item 6: read access relation (@code{OSL_TYPE_READ}), -@item 7: write access relation (@code{OSL_TYPE_WRITE}), -@item 8: may write access relation (@code{OSL_TYPE_MAY_WRITE}), -@end itemize -The various numbers provide the details on the relation itself -(@pxref{Relations}) while the @code{m} field points to -the constraint matrix. The precision of the constraint matrix elements is -provided by the @code{precision} field. It can take the following -values: -@itemize @bullet -@item 32: 32 bits precision, elements are @code{long int} - (@code{OSL_PRECISION_SP}), -@item 64: 64 bits precision, elements are @code{long long int} - (@code{OSL_PRECISION_DP}), -@item 0: multiple precision, elements are GNU GMP Library's - @code{mpz_t} (@code{OSL_PRECISION_MP}). -@end itemize - -@c --------------------------------------------------------------------------- - -@node osl_relation_list_t -@subsection osl_relation_list_t - -@example -@group -struct osl_relation_list @{ - osl_relation_p elt; /* Element of the list */ - struct osl_relation_list * next; /* Next element of the list */ -@}; -typedef struct osl_relation_list osl_relation_list_t; -typedef struct osl_relation_list * osl_relation_list_p; -@end group -@end example - -@noindent The @code{osl_relation_list_t} structure is a @code{NULL}-terminated -linked list of @code{osl_relation_t} data structures. -@code{elt} is a relation element of the list and @code{next} is the pointer to -the next element of the list. - -@c --------------------------------------------------------------------------- - -@node osl_interface_t -@subsection osl_interface_t - -@example -@group -typedef void (*osl_idump_f) (FILE *, void *, int); -typedef char * (*osl_sprint_f)(void *); -typedef void * (*osl_sread_f) (char *); -typedef void * (*osl_malloc_f)(); -typedef void (*osl_free_f) (void *); -typedef void * (*osl_clone_f) (void *); -typedef int (*osl_equal_f) (void *, void *); - -struct osl_interface @{ - char * URI; /* Unique interface identifier string */ - osl_idump_f idump; /* Pointer to the idump function */ - osl_sprint_f sprint; /* Pointer to the sprint function */ - osl_sread_f sread; /* Pointer to the sread function */ - osl_malloc_f malloc; /* Pointer to the malloc function */ - osl_free_f free; /* Pointer to the free function */ - osl_clone_f clone; /* Pointer to the clone function */ - osl_equal_f equal; /* Pointer to the equal function */ - struct osl_interface * next; /* Next interface in the list */ -@}; -typedef struct osl_interface osl_interface_t; -typedef struct osl_interface * osl_interface_p; -@end group -@end example - -@noindent The @code{osl_interface_t} structure represents a -node in a @code{NULL}-terminated list of interfaces. Each node stores the -@emph{interface} of a generic OpenScop object, i.e., its unique name -(@code{URI}) and the function pointers to all the base functions it has -to provide. Extension providers will find information relative to those -functions in the OpenScop Library description (@pxref{Base Functions}) -and the section dedicated to writing extensions -(@pxref{Extension Development}). - -@c --------------------------------------------------------------------------- - -@node osl_generic_t -@subsection osl_generic_t - -@example -@group -struct osl_generic @{ - void * data; /* Pointer to some data */ - osl_interface_p interface; /* Interface to work with the data */ - struct osl_generic * next; /* Pointer to the next generic */ -@}; -typedef struct osl_generic osl_generic_t; -typedef struct osl_generic * osl_generic_p; -@end group -@end example - -@noindent The @code{osl_generic_t} structure represents a node in a -@code{NULL}-terminated list of generic elements. It stores some data -and operations with no pre-defined type. The information is accessible -through the @code{data} pointer while the type and operations are -accessible through the @code{interface} pointer. It is used to represent -data that are allowed to differ in implementations, such as symbols and -extensions. - -@c --------------------------------------------------------------------------- - -@node osl_strings_t -@subsection osl_strings_t - -@example -@group -struct osl_string @{ - char ** string; /* NULL-terminated array of strings */ -@}; -typedef struct osl_strings osl_strings_t; -typedef struct osl_strings * osl_strings_p; -@end group -@end example - -@noindent The @code{osl_strings_t} structure represents a NULL-terminated -list of C character strings. It is encapsulated into a structure to allow -its manipulation through a generic type. - -@c --------------------------------------------------------------------------- - -@node osl_body_t -@subsection osl_body_t - -@example -@group -struct osl_body @{ - osl_strings_p iterators; /* Original iterators */ - osl_strings_p expression; /* Original statement expression */ -@}; -typedef struct osl_body osl_body_t; -typedef struct osl_body * osl_body_p; -@end group -@end example - -@noindent The @code{osl_body_t} structure stores a statement body in a -textual form. The complete original expression (directly copy-pasted -from the original code) is in the expression field while the textual forms -of the original iterators are in the iterators field. They may be used for -substitutions inside the expression. - -@c --------------------------------------------------------------------------- - -@node osl_statement_t -@subsection osl_statement_t - -@example -@group -struct osl_statement @{ - osl_relation_p domain; /* Iteration domain */ - osl_relation_p scattering; /* Scattering relation */ - osl_relation_list_p access; /* List of array access relations */ - osl_generic_p body; /* Original statement body */ - void * usr; /* A user-defined field */ - struct osl_statement * next; /* Next statement in the list */ -@}; -typedef struct osl_statement osl_statement_t; -typedef struct osl_statement * osl_statement_p; -@end group -@end example - -@noindent The @code{osl_statement_t} structure represents a node -in a @code{NULL}-terminated linked list of statements. Each node contains the -useful information for a given statement to process it within a polyhedral -framework. The order in the list may matter for naming conventions -(e.g. "S1" for the first statement in the list). The iteration domain -and the scattering are represented using an @code{osl_relation_p} -structure while the accesses are using a list of -relations: one for each memory access in the statement. -The @code{body} field should provide information about the statement body -(since it has a generic type, the specification is not strict about how it -is used), e.g., using the @code{osl_body_t} data structure (@pxref{osl_body_t}). -It is also possible to use the @code{usr} field, but it has to be -totally managed by the user. - -@c --------------------------------------------------------------------------- - -@node osl_scop_t -@subsection osl_scop_t -@example -@group -struct osl_scop @{ - int version; /* Version of the data structure */ - char * language; /* Target language */ - osl_relation_p context; /* Constraints on the parameters */ - osl_generic_p parameters; /* Information about parameters */ - osl_statement_p statement; /* Statement list */ - osl_interface_p registry; /* Registered extension interfaces */ - osl_generic_p extension; /* Extension list */ - void * usr; /* A user-defined field */ - struct osl_scop * next; /* Next scop in the list */ -@}; -typedef struct osl_scop osl_scop_t; -typedef struct osl_scop * osl_scop_p; -@end group -@end example - -@noindent @code{osl_scop_t} represents a node in a -@code{NULL}-terminated list of scops. It stores the useful informations -of a static control part of a program to process it within a polyhedral -framework. To prepare OpenScop specification evolution, the @code{version} -field tells the version of the data structure. It should be set to 1 for -now (and hopefully a very, very, long time). -First, it contains the informations about the context. The target language -in expressed in the @code{language} field. The constraints on the -global parameters are detailed in the @code{context} field. -The @code{paremeters} field should provide information about the -parameters (since it has a generic type, the specification is not strict -about how it is used), e.g., using the @code{osl_strings_t} data structure -(@pxref{osl_strings_t}). -Finally, it contains the list of statements @code{statement}, the list -of registered interfaces for generic types @code{registry} and the list of -extentions @code{extension}. -It is also possible to use the @code{usr} field, but it has to be -totally managed by the user. - -As an example, let us consider again the matrix multiply program -(@pxref{Preliminary Example}). -The next figure gives a possible representation in memory for this -SCoP thanks to the OpenScop data structures (it has been actually printed -by the @code{osl_scop_dump} function), note that symbols like -parameters, original iterators and statement expression are represented -with an @code{osl_strings_t} which does not belong to the -specification but to the OpenScop Library implementation: - -@c @smallexample -@example -+-- osl_scop_t -| | -| Version: 1 -| | -| Language: C -| | -| +-- osl_relation_t (CONTEXT, 32 bits) -| | 1 3 0 0 0 1 -| | [ 1 1 -1 ] -| | -| +-- osl_generic_t -| | | -| | +-- osl_interface_t: URI = strings -| | | -| | +-- osl_strings_t: N -| | | -| | -| +-- osl_statement_t (S1) -| | | -| | +-- osl_relation_t (DOMAIN, 32 bits) -| | | 4 5 2 0 0 1 -| | | [ 1 1 0 0 0 ] -| | | [ 1 -1 0 1 -1 ] -| | | [ 1 0 1 0 0 ] -| | | [ 1 0 -1 1 -1 ] -| | | -| | +-- osl_relation_t (SCATTERING, 32 bits) -| | | 5 10 5 2 0 1 -| | | [ 0 -1 0 0 0 0 0 0 0 0 ] -| | | [ 0 0 -1 0 0 0 1 0 0 0 ] -| | | [ 0 0 0 -1 0 0 0 0 0 0 ] -| | | [ 0 0 0 0 -1 0 0 1 0 0 ] -| | | [ 0 0 0 0 0 -1 0 0 0 0 ] -| | | -| | +-- osl_relation_list_t -| | | | -| | | +-- osl_relation_t (WRITE, 32 bits) -| | | | 3 8 3 2 0 1 -| | | | [ 0 -1 0 0 0 0 0 1 ] -| | | | [ 0 0 -1 0 1 0 0 0 ] -| | | | [ 0 0 0 -1 0 1 0 0 ] -| | | | -| | | -| | +-- osl_generic_t -| | | | -| | | +-- osl_interface_t: URI = body -| | | | -| | | +-- osl_strings_t: i j -| | | | -| | | +-- osl_strings_t: C[i][j] = 0.0; -| | | | -| | | -| | V -| | osl_statement_t (S2) -| | | -| | +-- osl_relation_t (DOMAIN, 32 bits) -| | | 6 6 3 0 0 1 -| | | [ 1 1 0 0 0 0 ] -| | | [ 1 -1 0 0 1 -1 ] -| | | [ 1 0 1 0 0 0 ] -| | | [ 1 0 -1 0 1 -1 ] -| | | [ 1 0 0 1 0 0 ] -| | | [ 1 0 0 -1 1 -1 ] -| | | -| | +-- osl_relation_t (SCATTERING, 32 bits) -| | | 7 13 7 3 0 1 -| | | [ 0 -1 0 0 0 0 0 0 0 0 0 0 0 ] -| | | [ 0 0 -1 0 0 0 0 0 1 0 0 0 0 ] -| | | [ 0 0 0 -1 0 0 0 0 0 0 0 0 0 ] -| | | [ 0 0 0 0 -1 0 0 0 0 1 0 0 0 ] -| | | [ 0 0 0 0 0 -1 0 0 0 0 0 0 1 ] -| | | [ 0 0 0 0 0 0 -1 0 0 0 1 0 0 ] -| | | [ 0 0 0 0 0 0 0 -1 0 0 0 0 0 ] -| | | -| | +-- osl_relation_list_t -| | | | -| | | +-- osl_relation_t (WRITE, 32 bits) -| | | | 3 9 3 3 0 1 -| | | | [ 0 -1 0 0 0 0 0 0 1 ] -| | | | [ 0 0 -1 0 1 0 0 0 0 ] -| | | | [ 0 0 0 -1 0 1 0 0 0 ] -| | | | -| | | V -| | | osl_relation_list_t -| | | | -| | | +-- osl_relation_t (READ, 32 bits) -| | | | 3 9 3 3 0 1 -| | | | [ 0 -1 0 0 0 0 0 0 1 ] -| | | | [ 0 0 -1 0 1 0 0 0 0 ] -| | | | [ 0 0 0 -1 0 1 0 0 0 ] -| | | | -| | | V -| | | osl_relation_list_t -| | | | -| | | +-- osl_relation_t (READ, 32 bits) -| | | | 3 9 3 3 0 1 -| | | | [ 0 -1 0 0 0 0 0 0 2 ] -| | | | [ 0 0 -1 0 1 0 0 0 0 ] -| | | | [ 0 0 0 -1 0 0 1 0 0 ] -| | | | -| | | V -| | | osl_relation_list_t -| | | | -| | | +-- osl_relation_t (READ, 32 bits) -| | | | 3 9 3 3 0 1 -| | | | [ 0 -1 0 0 0 0 0 0 3 ] -| | | | [ 0 0 -1 0 0 0 1 0 0 ] -| | | | [ 0 0 0 -1 0 1 0 0 0 ] -| | | | -| | | -| | +-- osl_generic_t -| | | | -| | | +-- osl_interface_t: URI = body -| | | | -| | | +-- osl_strings_t: i j k -| | | | -| | | +-- osl_strings_t: C[i][j] = C[i][j] + A[i][k]*B[k][j]; -| | | | -| | | -| | -| +-- NULL interface -| | -| +-- NULL generic -| | -| -@end example -@c @end smallexample - - -@c %/************************************************************************* -@c % * EXTENSIONS * -@c % *************************************************************************/ -@node Extensions -@section Extensions - -The core part of the OpenScop representation embeds what is strictly -necessary to build a complete source-to-source polyhedral framework. -However it may not be enough. Hence, OpenScop offers a very flexible -extension part. Actually, the only constraint to build an extension is -to request the OpenScop maintainer for a unique extension name: its URI -(ask the maintainer through the OpenScop mailing list -@email{openscop-development@@googlegroups.com}). - -The policy to support extensions is the following and is pretty simple: an -OpenScop implementation is not required to support any extension. If it -is processing an OpenScop file or data structure which contains an -extension which is not supported, it must (1) warn the user with the -mention of the URI of the non-supported extension -and (2) ignore this extension. - -Extensions in an OpenScop file are provided after the core part, without -any specific order. Each extension is delimited using -XML-like tags corresponding to its URI (e.g., if the extension has the URI -@code{foo}, the begin tag is @code{} and the end tag is @code{}). -There is no specification or preferred way to write the extension body. -Extensions in an OpenScop data structure must be accessible through one -pointer. This pointer will be stored in the @code{data} field of an -@code{osl_generic_t} container (@pxref{osl_generic_t}). There must be only -one extension with the same URI in an OpenScop file or data structure. - -Extension writers may write a short documentation about their extension to -be added to this document. For consistency reason, this -documentation should comply to the documentation of the -@code{comment} option (@pxref{Comment Extension}). To describe the -file format, it is allowed to reuse the existing rules and terminals -present in the OpenScop file format description without defining them -(@pxref{OpenScop File Format Specification}). By sending a -documentation, you accept it to be added to this document. In -particular, the sender fully accepts the license and copyright notice. - -@menu -* Comment Extension:: -* Arrays Extension:: -* Scatnames Extension:: -* Lines Extension:: -* Irregular Extension:: -@end menu - -@c --------------------------------------------------------------------------- - -@node Comment Extension -@subsection Comment Extension - -@noindent @strong{Description} -@itemize @bullet -@item URI: @code{comment}. -@item Author: C@'edric Bastoul . -@item Purpose: the @code{comment} extension stores a textual string. -@end itemize - -@noindent @strong{File Format} - -@noindent The @code{comment} extension file format respects the following -grammar: -@example -Comment_generic ::= "" Comment "" -Comment ::= _Text -@end example - -@noindent An example of textual @code{comment} extension is the following: -@example -@group - -This is a comment string. - -@end group -@end example - -@noindent @strong{Data Structure} - -@noindent The @code{comment} extension data structure is the following: -@example -@group -struct osl_comment @{ - char * comment; /* Comment message as a 0-terminated string */ -@}; -typedef struct osl_comment osl_comment_t; -typedef struct osl_comment * osl_comment_p; -@end group -@end example - -@c --------------------------------------------------------------------------- - - -@node Scatnames Extension -@subsection Scatnames Extension - -@noindent @strong{Description} -@itemize @bullet -@item URI: @code{scatnames}. -@item Author: C@'edric Bastoul . -@item Purpose: the @code{scatnames} extension provides a list of textual -scattering dimension names. -@end itemize - -@noindent @strong{File Format} - -@noindent The @code{scatnames} extension file format respects the following -grammar. It reuses the @code{Strings} description (@pxref{Strings Generic}): -@example -Scatnames_generic ::= "" Scatnames "" -Scatnames ::= Strings -@end example - -@noindent The list of scattering dimension names is provided on one single -line. The names are separated with spaces. A possible -example of such an extension is the following: - -@example -@group - -# List of scattering dimension names: -beta_0 i beta_1 j beta_2 - -@end group -@end example - -@noindent @strong{Data Structure} - -@noindent The @code{scatnames} extension data structure is the following: - -@example -@group -struct osl_scatnames @{ - osl_strings_p names; /* List of textual scattering dimension names. */ -@}; -typedef struct osl_scatnames osl_scatnames_t; -typedef struct osl_scatnames * osl_scatnames_p; -@end group -@end example - -@noindent The order of the scattering dimension names in the list corresponds -to the order of the scattering dimensions. - -@c --------------------------------------------------------------------------- - - -@node Arrays Extension -@subsection Arrays Extension - -@noindent @strong{Description} -@itemize @bullet -@item URI: @code{arrays}. -@item Author: C@'edric Bastoul . -@item Purpose: the @code{arrays} extension provides a set of textual array -names corresponding to the array identifiers used in the access relations. -@end itemize - -@noindent @strong{File Format} - -@noindent The @code{arrays} extension file format respects the following -grammar: -@example -Arrays_generic ::= "" Arrays "" -Arrays ::= Nb_items Item_list -Item_List ::= Item Item_list | (void) -Item ::= Identifier Name -Nb_items ::= _Integer -Identifier ::= _Integer -Name ::= _String -@end example - -@noindent The number of array names is provided on the first line, -then each following line contains a couple identifier-name. -For instance, the following example is a correct textual @code{arrays} -extension. It corresponds to the array names of the preliminary example -(@pxref{Preliminary Example}): - -@example -@group - -# Number of array names: -3 -1 C # Identifier 1 corresponds to array name "C" -3 B # Identifier 3 corresponds to array name "B" -2 A # Identifier 2 corresponds to array name "A" - -@end group -@end example - -@noindent @strong{Data Structure} - -@noindent The @code{arrays} extension data structure is the following: - -@example -@group -struct osl_arrays @{ - int nb_names; /* Number of names */ - int * id; /* Array of nb_names identifiers */ - char ** names; /* Array of nb_names names */ -@}; -typedef struct osl_arrays osl_arrays_t; -typedef struct osl_arrays * osl_arrays_p; -@end group -@end example - -@noindent Each name has a name string and an identifier: the ith name has name -string @code{names[i]} and identifier @code{id[i]}. - - -@c --------------------------------------------------------------------------- - -@node Lines Extension -@subsection Lines Extension - -@c --------------------------------------------------------------------------- - -@node Irregular Extension -@subsection Irregular Extension - - -@c --------------------------------------------------------------------------- - -@node History -@section History - -OpenScop is a follow-up of Louis-No@"el Pouchet et al.'s ScopLib effort which -was itself based on C@'edric Bastoul et al.'s Clan tool. People involved in -OpenScop's genesis are: -@itemize @bullet -@item C@'edric Bastoul -@item Uday Bondhugula -@item Tobias Grosser -@item Louis-No@"el Pouchet -@item Sven Verdoolaege -@end itemize - -@c %/************************************************************************* -@c % * OpenScop LIBRARY * -@c % *************************************************************************/ - -@node OpenScop Library -@chapter OpenScop Library - -The OpenScop Library, or OSL for short, is an example implementation of the -OpenScop specification. Its API is not part of the OpenScop specification. -It offers basic functionalities to manipulate the OpenScop data structures -(allocate, free, copy, dump, etc.) and file format (read, print, etc.). -The OpenScop Library is @emph{not} a polyhedral library. OpenScop is an -exchange format, and the OpenScop Library reflects this. - -It is a Free Software using the 3-clause BSD License. -Programmers should feel free to use -it or copy/paste its code in any project, Open Source or not@footnote{Closed -source projects should consider to provide some OpenScop file input -and output, so they can be incorporated to any OpenScop-based tool chain.}. - -@menu -* Precision:: -* Base Functions:: -* Example of OpenScop Library Utilization:: -* Installation:: -* Documentation:: -* Development:: -@end menu - -@node Precision -@section Precision - -The OpenScop specification does not impose a specific type for the -constraint matrix elements. For a maximum flexibility, the OpenScop Library -offers an hybrid precision implementation. It supports 32 bits, 64 bits and -multiple precision (relying on GNU GMP) relations transparently. At relation -allocation time, users have two ways to set the precision. The first way is -to call an allocation function with a precision parameter. The second way is -to rely on the environment variable @code{OSL_PRECISION}. -The accepted values for this variable are @code{32} for 32 bits precision, -@code{64} for 64 bits precision and @code{0} for multiple precision. When this -variable is set, its value becomes the default precision for relation elements. -For instance, to ensure the OpenScop Library will use 64 bits precision -by default, the user may set: -@example -export OSL_PRECISION=64 -@end example -@noindent if his shell is, e.g., bash or -@example -setenv OSL_PRECISION 64 -@end example -@noindent if his shell is, e.g., tcsh. The user should ad this line to -his .bashrc or .tcshrc (or whatever convenient file) to make this -setting permanent. - -@node Base Functions -@section Base Functions - -The OpenScop Library provides, for each OpenScop data structure, -a set of functions devoted to basic manipulation, conversion -from file format to data structures and from data structures to -file format. The naming convention is consistent for all data -structures. Hence, the function prototypes differ only with the -name of the data structure. In the following, we will use the -generic term of @emph{structure} to refer at any OpenScop -data structure. For instance the -@code{osl_}@emph{structure}@code{_malloc()} function is a -generic name can be instantiated to -@code{osl_relation_malloc()} or -@code{osl_statement_malloc()} etc. - -We present in this documentation only -the main functions. Many other utility functions are provided -to ease OpenScop format manipulation. The reader is invited to -refer at the technical documentation to learn everything about the -OpenScop Library. - -@menu -* Dumping:: -* Printing:: -* Reading:: -* Allocating:: -* Deallocating:: -* Cloning:: -* Testing:: -@end menu - - -@node Dumping -@subsection Dumping: osl_@emph{structure}_dump and idump - -@example -@group -void osl_@emph{structure}_dump(FILE * output, osl_@emph{structure}_p s); -void osl_@emph{structure}_idump(FILE * output, osl_@emph{structure}_p s, int i); -@end group -@end example - -@noindent Each OpenScop data structure has a dumping functions -as shown above. Dumping means writing down the content of the data -structure pointed by @code{s} (and its fields recursively) -in a textual form to the -@code{output} file (the file, possibly @code{stdout}, has to be open -for writing). The textual form is not the OpenScop file format but -another representation closer to the internal representation in -memory and mainly intended for debugging purpose. The @code{idump} -function has an additional integer parameter which corresponds to -an indentation level. - -@node Printing -@subsection Printing: osl_@emph{structure}_print - -@example -@group -void osl_@emph{structure}_print(FILE * output, osl_@emph{structure}_p s); -@end group -@end example - -@noindent Each OpenScop data structure has a pretty printing function -as shown above. It prints the content of the data -structure pointed by @code{s} (and its fields recursively) -according to the OpenScop file format -(@pxref{OpenScop File Format Specification}) to the -@code{output} file (the file, possibly @code{stdout}, has to be open -for writing). - -@node Reading -@subsection Reading: osl_@emph{structure}_read - -@example -@group -osl_@emph{structure}_p osl_@emph{structure}_read(FILE * input); -@end group -@end example - -@noindent Each OpenScop data structure has a reading function -as shown above. It reads the content of an OpenScop -data structure written according to the OpenScop file format -(@pxref{OpenScop File Format Specification}) from -the @code{input} file (the file, possibly @code{stdin}, has to be open -for reading). It returns a pointer to a freshly allocated -@code{osl_@emph{structure}_t} structure containing the -information. - -@node Allocating -@subsection Allocating: osl_@emph{structure}_malloc - -@example -@group -osl_@emph{structure}_p osl_@emph{structure}_malloc(); -@end group -@end example - -@noindent Each OpenScop data structure has a memory allocation function -as shown above (except one see below). It allocates the memory to store -the corresponding data structure, it initializes the pointer fields to -@code{NULL} and the integer fields to @code{OSL_UNDEFINED} -(@code{-1}) and it returns a pointer to the allocated space. - -An exception to this base description is the -@code{osl_relation_malloc()} function which requires two -parameters: the number of rows and columns of the constraint -matrix (@pxref{Relations}): - -@example -@group -osl_relation_p osl_relation_malloc(int nb_rows, int nb_columns); -@end group -@end example - -@noindent The precision of the relation elements will depend on the -@code{OSL_PRECISION} environment variable (@pxref{Precision}) if it is set, -or the maximum available precision if it is not set. Another allocation -function is provided to explicitly set a given precision: - -@example -@group -osl_relation_p osl_relation_pmalloc(int precision, - int nb_rows, int nb_columns); -@end group -@end example - -@noindent The @code{precision} field may take the following values: -@itemize @bullet -@item @code{OSL_PRECISION_SP} for 32 bits precision, -@item @code{OSL_PRECISION_DP} for 64 bits precision, -@item @code{OSL_PRECISION_MP} for multiple precision, -@end itemize - -@node Deallocating -@subsection Deallocating: osl_@emph{structure}_free - -@example -@group -void osl_@emph{structure}_free(osl_@emph{structure}_p s); -@end group -@end example - -@noindent Each OpenScop data structure has a memory deallocation function -as shown above. It recursively frees the memory allocated for the -structure pointed by @code{s}, i.e., internal structures are also freed. - -@node Cloning -@subsection Cloning: osl_@emph{structure}_clone - -@example -@group -osl_@emph{structure}_p osl_@emph{structure}_clone(osl_@emph{structure}_p s); -@end group -@end example - -@noindent Each OpenScop data structure has a clone function -as shown above. It recursively copies the content of the -structure pointed by @code{s}, i.e., internal structures are also copied. -It returns a pointer to the clone of the structure pointed by @code{s}. - -@node Testing -@subsection Testing: osl_@emph{structure}_equal - -@example -@group -int osl_@emph{structure}_equal(osl_@emph{structure}_p s1, osl_@emph{structure}_p s2); -@end group -@end example - -@noindent Each OpenScop data structure has a testing function -as shown above. It checks whether two pointers are referring to equivalent -structures (either by pointing to the same structure or to different -structures which contain the same information). It returns 1 if the -pointed structures are equivalent, 0 otherwise. This test is -@emph{content-based} and is intended for debugging purpose. It is not -(and will never be) able to state, e.g., that two relations with -different constraint matrices are actually representing the same relation. - - -@node Example of OpenScop Library Utilization -@section Example of OpenScop Library Utilization -Here is a basic example showing how it is possible to use the -OpenScop Library, assuming that a standard installation has been done. -The following C program reads an OpenScop file from the standard -input and dumps the content of the data structures to the standard output. - -@example -/* example.c */ -# include -# include - -int main() @{ - osl_scop_p scop; - - // Read the OpenScop file. - scop = osl_scop_read(stdin); - - // Dump the content of the scop data structure. - osl_scop_dump(stdout, scop); - - // Save the planet. - osl_scop_free(scop); - - return 0; -@} -@end example - -@noindent The compilation command could be: -@example -gcc example.c -losl -o example -@end example -@noindent A calling command with the input file test.scop could be: -@example -more test.scop | ./example -@end example - - -@c % ****************************** INSTALLING ******************************** -@node Installation -@section Installation - -@menu -* License:: -* Requirements:: -* Installation Instructions:: -* Optional Features:: -* Uninstallation:: -@end menu - -@node License -@subsection License -First of all, it would be very kind to refer the present document in any -publication that results from the use of the OpenScop specification or library, -@pxref{Bas11} (a bibtex entry is provided behind the title page of this -manual, along with the copyright notice). -The OpenScop Library is provided under the 3-clause BSD license: - -Copyright (C) 2011 University Paris-Sud 11 and INRIA - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -@enumerate -@item Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -@item Redistributions in binary form must reproduce the above copyrigh - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -@item The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission -@end enumerate - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@node Requirements -@subsection Requirements - -The OpenScop Library is a stand-alone library. For a basic use, -it does not need any additional tool or library. Anyway, to be able to -work in conjunction with other tools that manipulate multiple precision -numbers, the GNU GMP library can be used as an option. - -@menu -* GMP Library:: -@end menu - - -@node GMP Library -@subsubsection GMP Library (optional) - -To be able to deal with insanely large coefficient, the user will need to -install the GNU Multiple Precision Library (GMP for short) version 4.2.2 -or above@footnote{@code{http://www.swox.com/gmp}}. -The user can compile it by typing the following commands on the GMP root -directory: - -@itemize @bullet -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -The GMP default installation is @code{/usr/local}. This directory may -not be inside the user's library path. To fix the problem, the user should set -@example -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib -@end example -@noindent if your shell is, e.g., bash or -@example -setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib -@end example -@noindent if your shell is, e.g., tcsh. Add the line to your .bashrc or .tcshrc (or -whatever convenient file) to make this change permanent. Another solution -is to ask GMP to install in the standard path by using the prefix -option of the configure script: -@samp{./configure --prefix=/usr}. - -The OpenScop Library has to be built using the GMP library by specifying -the convenient configure script options to buid the GMP version -(@pxref{Optional Features}). - - -@node Installation Instructions -@subsection Installation Instructions - -Once downloaded and unpacked -(e.g. using the @samp{tar -zxvf openscop-@value{LIB_VERSION}.tar.gz} command), -you can compile the OpenScop Library by typing the following commands -on the OpenScop Library's root directory: - -@itemize @bullet -@item @code{./autogen.sh} -@item @code{./configure} -@item @code{make} -@item And as root: @code{make install} -@end itemize - -The program binaries and object files can be removed from the -source code directory by typing @code{make clean}. To also remove the -files that the @code{configure} script created (so you can compile the -package for a different kind of computer) type @code{make distclean}. - -@node Optional Features -@subsection Optional Features -The @code{configure} shell script attempts to guess correct values for -various system-dependent variables and user options used during compilation. -It uses those values to create the @code{Makefile}. Various user options -are provided by the OpenScop Library's configure script. They are summarized in the -following list and may be printed by typing @code{./configure --help} in the -OpenScop Library top-level directory. - -@itemize @bullet -@item By default, the installation directory is @code{/usr/local}: -@code{make install} will install the package's files in -@code{/usr/local/bin}, @code{/usr/local/lib} and @code{/usr/local/include}. -The user can specify an installation prefix other than @code{/usr/local} by -giving @code{configure} the option @code{--prefix=PATH}. - -@item By default, The OpenScop Library is built in 64bits version. -If the user gives to @code{configure} the option -@code{--enable-int-version}, the 32bits version of the OpenScop Library -will be compiled. In the same way, the option @code{--enable-mp-version} -has to be used to build the multiple precision version. - -@item By default, @code{configure} will look for the GMP library -(necessary to build the multiple precision version) in standard -locations. If necessary, the user can specify the GMP path by giving -@code{configure} the option @code{--with-gmp=PATH}. -@end itemize - -@node Uninstallation -@subsection Uninstallation -The user can easily remove the OpenScop Library from his system -by typing (as root if necessary) from the OpenScop Library top-level -directory -@code{make uninstall}. - -@c % **************************** DOCUMENTATION ****************************** -@node Documentation -@section Documentation -The OpenScop Library distribution provides several sources of documentation. -First, the source code itself is as documented as much as possible. -The code comments use the Doxygen technical documentation system. -The user may install -Doxygen@footnote{@code{http://www.stack.nl/~dimitri/doxygen}} to automatically -generate a technical documentation by typing @code{make doc} or -@code{doxygen ./autoconf/Doxyfile} at the OpenScop Library -top-level directory after running the configure script -(@pxref{Installation Instructions}). Doxygen will generate -documentation sources (in HTML, LaTeX and man) in the @code{doc/source} -directory of the OpenScop Library distribution. - -The Texinfo source of the present document is also provided in the @code{doc} -directory. The user can build it in either PDF format -(by typing @code{texi2pdf openscop.texi}) or HTML format -(by typing @code{makeinfo --html openscop.texi}, using @code{--no-split} -option to generate a single HTML file) or info format -(by typing @code{makeinfo openscop.texi}). - -@c % **************************** DEVELOPPING ******************************** -@node Development -@section Development - -@menu -* Copyright Issue:: -* Repository:: -* Coding Style:: -* Extension Development:: -@end menu - -@node Copyright Issue -@subsection Copyright Issue - -The OpenScop Library is an Open Source project and you should feel free to -contribute by adding functionalities (in particular extensions), correcting -bugs or improving documentation. However, for painful administrative reasons, -the copyright of the core part (everything except extensions) should not be -impacted by your work. Hence, if you are doing a significant contribution to -the main part, the OpenScop Library maintainer may ask you for an agreement -about this copyright. If you plan to do such a significant contribution, it -may be wise to discuss this issue with the maintainer first. Extensions -may include developer's own copyright. - -@node Repository -@subsection Repository - -The main repository of the OpenScop Library is -@url{http://repo.or.cz/w/openscop.git}. Developers may ask the OpenScop Library -maintainer to open them a write access to this repository. Only the maintainer -should ever change the @code{master} branch. Developers should work on their -own branches. To avoid any problem developers should use the @emph{fork} -functionality of the repository. - -@node Coding Style -@subsection Coding Style - -The OpenScop Library is written in C using an object oriented style. Each -important data structure (e.g., @code{struct foo}) has its own header file -(@code{include/osl/foo.h}) where lies the definition of -the data structure, the two typedefs for the data structure (one for the -structure, @code{osl_foo_t}, and one for a pointer -to the structure, @code{osl_foo_p}), the prototypes of the various -functions related to this data structure, all named using the -prefix "@code{osl_foo_}". The source code of the functions is provided in a -separated C file (@code{source/foo.c}). - -Utility functions independent from the main data structures may be placed in -separate source files (e.g., definition in @code{include/osl/util.h} -and code in @code{source/util.c}). Tool-wide preprocessor directives are -placed in @code{include/osl/macros.h}, macros are prefixed with -"@code{OSL_}". - -The core code itself has to be written according to the Google C++ Coding Style: -@url{http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml} (for -what can apply to C), plus the naming conventions discussed above with -highest priority. The extension parts must only respect the naming convention, -but a consistent coding style is much appreciated. - -@node Extension Development -@subsection Extension Development - -It's fairly easy to integrate a new extension to OpenScop and the OpenScop -Library. Developing a new extension is very much like adding a new "object": -it requires writing a data structure for the extension data and the 7 base -functions to manage this extension. Here is how developers should proceed -to add an extension called @code{foo} (beware that the naming convention is -strict): - -@enumerate -@item Send the name @code{foo} to the maintainer to ensure it is unique and - hence can be used as an URI. The name (one single - word, or words separated with underscores "_") should be - suggested by the extension developers to the OpenScop development - mailing list @email{openscop-development@@googlegroups.com}). It - should not correspond to an existing structure name - (see @code{include/osl/osl.h} for the list). The - maintainer will update @code{include/osl/osl.h} in the development - version accordingly. -@item Look at the @code{comment} extension. The @code{comment} extension - (@pxref{Comment Extension}) has been written to be used as a basic - example for extension developers. Having a look at - @code{include/osl/extensions/comment.h} and - @code{source/extensions/comment.c} will be a great help to do it right. -@item Create the extension data structure: it is necessary that the - extension data can be accessible through only one pointer. -@item Code the 7 base functions for the extension. Any extension must provide - this set of functions (naming convention apply only if the - extension is planed to be integrated to the OpenScop Library - default extensions): - @itemize @bullet - @item @code{osl_foo_idump} (@pxref{Dumping}) - @item @code{osl_foo_sprint} has the following prototype: -@example -@group -char * osl_@emph{structure}_sprint(osl_@emph{structure}_p s); -@end group -@end example - It corresponds to the pretty printing functions of the core - data structures (@pxref{Printing}) with the - difference that the OpenScop textual representation is written - to a string (returned by the function) instead of a file. - @item @code{osl_foo_sread} has the following prototype: -@example -@group -osl_@emph{structure}_p osl_@emph{structure}_sread(char ** string); -@end group -@end example - It corresponds to the reading functions of the core - data structures (@pxref{Reading}) with the - difference that the OpenScop textual representation is read - from a string (provided as a parameter) instead of a file. - The address of the string to read is passed as a parameter and - is updated to point immediately after what has been actually read. - @item @code{osl_foo_malloc} (@pxref{Allocating}) - @item @code{osl_foo_free} (@pxref{Deallocating}) - @item @code{osl_foo_clone} (@pxref{Cloning}) - @item @code{osl_foo_equal} (@pxref{Testing}) - @end itemize -@item Code the other functions you need! -@end enumerate - -Now let us consider two scenarios. - -First scenario, the extension is external and is -not planned to be integrated to the OpenScop Library. In this case you are -all set. Simply generate an @code{osl_interface_t} for your -extension and have a look at the function -@code{osl_scop_register_extension()} which is devoted to register -a new extension interface to an existing @code{osl_scop_t}. - -Second scenario, the extension will integrate the set of default -OpenScop Library extensions (the best solution to share it to other -potential users). In this case, a few additional -things have to be done: -@enumerate -@item Create the extension header - @code{include/osl/extensions/foo.h} to store the extension - structure and function prototypes and the - extension source file @code{source/extensions/foo.c} for the code - of the functions. -@item Add the documentation for the extension to the texinfo source of - this document (in @code{doc/openscop.texi}), following the example - of the @code{comment} documentation (@pxref{Comment Extension}). -@item Integrate the extension by adding the @code{extensions/foo.c} entry - to the @code{libosl_la_SOURCES} in the @code{source/Makefile.am} - file, the @code{osl/foo.h} entry to the - @code{nobase_pkginclude_HEADERS} and add the corresponding - @code{#include } in the - @code{include/scop.h.in} file. -@item Add the new extension in the - @code{osl_interface_get_default_registry()} function. -@item You are done! Prepare a single commit or patch corresponding to the - integration of the new extension and ask the maintainer to merge it - to the master branch. -@end enumerate - - -@c % ****************************** REFERENCES ******************************** -@node References -@chapter References - -@itemize -@item -@anchor{Bas03a}[Bas03a] C. Bastoul, P. Feautrier. Improving data locality -by chunking. CC'12 International Conference on Compiler Construction, -LNCS 2622, pages 320-335, Warsaw, April 2003. - -@item -@anchor{Bas11}[Bas11] C. Bastoul. -OpenScop: A Specification and a Library for Data Exchange in Polyhedral -Compilation Tools. Technical Report, Paris-Sud University, France, June 2011. - -@item -@anchor{Fea92}[Fea92] P. Feautrier. Some efficient solutions to the affine -scheduling problem, part II: multidimensional time. -International Journal of Parallel Programming, 21(6):389--420, December 1992. - -@item -@anchor{Gri04}[Gri04] M. Griebl. Automatic parallelization of loop programs -for distributed memory architectures. Habilitation Thesis. Facult@"at f@"ur -Mathematik und Informatik, Universit@"at Passau, 2004. -@emph{http://www.infosun.fmi.uni-passau.de/cl/loopo/} - -@item -@anchor{Wil93}[Wil93] Doran K. Wilde. -A library for doing polyhedral operations. -Technical Report 785, IRISA, Rennes, France, 1993. - -@end itemize - - - - -@c % /************************************************************************* -@c % * PART VI: END OF THE DOCUMENT * -@c % *************************************************************************/ -@c @unnumbered Index - -@c @printindex cp - -@bye diff --git a/cloog-0.17.0/osl/include/Makefile.am b/cloog-0.17.0/osl/include/Makefile.am deleted file mode 100644 index 52305c808bd6a3be748c2fb468c259c27e2f097d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/Makefile.am +++ /dev/null @@ -1,102 +0,0 @@ -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in - -############################################################################# - -pkginclude_HEADERS = \ - osl/osl.h \ - osl/statement.h \ - osl/interface.h \ - osl/generic.h \ - osl/vector.h \ - osl/relation.h \ - osl/relation_list.h \ - osl/macros.h \ - osl/int.h \ - osl/names.h \ - osl/strings.h \ - osl/body.h \ - osl/util.h \ - osl/scop.h - -pkgextensionsincludedir = $(pkgincludedir)/extensions -pkgextensionsinclude_HEADERS = \ - osl/extensions/textual.h \ - osl/extensions/comment.h \ - osl/extensions/scatnames.h \ - osl/extensions/arrays.h \ - osl/extensions/lines.h \ - osl/extensions/irregular.h - diff --git a/cloog-0.17.0/osl/include/Makefile.in b/cloog-0.17.0/osl/include/Makefile.in deleted file mode 100644 index 76284f9a59b979b63cfd2c47c63a33e0afb0c683..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/Makefile.in +++ /dev/null @@ -1,731 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = include -DIST_COMMON = $(pkgextensionsinclude_HEADERS) $(pkginclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/autoconf/libtool.m4 \ - $(top_srcdir)/autoconf/ltoptions.m4 \ - $(top_srcdir)/autoconf/ltsugar.m4 \ - $(top_srcdir)/autoconf/ltversion.m4 \ - $(top_srcdir)/autoconf/lt~obsolete.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkgextensionsincludedir)" \ - "$(DESTDIR)$(pkgincludedir)" -HEADERS = $(pkgextensionsinclude_HEADERS) $(pkginclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_aux_dir = @ac_aux_dir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in - -############################################################################# -pkginclude_HEADERS = \ - osl/osl.h \ - osl/statement.h \ - osl/interface.h \ - osl/generic.h \ - osl/vector.h \ - osl/relation.h \ - osl/relation_list.h \ - osl/macros.h \ - osl/int.h \ - osl/names.h \ - osl/strings.h \ - osl/body.h \ - osl/util.h \ - osl/scop.h - -pkgextensionsincludedir = $(pkgincludedir)/extensions -pkgextensionsinclude_HEADERS = \ - osl/extensions/textual.h \ - osl/extensions/comment.h \ - osl/extensions/scatnames.h \ - osl/extensions/arrays.h \ - osl/extensions/lines.h \ - osl/extensions/irregular.h - -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-pkgextensionsincludeHEADERS: $(pkgextensionsinclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgextensionsincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgextensionsincludedir)" - @list='$(pkgextensionsinclude_HEADERS)'; test -n "$(pkgextensionsincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgextensionsincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgextensionsincludedir)" || exit $$?; \ - done - -uninstall-pkgextensionsincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkgextensionsinclude_HEADERS)'; test -n "$(pkgextensionsincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgextensionsincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgextensionsincludedir)" && rm -f $$files -install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - -uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(pkgextensionsincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-pkgextensionsincludeHEADERS \ - install-pkgincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-pkgextensionsincludeHEADERS \ - uninstall-pkgincludeHEADERS - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pkgextensionsincludeHEADERS install-pkgincludeHEADERS \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-pkgextensionsincludeHEADERS \ - uninstall-pkgincludeHEADERS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/osl/include/osl/body.h b/cloog-0.17.0/osl/include/osl/body.h deleted file mode 100644 index b4e905f46e8da30757c5c3e36c5d185c2e2b643e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/body.h +++ /dev/null @@ -1,125 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** body.h ** - **-----------------------------------------------------------------** - ** First version: 25/06/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_BODY_H -# define OSL_BODY_H - -# include -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - -# define OSL_URI_BODY "body" - -/** - * The osl_body_t structure stores a statement body in a textual form. - * The complete original expression (directly copy-pasted from the original - * code) is in the expression field while the textual forms of the original - * iterators are in the iterators field. They may be used for substitutions - * inside the expression. - */ -struct osl_body { - osl_strings_p iterators; /**< Original iterators */ - osl_strings_p expression; /**< Original statement expression */ -}; -typedef struct osl_body osl_body_t; -typedef struct osl_body * osl_body_p; - - -/*---------------------------------------------------------------------------+ - | Structure display function | - +---------------------------------------------------------------------------*/ -void osl_body_idump(FILE *, osl_body_p, int); -void osl_body_dump(FILE *, osl_body_p); -char * osl_body_sprint(osl_body_p); -void osl_body_print(FILE *, osl_body_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_body_p osl_body_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_body_p osl_body_malloc(); -void osl_body_free(osl_body_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_body_p osl_body_clone(osl_body_p); -int osl_body_equal(osl_body_p, osl_body_p); -osl_interface_p osl_body_interface(); - -# if defined(__cplusplus) - } -# endif -#endif /* define OSL_BODY_H */ diff --git a/cloog-0.17.0/osl/include/osl/extensions/arrays.h b/cloog-0.17.0/osl/include/osl/extensions/arrays.h deleted file mode 100644 index f1c1cfd7f11c46474dbc61440892722bd54e7b11..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/extensions/arrays.h +++ /dev/null @@ -1,129 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/arrays.h ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_ARRAYS_H -# define OSL_ARRAYS_H - -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -# define OSL_URI_ARRAYS "arrays" -# define OSL_TAG_ARRAYS_START "<"OSL_URI_ARRAYS">" -# define OSL_TAG_ARRAYS_STOP "" - - -/** - * The osl_arrays_t structure stores a set of array names in - * the extension part of the OpenScop representation. Each name - * has a name string and an identifier: the ith name as name - * string names[i] and identifier id[i]. - */ -struct osl_arrays { - int nb_names; /**< Number of names. */ - int * id; /**< Array of nb_names identifiers. */ - char ** names; /**< Array of nb_names names. */ -}; -typedef struct osl_arrays osl_arrays_t; -typedef struct osl_arrays * osl_arrays_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_arrays_idump(FILE *, osl_arrays_p, int); -void osl_arrays_dump(FILE *, osl_arrays_p); -char * osl_arrays_sprint(osl_arrays_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_arrays_p osl_arrays_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_arrays_p osl_arrays_malloc(); -void osl_arrays_free(osl_arrays_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_arrays_p osl_arrays_clone(osl_arrays_p); -int osl_arrays_equal(osl_arrays_p, osl_arrays_p); -char ** osl_arrays_generate_names(osl_arrays_p, int *); -osl_interface_p osl_arrays_interface(); - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_ARRAYS_H */ diff --git a/cloog-0.17.0/osl/include/osl/extensions/comment.h b/cloog-0.17.0/osl/include/osl/extensions/comment.h deleted file mode 100644 index 1b9edee308c22c84b171a1ac2abfa115fc62a921..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/extensions/comment.h +++ /dev/null @@ -1,123 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/comment.h ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_COMMENT_H -# define OSL_COMMENT_H - -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -# define OSL_URI_COMMENT "comment" - - -/** - * The osl_comment_t structure stores a comment extention to the core - * OpenScop representation. It is simply a 0-terminated string. - */ -struct osl_comment { - char * comment; /**< A comment message as a 0-terminated string. */ -}; -typedef struct osl_comment osl_comment_t; -typedef struct osl_comment * osl_comment_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_comment_idump(FILE *, osl_comment_p, int); -void osl_comment_dump(FILE *, osl_comment_p); -char * osl_comment_sprint(osl_comment_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_comment_p osl_comment_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_comment_p osl_comment_malloc(); -void osl_comment_free(osl_comment_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_comment_p osl_comment_clone(osl_comment_p); -int osl_comment_equal(osl_comment_p, osl_comment_p); -osl_interface_p osl_comment_interface(); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_COMMENT_H */ diff --git a/cloog-0.17.0/osl/include/osl/extensions/irregular.h b/cloog-0.17.0/osl/include/osl/extensions/irregular.h deleted file mode 100644 index 74b120694962f9581afb42c2b08347e2fc4e3da1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/extensions/irregular.h +++ /dev/null @@ -1,149 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/irregular.h ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_IRREGULAR_H -# define OSL_IRREGULAR_H - -# include -# include -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -# define OSL_URI_IRREGULAR "irregular" -# define OSL_TAG_IRREGULAR_START "<"OSL_URI_IRREGULAR">" -# define OSL_TAG_IRREGULAR_STOP "" - - -/** - * The osl_irregular_t structure stores an irregular extension to the core - * OpenScop representation. It contains a list of predicates (in their textual - * representation), and for each statement, its list of associated predicates. - * The list of predicates contains both control and exit predicates (see - * Benabderrhamane et al.'s paper at CC'2010), control predicates are listed - * first, then come exit predicates. - */ -struct osl_irregular { - // List of predicates (textual representation). - int nb_control; /**< Number of control predicates in the SCoP. */ - int nb_exit; /**< Number of exit predicates in the SCoP. */ - int * nb_iterators; /**< nb_iterators[i]: #iterators for ith predicate. */ - char *** iterators; /**< iterators[i]: array of (nb_control + nb_exit) - arrays of nb_iterators[i] strings. Each element - corresponds to the list of original iterators - for the ith predicate. */ - char ** body; /**< body[i]: original source code of ith predicate. */ - - // List of associated predicates for each statement. - int nb_statements; /**< Number of statements in the SCoP. */ - int * nb_predicates; /**< nb_predicates[i]: #predicates for ith statement. */ - int ** predicates; /**< predicates[i]: array of nb_predicates[i] predicates - corresponding to the list of predicates associated - to the ith statement. */ -}; -typedef struct osl_irregular osl_irregular_t; -typedef struct osl_irregular * osl_irregular_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_irregular_idump(FILE *, osl_irregular_p, int); -void osl_irregular_dump(FILE *, osl_irregular_p); -char * osl_irregular_sprint(osl_irregular_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_irregular_p osl_irregular_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_irregular_p osl_irregular_malloc(); -void osl_irregular_free(osl_irregular_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_irregular_p osl_irregular_clone(osl_irregular_p); -int osl_irregular_equal(osl_irregular_p, osl_irregular_p); -osl_irregular_p osl_irregular_add_control(osl_irregular_p, char**, int, char*); -osl_irregular_p osl_irregular_add_exit(osl_irregular_p, char**, int, char*); -osl_irregular_p osl_irregular_add_predicates(osl_irregular_p, int*, int); -osl_interface_p osl_irregular_interface(); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_IRREGULAR_H */ diff --git a/cloog-0.17.0/osl/include/osl/extensions/lines.h b/cloog-0.17.0/osl/include/osl/extensions/lines.h deleted file mode 100644 index 9695e51ebc2295a6e1aadaf09a3d6765bcc73270..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/extensions/lines.h +++ /dev/null @@ -1,127 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/lines.h ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_LINES_H -# define OSL_LINES_H - -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -# define OSL_URI_LINES "lines" -# define OSL_TAG_LINES_START "<"OSL_URI_LINES">" -# define OSL_TAG_LINES_STOP "" - - -/** - * The osl_lines_t structure stores a lines extention to the core - * OpenScop representation. It provides information about the line - * numbers of the SCoP in the original source file. - */ -struct osl_lines { - int start; /**< First line of the SCoP in the original source file. */ - int end; /**< Last line of the SCoP in the original source file. */ -}; -typedef struct osl_lines osl_lines_t; -typedef struct osl_lines * osl_lines_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_lines_idump(FILE *, osl_lines_p, int); -void osl_lines_dump(FILE *, osl_lines_p); -char * osl_lines_sprint(osl_lines_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_lines_p osl_lines_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_lines_p osl_lines_malloc(); -void osl_lines_free(osl_lines_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_lines_p osl_lines_clone(osl_lines_p); -int osl_lines_equal(osl_lines_p, osl_lines_p); -osl_interface_p osl_lines_interface(); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_LINES_H */ diff --git a/cloog-0.17.0/osl/include/osl/extensions/scatnames.h b/cloog-0.17.0/osl/include/osl/extensions/scatnames.h deleted file mode 100644 index 77ad402c650428c1b43148e3d251d71273313f81..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/extensions/scatnames.h +++ /dev/null @@ -1,127 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/scatnames.h ** - **-----------------------------------------------------------------** - ** First version: 03/12/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_SCATNAMES_H -# define OSL_SCATNAMES_H - -# include -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -# define OSL_URI_SCATNAMES "scatnames" - - -/** - * The osl_scatnames_t structure stores a scatnames extention to the core - * OpenScop representation. It is devoted to store the scattering dimension - * names in a textual form. The names are stored using an osl_strings_t - * structure and their order in the array corresponds to their dimension - * order. - */ -struct osl_scatnames { - osl_strings_p names; /**< List of textual scattering dimension names. */ -}; -typedef struct osl_scatnames osl_scatnames_t; -typedef struct osl_scatnames * osl_scatnames_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_scatnames_idump(FILE *, osl_scatnames_p, int); -void osl_scatnames_dump(FILE *, osl_scatnames_p); -char * osl_scatnames_sprint(osl_scatnames_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_scatnames_p osl_scatnames_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_scatnames_p osl_scatnames_malloc(); -void osl_scatnames_free(osl_scatnames_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_scatnames_p osl_scatnames_clone(osl_scatnames_p); -int osl_scatnames_equal(osl_scatnames_p, osl_scatnames_p); -osl_interface_p osl_scatnames_interface(); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_SCATNAMES_H */ diff --git a/cloog-0.17.0/osl/include/osl/extensions/textual.h b/cloog-0.17.0/osl/include/osl/extensions/textual.h deleted file mode 100644 index 91ee79088dc568bcab7fb2be54a697b6423b9465..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/extensions/textual.h +++ /dev/null @@ -1,123 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/textual.h ** - **-----------------------------------------------------------------** - ** First version: 15/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_TEXTUAL_H -# define OSL_TEXTUAL_H - -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -# define OSL_URI_TEXTUAL "textual" - - -/** - * The osl_textual_t structure stores the complete textual - * representation of the scop extension field. It is a special case of - * extension since it does not require start and end tag. - */ -struct osl_textual { - char * textual; /**< Full extension string as a 0-terminated string. */ -}; -typedef struct osl_textual osl_textual_t; -typedef struct osl_textual * osl_textual_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_textual_idump(FILE *, osl_textual_p, int); -void osl_textual_dump(FILE *, osl_textual_p); -char * osl_textual_sprint(osl_textual_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_textual_p osl_textual_sread(char **); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_textual_p osl_textual_malloc(); -void osl_textual_free(osl_textual_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_textual_p osl_textual_clone(osl_textual_p); -int osl_textual_equal(osl_textual_p, osl_textual_p); -osl_interface_p osl_textual_interface(); - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_TEXTUAL_H */ diff --git a/cloog-0.17.0/osl/include/osl/generic.h b/cloog-0.17.0/osl/include/osl/generic.h deleted file mode 100644 index 6061478d3eca7c0c83a396301b3acb2cea069a5b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/generic.h +++ /dev/null @@ -1,127 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** generic.h ** - **-----------------------------------------------------------------** - ** First version: 26/11/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_generic_H -# define OSL_generic_H - -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The osl_generic_t structure stores OpenScop data and operations with - * no pre-defined type. The information is accessible through the data pointer - * while the type and operations are accessible through the interface pointer. - * A generic is a also a node of a NULL-terminated linked list of generics. - */ -struct osl_generic { - void * data; /**< Pointer to the data. */ - osl_interface_p interface; /**< Interface to work with the data. */ - struct osl_generic * next; /**< Pointer to the next generic. */ -}; -typedef struct osl_generic osl_generic_t; -typedef struct osl_generic * osl_generic_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_generic_idump(FILE *, osl_generic_p, int); -void osl_generic_dump(FILE *, osl_generic_p); -void osl_generic_print(FILE *, osl_generic_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_generic_p osl_generic_sread(char *, osl_interface_p); -osl_generic_p osl_generic_read_one(FILE *, osl_interface_p); -osl_generic_p osl_generic_read(FILE *, osl_interface_p); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -void osl_generic_add(osl_generic_p*, osl_generic_p); -osl_generic_p osl_generic_malloc(); -void osl_generic_free(osl_generic_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_generic_p osl_generic_clone(osl_generic_p); -int osl_generic_equal(osl_generic_p, osl_generic_p); -int osl_generic_has_URI(osl_generic_p, char *); -void * osl_generic_lookup(osl_generic_p, char *); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_generic_H */ diff --git a/cloog-0.17.0/osl/include/osl/int.h b/cloog-0.17.0/osl/include/osl/int.h deleted file mode 100644 index 61bb7096c99d5eed18b1b0521b2fc26cc82a005f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/int.h +++ /dev/null @@ -1,124 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** int.h ** - **-----------------------------------------------------------------** - ** First version: 18/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_INT_H -# define OSL_INT_H - -#include - -typedef void * osl_int_p; - - -/*+*************************************************************************** - * Basic Functions * - *****************************************************************************/ - - -void osl_int_dump_precision(FILE *, int); -int osl_int_sizeof(int); -void * osl_int_address(int, void *, int); -void osl_int_init(int, void *, int); -void * osl_int_malloc(int); -void osl_int_assign(int, void *, int, void *, int); -void osl_int_set_si(int, void *, int, int); -int osl_int_get_si(int, void *, int); -void osl_int_init_set_si(int, void *, int, int); -void osl_int_clear(int, void *, int); -void osl_int_free(int, void *, int); -void osl_int_print(FILE *, int, void *, int); -void osl_int_sprint(char *, int, void *, int); -void osl_int_sprint_txt(char *, int, void *, int); -void osl_int_sread(char **, int, void *, int); - - -/*+*************************************************************************** - * Arithmetic Operations * - *****************************************************************************/ - - -void osl_int_increment(int, void *, int, void *, int); -void osl_int_decrement(int, void *, int, void *, int); -void osl_int_add(int, void *, int, void *, int, void *, int); -void osl_int_add_si(int, void *, int, void *, int, int); -void osl_int_mul(int, void *, int, void *, int, void *, int); -void osl_int_mul_si(int, void *, int, void *, int, int); -void osl_int_sub(int, void *, int, void *, int, void *, int); -void osl_int_oppose(int, void *, int, void *, int); - - -/*+*************************************************************************** - * Conditional Operations * - *****************************************************************************/ - - -int osl_int_eq(int, void *, int, void *, int); -int osl_int_ne(int, void *, int, void *, int); -int osl_int_pos(int, void *, int); -int osl_int_neg(int, void *, int); -int osl_int_zero(int, void *, int); -int osl_int_one(int, void *, int); -int osl_int_mone(int, void *, int); -int osl_int_divisible(int, void *, int, void *, int); - - -#endif /* define OSL_INT_H */ diff --git a/cloog-0.17.0/osl/include/osl/interface.h b/cloog-0.17.0/osl/include/osl/interface.h deleted file mode 100644 index c711d244143c789a2542130f2790377c635ee879..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/interface.h +++ /dev/null @@ -1,137 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** interface.h ** - **-----------------------------------------------------------------** - ** First version: 15/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_INTERFACE_H -# define OSL_INTERFACE_H - -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -typedef void (*osl_idump_f) (FILE *, void *, int); -typedef char * (*osl_sprint_f)(void *); -typedef void * (*osl_sread_f) (char **); -typedef void * (*osl_malloc_f)(); -typedef void (*osl_free_f) (void *); -typedef void * (*osl_clone_f) (void *); -typedef int (*osl_equal_f) (void *, void *); - - -/** - * The osl_interface structure stores the URI and base - * functions pointers an openscop object implementation has to offer. It - * is a node in a NULL-terminated list of interfaces. - */ -struct osl_interface { - char * URI; /**< Unique identifier string */ - osl_idump_f idump; /**< Pointer to idump function */ - osl_sprint_f sprint; /**< Pointer to sprint function */ - osl_sread_f sread; /**< Pointer to sread function */ - osl_malloc_f malloc; /**< Pointer to malloc function */ - osl_free_f free; /**< Pointer to free function */ - osl_clone_f clone; /**< Pointer to clone function */ - osl_equal_f equal; /**< Pointer to equal function */ - struct osl_interface * next; /**< Next interface in the list */ -}; -typedef struct osl_interface osl_interface_t; -typedef struct osl_interface * osl_interface_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_interface_idump(FILE *, osl_interface_p, int); -void osl_interface_dump(FILE *, osl_interface_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -void osl_interface_add(osl_interface_p *, osl_interface_p); -osl_interface_p osl_interface_malloc(); -void osl_interface_free(osl_interface_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_interface_p osl_interface_nclone(osl_interface_p, int); -osl_interface_p osl_interface_clone(osl_interface_p); -int osl_interface_equal(osl_interface_p, osl_interface_p); -osl_interface_p osl_interface_lookup(osl_interface_p, char *); -osl_interface_p osl_interface_get_default_registry(); - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_INTERFACE_H */ diff --git a/cloog-0.17.0/osl/include/osl/macros.h b/cloog-0.17.0/osl/include/osl/macros.h deleted file mode 100644 index 536ed91dd26e69eb72ad911625ba51a97d4914b9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/macros.h +++ /dev/null @@ -1,176 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** macros.h ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_MACROS_H -# define OSL_MACROS_H - -# define OSL_DEBUG 0 // 1 for debug mode, 0 otherwise. - -# define OSL_TAG_START_SCOP "" -# define OSL_TAG_END_SCOP "" - -# define OSL_PRECISION_ENV "OSL_PRECISION" -# define OSL_PRECISION_ENV_SP "32" -# define OSL_PRECISION_ENV_DP "64" -# define OSL_PRECISION_ENV_MP "0" -# define OSL_PRECISION_SP 32 -# define OSL_PRECISION_DP 64 -# define OSL_PRECISION_MP 0 - -# define OSL_FMT_SP "%4ld" -# define OSL_FMT_DP "%4lld" -# define OSL_FMT_MP "%4s" -# define OSL_FMT_LENGTH 4 // Should be the same as FMT_*P. -# define OSL_FMT_TXT_SP "%ld" -# define OSL_FMT_TXT_DP "%lld" -# define OSL_FMT_TXT_MP "%s" - - -# define OSL_BACKEND_C 0 -# define OSL_BACKEND_FORTRAN 1 -# define OSL_UNDEFINED -1 -# define OSL_MAX_STRING 2048 -# define OSL_MAX_ARRAYS 128 - -# define OSL_TYPE_GENERIC 0 -# define OSL_TYPE_STRING 1 -# define OSL_TYPE_CONTEXT 2 -# define OSL_TYPE_DOMAIN 3 -# define OSL_TYPE_SCATTERING 4 -# define OSL_TYPE_ACCESS 5 -# define OSL_TYPE_READ 6 -# define OSL_TYPE_WRITE 7 -# define OSL_TYPE_MAY_WRITE 8 - -# define OSL_FAKE_ARRAY "fakearray" - -# define OSL_STRING_UNDEFINED "UNDEFINED" -# define OSL_STRING_CONTEXT "CONTEXT" -# define OSL_STRING_DOMAIN "DOMAIN" -# define OSL_STRING_SCATTERING "SCATTERING" -# define OSL_STRING_READ "READ" -# define OSL_STRING_WRITE "WRITE" -# define OSL_STRING_MAY_WRITE "MAY_WRITE" - -/*+*************************************************************************** - * UTILITY MACROS * - *****************************************************************************/ - -# define OSL_coucou(n) \ - do { \ - int i = n +0; \ - fprintf(stderr,"[osl] Coucou %d (%s).\n", i, __func__); \ - } while (0) - -# define OSL_debug(msg) \ - do { \ - if (OSL_DEBUG) \ - fprintf(stderr,"[osl] Debug: "msg" (%s).\n", __func__); \ - } while (0) - -# define OSL_info(msg) \ - do { \ - fprintf(stderr,"[osl] Info: "msg" (%s).\n", __func__); \ - } while (0) - -# define OSL_warning(msg) \ - do { \ - fprintf(stderr,"[osl] Warning: "msg" (%s).\n", __func__); \ - } while (0) - -# define OSL_error(msg) \ - do { \ - fprintf(stderr,"[osl] Error: "msg" (%s).\n", __func__); \ - exit(1); \ - } while (0) - -# define OSL_malloc(ptr, type, size) \ - do { \ - if (((ptr) = (type)malloc(size)) == NULL) \ - OSL_error("memory overflow"); \ - } while (0) - -# define OSL_realloc(ptr, type, size) \ - do { \ - if (((ptr) = (type)realloc(ptr, size)) == NULL) \ - OSL_error("memory overflow"); \ - } while (0) - -# define OSL_strdup(destination, source) \ - do { \ - if (source != NULL) { \ - if (((destination) = strdup(source)) == NULL) \ - OSL_error("memory overflow"); \ - } \ - else { \ - destination = NULL; \ - OSL_warning("strdup of a NULL string"); \ - } \ - } while (0) - -# define OSL_max(x,y) ((x) > (y)? (x) : (y)) - -# define OSL_min(x,y) ((x) < (y)? (x) : (y)) - - -#endif /* define OSL_MACROS_H */ diff --git a/cloog-0.17.0/osl/include/osl/names.h b/cloog-0.17.0/osl/include/osl/names.h deleted file mode 100644 index cd7dfc0abb22b0c133c68946ba9d09c49bf508da..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/names.h +++ /dev/null @@ -1,124 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/names.h ** - **-----------------------------------------------------------------** - ** First version: 18/05/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_NAMES_H -# define OSL_NAMES_H - -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The osl_names_t structure stores the various names (names of iterators, - * parameters...) necessary to generate a code from the OpenScop data - * structure. - */ -struct osl_names { - osl_strings_p parameters; /**< Parameter names */ - osl_strings_p iterators; /**< Iterator names */ - osl_strings_p scatt_dims; /**< Scattering dimension names */ - osl_strings_p local_dims; /**< Local dimension names */ - osl_strings_p arrays; /**< Array names */ -}; -typedef struct osl_names osl_names_t; -typedef struct osl_names * osl_names_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_names_idump(FILE *, osl_names_p, int); -void osl_names_dump(FILE *, osl_names_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_names_p osl_names_malloc(); -void osl_names_free(osl_names_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_names_p osl_names_clone(osl_names_p); -osl_names_p osl_names_generate(char *, int, char *, int, - char *, int, char *, int, - char *, int); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_NAMES_H */ diff --git a/cloog-0.17.0/osl/include/osl/osl.h b/cloog-0.17.0/osl/include/osl/osl.h deleted file mode 100644 index 9853e4daa66fec4dee483b60ebe79d99719127f8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/osl.h +++ /dev/null @@ -1,109 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** osl.h ** - **-----------------------------------------------------------------** - ** First version: 11/05/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_OSL_H -# define OSL_OSL_H - -/* List of reserved OpenScop URIs: - * - arrays - * - body - * - comment - * - generic - * - int - * - interface - * - irregular - * - lines - * - openscop - * - relation - * - relation_list - * - scatnames - * - scop - * - statement - * - strings - * - textual - * - vector - */ - -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include -# include -# include -# include - -# include -# include -# include - - -#endif /* define OSL_OSL_H */ diff --git a/cloog-0.17.0/osl/include/osl/relation.h b/cloog-0.17.0/osl/include/osl/relation.h deleted file mode 100644 index f540aafcd43e617af44828fdf5f3676e65208f88..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/relation.h +++ /dev/null @@ -1,184 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** relation.h ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_RELATION_H -# define OSL_RELATION_H - -# include -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The osl_relation_t structure stores a union of relations. It is a - * NULL-terminated linked list of relations. Each relation is described - * using a matrix where each row represents a linear constraint. The entries - * of each row are organised in the following order: - * - An equality/inequality tag: 0 means the row corresponds to an - * equality constraint == 0, 1 means it is an inequality >= 0. - * - The coefficients of the output dimensions. - * - The coefficients of the input dimensions (0 for a set). - * - The coefficients of the local (existentially quantified) dimensions. - * - The coefficients of the parameters. - * - The coefficient of the constant. - * Thus we have the following invariant: nb_columns = - * 1 + nb_output_dims + nb_input_dims + dims + nb_parameters + 1. - * Moreover we use the following conventions: - * - Sets (e.g., iteration domains) are the images of relations with a - * zero-dimensional domain, hence the number of input dimensions is 0. - * - The first output dimension of any access relations corresponds to - * the name of the array. - * The type field may provide some semantics about the relation, it may be: - * - Undefined : OSL_UNDEFINED, - * - An iteration domain : OSL_TYPE_DOMAIN, - * - A scattering relation : OSL_TYPE_SCATTERING, - * - An access relation : OSL_TYPE_ACCESS. - */ -struct osl_relation { - int type; /**< Semantics about the relation */ - int precision; /**< Precision of relation matrix elements*/ - int nb_rows; /**< Number of rows */ - int nb_columns; /**< Number of columns */ - int nb_output_dims; /**< Number of output dimensions */ - int nb_input_dims; /**< Number of input dimensions */ - int nb_local_dims; /**< Number of local (existentially - quantified) dimensions */ - int nb_parameters; /**< Number of parameters */ - void ** m; /**< An array of pointers to the beginning - of each row of the relation matrix */ - struct osl_relation * next; /**< Pointer to the next relation in the - union of relations (NULL if none) */ -}; -typedef struct osl_relation osl_relation_t; -typedef struct osl_relation * osl_relation_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_relation_idump(FILE *, osl_relation_p, int); -void osl_relation_dump(FILE *, osl_relation_p); -char * osl_relation_expression(osl_relation_p relation, - int row, char ** names); -char * osl_relation_spprint_polylib(osl_relation_p, osl_names_p); -char * osl_relation_spprint(osl_relation_p, osl_names_p); -void osl_relation_pprint(FILE *, osl_relation_p, osl_names_p); -void osl_relation_print(FILE *, osl_relation_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_relation_p osl_relation_pread(FILE *, int); -osl_relation_p osl_relation_read(FILE *); -osl_relation_p osl_relation_read_arrays(FILE *, char ***, int *); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_relation_p osl_relation_pmalloc(int, int, int); -osl_relation_p osl_relation_malloc(int, int); -void osl_relation_free_inside(osl_relation_p); -void osl_relation_free(osl_relation_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_relation_p osl_relation_nclone(osl_relation_p, int); -osl_relation_p osl_relation_clone(osl_relation_p); -void osl_relation_replace_vector(osl_relation_p, osl_vector_p, int); -void osl_relation_insert_vector(osl_relation_p, osl_vector_p, int); -void osl_relation_insert_blank_row(osl_relation_p, int); -void osl_relation_insert_blank_column(osl_relation_p, int); -void osl_relation_add_vector(osl_relation_p, osl_vector_p, int); -void osl_relation_sub_vector(osl_relation_p, osl_vector_p, int); -osl_relation_p osl_relation_from_vector(osl_vector_p); -void osl_relation_replace_constraints(osl_relation_p, - osl_relation_p, int); -void osl_relation_insert_constraints(osl_relation_p, - osl_relation_p, int); -void osl_relation_insert_columns(osl_relation_p, osl_relation_p,int); -osl_relation_p osl_relation_concat_constraints(osl_relation_p, osl_relation_p); -int osl_relation_equal(osl_relation_p, osl_relation_p); -int osl_relation_integrity_check(osl_relation_p, int, int, int,int); -osl_relation_p osl_relation_union(osl_relation_p, osl_relation_p); -void osl_relation_set_attributes(osl_relation_p, int, int, int, int); -void osl_relation_set_type(osl_relation_p, int); -int osl_relation_get_array_id(osl_relation_p); -int osl_relation_is_access(osl_relation_p); -void osl_relation_get_attributes(osl_relation_p, - int *, int *, int *, int *, int *); -osl_relation_p osl_relation_extend_output(osl_relation_p, int); - - -# if defined(__cplusplus) - } -# endif -#endif /* define OSL_RELATION_H */ diff --git a/cloog-0.17.0/osl/include/osl/relation_list.h b/cloog-0.17.0/osl/include/osl/relation_list.h deleted file mode 100644 index 6b17a7e4c43be56042db60243dc693f8462194e3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/relation_list.h +++ /dev/null @@ -1,136 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** relation_list.h ** - **-----------------------------------------------------------------** - ** First version: 08/10/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_RELATION_LIST_H -# define OSL_RELATION_LIST_H - -# include -# include - - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The osl_relation_list_t structure describes a (NULL-terminated - * linked) list of relations. - */ -struct osl_relation_list { - osl_relation_p elt; /**< An element of the list. */ - struct osl_relation_list * next; /**< Pointer to the next element - of the list.*/ -}; -typedef struct osl_relation_list osl_relation_list_t; -typedef struct osl_relation_list * osl_relation_list_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_relation_list_idump(FILE *, osl_relation_list_p, int); -void osl_relation_list_dump(FILE *, osl_relation_list_p); -void osl_relation_list_pprint_elts(FILE *, osl_relation_list_p, osl_names_p); -void osl_relation_list_pprint(FILE *, osl_relation_list_p, osl_names_p); -void osl_relation_list_print(FILE *, osl_relation_list_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_relation_list_p osl_relation_list_pread(FILE *, int); -osl_relation_list_p osl_relation_list_read(FILE *); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_relation_list_p osl_relation_list_malloc(); -void osl_relation_list_free(osl_relation_list_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_relation_list_p osl_relation_list_node(osl_relation_p); -osl_relation_list_p osl_relation_list_clone(osl_relation_list_p); -osl_relation_list_p osl_relation_list_concat(osl_relation_list_p, - osl_relation_list_p); -void osl_relation_list_concat_inplace(osl_relation_list_p *, - osl_relation_list_p); -int osl_relation_list_equal(osl_relation_list_p, - osl_relation_list_p); -int osl_relation_list_integrity_check(osl_relation_list_p, - int, int, int, int); -void osl_relation_list_set_type(osl_relation_list_p, int); -osl_relation_list_p osl_relation_list_filter(osl_relation_list_p, int); -int osl_relation_list_count(osl_relation_list_p); -void osl_relation_list_get_attributes(osl_relation_list_p, - int *, int *, int *, - int *, int *); -# if defined(__cplusplus) - } -# endif -#endif /* define OSL_RELATION_LIST_H */ diff --git a/cloog-0.17.0/osl/include/osl/scop.h b/cloog-0.17.0/osl/include/osl/scop.h deleted file mode 100644 index bfb6389921a545720be061d87610ac19218dd52b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/scop.h +++ /dev/null @@ -1,152 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** scop.h ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -/*+**************************************************************************** - * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM scop.h.in BY configure * - ******************************************************************************/ - - -#ifndef OSL_SCOP_H -# define OSL_SCOP_H - -# include - -# define OSL_RELEASE "0.8.1" - -# include -# include -# include -# include - - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The scop_t structure stores a list of scops. Each node stores the useful - * information of a static control part of a program to process it within a - * polyhedral framework. Parameter information may be strings of characters - * (char *) when the type field is OSL_TYPE_STRING or a generic pointer - * to anything else (void *) when the type field is OSL_TYPE_GENERIC. - * The OpenScop library does not touch AT ALL generic information: printing, - * copy etc. must be done externally. - */ -struct osl_scop { - int version; /**< Version of the data structure */ - char * language; /**< Target language (backend) */ - osl_relation_p context; /**< Constraints on the SCoP parameters */ - osl_generic_p parameters; /**< NULL-terminated array of parameters */ - osl_statement_p statement; /**< Statement list of the SCoP */ - osl_interface_p registry; /**< Registered extensions interfaces */ - osl_generic_p extension; /**< List of extensions */ - void * usr; /**< A user-defined field, not touched - AT ALL by the OpenScop Library */ - struct osl_scop * next; /**< Next statement in the linked list */ -}; -typedef struct osl_scop osl_scop_t; -typedef struct osl_scop * osl_scop_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_scop_idump(FILE *, osl_scop_p, int); -void osl_scop_dump(FILE *, osl_scop_p); -void osl_scop_print(FILE *, osl_scop_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_scop_p osl_scop_pread(FILE *, osl_interface_p, int); -osl_scop_p osl_scop_read(FILE *); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_scop_p osl_scop_malloc(); -void osl_scop_free(osl_scop_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_scop_p osl_scop_clone(osl_scop_p); -int osl_scop_equal(osl_scop_p, osl_scop_p); -int osl_scop_integrity_check(osl_scop_p); -int osl_scop_get_nb_parameters(osl_scop_p); -void osl_scop_register_extension(osl_scop_p, osl_interface_p); -void osl_scop_get_attributes(osl_scop_p, - int *, int *, int *, int *, int *); -void osl_scop_normalize_scattering(osl_scop_p); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_SCOP_H */ diff --git a/cloog-0.17.0/osl/include/osl/scop.h.in b/cloog-0.17.0/osl/include/osl/scop.h.in deleted file mode 100644 index c8904ce6bc9acd42156589c02bce802030cb5e70..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/scop.h.in +++ /dev/null @@ -1,152 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** scop.h ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -/*+**************************************************************************** - * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM scop.h.in BY configure * - ******************************************************************************/ - - -#ifndef OSL_SCOP_H -# define OSL_SCOP_H - -# include - -# define OSL_RELEASE "@PACKAGE_VERSION@" - -# include -# include -# include -# include - - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The scop_t structure stores a list of scops. Each node stores the useful - * information of a static control part of a program to process it within a - * polyhedral framework. Parameter information may be strings of characters - * (char *) when the type field is OSL_TYPE_STRING or a generic pointer - * to anything else (void *) when the type field is OSL_TYPE_GENERIC. - * The OpenScop library does not touch AT ALL generic information: printing, - * copy etc. must be done externally. - */ -struct osl_scop { - int version; /**< Version of the data structure */ - char * language; /**< Target language (backend) */ - osl_relation_p context; /**< Constraints on the SCoP parameters */ - osl_generic_p parameters; /**< NULL-terminated array of parameters */ - osl_statement_p statement; /**< Statement list of the SCoP */ - osl_interface_p registry; /**< Registered extensions interfaces */ - osl_generic_p extension; /**< List of extensions */ - void * usr; /**< A user-defined field, not touched - AT ALL by the OpenScop Library */ - struct osl_scop * next; /**< Next statement in the linked list */ -}; -typedef struct osl_scop osl_scop_t; -typedef struct osl_scop * osl_scop_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_scop_idump(FILE *, osl_scop_p, int); -void osl_scop_dump(FILE *, osl_scop_p); -void osl_scop_print(FILE *, osl_scop_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_scop_p osl_scop_pread(FILE *, osl_interface_p, int); -osl_scop_p osl_scop_read(FILE *); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_scop_p osl_scop_malloc(); -void osl_scop_free(osl_scop_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_scop_p osl_scop_clone(osl_scop_p); -int osl_scop_equal(osl_scop_p, osl_scop_p); -int osl_scop_integrity_check(osl_scop_p); -int osl_scop_get_nb_parameters(osl_scop_p); -void osl_scop_register_extension(osl_scop_p, osl_interface_p); -void osl_scop_get_attributes(osl_scop_p, - int *, int *, int *, int *, int *); -void osl_scop_normalize_scattering(osl_scop_p); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_SCOP_H */ diff --git a/cloog-0.17.0/osl/include/osl/statement.h b/cloog-0.17.0/osl/include/osl/statement.h deleted file mode 100644 index e671ea36a43a76c4f1cc1640a774a70e8455fa34..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/statement.h +++ /dev/null @@ -1,138 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** statement.h ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_STATEMENT_H -# define OSL_STATEMENT_H - -# include -# include -# include -# include -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The osl_statement_t structure stores a list of statement. Each node - * contains the useful informations for a given statement to process it - * within a polyhedral framework. The order in the list may matter for naming - * conventions (e.g. "S1" for the first statement in the list). - */ -struct osl_statement { - osl_relation_p domain; /**< Iteration domain of the statement */ - osl_relation_p scattering; /**< Scattering relation of the statement*/ - osl_relation_list_p access; /**< Access information */ - osl_generic_p body; /**< Original statement body */ - void * usr; /**< A user-defined field, not touched - AT ALL by the OpenScop Library. */ - struct osl_statement * next; /**< Next statement in the linked list */ -}; -typedef struct osl_statement osl_statement_t; -typedef struct osl_statement * osl_statement_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_statement_idump(FILE *, osl_statement_p, int); -void osl_statement_dump(FILE *, osl_statement_p); -void osl_statement_pprint(FILE *, osl_statement_p, osl_names_p); -void osl_statement_print(FILE *, osl_statement_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_statement_p osl_statement_pread(FILE *, osl_interface_p, int); -osl_statement_p osl_statement_read(FILE *); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_statement_p osl_statement_malloc(); -void osl_statement_free(osl_statement_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -void osl_statement_add(osl_statement_p *, osl_statement_p); -void osl_statement_compact(osl_statement_p, int); -int osl_statement_number(osl_statement_p); -osl_statement_p osl_statement_clone(osl_statement_p); -int osl_statement_equal(osl_statement_p, osl_statement_p); -int osl_statement_integrity_check(osl_statement_p, int); -int osl_statement_get_nb_iterators(osl_statement_p); -void osl_statement_get_attributes(osl_statement_p, int *, int *, - int *, int *, int *); - -# if defined(__cplusplus) - } -# endif -#endif /* define OSL_STATEMENT_H */ diff --git a/cloog-0.17.0/osl/include/osl/strings.h b/cloog-0.17.0/osl/include/osl/strings.h deleted file mode 100644 index c32ba1133266cb711345c48109137c4e4cd649e9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/strings.h +++ /dev/null @@ -1,124 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** strings.h ** - **-----------------------------------------------------------------** - ** First version: 13/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_STRINGS_H -# define OSL_STRINGS_H - -# include -# include - -# if defined(__cplusplus) -extern "C" - { -# endif - -# define OSL_URI_STRINGS "strings" - -/* The "strings" type is simply a NULL-terminated array of C character - * strings, i.e. a char **. It is encapsulated into a structure to allow - * its manipulation through a generic type. - */ -struct osl_strings { - char ** string; /**< NULL-terminated array of character strings */ -}; -typedef struct osl_strings osl_strings_t; -typedef struct osl_strings * osl_strings_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_strings_idump(FILE *, osl_strings_p, int); -void osl_strings_dump(FILE *, osl_strings_p); -char * osl_strings_sprint(osl_strings_p); -void osl_strings_print(FILE *, osl_strings_p); - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ -osl_strings_p osl_strings_sread(char **); -osl_strings_p osl_strings_read(FILE *); - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_strings_p osl_strings_malloc(); -void osl_strings_free(osl_strings_p); - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_strings_p osl_strings_clone(osl_strings_p); -int osl_strings_equal(osl_strings_p, osl_strings_p); -int osl_strings_size(osl_strings_p); -osl_strings_p osl_strings_encapsulate(char *); -osl_interface_p osl_strings_interface(); -osl_strings_p osl_strings_generate(char *, int); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_STRINGS_H */ diff --git a/cloog-0.17.0/osl/include/osl/util.h b/cloog-0.17.0/osl/include/osl/util.h deleted file mode 100644 index fcf297712882ed2ce2c577724b8627928f1efd53..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/util.h +++ /dev/null @@ -1,97 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** util.h ** - **-----------------------------------------------------------------** - ** First version: 08/10/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_UTIL_H -# define OSL_UTIL_H - -# include - - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/*+*************************************************************************** - * Utility functions * - *****************************************************************************/ -char * osl_util_skip_blank_and_comments(FILE *, char *); -void osl_util_sskip_blank_and_comments(char **); -int osl_util_read_int(FILE *, char **); -char * osl_util_read_tag(FILE *, char **); -char * osl_util_read_tail(FILE *); -char * osl_util_read_uptotag(FILE *, char *); -char * osl_util_read_uptoendtag(FILE *, char *); -char * osl_util_tag_content(char *, char *); -void osl_util_safe_strcat(char **, char *, int *); -int osl_util_get_precision(); -void osl_util_print_provided(FILE *, int, char *); -char * osl_util_identifier_substitution(char *, char **); - - -# if defined(__cplusplus) - } -# endif - -#endif /* define OSL_UTIL_H */ diff --git a/cloog-0.17.0/osl/include/osl/vector.h b/cloog-0.17.0/osl/include/osl/vector.h deleted file mode 100644 index 98701ee067e39122d84a3cdca41ed84b14227210..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/include/osl/vector.h +++ /dev/null @@ -1,122 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** vector.h ** - **-----------------------------------------------------------------** - ** First version: 01/05/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#ifndef OSL_VECTOR_H -# define OSL_VECTOR_H - -# include -# include - - -# if defined(__cplusplus) -extern "C" - { -# endif - - -/** - * The osl_vector_t structure stores a vector information in the PolyLib - * format (the first entry has a specific meaning). When a vector - * describes a linear constraint, a 0 means it is an equality == 0, a 1 means - * an inequality >= 0. When the vector describes an array access, a number - * different than 0 is the array identifier. - */ -struct osl_vector { - int precision; /**< Precision of the integer elements. */ - int size; /**< Number of vector entries */ - void * v; /**< An array of values */ -}; -typedef struct osl_vector osl_vector_t; -typedef struct osl_vector * osl_vector_p; - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ -void osl_vector_idump(FILE *, osl_vector_p, int); -void osl_vector_dump(FILE *, osl_vector_p); - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ -osl_vector_p osl_vector_pmalloc(int, int); -osl_vector_p osl_vector_malloc(int); -void osl_vector_free(osl_vector_p); - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ -osl_vector_p osl_vector_add_scalar(osl_vector_p, int); -osl_vector_p osl_vector_mul_scalar(osl_vector_p, int); -osl_vector_p osl_vector_add(osl_vector_p, osl_vector_p); -osl_vector_p osl_vector_sub(osl_vector_p, osl_vector_p); -void osl_vector_tag_inequality(osl_vector_p); -void osl_vector_tag_equality(osl_vector_p); -int osl_vector_equal(osl_vector_p, osl_vector_p); - -# if defined(__cplusplus) - } -# endif -#endif /* define OSL_VECTOR_H */ diff --git a/cloog-0.17.0/osl/source/Makefile.am b/cloog-0.17.0/osl/source/Makefile.am deleted file mode 100644 index 0a804f19d957f87e5652ae47611688a784df56ed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in - -INCLUDES = -I$(top_builddir) -I$(top_srcdir) \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include - -############################################################################# - -lib_LTLIBRARIES = libosl.la - - -libosl_la_SOURCES = \ - scop.c \ - statement.c \ - extensions/textual.c \ - extensions/comment.c \ - extensions/scatnames.c \ - extensions/arrays.c \ - extensions/lines.c \ - extensions/irregular.c \ - interface.c \ - generic.c \ - relation.c \ - relation_list.c \ - vector.c \ - names.c \ - strings.c \ - body.c \ - int.c \ - util.c - -AM_CFLAGS = -Wall -fomit-frame-pointer -g diff --git a/cloog-0.17.0/osl/source/Makefile.in b/cloog-0.17.0/osl/source/Makefile.in deleted file mode 100644 index 2441a443b90d9d17750634682bd520fe8ef12fdd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/Makefile.in +++ /dev/null @@ -1,834 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 30/04/2008 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = source -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/autoconf/libtool.m4 \ - $(top_srcdir)/autoconf/ltoptions.m4 \ - $(top_srcdir)/autoconf/ltsugar.m4 \ - $(top_srcdir)/autoconf/ltversion.m4 \ - $(top_srcdir)/autoconf/lt~obsolete.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libosl_la_LIBADD = -am_libosl_la_OBJECTS = scop.lo statement.lo textual.lo comment.lo \ - scatnames.lo arrays.lo lines.lo irregular.lo interface.lo \ - generic.lo relation.lo relation_list.lo vector.lo names.lo \ - strings.lo body.lo int.lo util.lo -libosl_la_OBJECTS = $(am_libosl_la_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libosl_la_SOURCES) -DIST_SOURCES = $(libosl_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_aux_dir = @ac_aux_dir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in -INCLUDES = -I$(top_builddir) -I$(top_srcdir) \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include - - -############################################################################# -lib_LTLIBRARIES = libosl.la -libosl_la_SOURCES = \ - scop.c \ - statement.c \ - extensions/textual.c \ - extensions/comment.c \ - extensions/scatnames.c \ - extensions/arrays.c \ - extensions/lines.c \ - extensions/irregular.c \ - interface.c \ - generic.c \ - relation.c \ - relation_list.c \ - vector.c \ - names.c \ - strings.c \ - body.c \ - int.c \ - util.c - -AM_CFLAGS = -Wall -fomit-frame-pointer -g -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign source/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign source/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libosl.la: $(libosl_la_OBJECTS) $(libosl_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libosl_la_OBJECTS) $(libosl_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrays.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/body.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/irregular.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lines.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/names.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relation.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relation_list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scatnames.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statement.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strings.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textual.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -textual.lo: extensions/textual.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT textual.lo -MD -MP -MF $(DEPDIR)/textual.Tpo -c -o textual.lo `test -f 'extensions/textual.c' || echo '$(srcdir)/'`extensions/textual.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/textual.Tpo $(DEPDIR)/textual.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extensions/textual.c' object='textual.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o textual.lo `test -f 'extensions/textual.c' || echo '$(srcdir)/'`extensions/textual.c - -comment.lo: extensions/comment.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT comment.lo -MD -MP -MF $(DEPDIR)/comment.Tpo -c -o comment.lo `test -f 'extensions/comment.c' || echo '$(srcdir)/'`extensions/comment.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/comment.Tpo $(DEPDIR)/comment.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extensions/comment.c' object='comment.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o comment.lo `test -f 'extensions/comment.c' || echo '$(srcdir)/'`extensions/comment.c - -scatnames.lo: extensions/scatnames.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT scatnames.lo -MD -MP -MF $(DEPDIR)/scatnames.Tpo -c -o scatnames.lo `test -f 'extensions/scatnames.c' || echo '$(srcdir)/'`extensions/scatnames.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/scatnames.Tpo $(DEPDIR)/scatnames.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extensions/scatnames.c' object='scatnames.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o scatnames.lo `test -f 'extensions/scatnames.c' || echo '$(srcdir)/'`extensions/scatnames.c - -arrays.lo: extensions/arrays.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT arrays.lo -MD -MP -MF $(DEPDIR)/arrays.Tpo -c -o arrays.lo `test -f 'extensions/arrays.c' || echo '$(srcdir)/'`extensions/arrays.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/arrays.Tpo $(DEPDIR)/arrays.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extensions/arrays.c' object='arrays.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o arrays.lo `test -f 'extensions/arrays.c' || echo '$(srcdir)/'`extensions/arrays.c - -lines.lo: extensions/lines.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lines.lo -MD -MP -MF $(DEPDIR)/lines.Tpo -c -o lines.lo `test -f 'extensions/lines.c' || echo '$(srcdir)/'`extensions/lines.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lines.Tpo $(DEPDIR)/lines.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extensions/lines.c' object='lines.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lines.lo `test -f 'extensions/lines.c' || echo '$(srcdir)/'`extensions/lines.c - -irregular.lo: extensions/irregular.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT irregular.lo -MD -MP -MF $(DEPDIR)/irregular.Tpo -c -o irregular.lo `test -f 'extensions/irregular.c' || echo '$(srcdir)/'`extensions/irregular.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/irregular.Tpo $(DEPDIR)/irregular.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='extensions/irregular.c' object='irregular.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o irregular.lo `test -f 'extensions/irregular.c' || echo '$(srcdir)/'`extensions/irregular.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-libLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/osl/source/body.c b/cloog-0.17.0/osl/source/body.c deleted file mode 100644 index 9f47057449b183630938290a13ba2c403faa8ce9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/body.c +++ /dev/null @@ -1,389 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** body.c ** - **-----------------------------------------------------------------** - ** First version: 25/06/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -# include -# include -# include -# include -# include -# include -# include -# include -# include - - -/*+*************************************************************************** - * Structure display functions * - *****************************************************************************/ - - -/** - * osl_body_idump function: - * this function displays an osl_body_t structure (*body) into a - * file (file, possibly stdout) in a way that trends to be understandable. - * It includes an indentation level (level) in order to work with others - * dumping functions. - * \param[in] file File where informations are printed. - * \param[in] body The body whose information has to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_body_idump(FILE * file, osl_body_p body, int level) { - int j; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (body != NULL) { - fprintf(file, "+-- osl_body_t\n"); - - // A blank line. - for (j = 0; j <= level+1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print the iterators - osl_strings_idump(file, body->iterators, level + 1); - - // Print the original body expression. - osl_strings_idump(file, body->expression, level + 1); - } - else { - fprintf(file, "+-- NULL body\n"); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_body_dump function: - * this function prints the content of an osl_body_t structure - * (*body) into a file (file, possibly stdout). - * \param[in] file File where informations are printed. - * \param[in] body The body whose information has to be printed. - */ -void osl_body_dump(FILE * file, osl_body_p body) { - osl_body_idump(file, body, 0); -} - - -/** - * osl_body_print function: - * this function prints the content of an osl_body_t structure - * (*body) into a file (file, possibly stdout) in the OpenScop format. - * \param[in] file File where informations are printed. - * \param[in] body The body whose information has to be printed. - */ -void osl_body_print(FILE * file, osl_body_p body) { - int nb_iterators; - - if (body != NULL) { - nb_iterators = osl_strings_size(body->iterators); - fprintf(file, "# Number of original iterators\n"); - fprintf(file, "%d\n", nb_iterators); - - if (nb_iterators > 0) { - fprintf(file, "\n# List of original iterators\n"); - osl_strings_print(file, body->iterators); - } - - fprintf(file, "\n# Statement body expression\n"); - osl_strings_print(file, body->expression); - } - else { - fprintf(file, "# NULL statement body\n"); - } -} - - -/** - * osl_body_sprint function: - * this function prints the content of an osl_body_t structure - * (*body) into a string (returned) in the OpenScop textual format. - * \param[in] body The body structure which has to be printed. - * \return A string containing the OpenScop dump of the body structure. - */ -char * osl_body_sprint(osl_body_p body) { - int nb_iterators; - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char buffer[OSL_MAX_STRING]; - char * iterators, * expression; - - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - string[0] = '\0'; - - if (body != NULL) { - nb_iterators = osl_strings_size(body->iterators); - sprintf(buffer, "# Number of original iterators\n%d\n", nb_iterators); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - if (nb_iterators > 0) { - sprintf(buffer, "# List of original iterators\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - iterators = osl_strings_sprint(body->iterators); - osl_util_safe_strcat(&string, iterators, &high_water_mark); - free(iterators); - } - - sprintf(buffer, "# Statement body expression\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - expression = osl_strings_sprint(body->expression); - osl_util_safe_strcat(&string, expression, &high_water_mark); - free(expression); - } - else { - sprintf(buffer, "# NULL body\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - return string; -} - - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_body_read function: - * this function reads a body structure from a string complying to the - * OpenScop textual format and returns a pointer to this body structure. - * The input string should only contain the body this function - * has to read (comments at the end of the line are accepted). The input - * parameter is updated to the position in the input string this function - * reach right after reading the strings structure. - * \param[in,out] input The input string where to find a body structure. - * Updated to the position after what has been read. - * \return A pointer to the body structure that has been read. - */ -osl_body_p osl_body_sread(char ** input) { - osl_body_p body = NULL; - char * expression; - int nb_iterators; - - if (input) { - body = osl_body_malloc(); - - // Read the number of iterators. - nb_iterators = osl_util_read_int(NULL, input); - - // Read the iterator strings if any. - if (nb_iterators > 0) - body->iterators = osl_strings_sread(input); - - // Read the body: - // - Skip blank/commented lines and spaces before the body. - osl_util_sskip_blank_and_comments(input); - - // - Remove the comments after the body. - expression = *input; - while (*input && **input != '#' && **input != '\n') - (*input)++; - - if (*input && **input == '#') { - **input = '\0'; - while (**input != '\n') - (*input)++; - } - else { - if (*input && **input == '\n') { - **input = '\0'; - (*input)++; - } - } - - // - Copy the body. - body->expression = osl_strings_encapsulate(strdup(expression)); - } - - return body; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation functions * - *****************************************************************************/ - - -/** - * osl_body_malloc function: - * this function allocates the memory space for an osl_body_t - * structure and sets its fields with default values. Then it returns a pointer - * to the allocated space. - * \return A pointer to an empty body with fields set to default values. - */ -osl_body_p osl_body_malloc() { - osl_body_p body; - - OSL_malloc(body, osl_body_p, sizeof(osl_body_t)); - body->iterators = NULL; - body->expression = NULL; - - return body; -} - - -/** - * osl_body_free function: - * this function frees the allocated memory for an osl_body_t - * structure. - * \param[in,out] body The pointer to the body we want to free. - */ -void osl_body_free(osl_body_p body) { - - if (body != NULL) { - osl_strings_free(body->iterators); - osl_strings_free(body->expression); - free(body); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_body_clone function: - * this functions builds and returns a "hard copy" (not a pointer copy) of an - * osl_body_t data structure provided as parameter. However, let us - * recall here that non-string elements are untouched by the OpenScop Library. - * \param[in] body The pointer to the body we want to copy. - * \return A pointer to the full copy of the body provided as parameter. - */ -osl_body_p osl_body_clone(osl_body_p body) { - osl_body_p copy = NULL; - - if (body != NULL) { - copy = osl_body_malloc(); - copy->iterators = osl_strings_clone(body->iterators); - copy->expression = osl_strings_clone(body->expression); - } - - return copy; -} - - -/** - * osl_body_equal function: - * this function returns true if the two bodies are the same, false - * otherwise (the usr field is not tested). However, let us - * recall here that non-string elements are untouched by the OpenScop Library. - * \param[in] b1 The first body. - * \param[in] b2 The second body. - * \return 1 if b1 and b2 are the same (content-wise), 0 otherwise. - */ -int osl_body_equal(osl_body_p b1, osl_body_p b2) { - - if (b1 == b2) - return 1; - - if (((b1 != NULL) && (b2 == NULL)) || - ((b1 == NULL) && (b2 != NULL))) { - OSL_info("bodies are not the same"); - return 0; - } - - if (!osl_strings_equal(b1->iterators, b2->iterators)) { - OSL_info("body iterators are not the same"); - return 0; - } - - if (!osl_strings_equal(b1->expression, b2->expression)) { - OSL_info("body expressions are not the same"); - return 0; - } - - return 1; -} - - -/** - * osl_body_interface function: - * this function creates an interface structure corresponding to the body - * structure and returns it). - * \return An interface structure for the body structure. - */ -osl_interface_p osl_body_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_BODY); - interface->idump = (osl_idump_f)osl_body_idump; - interface->sprint = (osl_sprint_f)osl_body_sprint; - interface->sread = (osl_sread_f)osl_body_sread; - interface->malloc = (osl_malloc_f)osl_body_malloc; - interface->free = (osl_free_f)osl_body_free; - interface->clone = (osl_clone_f)osl_body_clone; - interface->equal = (osl_equal_f)osl_body_equal; - - return interface; -} - diff --git a/cloog-0.17.0/osl/source/extensions/arrays.c b/cloog-0.17.0/osl/source/extensions/arrays.c deleted file mode 100644 index bb48bb994742eaab63a381b7adba27df71fbc471..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/extensions/arrays.c +++ /dev/null @@ -1,456 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/arrays.c ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_arrays_print_structure function: - * this function displays a osl_arrays_t structure (*arrays) into a file - * (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param file The file where the information has to be printed. - * \param arrays The arrays structure whose information has to be printed. - * \param level Number of spaces before printing, for each line. - */ -void osl_arrays_idump(FILE * file, osl_arrays_p arrays, int level) { - int i, j; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (arrays != NULL) - fprintf(file, "+-- osl_arrays_t\n"); - else - fprintf(file, "+-- NULL arrays\n"); - - if (arrays != NULL) { - // Go to the right level. - for(j = 0; j <= level; j++) - fprintf(file, "|\t"); - - // Display the number of names. - fprintf(file, "nb_names: %d\n", arrays->nb_names); - - // Display the id/name. - for(i = 0; i < arrays->nb_names; i++) { - // Go to the right level. - for(j = 0; j <= level; j++) - fprintf(file, "|\t"); - - fprintf(file, "id: %2d, name: %s\n", arrays->id[i], arrays->names[i]); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_arrays_print function: - * this function prints the content of an osl_arrays_t structure - * (*arrays) into a file (file, possibly stdout). - * \param file The file where the information has to be printed. - * \param arrays The arrays structure whose information has to be printed. - */ -void osl_arrays_dump(FILE * file, osl_arrays_p arrays) { - osl_arrays_idump(file, arrays, 0); -} - - -/** - * osl_arrays_print_openscop function: - * this function prints the content of an osl_arrays_t structure - * (*arrays) into a string (returned) in the OpenScop textual format. - * \param arrays The arrays structure whose information has to be printed. - * \return A string containing the OpenScop dump of the arrays structure. - */ -char * osl_arrays_sprint(osl_arrays_p arrays) { - int i; - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char * buffer; - - if (arrays != NULL) { - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - OSL_malloc(buffer, char *, OSL_MAX_STRING * sizeof(char)); - string[0] = '\0'; - - sprintf(buffer, OSL_TAG_ARRAYS_START); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - sprintf(buffer, "\n%d\n", arrays->nb_names); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - for (i = 0; i < arrays->nb_names; i++) { - sprintf(buffer, "%d %s\n", arrays->id[i], arrays->names[i]); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - sprintf(buffer, OSL_TAG_ARRAYS_STOP"\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - OSL_realloc(string, char *, (strlen(string) + 1) * sizeof(char)); - free(buffer); - } - - return string; -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_arrays_sread function: - * this function reads an arrays structure from a string complying to the - * OpenScop textual format and returns a pointer to this arrays structure. - * The string should contain only one textual format of an arrays structure. - * \param extensions The input string where to find an arrays structure. - * \return A pointer to the arrays structure that has been read. - */ -osl_arrays_p osl_arrays_sread(char ** extensions_fixme) { - int i, k, array_id; - int nb_names; - int * id; - char ** names; - char * content, * content_backup; - char buff[OSL_MAX_STRING]; - osl_arrays_p arrays; - - // FIXME: this is a quick and dirty thing to accept char ** instead - // of char * in the parameter: really do it and update the - // pointer to after what has been read. - content = *extensions_fixme; - - if (content == NULL) { - OSL_debug("no arrays optional tag"); - return NULL; - } - content_backup = content; - - // Find the number of names provided. - nb_names = osl_util_read_int(NULL, &content); - - // Allocate the array of id and names. - id = (int *)malloc(nb_names * sizeof(int)); - names = (char **)malloc(nb_names * sizeof(char *)); - for (i = 0; i < nb_names; i++) - names[i] = NULL; - - // Get each array name. - for (k = 0; k < nb_names; k++) { - // Skip blank or commented lines. - while (*content == '#' || *content == '\n') { - for (; *content != '\n'; ++content) - continue; - ++content; - } - - // Get the array name id. - for (i = 0; *content && ! isspace(*content); ++i, ++content) - buff[i] = *content; - buff[i] = '\0'; - sscanf(buff, "%d", &array_id); - if (array_id <= 0) - OSL_error("array id must be > 0"); - id[k] = array_id; - - // Get the array name string. - while (*content && isspace(*content)) - ++content; - for (i = 0; *content && ! isspace(*content); ++i, ++content) - buff[i] = *content; - buff[i] = '\0'; - names[k] = strdup(buff); - - // Go to the end of line. - while (*content && *content != '\n') - ++content; - } - free(content_backup); - - arrays = osl_arrays_malloc(); - arrays->nb_names = nb_names; - arrays->id = id; - arrays->names = names; - - return arrays; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_arrays_malloc function: - * This function allocates the memory space for an osl_arrays_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty arrays structure with fields set to - * default values. - */ -osl_arrays_p osl_arrays_malloc() { - osl_arrays_p arrays; - - OSL_malloc(arrays, osl_arrays_p, sizeof(osl_arrays_t)); - arrays->nb_names = 0; - arrays->id = NULL; - arrays->names = NULL; - - return arrays; -} - - -/** - * osl_arrays_free function: - * This function frees the allocated memory for an arrays structure. - * \param arrays The pointer to the arrays structure we want to free. - */ -void osl_arrays_free(osl_arrays_p arrays) { - int i; - - if (arrays != NULL) { - if (arrays->names != NULL) { - free(arrays->id); - for (i = 0; i < arrays->nb_names; i++) - free(arrays->names[i]); - free(arrays->names); - } - - free(arrays); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_arrays_clone function: - * This function builds and returns a "hard copy" (not a pointer copy) of an - * osl_arrays_t data structure. - * \param arrays The pointer to the arrays structure we want to copy. - * \return A pointer to the copy of the arrays structure. - */ -osl_arrays_p osl_arrays_clone(osl_arrays_p arrays) { - osl_arrays_p copy; - int i; - - if (arrays == NULL) - return NULL; - - copy = osl_arrays_malloc(); - if (copy != NULL) { - copy->nb_names = arrays->nb_names; - copy->id = (int *)malloc(arrays->nb_names * sizeof(int)); - OSL_malloc(copy->names, char **, arrays->nb_names * sizeof(char*)); - - for (i = 0; i < arrays->nb_names; i++) { - copy->id[i] = arrays->id[i]; - copy->names[i] = strdup(arrays->names[i]); - if ((copy->names[i] == NULL) && (arrays->names[i] != NULL)) - OSL_error("memory overflow"); - } - } - - return copy; -} - - -/** - * osl_arrays_equal function: - * this function returns true if the two arrays structures are the same - * (content-wise), false otherwise. This functions considers two arrays - * structures as equal if the order of the array names differ, however the - * identifiers and names must be the same. - * \param a1 The first arrays structure. - * \param a2 The second arrays structure. - * \return 1 if a1 and a2 are the same (content-wise), 0 otherwise. - */ -int osl_arrays_equal(osl_arrays_p a1, osl_arrays_p a2) { - int i, j, found; - - if (a1 == a2) - return 1; - - if (((a1 == NULL) && (a2 != NULL)) || ((a1 != NULL) && (a2 == NULL))) - return 0; - - // Check whether the number of names is the same. - if (a1->nb_names != a2->nb_names) - return 0; - - // We accept a different order of the names, as long as the identifiers - // are the same. - for (i = 0; i < a1->nb_names; i++) { - found = 0; - for (j = 0; j < a2->nb_names; j++) { - if ((a1->id[i] == a2->id[j]) && (!strcmp(a1->names[i], a2->names[j]))) { - found = 1; - break; - } - } - if (found != 1) - return 0; - } - - return 1; -} - - -/** - * osl_arrays_generate_names function: - * This function generates an array of strings corresponding to array names. - * The ith string will correspond to the array name with identifier i in the - * arrays structure. If some identifiers are missing, the corresponding names - * will be generated. The size of the array of strings corresponds to the - * maximum identifier, it is returned using the parameter nb_names. - * \param arrays The source of some array names. - * \param nb_names Pointer to the location to store the number of names. - * \return An array of strings corresponding to the array names. - */ -char ** osl_arrays_generate_names(osl_arrays_p arrays, int * nb_names) { - char ** names = NULL; - char ** tmpnames; - int i; - - *nb_names = 0; - - if (arrays != NULL) { - // Get the maximum id (it will be nb_names). - for (i = 0; i < arrays->nb_names; i++) - if (arrays->id[i] > *nb_names) - *nb_names = arrays->id[i]; - - // Allocate the array of names and store the existing names. - OSL_malloc(names, char **, *nb_names * sizeof(char *)); - for (i = 0; i < arrays->nb_names; i++) { - names[arrays->id[i] - 1] = strdup(arrays->names[i]); - if (names[arrays->id[i] - 1] == NULL) - OSL_error("memory overflow"); - } - - // Fill the missing names. - // TODO : update this with the new osl_strings_t - /* - tmpnames = osl_strings_generate("A_", *nb_names); - for (i = 0; i < *nb_names; i++) { - if (names[i] == NULL || names[i][0] == '\0') - names[i] = tmpnames[i]; // Use a generated name. - else - free(tmpnames[i]); // Use a read name. - } - free(tmpnames); - */ - } - - return names; -} - - -/** - * osl_arrays_interface function: - * this function creates an interface structure corresponding to the arrays - * extension and returns it). - * \return An interface structure for the arrays extension. - */ -osl_interface_p osl_arrays_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_ARRAYS); - interface->idump = (osl_idump_f)osl_arrays_idump; - interface->sprint = (osl_sprint_f)osl_arrays_sprint; - interface->sread = (osl_sread_f)osl_arrays_sread; - interface->malloc = (osl_malloc_f)osl_arrays_malloc; - interface->free = (osl_free_f)osl_arrays_free; - interface->clone = (osl_clone_f)osl_arrays_clone; - interface->equal = (osl_equal_f)osl_arrays_equal; - - return interface; -} - - diff --git a/cloog-0.17.0/osl/source/extensions/comment.c b/cloog-0.17.0/osl/source/extensions/comment.c deleted file mode 100644 index 12c81e1dedbf5ac25409cd1b11f6d92836861623..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/extensions/comment.c +++ /dev/null @@ -1,306 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/comment.c ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_comment_idump function: - * this function displays an osl_comment_t structure (*comment) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param[in] file The file where the information has to be printed. - * \param[in] comment The comment structure to print. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_comment_idump(FILE * file, osl_comment_p comment, int level) { - int j; - char * tmp; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (comment != NULL) - fprintf(file, "+-- osl_comment_t\n"); - else - fprintf(file, "+-- NULL comment\n"); - - if (comment != NULL) { - // Go to the right level. - for(j = 0; j <= level; j++) - fprintf(file, "|\t"); - - // Display the comment message (without any carriage return). - tmp = strdup(comment->comment); - for (j = 0; j < strlen(tmp); j++) - if (tmp[j] == '\n') - tmp[j] = ' '; - fprintf(file, "comment: %s\n", tmp); - free(tmp); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_comment_dump function: - * this function prints the content of an osl_comment_t structure - * (*comment) into a file (file, possibly stdout). - * \param[in] file The file where the information has to be printed. - * \param[in] comment The comment structure to print. - */ -void osl_comment_dump(FILE * file, osl_comment_p comment) { - osl_comment_idump(file, comment, 0); -} - - -/** - * osl_comment_sprint function: - * this function prints the content of an osl_comment_t structure - * (*comment) into a string (returned) in the OpenScop textual format. - * \param[in] comment The comment structure to print. - * \return A string containing the OpenScop dump of the comment structure. - */ -char * osl_comment_sprint(osl_comment_p comment) { - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char * buffer; - - if (comment != NULL) { - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - OSL_malloc(buffer, char *, OSL_MAX_STRING * sizeof(char)); - string[0] = '\0'; - - // Print the comment. - sprintf(buffer, "%s", comment->comment); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Keep only the memory space we need. - OSL_realloc(string, char *, (strlen(string) + 1) * sizeof(char)); - free(buffer); - } - - return string; -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - -/** - * osl_comment_sread function: - * this function reads a comment structure from a string complying to the - * OpenScop textual format and returns a pointer to this comment structure. - * The input parameter is updated to the position in the input string this - * function reach right after reading the comment structure. - * \param[in,out] input The input string where to find a comment. - * Updated to the position after what has been read. - * \return A pointer to the comment structure that has been read. - */ -osl_comment_p osl_comment_sread(char ** input) { - osl_comment_p comment; - - if (*input == NULL) { - OSL_debug("no comment optional tag"); - return NULL; - } - - if (strlen(*input) > OSL_MAX_STRING) - OSL_error("comment too long"); - - // Build the comment structure - comment = osl_comment_malloc(); - OSL_strdup(comment->comment, *input); - - // Update the input pointer (everything has been read). - input += strlen(*input); - - return comment; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_comment_malloc function: - * this function allocates the memory space for an osl_comment_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty comment structure with fields set to - * default values. - */ -osl_comment_p osl_comment_malloc() { - osl_comment_p comment; - - OSL_malloc(comment, osl_comment_p, sizeof(osl_comment_t)); - comment->comment = NULL; - - return comment; -} - - -/** - * osl_comment_free function: - * this function frees the allocated memory for an osl_comment_t - * structure. - * \param[in,out] comment The pointer to the comment structure to free. - */ -void osl_comment_free(osl_comment_p comment) { - if (comment != NULL) { - if(comment->comment != NULL) - free(comment->comment); - free(comment); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_comment_clone function: - * this function builds and returns a "hard copy" (not a pointer copy) of an - * osl_comment_t data structure. - * \param[in] comment The pointer to the comment structure to clone. - * \return A pointer to the clone of the comment structure. - */ -osl_comment_p osl_comment_clone(osl_comment_p comment) { - osl_comment_p clone; - - if (comment == NULL) - return NULL; - - clone = osl_comment_malloc(); - OSL_strdup(clone->comment, comment->comment); - - return clone; -} - - -/** - * osl_comment_equal function: - * this function returns true if the two comment structures are the same - * (content-wise), false otherwise. - * \param[in] c1 The first comment structure. - * \param[in] c2 The second comment structure. - * \return 1 if c1 and c2 are the same (content-wise), 0 otherwise. - */ -int osl_comment_equal(osl_comment_p c1, osl_comment_p c2) { - - if (c1 == c2) - return 1; - - if (((c1 == NULL) && (c2 != NULL)) || ((c1 != NULL) && (c2 == NULL))) - return 0; - - if (strcmp(c1->comment, c2->comment)) - return 0; - - return 1; -} - - -/** - * osl_comment_interface function: - * this function creates an interface structure corresponding to the comment - * extension and returns it). - * \return An interface structure for the comment extension. - */ -osl_interface_p osl_comment_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_COMMENT); - interface->idump = (osl_idump_f)osl_comment_idump; - interface->sprint = (osl_sprint_f)osl_comment_sprint; - interface->sread = (osl_sread_f)osl_comment_sread; - interface->malloc = (osl_malloc_f)osl_comment_malloc; - interface->free = (osl_free_f)osl_comment_free; - interface->clone = (osl_clone_f)osl_comment_clone; - interface->equal = (osl_equal_f)osl_comment_equal; - - return interface; -} - diff --git a/cloog-0.17.0/osl/source/extensions/irregular.c b/cloog-0.17.0/osl/source/extensions/irregular.c deleted file mode 100644 index a72cdb1a4be19c0ec5891171157d0f63268baac6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/extensions/irregular.c +++ /dev/null @@ -1,764 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/irregular.c ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_irregular_idump function: - * this function displays an osl_irregular_t structure (*irregular) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param file The file where the information has to be printed. - * \param irregular The irregular structure whose information has to be printed. - * \param level Number of spaces before printing, for each line. - */ -void osl_irregular_idump(FILE * file, osl_irregular_p irregular, int level) { - int i,j; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (irregular != NULL) - fprintf(file, "+-- osl_irregular_t\n"); - else - fprintf(file, "+-- NULL irregular\n"); - - if (irregular != NULL) { - // Go to the right level. - for(j = 0; j <= level; j++) - fprintf(file, "|\t"); - - // Display the irregular contents. - - // Print statements - for (i = 0; i < irregular->nb_statements; i++) { - fprintf(file, "statement%d's predicats : ", i); - for(j = 0; j < irregular->nb_predicates[i]; j++) - fprintf(file, "%d ", irregular->predicates[i][j]); - fprintf(file, "\n"); - } - // Print predicats - // controls : - for (i = 0; i < irregular->nb_control; i++) { - fprintf(file, "predicat%d's\niterators : ", i); - for(j = 0; j < irregular->nb_iterators[i]; j++) - fprintf(file, "%s ", irregular->iterators[i][j]); - fprintf(file, "\ncontrol body: %s\n", irregular->body[i]); - } - // exits : - for(i = irregular->nb_control; - i < irregular->nb_control + irregular->nb_exit; i++) { - fprintf(file, "predicat%d's\niterators : ", i); - for(j = 0; j < irregular->nb_iterators[i]; j++) - fprintf(file, "%s ", irregular->iterators[i][j]); - fprintf(file, "\nexit body: %s\n", irregular->body[i]); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_irregular_dump function: - * this function prints the content of an osl_irregular_t structure - * (*irregular) into a file (file, possibly stdout). - * \param file The file where the information has to be printed. - * \param irregular The irregular structure whose information has to be printed. - */ -void osl_irregular_dump(FILE * file, osl_irregular_p irregular) { - osl_irregular_idump(file, irregular, 0); -} - - -/** - * osl_irregular_sprint function: - * this function prints the content of an osl_irregular_t structure - * (*irregular) into a string (returned) in the OpenScop textual format. - * \param irregular The irregular structure whose information has to be printed. - * \return A string containing the OpenScop dump of the irregular structure. - */ -char * osl_irregular_sprint(osl_irregular_p irregular) { - int high_water_mark = OSL_MAX_STRING,i,j; - char * string = NULL; - char * buffer; - - if (irregular != NULL) { - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - OSL_malloc(buffer, char *, OSL_MAX_STRING * sizeof(char)); - string[0] = '\0'; - - // Print the begin tag. - sprintf(buffer, OSL_TAG_IRREGULAR_START); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Print the content. - sprintf(buffer, "\n%d\n", irregular->nb_statements); - for(i=0; inb_statements; i++) { - sprintf(buffer, "%s%d ", buffer, irregular->nb_predicates[i]); - for(j=0; jnb_predicates[i]; j++) { - sprintf(buffer, "%s%d ", buffer, irregular->predicates[i][j]); - } - sprintf(buffer, "%s\n", buffer); - } - // Print the predicates. - // controls: - sprintf(buffer, "%s%d\n", buffer, irregular->nb_control); - sprintf(buffer, "%s%d\n", buffer, irregular->nb_exit); - for(i=0; inb_control; i++) { - sprintf(buffer, "%s%d ", buffer, irregular->nb_iterators[i]); - for(j=0; jnb_iterators[i];j++) - sprintf(buffer, "%s%s ", buffer, irregular->iterators[i][j]); - sprintf(buffer, "%s\n%s\n", buffer, irregular->body[i]); - } - // exits: - for(i=0; inb_exit; i++) { - sprintf(buffer, "%s%d ", buffer, irregular->nb_iterators[ - irregular->nb_control + i]); - for(j=0; jnb_iterators[irregular->nb_control + i];j++) - sprintf(buffer, "%s%s ", buffer, irregular->iterators[ - irregular->nb_control+i][j]); - sprintf(buffer, "%s\n%s\n", buffer, irregular->body[ - irregular->nb_control + i]); - } - - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Print the end tag. - sprintf(buffer, OSL_TAG_IRREGULAR_STOP"\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Keep only the memory space we need. - OSL_realloc(string, char *, (strlen(string) + 1) * sizeof(char)); - free(buffer); - } - - return string; -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - -/** - * osl_irregular_sread function: - * this function reads a irregular structure from a string complying to the - * OpenScop textual format and returns a pointer to this irregular structure. - * The string should contain only one textual format of a irregular structure. - * \param extensions The input string where to find a irregular structure. - * \return A pointer to the irregular structure that has been read. - */ -osl_irregular_p osl_irregular_sread(char ** extensions_fixme) { - char * content,*tok; - int i,j; - osl_irregular_p irregular; - - // FIXME: this is a quick and dirty thing to accept char ** instead - // of char * in the parameter: really do it and update the - // pointer to after what has been read. - content = *extensions_fixme; - - if (content == NULL) { - OSL_debug("no irregular optional tag"); - return NULL; - } - - if (strlen(content) > OSL_MAX_STRING) - OSL_error("irregular too long"); - - irregular = osl_irregular_malloc(); - - // nb statements - tok = strtok(content," \n"); - irregular->nb_statements = atoi(tok); - OSL_malloc(irregular->predicates, int **, - sizeof(int*) * irregular->nb_statements); - OSL_malloc(irregular->nb_predicates, int *, - sizeof(int) * irregular->nb_statements); - - // get predicats - for(i = 0; i < irregular->nb_statements; i++) { - // nb conditions - tok = strtok(NULL," \n"); - irregular->nb_predicates[i] = atoi(tok); - OSL_malloc(irregular->predicates[i], int *, - sizeof(int) * irregular->nb_predicates[i]); - for(j = 0; j < irregular->nb_predicates[i]; j++){ - tok = strtok(NULL, " \n"); - irregular->predicates[i][j] = atoi(tok); - } - } - // Get nb predicat - // control and exits : - tok = strtok(NULL, " \n"); - irregular->nb_control=atoi(tok); - tok = strtok(NULL, " \n"); - irregular->nb_exit = atoi(tok); - - int nb_predicates = irregular->nb_control + irregular->nb_exit; - - OSL_malloc(irregular->iterators, char ***, - sizeof(char **) * nb_predicates); - OSL_malloc(irregular->nb_iterators, int *, sizeof(int) * nb_predicates); - OSL_malloc(irregular->body, char **, sizeof(char *) * nb_predicates); - - for(i = 0; i < nb_predicates; i++) { - // Get number of iterators - tok = strtok(NULL, " \n"); - irregular->nb_iterators[i] = atoi(tok); - OSL_malloc(irregular->iterators[i], char **, - sizeof(char *) * irregular->nb_iterators[i]); - - // Get iterators - for(j = 0; j < irregular->nb_iterators[i]; j++) - irregular->iterators[i][j] = strdup(strtok(NULL, " \n")); - // Get predicat string - irregular->body[i] = strdup(strtok(NULL, "\n")); - } - - return irregular; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_irregular_malloc function: - * This function allocates the memory space for an osl_irregular_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty irregular structure with fields set to - * default values. - */ -osl_irregular_p osl_irregular_malloc() { - osl_irregular_p irregular; - - OSL_malloc(irregular, osl_irregular_p, - sizeof(osl_irregular_t)); - irregular->nb_statements = 0; - irregular->predicates = NULL; - irregular->nb_predicates = NULL; - irregular->nb_control = 0; - irregular->nb_exit = 0; - irregular->nb_iterators = NULL; - irregular->iterators = NULL; - irregular->body = NULL; - - return irregular; -} - - -/** - * osl_irregular_free function: - * This function frees the allocated memory for an osl_irregular_t - * structure. - * \param irregular The pointer to the irregular structure we want to free. - */ -void osl_irregular_free(osl_irregular_p irregular) { - int i, j, nb_predicates; - - if (irregular != NULL) { - for(i = 0; i < irregular->nb_statements; i++) - free(irregular->predicates[i]); - - if(irregular->predicates != NULL) - free(irregular->predicates); - - nb_predicates = irregular->nb_control + irregular->nb_exit; - for(i = 0; i < nb_predicates; i++) { - for(j = 0; j < irregular->nb_iterators[i]; j++) - free(irregular->iterators[i][j]); - free(irregular->iterators[i]); - free(irregular->body[i]); - } - if(irregular->iterators != NULL) - free(irregular->iterators); - if(irregular->nb_iterators != NULL) - free(irregular->nb_iterators); - if(irregular->body != NULL) - free(irregular->body); - if(irregular->nb_predicates != NULL) - free(irregular->nb_predicates); - free(irregular); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_irregular_clone function: - * This function builds and returns a "hard copy" (not a pointer copy) of an - * osl_irregular_t data structure. - * \param irregular The pointer to the irregular structure we want to copy. - * \return A pointer to the copy of the irregular structure. - */ -osl_irregular_p osl_irregular_clone(osl_irregular_p irregular) { - int i,j; - osl_irregular_p copy; - - if (irregular == NULL) - return NULL; - - copy = osl_irregular_malloc(); - copy->nb_statements = irregular->nb_statements; - copy->nb_predicates = (int *)malloc(sizeof(int)*copy->nb_statements); - if (copy->nb_predicates == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - copy->predicates = (int **)malloc(sizeof(int*)*copy->nb_statements); - if (copy->predicates == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; inb_statements; i++) - { - copy->nb_predicates[i]=irregular->nb_predicates[i]; - copy->predicates[i] = (int *)malloc(sizeof(int)*copy->nb_predicates[i]); - if (copy->predicates[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(j=0; jnb_predicates[i]; j++) - copy->predicates[i][j] = irregular->predicates[i][j]; - } - - copy->nb_control = irregular->nb_control; - copy->nb_exit = irregular->nb_exit; - int nb_predicates = irregular->nb_control + irregular->nb_exit; - copy->nb_iterators = (int *)malloc(sizeof(int)*nb_predicates); - if (copy->nb_iterators == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - copy->iterators = (char ***)malloc(sizeof(char**)*nb_predicates); - if (copy->iterators == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - copy->body = (char **)malloc(sizeof(char*)*nb_predicates); - if (copy->body == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; inb_iterators[i] = irregular->nb_iterators[i]; - copy->iterators[i] = (char**)malloc(sizeof(char*)*copy->nb_iterators[i]); - if (copy->iterators[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(j=0;jnb_iterators[i];j++) - copy->iterators[i][j] = strdup(irregular->iterators[i][j]); - copy->body[i] = strdup(irregular->body[i]); - } - - return copy; -} - - -/** - * osl_irregular_equal function: - * this function returns true if the two irregular structures are the same - * (content-wise), false otherwise. This functions considers two irregular - * \param c1 The first irregular structure. - * \param c2 The second irregular structure. - * \return 1 if c1 and c2 are the same (content-wise), 0 otherwise. - */ -int -osl_irregular_equal(osl_irregular_p c1, osl_irregular_p c2) -{ - int i,j,bool = 0; - if (c1 == c2) - return 1; - - if (((c1 == NULL) && (c2 != NULL)) || ((c1 != NULL) && (c2 == NULL))) - return 0; - - if(c1->nb_statements != c2->nb_statements || - c1->nb_control != c2->nb_control || - c1->nb_exit != c2->nb_exit) - return 0; - i=0; - while(bool == 0 && i < c1->nb_statements) - { - bool = c1->nb_predicates[i] != c2->nb_predicates[i] ? 1 : 0; - i++; - } - if(bool != 0) - return 0; - - i = 0; - while(bool == 0 && i < c1->nb_control + c1->nb_exit) - { - bool += c1->nb_iterators[i] != c2->nb_iterators[i] ? 1 : 0; - bool += strcmp(c1->body[i],c2->body[i]); - j = 0; - while(bool == 0 && j < c1->nb_iterators[i]) - { - bool += strcmp(c1->iterators[i][j],c2->iterators[i][j]); - j++; - } - i++; - } - if(bool != 0) - return 0; - return 1; -} - -osl_irregular_p osl_irregular_add_control( - osl_irregular_p irregular, - char** iterators, - int nb_iterators, - char* body) -{ - int i,j; - osl_irregular_p result=osl_irregular_malloc(); - - result->nb_control = irregular->nb_control + 1; - result->nb_exit = irregular->nb_exit; - result->nb_statements = irregular->nb_statements; - int nb_predicates = result->nb_control + result->nb_exit; - - result->iterators = (char***)malloc(sizeof(char**)*nb_predicates); - result->nb_iterators = (int*)malloc(sizeof(int)*nb_predicates); - result->body = (char**)malloc(sizeof(char*)*nb_predicates); - if (result->iterators == NULL || - result->nb_iterators == NULL || - result->body == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - //copy controls - for(i=0; inb_control; i++) - { - result->nb_iterators[i] = irregular->nb_iterators[i]; - result->body[i] = strdup(irregular->body[i]); - result->iterators[i] = (char**)malloc(sizeof(char*) * - irregular->nb_iterators[i]); - if (result->iterators[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(j=0; jnb_iterators[i];j++) - result->iterators[i][j] = strdup(irregular->iterators[i][j]); - } - //add controls - result->iterators[irregular->nb_control] = (char**)malloc(sizeof(char*)*nb_iterators); - if (result->iterators[irregular->nb_control] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; iiterators[irregular->nb_control][i] = strdup(iterators[i]); - result->nb_iterators[irregular->nb_control] = nb_iterators; - result->body[irregular->nb_control] = strdup(body); - //copy exits - for(i=result->nb_control; inb_iterators[i] = irregular->nb_iterators[i-1]; - result->body[i] = strdup(irregular->body[i-1]); - result->iterators[i] = (char**)malloc(sizeof(char*) * - irregular->nb_iterators[i-1]); - if (result->iterators[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(j=0; jnb_iterators[i-1];j++) - result->iterators[i][j] = strdup(irregular->iterators[i-1][j]); - } - // copy statements - result->nb_predicates = (int*)malloc(sizeof(int)*irregular->nb_statements); - result->predicates = (int**)malloc(sizeof(int*)*irregular->nb_statements); - if (result->nb_predicates == NULL || result->predicates == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; inb_statements; i++) - { - result->predicates[i] = (int*)malloc(sizeof(int)*irregular->nb_predicates[i]); - if (result->predicates[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - result->nb_predicates[i] = irregular->nb_predicates[i]; - for(j=0; jnb_predicates[i]; j++) - result->predicates[i][j]=irregular->predicates[i][j]; - } - return result; -} - - -osl_irregular_p osl_irregular_add_exit( - osl_irregular_p irregular, - char** iterators, - int nb_iterators, - char* body) -{ - int i,j; - osl_irregular_p result=osl_irregular_malloc(); - - result->nb_control = irregular->nb_control; - result->nb_exit = irregular->nb_exit + 1; - result->nb_statements = irregular->nb_statements; - int nb_predicates = result->nb_control + result->nb_exit; - - result->iterators = (char***)malloc(sizeof(char**)*nb_predicates); - result->nb_iterators = (int*)malloc(sizeof(int)*nb_predicates); - result->body = (char**)malloc(sizeof(char*)*nb_predicates); - if (result->iterators == NULL || - result->nb_iterators == NULL || - result->body == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - //copy controls and exits - for(i=0; inb_iterators[i] = irregular->nb_iterators[i]; - result->body[i] = strdup(irregular->body[i]); - result->iterators[i] = (char**)malloc(sizeof(char*) * - irregular->nb_iterators[i]); - if (result->iterators[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(j=0; jnb_iterators[i];j++) - result->iterators[i][j] = strdup(irregular->iterators[i][j]); - } - //add exit - result->iterators[nb_predicates-1] = (char**)malloc(sizeof(char*)*nb_iterators); - if (result->iterators[nb_predicates-1] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - - for(i=0; iiterators[nb_predicates-1][i] = strdup(iterators[i]); - result->nb_iterators[nb_predicates-1] = nb_iterators; - result->body[nb_predicates-1] = strdup(body); - // copy statements - result->nb_predicates = (int*)malloc(sizeof(int)*irregular->nb_statements); - result->predicates = (int**)malloc(sizeof(int*)*irregular->nb_statements); - if (result->nb_predicates == NULL || result->predicates == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; inb_statements; i++) - { - result->predicates[i] = (int*)malloc(sizeof(int)*irregular->nb_predicates[i]); - if (result->predicates[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - result->nb_predicates[i] = irregular->nb_predicates[i]; - for(j=0; jnb_predicates[i]; j++) - result->predicates[i][j]=irregular->predicates[i][j]; - } - return result; -} - - -osl_irregular_p osl_irregular_add_predicates( - osl_irregular_p irregular, - int* predicates, - int nb_add_predicates) -{ - int i,j; - osl_irregular_p result=osl_irregular_malloc(); - - result->nb_control = irregular->nb_control; - result->nb_exit = irregular->nb_exit; - result->nb_statements = irregular->nb_statements+1; - int nb_predicates = result->nb_control + result->nb_exit; - - result->iterators = (char***)malloc(sizeof(char**)*nb_predicates); - result->nb_iterators = (int*)malloc(sizeof(int)*nb_predicates); - result->body = (char**)malloc(sizeof(char*)*nb_predicates); - if (result->iterators == NULL || - result->nb_iterators == NULL || - result->body == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - //copy controls and exits - for(i=0; inb_iterators[i] = irregular->nb_iterators[i]; - result->body[i] = strdup(irregular->body[i]); - result->iterators[i] = (char**)malloc(sizeof(char*) * - irregular->nb_iterators[i]); - if (result->iterators[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(j=0; jnb_iterators[i];j++) - result->iterators[i][j] = strdup(irregular->iterators[i][j]); - } - //copy statements - result->nb_predicates = (int*)malloc(sizeof(int)*result->nb_statements); - result->predicates = (int**)malloc(sizeof(int*)*result->nb_statements); - if (result->nb_predicates == NULL || - result->predicates == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; inb_statements; i++) - { - result->predicates[i] = (int*)malloc(sizeof(int)*irregular->nb_predicates[i]); - if (result->predicates[i] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - result->nb_predicates[i] = irregular->nb_predicates[i]; - for(j=0; jnb_predicates[i]; j++) - result->predicates[i][j]=irregular->predicates[i][j]; - } - //add statement - result->predicates[irregular->nb_statements] = (int*)malloc(sizeof(int)*nb_add_predicates); - if (result->predicates[irregular->nb_statements] == NULL) - { - fprintf(stderr, "[OpenScop] Error: memory overflow.\n"); - exit(1); - } - for(i=0; ipredicates[irregular->nb_statements][i] = predicates[i]; - result->nb_predicates[irregular->nb_statements] = nb_add_predicates; - - return result; - - -} - - -/** - * osl_irregular_interface function: - * this function creates an interface structure corresponding to the irregular - * extension and returns it). - * \return An interface structure for the irregular extension. - */ -osl_interface_p osl_irregular_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_IRREGULAR); - interface->idump = (osl_idump_f)osl_irregular_idump; - interface->sprint = (osl_sprint_f)osl_irregular_sprint; - interface->sread = (osl_sread_f)osl_irregular_sread; - interface->malloc = (osl_malloc_f)osl_irregular_malloc; - interface->free = (osl_free_f)osl_irregular_free; - interface->clone = (osl_clone_f)osl_irregular_clone; - interface->equal = (osl_equal_f)osl_irregular_equal; - - return interface; -} - - diff --git a/cloog-0.17.0/osl/source/extensions/lines.c b/cloog-0.17.0/osl/source/extensions/lines.c deleted file mode 100644 index 2c1817abd65fbc3785bfdb8e028d8320fc9c781c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/extensions/lines.c +++ /dev/null @@ -1,315 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/lines.c ** - **-----------------------------------------------------------------** - ** First version: 07/12/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_lines_idump function: - * this function displays an osl_lines_t structure (*lines) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param file The file where the information has to be printed. - * \param lines The lines structure whose information has to be printed. - * \param level Number of spaces before printing, for each line. - */ -void osl_lines_idump(FILE * file, osl_lines_p lines, int level) { - int j; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (lines != NULL) - fprintf(file, "+-- osl_lines_t\n"); - else - fprintf(file, "+-- NULL lines\n"); - - if (lines != NULL) { - // Go to the right level. - for(j = 0; j <= level; j++) - fprintf(file, "|\t"); - - // Display the lines content. - fprintf(file, "lines: %d - %d\n", lines->start,lines->end); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_lines_dump function: - * this function prints the content of an osl_lines_t structure - * (*lines) into a file (file, possibly stdout). - * \param file The file where the information has to be printed. - * \param lines The lines structure whose information has to be printed. - */ -void osl_lines_dump(FILE * file, osl_lines_p lines) { - osl_lines_idump(file, lines, 0); -} - - -/** - * osl_lines_sprint function: - * this function prints the content of an osl_lines_t structure - * (*lines) into a string (returned) in the OpenScop textual format. - * \param lines The lines structure whose information has to be printed. - * \return A string containing the OpenScop dump of the lines structure. - */ -char * osl_lines_sprint(osl_lines_p lines) { - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char * buffer; - - if (lines != NULL) { - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - OSL_malloc(buffer, char *, OSL_MAX_STRING * sizeof(char)); - string[0] = '\0'; - - // Print the begin tag. - sprintf(buffer, OSL_TAG_LINES_START); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Print the lines content. - sprintf(buffer, "\n%d - %d\n", lines->start, lines->end); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Print the end tag. - sprintf(buffer, OSL_TAG_LINES_STOP"\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - // Keep only the memory space we need. - OSL_realloc(string, char *, (strlen(string) + 1) * sizeof(char)); - free(buffer); - } - - return string; -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - -/** - * osl_lines_sread function: - * this function reads a lines structure from a string complying to the - * OpenScop textual format and returns a pointer to this lines structure. - * The string should contain only one textual format of a lines structure. - * \param extensions The input string where to find a lines structure. - * \return A pointer to the lines structure that has been read. - */ -osl_lines_p osl_lines_sread(char ** extensions_fixme) { - char * content, *tmp; - osl_lines_p lines; - - // FIXME: this is a quick and dirty thing to accept char ** instead - // of char * in the parameter: really do it and update the - // pointer to after what has been read. - content = *extensions_fixme; - - if (content == NULL) { - OSL_debug("no lines optional tag"); - return NULL; - } - - if (strlen(content) > OSL_MAX_STRING) - OSL_error("lines too long"); - - lines = osl_lines_malloc(); - tmp = strtok(content," -"); - lines->start = atoi(tmp); - if(lines->start == -1) - OSL_error("lines start NaN"); - - tmp = strtok(NULL," -"); - lines->end = atoi(tmp); - if(lines->end == -1) - OSL_error("lines end NaN"); - - return lines; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_lines_malloc function: - * This function allocates the memory space for an osl_lines_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty lines structure with fields set to - * default values. - */ -osl_lines_p osl_lines_malloc() { - osl_lines_p lines; - - OSL_malloc(lines, osl_lines_p, sizeof(osl_lines_t)); - lines->start = OSL_UNDEFINED; - lines->end = OSL_UNDEFINED; - - return lines; -} - - -/** - * osl_lines_free function: - * This function frees the allocated memory for an osl_lines_t - * structure. - * \param lines The pointer to the lines structure we want to free. - */ -void osl_lines_free(osl_lines_p lines) { - if (lines != NULL) { - free(lines); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_lines_clone function: - * This function builds and returns a "hard copy" (not a pointer copy) of an - * osl_lines_t data structure. - * \param lines The pointer to the lines structure we want to copy. - * \return A pointer to the copy of the lines structure. - */ -osl_lines_p osl_lines_clone(osl_lines_p lines) { - osl_lines_p copy; - - if (lines == NULL) - return NULL; - - copy = osl_lines_malloc(); - copy->start = lines->start; - copy->end = lines->end; - - return copy; -} - - -/** - * osl_lines_equal function: - * this function returns true if the two lines structures are the same - * (content-wise), false otherwise. This functions considers two lines - * \param c1 The first lines structure. - * \param c2 The second lines structure. - * \return 1 if c1 and c2 are the same (content-wise), 0 otherwise. - */ -int osl_lines_equal(osl_lines_p c1, osl_lines_p c2) { - if (c1 == c2) - return 1; - - if (((c1 == NULL) && (c2 != NULL)) || ((c1 != NULL) && (c2 == NULL))) - return 0; - - if ((c1->start != c2->start) || (c1->end != c2->end)) - return 0; - - return 1; -} - - -/** - * osl_lines_interface function: - * this function creates an interface structure corresponding to the lines - * extension and returns it). - * \return An interface structure for the lines extension. - */ -osl_interface_p osl_lines_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_LINES); - interface->idump = (osl_idump_f)osl_lines_idump; - interface->sprint = (osl_sprint_f)osl_lines_sprint; - interface->sread = (osl_sread_f)osl_lines_sread; - interface->malloc = (osl_malloc_f)osl_lines_malloc; - interface->free = (osl_free_f)osl_lines_free; - interface->clone = (osl_clone_f)osl_lines_clone; - interface->equal = (osl_equal_f)osl_lines_equal; - - return interface; -} - diff --git a/cloog-0.17.0/osl/source/extensions/scatnames.c b/cloog-0.17.0/osl/source/extensions/scatnames.c deleted file mode 100644 index bfe5baa71caa17adf735018ac722fd4023770841..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/extensions/scatnames.c +++ /dev/null @@ -1,282 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/scatnames.c ** - **-----------------------------------------------------------------** - ** First version: 03/12/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_scatnames_idump function: - * this function displays an osl_scatnames_t structure (*scatnames) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param[in] file The file where the information has to be printed. - * \param[in] scatnames Scatnames structure to print. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_scatnames_idump(FILE * file, osl_scatnames_p scatnames, int level) { - int j; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (scatnames != NULL) - fprintf(file, "+-- osl_scatnames_t\n"); - else - fprintf(file, "+-- NULL scatnames\n"); - - if (scatnames != NULL) { - // Go to the right level. - for(j = 0; j <= level + 1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Display the list of scattering names. - osl_strings_idump(file, scatnames->names, level + 1); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_scatnames_dump function: - * this function prints the content of an osl_scatnames_t structure - * (*scatnames) into a file (file, possibly stdout). - * \param[in] file The file where the information has to be printed. - * \param[in] scatnames The scatnames structure to print. - */ -void osl_scatnames_dump(FILE * file, osl_scatnames_p scatnames) { - osl_scatnames_idump(file, scatnames, 0); -} - - -/** - * osl_scatnames_sprint function: - * this function prints the content of an osl_scatnames_t structure - * (*scatnames) into a string (returned) in the OpenScop textual format. - * \param[in] scatnames The scatnames structure to print. - * \return A string containing the OpenScop dump of the scatnames structure. - */ -char * osl_scatnames_sprint(osl_scatnames_p scatnames) { - return osl_strings_sprint(scatnames->names); -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_scatnames_sread function: - * this function reads a scatnames structure from a string complying to the - * OpenScop textual format and returns a pointer to this scatnames structure. - * The input parameter is updated to the position in the input string this - * function reach right after reading the scatnames structure. If there - * is nothing to read, the function returns NULL. - * \param[in,out] input The input string where to find a scatnames. - * Updated to the position after what has been read. - * \return A pointer to the scatnames structure that has been read. - */ -osl_scatnames_p osl_scatnames_sread(char ** input) { - osl_scatnames_p scatnames = NULL; - osl_strings_p names = NULL; - - if (*input == NULL) { - OSL_debug("no scatnames optional tag"); - return NULL; - } - - // Build the scatnames structure - names = osl_strings_sread(input); - if (names != NULL) { - scatnames = osl_scatnames_malloc(); - scatnames->names = names; - } - - return scatnames; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_scatnames_malloc function: - * this function allocates the memory space for an osl_scatnames_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty scatnames structure with fields set to - * default values. - */ -osl_scatnames_p osl_scatnames_malloc() { - osl_scatnames_p scatnames; - - OSL_malloc(scatnames, osl_scatnames_p, sizeof(osl_scatnames_t)); - scatnames->names = NULL; - - return scatnames; -} - - -/** - * osl_scatnames_free function: - * this function frees the allocated memory for an osl_scatnames_t - * structure. - * \param[in,out] scatnames The pointer to the scatnames structure to free. - */ -void osl_scatnames_free(osl_scatnames_p scatnames) { - if (scatnames != NULL) { - osl_strings_free(scatnames->names); - free(scatnames); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_scatnames_clone function: - * This function builds and returns a "hard copy" (not a pointer copy) of an - * osl_scatnames_t data structure. - * \param[in] scatnames The pointer to the scatnames structure to clone. - * \return A pointer to the clone of the scatnames structure. - */ -osl_scatnames_p osl_scatnames_clone(osl_scatnames_p scatnames) { - osl_scatnames_p clone; - - if (scatnames == NULL) - return NULL; - - clone = osl_scatnames_malloc(); - clone->names = osl_strings_clone(scatnames->names); - - return clone; -} - - -/** - * osl_scatnames_equal function: - * this function returns true if the two scatnames structures are the same - * (content-wise), false otherwise. - * \param[in] s1 The first scatnames structure. - * \param[in] s2 The second scatnames structure. - * \return 1 if s1 and s2 are the same (content-wise), 0 otherwise. - */ -int osl_scatnames_equal(osl_scatnames_p s1, osl_scatnames_p s2) { - - if (s1 == s2) - return 1; - - if (((s1 == NULL) && (s2 != NULL)) || ((s1 != NULL) && (s2 == NULL))) - return 0; - - if (!osl_strings_equal(s1->names, s2->names)) - return 0; - - return 1; -} - - -/** - * osl_scatnames_interface function: - * this function creates an interface structure corresponding to the scatnames - * extension and returns it). - * \return An interface structure for the scatnames extension. - */ -osl_interface_p osl_scatnames_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_SCATNAMES); - interface->idump = (osl_idump_f)osl_scatnames_idump; - interface->sprint = (osl_sprint_f)osl_scatnames_sprint; - interface->sread = (osl_sread_f)osl_scatnames_sread; - interface->malloc = (osl_malloc_f)osl_scatnames_malloc; - interface->free = (osl_free_f)osl_scatnames_free; - interface->clone = (osl_clone_f)osl_scatnames_clone; - interface->equal = (osl_equal_f)osl_scatnames_equal; - - return interface; -} diff --git a/cloog-0.17.0/osl/source/extensions/textual.c b/cloog-0.17.0/osl/source/extensions/textual.c deleted file mode 100644 index a583843299c06fc970ddb0cd633e47071031f380..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/extensions/textual.c +++ /dev/null @@ -1,335 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/textual.c ** - **-----------------------------------------------------------------** - ** First version: 15/17/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include - - -/* CAUTION : TEXTUAL IS A VERY SPECIAL CASE: DO NOT USE IT AS AN EXAMPLE !!! */ - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_textual_idump function: - * this function displays an osl_textual_t structure (*textual) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param[in] file The file where the information has to be printed. - * \param[in] textual The textual structure to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_textual_idump(FILE * file, osl_textual_p textual, int level) { - int j; - char * tmp; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (textual != NULL) { - fprintf(file, "+-- osl_textual_t: "); - - // Display the textual message (without any carriage return). - tmp = strdup(textual->textual); - for (j = 0; j < strlen(tmp); j++) - if (tmp[j] == '\n') - tmp[j] = ' '; - - if (strlen(tmp) > 40) { - for (j = 0; j < 20; j++) - fprintf(file, "%c", tmp[j]); - fprintf(file, " ... "); - for (j = strlen(tmp) - 20; j < strlen(tmp); j++) - fprintf(file, "%c", tmp[j]); - fprintf(file, "\n"); - } - else { - fprintf(file,"%s\n", tmp); - } - free(tmp); - } - else { - fprintf(file, "+-- NULL textual\n"); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_textual_dump function: - * this function prints the content of an osl_textual_t structure - * (*textual) into a file (file, possibly stdout). - * \param[in] file The file where the information has to be printed. - * \param[in] textual The textual structure to be printed. - */ -void osl_textual_dump(FILE * file, osl_textual_p textual) { - osl_textual_idump(file, textual, 0); -} - - - -#if 0 -/** - * osl_textual_sprint function: - * this function prints the content of an osl_textual_t structure - * (*textual) into a string (returned) in the OpenScop textual format. - * \param[in] textual The textual structure to be printed. - * \return A string containing the OpenScop dump of the textual structure. - */ -char * osl_textual_sprint(osl_textual_p textual) { - char * string = NULL; - - if ((textual != NULL) && (textual->textual != NULL)) { - if (strlen(textual->textual) > OSL_MAX_STRING) - OSL_error("textual too long"); - - string = strdup(textual->textual); - if (string == NULL) - OSL_error("memory overflow"); - } - - return string; -} -#else -/** - * osl_textual_sprint function: - * this function returns NULL. This is part of the special behavior of - * the textual option (printing it along with other options would double - * the options...). - * \param[in] textual The textual structure to be printed. - * \return NULL. - */ -char * osl_textual_sprint(osl_textual_p textual) { - - return NULL; -} -#endif - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_textual_sread function: - * this function reads a textual structure from a string complying to the - * OpenScop textual format and returns a pointer to this textual structure. - * The string should contain only one textual format of a textual structure. - * \param[in,out] extensions The input string where to find a textual struct. - * Updated to the position after what has been read. - * \return A pointer to the textual structure that has been read. - */ -osl_textual_p osl_textual_sread(char ** extensions) { - osl_textual_p textual = NULL; - - if (*extensions != NULL) { - textual = osl_textual_malloc(); - OSL_strdup(textual->textual, *extensions); - - // Update the input string pointer to the end of the string (since - // everything has been read). - *extensions = *extensions + strlen(*extensions); - } - - return textual; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_textual_malloc function: - * this function allocates the memory space for an osl_textual_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty textual structure with fields set to - * default values. - */ -osl_textual_p osl_textual_malloc() { - osl_textual_p textual; - - OSL_malloc(textual, osl_textual_p, sizeof(osl_textual_t)); - textual->textual = NULL; - - return textual; -} - - -/** - * osl_textual_free function: - * this function frees the allocated memory for an osl_textual_t - * structure. - * \param[in,out] textual The pointer to the textual structure to be freed. - */ -void osl_textual_free(osl_textual_p textual) { - if (textual != NULL) { - if(textual->textual != NULL) - free(textual->textual); - free(textual); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_textual_clone function: - * this function builds and returns a "hard copy" (not a pointer copy) of an - * osl_textual_t data structure. - * \param[in] textual The pointer to the textual structure we want to clone. - * \return A pointer to the clone of the textual structure. - */ -osl_textual_p osl_textual_clone(osl_textual_p textual) { - osl_textual_p clone; - - if (textual == NULL) - return NULL; - - clone = osl_textual_malloc(); - OSL_strdup(clone->textual, textual->textual); - - return clone; -} - - -#if 0 -/** - * osl_textual_equal function: - * this function returns true if the two textual structures are the same - * (content-wise), false otherwise. - * \param f1 The first textual structure. - * \param ff The second textual structure. - * \return 1 if f1 and f2 are the same (content-wise), 0 otherwise. - */ -int osl_textual_equal(osl_textual_p f1, osl_textual_p f2) { - - if (f1 == f2) - return 1; - - if (((f1 == NULL) && (f2 != NULL)) || ((f1 != NULL) && (f2 == NULL))) - return 0; - - if (strcmp(f1->textual, f2->textual)) - return 0; - - return 1; -} -#else -/** - * osl_textual_equal function: - * this function returns 1. This is part of the special behavior of - * the textual option (the text string can be easily different while the - * options are actually identical. - * \param[in] f1 The first textual structure. - * \param[in] f2 The second textual structure. - * \return 1. - */ -int osl_textual_equal(osl_textual_p f1, osl_textual_p f2) { - - return 1; -} -#endif - - -/** - * osl_textual_interface function: - * this function creates an interface structure corresponding to the textual - * extension and returns it). - * \return An interface structure for the textual extension. - */ -osl_interface_p osl_textual_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_TEXTUAL); - interface->idump = (osl_idump_f)osl_textual_idump; - interface->sprint = (osl_sprint_f)osl_textual_sprint; - interface->sread = (osl_sread_f)osl_textual_sread; - interface->malloc = (osl_malloc_f)osl_textual_malloc; - interface->free = (osl_free_f)osl_textual_free; - interface->clone = (osl_clone_f)osl_textual_clone; - interface->equal = (osl_equal_f)osl_textual_equal; - - return interface; -} - diff --git a/cloog-0.17.0/osl/source/generic.c b/cloog-0.17.0/osl/source/generic.c deleted file mode 100644 index bbd0f23bc6dc0af0d6d29755da6f5e0256796f23..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/generic.c +++ /dev/null @@ -1,518 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** generic.c ** - **-----------------------------------------------------------------** - ** First version: 26/11/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_generic_idump function: - * this function displays an osl_generic_t structure (*generic) into - * a file (file, possibly stdout) in a way that trends to be understandable. - * It includes an indentation level (level) in order to work with others - * idump functions. - * \param[in] file File where informations are printed. - * \param[in] generic The generic whose information has to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_generic_idump(FILE * file, osl_generic_p generic, int level) { - int j, first = 1; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file,"|\t"); - - if (generic != NULL) - fprintf(file, "+-- osl_generic_t\n"); - else - fprintf(file, "+-- NULL generic\n"); - - while (generic != NULL) { - if (!first) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "| osl_generic_t\n"); - } - else { - first = 0; - } - - // A blank line - for(j = 0; j <= level + 1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - osl_interface_idump(file, generic->interface, level + 1); - - if (generic->interface != NULL) - generic->interface->idump(file, generic->data, level + 1); - - generic = generic->next; - - // Next line. - if (generic != NULL) { - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "V\n"); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_generic_dump function: - * this function prints the content of an osl_generic_t structure - * (*generic) into a file (file, possibly stdout). - * \param[in] file File where the information has to be printed. - * \param[in] generic The generic structure to print. - */ -void osl_generic_dump(FILE * file, osl_generic_p generic) { - osl_generic_idump(file, generic, 0); -} - - -/** - * osl_generic_print function: - * this function prints the content of an osl_generic_t structure - * (*generic) into a string (returned) in the OpenScop format. - * \param[in] file File where the information has to be printed. - * \param[in] generic The generic structure to print. - */ -void osl_generic_print(FILE * file, osl_generic_p generic) { - char * string; - - if (generic == NULL) - return; - - while (generic != NULL) { - if (generic->interface != NULL) { - string = generic->interface->sprint(generic->data); - if (string != NULL) { - fprintf(file, "<%s>\n", generic->interface->URI); - fprintf(file, "%s", string); - fprintf(file, "\n", generic->interface->URI); - free(string); - } - } - generic = generic->next; - } -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_generic_sread function: - * this function reads a list of generics from a string complying to the - * OpenScop textual format and a list of known interfaces. It returns a - * pointer to the corresponding list of generic structures. - * \param[in] string The string where to read a list of data. - * \param[in] registry The list of known interfaces (others are ignored). - * \return A pointer to the generic information list that has been read. - */ -osl_generic_p osl_generic_sread(char * string, osl_interface_p registry) { - osl_generic_p generic = NULL, new; - char * content, * start; - void * data; - - while (registry != NULL) { - content = osl_util_tag_content(string, registry->URI); - if (content != NULL) { - start = content; - data = registry->sread(&content); - if (data != NULL) { - new = osl_generic_malloc(); - new->interface = osl_interface_nclone(registry, 1); - new->data = data; - osl_generic_add(&generic, new); - } - free(start); - } - registry = registry->next; - } - - return generic; -} - - -/** - * osl_generic_read_one function: - * this function reads one generic from a file (possibly stdin) - * complying to the OpenScop textual format and a list of known interfaces. - * It returns a pointer to the corresponding generic structure. If no - * tag is found, an error is reported, in the case of an empty or closing tag - * name the function returns the NULL pointer. - * \param[in] file The input file where to read a list of data. - * \param[in] registry The list of known interfaces (others are ignored). - * \return A pointer to the generic that has been read. - */ -osl_generic_p osl_generic_read_one(FILE * file, osl_interface_p registry) { - char * tag; - char * content, * temp; - osl_generic_p generic = NULL; - osl_interface_p interface; - - tag = osl_util_read_tag(file, NULL); - if ((tag == NULL) || (strlen(tag) < 1) || (tag[0] == '/')) { - OSL_debug("empty tag name or closing tag instead of an opening one"); - return NULL; - } - - content = osl_util_read_uptoendtag(file, tag); - interface = osl_interface_lookup(registry, tag); - - temp = content; - if (interface == NULL) { - OSL_warning("unsupported generic"); - fprintf(stderr, "[osl] Warning: unknown URI \"%s\".\n", tag); - } - else { - generic = osl_generic_malloc(); - generic->interface = osl_interface_nclone(interface, 1); - generic->data = interface->sread(&temp); - } - - free(content); - free(tag); - return generic; -} - - -/** - * osl_generic_read function: - * this function reads a list of generics from a file (possibly stdin) - * complying to the OpenScop textual format and a list of known interfaces. - * It returns a pointer to the list of corresponding generic structures. - * \param[in] file The input file where to read a list of data. - * \param[in] registry The list of known interfaces (others are ignored). - * \return A pointer to the generic information list that has been read. - */ -osl_generic_p osl_generic_read(FILE * file, osl_interface_p registry) { - char * generic_string; - osl_generic_p generic_list; - - generic_string = osl_util_read_uptotag(file, OSL_TAG_END_SCOP); - generic_list = osl_generic_sread(generic_string, registry); - free(generic_string); - return generic_list; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_generic_add function: - * this function adds a generic node (it may be a list as well) to a list - * of generics provided as parameter (list). The new node is inserted at - * the end of the list. - * \param[in] list The list of generics to add a node (NULL if empty). - * \param[in] generic The generic list to add to the initial list. - */ -void osl_generic_add(osl_generic_p * list, osl_generic_p generic) { - osl_generic_p tmp = *list, check; - - if (generic != NULL) { - // First, check that the generic list is OK. - check = generic; - while (check != NULL) { - if ((check->interface == NULL) || (check->interface->URI == NULL)) - OSL_error("no interface or URI in a generic to add to a list"); - - // TODO: move this to the integrity check. - if (osl_generic_lookup(*list, check->interface->URI) != NULL) - OSL_error("only one generic with a given URI is allowed"); - check = check->next; - } - - if (*list != NULL) { - while (tmp->next != NULL) - tmp = tmp->next; - tmp->next = generic; - } - else { - *list = generic; - } - } -} - - -/** - * osl_generic_malloc function: - * This function allocates the memory space for an osl_generic_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty generic structure with fields set to - * default values. - */ -osl_generic_p osl_generic_malloc() { - osl_generic_p generic; - - OSL_malloc(generic, osl_generic_p, sizeof(osl_generic_t)); - generic->interface = NULL; - generic->data = NULL; - generic->next = NULL; - - return generic; -} - - -/** - * osl_generic_free function: - * This function frees the allocated memory for a generic structure. - * \param[in] generic The pointer to the generic structure we want to free. - */ -void osl_generic_free(osl_generic_p generic) { - osl_generic_p next; - - while (generic != NULL) { - next = generic->next; - if (generic->interface != NULL) { - generic->interface->free(generic->data); - osl_interface_free(generic->interface); - } - else { - if (generic->data != NULL) { - OSL_warning("unregistered interface, memory leaks are possible"); - free(generic->data); - } - } - free(generic); - generic = next; - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_generic_clone function: - * This function builds and returns a "hard copy" (not a pointer copy) of an - * osl_generic_t data structure. - * \param[in] generic The pointer to the generic structure we want to clone. - * \return A pointer to the clone of the input generic structure. - */ -osl_generic_p osl_generic_clone(osl_generic_p generic) { - osl_generic_p clone = NULL, new; - osl_interface_p interface; - void * x; - - while (generic != NULL) { - if (generic->interface != NULL) { - x = generic->interface->clone(generic->data); - interface = osl_interface_clone(generic->interface); - new = osl_generic_malloc(); - new->interface = interface; - new->data = x; - osl_generic_add(&clone, new); - } - else { - OSL_warning("unregistered interface, cloning ignored"); - } - generic = generic->next; - } - - return clone; -} - - -/** - * osl_generic_count function: - * this function counts the number of elements in the generic list provided - * as parameter (x) and returns this number. - * \param[in] x The list of generics. - * \return The number of elements in the list. - */ -int osl_generic_count(osl_generic_p x) { - int generic_number = 0; - - while (x != NULL) { - generic_number++; - x = x->next; - } - - return generic_number; -} - - -/** - * osl_generic_equal function: - * this function returns true if the two generic structures are the same, - * false otherwise. This functions considers two generic structures as equal - * independently of the order of the nodes. TODO: make it dependent on the - * order. - * \param x1 The first generic structure. - * \param x2 The second generic structure. - * \return 1 if x1 and x2 are the same (content-wise), 0 otherwise. - */ -int osl_generic_equal(osl_generic_p x1, osl_generic_p x2) { - int x1_generic_number, x2_generic_number; - int found, equal; - osl_generic_p backup_x2 = x2; - - if (x1 == x2) - return 1; - - // Check whether the number of generics is the same or not. - x1_generic_number = osl_generic_count(x1); - x2_generic_number = osl_generic_count(x2); - if (x1_generic_number != x2_generic_number) - return 0; - - // Check that for each generic in x1 a similar generic is in x2. - while (x1 != NULL) { - x2 = backup_x2; - found = 0; - while ((x2 != NULL) && (found != 1)) { - if (osl_interface_equal(x1->interface, x2->interface)) { - if (x1->interface != NULL) { - equal = x1->interface->equal(x1->data, x2->data); - } - else { - OSL_warning("unregistered generic, " - "cannot state generic equality"); - equal = 0; - } - - if (equal == 0) - return 0; - else - found = 1; - } - - x2 = x2->next; - } - - if (found != 1) - return 0; - - x1 = x1->next; - } - - return 1; -} - - -/** - * osl_generic_has_URI function: - * this function returns 1 if the generic provided as parameter has - * a given URI, 0 other wise. - * \param x The generic structure to test. - * \param URI The URI value to test. - * \return 1 if x has the provided URI, 0 otherwise. - */ -int osl_generic_has_URI(osl_generic_p x, char * URI) { - - if ((x == NULL) || - (x->interface == NULL) || - (x->interface->URI == NULL) || - (strcmp(x->interface->URI, URI))) - return 0; - - return 1; -} - - -/** - * osl_generic_lookup function: - * this function returns the first generic with a given URI in the - * generic list provided as parameter and NULL if it doesn't find such - * a generic. - * \param x The generic list where to search a given generic URI. - * \param URI The URI of the generic we are looking for. - * \return The first generic of the requested URI in the list. - */ -void * osl_generic_lookup(osl_generic_p x, char * URI) { - while (x != NULL) { - if (osl_generic_has_URI(x, URI)) - return x->data; - - x = x->next; - } - - return NULL; -} diff --git a/cloog-0.17.0/osl/source/int.c b/cloog-0.17.0/osl/source/int.c deleted file mode 100644 index 70d398e0934c38e04a5ec42f91877e268cfa0314..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/int.c +++ /dev/null @@ -1,919 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** int.c ** - **-----------------------------------------------------------------** - ** First version: 18/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#ifdef OSL_GMP_IS_HERE -# include -#endif - -#include -#include - - - -/*+*************************************************************************** - * Basic Functions * - *****************************************************************************/ - - -/** - * osl_int_dump_precision function: - * this function prints in a human readable fashion the precision - * corresponding to the "precision" parameter. - * \param[in] file The file where to print the precision. - * \param[in] precision The precision to print. - */ -void osl_int_dump_precision(FILE * file, int precision) { - - switch (precision) { - case OSL_PRECISION_SP: - fprintf(file, "32 bits"); - break; - case OSL_PRECISION_DP: - fprintf(file, "64 bits"); - break; -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - fprintf(file, "GMP"); - break; -#endif - default: - fprintf(file, "unknown precision %d", precision); - } -} - - -int osl_int_sizeof(int precision) { - switch (precision) { - case OSL_PRECISION_SP: - return sizeof(long int); - - case OSL_PRECISION_DP: - return sizeof(long long int); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return sizeof(mpz_t); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -void * osl_int_address(int precision, void * base, int offset) { - switch (precision) { - case OSL_PRECISION_SP: - return (long int *)base + offset; - - case OSL_PRECISION_DP: - return (long long int *)base + offset; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_t *)base + offset; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -void osl_int_init(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)value = 0; - break; - - case OSL_PRECISION_DP: - *(long long int *)value = 0; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_init(*(mpz_t *)value); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -void * osl_int_malloc(int precision) { - void * value; - - switch (precision) { - case OSL_PRECISION_SP: - value = malloc(sizeof(long int)); - break; - - case OSL_PRECISION_DP: - value = malloc(sizeof(long long int)); - *(long long int *)value = 0; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - value = malloc(sizeof(mpz_t)); - break; -#endif - - default: - OSL_error("unknown precision"); - } - - osl_int_init(precision, value, 0); - return value; -} - - -/** - * val1_base[val1_offset] = val2_base[val2_offset]; - */ -void osl_int_assign(int precision, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - void * val1 = osl_int_address(precision, val1_base, val1_offset); - void * val2 = osl_int_address(precision, val2_base, val2_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)val1 = *(long int *)val2; - break; - - case OSL_PRECISION_DP: - *(long long int *)val1 = *(long long int *)val2; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_set(*(mpz_t *)val1, *(mpz_t *)val2); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * value_base[value_offset] = i; - */ -void osl_int_set_si(int precision, void * value_base, int value_offset, - int i) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)value = (long int)i; - break; - - case OSL_PRECISION_DP: - *(long long int *)value = (long long int)i; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_set_si(*(mpz_t *)value, i); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * return value_base[value_offset]; - */ -int osl_int_get_si(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return *(int *)value; - - case OSL_PRECISION_DP: - return *(int *)value; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return mpz_get_si(*(mpz_t *)value); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * value_base[value_offset] = i; // including initialization for GMP - */ -void osl_int_init_set_si(int precision, - void * value_base, int value_offset, int i) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)value = (long int)i; - break; - - case OSL_PRECISION_DP: - *(long long int *)value = (long long int)i; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_init_set_si(*(mpz_t *)value, i); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * value_base[value_offset] = 0; // Including cleaning for GMP - */ -void osl_int_clear(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)value = 0; - break; - - case OSL_PRECISION_DP: - *(long long int *)value = 0; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_clear(*(mpz_t *)value); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -void osl_int_free(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - osl_int_clear(precision, value_base, value_offset); - free(value); -} - - -/** - * osl_int_print function: - * this function displays an integer value into a file (file, possibly stdout). - * \param file The file where the integer has to be printed. - * \param precision The precision of the integer. - * \param value_base Address of the base integer value. - * \param value_offset Offset in number of values from the base integer value. - */ -void osl_int_print(FILE * file, int precision, - void * value_base, int value_offset) { - char string[OSL_MAX_STRING]; - - osl_int_sprint(string, precision, value_base, value_offset); - fprintf(file, "%s", string); -} - - -/** - * osl_int_sprint function: - * this function prints an integer value into a string, it uses the - * OpenScop Library formats OSL_FMT_* to format the printing. - * \param string The string where the integer has to be printed. - * \param precision The precision of the integer. - * \param value_base Address of the base integer value. - * \param value_offset Offset in number of values from the base integer value. - */ -void osl_int_sprint(char * string, int precision, - void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - sprintf(string, OSL_FMT_SP, *(long int *)value); - break; - - case OSL_PRECISION_DP: - sprintf(string, OSL_FMT_DP, *(long long int *)value); - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: { - char * str; - str = mpz_get_str(0, 10, *(mpz_t *)value); //TODO: 10 -> #define - sprintf(string, OSL_FMT_MP, str); - free(str); - break; - } -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * osl_int_sprint_txt function: - * this function is similar to osl_int_sprintf but it prints the value - * using OSL_TMT_TXT_* formats. - * \see osl_int_sprintf - */ -void osl_int_sprint_txt(char * string, int precision, - void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - sprintf(string, OSL_FMT_TXT_SP, *(long int *)value); - break; - - case OSL_PRECISION_DP: - sprintf(string, OSL_FMT_TXT_DP, *(long long int *)value); - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: { - char * str; - str = mpz_get_str(0, 10, *(mpz_t *)value); //TODO: 10 -> #define - sprintf(string, OSL_FMT_TXT_MP, str); - free(str); - break; - } -#endif - - default: - OSL_error("unknown precision"); - } -} - - -void osl_int_sread(char ** string, int precision, - void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - int nb_read = 0; - - switch (precision) { - case OSL_PRECISION_SP: - nb_read = sscanf(*string, OSL_FMT_TXT_SP, (long int *)value); - if (nb_read == 0) - OSL_error("failed to read an integer"); - break; - - case OSL_PRECISION_DP: - nb_read = sscanf(*string, OSL_FMT_TXT_DP, (long long int *)value); - if (nb_read == 0) - OSL_error("failed to read an integer"); - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: { - long long int tmp; - nb_read = sscanf(*string, OSL_FMT_TXT_DP, &tmp); - if (nb_read == 0) - OSL_error("failed to read an integer"); - mpz_set_si(*(mpz_t *)value, tmp); - break; - } -#endif - - default: - OSL_error("unknown precision"); - } - - // Update the position in the input string. - *string = *string + nb_read; -} - - -/*+*************************************************************************** - * Arithmetic Operations * - *****************************************************************************/ - - -/** - * result_base[result_offset] = value_base[value_offset] + 1; - */ -void osl_int_increment(int precision, - void * result_base, int result_offset, - void * value_base, int value_offset) { - void * result = osl_int_address(precision, result_base, result_offset); - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)value + (long int)1; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)value + (long long int)1; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_add_ui(*(mpz_t *)result, *(mpz_t *)value, 1); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = value_base[value_offset] - 1; - */ -void osl_int_decrement(int precision, - void * result_base, int result_offset, - void * value_base, int value_offset) { - void * result = osl_int_address(precision, result_base, result_offset); - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)value - (long int)1; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)value - (long long int)1; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: { - mpz_t one; - mpz_init_set_si(one, 1); - mpz_sub(*(mpz_t *)result, *(mpz_t *)value, one); - mpz_clear(one); - break; - } -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = val1_base[val1_offset]+val2_base[val2_offset]; - */ -void osl_int_add(int precision, - void * result_base, int result_offset, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - void * result = osl_int_address(precision, result_base, result_offset); - void * val1 = osl_int_address(precision, val1_base, val1_offset); - void * val2 = osl_int_address(precision, val2_base, val2_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)val1 + *(long int *)val2; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)val1 + - *(long long int *)val2; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_add(*(mpz_t *)result, *(mpz_t *)val1, *(mpz_t *)val2); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = value_base[value_offset] + i; - */ -void osl_int_add_si(int precision, - void * result_base, int result_offset, - void * value_base, int value_offset, int i) { - void * result = osl_int_address(precision, result_base, result_offset); - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)value + (long int)i; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)value + (long long int)i; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: { - mpz_t si; - mpz_init_set_si(si, i); - mpz_add(*(mpz_t *)result, *(mpz_t *)value, si); - mpz_clear(si); - break; - } -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = val1_base[val1_offset]*val2_base[val2_offset]; - */ -void osl_int_mul(int precision, - void * result_base, int result_offset, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - void * result = osl_int_address(precision, result_base, result_offset); - void * val1 = osl_int_address(precision, val1_base, val1_offset); - void * val2 = osl_int_address(precision, val2_base, val2_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)val1 * *(long int *)val2; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)val1 * - *(long long int *)val2; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_mul(*(mpz_t *)result, *(mpz_t *)val1, *(mpz_t *)val2); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = value_base[value_offset] * i; - */ -void osl_int_mul_si(int precision, - void * result_base, int result_offset, - void * value_base, int value_offset, int i) { - void * result = osl_int_address(precision, result_base, result_offset); - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)value * (long int)i; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)value * (long long int)i; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_mul_si(*(mpz_t *)result, *(mpz_t *)value, i); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = val1_base[val1_offset]-val2_base[val2_offset]; - */ -void osl_int_sub(int precision, - void * result_base, int result_offset, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - void * result = osl_int_address(precision, result_base, result_offset); - void * val1 = osl_int_address(precision, val1_base, val1_offset); - void * val2 = osl_int_address(precision, val2_base, val2_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = *(long int *)val1 - *(long int *)val2; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = *(long long int *)val1 - - *(long long int *)val2; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_sub(*(mpz_t *)result, *(mpz_t *)val1, *(mpz_t *)val2); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * result_base[result_offset] = -value_base[value_offset]; - */ -void osl_int_oppose(int precision, - void * result_base, int result_offset, - void * value_base, int value_offset) { - void * result = osl_int_address(precision, result_base, result_offset); - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - *(long int *)result = -*(long int *)value; - break; - - case OSL_PRECISION_DP: - *(long long int *)result = -*(long long int *)value; - break; - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - mpz_neg(*(mpz_t *)result, *(mpz_t *)value); - break; -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/*+*************************************************************************** - * Conditional Operations * - *****************************************************************************/ - - -/** - * (val1_base[val1_offset] == val2_base[val2_offset]) - */ -int osl_int_eq(int precision, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - void * val1 = osl_int_address(precision, val1_base, val1_offset); - void * val2 = osl_int_address(precision, val2_base, val2_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return (*(long int *)val1 == *(long int *)val2); - - case OSL_PRECISION_DP: - return (*(long long int *)val1 == *(long long int *)val2); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_cmp(*(mpz_t *)val1, *(mpz_t *)val2) == 0); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * (val1_base[val1_offset] != val2_base[val2_offset]) - */ -int osl_int_ne(int precision, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - return !osl_int_eq(precision, - val1_base, val1_offset, - val2_base, val2_offset); -} - - -/** - * (value_base[value_offset] > 0) - */ -int osl_int_pos(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return (*(long int *)value > 0); - - case OSL_PRECISION_DP: - return (*(long long int *)value > 0); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_sgn(*(mpz_t *)value) > 0); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * (value_base[value_offset] < 0) - */ -int osl_int_neg(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return (*(long int *)value < 0); - - case OSL_PRECISION_DP: - return (*(long long int *)value < 0); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_sgn(*(mpz_t *)value) < 0); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * (value_base[value_offset] == 0) - */ -int osl_int_zero(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return (*(long int *)value == 0); - - case OSL_PRECISION_DP: - return (*(long long int *)value == 0); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_sgn(*(mpz_t *)value) == 0); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * (value_base[value_offset] == 1) - */ -int osl_int_one(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return (*(long int *)value == (long int)1); - - case OSL_PRECISION_DP: - return (*(long long int *)value == (long long int)1); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_cmp_si(*(mpz_t *)value, 1) == 0); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * (value_base[value_offset] == -1) - */ -int osl_int_mone(int precision, void * value_base, int value_offset) { - void * value = osl_int_address(precision, value_base, value_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return (*(long int *)value == (long int)-1); - - case OSL_PRECISION_DP: - return (*(long long int *)value == (long long int)-1); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return (mpz_cmp_si(*(mpz_t *)value, -1) == 0); -#endif - - default: - OSL_error("unknown precision"); - } -} - - -/** - * ((val1_base[val1_offset] % val2_base[val2_offset]) == 0) - */ -int osl_int_divisible(int precision, - void * val1_base, int val1_offset, - void * val2_base, int val2_offset) { - void * val1 = osl_int_address(precision, val1_base, val1_offset); - void * val2 = osl_int_address(precision, val2_base, val2_offset); - - switch (precision) { - case OSL_PRECISION_SP: - return ((*(long int *)val1 % *(long int *)val2) == 0); - - case OSL_PRECISION_DP: - return ((*(long long int *)val1 % *(long long int *)val2) == 0); - -#ifdef OSL_GMP_IS_HERE - case OSL_PRECISION_MP: - return mpz_divisible_p(*(mpz_t *)val1, *(mpz_t *)val2); -#endif - - default: - OSL_error("unknown precision"); - } -} diff --git a/cloog-0.17.0/osl/source/interface.c b/cloog-0.17.0/osl/source/interface.c deleted file mode 100644 index 136fcdc67f0c3025545cc74c0e80ce8e54fc781d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/interface.c +++ /dev/null @@ -1,376 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** interface.c ** - **-----------------------------------------------------------------** - ** First version: 15/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_interface_idump function: - * this function displays an osl_interface_t structure (*interface) into - * a file (file, possibly stdout) in a way that trends to be understandable. - * It includes an indentation level (level) in order to work with others - * idump functions. - * \param file The file where the information has to be printed. - * \param interface The interface structure which has to be printed. - * \param level Number of spaces before printing, for each line. - */ -void osl_interface_idump(FILE * file, osl_interface_p interface, int level) { - int j, first = 1; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (interface != NULL) - fprintf(file, "+-- osl_interface_t: URI = %s\n", interface->URI); - else - fprintf(file, "+-- NULL interface\n"); - - - while (interface != NULL) { - if (!first) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (interface->URI != NULL) - fprintf(file, "| osl_interface_t: URI = %s\n", interface->URI); - else - fprintf(file, "| osl_interface_t: URI = (NULL)\n"); - } - else - first = 0; - - interface = interface->next; - - // Next line. - if (interface != NULL) { - for (j = 0; j <= level + 1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "V\n"); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_interface_dump function: - * this function prints the content of a osl_interface_t structure - * (*interface) into a file (file, possibly stdout). - * \param file File where informations are printed. - * \param interface The interface structure to print. - */ -void osl_interface_dump(FILE * file, osl_interface_p interface) { - osl_interface_idump(file, interface, 0); -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_interface_add function: - * this function adds an interface node (it may be a list as well) to a - * list of interfaces provided as parameter (list). The new node - * is inserted at the end of the list. - * \param list The list of interfaces to add a node (NULL if empty). - * \param interface The interface to add to the list. - */ -void osl_interface_add(osl_interface_p * list, osl_interface_p interface) { - osl_interface_p tmp = *list, check_interface; - - if (interface != NULL) { - // First, check that the interface list is OK. - check_interface = interface; - while (check_interface != NULL) { - if (check_interface->URI == NULL) - OSL_error("no URI in an interface to add to a list"); - - if (osl_interface_lookup(*list, check_interface->URI) != NULL) - OSL_error("only one interface with a given URI is allowed"); - check_interface = check_interface->next; - } - - if (*list != NULL) { - while (tmp->next != NULL) - tmp = tmp->next; - tmp->next = interface; - } - else { - *list = interface; - } - } -} - - -/** - * osl_interface_malloc function: - * This function allocates the memory space for a osl_interface_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty interface structure with fields set to - * default values. - */ -osl_interface_p osl_interface_malloc() { - osl_interface_p interface; - - OSL_malloc(interface, osl_interface_p, - sizeof(osl_interface_t)); - interface->URI = NULL; - interface->idump = NULL; - interface->sprint = NULL; - interface->sread = NULL; - interface->malloc = NULL; - interface->free = NULL; - interface->clone = NULL; - interface->equal = NULL; - interface->next = NULL; - - return interface; -} - - -/** - * osl_interface_free function: - * this function frees the allocated memory for an osl_interface_t - * structure, and all the interfaces stored in the list. - * \param[in] interface The pointer to the interface we want to free. - */ -void osl_interface_free(osl_interface_p interface) { - osl_interface_p tmp; - int i = 0; - - if (interface == NULL) - return; - - while (interface != NULL) { - tmp = interface->next; - if (interface->URI != NULL) - free(interface->URI); - free(interface); - interface = tmp; - i++; - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_interface_nclone function: - * This function builds and returns a "hard copy" (not a pointer copy) of the - * n first elements of an osl_interface_t list. - * \param interface The pointer to the interface structure we want to clone. - * \param n The number of nodes we want to copy (-1 for infinity). - * \return The clone of the n first nodes of the interface list. - */ -osl_interface_p osl_interface_nclone(osl_interface_p interface, int n) { - osl_interface_p clone = NULL, new; - int i = 0; - - while ((interface != NULL) && ((n == -1) || (i < n))) { - new = osl_interface_malloc(); - OSL_strdup(new->URI, interface->URI); - new->idump = interface->idump; - new->sprint = interface->sprint; - new->sread = interface->sread; - new->malloc = interface->malloc; - new->free = interface->free; - new->clone = interface->clone; - new->equal = interface->equal; - - osl_interface_add(&clone, new); - interface = interface->next; - i++; - } - - return clone; -} - - -/** - * osl_interface_clone function: - * This function builds and returns a "hard copy" (not a pointer copy) of an - * osl_interface_t data structure. - * \param interface The pointer to the interface structure we want to copy. - * \return A pointer to the copy of the interface structure. - */ -osl_interface_p osl_interface_clone(osl_interface_p interface) { - - return osl_interface_nclone(interface, -1); -} - - -/** - * osl_interface_equal function: - * this function returns true if the two interface structures are the same, - * (content-wise) false otherwise. - * \param interface1 The first interface structure. - * \param interface2 The second interface structure. - * \return 1 if interface1 and interface2 are the same, 0 otherwise. - */ -int osl_interface_equal(osl_interface_p interface1, - osl_interface_p interface2) { - - if (interface1 == interface2) - return 1; - - if (((interface1 == NULL) && (interface2 != NULL)) || - ((interface1 != NULL) && (interface2 == NULL))) - return 0; - - if (strcmp(interface1->URI, interface2->URI) || - (interface1->idump != interface2->idump) || - (interface1->sprint != interface2->sprint) || - (interface1->sread != interface2->sread) || - (interface1->malloc != interface2->malloc) || - (interface1->free != interface2->free) || - (interface1->clone != interface2->clone) || - (interface1->equal != interface2->equal)) - return 0; - - return 1; -} - - -/** - * osl_interface_lookup function: - * this function returns the first interface with a given URI in the - * interface list provided as parameter and NULL if it doesn't find such - * an interface. - * \param list The interface list where to search a given interface URI. - * \param URI The URI of the interface we are looking for. - * \return The first interface of the requested URI in the list. - */ -osl_interface_p -osl_interface_lookup(osl_interface_p list, char * URI) { - while (list != NULL) { - if ((list->URI != NULL) && (!strcmp(list->URI, URI))) - return list; - - list = list->next; - } - - return NULL; -} - - -/** - * osl_interface_get_default_registry function: - * this function creates the list of known interfaces (of all generic types, - * including extensions) and returns it. - * \return The list of known interfaces. - */ -osl_interface_p osl_interface_get_default_registry() { - osl_interface_p registry = NULL; - - // Internal generics - osl_interface_add(®istry, osl_strings_interface()); - osl_interface_add(®istry, osl_body_interface()); - - // Extensions - osl_interface_add(®istry, osl_textual_interface()); - osl_interface_add(®istry, osl_comment_interface()); - osl_interface_add(®istry, osl_scatnames_interface()); - //osl_interface_add(®istry, osl_arrays_interface()); - //osl_interface_add(®istry, osl_lines_interface()); - //osl_interface_add(®istry, osl_irregular_interface()); - - return registry; -} - - - diff --git a/cloog-0.17.0/osl/source/names.c b/cloog-0.17.0/osl/source/names.c deleted file mode 100644 index c68f936a829d5fcdfff8693705c3a8868ee654ed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/names.c +++ /dev/null @@ -1,242 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** extensions/names.c ** - **-----------------------------------------------------------------** - ** First version: 18/04/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include - -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_names_idump function: - * this function displays an osl_names_t structure (*names) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param[in] file The file where the information has to be printed. - * \param[in] names The names structure whose information has to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_names_idump(FILE * file, osl_names_p names, int level) { - int j; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (names != NULL) - fprintf(file, "+-- osl_names_t\n"); - else - fprintf(file, "+-- NULL names\n"); - - if (names != NULL) { - // A blank line. - for (j = 0; j <= level+1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print the various names. - osl_strings_idump(file, names->parameters, level + 1); - osl_strings_idump(file, names->iterators, level + 1); - osl_strings_idump(file, names->scatt_dims, level + 1); - osl_strings_idump(file, names->local_dims, level + 1); - osl_strings_idump(file, names->arrays, level + 1); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_names_dump function: - * this function prints the content of an osl_names_t structure - * (*names) into a file (file, possibly stdout). - * \param[in] file The file where the information has to be printed. - * \param[in] names The names structure whose information has to be printed. - */ -void osl_names_dump(FILE * file, osl_names_p names) { - osl_names_idump(file, names, 0); -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_names_malloc function: - * this function allocates the memory space for an osl_names_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty names structure with fields set to - * default values. - */ -osl_names_p osl_names_malloc() { - osl_names_p names; - - OSL_malloc(names, osl_names_p, sizeof(osl_names_t)); - names->parameters = NULL; - names->iterators = NULL; - names->scatt_dims = NULL; - names->local_dims = NULL; - names->arrays = NULL; - - return names; -} - - -/** - * osl_names_free function: - * This function frees the allocated memory for an osl_names_t - * structure. If the names are not character strings, it is the - * responsibility of the user to free each array of elements (including - * the array itself), this function will only free the osl_names_t shell. - * \param[in,out] names The pointer to the names structure we want to free. - */ -void osl_names_free(osl_names_p names) { - if (names != NULL) { - osl_strings_free(names->parameters); - osl_strings_free(names->iterators); - osl_strings_free(names->scatt_dims); - osl_strings_free(names->local_dims); - osl_strings_free(names->arrays); - - free(names); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_names_generate function: - * this function generates some names. For each kind of name it will generate - * a given number of names with a given prefix followed by a number. - * \param[in] parameter_prefix Prefix for parameter names. - * \param[in] nb_parameters Number of parameters names to generate. - * \param[in] iterator_prefix Prefix for iterator names. - * \param[in] nb_iterators Number of iterators names to generate. - * \param[in] scatt_dim_prefix Prefix for scattering dimension names. - * \param[in] nb_scatt_dims Number of scattering dim names to generate. - * \param[in] local_dim_prefix Prefix for local dimension names. - * \param[in] nb_local_dims Number of local dimension names to generate. - * \param[in] array_prefix Prefix for array names. - * \param[in] nb_arrays Number of array names to generate. - * \return A new names structure containing generated names. - */ -osl_names_p osl_names_generate( - char * parameter_prefix, int nb_parameters, - char * iterator_prefix, int nb_iterators, - char * scatt_dim_prefix, int nb_scatt_dims, - char * local_dim_prefix, int nb_local_dims, - char * array_prefix, int nb_arrays) { - osl_names_p names = osl_names_malloc(); - - names->parameters= osl_strings_generate(parameter_prefix,nb_parameters); - names->iterators = osl_strings_generate(iterator_prefix, nb_iterators); - names->scatt_dims= osl_strings_generate(scatt_dim_prefix,nb_scatt_dims); - names->local_dims= osl_strings_generate(local_dim_prefix,nb_local_dims); - names->arrays = osl_strings_generate(array_prefix, nb_arrays); - - return names; -} - -/** - * osl_names_clone function: - * this function builds and returns a "hard copy" (not a pointer copy) of an - * osl_names_t data structure provided as parameter. - * \param[in] names The pointer to the names structure we want to clone. - * \return A pointer to the clone of the names structure provided as parameter. - */ -osl_names_p osl_names_clone(osl_names_p names) { - osl_names_p clone = NULL; - - if (names != NULL) { - clone = osl_names_malloc(); - clone->parameters = osl_strings_clone(names->parameters); - clone->iterators = osl_strings_clone(names->iterators); - clone->scatt_dims = osl_strings_clone(names->scatt_dims); - clone->local_dims = osl_strings_clone(names->local_dims); - clone->arrays = osl_strings_clone(names->arrays); - } - return clone; -} diff --git a/cloog-0.17.0/osl/source/relation.c b/cloog-0.17.0/osl/source/relation.c deleted file mode 100644 index a4b641a30f7a99342874711fe5096df6bc51f31c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/relation.c +++ /dev/null @@ -1,2179 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** relation.c ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_relation_sprint_type function: - * this function prints the textual type of an osl_relation_t structure into - * a string, according to the OpenScop specification, and returns that string. - * \param[in] relation The relation whose type has to be printed. - * \return A string containing the relation type. - */ -static -char * osl_relation_sprint_type(osl_relation_p relation) { - char * string = NULL; - - OSL_malloc(string, char *, OSL_MAX_STRING * sizeof(char)); - string[0] = '\0'; - - if (relation != NULL) { - switch (relation->type) { - case OSL_UNDEFINED: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_UNDEFINED); - break; - } - case OSL_TYPE_CONTEXT: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_CONTEXT); - break; - } - case OSL_TYPE_DOMAIN: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_DOMAIN); - break; - } - case OSL_TYPE_SCATTERING: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_SCATTERING); - break; - } - case OSL_TYPE_READ: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_READ); - break; - } - case OSL_TYPE_WRITE: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_WRITE); - break; - } - case OSL_TYPE_MAY_WRITE: { - snprintf(string, OSL_MAX_STRING, OSL_STRING_MAY_WRITE); - break; - } - default: { - OSL_warning("unknown relation type, " - "replaced with "OSL_STRING_UNDEFINED); - snprintf(string, OSL_MAX_STRING, OSL_STRING_UNDEFINED); - } - } - } - - return string; -} - - -/** - * osl_relation_print_type function: - * this function displays the textual type of an osl_relation_t structure into - * a file (file, possibly stdout), according to the OpenScop specification. - * \param[in] file File where informations are printed. - * \param[in] relation The relation whose type has to be printed. - */ -static -void osl_relation_print_type(FILE * file, osl_relation_p relation) { - char * string = osl_relation_sprint_type(relation); - fprintf(file, "%s", string); - free(string); -} - - -/** - * osl_relation_idump function: - * this function displays a osl_relation_t structure (*relation) into a - * file (file, possibly stdout) in a way that trends to be understandable. - * It includes an indentation level (level) in order to work with others - * idump functions. - * \param[in] file File where informations are printed. - * \param[in] relation The relation whose information has to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_relation_idump(FILE * file, osl_relation_p relation, int level) { - int i, j, first = 1; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (relation != NULL) { - fprintf(file, "+-- osl_relation_t ("); - osl_relation_print_type(file, relation); - fprintf(file, ", "); - osl_int_dump_precision(file, relation->precision); - fprintf(file, ")\n"); - } - else { - fprintf(file, "+-- NULL relation\n"); - } - - while (relation != NULL) { - if (! first) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "| osl_relation_t ("); - osl_relation_print_type(file, relation); - fprintf(file, ", "); - osl_int_dump_precision(file, relation->precision); - fprintf(file, ")\n"); - } - else - first = 0; - - // A blank line - for(j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "%d %d %d %d %d %d\n", - relation->nb_rows, relation->nb_columns, - relation->nb_output_dims, relation->nb_input_dims, - relation->nb_local_dims, relation->nb_parameters); - - // Display the relation. - for (i = 0; i < relation->nb_rows; i++) { - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - - fprintf(file, "[ "); - - for (j = 0; j < relation->nb_columns; j++) { - osl_int_print(file, relation->precision, relation->m[i], j); - fprintf(file, " "); - } - - fprintf(file, "]\n"); - } - - relation = relation->next; - - // Next line. - if (relation != NULL) { - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "|\n"); - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "V\n"); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_relation_dump function: - * this function prints the content of a osl_relation_t structure - * (*relation) into a file (file, possibly stdout). - * \param[in] file File where informations are printed. - * \param[in] relation The relation whose information have to be printed. - */ -void osl_relation_dump(FILE * file, osl_relation_p relation) { - osl_relation_idump(file, relation, 0); -} - - -/** - * osl_relation_expression_element function: - * this function returns a string containing the printing of a value (e.g., - * an iterator with its coefficient or a constant). - * \param[in] val Address of the coefficient or constant value. - * \param[in] precision The precision of the value. - * \param[in,out] first Pointer to a boolean set to 1 if the current value - * is the first of an expresion, 0 otherwise (maybe - * updated). - * \param[in] cst A boolean set to 1 if the value is a constant, - * 0 otherwise. - * \param[in] name String containing the name of the element. - * \return A string that contains the printing of a value. - */ -static -char * osl_relation_expression_element(void * val, - int precision, int * first, - int cst, char * name) { - char * temp, * body, * sval; - - OSL_malloc(temp, char *, OSL_MAX_STRING * sizeof(char)); - OSL_malloc(body, char *, OSL_MAX_STRING * sizeof(char)); - OSL_malloc(sval, char *, OSL_MAX_STRING * sizeof(char)); - - body[0] = '\0'; - sval[0] = '\0'; - - // statements for the 'normal' processing. - if (!osl_int_zero(precision, val, 0) && (!cst)) { - if ((*first) || osl_int_neg(precision, val, 0)) { - if (osl_int_one(precision, val, 0)) { // case 1 - sprintf(sval, "%s", name); - } - else { - if (osl_int_mone(precision, val, 0)) { // case -1 - sprintf(sval, "-%s", name); - } - else { // default case - osl_int_sprint(sval, precision, val, 0); - sprintf(temp, "*%s", name); - strcat(sval, temp); - } - } - *first = 0; - } - else { - if (osl_int_one(precision, val, 0)) { - sprintf(sval, "+%s", name); - } - else { - sprintf(sval, "+"); - osl_int_sprint_txt(temp, precision, val, 0); - strcat(sval, temp); - sprintf(temp, "*%s", name); - strcat(sval, temp); - } - } - } - else { - if (cst) { - if ((osl_int_zero(precision, val, 0) && (*first)) || - (osl_int_neg(precision, val, 0))) - osl_int_sprint_txt(sval, precision, val, 0); - if (osl_int_pos(precision, val, 0)) { - if (!(*first)) { - sprintf(sval, "+"); - osl_int_sprint_txt(temp, precision, val, 0); - strcat(sval, temp); - } - else { - osl_int_sprint_txt(sval, precision, val, 0); - } - } - } - } - free(temp); - free(body); - - return(sval); -} - - -/** - * osl_relation_strings function: - * this function creates a NULL-terminated array of strings from an - * osl_names_t structure in such a way that the ith string is the "name" - * corresponding to the ith column of the constraint matrix. - * \param[in] relation The relation for which we need an array of names. - * \param[in] names The set of names for each element. - * \return An array of strings with one string per constraint matrix column. - */ -static -char ** osl_relation_strings(osl_relation_p relation, osl_names_p names) { - char ** strings; - char temp[OSL_MAX_STRING]; - int i, offset, array_id; - - if ((relation == NULL) || (names == NULL)) { - OSL_debug("no names or relation to build the name array"); - return NULL; - } - - OSL_malloc(strings, char **, (relation->nb_columns + 1)*sizeof(char *)); - strings[relation->nb_columns] = NULL; - - // 1. Equality/inequality marker. - OSL_strdup(strings[0], "e/i"); - offset = 1; - - // 2. Output dimensions. - if (osl_relation_is_access(relation)) { - // The first output dimension is the array name. - array_id = osl_relation_get_array_id(relation); - OSL_strdup(strings[offset], names->arrays->string[array_id - 1]); - // The other ones are the array dimensions [1]...[n] - for (i = offset + 1; i < relation->nb_output_dims + offset; i++) { - sprintf(temp, "[%d]", i - 1); - OSL_strdup(strings[i], temp); - } - } - else - if (relation->type == OSL_TYPE_SCATTERING) { - for (i = offset; i < relation->nb_output_dims + offset; i++) { - OSL_strdup(strings[i], names->scatt_dims->string[i - offset]); - } - } - else { - for (i = offset; i < relation->nb_output_dims + offset; i++) { - OSL_strdup(strings[i], names->iterators->string[i - offset]); - } - } - offset += relation->nb_output_dims; - - // 3. Input dimensions. - for (i = offset; i < relation->nb_input_dims + offset; i++) - OSL_strdup(strings[i], names->iterators->string[i - offset]); - offset += relation->nb_input_dims; - - // 4. Local dimensions. - for (i = offset; i < relation->nb_local_dims + offset; i++) - OSL_strdup(strings[i], names->local_dims->string[i - offset]); - offset += relation->nb_local_dims; - - // 5. Parameters. - for (i = offset; i < relation->nb_parameters + offset; i++) - OSL_strdup(strings[i], names->parameters->string[i - offset]); - offset += relation->nb_parameters; - - // 6. Scalar. - OSL_strdup(strings[offset], "1"); - - return strings; -} - - -/** - * osl_relation_subexpression function: - * this function returns a string corresponding to an affine (sub-)expression - * stored at the "row"^th row of the relation pointed by "relation" between - * the start and stop columns. Optionnaly it may oppose the whole expression. - * \param[in] relation A set of linear expressions. - * \param[in] row The row corresponding to the expression. - * \param[in] start The first column for the expression (inclusive). - * \param[in] stop The last column for the expression (inclusive). - * \param[in] oppose Boolean set to 1 to negate the expression, 0 otherwise. - * \param[in] strings Array of textual names of the various elements. - * \return A string that contains the printing of an affine (sub-)expression. - */ -static -char * osl_relation_subexpression(osl_relation_p relation, - int row, int start, int stop, int oppose, - char ** strings) { - int i, first = 1, constant; - char * sval; - char * sline; - - OSL_malloc(sline, char *, OSL_MAX_STRING * sizeof(char)); - sline[0] = '\0'; - - // Create the expression. The constant is a special case. - for (i = start; i <= stop; i++) { - if (oppose) { - osl_int_oppose(relation->precision, - relation->m[row], i, relation->m[row], i); - } - - if (i == relation->nb_columns - 1) - constant = 1; - else - constant = 0; - - sval = osl_relation_expression_element( - osl_int_address(relation->precision, relation->m[row], i), - relation->precision, &first, constant, strings[i]); - - if (oppose) { - osl_int_oppose(relation->precision, - relation->m[row], i, relation->m[row], i); - } - strcat(sline, sval); - free(sval); - } - - return sline; -} - - -/** - * osl_relation_expression function: - * this function returns a string corresponding to an affine expression - * stored at the "row"^th row of the relation pointed by "relation". - * \param[in] relation A set of linear expressions. - * \param[in] row The row corresponding to the expression. - * \param[in] strings Array of textual names of the various elements. - * \return A string that contains the printing of an affine expression. - */ -char * osl_relation_expression(osl_relation_p relation, - int row, char ** strings) { - - return osl_relation_subexpression(relation, row, - 1, relation->nb_columns - 1, 0, - strings); -} - - -/** - * osl_relation_is_simple_output function: - * this function returns 1 or -1 if a given constraint row of a relation - * corresponds to an output, 0 otherwise. We call a simple output an equality - * constraint where exactly one output coefficient is not 0 and is either - * 1 (in this case the function returns 1) or -1 (in this case the function - * returns -1). - * \param[in] relation The relation to test for simple output. - * \param[in] row The row corresponding to the constraint to test. - * \return 1 or -1 if the row is a simple output, 0 otherwise. - */ -static -int osl_relation_is_simple_output(osl_relation_p relation, int row) { - int i; - int first = 1; - int sign = 0; - - if ((relation == NULL) || - (relation->m == NULL) || - (relation->nb_output_dims == 0)) - return 0; - - if ((row < 0) || (row > relation->nb_rows)) - OSL_error("the specified row does not exist in the relation"); - - // The constraint must be an equality. - if (!osl_int_zero(relation->precision, relation->m[row], 0)) - return 0; - - // Check the output part has one and only one non-zero +1 or -1 coefficient. - first = 1; - for (i = 1; i <= relation->nb_output_dims; i++) { - if (!osl_int_zero(relation->precision, relation->m[row], i)) { - if (first) - first = 0; - else - return 0; - - if (osl_int_one(relation->precision, relation->m[row], i)) - sign = 1; - else if (osl_int_mone(relation->precision, relation->m[row], i)) - sign = -1; - else - return 0; - } - } - - return sign; -} - - -/** - * osl_relation_sprint_comment function: - * this function prints into a string a comment corresponding to a constraint - * of a relation, according to its type, then it returns this string. This - * function does not check that printing the comment is possible (i.e., are - * there enough names ?), hence it is the responsibility of the user to ensure - * he/she can call this function safely. - * \param[in] relation The relation for which a comment has to be printed. - * \param[in] row The constrain row for which a comment has to be printed. - * \param[in] strings Array of textual names of the various elements. - * \return A string which contains the comment for the row. - */ -static -char * osl_relation_sprint_comment(osl_relation_p relation, - int row, char ** strings) { - int sign; - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char * expression; - char buffer[OSL_MAX_STRING]; - - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - string[0] = '\0'; - - if ((relation == NULL) || (strings == NULL)) { - OSL_debug("no relation or names while asked to print a comment"); - return string; - } - - if ((sign = osl_relation_is_simple_output(relation, row))) { - // First case : output == expression. - - expression = osl_relation_subexpression(relation, row, - 1, relation->nb_output_dims, - sign < 0, - strings); - snprintf(buffer, OSL_MAX_STRING, " ## %s", expression); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - free(expression); - - // We don't print the right hand side if it's an array identifier. - if (!osl_relation_is_access(relation) || - osl_int_zero(relation->precision, relation->m[row], 1)) { - expression = osl_relation_subexpression(relation, row, - relation->nb_output_dims + 1, - relation->nb_columns - 1, - sign > 0, - strings); - snprintf(buffer, OSL_MAX_STRING, " == %s", expression); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - free(expression); - } - } - else { - // Second case : general case. - - expression = osl_relation_expression(relation, row, strings); - snprintf(buffer, OSL_MAX_STRING, " ## %s", expression); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - free(expression); - - if (osl_int_zero(relation->precision, relation->m[row], 0)) - snprintf(buffer, OSL_MAX_STRING, " == 0"); - else - snprintf(buffer, OSL_MAX_STRING, " >= 0"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - return string; -} - - -/** - * osl_relation_column_string function: - * this function returns an OpenScop comment string showing all column - * names. It is designed to nicely fit a constraint matrix that would be - * printed just below this line. - * \param[in] relation The relation related to the comment line to build. - * \param[in] strings Array of textual names of the various elements. - * \return A fancy comment string with all the dimension names. - */ -static -char * osl_relation_column_string(osl_relation_p relation, char ** strings) { - int i, j; - int index_output_dims; - int index_input_dims; - int index_local_dims; - int index_parameters; - int index_scalar; - int space, length, left, right; - char * scolumn; - char temp[OSL_MAX_STRING]; - - OSL_malloc(scolumn, char *, OSL_MAX_STRING); - - index_output_dims = 1; - index_input_dims = index_output_dims + relation->nb_output_dims; - index_local_dims = index_input_dims + relation->nb_input_dims; - index_parameters = index_local_dims + relation->nb_local_dims; - index_scalar = index_parameters + relation->nb_parameters; - - // 1. The comment part. - sprintf(scolumn, "#"); - for (j = 0; j < (OSL_FMT_LENGTH - 1)/2 - 1; j++) - strcat(scolumn, " "); - - i = 0; - while (strings[i] != NULL) { - space = OSL_FMT_LENGTH; - length = (space > strlen(strings[i])) ? strlen(strings[i]) : space; - right = (space - length + (OSL_FMT_LENGTH % 2)) / 2; - left = space - length - right; - - // 2. Spaces before the name - for (j = 0; j < left; j++) - strcat(scolumn, " "); - - // 3. The (abbreviated) name - for (j = 0; j < length - 1; j++) { - sprintf(temp, "%c", strings[i][j]); - strcat(scolumn, temp); - } - if (length >= strlen(strings[i])) - sprintf(temp, "%c", strings[i][j]); - else - sprintf(temp, "."); - strcat(scolumn, temp); - - // 4. Spaces after the name - for (j = 0; j < right; j++) - strcat(scolumn, " "); - - i++; - if ((i == index_output_dims) || - (i == index_input_dims) || - (i == index_local_dims) || - (i == index_parameters) || - (i == index_scalar)) - strcat(scolumn, "|"); - else - strcat(scolumn, " "); - } - strcat(scolumn, "\n"); - - return scolumn; -} - - -/** - * osl_relation_names function: - * this function generates as set of names for all the dimensions - * involved in a given relation. - * \param[in] relation The relation we have to generate names for. - * \return A set of generated names for the input relation dimensions. - */ -static -osl_names_p osl_relation_names(osl_relation_p relation) { - int nb_parameters = OSL_UNDEFINED; - int nb_iterators = OSL_UNDEFINED; - int nb_scattdims = OSL_UNDEFINED; - int nb_localdims = OSL_UNDEFINED; - int array_id = OSL_UNDEFINED; - - osl_relation_get_attributes(relation, &nb_parameters, &nb_iterators, - &nb_scattdims, &nb_localdims, &array_id); - - return osl_names_generate("P", nb_parameters, - "i", nb_iterators, - "c", nb_scattdims, - "l", nb_localdims, - "A", array_id); -} - - -/** - * osl_relation_nb_components function: - * this function returns the number of component in the union of relations - * provided as parameter. - * \param[in] relation The input union of relations. - * \return The number of components in the input union of relations. - */ -int osl_relation_nb_components(osl_relation_p relation) { - int nb_components = 0; - - while (relation != NULL) { - nb_components++; - relation = relation->next; - } - - return nb_components; -} - - -/** - * osl_relation_spprint_polylib function: - * this function pretty-prints the content of an osl_relation_t structure - * (*relation) into a string in the extended polylib format, and returns this - * string. This format is the same as OpenScop's, minus the type. - * \param[in] relation The relation whose information has to be printed. - * \param[in] names The names of the constraint columns for comments. - * \return A string containing the relation pretty-printing. - */ -char * osl_relation_spprint_polylib(osl_relation_p relation, - osl_names_p names) { - int i, j; - int part, nb_parts; - int generated_names = 0; - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char buffer[OSL_MAX_STRING]; - char ** name_array = NULL; - char * scolumn; - char * comment; - - if (relation == NULL) - return strdup("# NULL relation\n"); - - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - string[0] = '\0'; - - // Generates the names for the comments if necessary. - if (names == NULL) { - generated_names = 1; - names = osl_relation_names(relation); - } - - nb_parts = osl_relation_nb_components(relation); - - if (nb_parts > 1) { - snprintf(buffer, OSL_MAX_STRING, "# Union with %d parts\n%d\n", - nb_parts, nb_parts); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - // Print each part of the union. - for (part = 1; part <= nb_parts; part++) { - // Prepare the array of strings for comments. - name_array = osl_relation_strings(relation, names); - - if (nb_parts > 1) { - snprintf(buffer, OSL_MAX_STRING, "# Union part No.%d\n", part); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - snprintf(buffer, OSL_MAX_STRING, "%d %d %d %d %d %d\n", - relation->nb_rows, relation->nb_columns, - relation->nb_output_dims, relation->nb_input_dims, - relation->nb_local_dims, relation->nb_parameters); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - if (relation->nb_rows > 0) { - scolumn = osl_relation_column_string(relation, name_array); - snprintf(buffer, OSL_MAX_STRING, "%s", scolumn); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - free(scolumn); - } - - for (i = 0; i < relation->nb_rows; i++) { - for (j = 0; j < relation->nb_columns; j++) { - osl_int_sprint(buffer, relation->precision, relation->m[i], j); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - snprintf(buffer, OSL_MAX_STRING, " "); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - if (name_array != NULL) { - comment = osl_relation_sprint_comment(relation, i, name_array); - osl_util_safe_strcat(&string, comment, &high_water_mark); - free(comment); - } - snprintf(buffer, OSL_MAX_STRING, "\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - // Free the array of strings. - if (name_array != NULL) { - for (i = 0; i < relation->nb_columns; i++) - free(name_array[i]); - free(name_array); - } - - relation = relation->next; - } - - if (generated_names) - osl_names_free(names); - - return string; -} - - -/** - * osl_relation_spprint function: - * this function pretty-prints the content of an osl_relation_t structure - * (*relation) into a string in the OpenScop format, and returns this string. - * \param[in] relation The relation whose information has to be printed. - * \param[in] names The names of the constraint columns for comments. - * \return A string - */ -char * osl_relation_spprint(osl_relation_p relation, osl_names_p names) { - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char * temp; - char buffer[OSL_MAX_STRING]; - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - string[0] = '\0'; - - if (osl_relation_nb_components(relation) > 0) { - temp = osl_relation_sprint_type(relation); - osl_util_safe_strcat(&string, temp, &high_water_mark); - free(temp); - - snprintf(buffer, OSL_MAX_STRING, "\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - - temp = osl_relation_spprint_polylib(relation, names); - osl_util_safe_strcat(&string, temp, &high_water_mark); - free(temp); - } - - return string; -} - - -/** - * osl_relation_pprint function: - * this function pretty-prints the content of an osl_relation_t structure - * (*relation) into a file (file, possibly stdout) in the OpenScop format. - * \param[in] file File where informations are printed. - * \param[in] relation The relation whose information has to be printed. - * \param[in] names The names of the constraint columns for comments. - */ -void osl_relation_pprint(FILE * file, osl_relation_p relation, - osl_names_p names) { - char * string = osl_relation_spprint(relation, names); - fprintf(file, "%s", string); - free(string); -} - - -/** - * osl_relation_print function: - * this function prints the content of an osl_relation_t structure - * (*relation) into a file (file, possibly stdout) in the OpenScop format. - * \param[in] file File where informations are printed. - * \param[in] relation The relation whose information has to be printed. - */ -void osl_relation_print(FILE * file, osl_relation_p relation) { - - osl_relation_pprint(file, relation, NULL); -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_relation_read_type function: - * this function reads a textual relation type and returns its integer - * counterpart. - * \param[in] file The input stream. - * \return The relation type. - */ -static -int osl_relation_read_type(FILE * file) { - int type; - osl_strings_p strings; - - strings = osl_strings_read(file); - if (osl_strings_size(strings) > 1) { - OSL_warning("uninterpreted information (after the relation type)"); - } - if (osl_strings_size(strings) == 0) - OSL_error("no relation type"); - - if (!strcmp(strings->string[0], OSL_STRING_UNDEFINED)) { - type = OSL_UNDEFINED; - goto return_type; - } - - if (!strcmp(strings->string[0], OSL_STRING_CONTEXT)) { - type = OSL_TYPE_CONTEXT; - goto return_type; - } - - if (!strcmp(strings->string[0], OSL_STRING_DOMAIN)) { - type = OSL_TYPE_DOMAIN; - goto return_type; - } - - if (!strcmp(strings->string[0], OSL_STRING_SCATTERING)) { - type = OSL_TYPE_SCATTERING; - goto return_type; - } - - if (!strcmp(strings->string[0], OSL_STRING_READ)) { - type = OSL_TYPE_READ; - goto return_type; - } - - if (!strcmp(strings->string[0], OSL_STRING_WRITE)) { - type = OSL_TYPE_WRITE; - goto return_type; - } - - if (!strcmp(strings->string[0], OSL_STRING_MAY_WRITE)) { - type = OSL_TYPE_MAY_WRITE; - goto return_type; - } - - OSL_error("relation type not supported"); - -return_type: - osl_strings_free(strings); - return type; -} - - -/** - * osl_relation_pread function ("precision read"): - * this function reads a relation into a file (foo, posibly stdin) and - * returns a pointer this relation. The relation is set to the maximum - * available precision. - * \param[in] foo The input stream. - * \param[in] precision The precision of the relation elements. - * \return A pointer to the relation structure that has been read. - */ -osl_relation_p osl_relation_pread(FILE * foo, int precision) { - int i, j, k, n, read = 0; - int nb_rows, nb_columns; - int nb_output_dims, nb_input_dims, nb_local_dims, nb_parameters; - int nb_union_parts = 1; - int may_read_nb_union_parts = 1; - int read_attributes = 1; - int first = 1; - int type; - char * c, s[OSL_MAX_STRING], str[OSL_MAX_STRING], *tmp; - osl_relation_p relation, relation_union = NULL, previous = NULL; - - type = osl_relation_read_type(foo); - - // Read each part of the union (the number of parts may be updated inside) - for (k = 0; k < nb_union_parts; k++) { - // Read the number of union parts or the attributes of the union part - while (read_attributes) { - read_attributes = 0; - - // Read relation attributes. - c = osl_util_skip_blank_and_comments(foo, s); - read = sscanf(c, " %d %d %d %d %d %d", &nb_rows, &nb_columns, - &nb_output_dims, &nb_input_dims, - &nb_local_dims, &nb_parameters); - - if (((read != 1) && (read != 6)) || - ((read == 1) && (may_read_nb_union_parts != 1))) - OSL_error("not 1 or 6 integers on the first relation line"); - - if (read == 1) { - // Only one number means a union and is the number of parts. - nb_union_parts = nb_rows; - if (nb_union_parts < 1) - OSL_error("negative nb of union parts"); - - // Allow to read the properties of the first part of the union. - read_attributes = 1; - } - - may_read_nb_union_parts = 0; - } - - // Allocate the union part and fill its properties. - relation = osl_relation_pmalloc(precision, nb_rows, nb_columns); - relation->type = type; - relation->nb_output_dims = nb_output_dims; - relation->nb_input_dims = nb_input_dims; - relation->nb_local_dims = nb_local_dims; - relation->nb_parameters = nb_parameters; - - // Read the matrix of constraints. - for (i = 0; i < relation->nb_rows; i++) { - c = osl_util_skip_blank_and_comments(foo, s); - if (c == NULL) - OSL_error("not enough rows"); - - for (j = 0; j < relation->nb_columns; j++) { - if (c == NULL || *c == '#' || *c == '\n') - OSL_error("not enough columns"); - if (sscanf(c, "%s%n", str, &n) == 0) - OSL_error("not enough rows"); - - // TODO: remove this tmp (sread updates the pointer). - tmp = str; - osl_int_sread(&tmp, precision, relation->m[i], j); - c += n; - } - } - - // Build the linked list of union parts. - if (first == 1) { - relation_union = relation; - first = 0; - } - else { - previous->next = relation; - } - - previous = relation; - read_attributes = 1; - } - - return relation_union; -} - - -/** - * osl_relation_read function: - * this function is equivalent to osl_relation_pread() except that - * the precision corresponds to the precision environment variable or - * to the highest available precision if it is not defined. - * \see{osl_relation_pread} - */ -osl_relation_p osl_relation_read(FILE * foo) { - int precision = osl_util_get_precision(); - return osl_relation_pread(foo, precision); -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_relation_pmalloc function: - * (precision malloc) this function allocates the memory space for an - * osl_relation_t structure and sets its fields with default values. - * Then it returns a pointer to the allocated space. - * \param[in] precision The precision of the constraint matrix. - * \param[in] nb_rows The number of row of the relation to allocate. - * \param[in] nb_columns The number of columns of the relation to allocate. - * \return A pointer to an empty relation with fields set to default values - * and a ready-to-use constraint matrix. - */ -osl_relation_p osl_relation_pmalloc(int precision, - int nb_rows, int nb_columns) { - osl_relation_p relation; - void ** p, * q; - int i, j; - - OSL_malloc(relation, osl_relation_p, sizeof(osl_relation_t)); - relation->type = OSL_UNDEFINED; - relation->nb_rows = nb_rows; - relation->nb_columns = nb_columns; - relation->nb_output_dims = OSL_UNDEFINED; - relation->nb_input_dims = OSL_UNDEFINED; - relation->nb_parameters = OSL_UNDEFINED; - relation->nb_local_dims = OSL_UNDEFINED; - relation->precision = precision; - - if ((nb_rows == 0) || (nb_columns == 0) || - (nb_rows == OSL_UNDEFINED) || (nb_columns == OSL_UNDEFINED)) { - relation->m = NULL; - } - else { - OSL_malloc(p, void **, nb_rows * sizeof(void *)); - OSL_malloc(q, void *, - nb_rows * nb_columns * osl_int_sizeof(precision)); - relation->m = p; - for (i = 0; i < nb_rows; i++) { - relation->m[i] = osl_int_address(precision, q, i * nb_columns); - for (j = 0; j < nb_columns; j++) - osl_int_init_set_si(precision, relation->m[i], j, 0); - } - } - - relation->next = NULL; - - return relation; -} - - -/** - * osl_relation_malloc function: - * this function is equivalent to osl_relation_pmalloc() except that - * the precision corresponds to the precision environment variable or - * to the highest available precision if it is not defined. - * \see{osl_relation_pmalloc} - */ -osl_relation_p osl_relation_malloc(int nb_rows, int nb_columns) { - int precision = osl_util_get_precision(); - return osl_relation_pmalloc(precision, nb_rows, nb_columns); -} - - -/** - * osl_relation_free_inside function: - * this function frees the allocated memory for the inside of a - * osl_relation_t structure, i.e. only m. - * \param[in] relation The pointer to the relation we want to free internals. - */ -void osl_relation_free_inside(osl_relation_p relation) { - int i, nb_elements; - void * p; - - if (relation == NULL) - return; - - nb_elements = relation->nb_rows * relation->nb_columns; - - if (nb_elements > 0) - p = relation->m[0]; - - for (i = 0; i < nb_elements; i++) - osl_int_clear(relation->precision, p, i); - - if (relation->m != NULL) { - if (nb_elements > 0) - free(relation->m[0]); - free(relation->m); - } -} - - -/** - * osl_relation_free function: - * this function frees the allocated memory for an osl_relation_t - * structure. - * \param[in] relation The pointer to the relation we want to free. - */ -void osl_relation_free(osl_relation_p relation) { - osl_relation_p tmp; - - if (relation == NULL) - return; - - while (relation != NULL) { - tmp = relation->next; - osl_relation_free_inside(relation); - free(relation); - relation = tmp; - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_relation_nclone function: - * this functions builds and returns a "hard copy" (not a pointer copy) of a - * osl_relation_t data structure such that the clone is restricted to the - * "n" first rows of the relation. This applies to all the parts in the case - * of a relation union. - * \param[in] relation The pointer to the relation we want to clone. - * \param[in] n The number of row of the relation we want to clone (the - * special value -1 means "all the rows"). - * \return A pointer to the clone of the relation union restricted to the - * first n rows of constraint matrix for each part of the union. - */ -osl_relation_p osl_relation_nclone(osl_relation_p relation, int n) { - int i, j; - int first = 1, all_rows = 0; - osl_relation_p clone = NULL, node, previous = NULL; - - if (n == -1) - all_rows = 1; - - while (relation != NULL) { - if (all_rows) - n = relation->nb_rows; - - if (n > relation->nb_rows) - OSL_error("not enough rows to clone in the relation"); - - node = osl_relation_pmalloc(relation->precision, n, relation->nb_columns); - node->type = relation->type; - node->nb_output_dims = relation->nb_output_dims; - node->nb_input_dims = relation->nb_input_dims; - node->nb_local_dims = relation->nb_local_dims; - node->nb_parameters = relation->nb_parameters; - - for (i = 0; i < n; i++) - for (j = 0; j < relation->nb_columns; j++) - osl_int_assign(relation->precision, node->m[i], j, relation->m[i], j); - - if (first) { - first = 0; - clone = node; - previous = node; - } - else { - previous->next = node; - previous = previous->next; - } - - relation = relation->next; - } - - return clone; -} - - -/** - * osl_relation_clone function: - * this function builds and returns a "hard copy" (not a pointer copy) of an - * osl_relation_t data structure (the full union of relation). - * \param[in] relation The pointer to the relation we want to clone. - * \return A pointer to the clone of the union of relations. - */ -osl_relation_p osl_relation_clone(osl_relation_p relation) { - if (relation == NULL) - return NULL; - - return osl_relation_nclone(relation, -1); -} - - -/** - * osl_relation_replace_vector function: - * this function replaces the "row"^th row of a relation "relation" with the - * vector "vector". It directly updates the relation union part pointed - * by "relation" and this part only. - * \param[in,out] relation The relation we want to replace a row. - * \param[in] vector The vector that will replace a row of the relation. - * \param[in] row The row of the relation to be replaced. - */ -void osl_relation_replace_vector(osl_relation_p relation, - osl_vector_p vector, int row) { - int i; - - if ((relation == NULL) || (vector == NULL) || - (relation->precision != vector->precision) || - (relation->nb_columns != vector->size) || - (row >= relation->nb_rows) || (row < 0)) - OSL_error("vector cannot replace relation row"); - - for (i = 0; i < vector->size; i++) - osl_int_assign(relation->precision, relation->m[row], i, vector->v, i); -} - - -/** - * osl_relation_add_vector function: - * this function adds (meaning, +) a vector to the "row"^th row of a - * relation "relation". It directly updates the relation union part pointed - * by "relation" and this part only. - * \param[in,out] relation The relation we want to add a vector to a row. - * \param[in] vector The vector that will replace a row of the relation. - * \param[in] row The row of the relation to add the vector. - */ -void osl_relation_add_vector(osl_relation_p relation, - osl_vector_p vector, int row) { - int i; - - if ((relation == NULL) || (vector == NULL) || - (relation->precision != vector->precision) || - (relation->nb_columns != vector->size) || - (row >= relation->nb_rows) || (row < 0)) - OSL_error("vector cannot be added to relation"); - - if (osl_int_get_si(relation->precision, relation->m[row], 0) == 0) - osl_int_assign(relation->precision, relation->m[row], 0, vector->v, 0); - - for (i = 1; i < vector->size; i++) - osl_int_add(relation->precision, - relation->m[row], i, relation->m[row], i, vector->v, i); -} - - -/** - * osl_relation_sub_vector function: - * this function subtracts the vector "vector" to the "row"^th row of - * a relation "relation. It directly updates the relation union part pointed - * by "relation" and this part only. - * \param[in,out] relation The relation where to subtract a vector to a row. - * \param[in] vector The vector to subtract to a relation row. - * \param[in] row The row of the relation to subtract the vector. - */ -void osl_relation_sub_vector(osl_relation_p relation, - osl_vector_p vector, int row) { - int i; - - if ((relation == NULL) || (vector == NULL) || - (relation->precision != vector->precision) || - (relation->nb_columns != vector->size) || - (row >= relation->nb_rows) || (row < 0)) - OSL_error("vector cannot be subtracted to row"); - - if (osl_int_get_si(relation->precision, relation->m[row], 0) == 0) - osl_int_assign(relation->precision, relation->m[row], 0, vector->v, 0); - - for (i = 1; i < vector->size; i++) - osl_int_sub(relation->precision, - relation->m[row], i, relation->m[row], i, vector->v, i); -} - - -/** - * osl_relation_insert_vector function: - * this function inserts a new row corresponding to the vector "vector" to - * the relation "relation" by inserting it at the "row"^th row. It directly - * updates the relation union part pointed by "relation" and this part only. - * If "vector" (or "relation") is NULL, the relation is left unmodified. - * \param[in,out] relation The relation we want to extend. - * \param[in] vector The vector that will be added relation. - * \param[in] row The row where to insert the vector. - */ -void osl_relation_insert_vector(osl_relation_p relation, - osl_vector_p vector, int row) { - osl_relation_p temp; - - temp = osl_relation_from_vector(vector); - osl_relation_insert_constraints(relation, temp, row); - osl_relation_free(temp); -} - - -/** - * osl_relation_insert_blank_row function: - * this function inserts a new row filled with zeros o an existing relation - * union part (it only affects the first union part). - * \param[in,out] relation The relation to add a row in. - * \param[in] row The row where to insert the blank row. - */ -void osl_relation_insert_blank_row(osl_relation_p relation, int row) { - osl_vector_p vector; - - if (relation != NULL) { - vector = osl_vector_pmalloc(relation->precision, relation->nb_columns); - osl_relation_insert_vector(relation, vector, row); - osl_vector_free(vector); - } -} - - -/** - * osl_relation_insert_blank_column function: - * this function inserts a new column filled with zeros to an existing - * relation union part (it only affects the first union part). WARNING: - * this function does not update the relation attributes. - * \param[in,out] relation The relation to add a column in. - * \param[in] column The column where to insert the blank column. - */ -void osl_relation_insert_blank_column(osl_relation_p relation, int column) { - - int i, j; - osl_relation_p temp; - - if (relation == NULL) - return; - - if ((column < 0) || (column > relation->nb_columns)) - OSL_error("bad column number"); - - // We use a temporary relation just to reuse existing functions. Cleaner. - temp = osl_relation_pmalloc(relation->precision, - relation->nb_rows, relation->nb_columns + 1); - - for (i = 0; i < relation->nb_rows; i++) { - for (j = 0; j < column; j++) - osl_int_assign(relation->precision, temp->m[i], j, relation->m[i], j); - - for (j = column; j < relation->nb_columns; j++) - osl_int_assign(relation->precision, temp->m[i], j+1, relation->m[i], j); - } - - osl_relation_free_inside(relation); - - // Replace the inside of relation. - relation->nb_columns = temp->nb_columns; - relation->m = temp->m; - - // Free the temp "shell". - free(temp); -} - - -/** - * osl_relation_from_vector function: - * this function converts a vector "vector" to a relation with a single row - * and returns a pointer to that relation. - * \param[in] vector The vector to convert to a relation. - * \return A pointer to a relation resulting from the vector conversion. - */ -osl_relation_p osl_relation_from_vector(osl_vector_p vector) { - osl_relation_p relation; - - if (vector == NULL) - return NULL; - - relation = osl_relation_pmalloc(vector->precision, 1, vector->size); - osl_relation_replace_vector(relation, vector, 0); - return relation; -} - - -/** - * osl_relation_replace_constraints function: - * this function replaces some rows of a relation "r1" with the rows of - * the relation "r2". It begins at the "row"^th row of "r1". It directly - * updates the relation union part pointed by "r1" and this part only. - * \param[in,out] r1 The relation we want to change some rows. - * \param[in] r2 The relation containing the new rows. - * \param[in] row The first row of the relation r1 to be replaced. - */ -void osl_relation_replace_constraints(osl_relation_p r1, - osl_relation_p r2, int row) { - int i, j; - - if ((r1 == NULL) || (r2 == NULL) || - (r1->precision != r2->precision) || - (r1->nb_columns != r1->nb_columns) || - ((row + r2->nb_rows) > r1->nb_rows) || (row < 0)) - OSL_error("relation rows could not be replaced"); - - for (i = 0; i < r2->nb_rows; i++) - for (j = 0; j < r2->nb_columns; j++) - osl_int_assign(r1->precision, r1->m[i+row], j, r2->m[i], j); -} - - -/** - * osl_relation_insert_constraints function: - * this function adds new rows corresponding to the relation "r1" to - * the relation "r2" by inserting it at the "row"^th row. It directly - * updates the relation union part pointed by "r1" and this part only. - * If "r2" (or "r1") is NULL, the relation is left unmodified. - * \param[in,out] r1 The relation we want to extend. - * \param[in] r2 The relation to be inserted. - * \param[in] row The row where to insert the relation - */ -void osl_relation_insert_constraints(osl_relation_p r1, - osl_relation_p r2, int row) { - int i, j; - osl_relation_p temp; - - if ((r1 == NULL) || (r2 == NULL)) - return; - - if ((r1->nb_columns != r2->nb_columns) || - (r1->precision != r2->precision) || - (row > r1->nb_rows) || (row < 0)) - OSL_error("constraints cannot be inserted"); - - // We use a temporary relation just to reuse existing functions. Cleaner. - temp = osl_relation_pmalloc(r1->precision, - r1->nb_rows + r2->nb_rows, r1->nb_columns); - - for (i = 0; i < row; i++) - for (j = 0; j < r1->nb_columns; j++) - osl_int_assign(r1->precision, temp->m[i], j, r1->m[i], j); - - osl_relation_replace_constraints(temp, r2, row); - - for (i = row + r2->nb_rows; i < r2->nb_rows + r1->nb_rows; i++) - for (j = 0; j < r1->nb_columns; j++) - osl_int_assign(r1->precision, temp->m[i], j, r1->m[i-r2->nb_rows], j); - - osl_relation_free_inside(r1); - - // Replace the inside of relation. - r1->nb_rows = temp->nb_rows; - r1->m = temp->m; - - // Free the temp "shell". - free(temp); -} - - -/** - * osl_relation_insert_columns function: - * this function inserts new columns to an existing relation union part (it - * only affects the first union part). The columns are copied out from the - * matrix of an input relation which must have the convenient number of rows. - * All columns of the input matrix are copied. WARNING: this function does not - * update the relation attributes of the modified matrix. - * \param[in,out] relation The relation to add columns in. - * \param[in] insert The relation containing the columns to add. - * \param[in] column The column where to insert the new columns. - */ -void osl_relation_insert_columns(osl_relation_p relation, - osl_relation_p insert, int column) { - int i, j; - osl_relation_p temp; - - if ((relation == NULL) || (insert == NULL)) - return; - - if ((relation->precision != insert->precision) || - (relation->nb_rows != insert->nb_rows) || - (column < 0) || (column > relation->nb_columns)) - OSL_error("columns cannot be inserted"); - - // We use a temporary relation just to reuse existing functions. Cleaner. - temp = osl_relation_pmalloc(relation->precision, relation->nb_rows, - relation->nb_columns + insert->nb_columns); - - for (i = 0; i < relation->nb_rows; i++) { - for (j = 0; j < column; j++) - osl_int_assign(relation->precision, temp->m[i], j, relation->m[i], j); - - for (j = column; j < column + insert->nb_columns; j++) - osl_int_assign(relation->precision, - temp->m[i], j, insert->m[i], j - column); - - for (j = column + insert->nb_columns; - j < insert->nb_columns + relation->nb_columns; j++) - osl_int_assign(relation->precision, - temp->m[i], j, relation->m[i], j - insert->nb_columns); - } - - osl_relation_free_inside(relation); - - // Replace the inside of relation. - relation->nb_columns = temp->nb_columns; - relation->m = temp->m; - - // Free the temp "shell". - free(temp); -} - - -/** - * osl_relation_concat_constraints function: - * this function builds a new relation from two relations sent as - * parameters. The new set of constraints is built as the concatenation - * of the rows of the first elements of the two relation unions r1 and r2. - * This means, there is no next field in the result. - * \param[in] r1 The first relation. - * \param[in] r2 The second relation. - * \return A pointer to the relation resulting from the concatenation of - * the first elements of r1 and r2. - */ -osl_relation_p osl_relation_concat_constraints( - osl_relation_p r1, - osl_relation_p r2) { - osl_relation_p new; - - if (r1 == NULL) - return osl_relation_clone(r2); - - if (r2 == NULL) - return osl_relation_clone(r1); - - if (r1->nb_columns != r2->nb_columns) - OSL_error("incompatible sizes for concatenation"); - - if (r1->next || r2->next) - OSL_warning("relation concatenation is done on the first elements " - "of union only"); - - new = osl_relation_pmalloc(r1->precision, - r1->nb_rows + r2->nb_rows, r1->nb_columns); - osl_relation_replace_constraints(new, r1, 0); - osl_relation_replace_constraints(new, r2, r1->nb_rows); - - return new; -} - - -/** - * osl_relation_equal function: - * this function returns true if the two relations provided as parameters - * are the same, false otherwise. - * \param[in] r1 The first relation. - * \param[in] r2 The second relation. - * \return 1 if r1 and r2 are the same (content-wise), 0 otherwise. - */ -int osl_relation_equal(osl_relation_p r1, osl_relation_p r2) { - int i, j; - - while ((r1 != NULL) && (r2 != NULL)) { - if (r1 == r2) - return 1; - - if ((r1->type != r2->type) || - (r1->precision != r2->precision) || - (r1->nb_rows != r2->nb_rows) || - (r1->nb_columns != r2->nb_columns) || - (r1->nb_output_dims != r2->nb_output_dims) || - (r1->nb_input_dims != r2->nb_input_dims) || - (r1->nb_local_dims != r2->nb_local_dims) || - (r1->nb_parameters != r2->nb_parameters)) - return 0; - - for (i = 0; i < r1->nb_rows; ++i) - for (j = 0; j < r1->nb_columns; ++j) - if (osl_int_ne(r1->precision, r1->m[i], j, r2->m[i], j)) - return 0; - - r1 = r1->next; - r2 = r2->next; - } - - if (((r1 == NULL) && (r2 != NULL)) || ((r1 != NULL) && (r2 == NULL))) - return 0; - - return 1; -} - - -/** - * osl_relation_check_attribute internal function: - * This function checks whether an "actual" value is the same as an - * "expected" value or not. If the expected value is set to - * OSL_UNDEFINED, this function sets it to the "actual" value - * and do not report a difference has been detected. - * It returns 0 if a difference has been detected, 1 otherwise. - * \param[in,out] expected Pointer to the expected value (the value is - * modified if it was set to OSL_UNDEFINED). - * \param[in] actual Value we want to check. - * \return 0 if the values are not the same while the expected value was - * not OSL_UNDEFINED, 1 otherwise. - */ -static -int osl_relation_check_attribute(int * expected, int actual) { - if (*expected != OSL_UNDEFINED) { - if ((actual != OSL_UNDEFINED) && - (actual != *expected)) { - OSL_warning("unexpected atribute"); - return 0; - } - } - else { - *expected = actual; - } - - return 1; -} - - -/** - * osl_relation_check_nb_columns internal function: - * This function checks that the number of columns of a relation - * corresponds to some expected properties (setting an expected property to - * OSL_UNDEFINED makes this function unable to detect a problem). - * It returns 0 if the number of columns seems incorrect or 1 if no problem - * has been detected. - * \param[in] relation The relation we want to check the number of columns. - * \param[in] expected_nb_output_dims Expected number of output dimensions. - * \param[in] expected_nb_input_dims Expected number of input dimensions. - * \param[in] expected_nb_parameters Expected number of parameters. - * \return 0 if the number of columns seems incorrect, 1 otherwise. - */ -static -int osl_relation_check_nb_columns(osl_relation_p relation, - int expected_nb_output_dims, - int expected_nb_input_dims, - int expected_nb_parameters) { - int expected_nb_local_dims, expected_nb_columns; - - if ((expected_nb_output_dims != OSL_UNDEFINED) && - (expected_nb_input_dims != OSL_UNDEFINED) && - (expected_nb_parameters != OSL_UNDEFINED)) { - - if (relation->nb_local_dims == OSL_UNDEFINED) - expected_nb_local_dims = 0; - else - expected_nb_local_dims = relation->nb_local_dims; - - expected_nb_columns = expected_nb_output_dims + - expected_nb_input_dims + - expected_nb_local_dims + - expected_nb_parameters + - 2; - - if (expected_nb_columns != relation->nb_columns) { - OSL_warning("unexpected number of columns"); - return 0; - } - } - - return 1; -} - - -/** - * osl_relation_integrity_check function: - * this function checks that a relation is "well formed" according to some - * expected properties (setting an expected value to OSL_UNDEFINED means - * that we do not expect a specific value) and what the relation is supposed - * to represent. It returns 0 if the check failed or 1 if no problem has been - * detected. - * \param[in] relation The relation we want to check. - * \param[in] expected_type Semantics about this relation (domain, access...). - * \param[in] expected_nb_output_dims Expected number of output dimensions. - * \param[in] expected_nb_input_dims Expected number of input dimensions. - * \param[in] expected_nb_parameters Expected number of parameters. - * \return 0 if the integrity check fails, 1 otherwise. - */ -int osl_relation_integrity_check(osl_relation_p relation, - int expected_type, - int expected_nb_output_dims, - int expected_nb_input_dims, - int expected_nb_parameters) { - int i; - - // Check the NULL case. - if (relation == NULL) { - if ((expected_nb_output_dims != OSL_UNDEFINED) || - (expected_nb_input_dims != OSL_UNDEFINED) || - (expected_nb_parameters != OSL_UNDEFINED)) { - OSL_debug("NULL relation with some expected attibutes"); - //return 0; - } - - return 1; - } - - // Check the type. - if (((expected_type != OSL_TYPE_ACCESS) && - (expected_type != relation->type)) || - ((expected_type == OSL_TYPE_ACCESS) && - (!osl_relation_is_access(relation)))) { - OSL_warning("wrong type"); - osl_relation_dump(stderr, relation); - return 0; - } - - // Check that relations have no undefined atributes. - if ((relation->nb_output_dims == OSL_UNDEFINED) || - (relation->nb_input_dims == OSL_UNDEFINED) || - (relation->nb_local_dims == OSL_UNDEFINED) || - (relation->nb_parameters == OSL_UNDEFINED)) { - OSL_warning("all attributes should be defined"); - osl_relation_dump(stderr, relation); - return 0; - } - - // Check that a context has actually 0 output dimensions. - if ((relation->type == OSL_TYPE_CONTEXT) && - (relation->nb_output_dims != 0)) { - OSL_warning("context without 0 as number of output dimensions"); - osl_relation_dump(stderr, relation); - return 0; - } - - // Check that a domain or a context has actually 0 input dimensions. - if (((relation->type == OSL_TYPE_DOMAIN) || - (relation->type == OSL_TYPE_CONTEXT)) && - (relation->nb_input_dims != 0)) { - OSL_warning("domain or context without 0 input dimensions"); - osl_relation_dump(stderr, relation); - return 0; - } - - // Check properties according to expected values (and if expected values - // are undefined, define them with the first relation part properties). - if (!osl_relation_check_attribute(&expected_nb_output_dims, - relation->nb_output_dims) || - !osl_relation_check_attribute(&expected_nb_input_dims, - relation->nb_input_dims) || - !osl_relation_check_attribute(&expected_nb_parameters, - relation->nb_parameters)) { - osl_relation_dump(stderr, relation); - return 0; - } - - while (relation != NULL) { - - // Attributes (except the number of local dimensions) should be the same - // in all parts of the union. - if ((expected_nb_output_dims != relation->nb_output_dims) || - (expected_nb_input_dims != relation->nb_input_dims) || - (expected_nb_parameters != relation->nb_parameters)) { - OSL_warning("inconsistent attributes"); - osl_relation_dump(stderr, relation); - return 0; - } - - // Check whether the number of columns is OK or not. - if (!osl_relation_check_nb_columns(relation, - expected_nb_output_dims, - expected_nb_input_dims, - expected_nb_parameters)) { - osl_relation_dump(stderr, relation); - return 0; - } - - // Check the first column. The first column of a relation part should be - // made of 0 or 1 only. - if ((relation->nb_rows > 0) && (relation->nb_columns > 0)) { - for (i = 0; i < relation->nb_rows; i++) { - if (!osl_int_zero(relation->precision, relation->m[i], 0) && - !osl_int_one(relation->precision, relation->m[i], 0)) { - OSL_warning("first column of a relation is not " - "strictly made of 0 or 1"); - osl_relation_dump(stderr, relation); - return 0; - } - } - } - - // Array accesses must provide the array identifier. - if ((osl_relation_is_access(relation)) && - (osl_relation_get_array_id(relation) == OSL_UNDEFINED)) { - osl_relation_dump(stderr, relation); - return 0; - } - - relation = relation->next; - } - - return 1; -} - - -/** - * osl_relation_union function: - * this function builds a new relation from two relations provided - * as parameters. The new relation is built as an union of the - * two relations: the list of constraint sets are linked together. - * \param[in] r1 The first relation. - * \param[in] r2 The second relation. - * \return A new relation corresponding to the union of r1 and r2. - */ -osl_relation_p osl_relation_union(osl_relation_p r1, - osl_relation_p r2) { - osl_relation_p copy1, copy2, tmp; - - if ((r1 == NULL) && (r2 == NULL)) - return NULL; - - copy1 = osl_relation_clone(r1); - copy2 = osl_relation_clone(r2); - - if ((r1 != NULL) && (r2 == NULL)) - return copy1; - - if ((r1 == NULL) && (r2 != NULL)) - return copy2; - - tmp = copy1; - while (tmp->next != NULL) - tmp = tmp->next; - - tmp->next = copy2; - return copy1; -} - - -/** - * osl_relation_set_attributes function: - * this functions sets the attributes of a relation provided as a - * parameter. It updates the relation directly. - * \param[in,out] relation The relation to set the attributes. - * \param[in] nb_output_dims Number of output dimensions. - * \param[in] nb_input_dims Number of input dimensions. - * \param[in] nb_local_dims Number of local dimensions. - * \param[in] nb_parameters Number of parameters. - */ -void osl_relation_set_attributes(osl_relation_p relation, - int nb_output_dims, int nb_input_dims, - int nb_local_dims, int nb_parameters) { - if (relation != NULL) { - relation->nb_output_dims = nb_output_dims; - relation->nb_input_dims = nb_input_dims; - relation->nb_local_dims = nb_local_dims; - relation->nb_parameters = nb_parameters; - } -} - - -/** - * osl_relation_set_type function: - * this function sets the type of each relation union part in the relation - * to the one provided as parameter. - * \param relation The relation to set the type. - * \param type The type. - */ -void osl_relation_set_type(osl_relation_p relation, int type) { - - while (relation != NULL) { - relation->type = type; - relation = relation->next; - } -} - - -/** - * osl_relation_get_array_id function: - * this function returns the array identifier in a relation with access type - * It returns OSL_UNDEFINED if it is not able to find it (in particular - * if there are irregularities in the relation). - * \param[in] relation The relation where to find an array identifier. - * \return The array identifier in the relation or OSL_UNDEFINED. - */ -int osl_relation_get_array_id(osl_relation_p relation) { - int i; - int first = 1; - int array_id = OSL_UNDEFINED; - int reference_array_id = OSL_UNDEFINED; - int nb_array_id; - int row_id = 0; - int precision; - - if (relation == NULL) - return OSL_UNDEFINED; - - if (!osl_relation_is_access(relation)) { - OSL_warning("asked for an array id of non-array relation"); - return OSL_UNDEFINED; - } - - while (relation != NULL) { - precision = relation->precision; - - // There should be room to store the array identifier. - if ((relation->nb_rows < 1) || - (relation->nb_columns < 3)) { - OSL_warning("no array identifier in an access function"); - return OSL_UNDEFINED; - } - - // Array identifiers are m[i][#columns -1] / m[i][1], with i the only row - // where m[i][1] is not 0. - // - check there is exactly one row such that m[i][1] is not 0, - // - check the whole ith row if full of 0 except m[i][1] and the id, - // - check that (m[i][#columns -1] % m[i][1]) == 0, - // - check that (-m[i][#columns -1] / m[i][1]) > 0. - nb_array_id = 0; - for (i = 0; i < relation->nb_rows; i++) { - if (!osl_int_zero(precision, relation->m[i], 1)) { - nb_array_id ++; - row_id = i; - } - } - if (nb_array_id == 0) { - OSL_warning("no array identifier in an access function"); - return OSL_UNDEFINED; - } - if (nb_array_id > 1) { - OSL_warning("several array identifiers in one access function"); - return OSL_UNDEFINED; - } - for (i = 0; i < relation->nb_columns - 1; i++) { - if ((i != 1) && !osl_int_zero(precision, relation->m[row_id], i)) { - OSL_warning("non integer array identifier"); - return OSL_UNDEFINED; - } - } - if (!osl_int_divisible(precision, - relation->m[row_id], relation->nb_columns - 1, - relation->m[row_id], 1)) { - OSL_warning("rational array identifier"); - return OSL_UNDEFINED; - } - array_id = -osl_int_get_si(precision, - relation->m[row_id], - relation->nb_columns - 1); - array_id /= osl_int_get_si(precision, relation->m[row_id], 1); - if (array_id <= 0) { - OSL_warning("negative or 0 identifier in access function"); - return OSL_UNDEFINED; - } - - // Unions of accesses are allowed, but they should refer at the same array. - if (first) { - reference_array_id = array_id; - first = 0; - } - else { - if (reference_array_id != array_id) { - OSL_warning("inconsistency of array identifiers in an " - "union of access relations"); - return OSL_UNDEFINED; - } - } - - relation = relation->next; - } - - return array_id; -} - - -/** - * osl_relation_is_access function: - * this function returns 1 if the relation corresponds to an access relation, - * whatever its precise type (read, write etc.), 0 otherwise. - * \param relation The relation to check wheter it is an access relation or not. - * \return 1 if the relation is an access relation, 0 otherwise. - */ -int osl_relation_is_access(osl_relation_p relation) { - - if (relation == NULL) - return 0; - - if ((relation->type == OSL_TYPE_ACCESS) || - (relation->type == OSL_TYPE_READ) || - (relation->type == OSL_TYPE_WRITE) || - (relation->type == OSL_TYPE_MAY_WRITE)) - return 1; - - return 0; -} - - -/** - * osl_relation_get_attributes function: - * this function returns, through its parameters, the maximum values of the - * relation attributes (nb_iterators, nb_parameters etc), depending on its - * type. HOWEVER, it updates the parameter value iff the attribute is greater - * than the input parameter value. Hence it may be used to get the - * attributes as well as to find the maximum attributes for several relations. - * The array identifier 0 is used when there is no array identifier (AND this - * is OK), OSL_UNDEFINED is used to report it is impossible to provide the - * property while it should. This function is not intended for checking, the - * input relation should be correct. - * \param[in] relation The relation to extract attribute values. - * \param[in,out] nb_parameters Number of parameter attribute. - * \param[in,out] nb_iterators Number of iterators attribute. - * \param[in,out] nb_scattdims Number of scattering dimensions attribute. - * \param[in,out] nb_localdims Number of local dimensions attribute. - * \param[in,out] array_id Maximum array identifier attribute. - */ -void osl_relation_get_attributes(osl_relation_p relation, - int * nb_parameters, - int * nb_iterators, - int * nb_scattdims, - int * nb_localdims, - int * array_id) { - int type; - int local_nb_parameters = OSL_UNDEFINED; - int local_nb_iterators = OSL_UNDEFINED; - int local_nb_scattdims = OSL_UNDEFINED; - int local_nb_localdims = OSL_UNDEFINED; - int local_array_id = OSL_UNDEFINED; - - while (relation != NULL) { - if (osl_relation_is_access(relation)) - type = OSL_TYPE_ACCESS; - else - type = relation->type; - - // There is some redundancy but I believe the code is cleaner this way. - switch (type) { - case OSL_TYPE_CONTEXT: - local_nb_parameters = relation->nb_parameters; - local_nb_iterators = 0; - local_nb_scattdims = 0; - local_nb_localdims = relation->nb_local_dims; - local_array_id = 0; - break; - - case OSL_TYPE_DOMAIN: - local_nb_parameters = relation->nb_parameters; - local_nb_iterators = relation->nb_output_dims; - local_nb_scattdims = 0; - local_nb_localdims = relation->nb_local_dims; - local_array_id = 0; - break; - - case OSL_TYPE_SCATTERING: - local_nb_parameters = relation->nb_parameters; - local_nb_iterators = relation->nb_input_dims; - local_nb_scattdims = relation->nb_output_dims; - local_nb_localdims = relation->nb_local_dims; - local_array_id = 0; - break; - - case OSL_TYPE_ACCESS: - local_nb_parameters = relation->nb_parameters; - local_nb_iterators = relation->nb_input_dims; - local_nb_scattdims = 0; - local_nb_localdims = relation->nb_local_dims; - local_array_id = osl_relation_get_array_id(relation); - break; - } - - // Update. - *nb_parameters = OSL_max(*nb_parameters, local_nb_parameters); - *nb_iterators = OSL_max(*nb_iterators, local_nb_iterators); - *nb_scattdims = OSL_max(*nb_scattdims, local_nb_scattdims); - *nb_localdims = OSL_max(*nb_localdims, local_nb_localdims); - *array_id = OSL_max(*array_id, local_array_id); - relation = relation->next; - } -} - - -/** - * osl_relation_extend_output function: - * this function extends the number of output dimensions of a given relation. It - * returns a copy of the input relation with a number of output dimensions - * extended to "dim" for all its union components. The new output dimensions - * are simply set equal to 0. The extended number of dimensions must be higher - * than or equal to the original one (an error will be raised otherwise). - * \param[in] relation The input relation to extend. - * \param[in] dim The number of output dimension to reach. - * \return A new relation: "relation" extended to "dim" output dims. - */ -osl_relation_p osl_relation_extend_output(osl_relation_p relation, int dim) { - int i, j; - int first = 1; - int offset; - osl_relation_p extended = NULL, node, previous = NULL; - - while (relation != NULL) { - if (relation->nb_output_dims > dim) - OSL_error("Number of output dims is greater than required extension"); - offset = dim - relation->nb_output_dims; - - node = osl_relation_pmalloc(relation->precision, - relation->nb_rows + offset, - relation->nb_columns + offset); - - node->type = relation->type; - node->nb_output_dims = OSL_max(relation->nb_output_dims, dim); - node->nb_input_dims = relation->nb_input_dims; - node->nb_local_dims = relation->nb_local_dims; - node->nb_parameters = relation->nb_parameters; - - // Copy of the original relation with some 0 columns for the new dimensions - // Note that we use the fact that the matrix is initialized with zeros. - for (i = 0; i < relation->nb_rows; i++) { - for (j = 0; j <= relation->nb_output_dims; j++) - osl_int_assign(relation->precision, node->m[i], j, relation->m[i], j); - - for (j = relation->nb_output_dims + offset + 1; - j < relation->nb_columns + offset; j++) - osl_int_assign(relation->precision, - node->m[i], j, relation->m[i], j - offset); - } - - // New rows dedicated to the new dimensions - for (i = relation->nb_rows; i < relation->nb_rows + offset; i++) { - for (j = 0; j < relation->nb_columns + offset; j++) { - if ((i - relation->nb_rows) == (j - relation->nb_output_dims - 1)) - osl_int_set_si(relation->precision, node->m[i], j, -1); - } - } - - if (first) { - first = 0; - extended = node; - previous = node; - } - else { - previous->next = node; - previous = previous->next; - } - - relation = relation->next; - } - - return extended; -} - diff --git a/cloog-0.17.0/osl/source/relation_list.c b/cloog-0.17.0/osl/source/relation_list.c deleted file mode 100644 index 1fef89fe41870676f8bbd8b47308213290e6d6c9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/relation_list.c +++ /dev/null @@ -1,628 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** relation_list.c ** - **-----------------------------------------------------------------** - ** First version: 08/10/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#include -#include -#include -#include - -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_relation_list_idump function: - * Displays a osl_relation_list_t structure (a list of relations) into a - * file (file, possibly stdout). See osl_relation_print_structure for - * more details. - * \param file File where informations are printed. - * \param l The list of relations whose information has to be printed. - * \param level Number of spaces before printing, for each line. - */ -void osl_relation_list_idump(FILE * file, osl_relation_list_p l, int level) { - int j, first = 1; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file,"|\t"); - - if (l != NULL) - fprintf(file, "+-- osl_relation_list_t\n"); - else - fprintf(file, "+-- NULL relation list\n"); - - while (l != NULL) { - if (!first) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "| osl_relation_list_t\n"); - } - else - first = 0; - - // A blank line. - for (j = 0; j <= level+1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print a relation. - osl_relation_idump(file, l->elt, level+1); - - l = l->next; - - // Next line. - if (l != NULL) { - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "V\n"); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_relation_dump function: - * This function prints the content of a osl_relation_list_t into - * a file (file, possibly stdout). - * \param file File where informations are printed. - * \param list The relation whose information has to be printed. - */ -void osl_relation_list_dump(FILE * file, osl_relation_list_p list) { - osl_relation_list_idump(file, list, 0); -} - - -/** - * osl_relation_list_pprint_elts function: - * This function pretty-prints the elements of a osl_relation_list_t structure - * into a file (file, possibly stdout) in the OpenScop format. I.e., it prints - * only the elements and not the number of elements. It prints an element of the - * list only if it is not NULL. - * \param file File where informations are printed. - * \param list The relation list whose information has to be printed. - * \param[in] names Array of constraint columns names. - */ -void osl_relation_list_pprint_elts(FILE * file, osl_relation_list_p list, - osl_names_p names) { - int i; - osl_relation_list_p head = list; - - // Count the number of elements in the list with non-NULL content. - i = osl_relation_list_count(list); - - // Print each element of the relation list. - if (i > 0) { - i = 0; - while (head) { - if (head->elt != NULL) { - osl_relation_pprint(file, head->elt, names); - if (head->next != NULL) - fprintf(file, "\n"); - i++; - } - head = head->next; - } - } - else { - fprintf(file, "# NULL relation list\n"); - } -} - - -/** - * osl_relation_list_pprint function: - * This function pretty-prints the content of a osl_relation_list_t structure - * into a file (file, possibly stdout) in the OpenScop format. It prints - * an element of the list only if it is not NULL. - * \param[in] file File where informations are printed. - * \param[in] list The relation list whose information has to be printed. - * \param[in] names Array of constraint columns names. - */ -void osl_relation_list_pprint(FILE * file, osl_relation_list_p list, - osl_names_p names) { - int i; - - // Count the number of elements in the list with non-NULL content. - i = osl_relation_list_count(list); - - // Print it. - if (i > 1) - fprintf(file,"# List of %d elements\n%d\n", i, i); - else - fprintf(file,"# List of %d element \n%d\n", i, i); - - // Print each element of the relation list. - osl_relation_list_pprint_elts(file, list, names); -} - - -/** - * osl_relation_list_print function: - * This function prints the content of a osl_relation_list_t structure - * into a file (file, possibly stdout) in the OpenScop format. It prints - * an element of the list only if it is not NULL. - * \param file File where informations are printed. - * \param list The relation list whose information has to be printed. - */ -void osl_relation_list_print(FILE * file, osl_relation_list_p list) { - - osl_relation_list_pprint(file, list, NULL); -} - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_relation_list_pread function ("precision read"): - * this function reads a list of relations into a file (foo, - * posibly stdin) and returns a pointer this relation list. - * \param[in] file The input stream. - * \param[in] precision The precision of the relation elements. - * \return A pointer to the relation list structure that has been read. - */ -osl_relation_list_p osl_relation_list_pread(FILE * file, int precision) { - int i; - osl_relation_list_p list; - osl_relation_list_p res; - int nb_mat; - - // Read the number of relations to read. - nb_mat = osl_util_read_int(file, NULL); - - if (nb_mat < 0) - OSL_error("negative number of relations"); - - // Allocate the header of the list and start reading each element. - res = list = osl_relation_list_malloc(); - for (i = 0; i < nb_mat; ++i) { - list->elt = osl_relation_pread(file, precision); - if (i < nb_mat - 1) - list->next = osl_relation_list_malloc(); - list = list->next; - } - - return res; -} - - -/** - * osl_relation_list_read function: - * this function is equivalent to osl_relation_list_pread() except that - * the precision corresponds to the precision environment variable or - * to the highest available precision if it is not defined. - * \see{osl_relation_list_pread} - */ -osl_relation_list_p osl_relation_list_read(FILE * foo) { - int precision = osl_util_get_precision(); - return osl_relation_list_pread(foo, precision); -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_relation_list_malloc function: - * This function allocates the memory space for a osl_relation_list_t - * structure and sets its fields with default values. Then it returns - * a pointer to the allocated space. - * \return A pointer to an empty relation list with fields set to default - * values. - */ -osl_relation_list_p osl_relation_list_malloc() { - osl_relation_list_p res; - - OSL_malloc(res, osl_relation_list_p, sizeof(osl_relation_list_t)); - res->elt = NULL; - res->next = NULL; - - return res; -} - - - -/** - * osl_relation_list_free function: - * This function frees the allocated memory for a osl_relation_list_t - * structure, and all the relations stored in the list. - * \param list The pointer to the relation list we want to free. - */ -void osl_relation_list_free(osl_relation_list_p list) { - osl_relation_list_p tmp; - - if (list == NULL) - return; - - while (list != NULL) { - if (list->elt != NULL) - osl_relation_free(list->elt); - tmp = list->next; - free(list); - list = tmp; - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_relation_list_node function: - * This function builds an osl_relation_list_t node and sets its - * relation element as a copy of the one provided as parameter. - * If the relation provided as an argument is NULL, NULL is returned. - * \param r The pointer to the relation to copy/paste in a list node. - * \return A pointer to a relation list node containing a copy of "relation". - */ -osl_relation_list_p osl_relation_list_node(osl_relation_p r) { - osl_relation_list_p new = NULL; - - if (r != NULL) { - new = osl_relation_list_malloc(); - new->elt = osl_relation_clone(r); - } - return new; -} - - -/** - * osl_relation_list_clone function: - * This functions builds and returns a quasi-"hard copy" (not a pointer copy) - * of a osl_relation_list_t data structure provided as parameter. - * \param list The pointer to the relation list we want to copy. - * \return A pointer to the full copy of the relation list in parameter. - */ -osl_relation_list_p osl_relation_list_clone(osl_relation_list_p list) { - - osl_relation_list_p clone = NULL, node, previous = NULL; - int first = 1; - - while (list != NULL) { - node = osl_relation_list_malloc(); - node->elt = osl_relation_clone(list->elt); - - if (first) { - first = 0; - clone = node; - previous = node; - } - else { - previous->next = node; - previous = previous->next; - } - - list = list->next; - } - - return clone; -} - - -/** - * osl_relation_list_concat function: - * this function builds a new relation list as the concatenation of the - * two lists sent as parameters. - * \param l1 The first relation list. - * \param l2 The second relation list. - * \return A pointer to the relation list resulting from the concatenation of - * l1 and l2. - */ -osl_relation_list_p osl_relation_list_concat(osl_relation_list_p l1, - osl_relation_list_p l2) { - osl_relation_list_p new, end; - - if (l1 == NULL) - return osl_relation_list_clone(l2); - - if (l2 == NULL) - return osl_relation_list_clone(l1); - - new = osl_relation_list_clone(l1); - end = new; - while (end->next != NULL) - end = end->next; - end->next = osl_relation_list_clone(l2); - - return new; -} - - -/** - * osl_relation_list_concat_inplace function: - * this function concatenates a relation list to another. No new list is - * created: this functions links the two input lists. If the first relation - * list is NULL, it is set to the second relation list. - * two lists sent as parameters. - * \param[in,out] l1 Pointer to the first relation list. - * \param[in] l2 The second relation list. - */ -void osl_relation_list_concat_inplace(osl_relation_list_p *l1, - osl_relation_list_p l2) { - osl_relation_list_p temp; - - if (*l1 == NULL) { - *l1 = l2; - return; - } - - temp = *l1; - while (temp->next != NULL) - temp = temp->next; - temp->next = l2; -} - - -/** - * osl_relation_list_equal function: - * This function returns true if the two relation lists are the same, false - * otherwise.. - * \param l1 The first relation list. - * \param l2 The second relation list. - * \return 1 if l1 and l2 are the same (content-wise), 0 otherwise. - */ -int osl_relation_list_equal(osl_relation_list_p l1, osl_relation_list_p l2) { - while ((l1 != NULL) && (l2 != NULL)) { - if (l1 == l2) - return 1; - - if (!osl_relation_equal(l1->elt, l2->elt)) - return 0; - - l1 = l1->next; - l2 = l2->next; - } - - if (((l1 == NULL) && (l2 != NULL)) || ((l1 != NULL) && (l2 == NULL))) - return 0; - - return 1; -} - - -/** - * osl_relation_integrity_check function: - * This function checks that a list of relation is "well formed" according to - * some expected properties (setting an expected value to OSL_UNDEFINED - * means that we do not expect a specific value) and what the relations are - * supposed to represent (all relations of a list are supposed to have the - * same semantics). It returns 0 if the check failed or 1 if no problem has - * been detected. - * \param list The relation list we want to check. - * \param type Semantics about this relation (domain, access...). - * \param expected_nb_output_dims Expected number of output dimensions. - * \param expected_nb_input_dims Expected number of input dimensions. - * \param expected_nb_parameters Expected number of parameters. - * \return 0 if the integrity check fails, 1 otherwise. - */ -int osl_relation_list_integrity_check(osl_relation_list_p list, - int type, - int expected_nb_output_dims, - int expected_nb_input_dims, - int expected_nb_parameters) { - while (list != NULL) { - // Check the access function. - if (!osl_relation_integrity_check(list->elt, - type, - expected_nb_output_dims, - expected_nb_input_dims, - expected_nb_parameters)) { - return 0; - } - - list = list->next; - } - - return 1; -} - - -/** - * osl_relation_list_set_type function: - * this function sets the type of each relation in the relation list to the - * one provided as parameter. - * \param list The list of relations to set the type. - * \param type The type. - */ -void osl_relation_list_set_type(osl_relation_list_p list, int type) { - - while (list != NULL) { - if (list->elt != NULL) { - list->elt->type = type; - } - list = list->next; - } -} - - -/** - * osl_relation_list_filter function: - * this function returns a copy of the input relation list, restricted to - * the relations of a given type. The special type OSL_TYPE_ACCESS - * filters any kind of access (read, write, rdwr etc.). - * \param list The relation list to copy/filter. - * \param type The filtering type. - * \return A copy of the input list with only relation of the given type. - */ -osl_relation_list_p osl_relation_list_filter(osl_relation_list_p list, - int type) { - - osl_relation_list_p copy = osl_relation_list_clone(list); - osl_relation_list_p filtered = NULL; - osl_relation_list_p previous = NULL; - osl_relation_list_p trash; - int first = 1; - - while (copy != NULL) { - if ((copy->elt != NULL) && - (((type == OSL_TYPE_ACCESS) && - (osl_relation_is_access(copy->elt))) || - ((type != OSL_TYPE_ACCESS) && - (type == copy->elt->type)))) { - if (first) { - filtered = copy; - first = 0; - } - - previous = copy; - copy = copy->next; - } - else { - trash = copy; - if (!first) - previous->next = copy->next; - copy = copy->next; - trash->next = NULL; - osl_relation_list_free(trash); - } - } - - return filtered; -} - - -/** - * osl_relation_list_count function: - * this function returns the number of elements with non-NULL content - * in a relation list. - * \param list The relation list to count the number of elements. - * \return The number of nodes with non-NULL content in the relation list. - */ -int osl_relation_list_count(osl_relation_list_p list) { - int i = 0; - - while (list != NULL) { - if (list->elt != NULL) - i++; - list = list->next; - } - - return i; -} - - -/** - * osl_relation_list_get_attributes function: - * this function returns, through its parameters, the maximum values of the - * relation attributes (nb_iterators, nb_parameters etc) in the relation list, - * depending on its type. HOWEVER, it updates the parameter value iff the - * attribute is greater than the input parameter value. Hence it may be used - * to get the attributes as well as to find the maximum attributes for several - * relation lists. The array identifier 0 is used when there is no array - * identifier (AND this is OK), OSL_UNDEFINED is used to report it is - * impossible to provide the property while it should. This function is not - * intended for checking, the input relation list should be correct. - * \param[in] list The relation list to extract attribute values. - * \param[in,out] nb_parameters Number of parameter attribute. - * \param[in,out] nb_iterators Number of iterators attribute. - * \param[in,out] nb_scattdims Number of scattering dimensions attribute. - * \param[in,out] nb_localdims Number of local dimensions attribute. - * \param[in,out] array_id Maximum array identifier attribute. - */ -void osl_relation_list_get_attributes(osl_relation_list_p list, - int * nb_parameters, - int * nb_iterators, - int * nb_scattdims, - int * nb_localdims, - int * array_id) { - int local_nb_parameters = OSL_UNDEFINED; - int local_nb_iterators = OSL_UNDEFINED; - int local_nb_scattdims = OSL_UNDEFINED; - int local_nb_localdims = OSL_UNDEFINED; - int local_array_id = OSL_UNDEFINED; - - while (list != NULL) { - osl_relation_get_attributes(list->elt, - &local_nb_parameters, - &local_nb_iterators, - &local_nb_scattdims, - &local_nb_localdims, - &local_array_id); - // Update. - *nb_parameters = OSL_max(*nb_parameters, local_nb_parameters); - *nb_iterators = OSL_max(*nb_iterators, local_nb_iterators); - *nb_scattdims = OSL_max(*nb_scattdims, local_nb_scattdims); - *nb_localdims = OSL_max(*nb_localdims, local_nb_localdims); - *array_id = OSL_max(*array_id, local_array_id); - list = list->next; - } -} - diff --git a/cloog-0.17.0/osl/source/scop.c b/cloog-0.17.0/osl/source/scop.c deleted file mode 100644 index ae386c2e2823422ef94ddf8ea8057da341b9a349..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/scop.c +++ /dev/null @@ -1,757 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** scop.c ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -# include -# include -# include -# include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display functions * - *****************************************************************************/ - - -/** - * osl_scop_idump function: - * this function displays an osl_scop_t structure (*scop) into a - * file (file, possibly stdout) in a way that trends to be understandable. It - * includes an indentation level (level) in order to work with others - * idump functions. - * \param file The file where the information has to be printed. - * \param scop The scop structure whose information has to be printed. - * \param level Number of spaces before printing, for each line. - */ -void osl_scop_idump(FILE * file, osl_scop_p scop, int level) { - int j, first = 1; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (scop != NULL) - fprintf(file, "+-- osl_scop_t\n"); - else - fprintf(file, "+-- NULL scop\n"); - - while (scop != NULL) { - if (!first) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "| osl_scop_t\n"); - } - else - first = 0; - - // A blank line. - for (j = 0; j <= level+1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print the version. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "|\tVersion: %d\n", scop->version); - - // A blank line. - for (j = 0; j <= level+1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print the language. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "|\tLanguage: %s\n", scop->language); - - // A blank line. - for (j = 0; j <= level+1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print the context of the scop. - osl_relation_idump(file, scop->context, level+1); - - // Print the parameters. - osl_generic_idump(file, scop->parameters, level+1); - - // Print the statements. - osl_statement_idump(file, scop->statement, level+1); - - // Print the registered extension interfaces. - osl_interface_idump(file, scop->registry, level+1); - - // Print the extensions. - osl_generic_idump(file, scop->extension, level+1); - - scop = scop->next; - - // Next line. - if (scop != NULL) { - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "V\n"); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_scop_dump function: - * this function prints the content of an osl_scop_t structure (*scop) - * into a file (file, possibly stdout). - * \param file The file where the information has to be printed. - * \param scop The scop structure whose information has to be printed. - */ -void osl_scop_dump(FILE * file, osl_scop_p scop) { - osl_scop_idump(file, scop, 0); -} - - -/** - * osl_scop_names function: - * this function generates as set of names for all the dimensions - * involved in a given scop. - * \param[in] scop The scop (list) we have to generate names for. - * \return A set of generated names for the input scop dimensions. - */ -static -osl_names_p osl_scop_names(osl_scop_p scop) { - int nb_parameters = OSL_UNDEFINED; - int nb_iterators = OSL_UNDEFINED; - int nb_scattdims = OSL_UNDEFINED; - int nb_localdims = OSL_UNDEFINED; - int array_id = OSL_UNDEFINED; - - osl_scop_get_attributes(scop, &nb_parameters, &nb_iterators, - &nb_scattdims, &nb_localdims, &array_id); - - return osl_names_generate("P", nb_parameters, - "i", nb_iterators, - "c", nb_scattdims, - "l", nb_localdims, - "A", array_id); -} - - -/** - * osl_scop_print function: - * this function prints the content of an osl_scop_t structure (*scop) - * into a file (file, possibly stdout) in the OpenScop textual format. - * \param file The file where the information has to be printed. - * \param scop The scop structure whose information has to be printed. - */ -void osl_scop_print(FILE * file, osl_scop_p scop) { - int parameters_backedup = 0; - osl_strings_p parameters_backup = NULL; - osl_names_p names; - - if (scop == NULL) { - fprintf(file, "# NULL scop\n"); - return; - } - else { - fprintf(file, "# [File generated by the OpenScop Library %s]\n", - OSL_RELEASE); - } - - if (osl_scop_integrity_check(scop) == 0) - OSL_warning("OpenScop integrity check failed. " - "Something may go wrong."); - - // Generate the names for the various dimensions. - names = osl_scop_names(scop); - - while (scop != NULL) { - // If possible, replace parameter names with scop iterator names. - if (osl_generic_has_URI(scop->parameters, OSL_URI_STRINGS)) { - parameters_backedup = 1; - parameters_backup = names->parameters; - names->parameters = scop->parameters->data; - } - - fprintf(file, "\n"OSL_TAG_START_SCOP"\n\n"); - fprintf(file, "# =============================================== " - "Global\n"); - fprintf(file, "# Language\n"); - fprintf(file, "%s\n\n", scop->language); - - fprintf(file, "# Context\n"); - osl_relation_pprint(file, scop->context, names); - fprintf(file, "\n"); - - osl_util_print_provided(file, - osl_generic_has_URI(scop->parameters, OSL_URI_STRINGS), - "Parameters are"); - osl_generic_print(file, scop->parameters); - - fprintf(file, "\n# Number of statements\n"); - fprintf(file, "%d\n\n",osl_statement_number(scop->statement)); - - osl_statement_pprint(file, scop->statement, names); - - if (scop->extension) { - fprintf(file, "# =============================================== " - "Extensions\n"); - osl_generic_print(file, scop->extension); - } - fprintf(file, "\n"OSL_TAG_END_SCOP"\n\n"); - - // If necessary, switch back parameter names. - if (parameters_backedup) { - parameters_backedup = 0; - names->parameters = parameters_backup; - } - - scop = scop->next; - } - - osl_names_free(names); -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_scop_pread function ("precision read"): - * this function reads a list of scop structures from a file (possibly stdin) - * complying to the OpenScop textual format and returns a pointer to this - * scop list. If some relation properties (number of input/output/local - * dimensions and number of parameters) are undefined, it will define them - * according to the available information. - * \param[in] file The file where the scop has to be read. - * \param[in] registry The list of known interfaces (others are ignored). - * \param[in] precision The precision of the relation elements. - * \return A pointer to the scop structure that has been read. - */ -osl_scop_p osl_scop_pread(FILE * file, osl_interface_p registry, - int precision) { - osl_scop_p list = NULL, current = NULL, scop; - osl_statement_p stmt = NULL; - osl_statement_p prev = NULL; - osl_strings_p language; - int nb_statements; - char * tmp; - int first = 1; - int i; - - if (file == NULL) - return NULL; - - while(1) { - // - // I. START TAG - // - tmp = osl_util_read_uptotag(file, OSL_TAG_START_SCOP); - if (tmp == NULL) { - OSL_debug("no more scop in the file"); - break; - } - else { - free(tmp); - } - - scop = osl_scop_malloc(); - scop->registry = osl_interface_clone(registry); - - // - // II. CONTEXT PART - // - - // Read the language. - language = osl_strings_read(file); - if (osl_strings_size(language) == 0) - OSL_error("no language (backend) specified"); - - if (osl_strings_size(language) > 1) - OSL_warning("uninterpreted information (after language)"); - - if (language != NULL) { - scop->language = strdup(language->string[0]); - osl_strings_free(language); - } - - // Read the context domain. - scop->context = osl_relation_pread(file, precision); - - // Read the parameters. - if (osl_util_read_int(file, NULL) > 0) - scop->parameters = osl_generic_read_one(file, scop->registry); - - // - // III. STATEMENT PART - // - - // Read the number of statements. - nb_statements = osl_util_read_int(file, NULL); - - for (i = 0; i < nb_statements; i++) { - // Read each statement. - stmt = osl_statement_pread(file, scop->registry, precision); - if (scop->statement == NULL) - scop->statement = stmt; - else - prev->next = stmt; - prev = stmt; - } - - // - // IV. EXTENSION PART (TO THE END TAG) - // - - // Read up the end tag (if any), and store extensions. - scop->extension = osl_generic_read(file, scop->registry); - - // Add the new scop to the list. - if (first) { - list = scop; - first = 0; - } - else { - current->next = scop; - } - current = scop; - } - - if (!osl_scop_integrity_check(list)) - OSL_warning("scop integrity check failed"); - - return list; -} - - -/** - * osl_scop_read function: - * this function is equivalent to osl_scop_pread() except that - * (1) the precision corresponds to the precision environment variable or - * to the highest available precision if it is not defined, and - * (2) the list of known interface is set to the default one. - * \see{osl_scop_pread} - */ -osl_scop_p osl_scop_read(FILE * foo) { - int precision = osl_util_get_precision(); - osl_interface_p registry = osl_interface_get_default_registry(); - osl_scop_p scop = osl_scop_pread(foo, registry, precision); - - osl_interface_free(registry); - return scop; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation functions * - *****************************************************************************/ - - -/** - * osl_scop_malloc function: - * this function allocates the memory space for a osl_scop_t structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * \return A pointer to an empty scop with fields set to default values. - */ -osl_scop_p osl_scop_malloc() { - osl_scop_p scop; - - OSL_malloc(scop, osl_scop_p, sizeof(osl_scop_t)); - scop->version = 1; - scop->language = NULL; - scop->context = NULL; - scop->parameters = NULL; - scop->statement = NULL; - scop->registry = NULL; - scop->extension = NULL; - scop->usr = NULL; - scop->next = NULL; - - return scop; -} - - -/** - * osl_scop_free function: - * This function frees the allocated memory for a osl_scop_t structure. - * \param scop The pointer to the scop we want to free. - */ -void osl_scop_free(osl_scop_p scop) { - osl_scop_p tmp; - - while (scop != NULL) { - if (scop->language != NULL) - free(scop->language); - osl_generic_free(scop->parameters); - osl_relation_free(scop->context); - osl_statement_free(scop->statement); - osl_interface_free(scop->registry); - osl_generic_free(scop->extension); - - tmp = scop->next; - free(scop); - scop = tmp; - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_scop_clone function: - * This functions builds and returns a "hard copy" (not a pointer copy) - * of a osl_statement_t data structure provided as parameter. - * Note that the usr field is not touched by this function. - * \param scop The pointer to the scop we want to clone. - * \return A pointer to the full clone of the scop provided as parameter. - */ -osl_scop_p osl_scop_clone(osl_scop_p scop) { - osl_scop_p clone = NULL, node, previous = NULL; - int first = 1; - - while (scop != NULL) { - node = osl_scop_malloc(); - node->version = scop->version; - if (scop->language != NULL) - node->language = strdup(scop->language); - node->context = osl_relation_clone(scop->context); - node->parameters = osl_generic_clone(scop->parameters); - node->statement = osl_statement_clone(scop->statement); - node->registry = osl_interface_clone(scop->registry); - node->extension = osl_generic_clone(scop->extension); - - if (first) { - first = 0; - clone = node; - previous = node; - } - else { - previous->next = node; - previous = previous->next; - } - - scop = scop->next; - } - - return clone; -} - - -/** - * osl_scop_equal function: - * this function returns true if the two scops are the same, false - * otherwise (the usr field is not tested). - * \param s1 The first scop. - * \param s2 The second scop. - * \return 1 if s1 and s2 are the same (content-wise), 0 otherwise. - */ -int osl_scop_equal(osl_scop_p s1, osl_scop_p s2) { - - while ((s1 != NULL) && (s2 != NULL)) { - if (s1 == s2) - return 1; - - if (s1->version != s2->version) { - OSL_info("versions are not the same"); - return 0; - } - - if (strcmp(s1->language, s2->language) != 0) { - OSL_info("languages are not the same"); - return 0; - } - - if (!osl_relation_equal(s1->context, s2->context)) { - OSL_info("contexts are not the same"); - return 0; - } - - if (!osl_generic_equal(s1->parameters, s2->parameters)) { - OSL_info("parameters are not the same"); - return 0; - } - - if (!osl_statement_equal(s1->statement, s2->statement)) { - OSL_info("statements are not the same"); - return 0; - } - - if (!osl_interface_equal(s1->registry, s2->registry)) { - OSL_info("registries are not the same"); - return 0; - } - - if (!osl_generic_equal(s1->extension, s2->extension)) { - OSL_info("extensions are not the same"); - return 0; - } - - s1 = s1->next; - s2 = s2->next; - } - - if (((s1 == NULL) && (s2 != NULL)) || ((s1 != NULL) && (s2 == NULL))) - return 0; - - return 1; -} - - -/** - * osl_scop_integrity_check function: - * This function checks that a scop is "well formed". It returns 0 if the - * check failed or 1 if no problem has been detected. - * \param scop The scop we want to check. - * \return 0 if the integrity check fails, 1 otherwise. - */ -int osl_scop_integrity_check(osl_scop_p scop) { - int expected_nb_parameters; - - - while (scop != NULL) { - // Check the language. - if ((scop->language != NULL) && - (!strcmp(scop->language, "caml") || !strcmp(scop->language, "Caml") || - !strcmp(scop->language, "ocaml") || !strcmp(scop->language, "OCaml"))) - fprintf(stderr, "[OpenScop] Alert: What ?! Caml ?! Are you sure ?!?!\n"); - - // Check the context. - if (!osl_relation_integrity_check(scop->context, - OSL_TYPE_CONTEXT, - OSL_UNDEFINED, - OSL_UNDEFINED, - OSL_UNDEFINED)) - return 0; - - // Get the number of parameters. - if (scop->context != NULL) - expected_nb_parameters = scop->context->nb_parameters; - else - expected_nb_parameters = OSL_UNDEFINED; - - // TODO : check the number of parameter strings. - - if (!osl_statement_integrity_check(scop->statement, - expected_nb_parameters)) - return 0; - - scop = scop->next; - } - - return 1; -} - - -/** - * osl_scop_get_nb_parameters function: - * this function returns the number of global parameters of a given SCoP. - * \param scop The scop we want to know the number of global parameters. - * \return The number of global parameters in the scop. - */ -int osl_scop_get_nb_parameters(osl_scop_p scop) { - - if (scop->context == NULL) { - OSL_debug("no context domain, assuming 0 parameters"); - return 0; - } - else { - return scop->context->nb_parameters; - } -} - - -/** - * osl_scop_register_extension function: - * this function registers a list of extension interfaces to a scop, i.e., it - * adds them to the scop registry. In addition, it will extract extensions - * corresponding to those interfaces from the textual form of the extensions - * (if any) and add them to the scop extension list. - * \param scop The scop for which an extension has to be registered. - * \param interface The extension interface to register within the scop. - */ -void osl_scop_register_extension(osl_scop_p scop, osl_interface_p interface) { - osl_generic_p textual, new; - char * extension_string; - - if ((interface != NULL) && (scop != NULL)) { - osl_interface_add(&scop->registry, interface); - - textual = osl_generic_lookup(scop->extension, interface->URI); - if (textual != NULL) { - extension_string = ((osl_textual_p)textual->data)->textual; - new = osl_generic_sread(extension_string, interface); - osl_generic_add(&scop->extension, new); - } - } -} - - -/** - * osl_scop_get_attributes function: - * this function returns, through its parameters, the maximum values of the - * relation attributes (nb_iterators, nb_parameters etc) in the scop. - * HOWEVER, it updates the parameter value iff the attribute is greater than - * the input parameter value. Hence it may be used to get the attributes as - * well as to find the maximum attributes for several scop lists. The array - * identifier 0 is used when there is no array identifier (AND this is OK), - * OSL_UNDEFINED is used to report it is impossible to provide the property - * while it should. This function is not intended for checking, the input - * scop should be correct. - * \param[in] scop The scop to extract attributes values. - * \param[in,out] nb_parameters Number of parameter attribute. - * \param[in,out] nb_iterators Number of iterators attribute. - * \param[in,out] nb_scattdims Number of scattering dimensions attribute. - * \param[in,out] nb_localdims Number of local dimensions attribute. - * \param[in,out] array_id Maximum array identifier attribute. - */ -void osl_scop_get_attributes(osl_scop_p scop, - int * nb_parameters, - int * nb_iterators, - int * nb_scattdims, - int * nb_localdims, - int * array_id) { - int local_nb_parameters = OSL_UNDEFINED; - int local_nb_iterators = OSL_UNDEFINED; - int local_nb_scattdims = OSL_UNDEFINED; - int local_nb_localdims = OSL_UNDEFINED; - int local_array_id = OSL_UNDEFINED; - - while (scop != NULL) { - osl_relation_get_attributes(scop->context, - &local_nb_parameters, - &local_nb_iterators, - &local_nb_scattdims, - &local_nb_localdims, - &local_array_id); - - osl_statement_get_attributes(scop->statement, - &local_nb_parameters, - &local_nb_iterators, - &local_nb_scattdims, - &local_nb_localdims, - &local_array_id); - // Update. - *nb_parameters = OSL_max(*nb_parameters, local_nb_parameters); - *nb_iterators = OSL_max(*nb_iterators, local_nb_iterators); - *nb_scattdims = OSL_max(*nb_scattdims, local_nb_scattdims); - *nb_localdims = OSL_max(*nb_localdims, local_nb_localdims); - *array_id = OSL_max(*array_id, local_array_id); - scop = scop->next; - } -} - - -/** - * osl_scop_normalize_scattering function: - * this function modifies a scop such that all scattering relation have - * the same number of output dimensions (additional output dimensions are - * set as being equal to zero). - * \param[in,out] scop The scop to nomalize the scattering functions. - */ -void osl_scop_normalize_scattering(osl_scop_p scop) { - int max_scattering_dims = 0; - osl_statement_p statement; - osl_relation_p extended; - - if ((scop != NULL) && (scop->statement != NULL)) { - // Get the max number of scattering dimensions. - statement = scop->statement; - while (statement != NULL) { - if (statement->scattering != NULL) { - max_scattering_dims = OSL_max(max_scattering_dims, - statement->scattering->nb_output_dims); - } - statement = statement->next; - } - - // Normalize. - statement = scop->statement; - while (statement != NULL) { - if (statement->scattering != NULL) { - extended = osl_relation_extend_output(statement->scattering, - max_scattering_dims); - osl_relation_free(statement->scattering); - statement->scattering = extended; - } - statement = statement->next; - } - } -} - diff --git a/cloog-0.17.0/osl/source/statement.c b/cloog-0.17.0/osl/source/statement.c deleted file mode 100644 index 73a0d0154dd53f91bc7dd79262995a0f85f3fbf6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/statement.c +++ /dev/null @@ -1,721 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** statement.c ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display functions * - *****************************************************************************/ - - -/** - * osl_statement_idump function: - * this function displays an osl_statement_t structure (*statement) into - * a file (file, possibly stdout) in a way that trends to be understandable. - * It includes an indentation level (level) in order to work with others - * dumping functions. - * \param[in] file File where the information has to be printed. - * \param[in] statement The statement whose information has to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_statement_idump(FILE * file, osl_statement_p statement, int level) { - int j, first = 1, number = 1; - - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - - if (statement != NULL) - fprintf(file, "+-- osl_statement_t (S%d)\n", number); - else - fprintf(file, "+-- NULL statement\n"); - - while (statement != NULL) { - if (!first) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "| osl_statement_t (S%d)\n", number); - } - else - first = 0; - - // A blank line. - for (j = 0; j <= level + 1; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); - - // Print the domain of the statement. - osl_relation_idump(file, statement->domain, level + 1); - - // Print the scattering of the statement. - osl_relation_idump(file, statement->scattering, level + 1); - - // Print the array access information of the statement. - osl_relation_list_idump(file, statement->access, level + 1); - - // Print the original body expression. - osl_generic_idump(file, statement->body, level + 1); - - statement = statement->next; - number++; - - // Next line. - if (statement != NULL) { - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "V\n"); - } - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_statement_dump function: - * this function prints the content of an osl_statement_t structure - * (*statement) into a file (file, possibly stdout). - * \param[in] file The file where the information has to be printed. - * \param[in] statement The statement whose information has to be printed. - */ -void osl_statement_dump(FILE * file, osl_statement_p statement) { - osl_statement_idump(file, statement, 0); -} - - -/** - * osl_statement_names function: - * this function generates as set of names for all the dimensions - * involved in a given statement. - * \param[in] statement The statement (list) we have to generate names for. - * \return A set of generated names for the input statement dimensions. - */ -static -osl_names_p osl_statement_names(osl_statement_p statement) { - int nb_parameters = OSL_UNDEFINED; - int nb_iterators = OSL_UNDEFINED; - int nb_scattdims = OSL_UNDEFINED; - int nb_localdims = OSL_UNDEFINED; - int array_id = OSL_UNDEFINED; - - osl_statement_get_attributes(statement, &nb_parameters, &nb_iterators, - &nb_scattdims, &nb_localdims, &array_id); - - return osl_names_generate("P", nb_parameters, - "i", nb_iterators, - "c", nb_scattdims, - "l", nb_localdims, - "A", array_id); -} - - -/** - * osl_statement_pprint function: - * this function pretty-prints the content of an osl_statement_t structure - * (*statement) into a file (file, possibly stdout) in the OpenScop format. - * \param[in] file The file where the information has to be printed. - * \param[in] statement The statement whose information has to be printed. - * \param[in] names The names of the constraint columns for comments. - */ -void osl_statement_pprint(FILE * file, osl_statement_p statement, - osl_names_p names) { - int nb_relations, number = 1; - int generated_names = 0; - int iterators_backedup = 0; - osl_strings_p iterators_backup = NULL; - - // Generate the dimension names if necessary and replace iterators with - // statement iterators if possible. - if (names == NULL) { - generated_names = 1; - names = osl_statement_names(statement); - } - - while (statement != NULL) { - // If possible, replace iterator names with statement iterator names. - if (osl_generic_has_URI(statement->body, OSL_URI_BODY) && - (((osl_body_p)(statement->body->data))->iterators != NULL)) { - iterators_backedup = 1; - iterators_backup = names->iterators; - names->iterators = ((osl_body_p)(statement->body->data))->iterators; - } - - nb_relations = 0; - - fprintf(file, "# =============================================== "); - fprintf(file, "Statement %d\n", number); - - fprintf(file, "# Number of relations describing the statement:\n"); - - if (statement->domain != NULL) - nb_relations ++; - if (statement->scattering != NULL) - nb_relations ++; - nb_relations += osl_relation_list_count(statement->access); - - fprintf(file, "%d\n\n", nb_relations); - - fprintf(file, "# ---------------------------------------------- "); - fprintf(file, "%2d.1 Domain\n", number); - osl_relation_pprint(file, statement->domain, names); - fprintf(file, "\n"); - - fprintf(file, "# ---------------------------------------------- "); - fprintf(file, "%2d.2 Scattering\n", number); - osl_relation_pprint(file, statement->scattering, names); - fprintf(file, "\n"); - - fprintf(file, "# ---------------------------------------------- "); - fprintf(file, "%2d.3 Access\n", number); - osl_relation_list_pprint_elts(file, statement->access, names); - fprintf(file, "\n"); - - fprintf(file, "# ---------------------------------------------- "); - fprintf(file, "%2d.4 Body\n", number); - if (statement->body != NULL) { - fprintf(file, "# Statement body is provided\n"); - fprintf(file, "1\n"); - osl_generic_print(file, statement->body); - } - else { - fprintf(file, "# Statement body is not provided\n"); - fprintf(file, "0\n"); - } - - fprintf(file, "\n"); - - // If necessary, switch back iterator names. - if (iterators_backedup) { - iterators_backedup = 0; - names->iterators = iterators_backup; - } - - statement = statement->next; - number++; - } - - if (generated_names) - osl_names_free(names); -} - - -/** - * osl_statement_print function: - * this function prints the content of an osl_statement_t structure - * (*statement) into a file (file, possibly stdout) in the OpenScop format. - * \param[in] file The file where the information has to be printed. - * \param[in] statement The statement whose information has to be printed. - */ -void osl_statement_print(FILE * file, osl_statement_p statement) { - - osl_statement_pprint(file, statement, NULL); -} - - -/***************************************************************************** - * Reading function * - *****************************************************************************/ - - -/** - * osl_statement_dispatch function: - * this function dispatches the relations from a relation list to the - * convenient fields of a statement structure: it extracts the domain, - * the scattering and the access list and store them accordingly in the - * statement structure provided as a parameter. - * \param[in,out] stmt The statement where to dispatch the relations. - * \param[in,out] list The "brute" relation list to sort and dispatch (freed). - */ -static -void osl_statement_dispatch(osl_statement_p stmt, osl_relation_list_p list) { - osl_relation_list_p domain_list; - osl_relation_list_p scattering_list; - int nb_domains, nb_scattering, nb_accesses; - - // Domain. - domain_list = osl_relation_list_filter(list, OSL_TYPE_DOMAIN); - nb_domains = osl_relation_list_count(domain_list); - if (nb_domains > 1) - OSL_error("more than one domain for a statement"); - - if (domain_list != NULL) { - stmt->domain = domain_list->elt; - domain_list->elt = NULL; - osl_relation_list_free(domain_list); - } - else { - stmt->domain = NULL; - } - - // Scattering. - scattering_list=osl_relation_list_filter(list,OSL_TYPE_SCATTERING); - nb_scattering = osl_relation_list_count(scattering_list); - if (nb_scattering > 1) - OSL_error("more than one scattering relation for a statement"); - - if (scattering_list != NULL) { - stmt->scattering = scattering_list->elt; - scattering_list->elt = NULL; - osl_relation_list_free(scattering_list); - } - else { - stmt->scattering = NULL; - } - - // Access. - stmt->access = osl_relation_list_filter(list, OSL_TYPE_ACCESS); - nb_accesses = osl_relation_list_count(stmt->access); - - if ((nb_domains + nb_scattering + nb_accesses) != - (osl_relation_list_count(list))) - OSL_error("unexpected relation type to define a statement"); - - osl_relation_list_free(list); -} - - -/** - * osl_statement_pread function ("precision read"): - * this function reads an osl_statement_t structure from an input stream - * (possibly stdin). - * \param[in] file The input stream. - * \param[in] registry The list of known interfaces (others are ignored). - * \param[in] precision The precision of the relation elements. - * \return A pointer to the statement structure that has been read. - */ -osl_statement_p osl_statement_pread(FILE * file, osl_interface_p registry, - int precision) { - osl_statement_p stmt = osl_statement_malloc(); - osl_relation_list_p list; - - if (file) { - // Read all statement relations. - list = osl_relation_list_pread(file, precision); - - // Store relations at the right place according to their type. - osl_statement_dispatch(stmt, list); - - // Read the body information. - if (osl_util_read_int(file, NULL) > 0) - stmt->body = osl_generic_read_one(file, registry); - } - - return stmt; -} - - -/** - * osl_statement_read function: - * this function is equivalent to osl_statement_pread() except that - * (1) the precision corresponds to the precision environment variable or - * to the highest available precision if it is not defined, and - * (2) the list of known interface is set to the default one. - * \see{osl_statement_pread} - */ -osl_statement_p osl_statement_read(FILE * foo) { - int precision = osl_util_get_precision(); - osl_interface_p registry = osl_interface_get_default_registry(); - osl_statement_p statement = osl_statement_pread(foo, registry, precision); - - osl_interface_free(registry); - return statement; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation functions * - *****************************************************************************/ - - -/** - * osl_statement_malloc function: - * this function allocates the memory space for an osl_statement_t - * structure and sets its fields with default values. Then it returns a pointer - * to the allocated space. - * \return A pointer to an empty statement with fields set to default values. - */ -osl_statement_p osl_statement_malloc() { - osl_statement_p statement; - - OSL_malloc(statement, osl_statement_p, sizeof(osl_statement_t)); - statement->domain = NULL; - statement->scattering = NULL; - statement->access = NULL; - statement->body = NULL; - statement->next = NULL; - - return statement; -} - - -/** - * osl_statement_free function: - * this function frees the allocated memory for an osl_statement_t - * structure. - * \param[in,out] statement The pointer to the statement we want to free. - */ -void osl_statement_free(osl_statement_p statement) { - osl_statement_p next; - - while (statement != NULL) { - next = statement->next; - osl_relation_free(statement->domain); - osl_relation_free(statement->scattering); - osl_relation_list_free(statement->access); - osl_generic_free(statement->body); - - free(statement); - statement = next; - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_statement_add function: - * this function adds a statement "statement" at the end of the statement - * list pointed by "location". - * \param[in,out] location Address of the first element of the statement list. - * \param[in] statement The statement to add to the list. - */ -void osl_statement_add(osl_statement_p * location, - osl_statement_p statement) { - while (*location != NULL) - location = &((*location)->next); - - *location = statement; -} - - -/** - * osl_statement_number function: - * this function returns the number of statements in the statement list - * provided as parameter. - * \param[in] statement The first element of the statement list. - * \return The number of statements in the statement list. - */ -int osl_statement_number(osl_statement_p statement) { - int number = 0; - - while (statement != NULL) { - number++; - statement = statement->next; - } - return number; -} - - -/** - * osl_statement_clone function: - * This functions builds and returns a "hard copy" (not a pointer copy) of an - * osl_statement_t data structure provided as parameter. - * \param[in] statement The pointer to the statement we want to clone. - * \return A pointer to the clone of the statement provided as parameter. - */ -osl_statement_p osl_statement_clone(osl_statement_p statement) { - int first = 1; - osl_statement_p clone = NULL, node, previous = NULL; - - while (statement != NULL) { - node = osl_statement_malloc(); - node->domain = osl_relation_clone(statement->domain); - node->scattering = osl_relation_clone(statement->scattering); - node->access = osl_relation_list_clone(statement->access); - node->body = osl_generic_clone(statement->body); - node->next = NULL; - - if (first) { - first = 0; - clone = node; - previous = node; - } - else { - previous->next = node; - previous = previous->next; - } - - statement = statement->next; - } - - return clone; -} - - -/** - * osl_statement_equal function: - * this function returns true if the two statements provided as parameters - * are the same, false otherwise (the usr field is not tested). - * \param[in] s1 The first statement. - * \param[in] s2 The second statement. - * \return 1 if s1 and s2 are the same (content-wise), 0 otherwise. - */ -int osl_statement_equal(osl_statement_p s1, osl_statement_p s2) { - - if (s1 == s2) - return 1; - - if (((s1->next != NULL) && (s2->next == NULL)) || - ((s1->next == NULL) && (s2->next != NULL))) { - OSL_info("statements are not the same"); - return 0; - } - - if ((s1->next != NULL) && (s2->next != NULL)) { - if (!osl_statement_equal(s1->next, s2->next)) { - OSL_info("number of statements is not the same"); - return 0; - } - } - - if (!osl_relation_equal(s1->domain, s2->domain)) { - OSL_info("statement domains are not the same"); - return 0; - } - - if (!osl_relation_equal(s1->scattering, s2->scattering)) { - OSL_info("statement scatterings are not the same"); - return 0; - } - - if (!osl_relation_list_equal(s1->access, s2->access)) { - OSL_info("statement accesses are not the same"); - return 0; - } - - if (!osl_generic_equal(s1->body, s2->body)) { - OSL_info("statement bodies are not the same"); - return 0; - } - - return 1; -} - - -/** - * osl_statement_integrity_check function: - * this function checks that a statement is "well formed" according to some - * expected properties (setting an expected value to OSL_UNDEFINED means - * that we do not expect a specific value). It returns 0 if the check failed - * or 1 if no problem has been detected. - * \param[in] statement The statement we want to check. - * \param[in] expected_nb_parameters Expected number of parameters. - * \return 0 if the integrity check fails, 1 otherwise. - */ -int osl_statement_integrity_check(osl_statement_p statement, - int expected_nb_parameters) { - int expected_nb_iterators; - - while (statement != NULL) { - // Check the domain. - if (!osl_relation_integrity_check(statement->domain, - OSL_TYPE_DOMAIN, - OSL_UNDEFINED, - 0, - expected_nb_parameters)) { - return 0; - } - - // Get the number of iterators. - if (statement->domain != NULL) - expected_nb_iterators = statement->domain->nb_output_dims; - else - expected_nb_iterators = OSL_UNDEFINED; - - // Check the scattering relation. - if (!osl_relation_integrity_check(statement->scattering, - OSL_TYPE_SCATTERING, - OSL_UNDEFINED, - expected_nb_iterators, - expected_nb_parameters)) { - return 0; - } - - // Check the access relations. - if (!osl_relation_list_integrity_check(statement->access, - OSL_TYPE_ACCESS, - OSL_UNDEFINED, - expected_nb_iterators, - expected_nb_parameters)) { - return 0; - } - - // Check the statement body. - if ((expected_nb_iterators != OSL_UNDEFINED) && - (osl_generic_has_URI(statement->body, OSL_URI_BODY)) && - (((osl_body_p)(statement->body->data))->iterators != NULL) && - (expected_nb_iterators != osl_strings_size( - ((osl_body_p)(statement->body->data))->iterators))) { - OSL_warning("unexpected number of original iterators"); - return 0; - } - - statement = statement->next; - } - - return 1; -} - - -/** - * osl_statement_get_nb_iterators function: - * this function returns the number of surroounding iterators of a given - * statement. - * \param statement The statement we want to know the number of iterators. - * \return The number of surrounding iterators for the statement. - */ -int osl_statement_get_nb_iterators(osl_statement_p statement) { - - if (statement->domain == NULL) { - OSL_warning("no statement domain, assuming 0 iterators"); - return 0; - } - else { - return statement->domain->nb_output_dims; - } -} - - -/** - * osl_statement_get_attributes function: - * this function returns, through its parameters, the maximum values of the - * relation attributes (nb_iterators, nb_parameters etc) in the statement. - * HOWEVER, it updates the parameter value iff the attribute is greater than - * the input parameter value. Hence it may be used to get the attributes as - * well as to find the maximum attributes for several statement lists. The - * array identifier 0 is used when there is no array identifier (AND this is - * OK), OSL_UNDEFINED is used to report it is impossible to provide the - * property while it should. This function is not intended for checking, the - * input statement should be correct. - * \param[in] statement The statement to extract attributes values. - * \param[in,out] nb_parameters Number of parameter attribute. - * \param[in,out] nb_iterators Number of iterators attribute. - * \param[in,out] nb_scattdims Number of scattering dimensions attribute. - * \param[in,out] nb_localdims Number of local dimensions attribute. - * \param[in,out] array_id Maximum array identifier attribute. - */ -void osl_statement_get_attributes(osl_statement_p statement, - int * nb_parameters, - int * nb_iterators, - int * nb_scattdims, - int * nb_localdims, - int * array_id) { - int local_nb_parameters = OSL_UNDEFINED; - int local_nb_iterators = OSL_UNDEFINED; - int local_nb_scattdims = OSL_UNDEFINED; - int local_nb_localdims = OSL_UNDEFINED; - int local_array_id = OSL_UNDEFINED; - - while (statement != NULL) { - osl_relation_get_attributes(statement->domain, - &local_nb_parameters, - &local_nb_iterators, - &local_nb_scattdims, - &local_nb_localdims, - &local_array_id); - - osl_relation_get_attributes(statement->scattering, - &local_nb_parameters, - &local_nb_iterators, - &local_nb_scattdims, - &local_nb_localdims, - &local_array_id); - - osl_relation_list_get_attributes(statement->access, - &local_nb_parameters, - &local_nb_iterators, - &local_nb_scattdims, - &local_nb_localdims, - &local_array_id); - // Update. - *nb_parameters = OSL_max(*nb_parameters, local_nb_parameters); - *nb_iterators = OSL_max(*nb_iterators, local_nb_iterators); - *nb_scattdims = OSL_max(*nb_scattdims, local_nb_scattdims); - *nb_localdims = OSL_max(*nb_localdims, local_nb_localdims); - *array_id = OSL_max(*array_id, local_array_id); - statement = statement->next; - } -} - diff --git a/cloog-0.17.0/osl/source/strings.c b/cloog-0.17.0/osl/source/strings.c deleted file mode 100644 index 91c4990e13364e9c289059f695be4e9f00173b41..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/strings.c +++ /dev/null @@ -1,465 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** strings.c ** - **-----------------------------------------------------------------** - ** First version: 13/07/2011 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -# include -# include -# include -# include - -# include -# include -# include -# include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_strings_idump function: - * this function displays an array of strings into a file (file, possibly - * stdout) in a way that trends to be understandable. It includes an - * indentation level (level) in order to work with others - * idump functions. - * \param[in] file The file where the information has to be printed. - * \param[in] strings The array of strings that has to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_strings_idump(FILE * file, osl_strings_p strings, int level) { - int i, nb_strings; - - for (i = 0; i < level; i++) - fprintf(file, "|\t"); - - if (strings != NULL) { - nb_strings = osl_strings_size(strings); - fprintf(file, "+-- osl_strings_t:"); - for (i = 0; i < nb_strings; i++) - fprintf(file, " %s", strings->string[i]); - fprintf(file, "\n"); - } - else - fprintf(file, "+-- NULL strings\n"); - - // A blank line. - for (i = 0; i <= level; i++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_strings_dump function: - * this function prints the content of an osl_strings_t structure - * (*strings) into a file (file, possibly stdout). - * \param[in] file The file where the information has to be printed. - * \param[in] strings The strings structure which has to be printed. - */ -void osl_strings_dump(FILE * file, osl_strings_p strings) { - osl_strings_idump(file, strings, 0); -} - - -/** - * osl_strings_sprint function: - * this function prints the content of an osl_strings_t structure - * (*strings) into a string (returned) in the OpenScop textual format. - * \param[in] strings The strings structure which has to be printed. - * \return A string containing the OpenScop dump of the strings structure. - */ -char * osl_strings_sprint(osl_strings_p strings) { - int i; - int high_water_mark = OSL_MAX_STRING; - char * string = NULL; - char buffer[OSL_MAX_STRING]; - - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - string[0] = '\0'; - - if (strings != NULL) { - for (i = 0; i < osl_strings_size(strings); i++) { - sprintf(buffer, "%s", strings->string[i]); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - if (i < osl_strings_size(strings) - 1) - osl_util_safe_strcat(&string, " ", &high_water_mark); - } - sprintf(buffer, "\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - else { - sprintf(buffer, "# NULL strings\n"); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - } - - return string; -} - - -/** - * osl_strings_print function: - * this function prints the content of an osl_strings_t structure - * (*body) into a file (file, possibly stdout) in the OpenScop format. - * \param[in] file File where informations are printed. - * \param[in] strings The strings whose information has to be printed. - */ -void osl_strings_print(FILE * file, osl_strings_p strings) { - char * string; - - string = osl_strings_sprint(strings); - if (string != NULL) { - fprintf(file, "%s", string); - free(string); - } -} - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_strings_sread function: - * this function reads a strings structure from a string complying to the - * OpenScop textual format and returns a pointer to this strings structure. - * The input string should only contain the list of strings this function - * has to read (comments at the end of the line are accepted). The input - * parameter is updated to the position in the input string this function - * reach right after reading the strings structure. - * \param[in,out] input The input string where to find a strings structure. - * Updated to the position after what has been read. - * \return A pointer to the strings structure that has been read. - */ -osl_strings_p osl_strings_sread(char ** input) { - char tmp[OSL_MAX_STRING]; - char * s; - char ** string = NULL; - int nb_strings; - int i, count; - osl_strings_p strings = NULL; - - // Skip blank/commented lines and spaces before the strings. - osl_util_sskip_blank_and_comments(input); - - // Count the actual number of strings. - nb_strings = 0; - s = *input; - while (1) { - for (count = 0; *s && !isspace(*s) && *s != '#'; count++) - s++; - - if (count != 0) - nb_strings++; - - if ((!*s) || (*s == '#') || (*s == '\n')) - break; - else - s++; - } - - if (nb_strings > 0) { - // Allocate the array of strings. Make it NULL-terminated. - OSL_malloc(string, char **, sizeof(char *) * (nb_strings + 1)); - string[nb_strings] = NULL; - - // Read the desired number of strings. - s = *input; - for (i = 0; i < nb_strings; i++) { - for (count = 0; *s && !isspace(*s) && *s != '#'; count++) - tmp[count] = *(s++); - tmp[count] = '\0'; - OSL_strdup(string[i], tmp); - if (*s != '#') - s++; - } - - // Update the input pointer to the end of the strings structure. - *input = s; - - // Build the strings structure - strings = osl_strings_malloc(); - strings->string = string; - } - - return strings; -} - - -/** - * osl_strings_read function. - * this function reads a strings structure from a file (possibly stdin) - * complying to the OpenScop textual format and returns a pointer to this - * structure. - * parameter nb_strings). - * \param[in] file The file where to read the strings structure. - * \return The strings structure that has been read. - */ -osl_strings_p osl_strings_read(FILE * file) { - char buffer[OSL_MAX_STRING], * start; - osl_strings_p strings; - - start = osl_util_skip_blank_and_comments(file, buffer); - strings = osl_strings_sread(&start); - - return strings; -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_strings_malloc function: - * This function allocates the memory space for an osl_strings_t - * structure and sets its fields with default values. Then it returns a - * pointer to the allocated space. - * \return A pointer to an empty strings structure with fields set to - * default values. - */ -osl_strings_p osl_strings_malloc() { - osl_strings_p strings; - - OSL_malloc(strings, osl_strings_p, sizeof(osl_strings_t)); - strings->string = NULL; - - return strings; -} - - -/** - * osl_strings_free function: - * this function frees the allocated memory for a strings data structure. - * \param[in] strings The strings structure we want to free. - */ -void osl_strings_free(osl_strings_p strings) { - int i; - - if (strings != NULL) { - if (strings->string != NULL) { - i = 0; - while(strings->string[i] != NULL) { - free(strings->string[i]); - i++; - } - free(strings->string); - } - free(strings); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_strings_clone function. - * this function builds and return a "hard copy" (not a pointer copy) of an - * strings structure provided as parameter. - * \param[in] strings The strings structure to clone. - * \return The clone of the strings structure. - */ -osl_strings_p osl_strings_clone(osl_strings_p strings) { - int i, nb_strings; - osl_strings_p clone = NULL; - - if (strings == NULL) - return NULL; - - clone = osl_strings_malloc(); - if ((nb_strings = osl_strings_size(strings)) == 0) - return clone; - - OSL_malloc(clone->string, char **, (nb_strings + 1) * sizeof(char *)); - clone->string[nb_strings] = NULL; - for (i = 0; i < nb_strings; i++) { - clone->string[i] = strdup(strings->string[i]); - if (clone->string[i] == NULL) - OSL_error("memory overflow"); - } - - return clone; -} - - -/** - * osl_strings_equal function: - * this function returns true if the two strings structures are the same - * (content-wise), false otherwise. - * \param[in] s1 The first strings structure. - * \param[in] s2 The second strings structure. - * \return 1 if s1 and s2 are the same (content-wise), 0 otherwise. - */ -int osl_strings_equal(osl_strings_p s1, osl_strings_p s2) { - int i, nb_s1; - - if (s1 == s2) - return 1; - - if (((s1 == NULL) && (s2 != NULL)) || - ((s1 != NULL) && (s2 == NULL)) || - ((nb_s1 = osl_strings_size(s1)) != osl_strings_size(s2))) - return 0; - - for (i = 0; i < nb_s1; i++) - if (strcmp(s1->string[i], s2->string[i]) != 0) - return 0; - - return 1; -} - - -/** - * osl_strings_size function: - * this function returns the number of elements in the NULL-terminated - * strings array of the strings structure. - * \param[in] strings The strings structure we need to know the size. - * \return The number of strings in the strings structure. - */ -int osl_strings_size(osl_strings_p strings) { - int size = 0; - - if ((strings != NULL) && (strings->string != NULL)) { - while (strings->string[size] != NULL) { - size++; - } - } - - return size; -} - - -/** - * osl_strings_encapsulate function: - * this function builds a new strings structure to encapsulate the string - * provided as a parameter (the reference to this string is used directly). - * \param[in] string The string to encapsulate in a strings structure. - * \return A new strings structure containing only the provided string. - */ -osl_strings_p osl_strings_encapsulate(char * string) { - osl_strings_p capsule = osl_strings_malloc(); - - OSL_malloc(capsule->string, char **, 2 * sizeof(char *)); - capsule->string[0] = string; - capsule->string[1] = NULL; - - return capsule; -} - - -/** - * osl_strings_interface function: - * this function creates an interface structure corresponding to the strings - * structure and returns it). - * \return An interface structure for the strings structure. - */ -osl_interface_p osl_strings_interface() { - osl_interface_p interface = osl_interface_malloc(); - - interface->URI = strdup(OSL_URI_STRINGS); - interface->idump = (osl_idump_f)osl_strings_idump; - interface->sprint = (osl_sprint_f)osl_strings_sprint; - interface->sread = (osl_sread_f)osl_strings_sread; - interface->malloc = (osl_malloc_f)osl_strings_malloc; - interface->free = (osl_free_f)osl_strings_free; - interface->clone = (osl_clone_f)osl_strings_clone; - interface->equal = (osl_equal_f)osl_strings_equal; - - return interface; -} - - -/** - * osl_strings_generate function: - * this function generates a new strings structure containing - * 'nb_strings' strings of the form "prefixXX" where XX goes from 1 to - * nb_strings. - * \param[in] prefix The prefix of the generated strings. - * \param[in] nb_strings The number of strings to generate. - * \return A new strings structure containing generated strings. - */ -osl_strings_p osl_strings_generate(char * prefix, int nb_strings) { - char ** strings = NULL; - char buff[strlen(prefix) + 16]; // TODO: better (log10(INT_MAX) ?) :-D. - int i; - osl_strings_p generated; - - if (nb_strings) { - OSL_malloc(strings, char **, sizeof(char *) * (nb_strings + 1)); - strings[nb_strings] = NULL; - for (i = 0; i < nb_strings; i++) { - sprintf(buff, "%s%d", prefix, i + 1); - strings[i] = strdup(buff); - if (strings[i] == NULL) - OSL_error("memory overflow"); - } - } - - generated = osl_strings_malloc(); - generated->string = strings; - return generated; -} diff --git a/cloog-0.17.0/osl/source/util.c b/cloog-0.17.0/osl/source/util.c deleted file mode 100644 index 950f5e8c95d2efb8316aa0544e8deb72cf6f2bf9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/util.c +++ /dev/null @@ -1,573 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** util.c ** - **-----------------------------------------------------------------** - ** First version: 08/10/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include -#include - -#include -#include - - -/*+*************************************************************************** - * Utility functions * - *****************************************************************************/ - - -/** - * osl_util_skip_blank_and_comments "file skip" function: - * this function reads the open file 'file' line by line and skips - * blank/comment lines and spaces. The first line where there is some - * useful information is stored at the address 'str' (the memory to - * store the line must be allocated before the call to this function - * and must be at least OSL_MAX_STRING * sizeof(char)). The pointer - * to the first useful information in this line is returned by the - * function. - * \param[in] file The (opened) file to read. - * \param[in] str Address of an allocated space to store the first line - * that contains useful information. - * \return The address of the the first useful digit in str. - */ -char * osl_util_skip_blank_and_comments(FILE * file, char * str) { - char * start; - - do { - start = fgets(str, OSL_MAX_STRING, file); - while ((start != NULL) && isspace(*start) && (*start != '\n')) - start++; - } - while (start != NULL && (*start == '#' || *start == '\n')); - - return start; -} - - -/** - * osl_util_sskip_blank_and_comments "string skip" function: - * this function updates the str pointer, which initialy points to a string, - * to the first character in this string which is not a space or a comment - * (comments start at '#' and end at '\n'), or to the end of string. - * \param[in,out] str Address of a string, updated to the address of - * the first non-space or comment character. - */ -void osl_util_sskip_blank_and_comments(char ** str) { - do { - // Skip spaces/blanc lines. - while (*str && **str && isspace(**str)) - (*str)++; - - // Skip the comment if any. - if (*str && **str && **str == '#') { - while (**str && **str != '\n') { - (*str)++; - } - } - } - while (*str && **str && **str == '\n'); -} - - -/** - * osl_util_read_int function: - * reads an int on the input 'file' or the input string 'str' depending on - * which one is not NULL (exactly one of them must not be NULL). - * \param[in] file The file where to read an int (if not NULL). - * \param[in,out] str The string where to read an int (if not NULL). This - * pointer is updated to reflect the read and points - * after the int in the input string. - * \return The int that has been read. - */ -int osl_util_read_int(FILE * file, char ** str) { - char s[OSL_MAX_STRING], * start; - int res; - int i = 0; - - if ((file != NULL && str != NULL) || (file == NULL && str == NULL)) - OSL_error("one and only one of the two parameters can be non-NULL"); - - if (file != NULL) { - // Parse from a file. - start = osl_util_skip_blank_and_comments(file, s); - if (sscanf(start, " %d", &res) != 1) - OSL_error("an int was expected"); - } - else { - // Parse from a string. - // Skip blank/commented lines. - osl_util_sskip_blank_and_comments(str); - - // Build the chain to analyze. - while (**str && !isspace(**str) && **str != '\n') - s[i++] = *((*str)++); - s[i] = '\0'; - if (sscanf(s, "%d", &res) != 1) - OSL_error("an int was expected"); - } - - return res; -} - - -/** - * osl_util_read_int internal function: - * reads a tag (the form of a tag with name "name" is \) on the input - * 'file' or the input string 'str' depending on which one is not NULL (exactly - * one of them must not be NULL). It returns the name of the tag (thus without - * the < and > as a string. Note that in the case of an ending tag, e.g., - * \, the slash is returned as a part of the name, e.g., /foo. - * \param[in] file The file where to read a tag (if not NULL). - * \param[in,out] str The string where to read a tag (if not NULL). This - * pointer is updated to reflect the read and points - * after the tag in the input string. - * \return The tag name that has been read. - */ -char * osl_util_read_tag(FILE * file, char ** str) { - char s[OSL_MAX_STRING], * start; - char * res; - int i = 0; - - if ((file != NULL && str != NULL) || (file == NULL && str == NULL)) - OSL_error("one and only one of the two parameters can be non-NULL"); - - // Skip blank/commented lines. - if (file != NULL) { - start = osl_util_skip_blank_and_comments(file, s); - str = &start; - } - else { - osl_util_sskip_blank_and_comments(str); - } - - // Pass the starting '<'. - if (**str != '<') - OSL_error("a \"<\" to start a tag was expected"); - (*str)++; - - // Read the tag. - OSL_malloc(res, char *, (OSL_MAX_STRING + 1) * sizeof(char)); - res[OSL_MAX_STRING] = '\0'; - - while (**str && **str != '>') { - if (((**str >= 'A') && (**str <= 'Z')) || - ((**str >= 'a') && (**str <= 'z')) || - ((**str == '/') && (i == 0)) || - (**str == '_')) { - res[i++] = *((*str)++); - res[i] = '\0'; - } - else { - OSL_error("illegal character in the tag name"); - } - } - - // Check we actually end up with a '>' and pass it. - if (**str != '>') - OSL_error("a \">\" to end a tag was expected"); - (*str)++; - - return res; -} - - -/** - * osl_util_read_uptotag function: - * this function reads a file up to a given tag (the tag is read) or the - * end of file. It puts everything it reads, except the tag, in a string - * which is returned. However ot returns NULL is the tag is not found. - * \param[in] file The file where to read the tail. - * \param[in] tag The tag which, when reached, stops the file reading. - * \return The string that has been read from the file. - */ -char * osl_util_read_uptotag(FILE * file, char * tag) { - int high_water_mark = OSL_MAX_STRING; - int nb_chars = 0; - int lentag = strlen(tag); - int tag_found = 0; - char * res; - - OSL_malloc(res, char *, high_water_mark * sizeof(char)); - - // - Copy everything to the res string. - while (!feof(file)) { - res[nb_chars] = fgetc(file); - nb_chars++; - - if ((nb_chars >= lentag) && - (!strncmp(&res[nb_chars - lentag], tag, lentag))) { - tag_found = 1; - break; - } - - if (nb_chars >= high_water_mark) { - high_water_mark += high_water_mark; - OSL_realloc(res, char *, high_water_mark * sizeof(char)); - } - } - - if (!tag_found) { - OSL_debug("tag was not found, end of file reached"); - free(res); - return NULL; - } - - // - 0-terminate the string. - OSL_realloc(res, char *, (nb_chars - strlen(tag) + 1) * sizeof(char)); - res[nb_chars - strlen(tag)] = '\0'; - - return res; -} - - -/** - * osl_util_read_uptoendtag function: - * this function reads a file up to a given end tag (this end tag is read) - * or the end of file. The name of the tag is provided as parameter (hence - * without the starting ""). It puts everything it reads - * in a string which is returned. - * \param[in] file The file where to read the tail. - * \param[in] name The name of the end tag to the file reading. - * \return The string that has been read from the file. - */ -char * osl_util_read_uptoendtag(FILE * file, char * name) { - char tag[strlen(name) + 4]; - - sprintf(tag, "", name); - return osl_util_read_uptotag(file, tag); -} - - -/** - * osl_util_tag_content function: - * this function returns a freshly allocated string containing the - * content, in the given string 'str', between the tag '\' and - * the tag '\'. If the tag '\' is not found, it returns NULL. - * \param[in] str The string where to find a given content. - * \param[in] name The name of the tag we are looking for. - * \return The string between '\' and '\' in 'str'. - */ -char * osl_util_tag_content(char * str, char * name) { - int i; - char * start; - char * stop; - char tag[strlen(name) + 3]; - char endtag[strlen(name) + 4]; - int size = 0; - int lentag; - char * res = NULL; - - sprintf(tag, "<%s>", name); - sprintf(endtag, "", name); - - if (str) { - start = str; - lentag = strlen(tag); - for (; start && *start && strncmp(start, tag, lentag); ++start) - continue; - - // The tag 'tag' was not found. - if (! *start) - return NULL; - start += lentag; - stop = start; - lentag = strlen(endtag); - for (size = 0; *stop && strncmp(stop, endtag, lentag); ++stop, ++size) - continue; - - // the tag 'endtag' was not found. - if (! *stop) - return NULL; - OSL_malloc(res, char *, (size + 1) * sizeof(char)); - - // Copy the chain between the two tags. - for (++start, i = 0; start != stop; ++start, ++i) - res[i] = *start; - res[i] = '\0'; - } - - return res; -} - - -/** - * osl_util_safe_strcat function: - * this function concatenates the string src to the string *dst - * and reallocates *dst if necessary. The current size of the - * *dst buffer must be *hwm (high water mark), if there is some - * reallocation, this value is updated. - * \param[in,out] dst pointer to the destination string (may be reallocated). - * \param[in] src string to concatenate to dst. - * \param[in,out] hwm pointer to the size of the *dst buffer (may be updated). - */ -void osl_util_safe_strcat(char ** dst, char * src, int * hwm) { - - while (strlen(*dst) + strlen(src) >= *hwm) { - *hwm += OSL_MAX_STRING; - OSL_realloc(*dst, char *, *hwm * sizeof(char)); - } - - strcat(*dst, src); -} - - -/** - * osl_util_get_precision function: - * this function returns the precision defined by the precision environment - * variable or the highest available precision if it is not defined. - * \return environment precision if defined or highest available precision. - */ -int osl_util_get_precision() { - int precision = OSL_PRECISION_DP; - char * precision_env; - -#ifdef OSL_GMP_IS_HERE - precision = OSL_PRECISION_MP; -#endif - - precision_env = getenv(OSL_PRECISION_ENV); - if (precision_env != NULL) { - if (!strcmp(precision_env, OSL_PRECISION_ENV_SP)) - precision = OSL_PRECISION_SP; - else if (!strcmp(precision_env, OSL_PRECISION_ENV_DP)) - precision = OSL_PRECISION_DP; - else if (!strcmp(precision_env, OSL_PRECISION_ENV_MP)) - precision = OSL_PRECISION_MP; - else - OSL_warning("bad precision environment value"); - } - - return precision; -} - - -/** - * osl_util_print_provided function: - * this function prints a "provided" boolean in a file (file, possibly stdout), - * with a comment title according to the OpenScop specification. - * \param[in] file File where the information has to be printed. - * \param[in] provided The provided boolean to print. - * \param[in] title A string to use as a title for the provided booblean. - */ -void osl_util_print_provided(FILE * file, int provided, char * title) { - if (provided) { - fprintf(file, "# %s provided\n", title); - fprintf(file, "1\n"); - } - else { - fprintf(file, "# %s not provided\n", title); - fprintf(file, "0\n\n"); - } -} - - -/** - * osl_util_identifier_is_here function: - * this function returns 1 if the input "identifier" is found at the - * "index" position in the "expression" input string, 0 otherwise. - * \param[in] expression The input expression. - * \param[in] identifier The identifier to look for. - * \param[in] index The position in the expression where to look. - * \return 1 if the identifier is found at the position in the expression. - */ -static -int osl_util_identifier_is_here(char * expression, char * identifier, - int index) { - // If there is no space enough to find the identifier: no. - if (strlen(identifier) + index > strlen(expression)) - return 0; - - // If there is a character before and it is in [A-Za-z0-9]: no. - if ((index > 0) && - (((expression[index - 1] >= 'A') && (expression[index - 1] <= 'Z')) || - ((expression[index - 1] >= 'a') && (expression[index - 1] <= 'z')) || - ((expression[index - 1] >= '0') && (expression[index - 1] <= '9')))) - return 0; - - // If there is a character after and it is in [A-Za-z0-9]: no. - if ((strlen(identifier) + index < strlen(expression)) && - (((expression[strlen(identifier) + index] >= 'A') && - (expression[strlen(identifier) + index] <= 'Z')) || - ((expression[strlen(identifier) + index] >= 'a') && - (expression[strlen(identifier) + index] <= 'z')) || - ((expression[strlen(identifier) + index] >= '0') && - (expression[strlen(identifier) + index] <= '9')))) - return 0; - - // If the identifier string is not here: no. - if (strncmp(expression + index, identifier, strlen(identifier))) - return 0; - - return 1; -} - - -/** - * osl_util_lazy_isolated_identifier function: - * this function returns 1 if the identifier at the "index" position in the - * "expression" is guaranteed not to need parenthesis around is we - * substitute it with anything. For instance the identifier "i" can be - * always substituted in "A[i]" with no need of parenthesis but not in - * "A[2*i]". This function is lazy in the sense that it just check obvious - * cases, not all of them. The identifier must already be at the indicated - * position, this function does not check that. - * \param[in] expression The input expression. - * \param[in] identifier The identifier to check. - * \param[in] index The position of the identifier in the expression. - * \return 1 if the identifier is isolated, 0 if unsure. - */ -static -int osl_util_lazy_isolated_identifier(char * expression, char * identifier, - int index) { - int look; - - // If the first non-space character before is not in [\[(,\+=]: no. - look = index - 1; - while (look >= 0) { - if (isspace(expression[look])) - look--; - else - break; - } - - if ((look >= 0) && - (expression[look] != '[') && - (expression[look] != '(') && - (expression[look] != '+') && - (expression[look] != '=') && - (expression[look] != ',')) - return 0; - - // If the first non-space character after is not in [\]),;\+]: no. - look = index + strlen(identifier); - while (look < strlen(expression)) { - if (isspace(expression[look])) - look++; - else - break; - } - - if ((look < strlen(expression)) && - (expression[look] != ']') && - (expression[look] != ')') && - (expression[look] != '+') && - (expression[look] != ',') && - (expression[look] != ';')) - return 0; - - return 1; -} - - -/** - * osl_util_identifier_substitution function: - * this function replaces some identifiers in an input expression string and - * returns the final string. The list of identifiers to replace are provided - * as an array of strings. They are replaced from the input string with the - * new substring "@i@" or "(@i@)" where i is the rank of the identifier in the - * array of identifiers. The parentheses are added when it is not obvious that - * the identifier can be replaced with an arbitrary expression without the - * need of parentheses. For instance, let us consider the input expression - * "C[i+j]+=A[2*i]*B[j];" and the array of strings {"i", "j"}: the resulting - * string would be "C[@0@+@1@]+=A[2*(@0@)]*B[@1@];". - * \param[in] expression The original expression. - * \param[in] identifiers NULL-terminated array of identifiers. - * \return A new string where the ith identifier is replaced by \@i\@. - */ -char * osl_util_identifier_substitution(char * expression, - char ** identifiers) { - int index, j, found; - int high_water_mark = OSL_MAX_STRING; - char buffer[OSL_MAX_STRING]; - char * string; - - OSL_malloc(string, char *, high_water_mark * sizeof(char)); - string[0] = '\0'; - - index = 0; - while (index < strlen(expression)) { - j = 0; - found = 0; - while (identifiers[j] != NULL) { - if (osl_util_identifier_is_here(expression, identifiers[j], index)) { - if (osl_util_lazy_isolated_identifier(expression,identifiers[j],index)) - sprintf(buffer, "@%d@", j); - else - sprintf(buffer, "(@%d@)", j); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - index += strlen(identifiers[j]); - found = 1; - break; - } - j++; - } - if (!found) { - sprintf(buffer, "%c", expression[index]); - osl_util_safe_strcat(&string, buffer, &high_water_mark); - index++; - } - } - - return string; -} - - - diff --git a/cloog-0.17.0/osl/source/vector.c b/cloog-0.17.0/osl/source/vector.c deleted file mode 100644 index b50c9633d25ee35090edd3cbfc47bc15fcd206ad..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/source/vector.c +++ /dev/null @@ -1,367 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** vector.c ** - **-----------------------------------------------------------------** - ** First version: 30/04/2008 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - - -#include -#include -#include - -#include -#include -#include -#include - - -/*+*************************************************************************** - * Structure display function * - *****************************************************************************/ - - -/** - * osl_vector_idump function: - * Displays a osl_vector_t structure (*vector) into a file (file, possibly - * stdout) in a way that trends to be understandable without falling in a deep - * depression or, for the lucky ones, getting a headache... It includes an - * indentation level (level) in order to work with others idump functions. - * \param[in] file File where informations are printed. - * \param[in] vector The vector whose information have to be printed. - * \param[in] level Number of spaces before printing, for each line. - */ -void osl_vector_idump(FILE * file, osl_vector_p vector, int level) { - int j; - - if (vector != NULL) { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file,"|\t"); - fprintf(file,"+-- osl_vector_t ("); - osl_int_dump_precision(file, vector->precision); - fprintf(file, ")\n"); - - for (j = 0; j <= level; j++) - fprintf(file,"|\t"); - fprintf(file,"%d\n", vector->size); - - // Display the vector. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - - fprintf(file, "[ "); - - for (j = 0; j < vector->size; j++) { - osl_int_print(file, vector->precision, vector->v, j); - fprintf(file, " "); - } - - fprintf(file, "]\n"); - } - else { - // Go to the right level. - for (j = 0; j < level; j++) - fprintf(file, "|\t"); - fprintf(file, "+-- NULL vector\n"); - } - - // The last line. - for (j = 0; j <= level; j++) - fprintf(file, "|\t"); - fprintf(file, "\n"); -} - - -/** - * osl_vector_dump function: - * This function prints the content of a osl_vector_t structure - * (*vector) into a file (file, possibly stdout). - * \param[in] file File where informations are printed. - * \param[in] vector The vector whose information have to be printed. - */ -void osl_vector_dump(FILE * file, osl_vector_p vector) { - osl_vector_idump(file, vector, 0); -} - - -/*+*************************************************************************** - * Memory allocation/deallocation function * - *****************************************************************************/ - - -/** - * osl_vector_pmalloc function: - * (precision malloc) this function allocates the memory space for an - * osl_vector_t structure and sets its fields with default values. Then - * it returns a pointer to the allocated space. - * \param[in] precision The precision of the vector entries. - * \param[in] size The number of entries of the vector to allocate. - * \return A pointer to the newly allocated osl_vector_t structure. - */ -osl_vector_p osl_vector_pmalloc(int precision, int size) { - osl_vector_p vector; - int i; - - OSL_malloc(vector, osl_vector_p, sizeof(osl_vector_t)); - vector->size = size; - vector->precision = precision; - if (size == 0) { - vector->v = NULL; - } - else { - OSL_malloc(vector->v, void *, size * osl_int_sizeof(precision)); - for (i = 0; i < size; i++) - osl_int_init_set_si(precision, vector->v, i, 0); - } - return vector; -} - - -/** - * osl_vector_malloc function: - * This function allocates the memory space for a osl_vector_t structure - * and sets its fields with default values. Then it returns a pointer to the - * allocated space. The precision of the vector elements corresponds to the - * precision environment variable or to the highest available precision if it - * is not defined. - * \param[in] size The number of entries of the vector to allocate. - * \return A pointer to the newly allocated osl_vector_t structure. - */ -osl_vector_p osl_vector_malloc(int size) { - int precision = osl_util_get_precision(); - return osl_vector_pmalloc(precision, size); -} - - -/** - * osl_vector_free function: - * This function frees the allocated memory for a osl_vector_t structure. - * \param[in] vector The pointer to the vector we want to free. - */ -void osl_vector_free(osl_vector_p vector) { - int i; - - if (vector != NULL) { - if (vector->v != NULL) { - for (i = 0; i < vector->size; i++) - osl_int_clear(vector->precision, vector->v, i); - - free(vector->v); - } - free(vector); - } -} - - -/*+*************************************************************************** - * Processing functions * - *****************************************************************************/ - - -/** - * osl_vector_add_scalar function: - * This function adds a scalar to the vector representation of an affine - * expression (this means we add the scalar only to the very last entry of the - * vector). It returns a new vector resulting from this addition. - * \param[in] vector The basis vector. - * \param[in] scalar The scalar to add to the vector. - * \return A pointer to a new vector, copy of the basis one plus the scalar. - */ -osl_vector_p osl_vector_add_scalar(osl_vector_p vector, int scalar) { - int i, precision, last; - osl_vector_p result; - - if ((vector == NULL) || (vector->size < 2)) - OSL_error("incompatible vector for addition"); - - precision = vector->precision; - last = vector->size - 1; - - result = osl_vector_pmalloc(precision, vector->size); - for (i = 0; i < vector->size; i++) - osl_int_assign(precision, result->v, i, vector->v, i); - osl_int_add_si(precision, result->v, last, vector->v, last, scalar); - - return result; -} - - -/** - * osl_vector_add function: - * This function achieves the addition of two vectors and returns the - * result as a new vector (the addition means the ith entry of the new vector - * is equal to the ith entry of vector v1 plus the ith entry of vector v2). - * \param v1 The first vector for the addition. - * \param v2 The second vector for the addition. - * \return A pointer to a new vector, corresponding to v1 + v2. - */ -osl_vector_p osl_vector_add(osl_vector_p v1, osl_vector_p v2) { - int i; - osl_vector_p v3; - - if ((v1 == NULL) || (v2 == NULL) || - (v1->size != v2->size) || (v1->precision != v2->precision)) - OSL_error("incompatible vectors for addition"); - - v3 = osl_vector_pmalloc(v1->precision, v1->size); - for (i = 0; i < v1->size; i++) - osl_int_add(v1->precision, v3->v, i, v1->v, i, v2->v, i); - - return v3; -} - - -/** - * osl_vector_sub function: - * This function achieves the subtraction of two vectors and returns the - * result as a new vector (the addition means the ith entry of the new vector - * is equal to the ith entry of vector v1 minus the ith entry of vector v2). - * \param v1 The first vector for the subtraction. - * \param v2 The second vector for the subtraction (result is v1-v2). - * \return A pointer to a new vector, corresponding to v1 - v2. - */ -osl_vector_p osl_vector_sub(osl_vector_p v1, osl_vector_p v2) { - int i; - osl_vector_p v3; - - if ((v1 == NULL) || (v2 == NULL) || - (v1->size != v2->size) || (v1->precision != v2->precision)) - OSL_error("incompatible vectors for subtraction"); - - v3 = osl_vector_pmalloc(v1->precision, v1->size); - for (i = 0; i < v1->size; i++) - osl_int_sub(v1->precision, v3->v, i, v1->v, i, v2->v, i); - - return v3; -} - - -/** - * osl_vector_tag_inequality function: - * This function tags a vector representation of a contraint as being an - * inequality >=0. This means in the PolyLib format, to set to 1 the very - * first entry of the vector. It modifies directly the vector provided as - * an argument. - * \param vector The vector to be tagged. - */ -void osl_vector_tag_inequality(osl_vector_p vector) { - if ((vector == NULL) || (vector->size < 1)) - OSL_error("vector cannot be tagged"); - osl_int_set_si(vector->precision, vector->v, 0, 1); -} - - -/** - * osl_vector_tag_equality function: - * This function tags a vector representation of a contraint as being an - * equality ==0. This means in the PolyLib format, to set to 0 the very - * first entry of the vector. It modifies directly the vector provided as - * an argument. - * \param vector The vector to be tagged. - */ -void osl_vector_tag_equality(osl_vector_p vector) { - if ((vector == NULL) || (vector->size < 1)) - OSL_error("vector cannot be tagged"); - osl_int_set_si(vector->precision, vector->v, 0, 0); -} - - -/** - * osl_vector_equal function: - * this function returns true if the two vectors are the same, false - * otherwise. - * \param v1 The first vector. - * \param v2 The second vector. - * \return 1 if v1 and v2 are the same (content-wise), 0 otherwise. - */ -int osl_vector_equal(osl_vector_p v1, osl_vector_p v2) { - int i; - - if (v1 == v2) - return 1; - - if ((v1->size != v2->size) || (v1->precision != v2->precision)) - return 0; - - for (i = 0; i < v1->size; i++) - if (osl_int_ne(v1->precision, v1->v, i, v2->v, i)) - return 0; - - return 1; -} - - -/** - * osl_vector_mul_scalar function: - * this function returns a new vector corresponding to the one provided - * as parameter with each entry multiplied by a scalar. - * \param v The vector to multiply. - * \param scalar The scalar coefficient. - * \return A new vector corresponding to scalar * v. - */ -osl_vector_p osl_vector_mul_scalar(osl_vector_p v, int scalar) { - int i; - osl_vector_p result = osl_vector_pmalloc(v->precision, v->size); - - for(i = 0; i < v->size; i++) - osl_int_mul_si(v->precision, result->v, i, v->v, i, scalar); - - return result; -} - diff --git a/cloog-0.17.0/osl/tests/Makefile.am b/cloog-0.17.0/osl/tests/Makefile.am deleted file mode 100644 index eca952e5be6a33794fa602908ae7730ee1dccb4f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/Makefile.am +++ /dev/null @@ -1,100 +0,0 @@ -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 01/10/2010 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in - -############################################################################# - -noinst_PROGRAMS = osl_test - -TESTS = osl_test - -osl_test_CPPFLAGS = -I$(top_srcdir)/include -static - -osl_test_LDFLAGS = -L$(top_srcdir)/source - -osl_test_LDADD = -losl - -osl_test_SOURCES = \ - osl_test.c \ - polynom.scop \ - test_empty_statement.scop \ - test_just_access.scop \ - test_just_body.scop \ - test_just_domain.scop \ - test_just_scattering.scop \ - test_matmult.scop \ - test_no_statement.scop \ - test_scop_list.scop - - diff --git a/cloog-0.17.0/osl/tests/Makefile.in b/cloog-0.17.0/osl/tests/Makefile.in deleted file mode 100644 index e8e879867b9490a8fe2e1fe8e079af14ac9584d6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/Makefile.in +++ /dev/null @@ -1,826 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /*+------------------------------------------------------------------** -# ** OpenScop Library ** -# **------------------------------------------------------------------** -# ** makefile.am ** -# **------------------------------------------------------------------** -# ** First version: 01/10/2010 ** -# **------------------------------------------------------------------** -# -# -# *************************************************************************** -# * OpenScop: Structures and formats for polyhedral tools to talk together * -# *************************************************************************** -# * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * -# * / / / // // // // / / / // // / / // / /|,_, * -# * / / / // // // // / / / // // / / // / / / /\ * -# * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * -# * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * -# * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * -# * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * -# * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * -# * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * -# * | I | | | | e | | | | | | | | | | | | | \ \ \ * -# * | T | | | | | | | | | | | | | | | | | \ \ \ * -# * | E | | | | | | | | | | | | | | | | | \ \ \ * -# * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * -# * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * -# * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * -# * * -# * Copyright (C) 2008 University Paris-Sud 11 and INRIA * -# * * -# * (3-clause BSD license) * -# * Redistribution and use in source and binary forms, with or without * -# * modification, are permitted provided that the following conditions * -# * are met: * -# * * -# * 1. Redistributions of source code must retain the above copyright * -# * notice, this list of conditions and the following disclaimer. * -# * 2. Redistributions in binary form must reproduce the above copyright * -# * notice, this list of conditions and the following disclaimer in the * -# * documentation and/or other materials provided with the distribution. * -# * 3. The name of the author may not be used to endorse or promote * -# * products derived from this software without specific prior written * -# * permission. * -# * * -# * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * -# * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * -# * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -# * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * -# * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * -# * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * -# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * -# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * -# * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * -# * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * -# * POSSIBILITY OF SUCH DAMAGE. * -# * * -# * OpenScop Library, a library to manipulate OpenScop formats and data * -# * structures. Written by: * -# * Cedric Bastoul and * -# * Louis-Noel Pouchet * -# * * -# ***************************************************************************/ -# -# Makefile.am (or makefile if generated) of the OpenScop Library. -# Makefile.am is not a makefile, you must run the 'autogen.sh' THEN the -# configure shellscript to generate the Makefile thanks to this file. - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = osl_test$(EXEEXT) -TESTS = osl_test$(EXEEXT) -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/autoconf/libtool.m4 \ - $(top_srcdir)/autoconf/ltoptions.m4 \ - $(top_srcdir)/autoconf/ltsugar.m4 \ - $(top_srcdir)/autoconf/ltversion.m4 \ - $(top_srcdir)/autoconf/lt~obsolete.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_osl_test_OBJECTS = osl_test-osl_test.$(OBJEXT) -osl_test_OBJECTS = $(am_osl_test_OBJECTS) -osl_test_DEPENDENCIES = -osl_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(osl_test_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(osl_test_SOURCES) -DIST_SOURCES = $(osl_test_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_aux_dir = @ac_aux_dir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -############################################################################# -SUBDIRS = - -############################################################################# -MAINTAINERCLEANFILES = Makefile.in -osl_test_CPPFLAGS = -I$(top_srcdir)/include -static -osl_test_LDFLAGS = -L$(top_srcdir)/source -osl_test_LDADD = -losl -osl_test_SOURCES = \ - osl_test.c \ - polynom.scop \ - test_empty_statement.scop \ - test_just_access.scop \ - test_just_body.scop \ - test_just_domain.scop \ - test_just_scattering.scop \ - test_matmult.scop \ - test_no_statement.scop \ - test_scop_list.scop - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -osl_test$(EXEEXT): $(osl_test_OBJECTS) $(osl_test_DEPENDENCIES) - @rm -f osl_test$(EXEEXT) - $(osl_test_LINK) $(osl_test_OBJECTS) $(osl_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osl_test-osl_test.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -osl_test-osl_test.o: osl_test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(osl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT osl_test-osl_test.o -MD -MP -MF $(DEPDIR)/osl_test-osl_test.Tpo -c -o osl_test-osl_test.o `test -f 'osl_test.c' || echo '$(srcdir)/'`osl_test.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/osl_test-osl_test.Tpo $(DEPDIR)/osl_test-osl_test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='osl_test.c' object='osl_test-osl_test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(osl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o osl_test-osl_test.o `test -f 'osl_test.c' || echo '$(srcdir)/'`osl_test.c - -osl_test-osl_test.obj: osl_test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(osl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT osl_test-osl_test.obj -MD -MP -MF $(DEPDIR)/osl_test-osl_test.Tpo -c -o osl_test-osl_test.obj `if test -f 'osl_test.c'; then $(CYGPATH_W) 'osl_test.c'; else $(CYGPATH_W) '$(srcdir)/osl_test.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/osl_test-osl_test.Tpo $(DEPDIR)/osl_test-osl_test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='osl_test.c' object='osl_test-osl_test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(osl_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o osl_test-osl_test.obj `if test -f 'osl_test.c'; then $(CYGPATH_W) 'osl_test.c'; else $(CYGPATH_W) '$(srcdir)/osl_test.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-recursive -all-am: Makefile $(PROGRAMS) -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-TESTS check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags ctags-recursive \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/osl/tests/osl_test.c b/cloog-0.17.0/osl/tests/osl_test.c deleted file mode 100644 index 3cfbd0816885589f8f9acdfa42a7be1bb3d7b9ac..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/osl_test.c +++ /dev/null @@ -1,247 +0,0 @@ - - /*+-----------------------------------------------------------------** - ** OpenScop Library ** - **-----------------------------------------------------------------** - ** test.c ** - **-----------------------------------------------------------------** - ** First version: 01/10/2010 ** - **-----------------------------------------------------------------** - - - ***************************************************************************** - * OpenScop: Structures and formats for polyhedral tools to talk together * - ***************************************************************************** - * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * - * / / / // // // // / / / // // / / // / /|,_, * - * / / / // // // // / / / // // / / // / / / /\ * - * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * - * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * - * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * - * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * - * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * - * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * - * | I | | | | e | | | | | | | | | | | | | \ \ \ * - * | T | | | | | | | | | | | | | | | | | \ \ \ * - * | E | | | | | | | | | | | | | | | | | \ \ \ * - * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * - * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * - * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * - * * - * Copyright (C) 2008 University Paris-Sud 11 and INRIA * - * * - * (3-clause BSD license) * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright notice, * - * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * - * OpenScop Library, a library to manipulate OpenScop formats and data * - * structures. Written by: * - * Cedric Bastoul and * - * Louis-Noel Pouchet * - * * - *****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -//#define FORK // Comment that if you want only one process - // (best for debugging with valgrind but bad - // for make check since any error will - // stop the job). - -#define TEST_DIR "." // Directory to scan for OpenScop files -#define TEST_SUFFIX ".scop" // Suffix of OpenScop files - - -/** - * test_file function - * This function tests an onpenscop file. A test has six steps: - * 1. read the file to raise the data up to OpenScop data structures, - * 2. clone the data structures, - * 3. compare the clone and the original one, - * 4. dump the data structures to a new OpenScop file, - * 5. read the generated file, - * 6. compare the data structures. - * If everything went well, the data structure of the two scops are the same. - * \param input_name The name of the input file. - * \param verbose Verbose option (1 to set, 0 not to set). - * \return 1 if the test is successful, 0 otherwise. - */ -int test_file(char * input_name, int verbose) { - int success = 0; - int failure = 0; - int cloning = 0; - int dumping = 0; - int equal = 0; - char * output_name; - FILE * input_file, * output_file; - osl_scop_p input_scop; - osl_scop_p output_scop; - osl_scop_p cloned_scop; - - printf("\nTesting file %s... \n", input_name); - - // PART I. Raise from file. - input_file = fopen(input_name, "r"); - if (input_file == NULL) { - fflush(stdout); - fprintf(stderr, "\nError: unable to open file %s\n", input_name); - exit(2); - } - input_scop = osl_scop_read(input_file); - fclose(input_file); - - // PART II. Clone and test. - cloned_scop = osl_scop_clone(input_scop); - // Compare the two scops. - if (cloning = osl_scop_equal(input_scop, cloned_scop)) - printf("- cloning succeeded\n"); - else - printf("- cloning failed\n"); - - // PART III. Dump to file and test. - output_name = tmpnam(NULL); - output_file = fopen(output_name, "w"); - //osl_scop_dump(stdout, input_scop); - //osl_scop_print(stdout, input_scop); - osl_scop_print(output_file, input_scop); - fclose(output_file); - - // Raise the generated file to data structures. - output_file = fopen(output_name, "r"); - output_scop = osl_scop_read(output_file); - //osl_scop_dump(stdout, output_scop); - fclose(output_file); - - if (verbose) { - printf("\n\n*************************************************\n\n"); - osl_scop_dump(stdout, output_scop); - osl_scop_print(stdout, output_scop); - printf("\n*************************************************\n\n"); - } - - // Compare the two scops. - if (dumping = osl_scop_equal(input_scop, output_scop)) - printf("- dumping succeeded\n"); - else - printf("- dumping failed\n"); - - // PART IV. Report. - if (equal = (cloning + dumping > 0) ? 1 : 0) - printf("Success :-)\n"); - else - printf("Failure :-(\n"); - - // Save the planet. - osl_scop_free(input_scop); - osl_scop_free(cloned_scop); - osl_scop_free(output_scop); - remove(output_name); - - return equal; -} - - -/** - * OpenScop test program. - * Usage: osl_test [-v] [osl_file] - * This program scans a directory for openscop files and test each of them. - * Optionnally the user can provide a file name to check this file only. A - * verbose option is also provided to output more information during tests. - */ -int main(int argc, char * argv[]) { - int total = 0; // Total number of tests. - int success = 0; // Number of successes. - int verbose = 0; // 1 if the verbose option is set, 0 otherwise. - int dirtest = 1; // 1 if we check a whole directory, 0 for a single file. - int fileidx = 0; // Index of the file to check in argv (0 if none). - int d_namlen; - int suffix_length; - DIR * dir; - struct dirent * dp; - - // Process the command line information - if (((argc > 1) && (!strcmp(argv[1], "-v"))) || - ((argc > 2) && (!strcmp(argv[2], "-v")))) - verbose = 1; - - if ((argc > 3) || ((argc == 3) && (!verbose))) { - fprintf(stderr, "usage: osl_test [-v] [osl_file]\n"); - exit(1); - } - - if ((argc - verbose) > 1) { - dirtest = 0; - fileidx = (!strcmp(argv[1], "-v")) ? 2 : 1; - } - - // Proceed with the test(s), either directory or single file - if (dirtest) { - suffix_length = strlen(TEST_SUFFIX); - - // For each file in the directory to check... - dir = opendir(TEST_DIR); - while ((dp = readdir(dir)) != NULL) { - d_namlen = strlen(dp->d_name); - // If the file has the convenient suffix... - if ((d_namlen > suffix_length) && - (!strcmp(dp->d_name+(d_namlen-suffix_length), TEST_SUFFIX))) { - // Test it ! -#ifdef FORK - int report; - if (!fork()) - exit(test_file(dp->d_name, verbose) ? 0 : 1); - wait(&report); - if (!WEXITSTATUS(report)) - success++; -#else - success += test_file(dp->d_name, verbose); -#endif - total++; - } - } - closedir(dir); - } - else { - success = test_file(argv[fileidx], verbose); - total++; - } - - printf("\n +-----------------------+\n"); - printf(" | OpenScop Test Summary |\n"); - printf(" |-----------------------|\n"); - printf(" | total %4d |\n", total); - printf(" | success(es) %4d |\n", success); - printf(" | failure(s) %4d |\n", total - success); - printf(" +-----------------------+\n\n"); - - // Return 0 if all tests were successful, 1 otherwise. - if (total - success) - return 1; - else - return 0; -} diff --git a/cloog-0.17.0/osl/tests/polynom.scop b/cloog-0.17.0/osl/tests/polynom.scop deleted file mode 100644 index 26db5d8151189055257652f30f7b36fd53f661d1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/polynom.scop +++ /dev/null @@ -1,134 +0,0 @@ -# -# <| -# A -# /.\ -# <| [""M# -# A | # Clan McCloog Castle -# /.\ [""M# [Generated by the OpenScop Library 0.3.0 64 bits] -# [""M# | # U"U#U -# | # | # \ .:/ -# | # | #___| # -# | "--' .-" -# |"-"-"-"-"-#-#-## -# | # ## ###### -# \ .::::'/ -# \ ::::'/ -# :8a| # # ## -# ::88a ### -# ::::888a 8a ##::. -# ::::::888a88a[]:::: -# :::::::::SUNDOGa8a::::. .. -# :::::8::::888:Y8888:::::::::... -#::':::88::::888::Y88a______________________________________________________ -#:: ::::88a::::88a:Y88a __---__-- __ -#' .: ::Y88a:::::8a:Y88a __----_-- -------_-__ -# :' ::::8P::::::::::88aa. _ _- -- --_ --- __ --- __-- -#.:: :::::::::::::::::::Y88as88a...s88aa. - - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -1 3 0 0 0 1 -# e/i N 1 - 1 1 3 - -# Parameter names are provided -1 -# Parameter names - -N - - -# Number of statements -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -6 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -2 -4 5 2 0 0 1 -# e/i i j N 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 -5 5 2 0 0 1 -# e/i i j N 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -5 10 5 2 0 1 -# e/i s1 s2 s3 s4 s5 i j N 1 - 0 -1 0 0 0 0 0 0 0 0 ## 0 - 0 0 -1 0 0 0 1 0 0 0 ## i - 0 0 0 -1 0 0 0 0 0 0 ## 0 - 0 0 0 0 -1 0 0 1 0 0 ## j - 0 0 0 0 0 -1 0 0 0 0 ## 0 - -# ---------------------------------------------- 1.3 Access -READ -2 7 2 2 0 1 -# e/i Arr [1] i j N 1 - 0 -1 0 0 0 0 1 ## C[i+j] - 0 0 -1 1 1 0 0 ## - -READ -2 7 2 2 0 1 -# e/i Arr [1] i j N 1 - 0 -1 0 0 0 0 2 ## A[i] - 0 0 -1 1 0 0 0 ## - -READ -2 7 2 2 0 1 -# e/i Arr [1] i j N 1 - 0 -1 0 0 0 0 3 ## B[j] - 0 0 -1 0 1 0 0 ## - -WRITE -2 7 2 2 0 1 -# e/i Arr [1] i j N 1 - 0 -1 0 0 0 0 1 ## C[i+j] - 0 0 -1 1 1 0 0 ## - -# ---------------------------------------------- 1.4 Body -# Statement body is provided -1 - - -# Number of original iterators -2 -# Original iterator names -i j -# Statement body -C[i+j]+=A[i]*B[j]; - - -# =============================================== Options - -3 -1 C -2 A -3 B - - - -hello, world - -HELLO WORLD I SAID - - - - diff --git a/cloog-0.17.0/osl/tests/test_empty_statement.scop b/cloog-0.17.0/osl/tests/test_empty_statement.scop deleted file mode 100644 index a7aba606c89a80b8504ffff450b810dbb1f738cf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_empty_statement.scop +++ /dev/null @@ -1,35 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -0 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - diff --git a/cloog-0.17.0/osl/tests/test_just_access.scop b/cloog-0.17.0/osl/tests/test_just_access.scop deleted file mode 100644 index 999a8eb43776c3ad5e537b658a818e6fc884ebd6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_just_access.scop +++ /dev/null @@ -1,38 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -1 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -WRITE -1 3 1 0 0 0 -# e/i Arr 1 - 0 -1 1 - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - diff --git a/cloog-0.17.0/osl/tests/test_just_body.scop b/cloog-0.17.0/osl/tests/test_just_body.scop deleted file mode 100644 index 6829a3c4b5f2c797a07e5d03fe94c5667b351772..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_just_body.scop +++ /dev/null @@ -1,41 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -0 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is provided -1 - -# Number of original iterators -0 -# Statement body -foo = bar; - - - - diff --git a/cloog-0.17.0/osl/tests/test_just_domain.scop b/cloog-0.17.0/osl/tests/test_just_domain.scop deleted file mode 100644 index 88625350c35364cf536cf5f73dcd1e46d28d4b32..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_just_domain.scop +++ /dev/null @@ -1,37 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -1 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -0 2 0 0 0 0 - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - - diff --git a/cloog-0.17.0/osl/tests/test_just_scattering.scop b/cloog-0.17.0/osl/tests/test_just_scattering.scop deleted file mode 100644 index 15c9b87a2b63998d0f67fbe772b4dab44ddd81f7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_just_scattering.scop +++ /dev/null @@ -1,36 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -1 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -0 2 0 0 0 0 - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - diff --git a/cloog-0.17.0/osl/tests/test_matmult.scop b/cloog-0.17.0/osl/tests/test_matmult.scop deleted file mode 100644 index 596c7d222fe853cc31b07940c173f8706f609447..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_matmult.scop +++ /dev/null @@ -1,136 +0,0 @@ -# Matmul example, relation representation - - - -# =============================================== Global -# Backend Language -C - -# Context -CONTEXT -1 3 0 0 0 1 - 1 1 -1 ## N-1 >= 0 - -# Parameter names are provided -1 -# Parameter names - -N - - -# Number of statements -2 - -# =============================================== Statement 1 -# Number of relations describing the statement -3 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -4 5 2 0 0 1 -# e/i i j N 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -5 10 5 2 0 1 -# e/i s1 s2 s3 s4 s5 i j N 1 - 0 -1 0 0 0 0 0 0 0 0 ## s1 = 0 - 0 0 -1 0 0 0 1 0 0 0 ## s2 = i - 0 0 0 -1 0 0 0 0 0 0 ## s3 = 0 - 0 0 0 0 -1 0 0 1 0 0 ## s4 = j - 0 0 0 0 0 -1 0 0 0 0 ## s5 = 0 - -# ---------------------------------------------- 1.3 Access -WRITE -3 8 3 2 0 1 -# e/i Arr [1] [2] i j N 1 - 0 -1 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 ## [j] - -# ---------------------------------------------- 1.4 Body -# Statement body is provided -1 - -# Number of original iterators -2 -# Original iterator names -i j -# Statement body -C[i][j] = 0.0; - - -# =============================================== Statement 2 -# Number of relations describing the statement -6 - -# ---------------------------------------------- 2.1 Domain -DOMAIN -6 6 3 0 0 1 -# e/i i j k N 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 -1 ## -j+N-1 >= 0 - 1 0 0 1 0 0 ## k >= 0 - 1 0 0 -1 1 -1 ## -k+N-1 >= 0 - -# ---------------------------------------------- 2.2 Scattering -SCATTERING -7 13 7 3 0 1 -# e/i s1 s2 s3 s4 s5 s6 s7 i j k N 1 - 0 -1 0 0 0 0 0 0 0 0 0 0 0 ## s1 = 0 - 0 0 -1 0 0 0 0 0 1 0 0 0 0 ## s2 = i - 0 0 0 -1 0 0 0 0 0 0 0 0 0 ## s3 = 0 - 0 0 0 0 -1 0 0 0 0 1 0 0 0 ## s4 = j - 0 0 0 0 0 -1 0 0 0 0 0 0 1 ## s5 = 1 - 0 0 0 0 0 0 -1 0 0 0 1 0 0 ## s6 = k - 0 0 0 0 0 0 0 -1 0 0 0 0 0 ## s7 = 0 - -# ---------------------------------------------- 2.3 Access -WRITE -3 9 3 3 0 1 -# e/i Arr [1] [2] i j k N 1 - 0 -1 0 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 0 ## [j] - -READ -3 9 3 3 0 1 -# e/i Arr [1] [2] i j k N 1 - 0 -1 0 0 0 0 0 0 1 ## C - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 1 0 0 0 ## [j] - -READ -3 9 3 3 0 1 -# e/i Arr [1] [2] i j k N 1 - 0 -1 0 0 0 0 0 0 2 ## A - 0 0 -1 0 1 0 0 0 0 ## [i] - 0 0 0 -1 0 0 1 0 0 ## [k] - -READ -3 9 3 3 0 1 -# e/i Arr [1] [2] i j k N 1 - 0 -1 0 0 0 0 0 0 3 ## B - 0 0 -1 0 0 0 1 0 0 ## [k] - 0 0 0 -1 0 1 0 0 0 ## [j] - -# ---------------------------------------------- 2.4 Body -# Statement body is provided -1 - -# Number of original iterators -3 -# Original iterator names -i j k -# Statement body -C[i][j] = C[i][j] + A[i][k] * B[k][j]; - - - - diff --git a/cloog-0.17.0/osl/tests/test_no_statement.scop b/cloog-0.17.0/osl/tests/test_no_statement.scop deleted file mode 100644 index 5ef85d7cf3156c50bedc744330d90e8aee873c7a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_no_statement.scop +++ /dev/null @@ -1,18 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# No statement -0 - - - diff --git a/cloog-0.17.0/osl/tests/test_scop_list.scop b/cloog-0.17.0/osl/tests/test_scop_list.scop deleted file mode 100644 index d24e74fd17058e09928f6e473141f51102b9cb5e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/osl/tests/test_scop_list.scop +++ /dev/null @@ -1,70 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -0 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -0 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - diff --git a/cloog-0.17.0/source/block.c b/cloog-0.17.0/source/block.c deleted file mode 100644 index 08fe8074650eebd12c0ba60425dbf8fa38fab124..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/block.c +++ /dev/null @@ -1,404 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** block.c ** - **-------------------------------------------------------------------** - ** First version: june 11th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - -/** - * These functions and global variables are devoted to memory leaks hunting: we - * want to know at each moment how many CloogBlock structures had been allocated - * (cloog_block_allocated) and how many had been freed (cloog_block_freed). - * Each time a CloogBlock structure is allocated, a call to the function - * cloog_block_leak_up() must be carried out, and respectively - * cloog_block_leak_down() when a CloogBlock structure is freed. The special - * variable cloog_block_max gives the maximal number of CloogBlock structures - * simultaneously alive (i.e. allocated and non-freed) in memory. - * - June 11th 2005: first version. - */ - - -static void cloog_block_leak_up(CloogState *state) -{ - state->block_allocated++; - if ((state->block_allocated - state->block_freed) > state->block_max) - state->block_max = state->block_allocated - state->block_freed; -} - - -static void cloog_block_leak_down(CloogState *state) -{ - state->block_freed++; -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_domain_print_structure : - * this function is a human-friendly way to display the CloogDomain data - * structure, it includes an indentation level (level) in order to work with - * others print_structure functions. - * - June 16th 2005: first version. - */ -void cloog_block_print_structure(FILE * file, CloogBlock * block, int level) -{ int i ; - - /* Go to the right level. */ - for (i=0; istatement,level+1) ; - - /* A blank line. */ - for (i=0; inb_scaldims == 0) - fprintf(file,"No scalar dimensions\n") ; - else - { fprintf(file,"Scalar dimensions (%d):",block->nb_scaldims) ; - for (i = 0; i < block->nb_scaldims; i++) { - fprintf(file, " "); - cloog_int_print(file, block->scaldims[i]); - } - fprintf(file,"\n") ; - } - - /* A blank line. */ - for (i=0; idepth) ; - - /* A blank line. */ - for (i=0; iblock,1) ; - blocklist = blocklist->next ; - i++ ; - } -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_block_free function: - * This function frees the allocated memory for a CloogStatement structure. - * - June 11th 2005: first version. - * - June 30th 2005: scaldims field management. - */ -void cloog_block_free(CloogBlock * block) -{ int i ; - - if (block != NULL) - { block->references -- ; - - if (block->references == 0) { - cloog_block_leak_down(block->state); - if (block->scaldims != NULL) - { for (i=0;inb_scaldims;i++) - cloog_int_clear(block->scaldims[i]); - - free(block->scaldims) ; - } - if (block->statement) - cloog_statement_free(block->statement); - free(block) ; - } - } -} - - -/** - * cloog_block_list_free function: - * This function frees the allocated memory for a CloogBlockList structure. - * - June 11th 2005: first version. - */ -void cloog_block_list_free(CloogBlockList * blocklist) -{ CloogBlockList * temp ; - - while (blocklist != NULL) - { temp = blocklist->next ; - cloog_block_free(blocklist->block) ; - free(blocklist) ; - blocklist = temp ; - } -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - -/** - * cloog_block_malloc function: - * This function allocates the memory space for a CloogBlock structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogBlock *cloog_block_malloc(CloogState *state) -{ CloogBlock * block ; - - /* Memory allocation for the CloogBlock structure. */ - block = (CloogBlock *)malloc(sizeof(CloogBlock)) ; - if (block == NULL) - cloog_die("memory overflow.\n"); - cloog_block_leak_up(state); - - /* We set the various fields with default values. */ - block->state = state; - block->statement = NULL ; - block->nb_scaldims = 0 ; - block->scaldims = NULL ; - block->depth = 0 ; - block->references = 1 ; - block->usr = NULL; - - return block ; -} - - -/** - * cloog_block_alloc function: - * This function allocates the memory space for a CloogBlock structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. The two parameters nb_scaldims and scaldims are for internal - * service, put to respectively 0 and NULL if you don't know what they are - * useful for ! - * - statement is the statement list of the block, - * - scattering is the scattering function for the block (NULL if unsure !), - * - nb_scaldims is the number of scalar dimensions (0 if unsure !), - * - scaldims is the array with the scalar dimensions values (NULL if unsure !), - * - depth is the original block depth (the number of outer loops). - ** - * - June 11th 2005: first version. - * - June 30th 2005: addition of the nb_scaldims and scaldims parameters. - * - November 21th 2005: use of cloog_block_malloc. - */ -CloogBlock *cloog_block_alloc(CloogStatement *statement, int nb_scaldims, - cloog_int_t *scaldims, int depth) -{ CloogBlock * block ; - - /* Block allocation. */ - block = cloog_block_malloc(statement->state); - - block->statement = statement ; - block->nb_scaldims = nb_scaldims ; - block->scaldims = scaldims ; - block->depth = depth ; - block->references = 1 ; - - return block ; -} - - -/** - * cloog_block_list_malloc function: - * This function allocates the memory space for a CloogBlockList structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogBlockList * cloog_block_list_malloc() -{ CloogBlockList * blocklist ; - - /* Memory allocation for the CloogBlock structure. */ - blocklist = (CloogBlockList *)malloc(sizeof(CloogBlockList)) ; - if (blocklist == NULL) - cloog_die("memory overflow.\n"); - - /* We set the various fields with default values. */ - blocklist->block = NULL ; - blocklist->next = NULL ; - - return blocklist ; -} - - -/** - * cloog_block_list_alloc function: - * This function allocates the memory space for a CloogBlockList structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - block is the block element of the list node, - ** - * - June 11th 2005: first version. - * - November 21th 2005: use of cloog_block_list_malloc. - */ -CloogBlockList * cloog_block_list_alloc(CloogBlock * block) -{ CloogBlockList * blocklist ; - - /* Block list node allocation. */ - blocklist = cloog_block_list_malloc() ; - - blocklist->block = block ; - blocklist->block->references ++ ; /* The block has a new reference to it. */ - blocklist->next = NULL ; - - return blocklist ; -} - - -/** - * cloog_block_copy function: - * This function returns a copy of a CloogBlock structure 'block'. To save - * memory this is not a memory copy but we increment a counter of active - * references inside the structure, then return a pointer to that structure. - */ -CloogBlock * cloog_block_copy(CloogBlock * block) -{ if (block == NULL) - return NULL ; - - block->references ++ ; - return block ; -} - - -/** - * cloog_block_merge function: - * this function adds at the end of the statement list of the block 'block', - * the statement list of the block 'merged'. Then the CloogBlock structure - * of 'merged' is freed (obviously not its statement list that is now - * included in 'block'). - * - June 11th 2005: first version. - */ -void cloog_block_merge(CloogBlock * block, CloogBlock * merged) -{ CloogStatement * statement ; - - if ((block == NULL) || (merged == NULL)) - return ; - - if (block->statement != NULL) - { statement = block->statement ; - - while (statement->next != NULL) - statement = statement->next ; - - statement->next = merged->statement ; - } - else - block->statement = merged->statement ; - - merged->statement = NULL; - cloog_block_free(merged); -} - - - - - - - - - - diff --git a/cloog-0.17.0/source/clast.c b/cloog-0.17.0/source/clast.c deleted file mode 100644 index 0b67532e5fa2435ee27dd088e49afa72da0ccc1a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/clast.c +++ /dev/null @@ -1,1894 +0,0 @@ -#include -#include -#include -#include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -/** - * CloogInfos structure: - * this structure contains all the informations necessary for pretty printing, - * they come from the original CloogProgram structure (language, names), from - * genereral options (options) or are built only for pretty printing (stride). - * This structure is mainly there to reduce the number of function parameters, - * since most pprint.c functions need most of its field. - */ -struct clooginfos { - CloogState *state; /**< State. */ - CloogStride **stride; - int stride_level; /**< Number of valid entries in stride array. */ - int nb_scattdims ; /**< Scattering dimension number. */ - int * scaldims ; /**< Boolean array saying whether a given - * scattering dimension is scalar or not. - */ - CloogNames * names ; /**< Names of iterators and parameters. */ - CloogOptions * options ; /**< Options on CLooG's behaviour. */ - CloogEqualities *equal; /**< Matrix of equalities. */ -} ; - -typedef struct clooginfos CloogInfos ; - -static int clast_expr_cmp(struct clast_expr *e1, struct clast_expr *e2); -static int clast_term_cmp(struct clast_term *t1, struct clast_term *t2); -static int clast_binary_cmp(struct clast_binary *b1, struct clast_binary *b2); -static int clast_reduction_cmp(struct clast_reduction *r1, - struct clast_reduction *r2); - -static struct clast_expr *clast_expr_copy(struct clast_expr *e); - -static int clast_equal_add(CloogEqualities *equal, - CloogConstraintSet *constraints, - int level, CloogConstraint *constraint, - CloogInfos *infos); - -static struct clast_stmt *clast_equal(int level, CloogInfos *infos); -static struct clast_expr *clast_minmax(CloogConstraintSet *constraints, - int level, int max, int guard, - int lower_bound, int no_earlier, - CloogInfos *infos); -static void insert_guard(CloogConstraintSet *constraints, int level, - struct clast_stmt ***next, CloogInfos *infos); -static int insert_modulo_guard(CloogConstraint *upper, - CloogConstraint *lower, int level, - struct clast_stmt ***next, CloogInfos *infos); -static int insert_equation(CloogDomain *domain, CloogConstraint *upper, - CloogConstraint *lower, int level, - struct clast_stmt ***next, CloogInfos *infos); -static int insert_for(CloogDomain *domain, CloogConstraintSet *constraints, - int level, int otl, struct clast_stmt ***next, - CloogInfos *infos); -static void insert_block(CloogDomain *domain, CloogBlock *block, int level, - struct clast_stmt ***next, CloogInfos *infos); -static void insert_loop(CloogLoop * loop, int level, - struct clast_stmt ***next, CloogInfos *infos); - - -struct clast_name *new_clast_name(const char *name) -{ - struct clast_name *n = malloc(sizeof(struct clast_name)); - n->expr.type = clast_expr_name; - n->name = name; - return n; -} - -struct clast_term *new_clast_term(cloog_int_t c, struct clast_expr *v) -{ - struct clast_term *t = malloc(sizeof(struct clast_term)); - t->expr.type = clast_expr_term; - cloog_int_init(t->val); - cloog_int_set(t->val, c); - t->var = v; - return t; -} - -struct clast_binary *new_clast_binary(enum clast_bin_type t, - struct clast_expr *lhs, cloog_int_t rhs) -{ - struct clast_binary *b = malloc(sizeof(struct clast_binary)); - b->expr.type = clast_expr_bin; - b->type = t; - b->LHS = lhs; - cloog_int_init(b->RHS); - cloog_int_set(b->RHS, rhs); - return b; -} - -struct clast_reduction *new_clast_reduction(enum clast_red_type t, int n) -{ - int i; - struct clast_reduction *r; - r = malloc(sizeof(struct clast_reduction)+(n-1)*sizeof(struct clast_expr *)); - r->expr.type = clast_expr_red; - r->type = t; - r->n = n; - for (i = 0; i < n; ++i) - r->elts[i] = NULL; - return r; -} - -static void free_clast_root(struct clast_stmt *s); - -const struct clast_stmt_op stmt_root = { free_clast_root }; - -static void free_clast_root(struct clast_stmt *s) -{ - struct clast_root *r = (struct clast_root *)s; - assert(CLAST_STMT_IS_A(s, stmt_root)); - cloog_names_free(r->names); - free(r); -} - -struct clast_root *new_clast_root(CloogNames *names) -{ - struct clast_root *r = malloc(sizeof(struct clast_root)); - r->stmt.op = &stmt_root; - r->stmt.next = NULL; - r->names = cloog_names_copy(names); - return r; -} - -static void free_clast_assignment(struct clast_stmt *s); - -const struct clast_stmt_op stmt_ass = { free_clast_assignment }; - -static void free_clast_assignment(struct clast_stmt *s) -{ - struct clast_assignment *a = (struct clast_assignment *)s; - assert(CLAST_STMT_IS_A(s, stmt_ass)); - free_clast_expr(a->RHS); - free(a); -} - -struct clast_assignment *new_clast_assignment(const char *lhs, - struct clast_expr *rhs) -{ - struct clast_assignment *a = malloc(sizeof(struct clast_assignment)); - a->stmt.op = &stmt_ass; - a->stmt.next = NULL; - a->LHS = lhs; - a->RHS = rhs; - return a; -} - -static void free_clast_user_stmt(struct clast_stmt *s); - -const struct clast_stmt_op stmt_user = { free_clast_user_stmt }; - -static void free_clast_user_stmt(struct clast_stmt *s) -{ - struct clast_user_stmt *u = (struct clast_user_stmt *)s; - assert(CLAST_STMT_IS_A(s, stmt_user)); - cloog_domain_free(u->domain); - cloog_statement_free(u->statement); - cloog_clast_free(u->substitutions); - free(u); -} - -struct clast_user_stmt *new_clast_user_stmt(CloogDomain *domain, - CloogStatement *stmt, struct clast_stmt *subs) -{ - struct clast_user_stmt *u = malloc(sizeof(struct clast_user_stmt)); - u->stmt.op = &stmt_user; - u->stmt.next = NULL; - u->domain = cloog_domain_copy(domain); - u->statement = cloog_statement_copy(stmt); - u->substitutions = subs; - return u; -} - -static void free_clast_block(struct clast_stmt *b); - -const struct clast_stmt_op stmt_block = { free_clast_block }; - -static void free_clast_block(struct clast_stmt *s) -{ - struct clast_block *b = (struct clast_block *)s; - assert(CLAST_STMT_IS_A(s, stmt_block)); - cloog_clast_free(b->body); - free(b); -} - -struct clast_block *new_clast_block() -{ - struct clast_block *b = malloc(sizeof(struct clast_block)); - b->stmt.op = &stmt_block; - b->stmt.next = NULL; - b->body = NULL; - return b; -} - -static void free_clast_for(struct clast_stmt *s); - -const struct clast_stmt_op stmt_for = { free_clast_for }; - -static void free_clast_for(struct clast_stmt *s) -{ - struct clast_for *f = (struct clast_for *)s; - assert(CLAST_STMT_IS_A(s, stmt_for)); - cloog_domain_free(f->domain); - free_clast_expr(f->LB); - free_clast_expr(f->UB); - cloog_int_clear(f->stride); - cloog_clast_free(f->body); - free(f); -} - -struct clast_for *new_clast_for(CloogDomain *domain, const char *it, - struct clast_expr *LB, struct clast_expr *UB, - CloogStride *stride) -{ - struct clast_for *f = malloc(sizeof(struct clast_for)); - f->stmt.op = &stmt_for; - f->stmt.next = NULL; - f->domain = cloog_domain_copy(domain); - f->iterator = it; - f->LB = LB; - f->UB = UB; - f->body = NULL; - cloog_int_init(f->stride); - if (stride) - cloog_int_set(f->stride, stride->stride); - else - cloog_int_set_si(f->stride, 1); - return f; -} - -static void free_clast_guard(struct clast_stmt *s); - -const struct clast_stmt_op stmt_guard = { free_clast_guard }; - -static void free_clast_guard(struct clast_stmt *s) -{ - int i; - struct clast_guard *g = (struct clast_guard *)s; - assert(CLAST_STMT_IS_A(s, stmt_guard)); - cloog_clast_free(g->then); - for (i = 0; i < g->n; ++i) { - free_clast_expr(g->eq[i].LHS); - free_clast_expr(g->eq[i].RHS); - } - free(g); -} - -struct clast_guard *new_clast_guard(int n) -{ - int i; - struct clast_guard *g = malloc(sizeof(struct clast_guard) + - (n-1) * sizeof(struct clast_equation)); - g->stmt.op = &stmt_guard; - g->stmt.next = NULL; - g->then = NULL; - g->n = n; - for (i = 0; i < n; ++i) { - g->eq[i].LHS = NULL; - g->eq[i].RHS = NULL; - } - return g; -} - -void free_clast_name(struct clast_name *n) -{ - free(n); -} - -void free_clast_term(struct clast_term *t) -{ - cloog_int_clear(t->val); - free_clast_expr(t->var); - free(t); -} - -void free_clast_binary(struct clast_binary *b) -{ - cloog_int_clear(b->RHS); - free_clast_expr(b->LHS); - free(b); -} - -void free_clast_reduction(struct clast_reduction *r) -{ - int i; - for (i = 0; i < r->n; ++i) - free_clast_expr(r->elts[i]); - free(r); -} - -void free_clast_expr(struct clast_expr *e) -{ - if (!e) - return; - switch (e->type) { - case clast_expr_name: - free_clast_name((struct clast_name*) e); - break; - case clast_expr_term: - free_clast_term((struct clast_term*) e); - break; - case clast_expr_red: - free_clast_reduction((struct clast_reduction*) e); - break; - case clast_expr_bin: - free_clast_binary((struct clast_binary*) e); - break; - default: - assert(0); - } -} - -void free_clast_stmt(struct clast_stmt *s) -{ - assert(s->op); - assert(s->op->free); - s->op->free(s); -} - -void cloog_clast_free(struct clast_stmt *s) -{ - struct clast_stmt *next; - while (s) { - next = s->next; - free_clast_stmt(s); - s = next; - } -} - -static int clast_name_cmp(struct clast_name *n1, struct clast_name *n2) -{ - return n1->name == n2->name ? 0 : strcmp(n1->name, n2->name); -} - -static int clast_term_cmp(struct clast_term *t1, struct clast_term *t2) -{ - int c; - if (!t1->var && t2->var) - return -1; - if (t1->var && !t2->var) - return 1; - c = clast_expr_cmp(t1->var, t2->var); - if (c) - return c; - return cloog_int_cmp(t1->val, t2->val); -} - -static int clast_binary_cmp(struct clast_binary *b1, struct clast_binary *b2) -{ - int c; - - if (b1->type != b2->type) - return b1->type - b2->type; - if ((c = cloog_int_cmp(b1->RHS, b2->RHS))) - return c; - return clast_expr_cmp(b1->LHS, b2->LHS); -} - -static int clast_reduction_cmp(struct clast_reduction *r1, struct clast_reduction *r2) -{ - int i; - int c; - - if (r1->n == 1 && r2->n == 1) - return clast_expr_cmp(r1->elts[0], r2->elts[0]); - if (r1->type != r2->type) - return r1->type - r2->type; - if (r1->n != r2->n) - return r1->n - r2->n; - for (i = 0; i < r1->n; ++i) - if ((c = clast_expr_cmp(r1->elts[i], r2->elts[i]))) - return c; - return 0; -} - -static int clast_expr_cmp(struct clast_expr *e1, struct clast_expr *e2) -{ - if (!e1 && !e2) - return 0; - if (!e1) - return -1; - if (!e2) - return 1; - if (e1->type != e2->type) - return e1->type - e2->type; - switch (e1->type) { - case clast_expr_name: - return clast_name_cmp((struct clast_name*) e1, - (struct clast_name*) e2); - case clast_expr_term: - return clast_term_cmp((struct clast_term*) e1, - (struct clast_term*) e2); - case clast_expr_bin: - return clast_binary_cmp((struct clast_binary*) e1, - (struct clast_binary*) e2); - case clast_expr_red: - return clast_reduction_cmp((struct clast_reduction*) e1, - (struct clast_reduction*) e2); - default: - assert(0); - } -} - -int clast_expr_equal(struct clast_expr *e1, struct clast_expr *e2) -{ - return clast_expr_cmp(e1, e2) == 0; -} - -/** - * Return 1 is both expressions are constant terms and e1 is bigger than e2. - */ -int clast_expr_is_bigger_constant(struct clast_expr *e1, struct clast_expr *e2) -{ - struct clast_term *t1, *t2; - struct clast_reduction *r; - - if (!e1 || !e2) - return 0; - if (e1->type == clast_expr_red) { - r = (struct clast_reduction *)e1; - return r->n == 1 && clast_expr_is_bigger_constant(r->elts[0], e2); - } - if (e2->type == clast_expr_red) { - r = (struct clast_reduction *)e2; - return r->n == 1 && clast_expr_is_bigger_constant(e1, r->elts[0]); - } - if (e1->type != clast_expr_term || e2->type != clast_expr_term) - return 0; - t1 = (struct clast_term *)e1; - t2 = (struct clast_term *)e2; - if (t1->var || t2->var) - return 0; - return cloog_int_gt(t1->val, t2->val); -} - -static int qsort_expr_cmp(const void *p1, const void *p2) -{ - return clast_expr_cmp(*(struct clast_expr **)p1, *(struct clast_expr **)p2); -} - -static void clast_reduction_sort(struct clast_reduction *r) -{ - qsort(&r->elts[0], r->n, sizeof(struct clast_expr *), qsort_expr_cmp); -} - -static int qsort_eq_cmp(const void *p1, const void *p2) -{ - struct clast_equation *eq1 = (struct clast_equation *)p1; - struct clast_equation *eq2 = (struct clast_equation *)p2; - int cmp; - - cmp = clast_expr_cmp(eq1->LHS, eq2->LHS); - if (cmp) - return cmp; - - cmp = clast_expr_cmp(eq1->RHS, eq2->RHS); - if (cmp) - return cmp; - - return eq1->sign - eq2->sign; -} - -/** - * Sort equations in a clast_guard. - */ -static void clast_guard_sort(struct clast_guard *g) -{ - qsort(&g->eq[0], g->n, sizeof(struct clast_equation), qsort_eq_cmp); -} - - -/** - * Construct a (deep) copy of an expression clast. - */ -static struct clast_expr *clast_expr_copy(struct clast_expr *e) -{ - if (!e) - return NULL; - switch (e->type) { - case clast_expr_name: { - struct clast_name* n = (struct clast_name*) e; - return &new_clast_name(n->name)->expr; - } - case clast_expr_term: { - struct clast_term* t = (struct clast_term*) e; - return &new_clast_term(t->val, clast_expr_copy(t->var))->expr; - } - case clast_expr_red: { - int i; - struct clast_reduction *r = (struct clast_reduction*) e; - struct clast_reduction *r2 = new_clast_reduction(r->type, r->n); - for (i = 0; i < r->n; ++i) - r2->elts[i] = clast_expr_copy(r->elts[i]); - return &r2->expr; - } - case clast_expr_bin: { - struct clast_binary *b = (struct clast_binary*) e; - return &new_clast_binary(b->type, clast_expr_copy(b->LHS), b->RHS)->expr; - } - default: - assert(0); - } -} - - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ - - -/** - * clast_equal_allow function: - * This function checks whether the options allow us to spread the equality or - * not. It returns 1 if so, 0 otherwise. - * - equal is the matrix of equalities, - * - level is the column number in equal of the element which is 'equal to', - * - line is the line number in equal of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - ** - * - October 27th 2005: first version (extracted from old pprint_equal_add). - */ -static int clast_equal_allow(CloogEqualities *equal, int level, int line, - CloogInfos *infos) -{ - if (level < infos->options->fsp) - return 0 ; - - if ((cloog_equal_type(equal, level) == EQTYPE_EXAFFINE) && - !infos->options->esp) - return 0 ; - - return 1 ; -} - - -/** - * clast_equal_add function: - * This function updates the row (level-1) of the equality matrix (equal) with - * the row that corresponds to the row (line) of the matrix (matrix). It returns - * 1 if the row can be updated, 0 otherwise. - * - equal is the matrix of equalities, - * - matrix is the matrix of constraints, - * - level is the column number in matrix of the element which is 'equal to', - * - line is the line number in matrix of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - */ -static int clast_equal_add(CloogEqualities *equal, - CloogConstraintSet *constraints, - int level, CloogConstraint *constraint, - CloogInfos *infos) -{ - cloog_equal_add(equal, constraints, level, constraint, - infos->names->nb_parameters); - - return clast_equal_allow(equal, level, level-1, infos); -} - - - -/** - * clast_equal function: - * This function prints the substitution data of a statement into a clast_stmt. - * Using this function instead of pprint_equal is useful for generating - * a compilable pseudo-code by using preprocessor macro for each statement. - * By opposition to pprint_equal, the result is less human-readable. For - * instance this function will print (i,i+3,k,3) where pprint_equal would - * return (j=i+3,l=3). - * - level is the number of loops enclosing the statement, - * - the infos structure gives the user all options on code printing and more. - ** - * - March 12th 2004: first version. - * - November 21th 2005: (debug) now works well with GMP version. - */ -static struct clast_stmt *clast_equal(int level, CloogInfos *infos) -{ - int i ; - struct clast_expr *e; - struct clast_stmt *a = NULL; - struct clast_stmt **next = &a; - CloogEqualities *equal = infos->equal; - CloogConstraint *equal_constraint; - - for (i=infos->names->nb_scattering;inames); - cloog_constraint_release(equal_constraint); - } else { - e = &new_clast_term(infos->state->one, &new_clast_name( - cloog_names_name_at_level(infos->names, i+1))->expr)->expr; - } - *next = &new_clast_assignment(NULL, e)->stmt; - next = &(*next)->next; - } - - return a; -} - - -/** - * clast_bound_from_constraint function: - * This function returns a clast_expr containing the printing of the - * 'right part' of a constraint according to an element. - * For instance, for the constraint -3*i + 2*j - M >=0 and the element j, - * we have j >= (3*i + M)/2. As we are looking for integral solutions, this - * function should return 'ceild(3*i+M,2)'. - * - matrix is the polyhedron containing all the constraints, - * - line_num is the line number in domain of the constraint we want to print, - * - level is the column number in domain of the element we want to use, - * - names structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 2nd 2001: first version. - * - June 27th 2003: 64 bits version ready. - */ -struct clast_expr *clast_bound_from_constraint(CloogConstraint *constraint, - int level, CloogNames *names) -{ - int i, sign, nb_elts=0, len; - cloog_int_t *line, numerator, denominator, temp, division; - struct clast_expr *e = NULL; - struct cloog_vec *line_vector; - - len = cloog_constraint_total_dimension(constraint) + 2; - line_vector = cloog_vec_alloc(len); - line = line_vector->p; - cloog_constraint_copy_coefficients(constraint, line+1); - cloog_int_init(temp); - cloog_int_init(numerator); - cloog_int_init(denominator); - - if (!cloog_int_is_zero(line[level])) { - struct clast_reduction *r; - /* Maybe we need to invert signs in such a way that the element sign is>0.*/ - sign = -cloog_int_sgn(line[level]); - - for (i = 1, nb_elts = 0; i <= len - 1; ++i) - if (i != level && !cloog_int_is_zero(line[i])) - nb_elts++; - r = new_clast_reduction(clast_red_sum, nb_elts); - nb_elts = 0; - - /* First, we have to print the iterators and the parameters. */ - for (i = 1; i <= len - 2; i++) { - struct clast_expr *v; - - if (i == level || cloog_int_is_zero(line[i])) - continue; - - v = cloog_constraint_variable_expr(constraint, i, names); - - if (sign == -1) - cloog_int_neg(temp,line[i]); - else - cloog_int_set(temp,line[i]); - - r->elts[nb_elts++] = &new_clast_term(temp, v)->expr; - } - - if (sign == -1) { - cloog_int_neg(numerator, line[len - 1]); - cloog_int_set(denominator, line[level]); - } - else { - cloog_int_set(numerator, line[len - 1]); - cloog_int_neg(denominator, line[level]); - } - - /* Finally, the constant, and the final printing. */ - if (nb_elts) { - if (!cloog_int_is_zero(numerator)) - r->elts[nb_elts++] = &new_clast_term(numerator, NULL)->expr; - - if (!cloog_int_is_one(line[level]) && !cloog_int_is_neg_one(line[level])) - { if (!cloog_constraint_is_equality(constraint)) - { if (cloog_int_is_pos(line[level])) - e = &new_clast_binary(clast_bin_cdiv, &r->expr, denominator)->expr; - else - e = &new_clast_binary(clast_bin_fdiv, &r->expr, denominator)->expr; - } else - e = &new_clast_binary(clast_bin_div, &r->expr, denominator)->expr; - } - else - e = &r->expr; - } else { - free_clast_reduction(r); - if (cloog_int_is_zero(numerator)) - e = &new_clast_term(numerator, NULL)->expr; - else - { if (!cloog_int_is_one(denominator)) - { if (!cloog_constraint_is_equality(constraint)) { /* useful? */ - if (cloog_int_is_divisible_by(numerator, denominator)) { - cloog_int_divexact(temp, numerator, denominator); - e = &new_clast_term(temp, NULL)->expr; - } - else { - cloog_int_init(division); - cloog_int_tdiv_q(division, numerator, denominator); - if (cloog_int_is_neg(numerator)) { - if (cloog_int_is_pos(line[level])) { - /* nb<0 need max */ - e = &new_clast_term(division, NULL)->expr; - } else { - /* nb<0 need min */ - cloog_int_sub_ui(temp, division, 1); - e = &new_clast_term(temp, NULL)->expr; - } - } - else - { if (cloog_int_is_pos(line[level])) - { /* nb>0 need max */ - cloog_int_add_ui(temp, division, 1); - e = &new_clast_term(temp, NULL)->expr; - } - else - /* nb>0 need min */ - e = &new_clast_term(division, NULL)->expr; - } - cloog_int_clear(division); - } - } - else - e = &new_clast_binary(clast_bin_div, - &new_clast_term(numerator, NULL)->expr, - denominator)->expr; - } - else - e = &new_clast_term(numerator, NULL)->expr; - } - } - } - - cloog_vec_free(line_vector); - - cloog_int_clear(temp); - cloog_int_clear(numerator); - cloog_int_clear(denominator); - - return e; -} - - -/* Temporary structure for communication between clast_minmax and - * its cloog_constraint_set_foreach_constraint callback functions. - */ -struct clast_minmax_data { - int level; - int max; - int guard; - int lower_bound; - int no_earlier; - CloogInfos *infos; - int n; - struct clast_reduction *r; -}; - - -/* Should constraint "c" be considered by clast_minmax? - * - * If d->no_earlier is set, then the constraint may not involve - * any earlier variables. - */ -static int valid_bound(CloogConstraint *c, struct clast_minmax_data *d) -{ - int i; - - if (d->max && !cloog_constraint_is_lower_bound(c, d->level - 1)) - return 0; - if (!d->max && !cloog_constraint_is_upper_bound(c, d->level - 1)) - return 0; - if (cloog_constraint_is_equality(c)) - return 0; - if (d->guard && cloog_constraint_involves(c, d->guard - 1)) - return 0; - - if (d->no_earlier) - for (i = 0; i < d->level - 1; ++i) - if (cloog_constraint_involves(c, i)) - return 0; - - return 1; -} - - -/* Increment n for each bound that should be considered by clast_minmax. - */ -static int count_bounds(CloogConstraint *c, void *user) -{ - struct clast_minmax_data *d = (struct clast_minmax_data *) user; - - if (!valid_bound(c, d)) - return 0; - - d->n++; - - return 0; -} - - -/* Update the given lower bound based on stride information, - * for those cases where the stride offset is represented by - * a constraint. - * Note that cloog_loop_stride may have already performed a - * similar update of the lower bounds, but the updated lower - * bounds may have been eliminated because they are redundant - * by definition. On the other hand, performing the update - * on an already updated constraint is an identity operation - * and is therefore harmless. - */ -static CloogConstraint *update_lower_bound_c(CloogConstraint *c, int level, - CloogStride *stride) -{ - if (!stride->constraint) - return c; - return cloog_constraint_stride_lower_bound(c, level, stride); -} - - -/* Update the given lower bound based on stride information. - * If the stride offset is represented by a constraint, - * then we have already performed the update in update_lower_bound_c. - * Otherwise, the original lower bound is known to be a constant. - * If the bound has already been updated and it just happens - * to be a constant, then this function performs an identity - * operation on the constant. - */ -static void update_lower_bound(struct clast_expr *expr, int level, - CloogStride *stride) -{ - struct clast_term *t; - if (stride->constraint) - return; - if (expr->type != clast_expr_term) - return; - t = (struct clast_term *)expr; - if (t->var) - return; - cloog_int_sub(t->val, t->val, stride->offset); - cloog_int_cdiv_q(t->val, t->val, stride->stride); - cloog_int_mul(t->val, t->val, stride->stride); - cloog_int_add(t->val, t->val, stride->offset); -} - - -/* Add all relevant bounds to r->elts and update lower bounds - * based on stride information. - */ -static int collect_bounds(CloogConstraint *c, void *user) -{ - struct clast_minmax_data *d = (struct clast_minmax_data *) user; - - if (!valid_bound(c, d)) - return 0; - - c = cloog_constraint_copy(c); - - if (d->lower_bound && d->infos->stride[d->level - 1]) - c = update_lower_bound_c(c, d->level, d->infos->stride[d->level - 1]); - - d->r->elts[d->n] = clast_bound_from_constraint(c, d->level, - d->infos->names); - if (d->lower_bound && d->infos->stride[d->level - 1]) { - update_lower_bound(d->r->elts[d->n], d->level, - d->infos->stride[d->level - 1]); - } - - cloog_constraint_release(c); - - d->n++; - - return 0; -} - - -/** - * clast_minmax function: - * This function returns a clast_expr containing the printing of a minimum or a - * maximum of the 'right parts' of all constraints according to an element. - * For instance consider the constraints: - * -3*i +2*j -M >= 0 - * 2*i +j >= 0 - * -i -j +2*M >= 0 - * if we are looking for the minimum for the element j, the function should - * return 'max(ceild(3*i+M,2),-2*i)'. - * - constraints is the constraints, - * - level is the column number in domain of the element we want to use, - * - max is a boolean set to 1 if we are looking for a maximum, 0 for a minimum, - * - guard is set to 0 if there is no guard, and set to the level of the element - * with a guard otherwise (then the function gives the max or the min only - * for the constraint where the guarded coefficient is 0), - * - lower is set to 1 if the maximum is to be used a lower bound on a loop - * - no_earlier is set if no constraints should be used that involve - * earlier dimensions, - * - the infos structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 2nd 2001: first version. - */ -static struct clast_expr *clast_minmax(CloogConstraintSet *constraints, - int level, int max, int guard, - int lower_bound, int no_earlier, - CloogInfos *infos) -{ - struct clast_minmax_data data = { level, max, guard, lower_bound, - no_earlier, infos }; - - data.n = 0; - - cloog_constraint_set_foreach_constraint(constraints, count_bounds, &data); - - if (!data.n) - return NULL; - data.r = new_clast_reduction(max ? clast_red_max : clast_red_min, data.n); - - data.n = 0; - cloog_constraint_set_foreach_constraint(constraints, collect_bounds, &data); - - clast_reduction_sort(data.r); - return &data.r->expr; -} - - -/** - * Insert modulo guards defined by existentially quantified dimensions, - * not involving the given level. - * - * This function is called from within insert_guard. - * Any constraint used in constructing a modulo guard is removed - * from the constraint set to avoid insert_guard - * adding a duplicate (pair of) constraint(s). - * - * Return the updated CloogConstraintSet. - */ -static CloogConstraintSet *insert_extra_modulo_guards( - CloogConstraintSet *constraints, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int i; - int nb_iter; - int total_dim; - CloogConstraint *upper, *lower; - - total_dim = cloog_constraint_set_total_dimension(constraints); - nb_iter = cloog_constraint_set_n_iterators(constraints, - infos->names->nb_parameters); - - for (i = total_dim - infos->names->nb_parameters; i >= nb_iter + 1; i--) { - if (cloog_constraint_is_valid(upper = - cloog_constraint_set_defining_equality(constraints, i))) { - if (!level || (nb_iter < level) || - !cloog_constraint_involves(upper, level-1)) { - insert_modulo_guard(upper, - cloog_constraint_invalid(), i, next, infos); - constraints = cloog_constraint_set_drop_constraint(constraints, - upper); - } - cloog_constraint_release(upper); - } else if (cloog_constraint_is_valid(upper = - cloog_constraint_set_defining_inequalities(constraints, - i, &lower, infos->names->nb_parameters))) { - if (!level || (nb_iter < level) || - !cloog_constraint_involves(upper, level-1)) { - insert_modulo_guard(upper, lower, i, next, infos); - constraints = cloog_constraint_set_drop_constraint(constraints, - upper); - constraints = cloog_constraint_set_drop_constraint(constraints, - lower); - } - cloog_constraint_release(upper); - cloog_constraint_release(lower); - } - } - - return constraints; -} - - -/* Temporary structure for communication between insert_guard and - * its cloog_constraint_set_foreach_constraint callback function. - */ -struct clast_guard_data { - int level; - CloogInfos *infos; - int n; - int i; - int nb_iter; - CloogConstraintSet *copy; - struct clast_guard *g; - - int min; - int max; -}; - - -static int guard_count_bounds(CloogConstraint *c, void *user) -{ - struct clast_guard_data *d = (struct clast_guard_data *) user; - - d->n++; - - return 0; -} - - -/* Insert a guard, if necesessary, for constraint j. - * - * If the constraint involves any earlier dimensions, then we have - * already considered it during a previous iteration over the constraints. - * - * If we have already generated a min [max] for the current level d->i - * and if the current constraint is an upper [lower] bound, then we - * can skip the constraint as it will already have been used - * in that previously generated min [max]. - */ -static int insert_guard_constraint(CloogConstraint *j, void *user) -{ - int i; - struct clast_guard_data *d = (struct clast_guard_data *) user; - int minmax = -1; - int individual_constraint; - struct clast_expr *v; - struct clast_term *t; - - if (!cloog_constraint_involves(j, d->i - 1)) - return 0; - - for (i = 0; i < d->i - 1; ++i) - if (cloog_constraint_involves(j, i)) - return 0; - - if (d->level && d->nb_iter >= d->level && - cloog_constraint_involves(j, d->level - 1)) - return 0; - - individual_constraint = !d->level || cloog_constraint_is_equality(j); - if (!individual_constraint) { - if (d->max && cloog_constraint_is_lower_bound(j, d->i - 1)) - return 0; - if (d->min && cloog_constraint_is_upper_bound(j, d->i - 1)) - return 0; - } - - v = cloog_constraint_variable_expr(j, d->i, d->infos->names); - d->g->eq[d->n].LHS = &(t = new_clast_term(d->infos->state->one, v))->expr; - if (individual_constraint) { - /* put the "denominator" in the LHS */ - cloog_constraint_coefficient_get(j, d->i - 1, &t->val); - cloog_constraint_coefficient_set(j, d->i - 1, d->infos->state->one); - if (cloog_int_is_neg(t->val)) { - cloog_int_neg(t->val, t->val); - cloog_constraint_coefficient_set(j, d->i - 1, d->infos->state->negone); - } - if (d->level || cloog_constraint_is_equality(j)) - d->g->eq[d->n].sign = 0; - else if (cloog_constraint_is_lower_bound(j, d->i - 1)) - d->g->eq[d->n].sign = 1; - else - d->g->eq[d->n].sign = -1; - d->g->eq[d->n].RHS = clast_bound_from_constraint(j, d->i, d->infos->names); - } else { - int guarded; - - if (cloog_constraint_is_lower_bound(j, d->i - 1)) { - minmax = 1; - d->max = 1; - d->g->eq[d->n].sign = 1; - } else { - minmax = 0; - d->min = 1; - d->g->eq[d->n].sign = -1; - } - - guarded = (d->nb_iter >= d->level) ? d->level : 0 ; - d->g->eq[d->n].RHS = clast_minmax(d->copy, d->i, minmax, guarded, 0, 1, - d->infos); - } - d->n++; - - return 0; -} - - -/** - * insert_guard function: - * This function inserts a guard in the clast. - * A guard on an element (level) is : - * -> the conjunction of all the existing constraints where the coefficient of - * this element is 0 if the element is an iterator, - * -> the conjunction of all the existing constraints if the element isn't an - * iterator. - * For instance, considering these constraints and the element j: - * -3*i +2*j -M >= 0 - * 2*i +M >= 0 - * this function should return 'if (2*i+M>=0) {'. - * - matrix is the polyhedron containing all the constraints, - * - level is the column number of the element in matrix we want to use, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 3rd 2001: first version. - * - November 14th 2001: a lot of 'purifications'. - * - July 31th 2002: (debug) some guard parts are no more redundants. - * - August 12th 2002: polyhedra union ('or' conditions) are now supported. - * - October 27th 2005: polyhedra union ('or' conditions) are no more supported - * (the need came from loop_simplify that may result in - * domain unions, now it should be fixed directly in - * cloog_loop_simplify). - */ -static void insert_guard(CloogConstraintSet *constraints, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int total_dim; - struct clast_guard_data data = { level, infos, 0 }; - - if (!constraints) - return; - - data.copy = cloog_constraint_set_copy(constraints); - - data.copy = insert_extra_modulo_guards(data.copy, level, next, infos); - - cloog_constraint_set_foreach_constraint(constraints, - guard_count_bounds, &data); - - data.g = new_clast_guard(data.n); - data.n = 0; - - /* Well, it looks complicated because I wanted to have a particular, more - * readable, ordering, obviously this function may be far much simpler ! - */ - data.nb_iter = cloog_constraint_set_n_iterators(constraints, - infos->names->nb_parameters); - - /* We search for guard parts. */ - total_dim = cloog_constraint_set_total_dimension(constraints); - for (data.i = 1; data.i <= total_dim; data.i++) { - data.min = 0; - data.max = 0; - cloog_constraint_set_foreach_constraint(data.copy, - insert_guard_constraint, &data); - } - - cloog_constraint_set_free(data.copy); - - data.g->n = data.n; - if (data.n) { - clast_guard_sort(data.g); - **next = &data.g->stmt; - *next = &data.g->then; - } else - free_clast_stmt(&data.g->stmt); -} - -/** - * Check if the constant "cst" satisfies the modulo guard that - * would be introduced by insert_computed_modulo_guard. - * The constant is assumed to have been reduced prior to calling - * this function. - */ -static int constant_modulo_guard_is_satisfied(CloogConstraint *lower, - cloog_int_t bound, cloog_int_t cst) -{ - if (cloog_constraint_is_valid(lower)) - return cloog_int_le(cst, bound); - else - return cloog_int_is_zero(cst); -} - -/** - * Insert a modulo guard "r % mod == 0" or "r % mod <= bound", - * depending on whether lower represents a valid constraint. - */ -static void insert_computed_modulo_guard(struct clast_reduction *r, - CloogConstraint *lower, cloog_int_t mod, cloog_int_t bound, - struct clast_stmt ***next) -{ - struct clast_expr *e; - struct clast_guard *g; - - e = &new_clast_binary(clast_bin_mod, &r->expr, mod)->expr; - g = new_clast_guard(1); - if (!cloog_constraint_is_valid(lower)) { - g->eq[0].LHS = e; - cloog_int_set_si(bound, 0); - g->eq[0].RHS = &new_clast_term(bound, NULL)->expr; - g->eq[0].sign = 0; - } else { - g->eq[0].LHS = e; - g->eq[0].RHS = &new_clast_term(bound, NULL)->expr; - g->eq[0].sign = -1; - } - - **next = &g->stmt; - *next = &g->then; -} - - -/* Try and eliminate coefficients from a modulo constraint based on - * stride information of an earlier level. - * The modulo of the constraint being constructed is "m". - * The stride information at level "level" is given by "stride" - * and indicated that the iterator i at level "level" is equal to - * some expression modulo stride->stride. - * If stride->stride is a multiple of "m' then i is also equal to - * the expression modulo m and so we can eliminate the coefficient of i. - * - * If stride->constraint is NULL, then i has a constant value modulo m, stored - * stride->offset. We simply multiply this constant with the coefficient - * of i and add the result to the constant term, reducing it modulo m. - * - * If stride->constraint is not NULL, then it is a constraint of the form - * - * e + k i = s a - * - * with s equal to stride->stride, e an expression in terms of the - * parameters and earlier iterators and a some arbitrary expression - * in terms of existentially quantified variables. - * stride->factor is a value f such that f * k = -1 mod s. - * Adding stride->constraint f * c times to the current modulo constraint, - * with c the coefficient of i eliminates i in favor of parameters and - * earlier variables. - */ -static void eliminate_using_stride_constraint(cloog_int_t *line, int len, - int nb_iter, CloogStride *stride, int level, cloog_int_t m) -{ - if (!stride) - return; - if (!cloog_int_is_divisible_by(stride->stride, m)) - return; - - if (stride->constraint) { - int i, s_len; - cloog_int_t t, v; - - cloog_int_init(t); - cloog_int_init(v); - cloog_int_mul(t, line[level], stride->factor); - for (i = 1; i < level; ++i) { - cloog_constraint_coefficient_get(stride->constraint, - i - 1, &v); - cloog_int_addmul(line[i], t, v); - cloog_int_fdiv_r(line[i], line[i], m); - } - s_len = cloog_constraint_total_dimension(stride->constraint)+2; - for (i = nb_iter + 1; i <= len - 2; ++i) { - cloog_constraint_coefficient_get(stride->constraint, - i - (len - s_len) - 1, &v); - cloog_int_addmul(line[i], t, v); - cloog_int_fdiv_r(line[i], line[i], m); - } - cloog_constraint_constant_get(stride->constraint, &v); - cloog_int_addmul(line[len - 1], t, v); - cloog_int_fdiv_r(line[len - 1], line[len - 1], m); - cloog_int_clear(v); - cloog_int_clear(t); - } else { - cloog_int_addmul(line[len - 1], line[level], stride->offset); - cloog_int_fdiv_r(line[len - 1], line[len - 1], m); - } - - cloog_int_set_si(line[level], 0); -} - - -/* Temporary structure for communication between insert_modulo_guard and - * its cloog_constraint_set_foreach_constraint callback function. - */ -struct clast_modulo_guard_data { - CloogConstraint *lower; - int level; - struct clast_stmt ***next; - CloogInfos *infos; - int empty; - cloog_int_t val, bound; -}; - - -/* Insert a modulo guard for constraint c. - * The constraint may be either an equality or an inequality. - * Since this function returns -1, it is only called on a single constraint. - * In case of an inequality, the constraint is usually an upper bound - * on d->level. However, if this variable is an existentially - * quantified variable, the upper bound constraint may get removed - * as trivially holding and then this function is called with - * a lower bound instead. In this case, we need to adjust the constraint - * based on the sum of the constant terms of the lower and upper bound - * stored in d->bound. - */ -static int insert_modulo_guard_constraint(CloogConstraint *c, void *user) -{ - struct clast_modulo_guard_data *d = (struct clast_modulo_guard_data *) user; - int level = d->level; - CloogInfos *infos = d->infos; - int i, nb_elts = 0, len, nb_iter, nb_par; - int constant; - struct cloog_vec *line_vector; - cloog_int_t *line; - - len = cloog_constraint_total_dimension(c) + 2; - nb_par = infos->names->nb_parameters; - nb_iter = len - 2 - nb_par; - - line_vector = cloog_vec_alloc(len); - line = line_vector->p; - cloog_constraint_copy_coefficients(c, line + 1); - - if (cloog_int_is_pos(line[level])) { - cloog_seq_neg(line + 1, line + 1, len - 1); - if (!cloog_constraint_is_equality(c)) - cloog_int_add(line[len - 1], line[len - 1], d->bound); - } - cloog_int_neg(line[level], line[level]); - assert(cloog_int_is_pos(line[level])); - - nb_elts = 0; - for (i = 1; i <= len-1; ++i) { - if (i == level) - continue; - cloog_int_fdiv_r(line[i], line[i], line[level]); - if (cloog_int_is_zero(line[i])) - continue; - if (i == len-1) - continue; - - nb_elts++; - } - - if (nb_elts || !cloog_int_is_zero(line[len-1])) { - struct clast_reduction *r; - const char *name; - - r = new_clast_reduction(clast_red_sum, nb_elts + 1); - nb_elts = 0; - - /* First, the modulo guard : the iterators... */ - i = level - 1; - if (i > infos->stride_level) - i = infos->stride_level; - for (; i >= 1; --i) - eliminate_using_stride_constraint(line, len, nb_iter, - infos->stride[i - 1], i, line[level]); - for (i=1;i<=nb_iter;i++) { - if (i == level || cloog_int_is_zero(line[i])) - continue; - - name = cloog_names_name_at_level(infos->names, i); - - r->elts[nb_elts++] = &new_clast_term(line[i], - &new_clast_name(name)->expr)->expr; - } - - /* ...the parameters... */ - for (i=nb_iter+1;i<=len-2;i++) { - if (cloog_int_is_zero(line[i])) - continue; - - name = infos->names->parameters[i-nb_iter-1] ; - r->elts[nb_elts++] = &new_clast_term(line[i], - &new_clast_name(name)->expr)->expr; - } - - constant = nb_elts == 0; - /* ...the constant. */ - if (!cloog_int_is_zero(line[len-1])) - r->elts[nb_elts++] = &new_clast_term(line[len-1], NULL)->expr; - - /* our initial computation may have been an overestimate */ - r->n = nb_elts; - - if (constant) { - d->empty = !constant_modulo_guard_is_satisfied(d->lower, d->bound, - line[len - 1]); - free_clast_reduction(r); - } else - insert_computed_modulo_guard(r, d->lower, line[level], d->bound, - d->next); - } - - cloog_vec_free(line_vector); - - return -1; -} - - -/** - * insert_modulo_guard: - * This function inserts a modulo guard corresponding to an equality - * or a pair of inequalities. - * Returns 0 if the modulo guard is discovered to be unsatisfiable. - * - * See insert_equation. - * - matrix is the polyhedron containing all the constraints, - * - upper and lower are the line numbers of the constraint in matrix - * we want to print; in particular, if we want to print an equality, - * then lower == -1 and upper is the row of the equality; if we want - * to print an inequality, then upper is the row of the upper bound - * and lower in the row of the lower bound - * - level is the column number of the element in matrix we want to use, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - */ -static int insert_modulo_guard(CloogConstraint *upper, - CloogConstraint *lower, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int nb_par; - CloogConstraintSet *set; - struct clast_modulo_guard_data data = { lower, level, next, infos, 0 }; - - cloog_int_init(data.val); - cloog_constraint_coefficient_get(upper, level-1, &data.val); - if (cloog_int_is_one(data.val) || cloog_int_is_neg_one(data.val)) { - cloog_int_clear(data.val); - return 1; - } - - nb_par = infos->names->nb_parameters; - - cloog_int_init(data.bound); - /* Check if would be emitting the redundant constraint mod(e,m) <= m-1 */ - if (cloog_constraint_is_valid(lower)) { - cloog_constraint_constant_get(upper, &data.val); - cloog_constraint_constant_get(lower, &data.bound); - cloog_int_add(data.bound, data.val, data.bound); - cloog_constraint_coefficient_get(lower, level-1, &data.val); - cloog_int_sub_ui(data.val, data.val, 1); - if (cloog_int_eq(data.val, data.bound)) { - cloog_int_clear(data.val); - cloog_int_clear(data.bound); - return 1; - } - } - - if (cloog_constraint_needs_reduction(upper, level)) { - set = cloog_constraint_set_for_reduction(upper, lower); - set = cloog_constraint_set_reduce(set, level, infos->equal, - nb_par, &data.bound); - cloog_constraint_set_foreach_constraint(set, - insert_modulo_guard_constraint, &data); - cloog_constraint_set_free(set); - } else - insert_modulo_guard_constraint(upper, &data); - - cloog_int_clear(data.val); - cloog_int_clear(data.bound); - - return !data.empty; -} - - -/** - * We found an equality or a pair of inequalities identifying - * a loop with a single iteration, but the user wants us to generate - * a loop anyway, so we do it here. - */ -static int insert_equation_as_loop(CloogDomain *domain, CloogConstraint *upper, - CloogConstraint *lower, int level, struct clast_stmt ***next, - CloogInfos *infos) -{ - const char *iterator = cloog_names_name_at_level(infos->names, level); - struct clast_expr *e1, *e2; - struct clast_for *f; - - e2 = clast_bound_from_constraint(upper, level, infos->names); - if (!cloog_constraint_is_valid(lower)) - e1 = clast_expr_copy(e2); - else - e1 = clast_bound_from_constraint(lower, level, infos->names); - - f = new_clast_for(domain, iterator, e1, e2, infos->stride[level-1]); - **next = &f->stmt; - *next = &f->body; - - cloog_constraint_release(lower); - cloog_constraint_release(upper); - return 1; -} - - -/** - * insert_equation function: - * This function inserts an equality - * constraint according to an element in the clast. - * Returns 1 if the calling function should recurse into inner loops. - * - * An equality can be preceded by a 'modulo guard'. - * For instance, consider the constraint i -2*j = 0 and the - * element j: pprint_equality should return 'if(i%2==0) { j = i/2 ;'. - * - matrix is the polyhedron containing all the constraints, - * - num is the line number of the constraint in matrix we want to print, - * - level is the column number of the element in matrix we want to use, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 13th 2001: first version. - * - June 26th 2003: simplification of the modulo guards (remove parts such as - * modulo is 0, compare vivien or vivien2 with a previous - * version for an idea). - * - June 29th 2003: non-unit strides support. - * - July 14th 2003: (debug) no more print the constant in the modulo guard when - * it was previously included in a stride calculation. - */ -static int insert_equation(CloogDomain *domain, CloogConstraint *upper, - CloogConstraint *lower, int level, struct clast_stmt - ***next, CloogInfos *infos) -{ - struct clast_expr *e; - struct clast_assignment *ass; - - if (!infos->options->otl) - return insert_equation_as_loop(domain, upper, lower, level, next, infos); - - if (!insert_modulo_guard(upper, lower, level, next, infos)) { - cloog_constraint_release(lower); - cloog_constraint_release(upper); - - return 0; - } - - if (cloog_constraint_is_valid(lower) || - !clast_equal_add(infos->equal, NULL, level, upper, infos)) - { /* Finally, the equality. */ - - /* If we have to make a block by dimension, we start the block. Function - * pprint knows if there is an equality, if this is the case, it checks - * for the same following condition to close the brace. - */ - if (infos->options->block) { - struct clast_block *b = new_clast_block(); - **next = &b->stmt; - *next = &b->body; - } - - e = clast_bound_from_constraint(upper, level, infos->names); - ass = new_clast_assignment(cloog_names_name_at_level(infos->names, level), e); - - **next = &ass->stmt; - *next = &(**next)->next; - } - - cloog_constraint_release(lower); - cloog_constraint_release(upper); - - return 1; -} - - -/** - * Insert a loop that is executed exactly once as an assignment. - * In particular, the loop - * - * for (i = e; i <= e; ++i) { - * S; - * } - * - * is generated as - * - * i = e; - * S; - * - */ -static void insert_otl_for(CloogConstraintSet *constraints, int level, - struct clast_expr *e, struct clast_stmt ***next, CloogInfos *infos) -{ - const char *iterator; - - iterator = cloog_names_name_at_level(infos->names, level); - - if (!clast_equal_add(infos->equal, constraints, level, - cloog_constraint_invalid(), infos)) { - struct clast_assignment *ass; - if (infos->options->block) { - struct clast_block *b = new_clast_block(); - **next = &b->stmt; - *next = &b->body; - } - ass = new_clast_assignment(iterator, e); - **next = &ass->stmt; - *next = &(**next)->next; - } else { - free_clast_expr(e); - } -} - - -/** - * Insert a loop that is executed at most once as an assignment followed - * by a guard. In particular, the loop - * - * for (i = e1; i <= e2; ++i) { - * S; - * } - * - * is generated as - * - * i = e1; - * if (i <= e2) { - * S; - * } - * - */ -static void insert_guarded_otl_for(CloogConstraintSet *constraints, int level, - struct clast_expr *e1, struct clast_expr *e2, - struct clast_stmt ***next, CloogInfos *infos) -{ - const char *iterator; - struct clast_assignment *ass; - struct clast_guard *guard; - - iterator = cloog_names_name_at_level(infos->names, level); - - if (infos->options->block) { - struct clast_block *b = new_clast_block(); - **next = &b->stmt; - *next = &b->body; - } - ass = new_clast_assignment(iterator, e1); - **next = &ass->stmt; - *next = &(**next)->next; - - guard = new_clast_guard(1); - guard->eq[0].sign = -1; - guard->eq[0].LHS = &new_clast_term(infos->state->one, - &new_clast_name(iterator)->expr)->expr; - guard->eq[0].RHS = e2; - - **next = &guard->stmt; - *next = &guard->then; -} - - -/** - * insert_for function: - * This function inserts a for loop in the clast. - * Returns 1 if the calling function should recurse into inner loops. - * - * A loop header according to an element is the conjunction of a minimum and a - * maximum on a given element (they give the loop bounds). - * For instance, considering these constraints and the element j: - * i + j -9*M >= 0 - * -j +5*M >= 0 - * j -4*M >= 0 - * this function should return 'for (j=max(-i+9*M,4*M),j<=5*M;j++) {'. - * - constraints contains all constraints, - * - level is the column number of the element in matrix we want to use, - * - otl is set if the loop is executed at most once, - * - the infos structure gives the user some options about code printing, - * the number of parameters in matrix (nb_par), and the arrays of iterator - * names and parameters (iters and params). - */ -static int insert_for(CloogDomain *domain, CloogConstraintSet *constraints, - int level, int otl, struct clast_stmt ***next, - CloogInfos *infos) -{ - const char *iterator; - struct clast_expr *e1; - struct clast_expr *e2; - - e1 = clast_minmax(constraints, level, 1, 0, 1, 0, infos); - e2 = clast_minmax(constraints, level, 0, 0, 0, 0, infos); - - if (clast_expr_is_bigger_constant(e1, e2)) { - free_clast_expr(e1); - free_clast_expr(e2); - return 0; - } - - /* If min and max are not equal there is a 'for' else, there is a '='. - * In the special case e1 = e2 = NULL, this is an infinite loop - * so this is not a '='. - */ - if (e1 && e2 && infos->options->otl && clast_expr_equal(e1, e2)) { - free_clast_expr(e2); - insert_otl_for(constraints, level, e1, next, infos); - } else if (otl) { - insert_guarded_otl_for(constraints, level, e1, e2, next, infos); - } else { - struct clast_for *f; - iterator = cloog_names_name_at_level(infos->names, level); - - f = new_clast_for(domain, iterator, e1, e2, infos->stride[level-1]); - **next = &f->stmt; - *next = &f->body; - } - - return 1; -} - - -/** - * insert_block function: - * This function inserts a statement block. - * - block is the statement block, - * - level is the number of loops enclosing the statement, - * - the infos structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - September 21th 2003: first version (pick from pprint function). - */ -static void insert_block(CloogDomain *domain, CloogBlock *block, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - CloogStatement * statement ; - struct clast_stmt *subs; - - if (!block) - return; - - for (statement = block->statement; statement; statement = statement->next) { - CloogStatement *s_next = statement->next; - - subs = clast_equal(level,infos); - - statement->next = NULL; - **next = &new_clast_user_stmt(domain, statement, subs)->stmt; - statement->next = s_next; - *next = &(**next)->next; - } -} - - -/** - * insert_loop function: - * This function converts the content of a CloogLoop structure (loop) into a - * clast_stmt (inserted at **next). - * The iterator (level) of - * the current loop is given by 'level': this is the column number of the - * domain corresponding to the current loop iterator. The data of a loop are - * written in this order: - * 1. The guard of the loop, i.e. each constraint in the domain that does not - * depend on the iterator (when the entry in the column 'level' is 0). - * 2. The iteration domain of the iterator, given by the constraints in the - * domain depending on the iterator, i.e.: - * * an equality if the iterator has only one value (possibly preceded by - * a guard verifying if this value is integral), *OR* - * * a loop from the minimum possible value of the iterator to the maximum - * possible value. - * 3. The included statement block. - * 4. The inner loops (recursive call). - * 5. The following loops (recursive call). - * - level is the recursion level or the iteration level that we are printing, - * - the infos structure gives the user some options about code printing, - * the number of parameters in domain (nb_par), and the arrays of iterator - * names and parameters (iters and params). - ** - * - November 2nd 2001: first version. - * - March 6th 2003: infinite domain support. - * - April 19th 2003: (debug) NULL loop support. - * - June 29th 2003: non-unit strides support. - * - April 28th 2005: (debug) level is level+equality when print statement! - * - June 16th 2005: (debug) the N. Vasilache normalization step has been - * added to avoid iteration duplication (see DaeGon Kim - * bug in cloog_program_generate). Try vasilache.cloog - * with and without the call to cloog_polylib_matrix_normalize, - * using -f 8 -l 9 options for an idea. - * - September 15th 2005: (debug) don't close equality braces when unnecessary. - * - October 16th 2005: (debug) scalar value is saved for next loops. - */ -static void insert_loop(CloogLoop * loop, int level, - struct clast_stmt ***next, CloogInfos *infos) -{ - int equality = 0; - CloogConstraintSet *constraints, *temp; - struct clast_stmt **top = *next; - CloogConstraint *i, *j; - int empty_loop = 0; - - /* It can happen that loop be NULL when an input polyhedron is empty. */ - if (loop == NULL) - return; - - /* The constraints do not always have a shape that allows us to generate code from it, - * thus we normalize it, we also simplify it with the equalities. - */ - temp = cloog_domain_constraints(loop->domain); - cloog_constraint_set_normalize(temp,level); - constraints = cloog_constraint_set_simplify(temp,infos->equal,level, - infos->names->nb_parameters); - cloog_constraint_set_free(temp); - if (level) { - infos->stride[level - 1] = loop->stride; - infos->stride_level++; - } - - /* First of all we have to print the guard. */ - insert_guard(constraints,level, next, infos); - - if (level && cloog_constraint_set_contains_level(constraints, level, - infos->names->nb_parameters)) { - /* We scan all the constraints to know in which case we are : - * [[if] equation] or [for]. - */ - if (cloog_constraint_is_valid(i = - cloog_constraint_set_defining_equality(constraints, level))) { - empty_loop = !insert_equation(loop->unsimplified, i, - cloog_constraint_invalid(), level, next, - infos); - equality = 1 ; - } else if (cloog_constraint_is_valid(i = - cloog_constraint_set_defining_inequalities(constraints, - level, &j, infos->names->nb_parameters))) { - empty_loop = !insert_equation(loop->unsimplified, i, j, level, next, - infos); - } else - empty_loop = !insert_for(loop->unsimplified, constraints, level, - loop->otl, next, infos); - } - - if (!empty_loop) { - /* Finally, if there is an included statement block, print it. */ - insert_block(loop->unsimplified, loop->block, level+equality, next, infos); - - /* Go to the next level. */ - if (loop->inner != NULL) - insert_loop(loop->inner, level+1, next, infos); - } - - if (level) { - cloog_equal_del(infos->equal,level); - infos->stride_level--; - } - cloog_constraint_set_free(constraints); - - /* Go to the next loop on the same level. */ - while (*top) - top = &(*top)->next; - if (loop->next != NULL) - insert_loop(loop->next, level, &top,infos); -} - - -struct clast_stmt *cloog_clast_create(CloogProgram *program, - CloogOptions *options) -{ - CloogInfos *infos = ALLOC(CloogInfos); - int nb_levels; - struct clast_stmt *root = &new_clast_root(program->names)->stmt; - struct clast_stmt **next = &root->next; - - infos->state = options->state; - infos->names = program->names; - infos->options = options; - infos->scaldims = program->scaldims; - infos->nb_scattdims = program->nb_scattdims; - - /* Allocation for the array of strides, there is a +1 since the statement can - * be included inside an external loop without iteration domain. - */ - nb_levels = program->names->nb_scattering+program->names->nb_iterators+1; - infos->stride = ALLOCN(CloogStride *, nb_levels); - infos->stride_level = 0; - - infos->equal = cloog_equal_alloc(nb_levels, - nb_levels, program->names->nb_parameters); - - insert_loop(program->loop, 0, &next, infos); - - cloog_equal_free(infos->equal); - - free(infos->stride); - free(infos); - - return root; -} - - -struct clast_stmt *cloog_clast_create_from_input(CloogInput *input, - CloogOptions *options) -{ - CloogProgram *program; - struct clast_stmt *root; - - program = cloog_program_alloc(input->context, input->ud, options); - free(input); - - program = cloog_program_generate(program, options); - - root = cloog_clast_create(program, options); - cloog_program_free(program); - - return root; -} diff --git a/cloog-0.17.0/source/cloog.c b/cloog-0.17.0/source/cloog.c deleted file mode 100644 index 0a42a6763fd29621dafd935306a030c2327657d2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/cloog.c +++ /dev/null @@ -1,98 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** cloog.c ** - **-------------------------------------------------------------------** - ** First version: october 25th 2001, CLooG's birth date ! ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -# include -# include -# include "../include/cloog/cloog.h" - - -int main(int argv, char * argc[]) -{ CloogProgram * program ; - CloogOptions * options ; - CloogState *state; - FILE * input, * output ; - - state = cloog_state_malloc(); - - /* Options and input/output file setting. */ - cloog_options_read(state, argv, argc, &input, &output, &options); - - /* Reading the program informations. */ - program = cloog_program_read(input,options) ; - fclose(input) ; - - /* Generating and printing the code. */ - program = cloog_program_generate(program,options) ; - if (options->structure) - cloog_program_print(stdout,program) ; - cloog_program_pprint(output,program,options) ; - cloog_program_free(program) ; - - /* Printing the allocation statistics if asked. */ - if (options->leaks) { - fprintf(output,"/* Domains : allocated=%5d, freed=%5d, max=%5d. */\n", - state->domain_allocated, state->domain_freed, state->domain_max); - fprintf(output,"/* Loops : allocated=%5d, freed=%5d, max=%5d. */\n", - state->loop_allocated, state->loop_freed, state->loop_max); - fprintf(output,"/* Statements : allocated=%5d, freed=%5d, max=%5d. */\n", - state->statement_allocated, state->statement_freed, state->statement_max); - fprintf(output,"/* Blocks : allocated=%5d, freed=%5d, max=%5d. */\n", - state->block_allocated, state->block_freed, state->block_max); - } - - /* Inform the user in case of a problem with the allocation statistics. */ - if ((state->domain_allocated != state->domain_freed) || - (state->loop_allocated != state->loop_freed) || - (state->statement_allocated != state->statement_freed) || - (state->block_allocated != state->block_freed)) - { - cloog_msg(options, CLOOG_INFO, - "an internal problem has been detected (it should have" - " no\n consequence on the correctness of the output)." - " Please send (if\n you can) your input file, the first line " - "given by typing 'cloog -v'\n and your full command " - "line call to CLooG including options to\n . Thank you for your participation to get\n" - " CLooG better and safer.\n") ; - } - - cloog_options_free(options) ; - cloog_state_free(state); - fclose(output) ; - return 0; -} - diff --git a/cloog-0.17.0/source/input.c b/cloog-0.17.0/source/input.c deleted file mode 100644 index 819539208d87af2d77acc4d977ef1c5850634216..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/input.c +++ /dev/null @@ -1,218 +0,0 @@ -#include -#include -#include -#include "../include/cloog/cloog.h" - -#ifdef OSL_SUPPORT -#include -#endif - -#define ALLOC(type) (type*)malloc(sizeof(type)) - -static char *next_line(FILE *input, char *line, unsigned len) -{ - char *p; - - do { - if (!(p = fgets(line, len, input))) - return NULL; - while (isspace(*p) && *p != '\n') - ++p; - } while (*p == '#' || *p == '\n'); - - return p; -} - -#ifdef OSL_SUPPORT -/** - * This function translates an OpenScop scop to a CLooG input. - * \param[in,out] state CLooG state. - * \param[in] scop Scop to translate. - * \return A CloogInput corresponding to the scop input. - */ -CloogInput *cloog_input_from_osl_scop(CloogState *state, osl_scop_p scop) { - CloogInput *input = NULL; - CloogDomain *context = NULL; - CloogUnionDomain *ud = NULL; - - if (scop) { - /* Extract the context. */ - context = cloog_domain_from_osl_relation(state, scop->context); - - /* Extract the union of domains. */ - ud = cloog_union_domain_from_osl_scop(state, scop); - - /* Build and return the input. */ - input = cloog_input_alloc(context, ud); - } - - return input; -} -#endif - -/** - * Read input from a .cloog file, putting most of the information - * in the returned CloogInput. The chosen language is put in - * options->language. - */ -CloogInput *cloog_input_read(FILE *file, CloogOptions *options) -{ - char line[MAX_STRING]; - char language; - CloogDomain *context; - CloogUnionDomain *ud; - int nb_par; - -#ifdef OSL_SUPPORT - if (options->openscop) { - osl_scop_p scop = osl_scop_read(file); - CloogInput * input = cloog_input_from_osl_scop(options->state, - scop); - cloog_options_copy_from_osl_scop(scop, options); - return input; - } -#endif - - /* First of all, we read the language to use. */ - if (!next_line(file, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, "%c", &language) != 1) - cloog_die("Input error.\n"); - - if (language == 'f') - options->language = CLOOG_LANGUAGE_FORTRAN; - else - options->language = CLOOG_LANGUAGE_C; - - /* We then read the context data. */ - context = cloog_domain_read_context(options->state, file); - nb_par = cloog_domain_parameter_dimension(context); - - ud = cloog_union_domain_read(file, nb_par, options); - - return cloog_input_alloc(context, ud); -} - -/** - * Create a CloogInput from a CloogDomain context and a CloogUnionDomain. - */ -CloogInput *cloog_input_alloc(CloogDomain *context, CloogUnionDomain *ud) -{ - CloogInput *input; - - input = ALLOC(CloogInput); - if (!input) - cloog_die("memory overflow.\n"); - - input->context = context; - input->ud = ud; - - return input; -} - -void cloog_input_free(CloogInput *input) -{ - cloog_domain_free(input->context); - cloog_union_domain_free(input->ud); - free(input); -} - -static void print_names(FILE *file, CloogUnionDomain *ud, - enum cloog_dim_type type, const char *name) -{ - int i; - - fprintf(file, "\n%d # %s name(s)\n", ud->name[type] ? 1 : 0, name); - if (!ud->name[type]) - return; - - for (i = 0; i < ud->n_name[type]; i++) - fprintf(file, "%s ", ud->name[type][i]); - - fprintf(file, "\n"); -} - -/** - * Dump the .cloog description of a CloogInput and a CloogOptions data structure - * into a file. The generated .cloog file will contain the same information as - * the data structures. The file can be used to run the cloog program on the - * example. - */ -void cloog_input_dump_cloog(FILE *file, CloogInput *input, CloogOptions *opt) -{ - int i, num_statements; - CloogUnionDomain *ud = input->ud; - CloogNamedDomainList *ndl = ud->domain; - - fprintf(file, - "# CLooG -> CLooG\n" - "# This is an automatic dump of a CLooG input file from a " - "CloogInput data\n" - "# structure.\n\n"); - - /* Language. */ - if (opt->language == CLOOG_LANGUAGE_FORTRAN) { - fprintf(file, "# Language: FORTRAN\n"); - fprintf(file, "f\n\n"); - } else { - fprintf(file, "# Language: C\n"); - fprintf(file, "c\n\n"); - } - - /* Context. */ - fprintf(file, "# Context:\n"); - cloog_domain_print_constraints(file, input->context, 1); - - print_names(file, ud, CLOOG_PARAM, "Parameter"); - - /* Statement number. */ - i = 0; - while (ndl != NULL) { - i++; - ndl = ndl->next; - } - num_statements = i; - fprintf(file, "\n# Statement number:\n%d\n\n", num_statements); - - /* Iteration domains. */ - i = 1; - ndl = ud->domain; - while (ndl != NULL) { - fprintf(file, "# Iteration domain of statement %d (%s).\n", i, - ndl->name); - - cloog_domain_print_constraints(file, ndl->domain, 1); - fprintf(file,"\n0 0 0 # For future options.\n\n"); - - i++; - ndl = ndl->next; - } - - print_names(file, ud, CLOOG_ITER, "Iterator"); - - /* Exit, if no scattering is supplied. */ - if (!ud->domain || !ud->domain->scattering) { - fprintf(file, "# No scattering functions.\n0\n\n"); - return; - } - - /* Scattering relations. */ - fprintf(file, - "# --------------------- SCATTERING --------------------\n"); - - fprintf(file, "%d # Scattering functions\n", num_statements); - - i = 1; - ndl = ud->domain; - while (ndl != NULL) { - fprintf(file, "\n# Scattering of statement %d (%s).\n", i, - ndl->name); - - cloog_scattering_print_constraints(file, ndl->scattering); - - i++; - ndl = ndl->next; - } - - print_names(file, ud, CLOOG_SCAT, "Scattering dimension"); -} diff --git a/cloog-0.17.0/source/int.c b/cloog-0.17.0/source/int.c deleted file mode 100644 index 67f62df077ed39ce34e73808adccf81d6f36536b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/int.c +++ /dev/null @@ -1,177 +0,0 @@ -#include -#include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -#if defined(CLOOG_INT_INT) || \ - defined(CLOOG_INT_LONG) || \ - defined(CLOOG_INT_LONG_LONG) - -cloog_int_t cloog_gcd(cloog_int_t a, cloog_int_t b) -{ - while (a) { - cloog_int_t t = b % a; - b = a; - a = t; - } - if (b < 0) - b = -b; - return b; -} - -#endif - -struct cloog_vec *cloog_vec_alloc(unsigned size) -{ - int i; - struct cloog_vec *vec; - - vec = ALLOC(struct cloog_vec); - if (!vec) - return NULL; - - vec->p = ALLOCN(cloog_int_t, size); - if (!vec->p) - goto error; - vec->size = size; - - for (i = 0; i < size; ++i) - cloog_int_init(vec->p[i]); - - return vec; -error: - free(vec); - return NULL; -} - -void cloog_vec_free(struct cloog_vec *vec) -{ - int i; - - if (!vec) - return; - - for (i = 0; i < vec->size; ++i) - cloog_int_clear(vec->p[i]); - free(vec->p); - free(vec); -} - -void cloog_vec_dump(struct cloog_vec *vec) -{ - int i; - - for (i = 0; i < vec->size; ++i) { - cloog_int_print(stderr, vec->p[i]); - fprintf(stderr, " "); - } - fprintf(stderr, "\n"); -} - -int cloog_seq_first_non_zero(cloog_int_t *p, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) - if (!cloog_int_is_zero(p[i])) - return i; - return -1; -} - -void cloog_seq_neg(cloog_int_t *dst, cloog_int_t *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - cloog_int_neg(dst[i], src[i]); -} - -void cloog_seq_cpy(cloog_int_t *dst, cloog_int_t *src, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - cloog_int_set(dst[i], src[i]); -} - -static void cloog_seq_scale_down(cloog_int_t *dst, cloog_int_t *src, cloog_int_t m, unsigned len) -{ - int i; - for (i = 0; i < len; ++i) - cloog_int_divexact(dst[i], src[i], m); -} - -void cloog_seq_combine(cloog_int_t *dst, cloog_int_t m1, cloog_int_t *src1, - cloog_int_t m2, cloog_int_t *src2, unsigned len) -{ - int i; - cloog_int_t tmp; - - cloog_int_init(tmp); - for (i = 0; i < len; ++i) { - cloog_int_mul(tmp, m1, src1[i]); - cloog_int_addmul(tmp, m2, src2[i]); - cloog_int_set(dst[i], tmp); - } - cloog_int_clear(tmp); -} - -static int cloog_seq_abs_min_non_zero(cloog_int_t *p, unsigned len) -{ - int i, min = cloog_seq_first_non_zero(p, len); - if (min < 0) - return -1; - for (i = min + 1; i < len; ++i) { - if (cloog_int_is_zero(p[i])) - continue; - if (cloog_int_abs_lt(p[i], p[min])) - min = i; - } - return min; -} - -void cloog_seq_gcd(cloog_int_t *p, unsigned len, cloog_int_t *gcd) -{ - int i, min = cloog_seq_abs_min_non_zero(p, len); - - if (min < 0) { - cloog_int_set_si(*gcd, 0); - return; - } - cloog_int_abs(*gcd, p[min]); - for (i = 0; cloog_int_cmp_si(*gcd, 1) > 0 && i < len; ++i) { - if (i == min) - continue; - if (cloog_int_is_zero(p[i])) - continue; - cloog_int_gcd(*gcd, *gcd, p[i]); - } -} - -int cloog_seq_is_neg(cloog_int_t *p1, cloog_int_t *p2, unsigned len) -{ - int i; - - for (i = 0; i < len; ++i) { - if (cloog_int_abs_ne(p1[i], p2[i])) - return 0; - if (cloog_int_is_zero(p1[i])) - continue; - if (cloog_int_eq(p1[i], p2[i])) - return 0; - } - return 1; -} - -void cloog_seq_normalize(cloog_int_t *p, unsigned len) -{ - cloog_int_t gcd; - - if (len == 0) - return; - - cloog_int_init(gcd); - cloog_seq_gcd(p, len, &gcd); - if (!cloog_int_is_zero(gcd) && !cloog_int_is_one(gcd)) - cloog_seq_scale_down(p, p, gcd, len); - cloog_int_clear(gcd); -} diff --git a/cloog-0.17.0/source/isl/backend.c b/cloog-0.17.0/source/isl/backend.c deleted file mode 100644 index 6ddb9f9adcd567014c90a5bd8983724cf4b919fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/isl/backend.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -/** - * Allocate and initialize full state. - */ -CloogState *cloog_state_malloc(void) -{ - return cloog_isl_state_malloc(NULL); -} - -/** - * Allocate and initialize full state for isl backend. - */ -CloogState *cloog_isl_state_malloc(struct isl_ctx *ctx) -{ - CloogState *state; - int allocated = !ctx; - - state = cloog_core_state_malloc(); - if (!ctx) - ctx = isl_ctx_alloc(); - state->backend = isl_alloc_type(ctx, CloogBackend); - state->backend->ctx = ctx; - state->backend->ctx_allocated = allocated; - return state; -} - -/** - * Free state and backend independent parts. - */ -void cloog_state_free(CloogState *state) -{ - if (state->backend->ctx_allocated) - isl_ctx_free(state->backend->ctx); - free(state->backend); - cloog_core_state_free(state); -} diff --git a/cloog-0.17.0/source/isl/constraints.c b/cloog-0.17.0/source/isl/constraints.c deleted file mode 100644 index 1fb169032d96046b6ba25d948312be0a0ee58d44..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/isl/constraints.c +++ /dev/null @@ -1,966 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -CloogConstraintSet *cloog_constraint_set_from_isl_basic_set(struct isl_basic_set *bset) -{ - return (CloogConstraintSet *)bset; -} - -CloogConstraint *cloog_constraint_from_isl_constraint(struct isl_constraint *constraint) -{ - return (CloogConstraint *)constraint; -} - -isl_constraint *cloog_constraint_to_isl(CloogConstraint *constraint) -{ - return (isl_constraint *)constraint; -} - -isl_basic_set *cloog_constraints_set_to_isl(CloogConstraintSet *constraints) -{ - return (isl_basic_set *)constraints; -} - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - - -void cloog_constraint_set_free(CloogConstraintSet *constraints) -{ - isl_basic_set_free(cloog_constraints_set_to_isl(constraints)); -} - - -int cloog_constraint_set_contains_level(CloogConstraintSet *constraints, - int level, int nb_parameters) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_dim(bset, isl_dim_set) >= level; -} - -struct cloog_isl_dim { - enum isl_dim_type type; - int pos; -}; - -static struct cloog_isl_dim basic_set_cloog_dim_to_isl_dim( - __isl_keep isl_basic_set *bset, int pos) -{ - enum isl_dim_type types[] = { isl_dim_set, isl_dim_div, isl_dim_param }; - int i; - struct cloog_isl_dim ci_dim; - - for (i = 0; i < 3; ++i) { - unsigned dim = isl_basic_set_dim(bset, types[i]); - if (pos < dim) { - ci_dim.type = types[i]; - ci_dim.pos = pos; - return ci_dim; - } - pos -= dim; - } - assert(0); -} - -static struct cloog_isl_dim set_cloog_dim_to_isl_dim( - CloogConstraintSet *constraints, int pos) -{ - isl_basic_set *bset; - - bset = cloog_constraints_set_to_isl(constraints); - return basic_set_cloog_dim_to_isl_dim(bset, pos); -} - -/* Check if the variable at position level is defined by an - * equality. If so, return the row number. Otherwise, return -1. - */ -CloogConstraint *cloog_constraint_set_defining_equality( - CloogConstraintSet *constraints, int level) -{ - struct isl_constraint *c; - struct cloog_isl_dim dim; - isl_basic_set *bset; - - bset = cloog_constraints_set_to_isl(constraints); - dim = set_cloog_dim_to_isl_dim(constraints, level - 1); - if (isl_basic_set_has_defining_equality(bset, dim.type, dim.pos, &c)) - return cloog_constraint_from_isl_constraint(c); - else - return NULL; -} - - -struct cloog_isl_other { - int level; - int found; - isl_constraint *u; - isl_constraint *l; -}; - - -/* Set other->found to 1 if the given constraint involves other->level - * and is different from other->u and other->l. - */ -static int check_other_constraint(__isl_take isl_constraint *c, void *user) -{ - struct cloog_isl_other *other = user; - CloogConstraint *cc; - - if (!isl_constraint_is_equal(c, other->l) && - !isl_constraint_is_equal(c, other->u)) { - cc = cloog_constraint_from_isl_constraint(c); - if (cloog_constraint_involves(cc, other->level - 1)) - other->found = 1; - } - - isl_constraint_free(c); - - return other->found ? -1 : 0; -} - - -/* Check if the variable (e) at position level is defined by a - * pair of inequalities - * + -m e + + k1 >= 0 - * <-a, i> + m e + <-b, p> + k2 >= 0 - * with 0 <= k1 + k2 < m - * If so return the row number of the upper bound and set *lower - * to the row number of the lower bound. If not, return -1. - * - * If the variable at position level occurs in any other constraint, - * then we currently return -1. The modulo guard that we would generate - * would still be correct, but we would also need to generate - * guards corresponding to the other constraints, and this has not - * been implemented yet. - */ -CloogConstraint *cloog_constraint_set_defining_inequalities( - CloogConstraintSet *constraints, - int level, CloogConstraint **lower, int nb_par) -{ - struct isl_constraint *u; - struct isl_constraint *l; - struct cloog_isl_dim dim; - struct isl_basic_set *bset; - struct cloog_isl_other other; - - bset = cloog_constraints_set_to_isl(constraints); - dim = set_cloog_dim_to_isl_dim(constraints, level - 1); - if (!isl_basic_set_has_defining_inequalities(bset, dim.type, dim.pos, - &l, &u)) - return cloog_constraint_invalid(); - - other.l = l; - other.u = u; - other.found = 0; - other.level = level; - isl_basic_set_foreach_constraint(bset, &check_other_constraint, &other); - if (other.found) { - isl_constraint_free(l); - isl_constraint_free(u); - *lower = NULL; - return NULL; - } - *lower = cloog_constraint_from_isl_constraint(l); - return cloog_constraint_from_isl_constraint(u); -} - -int cloog_constraint_set_total_dimension(CloogConstraintSet *constraints) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_total_dim(bset); -} - -int cloog_constraint_set_n_iterators(CloogConstraintSet *constraints, int n_par) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_dim(bset, isl_dim_set); -} - - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ - - -/* Equalities are stored inside a Matrix data structure called "equal". - * This matrix has (nb_scattering + nb_iterators + 1) rows (i.e. total - * dimensions + 1, the "+ 1" is because a statement can be included inside an - * external loop without iteration domain), and (nb_scattering + nb_iterators + - * nb_parameters + 2) columns (all unknowns plus the scalar plus the equality - * type). The ith row corresponds to the equality "= 0" for the ith dimension - * iterator. The first column gives the equality type (0: no equality, then - * EQTYPE_* -see pprint.h-). At each recursion of pprint, if an equality for - * the current level is found, the corresponding row is updated. Then the - * equality if it exists is used to simplify expressions (e.g. if we have - * "i+1" while we know that "i=2", we simplify it in "3"). At the end of - * the pprint call, the corresponding row is reset to zero. - */ - -CloogEqualities *cloog_equal_alloc(int n, int nb_levels, int nb_parameters) -{ - int i; - CloogEqualities *equal = ALLOC(CloogEqualities); - - equal->total_dim = nb_levels - 1 + nb_parameters; - equal->n = n; - equal->constraints = ALLOCN(isl_constraint *, n); - equal->types = ALLOCN(int, n); - for (i = 0; i < n; ++i) { - equal->constraints[i] = NULL; - equal->types[i] = EQTYPE_NONE; - } - return equal; -} - -int cloog_equal_total_dimension(CloogEqualities *equal) -{ - return equal->total_dim; -} - -void cloog_equal_free(CloogEqualities *equal) -{ - int i; - - for (i = 0; i < equal->n; ++i) - isl_constraint_free(equal->constraints[i]); - free(equal->constraints); - free(equal->types); - free(equal); -} - -int cloog_equal_count(CloogEqualities *equal) -{ - return equal->n; -} - - -/** - * cloog_constraint_equal_type function : - * This function returns the type of the equality in the constraint (line) of - * (constraints) for the element (level). An equality is 'constant' iff all - * other factors are null except the constant one. It is a 'pure item' iff - * it is equal or opposite to a single variable or parameter. - * Otherwise it is an 'affine expression'. - * For instance: - * i = -13 is constant, i = j, j = -M are pure items, - * j = 2*M, i = j+1, 2*j = M are affine expressions. - * - * - constraints is the matrix of constraints, - * - level is the column number in equal of the element which is 'equal to', - */ -static int cloog_constraint_equal_type(CloogConstraint *cc, int level) -{ - int i; - isl_int c; - int type = EQTYPE_NONE; - struct isl_constraint *constraint = cloog_constraint_to_isl(cc); - - isl_int_init(c); - isl_constraint_get_constant(constraint, &c); - if (!isl_int_is_zero(c)) - type = EQTYPE_CONSTANT; - isl_constraint_get_coefficient(constraint, isl_dim_set, level - 1, &c); - if (!isl_int_is_one(c) && !isl_int_is_negone(c)) - type = EQTYPE_EXAFFINE; - for (i = 0; i < isl_constraint_dim(constraint, isl_dim_param); ++i) { - isl_constraint_get_coefficient(constraint, isl_dim_param, i, &c); - if (isl_int_is_zero(c)) - continue; - if ((!isl_int_is_one(c) && !isl_int_is_negone(c)) || - type != EQTYPE_NONE) { - type = EQTYPE_EXAFFINE; - break; - } - type = EQTYPE_PUREITEM; - } - for (i = 0; i < isl_constraint_dim(constraint, isl_dim_set); ++i) { - if (i == level - 1) - continue; - isl_constraint_get_coefficient(constraint, isl_dim_set, i, &c); - if (isl_int_is_zero(c)) - continue; - if ((!isl_int_is_one(c) && !isl_int_is_negone(c)) || - type != EQTYPE_NONE) { - type = EQTYPE_EXAFFINE; - break; - } - type = EQTYPE_PUREITEM; - } - for (i = 0; i < isl_constraint_dim(constraint, isl_dim_div); ++i) { - isl_constraint_get_coefficient(constraint, isl_dim_div, i, &c); - if (isl_int_is_zero(c)) - continue; - if ((!isl_int_is_one(c) && !isl_int_is_negone(c)) || - type != EQTYPE_NONE) { - type = EQTYPE_EXAFFINE; - break; - } - type = EQTYPE_PUREITEM; - } - isl_int_clear(c); - - if (type == EQTYPE_NONE) - type = EQTYPE_CONSTANT; - - return type; -} - - -int cloog_equal_type(CloogEqualities *equal, int level) -{ - return equal->types[level-1]; -} - - -/** - * cloog_equal_add function: - * This function updates the row (level-1) of the equality matrix (equal) with - * the row that corresponds to the row (line) of the matrix (matrix). - * - equal is the matrix of equalities, - * - matrix is the matrix of constraints, - * - level is the column number in matrix of the element which is 'equal to', - * - line is the line number in matrix of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - ** - * line is set to an invalid constraint for equalities that CLooG itself has - * discovered because the lower and upper bound of a loop happened to be equal. - * This situation shouldn't happen in the isl port since isl should - * have found the equality itself. - */ -void cloog_equal_add(CloogEqualities *equal, CloogConstraintSet *matrix, - int level, CloogConstraint *line, int nb_par) -{ - isl_constraint *c; - assert(cloog_constraint_is_valid(line)); - - equal->types[level-1] = cloog_constraint_equal_type(line, level); - c = cloog_constraint_to_isl(line); - equal->constraints[level - 1] = isl_constraint_copy(c); -} - - -/** - * cloog_equal_del function : - * This function reset the equality corresponding to the iterator (level) - * in the equality matrix (equal). - * - July 2nd 2002: first version. - */ -void cloog_equal_del(CloogEqualities *equal, int level) -{ - equal->types[level-1] = EQTYPE_NONE; - isl_constraint_free(equal->constraints[level - 1]); - equal->constraints[level-1] = NULL; -} - - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - -/** - * Function cloog_constraint_set_normalize: - * This function will modify the constraint system in such a way that when - * there is an equality depending on the element at level 'level', there are - * no more (in)equalities depending on this element. - * - * The simplified form of isl automatically satisfies this condition. - */ -void cloog_constraint_set_normalize(CloogConstraintSet *matrix, int level) -{ -} - - - -/** - * cloog_constraint_set_copy function: - * this functions builds and returns a "hard copy" (not a pointer copy) of a - * CloogConstraintSet data structure. - */ -CloogConstraintSet *cloog_constraint_set_copy(CloogConstraintSet *constraints) -{ - isl_basic_set *bset; - bset = cloog_constraints_set_to_isl(constraints); - return cloog_constraint_set_from_isl_basic_set(isl_basic_set_dup(bset)); -} - - -/** - * cloog_constraint_set_simplify function: - * this function simplify all constraints inside the matrix "matrix" thanks to - * an equality matrix "equal" that gives for some elements of the affine - * constraint an equality with other elements, preferably constants. - * For instance, if a row of the matrix contains i+j+3>=0 and the equality - * matrix gives i=n and j=2, the constraint is simplified to n+3>=0. The - * simplified constraints are returned back inside a new simplified matrix. - * - matrix is the set of constraints to simplify, - * - equal is the matrix of equalities, - * - level is a level we don't want to simplify (-1 if none), - * - nb_par is the number of parameters of the program. - ** - * isl should have performed these simplifications already in isl_set_gist. - */ -CloogConstraintSet *cloog_constraint_set_simplify(CloogConstraintSet *matrix, - CloogEqualities *equal, int level, int nb_par) -{ - return cloog_constraint_set_copy(matrix); -} - - -static struct cloog_isl_dim constraint_cloog_dim_to_isl_dim( - CloogConstraint *constraint, int pos) -{ - enum isl_dim_type types[] = { isl_dim_set, isl_dim_div, isl_dim_param }; - int i; - struct cloog_isl_dim ci_dim; - - for (i = 0; i < 3; ++i) { - isl_constraint *c = cloog_constraint_to_isl(constraint); - unsigned dim = isl_constraint_dim(c, types[i]); - if (pos < dim) { - ci_dim.type = types[i]; - ci_dim.pos = pos; - return ci_dim; - } - pos -= dim; - } - assert(0); -} - -static struct clast_expr *div_expr(CloogConstraint *constraint, int pos, - CloogNames *names) -{ - int i, nb_elts; - unsigned dim = cloog_constraint_total_dimension(constraint); - cloog_int_t c; - struct clast_reduction *r; - struct clast_expr *e = NULL; - isl_aff *div; - - div = isl_constraint_get_div(cloog_constraint_to_isl(constraint), pos); - - cloog_int_init(c); - for (i = 0, nb_elts = 0; i < dim; ++i) { - struct cloog_isl_dim dim; - - dim = constraint_cloog_dim_to_isl_dim(constraint, i); - if (dim.type == isl_dim_set) - dim.type = isl_dim_in; - isl_aff_get_coefficient(div, dim.type, dim.pos, &c); - if (!cloog_int_is_zero(c)) - ++nb_elts; - } - isl_aff_get_constant(div, &c); - if (!cloog_int_is_zero(c)) - ++nb_elts; - - r = new_clast_reduction(clast_red_sum, nb_elts); - for (i = 0, nb_elts = 0; i < dim; ++i) { - struct clast_expr *v; - struct cloog_isl_dim dim; - - dim = constraint_cloog_dim_to_isl_dim(constraint, i); - if (dim.type == isl_dim_set) - dim.type = isl_dim_in; - isl_aff_get_coefficient(div, dim.type, dim.pos, &c); - if (cloog_int_is_zero(c)) - continue; - - v = cloog_constraint_variable_expr(constraint, 1 + i, names); - - r->elts[nb_elts++] = &new_clast_term(c, v)->expr; - } - isl_aff_get_constant(div, &c); - if (!cloog_int_is_zero(c)) - r->elts[nb_elts++] = &new_clast_term(c, NULL)->expr; - - isl_aff_get_denominator(div, &c); - e = &new_clast_binary(clast_bin_fdiv, &r->expr, c)->expr; - - cloog_int_clear(c); - - isl_aff_free(div); - - return e; -} - -/** - * Return clast_expr corresponding to the variable "level" (1 based) in - * the given constraint. - */ -struct clast_expr *cloog_constraint_variable_expr(CloogConstraint *constraint, - int level, CloogNames *names) -{ - struct cloog_isl_dim dim; - const char *name; - - assert(constraint); - - dim = constraint_cloog_dim_to_isl_dim(constraint, level - 1); - if (dim.type == isl_dim_div) - return div_expr(constraint, dim.pos, names); - - if (dim.type == isl_dim_set) - name = cloog_names_name_at_level(names, level); - else - name = names->parameters[dim.pos]; - - return &new_clast_name(name)->expr; -} - - -/** - * Return true if constraint c involves variable v (zero-based). - */ -int cloog_constraint_involves(CloogConstraint *constraint, int v) -{ - isl_int c; - int res; - - isl_int_init(c); - cloog_constraint_coefficient_get(constraint, v, &c); - res = !isl_int_is_zero(c); - isl_int_clear(c); - return res; -} - -int cloog_constraint_is_lower_bound(CloogConstraint *constraint, int v) -{ - isl_int c; - int res; - - isl_int_init(c); - cloog_constraint_coefficient_get(constraint, v, &c); - res = isl_int_is_pos(c); - isl_int_clear(c); - return res; -} - -int cloog_constraint_is_upper_bound(CloogConstraint *constraint, int v) -{ - isl_int c; - int res; - - isl_int_init(c); - cloog_constraint_coefficient_get(constraint, v, &c); - res = isl_int_is_neg(c); - isl_int_clear(c); - return res; -} - -int cloog_constraint_is_equality(CloogConstraint *constraint) -{ - return isl_constraint_is_equality(cloog_constraint_to_isl(constraint)); -} - -CloogConstraintSet *cloog_constraint_set_drop_constraint( - CloogConstraintSet *constraints, CloogConstraint *constraint) -{ - isl_basic_set *bset; - isl_constraint *c; - - bset = cloog_constraints_set_to_isl(constraints); - c = cloog_constraint_to_isl(cloog_constraint_copy(constraint)); - bset = isl_basic_set_drop_constraint(bset, c); - return cloog_constraint_set_from_isl_basic_set(bset); -} - -void cloog_constraint_coefficient_get(CloogConstraint *constraint, - int var, cloog_int_t *val) -{ - struct cloog_isl_dim dim; - isl_constraint *c; - - if (!constraint) - return; - - dim = constraint_cloog_dim_to_isl_dim(constraint, var); - c = cloog_constraint_to_isl(constraint); - isl_constraint_get_coefficient(c, dim.type, dim.pos, val); -} - -void cloog_constraint_coefficient_set(CloogConstraint *constraint, - int var, cloog_int_t val) -{ - struct cloog_isl_dim dim; - isl_constraint *c; - - assert(constraint); - - dim = constraint_cloog_dim_to_isl_dim(constraint, var); - c = cloog_constraint_to_isl(constraint); - isl_constraint_set_coefficient(c, dim.type, dim.pos, val); -} - -void cloog_constraint_constant_get(CloogConstraint *constraint, cloog_int_t *val) -{ - isl_constraint_get_constant(cloog_constraint_to_isl(constraint), val); -} - -/** - * Copy the coefficient of constraint c into dst in PolyLib order, - * i.e., first the coefficients of the variables, then the coefficients - * of the parameters and finally the constant. - */ -void cloog_constraint_copy_coefficients(CloogConstraint *constraint, - cloog_int_t *dst) -{ - int i; - unsigned dim; - - dim = cloog_constraint_total_dimension(constraint); - - for (i = 0; i < dim; ++i) - cloog_constraint_coefficient_get(constraint, i, dst+i); - cloog_constraint_constant_get(constraint, dst+dim); -} - -CloogConstraint *cloog_constraint_invalid(void) -{ - return NULL; -} - -int cloog_constraint_is_valid(CloogConstraint *constraint) -{ - return constraint != NULL; -} - -int cloog_constraint_total_dimension(CloogConstraint *constraint) -{ - isl_constraint *c; - c = cloog_constraint_to_isl(constraint); - return isl_constraint_dim(c, isl_dim_all); -} - - -/** - * Check whether there is any need for the constraint "upper" on - * "level" to get reduced. - * In case of the isl backend, there should be no need to do so - * if the level corresponds to an existentially quantified variable. - * Moreover, the way reduction is performed does not work for such - * variables since its position might chance during the construction - * of a set for reduction. - */ -int cloog_constraint_needs_reduction(CloogConstraint *upper, int level) -{ - isl_basic_set *bset; - isl_constraint *c; - struct cloog_isl_dim dim; - - c = cloog_constraint_to_isl(upper); - bset = isl_basic_set_from_constraint(isl_constraint_copy(c)); - dim = basic_set_cloog_dim_to_isl_dim(bset, level - 1); - isl_basic_set_free(bset); - - return dim.type == isl_dim_set; -} - - -/** - * Create a CloogConstraintSet containing enough information to perform - * a reduction on the upper equality (in this case lower is an invalid - * CloogConstraint) or the pair of inequalities upper and lower - * from within insert_modulo_guard. - * In the isl backend, we return a CloogConstraintSet containing both - * bounds, as the stride may change during the reduction and we may - * need to recompute the bound on the modulo expression. - */ -CloogConstraintSet *cloog_constraint_set_for_reduction(CloogConstraint *upper, - CloogConstraint *lower) -{ - struct isl_basic_set *bset; - isl_constraint *c; - - c = cloog_constraint_to_isl(upper); - bset = isl_basic_set_from_constraint(isl_constraint_copy(c)); - if (cloog_constraint_is_valid(lower)) { - c = cloog_constraint_to_isl(lower); - bset = isl_basic_set_add_constraint(bset, - isl_constraint_copy(c)); - } - return cloog_constraint_set_from_isl_basic_set(bset); -} - - -static int add_constant_term(CloogConstraint *c, void *user) -{ - isl_int *bound = (isl_int *)user; - isl_int v; - - isl_int_init(v); - - cloog_constraint_constant_get(c, &v); - isl_int_add(*bound, *bound, v); - - isl_int_clear(v); - - return 0; -} - - -/* Return an isl_basic_set representation of the equality stored - * at position i in the given CloogEqualities. - */ -static __isl_give isl_basic_set *equality_to_basic_set(CloogEqualities *equal, - int i) -{ - isl_constraint *c; - isl_basic_set *bset; - unsigned nparam; - unsigned nvar; - - c = isl_constraint_copy(equal->constraints[i]); - bset = isl_basic_set_from_constraint(c); - nparam = isl_basic_set_dim(bset, isl_dim_param); - nvar = isl_basic_set_dim(bset, isl_dim_set); - bset = isl_basic_set_add(bset, isl_dim_set, - equal->total_dim - (nparam + nvar)); - return bset; -} - -/** - * Reduce the modulo guard expressed by "constraints" using equalities - * found in outer nesting levels (stored in "equal"). - * The modulo guard may be an equality or a pair of inequalities. - * In case of a pair of inequalities, *bound contains the bound on the - * corresponding modulo expression. If any reduction is performed - * then this bound is recomputed. - * - * "level" may not correspond to an existentially quantified variable. - * - * We first check if there are any equalities we can use. If not, - * there is again nothing to reduce. - * For the actual reduction, we use isl_basic_set_gist, but this - * function will only perform the reduction we want here if the - * the variable that imposes the modulo constraint has been projected - * out (i.e., turned into an existentially quantified variable). - * After the call to isl_basic_set_gist, we need to move the - * existential variable back into the position where the calling - * function expects it (assuming there are any constraints left). - * We do this by adding an equality between the given dimension and - * the existentially quantified variable. - * - * If there are no existentially quantified variables left, then - * we don't need to add this equality. - * If, on the other hand, the resulting basic set involves more - * than one existentially quantified variable, then the caller - * will not be able to handle the result, so we just return the - * original input instead. - */ -CloogConstraintSet *cloog_constraint_set_reduce(CloogConstraintSet *constraints, - int level, CloogEqualities *equal, int nb_par, cloog_int_t *bound) -{ - int j; - isl_space *idim; - struct isl_basic_set *eq; - struct isl_basic_map *id; - struct cloog_isl_dim dim; - struct isl_constraint *c; - unsigned constraints_dim; - unsigned n_div; - isl_basic_set *bset, *orig; - - bset = cloog_constraints_set_to_isl(constraints); - orig = isl_basic_set_copy(bset); - dim = set_cloog_dim_to_isl_dim(constraints, level - 1); - assert(dim.type == isl_dim_set); - - eq = NULL; - for (j = 0; j < level - 1; ++j) { - isl_basic_set *bset_j; - if (equal->types[j] != EQTYPE_EXAFFINE) - continue; - bset_j = equality_to_basic_set(equal, j); - if (!eq) - eq = bset_j; - else - eq = isl_basic_set_intersect(eq, bset_j); - } - if (!eq) { - isl_basic_set_free(orig); - return cloog_constraint_set_from_isl_basic_set(bset); - } - - idim = isl_space_map_from_set(isl_basic_set_get_space(bset)); - id = isl_basic_map_identity(idim); - id = isl_basic_map_remove_dims(id, isl_dim_out, dim.pos, 1); - bset = isl_basic_set_apply(bset, isl_basic_map_copy(id)); - bset = isl_basic_set_apply(bset, isl_basic_map_reverse(id)); - - constraints_dim = isl_basic_set_dim(bset, isl_dim_set); - eq = isl_basic_set_remove_dims(eq, isl_dim_set, constraints_dim, - isl_basic_set_dim(eq, isl_dim_set) - constraints_dim); - bset = isl_basic_set_gist(bset, eq); - n_div = isl_basic_set_dim(bset, isl_dim_div); - if (n_div > 1) { - isl_basic_set_free(bset); - return cloog_constraint_set_from_isl_basic_set(orig); - } - if (n_div < 1) { - isl_basic_set_free(orig); - return cloog_constraint_set_from_isl_basic_set(bset); - } - - c = isl_equality_alloc(isl_basic_set_get_local_space(bset)); - c = isl_constraint_set_coefficient_si(c, isl_dim_div, 0, 1); - c = isl_constraint_set_coefficient_si(c, isl_dim_set, dim.pos, -1); - bset = isl_basic_set_add_constraint(bset, c); - - isl_int_set_si(*bound, 0); - constraints = cloog_constraint_set_from_isl_basic_set(bset); - cloog_constraint_set_foreach_constraint(constraints, - add_constant_term, bound); - - isl_basic_set_free(orig); - return cloog_constraint_set_from_isl_basic_set(bset); -} - -CloogConstraint *cloog_constraint_copy(CloogConstraint *constraint) -{ - return cloog_constraint_from_isl_constraint( - isl_constraint_copy(cloog_constraint_to_isl(constraint))); -} - -void cloog_constraint_release(CloogConstraint *constraint) -{ - isl_constraint_free(cloog_constraint_to_isl(constraint)); -} - -struct cloog_isl_foreach { - int (*fn)(CloogConstraint *constraint, void *user); - void *user; -}; - -static int cloog_isl_foreach_cb(__isl_take isl_constraint *c, void *user) -{ - struct cloog_isl_foreach *data = (struct cloog_isl_foreach *)user; - int ret; - - if (isl_constraint_is_div_constraint(c)) { - isl_constraint_free(c); - return 0; - } - - ret = data->fn(cloog_constraint_from_isl_constraint(c), data->user); - - isl_constraint_free(c); - - return ret; -} - -int cloog_constraint_set_foreach_constraint(CloogConstraintSet *constraints, - int (*fn)(CloogConstraint *constraint, void *user), void *user) -{ - struct cloog_isl_foreach data = { fn, user }; - isl_basic_set *bset; - - bset = cloog_constraints_set_to_isl(constraints); - return isl_basic_set_foreach_constraint(bset, - cloog_isl_foreach_cb, &data); -} - -CloogConstraint *cloog_equal_constraint(CloogEqualities *equal, int j) -{ - isl_constraint *c; - - c = isl_constraint_copy(equal->constraints[j]); - return cloog_constraint_from_isl_constraint(c); -} - -/* Given a stride constraint on iterator i (specified by level) of the form - * - * i = f(outer iterators) + stride * f(existentials) - * - * extract f as an isl_aff. - */ -static isl_aff *extract_stride_offset(__isl_keep isl_constraint *c, - int level, CloogStride *stride) -{ - int i; - isl_space *dim = isl_constraint_get_space(c); - isl_local_space *ls = isl_local_space_from_space(dim); - isl_aff *offset = isl_aff_zero_on_domain(ls); - isl_int u; - unsigned nparam, nvar; - - isl_int_init(u); - - nparam = isl_constraint_dim(c, isl_dim_param); - nvar = isl_constraint_dim(c, isl_dim_set); - - for (i = 0; i < nparam; ++i) { - isl_constraint_get_coefficient(c, isl_dim_param, i, &u); - isl_int_mul(u, u, stride->factor); - offset = isl_aff_set_coefficient(offset, isl_dim_param, i, u); - } - for (i = 0; i < nvar; ++i) { - if (i == level - 1) - continue; - isl_constraint_get_coefficient(c, isl_dim_set, i, &u); - isl_int_mul(u, u, stride->factor); - offset = isl_aff_set_coefficient(offset, isl_dim_in, i, u); - } - isl_constraint_get_constant(c, &u); - isl_int_mul(u, u, stride->factor); - offset = isl_aff_set_constant(offset, u); - - isl_int_clear(u); - - return offset; -} - -/* Update the given lower bound on level such that it satisfies the stride - * constraint. The computation performed here is essentially the same - * as that performed in constraint_stride_lower_c. - * - * We update the constraint - * - * a i + f >= 0 - * - * to - * - * i >= s * ceil((-f/a - d)/s) + d - * - * with s the stride and d the offset encoded in the stride constraint. - */ -CloogConstraint *cloog_constraint_stride_lower_bound(CloogConstraint *c, - int level, CloogStride *stride) -{ - isl_constraint *stride_c = cloog_constraint_to_isl(stride->constraint); - isl_constraint *bound = cloog_constraint_to_isl(c); - isl_aff *offset; - isl_aff *lower; - - lower = isl_constraint_get_bound(bound, isl_dim_set, level - 1); - isl_constraint_free(bound); - - offset = extract_stride_offset(stride_c, level, stride); - - lower = isl_aff_sub(lower, isl_aff_copy(offset)); - lower = isl_aff_scale_down(lower, stride->stride); - lower = isl_aff_ceil(lower); - lower = isl_aff_scale(lower, stride->stride); - lower = isl_aff_add(lower, offset); - lower = isl_aff_neg(lower); - lower = isl_aff_add_coefficient_si(lower, isl_dim_in, level - 1, 1); - - bound = isl_inequality_from_aff(lower); - - return cloog_constraint_from_isl_constraint(bound); -} diff --git a/cloog-0.17.0/source/isl/domain.c b/cloog-0.17.0/source/isl/domain.c deleted file mode 100644 index 6c4d8dc869381aa236ca24d631f554e8c9d7077a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/isl/domain.c +++ /dev/null @@ -1,1913 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef OSL_SUPPORT -#include -#include -#endif - -CloogDomain *cloog_domain_from_isl_set(struct isl_set *set) -{ - if (isl_set_is_params(set)) - set = isl_set_from_params(set); - set = isl_set_detect_equalities(set); - set = isl_set_compute_divs(set); - return (CloogDomain *)set; -} - -__isl_give isl_set *isl_set_from_cloog_domain(CloogDomain *domain) -{ - return (isl_set *)domain; -} - -CloogScattering *cloog_scattering_from_isl_map(struct isl_map *map) -{ - return (CloogScattering *)map; -} - -__isl_give isl_map *isl_map_from_cloog_scattering(CloogScattering *scattering) -{ - return (isl_map *)scattering; -} - - -/** - * Returns true if each scattering dimension is defined in terms - * of the original iterators. - */ -int cloog_scattering_fully_specified(CloogScattering *scattering, - CloogDomain *domain) -{ - isl_map *map = isl_map_from_cloog_scattering(scattering); - return isl_map_is_single_valued(map); -} - - -CloogConstraintSet *cloog_domain_constraints(CloogDomain *domain) -{ - isl_basic_set *bset; - isl_set *set = isl_set_from_cloog_domain(domain); - assert(isl_set_n_basic_set(set) == 1); - bset = isl_set_copy_basic_set(set); - return cloog_constraint_set_from_isl_basic_set(bset); -} - - -void cloog_domain_print_constraints(FILE *foo, CloogDomain *domain, - int print_number) -{ - isl_basic_set *bset; - isl_set *set = isl_set_from_cloog_domain(domain); - - if (print_number) - isl_set_print(set, foo, 0, ISL_FORMAT_EXT_POLYLIB); - else { - assert(isl_set_n_basic_set(set) == 1); - bset = isl_set_copy_basic_set(set); - isl_basic_set_print(bset, foo, - 0, NULL, NULL, ISL_FORMAT_POLYLIB); - isl_basic_set_free(bset); - } -} - - -void cloog_scattering_print_constraints(FILE *foo, CloogScattering *scattering) -{ - isl_map *map = isl_map_from_cloog_scattering(scattering); - isl_map_print(map, foo, 0, ISL_FORMAT_EXT_POLYLIB); -} - - -void cloog_domain_free(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_set_free(set); -} - - -void cloog_scattering_free(CloogScattering *scatt) -{ - isl_map *map = isl_map_from_cloog_scattering(scatt); - isl_map_free(map); -} - - -CloogDomain * cloog_domain_copy(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return cloog_domain_from_isl_set(isl_set_copy(set)); -} - - -/** - * cloog_domain_convex function: - * Computes the convex hull of domain. - */ -CloogDomain *cloog_domain_convex(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - set = isl_set_from_basic_set(isl_set_convex_hull(isl_set_copy(set))); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_simple_convex: - * Given a list (union) of polyhedra, this function returns a "simple" - * convex hull of this union. In particular, the constraints of the - * the returned polyhedron consist of (parametric) lower and upper - * bounds on individual variables and constraints that appear in the - * original polyhedra. - */ -CloogDomain *cloog_domain_simple_convex(CloogDomain *domain) -{ - struct isl_basic_set *hull; - isl_set *set = isl_set_from_cloog_domain(domain); - - if (cloog_domain_isconvex(domain)) - return cloog_domain_copy(domain); - - hull = isl_set_bounded_simple_hull(isl_set_copy(set)); - return cloog_domain_from_isl_set(isl_set_from_basic_set(hull)); -} - - -/** - * cloog_domain_simplify function: - * Given two polyhedral domains (dom1) and (dom2), - * this function finds the largest domain set (or the smallest list - * of non-redundant constraints), that when intersected with polyhedral - * domain (dom2) equals (dom1)intersect(dom2). The output is a new CloogDomain - * structure with a polyhedral domain with the "redundant" constraints removed. - * NB: the second domain is required not to be a union. - */ -CloogDomain *cloog_domain_simplify(CloogDomain *dom1, CloogDomain *dom2) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - set1 = isl_set_gist(isl_set_copy(set1), isl_set_copy(set2)); - return cloog_domain_from_isl_set(set1); -} - - -/** - * cloog_domain_union function: - * This function returns a new polyhedral domain which is the union of - * two polyhedral domains (dom1) U (dom2). - * Frees dom1 and dom2; - */ -CloogDomain *cloog_domain_union(CloogDomain *dom1, CloogDomain *dom2) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - set1 = isl_set_union(set1, set2); - return cloog_domain_from_isl_set(set1); -} - - - -/** - * cloog_domain_intersection function: - * This function returns a new polyhedral domain which is the intersection of - * two polyhedral domains (dom1) \cap (dom2). - */ -CloogDomain *cloog_domain_intersection(CloogDomain *dom1, CloogDomain *dom2) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - set1 = isl_set_intersect(isl_set_copy(set1), isl_set_copy(set2)); - return cloog_domain_from_isl_set(set1); -} - - -/** - * cloog_domain_difference function: - * Returns the set difference domain \ minus. - */ -CloogDomain *cloog_domain_difference(CloogDomain *domain, CloogDomain *minus) -{ - isl_set *set1 = isl_set_from_cloog_domain(domain); - isl_set *set2 = isl_set_from_cloog_domain(minus); - set1 = isl_set_subtract(isl_set_copy(set1), isl_set_copy(set2)); - return cloog_domain_from_isl_set(set1); -} - - -/** - * cloog_domain_sort function: - * This function topologically sorts (nb_doms) domains. Here (doms) is an - * array of pointers to CloogDomains, (nb_doms) is the number of domains, - * (level) is the level to consider for partial ordering (nb_par) is the - * parameter space dimension, (permut) if not NULL, is an array of (nb_doms) - * integers that contains a permutation specification after call in order to - * apply the topological sorting. - */ -void cloog_domain_sort(CloogDomain **doms, unsigned nb_doms, unsigned level, - int *permut) -{ - int i, j, k, cmp; - struct isl_ctx *ctx; - unsigned char **follows; - isl_set *set_i, *set_j; - isl_basic_set *bset_i, *bset_j; - - if (!nb_doms) - return; - set_i = isl_set_from_cloog_domain(doms[0]); - ctx = isl_set_get_ctx(set_i); - for (i = 0; i < nb_doms; i++) { - set_i = isl_set_from_cloog_domain(doms[i]); - assert(isl_set_n_basic_set(set_i) == 1); - } - - follows = isl_alloc_array(ctx, unsigned char *, nb_doms); - assert(follows); - for (i = 0; i < nb_doms; ++i) { - follows[i] = isl_alloc_array(ctx, unsigned char, nb_doms); - assert(follows[i]); - for (j = 0; j < nb_doms; ++j) - follows[i][j] = 0; - } - - for (i = 1; i < nb_doms; ++i) { - for (j = 0; j < i; ++j) { - if (follows[i][j] || follows[j][i]) - continue; - set_i = isl_set_from_cloog_domain(doms[i]); - set_j = isl_set_from_cloog_domain(doms[j]); - bset_i = isl_set_copy_basic_set(set_i); - bset_j = isl_set_copy_basic_set(set_j); - cmp = isl_basic_set_compare_at(bset_i, bset_j, level-1); - isl_basic_set_free(bset_i); - isl_basic_set_free(bset_j); - if (!cmp) - continue; - if (cmp > 0) { - follows[i][j] = 1; - for (k = 0; k < i; ++k) - follows[i][k] |= follows[j][k]; - } else { - follows[j][i] = 1; - for (k = 0; k < i; ++k) - follows[k][i] |= follows[k][j]; - } - } - } - - for (i = 0, j = 0; i < nb_doms; j = (j + 1) % nb_doms) { - for (k = 0; k < nb_doms; ++k) - if (follows[j][k]) - break; - if (k < nb_doms) - continue; - for (k = 0; k < nb_doms; ++k) - follows[k][j] = 0; - follows[j][j] = 1; - permut[i] = 1 + j; - ++i; - } - - for (i = 0; i < nb_doms; ++i) - free(follows[i]); - free(follows); -} - - -/** - * Check whether there is or may be any value of dom1 at the given level - * that is greater than or equal to a value of dom2 at the same level. - * - * Return - * 1 is there is or may be a greater-than pair. - * 0 if there is no greater-than pair, but there may be an equal-to pair - * -1 if there is definitely no such pair - */ -int cloog_domain_follows(CloogDomain *dom1, CloogDomain *dom2, unsigned level) -{ - isl_set *set1 = isl_set_from_cloog_domain(dom1); - isl_set *set2 = isl_set_from_cloog_domain(dom2); - int follows; - - follows = isl_set_follows_at(set1, set2, level - 1); - assert(follows >= -1); - - return follows; -} - - -/** - * cloog_domain_empty function: - * Returns an empty domain of the same dimensions as template. - */ -CloogDomain *cloog_domain_empty(CloogDomain *template) -{ - isl_set *set = isl_set_from_cloog_domain(template); - return cloog_domain_from_isl_set(isl_set_empty_like(set)); -} - - -/** - * Return 1 if the specified dimension has both an upper and a lower bound. - */ -int cloog_domain_is_bounded(CloogDomain *dom, unsigned level) -{ - isl_set *set = isl_set_from_cloog_domain(dom); - return isl_set_dim_is_bounded(set, isl_dim_set, level - 1); -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_domain_print_structure : - * this function is a more human-friendly way to display the CloogDomain data - * structure, it only shows the constraint system and includes an indentation - * level (level) in order to work with others print_structure functions. - */ -void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level, - const char *name) -{ - int i ; - isl_set *set = isl_set_from_cloog_domain(domain); - - /* Go to the right level. */ - for (i = 0; i < level; i++) - fprintf(file, "|\t"); - - if (!set) { - fprintf(file, "+-- Null CloogDomain\n"); - return; - } - fprintf(file, "+-- %s\n", name); - for (i = 0; i < level+1; ++i) - fprintf(file, "|\t"); - - isl_set_print(set, file, 0, ISL_FORMAT_ISL); - - fprintf(file, "\n"); -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -void cloog_domain_list_free(CloogDomainList *list) -{ - CloogDomainList *next; - - for ( ; list; list = next) { - next = list->next; - cloog_domain_free(list->domain); - free(list); - } -} - - -/** - * cloog_scattering_list_free function: - * This function frees the allocated memory for a CloogScatteringList structure. - */ -void cloog_scattering_list_free(CloogScatteringList *list) -{ - while (list != NULL) { - CloogScatteringList *temp = list->next; - isl_map *map = isl_map_from_cloog_scattering(list->scatt); - isl_map_free(map); - free(list); - list = temp; - } -} - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ - - -/** - * cloog_domain_read_context function: - * Read parameter domain. - */ -CloogDomain *cloog_domain_read_context(CloogState *state, FILE *input) -{ - struct isl_ctx *ctx = state->backend->ctx; - isl_set *set; - - set = isl_set_read_from_file(ctx, input); - set = isl_set_move_dims(set, isl_dim_param, 0, - isl_dim_set, 0, isl_set_dim(set, isl_dim_set)); - - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_from_context - * Reinterpret context by turning parameters into variables. - */ -CloogDomain *cloog_domain_from_context(CloogDomain *context) -{ - isl_set *set = isl_set_from_cloog_domain(context); - - set = isl_set_move_dims(set, isl_dim_set, 0, - isl_dim_param, 0, isl_set_dim(set, isl_dim_param)); - - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_union_read function: - * This function reads a union of polyhedra into a file (input) and - * returns a pointer to a CloogDomain containing the read information. - */ -CloogDomain *cloog_domain_union_read(CloogState *state, - FILE *input, int nb_parameters) -{ - struct isl_ctx *ctx = state->backend->ctx; - struct isl_set *set; - - set = isl_set_read_from_file(ctx, input); - if (isl_set_dim(set, isl_dim_param) != nb_parameters) { - int dim = isl_set_dim(set, isl_dim_set); - set = isl_set_move_dims(set, isl_dim_param, 0, - isl_dim_set, dim - nb_parameters, nb_parameters); - } - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_read_scattering function: - * This function reads in a scattering function from the file input. - * - * We try to read the scattering relation as a map, but if it is - * specified in the original PolyLib format, then isl_map_read_from_file - * will treat the input as a set return a map with zero input dimensions. - * In this case, we need to decompose the set into a map from - * scattering dimensions to domain dimensions and then invert the - * resulting map. - */ -CloogScattering *cloog_domain_read_scattering(CloogDomain *domain, FILE *input) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_ctx *ctx = isl_set_get_ctx(set); - struct isl_map *scat; - unsigned nparam; - unsigned dim; - unsigned n_scat; - - dim = isl_set_dim(set, isl_dim_set); - nparam = isl_set_dim(set, isl_dim_param); - scat = isl_map_read_from_file(ctx, input); - if (isl_map_dim(scat, isl_dim_param) != nparam) { - int n_out = isl_map_dim(scat, isl_dim_out); - scat = isl_map_move_dims(scat, isl_dim_param, 0, - isl_dim_out, n_out - nparam, nparam); - } - if (isl_map_dim(scat, isl_dim_in) != dim) { - n_scat = isl_map_dim(scat, isl_dim_out) - dim; - scat = isl_map_move_dims(scat, isl_dim_in, 0, - isl_dim_out, n_scat, dim); - } - return cloog_scattering_from_isl_map(scat); -} - -/****************************************************************************** - * CloogMatrix Reading function * - ******************************************************************************/ - -/** - * isl_constraint_read_from_matrix: - * Convert a single line of a matrix to a isl_constraint. - * Returns a pointer to the constraint if successful; NULL otherwise. - */ -static struct isl_constraint *isl_constraint_read_from_matrix( - struct isl_space *dim, cloog_int_t *row) -{ - struct isl_constraint *constraint; - int j; - int nvariables = isl_space_dim(dim, isl_dim_set); - int nparam = isl_space_dim(dim, isl_dim_param); - isl_local_space *ls = isl_local_space_from_space(dim); - - if (cloog_int_is_zero(row[0])) - constraint = isl_equality_alloc(ls); - else - constraint = isl_inequality_alloc(ls); - - for (j = 0; j < nvariables; ++j) - isl_constraint_set_coefficient(constraint, isl_dim_out, j, - row[1 + j]); - - for (j = 0; j < nparam; ++j) - isl_constraint_set_coefficient(constraint, isl_dim_param, j, - row[1 + nvariables + j]); - - isl_constraint_set_constant(constraint, row[1 + nvariables + nparam]); - - return constraint; -} - -/** - * isl_basic_set_read_from_matrix: - * Convert matrix to basic_set. The matrix contains nparam parameter columns. - * Returns a pointer to the basic_set if successful; NULL otherwise. - */ -static struct isl_basic_set *isl_basic_set_read_from_matrix(struct isl_ctx *ctx, - CloogMatrix* matrix, int nparam) -{ - struct isl_space *dim; - struct isl_basic_set *bset; - int i; - unsigned nrows, ncolumns; - - nrows = matrix->NbRows; - ncolumns = matrix->NbColumns; - int nvariables = ncolumns - 2 - nparam; - - dim = isl_space_set_alloc(ctx, nparam, nvariables); - - bset = isl_basic_set_universe(isl_space_copy(dim)); - - for (i = 0; i < nrows; ++i) { - cloog_int_t *row = matrix->p[i]; - struct isl_constraint *constraint = - isl_constraint_read_from_matrix(isl_space_copy(dim), row); - bset = isl_basic_set_add_constraint(bset, constraint); - } - - isl_space_free(dim); - - return bset; -} - -/** - * cloog_domain_from_cloog_matrix: - * Create a CloogDomain containing the constraints described in matrix. - * nparam is the number of parameters contained in the domain. - * Returns a pointer to the CloogDomain if successful; NULL otherwise. - */ -CloogDomain *cloog_domain_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nparam) -{ - struct isl_ctx *ctx = state->backend->ctx; - struct isl_basic_set *bset; - - bset = isl_basic_set_read_from_matrix(ctx, matrix, nparam); - - return cloog_domain_from_isl_set(isl_set_from_basic_set(bset)); -} - -/** - * cloog_scattering_from_cloog_matrix: - * Create a CloogScattering containing the constraints described in matrix. - * nparam is the number of parameters contained in the domain. - * Returns a pointer to the CloogScattering if successful; NULL otherwise. - */ -CloogScattering *cloog_scattering_from_cloog_matrix(CloogState *state, - CloogMatrix *matrix, int nb_scat, int nb_par) -{ - struct isl_ctx *ctx = state->backend->ctx; - struct isl_basic_set *bset; - struct isl_basic_map *scat; - struct isl_space *dims; - unsigned dim; - - bset = isl_basic_set_read_from_matrix(ctx, matrix, nb_par); - dim = isl_basic_set_n_dim(bset) - nb_scat; - dims = isl_space_alloc(ctx, nb_par, nb_scat, dim); - - scat = isl_basic_map_from_basic_set(bset, dims); - scat = isl_basic_map_reverse(scat); - return cloog_scattering_from_isl_map(isl_map_from_basic_map(scat)); -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -#ifdef OSL_SUPPORT -/** - * Converts an openscop relation to a CLooG domain. - * \param[in,out] state CLooG state. - * \param[in] relation OpenScop relation to convert. - * \return A new CloogDomain corresponding to the input OpenScop relation. - */ -CloogDomain *cloog_domain_from_osl_relation(CloogState *state, - osl_relation_p relation) { - char *str; - struct isl_ctx *ctx = state->backend->ctx; - isl_set *set; - CloogDomain *domain = NULL; - - if (relation != NULL) { - if (relation->precision != OSL_PRECISION_MP) - cloog_die("Non-GMP precision is not supported yet.\n"); - - str = osl_relation_spprint_polylib(relation, NULL); - set = isl_set_read_from_str(ctx, str); - free(str); - - domain = cloog_domain_from_isl_set(set); - } - - return domain; -} - - -/** - * Converts an openscop scattering relation to a CLooG scattering. - * \param[in,out] state CLooG state. - * \param[in] relation OpenScop relation to convert. - * \return A new CloogScattering corresponding to the input OpenScop relation. - */ -CloogScattering *cloog_scattering_from_osl_relation(CloogState *state, - osl_relation_p relation) { - char *str; - struct isl_ctx *ctx = state->backend->ctx; - isl_map *map; - CloogScattering *scattering = NULL; - - if (relation != NULL) { - if (relation->precision != OSL_PRECISION_MP) - cloog_die("Non-GMP precision is not supported yet.\n"); - - if (relation->type != OSL_TYPE_SCATTERING) - cloog_die("Cannot convert a non-scattering relation to a scattering.\n"); - - str = osl_relation_spprint_polylib(relation, NULL); - map = isl_map_read_from_str(ctx, str); - free(str); - - scattering = cloog_scattering_from_isl_map(map); - } - - return scattering; -} -#endif - -/** - * cloog_domain_isempty function: - */ -int cloog_domain_isempty(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_is_empty(set); -} - - -/** - * cloog_domain_universe function: - * This function returns the complete dim-dimensional space. - */ -CloogDomain *cloog_domain_universe(CloogState *state, unsigned dim) -{ - struct isl_space *dims; - struct isl_basic_set *bset; - - dims = isl_space_set_alloc(state->backend->ctx, 0, dim); - bset = isl_basic_set_universe(dims); - return cloog_domain_from_isl_set(isl_set_from_basic_set(bset)); -} - - -/** - * cloog_domain_project function: - * This function returns the projection of - * (domain) on the (level) first dimensions (i.e. outer loops). - */ -CloogDomain *cloog_domain_project(CloogDomain *domain, int level) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - set = isl_set_remove_dims(isl_set_copy(set), isl_dim_set, - level, isl_set_n_dim(set) - level); - set = isl_set_compute_divs(set); - if (level > 0) - set = isl_set_remove_divs_involving_dims(set, - isl_dim_set, level - 1, 1); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_extend function: - * This function returns the (domain) given as input with (dim) - * dimensions and (nb_par) parameters. - * This function does not free (domain), and returns a new CloogDomain. - */ -CloogDomain *cloog_domain_extend(CloogDomain *domain, int dim) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - int n = isl_set_dim(set, isl_dim_set); - set = isl_set_add_dims(isl_set_copy(set), isl_dim_set, dim - n); - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_never_integral function: - * For us, an equality like 3*i -4 = 0 is always false since 4%3 != 0. - * There is no need to check for such constraints explicitly for the isl - * backend. - */ -int cloog_domain_never_integral(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_is_empty(set); -} - - -/** - * Check whether the loop at "level" is executed at most once. - * We construct a map that maps all remaining variables to this iterator - * and check whether this map is single valued. - * - * Alternatively, we could have mapped the domain through a mapping - * [p] -> { [..., i] -> [..., i'] : i' > i } - * and then taken the intersection of the original domain and the transformed - * domain. If this intersection is empty, then the corresponding - * loop is executed at most once. - */ -int cloog_domain_is_otl(CloogDomain *domain, int level) -{ - int otl; - isl_set *set = isl_set_from_cloog_domain(domain); - isl_map *map; - - map = isl_map_from_domain(isl_set_copy(set)); - map = isl_map_move_dims(map, isl_dim_out, 0, isl_dim_in, level - 1, 1); - otl = isl_map_is_single_valued(map); - isl_map_free(map); - - return otl; -} - - -/** - * cloog_domain_stride function: - * This function finds the stride imposed to unknown with the column number - * 'strided_level' in order to be integral. For instance, if we have a - * constraint like -i - 2j + 2k = 0, and we consider k, then k can be integral - * only if (i + 2j)%2 = 0. Then only if i%2 = 0. Then k imposes a stride 2 to - * the unknown i. The function returns the imposed stride in a parameter field. - * - domain is the set of constraint we have to consider, - * - strided_level is the column number of the unknown for which a stride have - * to be found, - * - looking_level is the column number of the unknown that impose a stride to - * the first unknown. - * - stride is the stride that is returned back as a function parameter. - * - offset is the value of the constant c if the condition is of the shape - * (i + c)%s = 0, s being the stride. - */ -void cloog_domain_stride(CloogDomain *domain, int strided_level, - cloog_int_t *stride, cloog_int_t *offset) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_set_dim_residue_class(set, strided_level - 1, stride, offset); - if (!isl_int_is_zero(*offset)) - isl_int_sub(*offset, *stride, *offset); - return; -} - - -struct cloog_can_stride { - int level; - int can_stride; -}; - -static int constraint_can_stride(__isl_take isl_constraint *c, void *user) -{ - struct cloog_can_stride *ccs = (struct cloog_can_stride *)user; - int i; - isl_int v; - unsigned n_div; - - if (isl_constraint_is_equality(c)) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, ccs->level - 1, &v); - if (isl_int_is_pos(v)) { - n_div = isl_constraint_dim(c, isl_dim_div); - for (i = 0; i < n_div; ++i) { - isl_constraint_get_coefficient(c, isl_dim_div, i, &v); - if (!isl_int_is_zero(v)) - break; - } - if (i < n_div) - ccs->can_stride = 0; - } - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - -static int basic_set_can_stride(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_can_stride *ccs = (struct cloog_can_stride *)user; - int r; - - r = isl_basic_set_foreach_constraint(bset, constraint_can_stride, ccs); - isl_basic_set_free(bset); - return r; -} - - -/** - * Return 1 if CLooG is allowed to perform stride detection on level "level" - * and 0 otherwise. - * Currently, stride detection is only allowed when none of the lower - * bound constraints involve any existentially quantified variables. - * The reason is that the current isl interface does not make it - * easy to construct an integer division that depends on other integer - * divisions. - * By not allowing existentially quantified variables in the constraints, - * we can ignore them in cloog_domain_stride_lower_bound. - */ -int cloog_domain_can_stride(CloogDomain *domain, int level) -{ - struct cloog_can_stride ccs = { level, 1 }; - isl_set *set = isl_set_from_cloog_domain(domain); - int r; - r = isl_set_foreach_basic_set(set, basic_set_can_stride, &ccs); - assert(r == 0); - return ccs.can_stride; -} - - -struct cloog_stride_lower { - int level; - CloogStride *stride; - isl_set *set; - isl_basic_set *bounds; -}; - -/* If the given constraint is a lower bound on csl->level, then add - * a lower bound to csl->bounds that makes sure that the remainder - * of the smallest value on division by csl->stride is equal to csl->offset. - * - * In particular, the given lower bound is of the form - * - * a i + f >= 0 - * - * where f may depend on the parameters and other iterators. - * The stride is s and the offset is d. - * The lower bound -f/a may not satisfy the above condition. In fact, - * it may not even be integral. We want to round this value of i up - * to the nearest value that satisfies the condition and add the corresponding - * lower bound constraint. This nearest value is obtained by rounding - * i - d up to the nearest multiple of s. - * That is, we first subtract d - * - * i' = -f/a - d - * - * then we round up to the nearest multiple of s - * - * i'' = s * ceil(i'/s) - * - * and finally, we add d again - * - * i''' = i'' + d - * - * and impose the constraint i >= i'''. - * - * We find - * - * i'' = s * ceil((-f - a * d)/(a * s)) = - s * floor((f + a * d)/(a * s)) - * - * i >= - s * floor((f + a * d)/(a * s)) + d - * - * or - * i + s * floor((f + a * d)/(a * s)) - d >= 0 - */ -static int constraint_stride_lower(__isl_take isl_constraint *c, void *user) -{ - struct cloog_stride_lower *csl = (struct cloog_stride_lower *)user; - isl_int v; - isl_constraint *bound; - isl_aff *b; - - if (isl_constraint_is_equality(c)) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, csl->level - 1, &v); - if (!isl_int_is_pos(v)) { - isl_int_clear(v); - isl_constraint_free(c); - - return 0; - } - - b = isl_constraint_get_bound(c, isl_dim_set, csl->level - 1); - - b = isl_aff_neg(b); - b = isl_aff_add_constant(b, csl->stride->offset); - b = isl_aff_scale_down(b, csl->stride->stride); - b = isl_aff_floor(b); - b = isl_aff_scale(b, csl->stride->stride); - isl_int_neg(v, csl->stride->offset); - b = isl_aff_add_constant(b, v); - b = isl_aff_add_coefficient_si(b, isl_dim_in, csl->level - 1, 1); - - bound = isl_inequality_from_aff(b); - - csl->bounds = isl_basic_set_add_constraint(csl->bounds, bound); - - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - -/* This functions performs essentially the same operation as - * constraint_stride_lower, the only difference being that the offset d - * is not a constant, but an affine expression in terms of the parameters - * and earlier variables. In particular the affine expression is equal - * to the coefficients of stride->constraint multiplied by stride->factor. - * As in constraint_stride_lower, we add an extra bound - * - * i + s * floor((f + a * d)/(a * s)) - d >= 0 - * - * for each lower bound - * - * a i + f >= 0 - * - * where d is not the aforementioned affine expression. - */ -static int constraint_stride_lower_c(__isl_take isl_constraint *c, void *user) -{ - struct cloog_stride_lower *csl = (struct cloog_stride_lower *)user; - isl_int v; - isl_constraint *bound; - isl_constraint *csl_c; - isl_aff *d, *b; - - if (isl_constraint_is_equality(c)) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, csl->level - 1, &v); - if (!isl_int_is_pos(v)) { - isl_int_clear(v); - isl_constraint_free(c); - - return 0; - } - - csl_c = cloog_constraint_to_isl(csl->stride->constraint); - - d = isl_constraint_get_aff(csl_c); - d = isl_aff_drop_dims(d, isl_dim_div, 0, isl_aff_dim(d, isl_dim_div)); - d = isl_aff_set_coefficient_si(d, isl_dim_in, csl->level - 1, 0); - d = isl_aff_scale(d, csl->stride->factor); - - b = isl_constraint_get_bound(c, isl_dim_set, csl->level - 1); - - b = isl_aff_neg(b); - b = isl_aff_add(b, isl_aff_copy(d)); - b = isl_aff_scale_down(b, csl->stride->stride); - b = isl_aff_floor(b); - b = isl_aff_scale(b, csl->stride->stride); - b = isl_aff_sub(b, d); - b = isl_aff_add_coefficient_si(b, isl_dim_in, csl->level - 1, 1); - - bound = isl_inequality_from_aff(b); - - csl->bounds = isl_basic_set_add_constraint(csl->bounds, bound); - - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - -static int basic_set_stride_lower(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_stride_lower *csl = (struct cloog_stride_lower *)user; - int r; - - csl->bounds = isl_basic_set_universe_like(bset); - if (csl->stride->constraint) - r = isl_basic_set_foreach_constraint(bset, - &constraint_stride_lower_c, csl); - else - r = isl_basic_set_foreach_constraint(bset, - &constraint_stride_lower, csl); - bset = isl_basic_set_intersect(bset, csl->bounds); - csl->set = isl_set_union(csl->set, isl_set_from_basic_set(bset)); - - return r; -} - -/** - * Update the lower bounds at level "level" to the given stride information. - * That is, make sure that the remainder on division by "stride" - * is equal to "offset". - */ -CloogDomain *cloog_domain_stride_lower_bound(CloogDomain *domain, int level, - CloogStride *stride) -{ - struct cloog_stride_lower csl; - isl_set *set = isl_set_from_cloog_domain(domain); - int r; - - csl.stride = stride; - csl.level = level; - csl.set = isl_set_empty_like(set); - - r = isl_set_foreach_basic_set(set, basic_set_stride_lower, &csl); - assert(r == 0); - - cloog_domain_free(domain); - return cloog_domain_from_isl_set(csl.set); -} - - -/* Add stride constraint, if any, to domain. - */ -CloogDomain *cloog_domain_add_stride_constraint(CloogDomain *domain, - CloogStride *stride) -{ - isl_constraint *c; - isl_set *set; - - if (!stride || !stride->constraint) - return domain; - - set = isl_set_from_cloog_domain(domain); - c = isl_constraint_copy(cloog_constraint_to_isl(stride->constraint)); - - set = isl_set_add_constraint(set, c); - - return cloog_domain_from_isl_set(set); -} - - -/** - * cloog_domain_lazy_equal function: - * This function returns 1 if the domains given as input are the same, 0 if it - * is unable to decide. - */ -int cloog_domain_lazy_equal(CloogDomain *d1, CloogDomain *d2) -{ - isl_set *set1 = isl_set_from_cloog_domain(d1); - isl_set *set2 = isl_set_from_cloog_domain(d2); - return isl_set_fast_is_equal(set1, set2); -} - -struct cloog_bound_split { - isl_set *set; - int level; - int lower; - int upper; -}; - -static int constraint_bound_split(__isl_take isl_constraint *c, void *user) -{ - struct cloog_bound_split *cbs = (struct cloog_bound_split *)user; - isl_int v; - int i; - int handle = 0; - - isl_int_init(v); - isl_constraint_get_coefficient(c, isl_dim_set, cbs->level - 1, &v); - if (!cbs->lower && isl_int_is_pos(v)) - cbs->lower = handle = 1; - else if (!cbs->upper && isl_int_is_neg(v)) - cbs->upper = handle = 1; - if (handle) { - for (i = 0; i < isl_set_dim(cbs->set, isl_dim_param); ++i) { - isl_constraint_get_coefficient(c, isl_dim_param, i, &v); - if (isl_int_is_zero(v)) - continue; - cbs->set = isl_set_split_dims(cbs->set, - isl_dim_param, i, 1); - } - } - isl_int_clear(v); - isl_constraint_free(c); - - return (cbs->lower && cbs->upper) ? -1 : 0; -} - -static int basic_set_bound_split(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_bound_split *cbs = (struct cloog_bound_split *)user; - int r; - - cbs->lower = 0; - cbs->upper = 0; - r = isl_basic_set_foreach_constraint(bset, constraint_bound_split, cbs); - isl_basic_set_free(bset); - return ((!cbs->lower || !cbs->upper) && r < 0) ? -1 : 0; -} - -/** - * Return a union of sets S_i such that the convex hull of "dom", - * when intersected with one the sets S_i, will have an upper and - * lower bound for the dimension at "level" (provided "dom" itself - * has such bounds for the dimensions). - * - * We currently take a very simple approach. For each of the basic - * sets in "dom" we pick a lower and an upper bound and split the - * range of any parameter involved in these two bounds in a - * nonnegative and a negative part. This ensures that the symbolic - * constant in these two constraints are themselves bounded and - * so there will be at least one upper and one lower bound - * in the convex hull. - */ -CloogDomain *cloog_domain_bound_splitter(CloogDomain *dom, int level) -{ - struct cloog_bound_split cbs; - isl_set *set = isl_set_from_cloog_domain(dom); - int r; - cbs.level = level; - cbs.set = isl_set_universe_like(set); - r = isl_set_foreach_basic_set(set, basic_set_bound_split, &cbs); - assert(r == 0); - return cloog_domain_from_isl_set(cbs.set); -} - - -/* Check whether the union of scattering functions over all domains - * is obviously injective. - */ -static int injective_scattering(CloogScatteringList *list) -{ - isl_map *map; - isl_union_map *umap; - int injective; - int i = 0; - char name[30]; - - if (!list) - return 1; - - map = isl_map_copy(isl_map_from_cloog_scattering(list->scatt)); - snprintf(name, sizeof(name), "S%d", i); - map = isl_map_set_tuple_name(map, isl_dim_in, name); - umap = isl_union_map_from_map(map); - - for (list = list->next, ++i; list; list = list->next, ++i) { - map = isl_map_copy(isl_map_from_cloog_scattering(list->scatt)); - snprintf(name, sizeof(name), "S%d", i); - map = isl_map_set_tuple_name(map, isl_dim_in, name); - umap = isl_union_map_add_map(umap, map); - } - - injective = isl_union_map_plain_is_injective(umap); - - isl_union_map_free(umap); - - return injective; -} - - -/** - * cloog_scattering_lazy_block function: - * This function returns 1 if the two scattering functions s1 and s2 given - * as input are the same (except possibly for the final dimension, where we - * allow a difference of 1), assuming that the domains on which this - * scatterings are applied are the same. - * In fact this function answers the question "can I - * safely consider the two domains as only one with two statements (a block) ?". - * A difference of 1 in the final dimension is only allowed if the - * entire scattering function is injective. - * - s1 and s2 are the two domains to check for blocking, - * - scattering is the linked list of all domains, - * - scattdims is the total number of scattering dimentions. - */ -int cloog_scattering_lazy_block(CloogScattering *s1, CloogScattering *s2, - CloogScatteringList *scattering, int scattdims) -{ - int i; - struct isl_space *dim; - struct isl_map *rel; - struct isl_set *delta; - isl_map *map1 = isl_map_from_cloog_scattering(s1); - isl_map *map2 = isl_map_from_cloog_scattering(s2); - int fixed, block; - isl_int cst; - unsigned n_scat; - - n_scat = isl_map_dim(map1, isl_dim_out); - if (n_scat != isl_map_dim(map2, isl_dim_out)) - return 0; - - dim = isl_map_get_space(map1); - dim = isl_space_map_from_set(isl_space_domain(dim)); - rel = isl_map_identity(dim); - rel = isl_map_apply_domain(rel, isl_map_copy(map1)); - rel = isl_map_apply_range(rel, isl_map_copy(map2)); - delta = isl_map_deltas(rel); - isl_int_init(cst); - for (i = 0; i < n_scat; ++i) { - fixed = isl_set_fast_dim_is_fixed(delta, i, &cst); - if (fixed != 1) - break; - if (isl_int_is_zero(cst)) - continue; - if (i + 1 < n_scat) - break; - if (!isl_int_is_one(cst)) - break; - if (!injective_scattering(scattering)) - break; - } - block = i >= n_scat; - isl_int_clear(cst); - isl_set_free(delta); - return block; -} - - -/** - * cloog_domain_lazy_disjoint function: - * This function returns 1 if the domains given as input are disjoint, 0 if it - * is unable to decide. - */ -int cloog_domain_lazy_disjoint(CloogDomain *d1, CloogDomain *d2) -{ - isl_set *set1 = isl_set_from_cloog_domain(d1); - isl_set *set2 = isl_set_from_cloog_domain(d2); - return isl_set_fast_is_disjoint(set1, set2); -} - - -/** - * cloog_scattering_list_lazy_same function: - * This function returns 1 if two domains in the list are the same, 0 if it - * is unable to decide. - */ -int cloog_scattering_list_lazy_same(CloogScatteringList *list) -{ - CloogScatteringList *one, *other; - isl_map *one_map, *other_map; - - for (one = list; one; one = one->next) { - one_map = isl_map_from_cloog_scattering(one->scatt); - for (other = one->next; other; other = other->next) { - other_map = isl_map_from_cloog_scattering(other->scatt); - if (isl_map_fast_is_equal(one_map, other_map)) - return 1; - } - } - return 0; -} - -int cloog_domain_dimension(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_dim(set, isl_dim_set); -} - -int cloog_domain_parameter_dimension(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_dim(set, isl_dim_param); -} - -int cloog_scattering_dimension(CloogScattering *scatt, CloogDomain *domain) -{ - isl_map *map = isl_map_from_cloog_scattering(scatt); - return isl_map_dim(map, isl_dim_out); -} - -int cloog_domain_isconvex(CloogDomain * domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_n_basic_set(set) <= 1; -} - - -/** - * cloog_domain_cut_first function: - * This function splits off and returns the first convex set in the - * union "domain". The remainder of the union is returned in rest. - * The original "domain" itself is destroyed and may not be used - * after a call to this function. - */ -CloogDomain *cloog_domain_cut_first(CloogDomain *domain, CloogDomain **rest) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - struct isl_basic_set *first; - - first = isl_set_copy_basic_set(set); - set = isl_set_drop_basic_set(set, first); - *rest = cloog_domain_from_isl_set(set); - - return cloog_domain_from_isl_set(isl_set_from_basic_set(first)); -} - - -/** - * Given a union domain, try to find a simpler representation - * using fewer sets in the union. - * The original "domain" itself is destroyed and may not be used - * after a call to this function. - */ -CloogDomain *cloog_domain_simplify_union(CloogDomain *domain) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return cloog_domain_from_isl_set(isl_set_coalesce(set)); -} - - -/** - * cloog_scattering_lazy_isscalar function: - * this function returns 1 if the scattering dimension 'dimension' in the - * scattering 'scatt' is constant. - * If value is not NULL, then it is set to the constant value of dimension. - */ -int cloog_scattering_lazy_isscalar(CloogScattering *scatt, int dimension, - cloog_int_t *value) -{ - isl_map *map = isl_map_from_cloog_scattering(scatt); - return isl_map_fast_is_fixed(map, isl_dim_out, dimension, value); -} - - -/** - * cloog_domain_lazy_isconstant function: - * this function returns 1 if the dimension 'dimension' in the - * domain 'domain' is constant. - * If value is not NULL, then it is set to the constant value of dimension. - */ -int cloog_domain_lazy_isconstant(CloogDomain *domain, int dimension, - cloog_int_t *value) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - return isl_set_fast_dim_is_fixed(set, dimension, value); -} - - -/** - * cloog_scattering_erase_dimension function: - * this function returns a CloogDomain structure builds from 'domain' where - * we removed the dimension 'dimension' and every constraint involving this - * dimension. - */ -CloogScattering *cloog_scattering_erase_dimension(CloogScattering *scattering, - int dimension) -{ - isl_map *map = isl_map_from_cloog_scattering(scattering); - map = isl_map_remove_dims(isl_map_copy(map), isl_dim_out, dimension, 1); - return cloog_scattering_from_isl_map(map); -} - -/** - * cloog_domain_cube: - * Construct and return a dim-dimensional cube, with values ranging - * between min and max in each dimension. - */ -CloogDomain *cloog_domain_cube(CloogState *state, - int dim, cloog_int_t min, cloog_int_t max) -{ - int i; - struct isl_basic_set *cube; - struct isl_basic_set *interval; - struct isl_basic_set_list *list; - - if (dim == 0) - return cloog_domain_universe(state, dim); - - interval = isl_basic_set_interval(state->backend->ctx, min, max); - list = isl_basic_set_list_alloc(state->backend->ctx, dim); - for (i = 0; i < dim; ++i) - list = isl_basic_set_list_add(list, isl_basic_set_copy(interval)); - isl_basic_set_free(interval); - cube = isl_basic_set_list_product(list); - return cloog_domain_from_isl_set(isl_set_from_basic_set(cube)); -} - - -/** - * cloog_domain_scatter function: - * This function add the scattering (scheduling) informations to a domain. - */ -CloogDomain *cloog_domain_scatter(CloogDomain *domain, CloogScattering *scatt) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - isl_map *map = isl_map_from_cloog_scattering(scatt); - - map = isl_map_reverse(isl_map_copy(map)); - map = isl_map_intersect_range(map, set); - set = isl_set_flatten(isl_map_wrap(map)); - return cloog_domain_from_isl_set(set); -} - -static int add_domain_from_map(__isl_take isl_map *map, void *user) -{ - isl_space *dim; - const char *name; - CloogDomain *domain; - CloogScattering *scat; - CloogUnionDomain **ud = (CloogUnionDomain **)user; - - dim = isl_map_get_space(map); - name = isl_space_get_tuple_name(dim, isl_dim_in); - domain = cloog_domain_from_isl_set(isl_map_domain(isl_map_copy(map))); - scat = cloog_scattering_from_isl_map(map); - *ud = cloog_union_domain_add_domain(*ud, name, domain, scat, NULL); - isl_space_free(dim); - - return 0; -} - -/** - * Construct a CloogUnionDomain from an isl_union_map representing - * a global scattering function. The input is a mapping from different - * spaces (different tuple names and possibly different dimensions) - * to a common space. The iteration domains are set to the domains - * in each space. The statement names are set to the names of the - * spaces. The parameter names of the result are set to those of - * the input, but the iterator and scattering dimension names are - * left unspecified. - */ -CloogUnionDomain *cloog_union_domain_from_isl_union_map( - __isl_take isl_union_map *umap) -{ - int i; - int nparam; - isl_space *dim; - CloogUnionDomain *ud; - - dim = isl_union_map_get_space(umap); - nparam = isl_space_dim(dim, isl_dim_param); - - ud = cloog_union_domain_alloc(nparam); - - for (i = 0; i < nparam; ++i) { - const char *s = isl_space_get_dim_name(dim, isl_dim_param, i); - ud = cloog_union_domain_set_name(ud, CLOOG_PARAM, i, s); - } - isl_space_free(dim); - - if (isl_union_map_foreach_map(umap, &add_domain_from_map, &ud) < 0) { - isl_union_map_free(umap); - cloog_union_domain_free(ud); - assert(0); - } - - isl_union_map_free(umap); - - return ud; -} - -static int count_same_name(__isl_keep isl_space *dim, - enum isl_dim_type type, unsigned pos, const char *name) -{ - enum isl_dim_type t; - unsigned p, s; - int count = 0; - int len = strlen(name); - - for (t = isl_dim_param; t <= type && t <= isl_dim_out; ++t) { - s = t == type ? pos : isl_space_dim(dim, t); - for (p = 0; p < s; ++p) { - const char *n = isl_space_get_dim_name(dim, t, p); - if (n && !strncmp(n, name, len)) - count++; - } - } - return count; -} - -static CloogUnionDomain *add_domain(__isl_take isl_set *set, CloogUnionDomain *ud) -{ - int i, nvar; - isl_ctx *ctx; - isl_space *dim; - char buffer[20]; - const char *name; - CloogDomain *domain; - - ctx = isl_set_get_ctx(set); - dim = isl_set_get_space(set); - name = isl_space_get_tuple_name(dim, isl_dim_set); - set = isl_set_flatten(set); - set = isl_set_set_tuple_name(set, NULL); - domain = cloog_domain_from_isl_set(set); - ud = cloog_union_domain_add_domain(ud, name, domain, NULL, NULL); - - nvar = isl_space_dim(dim, isl_dim_set); - for (i = 0; i < nvar; ++i) { - char *long_name = NULL; - int n; - - name = isl_space_get_dim_name(dim, isl_dim_set, i); - if (!name) { - snprintf(buffer, sizeof(buffer), "i%d", i); - name = buffer; - } - n = count_same_name(dim, isl_dim_set, i, name); - if (n) { - int size = strlen(name) + 10; - long_name = isl_alloc_array(ctx, char, size); - if (!long_name) - cloog_die("memory overflow.\n"); - snprintf(long_name, size, "%s_%d", name, n); - name = long_name; - } - ud = cloog_union_domain_set_name(ud, CLOOG_ITER, i, name); - free(long_name); - } - isl_space_free(dim); - - return ud; -} - -/** - * Construct a CloogUnionDomain from an isl_set. - * The statement names are set to the names of the - * spaces. The parameter and iterator names of the result are set to those of - * the input, but the scattering dimension names are left unspecified. - */ -CloogUnionDomain *cloog_union_domain_from_isl_set( - __isl_take isl_set *set) -{ - int i; - int nparam; - isl_space *dim; - CloogUnionDomain *ud; - - dim = isl_set_get_space(set); - nparam = isl_space_dim(dim, isl_dim_param); - - ud = cloog_union_domain_alloc(nparam); - - for (i = 0; i < nparam; ++i) { - const char *s = isl_space_get_dim_name(dim, isl_dim_param, i); - ud = cloog_union_domain_set_name(ud, CLOOG_PARAM, i, s); - } - isl_space_free(dim); - - ud = add_domain(set, ud); - - return ud; -} - -/* Computes x, y and g such that g = gcd(a,b) and a*x+b*y = g */ -static void Euclid(cloog_int_t a, cloog_int_t b, - cloog_int_t *x, cloog_int_t *y, cloog_int_t *g) -{ - cloog_int_t c, d, e, f, tmp; - - cloog_int_init(c); - cloog_int_init(d); - cloog_int_init(e); - cloog_int_init(f); - cloog_int_init(tmp); - cloog_int_abs(c, a); - cloog_int_abs(d, b); - cloog_int_set_si(e, 1); - cloog_int_set_si(f, 0); - while (cloog_int_is_pos(d)) { - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, f); - cloog_int_sub(e, e, tmp); - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, d); - cloog_int_sub(c, c, tmp); - cloog_int_swap(c, d); - cloog_int_swap(e, f); - } - cloog_int_set(*g, c); - if (cloog_int_is_zero(a)) - cloog_int_set_si(*x, 0); - else if (cloog_int_is_pos(a)) - cloog_int_set(*x, e); - else cloog_int_neg(*x, e); - if (cloog_int_is_zero(b)) - cloog_int_set_si(*y, 0); - else { - cloog_int_mul(tmp, a, *x); - cloog_int_sub(tmp, c, tmp); - cloog_int_divexact(*y, tmp, b); - } - cloog_int_clear(c); - cloog_int_clear(d); - cloog_int_clear(e); - cloog_int_clear(f); - cloog_int_clear(tmp); -} - -/* Construct a CloogStride from the given constraint for the given level, - * if possible. - * We first compute the gcd of the coefficients of the existentially - * quantified variables and then remove any common factors it has - * with the coefficient at the given level. - * The result is the value of the stride and if it is not one, - * then it is possible to construct a CloogStride. - * The constraint leading to the stride is stored in the CloogStride - * as well a value (factor) such that the product of this value - * and the coefficient at the given level is equal to -1 modulo the stride. - */ -static CloogStride *construct_stride(isl_constraint *c, int level) -{ - int i, n, sign; - isl_int v, m, gcd, stride, factor; - CloogStride *s; - - if (!c) - return NULL; - - isl_int_init(v); - isl_int_init(m); - isl_int_init(gcd); - isl_int_init(factor); - isl_int_init(stride); - - isl_constraint_get_coefficient(c, isl_dim_set, level - 1, &v); - sign = isl_int_sgn(v); - isl_int_abs(m, v); - - isl_int_set_si(gcd, 0); - n = isl_constraint_dim(c, isl_dim_div); - for (i = 0; i < n; ++i) { - isl_constraint_get_coefficient(c, isl_dim_div, i, &v); - isl_int_gcd(gcd, gcd, v); - } - - isl_int_gcd(v, m, gcd); - isl_int_divexact(stride, gcd, v); - - if (isl_int_is_zero(stride) || isl_int_is_one(stride)) - s = NULL; - else { - Euclid(m, stride, &factor, &v, &gcd); - if (sign > 0) - isl_int_neg(factor, factor); - - c = isl_constraint_copy(c); - s = cloog_stride_alloc_from_constraint(stride, - cloog_constraint_from_isl_constraint(c), factor); - } - - isl_int_clear(stride); - isl_int_clear(factor); - isl_int_clear(gcd); - isl_int_clear(m); - isl_int_clear(v); - - return s; -} - -struct cloog_isl_find_stride_data { - int level; - CloogStride *stride; -}; - -/* Check if the given constraint can be used to derive - * a stride on the iterator identified by data->level. - * We first check that there are some existentially quantified variables - * and that the coefficient at data->level is non-zero. - * Then we call construct_stride for further checks and the actual - * construction of the CloogStride. - */ -static int find_stride(__isl_take isl_constraint *c, void *user) -{ - struct cloog_isl_find_stride_data *data; - int n; - isl_int v; - - data = (struct cloog_isl_find_stride_data *)user; - - if (data->stride) { - isl_constraint_free(c); - return 0; - } - - n = isl_constraint_dim(c, isl_dim_div); - if (n == 0) { - isl_constraint_free(c); - return 0; - } - - isl_int_init(v); - - isl_constraint_get_coefficient(c, isl_dim_set, data->level - 1, &v); - if (!isl_int_is_zero(v)) - data->stride = construct_stride(c, data->level); - - isl_int_clear(v); - - isl_constraint_free(c); - - return 0; -} - -/* Check if the given list of domains has a common stride on the given level. - * If so, return a pointer to a CloogStride object. If not, return NULL. - * - * We project out all later variables, take the union and compute - * the affine hull of the union. Then we check the (equality) - * constraints in this affine hull for imposing a stride. - */ -CloogStride *cloog_domain_list_stride(CloogDomainList *list, int level) -{ - struct cloog_isl_find_stride_data data = { level, NULL }; - isl_set *set; - isl_basic_set *aff; - int first = level; - int n; - int r; - - set = isl_set_from_cloog_domain(list->domain); - n = isl_set_dim(set, isl_dim_set) - first; - set = isl_set_project_out(isl_set_copy(set), isl_dim_set, first, n); - - for (list = list->next; list; list = list->next) { - isl_set *set_i = isl_set_from_cloog_domain(list->domain); - n = isl_set_dim(set_i, isl_dim_set) - first; - set_i = isl_set_project_out(isl_set_copy(set_i), - isl_dim_set, first, n); - set = isl_set_union(set, set_i); - } - aff = isl_set_affine_hull(set); - - r = isl_basic_set_foreach_constraint(aff, &find_stride, &data); - assert(r == 0); - - isl_basic_set_free(aff); - - return data.stride; -} - -struct cloog_can_unroll { - int can_unroll; - int level; - isl_constraint *c; - isl_set *set; - isl_int *n; -}; - - -/* - * Check if the given lower bound can be used for unrolling - * and, if so, return the unrolling factor/trip count in *v. - * If the lower bound involves any existentially quantified - * variables, we currently punt. - * Otherwise we compute the maximal value of (i - ceil(l) + 1), - * with l the given lower bound and i the iterator identified by level. - */ -static int is_valid_unrolling_lower_bound(struct cloog_can_unroll *ccu, - __isl_keep isl_constraint *c, isl_int *v) -{ - unsigned n_div; - isl_aff *aff; - enum isl_lp_result res; - - n_div = isl_constraint_dim(c, isl_dim_div); - if (isl_constraint_involves_dims(c, isl_dim_div, 0, n_div)) - return 0; - - aff = isl_constraint_get_bound(c, isl_dim_set, ccu->level - 1); - aff = isl_aff_ceil(aff); - aff = isl_aff_neg(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_in, ccu->level - 1, 1); - res = isl_set_max(ccu->set, aff, v); - isl_aff_free(aff); - - if (res == isl_lp_unbounded) - return 0; - - assert(res == isl_lp_ok); - - cloog_int_add_ui(*v, *v, 1); - - return 1; -} - - -/* Check if we can unroll based on the given constraint. - * Only lower bounds can be used. - * Record it if it turns out to be usable and if we haven't recorded - * any other constraint already. - */ -static int constraint_can_unroll(__isl_take isl_constraint *c, void *user) -{ - struct cloog_can_unroll *ccu = (struct cloog_can_unroll *)user; - isl_int v; - isl_int count; - - isl_int_init(v); - isl_int_init(count); - isl_constraint_get_coefficient(c, isl_dim_set, ccu->level - 1, &v); - if (isl_int_is_pos(v) && - is_valid_unrolling_lower_bound(ccu, c, &count) && - (!ccu->c || isl_int_lt(count, *ccu->n))) { - isl_constraint_free(ccu->c); - ccu->c = isl_constraint_copy(c); - isl_int_set(*ccu->n, count); - } - isl_int_clear(count); - isl_int_clear(v); - isl_constraint_free(c); - - return 0; -} - - -/* Check if we can unroll the domain at the current level. - * If the domain is a union, we cannot. Otherwise, we check the - * constraints. - */ -static int basic_set_can_unroll(__isl_take isl_basic_set *bset, void *user) -{ - struct cloog_can_unroll *ccu = (struct cloog_can_unroll *)user; - int r = 0; - - if (ccu->c || !ccu->can_unroll) - ccu->can_unroll = 0; - else { - bset = isl_basic_set_remove_redundancies(bset); - r = isl_basic_set_foreach_constraint(bset, - &constraint_can_unroll, ccu); - } - isl_basic_set_free(bset); - return r; -} - - -/* Check if we can unroll the given domain at the given level, and - * if so, return the single lower bound in *lb and an upper bound - * on the number of iterations in *n. - * If we cannot unroll, return 0 and set *lb to NULL. - * - * We can unroll, if we can identify a lower bound on level - * such that the number of iterations is bounded by a constant. - */ -int cloog_domain_can_unroll(CloogDomain *domain, int level, cloog_int_t *n, - CloogConstraint **lb) -{ - isl_set *set = isl_set_from_cloog_domain(domain); - struct cloog_can_unroll ccu = { 1, level, NULL, set, n }; - int r; - - *lb = NULL; - r = isl_set_foreach_basic_set(set, &basic_set_can_unroll, &ccu); - assert(r == 0); - if (!ccu.c) - ccu.can_unroll = 0; - if (!ccu.can_unroll) { - isl_constraint_free(ccu.c); - return 0; - } - - *lb = cloog_constraint_from_isl_constraint(ccu.c); - - return ccu.can_unroll; -} - - -/* Fix the iterator i at the given level to l + o, - * where l is prescribed by the constraint lb and o is equal to offset. - * In particular, if lb is the constraint - * - * a i >= f(j) - * - * then l = ceil(f(j)/a). - */ -CloogDomain *cloog_domain_fixed_offset(CloogDomain *domain, - int level, CloogConstraint *lb, cloog_int_t offset) -{ - isl_aff *aff; - isl_set *set = isl_set_from_cloog_domain(domain); - isl_constraint *c; - isl_constraint *eq; - - c = cloog_constraint_to_isl(lb); - aff = isl_constraint_get_bound(c, isl_dim_set, level - 1); - aff = isl_aff_ceil(aff); - aff = isl_aff_add_coefficient_si(aff, isl_dim_in, level - 1, -1); - aff = isl_aff_add_constant(aff, offset); - eq = isl_equality_from_aff(aff); - set = isl_set_add_constraint(set, eq); - - return cloog_domain_from_isl_set(set); -} diff --git a/cloog-0.17.0/source/loop.c b/cloog-0.17.0/source/loop.c deleted file mode 100644 index f3d0ef9a8d82997fe234e44404db9b2e11b47eba..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/loop.c +++ /dev/null @@ -1,2665 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** loop.c ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -# include -# include -# include "../include/cloog/cloog.h" - -#define ALLOC(type) (type*)malloc(sizeof(type)) - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - -/** - * These functions and global variables are devoted to memory leaks hunting: we - * want to know at each moment how many CloogLoop structures had been allocated - * (cloog_loop_allocated) and how many had been freed (cloog_loop_freed). - * Each time a CloogLoog structure is allocated, a call to the function - * cloog_loop_leak_up() must be carried out, and respectively - * cloog_loop_leak_down() when a CloogLoop structure is freed. The special - * variable cloog_loop_max gives the maximal number of CloogLoop structures - * simultaneously alive (i.e. allocated and non-freed) in memory. - * - July 3rd->11th 2003: first version (memory leaks hunt and correction). - */ - - -static void cloog_loop_leak_up(CloogState *state) -{ - state->loop_allocated++; - if ((state->loop_allocated - state->loop_freed) > state->loop_max) - state->loop_max = state->loop_allocated - state->loop_freed; -} - - -static void cloog_loop_leak_down(CloogState *state) -{ - state->loop_freed++; -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_loop_print_structure function: - * Displays a loop structure in a way that trends to be understandable without - * falling in a deep depression or, for the lucky ones, getting a headache... - * Written by Olivier Chorier, Luc Marchaud, Pierre Martin and Romain Tartiere. - * - April 24th 2005: Initial version. - * - May 21rd 2005: - New parameter `F' for destination file (ie stdout), - * - Minor tweaks. - * - May 26th 2005: Memory leak hunt. - * - June 2nd 2005: (Ced) Integration and minor fixes. - * -June 22nd 2005: (Ced) Adaptation for GMP. - */ -void cloog_loop_print_structure(FILE * file, CloogLoop * loop, int level) -{ int i, j, first=1 ; - - if (loop) - { /* Go to the right level. */ - for (i=0; idomain, level+1, "CloogDomain"); - - /* Print the stride. */ - for(j=0; j<=level; j++) - fprintf(file,"|\t") ; - if (loop->stride) { - fprintf(file, "Stride: "); - cloog_int_print(file, loop->stride->stride); - fprintf(file, "\n"); - fprintf(file, "Offset: "); - cloog_int_print(file, loop->stride->offset); - fprintf(file, "\n"); - } - - /* A blank line. */ - for(j=0; j<=level+1; j++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the block. */ - cloog_block_print_structure(file,loop->block,level+1) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print inner if any. */ - if (loop->inner) - cloog_loop_print_structure(file,loop->inner,level+1) ; - - /* And let's go for the next one. */ - loop = loop->next ; - - /* One more time something that is here only for a better look. */ - if (!loop) - { /* Two blank lines if this is the end of the linked list. */ - for (j=0; j<2; j++) - { for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - - fprintf(file,"\n") ; - } - } - else - { /* A special blank line if the is a next loop. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"V\n") ; - } - } -} - - -/** - * cloog_loop_print function: - * This function prints the content of a CloogLoop structure (start) into a - * file (file, possibly stdout). - * - June 2nd 2005: Now this very old function (probably as old as CLooG) is - * only a frontend to cloog_loop_print_structure, with a quite - * better human-readable representation. - */ -void cloog_loop_print(FILE * file, CloogLoop * loop) -{ cloog_loop_print_structure(file,loop,0) ; -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_loop_free function: - * This function frees the allocated memory for a CloogLoop structure (loop), - * and frees its inner loops and its next loops. - * - June 22nd 2005: Adaptation for GMP. - */ -void cloog_loop_free(CloogLoop * loop) -{ CloogLoop * next ; - - while (loop != NULL) { - cloog_loop_leak_down(loop->state); - - next = loop->next ; - cloog_domain_free(loop->domain) ; - cloog_domain_free(loop->unsimplified); - cloog_block_free(loop->block) ; - if (loop->inner != NULL) - cloog_loop_free(loop->inner) ; - - cloog_stride_free(loop->stride); - free(loop) ; - loop = next ; - } -} - - -/** - * cloog_loop_free_parts function: - * This function frees the allocated memory for some parts of a CloogLoop - * structure (loop), each other argument is a boolean having to be set to 1 if - * we want to free the corresponding part, 0 otherwise. This function applies - * the same freeing policy to its inner ans next loops recursively. - * - July 3rd 2003: first version. - * - June 22nd 2005: Adaptation for GMP. - */ -void cloog_loop_free_parts(loop, domain, block, inner, next) -CloogLoop * loop ; -int domain, block, inner, next ; -{ CloogLoop * follow ; - - while (loop != NULL) { - cloog_loop_leak_down(loop->state); - follow = loop->next ; - - if (domain) - cloog_domain_free(loop->domain) ; - - if (block) - cloog_block_free(loop->block) ; - - if ((inner) && (loop->inner != NULL)) - cloog_loop_free_parts(loop->inner,domain,block,inner,1) ; - - cloog_domain_free(loop->unsimplified); - cloog_stride_free(loop->stride); - free(loop) ; - if (next) - loop = follow ; - else - loop = NULL ; - } -} - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ - - -/** - * Construct a CloogLoop structure from a given iteration domain - * and statement number. - */ -CloogLoop *cloog_loop_from_domain(CloogState *state, CloogDomain *domain, - int number) -{ - int nb_iterators; - CloogLoop * loop ; - CloogStatement * statement ; - - /* Memory allocation and information reading for the first domain: */ - loop = cloog_loop_malloc(state); - /* domain. */ - loop->domain = domain; - if (loop->domain != NULL) - nb_iterators = cloog_domain_dimension(loop->domain); - else - nb_iterators = 0 ; - /* included statement block. */ - statement = cloog_statement_alloc(state, number + 1); - loop->block = cloog_block_alloc(statement, 0, NULL, nb_iterators); - - return loop ; -} - - -/** - * cloog_loop_read function: - * This function reads loop data from a file (foo, possibly stdin) and - * returns a pointer to a CloogLoop structure containing the read information. - * This function can be used only for input file reading, when one loop is - * associated with one statement. - * - number is the statement block number carried by the loop (-1 if none). - * - nb_parameters is the number of parameters. - ** - * - September 9th 2002: first version. - * - April 16th 2005: adaptation to new CloogStatement struct (with number). - * - June 11th 2005: adaptation to new CloogBlock structure. - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop *cloog_loop_read(CloogState *state, - FILE *foo, int number, int nb_parameters) -{ - int op1, op2, op3; - char s[MAX_STRING]; - CloogDomain *domain; - - domain = cloog_domain_union_read(state, foo, nb_parameters); - - /* To read that stupid "0 0 0" line. */ - while (fgets(s,MAX_STRING,foo) == 0) ; - while ((*s=='#' || *s=='\n') || (sscanf(s," %d %d %d",&op1,&op2,&op3)<3)) - fgets(s,MAX_STRING,foo) ; - - return cloog_loop_from_domain(state, domain, number); -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_loop_malloc function: - * This function allocates the memory space for a CloogLoop structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogLoop *cloog_loop_malloc(CloogState *state) -{ CloogLoop * loop ; - - /* Memory allocation for the CloogLoop structure. */ - loop = (CloogLoop *)malloc(sizeof(CloogLoop)) ; - if (loop == NULL) - cloog_die("memory overflow.\n"); - cloog_loop_leak_up(state); - - - /* We set the various fields with default values. */ - loop->state = state; - loop->domain = NULL ; - loop->unsimplified = NULL; - loop->block = NULL ; - loop->usr = NULL; - loop->inner = NULL ; - loop->next = NULL ; - loop->otl = 0; - loop->stride = NULL; - - return loop ; -} - - -/** - * cloog_loop_alloc function: - * This function allocates the memory space for a CloogLoop structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - October 27th 2001: first version. - * - June 22nd 2005: Adaptation for GMP. - * - November 21th 2005: use of cloog_loop_malloc. - */ -CloogLoop *cloog_loop_alloc(CloogState *state, - CloogDomain *domain, int otl, CloogStride *stride, - CloogBlock *block, CloogLoop *inner, CloogLoop *next) -{ CloogLoop * loop ; - - loop = cloog_loop_malloc(state); - - loop->domain = domain ; - loop->block = block ; - loop->inner = inner ; - loop->next = next ; - loop->otl = otl; - loop->stride = cloog_stride_copy(stride); - - return(loop) ; -} - - -/** - * cloog_loop_add function: - * This function adds a CloogLoop structure (loop) at a given place (now) of a - * NULL terminated list of CloogLoop structures. The beginning of this list - * is (start). This function updates (now) to (loop), and updates (start) if the - * added element is the first one -that is when (start) is NULL-. - * - October 28th 2001: first version. - */ -void cloog_loop_add(CloogLoop ** start, CloogLoop ** now, CloogLoop * loop) -{ if (*start == NULL) - { *start = loop ; - *now = *start ; - } - else - { (*now)->next = loop ; - *now = (*now)->next ; - } -} - - -/** - * cloog_loop_add function: - * This function adds a CloogLoop structure (loop) at a given place (now) of a - * NULL terminated list of CloogLoop structures. The beginning of this list - * is (start). This function updates (now) to the end of the loop list (loop), - * and updates (start) if the added element is the first one -that is when - * (start) is NULL-. - * - September 9th 2005: first version. - */ -void cloog_loop_add_list(CloogLoop ** start, CloogLoop ** now, CloogLoop * loop) -{ if (*start == NULL) - { *start = loop ; - *now = *start ; - } - else - { (*now)->next = loop ; - *now = (*now)->next ; - } - - while ((*now)->next != NULL) - *now = (*now)->next ; -} - - -/** - * cloog_loop_copy function: - * This function returns a copy of the CloogLoop structure given as input. In - * fact, there is just new allocations for the CloogLoop structures, but their - * contents are the same. - * - October 28th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - */ -CloogLoop * cloog_loop_copy(CloogLoop * source) -{ CloogLoop * loop ; - CloogBlock * block ; - CloogDomain * domain ; - - loop = NULL ; - if (source != NULL) - { domain = cloog_domain_copy(source->domain) ; - block = cloog_block_copy(source->block) ; - loop = cloog_loop_alloc(source->state, domain, source->otl, - source->stride, block, NULL, NULL); - loop->usr = source->usr; - loop->inner = cloog_loop_copy(source->inner) ; - loop->next = cloog_loop_copy(source->next) ; - } - return(loop) ; -} - - -/** - * cloog_loop_add_disjoint function: - * This function adds some CloogLoop structures at a given place (now) of a - * NULL terminated list of CloogLoop structures. The beginning of this list - * is (start). (loop) can be an union of polyhedra, this function separates the - * union into a list of *disjoint* polyhedra then adds the list. This function - * updates (now) to the end of the list and updates (start) if first added - * element is the first of the principal list -that is when (start) is NULL-. - * (loop) can be freed by this function, basically when its domain is actually - * a union of polyhedra, but don't worry, all the useful data are now stored - * inside the list (start). We do not use PolyLib's Domain_Disjoint function, - * since the number of union components is often higher (thus code size too). - * - October 28th 2001: first version. - * - November 14th 2001: bug correction (this one was hard to find !). - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - October 27th 2005: (debug) included blocks were not copied for new loops. - */ -void cloog_loop_add_disjoint(start, now, loop) -CloogLoop ** start, ** now, * loop ; -{ - CloogLoop * sep, * inner ; - CloogDomain *domain, *seen, *temp, *rest; - CloogBlock * block ; - - if (cloog_domain_isconvex(loop->domain)) - cloog_loop_add(start,now,loop) ; - else { - domain = cloog_domain_simplify_union(loop->domain); - loop->domain = NULL ; - - /* We separate the first element of the rest of the union. */ - domain = cloog_domain_cut_first(domain, &rest); - - /* This first element is the first of the list of disjoint polyhedra. */ - sep = cloog_loop_alloc(loop->state, domain, 0, NULL, - loop->block, loop->inner, NULL); - cloog_loop_add(start,now,sep) ; - - seen = cloog_domain_copy(domain); - while (!cloog_domain_isempty(domain = rest)) { - temp = cloog_domain_cut_first(domain, &rest); - domain = cloog_domain_difference(temp, seen); - cloog_domain_free(temp); - - if (cloog_domain_isempty(domain)) { - cloog_domain_free(domain); - continue; - } - - /* Each new loop will have its own life, for instance we can free its - * inner loop and included block. Then each one must have its own copy - * of both 'inner' and 'block'. - */ - inner = cloog_loop_copy(loop->inner) ; - block = cloog_block_copy(loop->block) ; - - sep = cloog_loop_alloc(loop->state, cloog_domain_copy(domain), - 0, NULL, block, inner, NULL); - /* domain can be an union too. If so: recursion. */ - if (cloog_domain_isconvex(domain)) - cloog_loop_add(start,now,sep) ; - else - cloog_loop_add_disjoint(start,now,sep) ; - - if (cloog_domain_isempty(rest)) { - cloog_domain_free(domain); - break; - } - - seen = cloog_domain_union(seen, domain); - } - cloog_domain_free(rest); - cloog_domain_free(seen); - cloog_loop_free_parts(loop,0,0,0,0) ; - } -} - - -/** - * cloog_loop_disjoint function: - * This function returns a list of loops such that each loop with non-convex - * domain in the input list (loop) is separated into several loops where the - * domains are the components of the union of *disjoint* polyhedra equivalent - * to the original non-convex domain. See cloog_loop_add_disjoint comments - * for more details. - * - September 16th 2005: first version. - */ -CloogLoop * cloog_loop_disjoint(CloogLoop * loop) -{ CloogLoop *res=NULL, * now=NULL, * next ; - - /* Because this is often the case, don't waste time ! */ - if (loop && !loop->next && cloog_domain_isconvex(loop->domain)) - return loop ; - - while (loop != NULL) - { next = loop->next ; - loop->next = NULL ; - cloog_loop_add_disjoint(&res,&now,loop) ; - loop = next ; - } - - return res ; -} - - -/** - * cloog_loop_restrict function: - * This function returns the (loop) in the context of (context): it makes the - * intersection between the (loop) domain and the (context), then it returns - * a pointer to a new loop, with this intersection as domain. - ** - * - October 27th 2001: first version. - * - June 15th 2005: a memory leak fixed (domain was not freed when empty). - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop *cloog_loop_restrict(CloogLoop *loop, CloogDomain *context) -{ int new_dimension ; - CloogDomain * domain, * extended_context, * new_domain ; - CloogLoop * new_loop ; - - domain = loop->domain ; - if (cloog_domain_dimension(domain) > cloog_domain_dimension(context)) - { - new_dimension = cloog_domain_dimension(domain); - extended_context = cloog_domain_extend(context, new_dimension); - new_domain = cloog_domain_intersection(extended_context,loop->domain) ; - cloog_domain_free(extended_context) ; - } - else - new_domain = cloog_domain_intersection(context,loop->domain) ; - - if (cloog_domain_isempty(new_domain)) - { cloog_domain_free(new_domain) ; - return(NULL) ; - } - else { - new_loop = cloog_loop_alloc(loop->state, new_domain, - 0, NULL, loop->block, loop->inner, NULL); - return(new_loop) ; - } -} - - -/** - * Call cloog_loop_restrict on each loop in the list "loop" and return - * the concatenated result. - */ -CloogLoop *cloog_loop_restrict_all(CloogLoop *loop, CloogDomain *context) -{ - CloogLoop *next; - CloogLoop *res = NULL; - CloogLoop **res_next = &res; - - for (; loop; loop = next) { - next = loop->next; - - *res_next = cloog_loop_restrict(loop, context); - if (*res_next) { - res_next = &(*res_next)->next; - cloog_loop_free_parts(loop, 1, 0, 0, 0); - } else { - loop->next = NULL; - cloog_loop_free(loop); - } - } - - return res; -} - - -/** - * Restrict the domains of the inner loops of each loop l in the given - * list of loops to the domain of the loop l. If the domains of all - * inner loops of a given loop l turn out to be empty, then remove l - * from the list. - */ -CloogLoop *cloog_loop_restrict_inner(CloogLoop *loop) -{ - CloogLoop *next; - CloogLoop *res; - CloogLoop **res_next = &res; - - for (; loop; loop = next) { - next = loop->next; - - loop->inner = cloog_loop_restrict_all(loop->inner, loop->domain); - if (loop->inner) { - *res_next = loop; - res_next = &(*res_next)->next; - } else { - loop->next = NULL; - cloog_loop_free(loop); - } - } - - *res_next = NULL; - - return res; -} - -/** - * cloog_loop_project function: - * This function returns the projection of (loop) on the (level) first - * dimensions (outer loops). It makes the projection of the (loop) domain, - * then it returns a pointer to a new loop, with this projection as domain. - ** - * - October 27th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop * cloog_loop_project(CloogLoop * loop, int level) -{ - CloogDomain * new_domain ; - CloogLoop * new_loop, * copy ; - - copy = cloog_loop_alloc(loop->state, loop->domain, loop->otl, loop->stride, - loop->block, loop->inner, NULL); - - if (cloog_domain_dimension(loop->domain) == level) - new_domain = cloog_domain_copy(loop->domain) ; - else - new_domain = cloog_domain_project(loop->domain, level); - - new_loop = cloog_loop_alloc(loop->state, new_domain, 0, NULL, - NULL, copy, NULL); - - return(new_loop) ; -} - - -/** - * Call cloog_loop_project on each loop in the list "loop" and return - * the concatenated result. - */ -CloogLoop *cloog_loop_project_all(CloogLoop *loop, int level) -{ - CloogLoop *next; - CloogLoop *res = NULL; - CloogLoop **res_next = &res; - - for (; loop; loop = next) { - next = loop->next; - - *res_next = cloog_loop_project(loop, level); - res_next = &(*res_next)->next; - cloog_loop_free_parts(loop, 0, 0, 0, 0); - } - - return res; -} - - -/** - * cloog_loop_concat function: - * This function returns a pointer to the concatenation of the - * CloogLoop lists given as input. - * - October 28th 2001: first version. - */ -CloogLoop * cloog_loop_concat(CloogLoop * a, CloogLoop * b) -{ CloogLoop * loop, * temp ; - - loop = a ; - temp = loop ; - if (loop != NULL) - { while (temp->next != NULL) - temp = temp->next ; - temp->next = b ; - } - else - loop = b ; - - return(loop) ; -} - - -/** - * cloog_loop_combine: - * Combine consecutive loops with identical domains into - * a single loop with the concatenation of their inner loops - * as inner loop. - */ -CloogLoop *cloog_loop_combine(CloogLoop *loop) -{ - CloogLoop *first, *second; - - for (first = loop; first; first = first->next) { - while (first->next) { - if (!cloog_domain_lazy_equal(first->domain, first->next->domain)) - break; - second = first->next; - first->inner = cloog_loop_concat(first->inner, second->inner); - first->next = second->next; - cloog_loop_free_parts(second, 1, 0, 0, 0); - } - } - - return loop; -} - -/** - * Remove loops from list that have an empty domain. - */ -CloogLoop *cloog_loop_remove_empty_domain_loops(CloogLoop *loop) -{ - CloogLoop *l, *res, *next, **res_next; - - res = NULL; - res_next = &res; - for (l = loop; l; l = next) { - next = l->next; - if (cloog_domain_isempty(l->domain)) - cloog_loop_free_parts(l, 1, 1, 1, 0); - else { - *res_next = l; - res_next = &(*res_next)->next; - } - } - *res_next = NULL; - - return res; -} - -CloogLoop *cloog_loop_decompose_inner(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims); - -/* For each loop with only one inner loop, replace the domain - * of the loop with the projection of the domain of the inner - * loop. To increase the number of loops with a single inner - * we first decompose the inner loops into strongly connected - * components. - */ -CloogLoop *cloog_loop_specialize(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims) -{ - int dim; - CloogDomain *domain; - CloogLoop *l; - - loop = cloog_loop_decompose_inner(loop, level, scalar, - scaldims, nb_scattdims); - - for (l = loop; l; l = l->next) { - if (l->inner->next) - continue; - if (!cloog_domain_isconvex(l->inner->domain)) - continue; - - dim = cloog_domain_dimension(l->domain); - domain = cloog_domain_project(l->inner->domain, dim); - if (cloog_domain_isconvex(domain)) { - cloog_domain_free(l->domain); - l->domain = domain; - } else { - cloog_domain_free(domain); - } - } - - return cloog_loop_remove_empty_domain_loops(loop); -} - -/* For each loop with only one inner loop, propagate the bounds from - * the inner loop domain to the outer loop domain. This is especially - * useful if the inner loop domain has a non-trivial stride which - * results in an update of the lower bound. - */ -CloogLoop *cloog_loop_propagate_lower_bound(CloogLoop *loop, int level) -{ - int dim; - CloogDomain *domain, *t; - CloogLoop *l; - - for (l = loop; l; l = l->next) { - if (l->inner->next) - continue; - if (!cloog_domain_isconvex(l->inner->domain)) - continue; - - dim = cloog_domain_dimension(l->domain); - domain = cloog_domain_project(l->inner->domain, dim); - if (cloog_domain_isconvex(domain)) { - t = cloog_domain_intersection(domain, l->domain); - cloog_domain_free(l->domain); - l->domain = t; - } - cloog_domain_free(domain); - } - - return loop; -} - -/** - * cloog_loop_separate function: - * This function implements the Quillere algorithm for separation of multiple - * loops: for a given set of polyhedra (loop), it computes a set of disjoint - * polyhedra such that the unions of these sets are equal, and returns this set. - * - October 28th 2001: first version. - * - November 14th 2001: elimination of some unused blocks. - * - August 13th 2002: (debug) in the case of union of polyhedra for one - * loop, redundant constraints are fired. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - October 16th 2005: Removal of the non-shared constraint elimination when - * there is only one loop in the list (seems to work - * without now, DomainSimplify may have been improved). - * The problem was visible with test/iftest2.cloog. - */ -CloogLoop * cloog_loop_separate(CloogLoop * loop) -{ int lazy_equal=0, disjoint = 0; - CloogLoop * new_loop, * new_inner, * res, * now, * temp, * Q, - * inner, * old /*, * previous, * next*/ ; - CloogDomain *UQ, *domain; - - if (loop == NULL) - return NULL ; - - loop = cloog_loop_combine(loop); - - if (loop->next == NULL) - return cloog_loop_disjoint(loop) ; - - UQ = cloog_domain_copy(loop->domain) ; - domain = cloog_domain_copy(loop->domain) ; - res = cloog_loop_alloc(loop->state, domain, 0, NULL, - loop->block, loop->inner, NULL); - - old = loop ; - while((loop = loop->next) != NULL) - { temp = NULL ; - - /* For all Q, add Q-loop associated with the blocks of Q alone, - * and Q inter loop associated with the blocks of Q and loop. - */ - for (Q = res; Q; Q = Q->next) { - /* Add (Q inter loop). */ - if ((disjoint = cloog_domain_lazy_disjoint(Q->domain,loop->domain))) - domain = NULL ; - else - { if ((lazy_equal = cloog_domain_lazy_equal(Q->domain,loop->domain))) - domain = cloog_domain_copy(Q->domain) ; - else - domain = cloog_domain_intersection(Q->domain,loop->domain) ; - - if (!cloog_domain_isempty(domain)) - { new_inner = cloog_loop_concat(cloog_loop_copy(Q->inner), - cloog_loop_copy(loop->inner)) ; - new_loop = cloog_loop_alloc(loop->state, domain, 0, NULL, - NULL, new_inner, NULL); - cloog_loop_add_disjoint(&temp,&now,new_loop) ; - } - else { - disjoint = 1; - cloog_domain_free(domain); - } - } - - /* Add (Q - loop). */ - if (disjoint) - domain = cloog_domain_copy(Q->domain) ; - else - { if (lazy_equal) - domain = cloog_domain_empty(Q->domain); - else - domain = cloog_domain_difference(Q->domain,loop->domain) ; - } - - if (!cloog_domain_isempty(domain)) { - new_loop = cloog_loop_alloc(loop->state, domain, 0, NULL, - NULL, Q->inner, NULL); - cloog_loop_add_disjoint(&temp,&now,new_loop) ; - } - else - { cloog_domain_free(domain) ; - /* If Q->inner is no more useful, we can free it. */ - inner = Q->inner ; - Q->inner = NULL ; - cloog_loop_free(inner) ; - } - } - - /* Add loop-UQ associated with the blocks of loop alone.*/ - if (cloog_domain_lazy_disjoint(loop->domain,UQ)) - domain = cloog_domain_copy(loop->domain) ; - else - { if (cloog_domain_lazy_equal(loop->domain,UQ)) - domain = cloog_domain_empty(UQ); - else - domain = cloog_domain_difference(loop->domain,UQ) ; - } - - if (!cloog_domain_isempty(domain)) { - new_loop = cloog_loop_alloc(loop->state, domain, 0, NULL, - NULL, loop->inner, NULL); - cloog_loop_add_disjoint(&temp,&now,new_loop) ; - } - else - { cloog_domain_free(domain) ; - /* If loop->inner is no more useful, we can free it. */ - cloog_loop_free(loop->inner) ; - } - - loop->inner = NULL ; - - if (loop->next != NULL) - UQ = cloog_domain_union(UQ, cloog_domain_copy(loop->domain)); - else - cloog_domain_free(UQ); - - cloog_loop_free_parts(res,1,0,0,1) ; - - res = temp ; - } - cloog_loop_free_parts(old,1,0,0,1) ; - - return(res) ; -} - - -static CloogDomain *bounding_domain(CloogDomain *dom, CloogOptions *options) -{ - if (options->sh) - return cloog_domain_simple_convex(dom); - else - return cloog_domain_convex(dom); -} - - -/** - * cloog_loop_merge function: - * This function is the 'soft' version of loop_separate if we are looking for - * a code much simpler (and less efficicient). This function returns the new - * CloogLoop list. - * - October 29th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - */ -CloogLoop *cloog_loop_merge(CloogLoop *loop, int level, CloogOptions *options) -{ - CloogLoop *res, *new_inner, *old; - CloogDomain *new_domain, *temp; - - if (loop == NULL) - return loop; - - if (loop->next == NULL && cloog_domain_isconvex(loop->domain)) - return loop; - - old = loop; - temp = loop->domain; - loop->domain = NULL; - new_inner = loop->inner; - - for (loop = loop->next; loop; loop = loop->next) { - temp = cloog_domain_union(temp, loop->domain); - loop->domain = NULL; - new_inner = cloog_loop_concat(new_inner, loop->inner); - } - - new_domain = bounding_domain(temp, options); - - if (level > 0 && !cloog_domain_is_bounded(new_domain, level) && - cloog_domain_is_bounded(temp, level)) { - CloogDomain *splitter, *t2; - - cloog_domain_free(new_domain); - splitter = cloog_domain_bound_splitter(temp, level); - - res = NULL; - while (!cloog_domain_isconvex(splitter)) { - CloogDomain *first, *rest; - first = cloog_domain_cut_first(splitter, &rest); - splitter = rest; - t2 = cloog_domain_intersection(first, temp); - cloog_domain_free(first); - - new_domain = bounding_domain(t2, options); - cloog_domain_free(t2); - - if (cloog_domain_isempty(new_domain)) { - cloog_domain_free(new_domain); - continue; - } - res = cloog_loop_alloc(old->state, new_domain, 0, NULL, - NULL, cloog_loop_copy(new_inner), res); - } - - t2 = cloog_domain_intersection(splitter, temp); - cloog_domain_free(splitter); - - new_domain = bounding_domain(t2, options); - cloog_domain_free(t2); - - if (cloog_domain_isempty(new_domain)) { - cloog_domain_free(new_domain); - cloog_loop_free(new_inner); - } else - res = cloog_loop_alloc(old->state, new_domain, 0, NULL, - NULL, new_inner, res); - } else { - res = cloog_loop_alloc(old->state, new_domain, 0, NULL, - NULL, new_inner, NULL); - } - cloog_domain_free(temp); - - cloog_loop_free_parts(old, 0, 0, 0, 1); - - return res; -} - - -static int cloog_loop_count(CloogLoop *loop) -{ - int nb_loops; - - for (nb_loops = 0; loop; loop = loop->next) - nb_loops++; - - return nb_loops; -} - - -/** - * cloog_loop_sort function: - * Adaptation from LoopGen 0.4 by F. Quillere. This function sorts a list of - * parameterized disjoint polyhedra, in order to not have lexicographic order - * violation (see Quillere paper). - * - September 16th 2005: inclusion of cloog_loop_number (October 29th 2001). - */ -CloogLoop *cloog_loop_sort(CloogLoop *loop, int level) -{ - CloogLoop *res, *now, **loop_array; - CloogDomain **doms; - int i, nb_loops=0, * permut ; - - /* There is no need to sort the parameter domains. */ - if (!level) - return loop; - - /* We will need to know how many loops are in the list. */ - nb_loops = cloog_loop_count(loop); - - /* If there is only one loop, it's the end. */ - if (nb_loops == 1) - return(loop) ; - - /* We have to allocate memory for some useful components: - * - loop_array: the loop array, - * - doms: the array of domains to sort, - * - permut: will give us a possible sort (maybe not the only one). - */ - loop_array = (CloogLoop **)malloc(nb_loops*sizeof(CloogLoop *)) ; - doms = (CloogDomain **)malloc(nb_loops*sizeof(CloogDomain *)); - permut = (int *)malloc(nb_loops*sizeof(int)) ; - - /* We fill up the loop and domain arrays. */ - for (i=0;inext) - { loop_array[i] = loop ; - doms[i] = loop_array[i]->domain; - } - - /* cloog_domain_sort will fill up permut. */ - cloog_domain_sort(doms, nb_loops, level, permut); - - /* With permut and loop_array we build the sorted list. */ - res = NULL ; - for (i=0;inext = NULL ; - cloog_loop_add(&res,&now,loop_array[permut[i]-1]) ; - } - - free(permut) ; - free(doms); - free(loop_array) ; - - return res; -} - - -/** - * cloog_loop_nest function: - * This function changes the loop list in such a way that we have no more than - * one dimension added by level. It returns an equivalent loop list with - * this property. - * - October 29th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - November 21th 2005: (debug) now OK when cloog_loop_restrict returns NULL. - */ -CloogLoop *cloog_loop_nest(CloogLoop *loop, CloogDomain *context, int level) -{ int l ; - CloogLoop * p, * temp, * res, * now, * next ; - CloogDomain * new_domain ; - - loop = cloog_loop_disjoint(loop); - - res = NULL ; - /* Each domain is changed by its intersection with the context. */ - while (loop != NULL) - { p = cloog_loop_restrict(loop, context); - next = loop->next ; - - if (p != NULL) - { cloog_loop_free_parts(loop,1,0,0,0) ; - - temp = cloog_loop_alloc(p->state, p->domain, 0, NULL, - p->block, p->inner, NULL); - - /* If the intersection dimension is too big, we make projections smaller - * and smaller, and each projection includes the preceding projection - * (thus, in the target list, dimensions are added one by one). - */ - if (cloog_domain_dimension(p->domain) >= level) - for (l = cloog_domain_dimension(p->domain); l >= level; l--) { - new_domain = cloog_domain_project(p->domain, l); - temp = cloog_loop_alloc(p->state, new_domain, 0, NULL, - NULL, temp, NULL); - } - - /* p is no more useful (but its content yes !). */ - cloog_loop_free_parts(p,0,0,0,0) ; - - cloog_loop_add(&res,&now,temp) ; - } - else - cloog_loop_free_parts(loop,1,1,1,0) ; - - loop = next ; - } - - return(res) ; -} - - -/* Check if the domains of the inner loops impose a stride constraint - * on the given level. - * The core of the search is implemented in cloog_domain_list_stride. - * Here, we simply construct a list of domains to pass to this function - * and if a stride is found, we adjust the lower bounds by calling - * cloog_domain_stride_lower_bound. - */ -static int cloog_loop_variable_offset_stride(CloogLoop *loop, int level) -{ - CloogDomainList *list = NULL; - CloogLoop *inner; - CloogStride *stride; - - for (inner = loop->inner; inner; inner = inner->next) { - CloogDomainList *entry = ALLOC(CloogDomainList); - entry->domain = cloog_domain_copy(inner->domain); - entry->next = list; - list = entry; - } - - stride = cloog_domain_list_stride(list, level); - - cloog_domain_list_free(list); - - if (!stride) - return 0; - - loop->stride = stride; - loop->domain = cloog_domain_stride_lower_bound(loop->domain, level, stride); - - return 1; -} - - -/** - * cloog_loop_stride function: - * This function will find the stride of a loop for the iterator at the column - * number 'level' in the constraint matrix. It will update the lower bound of - * the iterator accordingly. Basically, the function will try to find in the - * inner loops a common condition on this iterator for the inner loop iterators - * to be integral. For instance, let us consider a loop with the iterator i, - * the iteration domain -4<=i<=n, and its two inner loops with the iterator j. - * The first inner loop has the constraint 3j=i, and the second one has the - * constraint 6j=i. Then the common constraint on i for j to be integral is - * i%3=0, the stride for i is 3. Lastly, we have to find the new lower bound - * for i: the first value satisfying the common constraint: -3. At the end, the - * iteration domain for i is -3<=i<=n and the stride for i is 3. - * - * The algorithm implemented in this function only allows for strides - * on loops with a lower bound that has a constant remainder on division - * by the stride. Before initiating this procedure, we first check - * if we can find a stride with a lower bound with a variable offset in - * cloog_loop_variable_offset_stride. - * - * - loop is the loop including the iteration domain of the considered iterator, - * - level is the column number of the iterator in the matrix of contraints. - ** - * - June 29th 2003: first version (work in progress since June 26th 2003). - * - July 14th 2003: simpler version. - * - June 22nd 2005: Adaptation for GMP (from S. Verdoolaege's 0.12.1 version). - */ -void cloog_loop_stride(CloogLoop * loop, int level) -{ int first_search ; - cloog_int_t stride, ref_offset, offset, potential; - CloogLoop * inner ; - - if (!cloog_domain_can_stride(loop->domain, level)) - return; - - if (cloog_loop_variable_offset_stride(loop, level)) - return; - - cloog_int_init(stride); - cloog_int_init(ref_offset); - cloog_int_init(offset); - cloog_int_init(potential); - - cloog_int_set_si(ref_offset, 0); - cloog_int_set_si(offset, 0); - - /* Default stride. */ - cloog_int_set_si(stride, 1); - first_search = 1 ; - inner = loop->inner ; - - while (inner != NULL) - { /* If the minimun stride has not been found yet, find the stride. */ - if ((first_search) || (!cloog_int_is_one(stride))) - { - cloog_domain_stride(inner->domain, level, &potential, &offset); - if (!cloog_int_is_one(potential) && (!first_search)) - { /* Offsets must be the same for common stride. */ - cloog_int_gcd(stride, potential, stride); - if (!cloog_int_is_zero(stride)) { - cloog_int_fdiv_r(offset, offset, stride); - cloog_int_fdiv_r(ref_offset, ref_offset, stride); - } - if (cloog_int_ne(offset,ref_offset)) - cloog_int_set_si(stride, 1); - } - else { - cloog_int_set(stride, potential); - cloog_int_set(ref_offset, offset); - } - - first_search = 0 ; - } - - inner = inner->next ; - } - - if (cloog_int_is_zero(stride)) - cloog_int_set_si(stride, 1); - - /* Update the values if necessary. */ - if (!cloog_int_is_one(stride)) - { /* Update the stride value. */ - if (!cloog_int_is_zero(offset)) - cloog_int_sub(offset, stride, offset); - loop->stride = cloog_stride_alloc(stride, offset); - loop->domain = cloog_domain_stride_lower_bound(loop->domain, level, - loop->stride); - } - - cloog_int_clear(stride); - cloog_int_clear(ref_offset); - cloog_int_clear(offset); - cloog_int_clear(potential); -} - - -void cloog_loop_otl(CloogLoop *loop, int level) -{ - if (cloog_domain_is_otl(loop->domain, level)) - loop->otl = 1; -} - - -/** - * cloog_loop_stop function: - * This function implements the 'stop' option : each domain of each loop - * in the list 'loop' is replaced by 'context'. 'context' should be the - * domain of the outer loop. By using this method, there are no more dimensions - * to scan and the simplification step will automaticaly remove the domains - * since they are the same as the corresponding contexts. The effect of this - * function is to stop the code generation at the level this function is called, - * the resulting code do not consider the next dimensions. - * - January 11th 2005: first version. - */ -CloogLoop * cloog_loop_stop(CloogLoop * loop, CloogDomain * context) -{ if (loop == NULL) - return NULL ; - else - { cloog_domain_free(loop->domain) ; - loop->domain = cloog_domain_copy(context) ; - loop->next = cloog_loop_stop(loop->next, context) ; - } - - return loop ; -} - - -static int level_is_constant(int level, int scalar, int *scaldims, int nb_scattdims) -{ - return level && (level+scalar <= nb_scattdims) && (scaldims[level+scalar-1]); -} - - -/** - * Compare the constant dimensions of loops 'l1' and 'l2' starting at 'scalar' - * and return -1 if the vector of constant dimensions of 'l1' is smaller - * than that of 'l2', 0 if they are the same and +1 if that of 'l1' is - * greater than that of 'l2'. - * This function should be called on the innermost loop (the loop - * containing a block). - * \param l1 Loop to be compared with l2. - * \param l2 Loop to be compared with l1. - * \param level Current non-scalar dimension. - * \param scaldims Boolean array saying whether a dimension is scalar or not. - * \param nb_scattdims Size of the scaldims array. - * \param scalar Current scalar dimension. - * \return -1 if (l1 < l2), 0 if (l1 == l2) and +1 if (l1 > l2) - */ -int cloog_loop_constant_cmp(CloogLoop *l1, CloogLoop *l2, int level, - int *scaldims, int nb_scattdims, int scalar) -{ - CloogBlock *b1, *b2; - b1 = l1->block; - b2 = l2->block; - while (level_is_constant(level, scalar, scaldims, nb_scattdims)) { - int cmp = cloog_int_cmp(b1->scaldims[scalar], b2->scaldims[scalar]); - if (cmp) - return cmp; - scalar++; - } - return 0; -} - - -/** - * cloog_loop_scalar_gt function: - * This function returns 1 if loop 'l1' is greater than loop 'l2' for the - * scalar dimension vector that begins at dimension 'scalar', 0 otherwise. What - * we want to know is whether a loop is scheduled before another one or not. - * This function solves the problem when the considered dimension for scheduling - * is a scalar dimension. Since there may be a succession of scalar dimensions, - * this function will reason about the vector of scalar dimension that begins - * at dimension 'level+scalar' and finish to the first non-scalar dimension. - * \param l1 Loop to be compared with l2. - * \param l2 Loop to be compared with l1. - * \param level Current non-scalar dimension. - * \param scaldims Boolean array saying whether a dimension is scalar or not. - * \param nb_scattdims Size of the scaldims array. - * \param scalar Current scalar dimension. - * \return 1 if (l1 > l2), 0 otherwise. - ** - * - September 9th 2005: first version. - * - October 15nd 2007: now "greater than" instead of "greater or equal". - */ -int cloog_loop_scalar_gt(l1, l2, level, scaldims, nb_scattdims, scalar) -CloogLoop * l1, * l2 ; -int level, * scaldims, nb_scattdims, scalar ; -{ - return cloog_loop_constant_cmp(l1, l2, level, scaldims, nb_scattdims, scalar) > 0; -} - - -/** - * cloog_loop_scalar_eq function: - * This function returns 1 if loop 'l1' is equal to loop 'l2' for the scalar - * dimension vector that begins at dimension 'scalar', 0 otherwise. What we want - * to know is whether two loops are scheduled for the same time or not. - * This function solves the problem when the considered dimension for scheduling - * is a scalar dimension. Since there may be a succession of scalar dimensions, - * this function will reason about the vector of scalar dimension that begins - * at dimension 'level+scalar' and finish to the first non-scalar dimension. - * - l1 and l2 are the loops to compare, - * - level is the current non-scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - scalar is the current scalar dimension. - ** - * - September 9th 2005 : first version. - */ -int cloog_loop_scalar_eq(l1, l2, level, scaldims, nb_scattdims, scalar) -CloogLoop * l1, * l2 ; -int level, * scaldims, nb_scattdims, scalar ; -{ - return cloog_loop_constant_cmp(l1, l2, level, scaldims, nb_scattdims, scalar) == 0; -} - - -/** - * cloog_loop_scalar_sort function: - * This function sorts a linked list of loops (loop) with respect to the - * scalar dimension vector that begins at dimension 'scalar'. Since there may - * be a succession of scalar dimensions, this function will reason about the - * vector of scalar dimension that begins at dimension 'level+scalar' and - * finish to the first non-scalar dimension. - * \param loop Loop list to sort. - * \param level Current non-scalar dimension. - * \param scaldims Boolean array saying whether a dimension is scalar or not. - * \param nb_scattdims Size of the scaldims array. - * \param scalar Current scalar dimension. - * \return A pointer to the sorted list. - ** - * - July 2nd 2005: first developments. - * - September 2nd 2005: first version. - * - October 15nd 2007: complete rewrite to remove bugs, now a bubble sort. - */ -CloogLoop * cloog_loop_scalar_sort(loop, level, scaldims, nb_scattdims, scalar) -CloogLoop * loop ; -int level, * scaldims, nb_scattdims, scalar ; -{ int ok ; - CloogLoop **current; - - do { - ok = 1; - for (current = &loop; (*current)->next; current = &(*current)->next) { - CloogLoop *next = (*current)->next; - if (cloog_loop_scalar_gt(*current,next,level,scaldims,nb_scattdims,scalar)) { - ok = 0; - (*current)->next = next->next; - next->next = *current; - *current = next; - } - } - } while (!ok); - - return loop ; -} - - -/** - * cloog_loop_generate_backtrack function: - * adaptation from LoopGen 0.4 by F. Quillere. This function implements the - * backtrack of the Quillere et al. algorithm (see the Quillere paper). - * It eliminates unused iterations of the current level for the new one. See the - * example called linearity-1-1 example with and without this part for an idea. - * - October 26th 2001: first version in cloog_loop_generate_general. - * - July 31th 2002: (debug) no more parasite loops (REALLY hard !). - * - October 30th 2005: extraction from cloog_loop_generate_general. - */ -CloogLoop *cloog_loop_generate_backtrack(CloogLoop *loop, - int level, CloogOptions *options) -{ - CloogDomain * domain ; - CloogLoop * now, * now2, * next, * next2, * end, * temp, * l, * inner, - * new_loop ; - - temp = loop ; - loop = NULL ; - - while (temp != NULL) - { l = NULL ; - inner = temp->inner ; - - while (inner != NULL) - { next = inner->next ; - /* This 'if' and its first part is the debug of july 31th 2002. */ - if (inner->block != NULL) { - end = cloog_loop_alloc(temp->state, inner->domain, 0, NULL, - inner->block, NULL, NULL); - domain = cloog_domain_copy(temp->domain) ; - new_loop = cloog_loop_alloc(temp->state, domain, 0, NULL, - NULL, end, NULL); - } - else - new_loop = cloog_loop_project(inner, level); - - cloog_loop_free_parts(inner,0,0,0,0) ; - cloog_loop_add(&l,&now2,new_loop) ; - inner = next ; - } - - temp->inner = NULL ; - - if (l != NULL) - { l = cloog_loop_separate(l) ; - l = cloog_loop_sort(l, level); - while (l != NULL) { - l->stride = cloog_stride_copy(l->stride); - cloog_loop_add(&loop,&now,l) ; - l = l->next ; - } - } - next2 = temp->next ; - cloog_loop_free_parts(temp,1,0,0,0) ; - temp = next2 ; - } - - return loop ; -} - - -/** - * Return 1 if we need to continue recursing to the specified level. - */ -int cloog_loop_more(CloogLoop *loop, int level, int scalar, int nb_scattdims) -{ - return level + scalar <= nb_scattdims || - cloog_domain_dimension(loop->domain) >= level; -} - -/** - * Return 1 if the domains of all loops in the given linked list - * have a fixed value at the given level. - * In principle, there would be no need to check that the fixed value is - * the same for each of these loops because this function is only - * called on a component. However, not all backends perform a proper - * decomposition into components. - */ -int cloog_loop_is_constant(CloogLoop *loop, int level) -{ - cloog_int_t c1, c2; - int r = 1; - - cloog_int_init(c1); - cloog_int_init(c2); - - if (!cloog_domain_lazy_isconstant(loop->domain, level - 1, &c1)) - r = 0; - - for (loop = loop->next; r && loop; loop = loop->next) { - if (!cloog_domain_lazy_isconstant(loop->domain, level - 1, &c2)) - r = 0; - else if (cloog_int_ne(c1, c2)) - r = 0; - } - - cloog_int_clear(c1); - cloog_int_clear(c2); - - return r; -} - -/** - * Assuming all domains in the given linked list of loop - * have a fixed values at level, return a single loop with - * a domain corresponding to this fixed value and with as - * list of inner loops the concatenation of all inner loops - * in the original list. - */ -CloogLoop *cloog_loop_constant(CloogLoop *loop, int level) -{ - CloogLoop *res, *inner, *tmp; - CloogDomain *domain, *t; - - if (!loop) - return loop; - - inner = loop->inner; - domain = loop->domain; - for (tmp = loop->next; tmp; tmp = tmp->next) { - inner = cloog_loop_concat(inner, tmp->inner); - domain = cloog_domain_union(domain, tmp->domain); - } - - domain = cloog_domain_simple_convex(t = domain); - cloog_domain_free(t); - - res = cloog_loop_alloc(loop->state, domain, 0, NULL, NULL, inner, NULL); - - cloog_loop_free_parts(loop, 0, 0, 0, 1); - - return res; -} - - -/* Unroll the given loop at the given level, provided it is allowed - * by cloog_domain_can_unroll. - * If so, we return a list of loops, one for each iteration of the original - * loop. Otherwise, we simply return the original loop. - */ -static CloogLoop *loop_unroll(CloogLoop *loop, int level) -{ - int can_unroll; - cloog_int_t i; - cloog_int_t n; - CloogConstraint *lb; - CloogLoop *res = NULL; - CloogLoop **next_res = &res; - CloogDomain *domain; - CloogLoop *inner; - - cloog_int_init(n); - can_unroll = cloog_domain_can_unroll(loop->domain, level, &n, &lb); - if (!can_unroll) { - cloog_int_clear(n); - return loop; - } - - cloog_int_init(i); - - for (cloog_int_set_si(i, 0); cloog_int_lt(i, n); cloog_int_add_ui(i, i, 1)) { - domain = cloog_domain_copy(loop->domain); - domain = cloog_domain_fixed_offset(domain, level, lb, i); - inner = cloog_loop_copy(loop->inner); - inner = cloog_loop_restrict_all(inner, domain); - if (!inner) { - cloog_domain_free(domain); - continue; - } - *next_res = cloog_loop_alloc(loop->state, domain, 1, NULL, NULL, - inner, NULL); - next_res = &(*next_res)->next; - } - - cloog_int_clear(i); - cloog_int_clear(n); - cloog_constraint_release(lb); - - cloog_loop_free(loop); - - return res; -} - - -/* Unroll all loops in the given list at the given level, provided - * they can be unrolled. - */ -CloogLoop *cloog_loop_unroll(CloogLoop *loop, int level) -{ - CloogLoop *now, *next; - CloogLoop *res = NULL; - CloogLoop **next_res = &res; - - for (now = loop; now; now = next) { - next = now->next; - now->next = NULL; - - *next_res = loop_unroll(now, level); - - while (*next_res) - next_res = &(*next_res)->next; - } - - return res; -} - -CloogLoop *cloog_loop_generate_restricted_or_stop(CloogLoop *loop, - CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options); - -CloogLoop *cloog_loop_recurse(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - int constant, CloogOptions *options); - - -/** - * Recurse on the inner loops of the given single loop. - * - * - loop is the loop for which we have to generate scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - constant is true if the loop is known to be executed at most once - * - options are the general code generation options. - */ -static CloogLoop *loop_recurse(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - int constant, CloogOptions *options) -{ - CloogLoop *inner, *into, *end, *next, *l, *now; - CloogDomain *domain; - - if (level && options->strides && !constant) - cloog_loop_stride(loop, level); - - if (!constant && - options->first_unroll >= 0 && level + scalar >= options->first_unroll) { - loop = cloog_loop_unroll(loop, level); - if (loop->next) - return cloog_loop_recurse(loop, level, scalar, scaldims, - nb_scattdims, 1, options); - } - - if (level && options->otl) - cloog_loop_otl(loop, level); - inner = loop->inner; - domain = cloog_domain_copy(loop->domain); - domain = cloog_domain_add_stride_constraint(domain, loop->stride); - into = NULL ; - while (inner != NULL) - { /* 4b. -ced- recurse for each sub-list of non terminal loops. */ - if (cloog_loop_more(inner, level + 1, scalar, nb_scattdims)) { - end = inner; - while ((end->next != NULL) && - cloog_loop_more(end->next, level + 1, scalar, nb_scattdims)) - end = end->next ; - - next = end->next ; - end->next = NULL ; - - l = cloog_loop_generate_restricted_or_stop(inner, domain, - level + 1, scalar, scaldims, nb_scattdims, options); - - if (l != NULL) - cloog_loop_add_list(&into,&now,l) ; - - inner = next ; - } - else - { cloog_loop_add(&into,&now,inner) ; - inner = inner->next ; - } - } - - cloog_domain_free(domain); - loop->inner = into; - return loop; -} - - -/** - * Recurse on the inner loops of each of the loops in the loop list. - * - * - loop is the loop list for which we have to generate scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - constant is true if the loop is known to be executed at most once - * - options are the general code generation options. - */ -CloogLoop *cloog_loop_recurse(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - int constant, CloogOptions *options) -{ - CloogLoop *now, *next; - CloogLoop *res = NULL; - CloogLoop **next_res = &res; - - for (now = loop; now; now = next) { - next = now->next; - now->next = NULL; - - *next_res = loop_recurse(now, level, scalar, scaldims, nb_scattdims, - constant, options); - - while (*next_res) - next_res = &(*next_res)->next; - } - - return res; -} - -/** - * cloog_loop_generate_general function: - * Adaptation from LoopGen 0.4 by F. Quillere. This function implements the - * Quillere algorithm for polyhedron scanning from step 3 to 5. - * (see the Quillere paper). - * - loop is the loop for which we have to generate a scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - options are the general code generation options. - ** - * - October 26th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 22nd 2005: Adaptation for GMP. - * - September 2nd 2005: The function have been cutted out in two pieces: - * cloog_loop_generate and this one, in order to handle - * the scalar dimension case more efficiently with - * cloog_loop_generate_scalar. - * - November 15th 2005: (debug) the result of the cloog_loop_generate call may - * be a list of polyhedra (especially if stop option is - * used): cloog_loop_add_list instead of cloog_loop_add. - */ -CloogLoop *cloog_loop_generate_general(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - CloogLoop *res, *now, *temp, *l, *new_loop, *next; - int separate = 0; - int constant = 0; - - /* 3. Separate all projections into disjoint polyhedra. */ - if (level > 0 && cloog_loop_is_constant(loop, level)) { - res = cloog_loop_constant(loop, level); - constant = 1; - } else if ((options->f > level+scalar) || (options->f < 0)) - res = cloog_loop_merge(loop, level, options); - else { - res = cloog_loop_separate(loop); - separate = 1; - } - - /* 3b. -correction- sort the loops to determine their textual order. */ - res = cloog_loop_sort(res, level); - - res = cloog_loop_restrict_inner(res); - - if (separate) - res = cloog_loop_specialize(res, level, scalar, scaldims, nb_scattdims); - - /* 4. Recurse for each loop with the current domain as context. */ - temp = res ; - res = NULL ; - if (!level || (level+scalar < options->l) || (options->l < 0)) - res = cloog_loop_recurse(temp, level, scalar, scaldims, nb_scattdims, - constant, options); - else - while (temp != NULL) - { next = temp->next ; - l = cloog_loop_nest(temp->inner, temp->domain, level+1); - new_loop = cloog_loop_alloc(temp->state, temp->domain, 0, NULL, - NULL, l, NULL); - temp->inner = NULL ; - temp->next = NULL ; - cloog_loop_free_parts(temp,0,0,0,0) ; - cloog_loop_add(&res,&now,new_loop) ; - temp = next ; - } - - if (options->strides) - res = cloog_loop_propagate_lower_bound(res, level); - - /* 5. eliminate unused iterations of the current level for the new one. See - * the example called linearity-1-1 example with and without this part - * for an idea. - */ - if (options->backtrack && level && - ((level+scalar < options->l) || (options->l < 0)) && - ((options->f <= level+scalar) && !(options->f < 0))) - res = cloog_loop_generate_backtrack(res, level, options); - - /* Pray for my new paper to be accepted somewhere since the following stuff - * is really amazing :-) ! - * Far long later: The paper has been accepted to PACT 2004 :-))). But there - * are still some bugs and I have no time to fix them. Thus now you have to - * pray for me to get an academic position for that really amazing stuff :-) ! - * Later again: OK, I get my academic position, but still I have not enough - * time to fix and clean this part... Pray again :-) !!! - */ - /* res = cloog_loop_unisolate(res,level) ;*/ - - return(res) ; -} - - -CloogLoop *cloog_loop_generate_restricted(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options); - - -/** - * cloog_loop_generate_scalar function: - * This function applies the simplified code generation scheme in the trivial - * case of scalar dimensions. When dealing with scalar dimensions, there is - * no need of costly polyhedral operations for separation or sorting: sorting - * is a question of comparing scalar vectors and separation amounts to consider - * only loops with the same scalar vector for the next step of the code - * generation process. This function achieves the separation/sorting process - * for the vector of scalar dimension that begins at dimension 'level+scalar' - * and finish to the first non-scalar dimension. - * - loop is the loop for which we have to generate a scanning code, - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - options are the general code generation options. - ** - * - September 2nd 2005: First version. - */ -CloogLoop *cloog_loop_generate_scalar(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ CloogLoop * res, * now, * temp, * l, * end, * next, * ref ; - int scalar_new; - - /* We sort the loop list with respect to the current scalar vector. */ - res = cloog_loop_scalar_sort(loop,level,scaldims,nb_scattdims,scalar) ; - - scalar_new = scalar + scaldims[level + scalar - 1]; - - temp = res ; - res = NULL ; - while (temp != NULL) - { /* Then we will appy the general code generation process to each sub-list - * of loops with the same scalar vector. - */ - end = temp ; - ref = temp ; - - while((end->next != NULL) && - cloog_loop_more(end->next, level, scalar_new, nb_scattdims) && - cloog_loop_scalar_eq(ref,end->next,level,scaldims,nb_scattdims,scalar)) - end = end->next ; - - next = end->next ; - end->next = NULL ; - - /* For the next dimension, scalar value is updated by adding the scalar - * vector size, which is stored at scaldims[level+scalar-1]. - */ - if (cloog_loop_more(temp, level, scalar_new, nb_scattdims)) { - l = cloog_loop_generate_restricted(temp, level, scalar_new, - scaldims, nb_scattdims, options); - - if (l != NULL) - cloog_loop_add_list(&res, &now, l); - } else - cloog_loop_add(&res, &now, temp); - - temp = next ; - } - - return res ; -} - - -/* Compare loop with the next loop based on their constant dimensions. - * The result is < 0, == 0 or > 0 depending on whether the constant - * dimensions of loop are lexicographically smaller, equal or greater - * than those of loop->next. - * If loop is the last in the list, then it is assumed to be smaller - * than the "next" one. - */ -static int cloog_loop_next_scal_cmp(CloogLoop *loop) -{ - int i; - int nb_scaldims; - - if (!loop->next) - return -1; - - nb_scaldims = loop->block->nb_scaldims; - if (loop->next->block->nb_scaldims < nb_scaldims) - nb_scaldims = loop->next->block->nb_scaldims; - - for (i = 0; i < nb_scaldims; ++i) { - int cmp = cloog_int_cmp(loop->block->scaldims[i], - loop->next->block->scaldims[i]); - if (cmp) - return cmp; - } - return loop->block->nb_scaldims - loop->next->block->nb_scaldims; -} - - -/* Check whether the globally constant dimensions of a and b - * have the same value for all globally constant dimensions - * that are situated before any (locally) non-constant dimension. - */ -static int cloog_loop_equal_prefix(CloogLoop *a, CloogLoop *b, - int *scaldims, int nb_scattdims) -{ - int i; - int cst = 0; - int dim = 0; - - for (i = 0; i < nb_scattdims; ++i) { - if (!scaldims[i]) { - dim++; - continue; - } - if (!cloog_int_eq(a->block->scaldims[cst], b->block->scaldims[cst])) - break; - cst++; - } - for (i = i + 1; i < nb_scattdims; ++i) { - if (scaldims[i]) - continue; - if (!cloog_domain_lazy_isconstant(a->domain, dim, NULL)) - return 0; - /* No need to check that dim is also constant in b and that the - * constant values are equal. That will happen during the check - * whether the two domains are equal. - */ - dim++; - } - return 1; -} - - -/* Try to block adjacent loops in the loop list "loop". - * We only attempt blocking if the constant dimensions of the loops - * in the least are (not necessarily strictly) increasing. - * Then we look for a sublist such that the first (begin) has constant - * dimensions strictly larger than the previous loop in the complete - * list and such that the loop (end) after the last loop in the sublist - * has constant dimensions strictly larger than the last loop in the sublist. - * Furthermore, all loops in the sublist should have the same domain - * (with globally constant dimensions removed) and the difference - * (if any) in constant dimensions may only occur after all the - * (locally) constant dimensions. - * If we find such a sublist, then the blocks of all but the first - * are merged into the block of the first. - * - * Note that this function can only be called before the global - * blocklist has been created because it may otherwise modify and destroy - * elements on that list. - */ -CloogLoop *cloog_loop_block(CloogLoop *loop, int *scaldims, int nb_scattdims) -{ - CloogLoop *begin, *end, *l; - int begin_after_previous; - int end_after_previous; - - if (!loop->next) - return loop; - for (begin = loop; begin; begin = begin->next) { - if (!begin->block || !begin->block->scaldims) - return loop; - if (cloog_loop_next_scal_cmp(begin) > 0) - return loop; - } - - begin_after_previous = 1; - for (begin = loop; begin; begin = begin->next) { - if (!begin_after_previous) { - begin_after_previous = cloog_loop_next_scal_cmp(begin) < 0; - continue; - } - - end_after_previous = cloog_loop_next_scal_cmp(begin) < 0; - for (end = begin->next; end; end = end->next) { - if (!cloog_loop_equal_prefix(begin, end, scaldims, nb_scattdims)) - break; - if (!cloog_domain_lazy_equal(begin->domain, end->domain)) - break; - end_after_previous = cloog_loop_next_scal_cmp(end) < 0; - } - if (end != begin->next && end_after_previous) { - for (l = begin->next; l != end; l = begin->next) { - cloog_block_merge(begin->block, l->block); - begin->next = l->next; - cloog_loop_free_parts(l, 1, 0, 1, 0); - } - } - - begin_after_previous = cloog_loop_next_scal_cmp(begin) < 0; - } - - return loop; -} - - -/** - * Check whether for any fixed iteration of the outer loops, - * there is an iteration of loop1 that is lexicographically greater - * than an iteration of loop2. - * Return 1 if there exists (or may exist) such a pair. - * Return 0 if all iterations of loop1 are lexicographically smaller - * than the iterations of loop2. - * If no iteration is lexicographically greater, but if there are - * iterations that are equal to iterations of loop2, then return "def". - * This is useful for ensuring that such statements are not reordered. - * Some users, including the test_run target in test, expect - * the statements at a given point to be run in the original order. - * Passing the value "0" for "def" would allow such statements to be reordered - * and would allow for the detection of more components. - */ -int cloog_loop_follows(CloogLoop *loop1, CloogLoop *loop2, - int level, int scalar, int *scaldims, int nb_scattdims, int def) -{ - int dim1, dim2; - - dim1 = cloog_domain_dimension(loop1->domain); - dim2 = cloog_domain_dimension(loop2->domain); - while ((level <= dim1 && level <= dim2) || - level_is_constant(level, scalar, scaldims, nb_scattdims)) { - if (level_is_constant(level, scalar, scaldims, nb_scattdims)) { - int cmp = cloog_loop_constant_cmp(loop1, loop2, level, scaldims, - nb_scattdims, scalar); - if (cmp > 0) - return 1; - if (cmp < 0) - return 0; - scalar += scaldims[level + scalar - 1]; - } else { - int follows = cloog_domain_follows(loop1->domain, loop2->domain, - level); - if (follows > 0) - return 1; - if (follows < 0) - return 0; - level++; - } - } - - return def; -} - - -/* Structure for representing the nodes in the graph being traversed - * using Tarjan's algorithm. - * index represents the order in which nodes are visited. - * min_index is the index of the root of a (sub)component. - * on_stack indicates whether the node is currently on the stack. - */ -struct cloog_loop_sort_node { - int index; - int min_index; - int on_stack; -}; -/* Structure for representing the graph being traversed - * using Tarjan's algorithm. - * len is the number of nodes - * node is an array of nodes - * stack contains the nodes on the path from the root to the current node - * sp is the stack pointer - * index is the index of the last node visited - * order contains the elements of the components separated by -1 - * op represents the current position in order - */ -struct cloog_loop_sort { - int len; - struct cloog_loop_sort_node *node; - int *stack; - int sp; - int index; - int *order; - int op; -}; - -/* Allocate and initialize cloog_loop_sort structure. - */ -static struct cloog_loop_sort *cloog_loop_sort_alloc(int len) -{ - struct cloog_loop_sort *s; - int i; - - s = (struct cloog_loop_sort *)malloc(sizeof(struct cloog_loop_sort)); - assert(s); - s->len = len; - s->node = (struct cloog_loop_sort_node *) - malloc(len * sizeof(struct cloog_loop_sort_node)); - assert(s->node); - for (i = 0; i < len; ++i) - s->node[i].index = -1; - s->stack = (int *)malloc(len * sizeof(int)); - assert(s->stack); - s->order = (int *)malloc(2 * len * sizeof(int)); - assert(s->order); - - s->sp = 0; - s->index = 0; - s->op = 0; - - return s; -} - -/* Free cloog_loop_sort structure. - */ -static void cloog_loop_sort_free(struct cloog_loop_sort *s) -{ - free(s->node); - free(s->stack); - free(s->order); - free(s); -} - - -/* Check whether for any fixed iteration of the outer loops, - * there is an iteration of loop1 that is lexicographically greater - * than an iteration of loop2, where the iteration domains are - * available in the inner loops of the arguments. - * - * By using this functions to detect components, we ensure that - * two CloogLoops appear in the same component if some iterations of - * each loop should be executed before some iterations of the other loop. - * Since we also want two CloogLoops that have exactly the same - * iteration domain at the current level to be placed in the same component, - * we first check if these domains are indeed the same. - */ -static int inner_loop_follows(CloogLoop *loop1, CloogLoop *loop2, - int level, int scalar, int *scaldims, int nb_scattdims, int def) -{ - int f; - - f = cloog_domain_lazy_equal(loop1->domain, loop2->domain); - if (!f) - f = cloog_loop_follows(loop1->inner, loop2->inner, - level, scalar, scaldims, nb_scattdims, def); - - return f; -} - - -/* Perform Tarjan's algorithm for computing the strongly connected components - * in the graph with the individual CloogLoops as vertices. - * Two CloopLoops appear in the same component if they both (indirectly) - * "follow" each other, where the following relation is determined - * by the follows function. - */ -static void cloog_loop_components_tarjan(struct cloog_loop_sort *s, - CloogLoop **loop_array, int i, int level, int scalar, int *scaldims, - int nb_scattdims, - int (*follows)(CloogLoop *loop1, CloogLoop *loop2, - int level, int scalar, int *scaldims, int nb_scattdims, int def)) -{ - int j; - - s->node[i].index = s->index; - s->node[i].min_index = s->index; - s->node[i].on_stack = 1; - s->index++; - s->stack[s->sp++] = i; - - for (j = s->len - 1; j >= 0; --j) { - int f; - - if (j == i) - continue; - if (s->node[j].index >= 0 && - (!s->node[j].on_stack || - s->node[j].index > s->node[i].min_index)) - continue; - - f = follows(loop_array[i], loop_array[j], - level, scalar, scaldims, nb_scattdims, i > j); - if (!f) - continue; - - if (s->node[j].index < 0) { - cloog_loop_components_tarjan(s, loop_array, j, level, scalar, - scaldims, nb_scattdims, follows); - if (s->node[j].min_index < s->node[i].min_index) - s->node[i].min_index = s->node[j].min_index; - } else if (s->node[j].index < s->node[i].min_index) - s->node[i].min_index = s->node[j].index; - } - - if (s->node[i].index != s->node[i].min_index) - return; - - do { - j = s->stack[--s->sp]; - s->node[j].on_stack = 0; - s->order[s->op++] = j; - } while (j != i); - s->order[s->op++] = -1; -} - - -static int qsort_index_cmp(const void *p1, const void *p2) -{ - return *(int *)p1 - *(int *)p2; -} - -/* Sort the elements of the component starting at list. - * The list is terminated by a -1. - */ -static void sort_component(int *list) -{ - int len; - - for (len = 0; list[len] != -1; ++len) - ; - - qsort(list, len, sizeof(int), qsort_index_cmp); -} - -/* Given an array of indices "list" into the "loop_array" array, - * terminated by -1, construct a linked list of the corresponding - * entries and put the result in *res. - * The value returned is the number of CloogLoops in the (linked) list - */ -static int extract_component(CloogLoop **loop_array, int *list, CloogLoop **res) -{ - int i = 0; - - sort_component(list); - while (list[i] != -1) { - *res = loop_array[list[i]]; - res = &(*res)->next; - ++i; - } - *res = NULL; - - return i; -} - - -/** - * Call cloog_loop_generate_scalar or cloog_loop_generate_general - * on each of the strongly connected components in the list of CloogLoops - * pointed to by "loop". - * - * We use Tarjan's algorithm to find the strongly connected components. - * Note that this algorithm also topologically sorts the components. - * - * The components are treated separately to avoid spurious separations. - * The concatentation of the results may contain successive loops - * with the same bounds, so we try to combine such loops. - */ -CloogLoop *cloog_loop_generate_components(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - int i, nb_loops; - CloogLoop *tmp; - CloogLoop *res, **res_next; - CloogLoop **loop_array; - struct cloog_loop_sort *s; - - if (level == 0 || !loop->next) - return cloog_loop_generate_general(loop, level, scalar, - scaldims, nb_scattdims, options); - - nb_loops = cloog_loop_count(loop); - - loop_array = (CloogLoop **)malloc(nb_loops * sizeof(CloogLoop *)); - assert(loop_array); - - for (i = 0, tmp = loop; i < nb_loops; i++, tmp = tmp->next) - loop_array[i] = tmp; - - s = cloog_loop_sort_alloc(nb_loops); - for (i = nb_loops - 1; i >= 0; --i) { - if (s->node[i].index >= 0) - continue; - cloog_loop_components_tarjan(s, loop_array, i, level, scalar, scaldims, - nb_scattdims, &inner_loop_follows); - } - - i = 0; - res = NULL; - res_next = &res; - while (nb_loops) { - int n = extract_component(loop_array, &s->order[i], &tmp); - i += n + 1; - nb_loops -= n; - *res_next = cloog_loop_generate_general(tmp, level, scalar, - scaldims, nb_scattdims, options); - while (*res_next) - res_next = &(*res_next)->next; - } - - cloog_loop_sort_free(s); - - free(loop_array); - - res = cloog_loop_combine(res); - - return res; -} - - -/* For each loop in the list "loop", decompose the list of - * inner loops into strongly connected components and put - * the components into separate loops at the top level. - */ -CloogLoop *cloog_loop_decompose_inner(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims) -{ - CloogLoop *l, *tmp; - CloogLoop **loop_array; - int i, n_loops, max_loops = 0; - struct cloog_loop_sort *s; - - for (l = loop; l; l = l->next) { - n_loops = cloog_loop_count(l->inner); - if (max_loops < n_loops) - max_loops = n_loops; - } - - if (max_loops <= 1) - return loop; - - loop_array = (CloogLoop **)malloc(max_loops * sizeof(CloogLoop *)); - assert(loop_array); - - for (l = loop; l; l = l->next) { - int n; - - for (i = 0, tmp = l->inner; tmp; i++, tmp = tmp->next) - loop_array[i] = tmp; - n_loops = i; - if (n_loops <= 1) - continue; - - s = cloog_loop_sort_alloc(n_loops); - for (i = n_loops - 1; i >= 0; --i) { - if (s->node[i].index >= 0) - continue; - cloog_loop_components_tarjan(s, loop_array, i, level, scalar, - scaldims, nb_scattdims, &cloog_loop_follows); - } - - n = extract_component(loop_array, s->order, &l->inner); - n_loops -= n; - i = n + 1; - while (n_loops) { - CloogLoop *inner; - - n = extract_component(loop_array, &s->order[i], &inner); - n_loops -= n; - i += n + 1; - tmp = cloog_loop_alloc(l->state, cloog_domain_copy(l->domain), - l->otl, l->stride, l->block, inner, l->next); - l->next = tmp; - l = tmp; - } - - cloog_loop_sort_free(s); - } - - free(loop_array); - - return loop; -} - - -CloogLoop *cloog_loop_generate_restricted(CloogLoop *loop, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - /* To save both time and memory, we switch here depending on whether the - * current dimension is scalar (simplified processing) or not (general - * processing). - */ - if (level_is_constant(level, scalar, scaldims, nb_scattdims)) - return cloog_loop_generate_scalar(loop, level, scalar, - scaldims, nb_scattdims, options); - /* - * 2. Compute the projection of each polyhedron onto the outermost - * loop variable and the parameters. - */ - loop = cloog_loop_project_all(loop, level); - - return cloog_loop_generate_components(loop, level, scalar, scaldims, - nb_scattdims, options); -} - - -CloogLoop *cloog_loop_generate_restricted_or_stop(CloogLoop *loop, - CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - /* If the user asked to stop code generation at this level, let's stop. */ - if ((options->stop >= 0) && (level+scalar >= options->stop+1)) - return cloog_loop_stop(loop,context) ; - - return cloog_loop_generate_restricted(loop, level, scalar, scaldims, - nb_scattdims, options); -} - - -/** - * cloog_loop_generate function: - * Adaptation from LoopGen 0.4 by F. Quillere. This function implements the - * Quillere algorithm for polyhedron scanning from step 1 to 2. - * (see the Quillere paper). - * - loop is the loop for which we have to generate a scanning code, - * - context is the context of the current loop (constraints on parameter and/or - * on outer loop counters), - * - level is the current non-scalar dimension, - * - scalar is the current scalar dimension, - * - scaldims is the boolean array saying whether a dimension is scalar or not, - * - nb_scattdims is the size of the scaldims array, - * - options are the general code generation options. - ** - * - October 26th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - June 15th 2005: a memory leak fixed (loop was not entirely freed when - * the result of cloog_loop_restrict was NULL). - * - June 22nd 2005: Adaptation for GMP. - * - September 2nd 2005: The function have been cutted out in two pieces: - * cloog_loop_generate and this one, in order to handle - * the scalar dimension case more efficiently with - * cloog_loop_generate_scalar. - * - November 15th 2005: (debug) Condition for stop option no more take care of - * further scalar dimensions. - */ -CloogLoop *cloog_loop_generate(CloogLoop *loop, CloogDomain *context, - int level, int scalar, int *scaldims, int nb_scattdims, - CloogOptions *options) -{ - /* 1. Replace each polyhedron by its intersection with the context. - */ - loop = cloog_loop_restrict_all(loop, context); - if (!loop) - return NULL; - - return cloog_loop_generate_restricted_or_stop(loop, context, - level, scalar, scaldims, nb_scattdims, options); -} - - -/* - * Internal function for simplifying a single loop in a list of loops. - * See cloog_loop_simplify. - */ -static CloogLoop *loop_simplify(CloogLoop *loop, CloogDomain *context, - int level, int nb_scattdims, CloogOptions *options) -{ - int domain_dim; - CloogBlock * new_block ; - CloogLoop *simplified, *inner; - CloogDomain * domain, * simp, * inter, * extended_context ; - - domain = loop->domain ; - - domain_dim = cloog_domain_dimension(domain); - extended_context = cloog_domain_extend(context, domain_dim); - inter = cloog_domain_intersection(domain,extended_context) ; - simp = cloog_domain_simplify(domain, extended_context); - cloog_domain_free(extended_context) ; - - /* If the constraint system is never true, go to the next one. */ - if (cloog_domain_never_integral(simp)) { - cloog_loop_free(loop->inner); - cloog_domain_free(inter); - cloog_domain_free(simp); - return NULL; - } - - inner = cloog_loop_simplify(loop->inner, inter, level+1, nb_scattdims, - options); - - if ((inner == NULL) && (loop->block == NULL)) { - cloog_domain_free(inter); - cloog_domain_free(simp); - return NULL; - } - - new_block = cloog_block_copy(loop->block) ; - - simplified = cloog_loop_alloc(loop->state, simp, loop->otl, loop->stride, - new_block, inner, NULL); - - /* Only save the domains, if it involves only scattering dimensions. */ - if (options->save_domains) { - if (domain_dim > nb_scattdims) { - CloogDomain *t; - inter = cloog_domain_project(t = inter, nb_scattdims); - cloog_domain_free(t); - } - inter = cloog_domain_add_stride_constraint(inter, loop->stride); - simplified->unsimplified = inter; - } else - cloog_domain_free(inter); - - return(simplified) ; -} - - -/** - * cloog_loop_simplify function: - * This function implements the part 6. of the Quillere algorithm, it - * recursively simplifies each loop in the context of the preceding loop domain. - * It returns a pointer to the simplified loop list. - * The cloog_domain_simplify (DomainSimplify) behaviour is really bad with - * polyhedra union and some really awful sidesteppings were written, I plan - * to solve that... - * - October 31th 2001: first version. - * - July 3rd->11th 2003: memory leaks hunt and correction. - * - April 16th 2005: a memory leak fixed (extended_context was not freed). - * - June 15th 2005: a memory leak fixed (loop was not conveniently freed - * when the constraint system is never true). - * - October 27th 2005: - this function called before cloog_loop_fast_simplify - * is now the official cloog_loop_simplify function in - * replacement of a slower and more complex one (after - * deep changes in the pretty printer). - * - we use cloog_loop_disjoint to fix the problem when - * simplifying gives a union of polyhedra (before, it - * was under the responsibility of the pretty printer). - */ -CloogLoop *cloog_loop_simplify(CloogLoop *loop, CloogDomain *context, int level, - int nb_scattdims, CloogOptions *options) -{ - CloogLoop *now; - CloogLoop *res = NULL; - CloogLoop **next = &res; - int need_split = 0; - - for (now = loop; now; now = now->next) - if (!cloog_domain_isconvex(now->domain)) { - now->domain = cloog_domain_simplify_union(now->domain); - if (!cloog_domain_isconvex(now->domain)) - need_split = 1; - } - - /* If the input of CLooG contains any union domains, then they - * may not have been split yet at this point. Do so now as the - * clast construction assumes there are no union domains. - */ - if (need_split) - loop = cloog_loop_disjoint(loop); - - for (now = loop; now; now = now->next) { - *next = loop_simplify(now, context, level, nb_scattdims, options); - - now->inner = NULL; /* For loop integrity. */ - cloog_domain_free(now->domain); - now->domain = NULL; - - if (*next) - next = &(*next)->next; - } - cloog_loop_free(loop); - - return res; -} - - -/** - * cloog_loop_scatter function: - * This function add the scattering (scheduling) informations in a loop. - */ -void cloog_loop_scatter(CloogLoop * loop, CloogScattering *scatt) -{ - loop->domain = cloog_domain_scatter(loop->domain, scatt); -} - diff --git a/cloog-0.17.0/source/matrix.c b/cloog-0.17.0/source/matrix.c deleted file mode 100644 index 43c238024c596f5cea918dbed2eb9a2e6eac97d0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/matrix.c +++ /dev/null @@ -1,213 +0,0 @@ - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** cloogmatrix.c ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - -#include -#include -#include -#include "../include/cloog/cloog.h" - -/** - * cloog_matrix_alloc: - * Allocate a CloogMatrix data structure with NbRows rows and NbColumns columns. - * All values are initialized to 0. - * This method returns a pointer to the data structure if successful or a NULL - * pointer otherwise. - */ -CloogMatrix *cloog_matrix_alloc(unsigned NbRows, unsigned NbColumns) -{ - CloogMatrix *matrix; - cloog_int_t **p, *q; - int i, j; - - matrix = (CloogMatrix *)malloc(sizeof(CloogMatrix)); - - if (!matrix) - return NULL; - - matrix->NbRows = NbRows; - matrix->NbColumns = NbColumns; - - if (!NbRows || !NbColumns) { - matrix->p = NULL; - matrix->p_Init = NULL; - return matrix; - } - - p = (cloog_int_t **)malloc(NbRows * sizeof(cloog_int_t *)); - - if (p == NULL) { - free (matrix); - return NULL; - } - - q = (cloog_int_t *)malloc(NbRows * NbColumns * sizeof(cloog_int_t)); - - if (q == NULL) { - free (matrix); - free (p); - return NULL; - } - - matrix->p = p; - matrix->p_Init = q; - - for (i = 0; i < NbRows; i++) { - *p++ = q; - for (j = 0; j < NbColumns; j++) { - cloog_int_init(*(q+j)); - cloog_int_set_si(*(q+j), 0); - } - q += NbColumns; - } - - return matrix; -} - -/** - * cloog_matrix_free: - * Free matrix. - */ -void cloog_matrix_free(CloogMatrix * matrix) -{ - int i; - cloog_int_t *p; - int size = matrix->NbRows * matrix->NbColumns; - - p = matrix->p_Init; - - for (i = 0; i < size; i++) - cloog_int_clear(*p++); - - if (matrix) { - free(matrix->p_Init); - free(matrix->p); - free(matrix); - } -} - - -/** - * Print the elements of CloogMatrix M to file, with each row prefixed - * by prefix and suffixed by suffix. - */ -void cloog_matrix_print_structure(FILE *file, CloogMatrix *M, - const char *prefix, const char *suffix) -{ - int i, j; - - for (i = 0; i < M->NbRows; ++i) { - fprintf(file, "%s", prefix); - for (j = 0; j < M->NbColumns; ++j) { - cloog_int_print(file, M->p[i][j]); - fprintf(file, " "); - } - fprintf(file, "%s\n", suffix); - } -} - -/** - * cloog_matrix_print function: - * This function prints the content of a CloogMatrix structure (matrix) into a - * file (foo, possibly stdout). - */ -void cloog_matrix_print(FILE* foo, CloogMatrix* m) -{ - if (!m) - fprintf(foo, "(null)\n"); - - fprintf(foo, "%d %d\n", m->NbRows, m->NbColumns); - cloog_matrix_print_structure(foo, m, "", ""); - fflush(foo); -} - - -static char *next_line(FILE *input, char *line, unsigned len) -{ - char *p; - - do { - if (!(p = fgets(line, len, input))) - return NULL; - while (isspace(*p) && *p != '\n') - ++p; - } while (*p == '#' || *p == '\n'); - - return p; -} - -CloogMatrix *cloog_matrix_read(FILE *input) -{ - unsigned n_row, n_col; - char line[1024]; - - if (!next_line(input, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, "%u %u", &n_row, &n_col) != 2) - cloog_die("Input error.\n"); - - return cloog_matrix_read_of_size(input, n_row, n_col); -} - -/** - * Read a matrix in PolyLib format from input. - */ -CloogMatrix *cloog_matrix_read_of_size(FILE *input, - unsigned n_row, unsigned n_col) -{ - CloogMatrix *M; - int i, j; - char line[1024]; - char val[1024]; - char *p; - - M = cloog_matrix_alloc(n_row, n_col); - if (!M) - cloog_die("memory overflow.\n"); - for (i = 0; i < n_row; ++i) { - int offset; - int n; - - p = next_line(input, line, sizeof(line)); - if (!p) - cloog_die("Input error.\n"); - for (j = 0; j < n_col; ++j) { - n = sscanf(p, "%s%n", val, &offset); - if (!n) - cloog_die("Input error.\n"); - cloog_int_read(M->p[i][j], val); - p += offset; - } - } - - return M; -} diff --git a/cloog-0.17.0/source/matrix/constraintset.c b/cloog-0.17.0/source/matrix/constraintset.c deleted file mode 100644 index 78025f88a73ab35a951c0a12167595d56b869101..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/matrix/constraintset.c +++ /dev/null @@ -1,1056 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** constraintset.c ** - **-------------------------------------------------------------------** - ** First version: april 17th 2005 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - - -# include -# include -# include -#include -#include - - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - - -CloogConstraint *cloog_constraint_first(CloogConstraintSet *constraints); -CloogConstraint *cloog_constraint_next(CloogConstraint *constraint); - - -CloogConstraintSet *cloog_constraint_set_from_cloog_matrix(CloogMatrix *M) -{ - return (CloogConstraintSet *)M; -} - - -void cloog_constraint_set_free(CloogConstraintSet *constraints) -{ - cloog_matrix_free(&constraints->M); -} - -int cloog_constraint_set_contains_level(CloogConstraintSet *constraints, - int level, int nb_parameters) -{ - return constraints->M.NbColumns - 2 - nb_parameters >= level; -} - -/* Check if the variable at position level is defined by an - * equality. If so, return the row number. Otherwise, return -1. - * - * If there is an equality, we can print it directly -no ambiguity-. - * PolyLib can give more than one equality, we use just the first one - * (this is a PolyLib problem, but all equalities are equivalent). - */ -CloogConstraint *cloog_constraint_set_defining_equality(CloogConstraintSet *constraints, int level) -{ - CloogConstraint *constraint = ALLOC(CloogConstraint); - int i; - - constraint->set = constraints; - for (i = 0; i < constraints->M.NbRows; i++) - if (cloog_int_is_zero(constraints->M.p[i][0]) && - !cloog_int_is_zero(constraints->M.p[i][level])) { - constraint->line = &constraints->M.p[i]; - return constraint; - } - free(constraint); - return cloog_constraint_invalid(); -} - -/* Check if the variable (e) at position level is defined by a - * pair of inequalities - * + -m e + + k1 >= 0 - * <-a, i> + m e + <-b, p> + k2 >= 0 - * with 0 <= k1 + k2 < m - * If so return the row number of the upper bound and set *lower - * to the row number of the lower bound. If not, return -1. - * - * If the variable at position level occurs in any other constraint, - * then we currently return -1. The modulo guard that we would generate - * would still be correct, but we would also need to generate - * guards corresponding to the other constraints, and this has not - * been implemented yet. - */ -CloogConstraint *cloog_constraint_set_defining_inequalities(CloogConstraintSet *constraints, - int level, CloogConstraint **lower, int nb_par) -{ - int i, j, k; - cloog_int_t m; - CloogMatrix *matrix = &constraints->M; - unsigned len = matrix->NbColumns - 2; - unsigned nb_iter = len - nb_par; - CloogConstraint *constraint; - - for (i = 0; i < matrix->NbRows; i++) { - if (cloog_int_is_zero(matrix->p[i][level])) - continue; - if (cloog_int_is_zero(matrix->p[i][0])) - return cloog_constraint_invalid(); - if (cloog_int_is_one(matrix->p[i][level])) - return cloog_constraint_invalid(); - if (cloog_int_is_neg_one(matrix->p[i][level])) - return cloog_constraint_invalid(); - if (cloog_seq_first_non_zero(matrix->p[i]+level+1, - (1+nb_iter)-(level+1)) != -1) - return cloog_constraint_invalid(); - for (j = i+1; j < matrix->NbRows; ++j) { - if (cloog_int_is_zero(matrix->p[j][level])) - continue; - if (cloog_int_is_zero(matrix->p[j][0])) - return cloog_constraint_invalid(); - if (cloog_int_is_one(matrix->p[j][level])) - return cloog_constraint_invalid(); - if (cloog_int_is_neg_one(matrix->p[j][level])) - return cloog_constraint_invalid(); - if (cloog_seq_first_non_zero(matrix->p[j]+level+1, - (1+nb_iter)-(level+1)) != -1) - return cloog_constraint_invalid(); - - cloog_int_init(m); - cloog_int_add(m, matrix->p[i][1+len], matrix->p[j][1+len]); - if (cloog_int_is_neg(m) || - cloog_int_abs_ge(m, matrix->p[i][level])) { - cloog_int_clear(m); - return cloog_constraint_invalid(); - } - cloog_int_clear(m); - - if (!cloog_seq_is_neg(matrix->p[i]+1, matrix->p[j]+1, - len)) - return cloog_constraint_invalid(); - for (k = j+1; k < matrix->NbRows; ++k) - if (!cloog_int_is_zero(matrix->p[k][level])) - return cloog_constraint_invalid(); - *lower = ALLOC(CloogConstraint); - constraint = ALLOC(CloogConstraint); - (*lower)->set = constraints; - constraint->set = constraints; - if (cloog_int_is_pos(matrix->p[i][level])) { - (*lower)->line = &matrix->p[i]; - constraint->line = &matrix->p[j]; - } else { - (*lower)->line = &matrix->p[j]; - constraint->line = &matrix->p[i]; - } - return constraint; - } - } - return cloog_constraint_invalid(); -} - -int cloog_constraint_set_total_dimension(CloogConstraintSet *constraints) -{ - return constraints->M.NbColumns - 2; -} - -int cloog_constraint_set_n_iterators(CloogConstraintSet *constraint, int nb_par) -{ - return cloog_constraint_set_total_dimension(constraint) - nb_par; -} - -int cloog_equal_total_dimension(CloogEqualities *equal) -{ - return cloog_constraint_set_total_dimension(equal->constraints); -} - -int cloog_constraint_total_dimension(CloogConstraint *constraint) -{ - return cloog_constraint_set_total_dimension(constraint->set); -} - - - -/****************************************************************************** - * Equalities spreading functions * - ******************************************************************************/ - - -/* Equalities are stored inside a CloogMatrix data structure called "equal". - * This matrix has (nb_scattering + nb_iterators + 1) rows (i.e. total - * dimensions + 1, the "+ 1" is because a statement can be included inside an - * external loop without iteration domain), and (nb_scattering + nb_iterators + - * nb_parameters + 2) columns (all unknowns plus the scalar plus the equality - * type). The ith row corresponds to the equality "= 0" for the ith dimension - * iterator. The first column gives the equality type (0: no equality, then - * EQTYPE_* -see pprint.h-). At each recursion of pprint, if an equality for - * the current level is found, the corresponding row is updated. Then the - * equality if it exists is used to simplify expressions (e.g. if we have - * "i+1" while we know that "i=2", we simplify it in "3"). At the end of - * the pprint call, the corresponding row is reset to zero. - */ - -CloogEqualities *cloog_equal_alloc(int n, int nb_levels, - int nb_parameters) -{ - int i; - CloogEqualities *equal = ALLOC(CloogEqualities); - - equal->constraints = cloog_constraint_set_from_cloog_matrix( - cloog_matrix_alloc(n, nb_levels + nb_parameters + 1)); - equal->types = ALLOCN(int, n); - for (i = 0; i < n; ++i) - equal->types[i] = EQTYPE_NONE; - return equal; -} - -void cloog_equal_free(CloogEqualities *equal) -{ - cloog_matrix_free(&equal->constraints->M); - free(equal->types); - free(equal); -} - -int cloog_equal_count(CloogEqualities *equal) -{ - return equal->constraints->M.NbRows; -} - -CloogConstraintSet *cloog_equal_constraints(CloogEqualities *equal) -{ - return equal->constraints; -} - - -/** - * cloog_constraint_equal_type function : - * This function returns the type of the equality in the constraint (line) of - * (constraints) for the element (level). An equality is 'constant' iff all - * other factors are null except the constant one. It is a 'pure item' iff - * it is equal or opposite to a single variable or parameter. - * Otherwise it is an 'affine expression'. - * For instance: - * i = -13 is constant, i = j, j = -M are pure items, - * j = 2*M, i = j+1, 2*j = M are affine expressions. - * - * - constraints is the matrix of constraints, - * - level is the column number in equal of the element which is 'equal to', - ** - * - July 3rd 2002: first version, called pprint_equal_isconstant. - * - July 6th 2002: adaptation for the 3 types. - * - June 15th 2005: (debug) expr = domain->Constraint[line] was evaluated - * before checking if line != ONE_TIME_LOOP. Since - * ONE_TIME_LOOP is -1, an invalid read was possible. - * - October 19th 2005: Removal of the once-time-loop specific processing. - */ -static int cloog_constraint_equal_type(CloogConstraint *constraint, int level) -{ - int i, one=0 ; - cloog_int_t *expr; - - expr = *constraint->line; - - if (!cloog_int_is_one(expr[level]) && !cloog_int_is_neg_one(expr[level])) - return EQTYPE_EXAFFINE; - - /* There is only one non null factor, and it must be +1 or -1 for - * iterators or parameters. - */ - for (i = 1;i <= constraint->set->M.NbColumns-2; i++) - if (!cloog_int_is_zero(expr[i]) && (i != level)) { - if ((!cloog_int_is_one(expr[i]) && !cloog_int_is_neg_one(expr[i])) || (one != 0)) - return EQTYPE_EXAFFINE ; - else - one = 1 ; - } - /* if the constant factor is non null, it must be alone. */ - if (one != 0) { - if (!cloog_int_is_zero(expr[constraint->set->M.NbColumns-1])) - return EQTYPE_EXAFFINE ; - } - else - return EQTYPE_CONSTANT ; - - return EQTYPE_PUREITEM ; -} - - -int cloog_equal_type(CloogEqualities *equal, int level) -{ - return equal->types[level-1]; -} - - -/** - * cloog_equal_update function: - * this function updates a matrix of equalities where each row corresponds to - * the equality "=0" of an affine expression such that the entry at column - * "row" (="level") is not zero. This matrix is upper-triangular, except the - * row number "level-1" which has to be updated for the matrix to be triangular. - * This function achieves the processing. - * - equal is the matrix to be updated, - * - level gives the row that has to be updated (it is actually row "level-1"), - * - nb_par is the number of parameters of the program. - ** - * - September 20th 2005: first version. - */ -static void cloog_equal_update(CloogEqualities *equal, int level, int nb_par) -{ int i, j ; - cloog_int_t gcd, factor_level, factor_outer, temp_level, temp_outer; - - cloog_int_init(gcd); - cloog_int_init(temp_level); - cloog_int_init(temp_outer); - cloog_int_init(factor_level); - cloog_int_init(factor_outer); - - /* For each previous level, */ - for (i=level-2;i>=0;i--) - { /* if the corresponding iterator is inside the current equality and is equal - * to something, - */ - if (!cloog_int_is_zero(equal->constraints->M.p[level-1][i+1]) && equal->types[i]) - { /* Compute the Greatest Common Divisor. */ - cloog_int_gcd(gcd, equal->constraints->M.p[level-1][i+1], - equal->constraints->M.p[i][i+1]); - - /* Compute the factors to apply to each row vector element. */ - cloog_int_divexact(factor_level, equal->constraints->M.p[i][i+1], gcd); - cloog_int_divexact(factor_outer, equal->constraints->M.p[level-1][i+1], gcd); - - /* Now update the row 'level'. */ - /* - the iterators, up to level, */ - for (j = 1; j <= level; j++) { - cloog_int_mul(temp_level, factor_level, - equal->constraints->M.p[level-1][j]); - cloog_int_mul(temp_outer, factor_outer, equal->constraints->M.p[i][j]); - cloog_int_sub(equal->constraints->M.p[level-1][j], temp_level, temp_outer); - } - /* - between last useful iterator (level) and the first parameter, the - * matrix is sparse (full of zeroes), we just do nothing there. - * - the parameters and the scalar. - */ - for (j = 0; j < nb_par + 1; j++) { - cloog_int_mul(temp_level,factor_level, - equal->constraints->M.p[level-1] - [equal->constraints->M.NbColumns-j-1]); - cloog_int_mul(temp_outer,factor_outer, - equal->constraints->M.p[i][equal->constraints->M.NbColumns-j-1]); - cloog_int_sub(equal->constraints->M.p[level-1] - [equal->constraints->M.NbColumns-j-1], - temp_level,temp_outer) ; - } - } - } - - /* Normalize (divide by GCD of all elements) the updated equality. */ - cloog_seq_normalize(&(equal->constraints->M.p[level-1][1]), - equal->constraints->M.NbColumns-1); - - cloog_int_clear(gcd); - cloog_int_clear(temp_level); - cloog_int_clear(temp_outer); - cloog_int_clear(factor_level); - cloog_int_clear(factor_outer); -} - - -/** - * cloog_equal_add function: - * This function updates the row (level-1) of the equality matrix (equal) with - * the row that corresponds to the row (line) of the matrix (matrix). - * - equal is the matrix of equalities, - * - matrix is the matrix of constraints, - * - level is the column number in matrix of the element which is 'equal to', - * - line is the line number in matrix of the constraint we want to study, - * - the infos structure gives the user all options on code printing and more. - ** - * - July 2nd 2002: first version. - * - October 19th 2005: Addition of the once-time-loop specific processing. - */ -void cloog_equal_add(CloogEqualities *equal, CloogConstraintSet *constraints, - int level, CloogConstraint *line, int nb_par) -{ - int j; - CloogConstraint *i = cloog_constraint_invalid(); - CloogMatrix *matrix = &constraints->M; - - /* If we are in the case of a loop running once, this means that the equality - * comes from an inequality. Here we find this inequality. - */ - if (!cloog_constraint_is_valid(line)) - { for (i = cloog_constraint_first(constraints); - cloog_constraint_is_valid(i); i = cloog_constraint_next(i)) - if ((!cloog_int_is_zero(i->line[0][0]))&& (!cloog_int_is_zero(i->line[0][level]))) - { line = i ; - - /* Since in once-time-loops, equalities derive from inequalities, we - * may have to offset the values. For instance if we have 2i>=3, the - * equality is in fact i=2. This may happen when the level coefficient is - * not 1 or -1 and the scalar value is not zero. In any other case (e.g., - * if the inequality is an expression including outer loop counters or - * parameters) the once time loop would not have been detected - * because of floord and ceild functions. - */ - if (cloog_int_ne_si(i->line[0][level],1) && - cloog_int_ne_si(i->line[0][level],-1) && - !cloog_int_is_zero(i->line[0][matrix->NbColumns-1])) { - cloog_int_t denominator; - - cloog_int_init(denominator); - cloog_int_abs(denominator, i->line[0][level]); - cloog_int_fdiv_q(i->line[0][matrix->NbColumns-1], - i->line[0][matrix->NbColumns-1], denominator); - cloog_int_set_si(i->line[0][level], cloog_int_sgn(i->line[0][level])); - cloog_int_clear(denominator); - } - - break ; - } - } - assert(cloog_constraint_is_valid(line)); - - /* We update the line of equal corresponding to level: - * - the first element gives the equality type, - */ - equal->types[level-1] = cloog_constraint_equal_type(line, level); - /* - the other elements corresponding to the equality itself - * (the iterators up to level, then the parameters and the scalar). - */ - for (j=1;j<=level;j++) - cloog_int_set(equal->constraints->M.p[level-1][j], line->line[0][j]); - for (j = 0; j < nb_par + 1; j++) - cloog_int_set(equal->constraints->M.p[level-1][equal->constraints->M.NbColumns-j-1], - line->line[0][line->set->M.NbColumns-j-1]); - - if (cloog_constraint_is_valid(i)) - cloog_constraint_release(line); - cloog_equal_update(equal, level, nb_par); -} - - -/** - * cloog_equal_del function : - * This function reset the equality corresponding to the iterator (level) - * in the equality matrix (equal). - * - July 2nd 2002: first version. - */ -void cloog_equal_del(CloogEqualities *equal, int level) -{ - equal->types[level-1] = EQTYPE_NONE; -} - - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - -/** - * Function cloog_constraint_set_normalize: - * This function will modify the constraint system in such a way that when - * there is an equality depending on the element at level 'level', there are - * no more (in)equalities depending on this element. For instance, try - * test/valilache.cloog with options -f 8 -l 9, with and without the call - * to this function. At a given moment, for the level L we will have - * 32*P=L && L>=1 (P is a lower level), this constraint system cannot be - * translated directly into a source code. Thus, we normalize the domain to - * remove L from the inequalities. In our example, this leads to - * 32*P=L && 32*P>=1, that can be transated to the code - * if (P>=1) { L=32*P ; ... }. This function solves the DaeGon Kim bug. - * WARNING: Remember that if there is another call to Polylib after a call to - * this function, we have to recall this function. - * -June 16th 2005: first version (adaptation from URGent June-7th-2005 by - * N. Vasilache). - * - June 21rd 2005: Adaptation for GMP. - * - November 4th 2005: Complete rewriting, simpler and faster. It is no more an - * adaptation from URGent. - */ -void cloog_constraint_set_normalize(CloogConstraintSet *constraints, int level) -{ int ref, i, j ; - cloog_int_t factor_i, factor_ref, temp_i, temp_ref, gcd; - CloogMatrix *matrix = &constraints->M; - - if (matrix == NULL) - return ; - - /* Don't "normalize" the constant term. */ - if (level == matrix->NbColumns-1) - return; - - /* Let us find an equality for the current level that can be propagated. */ - for (ref=0;refNbRows;ref++) - if (cloog_int_is_zero(matrix->p[ref][0]) && !cloog_int_is_zero(matrix->p[ref][level])) { - cloog_int_init(gcd); - cloog_int_init(temp_i); - cloog_int_init(temp_ref); - cloog_int_init(factor_i); - cloog_int_init(factor_ref); - - /* Row "ref" is the reference equality, now let us find a row to simplify.*/ - for (i=ref+1;iNbRows;i++) - if (!cloog_int_is_zero(matrix->p[i][level])) { - /* Now let us set to 0 the "level" coefficient of row "j" using "ref". - * First we compute the factors to apply to each row vector element. - */ - cloog_int_gcd(gcd, matrix->p[ref][level], matrix->p[i][level]); - cloog_int_divexact(factor_i, matrix->p[ref][level], gcd); - cloog_int_divexact(factor_ref, matrix->p[i][level], gcd); - - /* Maybe we are simplifying an inequality: factor_i must not be <0. */ - if (cloog_int_is_neg(factor_i)) { - cloog_int_abs(factor_i, factor_i); - cloog_int_neg(factor_ref, factor_ref); - } - - /* Now update the vector. */ - for (j=1;jNbColumns;j++) { - cloog_int_mul(temp_i, factor_i, matrix->p[i][j]); - cloog_int_mul(temp_ref, factor_ref, matrix->p[ref][j]); - cloog_int_sub(matrix->p[i][j], temp_i, temp_ref); - } - - /* Normalize (divide by GCD of all elements) the updated vector. */ - cloog_seq_normalize(&(matrix->p[i][1]), matrix->NbColumns-1); - } - - cloog_int_clear(gcd); - cloog_int_clear(temp_i); - cloog_int_clear(temp_ref); - cloog_int_clear(factor_i); - cloog_int_clear(factor_ref); - break ; - } -} - - - -/** - * cloog_constraint_set_copy function: - * this functions builds and returns a "hard copy" (not a pointer copy) of a - * CloogMatrix data structure. - * - October 26th 2005: first version. - */ -CloogConstraintSet *cloog_constraint_set_copy(CloogConstraintSet *constraints) -{ int i, j ; - CloogMatrix *copy; - CloogMatrix *matrix = &constraints->M; - - copy = cloog_matrix_alloc(matrix->NbRows, matrix->NbColumns); - - for (i=0;iNbRows;i++) - for (j=0;jNbColumns;j++) - cloog_int_set(copy->p[i][j], matrix->p[i][j]); - - return cloog_constraint_set_from_cloog_matrix(copy); -} - - -/** - * cloog_equal_vector_simplify function: - * this function simplify an affine expression with its coefficients in - * "vector" of length "length" thanks to an equality matrix "equal" that gives - * for some elements of the affine expression an equality with other elements, - * preferably constants. For instance, if the vector contains i+j+3 and the - * equality matrix gives i=n and j=2, the vector is simplified to n+3 and is - * returned in a new vector. - * - vector is the array of affine expression coefficients - * - equal is the matrix of equalities, - * - length is the vector length, - * - level is a level we don't want to simplify (-1 if none), - * - nb_par is the number of parameters of the program. - ** - * - September 20th 2005: first version. - * - November 2nd 2005: (debug) we are simplifying inequalities, thus we are - * not allowed to multiply the vector by a negative - * constant.Problem found after a report of Michael - * Classen. - */ -struct cloog_vec *cloog_equal_vector_simplify(CloogEqualities *equal, cloog_int_t *vector, - int length, int level, int nb_par) -{ int i, j ; - cloog_int_t gcd, factor_vector, factor_equal, temp_vector, temp_equal; - struct cloog_vec *simplified; - - simplified = cloog_vec_alloc(length); - cloog_seq_cpy(simplified->p, vector, length); - - cloog_int_init(gcd); - cloog_int_init(temp_vector); - cloog_int_init(temp_equal); - cloog_int_init(factor_vector); - cloog_int_init(factor_equal); - - /* For each non-null coefficient in the vector, */ - for (i=length-nb_par-2;i>0;i--) - if (i != level) - { /* if the coefficient in not null, and there exists a useful equality */ - if ((!cloog_int_is_zero(simplified->p[i])) && equal->types[i-1]) - { /* Compute the Greatest Common Divisor. */ - cloog_int_gcd(gcd, simplified->p[i], equal->constraints->M.p[i-1][i]); - - /* Compute the factors to apply to each row vector element. */ - cloog_int_divexact(factor_vector, equal->constraints->M.p[i-1][i], gcd); - cloog_int_divexact(factor_equal, simplified->p[i], gcd); - - /* We are simplifying an inequality: factor_vector must not be <0. */ - if (cloog_int_is_neg(factor_vector)) { - cloog_int_abs(factor_vector, factor_vector); - cloog_int_neg(factor_equal, factor_equal); - } - - /* Now update the vector. */ - /* - the iterators, up to the current level, */ - for (j=1;j<=length-nb_par-2;j++) { - cloog_int_mul(temp_vector, factor_vector, simplified->p[j]); - cloog_int_mul(temp_equal, factor_equal, equal->constraints->M.p[i-1][j]); - cloog_int_sub(simplified->p[j], temp_vector, temp_equal); - } - /* - between last useful iterator (i) and the first parameter, the equal - * matrix is sparse (full of zeroes), we just do nothing there. - * - the parameters and the scalar. - */ - for (j = 0; j < nb_par + 1; j++) { - cloog_int_mul(temp_vector, factor_vector, simplified->p[length-1-j]); - cloog_int_mul(temp_equal,factor_equal, - equal->constraints->M.p[i-1][equal->constraints->M.NbColumns-j-1]); - cloog_int_sub(simplified->p[length-1-j],temp_vector,temp_equal) ; - } - } - } - - /* Normalize (divide by GCD of all elements) the updated vector. */ - cloog_seq_normalize(&simplified->p[1], length - 1); - - cloog_int_clear(gcd); - cloog_int_clear(temp_vector); - cloog_int_clear(temp_equal); - cloog_int_clear(factor_vector); - cloog_int_clear(factor_equal); - - return simplified ; -} - - -/** - * cloog_constraint_set_simplify function: - * this function simplify all constraints inside the matrix "matrix" thanks to - * an equality matrix "equal" that gives for some elements of the affine - * constraint an equality with other elements, preferably constants. - * For instance, if a row of the matrix contains i+j+3>=0 and the equality - * matrix gives i=n and j=2, the constraint is simplified to n+3>=0. The - * simplified constraints are returned back inside a new simplified matrix. - * - matrix is the set of constraints to simplify, - * - equal is the matrix of equalities, - * - level is a level we don't want to simplify (-1 if none), - * - nb_par is the number of parameters of the program. - ** - * - November 4th 2005: first version. - */ -CloogConstraintSet *cloog_constraint_set_simplify(CloogConstraintSet *constraints, - CloogEqualities *equal, int level, int nb_par) -{ int i, j, k ; - struct cloog_vec *vector; - CloogMatrix *simplified; - CloogMatrix *matrix = &constraints->M; - - if (matrix == NULL) - return NULL ; - - /* The simplified matrix is such that each row has been simplified thanks - * tho the "equal" matrix. We allocate the memory for the simplified matrix, - * then for each row of the original matrix, we compute the simplified - * vector and we copy its content into the according simplified row. - */ - simplified = cloog_matrix_alloc(matrix->NbRows, matrix->NbColumns); - for (i=0;iNbRows;i++) - { vector = cloog_equal_vector_simplify(equal, matrix->p[i], - matrix->NbColumns, level, nb_par); - for (j=0;jNbColumns;j++) - cloog_int_set(simplified->p[i][j], vector->p[j]); - - cloog_vec_free(vector); - } - - /* After simplification, it may happen that few constraints are the same, - * we remove them here by replacing them with 0=0 constraints. - */ - for (i=0;iNbRows;i++) - for (j=i+1;jNbRows;j++) - { for (k=0;kNbColumns;k++) - if (cloog_int_ne(simplified->p[i][k],simplified->p[j][k])) - break ; - - if (k == matrix->NbColumns) - { for (k=0;kNbColumns;k++) - cloog_int_set_si(simplified->p[j][k],0); - } - } - - return cloog_constraint_set_from_cloog_matrix(simplified); -} - - -/** - * Return clast_expr corresponding to the variable "level" (1 based) in - * the given constraint. - */ -struct clast_expr *cloog_constraint_variable_expr(CloogConstraint *constraint, - int level, CloogNames *names) -{ - int total_dim, nb_iter; - const char *name; - - total_dim = cloog_constraint_total_dimension(constraint); - nb_iter = total_dim - names->nb_parameters; - - if (level <= nb_iter) - name = cloog_names_name_at_level(names, level); - else - name = names->parameters[level - (nb_iter+1)] ; - - return &new_clast_name(name)->expr; -} - - -/** - * Return true if constraint c involves variable v (zero-based). - */ -int cloog_constraint_involves(CloogConstraint *constraint, int v) -{ - return !cloog_int_is_zero(constraint->line[0][1+v]); -} - -int cloog_constraint_is_lower_bound(CloogConstraint *constraint, int v) -{ - return cloog_int_is_pos(constraint->line[0][1+v]); -} - -int cloog_constraint_is_upper_bound(CloogConstraint *constraint, int v) -{ - return cloog_int_is_neg(constraint->line[0][1+v]); -} - -int cloog_constraint_is_equality(CloogConstraint *constraint) -{ - return cloog_int_is_zero(constraint->line[0][0]); -} - -void cloog_constraint_clear(CloogConstraint *constraint) -{ - int k; - - for (k = 1; k <= constraint->set->M.NbColumns - 2; k++) - cloog_int_set_si(constraint->line[0][k], 0); -} - -CloogConstraintSet *cloog_constraint_set_drop_constraint( - CloogConstraintSet *constraints, CloogConstraint *constraint) -{ - cloog_constraint_clear(constraint); - return constraints; -} - -void cloog_constraint_coefficient_get(CloogConstraint *constraint, - int var, cloog_int_t *val) -{ - cloog_int_set(*val, constraint->line[0][1+var]); -} - -void cloog_constraint_coefficient_set(CloogConstraint *constraint, - int var, cloog_int_t val) -{ - cloog_int_set(constraint->line[0][1+var], val); -} - -void cloog_constraint_constant_get(CloogConstraint *constraint, cloog_int_t *val) -{ - cloog_int_set(*val, constraint->line[0][constraint->set->M.NbColumns-1]); -} - -/** - * Copy the coefficient of constraint c into dst in PolyLib order, - * i.e., first the coefficients of the variables, then the coefficients - * of the parameters and finally the constant. - */ -void cloog_constraint_copy_coefficients(CloogConstraint *constraint, - cloog_int_t *dst) -{ - cloog_seq_cpy(dst, constraint->line[0]+1, constraint->set->M.NbColumns-1); -} - -CloogConstraint *cloog_constraint_invalid(void) -{ - return NULL; -} - -int cloog_constraint_is_valid(CloogConstraint *constraint) -{ - return constraint != NULL; -} - - -/** - * Check whether there is any need for the constraint "upper" on - * "level" to get reduced. - * Yes. - */ -int cloog_constraint_needs_reduction(CloogConstraint *upper, int level) -{ - return 1; -} - - -/** - * Create a CloogConstraintSet containing enough information to perform - * a reduction on the upper equality (in this case lower is an invalid - * CloogConstraint) or the pair of inequalities upper and lower - * from within insert_modulo_guard. - * In the PolyLib backend, we return a CloogConstraintSet containting only - * the upper bound. The reduction will not change the stride so there - * will be no need to recompute the bound on the modulo expression. - */ -CloogConstraintSet *cloog_constraint_set_for_reduction(CloogConstraint *upper, - CloogConstraint *lower) -{ - CloogConstraintSet *set; - - set = cloog_constraint_set_from_cloog_matrix( - cloog_matrix_alloc(1, upper->set->M.NbColumns)); - cloog_seq_cpy(set->M.p[0], upper->line[0], set->M.NbColumns); - return set; -} - - -/* Computes x, y and g such that g = gcd(a,b) and a*x+b*y = g */ -static void Euclid(cloog_int_t a, cloog_int_t b, - cloog_int_t *x, cloog_int_t *y, cloog_int_t *g) -{ - cloog_int_t c, d, e, f, tmp; - - cloog_int_init(c); - cloog_int_init(d); - cloog_int_init(e); - cloog_int_init(f); - cloog_int_init(tmp); - cloog_int_abs(c, a); - cloog_int_abs(d, b); - cloog_int_set_si(e, 1); - cloog_int_set_si(f, 0); - while (cloog_int_is_pos(d)) { - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, f); - cloog_int_sub(e, e, tmp); - cloog_int_tdiv_q(tmp, c, d); - cloog_int_mul(tmp, tmp, d); - cloog_int_sub(c, c, tmp); - cloog_int_swap(c, d); - cloog_int_swap(e, f); - } - cloog_int_set(*g, c); - if (cloog_int_is_zero(a)) - cloog_int_set_si(*x, 0); - else if (cloog_int_is_pos(a)) - cloog_int_set(*x, e); - else cloog_int_neg(*x, e); - if (cloog_int_is_zero(b)) - cloog_int_set_si(*y, 0); - else { - cloog_int_mul(tmp, a, *x); - cloog_int_sub(tmp, c, tmp); - cloog_int_divexact(*y, tmp, b); - } - cloog_int_clear(c); - cloog_int_clear(d); - cloog_int_clear(e); - cloog_int_clear(f); - cloog_int_clear(tmp); -} - -/** - * Reduce the modulo guard expressed by "contraints" using equalities - * found in outer nesting levels (stored in "equal"). - * The modulo guard may be an equality or a pair of inequalities. - * In case of a pair of inequalities, "constraints" only contains the - * upper bound and *bound contains the bound on the - * corresponding modulo expression. The bound is left untouched by - * this function. - */ -CloogConstraintSet *cloog_constraint_set_reduce(CloogConstraintSet *constraints, - int level, CloogEqualities *equal, int nb_par, cloog_int_t *bound) -{ - int i, j, k, len, len2, nb_iter; - struct cloog_vec *line_vector2; - cloog_int_t *line, *line2, val, x, y, g; - - len = constraints->M.NbColumns; - len2 = cloog_equal_total_dimension(equal) + 2; - nb_iter = len - 2 - nb_par; - - cloog_int_init(val); - cloog_int_init(x); - cloog_int_init(y); - cloog_int_init(g); - - line_vector2 = cloog_vec_alloc(len2); - line2 = line_vector2->p; - - line = constraints->M.p[0]; - if (cloog_int_is_pos(line[level])) - cloog_seq_neg(line+1, line+1, len-1); - cloog_int_neg(line[level], line[level]); - assert(cloog_int_is_pos(line[level])); - - for (i = nb_iter; i >= 1; --i) { - if (i == level) - continue; - cloog_int_fdiv_r(line[i], line[i], line[level]); - if (cloog_int_is_zero(line[i])) - continue; - - /* Look for an earlier variable that is also a multiple of line[level] - * and check whether we can use the corresponding affine expression - * to "reduce" the modulo guard, where reduction means that we eliminate - * a variable, possibly at the expense of introducing other variables - * with smaller index. - */ - for (j = level-1; j >= 0; --j) { - CloogConstraint *equal_constraint; - if (cloog_equal_type(equal, j+1) != EQTYPE_EXAFFINE) - continue; - equal_constraint = cloog_equal_constraint(equal, j); - cloog_constraint_coefficient_get(equal_constraint, j, &val); - if (!cloog_int_is_divisible_by(val, line[level])) { - cloog_constraint_release(equal_constraint); - continue; - } - cloog_constraint_coefficient_get(equal_constraint, i-1, &val); - if (cloog_int_is_divisible_by(val, line[level])) { - cloog_constraint_release(equal_constraint); - continue; - } - for (k = j; k > i; --k) { - cloog_constraint_coefficient_get(equal_constraint, k-1, &val); - if (cloog_int_is_zero(val)) - continue; - if (!cloog_int_is_divisible_by(val, line[level])) - break; - } - if (k > i) { - cloog_constraint_release(equal_constraint); - continue; - } - cloog_constraint_coefficient_get(equal_constraint, i-1, &val); - Euclid(val, line[level], &x, &y, &g); - if (!cloog_int_is_divisible_by(val, line[i])) { - cloog_constraint_release(equal_constraint); - continue; - } - cloog_int_divexact(val, line[i], g); - cloog_int_neg(val, val); - cloog_int_mul(val, val, x); - cloog_int_set_si(y, 1); - /* Add (equal->p[j][i])^{-1} * line[i] times the equality */ - cloog_constraint_copy_coefficients(equal_constraint, line2+1); - cloog_seq_combine(line+1, y, line+1, val, line2+1, i); - cloog_seq_combine(line+len-nb_par-1, y, line+len-nb_par-1, - val, line2+len2-nb_par-1, nb_par+1); - cloog_constraint_release(equal_constraint); - break; - } - } - - cloog_vec_free(line_vector2); - - cloog_int_clear(val); - cloog_int_clear(x); - cloog_int_clear(y); - cloog_int_clear(g); - - /* Make sure the line is not inverted again in the calling function. */ - cloog_int_neg(line[level], line[level]); - - return constraints; -} - -CloogConstraint *cloog_constraint_first(CloogConstraintSet *constraints) -{ - CloogConstraint *c; - if (constraints->M.NbRows == 0) - return cloog_constraint_invalid(); - c = ALLOC(CloogConstraint); - c->set = constraints; - c->line = &constraints->M.p[0]; - return c; -} - -CloogConstraint *cloog_constraint_next(CloogConstraint *constraint) -{ - constraint->line++; - if (constraint->line == constraint->set->M.p + constraint->set->M.NbRows) { - cloog_constraint_release(constraint); - return NULL; - } - return constraint; -} - -CloogConstraint *cloog_constraint_copy(CloogConstraint *constraint) -{ - CloogConstraint *c = ALLOC(CloogConstraint); - c->set = constraint->set; - c->line = constraint->line; - return c; -} - -void cloog_constraint_release(CloogConstraint *constraint) -{ - free(constraint); -} - -int cloog_constraint_set_foreach_constraint(CloogConstraintSet *constraints, - int (*fn)(CloogConstraint *constraint, void *user), void *user) -{ - CloogConstraint *c; - - for (c = cloog_constraint_first(constraints); - cloog_constraint_is_valid(c); c = cloog_constraint_next(c)) - if (fn(c, user) < 0) { - cloog_constraint_release(c); - return -1; - } - - return 0; -} - -CloogConstraint *cloog_equal_constraint(CloogEqualities *equal, int j) -{ - CloogConstraint *c = ALLOC(CloogConstraint); - c->set = equal->constraints; - c->line = &equal->constraints->M.p[j]; - return c; -} diff --git a/cloog-0.17.0/source/mp_get_memory_functions.c b/cloog-0.17.0/source/mp_get_memory_functions.c deleted file mode 100644 index e14e336ceb681ff5518a5ed6806d588109b7a46e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/mp_get_memory_functions.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -void mp_get_memory_functions( - void *(**alloc_func_ptr) (size_t), - void *(**realloc_func_ptr) (void *, size_t, size_t), - void (**free_func_ptr) (void *, size_t)) -{ - if (alloc_func_ptr) - *alloc_func_ptr = __gmp_allocate_func; - if (realloc_func_ptr) - *realloc_func_ptr = __gmp_reallocate_func; - if (free_func_ptr) - *free_func_ptr = __gmp_free_func; -} diff --git a/cloog-0.17.0/source/names.c b/cloog-0.17.0/source/names.c deleted file mode 100644 index 20cadcc7cb1113ed4e4320f7516c207a55927088..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/names.c +++ /dev/null @@ -1,526 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** names.c ** - **-------------------------------------------------------------------** - ** First version: august 1st 2002 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2002-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - - -# include -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_names_print function: - * this function is a human-friendly way to display the CloogNames data - * structure, it shows all the different fields and includes an indentation - * level (level) in order to work with others print_structure functions. - * - July 1st 2005: first version based on the old cloog_names_print function, - * it was the first modification in this file since two years ! - */ -void cloog_names_print_structure(FILE * file, CloogNames * names, int level) -{ int i ; - - /* Go to the right level. */ - for (i=0; inb_scalars) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scalar iterators. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_scalars > 0) - { fprintf(file,"+-- Scalar iterator strings:") ; - for (i=0;inb_scalars;i++) - fprintf(file," %s",names->scalars[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"+-- No scalar string\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scattering dimension number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Scattering dimension number: %d\n",names->nb_scattering) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scattering iterators. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_scattering > 0) - { fprintf(file,"+-- Scattering strings ----:") ; - for (i=0;inb_scattering;i++) - fprintf(file," %s",names->scattering[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"+-- No scattering string\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the iterator number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Iterator number -----------: %d\n",names->nb_iterators) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the iterators. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_iterators > 0) - { fprintf(file,"+-- Iterator strings ------:") ; - for (i=0;inb_iterators;i++) - fprintf(file," %s",names->iterators[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"+-- No iterators\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the parameter number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Parameter number ----------: %d\n",names->nb_parameters) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the parameters. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (names->nb_parameters > 0) - { fprintf(file,"+-- Parameter strings -----:") ; - for (i=0;inb_parameters;i++) - fprintf(file," %s",names->parameters[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"No parameters\n") ; - - } - else - fprintf(file,"+-- No CloogNames\n") ; - fprintf(file, "Number of active references: %d\n", names->references); -} - - -/** - * cloog_names_print function: - * This function prints the content of a CloogNames structure (names) into a - * file (file, possibly stdout). - * - July 1st 2005: Now this function is only a frontend to - * cloog_program_print_structure, with a quite better - * human-readable representation. - */ -void cloog_names_print(FILE * file, CloogNames * names) -{ cloog_names_print_structure(file,names,0) ; -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_names_free function: - * This function decrements the number of active references to - * a CloogNames structure and frees the allocated memory for this structure - * if the count drops to zero. - */ -void cloog_names_free(CloogNames * names) -{ int i ; - - if (--names->references) - return; - - if (names->scalars != NULL) - { for (i=0;inb_scalars;i++) - free(names->scalars[i]) ; - free(names->scalars) ; - } - - if (names->scattering != NULL) - { for (i=0;inb_scattering;i++) - free(names->scattering[i]) ; - free(names->scattering) ; - } - - if (names->iterators != NULL) - { for (i=0;inb_iterators;i++) - free(names->iterators[i]) ; - free(names->iterators) ; - } - - if (names->parameters != NULL) - { for (i=0;inb_parameters;i++) - free(names->parameters[i]) ; - free(names->parameters) ; - } - free(names) ; -} - - -/** - * cloog_names_copy function: - * As usual in CLooG, "copy" means incrementing the reference count. - */ -CloogNames *cloog_names_copy(CloogNames *names) -{ - names->references++; - return names; -} - - -/****************************************************************************** - * Reading functions * - ******************************************************************************/ - - -/** - * cloog_names_read_strings function: - * This function reads names data from a file (file, possibly stdin). It first - * reads the naming option to know if whether it can read the names from the - * file. If not, NULL is returned. Otherwise, the names are stored - * into an array of strings, and a pointer to this array is returned. - * - nb_items is the number of names the function will have to read if the - * naming option is set to read. - */ -char ** cloog_names_read_strings(FILE *file, int nb_items) -{ int i, option, n ; - char s[MAX_STRING], str[MAX_STRING], * c, **names = NULL; - - /* We first read name option. */ - while (fgets(s,MAX_STRING,file) == 0) ; - while ((*s=='#' || *s=='\n') || (sscanf(s," %d",&option)<1)) - fgets(s,MAX_STRING,file) ; - - /* If there is no item to read, then return NULL. */ - if (nb_items == 0) - return NULL ; - - /* If option is to read them in the file, then we do it and put them into - * the array. - */ - if (option) - { /* Memory allocation. */ - names = (char **)malloc(nb_items*sizeof(char *)) ; - if (names == NULL) - cloog_die("memory overflow.\n"); - for (i=0;inb_scalars = 0 ; - names->nb_scattering = 0 ; - names->nb_iterators = 0 ; - names->nb_parameters = 0 ; - names->scalars = NULL ; - names->scattering = NULL ; - names->iterators = NULL ; - names->parameters = NULL ; - names->references = 1; - - return names ; -} - - -/** - * cloog_names_alloc function: - * This function allocates the memory space for a CloogNames structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - July 7th 2005: first version. - * - September 11th 2005: addition of both scalar and scattering informations. - * - November 21th 2005: use of cloog_names_malloc. - */ -CloogNames * cloog_names_alloc() -{ CloogNames * names ; - - /* Memory allocation for the CloogNames structure. */ - names = cloog_names_malloc() ; - - names->nb_scalars = 0; - names->nb_scattering = 0; - names->nb_iterators = 0; - names->nb_parameters = 0; - names->scalars = NULL; - names->scattering = NULL; - names->iterators = NULL; - names->parameters = NULL; - - return names ; -} - - -/** - * cloog_names_generate_items function: - * This function returns a pointer to an array of strings with entries set - * based on the function's parameters. - * - nb_items will be the number of entries in the string array. - * - prefix is the name prefix of each item or NULL. - * If not NULL, then the remainder of the name will be an integer - * in the range [0, nb_items-1]. - * - first_item is the name of the first item (if prefix == NULL), - * the nb_items-1 following items will be the nb_items-1 - * following letters in ASCII code. - ** - * - September 9th 2002 : first version, extracted from cloog_names_generate. - */ -char ** cloog_names_generate_items(int nb_items, char * prefix, char first_item) -{ int i ; - char ** names ; - - if (nb_items == 0) - return NULL ; - - names = (char **)malloc(nb_items*sizeof(char *)) ; - if (names == NULL) - cloog_die("memory overflow.\n"); - for (i=0;inb_scalars = nb_scalars ; - names->nb_scattering = nb_scattering ; - names->nb_parameters = nb_parameters ; - names->nb_iterators = nb_iterators ; - names->scalars = cloog_names_generate_items(nb_scalars, NULL,first_s); - names->scattering = cloog_names_generate_items(nb_scattering,NULL,first_t); - names->parameters = cloog_names_generate_items(nb_parameters,NULL,first_p); - names->iterators = cloog_names_generate_items(nb_iterators, NULL,first_i); - - return names ; -} - - -/* Lastly we update the CLoogNames structure: the iterators corresponding to - * scalar dimensions have to be removed since these dimensions have been - * erased and do not need to be print. We copy all the iterator names except - * the scalar ones in a new string array. - * - September 12th 2005: first version. - */ -void cloog_names_scalarize(CloogNames * names, int nb_scattdims, int * scaldims) -{ int nb_scalars, nb_scattering, i, current_scalar, current_scattering ; - char ** scalars, ** scattering ; - - if (!nb_scattdims || (scaldims == NULL)) - return ; - - nb_scalars = 0 ; - for (i=0;inb_scattering - nb_scalars ; - scattering = (char **)malloc(nb_scattering * sizeof(char *)) ; - if (scattering == NULL) - cloog_die("memory overflow.\n"); - scalars = (char **)malloc(nb_scalars * sizeof(char *)) ; - if (scalars == NULL) - cloog_die("memory overflow.\n"); - - current_scalar = 0 ; - current_scattering = 0 ; - for (i=0;iscattering[i] ; - current_scattering ++ ; - } - else - { scalars[current_scalar] = names->scattering[i] ; - current_scalar ++ ; - } - } - - free(names->scattering) ; - names->scattering = scattering ; - names->scalars = scalars ; - names->nb_scattering = nb_scattering ; - names->nb_scalars = nb_scalars ; -} - -/** - * Return the name at a given level (starting at one). - * May be a scattering dimension or an iterator of the original domain. - */ -const char *cloog_names_name_at_level(CloogNames *names, int level) -{ - if (level <= names->nb_scattering) - return names->scattering[level - 1]; - else - return names->iterators[level - names->nb_scattering - 1]; -} diff --git a/cloog-0.17.0/source/options.c b/cloog-0.17.0/source/options.c deleted file mode 100644 index ca7f2fa447ffcc1751d67f5647b147ec94b5a645..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/options.c +++ /dev/null @@ -1,521 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** options.c ** - **-------------------------------------------------------------------** - ** First version: april 19th 2003 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ - - -#include -# include -# include -# include -# include "../include/cloog/cloog.h" - -#ifdef OSL_SUPPORT -#include -#endif - - -/****************************************************************************** - * Error reporting functions * - ******************************************************************************/ - -void cloog_vmsg(CloogOptions *options, enum cloog_msg_type type, - const char *msg, va_list ap) -{ - const char *type_msg; - - if (options && options->quiet && - (type == CLOOG_WARNING || type == CLOOG_INFO)) - return; - - switch(type) { - case CLOOG_WARNING: - type_msg = "WARNING"; - break; - case CLOOG_INFO: - type_msg = "INFO"; - break; - case CLOOG_ERROR: - default: - type_msg = "ERROR"; - break; - } - fprintf(stderr, "[CLooG] %s: ", type_msg); - vfprintf(stderr, msg, ap); -} - -/** - * Print message to stderr. - * @param msg printf format string - */ -void cloog_msg(CloogOptions *options, enum cloog_msg_type type, - const char *msg, ...) -{ - va_list args; - - va_start(args, msg); - cloog_vmsg(options, type, msg, args); - va_end(args); -} - -/** - * Print error message to stderr and exit. - * @param msg printf format string - */ -void cloog_die(const char *msg, ...) -{ - va_list args; - - va_start(args, msg); - cloog_vmsg(NULL, CLOOG_ERROR, msg, args); - va_end(args); - exit(1); -} - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_option_print function: - * This function prints the content of a CloogOptions structure (program) into - * a file (foo, possibly stdout). - * - April 19th 2003: first version. - */ -void cloog_options_print(FILE * foo, CloogOptions * options) -{ fprintf(foo,"Options:\n") ; - fprintf(foo,"OPTIONS FOR LOOP GENERATION\n") ; - fprintf(foo,"l = %3d,\n",options->l) ; - fprintf(foo,"f = %3d,\n",options->f) ; - fprintf(foo,"stop = %3d,\n",options->stop) ; - fprintf(foo,"strides = %3d,\n",options->strides) ; - fprintf(foo,"sh = %3d,\n",options->sh); - fprintf(foo,"OPTIONS FOR PRETTY PRINTING\n") ; - fprintf(foo,"esp = %3d,\n",options->esp) ; - fprintf(foo,"fsp = %3d,\n",options->fsp) ; - fprintf(foo,"otl = %3d.\n",options->otl) ; - fprintf(foo,"block = %3d.\n",options->block) ; - fprintf(foo,"compilable = %3d.\n",options->compilable) ; - fprintf(foo,"callable = %3d.\n",options->callable) ; - fprintf(foo,"MISC OPTIONS\n") ; - fprintf(foo,"name = %3s.\n", options->name); - fprintf(foo,"openscop = %3d.\n", options->openscop); - if (options->scop != NULL) - fprintf(foo,"scop = (present but not printed).\n"); - else - fprintf(foo,"scop = NULL.\n"); - fprintf(foo,"UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY\n") ; - fprintf(foo,"leaks = %3d.\n",options->leaks) ; - fprintf(foo,"backtrack = %3d.\n",options->backtrack); - fprintf(foo,"override = %3d.\n",options->override) ; - fprintf(foo,"structure = %3d.\n",options->structure) ; - fprintf(foo,"noscalars = %3d.\n",options->noscalars) ; - fprintf(foo,"noblocks = %3d.\n",options->noblocks) ; - fprintf(foo,"nosimplify = %3d.\n",options->nosimplify) ; -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_options_free function: - * This function frees the allocated memory for a CloogOptions structure. - * - April 19th 2003: first version. - */ -void cloog_options_free(CloogOptions *options) -{ -#ifdef OSL_SUPPORT - if (options->scop != NULL) { - osl_scop_free(options->scop); - } -#endif - free(options); -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_options_help function: - * This function displays the quick help when the user set the option -help - * while calling cloog. Prints are cutted to respect the 509 characters - * limitation of the ISO C 89 compilers. - * - August 5th 2002: first version. - */ -void cloog_options_help() -{ printf( - "Usage: cloog [ options | file ] ...\n" - "Options for code generation:\n" - " -l Last loop depth to optimize (-1: infinity)\n" - " (default setting: -1).\n" - " -f First loop depth to start loop separation (-1: " - "infinity)\n (default setting: 1).\n") ; - printf( - " -stop Loop depth to stop code generation (-1: infinity)" - "\n (default setting: -1).\n" - " -strides Handle non-unit strides (1) or not (0)\n" - " (default setting: 0).\n" - " -first-unroll First loop dimension to unroll (-1: no unrolling)\n"); - printf( - "\nOptions for pretty printing:\n" - " -otl Simplify loops running one time (1) or not (0)\n" - " (default setting: 1).\n") ; - printf( - " -esp Allow complex equalities spreading (1) or not (0)\n" - " (default setting: 0).\n"); - printf( - " -fsp First level to begin the spreading\n" - " (default setting: 1).\n" - " -block Make a new statement block per iterator in C\n" - " programs (1) or not (0) (default setting: 0).\n") ; - printf( - " -compilable Compilable code by using preprocessor (not 0) or" - "\n not (0), number being the value of the parameters" - "\n (default setting: 0).\n" - " -callable Testable code by using preprocessor (not 0) or" - "\n not (0) (default setting: 0).\n"); - printf( - "\nGeneral options:\n" - " -o Name of the output file; 'stdout' is a special\n" - " value: when used, output is standard output\n" - " (default setting: stdout).\n" -#ifdef OSL_SUPPORT - " -openscop Input file has OpenScop format.\n" -#endif - " -v, --version Display the version information (and more).\n" - " -q, --quiet Don't print any informational messages.\n" - " -h, --help Display this information.\n\n") ; - printf( - "The special value 'stdin' for 'file' makes CLooG to read data on\n" - "standard input.\n\n" - "For bug reporting or any suggestions, please send an email to the author\n" - ".\n") ; -} - - -/** - * cloog_options_version function: - * This function displays some version informations when the user set the - * option -version while calling cloog. Prints are cutted to respect the 509 - * characters limitation of the ISO C 89 compilers. - * - August 5th 2002: first version. - */ -void cloog_options_version() -{ printf("%s The Chunky Loop Generator\n", cloog_version()); - printf( - "-----\n" - "This is a loop generator for scanning Z-polyhedra. It is based on the " - "work of\nF. Quillere and C. Bastoul on high level code generation and of " - "the PolyLib Team\non polyhedral computation. This program is distributed " - "under the terms of the\nGNU Lesser General Public License " - "(details at http://www.gnu.org/licenses/lgpl-2.1.html).\n" - "-----\n") ; - printf( - "It would be fair to refer the following paper in any publication " - "resulting from\nthe use of this software or its library:\n" - "@InProceedings{Bas04,\n" - "author = {Cedric Bastoul},\n" - "title = {Code Generation in the Polyhedral Model Is Easier Than You " - "Think},\n" - "booktitle = {PACT'13 IEEE International Conference on Parallel " - "Architecture\n and Compilation Techniques},\n" - "pages = {7--16},\n" - "month = {september},\n" - "year = 2004,\n" - "address = {Juan-les-Pins}\n" - "}\n" - "-----\n" - "For any information, please ask the author at " - ".\n") ; -} - - -/** - * cloog_options_set function: - * This function sets the value of an option thanks to the user's calling line. - * - option is the value to set, - * - argc are the elements of the user's calling line, - * - number is the number of the element corresponding to the considered option, - * this function adds 1 to number to pass away the option value. - ** - * - August 5th 2002: first version. - * - June 29th 2003: (debug) lack of argument now detected. - */ -void cloog_options_set(int * option, int argv, char ** argc, int * number) -{ char ** endptr ; - - if (*number+1 >= argv) - cloog_die("an option lacks of argument.\n"); - - endptr = NULL ; - *option = strtol(argc[*number+1],endptr,10) ; - if (endptr != NULL) - cloog_die("value '%s' for option '%s' is not valid.\n", - argc[*number+1], argc[*number]); - *number = *number + 1 ; -} - - -/** - * cloog_options_malloc function: - * This functions allocate the memory space for a CLoogOptions structure and - * fill its fields with the defaults values. It returns a pointer to the - * allocated CloogOptions structure. - * - April 19th 2003: first version. - * - November 21th 2005: name changed (before it was cloog_options_init). - */ -CloogOptions *cloog_options_malloc(CloogState *state) -{ CloogOptions * options ; - - /* Memory allocation for the CloogOptions structure. */ - options = (CloogOptions *)malloc(sizeof(CloogOptions)) ; - if (options == NULL) - cloog_die("memory overflow.\n"); - - options->state = state; - - /* We set the various fields with default values. */ - /* OPTIONS FOR LOOP GENERATION */ - options->l = -1 ; /* Last level to optimize: infinity. */ - options->f = 1 ; /* First level to optimize: the first. */ - options->stop = -1 ; /* Generate all the code. */ - options->strides = 0 ; /* Generate a code with unit strides. */ - options->sh = 0; /* Compute actual convex hull. */ - options->first_unroll = -1; /* First level to unroll: none. */ - options->name = ""; - /* OPTIONS FOR PRETTY PRINTING */ - options->esp = 1 ; /* We want Equality SPreading.*/ - options->fsp = 1 ; /* The First level to SPread is the first. */ - options->otl = 1 ; /* We want to fire One Time Loops. */ - options->block = 0 ; /* We don't want to force statement blocks. */ - options->compilable = 0 ; /* No compilable code. */ - options->callable = 0 ; /* No callable code. */ - options->quiet = 0; /* Do print informational messages. */ - options->save_domains = 0; /* Don't save domains. */ - /* MISC OPTIONS */ - options->language = CLOOG_LANGUAGE_C; /* The default output language is C. */ - options->openscop = 0 ; /* The input file has not the OpenScop format.*/ - options->scop = NULL;/* No default SCoP.*/ - /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */ - options->leaks = 0 ; /* I don't want to print allocation statistics.*/ - options->backtrack = 0; /* Perform backtrack in Quillere's algorithm.*/ - options->override = 0 ; /* I don't want to override CLooG decisions.*/ - options->structure = 0 ; /* I don't want to print internal structure.*/ - options->noblocks = 0 ; /* I do want to make statement blocks.*/ - options->noscalars = 0 ; /* I do want to use scalar dimensions.*/ - options->nosimplify = 0 ; /* I do want to simplify polyhedra.*/ - - return options ; -} - - - -/** - * cloog_options_read function: - * This functions reads all the options and the input/output files thanks - * the the user's calling line elements (in argc). It fills a CloogOptions - * structure and the FILE structure corresponding to input and output files. - * - August 5th 2002: first version. - * - April 19th 2003: now in options.c and support of the CloogOptions structure. - */ -void cloog_options_read(CloogState *state, int argc, char **argv, - FILE **input, FILE **output, CloogOptions **options) -{ int i, infos=0, input_is_set=0 ; - - /* CloogOptions structure allocation and initialization. */ - *options = cloog_options_malloc(state); - - /* The default output is the standard output. */ - *output = stdout ; - - for (i=1;il,argc,argv,&i) ; - else - if (strcmp(argv[i],"-f") == 0) - cloog_options_set(&(*options)->f,argc,argv,&i) ; - else - if (strcmp(argv[i],"-stop") == 0) - cloog_options_set(&(*options)->stop,argc,argv,&i) ; - else - if (strcmp(argv[i],"-strides") == 0) - cloog_options_set(&(*options)->strides,argc,argv,&i) ; - else if (strcmp(argv[i],"-sh") == 0) - cloog_options_set(&(*options)->sh,argc,argv,&i) ; - else if (!strcmp(argv[i], "-first-unroll")) - cloog_options_set(&(*options)->first_unroll, argc, argv, &i); - else - if (strcmp(argv[i],"-otl") == 0) - cloog_options_set(&(*options)->otl,argc,argv,&i) ; - else - if (strcmp(argv[i],"-openscop") == 0) { -#ifdef OSL_SUPPORT - (*options)->openscop = 1 ; -#else - cloog_die("CLooG has not been compiled with OpenScop support.\n"); -#endif - } - else - if (strcmp(argv[i],"-esp") == 0) - cloog_options_set(&(*options)->esp,argc,argv,&i) ; - else - if (strcmp(argv[i],"-fsp") == 0) - cloog_options_set(&(*options)->fsp,argc,argv,&i) ; - else - if (strcmp(argv[i],"-block") == 0) - cloog_options_set(&(*options)->block,argc,argv,&i) ; - else - if (strcmp(argv[i],"-compilable") == 0) - cloog_options_set(&(*options)->compilable, argc, argv, &i); - else if (strcmp(argv[i], "-callable") == 0) - cloog_options_set(&(*options)->callable, argc, argv, &i); - else - if (strcmp(argv[i],"-loopo") == 0) /* Special option for the LooPo team ! */ - { (*options)->esp = 0 ; - (*options)->block = 1 ; - } - else - if (strcmp(argv[i],"-bipbip") == 0)/* Special option for the author only !*/ - (*options)->backtrack = 0; - else - if (strcmp(argv[i],"-leaks") == 0) - (*options)->leaks = 1 ; - else - if (strcmp(argv[i],"-nobacktrack") == 0) - (*options)->backtrack = 0; - else if (strcmp(argv[i], "-backtrack") == 0) - (*options)->backtrack = 1; - else - if (strcmp(argv[i],"-override") == 0) - (*options)->override = 1 ; - else - if (strcmp(argv[i],"-noblocks") == 0) - (*options)->noblocks = 1 ; - else - if (strcmp(argv[i],"-noscalars") == 0) - (*options)->noscalars = 1 ; - else - if (strcmp(argv[i],"-nosimplify") == 0) - (*options)->nosimplify = 1 ; - else - if ((strcmp(argv[i],"-struct") == 0) || (strcmp(argv[i],"-structure") == 0)) - (*options)->structure = 1 ; - else - if ((strcmp(argv[i],"--help") == 0) || (strcmp(argv[i],"-h") == 0)) - { cloog_options_help() ; - infos = 1 ; - } - else - if ((strcmp(argv[i],"--version") == 0) || (strcmp(argv[i],"-v") == 0)) - { cloog_options_version() ; - infos = 1 ; - } else if ((strcmp(argv[i],"--quiet") == 0) || (strcmp(argv[i],"-q") == 0)) - (*options)->quiet = 1; - else - if (strcmp(argv[i],"-o") == 0) - { if (i+1 >= argc) - cloog_die("no output name for -o option.\n"); - - /* stdout is a special value, when used, we set output to standard - * output. - */ - if (strcmp(argv[i+1],"stdout") == 0) - *output = stdout ; - else - { *output = fopen(argv[i+1],"w") ; - if (*output == NULL) - cloog_die("can't create output file %s.\n", argv[i+1]); - } - i ++ ; - } - else - cloog_msg(*options, CLOOG_WARNING, "unknown %s option.\n", argv[i]); - } - else - { if (!input_is_set) - { input_is_set = 1 ; - (*options)->name = argv[i] ; - /* stdin is a special value, when used, we set input to standard input. */ - if (strcmp(argv[i],"stdin") == 0) - *input = stdin ; - else - { *input = fopen(argv[i],"r") ; - if (*input == NULL) - cloog_die("%s file does not exist.\n", argv[i]); - } - } - else - cloog_die("multiple input files.\n"); - } - if (!input_is_set) - { if (!infos) - cloog_die("no input file (-h for help).\n"); - exit(1) ; - } -} - -#ifdef OSL_SUPPORT -/** - * This function extracts CLooG option values from an OpenScop scop and - * updates an existing CloogOption structure with those values. If the - * options were already set, they are updated without warning. - * \param[in] scop Input Scop. - * \param[in,out] options CLooG options to be updated. - */ -void cloog_options_copy_from_osl_scop(osl_scop_p scop, - CloogOptions *options) { - if (!options) - cloog_die("Options must be provided.\n"); - - if (scop) { - /* Extract the language. */ - if (!strcmp(scop->language, "FORTRAN")) - options->language = CLOOG_LANGUAGE_FORTRAN; - else - options->language = CLOOG_LANGUAGE_C; - - /* Store the input SCoP in the option structure. */ - options->scop = scop; - } -} -#endif - diff --git a/cloog-0.17.0/source/pprint.c b/cloog-0.17.0/source/pprint.c deleted file mode 100644 index 9c7f1d466e283ca19563bf9805916270575f7f55..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/pprint.c +++ /dev/null @@ -1,493 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** pprint.c ** - **-------------------------------------------------------------------** - ** First version: october 26th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -/* June 22nd 2005: General adaptation for GMP. - * October 26th 2005: General adaptation from CloogDomain to Matrix data - * structure for all constraint systems. - * October 27th 2005: General adaptation from CloogEqual to Matrix data - * structure for equality spreading. - */ - -# include -# include -# include -#include -# include "../include/cloog/cloog.h" - -#ifdef OSL_SUPPORT -#include -#include -#include -#include -#endif - - -static void pprint_name(FILE *dst, struct clast_name *n); -static void pprint_term(struct cloogoptions *i, FILE *dst, struct clast_term *t); -static void pprint_sum(struct cloogoptions *opt, - FILE *dst, struct clast_reduction *r); -static void pprint_binary(struct cloogoptions *i, - FILE *dst, struct clast_binary *b); -static void pprint_minmax_f(struct cloogoptions *info, - FILE *dst, struct clast_reduction *r); -static void pprint_minmax_c(struct cloogoptions *info, - FILE *dst, struct clast_reduction *r); -static void pprint_reduction(struct cloogoptions *i, - FILE *dst, struct clast_reduction *r); -static void pprint_expr(struct cloogoptions *i, FILE *dst, struct clast_expr *e); -static void pprint_equation(struct cloogoptions *i, - FILE *dst, struct clast_equation *eq); -static void pprint_assignment(struct cloogoptions *i, FILE *dst, - struct clast_assignment *a); -static void pprint_user_stmt(struct cloogoptions *options, FILE *dst, - struct clast_user_stmt *u); -static void pprint_guard(struct cloogoptions *options, FILE *dst, int indent, - struct clast_guard *g); -static void pprint_for(struct cloogoptions *options, FILE *dst, int indent, - struct clast_for *f); -static void pprint_stmt_list(struct cloogoptions *options, FILE *dst, int indent, - struct clast_stmt *s); - - -void pprint_name(FILE *dst, struct clast_name *n) -{ - fprintf(dst, "%s", n->name); -} - -/** - * This function returns a string containing the printing of a value (possibly - * an iterator or a parameter with its coefficient or a constant). - * - val is the coefficient or constant value, - * - name is a string containing the name of the iterator or of the parameter, - */ -void pprint_term(struct cloogoptions *i, FILE *dst, struct clast_term *t) -{ - if (t->var) { - int group = t->var->type == clast_expr_red && - ((struct clast_reduction*) t->var)->n > 1; - if (cloog_int_is_one(t->val)) - ; - else if (cloog_int_is_neg_one(t->val)) - fprintf(dst, "-"); - else { - cloog_int_print(dst, t->val); - fprintf(dst, "*"); - } - if (group) - fprintf(dst, "("); - pprint_expr(i, dst, t->var); - if (group) - fprintf(dst, ")"); - } else - cloog_int_print(dst, t->val); -} - -void pprint_sum(struct cloogoptions *opt, FILE *dst, struct clast_reduction *r) -{ - int i; - struct clast_term *t; - - assert(r->n >= 1); - assert(r->elts[0]->type == clast_expr_term); - t = (struct clast_term *) r->elts[0]; - pprint_term(opt, dst, t); - - for (i = 1; i < r->n; ++i) { - assert(r->elts[i]->type == clast_expr_term); - t = (struct clast_term *) r->elts[i]; - if (cloog_int_is_pos(t->val)) - fprintf(dst, "+"); - pprint_term(opt, dst, t); - } -} - -void pprint_binary(struct cloogoptions *i, FILE *dst, struct clast_binary *b) -{ - const char *s1 = NULL, *s2 = NULL, *s3 = NULL; - int group = b->LHS->type == clast_expr_red && - ((struct clast_reduction*) b->LHS)->n > 1; - if (i->language == CLOOG_LANGUAGE_FORTRAN) { - switch (b->type) { - case clast_bin_fdiv: - s1 = "FLOOR(REAL(", s2 = ")/REAL(", s3 = "))"; - break; - case clast_bin_cdiv: - s1 = "CEILING(REAL(", s2 = ")/REAL(", s3 = "))"; - break; - case clast_bin_div: - if (group) - s1 = "(", s2 = ")/", s3 = ""; - else - s1 = "", s2 = "/", s3 = ""; - break; - case clast_bin_mod: - s1 = "MOD(", s2 = ", ", s3 = ")"; - break; - } - } else { - switch (b->type) { - case clast_bin_fdiv: - s1 = "floord(", s2 = ",", s3 = ")"; - break; - case clast_bin_cdiv: - s1 = "ceild(", s2 = ",", s3 = ")"; - break; - case clast_bin_div: - if (group) - s1 = "(", s2 = ")/", s3 = ""; - else - s1 = "", s2 = "/", s3 = ""; - break; - case clast_bin_mod: - if (group) - s1 = "(", s2 = ")%", s3 = ""; - else - s1 = "", s2 = "%", s3 = ""; - break; - } - } - fprintf(dst, "%s", s1); - pprint_expr(i, dst, b->LHS); - fprintf(dst, "%s", s2); - cloog_int_print(dst, b->RHS); - fprintf(dst, "%s", s3); -} - -void pprint_minmax_f(struct cloogoptions *info, FILE *dst, struct clast_reduction *r) -{ - int i; - if (r->n == 0) - return; - fprintf(dst, r->type == clast_red_max ? "MAX(" : "MIN("); - pprint_expr(info, dst, r->elts[0]); - for (i = 1; i < r->n; ++i) { - fprintf(dst, ","); - pprint_expr(info, dst, r->elts[i]); - } - fprintf(dst, ")"); -} - -void pprint_minmax_c(struct cloogoptions *info, FILE *dst, struct clast_reduction *r) -{ - int i; - for (i = 1; i < r->n; ++i) - fprintf(dst, r->type == clast_red_max ? "max(" : "min("); - if (r->n > 0) - pprint_expr(info, dst, r->elts[0]); - for (i = 1; i < r->n; ++i) { - fprintf(dst, ","); - pprint_expr(info, dst, r->elts[i]); - fprintf(dst, ")"); - } -} - -void pprint_reduction(struct cloogoptions *i, FILE *dst, struct clast_reduction *r) -{ - switch (r->type) { - case clast_red_sum: - pprint_sum(i, dst, r); - break; - case clast_red_min: - case clast_red_max: - if (r->n == 1) { - pprint_expr(i, dst, r->elts[0]); - break; - } - if (i->language == CLOOG_LANGUAGE_FORTRAN) - pprint_minmax_f(i, dst, r); - else - pprint_minmax_c(i, dst, r); - break; - default: - assert(0); - } -} - -void pprint_expr(struct cloogoptions *i, FILE *dst, struct clast_expr *e) -{ - if (!e) - return; - switch (e->type) { - case clast_expr_name: - pprint_name(dst, (struct clast_name*) e); - break; - case clast_expr_term: - pprint_term(i, dst, (struct clast_term*) e); - break; - case clast_expr_red: - pprint_reduction(i, dst, (struct clast_reduction*) e); - break; - case clast_expr_bin: - pprint_binary(i, dst, (struct clast_binary*) e); - break; - default: - assert(0); - } -} - -void pprint_equation(struct cloogoptions *i, FILE *dst, struct clast_equation *eq) -{ - pprint_expr(i, dst, eq->LHS); - if (eq->sign == 0) - fprintf(dst, " == "); - else if (eq->sign > 0) - fprintf(dst, " >= "); - else - fprintf(dst, " <= "); - pprint_expr(i, dst, eq->RHS); -} - -void pprint_assignment(struct cloogoptions *i, FILE *dst, - struct clast_assignment *a) -{ - if (a->LHS) - fprintf(dst, "%s = ", a->LHS); - pprint_expr(i, dst, a->RHS); -} - - -/** - * pprint_osl_body function: - * this function pretty-prints the OpenScop body of a given statement. - * It returns 1 if it succeeds to find an OpenScop body to print for - * that statement, 0 otherwise. - * \param[in] options CLooG Options. - * \param[in] dst Output stream. - * \param[in] u Statement to print the OpenScop body. - * \return 1 on success to pretty-print an OpenScop body for u, 0 otherwise. - */ -int pprint_osl_body(struct cloogoptions *options, FILE *dst, - struct clast_user_stmt *u) { -#ifdef OSL_SUPPORT - int i; - char *expr, *tmp; - struct clast_stmt *t; - osl_scop_p scop = options->scop; - osl_statement_p stmt; - osl_body_p body; - - if ((scop != NULL) && - (osl_statement_number(scop->statement) >= u->statement->number)) { - stmt = scop->statement; - - /* Go to the convenient statement in the SCoP. */ - for (i = 1; i < u->statement->number; i++) - stmt = stmt->next; - - /* Ensure it has a printable body. */ - if ((osl_generic_has_URI(stmt->body, OSL_URI_BODY)) && - ((body = stmt->body->data) != NULL) && - (body->expression != NULL) && - (body->iterators != NULL)) { - expr = osl_util_identifier_substitution(body->expression->string[0], - body->iterators->string); - tmp = expr; - /* Print the body expression, substituting the @...@ markers. */ - while (*expr) { - if (*expr == '@') { - int iterator; - expr += sscanf(expr, "@%d", &iterator) + 2; /* 2 for the @s */ - t = u->substitutions; - for (i = 0; i < iterator; i++) - t = t->next; - pprint_assignment(options, dst, (struct clast_assignment *)t); - } else { - fprintf(dst, "%c", *expr++); - } - } - fprintf(dst, "\n"); - free(tmp); - return 1; - } - } -#endif - return 0; -} - -void pprint_user_stmt(struct cloogoptions *options, FILE *dst, - struct clast_user_stmt *u) -{ - struct clast_stmt *t; - - if (pprint_osl_body(options, dst, u)) - return; - - if (u->statement->name) - fprintf(dst, "%s", u->statement->name); - else - fprintf(dst, "S%d", u->statement->number); - fprintf(dst, "("); - for (t = u->substitutions; t; t = t->next) { - assert(CLAST_STMT_IS_A(t, stmt_ass)); - pprint_assignment(options, dst, (struct clast_assignment *)t); - if (t->next) - fprintf(dst, ","); - } - fprintf(dst, ")"); - if (options->language != CLOOG_LANGUAGE_FORTRAN) - fprintf(dst, ";"); - fprintf(dst, "\n"); -} - -void pprint_guard(struct cloogoptions *options, FILE *dst, int indent, - struct clast_guard *g) -{ - int k; - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst,"IF "); - else - fprintf(dst,"if "); - if (g->n > 1) - fprintf(dst,"("); - for (k = 0; k < g->n; ++k) { - if (k > 0) { - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst," .AND. "); - else - fprintf(dst," && "); - } - fprintf(dst,"("); - pprint_equation(options, dst, &g->eq[k]); - fprintf(dst,")"); - } - if (g->n > 1) - fprintf(dst,")"); - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst," THEN\n"); - else - fprintf(dst," {\n"); - - pprint_stmt_list(options, dst, indent + INDENT_STEP, g->then); - - fprintf(dst, "%*s", indent, ""); - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst,"END IF\n"); - else - fprintf(dst,"}\n"); -} - -void pprint_for(struct cloogoptions *options, FILE *dst, int indent, - struct clast_for *f) -{ - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst, "DO "); - else - fprintf(dst, "for ("); - - if (f->LB) { - fprintf(dst, "%s=", f->iterator); - pprint_expr(options, dst, f->LB); - } else if (options->language == CLOOG_LANGUAGE_FORTRAN) - cloog_die("unbounded loops not allowed in FORTRAN.\n"); - - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst,", "); - else - fprintf(dst,";"); - - if (f->UB) { - if (options->language != CLOOG_LANGUAGE_FORTRAN) - fprintf(dst,"%s<=", f->iterator); - pprint_expr(options, dst, f->UB); - } else if (options->language == CLOOG_LANGUAGE_FORTRAN) - cloog_die("unbounded loops not allowed in FORTRAN.\n"); - - if (options->language == CLOOG_LANGUAGE_FORTRAN) { - if (cloog_int_gt_si(f->stride, 1)) - cloog_int_print(dst, f->stride); - fprintf(dst,"\n"); - } - else { - if (cloog_int_gt_si(f->stride, 1)) { - fprintf(dst,";%s+=", f->iterator); - cloog_int_print(dst, f->stride); - fprintf(dst, ") {\n"); - } else - fprintf(dst, ";%s++) {\n", f->iterator); - } - - pprint_stmt_list(options, dst, indent + INDENT_STEP, f->body); - - fprintf(dst, "%*s", indent, ""); - if (options->language == CLOOG_LANGUAGE_FORTRAN) - fprintf(dst,"END DO\n") ; - else - fprintf(dst,"}\n") ; -} - -void pprint_stmt_list(struct cloogoptions *options, FILE *dst, int indent, - struct clast_stmt *s) -{ - for ( ; s; s = s->next) { - if (CLAST_STMT_IS_A(s, stmt_root)) - continue; - fprintf(dst, "%*s", indent, ""); - if (CLAST_STMT_IS_A(s, stmt_ass)) { - pprint_assignment(options, dst, (struct clast_assignment *) s); - if (options->language != CLOOG_LANGUAGE_FORTRAN) - fprintf(dst, ";"); - fprintf(dst, "\n"); - } else if (CLAST_STMT_IS_A(s, stmt_user)) { - pprint_user_stmt(options, dst, (struct clast_user_stmt *) s); - } else if (CLAST_STMT_IS_A(s, stmt_for)) { - pprint_for(options, dst, indent, (struct clast_for *) s); - } else if (CLAST_STMT_IS_A(s, stmt_guard)) { - pprint_guard(options, dst, indent, (struct clast_guard *) s); - } else if (CLAST_STMT_IS_A(s, stmt_block)) { - fprintf(dst, "{\n"); - pprint_stmt_list(options, dst, indent + INDENT_STEP, - ((struct clast_block *)s)->body); - fprintf(dst, "%*s", indent, ""); - fprintf(dst, "}\n"); - } else { - assert(0); - } - } -} - - -/****************************************************************************** - * Pretty Printing (dirty) functions * - ******************************************************************************/ - -void clast_pprint(FILE *foo, struct clast_stmt *root, - int indent, CloogOptions *options) -{ - pprint_stmt_list(options, foo, indent, root); -} diff --git a/cloog-0.17.0/source/program.c b/cloog-0.17.0/source/program.c deleted file mode 100644 index c52c1dd8a2dce91f9ae71c985285ab099a142efc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/program.c +++ /dev/null @@ -1,1077 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** program.c ** - **-------------------------------------------------------------------** - ** First version: october 25th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - - -# include -# include -#include -# include -# include -# include -# include -# include -# include "../include/cloog/cloog.h" -#ifdef CLOOG_RUSAGE -# include -#endif - -#define ALLOC(type) (type*)malloc(sizeof(type)) - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_program_print function: - * this function is a human-friendly way to display the CloogProgram data - * structure, it shows all the different fields and includes an indentation - * level (level) in order to work with others print_structure functions. - * - July 1st 2005: first version based on the old cloog_program_print function. - */ -void cloog_program_print_structure(file, program, level) -FILE * file ; -CloogProgram * program ; -int level ; -{ int i, j ; - - /* Go to the right level. */ - for (i=0; ilanguage) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scattering dimension number. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - fprintf(file,"Scattering dimension number: %d\n",program->nb_scattdims) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the scalar scattering dimension informations. */ - for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - if (program->scaldims != NULL) - { fprintf(file,"Scalar dimensions:") ; - for (i=0;inb_scattdims;i++) - fprintf(file," %d:%d ",i,program->scaldims[i]) ; - fprintf(file,"\n") ; - } - else - fprintf(file,"No scalar scattering dimensions\n") ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the parameter and the iterator names. */ - cloog_names_print_structure(file,program->names,level+1) ; - - /* A blank line. */ - for (i=0; i<=level+1; i++) - fprintf(file,"|\t") ; - fprintf(file,"\n") ; - - /* Print the context. */ - cloog_domain_print_structure(file, program->context, level+1, "Context"); - - /* Print the loop. */ - cloog_loop_print_structure(file,program->loop,level+1) ; - - /* One more time something that is here only for a better look. */ - for (j=0; j<2; j++) - { for (i=0; i<=level; i++) - fprintf(file,"|\t") ; - - fprintf(file,"\n") ; - } -} - - -/** - * cloog_program_dump_cloog function: - * This function dumps a CloogProgram structure supposed to be completely - * filled in a CLooG input file (foo possibly stdout) such as CLooG can - * rebuild almost exactly the data structure from the input file. - * - * If the scattering is already applied, the scattering parameter is supposed to - * be NULL. In this case the number of scattering functions is lost, since they - * are included inside the iteration domains. This can only lead to a less - * beautiful pretty printing. - * - * In case the scattering is not yet applied it can be passed to this function - * and will be included in the CLooG input file dump. - */ -void cloog_program_dump_cloog(FILE * foo, CloogProgram * program, - CloogScatteringList *scattering) -{ - int i; - CloogLoop * loop ; - CloogScatteringList *tmp_scatt; - - fprintf(foo, - "# CLooG -> CLooG\n" - "# This is an automatic dump of a CLooG input file from a CloogProgram data\n" - "# structure. WARNING: it is highly dangerous and MAY be correct ONLY if\n" - "# - it has been dumped before loop generation.\n" - "# - option -noscalars is used (it removes scalar dimensions otherwise)\n" - "# - option -l is at least the original scattering dimension number\n" - "# ASK THE AUTHOR IF YOU *NEED* SOMETHING MORE ROBUST\n") ; - - /* Language. */ - if (program->language == 'c') - fprintf(foo,"# Language: C\n") ; - else - fprintf(foo,"# Language: FORTRAN\n") ; - fprintf(foo,"%c\n\n",program->language) ; - - /* Context. */ - fprintf(foo, "# Context (%d parameter(s)):\n", program->names->nb_parameters); - cloog_domain_print_constraints(foo, program->context, 0); - fprintf(foo,"1 # Parameter name(s)\n") ; - for (i=0;inames->nb_parameters;i++) - fprintf(foo,"%s ",program->names->parameters[i]) ; - - /* Statement number. */ - i = 0 ; - loop = program->loop ; - while (loop != NULL) - { i++ ; - loop = loop->next ; - } - fprintf(foo,"\n\n# Statement number:\n%d\n\n",i) ; - - /* Iteration domains. */ - i = 1 ; - loop = program->loop ; - while (loop != NULL) - { /* Name of the domain. */ - fprintf(foo,"# Iteration domain of statement %d.\n",i) ; - - cloog_domain_print_constraints(foo, loop->domain, 1); - fprintf(foo,"0 0 0 # For future options.\n\n") ; - - i++ ; - loop = loop->next ; - } - fprintf(foo,"\n1 # Iterator name(s)\n") ; - - /* Scattering already applied? In this case print the scattering names as - * additional iterator names. */ - if (!scattering) - for (i = 0; i < program->names->nb_scattering; i++) - fprintf(foo, "%s ", program->names->scattering[i]); - for (i=0;inames->nb_iterators;i++) - fprintf(foo,"%s ",program->names->iterators[i]); - fprintf(foo,"\n\n") ; - - /* Exit, if scattering is already applied. */ - if (!scattering) { - fprintf(foo, "# No scattering functions.\n0\n\n"); - return; - } - - /* Scattering relations. */ - fprintf(foo, "# --------------------- SCATTERING --------------------\n"); - - i = 0; - for (tmp_scatt = scattering; tmp_scatt; tmp_scatt = tmp_scatt->next) - i++; - - fprintf(foo, "%d # Scattering functions", i); - - for (tmp_scatt = scattering; tmp_scatt; tmp_scatt = tmp_scatt->next) - cloog_scattering_print_constraints(foo, tmp_scatt->scatt); - - fprintf(foo, "\n1 # Scattering dimension name(s)\n"); - - for (i = 0; i < program->names->nb_scattering; i++) - fprintf(foo, "%s ", program->names->scattering[i]); -} - - -/** - * cloog_program_print function: - * This function prints the content of a CloogProgram structure (program) into a - * file (file, possibly stdout). - * - July 1st 2005: Now this very old function (probably as old as CLooG) is - * only a frontend to cloog_program_print_structure, with a - * quite better human-readable representation. - */ -void cloog_program_print(FILE * file, CloogProgram * program) -{ cloog_program_print_structure(file,program,0) ; -} - - -static void print_comment(FILE *file, CloogOptions *options, - const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - if (options->language == CLOOG_LANGUAGE_FORTRAN) { - fprintf(file, "! "); - vfprintf(file, fmt, args); - fprintf(file, "\n"); - } else { - fprintf(file, "/* "); - vfprintf(file, fmt, args); - fprintf(file, " */\n"); - } -} - -static void print_macros(FILE *file) -{ - fprintf(file, "/* Useful macros. */\n") ; - fprintf(file, - "#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))\n"); - fprintf(file, - "#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))\n"); - fprintf(file, "#define max(x,y) ((x) > (y) ? (x) : (y))\n") ; - fprintf(file, "#define min(x,y) ((x) < (y) ? (x) : (y))\n\n") ; -} - -static void print_declarations(FILE *file, int n, char **names) -{ - int i; - - fprintf(file, " int %s", names[0]); - for (i = 1; i < n; i++) - fprintf(file, ", %s", names[i]); - - fprintf(file, ";\n"); -} - -static void print_iterator_declarations(FILE *file, CloogProgram *program, - CloogOptions *options) -{ - CloogNames *names = program->names; - - if (names->nb_scattering) { - fprintf(file, " /* Scattering iterators. */\n"); - print_declarations(file, names->nb_scattering, names->scattering); - } - if (names->nb_iterators) { - fprintf(file, " /* Original iterators. */\n"); - print_declarations(file, names->nb_iterators, names->iterators); - } -} - -static void print_callable_preamble(FILE *file, CloogProgram *program, - CloogOptions *options) -{ - int j; - CloogBlockList *blocklist; - CloogBlock *block; - CloogStatement *statement; - - fprintf(file, "extern void hash(int);\n\n"); - - print_macros(file); - - for (blocklist = program->blocklist; blocklist; blocklist = blocklist->next) { - block = blocklist->block; - for (statement = block->statement; statement; statement = statement->next) { - fprintf(file, "#define S%d(", statement->number); - if (block->depth > 0) { - fprintf(file, "%s", program->names->iterators[0]); - for(j = 1; j < block->depth; j++) - fprintf(file, ",%s", program->names->iterators[j]); - } - fprintf(file,") { hash(%d);", statement->number); - for(j = 0; j < block->depth; j++) - fprintf(file, " hash(%s);", program->names->iterators[j]); - fprintf(file, " }\n"); - } - } - fprintf(file, "\nvoid test("); - if (program->names->nb_parameters > 0) { - fprintf(file, "int %s", program->names->parameters[0]); - for(j = 1; j < program->names->nb_parameters; j++) - fprintf(file, ", int %s", program->names->parameters[j]); - } - fprintf(file, ")\n{\n"); - print_iterator_declarations(file, program, options); -} - -static void print_callable_postamble(FILE *file, CloogProgram *program) -{ - fprintf(file, "}\n"); -} - -/** - * cloog_program_pprint function: - * This function prints the content of a CloogProgram structure (program) into a - * file (file, possibly stdout), in a C-like language. - * - June 22nd 2005: Adaptation for GMP. - */ -void cloog_program_pprint(file, program, options) -FILE * file ; -CloogProgram * program ; -CloogOptions * options ; -{ - int i, j, indentation = 0; - CloogStatement * statement ; - CloogBlockList * blocklist ; - CloogBlock * block ; - struct clast_stmt *root; - - if (program->language == 'f') - options->language = CLOOG_LANGUAGE_FORTRAN ; - else - options->language = CLOOG_LANGUAGE_C ; - -#ifdef CLOOG_RUSAGE - print_comment(file, options, "Generated from %s by %s in %.2fs.", - options->name, cloog_version(), options->time); -#else - print_comment(file, options, "Generated from %s by %s.", - options->name, cloog_version()); -#endif -#ifdef CLOOG_MEMORY - print_comment(file, options, "CLooG asked for %d KBytes.", options->memory); - cloog_msg(CLOOG_INFO, "%.2fs and %dKB used for code generation.\n", - options->time,options->memory); -#endif - - /* If the option "compilable" is set, we provide the whole stuff to generate - * a compilable code. This code just do nothing, but now the user can edit - * the source and set the statement macros and parameters values. - */ - if (options->compilable && (program->language == 'c')) - { /* The headers. */ - fprintf(file,"/* DON'T FORGET TO USE -lm OPTION TO COMPILE. */\n\n") ; - fprintf(file,"/* Useful headers. */\n") ; - fprintf(file,"#include \n") ; - fprintf(file,"#include \n") ; - fprintf(file,"#include \n\n") ; - - /* The value of parameters. */ - fprintf(file,"/* Parameter value. */\n") ; - for (i = 1; i <= program->names->nb_parameters; i++) - fprintf(file, "#define PARVAL%d %d\n", i, options->compilable); - - /* The macros. */ - print_macros(file); - - /* The statement macros. */ - fprintf(file,"/* Statement macros (please set). */\n") ; - blocklist = program->blocklist ; - while (blocklist != NULL) - { block = blocklist->block ; - statement = block->statement ; - while (statement != NULL) - { fprintf(file,"#define S%d(",statement->number) ; - if (block->depth > 0) - { fprintf(file,"%s",program->names->iterators[0]) ; - for(j=1;jdepth;j++) - fprintf(file,",%s",program->names->iterators[j]) ; - } - fprintf(file,") {total++;") ; - if (block->depth > 0) { - fprintf(file, " printf(\"S%d %%d", statement->number); - for(j=1;jdepth;j++) - fprintf(file, " %%d"); - - fprintf(file,"\\n\",%s",program->names->iterators[0]) ; - for(j=1;jdepth;j++) - fprintf(file,",%s",program->names->iterators[j]) ; - fprintf(file,");") ; - } - fprintf(file,"}\n") ; - - statement = statement->next ; - } - blocklist = blocklist->next ; - } - - /* The iterator and parameter declaration. */ - fprintf(file,"\nint main() {\n") ; - print_iterator_declarations(file, program, options); - if (program->names->nb_parameters > 0) - { fprintf(file," /* Parameters. */\n") ; - fprintf(file, " int %s=PARVAL1",program->names->parameters[0]); - for(i=2;i<=program->names->nb_parameters;i++) - fprintf(file, ", %s=PARVAL%d", program->names->parameters[i-1], i); - - fprintf(file,";\n"); - } - fprintf(file," int total=0;\n"); - fprintf(file,"\n") ; - - /* And we adapt the identation. */ - indentation += 2 ; - } else if (options->callable && program->language == 'c') { - print_callable_preamble(file, program, options); - indentation += 2; - } - - root = cloog_clast_create(program, options); - clast_pprint(file, root, indentation, options); - cloog_clast_free(root); - - /* The end of the compilable code in case of 'compilable' option. */ - if (options->compilable && (program->language == 'c')) - { - fprintf(file, "\n printf(\"Number of integral points: %%d.\\n\",total);"); - fprintf(file, "\n return 0;\n}\n"); - } else if (options->callable && program->language == 'c') - print_callable_postamble(file, program); -} - - -/****************************************************************************** - * Memory deallocation function * - ******************************************************************************/ - - -/** - * cloog_program_free function: - * This function frees the allocated memory for a CloogProgram structure. - */ -void cloog_program_free(CloogProgram * program) -{ cloog_names_free(program->names) ; - cloog_loop_free(program->loop) ; - cloog_domain_free(program->context) ; - cloog_block_list_free(program->blocklist) ; - if (program->scaldims != NULL) - free(program->scaldims) ; - - free(program) ; -} - - -/****************************************************************************** - * Reading function * - ******************************************************************************/ - - -static void cloog_program_construct_block_list(CloogProgram *p) -{ - CloogLoop *loop; - CloogBlockList **next = &p->blocklist; - - for (loop = p->loop; loop; loop = loop->next) { - *next = cloog_block_list_alloc(loop->block); - next = &(*next)->next; - } -} - - -/** - * Construct a CloogProgram structure from a given context and - * union domain representing the iteration domains and scattering functions. - */ -CloogProgram *cloog_program_alloc(CloogDomain *context, CloogUnionDomain *ud, - CloogOptions *options) -{ - int i; - char prefix[] = "c"; - CloogScatteringList * scatteringl; - CloogNames *n; - CloogProgram * p ; - - /* Memory allocation for the CloogProgram structure. */ - p = cloog_program_malloc() ; - - if (options->language == CLOOG_LANGUAGE_FORTRAN) - p->language = 'f'; - else - p->language = 'c'; - - p->names = n = cloog_names_alloc(); - - /* We then read the context data. */ - p->context = context; - n->nb_parameters = ud->n_name[CLOOG_PARAM]; - - /* First part of the CloogNames structure: the parameter names. */ - if (ud->name[CLOOG_PARAM]) { - n->parameters = ud->name[CLOOG_PARAM]; - ud->name[CLOOG_PARAM] = NULL; - } else - n->parameters = cloog_names_generate_items(n->nb_parameters, NULL, - FIRST_PARAMETER); - - n->nb_iterators = ud->n_name[CLOOG_ITER]; - if (ud->name[CLOOG_ITER]) { - n->iterators = ud->name[CLOOG_ITER]; - ud->name[CLOOG_ITER] = NULL; - } else - n->iterators = cloog_names_generate_items(n->nb_iterators, NULL, - FIRST_ITERATOR); - - if (ud->domain) { - CloogNamedDomainList *l; - CloogLoop **next = &p->loop; - CloogScatteringList **next_scat = &scatteringl; - - scatteringl = NULL; - for (i = 0, l = ud->domain; l; ++i, l = l->next) { - *next = cloog_loop_from_domain(options->state, l->domain, i); - l->domain = NULL; - (*next)->block->statement->name = l->name; - (*next)->block->statement->usr = l->usr; - l->name = NULL; - - if (l->scattering) { - *next_scat = ALLOC(CloogScatteringList); - (*next_scat)->scatt = l->scattering; - l->scattering = NULL; - (*next_scat)->next = NULL; - - next_scat = &(*next_scat)->next; - } - - next = &(*next)->next; - } - - if (scatteringl != NULL) { - p->nb_scattdims = cloog_scattering_dimension(scatteringl->scatt, - p->loop->domain); - n->nb_scattering = p->nb_scattdims; - if (ud->name[CLOOG_SCAT]) { - n->scattering = ud->name[CLOOG_SCAT]; - ud->name[CLOOG_SCAT] = NULL; - } else - n->scattering = cloog_names_generate_items(n->nb_scattering, prefix, -1); - - /* The boolean array for scalar dimensions is created and set to 0. */ - p->scaldims = (int *)malloc(p->nb_scattdims*(sizeof(int))) ; - if (p->scaldims == NULL) - cloog_die("memory overflow.\n"); - for (i=0;inb_scattdims;i++) - p->scaldims[i] = 0 ; - - /* We try to find blocks in the input problem to reduce complexity. */ - if (!options->noblocks) - cloog_program_block(p, scatteringl, options); - if (!options->noscalars) - cloog_program_extract_scalars(p, scatteringl, options); - - cloog_program_scatter(p, scatteringl, options); - cloog_scattering_list_free(scatteringl); - - if (!options->noblocks) - p->loop = cloog_loop_block(p->loop, p->scaldims, p->nb_scattdims); - } - else - { p->nb_scattdims = 0 ; - p->scaldims = NULL ; - } - - cloog_names_scalarize(p->names,p->nb_scattdims,p->scaldims) ; - - cloog_program_construct_block_list(p); - } - else - { p->loop = NULL ; - p->blocklist = NULL ; - p->scaldims = NULL ; - } - - cloog_union_domain_free(ud); - - return(p) ; -} - - -/** - * cloog_program_read function: - * This function read the informations to put in a CloogProgram structure from - * a file (file, possibly stdin). It returns a pointer to a CloogProgram - * structure containing the read informations. - * - October 25th 2001: first version. - * - September 9th 2002: - the big reading function is now split in several - * functions (one per read data structure). - * - adaptation to the new file format with naming. - */ -CloogProgram *cloog_program_read(FILE *file, CloogOptions *options) -{ - CloogInput *input; - CloogProgram *p; - - input = cloog_input_read(file, options); - p = cloog_program_alloc(input->context, input->ud, options); - free(input); - - return p; -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_program_malloc function: - * This function allocates the memory space for a CloogProgram structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogProgram * cloog_program_malloc() -{ CloogProgram * program ; - - /* Memory allocation for the CloogProgram structure. */ - program = (CloogProgram *)malloc(sizeof(CloogProgram)) ; - if (program == NULL) - cloog_die("memory overflow.\n"); - - /* We set the various fields with default values. */ - program->language = 'c' ; - program->nb_scattdims = 0 ; - program->context = NULL ; - program->loop = NULL ; - program->names = NULL ; - program->blocklist = NULL ; - program->scaldims = NULL ; - program->usr = NULL; - - return program ; -} - - -/** - * cloog_program_generate function: - * This function calls the Quillere algorithm for loop scanning. (see the - * Quillere paper) and calls the loop simplification function. - * - depth is the loop depth we want to optimize (guard free as possible), - * the first loop depth is 1 and anegative value is the infinity depth. - * - sep_level is the level number where we want to start loop separation. - ** - * - October 26th 2001: first version. - * - April 19th 2005: some basic fixes and memory usage feature. - * - April 29th 2005: (bug fix, bug found by DaeGon Kim) see case 2 below. - */ -CloogProgram * cloog_program_generate(program, options) -CloogProgram * program ; -CloogOptions * options ; -{ -#ifdef CLOOG_RUSAGE - float time; - struct rusage start, end ; -#endif - CloogLoop * loop ; -#ifdef CLOOG_MEMORY - char status_path[MAX_STRING_VAL] ; - FILE * status ; - - /* We initialize the memory need to 0. */ - options->memory = 0 ; -#endif - - if (options->override) - { - cloog_msg(options, CLOOG_WARNING, - "you are using -override option, be aware that the " - "generated\n code may be incorrect.\n") ; - } - else - { /* Playing with options may be dangerous, here are two possible issues : - * 1. Using -l option less than scattering dimension number may lead to - * an illegal target code (since the scattering is not respected), if - * it is the case, we set -l depth to the first acceptable value. - */ - if ((program->nb_scattdims > options->l) && (options->l >= 0)) - { - cloog_msg(options, CLOOG_WARNING, - "-l depth is less than the scattering dimension number " - "(the \n generated code may be incorrect), it has been " - "automaticaly set\n to this value (use option -override " - "to override).\n") ; - options->l = program->nb_scattdims ; - } - - /* 2. Using -f option greater than one while -l depth is greater than the - * scattering dimension number may lead to iteration duplication (try - * test/daegon_lu_osp.cloog with '-f 3' to test) because of the step 4b - * of the cloog_loop_generate function, if it is the case, we set -l to - * the first acceptable value. - */ - if (((options->f > 1) || (options->f < 0)) && - ((options->l > program->nb_scattdims) || (options->l < 0))) - { - cloog_msg(options, CLOOG_WARNING, - "-f depth is more than one, -l depth has been " - "automaticaly set\n to the scattering dimension number " - "(target code may have\n duplicated iterations), -l depth " - "has been automaticaly set to\n this value (use option " - "-override to override).\n") ; - options->l = program->nb_scattdims ; - } - } - -#ifdef CLOOG_RUSAGE - getrusage(RUSAGE_SELF, &start) ; -#endif - if (program->loop != NULL) - { loop = program->loop ; - - /* Here we go ! */ - loop = cloog_loop_generate(loop, program->context, 0, 0, - program->scaldims, - program->nb_scattdims, - options); - -#ifdef CLOOG_MEMORY - /* We read into the status file of the process how many memory it uses. */ - sprintf(status_path,"/proc/%d/status",getpid()) ; - status = fopen(status_path, "r") ; - while (fscanf(status,"%s",status_path) && strcmp(status_path,"VmData:")!=0); - fscanf(status,"%d",&(options->memory)) ; - fclose(status) ; -#endif - - if ((!options->nosimplify) && (program->loop != NULL)) - loop = cloog_loop_simplify(loop, program->context, 0, - program->nb_scattdims, options); - - program->loop = loop ; - } - -#ifdef CLOOG_RUSAGE - getrusage(RUSAGE_SELF, &end) ; - /* We calculate the time spent in code generation. */ - time = (end.ru_utime.tv_usec - start.ru_utime.tv_usec)/(float)(MEGA) ; - time += (float)(end.ru_utime.tv_sec - start.ru_utime.tv_sec) ; - options->time = time ; -#endif - - return program ; -} - - -/** - * cloog_program_block function: - * this function gives a last chance to the lazy user to consider statement - * blocks instead of some statement lists where the whole list may be - * considered as a single statement from a code generation point of view. - * For instance two statements with the same iteration domain and the same - * scattering functions may be considered as a block. This function is lazy - * and can only find very simple forms of trivial blocks (see - * cloog_domain_lazy_block function for more details). The useless loops and - * scattering functions are removed and freed while the statement list of - * according blocks are filled. - * - program is the whole program structure (befaore applying scattering), - * - scattering is the list of scattering functions. - ** - * - April 30th 2005: first attempt. - * - June 10-11th 2005: first working version. - */ -void cloog_program_block(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options) -{ int blocked_reference=0, blocked=0, nb_blocked=0 ; - CloogLoop * reference, * start, * loop ; - CloogScatteringList * scatt_reference, * scatt_loop, * scatt_start; - - if ((program->loop == NULL) || (program->loop->next == NULL)) - return ; - - /* The process will use three variables for the linked list : - * - 'start' is the starting point of a new block, - * - 'reference' is the node of the block used for the block checking, - * - 'loop' is the candidate to be inserted inside the block. - * At the beginning of the process, the linked lists are as follow: - * O------>O------>O------>O------>NULL - * | | - * start loop - * reference - */ - - reference = program->loop ; - start = program->loop ; - loop = reference->next ; - scatt_reference = scattering ; - scatt_start = scattering ; - scatt_loop = scattering->next ; - - while (loop != NULL) - { if (cloog_domain_lazy_equal(reference->domain,loop->domain) && - cloog_scattering_lazy_block(scatt_reference->scatt, scatt_loop->scatt, - scattering,program->nb_scattdims)) - { /* If we find a block we update the links: - * +---------------+ - * | v - * O O------>O------>O------>NULL - * | | - * start loop - * reference - */ - blocked = 1 ; - nb_blocked ++ ; - cloog_block_merge(start->block,loop->block); /* merge frees loop->block */ - loop->block = NULL ; - start->next = loop->next ; - scatt_start->next = scatt_loop->next ; - } - else - { /* If we didn't find a block, the next start of a block is updated: - * O------>O------>O------>O------>NULL - * | | - * reference start - * loop - */ - blocked= 0 ; - start = loop ; - scatt_start = scatt_loop ; - } - - /* If the reference node has been included into a block, we can free it. */ - if (blocked_reference) - { reference->next = NULL ; - cloog_loop_free(reference) ; - cloog_scattering_free(scatt_reference->scatt); - free(scatt_reference) ; - } - - /* The reference and the loop are now updated for the next try, the - * starting position depends on the previous step. - * O ? O------>O------>O------>NULL - * | | - * reference loop - */ - reference = loop ; - loop = loop->next ; - scatt_reference = scatt_loop ; - scatt_loop = scatt_loop->next ; - - /* We mark the new reference as being blocked or not, if will be freed - * during the next while loop execution. - */ - if (blocked) - blocked_reference = 1 ; - else - blocked_reference = 0 ; - } - - /* We free the last blocked reference if any (since in the while loop it was - * freed during the next loop execution, it was not possible to free the - * last one inside). - */ - if (blocked_reference) - { reference->next = NULL ; - cloog_loop_free(reference) ; - cloog_scattering_free(scatt_reference->scatt); - free(scatt_reference) ; - } - - if (nb_blocked != 0) - cloog_msg(options, CLOOG_INFO, "%d domains have been blocked.\n", nb_blocked); -} - - -/** - * cloog_program_extract_scalars function: - * this functions finds and removes the dimensions of the scattering functions - * when they are scalar (i.e. of the shape "dim + scalar = 0") for all - * scattering functions. The reason is that the processing of such dimensions - * is trivial and do not need neither a row and a column in the matrix - * representation of the domain (this will save memory) neither the full - * Quillere processing (this will save time). The scalar dimensions data are - * dispatched in the CloogProgram structure (the boolean vector scaldims will - * say which original dimensions are scalar or not) and to the CloogBlock - * structures (each one has a scaldims vector that contains the scalar values). - * - June 14th 2005: first developments. - * - June 30th 2005: first version. - */ -void cloog_program_extract_scalars(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options) -{ int i, j, scalar, current, nb_scaldims=0 ; - CloogScatteringList *start; - CloogScattering *old; - CloogLoop *loop; - CloogBlock * block ; - - start = scattering ; - - for (i=0;inb_scattdims;i++) - { scalar = 1 ; - scattering = start ; - while (scattering != NULL) - { if (!cloog_scattering_lazy_isscalar(scattering->scatt, i, NULL)) - { scalar = 0 ; - break ; - } - scattering = scattering->next ; - } - - if (scalar) - { nb_scaldims ++ ; - program->scaldims[i] = 1 ; - } - } - - /* If there are no scalar dimensions, we can continue directly. */ - if (!nb_scaldims) - return ; - - /* Otherwise, in each block, we have to put the number of scalar dimensions, - * and to allocate the memory for the scalar values. - */ - for (loop = program->loop; loop; loop = loop->next) { - block = loop->block; - block->nb_scaldims = nb_scaldims ; - block->scaldims = (cloog_int_t *)malloc(nb_scaldims*sizeof(cloog_int_t)); - for (i=0;iscaldims[i]); - } - - /* Then we have to fill these scalar values, so we can erase those dimensions - * from the scattering functions. It's easier to begin with the last one, - * since there would be an offset otherwise (if we remove the i^th dimension, - * then the next one is not the (i+1)^th but still the i^th...). - */ - current = nb_scaldims - 1 ; - for (i=program->nb_scattdims-1;i>=0;i--) - if (program->scaldims[i]) - { - scattering = start ; - for (loop = program->loop; loop; loop = loop->next) { - block = loop->block; - if (!cloog_scattering_lazy_isscalar(scattering->scatt, i, - &block->scaldims[current])) { - /* We should have found a scalar value: if not, there is an error. */ - cloog_die("dimension %d is not scalar as expected.\n", i); - } - scattering = scattering->next ; - } - - scattering = start ; - while (scattering != NULL) { - old = scattering->scatt; - scattering->scatt = cloog_scattering_erase_dimension(old, i); - cloog_scattering_free(old); - scattering = scattering->next ; - } - current-- ; - } - - /* We postprocess the scaldims array in such a way that each entry is how - * many scalar dimensions follows + 1 (the current one). This will make - * some other processing easier (e.g. knowledge of some offsets). - */ - for (i=0;inb_scattdims-1;i++) - { if (program->scaldims[i]) - { j = i + 1 ; - while ((j < program->nb_scattdims) && program->scaldims[j]) - { program->scaldims[i] ++ ; - j ++ ; - } - } - } - - if (nb_scaldims != 0) - cloog_msg(options, CLOOG_INFO, "%d dimensions (over %d) are scalar.\n", - nb_scaldims,program->nb_scattdims) ; -} - - -/** - * cloog_program_scatter function: - * This function adds the scattering (scheduling) informations in a program. - * If names is NULL, this function create names itself such that the i^th - * name is ci. - * - November 6th 2001: first version. - */ -void cloog_program_scatter(CloogProgram *program, - CloogScatteringList *scattering, CloogOptions *options) -{ int scattering_dim, scattering_dim2, not_enough_constraints=0 ; - CloogLoop * loop ; - - if ((program != NULL) && (scattering != NULL)) - { loop = program->loop ; - - /* We compute the scattering dimension and check it is >=0. */ - scattering_dim = cloog_scattering_dimension(scattering->scatt, loop->domain); - if (scattering_dim < 0) - cloog_die("scattering has not enough dimensions.\n"); - if (!cloog_scattering_fully_specified(scattering->scatt, loop->domain)) - not_enough_constraints ++ ; - - /* The scattering dimension may have been modified by scalar extraction. */ - scattering_dim = cloog_scattering_dimension(scattering->scatt, loop->domain); - - /* Finally we scatter all loops. */ - cloog_loop_scatter(loop, scattering->scatt); - loop = loop->next ; - scattering = scattering->next ; - - while ((loop != NULL) && (scattering != NULL)) - { scattering_dim2 = cloog_scattering_dimension(scattering->scatt, - loop->domain); - if (scattering_dim2 != scattering_dim) - cloog_die("scattering dimensions are not the same.\n") ; - if (!cloog_scattering_fully_specified(scattering->scatt, loop->domain)) - not_enough_constraints ++ ; - - cloog_loop_scatter(loop, scattering->scatt); - loop = loop->next ; - scattering = scattering->next ; - } - if ((loop != NULL) || (scattering != NULL)) - cloog_msg(options, CLOOG_WARNING, - "there is not a scattering for each statement.\n"); - - if (not_enough_constraints) - cloog_msg(options, CLOOG_WARNING, "not enough constraints for " - "%d scattering function(s).\n",not_enough_constraints) ; - } -} diff --git a/cloog-0.17.0/source/state.c b/cloog-0.17.0/source/state.c deleted file mode 100644 index 7f3fff8494852e677affea4d3a650c4973d9287e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/state.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include "../include/cloog/cloog.h" - -/** - * Allocate state and initialize backend independent part. - */ -CloogState *cloog_core_state_malloc(void) -{ - CloogState *state; - - state = (CloogState *)malloc(sizeof(CloogState)); - if (!state) - cloog_die("memory overflow.\n"); - - state->backend = NULL; - - cloog_int_init(state->zero); - cloog_int_set_si(state->zero, 0); - cloog_int_init(state->one); - cloog_int_set_si(state->one, 1); - cloog_int_init(state->negone); - cloog_int_set_si(state->negone, -1); - - state->block_allocated = 0; - state->block_freed = 0; - state->block_max = 0; - - state->domain_allocated = 0; - state->domain_freed = 0; - state->domain_max = 0; - - state->loop_allocated = 0; - state->loop_freed = 0; - state->loop_max = 0; - - state->statement_allocated = 0; - state->statement_freed = 0; - state->statement_max = 0; - - return state; -} - -/** - * Free state. - */ -void cloog_core_state_free(CloogState *state) -{ - cloog_int_clear(state->zero); - cloog_int_clear(state->one); - cloog_int_clear(state->negone); - free(state); -} diff --git a/cloog-0.17.0/source/statement.c b/cloog-0.17.0/source/statement.c deleted file mode 100644 index 1c6af4ede13be46f16c64d24590cb85731189670..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/statement.c +++ /dev/null @@ -1,280 +0,0 @@ - - /**-------------------------------------------------------------------** - ** CLooG ** - **-------------------------------------------------------------------** - ** statement.c ** - **-------------------------------------------------------------------** - ** First version: november 4th 2001 ** - **-------------------------------------------------------------------**/ - - -/****************************************************************************** - * CLooG : the Chunky Loop Generator (experimental) * - ****************************************************************************** - * * - * Copyright (C) 2001-2005 Cedric Bastoul * - * * - * This library 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 2.1 of the License, or (at your option) any later version. * - * * - * This library 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 * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * CLooG, the Chunky Loop Generator * - * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * - * * - ******************************************************************************/ -/* CAUTION: the english used for comments is probably the worst you ever read, - * please feel free to correct and improve it ! - */ - -# include -# include -# include -# include "../include/cloog/cloog.h" - - -/****************************************************************************** - * Memory leaks hunting * - ******************************************************************************/ - - -/** - * These functions and global variables are devoted to memory leaks hunting: we - * want to know at each moment how many CloogStatement structures had been - * allocated (cloog_statement_allocated) and how many had been freed - * (cloog_statement_freed). Each time a CloogStatement structure is allocated, - * a call to the function cloog_statement_leak_up() must be carried out, and - * respectively cloog_statement_leak_down() when a CloogStatement structure is - * freed. The special variable cloog_statement_max gives the maximal number of - * CloogStatement structures simultaneously alive (i.e. allocated and - * non-freed) in memory. - * - July 3rd->11th 2003: first version (memory leaks hunt and correction). - */ - - -static void cloog_statement_leak_up(CloogState *state) -{ - state->statement_allocated++; - if ((state->statement_allocated - state->statement_freed) > state->statement_max) - state->statement_max = state->statement_allocated - state->statement_freed ; -} - - -static void cloog_statement_leak_down(CloogState *state) -{ - state->statement_freed++; -} - - -/****************************************************************************** - * Structure display function * - ******************************************************************************/ - - -/** - * cloog_domain_print_structure : - * this function is a human-friendly way to display the CloogDomain data - * structure, it includes an indentation level (level) in order to work with - * others print_structure functions. - * - June 16th 2005: first version. - */ -void cloog_statement_print_structure(file, statement, level) -FILE * file ; -CloogStatement * statement ; -int level ; -{ int i ; - - if (statement != NULL) - { /* Go to the right level. */ - for (i=0; inumber) ; - - statement = statement->next ; - - while (statement != NULL) - { for (i=0; inumber) ; - statement = statement->next ; - } - } - else - { for (i=0; istate); - - next = statement->next ; - /* free(statement->usr) ; Actually, this is user's job ! */ - free(statement->name); - free(statement) ; - statement = next ; - } -} - - -/****************************************************************************** - * Processing functions * - ******************************************************************************/ - - -/** - * cloog_statement_malloc function: - * This function allocates the memory space for a CloogStatement structure and - * sets its fields with default values. Then it returns a pointer to the - * allocated space. - * - November 21th 2005: first version. - */ -CloogStatement *cloog_statement_malloc(CloogState *state) -{ CloogStatement * statement ; - - /* Memory allocation for the CloogStatement structure. */ - statement = (CloogStatement *)malloc(sizeof(CloogStatement)) ; - if (statement == NULL) - cloog_die("memory overflow.\n"); - cloog_statement_leak_up(state); - - /* We set the various fields with default values. */ - statement->state = state; - statement->number = 0; - statement->name = NULL; - statement->usr = NULL ; /* To fill it is actually user's job ! */ - statement->next = NULL ; - - return statement ; -} - - -/** - * cloog_statement_alloc function: - * This function allocates the memory space for a CloogStatement structure and - * sets its fields with those given as input. Then it returns a pointer to the - * allocated space. - * - number is the statement number. - ** - * - September 9th 2002: first version. - * - March 17th 2003: fix for the usr field in CloogStatement structure. - * - April 16th 2005: adaptation to new CloogStatement structure (with - * number), cloog_statement_read becomes - * cloog_statement_alloc sincethere is nothing more to - * read on a file. - * - November 21th 2005: use of cloog_statement_malloc. - */ -CloogStatement *cloog_statement_alloc(CloogState *state, int number) -{ CloogStatement * statement ; - - /* Memory allocation and initialization of the structure. */ - statement = cloog_statement_malloc(state); - - statement->number = number ; - - return statement ; -} - - -/** - * cloog_statement_copy function: - * This function returns a copy of the CloogStatement structure given as input. - * - October 28th 2001: first version (in loop.c). - * - March 17th 2003: fix for the usr field in CloogStatement structure. - * - April 16th 2005: adaptation to new CloogStatement struct (with number). - */ -CloogStatement * cloog_statement_copy(CloogStatement * source) -{ CloogStatement * statement, * temp, * now = NULL ; - - statement = NULL ; - - while (source != NULL) { - cloog_statement_leak_up(source->state); - - temp = (CloogStatement *)malloc(sizeof(CloogStatement)) ; - if (temp == NULL) - cloog_die("memory overflow.\n"); - - temp->state = source->state; - temp->number = source->number ; - temp->name = source->name ? strdup(source->name) : NULL; - temp->usr = source->usr ; - temp->next = NULL ; - - if (statement == NULL) - { statement = temp ; - now = statement ; - } - else - { now->next = temp ; - now = now->next ; - } - source = source->next ; - } - return(statement) ; -} - - -/** - * cloog_statement_add function: - * This function adds a CloogStatement structure (statement) at a given place - * (now) of a NULL terminated list of CloogStatement structures. The beginning - * of this list is (start). This function updates (now) to (loop), and - * updates (start) if the added element is the first one -that is when (start) - * is NULL-. - * - March 27th 2004: first version. - */ -void cloog_statement_add(start, now, statement) -CloogStatement ** start, ** now, * statement ; -{ if (*start == NULL) - { *start = statement ; - *now = *start ; - } - else - { (*now)->next = statement ; - *now = (*now)->next ; - } -} - diff --git a/cloog-0.17.0/source/stride.c b/cloog-0.17.0/source/stride.c deleted file mode 100644 index d7358a08f3d6c21b871764de0de5d9d0d93cab51..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/stride.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include - -#define ALLOC(type) (type*)malloc(sizeof(type)) - -CloogStride *cloog_stride_malloc() -{ - CloogStride *s; - - s = ALLOC(CloogStride); - if (!s) - cloog_die("memory overflow.\n"); - - s->references = 1; - cloog_int_init(s->stride); - cloog_int_init(s->offset); - cloog_int_init(s->factor); - s->constraint = cloog_constraint_invalid(); - - return s; -} - -CloogStride *cloog_stride_alloc(cloog_int_t stride, cloog_int_t offset) -{ - CloogStride *s = cloog_stride_malloc(); - - cloog_int_set(s->stride, stride); - cloog_int_set(s->offset, offset); - cloog_int_set_si(s->factor, 0); - - return s; -} - -CloogStride *cloog_stride_alloc_from_constraint(cloog_int_t stride, - CloogConstraint *constraint, cloog_int_t factor) -{ - CloogStride *s = cloog_stride_malloc(); - - cloog_int_set(s->stride, stride); - cloog_int_set(s->factor, factor); - cloog_int_set_si(s->offset, -1); - s->constraint = constraint; - - return s; -} - -CloogStride *cloog_stride_copy(CloogStride *stride) -{ - if (!stride) - return stride; - - stride->references++; - return stride; -} - -void cloog_stride_free(CloogStride *stride) -{ - if (!stride) - return; - - stride->references--; - if (stride->references > 0) - return; - - cloog_int_clear(stride->stride); - cloog_int_clear(stride->offset); - cloog_int_clear(stride->factor); - cloog_constraint_release(stride->constraint); - free(stride); -} diff --git a/cloog-0.17.0/source/union_domain.c b/cloog-0.17.0/source/union_domain.c deleted file mode 100644 index 0d24658b9fdbbb0346361f97517c4fcab9b46261..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/union_domain.c +++ /dev/null @@ -1,366 +0,0 @@ -#include -#include -#include -#include "../include/cloog/cloog.h" - -#ifdef OSL_SUPPORT -#include -#include -#include -#include -#endif - -#define ALLOC(type) (type*)malloc(sizeof(type)) -#define ALLOCN(type,n) (type*)malloc((n)*sizeof(type)) - -void cloog_named_domain_list_free(CloogNamedDomainList *list) -{ - while (list != NULL) { - CloogNamedDomainList *temp = list->next; - cloog_domain_free(list->domain); - cloog_scattering_free(list->scattering); - free(list->name); - free(list); - list = temp; - } -} - -CloogUnionDomain *cloog_union_domain_alloc(int nb_par) -{ - CloogUnionDomain *ud; - - ud = ALLOC(CloogUnionDomain); - if (!ud) - cloog_die("memory overflow.\n"); - - ud->domain = NULL; - ud->next_domain = &ud->domain; - - ud->n_name[CLOOG_PARAM] = nb_par; - ud->n_name[CLOOG_ITER] = 0; - ud->n_name[CLOOG_SCAT] = 0; - - ud->name[CLOOG_PARAM] = NULL; - ud->name[CLOOG_ITER] = NULL; - ud->name[CLOOG_SCAT] = NULL; - - return ud; -} - -void cloog_union_domain_free(CloogUnionDomain *ud) -{ - int i; - int j; - - if (!ud) - return; - - for (i = 0; i < 3; ++i) { - if (!ud->name[i]) - continue; - for (j = 0; j < ud->n_name[i]; ++i) - free(ud->name[i][j]); - free(ud->name[i]); - } - - cloog_named_domain_list_free(ud->domain); - - free(ud); -} - -/** - * Add a domain with scattering function to the union of domains. - * name may be NULL and is duplicated if it is not. - * domain and scattering are taken over by the CloogUnionDomain. - * scattering may be NULL. - */ -CloogUnionDomain *cloog_union_domain_add_domain(CloogUnionDomain *ud, - const char *name, CloogDomain *domain, CloogScattering *scattering, - void *usr) -{ - CloogNamedDomainList *named; - int n; - - if (!ud) - return NULL; - - named = ALLOC(CloogNamedDomainList); - if (!named) - cloog_die("memory overflow.\n"); - - if (ud->name[CLOOG_ITER]) - cloog_die("iterator names must be set after adding domains.\n"); - if (ud->name[CLOOG_SCAT]) - cloog_die("scattering names must be set after adding domains.\n"); - - n = cloog_domain_dimension(domain); - if (n > ud->n_name[CLOOG_ITER]) - ud->n_name[CLOOG_ITER] = n; - - if (scattering) { - n = cloog_scattering_dimension(scattering, domain); - if (n > ud->n_name[CLOOG_SCAT]) - ud->n_name[CLOOG_SCAT] = n; - } - - named->domain = domain; - named->scattering = scattering; - named->name = name ? strdup(name) : NULL; - named->usr = usr; - named->next = NULL; - - *ud->next_domain = named; - ud->next_domain = &named->next; - - return ud; -} - -/** - * Set the name of parameter, iterator or scattering dimension - * at the specified position. The name is duplicated. - */ -CloogUnionDomain *cloog_union_domain_set_name(CloogUnionDomain *ud, - enum cloog_dim_type type, int index, const char *name) -{ - int i; - - if (!ud) - return ud; - - if (type != CLOOG_PARAM && - type != CLOOG_ITER && - type != CLOOG_SCAT) - cloog_die("invalid dim type\n"); - - if (index < 0 || index >= ud->n_name[type]) - cloog_die("index out of range\n"); - - if (!ud->name[type]) { - ud->name[type] = ALLOCN(char *, ud->n_name[type]); - if (!ud->name[type]) - cloog_die("memory overflow.\n"); - for (i = 0; i < ud->n_name[type]; ++i) - ud->name[type][i] = NULL; - } - - free(ud->name[type][index]); - ud->name[type][index] = strdup(name); - if (!ud->name[type][index]) - cloog_die("memory overflow.\n"); - - return ud; -} - -static char *next_line(FILE *input, char *line, unsigned len) -{ - char *p; - - do { - if (!(p = fgets(line, len, input))) - return NULL; - while (isspace(*p) && *p != '\n') - ++p; - } while (*p == '#' || *p == '\n'); - - return p; -} - -/** - * cloog_scattering_list_read - * Read in a list of scattering functions for the nb_statements - * domains in loop. - */ -static CloogScatteringList *cloog_scattering_list_read(FILE * foo, - CloogDomain **domain, int nb_statements, int nb_parameters) -{ - int nb_scat = 0; - char s[MAX_STRING]; - CloogScatteringList *list = NULL, **next = &list; - - /* We read first the number of scattering functions in the list. */ - do { - if (!fgets(s, MAX_STRING, foo)) - break; - } while ((*s=='#' || *s=='\n') || (sscanf(s, " %d", &nb_scat) < 1)); - - if (nb_scat == 0) - return NULL; - - if (nb_scat != nb_statements) - cloog_die("wrong number of scattering functions.\n"); - - while (nb_scat--) { - *next = (CloogScatteringList *)malloc(sizeof(CloogScatteringList)); - (*next)->scatt = cloog_domain_read_scattering(*domain, foo); - (*next)->next = NULL; - - next = &(*next)->next; - domain++; - } - return list; -} - -static CloogUnionDomain *set_names_from_list(CloogUnionDomain *ud, - enum cloog_dim_type type, int n, char **names) -{ - int i; - - if (!names) - return ud; - - for (i = 0; i < n; ++i) { - ud = cloog_union_domain_set_name(ud, type, i, names[i]); - free(names[i]); - } - free(names); - - return ud; -} - -/** - * Fill up a CloogUnionDomain from information in a CLooG input file. - * The language and the context are assumed to have been read from - * the input file already. - */ -CloogUnionDomain *cloog_union_domain_read(FILE *file, int nb_par, - CloogOptions *options) -{ - int op1, op2, op3; - char line[MAX_STRING]; - CloogDomain **domain; - CloogUnionDomain *ud; - CloogScatteringList *scatteringl; - int i; - int n_iter = -1; - int n_dom; - char **names; - - ud = cloog_union_domain_alloc(nb_par); - - names = cloog_names_read_strings(file, nb_par); - ud = set_names_from_list(ud, CLOOG_PARAM, nb_par, names); - - /* We read the number of statements. */ - if (!next_line(file, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, "%d", &n_dom) != 1) - cloog_die("Input error.\n"); - - domain = ALLOCN(CloogDomain *, n_dom); - if (!domain) - cloog_die("memory overflow.\n"); - - for (i = 0; i < n_dom; ++i) { - int dim; - - domain[i] = cloog_domain_union_read(options->state, file, - nb_par); - dim = cloog_domain_dimension(domain[i]); - if (dim > n_iter) - n_iter = dim; - - /* To read that stupid "0 0 0" line. */ - if (!next_line(file, line, sizeof(line))) - cloog_die("Input error.\n"); - if (sscanf(line, " %d %d %d", &op1, &op2, &op3) != 3) - cloog_die("Input error.\n"); - } - - /* Reading of the iterator names. */ - names = cloog_names_read_strings(file, n_iter); - - /* Reading and putting the scattering data in program structure. */ - scatteringl = cloog_scattering_list_read(file, domain, n_dom, nb_par); - - if (scatteringl) { - CloogScatteringList *is, *next; - - if (cloog_scattering_list_lazy_same(scatteringl)) - cloog_msg(options, CLOOG_WARNING, - "some scattering functions are similar.\n"); - - for (i = 0, is = scatteringl; i < n_dom; ++i, is = next) { - next = is->next; - ud = cloog_union_domain_add_domain(ud, NULL, domain[i], - is->scatt, NULL); - free(is); - } - } else { - for (i = 0; i < n_dom; ++i) - ud = cloog_union_domain_add_domain(ud, NULL, domain[i], - NULL, NULL); - } - - ud = set_names_from_list(ud, CLOOG_ITER, n_iter, names); - - if (scatteringl) { - int n_scat = ud->n_name[CLOOG_SCAT]; - names = cloog_names_read_strings(file, n_scat); - ud = set_names_from_list(ud, CLOOG_SCAT, n_scat, names); - } - - free(domain); - - return ud; -} - - -#ifdef OSL_SUPPORT -/** - * Extracts a CloogUnionDomain from an openscop scop (the CloogUnionDomain - * corresponds more or less to the openscop statement). - * \param[in,out] state CLooG state. - * \param[in] scop OpenScop scop to convert. - * \return A new CloogUnionDomain corresponding the input OpenScop scop. - */ -CloogUnionDomain *cloog_union_domain_from_osl_scop(CloogState *state, - osl_scop_p scop) { - int i, nb_parameters; - CloogDomain *domain = NULL; - CloogScattering *scattering = NULL; - CloogUnionDomain *ud = NULL; - osl_scop_p normalized; - osl_statement_p statement; - osl_scatnames_p scatnames; - - /* Set the union of domains. */ - nb_parameters = (scop->context == NULL) ? 0 : scop->context->nb_parameters; - ud = cloog_union_domain_alloc(nb_parameters); - - /* - Set the parameter names. */ - if (osl_generic_has_URI(scop->parameters, OSL_URI_STRINGS)) { - for (i = 0; i < osl_strings_size(scop->parameters->data); i++) { - ud = cloog_union_domain_set_name(ud, CLOOG_PARAM, i, - ((osl_strings_p)(scop->parameters->data))->string[i]); - } - } - - /* - Set each statement (domain/scattering). - * Since CLooG requires all number of scattering dimensions to be - * equal, we normalize them first. - */ - normalized = osl_scop_clone(scop); - osl_scop_normalize_scattering(normalized); - statement = normalized->statement; - while(statement != NULL) { - domain = cloog_domain_from_osl_relation(state, statement->domain); - scattering = cloog_scattering_from_osl_relation(state, - statement->scattering); - ud = cloog_union_domain_add_domain(ud, NULL, domain, scattering, NULL); - statement = statement->next; - } - osl_scop_free(normalized); - - /* - Set the scattering dimension names. */ - scatnames = osl_generic_lookup(scop->extension, OSL_URI_SCATNAMES); - if ((scatnames != NULL) && (scatnames->names != NULL)) { - for (i = 0; (i < osl_strings_size(scatnames->names)) && - (i < ud->n_name[CLOOG_SCAT]); i++) { - ud = cloog_union_domain_set_name(ud, CLOOG_SCAT, i, - scatnames->names->string[i]); - } - } - - return ud; -} -#endif diff --git a/cloog-0.17.0/source/version.c b/cloog-0.17.0/source/version.c deleted file mode 100644 index f1b86e2009c58f545b03834f4beb3538f5d056fe..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/version.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "version.h" -#include "cloog/version.h" - -#define CLOOG_BITS "gmp" - -const char *cloog_version(void) -{ - return "CLooG "CLOOG_HEAD" "CLOOG_BITS" bits"; -} - -int cloog_version_major(void) -{ - return CLOOG_VERSION_MAJOR; -} - -int cloog_version_minor(void) -{ - return CLOOG_VERSION_MINOR; -} - -int cloog_version_revision(void) -{ - return CLOOG_VERSION_REVISION; -} diff --git a/cloog-0.17.0/source/version.c.in b/cloog-0.17.0/source/version.c.in deleted file mode 100644 index f5d026e2d25486867be21d82a762d3d3e921aec7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/source/version.c.in +++ /dev/null @@ -1,24 +0,0 @@ -#include "version.h" -#include "cloog/version.h" - -#define CLOOG_BITS "@BITS@" - -const char *cloog_version(void) -{ - return "CLooG "CLOOG_HEAD" "CLOOG_BITS" bits"; -} - -int cloog_version_major(void) -{ - return CLOOG_VERSION_MAJOR; -} - -int cloog_version_minor(void) -{ - return CLOOG_VERSION_MINOR; -} - -int cloog_version_revision(void) -{ - return CLOOG_VERSION_REVISION; -} diff --git a/cloog-0.17.0/test/0D-1.c b/cloog-0.17.0/test/0D-1.c deleted file mode 100644 index 7f24623dea64aeffb1f33b6df3df9c0b87090cd0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-1.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1() ; diff --git a/cloog-0.17.0/test/0D-1.cloog b/cloog-0.17.0/test/0D-1.cloog deleted file mode 100644 index 226e7cb06a6fdf30c34d3d46a03ead280bbd4058..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-1.cloog +++ /dev/null @@ -1,13 +0,0 @@ -c - -0 2 -0 - -1 - -1 -0 2 -0 0 0 -0 - -0 diff --git a/cloog-0.17.0/test/0D-1.good.c b/cloog-0.17.0/test/0D-1.good.c deleted file mode 100644 index 0a37a569e623f7d2a6562aae26332a544c694a10..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-1.good.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-1.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } - -void test() -{ - S1() ; -} diff --git a/cloog-0.17.0/test/0D-2.c b/cloog-0.17.0/test/0D-2.c deleted file mode 100644 index 4aa9c17b3a541d58c845218aaca875fd0f4f8a53..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-2.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 0) { - S1() ; -} diff --git a/cloog-0.17.0/test/0D-2.cloog b/cloog-0.17.0/test/0D-2.cloog deleted file mode 100644 index 69f2015b0bba6907ceee35d6c8c0800306990fa8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-2.cloog +++ /dev/null @@ -1,14 +0,0 @@ -c - -0 3 -0 - -1 - -1 -1 3 -1 1 0 -0 0 0 -0 - -0 diff --git a/cloog-0.17.0/test/0D-2.good.c b/cloog-0.17.0/test/0D-2.good.c deleted file mode 100644 index 65a12c69a5c148cea0023f7ecb0e574dece15164..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-2.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-2.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } - -void test(int M) -{ - if (M >= 0) { - S1() ; - } -} diff --git a/cloog-0.17.0/test/0D-3.c b/cloog-0.17.0/test/0D-3.c deleted file mode 100644 index 62b42691cf29a3090a0f5904b1b28c38c97ac394..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-3.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1() ; diff --git a/cloog-0.17.0/test/0D-3.cloog b/cloog-0.17.0/test/0D-3.cloog deleted file mode 100644 index ab4d59c0570b5acd27309cf4521b11126be3ef13..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-3.cloog +++ /dev/null @@ -1,15 +0,0 @@ -c - -1 3 -1 1 0 -0 - -1 - -1 -1 3 -1 1 0 -0 0 0 -0 - -0 diff --git a/cloog-0.17.0/test/0D-3.good.c b/cloog-0.17.0/test/0D-3.good.c deleted file mode 100644 index 10150eb1d5993c67ef74838d0583ef55b90eb6e8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/0D-3.good.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/0D-3.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } - -void test(int M) -{ - S1() ; -} diff --git a/cloog-0.17.0/test/1point-1.c b/cloog-0.17.0/test/1point-1.c deleted file mode 100644 index 7c0106b64d076f0c2a99532092735409bb106e2f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/1point-1.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(2*M,M) ; diff --git a/cloog-0.17.0/test/1point-1.cloog b/cloog-0.17.0/test/1point-1.cloog deleted file mode 100644 index 318d89b777630a4c5086f288f3bdf6083ac28343..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/1point-1.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -#{M | } -1 3 -# M 1 -1 0 1 -0 - -1 # Number of statements - -1 -#{i, j | i=2N; i=2j} -3 5 -# i j M 1 -0 1 0 -2 0 -0 1 -2 0 0 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/1point-1.good.c b/cloog-0.17.0/test/1point-1.good.c deleted file mode 100644 index 196f8a9d783fa6940a05f059316bc904d956d73d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/1point-1.good.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - i = 2*M ; - S1(2*M,M) ; -} diff --git a/cloog-0.17.0/test/1point-2.c b/cloog-0.17.0/test/1point-2.c deleted file mode 100644 index 48f6ad4adc4a170415d6d1f668dff1d614657682..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/1point-2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -S1(2*M,N+2) ; diff --git a/cloog-0.17.0/test/1point-2.cloog b/cloog-0.17.0/test/1point-2.cloog deleted file mode 100644 index 66eec58029a6bbe21c496e65a255d34390bd7d86..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/1point-2.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -#{M,N | } -1 4 -# M N 1 -1 0 0 1 -0 - -1 # Number of statements - -1 -# -3 6 -# i j M N 1 -0 1 0 -2 0 0 -0 2 -2 -4 2 4 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/1point-2.good.c b/cloog-0.17.0/test/1point-2.good.c deleted file mode 100644 index 98805040993d2eb8afc98a38ac47965c15bdd816..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/1point-2.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/1point-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - i = 2*M ; - j = N+2 ; - S1(2*M,N+2) ; -} diff --git a/cloog-0.17.0/test/4-param.c b/cloog-0.17.0/test/4-param.c deleted file mode 100644 index b5427967eaff7d054f780090430045366bea85b6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/4-param.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/4-param.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.18s. */ -for (i=m;i<=min(n,p-1);i++) { - S1(i) ; -} -for (i=p;i<=min(q,m-1);i++) { - S2(i) ; -} -for (i=max(m,p);i<=min(n,q);i++) { - S1(i) ; - S2(i) ; -} -for (i=max(max(m,p),q+1);i<=n;i++) { - S1(i) ; -} -for (i=max(max(m,p),n+1);i<=q;i++) { - S2(i) ; -} diff --git a/cloog-0.17.0/test/4-param.cloog b/cloog-0.17.0/test/4-param.cloog deleted file mode 100644 index a19ba086981a6de3de3aaf87e840c239d7db76ca..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/4-param.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# Context -# parameters m n p q -1 6 -# m n p q 1 -1 0 0 0 0 1 -1 -m n p q - -2 # Number of statements - -1 -# S1 i,... -3 7 -# i m n p q 1 -1 1 -1 0 0 0 0 -1 -1 0 1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 -# -3 7 -# i m n p q 1 -1 1 0 0 -1 0 0 -1 -1 0 0 0 1 0 -1 0 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/4-param.good.c b/cloog-0.17.0/test/4-param.good.c deleted file mode 100644 index 563b90b8ef559e8799601668fe6dc3d88a0a0ae7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/4-param.good.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/4-param.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int m, int n, int p, int q) -{ - /* Original iterators. */ - int i; - for (i=m;i<=min(min(n,p-1),q);i++) { - S1(i) ; - } - for (i=p;i<=min(min(q,m-1),n);i++) { - S2(i) ; - } - for (i=max(m,p);i<=min(n,q);i++) { - S1(i) ; - S2(i) ; - } - for (i=max(m,q+1);i<=n;i++) { - S1(i) ; - } - for (i=max(p,n+1);i<=q;i++) { - S2(i) ; - } -} diff --git a/cloog-0.17.0/test/Makefile.am b/cloog-0.17.0/test/Makefile.am deleted file mode 100644 index 65a8e5a334f8610c97424fca64381851a4f6aec8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/Makefile.am +++ /dev/null @@ -1,345 +0,0 @@ -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile ** -# **-------------------------------------------------------------------** -# ** First version: march 6th 2003 ** -# **-------------------------------------------------------------------**/ -# -# makefile for checking. - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * This file has been written with the help of the Bart Kienhuis's checking * -# * makefile for PipLib. * -# * * -# *****************************************************************************/ - -if NO_ISL -GENERATE_TEST = -else -GENERATE_TEST = generate_test -endif -noinst_PROGRAMS = $(GENERATE_TEST) -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -LDADD = ../libcloog-isl.la -generate_test_SOURCES = generate_test.c - -FORCE: -../libcloog-isl.la: FORCE - cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la - -ROOT = .. - -FINITE_CLOOGTEST_C = \ - 0D-1 \ - 0D-2 \ - 0D-3 \ - 1point-1 \ - 1point-2 \ - 4-param \ - basic-bounds-1 \ - basic-bounds-2 \ - basic-bounds-3 \ - basic-bounds-4 \ - basic-bounds-5 \ - basic-bounds-6 \ - block \ - block2 \ - block3 \ - byu98-1-2-3 \ - cholesky \ - cholesky2 \ - christian \ - classen \ - classen2 \ - constant \ - constbound \ - darte \ - dealII \ - donotsimp \ - dot \ - dot2 \ - double \ - durbin_e_s \ - emploi \ - esced \ - ex1 \ - forwardsub-1-1-2 \ - forwardsub-2-1-2-3 \ - forwardsub-3-1-2 \ - gauss \ - gesced \ - gesced2 \ - gesced3 \ - guide \ - iftest \ - iftest2 \ - largeur \ - levenshtein-1-2-3 \ - lex \ - lineality-1-2 \ - lineality-2-1-2 \ - logo \ - logopar \ - lu \ - lu2 \ - lub \ - lux \ - min-1-1 \ - min-2-1 \ - min-3-1 \ - min-4-1 \ - mode \ - multi-mm-1 \ - no_lindep \ - orc \ - rectangle \ - singleton \ - square+triangle-1-1-2-3 \ - swim \ - test \ - thomasset \ - tiling \ - uday_scalars \ - union \ - vivien \ - vivien2 \ - walters \ - walters2 \ - walters3 \ - wavefront \ - yosr \ - yosr2 \ - non_optimal/nul_complex1 \ - non_optimal/usvd_e_t \ - non_optimal/youcef \ - reservoir/cholesky2 \ - reservoir/fusion1 \ - reservoir/fusion2 \ - reservoir/jacobi2 \ - reservoir/jacobi3 \ - reservoir/lim-lam1 \ - reservoir/lim-lam2 \ - reservoir/lim-lam3 \ - reservoir/lim-lam4 \ - reservoir/lim-lam5 \ - reservoir/lim-lam6 \ - reservoir/liu-zhuge1 \ - reservoir/loechner3 \ - reservoir/loechner4 \ - reservoir/loechner5 \ - reservoir/mg-interp2 \ - reservoir/mg-interp \ - reservoir/mg-psinv \ - reservoir/mg-resid \ - reservoir/mg-rprj3 \ - reservoir/pingali1 \ - reservoir/pingali2 \ - reservoir/pingali3 \ - reservoir/pingali4 \ - reservoir/pingali5 \ - reservoir/pingali6 \ - reservoir/QR \ - reservoir/tang-xue1 \ - reservoir/two - -CLOOG_ISL_TEST_C = \ - isl/mod \ - isl/mod2 \ - isl/mod3 \ - isl/mod4 - -CLOOGTEST_C = \ - infinite \ - infinite2 \ - infinite3 \ - infinite4 \ - $(FINITE_CLOOGTEST_C) \ - $(CLOOG_ISL_TEST_C) - -CLOOGTEST_FORTRAN = \ - dartef \ - iftestf \ - levenshtein-1-2-3f \ - yosrf - -CLOOG_ISL_TEST_STRIDED = \ - isl/mxm-shared - -CLOOGTEST_STRIDED = \ - basic-bounds-2 \ - mod4 \ - nul_basic1 \ - nul_basic2 \ - nul_lcpc \ - multi-stride \ - multi-stride2 \ - stride3 \ - stride4 \ - reservoir/bastoul3 \ - reservoir/stride \ - reservoir/stride2 \ - $(CLOOG_ISL_TEST_STRIDED) - -if NO_OSL -CLOOGTEST_OPENSCOP = -else -CLOOGTEST_OPENSCOP = \ - openscop/matmult \ - openscop/empty \ - openscop/union -endif - -SPECIAL_TESTS = \ - isl/unroll \ - isl/jacobi-shared \ - isl/unroll2 \ - backtrack \ - vasilache \ - merge \ - equality \ - equality2 \ - otl \ - param-split \ - pouchet \ - stride \ - stride2 \ - sor1d - -SPECIAL_OPTIONS = \ - 'isl/unroll -first-unroll 1' \ - 'isl/jacobi-shared -f 4 -l -1 -override -strides 1 -sh 1' \ - 'isl/unroll2 -first-unroll 1' \ - 'backtrack -f 1 -backtrack' \ - 'vasilache -f 8 -l 9' \ - 'merge -f -1' \ - 'equality -f -1 -l 2 -override' \ - 'equality2 -f -1 -l 4 -esp 1 -override' \ - 'otl -block 1 -esp 0 -otl 0' \ - 'param-split -f -1' \ - 'pouchet -f 3 -l 7' \ - 'stride -f -1 -strides 1' \ - 'stride2 -f -1 -strides 1' \ - 'sor1d -f -1' - -generate: - @echo " /*-----------------------------------------------*" - @echo " * Generate files *" - @echo " *-----------------------------------------------*/" - @for x in $(CLOOGTEST_C) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Generate $$x.f" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \ - done ; \ - for x in $(CLOOGTEST_STRIDED) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog \ - -strides 1 -o $(srcdir)/$$x.c ; \ - done ; \ - for x in $(CLOOGTEST_OPENSCOP) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.scop \ - -openscop -o $(srcdir)/$$x.c ; \ - done ; \ - for line in $(SPECIAL_OPTIONS); do \ - options=`echo $$line | sed -e 's/^[^ ]* //'`; \ - x=`echo $$line | sed -e 's/ .*//'`; \ - echo "Generate file $$x ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - $$options > $(srcdir)/$$x.c ; \ - done - -generate_good: - @for x in $(FINITE_CLOOGTEST_C) ; do \ - echo "Generate $$x.good.c" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Generate $$x.good.c ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; done - -valgrind: - @echo " /*-----------------------------------------------*" - @echo " * Checking files by Valgrind *" - @echo " *-----------------------------------------------*/" - for x in $(CLOOGTEST_C) ; do \ - echo "Valgrinding $$x.c" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Valgrinding $$x.f" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done - -CHECKER := "$(srcdir)/checker.sh" - -TESTS_ENVIRONMENT = \ - top_builddir=$(top_builddir) \ - srcdir=$(srcdir) \ - EXEXT=$(EXEEXT) \ - CHECKER=$(CHECKER) \ - COMPILE="$(COMPILE)" \ - LINK="$(LINK)" \ - FINITE_CLOOGTEST_C="$(FINITE_CLOOGTEST_C)" \ - CLOOGTEST_C="$(CLOOGTEST_C)" \ - CLOOGTEST_FORTRAN="$(CLOOGTEST_FORTRAN)" \ - CLOOGTEST_STRIDED="$(CLOOGTEST_STRIDED)" \ - CLOOGTEST_OPENSCOP="$(CLOOGTEST_OPENSCOP)" \ - SPECIAL_OPTIONS="$(SPECIAL_OPTIONS)" - -test_run: generate_test$(EXEEXT) - $(TESTS_ENVIRONMENT) \ - $(srcdir)/check_run.sh - -check_SCRIPTS = \ - $(srcdir)/check_c.sh \ - $(srcdir)/check_fortran.sh \ - $(srcdir)/check_strided.sh \ - $(srcdir)/check_openscop.sh \ - $(srcdir)/check_special.sh - -TESTS = $(check_SCRIPTS) - -EXTRA_DIST = \ - $(check_SCRIPTS) \ - $(srcdir)/checker.sh \ - $(srcdir)/check_run.sh \ - $(CLOOGTEST_C:%=%.cloog) \ - $(CLOOGTEST_C:%=%.c) \ - $(FINITE_CLOOGTEST_C:%=%.good.c) \ - $(CLOOGTEST_FORTRAN:%=%.cloog) \ - $(CLOOGTEST_FORTRAN:%=%.f) \ - $(CLOOGTEST_STRIDED:%=%.cloog) \ - $(CLOOGTEST_STRIDED:%=%.c) \ - $(CLOOGTEST_OPENSCOP:%=%.scop) \ - $(CLOOGTEST_OPENSCOP:%=%.c) \ - $(SPECIAL_TESTS:%=%.cloog) \ - $(SPECIAL_TESTS:%=%.c) \ - $(SPECIAL_TESTS:%=%.good.c) diff --git a/cloog-0.17.0/test/Makefile.in b/cloog-0.17.0/test/Makefile.in deleted file mode 100644 index 2a971ce955219d9187f15151214ae3d0ca671821..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/Makefile.in +++ /dev/null @@ -1,945 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** makefile ** -# **-------------------------------------------------------------------** -# ** First version: march 6th 2003 ** -# **-------------------------------------------------------------------**/ -# -# makefile for checking. - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * This file has been written with the help of the Bart Kienhuis's checking * -# * makefile for PipLib. * -# * * -# *****************************************************************************/ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = $(am__EXEEXT_1) -subdir = test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ - $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_compiler_vendor.m4 \ - $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -@NO_ISL_FALSE@am__EXEEXT_1 = generate_test$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_generate_test_OBJECTS = generate_test.$(OBJEXT) -generate_test_OBJECTS = $(am_generate_test_OBJECTS) -generate_test_LDADD = $(LDADD) -generate_test_DEPENDENCIES = ../libcloog-isl.la -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(generate_test_SOURCES) -DIST_SOURCES = $(generate_test_SOURCES) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITS = @BITS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CD = @CD@ -CFLAGS = @CFLAGS@ -CFLAGS_WARN = @CFLAGS_WARN@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GIT_INDEX = @GIT_INDEX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -ISL_CPPFLAGS = @ISL_CPPFLAGS@ -ISL_LDFLAGS = @ISL_LDFLAGS@ -ISL_LIBS = @ISL_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OSL_CPPFLAGS = @OSL_CPPFLAGS@ -OSL_LDFLAGS = @OSL_LDFLAGS@ -OSL_LIBS = @OSL_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PRTDIAG = @PRTDIAG@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TEXI2DVI = @TEXI2DVI@ -VERSION = @VERSION@ -VERSION_MAJOR = @VERSION_MAJOR@ -VERSION_MINOR = @VERSION_MINOR@ -VERSION_REVISION = @VERSION_REVISION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfig_libdir = @pkgconfig_libdir@ -pkgconfig_libfile = @pkgconfig_libfile@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -versioninfo = @versioninfo@ -@NO_ISL_FALSE@GENERATE_TEST = generate_test -@NO_ISL_TRUE@GENERATE_TEST = -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -LDADD = ../libcloog-isl.la -generate_test_SOURCES = generate_test.c -ROOT = .. -FINITE_CLOOGTEST_C = \ - 0D-1 \ - 0D-2 \ - 0D-3 \ - 1point-1 \ - 1point-2 \ - 4-param \ - basic-bounds-1 \ - basic-bounds-2 \ - basic-bounds-3 \ - basic-bounds-4 \ - basic-bounds-5 \ - basic-bounds-6 \ - block \ - block2 \ - block3 \ - byu98-1-2-3 \ - cholesky \ - cholesky2 \ - christian \ - classen \ - classen2 \ - constant \ - constbound \ - darte \ - dealII \ - donotsimp \ - dot \ - dot2 \ - double \ - durbin_e_s \ - emploi \ - esced \ - ex1 \ - forwardsub-1-1-2 \ - forwardsub-2-1-2-3 \ - forwardsub-3-1-2 \ - gauss \ - gesced \ - gesced2 \ - gesced3 \ - guide \ - iftest \ - iftest2 \ - largeur \ - levenshtein-1-2-3 \ - lex \ - lineality-1-2 \ - lineality-2-1-2 \ - logo \ - logopar \ - lu \ - lu2 \ - lub \ - lux \ - min-1-1 \ - min-2-1 \ - min-3-1 \ - min-4-1 \ - mode \ - multi-mm-1 \ - no_lindep \ - orc \ - rectangle \ - singleton \ - square+triangle-1-1-2-3 \ - swim \ - test \ - thomasset \ - tiling \ - uday_scalars \ - union \ - vivien \ - vivien2 \ - walters \ - walters2 \ - walters3 \ - wavefront \ - yosr \ - yosr2 \ - non_optimal/nul_complex1 \ - non_optimal/usvd_e_t \ - non_optimal/youcef \ - reservoir/cholesky2 \ - reservoir/fusion1 \ - reservoir/fusion2 \ - reservoir/jacobi2 \ - reservoir/jacobi3 \ - reservoir/lim-lam1 \ - reservoir/lim-lam2 \ - reservoir/lim-lam3 \ - reservoir/lim-lam4 \ - reservoir/lim-lam5 \ - reservoir/lim-lam6 \ - reservoir/liu-zhuge1 \ - reservoir/loechner3 \ - reservoir/loechner4 \ - reservoir/loechner5 \ - reservoir/mg-interp2 \ - reservoir/mg-interp \ - reservoir/mg-psinv \ - reservoir/mg-resid \ - reservoir/mg-rprj3 \ - reservoir/pingali1 \ - reservoir/pingali2 \ - reservoir/pingali3 \ - reservoir/pingali4 \ - reservoir/pingali5 \ - reservoir/pingali6 \ - reservoir/QR \ - reservoir/tang-xue1 \ - reservoir/two - -CLOOG_ISL_TEST_C = \ - isl/mod \ - isl/mod2 \ - isl/mod3 \ - isl/mod4 - -CLOOGTEST_C = \ - infinite \ - infinite2 \ - infinite3 \ - infinite4 \ - $(FINITE_CLOOGTEST_C) \ - $(CLOOG_ISL_TEST_C) - -CLOOGTEST_FORTRAN = \ - dartef \ - iftestf \ - levenshtein-1-2-3f \ - yosrf - -CLOOG_ISL_TEST_STRIDED = \ - isl/mxm-shared - -CLOOGTEST_STRIDED = \ - basic-bounds-2 \ - mod4 \ - nul_basic1 \ - nul_basic2 \ - nul_lcpc \ - multi-stride \ - multi-stride2 \ - stride3 \ - stride4 \ - reservoir/bastoul3 \ - reservoir/stride \ - reservoir/stride2 \ - $(CLOOG_ISL_TEST_STRIDED) - -@NO_OSL_FALSE@CLOOGTEST_OPENSCOP = \ -@NO_OSL_FALSE@ openscop/matmult \ -@NO_OSL_FALSE@ openscop/empty \ -@NO_OSL_FALSE@ openscop/union - -@NO_OSL_TRUE@CLOOGTEST_OPENSCOP = -SPECIAL_TESTS = \ - isl/unroll \ - isl/jacobi-shared \ - isl/unroll2 \ - backtrack \ - vasilache \ - merge \ - equality \ - equality2 \ - otl \ - param-split \ - pouchet \ - stride \ - stride2 \ - sor1d - -SPECIAL_OPTIONS = \ - 'isl/unroll -first-unroll 1' \ - 'isl/jacobi-shared -f 4 -l -1 -override -strides 1 -sh 1' \ - 'isl/unroll2 -first-unroll 1' \ - 'backtrack -f 1 -backtrack' \ - 'vasilache -f 8 -l 9' \ - 'merge -f -1' \ - 'equality -f -1 -l 2 -override' \ - 'equality2 -f -1 -l 4 -esp 1 -override' \ - 'otl -block 1 -esp 0 -otl 0' \ - 'param-split -f -1' \ - 'pouchet -f 3 -l 7' \ - 'stride -f -1 -strides 1' \ - 'stride2 -f -1 -strides 1' \ - 'sor1d -f -1' - -CHECKER := "$(srcdir)/checker.sh" -TESTS_ENVIRONMENT = \ - top_builddir=$(top_builddir) \ - srcdir=$(srcdir) \ - EXEXT=$(EXEEXT) \ - CHECKER=$(CHECKER) \ - COMPILE="$(COMPILE)" \ - LINK="$(LINK)" \ - FINITE_CLOOGTEST_C="$(FINITE_CLOOGTEST_C)" \ - CLOOGTEST_C="$(CLOOGTEST_C)" \ - CLOOGTEST_FORTRAN="$(CLOOGTEST_FORTRAN)" \ - CLOOGTEST_STRIDED="$(CLOOGTEST_STRIDED)" \ - CLOOGTEST_OPENSCOP="$(CLOOGTEST_OPENSCOP)" \ - SPECIAL_OPTIONS="$(SPECIAL_OPTIONS)" - -check_SCRIPTS = \ - $(srcdir)/check_c.sh \ - $(srcdir)/check_fortran.sh \ - $(srcdir)/check_strided.sh \ - $(srcdir)/check_openscop.sh \ - $(srcdir)/check_special.sh - -TESTS = $(check_SCRIPTS) -EXTRA_DIST = \ - $(check_SCRIPTS) \ - $(srcdir)/checker.sh \ - $(srcdir)/check_run.sh \ - $(CLOOGTEST_C:%=%.cloog) \ - $(CLOOGTEST_C:%=%.c) \ - $(FINITE_CLOOGTEST_C:%=%.good.c) \ - $(CLOOGTEST_FORTRAN:%=%.cloog) \ - $(CLOOGTEST_FORTRAN:%=%.f) \ - $(CLOOGTEST_STRIDED:%=%.cloog) \ - $(CLOOGTEST_STRIDED:%=%.c) \ - $(CLOOGTEST_OPENSCOP:%=%.scop) \ - $(CLOOGTEST_OPENSCOP:%=%.c) \ - $(SPECIAL_TESTS:%=%.cloog) \ - $(SPECIAL_TESTS:%=%.c) \ - $(SPECIAL_TESTS:%=%.good.c) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -generate_test$(EXEEXT): $(generate_test_OBJECTS) $(generate_test_DEPENDENCIES) - @rm -f generate_test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(generate_test_OBJECTS) $(generate_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_test.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am - - -FORCE: -../libcloog-isl.la: FORCE - cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la - -generate: - @echo " /*-----------------------------------------------*" - @echo " * Generate files *" - @echo " *-----------------------------------------------*/" - @for x in $(CLOOGTEST_C) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Generate $$x.f" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \ - done ; \ - for x in $(CLOOGTEST_STRIDED) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.cloog \ - -strides 1 -o $(srcdir)/$$x.c ; \ - done ; \ - for x in $(CLOOGTEST_OPENSCOP) ; do \ - echo "Generate $$x.c" ; \ - $(top_builddir)/cloog $(srcdir)/$$x.scop \ - -openscop -o $(srcdir)/$$x.c ; \ - done ; \ - for line in $(SPECIAL_OPTIONS); do \ - options=`echo $$line | sed -e 's/^[^ ]* //'`; \ - x=`echo $$line | sed -e 's/ .*//'`; \ - echo "Generate file $$x ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ - $$options > $(srcdir)/$$x.c ; \ - done - -generate_good: - @for x in $(FINITE_CLOOGTEST_C) ; do \ - echo "Generate $$x.good.c" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; \ - for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ - echo "Generate $$x.good.c ($$options)" ; \ - $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ - done; done - -valgrind: - @echo " /*-----------------------------------------------*" - @echo " * Checking files by Valgrind *" - @echo " *-----------------------------------------------*/" - for x in $(CLOOGTEST_C) ; do \ - echo "Valgrinding $$x.c" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done ; \ - for x in $(CLOOGTEST_FORTRAN) ; do \ - echo "Valgrinding $$x.f" ; \ - valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ - done - -test_run: generate_test$(EXEEXT) - $(TESTS_ENVIRONMENT) \ - $(srcdir)/check_run.sh - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/cloog-0.17.0/test/backtrack.c b/cloog-0.17.0/test/backtrack.c deleted file mode 100644 index 9895d83e5a507f96fe86a6771332cb7abc359fb4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/backtrack.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/backtrack.cloog by CLooG 0.14.0-367-gf043665 gmp bits in 0.00s. */ -S1(0); diff --git a/cloog-0.17.0/test/backtrack.cloog b/cloog-0.17.0/test/backtrack.cloog deleted file mode 100644 index f8d978eb450f56ea2920f0bd1ac28fae7dd1df77..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/backtrack.cloog +++ /dev/null @@ -1,24 +0,0 @@ -c - -0 2 - -0 - -# Number of statements -1 - -1 # of domains -1 3 -0 1 0 -0 0 0 - -0 - -# of scattering functions -1 - -2 5 -0 1 0 -1 0 -0 0 1 0 0 - -0 diff --git a/cloog-0.17.0/test/backtrack.good.c b/cloog-0.17.0/test/backtrack.good.c deleted file mode 100644 index 5cb04a3958312c26c8b0b4e3e2bc1ea371681231..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/backtrack.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/backtrack.cloog by CLooG 0.14.0-367-gf043665 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - S1(0); -} diff --git a/cloog-0.17.0/test/basic-bounds-1.c b/cloog-0.17.0/test/basic-bounds-1.c deleted file mode 100644 index 1ddede115929aeffb80f3998ac4d06fb4a2cd0b6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-1.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=2;i++) { - S1(i) ; -} diff --git a/cloog-0.17.0/test/basic-bounds-1.cloog b/cloog-0.17.0/test/basic-bounds-1.cloog deleted file mode 100644 index 1c3ac40c8817acb4a98b1ca88ef82c293c5dbd93..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-1.cloog +++ /dev/null @@ -1,21 +0,0 @@ -# language: C -c - -# Context -1 2 -1 1 -0 - -1 # Number of statements - -1 -# -3 3 -# i 1 -1 1 0 -1 -1 2 -1 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/basic-bounds-1.good.c b/cloog-0.17.0/test/basic-bounds-1.good.c deleted file mode 100644 index ab53e94339b6189fa007cbd13416a320a51a7d90..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-1.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Original iterators. */ - int i; - for (i=0;i<=2;i++) { - S1(i) ; - } -} diff --git a/cloog-0.17.0/test/basic-bounds-2.c b/cloog-0.17.0/test/basic-bounds-2.c deleted file mode 100644 index 38780ff83e744fd76717f808971716febbf5eaa3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-2.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(0) ; diff --git a/cloog-0.17.0/test/basic-bounds-2.cloog b/cloog-0.17.0/test/basic-bounds-2.cloog deleted file mode 100644 index 45a51ba86916c6e561e3023b66914e93919fcb58..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-2.cloog +++ /dev/null @@ -1,21 +0,0 @@ -# language: C -c - -# Context -1 2 -1 1 -0 - -1 # Number of statements - -1 -# -3 3 -# i 1 -1 3 0 -1 -3 2 -1 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/basic-bounds-2.good.c b/cloog-0.17.0/test/basic-bounds-2.good.c deleted file mode 100644 index 48544ff60a673669ad459dcb0c7daa67162ae9af..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-2.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Original iterators. */ - int i; - S1(0) ; -} diff --git a/cloog-0.17.0/test/basic-bounds-3.c b/cloog-0.17.0/test/basic-bounds-3.c deleted file mode 100644 index f5fdaf8ecd1211b2ee1b3582773849e94fd08f4a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-3.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=M;i++) { - S1(i) ; -} diff --git a/cloog-0.17.0/test/basic-bounds-3.cloog b/cloog-0.17.0/test/basic-bounds-3.cloog deleted file mode 100644 index f3ad8bc4e6e3ea27478654c56fe9a8182e350a88..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-3.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -2 3 -# M 1 -1 1 0 -1 0 1 -0 - -1 # Number of statements - -1 -# -3 4 -# i M 1 -1 1 0 0 -1 -1 1 0 -1 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/basic-bounds-3.good.c b/cloog-0.17.0/test/basic-bounds-3.good.c deleted file mode 100644 index c5c0f7c22e9f67153bc4b6f7f3a8c04619a45895..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-3.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - for (i=0;i<=M;i++) { - S1(i) ; - } -} diff --git a/cloog-0.17.0/test/basic-bounds-4.c b/cloog-0.17.0/test/basic-bounds-4.c deleted file mode 100644 index 1f15c42e829dc7314eecac2feee872d1c60ac8b5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-4.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=M+1;i++) { - S1(i) ; -} diff --git a/cloog-0.17.0/test/basic-bounds-4.cloog b/cloog-0.17.0/test/basic-bounds-4.cloog deleted file mode 100644 index 5e766872bba289b15143c8f4fd0dea03930647eb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-4.cloog +++ /dev/null @@ -1,23 +0,0 @@ -# language: C -c - -# Context -2 3 -# M 1 -1 1 0 -1 0 1 -0 - -1 # Number of statements - -1 -# -3 4 -# i M 1 -1 1 0 0 -1 -1 1 1 -1 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/basic-bounds-4.good.c b/cloog-0.17.0/test/basic-bounds-4.good.c deleted file mode 100644 index 310c9482fa8775913692396f2e00666355869620..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-4.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - for (i=0;i<=M+1;i++) { - S1(i) ; - } -} diff --git a/cloog-0.17.0/test/basic-bounds-5.c b/cloog-0.17.0/test/basic-bounds-5.c deleted file mode 100644 index 1761b56ae8224558f5c2910318b76f927c7d42b3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-5.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -j = floord(M+1,2) ; -S1(1,j) ; diff --git a/cloog-0.17.0/test/basic-bounds-5.cloog b/cloog-0.17.0/test/basic-bounds-5.cloog deleted file mode 100644 index 855a9bbcb9652f45e9007cfc3e73b8ea4b8e348d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-5.cloog +++ /dev/null @@ -1,22 +0,0 @@ -# language: C -c - -# Context -1 3 -# M 1 -1 0 1 -0 - -1 # Number of statements - -1 -# {i,j,N | i=1; 2j-1<=N<=2j} -3 5 -# i j M 1 -0 1 0 0 -1 -1 0 2 -1 0 -1 0 -2 1 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/basic-bounds-5.good.c b/cloog-0.17.0/test/basic-bounds-5.good.c deleted file mode 100644 index 3e669c01b5b1f36b687ba4846fb076d4a67f41a8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-5.good.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - j = floord(M+1,2) ; - S1(1,j) ; -} diff --git a/cloog-0.17.0/test/basic-bounds-6.c b/cloog-0.17.0/test/basic-bounds-6.c deleted file mode 100644 index 449ad375ec01108043fa6917012e9f70c1827eac..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-6.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(-1) ; diff --git a/cloog-0.17.0/test/basic-bounds-6.cloog b/cloog-0.17.0/test/basic-bounds-6.cloog deleted file mode 100644 index 2acc2ab4da53abf67339182ad552e9966d22deaa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-6.cloog +++ /dev/null @@ -1,20 +0,0 @@ -# language: C -c - -# Context -1 2 -1 1 -0 - -1 # Number of statements - -1 -3 3 -# i 1 -1 2 3 -1 -2 -1 -1 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/basic-bounds-6.good.c b/cloog-0.17.0/test/basic-bounds-6.good.c deleted file mode 100644 index a993e2f30c5936d5a484e2bd36ced3e2b86bd599..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/basic-bounds-6.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/basic-bounds-6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test() -{ - /* Original iterators. */ - int i; - S1(-1) ; -} diff --git a/cloog-0.17.0/test/block.c b/cloog-0.17.0/test/block.c deleted file mode 100644 index 2ba5668726e02fa6d0e85fc55c333cb049f98097..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.00s. */ -S1(); -S3(0); -S2(); -S3(1); diff --git a/cloog-0.17.0/test/block.cloog b/cloog-0.17.0/test/block.cloog deleted file mode 100644 index 9913b74de7f58b7ed443954134be53bea3d8c884..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block.cloog +++ /dev/null @@ -1,42 +0,0 @@ -c - -0 2 - -0 - -3 - -1 -0 2 - -0 0 0 - -1 -0 2 - -0 0 0 - -1 -2 3 -1 1 0 -1 -1 1 - -0 0 0 - -0 - -3 - -2 4 -0 -1 0 0 # c1 = 0 -0 0 -1 0 # c2 = 0 - -2 4 -0 -1 0 1 # c1 = 1 -0 0 -1 0 # c2 = 0 - -2 5 -0 -1 0 1 0 # c1 = i -0 0 -1 0 1 # c2 = 1 - -0 diff --git a/cloog-0.17.0/test/block.good.c b/cloog-0.17.0/test/block.good.c deleted file mode 100644 index b2f280f9cf96fe6086a83e3ded3fa85858fa7294..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3(i) { hash(3); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - S1(); - S3(0); - S2(); - S3(1); -} diff --git a/cloog-0.17.0/test/block2.c b/cloog-0.17.0/test/block2.c deleted file mode 100644 index 7209a1047a03d0403e4953c3b8edde0c8c2a83b1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block2.cloog by CLooG 0.14.0-302-g309b32c gmp bits in 0.01s. */ -for (c0=0;c0<=9;c0++) { - S1(c0,1); - S3(c0,1); - S2(c0,1); -} diff --git a/cloog-0.17.0/test/block2.cloog b/cloog-0.17.0/test/block2.cloog deleted file mode 100644 index 866c6346e38c1c9454f17fe0e9d388ae5173964b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block2.cloog +++ /dev/null @@ -1,77 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -0 2 - -0 # Parameter name(s) - -# Statement number: -3 - -# Iteration domain of statement 5 (ND_1IP_ED_0_0_V_0). -1 - -3 4 -0 0 1 -1 -1 1 0 0 -1 -1 0 9 - -0 0 0 # For future options. - -# Iteration domain of statement 6 (ND_1OP_ED_3_0_V_1). -1 - -3 4 -0 0 1 -1 -1 1 0 0 -1 -1 0 9 - -0 0 0 # For future options. - -# Iteration domain of statement 7 (ND_1). -1 - -3 4 -0 0 1 -1 -1 1 0 0 -1 -1 0 9 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# --------------------- SCATTERING -------------------- -3 # Scattering functions - -# Scattering of statement 5 (ND_1IP_ED_0_0_V_0). -1 - -3 7 -0 0 0 1 0 0 -6 -0 0 1 0 0 -1 0 -0 1 0 0 -1 0 0 - -# Scattering of statement 6 (ND_1OP_ED_3_0_V_1). -1 - -3 7 -0 0 0 1 0 0 -11 -0 0 1 0 0 -1 0 -0 1 0 0 -1 0 0 - -# Scattering of statement 7 (ND_1). -1 - -3 7 -0 0 0 1 0 0 -8 -0 0 1 0 0 -1 0 -0 1 0 0 -1 0 0 - -1 # Scattering dimension name(s) -c0 c1 c2 diff --git a/cloog-0.17.0/test/block2.good.c b/cloog-0.17.0/test/block2.good.c deleted file mode 100644 index 23a49428cb42a369249b6a35e29e23ddbad2c354..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block2.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/block2.cloog by CLooG 0.14.0-302-g309b32c gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c0, c1; - /* Original iterators. */ - int i, j; - for (c0=0;c0<=9;c0++) { - S1(c0,1); - S3(c0,1); - S2(c0,1); - } -} diff --git a/cloog-0.17.0/test/block3.c b/cloog-0.17.0/test/block3.c deleted file mode 100644 index 2c701e906951f79bb40ec850c8af79d588e5b101..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block3.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Generated from ../../../git/cloog/test/block3.cloog by CLooG 0.16.2-4-gba4e834 gmp bits in 0.00s. */ -S1(); -S3(0); -S2(); -S3(1); diff --git a/cloog-0.17.0/test/block3.cloog b/cloog-0.17.0/test/block3.cloog deleted file mode 100644 index fd9997d64b5f221d37c47d6b2e9b687c70ab485b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block3.cloog +++ /dev/null @@ -1,36 +0,0 @@ -C - -0 2 - -0 - -3 - -1 -0 2 -0 0 0 - -1 -0 2 -0 0 0 - -1 -2 3 -1 1 0 -1 -1 1 -0 0 0 - -0 - -3 - -1 3 -0 -1 0 - -1 3 -0 -1 1 - -1 4 -0 -1 1 0 - -0 diff --git a/cloog-0.17.0/test/block3.good.c b/cloog-0.17.0/test/block3.good.c deleted file mode 100644 index b4bdf6de9db8227d86f3666ff379cc8aaa385d7e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/block3.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/block3.cloog by CLooG 0.16.2-4-gba4e834 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3(i) { hash(3); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - S1(); - S3(0); - S2(); - S3(1); -} diff --git a/cloog-0.17.0/test/byu98-1-2-3.c b/cloog-0.17.0/test/byu98-1-2-3.c deleted file mode 100644 index 2a1e151bb3d0b6291b30f94a3b83d845eece60ab..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/byu98-1-2-3.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/byu98-1-2-3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -for (i=2;i<=3;i++) { - for (j=-i+6;j<=6;j++) { - S1(i,j); - } -} -for (i=4;i<=7;i++) { - if (i == 4) { - for (j=3;j<=4;j++) { - S1(i,j); - } - } - if (i >= 6) { - S2(i,-i+9); - } - if (i <= 5) { - S1(i,-i+9); - S2(i,-i+9); - } - for (j=max(-i+10,i-1);j<=6;j++) { - S1(i,j); - } -} -S2(8,1); diff --git a/cloog-0.17.0/test/byu98-1-2-3.cloog b/cloog-0.17.0/test/byu98-1-2-3.cloog deleted file mode 100644 index 76d16ab805edebd1e9d627c4a7a07c98ad64f170..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/byu98-1-2-3.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# Here is the result given by an old CLooG (the same was given up to 0.12.2), -# the difference with the new constant spreading technique of 0.14.0 is -# one of the most beautiful. -# -# /* Generated by CLooG v0.10.7 */ -# for (i=2;i<=3;i++) { -# for (j=-i+6;j<=6;j++) { -# S1 ; -# } -# } -# for (j=4-1;j<=-(4)+8;j++) { -# S1(i = 4) ; -# } -# j = -(4)+9 ; -# S1(i = 4) ; -# S2(i = 4) ; -# for (j=-(4)+10;j<=6;j++) { -# S1(i = 4) ; -# } -# S1(i = 5,j = 4) ; -# S2(i = 5,j = 4) ; -# for (j=5;j<=6;j++) { -# S1(i = 5) ; -# } -# for (i=6;i<=7;i++) { -# j = -i+9 ; -# S2 ; -# for (j=i-1;j<=6;j++) { -# S1 ; -# } -# } -# S2(i = 8,j = 1) ; - -# language: C -c - -# Context -#{ | 1>=0} -1 2 -1 1 -0 - -2 # Number of statements - -1 -# {i,j | (-j+6,2)<=i<=j+1; 3<=j<=6} -5 4 -# i j 1 -1 1 1 -6 -1 1 0 -2 -1 0 1 -3 -1 0 -1 6 -1 -1 1 1 -0 0 0 - -1 -# {i,j | i=-j+9; 1<=j<=5} -3 4 -0 1 1 -9 -1 0 1 -1 -1 0 -1 5 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/byu98-1-2-3.good.c b/cloog-0.17.0/test/byu98-1-2-3.good.c deleted file mode 100644 index d1ad1568c57043764de02a9b0d7a576d5e73cb35..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/byu98-1-2-3.good.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generated from ../../../git/cloog/test/byu98-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Original iterators. */ - int i, j; - for (i=2;i<=3;i++) { - for (j=-i+6;j<=6;j++) { - S1(i,j) ; - } - } - for (j=3;j<=4;j++) { - S1(4,j) ; - } - S1(4,5) ; - S2(4,5) ; - S1(4,6) ; - S1(5,4) ; - S2(5,4) ; - for (j=5;j<=6;j++) { - S1(5,j) ; - } - for (i=6;i<=7;i++) { - j = -i+9 ; - S2(i,-i+9) ; - for (j=i-1;j<=6;j++) { - S1(i,j) ; - } - } - S2(8,1) ; -} diff --git a/cloog-0.17.0/test/check_c.sh b/cloog-0.17.0/test/check_c.sh deleted file mode 100755 index 8601154f83d2d2421c4621e0404ed95bb3548bb6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/check_c.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** check_c.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 17th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -$CHECKER "C" "$CLOOGTEST_C" "" "cloog" "c" "0" diff --git a/cloog-0.17.0/test/check_fortran.sh b/cloog-0.17.0/test/check_fortran.sh deleted file mode 100755 index 7d8db92653227f17e6ea615ea5b3ed398a04f956..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/check_fortran.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** check_fortran.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 17th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -$CHECKER "FORTRAN" "$CLOOGTEST_FORTRAN" "" "cloog" "f" "0" diff --git a/cloog-0.17.0/test/check_openscop.sh b/cloog-0.17.0/test/check_openscop.sh deleted file mode 100755 index 6b78415f7a7307ae468a52e23ee830d9ed260060..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/check_openscop.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** check_openscop.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 17th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -$CHECKER "OPENSCOP" "$CLOOGTEST_OPENSCOP" "-openscop" "scop" "c" "0" diff --git a/cloog-0.17.0/test/check_run.sh b/cloog-0.17.0/test/check_run.sh deleted file mode 100755 index 9ce0b1cf99512d135c809e33e6642ac5d3de8776..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/check_run.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** check_run.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 18th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -# Refactor $SPECIAL_OPTIONS list to remove quotes and to replace spaces in -# individual tests with %, e.g., "'file1 -f -1' 'file2'" becomes -# "file1%-f%-1 file2". -special_refactored=`echo "$SPECIAL_OPTIONS" | \ - sed "s/' '/#/g" | \ - sed 's/ /%/g' | \ - sed "s/#/ /g" | \ - sed "s/'//g"` - -$CHECKER "RUN C" "$FINITE_CLOOGTEST_C" "" "cloog" "c" "1" -failedtest=$?; - -$CHECKER "RUN SPECIAL" "$special_refactored" "" "cloog" "c" "1" -failedtest=`expr $failedtest + $?`; - -$CHECKER "RUN SPECIAL -sh 1" "$special_refactored" "-sh 1" "cloog" "c" "1" -failedtest=`expr $failedtest + $?`; -return $failedtest; diff --git a/cloog-0.17.0/test/check_special.sh b/cloog-0.17.0/test/check_special.sh deleted file mode 100755 index ece90d5b74feefccf47495dae74a34557ffb403c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/check_special.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** check_special.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 17th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -# Refactor $SPECIAL_OPTIONS list to remove quotes and to replace spaces in -# individual tests with %, e.g., "'file1 -f -1' 'file2'" becomes -# "file1%-f%-1 file2". -special_refactored=`echo "$SPECIAL_OPTIONS" | \ - sed "s/' '/#/g" | \ - sed 's/ /%/g' | \ - sed "s/#/ /g" | \ - sed "s/'//g"` - -$CHECKER "SPECIAL" "$special_refactored" "" "cloog" "c" "0" diff --git a/cloog-0.17.0/test/check_strided.sh b/cloog-0.17.0/test/check_strided.sh deleted file mode 100755 index 393237319c71900ee73c2f5448b9e04f7facfab4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/check_strided.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** check_strided.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 17th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -$CHECKER "STRIDED" "$CLOOGTEST_STRIDED" "-strides 1" "cloog" "c" "0" diff --git a/cloog-0.17.0/test/checker.sh b/cloog-0.17.0/test/checker.sh deleted file mode 100755 index 4064819cce5bee7164725172b087623fc40e7949..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/checker.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/sh -# -# /**-------------------------------------------------------------------** -# ** CLooG ** -# **-------------------------------------------------------------------** -# ** checker.sh ** -# **-------------------------------------------------------------------** -# ** First version: November 16th 2011 ** -# **-------------------------------------------------------------------**/ -# - -#/***************************************************************************** -# * CLooG : the Chunky Loop Generator (experimental) * -# ***************************************************************************** -# * * -# * Copyright (C) 2003 Cedric Bastoul * -# * * -# * This library 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 2.1 of the License, or (at your option) any later version. * -# * * -# * This library 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 * -# * Lesser General Public License for more details. * -# * * -# * You should have received a copy of the GNU Lesser General Public * -# * License along with this library; if not, write to the Free Software * -# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * -# * Boston, MA 02110-1301 USA * -# * * -# * CLooG, the Chunky Loop Generator * -# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * -# * * -# *****************************************************************************/ - -# This is the main test script of CLooG. It checks that CLooG generates -# a convenient output for an input set of tests, according to some -# parameters (see below). Two checking policies are possible: simply -# compare the generated codes or compare the executions of the generated -# codes. The reference output files must be present: if we are checking a -# file foo.cloog, either foo.c or foo.f must exist in the case of a simple -# code generation checking, and either foo.good.c or foo.good.f must exist -# in the case of a run check. - -TEST_NAME="$1" ## Name of the group of files to test - -TEST_FILES="$2" ## List of test file prefixes and individual options - ## spaces between the elements of one test are - ## represented with '%', e.g., "file -f -1" is - ## "file%-f%-1". - -TEST_GLOBAL_OPTIONS="$3" ## Options for all the tests in the group - -TEST_INPUT_EXTENSION="$4" ## Extension of the input file - -TEST_OUTPUT_EXTENSION="$5" ## Extension of the generated file - -TEST_RUN="$6" ## "1" if the checking policy is to generate, - ## compile and run, generate only otherwise - -failedtest=0; -cloog=$top_builddir/cloog$EXEEXT -echo " /*-----------------------------------------------*" -echo " * Testing CLooG: $TEST_NAME test set " -echo " *-----------------------------------------------*/" -for x in $TEST_FILES; do - name=`echo $x | sed 's/%/ /g' | cut -d\ -f1`; - individual_options=`echo $x | sed 's/%/ /g' | cut -s -d\ -f2-`; - input="$srcdir/$name.$TEST_INPUT_EXTENSION"; - output="$srcdir/$name.$TEST_OUTPUT_EXTENSION"; - options="$individual_options $TEST_GLOBAL_OPTIONS"; - - echo "Check file $input \c"; - if [ "$options" = " " ]; then - echo "(no option), \c" - else - echo "(options $options), \c"; - fi; - - if [ "$TEST_RUN" = "1" ]; then - generate_test=$srcdir/generate_test$EXEEXT - test_run=$srcdir/test_run$EXEEXT - good="$srcdir/$name.good.$TEST_OUTPUT_EXTENSION"; - - echo "generating... \c"; - $cloog $options -q -callable 1 $input > test_test.c; - $generate_test < $input > test_main.c; - - echo "compiling... \c"; -# TODO: (nd Cedric) The following line is to deal with the (F*CKING !!!) -# space in PACKAGE_STRING, introduced by AC_INIT and which, for -# some reason, seems to be the source of a problem with my shell. -# Maybe there is a better way to solve the problem... - COMPILE=`echo $COMPILE | sed 's/\\\ /_SPACE_/g'`; - $COMPILE -c test_test.c; - $COMPILE -Dtest=good -c $good -o test_good.o; - $LINK test_main.c test_test.o test_good.o > /dev/null; - - echo "comparing... \c"; - $test_run; - result=$?; - rm -f $test_run; - else - echo "generating... \c"; - $cloog $options -q $input > cloog_temp; - diff -u -w --ignore-matching-lines='CLooG' cloog_temp $output; - result=$?; - rm -f cloog_temp; - fi; - - if [ "$result" -ne "0" ]; then - echo -e "\033[31mFAIL: $output is not the same\033[0m"; - failedtest=`expr $failedtest + 1`; - else - echo "PASS"; - fi; -done; - -if [ $failedtest != 0 ]; then - echo "\033[31m[CLooG] FAIL: $failedtest tests failed in $TEST_NAME\033[0m"; -else - echo "[CLooG] PASS: $TEST_NAME passed :-) !"; -fi -exit $failedtest diff --git a/cloog-0.17.0/test/cholesky.c b/cloog-0.17.0/test/cholesky.c deleted file mode 100644 index a0d08fcaf6690c50db239daf96cbccefecaf2c11..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/cholesky.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ -if (n >= 1) { - if (n >= 2) { - S1(1) ; - S3(1) ; - for (c3=2;c3<=n;c3++) { - S4(1,c3) ; - S6(1,c3) ; - } - } - if (n == 1) { - S1(1) ; - S3(1) ; - } - for (c1=2;c1<=n-1;c1++) { - S1(c1) ; - for (c3=1;c3<=c1-1;c3++) { - S2(c1,c3) ; - } - S3(c1) ; - for (c3=c1+1;c3<=n;c3++) { - S4(c1,c3) ; - for (c5=1;c5<=c1-1;c5++) { - S5(c1,c3,c5) ; - } - S6(c1,c3) ; - } - } - if (n >= 2) { - S1(n) ; - for (c3=1;c3<=n-1;c3++) { - S2(n,c3) ; - } - S3(n) ; - } -} diff --git a/cloog-0.17.0/test/cholesky.cloog b/cloog-0.17.0/test/cholesky.cloog deleted file mode 100644 index a3eadeade989e7047b52229cd0e329512ab86034..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/cholesky.cloog +++ /dev/null @@ -1,129 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -1 -n - -6 # Number of statements - -1 -# S1 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S2 {i, j | 1<=i<=n; 1<=j<=i-1} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 1 -1 0 -1 -0 0 0 - -1 -# S3 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S4 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# S5 {i, j, k | 1<=i<=n; i+1<=j<=n 1<=k<=i-1} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 1 0 -1 0 -1 -0 0 0 - -1 -# S6 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - -6 # Scattering functions -# Et les instructions de chunking (prog init)... -6 10 -# c1 c2 c3 c4 c5 c6 i n 1 -0 1 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 0 -1 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 - -6 11 -# c1 c2 c3 c4 c5 c6 i j n 1 -0 1 0 0 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 0 -2 -0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 1 0 0 0 0 0 -1 -0 0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 0 - -6 10 -# c1 c2 c3 c4 c5 c6 i n 1 -0 1 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 0 -3 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 - -6 11 -# c1 c2 c3 c4 c5 c6 i j n 1 -0 1 0 0 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 0 -4 -0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 1 0 0 0 0 0 -1 -0 0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 0 - -6 12 -# c1 c2 c3 c4 c5 c6 i j k n 1 -0 1 0 0 0 0 0 -1 0 0 0 0 -0 0 1 0 0 0 0 0 0 0 0 -4 -0 0 0 1 0 0 0 0 -1 0 0 0 -0 0 0 0 1 0 0 0 0 0 0 -2 -0 0 0 0 0 1 0 0 0 -1 0 0 -0 0 0 0 0 0 1 0 0 0 0 -1 - -6 11 -# c1 c2 c3 c4 c5 c6 i j n 1 -0 1 0 0 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 0 -4 -0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 1 0 0 0 0 0 -3 -0 0 0 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 1 0 0 0 0 -0 - - diff --git a/cloog-0.17.0/test/cholesky.good.c b/cloog-0.17.0/test/cholesky.good.c deleted file mode 100644 index 7619b7e996cf0f50ea386f92f931507331c20646..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/cholesky.good.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c3, c5; - /* Original iterators. */ - int i, j, k; - if (n >= 2) { - S1(1) ; - S3(1) ; - for (c3=2;c3<=n;c3++) { - S4(1,c3) ; - S6(1,c3) ; - } - } - if (n == 1) { - S1(1) ; - S3(1) ; - } - for (c1=2;c1<=n-1;c1++) { - S1(c1) ; - for (c3=1;c3<=c1-1;c3++) { - S2(c1,c3) ; - } - S3(c1) ; - for (c3=c1+1;c3<=n;c3++) { - S4(c1,c3) ; - for (c5=1;c5<=c1-1;c5++) { - S5(c1,c3,c5) ; - } - S6(c1,c3) ; - } - } - if (n >= 2) { - S1(n) ; - for (c3=1;c3<=n-1;c3++) { - S2(n,c3) ; - } - S3(n) ; - } -} diff --git a/cloog-0.17.0/test/cholesky2.c b/cloog-0.17.0/test/cholesky2.c deleted file mode 100644 index 3141bdc8393491793abe1ca03e6c07a59089061b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/cholesky2.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky2.cloog by CLooG 0.16.1-2-g33ac553 gmp bits in 0.02s. */ -if (M >= 1) { - for (c2=1;c2<=M-1;c2++) { - S1(c2); - for (c3=c2+1;c3<=M;c3++) { - S4(c2,c3); - } - } - S1(M); - S3(1); - if (M >= 3) { - S6(1,2); - for (c2=3;c2<=M;c2++) { - S6(1,c2); - for (i=2;i<=c2-1;i++) { - S5(i,c2,1); - } - } - } - if (M == 2) { - S6(1,2); - } - for (c1=3;c1<=3*M-7;c1++) { - if ((c1+2)%3 == 0) { - S3((c1+2)/3); - } - if (c1%3 == 0) { - S2((c1+3)/3,c1/3); - } - if ((c1+1)%3 == 0) { - S6((c1+1)/3,(c1+4)/3); - } - if (c1%3 == 0) { - S2((c1+6)/3,c1/3); - } - for (c2=ceild(c1+7,3);c2<=M;c2++) { - if ((c1+1)%3 == 0) { - S6((c1+1)/3,c2); - } - if (c1%3 == 0) { - S2(c2,c1/3); - } - if ((c1+1)%3 == 0) { - for (i=ceild(c1+4,3);i<=c2-1;i++) { - S5(i,c2,(c1+1)/3); - } - } - } - } - if (M >= 3) { - for (c2=M-1;c2<=M;c2++) { - S2(c2,M-2); - } - } - if (M >= 3) { - S3(M-1); - } - if (M >= 3) { - S6(M-1,M); - } - if (M >= 2) { - S2(M,M-1); - } - if (M >= 2) { - S3(M); - } -} diff --git a/cloog-0.17.0/test/cholesky2.cloog b/cloog-0.17.0/test/cholesky2.cloog deleted file mode 100644 index 6c0a81a0d3965f40f66ade42e1fd94551af6dd0c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/cholesky2.cloog +++ /dev/null @@ -1,108 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -6 # Number of statements - -1 -# S1 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S2 {i, j | 1<=i<=n; 1<=j<=i-1} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 1 -1 0 -1 -0 0 0 - -1 -# S3 {i | 1<=i<=n} -2 4 -# i n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S4 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# S5 {i, j, k | 1<=i<=n; i+1<=j<=n 1<=k<=i-1} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 1 0 -1 0 -1 -0 0 0 - -1 -# S6 {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - -6 # Scattering functions -# Et les instructions de chunking (parallele)... -3 7 -# c1 c2 c3 i n 1 -0 1 0 0 0 0 0 -0 0 1 0 -1 0 0 -0 0 0 1 0 0 0 - -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 0 -3 0 0 -0 0 1 0 -1 0 0 0 -0 0 0 1 0 0 0 0 - -3 7 -# c1 c2 c3 i n 1 -0 1 0 0 -3 0 2 -0 0 1 0 0 0 0 -0 0 0 1 0 0 0 - -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 0 0 0 0 -0 0 1 0 -1 0 0 0 -0 0 0 1 0 -1 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 0 0 -3 0 1 -0 0 1 0 0 -1 0 0 0 -0 0 0 1 0 0 -1 0 0 - -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 -3 0 0 1 -0 0 1 0 0 -1 0 0 -0 0 0 1 0 0 0 0 -0 diff --git a/cloog-0.17.0/test/cholesky2.good.c b/cloog-0.17.0/test/cholesky2.good.c deleted file mode 100644 index ee4b344bb1fa918c663dcf71aba920ac42c6d07f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/cholesky2.good.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Generated from ../../../git/cloog/test/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.11s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2, c3; - /* Original iterators. */ - int i, j, k; - if (M >= 2) { - for (c2=1;c2<=M-1;c2++) { - S1(c2) ; - for (c3=c2+1;c3<=M;c3++) { - S4(c2,c3) ; - } - } - S1(M) ; - } - if (M == 1) { - S1(1) ; - } - if (M >= 2) { - S3(1) ; - } - if (M >= 3) { - S6(1,2) ; - for (c2=3;c2<=M;c2++) { - S6(1,c2) ; - for (i=2;i<=c2-1;i++) { - S5(i,c2,1) ; - } - } - } - if (M == 2) { - S6(1,2) ; - } - for (c1=3;c1<=3*M-7;c1++) { - if ((c1+2)%3 == 0) { - i = (c1+2)/3 ; - S3((c1+2)/3) ; - } - if (c1%3 == 0) { - c2 = (c1+3)/3 ; - i = (c1+3)/3 ; - S2((c1+3)/3,c1/3) ; - } - c2 = floord(c1+6,3) ; - if ((c1+1)%3 == 0) { - i = (c1+1)/3 ; - S6((c1+1)/3,c2) ; - } - if (c1%3 == 0) { - S2(c2,c1/3) ; - } - for (c2=ceild(c1+7,3);c2<=M;c2++) { - if ((c1+1)%3 == 0) { - i = (c1+1)/3 ; - S6((c1+1)/3,c2) ; - } - if (c1%3 == 0) { - S2(c2,c1/3) ; - } - if ((c1+1)%3 == 0) { - c3 = (c1+1)/3 ; - for (i=ceild(c1+4,3);i<=c2-1;i++) { - k = (c1+1)/3 ; - S5(i,c2,(c1+1)/3) ; - } - } - } - } - for (c1=max(3*M-6,3);c1<=3*M-4;c1++) { - if ((c1+2)%3 == 0) { - i = (c1+2)/3 ; - S3((c1+2)/3) ; - } - if (c1%3 == 0) { - c2 = (c1+3)/3 ; - i = (c1+3)/3 ; - S2((c1+3)/3,c1/3) ; - } - for (c2=ceild(c1+4,3);c2<=M;c2++) { - if ((c1+1)%3 == 0) { - i = (c1+1)/3 ; - S6((c1+1)/3,c2) ; - } - if (c1%3 == 0) { - S2(c2,c1/3) ; - } - } - } - if (M >= 2) { - c1 = 3*M-3 ; - j = M-1 ; - S2(M,M-1) ; - } - if (M >= 1) { - c1 = 3*M-2 ; - S3(M) ; - } -} diff --git a/cloog-0.17.0/test/christian.c b/cloog-0.17.0/test/christian.c deleted file mode 100644 index cc3c5d3974ae021b351a31c17c1ec0446188d6cf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/christian.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/christian.cloog by CLooG 0.16.2-5-g3b3bf96 gmp bits in 0.01s. */ -if (N >= 1) { - S1(0,N-1); - for (p=-N+2;p<=N-1;p++) { - if (p >= 1) { - S2(p-1,0); - } - for (i=max(0,p);i<=min(N-1,p+N-2);i++) { - S1(i,-p+i); - S2(i,-p+i+1); - } - if (p <= 0) { - S1(p+N-1,N-1); - } - } - S2(N-1,0); -} diff --git a/cloog-0.17.0/test/christian.cloog b/cloog-0.17.0/test/christian.cloog deleted file mode 100644 index 088977e07de4734b425d2ab24477c83f0e018aa4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/christian.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# =============================================== Global -# Language -C - -# Context -0 3 - -# Parameter names are provided -1 -# Parameter names -N - -# Number of statements -2 - -# =============================================== Statement 1 -# ---------------------------------------------- 1.1 Domain -# Iteration domain -1 -4 5 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 -0 0 0 - -# =============================================== Statement 2 -# ---------------------------------------------- 2.1 Domain -# Iteration domain -1 -4 5 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 -0 0 0 - -#naming for domains -0 - -# ---------------------------------------------- Scatterings -# of Scattering functions -2 - -# Scattering function -1 6 - 0 1 -1 1 0 0 ## p = i-j - -# Scattering function -1 6 - 0 1 -1 1 0 -1 ## p = i-j+1 - - -# we will set the scattering dimension names -1 -p - diff --git a/cloog-0.17.0/test/christian.good.c b/cloog-0.17.0/test/christian.good.c deleted file mode 100644 index 28f578c42a82efee2806ceebbea80aa95612c8f2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/christian.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/christian.cloog by CLooG 0.16.2-5-g3b3bf96 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int N) -{ - /* Scattering iterators. */ - int p; - /* Original iterators. */ - int i, j; - if (N >= 1) { - S1(0,N-1); - for (p=-N+2;p<=N-1;p++) { - if (p >= 1) { - S2(p-1,0); - } - for (i=max(0,p);i<=min(N-1,p+N-2);i++) { - S1(i,-p+i); - S2(i,-p+i+1); - } - if (p <= 0) { - S1(p+N-1,N-1); - } - } - S2(N-1,0); - } -} diff --git a/cloog-0.17.0/test/classen.c b/cloog-0.17.0/test/classen.c deleted file mode 100644 index 3b5b05e800bfc2da6c7db5f3b290673d9b3f5be3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/classen.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/classen.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.45s. */ -if (m >= 1) { - if (m >= 2) { - S1(0,1,1,1); - S2(0,1,1,1,1,1,2,1); - S3(0,1,1,2,1,1,1,2); - S4(0,1,2,2,1,1,2,2); - S8(0,1); - } - if (m == 1) { - S1(0,1,1,1); - S8(0,1); - } - for (glT1=1;glT1<=2*m-4;glT1++) { - if (glT1 <= m-2) { - S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1); - S1(glT1,1,glT1+1,1); - S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1); - S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2); - S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2); - } - if (glT1 >= m) { - S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2); - S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2); - S1(glT1,glT1-m+2,m,glT1-m+2); - S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3); - } - if (glT1 == m-1) { - S5(m-2,1,m-1,1,m-1,1,m,1); - S1(m-1,1,m,1); - S3(m-1,1,m,2,m,1,m,2); - } - for (rp1=max(2,glT1-m+3);rp1<=min(glT1,m-1);rp1++) { - S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1); - S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1); - S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1); - S1(glT1,rp1,glT1-rp1+2,rp1); - S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1); - S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1); - S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1); - } - if (glT1 <= m-2) { - S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1); - S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1); - S1(glT1,glT1+1,1,glT1+1); - S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1); - S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2); - S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2); - } - if (glT1 >= m) { - S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m); - S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m); - S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m); - S1(glT1,m,glT1-m+2,m); - S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m); - } - if (glT1 == m-1) { - S6(m-2,m-1,m-1,m,1,m-1,1,m); - S7(m-2,m-1,m,m,1,m-1,2,m); - S1(m-1,m,1,m); - S2(m-1,m,m,m,1,m,2,m); - } - for (coordP1=max(1,glT1-m+2);coordP1<=min(m,glT1+1);coordP1++) { - S8(glT1,coordP1); - } - } - if (m >= 2) { - if (m >= 3) { - S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1); - S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1); - S1(2*m-3,m-1,m,m-1); - S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m); - } - if (m == 2) { - S5(0,1,1,1,1,1,2,1); - S1(1,1,2,1); - S3(1,1,2,2,2,1,2,2); - } - if (m >= 3) { - S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m); - S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m); - S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m); - S1(2*m-3,m,m-1,m); - } - if (m == 2) { - S6(0,1,1,2,1,1,1,2); - S7(0,1,2,2,1,1,2,2); - S1(1,2,1,2); - } - S2(2*m-3,m,2*m-2,m,m-1,m,m,m); - for (coordP1=m-1;coordP1<=m;coordP1++) { - S8(2*m-3,coordP1); - } - } - if (m >= 2) { - S5(2*m-3,m,2*m-2,m,m-1,m,m,m); - S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m); - S1(2*m-2,m,m,m); - S8(2*m-2,m); - } -} diff --git a/cloog-0.17.0/test/classen.cloog b/cloog-0.17.0/test/classen.cloog deleted file mode 100644 index 06fe3b09d4c509abe6abb2b9a2b059c316c5c354..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/classen.cloog +++ /dev/null @@ -1,233 +0,0 @@ -# created: Fri Mar 4 11:37:56 CET 2005 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context -1 3 - 1 1 0 - - -1 # set parameter names -m - -# --------------------- STATEMENTS -------------------- -8 - -# 1 computation stmts: -1 # one domain per statement -7 7 - 1 0 0 0 0 1 -1 - 1 0 0 -1 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 0 0 -1 1 0 - 1 0 0 0 1 0 -1 - 0 0 -1 0 1 0 0 - 0 -1 0 1 1 0 -2 -0 0 0 # for future options... - - -# 3 prepare-send stmts: -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 0 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 0 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -2 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -4 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -2 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -# 3 prepare-receive stmts: -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 0 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 0 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -3 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -2 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -1 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -1 # one domain per statement -13 11 - 1 0 0 0 0 0 0 0 0 1 -1 - 1 -1 0 0 0 0 0 0 0 2 -4 - 1 1 0 0 0 0 0 0 0 0 0 - 1 1 -1 0 0 0 0 0 0 0 1 - 1 0 -1 0 0 0 0 0 0 1 -1 - 1 -1 1 0 0 0 0 0 0 1 -3 - 1 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 -1 0 0 0 1 0 0 - 0 0 0 -1 0 0 0 1 1 0 -2 - 0 0 -1 0 0 0 1 0 0 0 0 - 0 -1 0 0 0 1 1 0 0 0 -2 - 0 -1 0 1 0 0 0 0 0 0 -2 - 0 0 -1 0 1 0 0 0 0 0 -1 -0 0 0 # for future options... - - -# communication statement: -1 # number of domains for communication statement -6 5 - 1 -1 0 2 -2 - 1 1 0 0 0 - 1 1 -1 0 1 - 1 0 -1 1 0 - 1 -1 1 1 -2 - 1 0 1 0 -1 - - -0 0 0 # for future options... - - -1 # set the iterator names -coordT1 coordP1 other1 other2 other3 other4 other5 other6 - -# --------------------- SCATTERING -------------------- -8 # Scattering functions -7 14 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 18 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - -7 12 - 0 1 0 0 0 0 0 0 -1 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - - -1 # we set the scattering dimension names -glT1 bl rp1 stmtType local1 local2 local3 - diff --git a/cloog-0.17.0/test/classen.good.c b/cloog-0.17.0/test/classen.good.c deleted file mode 100644 index 5c97c50c594a5a6736caf9599f4e0ffd802ec141..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/classen.good.c +++ /dev/null @@ -1,396 +0,0 @@ -/* Generated from ../../../git/cloog/test/classen.cloog by CLooG 0.14.0-76-gfd78716 gmp bits in 1.73s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(coordT1,coordP1,other1,other2) { hash(1); hash(coordT1); hash(coordP1); hash(other1); hash(other2); } -#define S2(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(2); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S3(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(3); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S4(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(4); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S5(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(5); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S6(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(6); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S7(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(7); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } -#define S8(coordT1,coordP1) { hash(8); hash(coordT1); hash(coordP1); } - -void test(int m) -{ - /* Scattering iterators. */ - int glT1, rp1, local1, local2; - /* Original iterators. */ - int coordT1, coordP1, other1, other2, other3, other4, other5, other6; - if (m >= 2) { - S1(0,1,1,1) ; - S2(0,1,1,1,1,1,2,1) ; - S3(0,1,1,2,1,1,1,2) ; - S4(0,1,2,2,1,1,2,2) ; - S8(0,1) ; - } - if (m == 1) { - S1(0,1,1,1) ; - S8(0,1) ; - } - if (m >= 3) { - S5(0,1,1,1,1,1,2,1) ; - S1(1,1,2,1) ; - S2(1,1,2,1,2,1,3,1) ; - S3(1,1,2,2,2,1,2,2) ; - S4(1,1,3,2,2,1,3,2) ; - S6(0,1,1,2,1,1,1,2) ; - S7(0,1,2,2,1,1,2,2) ; - S1(1,2,1,2) ; - S2(1,2,2,2,1,2,2,2) ; - S3(1,2,2,3,1,2,1,3) ; - S4(1,2,3,3,1,2,2,3) ; - for (coordP1=1;coordP1<=2;coordP1++) { - S8(1,coordP1) ; - } - } - for (glT1=2;glT1<=m-2;glT1++) { - coordT1 = glT1-1 ; - other5 = glT1+1 ; - S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1) ; - other1 = glT1+1 ; - S1(glT1,1,glT1+1,1) ; - local1 = glT1+1 ; - other1 = glT1+1 ; - other3 = glT1+1 ; - other5 = glT1+2 ; - S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1) ; - other3 = glT1+1 ; - other5 = glT1+1 ; - S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2) ; - other1 = glT1+2 ; - other3 = glT1+1 ; - other5 = glT1+2 ; - S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2) ; - for (rp1=2;rp1<=glT1;rp1++) { - local1 = glT1-rp1+1 ; - coordT1 = glT1-1 ; - other3 = glT1-rp1+1 ; - other5 = glT1-rp1+2 ; - S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - local2 = rp1-1 ; - coordT1 = glT1-1 ; - coordP1 = rp1-1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+2 ; - S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+3 ; - S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ; - other1 = glT1-rp1+2 ; - S1(glT1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+2 ; - other6 = rp1+1 ; - S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ; - other1 = glT1+2 ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - other6 = rp1+1 ; - S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ; - } - rp1 = glT1+1 ; - coordT1 = glT1-1 ; - other2 = glT1+1 ; - other6 = glT1+1 ; - S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1) ; - other1 = glT1+1 ; - other2 = glT1+1 ; - other6 = glT1+1 ; - S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1) ; - coordP1 = glT1+1 ; - other2 = glT1+1 ; - S1(glT1,glT1+1,1,glT1+1) ; - local2 = glT1+1 ; - coordP1 = glT1+1 ; - other1 = glT1+1 ; - other2 = glT1+1 ; - other4 = glT1+1 ; - other6 = glT1+1 ; - S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1) ; - other2 = glT1+2 ; - other4 = glT1+1 ; - other6 = glT1+2 ; - S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2) ; - other1 = glT1+2 ; - other2 = glT1+2 ; - other4 = glT1+1 ; - other6 = glT1+2 ; - S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2) ; - for (coordP1=1;coordP1<=glT1+1;coordP1++) { - S8(glT1,coordP1) ; - } - } - if (m >= 3) { - glT1 = m-1 ; - local1 = m-1 ; - coordT1 = m-2 ; - other1 = m-1 ; - other3 = m-1 ; - S5(m-2,1,m-1,1,m-1,1,m,1) ; - coordT1 = m-1 ; - S1(m-1,1,m,1) ; - coordT1 = m-1 ; - S3(m-1,1,m,2,m,1,m,2) ; - for (rp1=2;rp1<=m-1;rp1++) { - local1 = -rp1+m ; - coordT1 = m-2 ; - other1 = m-1 ; - other3 = -rp1+m ; - other5 = -rp1+m+1 ; - S5(m-2,rp1,m-1,rp1,-rp1+m,rp1,-rp1+m+1,rp1) ; - local1 = -rp1+m+1 ; - local2 = rp1-1 ; - coordT1 = m-2 ; - coordP1 = rp1-1 ; - other1 = m-1 ; - other3 = -rp1+m+1 ; - other4 = rp1-1 ; - other5 = -rp1+m+1 ; - S6(m-2,rp1-1,m-1,rp1,-rp1+m+1,rp1-1,-rp1+m+1,rp1) ; - other3 = -rp1+m+1 ; - other4 = rp1-1 ; - other5 = -rp1+m+2 ; - S7(m-2,rp1-1,m,rp1,-rp1+m+1,rp1-1,-rp1+m+2,rp1) ; - coordT1 = m-1 ; - other1 = -rp1+m+1 ; - S1(m-1,rp1,-rp1+m+1,rp1) ; - local1 = -rp1+m+1 ; - coordT1 = m-1 ; - other3 = -rp1+m+1 ; - other5 = -rp1+m+2 ; - S2(m-1,rp1,m,rp1,-rp1+m+1,rp1,-rp1+m+2,rp1) ; - other2 = rp1+1 ; - other3 = -rp1+m+1 ; - other5 = -rp1+m+1 ; - other6 = rp1+1 ; - S3(m-1,rp1,m,rp1+1,-rp1+m+1,rp1,-rp1+m+1,rp1+1) ; - other1 = m+1 ; - other2 = rp1+1 ; - other3 = -rp1+m+1 ; - other5 = -rp1+m+2 ; - other6 = rp1+1 ; - S4(m-1,rp1,m+1,rp1+1,-rp1+m+1,rp1,-rp1+m+2,rp1+1) ; - } - local2 = m-1 ; - coordT1 = m-2 ; - coordP1 = m-1 ; - other1 = m-1 ; - other4 = m-1 ; - S6(m-2,m-1,m-1,m,1,m-1,1,m) ; - other4 = m-1 ; - S7(m-2,m-1,m,m,1,m-1,2,m) ; - coordT1 = m-1 ; - S1(m-1,m,1,m) ; - coordT1 = m-1 ; - S2(m-1,m,m,m,1,m,2,m) ; - coordT1 = m-1 ; - for (coordP1=1;coordP1<=m;coordP1++) { - S8(m-1,coordP1) ; - } - } - for (glT1=m;glT1<=2*m-4;glT1++) { - rp1 = glT1-m+2 ; - local1 = m-1 ; - local2 = glT1-m+2 ; - coordT1 = glT1-1 ; - coordP1 = glT1-m+2 ; - other2 = glT1-m+2 ; - other3 = m-1 ; - other4 = glT1-m+2 ; - other6 = glT1-m+2 ; - S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2) ; - local2 = glT1-m+1 ; - coordT1 = glT1-1 ; - coordP1 = glT1-m+1 ; - other2 = glT1-m+2 ; - other4 = glT1-m+1 ; - other6 = glT1-m+2 ; - S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2) ; - coordP1 = glT1-m+2 ; - other2 = glT1-m+2 ; - S1(glT1,glT1-m+2,m,glT1-m+2) ; - local2 = glT1-m+2 ; - coordP1 = glT1-m+2 ; - other1 = glT1+1 ; - other2 = glT1-m+3 ; - other4 = glT1-m+2 ; - other6 = glT1-m+3 ; - S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3) ; - for (rp1=glT1-m+3;rp1<=m-1;rp1++) { - local1 = glT1-rp1+1 ; - coordT1 = glT1-1 ; - other3 = glT1-rp1+1 ; - other5 = glT1-rp1+2 ; - S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - local2 = rp1-1 ; - coordT1 = glT1-1 ; - coordP1 = rp1-1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+2 ; - S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other4 = rp1-1 ; - other5 = glT1-rp1+3 ; - S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ; - other1 = glT1-rp1+2 ; - S1(glT1,rp1,glT1-rp1+2,rp1) ; - local1 = glT1-rp1+2 ; - other1 = glT1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+2 ; - other6 = rp1+1 ; - S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ; - other1 = glT1+2 ; - other2 = rp1+1 ; - other3 = glT1-rp1+2 ; - other5 = glT1-rp1+3 ; - other6 = rp1+1 ; - S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ; - } - local1 = glT1-m+1 ; - coordT1 = glT1-1 ; - other3 = glT1-m+1 ; - other5 = glT1-m+2 ; - S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m) ; - local1 = glT1-m+2 ; - local2 = m-1 ; - coordT1 = glT1-1 ; - coordP1 = m-1 ; - other3 = glT1-m+2 ; - other4 = m-1 ; - other5 = glT1-m+2 ; - S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m) ; - other1 = glT1+1 ; - other3 = glT1-m+2 ; - other4 = m-1 ; - other5 = glT1-m+3 ; - S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m) ; - other1 = glT1-m+2 ; - S1(glT1,m,glT1-m+2,m) ; - local1 = glT1-m+2 ; - other1 = glT1+1 ; - other3 = glT1-m+2 ; - other5 = glT1-m+3 ; - S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m) ; - for (coordP1=glT1-m+2;coordP1<=m;coordP1++) { - S8(glT1,coordP1) ; - } - } - if (m >= 3) { - glT1 = 2*m-3 ; - rp1 = m-1 ; - local1 = m-1 ; - local2 = m-1 ; - coordT1 = 2*m-4 ; - coordP1 = m-1 ; - other1 = 2*m-3 ; - other2 = m-1 ; - other3 = m-1 ; - other4 = m-1 ; - other6 = m-1 ; - S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1) ; - local2 = m-2 ; - coordT1 = 2*m-4 ; - coordP1 = m-2 ; - other1 = 2*m-3 ; - other2 = m-1 ; - other4 = m-2 ; - other6 = m-1 ; - S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1) ; - coordT1 = 2*m-3 ; - coordP1 = m-1 ; - other2 = m-1 ; - S1(2*m-3,m-1,m,m-1) ; - local2 = m-1 ; - coordT1 = 2*m-3 ; - coordP1 = m-1 ; - other1 = 2*m-2 ; - other4 = m-1 ; - S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ; - local1 = m-2 ; - coordT1 = 2*m-4 ; - other1 = 2*m-3 ; - other3 = m-2 ; - other5 = m-1 ; - S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m) ; - local1 = m-1 ; - local2 = m-1 ; - coordT1 = 2*m-4 ; - coordP1 = m-1 ; - other1 = 2*m-3 ; - other3 = m-1 ; - other4 = m-1 ; - other5 = m-1 ; - S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m) ; - other1 = 2*m-2 ; - other3 = m-1 ; - other4 = m-1 ; - S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m) ; - coordT1 = 2*m-3 ; - other1 = m-1 ; - S1(2*m-3,m,m-1,m) ; - local1 = m-1 ; - coordT1 = 2*m-3 ; - other1 = 2*m-2 ; - other3 = m-1 ; - S2(2*m-3,m,2*m-2,m,m-1,m,m,m) ; - coordT1 = 2*m-3 ; - for (coordP1=m-1;coordP1<=m;coordP1++) { - S8(2*m-3,coordP1) ; - } - } - if (m == 2) { - S5(0,1,1,1,1,1,2,1) ; - S1(1,1,2,1) ; - S3(1,1,2,2,2,1,2,2) ; - S6(0,1,1,2,1,1,1,2) ; - S7(0,1,2,2,1,1,2,2) ; - S1(1,2,1,2) ; - S2(1,2,2,2,1,2,2,2) ; - for (coordP1=1;coordP1<=2;coordP1++) { - S8(1,coordP1) ; - } - } - if (m >= 2) { - glT1 = 2*m-2 ; - local1 = m-1 ; - coordT1 = 2*m-3 ; - other1 = 2*m-2 ; - other3 = m-1 ; - S5(2*m-3,m,2*m-2,m,m-1,m,m,m) ; - local2 = m-1 ; - coordT1 = 2*m-3 ; - coordP1 = m-1 ; - other1 = 2*m-2 ; - other4 = m-1 ; - S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ; - coordT1 = 2*m-2 ; - S1(2*m-2,m,m,m) ; - coordT1 = 2*m-2 ; - S8(2*m-2,m) ; - } -} diff --git a/cloog-0.17.0/test/classen2.c b/cloog-0.17.0/test/classen2.c deleted file mode 100644 index 2afd378e6b0c10ddd1e468453f80b84fb627bef5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/classen2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/classen2.cloog by CLooG 0.14.0-271-gaa1e292 gmp bits in 0.14s. */ -if ((M >= 2) && (N >= 3) && (outerProcTileScatter1 >= outerProcTileScatter2) && (5*outerProcTileScatter1 <= M+2*N-4) && (5*outerProcTileScatter1 <= 5*outerProcTileScatter2+N+2) && (outerProcTileScatter2 >= 0) && (5*outerProcTileScatter2 <= M+N-2) && (outerTimeTileScatter >= outerProcTileScatter1) && (outerTimeTileScatter <= 2*outerProcTileScatter1) && (outerTimeTileScatter <= outerProcTileScatter1+outerProcTileScatter2+1) && (5*outerTimeTileScatter <= 2*M+2*N-6) && (5*outerTimeTileScatter <= 5*outerProcTileScatter1+M+2) && (5*outerTimeTileScatter >= 10*outerProcTileScatter1-2*N-2) && (5*outerTimeTileScatter <= 5*outerProcTileScatter2+M+N) && (5*outerTimeTileScatter >= 10*outerProcTileScatter2-N-3) && (5*outerTimeTileScatter <= 10*outerProcTileScatter2+N+3) && (5*outerTimeTileScatter >= 5*outerProcTileScatter1+5*outerProcTileScatter2-N-4)) { - for (compScatter1=max(max(max(max(max(4,5*outerTimeTileScatter),5*outerProcTileScatter2+1),5*outerProcTileScatter1+5*outerProcTileScatter2-N),10*outerProcTileScatter1-2*N+2),10*outerProcTileScatter2-N+1);compScatter1<=min(min(min(min(min(5*outerTimeTileScatter+4,2*M+2*N-6),5*outerProcTileScatter1+M+2),5*outerProcTileScatter1+5*outerProcTileScatter2+5),5*outerProcTileScatter2+M+N),10*outerProcTileScatter2+N+3);compScatter1++) { - for (compScatter2=max(max(max(max(ceild(compScatter1+4,2),5*outerProcTileScatter1),5*outerProcTileScatter2+1),compScatter1-M+2),compScatter1-5*outerProcTileScatter2-1);compScatter2<=min(min(min(min(floord(compScatter1+2*N-2,2),compScatter1),5*outerProcTileScatter1+4),compScatter1-5*outerProcTileScatter2+N),5*outerProcTileScatter2+N+2);compScatter2++) { - for (compScatter3=max(max(5*outerProcTileScatter2,compScatter1-compScatter2+3),compScatter2-N+2);compScatter3<=min(min(compScatter2-1,5*outerProcTileScatter2+4),compScatter1-compScatter2+N);compScatter3++) { - S1(compScatter1-compScatter2+1,-compScatter1+compScatter2+compScatter3-2,compScatter2-compScatter3,compScatter1,compScatter2,compScatter3); - } - } - } -} diff --git a/cloog-0.17.0/test/classen2.cloog b/cloog-0.17.0/test/classen2.cloog deleted file mode 100644 index dc12884b48a18c64ea5327421cf993bd40723c10..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/classen2.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# created: Wed Mar 17 17:37:13 CET 2010 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no parameter, so always true) -1 7 - 1 0 0 0 0 0 0 - - -1 # set parameter names -outerTimeTileScatter outerProcTileScatter1 outerProcTileScatter2 M N - -# --------------------- STATEMENTS -------------------- -1 - -1 # domains per statement -20 13 - 1 2 1 1 -1 0 0 0 0 0 0 0 0 - 1 1 1 1 0 -1 0 0 0 0 0 0 1 - 1 1 1 0 0 0 -1 0 0 0 0 0 1 - 1 -2 -1 -1 1 0 0 0 0 0 0 0 0 - 1 -1 -1 -1 0 1 0 0 0 0 0 0 -1 - 1 -1 -1 0 0 0 1 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 0 0 0 0 0 0 0 1 -2 - 1 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 0 0 0 0 0 0 1 -2 - 1 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 0 0 0 0 1 0 -1 - 1 0 0 0 1 0 0 -5 0 0 0 0 0 - 1 0 0 0 0 1 0 0 -5 0 0 0 0 - 1 0 0 0 0 0 1 0 0 -5 0 0 0 - 1 0 0 0 0 0 -1 0 0 5 0 0 4 - 1 0 0 0 0 -1 0 0 5 0 0 0 4 - 1 0 0 0 -1 0 0 5 0 0 0 0 4 - 1 0 0 0 0 0 0 0 0 0 0 1 -3 - 1 0 0 0 0 0 0 0 0 0 1 0 -2 - - -0 0 0 # for future options... - - - -1 # set the iterator names -compIter1 compIter2 compIter3 compIter4 compIter5 compIter6 - -# --------------------- SCATTERING -------------------- -1 # Scattering functions -3 16 - 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - - -1 # we set the scattering dimension names -compScatter1 compScatter2 compScatter3 - diff --git a/cloog-0.17.0/test/classen2.good.c b/cloog-0.17.0/test/classen2.good.c deleted file mode 100644 index 6aa11e4c06b09ceb3248c86b77cb1567ed6cdea9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/classen2.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/classen2.cloog by CLooG 0.14.0-271-gaa1e292 gmp bits in 0.13s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(compIter1,compIter2,compIter3,compIter4,compIter5,compIter6) { hash(1); hash(compIter1); hash(compIter2); hash(compIter3); hash(compIter4); hash(compIter5); hash(compIter6); } - -void test(int outerTimeTileScatter, int outerProcTileScatter1, int outerProcTileScatter2, int M, int N) -{ - /* Scattering iterators. */ - int compScatter1, compScatter2, compScatter3; - /* Original iterators. */ - int compIter1, compIter2, compIter3, compIter4, compIter5, compIter6; - if ((M >= 2) && (N >= 3) && (outerProcTileScatter1 >= outerProcTileScatter2) && (5*outerProcTileScatter1 <= M+2*N-4) && (5*outerProcTileScatter1 <= 5*outerProcTileScatter2+N+2) && (outerProcTileScatter2 >= 0) && (5*outerProcTileScatter2 <= M+N-2) && (outerTimeTileScatter >= outerProcTileScatter1) && (outerTimeTileScatter <= 2*outerProcTileScatter1) && (outerTimeTileScatter <= outerProcTileScatter1+outerProcTileScatter2+1) && (5*outerTimeTileScatter <= 2*M+2*N-6) && (5*outerTimeTileScatter <= 5*outerProcTileScatter1+M+2) && (5*outerTimeTileScatter >= 10*outerProcTileScatter1-2*N-2) && (5*outerTimeTileScatter <= 5*outerProcTileScatter2+M+N) && (5*outerTimeTileScatter >= 10*outerProcTileScatter2-N-3) && (5*outerTimeTileScatter <= 10*outerProcTileScatter2+N+3) && (5*outerTimeTileScatter >= 5*outerProcTileScatter1+5*outerProcTileScatter2-N-4)) { - for (compScatter1=max(max(max(max(max(4,5*outerTimeTileScatter),5*outerProcTileScatter2+1),5*outerProcTileScatter1+5*outerProcTileScatter2-N),10*outerProcTileScatter1-2*N+2),10*outerProcTileScatter2-N+1);compScatter1<=min(min(min(min(min(5*outerTimeTileScatter+4,2*M+2*N-6),5*outerProcTileScatter1+M+2),5*outerProcTileScatter1+5*outerProcTileScatter2+5),5*outerProcTileScatter2+M+N),10*outerProcTileScatter2+N+3);compScatter1++) { - for (compScatter2=max(max(max(max(ceild(compScatter1+4,2),5*outerProcTileScatter1),5*outerProcTileScatter2+1),compScatter1-M+2),compScatter1-5*outerProcTileScatter2-1);compScatter2<=min(min(min(min(floord(compScatter1+2*N-2,2),compScatter1),5*outerProcTileScatter1+4),compScatter1-5*outerProcTileScatter2+N),5*outerProcTileScatter2+N+2);compScatter2++) { - for (compScatter3=max(max(5*outerProcTileScatter2,compScatter1-compScatter2+3),compScatter2-N+2);compScatter3<=min(min(compScatter2-1,5*outerProcTileScatter2+4),compScatter1-compScatter2+N);compScatter3++) { - S1(compScatter1-compScatter2+1,-compScatter1+compScatter2+compScatter3-2,compScatter2-compScatter3,compScatter1,compScatter2,compScatter3); - } - } - } - } -} diff --git a/cloog-0.17.0/test/constant.c b/cloog-0.17.0/test/constant.c deleted file mode 100644 index 3a6378ec263e8a8e12e0d247c51694d371bfc7de..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/constant.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/constant.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.01s. */ -for (c2=0;c2<=min(1023,M+1024);c2++) { - S1(c2); - S3(c2); -} -for (c2=max(0,M+1025);c2<=1023;c2++) { - S2(c2); - S3(c2); -} -for (c1=0;c1<=min(1023,M+1024);c1++) { - S4(c1); - S6(c1); -} -for (c1=max(0,M+1025);c1<=1023;c1++) { - S5(c1); - S6(c1); -} diff --git a/cloog-0.17.0/test/constant.cloog b/cloog-0.17.0/test/constant.cloog deleted file mode 100644 index d251b1b73332535c5b2a3790e1b2d22c8d25aebb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/constant.cloog +++ /dev/null @@ -1,128 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -0 3 - -0 # Parameter name(s) - -# Statement number: -6 - -# Iteration domain of statement 1 (Stmt_if.then). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 -1 1 1024 - -0 0 0 # For future options. - -# Iteration domain of statement 2 (Stmt_if.else). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 1 -1 -1025 - -0 0 0 # For future options. - -# Iteration domain of statement 3 (Stmt_if.end). -1 - -2 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 - -0 0 0 # For future options. - -# Iteration domain of statement 1 (Stmt_if.then). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 -1 1 1024 - -0 0 0 # For future options. - -# Iteration domain of statement 2 (Stmt_if.else). -1 - -3 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 -1 1 -1 -1025 - -0 0 0 # For future options. - -# Iteration domain of statement 3 (Stmt_if.end). -1 - -2 4 1 0 0 1 -1 1 0 0 -1 -1 0 1023 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# --------------------- SCATTERING -------------------- -6 # Scattering functions - -# Scattering of statement 1 (Stmt_if.then). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 0 -0 0 1 0 -1 0 0 -0 1 0 0 0 0 1 - -# Scattering of statement 2 (Stmt_if.else). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -1 -0 0 1 0 -1 0 0 -0 1 0 0 0 0 1 - -# Scattering of statement 3 (Stmt_if.end). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -2 -0 0 1 0 -1 0 0 -0 1 0 0 0 0 1 - -# Scattering of statement 1 (Stmt_if.then). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 0 -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 - -# Scattering of statement 2 (Stmt_if.else). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -1 -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 - -# Scattering of statement 3 (Stmt_if.end). -1 - -3 7 3 1 0 1 -0 0 0 1 0 0 -2 -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 - -0 # Scattering dimension name(s) diff --git a/cloog-0.17.0/test/constant.good.c b/cloog-0.17.0/test/constant.good.c deleted file mode 100644 index c94fc44de141b2efa618796f8cac4b9c79def5f8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/constant.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/constant.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } -#define S3(i) { hash(3); hash(i); } -#define S4(i) { hash(4); hash(i); } -#define S5(i) { hash(5); hash(i); } -#define S6(i) { hash(6); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i; - for (c2=0;c2<=min(1023,M+1024);c2++) { - S1(c2); - S3(c2); - } - for (c2=max(0,M+1025);c2<=1023;c2++) { - S2(c2); - S3(c2); - } - for (c1=0;c1<=min(1023,M+1024);c1++) { - S4(c1); - S6(c1); - } - for (c1=max(0,M+1025);c1<=1023;c1++) { - S5(c1); - S6(c1); - } -} diff --git a/cloog-0.17.0/test/constbound.c b/cloog-0.17.0/test/constbound.c deleted file mode 100644 index c68b1c9350781e27700799b42dcc928b3c648912..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/constbound.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/constbound.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.01s. */ -for (t0=0;t0<=199;t0++) { - for (t2=50*t0;t2<=50*t0+24;t2++) { - for (t3=0;t3<=t2;t3++) { - S1(t0,t2,t3); - } - } - for (t2=50*t0+25;t2<=50*t0+49;t2++) { - for (t3=0;t3<=t2;t3++) { - S2(t0,t2,t3); - } - } -} diff --git a/cloog-0.17.0/test/constbound.cloog b/cloog-0.17.0/test/constbound.cloog deleted file mode 100644 index 78ac9635d0ad7218de68b3aba5ab23051181426c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/constbound.cloog +++ /dev/null @@ -1,53 +0,0 @@ -# CLooG script generated automatically by PLUTO -# language: C -c - -# Context -0 2 - -1 - - -# Number of statements -2 - -1 # of domains -6 5 -1 0 1 0 0 -1 0 -1 0 9999 -1 0 0 1 0 -1 0 1 -1 0 -1 -50 1 0 0 -1 50 -1 0 24 -0 0 0 - -1 -6 5 -1 0 1 0 0 -1 0 -1 0 9999 -1 0 0 1 0 -1 0 1 -1 0 -1 -50 1 0 -25 -1 50 -1 0 49 -0 0 0 - -0 - -# of scattering functions -2 - -4 9 -0 1 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 0 -0 0 0 1 0 0 -1 0 0 -0 0 0 0 1 0 0 -1 0 - -4 9 -0 1 0 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 -1 -0 0 0 1 0 0 -1 0 0 -0 0 0 0 1 0 0 -1 0 - -# we will set the scattering dimension names -4 -t0 t1 t2 t3 diff --git a/cloog-0.17.0/test/constbound.good.c b/cloog-0.17.0/test/constbound.good.c deleted file mode 100644 index 30704dd3052002abaad6802c03c10a0ce5e23f30..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/constbound.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/constbound.cloog by CLooG 0.14.0-170-g72daac3 64 bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test() -{ - /* Scattering iterators. */ - int t0, t2, t3; - /* Original iterators. */ - int i, j, k; - for (t0=0;t0<=199;t0++) { - for (t2=max(0,50*t0);t2<=50*t0+24;t2++) { - for (t3=0;t3<=t2;t3++) { - S1(t0,t2,t3); - } - } - for (t2=50*t0+25;t2<=min(9999,50*t0+49);t2++) { - for (t3=0;t3<=t2;t3++) { - S2(t0,t2,t3); - } - } - } -} diff --git a/cloog-0.17.0/test/darte.c b/cloog-0.17.0/test/darte.c deleted file mode 100644 index e185b7af6545855c42827fdec8231a08fe1ce85e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/darte.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/darte.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.05s. */ -if (n >= 1) { - for (t3=n+3;t3<=3*n+1;t3++) { - if ((t3+n+1)%2 == 0) { - S1(1,n,(t3-n-1)/2); - } - } - for (t1=-n+2;t1<=n-1;t1++) { - if (t1 >= 2) { - for (t3=t1+4;t3<=t1+2*n+2;t3++) { - if ((t1+t3)%2 == 0) { - S1(t1+1,1,(-t1+t3-2)/2); - } - } - } - for (t2=max(-t1+2,t1+2);t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - if ((t1+t3)%2 == 0) { - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); - } - } - } - } - for (t2=max(-t1+5,t1+3);t2<=min(-t1+2*n,t1+2*n);t2++) { - for (t3=1;t3<=min(n,t2+1);t3++) { - if ((t1+t2+1)%2 == 0) { - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); - } - if ((t1+t2)%2 == 0) { - if ((t1+t3)%2 == 0) { - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); - } - } - } - for (t3=max(n+1,t2+2);t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - if ((t1+t3)%2 == 0) { - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); - } - } - } - } - if (t1 <= -1) { - for (t3=1;t3<=n;t3++) { - S2(t1+n-1,n,t3); - } - } - for (t2=-t1+2*n+1;t2<=min(-t1+2*n+3,t1+2*n+1);t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); - } - } - } - } - for (t3=1;t3<=n;t3++) { - S2(n,1,t3); - } -} diff --git a/cloog-0.17.0/test/darte.cloog b/cloog-0.17.0/test/darte.cloog deleted file mode 100644 index a853691d7e6678122b1d8964eb1a00ee2679227e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/darte.cloog +++ /dev/null @@ -1,52 +0,0 @@ -# language: C -c - -# parameters n m -1 3 -# n 1 -1 0 0 -1 -n - -2 # Number of statements - -1 -# S1 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# S2 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 -# Scattering functions -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 0 -0 0 1 0 -1 -1 0 0 0 -0 0 0 1 -1 -1 -2 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 -1 -0 0 1 0 -1 -1 0 0 -2 -0 0 0 1 0 0 -1 0 0 -1 -t1 t2 t3 diff --git a/cloog-0.17.0/test/darte.good.c b/cloog-0.17.0/test/darte.good.c deleted file mode 100644 index 298c24fe5e55b54f8184cc4bea40a79bb43d4e40..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/darte.good.c +++ /dev/null @@ -1,449 +0,0 @@ -/* Generated from ../../../git/cloog/test/darte.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int n) -{ - /* Scattering iterators. */ - int t1, t2, t3; - /* Original iterators. */ - int i, j, k; - if (n >= 1) { - t1 = -n+1 ; - t2 = n+1 ; - for (t3=n+3;t3<=3*n+1;t3++) { - if ((t3+n+1)%2 == 0) { - k = (t3-n-1)/2 ; - S1(1,n,(t3-n-1)/2) ; - } - } - } - if ((n >= 2) && (n <= 2)) { - t1 = -n+2 ; - for (t2=-n+4;t2<=3*n-2;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t2+n)%2 == 0) { - i = (t2-n+2)/2 ; - j = (t2+n-2)/2 ; - if ((t3+n)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = n+3 ; - for (t3=1;t3<=n;t3++) { - S2(1,n,t3) ; - } - } - if (n >= 3) { - t1 = -n+2 ; - for (t2=n;t2<=n+2;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t2+n)%2 == 0) { - i = (t2-n+2)/2 ; - j = (t2+n-2)/2 ; - if ((t3+n)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = n+3 ; - for (t3=1;t3<=n;t3++) { - S2(1,n,t3) ; - } - } - for (t1=ceild(-2*n+5,2);t1<=min(-n+6,-1);t1++) { - for (t2=-t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = t1+2*n+1 ; - for (t3=1;t3<=n;t3++) { - i = t1+n-1 ; - S2(t1+n-1,n,t3) ; - } - } - if (n == 2) { - for (t3=5;t3<=7;t3++) { - if ((t3+1)%2 == 0) { - k = (t3-3)/2 ; - S1(2,1,(t3-3)/2) ; - } - } - for (t2=4;t2<=6;t2++) { - for (t3=1;t3<=2;t3++) { - if (t2%2 == 0) { - i = (t2-2)/2 ; - j = (t2-2)/2 ; - S2((t2-2)/2,(t2-2)/2,t3) ; - } - } - } - } - for (t1=-n+7;t1<=-1;t1++) { - for (t2=-t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=n-2;t2++) { - for (t3=1;t3<=t2+1;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - for (t3=n+1;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=n-1;t2<=t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - t2 = t1+2*n+1 ; - for (t3=1;t3<=n;t3++) { - i = t1+n-1 ; - S2(t1+n-1,n,t3) ; - } - } - if (n >= 3) { - for (t1=0;t1<=min(1,-n+6);t1++) { - for (t2=t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - } - for (t1=max(-n+7,0);t1<=1;t1++) { - for (t2=t1+2;t2<=-t1+4;t2++) { - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+5;t2<=n-2;t2++) { - for (t3=1;t3<=t2+1;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - for (t3=n+1;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=n-1;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - for (t1=2;t1<=n-5;t1++) { - t2 = t1+2 ; - for (t3=t1+4;t3<=t1+2*n+2;t3++) { - i = t1+1 ; - if ((t1+t3)%2 == 0) { - k = (-t1+t3-2)/2 ; - S1(t1+1,1,(-t1+t3-2)/2) ; - } - } - for (t2=t1+3;t2<=n-2;t2++) { - for (t3=1;t3<=t2+1;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - for (t3=n+1;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=n-1;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - for (t1=max(2,n-4);t1<=floord(2*n-3,2);t1++) { - t2 = t1+2 ; - for (t3=t1+4;t3<=t1+2*n+2;t3++) { - i = t1+1 ; - if ((t1+t3)%2 == 0) { - k = (-t1+t3-2)/2 ; - S1(t1+1,1,(-t1+t3-2)/2) ; - } - } - for (t2=t1+3;t2<=-t1+2*n;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - for (t3=t2+2;t3<=t2+2*n;t3++) { - if ((t1+t2)%2 == 0) { - i = (t1+t2)/2 ; - j = (-t1+t2)/2 ; - if ((t1+t3)%2 == 0) { - k = (-t2+t3)/2 ; - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; - } - } - } - } - for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t1+t2+1)%2 == 0) { - i = (t1+t2-3)/2 ; - j = (-t1+t2-1)/2 ; - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; - } - } - } - } - if (n >= 3) { - t1 = n-1 ; - t2 = n+1 ; - for (t3=n+3;t3<=3*n+1;t3++) { - if ((t3+n+1)%2 == 0) { - k = (t3-n-1)/2 ; - S1(n,1,(t3-n-1)/2) ; - } - } - for (t2=n+2;t2<=n+4;t2++) { - for (t3=1;t3<=n;t3++) { - if ((t2+n)%2 == 0) { - i = (t2+n-4)/2 ; - j = (t2-n)/2 ; - S2((t2+n-4)/2,(t2-n)/2,t3) ; - } - } - } - } - if (n >= 1) { - t2 = n+3 ; - for (t3=1;t3<=n;t3++) { - S2(n,1,t3) ; - } - } -} diff --git a/cloog-0.17.0/test/dartef.cloog b/cloog-0.17.0/test/dartef.cloog deleted file mode 100644 index 14454e28101b9803d457804debde9bd777efb6c2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dartef.cloog +++ /dev/null @@ -1,52 +0,0 @@ -# language: FORTRAN -f - -# parameters n m -1 3 -# n 1 -1 0 0 -1 -n - -2 # Number of statements - -1 -# S1 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# S2 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 -# Scattering functions -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 0 -0 0 1 0 -1 -1 0 0 0 -0 0 0 1 -1 -1 -2 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 -1 1 0 0 -1 -0 0 1 0 -1 -1 0 0 -2 -0 0 0 1 0 0 -1 0 0 -1 -t1 t2 t3 diff --git a/cloog-0.17.0/test/dartef.f b/cloog-0.17.0/test/dartef.f deleted file mode 100644 index 50e107377485c3fe936d8bb0d1e79ecc2b6dccd5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dartef.f +++ /dev/null @@ -1,65 +0,0 @@ -! Generated from /home/skimo/git/cloog/test/dartef.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.08s. -IF (n >= 1) THEN - DO t3=n+3, 3*n+1 - IF (MOD(t3+n+1, 2) == 0) THEN - S1(1,n,(t3-n-1)/2) - END IF - END DO - DO t1=-n+2, n-1 - IF (t1 >= 2) THEN - DO t3=t1+4, t1+2*n+2 - IF (MOD(t1+t3, 2) == 0) THEN - S1(t1+1,1,(-t1+t3-2)/2) - END IF - END DO - END IF - DO t2=MAX(-t1+2,t1+2), -t1+4 - DO t3=t2+2, t2+2*n - IF (MOD(t1+t2, 2) == 0) THEN - IF (MOD(t1+t3, 2) == 0) THEN - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) - END IF - END IF - END DO - END DO - DO t2=MAX(-t1+5,t1+3), MIN(-t1+2*n,t1+2*n) - DO t3=1, MIN(n,t2+1) - IF (MOD(t1+t2+1, 2) == 0) THEN - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) - END IF - END DO - DO t3=t2+2, n - IF (MOD(t1+t2+1, 2) == 0) THEN - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) - END IF - IF (MOD(t1+t2, 2) == 0) THEN - IF (MOD(t1+t3, 2) == 0) THEN - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) - END IF - END IF - END DO - DO t3=MAX(n+1,t2+2), t2+2*n - IF (MOD(t1+t2, 2) == 0) THEN - IF (MOD(t1+t3, 2) == 0) THEN - S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) - END IF - END IF - END DO - END DO - IF (t1 <= -1) THEN - DO t3=1, n - S2(t1+n-1,n,t3) - END DO - END IF - DO t2=-t1+2*n+1, MIN(-t1+2*n+3,t1+2*n+1) - DO t3=1, n - IF (MOD(t1+t2+1, 2) == 0) THEN - S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) - END IF - END DO - END DO - END DO - DO t3=1, n - S2(n,1,t3) - END DO -END IF diff --git a/cloog-0.17.0/test/dealII.c b/cloog-0.17.0/test/dealII.c deleted file mode 100644 index 200b257745bec2a5b4370c0115fd1b2b899a86ba..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dealII.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from ../../../git/cloog/test/dealII.cloog by CLooG 0.14.0-270-g7ee1261 gmp bits in 0.01s. */ -for (scat_0=0;scat_0<=min(T_66,T_2-1);scat_0++) { - S1(scat_0); - S2(scat_0); -} -if ((T_2 == 0) && (T_67 == 0)) { - S1(0); -} -for (scat_0=max(0,T_66+1);scat_0<=T_2-1;scat_0++) { - S1(scat_0); -} -for (scat_0=T_2;scat_0<=min(T_66,T_67-1);scat_0++) { - S2(scat_0); -} diff --git a/cloog-0.17.0/test/dealII.cloog b/cloog-0.17.0/test/dealII.cloog deleted file mode 100644 index 1c648f4142bdbb8fae74b7b244f5a25c14c8ddc0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dealII.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogProgram data -# structure. WARNING: it is highly dangerous and MAY be correct ONLY if -# - it has been dumped before loop generation. -# - option -noscalars is used (it removes scalar dimensions otherwise) -# - option -l is at least the original scattering dimension number -# ASK THE AUTHOR IF YOU *NEED* SOMETHING MORE ROBUST -# Language: C -c - -# Context (3 parameter(s)): -4 5 -1 -1 0 0 4 -1 1 0 0 0 -1 0 -1 0 4 -1 0 1 0 0 -1 # Parameter name(s) -T_2 T_67 T_66 - -# Statement number: -2 - -# Iteration domain of statement 1. -2 - -2 6 -1 -1 1 0 0 -1 -1 1 0 0 0 0 - -2 6 -1 -1 0 -1 0 0 -1 1 0 0 0 0 -0 0 0 # For future options. - -# Iteration domain of statement 2. -2 - -3 6 -1 -1 1 0 0 -1 -1 1 0 0 0 0 -1 -1 0 0 1 0 - -3 6 -1 -1 0 1 0 -1 -1 1 0 0 0 0 -1 -1 0 0 1 0 -0 0 0 # For future options. - -1 # Iterator name(s) -scat_0 scat_1 scat_2 git_0 - -# No scattering functions. -0 - diff --git a/cloog-0.17.0/test/dealII.good.c b/cloog-0.17.0/test/dealII.good.c deleted file mode 100644 index 9a220ffd3bcec1145b821fc34ad9ed039d386443..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dealII.good.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated from ../../../git/cloog/test/dealII.cloog by CLooG 0.14.0-270-g7ee1261 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(scat_0) { hash(1); hash(scat_0); } -#define S2(scat_0) { hash(2); hash(scat_0); } - -void test(int T_2, int T_67, int T_66) -{ - /* Original iterators. */ - int scat_0; - for (scat_0=0;scat_0<=min(T_66,T_2-1);scat_0++) { - S1(scat_0); - S2(scat_0); - } - if ((T_2 == 0) && (T_67 == 0)) { - S1(0); - } - for (scat_0=max(0,T_66+1);scat_0<=T_2-1;scat_0++) { - S1(scat_0); - } - for (scat_0=T_2;scat_0<=min(T_66,T_67-1);scat_0++) { - S2(scat_0); - } -} diff --git a/cloog-0.17.0/test/donotsimp.c b/cloog-0.17.0/test/donotsimp.c deleted file mode 100644 index bccb8b43d31383687f502afb9aedde32e7ab61f3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/donotsimp.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/donotsimp.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (c2=1;c2<=10;c2++) { - for (c4=1;c4<=c2;c4++) { - S1(c2,c4) ; - } - for (c4=11;c4<=M;c4++) { - S2(c2,c4) ; - } -} diff --git a/cloog-0.17.0/test/donotsimp.cloog b/cloog-0.17.0/test/donotsimp.cloog deleted file mode 100644 index 6450917e4ce99e58e58a79832befc7bb942fccb1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/donotsimp.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# Language -c - -# Context - -# {n>=20} - 1 3 - 1 1 -20 -0 - -# Number of statments -2 - -1 -# {i,j | 0<=i<=10 1<=j<=i} - - 4 5 - 1 1 0 0 -1 - 1 -1 0 0 10 - 1 0 1 0 -1 - 1 1 -1 0 0 -0 0 0 - -1 -# {i,j | 0<=i<=10 11<=j<=n} - - 4 5 - 1 1 0 0 -1 - 1 -1 0 0 10 - 1 0 1 0 -11 - 1 0 -1 1 0 -0 0 0 - -0 -# Scattering functions -2 - - 5 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - - 5 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - - -0 - diff --git a/cloog-0.17.0/test/donotsimp.good.c b/cloog-0.17.0/test/donotsimp.good.c deleted file mode 100644 index 8e45ab82a6541e0340b3a57ff733d9933a3fa587..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/donotsimp.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/donotsimp.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=10;c2++) { - for (c4=1;c4<=c2;c4++) { - S1(c2,c4) ; - } - for (c4=11;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/dot.c b/cloog-0.17.0/test/dot.c deleted file mode 100644 index 5114ef18fe6643d3347a3a6e85d40140e7506777..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dot.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (j=1;j<=M;j++) { - S1(0,j) ; -} -for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.17.0/test/dot.cloog b/cloog-0.17.0/test/dot.cloog deleted file mode 100644 index 112816e0c9186a4f947e2c057c0ad1c52a54cae1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dot.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# parameters {M, N | M>=1 N >=1} -2 4 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i, j | i=0 0<=i<=N 1<=j<=M} -5 6 -0 1 0 0 0 0 -1 1 0 0 0 0 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 - -1 -# {i, j | i>=1 0<=i<=N 1<=j<=M} -5 6 -1 1 0 0 0 -1 -1 1 0 0 0 0 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/dot.good.c b/cloog-0.17.0/test/dot.good.c deleted file mode 100644 index 9cb7b96d6f7a9d78871a5a4ad9d97a0e11edc7fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dot.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (j=1;j<=M;j++) { - S1(0,j) ; - } - for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/dot2.c b/cloog-0.17.0/test/dot2.c deleted file mode 100644 index 3b6eb5d240d81e101b16fba3443d88f597b778d5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dot2.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i=1;i<=min(M,N);i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;i<=M;i++) { - S1(i) ; -} -for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.17.0/test/dot2.cloog b/cloog-0.17.0/test/dot2.cloog deleted file mode 100644 index 71f471a7490d99884979cae934351e800a1e34ce..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dot2.cloog +++ /dev/null @@ -1,29 +0,0 @@ -# language: C -c - -# parameters {M, N | M>=1 N >=1} -2 4 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -2 5 -1 1 0 0 -1 -1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/dot2.good.c b/cloog-0.17.0/test/dot2.good.c deleted file mode 100644 index 9b7805cb7425053cd79fc191f29107c98dad8c5d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/dot2.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from ../../../git/cloog/test/dot2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=1;i<=min(M,N);i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } - } - for (i=N+1;i<=M;i++) { - S1(i) ; - } - for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/double.c b/cloog-0.17.0/test/double.c deleted file mode 100644 index b8e5e59f5dea5a9dfaa3d29b742c4f9db7dfdf64..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/double.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/double.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 0) { - for (i=0;i<=M;i++) { - S1(i) ; - for (j=0;j<=N;j++) { - S2(i,j) ; - S3(i,j) ; - } - S4(i) ; - } -} diff --git a/cloog-0.17.0/test/double.cloog b/cloog-0.17.0/test/double.cloog deleted file mode 100644 index a9db60d864f2e269194964368bab2605fbb99f27..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/double.cloog +++ /dev/null @@ -1,69 +0,0 @@ -# language: C -c - -# parameters n m -1 4 -# n m 1 -1 0 1 0 -0 - -4 # Number of statements - -1 -# S1 {i | 0<=i<=n} -2 5 -# i n m 1 -1 1 0 0 0 -1 -1 1 0 0 -0 0 0 - -1 -# S2 {i, j | 0<=i<=n; 0<=j<=m} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 0 -1 0 1 0 -0 0 0 - -1 -# S3 {i, j | 0<=i<=n; 0<=j<=m} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 0 -1 0 1 0 -0 0 0 - -1 -# S4 {i | 0<=i<=n} -2 5 -# i n m 1 -1 1 0 0 0 -1 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions -2 7 -# c1 C2 i n m 1 -0 1 0 -1 0 0 0 -0 0 1 0 0 0 -1 - -2 8 -# c1 C2 i j n m 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 0 0 -2 - -2 8 -# c1 C2 i j n m 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 0 0 -3 - -2 7 -# c1 C2 i n m 1 -0 1 0 -1 0 0 0 -0 0 1 0 0 0 -4 -0 diff --git a/cloog-0.17.0/test/double.good.c b/cloog-0.17.0/test/double.good.c deleted file mode 100644 index 7aa0eb3d7dc3738ad37857ffc8faca1283677a89..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/double.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/double.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i) { hash(4); hash(i); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=M;i++) { - S1(i) ; - for (j=0;j<=N;j++) { - S2(i,j) ; - S3(i,j) ; - } - S4(i) ; - } -} diff --git a/cloog-0.17.0/test/durbin_e_s.c b/cloog-0.17.0/test/durbin_e_s.c deleted file mode 100644 index d0301c8ff7ef037ca97ae83c9244d522b09d931c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/durbin_e_s.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/durbin_e_s.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ -S4(1,0,0); -S7(1,0,0); -S8(1,0,3); -for (i=2;i<=9;i++) { - S2(i,-7,0); - for (j=-7;j<=i-9;j++) { - S3(i,j,1); - } - S6(i,i-9,2); - S8(i,0,3); - for (j=1;j<=i-1;j++) { - S5(i,j,3); - } -} -S2(10,-7,0); -for (j=-7;j<=1;j++) { - S3(10,j,1); -} -S6(10,1,2); -for (j=1;j<=9;j++) { - S5(10,j,3); - S1(10,j,4); -} -S1(10,10,4); diff --git a/cloog-0.17.0/test/durbin_e_s.cloog b/cloog-0.17.0/test/durbin_e_s.cloog deleted file mode 100644 index 55c08590b42b934559e6fe8c5a202ad5925b0837..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/durbin_e_s.cloog +++ /dev/null @@ -1,71 +0,0 @@ -# language: C -c - -# Context -0 2 - -0 # parameter names - - -8 # Number of statements - -1 -4 5 - 0 1 0 0 -10 - 0 0 0 1 -4 - 1 0 1 0 -1 - 1 0 -1 0 10 -0 0 0 -1 -4 5 - 0 0 1 0 7 - 0 0 0 1 0 - 1 1 0 0 -2 - 1 -1 0 0 10 -0 0 0 -1 -4 5 - 0 0 0 1 -1 - 1 0 1 0 7 - 1 -1 0 0 10 - 1 1 -1 0 -9 -0 0 0 -1 -4 5 - 0 1 0 0 -1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 0 0 0 1 -0 0 0 -1 -4 5 - 0 0 0 1 -3 - 1 1 -1 0 -1 - 1 -1 0 0 10 - 1 0 1 0 -1 -0 0 0 -1 -4 5 - 0 1 -1 0 -9 - 0 0 0 1 -2 - 1 0 1 0 7 - 1 0 -1 0 1 -0 0 0 -1 -4 5 - 0 1 0 0 -1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 0 0 0 1 -0 0 0 -1 -4 5 - 0 0 1 0 0 - 0 0 0 1 -3 - 1 1 0 0 -1 - 1 -1 0 0 9 -0 0 0 -0 # iterator names -0 # scattering functions -0 # scattering dimension names - diff --git a/cloog-0.17.0/test/durbin_e_s.good.c b/cloog-0.17.0/test/durbin_e_s.good.c deleted file mode 100644 index f96d006b7d55f096f89c433ed71af3cdd16e35b2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/durbin_e_s.good.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Generated from ../../../git/cloog/test/durbin_e_s.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } - -void test() -{ - /* Original iterators. */ - int i, j, k; - S4(1,0,0) ; - S7(1,0,0) ; - S8(1,0,3) ; - S2(2,-7,0) ; - S3(2,-7,1) ; - S6(2,-7,2) ; - S8(2,0,3) ; - S5(2,1,3) ; - S2(3,-7,0) ; - S3(3,-7,1) ; - S3(3,-6,1) ; - S6(3,-6,2) ; - S8(3,0,3) ; - for (j=1;j<=2;j++) { - S5(3,j,3) ; - } - for (i=4;i<=8;i++) { - S2(i,-7,0) ; - S3(i,-7,1) ; - for (j=-6;j<=i-10;j++) { - S3(i,j,1) ; - } - j = i-9 ; - S3(i,i-9,1) ; - S6(i,i-9,2) ; - S8(i,0,3) ; - for (j=1;j<=i-1;j++) { - S5(i,j,3) ; - } - } - S2(9,-7,0) ; - S3(9,-7,1) ; - for (j=-6;j<=-1;j++) { - S3(9,j,1) ; - } - S3(9,0,1) ; - S6(9,0,2) ; - S8(9,0,3) ; - for (j=1;j<=8;j++) { - S5(9,j,3) ; - } - S2(10,-7,0) ; - S3(10,-7,1) ; - for (j=-6;j<=0;j++) { - S3(10,j,1) ; - } - S3(10,1,1) ; - S6(10,1,2) ; - S5(10,1,3) ; - S1(10,1,4) ; - for (j=2;j<=9;j++) { - S5(10,j,3) ; - S1(10,j,4) ; - } - S1(10,10,4) ; -} diff --git a/cloog-0.17.0/test/emploi.c b/cloog-0.17.0/test/emploi.c deleted file mode 100644 index 1716721e90b00fbd3a538f856d4280984cfc52ea..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/emploi.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from ../../../git/cloog/test/emploi.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.01s. */ -if (n >= 1) { - if (m >= 1) { - for (i=1;i<=n;i++) { - S1(i); - for (j=1;j<=m;j++) { - S2(i,j); - } - } - } - if (m <= 0) { - for (i=1;i<=n;i++) { - S1(i); - } - } -} diff --git a/cloog-0.17.0/test/emploi.cloog b/cloog-0.17.0/test/emploi.cloog deleted file mode 100644 index 0dd7a26967e8887f1c3f692c46c25c25008a438f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/emploi.cloog +++ /dev/null @@ -1,49 +0,0 @@ -# language: C -c - -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 # 0 >= 0, always true -1 # We want to set the parameter names -m n - -2 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -0 0 0 - -1 # Second statement -4 6 # 4 lines and 6 columns -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # i <= n -1 0 1 0 0 -1 # j >= 1 -1 0 -1 1 0 0 # j <= m -0 0 0 -0 - -0 # Scattering functions -# The first function -2 7 # 2 lines and 7 columns -# c1 c2 i m n 1 -0 1 0 -1 0 0 0 # c1 = i -0 0 1 0 0 0 0 # c2 = 0 -# The second function -2 8 # 2 lines and 8 columns -# c1 c2 i j m n 1 -0 1 0 0 0 0 -1 0 # c1 = n -0 0 1 -1 -1 0 0 0 # c2 = i+j -0 diff --git a/cloog-0.17.0/test/emploi.good.c b/cloog-0.17.0/test/emploi.good.c deleted file mode 100644 index ad812d8111643266e6bdc771c8be2d2dd9170e02..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/emploi.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/emploi.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int m, int n) -{ - /* Original iterators. */ - int i, j; - if (m >= 1) { - for (i=1;i<=n;i++) { - if (i >= m) { - S1(i) ; - } - if (i <= min(2*m,m-1)) { - S1(i) ; - } - for (j=1;j<=m;j++) { - S2(i,j) ; - } - } - } - if (m <= 0) { - for (i=1;i<=n;i++) { - S1(i) ; - } - } -} diff --git a/cloog-0.17.0/test/equality.c b/cloog-0.17.0/test/equality.c deleted file mode 100644 index 86b024dabc20ed8c5f95e6527a38602210fd3e8c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/equality.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i0=0;i0<=5;i0++) { - for (i1=ceild(4*i0,5);i1<=floord(6*i0+20,5);i1++) { - if (2*i0 == i1) { - S1(i0,i1) ; - } - if (i1 == 4) { - S2(i0,i1) ; - } - } -} diff --git a/cloog-0.17.0/test/equality.cloog b/cloog-0.17.0/test/equality.cloog deleted file mode 100644 index da83671838b8ce6a2010ea627da073e3effdf144..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/equality.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# Language: C -c - -# Context (0 parameter(s)): -1 2 - 1 1 -1 # Parameter name(s) - - -# Statement number: -2 - -# Iteration domain of statement 1. -1 -3 4 -0 2 -1 0 -1 1 0 0 -1 -1 0 5 -0 0 0 # For future options. - -# Iteration domain of statement 2. -1 -3 4 -0 0 -1 4 -1 1 0 0 -1 -1 0 5 -0 0 0 # For future options. - -1 # Iterator name(s) -i0 i1 - -# No scattering functions. -0 diff --git a/cloog-0.17.0/test/equality.good.c b/cloog-0.17.0/test/equality.good.c deleted file mode 100644 index 371f48b340656ccac1f2d7852cfe9dc195c405b1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/equality.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i0,i1) { hash(1); hash(i0); hash(i1); } -#define S2(i0,i1) { hash(2); hash(i0); hash(i1); } - -void test() -{ - /* Original iterators. */ - int i0, i1; - for (i0=0;i0<=5;i0++) { - for (i1=ceild(4*i0,5);i1<=floord(6*i0+20,5);i1++) { - if (2*i0 == i1) { - S1(i0,i1) ; - } - if (i1 == 4) { - S2(i0,i1) ; - } - } - } -} diff --git a/cloog-0.17.0/test/equality2.c b/cloog-0.17.0/test/equality2.c deleted file mode 100644 index ea28ab2e9bc75eaccef4bf934460191041aaccad..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/equality2.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.07s. */ -for (i0=1;i0<=10000;i0++) { - for (i1=1000;i1<=1016;i1++) { - for (i2=1;i2<=min(-2*i1+2033,2*i1-1999);i2++) { - if (2*i1 == i2+1999) { - S2(i0,i1,i2,1,i0,2*i1-1000,1,2,i0,i1-499,2*i1-1999,i0,2*i1-1999,i1-999,i1-999) ; - } - if (i2 == 1) { - if (i1%2 == 0) { - S1(i0,i1,i2,2,i0,(i1+2)/2,i1-999,i0,i1-999,(i1-998)/2,(i1-998)/2) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/equality2.cloog b/cloog-0.17.0/test/equality2.cloog deleted file mode 100644 index c62469cc850d7fa244b89af94bc436bae21cdfb5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/equality2.cloog +++ /dev/null @@ -1,57 +0,0 @@ -c - -# Context (0 parameter(s)): -1 2 - 1 1 -1 # Parameter name(s) - - -# Statement number: -2 - -# Iteration domain of statement 2. -1 -13 13 - 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 -2 -998 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 1 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 -1 -500 - 0 0 0 0 0 0 0 1 0 0 0 -2 1 - 0 0 0 0 0 0 0 0 0 1 0 -2 1 - 0 0 0 0 0 0 0 0 0 0 1 -1 0 - 1 0 0 0 0 0 0 0 1 0 0 0 -1 - 1 0 0 0 0 0 0 0 -1 0 0 0 10000 - 1 0 0 0 0 0 0 0 0 0 0 1 -1 - 1 0 0 0 0 0 0 0 0 0 0 -1 9 -0 0 0 # For future options. - -# Iteration domain of statement 3. -1 -17 17 - 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 -999 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -2 1 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -998 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 -500 - 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -2 1 - 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -2 1 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 10000 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 9 -0 0 0 # For future options. - - -1 # Iterator name(s) -i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 - -# No scattering functions. -0 diff --git a/cloog-0.17.0/test/equality2.good.c b/cloog-0.17.0/test/equality2.good.c deleted file mode 100644 index 74bf88b44d32b3cc4affdeb22a75031a96edb8f0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/equality2.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from ../../../git/cloog/test/equality2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10) { hash(1); hash(i0); hash(i1); hash(i2); hash(i3); hash(i4); hash(i5); hash(i6); hash(i7); hash(i8); hash(i9); hash(i10); } -#define S2(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14) { hash(2); hash(i0); hash(i1); hash(i2); hash(i3); hash(i4); hash(i5); hash(i6); hash(i7); hash(i8); hash(i9); hash(i10); hash(i11); hash(i12); hash(i13); hash(i14); } - -void test() -{ - /* Original iterators. */ - int i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14; - for (i0=1;i0<=10000;i0++) { - for (i1=1000;i1<=1016;i1++) { - for (i2=1;i2<=min(-2*i1+2033,2*i1-1999);i2++) { - if (2*i1 == i2+1999) { - S2(i0,i1,i2,1,i0,2*i1-1000,1,2,i0,i1-499,2*i1-1999,i0,2*i1-1999,i1-999,i1-999) ; - } - if (i2 == 1) { - if (i1%2 == 0) { - S1(i0,i1,i2,2,i0,(i1+2)/2,i1-999,i0,i1-999,(i1-998)/2,(i1-998)/2) ; - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/esced.c b/cloog-0.17.0/test/esced.c deleted file mode 100644 index d26d395de2698c93bd36aec24e11078903791630..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/esced.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from ../../../git/cloog/test/esced.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (m >= 1) { - if (n >= 1) { - for (i=1;i<=m;i++) { - S1(i) ; - for (j=1;j<=n;j++) { - S2(i,j) ; - } - } - } - if (n <= 0) { - for (i=1;i<=m;i++) { - S1(i) ; - } - } -} diff --git a/cloog-0.17.0/test/esced.cloog b/cloog-0.17.0/test/esced.cloog deleted file mode 100644 index 9caba0151673d79522ce1e6031e74f76c8f86ab6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/esced.cloog +++ /dev/null @@ -1,30 +0,0 @@ -# language: C -c - -# parameters {n, m | n<=m} -1 4 -#1 1 -1 0 -1 0 0 1 -1 -n m - -2 # Number of statements - -1 -# {i | 1<=i<=n} -2 5 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/esced.good.c b/cloog-0.17.0/test/esced.good.c deleted file mode 100644 index cab5f347a695e89d139ba6f0d745831f5ef0afe2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/esced.good.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated from ../../../git/cloog/test/esced.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int n, int m) -{ - /* Original iterators. */ - int i, j; - if (n >= 1) { - for (i=1;i<=m;i++) { - S1(i) ; - for (j=1;j<=n;j++) { - S2(i,j) ; - } - } - } - if (n <= 0) { - for (i=1;i<=m;i++) { - S1(i) ; - } - } -} diff --git a/cloog-0.17.0/test/ex1.c b/cloog-0.17.0/test/ex1.c deleted file mode 100644 index b5584c047ca6ddd61376c86c2af4105f4f099522..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/ex1.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/ex1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i=0;i<=14;i++) { - for (j=0;j<=n-15;j++) { - S1(i,j) ; - } -} -for (i=15;i<=n;i++) { - for (j=0;j<=9;j++) { - S1(i,j) ; - } - for (j=10;j<=n-15;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=n-14;j<=n;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.17.0/test/ex1.cloog b/cloog-0.17.0/test/ex1.cloog deleted file mode 100644 index 6a85398882f3370201659c4616743fe617f7d35c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/ex1.cloog +++ /dev/null @@ -1,34 +0,0 @@ -# language: C -c - -# parameters {n} -1 3 -# n 1 -1 1 -25 -1 -n - -2 # Number of statements - -1 -# {i | 0<=i<=n, 0<=j<=n-15} -4 5 -# i j n 1 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 -15 -0 0 0 - -1 -# {i | 15<=i<=n, 10<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -15 -1 -1 0 1 0 -1 0 1 0 -10 -1 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/ex1.good.c b/cloog-0.17.0/test/ex1.good.c deleted file mode 100644 index b73fd946882a4f70c80ed181e10a690e30f5f92d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/ex1.good.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Generated from ../../../git/cloog/test/ex1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int n) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=14;i++) { - for (j=0;j<=n-15;j++) { - S1(i,j) ; - } - } - for (i=15;i<=n;i++) { - for (j=0;j<=9;j++) { - S1(i,j) ; - } - for (j=10;j<=n-15;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=n-14;j<=n;j++) { - S2(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/forwardsub-1-1-2.c b/cloog-0.17.0/test/forwardsub-1-1-2.c deleted file mode 100644 index 58ce5c829888216fd6359111f9497202d05a1c02..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-1-1-2.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-1-1-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -S3(1,1) ; -S1(2,1) ; -S4(2,2) ; -for (i=3;i<=M;i++) { - S1(i,1) ; - for (j=2;j<=i-1;j++) { - S2(i,j) ; - } - S4(i,i) ; -} diff --git a/cloog-0.17.0/test/forwardsub-1-1-2.cloog b/cloog-0.17.0/test/forwardsub-1-1-2.cloog deleted file mode 100644 index 38986f996701fe019c001d5e0dc43cbad7a4a44a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-1-1-2.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# language: C -c - -# Context -#{N | 3<=N} -2 3 -# M 1 -1 1 -3 -1 0 1 -0 - -4 # Number of statements - -1 -#{t1,t2 | 2<=t1<=N; t2=1; 3<=N} -5 5 -# i j M 1 -0 0 1 0 -1 -1 0 0 1 -3 -1 -1 0 1 0 -1 1 0 0 -2 -1 0 0 0 1 -0 0 0 - -1 -#{t1,t2 | t2+1<=t1<=N; 2<=t2} -4 5 -# i j M 1 -1 1 -1 0 -1 -1 0 1 0 -2 -1 -1 0 1 0 -1 0 0 0 1 -0 0 0 - -1 -#{t1,t2 | t1=1; t2=1; 3<=N} -4 5 -# i j M 1 -0 1 0 0 -1 -0 0 1 0 -1 -1 0 0 1 -3 -1 0 0 0 1 -0 0 0 - -1 -#{t1,t2 | t1=t2; 2<=t2<=N; 3<=N} -4 5 -# i j M 1 -0 1 -1 0 0 -1 0 0 1 -3 -1 0 -1 1 0 -1 0 1 0 -2 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/forwardsub-1-1-2.good.c b/cloog-0.17.0/test/forwardsub-1-1-2.good.c deleted file mode 100644 index cebe2395572a37430a595a9e5e74a6c4752902e5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-1-1-2.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-1-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - S3(1,1) ; - S1(2,1) ; - S4(2,2) ; - for (i=3;i<=M;i++) { - S1(i,1) ; - for (j=2;j<=i-1;j++) { - S2(i,j) ; - } - S4(i,i) ; - } -} diff --git a/cloog-0.17.0/test/forwardsub-2-1-2-3.c b/cloog-0.17.0/test/forwardsub-2-1-2-3.c deleted file mode 100644 index 7c4bc22c8cd49ab3020c2e12579d5d2cc7205928..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-2-1-2-3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-2-1-2-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -S3(1,0) ; -for (k=2;k<=M;k++) { - S1(1,1,k) ; -} -for (i=2;i<=M-1;i++) { - S4(i,0) ; - for (k=i+1;k<=M;k++) { - S2(i,1,k) ; - } -} -S4(M,0) ; diff --git a/cloog-0.17.0/test/forwardsub-2-1-2-3.cloog b/cloog-0.17.0/test/forwardsub-2-1-2-3.cloog deleted file mode 100644 index 33d29f3c093b3b18c474f67731b10c9aa80fff4a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-2-1-2-3.cloog +++ /dev/null @@ -1,58 +0,0 @@ -# language: C -c - -# Context -#{M | 3<=M} -2 3 -# M 1 -1 1 -3 -1 0 1 -0 - -4 # Number of statements - -1 -#{i,j,k | i=1; j=1; 2<=k<=M; 3<=M} -6 6 -# i j k M 1 -0 1 0 0 0 -1 -0 0 1 0 0 -1 -1 0 0 0 1 -3 -1 0 0 -1 1 0 -1 0 0 1 0 -2 -1 0 0 0 0 1 -0 0 0 - -1 -#{i,j,k | 2<=i<=k-1; j=1; k<=M} -5 6 -# i j k M 1 -0 0 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 0 0 -2 -1 0 0 -1 1 0 -1 0 0 0 0 1 -0 0 0 - -1 -#{i,j | i=1; j=0; 3<=M} -4 5 -# i j M 1 -0 1 0 0 -1 -0 0 1 0 0 -1 0 0 1 -3 -1 0 0 0 1 -0 0 0 - -1 -#{i,j | 2<=i<=M; j=0; 3<=M} -4 5 -# i j M 1 -0 0 1 0 0 -1 1 0 0 -2 -1 0 0 1 -3 -1 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/forwardsub-2-1-2-3.good.c b/cloog-0.17.0/test/forwardsub-2-1-2-3.good.c deleted file mode 100644 index 69ff99cdea6f9c0f2fa2924b3cb7d7ccd2066062..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-2-1-2-3.good.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-2-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j, k; - S3(1,0) ; - for (k=2;k<=M;k++) { - S1(1,1,k) ; - } - for (i=2;i<=M-1;i++) { - S4(i,0) ; - for (k=i+1;k<=M;k++) { - S2(i,1,k) ; - } - } - S4(M,0) ; -} diff --git a/cloog-0.17.0/test/forwardsub-3-1-2.c b/cloog-0.17.0/test/forwardsub-3-1-2.c deleted file mode 100644 index 0f398edb560c8ee6fbce27047d8795fd4c8b8578..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-3-1-2.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-3-1-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -S3(2,1) ; -S1(3,1) ; -S1(4,1) ; -S4(4,2) ; -for (i=5;i<=M+1;i++) { - S1(i,1) ; - for (j=2;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } -} -for (i=M+2;i<=2*M-1;i++) { - for (j=i-M;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } -} -S4(2*M,M) ; diff --git a/cloog-0.17.0/test/forwardsub-3-1-2.cloog b/cloog-0.17.0/test/forwardsub-3-1-2.cloog deleted file mode 100644 index 6e41e750745cd8d781d2415d1031ee8496d6d0c8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-3-1-2.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# language: C -c - -# Context -#{N | 3<=N} -2 3 -# M 1 -1 1 -3 -1 0 1 -0 - -4 # Number of statements - -1 -#{t1,i | 3<=t1<=N+1; i=1; 3<=N} -5 5 -# i j M 1 -0 0 1 0 -1 -1 0 0 1 -3 -1 -1 0 1 1 -1 1 0 0 -3 -1 0 0 0 1 -0 0 0 - -1 -#{t1,i | 2i+1<=t1<=i+N; 2<=i} -4 5 -# i j M 1 -1 1 -2 0 -1 -1 0 1 0 -2 -1 -1 1 1 0 -1 0 0 0 1 -0 0 0 - -1 -#{t1,i | t1=2; i=1; 3<=N} -4 5 -# i j M 1 -0 1 0 0 -2 -0 0 1 0 -1 -1 0 0 1 -3 -1 0 0 0 1 -0 0 0 - -1 -#{t1,i | t1=2i; 2<=i<=N; 3<=N} -5 5 -# i j M 1 -0 1 -2 0 0 -1 0 0 1 -3 -1 0 -1 1 0 -1 0 1 0 -2 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/forwardsub-3-1-2.good.c b/cloog-0.17.0/test/forwardsub-3-1-2.good.c deleted file mode 100644 index 2969ae81359212c3c218b016c81d4b7e2f41d1fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/forwardsub-3-1-2.good.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Generated from ../../../git/cloog/test/forwardsub-3-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - S3(2,1) ; - S1(3,1) ; - S1(4,1) ; - S4(4,2) ; - for (i=5;i<=M+1;i++) { - S1(i,1) ; - for (j=2;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } - } - for (i=M+2;i<=2*M-1;i++) { - for (j=i-M;j<=floord(i-1,2);j++) { - S2(i,j) ; - } - if (i%2 == 0) { - S4(i,i/2) ; - } - } - i = 2*M ; - S4(2*M,M) ; -} diff --git a/cloog-0.17.0/test/gauss.c b/cloog-0.17.0/test/gauss.c deleted file mode 100644 index 341c2aa6929389117f20718c086ca5391ff7d43c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gauss.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/gauss.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ -if (M >= 2) { - for (c2=2;c2<=M;c2++) { - for (j=2;j<=M;j++) { - S2(1,j,c2) ; - } - } - for (c1=2;c1<=M-1;c1++) { - for (c2=c1+1;c2<=M;c2++) { - for (j=1;j<=c1-1;j++) { - S1(c1,j,c2) ; - } - for (j=c1+1;j<=M;j++) { - S2(c1,j,c2) ; - } - } - } -} diff --git a/cloog-0.17.0/test/gauss.cloog b/cloog-0.17.0/test/gauss.cloog deleted file mode 100644 index 0a84b0107d6ce4142c4540a6ac12cf3aa626ba53..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gauss.cloog +++ /dev/null @@ -1,72 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -2 # Number of statements - -1 -# {i, j, k | 1<=i<=n; 1<=j<=i-1 i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 1 -1 0 0 -1 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 # Scattering functions -# Et les instructions de chunking... -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 - -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 -0 - -2 -# Et les instructions de chunking... -1 7 -# c1 i j k n 1 -0 1 0 0 0 -1 2 - -1 7 -# c1 i j k n 1 -0 1 -1 0 0 0 1 -0 - -2 -# Et les instructions de chunking... -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 - -2 8 -# c1 c2 i j k n 1 -0 1 0 -1 0 0 0 0 -0 0 1 0 0 -1 0 0 -0 diff --git a/cloog-0.17.0/test/gauss.good.c b/cloog-0.17.0/test/gauss.good.c deleted file mode 100644 index fb1939d93478dac236be94c93fdf29666d70c66f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gauss.good.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Generated from ../../../git/cloog/test/gauss.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j, k; - if (M >= 2) { - for (c2=2;c2<=M;c2++) { - for (j=2;j<=M;j++) { - S2(1,j,c2) ; - } - } - } - for (c1=2;c1<=M-1;c1++) { - for (c2=c1+1;c2<=M;c2++) { - for (j=1;j<=c1-1;j++) { - S1(c1,j,c2) ; - } - for (j=c1+1;j<=M;j++) { - S2(c1,j,c2) ; - } - } - } -} diff --git a/cloog-0.17.0/test/generate_test.c b/cloog-0.17.0/test/generate_test.c deleted file mode 100644 index 40a8dbdac3e9f0bf6fe19a1c288df950cbbe60d9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/generate_test.c +++ /dev/null @@ -1,153 +0,0 @@ -#include -#include - -/* Generate code that scans part of the parameter domain of - * a given cloog problem, running both a function called "good" - * and a function called "test" for each value of the parameters. - * These functions are assumed to call the "hash" function, - * which is also generated by this program. - * If for any given value of the parameters, the final hash - * value computed by test is different from that computed by - * good, then an error is reported. - */ - -CloogDomain *get_param_domain(CloogOptions *options) -{ - CloogDomain *domain; - CloogProgram *program; - - program = cloog_program_read(stdin, options); - - domain = cloog_domain_copy(program->context); - - cloog_program_free(program); - - return cloog_domain_from_context(domain); -} - -static const char preamble[] = -"#include \n" -"#include \n" -"\n" -"static unsigned h;\n" -"\n" -"void hash(int v)\n" -"{\n" -" int i;\n" -" union u {\n" -" int v;\n" -" unsigned char c[1];\n" -" } u;\n" -" u.v = v;\n" -" for (i = 0; i < sizeof(int); ++i) {\n" -" h *= 16777619;\n" -" h ^= u.c[i];\n" -" }\n" -"}\n" -"\n" -"int main()\n" -"{\n" -" unsigned h_good, h_test;\n"; -; - -static const char postamble[] = -" return 0;\n" -"}\n" -; - -static const char *call[] = {"good", "test"}; - -static void print_macros(FILE *file) -{ - fprintf(file, "/* Useful macros. */\n") ; - fprintf(file, - "#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))\n"); - fprintf(file, - "#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))\n"); - fprintf(file, "#define max(x,y) ((x) > (y) ? (x) : (y))\n") ; - fprintf(file, "#define min(x,y) ((x) < (y) ? (x) : (y))\n\n") ; -} - -int main() -{ - int dim; - int range; - int i, j; - CloogState *state = cloog_state_malloc(); - CloogOptions *options = cloog_options_malloc(state); - CloogDomain *domain; - CloogDomain *cube, *tmp; - CloogProgram *p; - CloogStatement *statement; - cloog_int_t m, M; - - options->quiet = 1; - domain = get_param_domain(options); - dim = cloog_domain_dimension(domain); - - if (dim >= 8) - range = 4; - else if (dim >= 5) - range = 6; - else - range = 30; - - cloog_int_init(m); - cloog_int_init(M); - cloog_int_set_si(m, 0); - cloog_int_set_si(M, range); - cube = cloog_domain_cube(state, dim, m, M); - domain = cloog_domain_intersection(tmp = domain, cube); - cloog_domain_free(tmp); - cloog_domain_free(cube); - - p = cloog_program_malloc(); - assert(p); - p->names = cloog_names_malloc(); - assert(p->names); - p->names->nb_iterators = dim; - p->names->iterators = cloog_names_generate_items(dim, "p", 0); - p->language = 'c'; - p->context = cloog_domain_universe(state, 0); - statement = cloog_statement_alloc(state, 1); - p->loop = cloog_loop_malloc(state); - p->loop->domain = domain; - p->loop->block = cloog_block_alloc(statement, 0, NULL, dim); - p->blocklist = cloog_block_list_alloc(p->loop->block); - p = cloog_program_generate(p, options); - - printf("%s", preamble); - for (i = 0; i < dim; ++i) - printf("\tint %s;\n", p->names->iterators[i]); - printf("#define S1("); - for (i = 0; i < dim; ++i) { - if (i) - printf(","); - printf("p%d", i); - } - printf(") do {"); - for (j = 0; j < 2; ++j) { - printf(" h = 2166136261u;"); - printf(" %s(", call[j]); - for (i = 0; i < dim; ++i) { - if (i) - printf(", "); - printf("p%d", i); - } - printf(");"); - printf(" h_%s = h;", call[j]); - } - printf(" assert(h_good == h_test);"); - printf(" } while (0)\n"); - print_macros(stdout); - cloog_program_pprint(stdout, p, options); - printf("%s", postamble); - - cloog_int_clear(m); - cloog_int_clear(M); - cloog_program_free(p); - cloog_options_free(options); - cloog_state_free(state); - - return 0; -} diff --git a/cloog-0.17.0/test/gesced.c b/cloog-0.17.0/test/gesced.c deleted file mode 100644 index 6b69507daa3b90140884b920f120afdb1cdc72a3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.05s. */ -for (c1=1;c1<=N;c1++) { - S1(c1) ; -} -for (c1=N+1;c1<=2*N;c1++) { - for (i=1;i<=N;i++) { - S2(i,c1-N) ; - } -} -for (c1=2*N+1;c1<=M+N;c1++) { - for (i=1;i<=N;i++) { - S3(i,c1-2*N) ; - S2(i,c1-N) ; - } -} -for (c1=M+N+1;c1<=M+2*N;c1++) { - for (i=1;i<=N;i++) { - S3(i,c1-2*N) ; - } -} diff --git a/cloog-0.17.0/test/gesced.cloog b/cloog-0.17.0/test/gesced.cloog deleted file mode 100644 index 5f3704658f20ee92dc09d12128bb82158c74a9ad..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# language: C -c - -# parameters {n, m | n<=m n>=2 m>=2} -3 4 -# m n 1 -1 1 -1 0 -1 1 0 -2 -1 0 1 -2 -0 - -3 # Number of statements - -1 -# {i | 1<=i<=n} -2 5 -# i m n 1 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -# i j m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -# i j m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -3 # Scattering functions -# Et les instructions de chunking (prog init)... -1 6 -# c1 i m n 1 -0 1 -1 0 0 0 - -1 7 -# c1 i j m n 1 -0 1 0 -1 0 -1 0 - -1 7 -# c1 i j m n 1 -0 1 0 -1 0 -2 0 -0 diff --git a/cloog-0.17.0/test/gesced.good.c b/cloog-0.17.0/test/gesced.good.c deleted file mode 100644 index bae55dd60030bfce9e63600dd05af92ee87b29eb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i, j; - for (c1=1;c1<=N;c1++) { - S1(c1) ; - } - for (c1=N+1;c1<=2*N;c1++) { - for (i=1;i<=N;i++) { - j = c1-N ; - S2(i,c1-N) ; - } - } - for (c1=2*N+1;c1<=M+N;c1++) { - for (i=1;i<=N;i++) { - j = c1-2*N ; - S3(i,c1-2*N) ; - j = c1-N ; - S2(i,c1-N) ; - } - } - for (c1=M+N+1;c1<=M+2*N;c1++) { - for (i=1;i<=N;i++) { - j = c1-2*N ; - S3(i,c1-2*N) ; - } - } -} diff --git a/cloog-0.17.0/test/gesced2.c b/cloog-0.17.0/test/gesced2.c deleted file mode 100644 index 5cebdb591d574e7f4a3be7a20661480ca4cffd52..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced2.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/gesced2.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.03s. */ -for (c1=1;c1<=4;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2); - } -} -for (c1=5;c1<=M-10;c1++) { - for (c2=-c1+1;c2<=4;c2++) { - S2(c1+c2,c1); - } - for (c2=5;c2<=min(M-10,-c1+M);c2++) { - S1(c1,c2); - S2(c1+c2,c1); - } - for (c2=-c1+M+1;c2<=M-10;c2++) { - S1(c1,c2); - } - for (c2=M-9;c2<=-c1+M;c2++) { - S2(c1+c2,c1); - } -} -for (c1=M-9;c1<=M;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2); - } -} diff --git a/cloog-0.17.0/test/gesced2.cloog b/cloog-0.17.0/test/gesced2.cloog deleted file mode 100644 index 982368b4e3d50a8a4f82d424c0bd1c9b956b25c4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced2.cloog +++ /dev/null @@ -1,82 +0,0 @@ -# language: C -c - -# parameters {n | n>=16} -1 3 -# n 1 -1 1 -16 -0 - -2 # Number of statements - -1 -# {i, j | 1<=i<=n 5<=j<=n-10} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -5 -1 0 -1 1 -10 -0 0 0 - -1 -# {i, j | 1<=i<=n 5<=j<=n-10} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -5 -1 0 -1 1 -10 -0 0 0 -0 - -2 # Scattering functions -# Et les instructions de chunking (sol triviale)... -2 7 -# c1 c2 i j n 1 -0 1 0 -1 0 0 0 -0 0 1 0 -1 0 0 - -2 7 -# c1 c2 i j n 1 -0 1 0 0 -1 0 0 -0 0 1 -1 1 0 0 -0 - -# Et les instructions de chunking (sol aux inverse)... -2 7 -# c1 c2 i j n 1 -0 1 0 -10 -3 0 -5 -0 0 1 -4 -1 0 5 - -2 7 -# c1 c2 i j n 1 -0 1 0 -9 -4 0 -15 -0 0 1 -5 0 0 0 -0 - -2 -# Et les instructions de chunking (sol aux egalites)... -2 7 -# c1 c2 i j n 1 -0 1 0 1 -2 0 -30 -0 0 1 -1 1 0 30 - -2 7 -# c1 c2 i j n 1 -0 1 0 -1 1 0 15 -0 0 1 1 -2 0 -30 -0 - -# Et les instructions de chunking (sol triviale)... -2 7 -# c1 c2 i j n 1 -0 1 0 -1 0 0 0 -0 0 1 0 -1 0 5 - -2 7 -# c1 c2 i j n 1 -0 1 0 0 -1 0 -10 -0 0 1 -1 0 0 0 -0 - diff --git a/cloog-0.17.0/test/gesced2.good.c b/cloog-0.17.0/test/gesced2.good.c deleted file mode 100644 index 669093acec05cbe7905418de9143a21b5f00fd6b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced2.good.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=1;c1<=4;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2) ; - } - } - for (c1=5;c1<=min(M-10,9);c1++) { - for (c2=-c1+1;c2<=4;c2++) { - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2) ; - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=M-9;c2<=-c1+M;c2++) { - i = c1+c2 ; - S2(c1+c2,c1) ; - } - } - if (M >= 20) { - for (c2=-9;c2<=4;c2++) { - i = c2+10 ; - S2(c2+10,10) ; - } - for (c2=5;c2<=M-10;c2++) { - S1(10,c2) ; - i = c2+10 ; - S2(c2+10,10) ; - } - } - for (c1=11;c1<=M-10;c1++) { - for (c2=-c1+1;c2<=4;c2++) { - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=5;c2<=-c1+M;c2++) { - S1(c1,c2) ; - i = c1+c2 ; - S2(c1+c2,c1) ; - } - for (c2=-c1+M+1;c2<=M-10;c2++) { - S1(c1,c2) ; - } - } - for (c1=M-9;c1<=M;c1++) { - for (c2=5;c2<=M-10;c2++) { - S1(c1,c2) ; - } - } -} diff --git a/cloog-0.17.0/test/gesced3.c b/cloog-0.17.0/test/gesced3.c deleted file mode 100644 index 8d2119d28a2f22dc405118b0a2ab08c1a4128fb0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced3.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -for (c1=M+1;c1<=2*M;c1++) { - S1(c1-M) ; -} -for (c1=2*M+1;c1<=M+N;c1++) { - S2(c1-2*M) ; - S1(c1-M) ; -} -for (c1=M+N+1;c1<=2*M+N;c1++) { - S2(c1-2*M) ; -} diff --git a/cloog-0.17.0/test/gesced3.cloog b/cloog-0.17.0/test/gesced3.cloog deleted file mode 100644 index 758924c4f6765602416a40da016773445f70c544..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced3.cloog +++ /dev/null @@ -1,39 +0,0 @@ -# language: C -c - -# parametres {n | n>=m m>=2} -2 4 -# m n 1 -1 -1 1 0 -1 1 0 -2 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=n} -2 5 -# i m n 1 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i | 1<=i<=n} -2 5 -# i m n 1 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 -0 - -2 -# Et les instructions de chunking (sol triviale)... -1 6 -# c1 i m n 1 -0 1 -1 -1 0 0 - -1 6 -# c1 i m n 1 -0 1 -1 -2 0 0 -0 diff --git a/cloog-0.17.0/test/gesced3.good.c b/cloog-0.17.0/test/gesced3.good.c deleted file mode 100644 index 43708fc32540d8de9c68801075bff3831c37d0dc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/gesced3.good.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/gesced3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - for (c1=M+1;c1<=2*M;c1++) { - i = c1-M ; - S1(c1-M) ; - } - for (c1=2*M+1;c1<=M+N;c1++) { - i = c1-2*M ; - S2(c1-2*M) ; - i = c1-M ; - S1(c1-M) ; - } - for (c1=M+N+1;c1<=2*M+N;c1++) { - i = c1-2*M ; - S2(c1-2*M) ; - } -} diff --git a/cloog-0.17.0/test/guide.c b/cloog-0.17.0/test/guide.c deleted file mode 100644 index 31e9db11ed557d434cf4c906b0c673edbe97f222..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/guide.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/guide.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ -if (N >= 1) { - for (i=1;i<=N;i++) { - S1(i); - } - for (i=N+1;i<=2*N;i++) { - S2(i); - } -} diff --git a/cloog-0.17.0/test/guide.cloog b/cloog-0.17.0/test/guide.cloog deleted file mode 100644 index 5a355827a9dfb314fcb5a3ea2134372cd245255e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/guide.cloog +++ /dev/null @@ -1,35 +0,0 @@ -# Language is C -c - -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 # 0 >= 0, always true -0 # CLooG will set parameters names automatically - -2 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -0 0 0 - -1 # Second statement -2 5 # 4 lines and 6 columns -# i m n 1 -1 1 0 -1 -1 # i >= 1 -1 -1 0 2 0 # i <= n -0 0 0 -0 # CLooG will set iterators names automatically - -0 diff --git a/cloog-0.17.0/test/guide.good.c b/cloog-0.17.0/test/guide.good.c deleted file mode 100644 index 31e03468f04f21507cfe82bb19de9f2ea93eb8f7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/guide.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/guide.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i; - for (i=1;i<=N;i++) { - if (i >= M) { - S1(i) ; - } - if (i <= min(2*M,M-1)) { - S1(i) ; - } - } - for (i=N+1;i<=2*N;i++) { - S2(i) ; - } -} diff --git a/cloog-0.17.0/test/iftest.c b/cloog-0.17.0/test/iftest.c deleted file mode 100644 index 8f95ef8065b059eba43cb29b8815dfa56fe25330..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftest.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ -if (n >= 1) { - for (i=1;i<=n;i++) { - S1(i); - } -} diff --git a/cloog-0.17.0/test/iftest.cloog b/cloog-0.17.0/test/iftest.cloog deleted file mode 100644 index 0adbc8d4195a20d75f3e85909f3d00640c4502c3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftest.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# language: C -c -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 -1 -m n - -1 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -0 0 0 -0 - -0 diff --git a/cloog-0.17.0/test/iftest.good.c b/cloog-0.17.0/test/iftest.good.c deleted file mode 100644 index 4ce26e440fb9fbfb03aaf4c34405bcd7480e47d5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftest.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int m, int n) -{ - /* Original iterators. */ - int i; - for (i=1;i<=n;i++) { - if (i <= 2*m) { - S1(i) ; - } - if (i >= max(m,2*m+1)) { - S1(i) ; - } - } -} diff --git a/cloog-0.17.0/test/iftest2.c b/cloog-0.17.0/test/iftest2.c deleted file mode 100644 index 355aa74d845db3828d7b34cb920a61d3d00234e7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftest2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest2.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ -if ((M >= 1) && (N >= 1)) { - for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - S1(i,j); - } - } -} diff --git a/cloog-0.17.0/test/iftest2.cloog b/cloog-0.17.0/test/iftest2.cloog deleted file mode 100644 index 2bd73366774709ae29718e8502f27db7ef40a97e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftest2.cloog +++ /dev/null @@ -1,31 +0,0 @@ -# language: C -c -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 -0 - -1 # The number of statements - -2 # First statement -# The first domain -5 6 # 3 lines and 5 columns -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # i <= n -1 1 0 -1 0 0 # i >= m -1 0 1 0 0 -1 -1 0 -1 1 0 0 -# The second domain -5 6 # 3 lines and 5 columns -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # i <= n -1 -1 0 2 0 0 # i <= 2*m -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 diff --git a/cloog-0.17.0/test/iftest2.good.c b/cloog-0.17.0/test/iftest2.good.c deleted file mode 100644 index 9e7f51474163fd9abf766618ddbc23d152c76292..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftest2.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/iftest2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - if (M >= 1) { - for (i=1;i<=N;i++) { - for (j=1;j<=M;j++) { - if (i <= 2*M) { - S1(i,j) ; - } - if (i >= max(M,2*M+1)) { - S1(i,j) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/iftestf.cloog b/cloog-0.17.0/test/iftestf.cloog deleted file mode 100644 index 1f0d6a9ba251833ffd92fb8f2699eb09c59e6d06..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftestf.cloog +++ /dev/null @@ -1,29 +0,0 @@ -# language: FORTRAN -f - -# The context (no constraints on parameters) -1 4 # 1 lines and 4 columns -# m n 1 -1 0 0 0 -1 -m n - -1 # The number of statements - -2 # First statement -# The first domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -# The second domain -3 5 # 3 lines and 5 columns -# i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 -1 2 0 0 # i <= 2*m -0 0 0 -0 - -0 diff --git a/cloog-0.17.0/test/iftestf.f b/cloog-0.17.0/test/iftestf.f deleted file mode 100644 index 65685b904eb3b07d883d61bcead2136a6816e8f6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/iftestf.f +++ /dev/null @@ -1,6 +0,0 @@ -! Generated from ../../../git/cloog/test/iftestf.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. -IF (n >= 1) THEN - DO i=1, n - S1(i) - END DO -END IF diff --git a/cloog-0.17.0/test/infinite.c b/cloog-0.17.0/test/infinite.c deleted file mode 100644 index 10f35f2d9f312baace492da7f1ba151301edac75..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -for (;i<=0;i++) { - S1(i) ; -} -for (i=1;i<=N;i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;;i++) { - S1(i) ; -} diff --git a/cloog-0.17.0/test/infinite.cloog b/cloog-0.17.0/test/infinite.cloog deleted file mode 100644 index dacc187065765443e88ab660fea7969d96d012b9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite.cloog +++ /dev/null @@ -1,32 +0,0 @@ -# langage -c - -# parametres {M, N | M>=1 N >=1} -2 4 -# M N 1 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -0 5 -# i M N 1 -#1 1 0 0 -1 -#1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -# i j M N 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/infinite2.c b/cloog-0.17.0/test/infinite2.c deleted file mode 100644 index 80a0b35c32d8adf1ef4ffdd066809dbce4cba908..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=1;i<=N;i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;;i++) { - S1(i) ; -} diff --git a/cloog-0.17.0/test/infinite2.cloog b/cloog-0.17.0/test/infinite2.cloog deleted file mode 100644 index 2d7cf9706da7a8d33543193d2fb2257fdc05fac2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite2.cloog +++ /dev/null @@ -1,32 +0,0 @@ -# langage -c - -# parametres {M, N | M>=1 N >=1} -2 4 -# M N 1 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -1 5 -# i M N 1 -1 1 0 0 -1 -#1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -# i j M N 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/infinite3.c b/cloog-0.17.0/test/infinite3.c deleted file mode 100644 index 9e4292c17ba82e36a5c6bc8affa6add6c8096b61..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite3.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ -for (;i<=0;i++) { - S1(i) ; -} -for (i=1;i<=min(M,N);i++) { - S1(i) ; - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} -for (i=N+1;i<=M;i++) { - S1(i) ; -} -for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S2(i,j) ; - } -} diff --git a/cloog-0.17.0/test/infinite3.cloog b/cloog-0.17.0/test/infinite3.cloog deleted file mode 100644 index 9154a0ebbecff8659a33e672bfaa7a5be30f6e69..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite3.cloog +++ /dev/null @@ -1,32 +0,0 @@ -# langage -c - -# parametres {M, N | M>=1 N >=1} -2 4 -# M N 1 -1 1 0 -1 -1 0 1 -1 -0 - -2 # Number of statements - -1 -# {i | 1<=i<=M} -1 5 -# i M N 1 -#1 1 0 0 -1 -1 -1 1 0 0 -0 0 0 - -1 -# {i, j | 1<=i<=N 1<=j<=M} -4 6 -# i j M N 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/infinite4.c b/cloog-0.17.0/test/infinite4.c deleted file mode 100644 index fff00ed772bd36c7bc700c3f16fa6a4f06a46f96..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite4.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/infinite4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (;;i++) { - S1(i) ; -} diff --git a/cloog-0.17.0/test/infinite4.cloog b/cloog-0.17.0/test/infinite4.cloog deleted file mode 100644 index 550245395c2a53a8a9f5e204c10741b14820adbe..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/infinite4.cloog +++ /dev/null @@ -1,16 +0,0 @@ -# langage -c - -# Context -0 2 -0 - -1 # Number of statements - -1 -# {i | 1<=i<=M} -0 3 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/isl/jacobi-shared.c b/cloog-0.17.0/test/isl/jacobi-shared.c deleted file mode 100644 index 0c2ceea0f01bcdad4396162573aeb2c8e7ed416a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/jacobi-shared.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/jacobi-shared.cloog by CLooG 0.16.3-2-g5511bef gmp bits in 1.82s. */ -if ((h0+1)%2 == 0) { - if ((16*floord(t0-1,16) >= -N+g1+t0+1) && (16*floord(N+15*g1+15*t0+15,16) >= 15*g1+15*t0+19) && (32*floord(t1-1,32) <= g2+t1-3) && (32*floord(t1-1,32) >= -N+g2+t1+1)) { - for (c0=max(-16*floord(t0-1,16)+t0,-16*floord(g1+t0-3,16)+t0);c0<=min(32,N-g1-1);c0+=16) { - c1 = -32*floord(t1-1,32)+t1; - if (c1 <= 32) { - S1(c0+g1-1,c1+g2-1); - } - } - } -} diff --git a/cloog-0.17.0/test/isl/jacobi-shared.cloog b/cloog-0.17.0/test/isl/jacobi-shared.cloog deleted file mode 100644 index 25e4903d877e3fee2f630c2e045128794c5377bb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/jacobi-shared.cloog +++ /dev/null @@ -1,129 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -1 - -22 16 0 0 2 12 -0 0 1024 0 0 0 0 32 0 0 -1 0 0 0 0 0 -0 2048 0 0 0 0 32 0 0 -1 0 0 0 0 0 0 -0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 29 -1 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 29 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 63 -1 0 0 0 1 0 0 -32 0 0 0 0 0 0 0 -2 -1 0 0 0 1 0 -32 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 2 0 -1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 31 - -1 # Parameter name(s) -T N h0 b0 b1 g0 g1 g2 g3 g4 t0 t1 - -# Statement number: -1 - -# Iteration domain of statement 1 (write_shared_A). -1 - -33 21 2 0 5 12 -0 0 1 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 1 -0 1 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 -0 0 0 0 0 1024 0 0 0 0 0 0 992 0 0 1 0 0 0 0 0 -0 0 0 0 2048 0 0 0 0 0 0 2016 0 0 1 0 0 0 0 0 0 -0 0 0 2 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 -0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 2 0 -1 0 0 0 0 0 0 0 0 0 -1 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 63 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 31 -1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 -1 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 -32 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 1 0 0 -32 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 31 - -0 0 0 # For future options. - - -0 # Iterator name(s) -# --------------------- SCATTERING -------------------- -1 # Scattering functions - -# Scattering of statement 1 (write_shared_A). -1 - -37 25 4 2 5 12 -0 0 0 0 0 0 1 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 -1 1 -0 0 0 0 0 1 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 -0 0 0 0 0 0 0 0 0 1024 0 0 0 0 0 0 992 0 0 1 0 0 0 0 0 -0 0 0 0 0 0 0 0 2048 0 0 0 0 0 0 2016 0 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 2 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 -0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 2 0 -1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 63 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 31 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 29 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -32 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -32 0 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -32 0 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 31 - -1 # Scattering dimension name(s) -c0 c1 c2 c3 diff --git a/cloog-0.17.0/test/isl/jacobi-shared.good.c b/cloog-0.17.0/test/isl/jacobi-shared.good.c deleted file mode 100644 index fcd67dc9316e499fdfaa0d878691c89806893c60..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/jacobi-shared.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/jacobi-shared.cloog by CLooG 0.16.2-19-gfcd8fdc gmp bits in 1.65s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int T, int N, int h0, int b0, int b1, int g0, int g1, int g2, int g3, int g4, int t0, int t1) -{ - /* Scattering iterators. */ - int c0, c1, c2, c3; - /* Original iterators. */ - int i, j; - if ((h0+1)%2 == 0) { - if ((16*floord(g1+t0-3,16) >= -N+g1+t0+1) && (16*floord(N+15*g1+15*t0+15,16) >= 16*g1+15*t0+17) && (floord(t1-1,32) <= floord(g2+t1-3,32)) && (32*floord(t1-1,32) >= -N+g2+t1+1)) { - for (c0=max(-16*floord(t0-1,16)+t0,-16*floord(g1+t0-3,16)+t0);c0<=min(32,N-g1-1);c0+=16) { - c1 = -32*floord(t1-1,32)+t1; - if (c1 <= 32) { - S1(c0+g1-1,c1+g2-1); - } - } - } - } -} diff --git a/cloog-0.17.0/test/isl/mod.c b/cloog-0.17.0/test/isl/mod.c deleted file mode 100644 index 4f6a15e327781333b7663bbc095a17e93496829f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod.cloog by CLooG 0.14.0-325-g71fa959 gmp bits in 0.00s. */ -for (i=0;i<=3;i++) { - if (i%3 <= 1) { - S1(i); - } -} diff --git a/cloog-0.17.0/test/isl/mod.cloog b/cloog-0.17.0/test/isl/mod.cloog deleted file mode 100644 index e12de40ce7597d2fb589520610ffb3d9888c5031..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod.cloog +++ /dev/null @@ -1,23 +0,0 @@ -c - -# Context: -0 2 - -0 # Parameter name(s) -# Statement number: -1 - -# Iteration domain of statement 1 -4 4 1 0 1 0 -1 1 0 0 -1 -1 0 3 -1 1 -3 0 -1 -1 3 1 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# No scattering functions. -0 diff --git a/cloog-0.17.0/test/isl/mod2.c b/cloog-0.17.0/test/isl/mod2.c deleted file mode 100644 index 4f6a15e327781333b7663bbc095a17e93496829f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod.cloog by CLooG 0.14.0-325-g71fa959 gmp bits in 0.00s. */ -for (i=0;i<=3;i++) { - if (i%3 <= 1) { - S1(i); - } -} diff --git a/cloog-0.17.0/test/isl/mod2.cloog b/cloog-0.17.0/test/isl/mod2.cloog deleted file mode 100644 index 1b09d5f510b14ea7ac75af39f41cc8093be0d42f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod2.cloog +++ /dev/null @@ -1,20 +0,0 @@ -# Language: C -c - -# Context: -0 2 - -0 # Parameter name(s) -# Statement number: -1 - -# Iteration domain of statement 1 -{ [i] : 0 <= i <= 3 and 0 <= i - 3*[i/3] <= 1 } - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# No scattering functions. -0 diff --git a/cloog-0.17.0/test/isl/mod3.c b/cloog-0.17.0/test/isl/mod3.c deleted file mode 100644 index 3fa291bac07868066fe752c7c5dba8de9303f557..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod3.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod3.cloog by CLooG 0.14.0-325-g62da9f7 gmp bits in 0.02s. */ -for (i=max(0,32*h0-1991);i<=min(999,32*h0+31);i++) { - if ((63*i+32*h0+31)%64 <= 62) { - for (j=0;j<=999;j++) { - S1(i,j); - } - } -} diff --git a/cloog-0.17.0/test/isl/mod3.cloog b/cloog-0.17.0/test/isl/mod3.cloog deleted file mode 100644 index 16370803c5ad33bb812f6c6e3b5829cea0713183..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod3.cloog +++ /dev/null @@ -1,34 +0,0 @@ -# Language: C -c - -# Context: -2 3 -1 -1 93 -1 1 0 - -1 # Parameter name(s) -h0 -# Statement number: -1 - -# Iteration domain of statement 1 -1 - -9 6 2 0 1 1 -1 1 0 0 0 0 -1 -1 0 0 0 999 -1 0 0 -1 0 31 -1 1 0 32 -32 999 -1 0 1 0 0 0 -1 0 -1 0 0 999 -1 1 0 64 -32 31 -1 -1 0 -64 32 31 -1 0 0 1 0 0 - -0 0 0 # For future options. - - -0 # Iterator name(s) - -# No scattering functions. -0 diff --git a/cloog-0.17.0/test/isl/mod4.c b/cloog-0.17.0/test/isl/mod4.c deleted file mode 100644 index 9a30f3c49d1f4be21b510b1d3e8a5686f8b5cf54..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod4.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mod4.cloog by CLooG 0.16.0-9-g188dbd4 gmp bits in 0.00s. */ -if (M%11 <= 6) { - if (N%5 <= 2) { - if (M >= -N) { - for (i=0;i<=M+N;i++) { - S1(i); - } - } - } -} diff --git a/cloog-0.17.0/test/isl/mod4.cloog b/cloog-0.17.0/test/isl/mod4.cloog deleted file mode 100644 index d5837aed9f245d10909408aa1a633b25b4c5a4db..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mod4.cloog +++ /dev/null @@ -1,23 +0,0 @@ -c - -1 - -0 4 - -0 - -1 - -6 7 1 0 2 2 -1 0 -5 0 0 1 0 -1 0 5 0 0 -1 2 -1 0 0 -11 1 0 0 -1 0 0 11 -1 0 6 -1 1 0 0 0 0 0 -1 -1 0 0 1 1 0 - -0 0 0 - -0 - -0 diff --git a/cloog-0.17.0/test/isl/mxm-shared.c b/cloog-0.17.0/test/isl/mxm-shared.c deleted file mode 100644 index e5f4c662a93d3545c90ff593f457ef2ab58e4faf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mxm-shared.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/mxm-shared.cloog by CLooG 0.16.1-5-gcba2a9f gmp bits in 0.34s. */ -if (g4%4 == 0) { - if ((N >= g0+t1+1) && (N >= g1+t0+1) && (t1 <= 7)) { - for (c0=t0;c0<=min(127,N-g1-1);c0+=16) { - S1(g0+t1,c0+g1); - } - } -} diff --git a/cloog-0.17.0/test/isl/mxm-shared.cloog b/cloog-0.17.0/test/isl/mxm-shared.cloog deleted file mode 100644 index f82b2ddf3348ef67b6d66a83a10bd3914cd0526c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/mxm-shared.cloog +++ /dev/null @@ -1,162 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -1 - -19 15 0 0 3 10 -0 0 0 128 0 -8 0 1 0 0 0 0 0 0 0 -0 0 4096 0 0 0 128 0 -1 0 0 0 0 0 0 -0 8 0 0 0 0 0 -1 0 0 0 0 0 0 0 -0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 0 -1 0 0 -1 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 1 0 0 -1 0 0 0 0 0 0 -1 -1 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 15 - -1 # Parameter name(s) -N b0 b1 g0 g1 g2 g3 g4 t0 t1 - -# Statement number: -1 - -# Iteration domain of statement 1 (write_shared_C). -2 - -22 18 2 0 4 10 -0 0 -1 0 0 0 16 0 0 0 0 0 0 0 0 1 0 0 -0 0 0 0 0 128 0 0 8 0 -1 0 0 0 0 0 0 0 -0 0 0 0 4096 0 0 0 0 -128 0 1 0 0 0 0 0 0 -0 0 0 128 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 7 -1 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 - -24 19 2 0 5 10 -0 0 -1 0 0 0 0 16 0 0 0 0 0 0 0 0 1 0 0 -0 0 0 0 0 0 128 0 0 8 0 -1 0 0 0 0 0 0 0 -0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 -1 0 0 0 -0 0 0 0 4096 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -0 0 0 128 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 -0 0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 7 -1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 - -0 0 0 # For future options. - - -0 # Iterator name(s) -# --------------------- SCATTERING -------------------- -1 # Scattering functions - -# Scattering of statement 1 (write_shared_C). -2 - -27 22 4 2 4 10 -0 0 0 0 0 1 0 0 0 0 16 0 8 0 0 0 0 0 0 0 -1 0 -0 0 0 0 0 0 1 0 0 16 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 0 0 0 0 0 0 128 0 0 0 120 0 1 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 4096 0 0 0 0 0 3968 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 7 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 15 - -29 23 4 2 5 10 -0 0 0 0 0 1 0 0 0 0 0 16 0 8 0 0 0 0 0 0 0 -1 0 -0 0 0 0 0 0 1 0 0 0 16 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 0 0 0 0 0 0 0 128 0 0 0 120 0 1 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 4096 0 0 0 0 0 3968 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 0 0 1 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 -8 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -8 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -128 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 -1 -1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 7 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 31 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 127 -1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 15 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 15 - -1 # Scattering dimension name(s) -c0 c1 c2 c3 diff --git a/cloog-0.17.0/test/isl/unroll.c b/cloog-0.17.0/test/isl/unroll.c deleted file mode 100644 index 5f80428244232506eb962212bb2ea342d50bcfdd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/unroll.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ./isl/unroll.cloog by CLooG 0.16.3-13-gbbcc8fc gmp bits in 0.00s. */ -S1(0); -S1(1); -S1(2); -S1(3); -S1(4); -S1(5); -S1(6); -S1(7); -S1(8); -S1(9); -S1(10); diff --git a/cloog-0.17.0/test/isl/unroll.cloog b/cloog-0.17.0/test/isl/unroll.cloog deleted file mode 100644 index c3f0960c60eb194e855e6250826d84dca7e6232b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/unroll.cloog +++ /dev/null @@ -1,14 +0,0 @@ -C - -[n] -> { : } - -0 - -1 - -[n] -> { [i] : 0 <= i and i <= 10 } -0 0 0 - -0 - -0 diff --git a/cloog-0.17.0/test/isl/unroll.good.c b/cloog-0.17.0/test/isl/unroll.good.c deleted file mode 100644 index 9daca4df62dd2eea41834923e53f5d70f1f83cff..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/unroll.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ./isl/unroll.cloog by CLooG 0.16.3-14-g80e4ef0 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - S1(0); - S1(1); - S1(2); - S1(3); - S1(4); - S1(5); - S1(6); - S1(7); - S1(8); - S1(9); - S1(10); -} diff --git a/cloog-0.17.0/test/isl/unroll2.c b/cloog-0.17.0/test/isl/unroll2.c deleted file mode 100644 index 7ec66bdb769d9a4739eaa767c9e1ae3bbe6eac9d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/unroll2.c +++ /dev/null @@ -1,7 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/unroll2.cloog by CLooG 0.16.3-13-g27516e4 gmp bits in 0.00s. */ -if ((M >= -1) && (M <= 9)) { - if (M >= 0) { - S1(M); - } - S1(M+1); -} diff --git a/cloog-0.17.0/test/isl/unroll2.cloog b/cloog-0.17.0/test/isl/unroll2.cloog deleted file mode 100644 index d725478b1b83e5e3bc3b351c331dadbd653dd748..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/unroll2.cloog +++ /dev/null @@ -1,14 +0,0 @@ -C - -[n] -> { : } - -0 - -1 - -[n] -> { [i] : 0 <= i and n <= i <= n + 1 <= 10 } -0 0 0 - -0 - -0 diff --git a/cloog-0.17.0/test/isl/unroll2.good.c b/cloog-0.17.0/test/isl/unroll2.good.c deleted file mode 100644 index 537b3b17921e9a59cf25a5b7ca3aed736521cc85..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/isl/unroll2.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/isl/unroll2.cloog by CLooG 0.16.3-13-g27516e4 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - if ((M >= -1) && (M <= 9)) { - for (i=max(0,M);i<=M+1;i++) { - S1(i); - } - } -} diff --git a/cloog-0.17.0/test/largeur.c b/cloog-0.17.0/test/largeur.c deleted file mode 100644 index ff49b940355ad49b943db270793a508fc7d6a2dc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/largeur.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/largeur.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 1) { - for (c1=1;c1<=M;c1++) { - for (c2=1;c2<=c1;c2++) { - S1(c2,c1) ; - } - } -} diff --git a/cloog-0.17.0/test/largeur.cloog b/cloog-0.17.0/test/largeur.cloog deleted file mode 100644 index fe372da4b15b348370da587c606b1af9e3fbd4c7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/largeur.cloog +++ /dev/null @@ -1,26 +0,0 @@ -# language: C -c - -# parameters {n | n>= 0} -1 3 -1 1 0 -0 - -1 # Number of statements - -1 -# {i, j | 1<=i<=n i<=j<=n} -4 5 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 0 -1 0 -1 1 0 -0 0 0 -0 - -1 # Scattering functions -# Et les instructions de chunking... -2 7 -0 1 0 0 -1 0 0 -0 0 1 -1 0 0 0 -0 diff --git a/cloog-0.17.0/test/largeur.good.c b/cloog-0.17.0/test/largeur.good.c deleted file mode 100644 index 10f63edb30dce455cd4a1e0982fce3c1bf804e4f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/largeur.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/largeur.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=1;c1<=M;c1++) { - for (c2=1;c2<=c1;c2++) { - S1(c2,c1) ; - } - } -} diff --git a/cloog-0.17.0/test/levenshtein-1-2-3.c b/cloog-0.17.0/test/levenshtein-1-2-3.c deleted file mode 100644 index 224bd294c1cd2bd620a6d4546536f1094edce8ea..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/levenshtein-1-2-3.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.12s. */ -S1(0,0) ; -S2(1,0) ; -S3(1,1) ; -for (i=2;i<=N;i++) { - S2(i,0) ; - for (j=1;j<=i-1;j++) { - S6(i,j) ; - } - S3(i,i) ; -} -S7(N+1,0) ; -for (j=1;j<=N;j++) { - S6(N+1,j) ; - S8(N+1,j) ; -} -for (i=N+2;i<=2*M-N-2;i++) { - j = floord(i-N-1,2) ; - S7(i,j) ; - if ((i+N)%2 == 0) { - S5(i,(i-N)/2) ; - S8(i,(i-N)/2) ; - } - for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) { - S6(i,j) ; - S8(i,j) ; - } - if ((i+N)%2 == 0) { - S4(i,(i+N)/2) ; - S8(i,(i+N)/2) ; - } -} -for (i=2*M-N-1;i<=2*M-2;i++) { - for (j=i-M+1;j<=M-1;j++) { - S6(i,j) ; - } -} diff --git a/cloog-0.17.0/test/levenshtein-1-2-3.cloog b/cloog-0.17.0/test/levenshtein-1-2-3.cloog deleted file mode 100644 index acc6522e8686d73a5fbffd2baef7a6b02fed3fc9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/levenshtein-1-2-3.cloog +++ /dev/null @@ -1,110 +0,0 @@ -# language: C -c - -# Context -# {length,width | width+2<=length; 1<=width} -3 4 -# M N 1 -1 1 -1 -2 -1 0 1 -1 -1 0 0 1 -0 - -8 # Number of statements - -1 -# {t1,t2,length,width | t1=0; t2=0; width+2<=length; 1<=width} -5 6 -# i j M N 1 -0 1 0 0 0 0 -0 0 1 0 0 0 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | 1<=t1<=width; t2=0; width+2<=length} -5 6 -# i j M N 1 -0 0 1 0 0 0 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=t2; 1<=t2<=width; width+2<=length} -5 6 -# i j M N 1 -0 1 -1 0 0 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2-width; width+1<=t2<=length-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 1 0 -1 0 1 0 -1 -1 -1 0 -1 1 0 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2+width; 1<=t2<=length-width-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 -1 0 -1 0 1 0 0 -1 -1 0 -1 1 -1 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (2t2-width+1,t2+1)<=t1<=(t2+length-1,2t2+width-1); 1<=t2<=length-1; width+2<=length} -8 6 -# i j M N 1 -1 1 -2 0 1 -1 -1 1 -1 0 0 -1 -1 -1 1 1 0 -1 -1 -1 2 0 1 -1 -1 0 1 0 0 -1 -1 0 -1 1 0 -1 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2+width+1)<=t1<=(2length-width-2,2t2+width+2); width+2<=length; 1<=width} -6 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 -1 -1 -1 -1 0 2 -1 -2 -1 -1 2 0 1 2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2-width)<=t1<=(2t2+width,2length-width-2); width+2<=length; 1<=width} -7 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 1 0 -1 -1 2 0 1 0 -1 -1 0 2 -1 -2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/levenshtein-1-2-3.good.c b/cloog-0.17.0/test/levenshtein-1-2-3.good.c deleted file mode 100644 index 76548ea2ed3153f4c219c2623eb01a6db6cef2b0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/levenshtein-1-2-3.good.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j) { hash(5); hash(i); hash(j); } -#define S6(i,j) { hash(6); hash(i); hash(j); } -#define S7(i,j) { hash(7); hash(i); hash(j); } -#define S8(i,j) { hash(8); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - S1(0,0) ; - S2(1,0) ; - S3(1,1) ; - for (i=2;i<=N;i++) { - S2(i,0) ; - for (j=1;j<=i-1;j++) { - S6(i,j) ; - } - S3(i,i) ; - } - i = N+1 ; - S7(N+1,0) ; - for (j=1;j<=N;j++) { - S6(N+1,j) ; - S8(N+1,j) ; - } - for (i=N+2;i<=2*M-N-2;i++) { - j = floord(i-N-1,2) ; - S7(i,j) ; - if ((i+N)%2 == 0) { - j = (i-N)/2 ; - S5(i,(i-N)/2) ; - S8(i,(i-N)/2) ; - } - for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) { - S6(i,j) ; - S8(i,j) ; - } - if ((i+N)%2 == 0) { - j = (i+N)/2 ; - S4(i,(i+N)/2) ; - S8(i,(i+N)/2) ; - } - } - for (i=2*M-N-1;i<=2*M-2;i++) { - for (j=i-M+1;j<=M-1;j++) { - S6(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/levenshtein-1-2-3f.cloog b/cloog-0.17.0/test/levenshtein-1-2-3f.cloog deleted file mode 100644 index c78bc1955590757ec9e64a8a32df455796e983a2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/levenshtein-1-2-3f.cloog +++ /dev/null @@ -1,110 +0,0 @@ -# language: FORTRAN -f - -# Context -# {length,width | width+2<=length; 1<=width} -3 4 -# M N 1 -1 1 -1 -2 -1 0 1 -1 -1 0 0 1 -0 - -8 # Number of statements - -1 -# {t1,t2,length,width | t1=0; t2=0; width+2<=length; 1<=width} -5 6 -# i j M N 1 -0 1 0 0 0 0 -0 0 1 0 0 0 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | 1<=t1<=width; t2=0; width+2<=length} -5 6 -# i j M N 1 -0 0 1 0 0 0 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=t2; 1<=t2<=width; width+2<=length} -5 6 -# i j M N 1 -0 1 -1 0 0 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2-width; width+1<=t2<=length-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 1 0 -1 0 1 0 -1 -1 -1 0 -1 1 0 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | t1=2t2+width; 1<=t2<=length-width-1; 1<=width} -5 6 -# i j M N 1 -0 1 -2 0 -1 0 -1 0 1 0 0 -1 -1 0 -1 1 -1 -1 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (2t2-width+1,t2+1)<=t1<=(t2+length-1,2t2+width-1); 1<=t2<=length-1; width+2<=length} -8 6 -# i j M N 1 -1 1 -2 0 1 -1 -1 1 -1 0 0 -1 -1 -1 1 1 0 -1 -1 -1 2 0 1 -1 -1 0 1 0 0 -1 -1 0 -1 1 0 -1 -1 0 0 1 -1 -2 -1 0 0 0 0 1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2+width+1)<=t1<=(2length-width-2,2t2+width+2); width+2<=length; 1<=width} -6 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 -1 -1 -1 -1 0 2 -1 -2 -1 -1 2 0 1 2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -0 0 0 - -1 -# {t1,t2,length,width | (width+1,2t2-width)<=t1<=(2t2+width,2length-width-2); width+2<=length; 1<=width} -7 6 -# i j M N 1 -1 1 0 0 -1 -1 -1 1 -2 0 1 0 -1 -1 2 0 1 0 -1 -1 0 2 -1 -2 -1 0 0 1 -1 -2 -1 0 0 0 1 -1 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/levenshtein-1-2-3f.f b/cloog-0.17.0/test/levenshtein-1-2-3f.f deleted file mode 100644 index 5a579501fa43537772ed39b634b8fb4463d93b13..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/levenshtein-1-2-3f.f +++ /dev/null @@ -1,37 +0,0 @@ -! Generated from ../../../git/cloog/test/levenshtein-1-2-3f.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.11s. -S1(0,0) -S2(1,0) -S3(1,1) -DO i=2, N - S2(i,0) - DO j=1, i-1 - S6(i,j) - END DO - S3(i,i) -END DO -S7(N+1,0) -DO j=1, N - S6(N+1,j) - S8(N+1,j) -END DO -DO i=N+2, 2*M-N-2 - j = FLOOR(REAL(i-N-1)/REAL(2)) - S7(i,j) - IF (MOD(i+N, 2) == 0) THEN - S5(i,(i-N)/2) - S8(i,(i-N)/2) - END IF - DO j=CEILING(REAL(i-N+1)/REAL(2)), FLOOR(REAL(i+N-1)/REAL(2)) - S6(i,j) - S8(i,j) - END DO - IF (MOD(i+N, 2) == 0) THEN - S4(i,(i+N)/2) - S8(i,(i+N)/2) - END IF -END DO -DO i=2*M-N-1, 2*M-2 - DO j=i-M+1, M-1 - S6(i,j) - END DO -END DO diff --git a/cloog-0.17.0/test/lex.c b/cloog-0.17.0/test/lex.c deleted file mode 100644 index 52df96d233ed55c910bbc8042f89830e1f8140e7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lex.c +++ /dev/null @@ -1,5 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lex.cloog by CLooG 0.14.0-234-g330f397 gmp bits in 0.00s. */ -for (c1=0;c1<=10;c1++) { - S2(c1); - S1(c1); -} diff --git a/cloog-0.17.0/test/lex.cloog b/cloog-0.17.0/test/lex.cloog deleted file mode 100644 index a7e2b8876fdd448659c6df07a21fc77d30baa3ba..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lex.cloog +++ /dev/null @@ -1,35 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -2 3 -1 1 0 -1 -1 10 -0 0 0 - -1 -2 3 -1 1 0 -1 -1 10 -0 0 0 - -0 - -2 - -3 6 -0 -1 0 0 1 0 -0 0 -1 0 0 0 -0 0 0 -1 0 0 - -3 6 -0 -1 0 0 1 0 -0 0 -1 0 0 -1 -0 0 0 -1 0 0 - -0 diff --git a/cloog-0.17.0/test/lex.good.c b/cloog-0.17.0/test/lex.good.c deleted file mode 100644 index 4769fb106758a693259940710d622461057d70da..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lex.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lex.cloog by CLooG 0.14.0-234-g330f397 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - for (c1=0;c1<=10;c1++) { - S2(c1); - S1(c1); - } -} diff --git a/cloog-0.17.0/test/lineality-1-2.c b/cloog-0.17.0/test/lineality-1-2.c deleted file mode 100644 index 9bd902e9571e0e1716584887f3157fc91bf25691..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lineality-1-2.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lineality-1-2.cloog by CLooG 0.14.0-284-g5c046c9 gmp bits in 0.00s. */ -for (i=1;i<=M;i++) { - for (j=1;j<=i-1;j++) { - S1(i,j); - } - S1(i,i); - S2(i,i); - for (j=i+1;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/lineality-1-2.cloog b/cloog-0.17.0/test/lineality-1-2.cloog deleted file mode 100644 index 7629fd8deaa6a3df6fa5e3032dc68c1ac55e7873..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lineality-1-2.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# Context -# {M | 2<=M} -2 3 -# M 1 -1 1 -2 -1 0 1 -0 - -2 # Number of statements - -1 -# {i,j,M | 1<=i<=M; 1<=j<=M} -5 5 -# i j M 1 -1 1 0 0 -1 -1 0 1 0 -1 -1 -1 0 1 0 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 - -1 -# {i,j,M | i=j; 1<=j<=M} -4 5 -# i j M 1 -0 1 -1 0 0 -1 0 1 0 -1 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/lineality-1-2.good.c b/cloog-0.17.0/test/lineality-1-2.good.c deleted file mode 100644 index d28268f23f07b92d4bb819cb0ce5959ac6db0678..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lineality-1-2.good.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/lineality-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - S1(1,1) ; - S2(1,1) ; - for (j=2;j<=M;j++) { - S1(1,j) ; - } - for (i=2;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - S1(i,j) ; - } - S1(i,i) ; - S2(i,i) ; - for (j=i+1;j<=M;j++) { - S1(i,j) ; - } - } - for (j=1;j<=M-1;j++) { - S1(M,j) ; - } - S1(M,M) ; - S2(M,M) ; -} diff --git a/cloog-0.17.0/test/lineality-2-1-2.c b/cloog-0.17.0/test/lineality-2-1-2.c deleted file mode 100644 index 37a7e2a7f200f6f2d030232c51c6d38299dd042a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lineality-2-1-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/lineality-2-1-2.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -for (i=1;i<=M;i++) { - for (j=1;j<=min(M,i+1);j++) { - S1(i,j); - } - if (i >= M-1) { - S2(i,i+2); - } - if (i <= M-2) { - S1(i,i+2); - S2(i,i+2); - } - for (j=i+3;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/lineality-2-1-2.cloog b/cloog-0.17.0/test/lineality-2-1-2.cloog deleted file mode 100644 index a6ae5e1a249d4e352d8ae3ab750afccf280c0b9f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lineality-2-1-2.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# Context -# {M | 2<=M} -2 3 -# M 1 -1 1 -2 -1 0 1 -0 - -2 # Number of statements - -1 -# {i,j,M | 1<=i<=M; 1<=j<=M} -5 5 -# i j M 1 -1 1 0 0 -1 -1 0 1 0 -1 -1 -1 0 1 0 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 - -1 -# {i,j,M | i=j-2; 3<=j<=M+2} -4 5 -# i j M 1 -0 1 -1 0 2 -1 0 1 0 -3 -1 0 -1 1 2 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/lineality-2-1-2.good.c b/cloog-0.17.0/test/lineality-2-1-2.good.c deleted file mode 100644 index 78d812669e1dd2cdb18f407a32bb9c04546a5417..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lineality-2-1-2.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/lineality-2-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (i=1;i<=M-3;i++) { - for (j=1;j<=i+1;j++) { - S1(i,j) ; - } - j = i+2 ; - S1(i,i+2) ; - S2(i,i+2) ; - for (j=i+3;j<=M;j++) { - S1(i,j) ; - } - } - if (M >= 3) { - i = M-2 ; - for (j=1;j<=M-1;j++) { - S1(M-2,j) ; - } - S1(M-2,M) ; - S2(M-2,M) ; - } - for (i=M-1;i<=M;i++) { - for (j=1;j<=M;j++) { - S1(i,j) ; - } - j = i+2 ; - S2(i,i+2) ; - } -} diff --git a/cloog-0.17.0/test/logo.c b/cloog-0.17.0/test/logo.c deleted file mode 100644 index 54d229ded1fef0a23028b12f9ee8b3d401831f7f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/logo.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/logo.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -for (j=0;j<=7;j++) { - S1(1,j); -} -for (i=2;i<=6;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j); - } - for (j=i-1;j<=4;j++) { - S1(i,j); - S2(i,j); - } - for (j=5;j<=7;j++) { - S1(i,j); - } -} -for (i=7;i<=8;i++) { - for (j=i-1;j<=7;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/logo.cloog b/cloog-0.17.0/test/logo.cloog deleted file mode 100644 index 5583c29fda0744d734e5b99faa3e7cac7fd58313..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/logo.cloog +++ /dev/null @@ -1,30 +0,0 @@ -# language: C -c - -# Context -1 3 -# n 1 -1 0 1 -0 - -2 # Number of statements - -1 -3 5 -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 0 -1 0 7 # j <= 7 -1 -1 1 0 1 # j >= i-1 -0 0 0 - -1 -4 5 -# i j n 1 -1 1 0 0 -2 # i >= 2 -1 -1 0 0 6 # i <= 6 -1 0 1 0 0 # j >= 0 -1 0 -1 0 4 # j <= 4 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/logo.good.c b/cloog-0.17.0/test/logo.good.c deleted file mode 100644 index 203e5ac5087846ed7744bfcd3ee3dc63cc3ba51b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/logo.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/logo.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (j=0;j<=7;j++) { - S1(1,j) ; - } - for (i=2;i<=5;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j) ; - } - for (j=i-1;j<=4;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=5;j<=7;j++) { - S1(i,j) ; - } - } - for (j=0;j<=4;j++) { - S2(6,j) ; - } - for (j=5;j<=7;j++) { - S1(6,j) ; - } - for (i=7;i<=8;i++) { - for (j=i-1;j<=7;j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/logopar.c b/cloog-0.17.0/test/logopar.c deleted file mode 100644 index 0b2c8f9f4d6219fc0d933c14287d665f94e54012..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/logopar.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/logopar.cloog by CLooG 0.14.0-284-g5c046c9 gmp bits in 0.00s. */ -for (j=0;j<=m;j++) { - S1(1,j); -} -for (i=2;i<=n;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j); - } - for (j=i-1;j<=n;j++) { - S1(i,j); - S2(i,j); - } - for (j=n+1;j<=m;j++) { - S1(i,j); - } -} -for (i=n+1;i<=m+1;i++) { - for (j=i-1;j<=m;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/logopar.cloog b/cloog-0.17.0/test/logopar.cloog deleted file mode 100644 index 37114ae7940e04cca785fa9fb81d2c25485add5c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/logopar.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# Context -3 4 -# m n 1 -1 1 -1 0 # m > n -1 1 0 0 # m >= 0 -1 0 1 -2 # n >= 2 -1 -m n - -2 # Number of statements - -1 -3 6 -# i j m n 1 -1 1 0 0 0 -1 # i >= 1 -1 0 -1 1 0 0 # j <= m -1 -1 1 0 0 1 # j >= i-1 -0 0 0 - -1 -4 6 -# i j m n 1 -1 1 0 0 0 -2 # i >= 2 -1 -1 0 0 1 0 # i <= n -1 0 1 0 0 0 # j >= 0 -1 0 -1 0 1 0 # j <= n -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/logopar.good.c b/cloog-0.17.0/test/logopar.good.c deleted file mode 100644 index 2b03ca284947e5dcebdb1c434a42817d214988c9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/logopar.good.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Generated from ../../../git/cloog/test/logopar.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int m, int n) -{ - /* Original iterators. */ - int i, j; - for (j=0;j<=m;j++) { - S1(1,j) ; - } - if (m >= n+1) { - for (i=2;i<=n;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j) ; - } - for (j=i-1;j<=n;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=n+1;j<=m;j++) { - S1(i,j) ; - } - } - } - if (m == n) { - for (i=2;i<=n;i++) { - for (j=0;j<=i-2;j++) { - S2(i,j) ; - } - for (j=i-1;j<=n;j++) { - S1(i,j) ; - S2(i,j) ; - } - } - } - for (i=n+1;i<=m+1;i++) { - for (j=i-1;j<=m;j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/lu.c b/cloog-0.17.0/test/lu.c deleted file mode 100644 index 74ec81f82f080abfd74ff5b0eb3addcfffe1ac5a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lu.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ -if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j); - } - for (c1=2;c1<=n-1;c1++) { - for (c2=2;c2<=n;c2++) { - for (i=1;i<=min(c1-1,c2-1);i++) { - S2(i,c2,c1); - } - } - for (j=c1+1;j<=n;j++) { - S1(c1,j); - } - } - for (c2=2;c2<=n;c2++) { - for (i=1;i<=c2-1;i++) { - S2(i,c2,n); - } - } -} diff --git a/cloog-0.17.0/test/lu.cloog b/cloog-0.17.0/test/lu.cloog deleted file mode 100644 index 77530069cedea210e4d185d97340b19298c13792..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lu.cloog +++ /dev/null @@ -1,47 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -1 -n - -2 # Number of statements - -1 -# {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -0 - -2 # Scattering functions -# Et les instructions de chunking... -2 7 -# c1 c2 i j n 1 -0 1 0 -1 0 0 0 -0 0 1 0 0 -1 0 - -2 8 -# c1 c2 i j k n 1 -0 1 0 0 0 -1 0 0 -0 0 1 0 -1 0 0 0 -0 diff --git a/cloog-0.17.0/test/lu.good.c b/cloog-0.17.0/test/lu.good.c deleted file mode 100644 index 5e9d3d2fc48a015236bd30b41a0f2ef10340a737..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lu.good.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j, k; - if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j) ; - } - } - for (c1=2;c1<=n-1;c1++) { - for (c2=2;c2<=n-1;c2++) { - for (i=1;i<=min(c2-1,c1-1);i++) { - S2(i,c2,c1) ; - } - } - for (i=1;i<=c1-1;i++) { - S2(i,n,c1) ; - } - for (j=c1+1;j<=n;j++) { - S1(c1,j) ; - } - } - if (n >= 2) { - for (c2=2;c2<=n;c2++) { - for (i=1;i<=c2-1;i++) { - S2(i,c2,n) ; - } - } - } -} diff --git a/cloog-0.17.0/test/lu2.c b/cloog-0.17.0/test/lu2.c deleted file mode 100644 index 2f3b34bf7d1458df4fe3c1982b4cf1237402eb6d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lu2.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu2.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ -if (n >= 2) { - for (l=2;l<=n;l++) { - S1(1,n,1,l); - } - for (i=2;i<=n-1;i++) { - for (j=2;j<=n;j++) { - for (k=1;k<=min(i-1,j-1);k++) { - S2(i,j,k,j,i); - } - } - for (l=i+1;l<=n;l++) { - S1(i,n,i,l); - } - } - for (j=2;j<=n;j++) { - for (k=1;k<=j-1;k++) { - S2(n,j,k,j,n); - } - } -} diff --git a/cloog-0.17.0/test/lu2.cloog b/cloog-0.17.0/test/lu2.cloog deleted file mode 100644 index 5775e4939896c7404769c362c07512b6097aeb45..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lu2.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# language: C -c - -# parameter n -1 3 -1 0 1 -1 -n - -2 # Number of statements - -1 -# {c1, c2, i, j | c1=i, c2=n, 1<=i<=n; i+1<=j<=n} -6 7 -0 1 0 -1 0 0 0 -0 0 1 0 0 -1 0 -1 0 0 1 0 0 -1 -1 0 0 -1 0 1 0 -1 0 0 -1 1 0 -1 -1 0 0 0 -1 1 0 -0 0 0 - -1 -# {c1, c2, i, j, k | c1=k, c2=j, 1<=i<=n; i+1<=j<=n i+1<=k<=n} -8 8 -0 1 0 0 0 -1 0 0 -0 0 1 0 -1 0 0 0 -1 0 0 1 0 0 0 -1 -1 0 0 -1 0 0 1 0 -1 0 0 -1 1 0 0 -1 -1 0 0 0 -1 0 1 0 -1 0 0 -1 0 1 0 -1 -1 0 0 0 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/lu2.good.c b/cloog-0.17.0/test/lu2.good.c deleted file mode 100644 index 56418569262198b46aba5fa93e67d87b36edc29d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lu2.good.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Generated from ../../../git/cloog/test/lu2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } -#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } - -void test(int n) -{ - /* Original iterators. */ - int i, j, k, l, m; - if (n >= 2) { - for (l=2;l<=n;l++) { - S1(1,n,1,l) ; - } - } - for (i=2;i<=n-1;i++) { - for (j=2;j<=n-1;j++) { - for (k=1;k<=min(j-1,i-1);k++) { - S2(i,j,k,j,i) ; - } - } - for (k=1;k<=i-1;k++) { - S2(i,n,k,n,i) ; - } - for (l=i+1;l<=n;l++) { - S1(i,n,i,l) ; - } - } - if (n >= 2) { - for (j=2;j<=n;j++) { - for (k=1;k<=j-1;k++) { - S2(n,j,k,j,n) ; - } - } - } -} diff --git a/cloog-0.17.0/test/lub.c b/cloog-0.17.0/test/lub.c deleted file mode 100644 index 43269a4f20d7f763d9b939cfbd7728a7cc55ba1e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lub.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/lub.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 2) { - for (i=1;i<=M-1;i++) { - for (j=i+1;j<=M;j++) { - S1(i,j) ; - for (k=i+1;k<=M;k++) { - S2(i,j,k) ; - S3(i,j,k) ; - } - S4(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/lub.cloog b/cloog-0.17.0/test/lub.cloog deleted file mode 100644 index fcab9b59f658added2bc1f4785803aa10f9ee674..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lub.cloog +++ /dev/null @@ -1,58 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -4 # Number of statements - -1 -# {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 - -1 -# {i, j | 1<=i<=n; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions - diff --git a/cloog-0.17.0/test/lub.good.c b/cloog-0.17.0/test/lub.good.c deleted file mode 100644 index 3122a3cbe277a1263675373b3fdcca61d39e662f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lub.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/lub.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j, k; - for (i=1;i<=M-1;i++) { - for (j=i+1;j<=M;j++) { - S1(i,j) ; - for (k=i+1;k<=M;k++) { - S2(i,j,k) ; - S3(i,j,k) ; - } - S4(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/lux.c b/cloog-0.17.0/test/lux.c deleted file mode 100644 index d313e3a90e9d7d027df8fcc0638fd9dcbcd830ba..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lux.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/lux.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 2) { - for (l=2;l<=M;l++) { - S1(1,1,M,l) ; - } - for (i=2;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - for (k=j+1;k<=M;k++) { - S2(i,j,k,k,i) ; - } - } - for (l=i+1;l<=M;l++) { - S1(i,i,M,l) ; - } - } - for (j=1;j<=M-1;j++) { - for (k=j+1;k<=M;k++) { - S2(M,j,k,k,M) ; - } - } -} diff --git a/cloog-0.17.0/test/lux.cloog b/cloog-0.17.0/test/lux.cloog deleted file mode 100644 index 1687e32c82cbb49b84f68ca0650d5839a077e0e5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lux.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# parameter n -1 3 -1 0 1 -0 - -2 # Number of statements - -1 -# {c1, c2, i, j | c1=i, c2=n, 1<=i<=n; i+1<=j<=n} -6 7 -0 1 -1 0 0 0 0 -0 0 0 1 0 -1 0 -1 0 1 0 0 0 -1 -1 0 -1 0 0 1 0 -1 0 -1 0 1 0 -1 -1 0 0 0 -1 1 0 -0 0 0 - -1 -# {c1, c2, i, j, k | c1=k, c2=j, 1<=i<=n; i+1<=j<=n i+1<=k<=n} -8 8 -0 1 0 0 0 -1 0 0 -0 0 0 -1 1 0 0 0 -1 0 1 0 0 0 0 -1 -1 0 -1 0 0 0 1 0 -1 0 -1 1 0 0 0 -1 -1 0 0 -1 0 0 1 0 -1 0 -1 0 0 1 0 -1 -1 0 0 0 0 -1 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/lux.good.c b/cloog-0.17.0/test/lux.good.c deleted file mode 100644 index e30289c16f3c64a6e080a70636ca08ce2dc8c6fc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/lux.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/lux.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } -#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } - -void test(int M) -{ - /* Original iterators. */ - int i, j, k, l, m; - if (M >= 2) { - for (l=2;l<=M;l++) { - S1(1,1,M,l) ; - } - } - for (i=2;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - for (k=j+1;k<=M;k++) { - S2(i,j,k,k,i) ; - } - } - for (l=i+1;l<=M;l++) { - S1(i,i,M,l) ; - } - } - if (M >= 2) { - for (j=1;j<=M-1;j++) { - for (k=j+1;k<=M;k++) { - S2(M,j,k,k,M) ; - } - } - } -} diff --git a/cloog-0.17.0/test/merge.c b/cloog-0.17.0/test/merge.c deleted file mode 100644 index b85ca1c2e1392deeaea93fe203a4a1b44adb9aa0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/merge.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/merge.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.00s. */ -S1(0); -for (c1=0;c1<=10;c1++) { - if (c1 >= 2) { - S2(c1); - } - S3(c1); -} diff --git a/cloog-0.17.0/test/merge.cloog b/cloog-0.17.0/test/merge.cloog deleted file mode 100644 index d98c1d0b8a3b0b39a2c06cd416717add4ee861e6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/merge.cloog +++ /dev/null @@ -1,42 +0,0 @@ -c - -0 2 - -0 - -3 - -1 -1 3 -0 -1 0 -0 0 0 - -1 -2 3 -1 1 -2 -1 -1 10 -0 0 0 - -1 -2 3 -1 1 0 -1 -1 10 -0 0 0 - -0 - -3 - -2 5 -0 1 0 -1 0 -0 0 1 0 0 - -2 5 -0 1 0 -1 0 -0 0 1 0 -1 - -2 5 -0 1 0 -1 0 -0 0 1 0 -2 - -0 diff --git a/cloog-0.17.0/test/merge.good.c b/cloog-0.17.0/test/merge.good.c deleted file mode 100644 index 283dc4b753667d64c06db28abb60c6794038513a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/merge.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/merge.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } -#define S3(i) { hash(3); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - for (c1=0;c1<=10;c1++) { - if (c1 == 0) { - S1(0) ; - } - if (c1 >= 2) { - S2(c1) ; - } - S3(c1) ; - } -} diff --git a/cloog-0.17.0/test/min-1-1.c b/cloog-0.17.0/test/min-1-1.c deleted file mode 100644 index 896fea083e3046e9854d39eeff1a0e133bc45273..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-1-1.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-1-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((M >= 0) && (N >= 1)) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(M,i),-i+N);j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/min-1-1.cloog b/cloog-0.17.0/test/min-1-1.cloog deleted file mode 100644 index a15cdbd44ac2e6b507b025cd2754a45babc54b3d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-1-1.cloog +++ /dev/null @@ -1,27 +0,0 @@ -# language: C -c - -# Context -# {M,N | 1>=0} -1 4 -# M N 1 -1 0 0 1 -0 - -1 # Number of statements - -1 -# {i,j |1<=i<=N; 0<=j<=M; j<=i; j+i<=N}, i.e. -# {i,j | (1,j)<=i<=-j+N; 0<=j<=M} -6 6 -# i j M N 1 -1 1 0 0 0 -1 -1 0 1 0 0 0 -1 0 -1 1 0 0 -1 1 -1 0 0 0 -1 -1 -1 0 1 0 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/min-1-1.good.c b/cloog-0.17.0/test/min-1-1.good.c deleted file mode 100644 index ff0d5fc7ffd1f7f677de8ae70aca25292937185f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-1-1.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-1-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - if (M >= 0) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(i,-i+N),M);j++) { - S1(i,j) ; - } - } - } -} diff --git a/cloog-0.17.0/test/min-2-1.c b/cloog-0.17.0/test/min-2-1.c deleted file mode 100644 index f7161bcbaf9ccdb576ee77cc5ce7b0eee2e6e3d1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-2-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-2-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((M >= 0) && (N >= 1)) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(M,i),-i+N);j++) { - for (k=0;k<=min(min(M,i),-i+N);k++) { - S1(i,j,k) ; - } - } - } -} diff --git a/cloog-0.17.0/test/min-2-1.cloog b/cloog-0.17.0/test/min-2-1.cloog deleted file mode 100644 index 0c1ed371b25bcdcea1015e65a309424de74898aa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-2-1.cloog +++ /dev/null @@ -1,31 +0,0 @@ -# language: C -c - -# Context -# {M,N | 1>=0} -1 4 -# M N 1 -1 0 0 1 -0 - -1 # Number of statements - -1 -# {i,j |1<=i<=N; 0<=j<=M; j<=i; j+i<=N}, i.e. -# {i,j | (1,j)<=i<=-j+N; 0<=j<=M} -10 7 -# i j k M N 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 0 0 -1 0 -1 0 1 0 0 -1 1 -1 0 0 0 0 -1 -1 -1 0 0 1 0 -1 0 0 1 0 0 0 -1 0 0 -1 1 0 0 -1 1 0 -1 0 0 0 -1 -1 0 -1 0 1 0 -1 0 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/min-2-1.good.c b/cloog-0.17.0/test/min-2-1.good.c deleted file mode 100644 index e052a0c00bb8a071ce842560c078fba30fbef0ed..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-2-1.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-2-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j, k; - if (M >= 0) { - for (i=1;i<=N;i++) { - for (j=0;j<=min(min(i,M),-i+N);j++) { - for (k=0;k<=min(min(M,i),-i+N);k++) { - S1(i,j,k) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/min-3-1.c b/cloog-0.17.0/test/min-3-1.c deleted file mode 100644 index 5736a3cd08a189a1581c7316276ff9a12df7a62e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-3-1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-3-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=0;i<=min(10,M);i++) { - for (j=0;j<=min(10,M);j++) { - S1(i,j) ; - } -} diff --git a/cloog-0.17.0/test/min-3-1.cloog b/cloog-0.17.0/test/min-3-1.cloog deleted file mode 100644 index f1a3c125bb62c1ffa19d08bc99038e2727a73488..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-3-1.cloog +++ /dev/null @@ -1,27 +0,0 @@ -# language: C -c - -# Context -2 3 -# M 1 -1 1 0 -1 0 1 -0 - -1 # Number of statements - -1 -# -7 5 -# i j M 1 -1 1 0 0 0 -1 -1 0 1 0 -1 -1 0 0 10 -1 0 1 0 0 -1 0 -1 1 0 -1 0 -1 0 10 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/min-3-1.good.c b/cloog-0.17.0/test/min-3-1.good.c deleted file mode 100644 index ec50b387994a81f78cafa26bedc67b887b1ccc8c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-3-1.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-3-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=min(10,M);i++) { - for (j=0;j<=min(10,M);j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/min-4-1.c b/cloog-0.17.0/test/min-4-1.c deleted file mode 100644 index 91e5e657967bd5d7bfe96e6339809c1b1ffa9850..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-4-1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-4-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((M >= -N) && (M >= -O) && (N >= 0) && (N >= -O)) { - for (i=max(-M,-N);i<=min(N,O);i++) { - S1(i) ; - } -} diff --git a/cloog-0.17.0/test/min-4-1.cloog b/cloog-0.17.0/test/min-4-1.cloog deleted file mode 100644 index 5cce62fceb7234ed0e5bb01ea6416108af27bddf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-4-1.cloog +++ /dev/null @@ -1,25 +0,0 @@ -# language: C -c - -# Context -# {L,M,N|} -1 5 -# L M N 1 -1 0 0 0 1 -0 - -1 # Number of statements - -1 -# {i|-L,-M <= i <= M, N} -5 6 -# i L M N 1 -1 1 1 0 0 0 -1 1 0 1 0 0 -1 -1 0 1 0 0 -1 -1 0 0 1 0 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/min-4-1.good.c b/cloog-0.17.0/test/min-4-1.good.c deleted file mode 100644 index a04831fea85e439ddaffbf01244cb8bb7f4707a8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/min-4-1.good.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/min-4-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M, int N, int O) -{ - /* Original iterators. */ - int i; - for (i=max(-M,-N);i<=min(O,N);i++) { - S1(i) ; - } -} diff --git a/cloog-0.17.0/test/mod4.c b/cloog-0.17.0/test/mod4.c deleted file mode 100644 index 6a1ad6ab1b2ebe6905f687faefc0657996cf8c97..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/mod4.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/mod4.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.00s. */ -for (j=2;j<=10;j+=3) { - S1(j,(j+1)/3,(j+1)/3,2,(j-2)/3); - S2(j,(j+1)/3,(j+1)/3,2,(j-2)/3); - S3(j,(j+1)/3,(j+1)/3,2,(j-2)/3); -} diff --git a/cloog-0.17.0/test/mod4.cloog b/cloog-0.17.0/test/mod4.cloog deleted file mode 100644 index 6f3eecd560b003948df3b30b79a27cca5cd11824..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/mod4.cloog +++ /dev/null @@ -1,72 +0,0 @@ -# language: C -c - -# parameters -1 2 -1 1 - 0 - - -3 - - - -# S1: ND_4IP_3 -1 -11 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 0 10 - 0 0 0 0 1 0 -2 - 1 -1 0 0 0 3 2 - 1 -1 0 0 0 3 2 - 1 1 0 0 0 -3 0 - 0 1 0 0 -1 -3 0 - 1 1 -3 0 0 0 2 - 1 -1 3 0 0 0 0 - 1 1 0 -3 0 0 1 - 1 -1 0 3 0 0 1 - 0 0 0 - - - -# S2: W:ND_4OP_1 -1 -13 7 - 1 0 1 0 0 -1 -1 - 1 0 0 3 0 -3 -2 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 0 10 - 0 0 0 0 1 0 -2 - 1 -1 0 0 0 3 2 - 1 -1 0 0 0 3 2 - 1 1 0 0 0 -3 0 - 0 1 0 0 -1 -3 0 - 1 1 -3 0 0 0 2 - 1 -1 3 0 0 0 0 - 1 1 0 -3 0 0 1 - 1 -1 0 3 0 0 1 - 0 0 0 - - - -# S3: ND_4 -1 -11 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 0 10 - 0 0 0 0 1 0 -2 - 1 -1 0 0 0 3 2 - 1 -1 0 0 0 3 2 - 1 1 0 0 0 -3 0 - 0 1 0 0 -1 -3 0 - 1 1 -3 0 0 0 2 - 1 -1 3 0 0 0 0 - 1 1 0 -3 0 0 1 - 1 -1 0 3 0 0 1 - 0 0 0 - - - 1 - j div41 div42 mod6 mod6_a - 0 - 0 diff --git a/cloog-0.17.0/test/mode.c b/cloog-0.17.0/test/mode.c deleted file mode 100644 index c527eedffe55d970ca2fe0bd5703f9299de24e9b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/mode.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/mode.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -if (M >= 0) { - if (N >= 0) { - for (i=0;i<=M;i++) { - for (j=0;j<=min(N,i);j++) { - S1(i,j); - S2(i,j); - } - for (j=N+1;j<=i;j++) { - S1(i,j); - } - for (j=i+1;j<=N;j++) { - S2(i,j); - } - } - } - if (N <= -1) { - for (i=0;i<=M;i++) { - for (j=0;j<=i;j++) { - S1(i,j); - } - } - } -} diff --git a/cloog-0.17.0/test/mode.cloog b/cloog-0.17.0/test/mode.cloog deleted file mode 100644 index caeecb85928c2caa4d6fb91518ef11aa4102ff67..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/mode.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# parameters n m -1 4 -# n m 1 -1 0 0 1 -0 - -2 # Number of statements - -1 -# S2 {i, j | 0<=i<=n; 0<=j<=i} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 1 -1 0 0 0 -0 0 0 - -1 -# S2 {i, j | 0<=i<=n; 0<=j<=m} -4 6 -# i j n m 1 -1 1 0 0 0 0 -1 -1 0 1 0 0 -1 0 1 0 0 0 -1 0 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/mode.good.c b/cloog-0.17.0/test/mode.good.c deleted file mode 100644 index 07147573a1e4fcdd2c2e7047724a22fc030f95e8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/mode.good.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Generated from ../../../git/cloog/test/mode.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=min(M,N-1);i++) { - for (j=0;j<=i;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=i+1;j<=N;j++) { - S2(i,j) ; - } - } - if ((M >= N) && (N >= 0)) { - for (j=0;j<=N;j++) { - S1(N,j) ; - S2(N,j) ; - } - } - if (N >= 0) { - for (i=N+1;i<=M;i++) { - for (j=0;j<=N;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=N+1;j<=i;j++) { - S1(i,j) ; - } - } - } - if (N <= -1) { - for (i=0;i<=M;i++) { - for (j=0;j<=i;j++) { - S1(i,j) ; - } - } - } -} diff --git a/cloog-0.17.0/test/multi-mm-1.c b/cloog-0.17.0/test/multi-mm-1.c deleted file mode 100644 index 646395c8ef3d9dc56f12e1f897c36dd5a221c535..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-mm-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/multi-mm-1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -for (i=0;i<=M;i++) { - for (j=0;j<=min(N,i);j++) { - S1(i,j); - S2(i,j); - } - for (j=N+1;j<=i;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/multi-mm-1.cloog b/cloog-0.17.0/test/multi-mm-1.cloog deleted file mode 100644 index 58f4ce879dc1ed4a14e2a5423bdbd54f211be8ff..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-mm-1.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# language: C -c - -# Context -#{M,N|M>N} -3 4 -# M N 1 -1 1 -1 0 -1 0 1 -1 -1 0 0 1 -0 - -2 # Number of statements - -1 -# -4 6 -# i j M N 1 -1 0 1 0 0 0 -1 1 -1 0 0 0 -1 -1 0 1 0 0 -1 0 0 0 0 1 -0 0 0 - -1 -# -5 6 -# i j M N 1 -1 0 1 0 0 0 -1 1 -1 0 0 0 -1 -1 0 1 0 0 -1 0 -1 0 1 0 -1 0 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/multi-mm-1.good.c b/cloog-0.17.0/test/multi-mm-1.good.c deleted file mode 100644 index 6bfcc3c9d1c2c39f0d5f7b204062b0d264728b1f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-mm-1.good.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Generated from ../../../git/cloog/test/multi-mm-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=N;i++) { - for (j=0;j<=i;j++) { - S1(i,j) ; - S2(i,j) ; - } - } - for (i=N+1;i<=M;i++) { - for (j=0;j<=N;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=N+1;j<=i;j++) { - S1(i,j) ; - } - } -} diff --git a/cloog-0.17.0/test/multi-stride.c b/cloog-0.17.0/test/multi-stride.c deleted file mode 100644 index 51b20611120931df217b62faa1a7ca18d2c69110..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-stride.c +++ /dev/null @@ -1 +0,0 @@ -/* Generated from ../../../git/cloog/test/multi-stride.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ diff --git a/cloog-0.17.0/test/multi-stride.cloog b/cloog-0.17.0/test/multi-stride.cloog deleted file mode 100644 index 8f858da4f9cfb954e50df739c25ec81d01684679..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-stride.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statements -1 - -1 - -# i' i j 1 - 4 5 - 0 1 -2 0 -1 - 0 1 0 -6 -2 - 1 1 0 0 0 - 1 -1 0 0 100 - -0 0 0 - -0 -0 - - - diff --git a/cloog-0.17.0/test/multi-stride2.c b/cloog-0.17.0/test/multi-stride2.c deleted file mode 100644 index 443107b3e929c6031d8375cefc0aa68ef10f9973..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-stride2.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Generated from ../../../git/cloog/test/multi-stride2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (i=5;i<=100;i+=6) { - S1(i,(i-1)/2,(i-2)/3) ; -} diff --git a/cloog-0.17.0/test/multi-stride2.cloog b/cloog-0.17.0/test/multi-stride2.cloog deleted file mode 100644 index db1afd444b3cebd2830245944c259b101f63644a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/multi-stride2.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statements -1 - -1 - -# i' i j 1 - 4 5 - 0 1 -2 0 -1 - 0 1 0 -3 -2 - 1 1 0 0 0 - 1 -1 0 0 100 - -0 0 0 - -0 -0 - - - diff --git a/cloog-0.17.0/test/no_lindep.c b/cloog-0.17.0/test/no_lindep.c deleted file mode 100644 index 3c7c5747e47efc272f334c7f1578a6037c67f5d5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/no_lindep.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from ../../../git/cloog/test/no_lindep.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -S1(N+2) ; diff --git a/cloog-0.17.0/test/no_lindep.cloog b/cloog-0.17.0/test/no_lindep.cloog deleted file mode 100644 index ab0cb7d0eb2625bd50baea1bf3a81c0098e11257..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/no_lindep.cloog +++ /dev/null @@ -1,34 +0,0 @@ -# language C -c - -# 2 parameters -1 4 -1 0 0 0 - -0 - -# 1 statement -1 - -# 1 domain -# i=n+2 -1 -1 5 -0 -1 0 1 2 - -0 0 0 - -0 - -# 1 scattering function -# c1=M+1 -# c2=N -1 -2 7 -0 -1 0 0 1 0 1 -0 0 -1 0 0 1 0 - -0 - - - diff --git a/cloog-0.17.0/test/no_lindep.good.c b/cloog-0.17.0/test/no_lindep.good.c deleted file mode 100644 index 5db6759c65494f87dd39a5c9854fce69d820ca6c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/no_lindep.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/no_lindep.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i; - c1 = M+1 ; - i = N+2 ; - S1(N+2) ; -} diff --git a/cloog-0.17.0/test/non_optimal/nul_complex1.c b/cloog-0.17.0/test/non_optimal/nul_complex1.c deleted file mode 100644 index ff7814503d8d2c0dff70dbb420a108b455753e94..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/nul_complex1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/nul_complex1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (n >= 0) { - for (c1=0;c1<=5*n;c1++) { - for (c2=max(ceild(2*c1,3),c1-n);c2<=min(floord(2*c1+2*n,3),c1);c2++) { - if (c2%2 == 0) { - S1((-2*c1+3*c2)/2,c1-c2) ; - } - } - } -} diff --git a/cloog-0.17.0/test/non_optimal/nul_complex1.cloog b/cloog-0.17.0/test/non_optimal/nul_complex1.cloog deleted file mode 100644 index 4b4d45a85f641a29e5e80c4712eb0ca30d9ec15d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/nul_complex1.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i+=2) { -# S1 ; -# } - -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -1 -n - -1 # Number of statements - -1 -# {i | 0<=i<=n} -4 5 -# i j n 1 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 0 -0 0 0 -0 - -1 # Scattering functions - -2 7 -# c1 c2 i j n 1 -0 1 0 -2 -3 0 0 -0 0 1 -2 -2 0 0 - -0 diff --git a/cloog-0.17.0/test/non_optimal/nul_complex1.good.c b/cloog-0.17.0/test/non_optimal/nul_complex1.good.c deleted file mode 100644 index 79694f1a903883b9e69ddf15c4eb994afb40c300..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/nul_complex1.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/nul_complex1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=0;c1<=5*n;c1++) { - for (c2=max(c1-n,ceild(2*c1,3));c2<=min(c1,floord(2*c1+2*n,3));c2++) { - if (c2%2 == 0) { - i = (-2*c1+3*c2)/2 ; - j = c1-c2 ; - S1((-2*c1+3*c2)/2,c1-c2) ; - } - } - } -} diff --git a/cloog-0.17.0/test/non_optimal/usvd_e_t.c b/cloog-0.17.0/test/non_optimal/usvd_e_t.c deleted file mode 100644 index 6d253f6acecca435777d2a1d72b24b09076971ea..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/usvd_e_t.c +++ /dev/null @@ -1,375 +0,0 @@ -/* Generated from ../../../git/cloog/test/non_optimal/usvd_e_t.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.11s. */ -for (i=0;i<=2;i++) { - S1(i,0,0); - for (j=0;j<=4;j++) { - S2(i,j,0); - } -} -S1(3,0,0); -for (j=0;j<=4;j++) { - S2(3,j,0); -} -for (j=7;j<=11;j++) { - S8(3,j,0); -} -S1(4,0,0); -S2(4,0,0); -S3(4,0,0); -S5(4,0,0); -for (j=1;j<=4;j++) { - S2(4,j,0); - S5(4,j,0); -} -for (j=7;j<=11;j++) { - S8(4,j,0); -} -for (i=5;i<=6;i++) { - for (j=-4;j<=i-9;j++) { - S6(i,j,0); - } - for (j=i-9;j<=-1;j++) { - S7(i,j,0); - } - S3(i,0,0); - S7(i,0,0); - for (j=1;j<=i-4;j++) { - S4(i,j,-1); - } - for (j=i-4;j<=4;j++) { - S5(i,j,0); - } - for (j=7;j<=11;j++) { - S8(i,j,0); - } -} -for (j=-4;j<=-2;j++) { - S6(7,j,0); -} -for (j=-2;j<=-1;j++) { - S7(7,j,0); -} -S3(7,0,0); -S7(7,0,0); -for (j=1;j<=3;j++) { - S4(7,j,-1); -} -for (j=3;j<=4;j++) { - S5(7,j,0); -} -S9(7,4,0); -S10(7,4,0); -S11(7,4,0); -S21(7,4,0); -S23(7,4,0); -S11(7,4,1); -S16(7,4,1); -S17(7,4,1); -for (k=2;k<=4;k++) { - S11(7,4,k); -} -S12(7,5,0); -S21(7,5,0); -S22(7,5,0); -S23(7,5,0); -S12(7,5,1); -S16(7,5,1); -S17(7,5,1); -for (k=2;k<=4;k++) { - S12(7,5,k); -} -S21(7,6,0); -S22(7,6,0); -S23(7,6,0); -for (j=7;j<=8;j++) { - S8(7,j,0); - S21(7,j,0); - S22(7,j,0); - S23(7,j,0); -} -S8(7,9,0); -S22(7,9,0); -for (j=10;j<=11;j++) { - S8(7,j,0); -} -for (j=-4;j<=-1;j++) { - S6(8,j,0); -} -S7(8,-1,0); -S3(8,0,0); -S7(8,0,0); -S19(8,1,-2); -S4(8,1,-1); -S19(8,1,-1); -S19(8,1,0); -S15(8,1,4); -S18(8,1,4); -for (k=-4;k<=-3;k++) { - S14(8,2,k); - S20(8,2,k); -} -S14(8,2,-2); -S19(8,2,-2); -S20(8,2,-2); -S4(8,2,-1); -S14(8,2,-1); -S19(8,2,-1); -S20(8,2,-1); -S14(8,2,0); -S19(8,2,0); -S20(8,2,0); -S15(8,2,4); -S18(8,2,4); -for (k=-4;k<=-2;k++) { - S14(8,3,k); - S20(8,3,k); -} -S4(8,3,-1); -S14(8,3,-1); -S20(8,3,-1); -S14(8,3,0); -S20(8,3,0); -S15(8,3,4); -S18(8,3,4); -for (k=-4;k<=-2;k++) { - S14(8,4,k); - S20(8,4,k); -} -S4(8,4,-1); -S14(8,4,-1); -S20(8,4,-1); -S5(8,4,0); -S9(8,4,0); -S10(8,4,0); -S14(8,4,0); -S20(8,4,0); -S23(8,4,0); -S13(8,4,1); -S21(8,4,1); -S23(8,4,1); -S24(8,4,1); -S13(8,4,2); -S16(8,4,2); -S17(8,4,2); -S24(8,4,2); -S13(8,4,3); -S24(8,4,3); -S13(8,4,4); -S15(8,4,4); -S23(8,5,0); -S11(8,5,1); -S21(8,5,1); -S22(8,5,1); -S23(8,5,1); -S24(8,5,1); -S11(8,5,2); -S16(8,5,2); -S17(8,5,2); -S24(8,5,2); -S11(8,5,3); -S24(8,5,3); -S11(8,5,4); -S15(8,5,4); -S23(8,6,0); -S12(8,6,1); -S21(8,6,1); -S22(8,6,1); -S23(8,6,1); -S24(8,6,1); -S12(8,6,2); -S16(8,6,2); -S17(8,6,2); -S24(8,6,2); -S12(8,6,3); -S24(8,6,3); -S12(8,6,4); -for (j=7;j<=8;j++) { - S23(8,j,0); - S21(8,j,1); - S22(8,j,1); - S23(8,j,1); - for (k=1;k<=3;k++) { - S24(8,j,k); - } -} -S22(8,9,1); -S7(9,0,0); -for (j=1;j<=2;j++) { - for (k=-1;k<=0;k++) { - S19(9,j,k); - } - for (k=4;k<=5;k++) { - S15(9,j,k); - S18(9,j,k); - } -} -S20(9,3,-4); -for (k=-3;k<=-2;k++) { - S14(9,3,k); - S20(9,3,k); -} -for (k=-1;k<=0;k++) { - S14(9,3,k); - S19(9,3,k); - S20(9,3,k); -} -for (k=4;k<=5;k++) { - S15(9,3,k); - S18(9,3,k); -} -S20(9,4,-4); -for (k=-3;k<=-1;k++) { - S14(9,4,k); - S20(9,4,k); -} -S9(9,4,0); -S10(9,4,0); -S14(9,4,0); -S20(9,4,0); -for (k=0;k<=1;k++) { - S23(9,4,k); -} -S13(9,4,2); -S21(9,4,2); -S23(9,4,2); -S24(9,4,2); -S13(9,4,3); -S16(9,4,3); -S17(9,4,3); -S24(9,4,3); -S13(9,4,4); -for (k=4;k<=5;k++) { - S15(9,4,k); - S18(9,4,k); -} -for (k=0;k<=1;k++) { - S23(9,5,k); -} -S13(9,5,2); -S21(9,5,2); -S22(9,5,2); -S23(9,5,2); -S24(9,5,2); -S13(9,5,3); -S16(9,5,3); -S17(9,5,3); -S24(9,5,3); -S13(9,5,4); -for (k=4;k<=5;k++) { - S15(9,5,k); -} -for (k=0;k<=1;k++) { - S23(9,6,k); -} -S11(9,6,2); -S21(9,6,2); -S22(9,6,2); -S23(9,6,2); -S24(9,6,2); -S11(9,6,3); -S16(9,6,3); -S17(9,6,3); -S24(9,6,3); -S11(9,6,4); -for (k=0;k<=1;k++) { - S23(9,7,k); -} -S12(9,7,2); -S21(9,7,2); -S22(9,7,2); -S23(9,7,2); -S24(9,7,2); -S12(9,7,3); -S16(9,7,3); -S17(9,7,3); -S24(9,7,3); -S12(9,7,4); -for (k=0;k<=1;k++) { - S23(9,8,k); -} -S21(9,8,2); -S22(9,8,2); -S23(9,8,2); -for (k=2;k<=3;k++) { - S24(9,8,k); -} -S22(9,9,2); -for (j=1;j<=3;j++) { - S19(10,j,0); - S26(10,j,3); - S15(10,j,4); - S18(10,j,4); - S25(10,j,4); - for (k=5;k<=6;k++) { - S15(10,j,k); - S18(10,j,k); - } -} -for (k=-4;k<=-3;k++) { - S20(10,4,k); -} -for (k=-2;k<=-1;k++) { - S14(10,4,k); - S20(10,4,k); -} -S9(10,4,0); -S10(10,4,0); -S14(10,4,0); -S19(10,4,0); -S20(10,4,0); -S13(10,4,3); -S21(10,4,3); -S24(10,4,3); -S26(10,4,3); -S13(10,4,4); -S15(10,4,4); -S16(10,4,4); -S17(10,4,4); -S18(10,4,4); -S25(10,4,4); -for (k=5;k<=6;k++) { - S15(10,4,k); - S18(10,4,k); -} -S13(10,5,3); -S21(10,5,3); -S22(10,5,3); -S24(10,5,3); -S26(10,5,3); -S13(10,5,4); -S15(10,5,4); -S16(10,5,4); -S17(10,5,4); -S18(10,5,4); -S25(10,5,4); -for (k=5;k<=6;k++) { - S15(10,5,k); - S18(10,5,k); -} -S13(10,6,3); -S21(10,6,3); -S22(10,6,3); -S24(10,6,3); -S13(10,6,4); -S16(10,6,4); -S17(10,6,4); -S11(10,7,3); -S21(10,7,3); -S22(10,7,3); -S24(10,7,3); -S11(10,7,4); -S16(10,7,4); -S17(10,7,4); -S12(10,8,3); -S21(10,8,3); -S22(10,8,3); -S24(10,8,3); -S12(10,8,4); -S16(10,8,4); -S17(10,8,4); -S22(10,9,3); -for (i=11;i<=14;i++) { - for (j=1;j<=5;j++) { - S26(i,j,3); - S25(i,j,4); - } -} diff --git a/cloog-0.17.0/test/non_optimal/usvd_e_t.cloog b/cloog-0.17.0/test/non_optimal/usvd_e_t.cloog deleted file mode 100644 index a8d8510da4b7bffef2251ccb4a506882c0b750c9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/usvd_e_t.cloog +++ /dev/null @@ -1,240 +0,0 @@ -# language: C -c - -# Context -0 2 - -0 # parameter names - -26 # Number of statements - -1 -4 5 -# i j k 1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 1 0 0 0 - 1 -1 0 0 4 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 0 - 1 -1 0 0 4 - 1 0 1 0 0 - 1 0 -1 0 4 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 1 0 0 - 0 0 0 1 0 - 1 1 0 0 -4 - 1 -1 0 0 8 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 1 - 1 -1 0 0 8 - 1 0 1 0 -1 - 1 1 -1 0 -4 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 -4 - 1 0 -1 0 4 - 1 -1 1 0 4 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 0 - 1 -1 0 0 8 - 1 0 1 0 4 - 1 1 -1 0 -9 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 -5 - 1 0 -1 0 0 - 1 -1 1 0 9 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 0 - 1 1 0 0 -3 - 1 -1 0 0 7 - 1 0 1 0 -7 - 1 0 -1 0 11 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 1 0 -4 - 0 0 0 1 0 - 1 1 0 0 -7 - 1 -1 0 0 10 -0 0 0 -1 -4 5 -# i j k 1 - 0 0 1 0 -4 - 0 0 0 1 0 - 1 1 0 0 -7 - 1 -1 0 0 10 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 -1 0 -3 - 1 0 -1 0 7 - 1 0 1 0 -4 - 1 0 0 -1 4 - 1 0 -1 1 4 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 -1 0 -2 - 1 0 1 0 -5 - 1 0 -1 0 8 - 1 0 0 -1 4 - 1 0 -1 1 5 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 10 - 1 0 1 0 -4 - 1 0 0 -1 4 - 1 -1 0 1 7 - 1 1 -1 0 -4 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 -1 0 4 - 1 0 0 -1 0 - 1 -1 0 1 12 - 1 -1 1 0 6 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 10 - 1 0 1 0 -1 - 1 0 -1 0 5 - 1 0 0 1 -4 - 1 1 0 -1 -4 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -6 - 1 0 0 -1 4 - 1 0 1 0 -4 - 1 0 0 1 -1 - 1 0 -1 1 4 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -6 - 1 0 0 1 -1 - 1 0 1 0 -4 - 1 0 0 -1 4 - 1 0 -1 1 4 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 10 - 1 0 1 0 -1 - 1 0 0 1 -4 - 1 1 0 -1 -4 - 1 1 -1 0 -5 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 1 0 -1 - 1 0 0 -1 0 - 1 -1 0 1 10 - 1 1 -1 0 -6 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 -1 0 4 - 1 0 0 1 4 - 1 0 0 -1 0 - 1 -1 1 0 6 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -7 - 1 0 0 -1 3 - 1 0 1 0 -4 - 1 0 -1 0 8 - 1 0 0 1 0 -0 0 0 -1 -5 5 -# i j k 1 - 0 1 0 -1 -7 - 1 0 0 1 0 - 1 0 1 0 -5 - 1 0 -1 0 9 - 1 0 0 -1 3 -0 0 0 -1 -5 5 -# i j k 1 - 1 -1 0 0 9 - 1 0 1 0 -4 - 1 0 -1 0 8 - 1 0 0 1 0 - 1 1 0 -1 -7 -0 0 0 -1 -5 5 -# i j k 1 - 1 1 0 0 -8 - 1 0 1 0 -4 - 1 0 -1 0 8 - 1 0 0 -1 3 - 1 -1 0 1 7 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 -4 - 1 1 0 0 -10 - 1 -1 0 0 14 - 1 0 1 0 -1 - 1 0 -1 0 5 -0 0 0 -1 -5 5 -# i j k 1 - 0 0 0 1 -3 - 1 1 0 0 -10 - 1 -1 0 0 14 - 1 0 1 0 -1 - 1 0 -1 0 5 -0 0 0 -0 # iterator names -0 # scattering functions -0 # scattering dimension names - diff --git a/cloog-0.17.0/test/non_optimal/usvd_e_t.good.c b/cloog-0.17.0/test/non_optimal/usvd_e_t.good.c deleted file mode 100644 index f54c11c8c23cd3e1dc81c39e3d6198531c290a89..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/usvd_e_t.good.c +++ /dev/null @@ -1,429 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/usvd_e_t.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.36s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } -#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } -#define S10(i,j,k) { hash(10); hash(i); hash(j); hash(k); } -#define S11(i,j,k) { hash(11); hash(i); hash(j); hash(k); } -#define S12(i,j,k) { hash(12); hash(i); hash(j); hash(k); } -#define S13(i,j,k) { hash(13); hash(i); hash(j); hash(k); } -#define S14(i,j,k) { hash(14); hash(i); hash(j); hash(k); } -#define S15(i,j,k) { hash(15); hash(i); hash(j); hash(k); } -#define S16(i,j,k) { hash(16); hash(i); hash(j); hash(k); } -#define S17(i,j,k) { hash(17); hash(i); hash(j); hash(k); } -#define S18(i,j,k) { hash(18); hash(i); hash(j); hash(k); } -#define S19(i,j,k) { hash(19); hash(i); hash(j); hash(k); } -#define S20(i,j,k) { hash(20); hash(i); hash(j); hash(k); } -#define S21(i,j,k) { hash(21); hash(i); hash(j); hash(k); } -#define S22(i,j,k) { hash(22); hash(i); hash(j); hash(k); } -#define S23(i,j,k) { hash(23); hash(i); hash(j); hash(k); } -#define S24(i,j,k) { hash(24); hash(i); hash(j); hash(k); } -#define S25(i,j,k) { hash(25); hash(i); hash(j); hash(k); } -#define S26(i,j,k) { hash(26); hash(i); hash(j); hash(k); } - -void test() -{ - /* Original iterators. */ - int i, j, k; - for (i=0;i<=2;i++) { - S1(i,0,0) ; - S2(i,0,0) ; - for (j=1;j<=4;j++) { - S2(i,j,0) ; - } - } - S1(3,0,0) ; - S2(3,0,0) ; - for (j=1;j<=4;j++) { - S2(3,j,0) ; - } - for (j=7;j<=11;j++) { - S8(3,j,0) ; - } - S1(4,0,0) ; - S2(4,0,0) ; - S3(4,0,0) ; - S5(4,0,0) ; - for (j=1;j<=4;j++) { - S2(4,j,0) ; - S5(4,j,0) ; - } - for (j=7;j<=11;j++) { - S8(4,j,0) ; - } - S6(5,-4,0) ; - S7(5,-4,0) ; - for (j=-3;j<=-1;j++) { - S7(5,j,0) ; - } - S3(5,0,0) ; - S7(5,0,0) ; - S4(5,1,-1) ; - S5(5,1,0) ; - for (j=2;j<=4;j++) { - S5(5,j,0) ; - } - for (j=7;j<=11;j++) { - S8(5,j,0) ; - } - S6(6,-4,0) ; - S6(6,-3,0) ; - S7(6,-3,0) ; - for (j=-2;j<=-1;j++) { - S7(6,j,0) ; - } - S3(6,0,0) ; - S7(6,0,0) ; - S4(6,1,-1) ; - S4(6,2,-1) ; - S5(6,2,0) ; - for (j=3;j<=4;j++) { - S5(6,j,0) ; - } - for (j=7;j<=11;j++) { - S8(6,j,0) ; - } - for (j=-4;j<=-3;j++) { - S6(7,j,0) ; - } - S6(7,-2,0) ; - S7(7,-2,0) ; - S7(7,-1,0) ; - S3(7,0,0) ; - S7(7,0,0) ; - for (j=1;j<=2;j++) { - S4(7,j,-1) ; - } - S4(7,3,-1) ; - S5(7,3,0) ; - S5(7,4,0) ; - S9(7,4,0) ; - S10(7,4,0) ; - S11(7,4,0) ; - S21(7,4,0) ; - S23(7,4,0) ; - S11(7,4,1) ; - S16(7,4,1) ; - S17(7,4,1) ; - for (k=2;k<=4;k++) { - S11(7,4,k) ; - } - S12(7,5,0) ; - S21(7,5,0) ; - S22(7,5,0) ; - S23(7,5,0) ; - S12(7,5,1) ; - S16(7,5,1) ; - S17(7,5,1) ; - for (k=2;k<=4;k++) { - S12(7,5,k) ; - } - S21(7,6,0) ; - S22(7,6,0) ; - S23(7,6,0) ; - for (j=7;j<=8;j++) { - S8(7,j,0) ; - S21(7,j,0) ; - S22(7,j,0) ; - S23(7,j,0) ; - } - S8(7,9,0) ; - S22(7,9,0) ; - for (j=10;j<=11;j++) { - S8(7,j,0) ; - } - for (j=-4;j<=-2;j++) { - S6(8,j,0) ; - } - S6(8,-1,0) ; - S7(8,-1,0) ; - S3(8,0,0) ; - S7(8,0,0) ; - S19(8,1,-2) ; - S4(8,1,-1) ; - S19(8,1,-1) ; - S19(8,1,0) ; - S15(8,1,4) ; - S18(8,1,4) ; - for (k=-4;k<=-3;k++) { - S14(8,2,k) ; - S20(8,2,k) ; - } - S14(8,2,-2) ; - S19(8,2,-2) ; - S20(8,2,-2) ; - S4(8,2,-1) ; - S14(8,2,-1) ; - S19(8,2,-1) ; - S20(8,2,-1) ; - S14(8,2,0) ; - S19(8,2,0) ; - S20(8,2,0) ; - S15(8,2,4) ; - S18(8,2,4) ; - for (k=-4;k<=-2;k++) { - S14(8,3,k) ; - S20(8,3,k) ; - } - S4(8,3,-1) ; - S14(8,3,-1) ; - S20(8,3,-1) ; - S14(8,3,0) ; - S20(8,3,0) ; - S15(8,3,4) ; - S18(8,3,4) ; - for (k=-4;k<=-2;k++) { - S14(8,4,k) ; - S20(8,4,k) ; - } - S4(8,4,-1) ; - S14(8,4,-1) ; - S20(8,4,-1) ; - S5(8,4,0) ; - S9(8,4,0) ; - S10(8,4,0) ; - S14(8,4,0) ; - S20(8,4,0) ; - S23(8,4,0) ; - S13(8,4,1) ; - S21(8,4,1) ; - S23(8,4,1) ; - S24(8,4,1) ; - S13(8,4,2) ; - S16(8,4,2) ; - S17(8,4,2) ; - S24(8,4,2) ; - S13(8,4,3) ; - S24(8,4,3) ; - S13(8,4,4) ; - S15(8,4,4) ; - S23(8,5,0) ; - S11(8,5,1) ; - S21(8,5,1) ; - S22(8,5,1) ; - S23(8,5,1) ; - S24(8,5,1) ; - S11(8,5,2) ; - S16(8,5,2) ; - S17(8,5,2) ; - S24(8,5,2) ; - S11(8,5,3) ; - S24(8,5,3) ; - S11(8,5,4) ; - S15(8,5,4) ; - S23(8,6,0) ; - S12(8,6,1) ; - S21(8,6,1) ; - S22(8,6,1) ; - S23(8,6,1) ; - S24(8,6,1) ; - S12(8,6,2) ; - S16(8,6,2) ; - S17(8,6,2) ; - S24(8,6,2) ; - S12(8,6,3) ; - S24(8,6,3) ; - S12(8,6,4) ; - for (j=7;j<=8;j++) { - S23(8,j,0) ; - S21(8,j,1) ; - S22(8,j,1) ; - S23(8,j,1) ; - S24(8,j,1) ; - for (k=2;k<=3;k++) { - S24(8,j,k) ; - } - } - S22(8,9,1) ; - S7(9,0,0) ; - for (j=1;j<=2;j++) { - for (k=-1;k<=0;k++) { - S19(9,j,k) ; - } - for (k=4;k<=5;k++) { - S15(9,j,k) ; - S18(9,j,k) ; - } - } - S20(9,3,-4) ; - for (k=-3;k<=-2;k++) { - S14(9,3,k) ; - S20(9,3,k) ; - } - for (k=-1;k<=0;k++) { - S14(9,3,k) ; - S19(9,3,k) ; - S20(9,3,k) ; - } - for (k=4;k<=5;k++) { - S15(9,3,k) ; - S18(9,3,k) ; - } - S20(9,4,-4) ; - for (k=-3;k<=-1;k++) { - S14(9,4,k) ; - S20(9,4,k) ; - } - S9(9,4,0) ; - S10(9,4,0) ; - S14(9,4,0) ; - S20(9,4,0) ; - S23(9,4,0) ; - S23(9,4,1) ; - S13(9,4,2) ; - S21(9,4,2) ; - S23(9,4,2) ; - S24(9,4,2) ; - S13(9,4,3) ; - S16(9,4,3) ; - S17(9,4,3) ; - S24(9,4,3) ; - S13(9,4,4) ; - S15(9,4,4) ; - S18(9,4,4) ; - S15(9,4,5) ; - S18(9,4,5) ; - for (k=0;k<=1;k++) { - S23(9,5,k) ; - } - S13(9,5,2) ; - S21(9,5,2) ; - S22(9,5,2) ; - S23(9,5,2) ; - S24(9,5,2) ; - S13(9,5,3) ; - S16(9,5,3) ; - S17(9,5,3) ; - S24(9,5,3) ; - S13(9,5,4) ; - S15(9,5,4) ; - S15(9,5,5) ; - for (k=0;k<=1;k++) { - S23(9,6,k) ; - } - S11(9,6,2) ; - S21(9,6,2) ; - S22(9,6,2) ; - S23(9,6,2) ; - S24(9,6,2) ; - S11(9,6,3) ; - S16(9,6,3) ; - S17(9,6,3) ; - S24(9,6,3) ; - S11(9,6,4) ; - for (k=0;k<=1;k++) { - S23(9,7,k) ; - } - S12(9,7,2) ; - S21(9,7,2) ; - S22(9,7,2) ; - S23(9,7,2) ; - S24(9,7,2) ; - S12(9,7,3) ; - S16(9,7,3) ; - S17(9,7,3) ; - S24(9,7,3) ; - S12(9,7,4) ; - for (k=0;k<=1;k++) { - S23(9,8,k) ; - } - S21(9,8,2) ; - S22(9,8,2) ; - S23(9,8,2) ; - S24(9,8,2) ; - S24(9,8,3) ; - S22(9,9,2) ; - for (j=1;j<=3;j++) { - S19(10,j,0) ; - S26(10,j,3) ; - S15(10,j,4) ; - S18(10,j,4) ; - S25(10,j,4) ; - for (k=5;k<=6;k++) { - S15(10,j,k) ; - S18(10,j,k) ; - } - } - for (k=-4;k<=-3;k++) { - S20(10,4,k) ; - } - for (k=-2;k<=-1;k++) { - S14(10,4,k) ; - S20(10,4,k) ; - } - S9(10,4,0) ; - S10(10,4,0) ; - S14(10,4,0) ; - S19(10,4,0) ; - S20(10,4,0) ; - S13(10,4,3) ; - S21(10,4,3) ; - S24(10,4,3) ; - S26(10,4,3) ; - S13(10,4,4) ; - S15(10,4,4) ; - S16(10,4,4) ; - S17(10,4,4) ; - S18(10,4,4) ; - S25(10,4,4) ; - for (k=5;k<=6;k++) { - S15(10,4,k) ; - S18(10,4,k) ; - } - S13(10,5,3) ; - S21(10,5,3) ; - S22(10,5,3) ; - S24(10,5,3) ; - S26(10,5,3) ; - S13(10,5,4) ; - S15(10,5,4) ; - S16(10,5,4) ; - S17(10,5,4) ; - S18(10,5,4) ; - S25(10,5,4) ; - for (k=5;k<=6;k++) { - S15(10,5,k) ; - S18(10,5,k) ; - } - S13(10,6,3) ; - S21(10,6,3) ; - S22(10,6,3) ; - S24(10,6,3) ; - S13(10,6,4) ; - S16(10,6,4) ; - S17(10,6,4) ; - S11(10,7,3) ; - S21(10,7,3) ; - S22(10,7,3) ; - S24(10,7,3) ; - S11(10,7,4) ; - S16(10,7,4) ; - S17(10,7,4) ; - S12(10,8,3) ; - S21(10,8,3) ; - S22(10,8,3) ; - S24(10,8,3) ; - S12(10,8,4) ; - S16(10,8,4) ; - S17(10,8,4) ; - S22(10,9,3) ; - for (i=11;i<=14;i++) { - for (j=1;j<=5;j++) { - S26(i,j,3) ; - S25(i,j,4) ; - } - } -} diff --git a/cloog-0.17.0/test/non_optimal/youcef.c b/cloog-0.17.0/test/non_optimal/youcef.c deleted file mode 100644 index 386cea2aed89d7daff51f16a34a53e28700494f6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/youcef.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/non_optimal/youcef.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.00s. */ -for (i=0;i<=5;i++) { - S1(i,i); - for (j=i;j<=5;j++) { - S2(i,j); - } - S3(i,5); -} diff --git a/cloog-0.17.0/test/non_optimal/youcef.cloog b/cloog-0.17.0/test/non_optimal/youcef.cloog deleted file mode 100644 index 297bf79c016d425549f84516cac71216b89308b4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/youcef.cloog +++ /dev/null @@ -1,46 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i++) { -# S1 ; -# for (j=0;j<=N;j++) { -# S2 ; -# } -# S3 ; -# } - -# language: C -c - -# parameters {M, N | M>=1 N >=1} -0 2 -0 - -3 # Number of statements - -1 -# {i | 0<=i<=5 i==j} -3 4 -1 1 0 0 -1 -1 0 5 -0 1 -1 0 -0 0 0 - -1 -# {i | 0<=i<=5 i<=j<=5} -4 4 -1 1 0 0 -1 -1 0 5 -1 -1 1 0 -1 0 -1 5 -0 0 0 - -1 -# {i | 0<=i<=5 j==5} -3 4 -1 1 0 0 -1 -1 0 5 -0 0 1 -5 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/non_optimal/youcef.good.c b/cloog-0.17.0/test/non_optimal/youcef.good.c deleted file mode 100644 index 9fe1d312f835885c4e29f60aef15011ff164b6fc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/non_optimal/youcef.good.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Generated from ../../../git/cloog/test/./non_optimal/youcef.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test() -{ - /* Original iterators. */ - int i, j; - for (i=0;i<=3;i++) { - S1(i,i) ; - S2(i,i) ; - for (j=i+1;j<=4;j++) { - S2(i,j) ; - } - S2(i,5) ; - S3(i,5) ; - } - S1(4,4) ; - S2(4,4) ; - S2(4,5) ; - S3(4,5) ; - S1(5,5) ; - S2(5,5) ; - S3(5,5) ; -} diff --git a/cloog-0.17.0/test/nul_basic1.c b/cloog-0.17.0/test/nul_basic1.c deleted file mode 100644 index d6b0cf024bd6a53cf6f904f82380cfd96f5eda31..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/nul_basic1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/nul_basic1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 0) { - for (i=0;i<=M;i+=2) { - S1(i,i/2) ; - } -} diff --git a/cloog-0.17.0/test/nul_basic1.cloog b/cloog-0.17.0/test/nul_basic1.cloog deleted file mode 100644 index 878bd89c5ec0937db39e1e84a47844f5e3cc2e50..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/nul_basic1.cloog +++ /dev/null @@ -1,28 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i+=2) { -# S1 ; -# } - -# language: C -c - -# parameter n -1 3 -# n 1 -1 0 1 -0 - -1 # Number of statements - -1 -# {i, j | i=2*j; 0<=i<=n} -3 5 -# i j n 1 -0 1 -2 0 0 -1 1 0 0 0 -1 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/nul_basic2.c b/cloog-0.17.0/test/nul_basic2.c deleted file mode 100644 index 6231f0ebcc3d52932000be0795d91e7ed9a3dd48..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/nul_basic2.c +++ /dev/null @@ -1,7 +0,0 @@ -/* Generated from ../../../git/cloog/test/nul_basic2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (i=2;i<=n;i+=2) { - if (i%4 == 0) { - S2(i,i/4) ; - } - S1(i,i/2) ; -} diff --git a/cloog-0.17.0/test/nul_basic2.cloog b/cloog-0.17.0/test/nul_basic2.cloog deleted file mode 100644 index bf3c78c169ae7d20f105eb5b3eee312e88fd7ba7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/nul_basic2.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# Optimal code is in fact : -# -# for (i=0;i<=M;i+=2) { -# S1 ; -# } - -# language: C -c - -# parameter n -1 3 -# n 1 -1 1 -2 -1 -n - -2 # Number of statements - -1 -# {i, j | i=2*j; 1<=i<=n} -3 5 -# i j n 1 -0 1 -2 0 0 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 - -1 -# {i, j | i=4*j; 1<=i<=n} -3 5 -# i j n 1 -0 1 -4 0 0 -1 1 0 0 -1 -1 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions -5 10 -# t1 t2 t3 t4 t5 i j n 1 -0 1 0 0 0 0 0 0 0 0 -0 0 1 0 0 0 -1 0 0 0 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 -1 0 0 -0 0 0 0 0 1 0 0 0 0 - -5 10 -# t1 t2 t3 t4 t5 i j n 1 -0 1 0 0 0 0 0 0 0 0 -0 0 1 0 0 0 -1 0 0 0 -0 0 0 1 0 0 0 0 0 0 -0 0 0 0 1 0 0 -1 0 0 -0 0 0 0 0 1 0 0 0 0 -0 diff --git a/cloog-0.17.0/test/nul_lcpc.c b/cloog-0.17.0/test/nul_lcpc.c deleted file mode 100644 index b9592f563a080e3a6f7fb34bfc94da26dd479727..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/nul_lcpc.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/nul_lcpc.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ -for (i=1;i<=6;i+=2) { - for (j=1;j<=i;j++) { - S1(i,(i-1)/2,j) ; - S2(i,(i-1)/2,j) ; - } - for (j=i+1;j<=p;j++) { - S1(i,(i-1)/2,j) ; - } -} -for (i=7;i<=m;i+=2) { - for (j=1;j<=p;j++) { - S1(i,(i-1)/2,j) ; - } -} diff --git a/cloog-0.17.0/test/nul_lcpc.cloog b/cloog-0.17.0/test/nul_lcpc.cloog deleted file mode 100644 index 263e1eafba0efd2c676c7134b72d692baf4a5ed8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/nul_lcpc.cloog +++ /dev/null @@ -1,39 +0,0 @@ -# language: C -c - -# parameter n -3 5 -# m n p 1 -1 1 -1 0 -1 -1 0 -1 1 -1 -0 0 1 0 -6 -1 -m n p - -2 # Number of statements - -1 -# {i, j, k | i=2*k+1; 1<=i<=m; 1<=j<=p} -5 8 -# i k j m n p 1 -0 1 -2 0 0 0 0 -1 # i=2*k+1 -1 1 0 0 0 0 0 -1 # 1<=i -1 -1 0 0 1 0 0 0 # i<=m -1 0 0 1 0 0 0 -1 # 1<=j -1 0 0 -1 0 0 1 0 # j<=p -0 0 0 - -1 -# {i, j, k | i=2*k+1; 1<=i<=n; 1<=j<=i} -5 8 -# i k j m n p 1 -0 1 -2 0 0 0 0 -1 # i=2*k+1 -1 1 0 0 0 0 0 -1 # 1<=i -1 -1 0 0 0 1 0 0 # i<=n -1 0 0 1 0 0 0 -1 # 1<=j -1 1 0 -1 0 0 0 0 # j<=i -0 0 0 -1 -i k j - -0 # Scattering functions diff --git a/cloog-0.17.0/test/openscop/empty.c b/cloog-0.17.0/test/openscop/empty.c deleted file mode 100644 index 8892d5f6cc54eeb214f9c76b71bca515b24292be..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/openscop/empty.c +++ /dev/null @@ -1 +0,0 @@ -/* Generated from ./test/openscop/empty.scop by CLooG 0.14.0-416-g013422c gmp bits in 0.01s. */ diff --git a/cloog-0.17.0/test/openscop/empty.scop b/cloog-0.17.0/test/openscop/empty.scop deleted file mode 100644 index a7aba606c89a80b8504ffff450b810dbb1f738cf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/openscop/empty.scop +++ /dev/null @@ -1,35 +0,0 @@ - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -0 2 0 0 0 0 - -# Parameter names are not provided -0 - -# One statement -1 - -# =============================================== Statement 1 -# Number of relations describing the statement -0 - -# ---------------------------------------------- 1.1 Domain -# NULL Domain - -# ---------------------------------------------- 1.2 Scattering -# NULL Scattering - -# ---------------------------------------------- 1.3 Access -# NULL Access - -# ---------------------------------------------- 1.4 Body -# Statement body is not provided -0 - - - diff --git a/cloog-0.17.0/test/openscop/matmult.c b/cloog-0.17.0/test/openscop/matmult.c deleted file mode 100644 index 33f5b045faee299c61afdc7b050ff9ef7bb1a15a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/openscop/matmult.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ./test/openscop/matmult.scop by CLooG 0.14.0-432-g5cf921d gmp bits in 0.01s. */ -for (c2=0;c2<=N-1;c2++) { - for (c4=0;c4<=N-1;c4++) { - C[c2][c4] = 0.0; - for (c6=0;c6<=N-1;c6++) { - C[c2][c4] = C[c2][c4] + A[c2][c6] * B[c6][c4]; - } - } -} diff --git a/cloog-0.17.0/test/openscop/matmult.scop b/cloog-0.17.0/test/openscop/matmult.scop deleted file mode 100644 index 4a248a613afe419bf416db47d9263aa7f09be38f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/openscop/matmult.scop +++ /dev/null @@ -1,140 +0,0 @@ -# [File generated by the OpenScop Library 0.8.0] - - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -1 3 0 0 0 1 -# e/i| N | 1 - 1 1 -1 ## N-1 >= 0 - -# Parameters are provided -1 - -N - - -# Number of statements -2 - -# =============================================== Statement 1 -# Number of relations describing the statement: -3 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -4 5 2 0 0 1 -# e/i| i j | N | 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -5 10 5 2 0 1 -# e/i| c1 c2 c3 c4 c5 | i j | N | 1 - 0 -1 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -1 0 0 0 1 0 0 0 ## c2 == i - 0 0 0 -1 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 1 0 0 ## c4 == j - 0 0 0 0 0 -1 0 0 0 0 ## c5 == 0 - -# ---------------------------------------------- 1.3 Access -WRITE -3 8 3 2 0 1 -# e/i| A1 [1] [2]| i j | N | 1 - 0 -1 0 0 0 0 0 1 ## A1 - 0 0 -1 0 1 0 0 0 ## [1] == i - 0 0 0 -1 0 1 0 0 ## [2] == j - -# ---------------------------------------------- 1.4 Body -# Statement body is provided -1 - -# Number of original iterators -2 -# Original iterators -i j -# Body expression -C[i][j] = 0.0; - - - -# =============================================== Statement 2 -# Number of relations describing the statement: -6 - -# ---------------------------------------------- 2.1 Domain -DOMAIN -6 6 3 0 0 1 -# e/i| i j k | N | 1 - 1 1 0 0 0 0 ## i >= 0 - 1 -1 0 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 0 ## j >= 0 - 1 0 -1 0 1 -1 ## -j+N-1 >= 0 - 1 0 0 1 0 0 ## k >= 0 - 1 0 0 -1 1 -1 ## -k+N-1 >= 0 - -# ---------------------------------------------- 2.2 Scattering -SCATTERING -7 13 7 3 0 1 -# e/i| c1 c2 c3 c4 c5 c6 c7 | i j k | N | 1 - 0 -1 0 0 0 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -1 0 0 0 0 0 1 0 0 0 0 ## c2 == i - 0 0 0 -1 0 0 0 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 0 0 1 0 0 0 ## c4 == j - 0 0 0 0 0 -1 0 0 0 0 0 0 1 ## c5 == 1 - 0 0 0 0 0 0 -1 0 0 0 1 0 0 ## c6 == k - 0 0 0 0 0 0 0 -1 0 0 0 0 0 ## c7 == 0 - -# ---------------------------------------------- 2.3 Access -WRITE -3 9 3 3 0 1 -# e/i| A1 [1] [2]| i j k | N | 1 - 0 -1 0 0 0 0 0 0 1 ## A1 - 0 0 -1 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 0 1 0 0 0 ## [2] == j - -READ -3 9 3 3 0 1 -# e/i| A1 [1] [2]| i j k | N | 1 - 0 -1 0 0 0 0 0 0 1 ## A1 - 0 0 -1 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 0 1 0 0 0 ## [2] == j - -READ -3 9 3 3 0 1 -# e/i| A2 [1] [2]| i j k | N | 1 - 0 -1 0 0 0 0 0 0 2 ## A2 - 0 0 -1 0 1 0 0 0 0 ## [1] == i - 0 0 0 -1 0 0 1 0 0 ## [2] == k - -READ -3 9 3 3 0 1 -# e/i| A3 [1] [2]| i j k | N | 1 - 0 -1 0 0 0 0 0 0 3 ## A3 - 0 0 -1 0 0 0 1 0 0 ## [1] == k - 0 0 0 -1 0 1 0 0 0 ## [2] == j - -# ---------------------------------------------- 2.4 Body -# Statement body is provided -1 - -# Number of original iterators -3 -# Original iterators -i j k -# Body expression -C[i][j] = C[i][j] + A[i][k] * B[k][j]; - - - -# =============================================== Extensions - - - diff --git a/cloog-0.17.0/test/openscop/union.c b/cloog-0.17.0/test/openscop/union.c deleted file mode 100644 index 09c223320587b21c75dd57d301dd027c00df7f22..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/openscop/union.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ./test/openscop/union.scop by CLooG 0.14.0-432-g5cf921d gmp bits in 0.01s. */ -if (N >= 1) { - for (c2=0;c2<=N-1;c2++) { - for (c4=0;c4<=min(10,N-1);c4++) { - C[c2+c4]+=A[c2]*B[c4]; - } - for (c4=20;c4<=N-1;c4++) { - C[c2+c4]+=A[c2]*B[c4]; - } - } -} diff --git a/cloog-0.17.0/test/openscop/union.scop b/cloog-0.17.0/test/openscop/union.scop deleted file mode 100644 index 35efe4f56ec9542f19dc54792ac664f7db13faa8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/openscop/union.scop +++ /dev/null @@ -1,106 +0,0 @@ -# [File generated by the OpenScop Library 0.8.0] - - - -# =============================================== Global -# Language -C - -# Context -CONTEXT -1 3 0 0 0 1 -# e/i| N | 1 - 1 1 3 ## N+3 >= 0 - -# Parameters are provided -1 - -N - - -# Number of statements -1 - -# =============================================== Statement 1 -# Number of relations describing the statement: -6 - -# ---------------------------------------------- 1.1 Domain -DOMAIN -# Union with 2 parts -2 -# Union part No.1 -5 5 2 0 0 1 -# e/i| i j | N | 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - 1 0 1 0 -20 ## j-20 >= 0 -# Union part No.2 -5 5 2 0 0 1 -# e/i| i j | N | 1 - 1 1 0 0 0 ## i >= 0 - 1 -1 0 1 -1 ## -i+N-1 >= 0 - 1 0 1 0 0 ## j >= 0 - 1 0 -1 1 -1 ## -j+N-1 >= 0 - 1 0 -1 0 10 ## -j+10 >= 0 - -# ---------------------------------------------- 1.2 Scattering -SCATTERING -5 10 5 2 0 1 -# e/i| c1 c2 c3 c4 c5 | i j | N | 1 - 0 -1 0 0 0 0 0 0 0 0 ## c1 == 0 - 0 0 -1 0 0 0 1 0 0 0 ## c2 == i - 0 0 0 -1 0 0 0 0 0 0 ## c3 == 0 - 0 0 0 0 -1 0 0 1 0 0 ## c4 == j - 0 0 0 0 0 -1 0 0 0 0 ## c5 == 0 - -# ---------------------------------------------- 1.3 Access -READ -2 7 2 2 0 1 -# e/i| A1 [1]| i j | N | 1 - 0 -1 0 0 0 0 1 ## A1 - 0 0 -1 1 1 0 0 ## [1] == i+j - -READ -2 7 2 2 0 1 -# e/i| A2 [1]| i j | N | 1 - 0 -1 0 0 0 0 2 ## A2 - 0 0 -1 1 0 0 0 ## [1] == i - -READ -2 7 2 2 0 1 -# e/i| A3 [1]| i j | N | 1 - 0 -1 0 0 0 0 3 ## A3 - 0 0 -1 0 1 0 0 ## [1] == j - -WRITE -2 7 2 2 0 1 -# e/i| A1 [1]| i j | N | 1 - 0 -1 0 0 0 0 1 ## A1 - 0 0 -1 1 1 0 0 ## [1] == i+j - -# ---------------------------------------------- 1.4 Body -# Statement body is provided -1 - -# Number of original iterators -2 -# Original iterators -i j -# Body expression -C[i+j]+=A[i]*B[j]; - - - -# =============================================== Extensions - -hello, world - -HELLO WORLD I SAID - - - - - diff --git a/cloog-0.17.0/test/orc.c b/cloog-0.17.0/test/orc.c deleted file mode 100644 index 7ed15476cbfa715c06f92f7b6f1655d93221aa4c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/orc.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Generated from ../../../git/cloog/test/orc.cloog by CLooG 0.16.2-5-g590827b gmp bits in 0.03s. */ -S1(0); -S2(0,0); -for (p2=1;p2<=22;p2++) { - if ((p2+1)%2 == 0) { - S3(0,(p2-1)/2); - } - if (p2%2 == 0) { - S2(0,p2/2); - } -} -S3(0,11); -for (p1=2;p1<=6;p1++) { - if ((p1+1)%3 == 0) { - S4((p1-2)/3); - } - if (p1%3 == 0) { - S1(p1/3); - } - if (p1 == 4) { - S2(1,0); - } - if (p1 == 4) { - for (p2=1;p2<=20;p2++) { - if ((p2+1)%2 == 0) { - S3(1,(p2-1)/2); - } - if (p2%2 == 0) { - S2(1,p2/2); - } - } - } - if (p1 == 4) { - S3(1,10); - } -} -S2(2,0); -for (p2=1;p2<=18;p2++) { - if ((p2+1)%2 == 0) { - S3(2,(p2-1)/2); - } - if (p2%2 == 0) { - S2(2,p2/2); - } -} -S3(2,9); -S4(2); -S5(0); -for (p2=0;p2<=9;p2++) { - S6(0,p2); -} -for (p1=2;p1<=42;p1++) { - if ((p1+1)%3 == 0) { - S7((p1-2)/3); - } - if (p1%3 == 0) { - S5(p1/3); - } - for (p2=0;p2<=9;p2++) { - if ((p1+2)%3 == 0) { - S6((p1-1)/3,p2); - } - } -} -for (p2=0;p2<=9;p2++) { - S6(14,p2); -} -S7(14); diff --git a/cloog-0.17.0/test/orc.cloog b/cloog-0.17.0/test/orc.cloog deleted file mode 100644 index 18c7cf20dfabf7bc3bd93b719c9e5e4238f758f4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/orc.cloog +++ /dev/null @@ -1,133 +0,0 @@ - - -#-------------------CONTEXT------------------------ - c # language is c - # Context (no constarints on parameters) - 1 2 # 1 lines and 2 coloumns - # 1 - 1 0 - - 1 # We want to set manually the parameter names - -#---------------------STATEMENTS-------------------- - 7 #Number of Statements - - 1 #STMT 1 at line no. 12 has 1 domain - - # Domain 1 - 2 3 - # i 1 - 1 1 0 - 1 -1 2 -0 0 0 - 1 #STMT 2 at line no. 15 has 1 domain - - # Domain 1 - 4 4 - # i j 1 - 1 1 0 0 - 1 -1 0 2 - 1 0 1 0 - 1 -1 -1 11 -0 0 0 - 1 #STMT 3 at line no. 16 has 1 domain - - # Domain 1 - 4 4 - # i j 1 - 1 1 0 0 - 1 -1 0 2 - 1 0 1 0 - 1 -1 -1 11 -0 0 0 - 1 #STMT 4 at line no. 20 has 1 domain - - # Domain 1 - 2 3 - # i 1 - 1 1 0 - 1 -1 2 -0 0 0 - 1 #STMT 1 at line no. 32 has 1 domain - - # Domain 1 - 2 3 - # l 1 - 1 1 0 - 1 -1 14 -0 0 0 - 1 #STMT 2 at line no. 37 has 1 domain - - # Domain 1 - 4 4 - # l m 1 - 1 1 0 0 - 1 -1 0 14 - 1 0 1 0 - 1 0 -1 9 -0 0 0 - 1 #STMT 3 at line no. 41 has 1 domain - - # Domain 1 - 2 3 - # l 1 - 1 1 0 - 1 -1 14 -0 0 0 - 1 # Set Iterator Names - i j #Iterator Names - -#---------------------SCATTERING FUNCTIONS-------------------- - 7 #Scattering functions - -# Scattering Matrix for stmt at line no.12 - 3 6 - # p0 p1 p2 i 1 - 0 1 0 0 0 0 - 0 0 1 0 -3 0 - 0 0 0 1 0 0 - -# Scattering Matrix for stmt at line no.15 - 3 7 - # p0 p1 p2 i j 1 - 0 1 0 0 0 0 0 - 0 0 1 0 -3 0 -1 - 0 0 0 1 0 -2 0 - -# Scattering Matrix for stmt at line no.16 - 3 7 - # p0 p1 p2 i j 1 - 0 1 0 0 0 0 0 - 0 0 1 0 -3 0 -1 - 0 0 0 1 0 -2 -1 - -# Scattering Matrix for stmt at line no.20 - 3 6 - # p0 p1 p2 i 1 - 0 1 0 0 0 0 - 0 0 1 0 -3 -2 - 0 0 0 1 0 0 - -# Scattering Matrix for stmt at line no.32 - 3 6 - # p0 p1 p2 l 1 - 0 1 0 0 0 -2 - 0 0 1 0 -3 0 - 0 0 0 1 0 0 - -# Scattering Matrix for stmt at line no.37 - 3 7 - # p0 p1 p2 l m 1 - 0 1 0 0 0 0 -2 - 0 0 1 0 -3 0 -1 - 0 0 0 1 0 -1 0 - -# Scattering Matrix for stmt at line no.41 - 3 6 - # p0 p1 p2 l 1 - 0 1 0 0 0 -2 - 0 0 1 0 -3 -2 - 0 0 0 1 0 0 - - 1 # Set manually the scattering dimension names - p0 p1 p2 #Scattering dimension names diff --git a/cloog-0.17.0/test/orc.good.c b/cloog-0.17.0/test/orc.good.c deleted file mode 100644 index 2b2b7e7a8c766afaf31f75e242a69cb719a3a25c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/orc.good.c +++ /dev/null @@ -1,110 +0,0 @@ -/* Generated from ../../../git/cloog/test/orc.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.06s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i) { hash(4); hash(i); } -#define S5(i) { hash(5); hash(i); } -#define S6(i,j) { hash(6); hash(i); hash(j); } -#define S7(i) { hash(7); hash(i); } - -void test() -{ - /* Scattering iterators. */ - int p1, p2; - /* Original iterators. */ - int i, j; - S1(0) ; - S2(0,0) ; - for (p2=1;p2<=22;p2++) { - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3(0,(p2-1)/2) ; - } - if (p2%2 == 0) { - S2(0,p2/2) ; - } - } - S3(0,11) ; - for (p1=2;p1<=6;p1++) { - if ((p1+1)%3 == 0) { - i = (p1-2)/3 ; - S4((p1-2)/3) ; - } - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - S2((p1-1)/3,0) ; - } - if (p1%3 == 0) { - S1(p1/3) ; - } - for (p2=1;p2<=floord(-2*p1+68,3);p2++) { - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3((p1-1)/3,(p2-1)/2) ; - } - if (p2%2 == 0) { - S2((p1-1)/3,p2/2) ; - } - } - } - p2 = floord(-2*p1+71,3) ; - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3((p1-1)/3,(p2-1)/2) ; - } - } - } - S2(2,0) ; - for (p2=1;p2<=18;p2++) { - if ((p2+1)%2 == 0) { - j = (p2-1)/2 ; - S3(2,(p2-1)/2) ; - } - if (p2%2 == 0) { - S2(2,p2/2) ; - } - } - S3(2,9) ; - S4(2) ; - S5(0) ; - S6(0,0) ; - for (p2=1;p2<=9;p2++) { - S6(0,p2) ; - } - for (p1=2;p1<=42;p1++) { - if ((p1+1)%3 == 0) { - i = (p1-2)/3 ; - S7((p1-2)/3) ; - } - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - S6((p1-1)/3,0) ; - } - if (p1%3 == 0) { - S5(p1/3) ; - } - for (p2=1;p2<=9;p2++) { - if ((p1+2)%3 == 0) { - i = (p1-1)/3 ; - S6((p1-1)/3,p2) ; - } - } - } - S6(14,0) ; - for (p2=1;p2<=9;p2++) { - S6(14,p2) ; - } - S7(14) ; -} diff --git a/cloog-0.17.0/test/otl.c b/cloog-0.17.0/test/otl.c deleted file mode 100644 index 93bd830c62566a8d953997f50b89f0083f6e94fa..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/otl.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/otl.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.26s. */ -if ((M >= 3) && (N >= 4)) { - for (outerTimeTileScatter=1;outerTimeTileScatter<=floord(2*M+2*N-7,5);outerTimeTileScatter++) { - for (outerProcTileScatter1=max(ceild(outerTimeTileScatter,2),ceild(5*outerTimeTileScatter-M-2,5));outerProcTileScatter1<=min(min(floord(M+2*N-5,5),floord(5*outerTimeTileScatter+2*N+1,10)),outerTimeTileScatter);outerProcTileScatter1++) { - for (outerProcTileScatter2=max(max(max(max(ceild(outerTimeTileScatter-outerProcTileScatter1-1,2),ceild(5*outerProcTileScatter1-N-1,5)),ceild(5*outerTimeTileScatter-M-N+1,5)),ceild(5*outerTimeTileScatter-N-2,10)),outerTimeTileScatter-outerProcTileScatter1-1);outerProcTileScatter2<=min(min(min(floord(M+N-2,5),floord(5*outerTimeTileScatter-5*outerProcTileScatter1+N+4,5)),floord(5*outerTimeTileScatter+N+3,10)),outerProcTileScatter1);outerProcTileScatter2++) { - for (innerTimeTileScatter=max(max(max(ceild(10*outerProcTileScatter1-2*N,5),ceild(10*outerProcTileScatter2-N-2,5)),ceild(5*outerProcTileScatter1+5*outerProcTileScatter2-N-3,5)),outerTimeTileScatter);innerTimeTileScatter<=min(min(min(min(min(floord(2*M+2*N-6,5),floord(5*outerProcTileScatter1+M+3,5)),floord(5*outerProcTileScatter2+M+N,5)),floord(10*outerProcTileScatter2+N+3,5)),outerTimeTileScatter+1),outerProcTileScatter1+outerProcTileScatter2+1);innerTimeTileScatter++) { - for (innerProcTileScatter1=max(max(max(max(ceild(innerTimeTileScatter,2),ceild(5*innerTimeTileScatter-M-2,5)),ceild(5*outerTimeTileScatter-M-1,5)),outerProcTileScatter1),outerTimeTileScatter-outerProcTileScatter2);innerProcTileScatter1<=min(min(min(min(min(min(min(floord(M+2*N-4,5),floord(5*outerProcTileScatter2+N+2,5)),floord(-5*outerProcTileScatter2+5*innerTimeTileScatter+N+4,5)),floord(5*outerTimeTileScatter-5*outerProcTileScatter2+N+5,5)),floord(5*innerTimeTileScatter+2*N+2,10)),floord(5*outerTimeTileScatter+2*N+3,10)),outerTimeTileScatter),outerProcTileScatter1+1);innerProcTileScatter1++) { - for (innerProcTileScatter2=outerProcTileScatter2;innerProcTileScatter2<=outerProcTileScatter2;innerProcTileScatter2++) { - for (outerTimeTileIter=outerTimeTileScatter;outerTimeTileIter<=outerTimeTileScatter;outerTimeTileIter++) { - for (outerProcTileIter1=outerProcTileScatter1;outerProcTileIter1<=outerProcTileScatter1;outerProcTileIter1++) { - for (outerProcTileIter2=outerProcTileScatter2;outerProcTileIter2<=outerProcTileScatter2;outerProcTileIter2++) { - for (innerTimeTileIter=innerTimeTileScatter;innerTimeTileIter<=innerTimeTileScatter;innerTimeTileIter++) { - for (innerProcTileIter1=innerProcTileScatter1;innerProcTileIter1<=innerProcTileScatter1;innerProcTileIter1++) { - for (innerProcTileIter2=outerProcTileScatter2;innerProcTileIter2<=outerProcTileScatter2;innerProcTileIter2++) { - S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2); - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/otl.cloog b/cloog-0.17.0/test/otl.cloog deleted file mode 100644 index 5f9b7831346a453673dc2a67c397e82b3ac3d914..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/otl.cloog +++ /dev/null @@ -1,117 +0,0 @@ -# created: Tue Mar 23 01:51:15 CET 2010 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context -2 4 - 1 1 0 -1 - 1 0 1 -1 - - -1 # set parameter names -M N - -# --------------------- STATEMENTS -------------------- -1 - -1 # domains per statement -76 10 - 1 -5 0 0 0 0 0 2 2 -7 - 1 -20 0 0 0 20 20 0 0 16 - 1 -40 0 0 0 0 80 0 8 16 - 1 -4 4 0 0 0 4 0 0 4 - 1 -20 0 0 0 40 0 0 0 8 - 1 -20 0 20 0 20 0 0 0 16 - 1 -20 0 40 0 0 0 0 4 8 - 1 -20 40 0 0 0 0 0 0 16 - 1 -4 4 4 0 0 0 0 0 4 - 1 -20 0 0 0 0 20 4 4 -4 - 1 -10 0 0 0 10 0 2 0 2 - 1 -5 0 0 5 0 0 0 0 3 - 1 -5 5 0 0 0 0 1 0 2 - 1 -10 0 10 0 0 0 2 2 -2 - 1 0 -10 -10 10 0 0 0 2 6 - 1 20 -20 -20 0 0 0 0 4 16 - 1 0 -10 0 10 0 -10 0 2 6 - 1 40 -40 0 0 0 -40 0 8 32 - 1 0 -20 0 10 0 0 0 4 0 - 1 0 -10 0 0 0 0 2 4 -10 - 1 40 -80 0 0 0 0 0 16 8 - 1 0 -10 0 0 0 10 0 2 2 - 1 0 -5 0 0 5 0 0 0 3 - 1 0 -10 0 10 0 0 0 0 4 - 1 0 -5 5 0 0 0 0 1 1 - 1 20 -20 0 0 0 0 0 0 12 - 1 0 0 -10 10 -10 0 0 2 8 - 1 40 0 -40 0 -40 0 0 8 40 - 1 0 0 -20 10 0 0 0 2 4 - 1 0 0 -5 0 0 0 1 1 -2 - 1 40 0 -80 0 0 0 0 8 24 - 1 0 0 -5 0 0 5 0 0 4 - 1 0 0 -10 0 10 0 0 0 4 - 1 0 0 -10 10 0 0 0 0 2 - 1 0 5 -5 0 0 0 0 0 3 - 1 40 0 -40 0 0 0 0 0 16 - 1 0 0 0 -5 0 0 2 2 -6 - 1 0 0 0 -20 20 20 0 0 20 - 1 0 0 0 -40 0 80 0 8 24 - 1 0 20 0 -20 0 20 0 0 24 - 1 0 0 20 -20 20 0 0 0 20 - 1 0 0 0 -20 40 0 0 0 12 - 1 0 0 40 -20 0 0 0 4 12 - 1 0 40 0 -20 0 0 0 0 20 - 1 0 20 20 -20 0 0 0 0 24 - 1 0 0 0 -40 0 40 8 8 0 - 1 0 0 0 -20 20 0 4 0 8 - 1 0 0 20 -20 0 0 4 4 0 - 1 2 0 0 -2 0 0 0 0 2 - 1 0 10 0 -10 0 0 2 0 6 - 1 0 0 0 10 -10 -10 0 2 8 - 1 80 0 0 0 -80 -80 0 16 80 - 1 0 0 0 10 -20 0 0 4 4 - 1 0 0 0 0 -10 0 2 4 -8 - 1 120 0 0 0 -240 0 0 48 72 - 1 0 0 0 0 -20 20 0 4 8 - 1 0 0 0 10 -10 0 0 0 6 - 1 0 0 10 0 -10 0 0 2 4 - 1 0 1 0 0 -1 0 0 0 1 - 1 40 0 0 0 -40 0 0 0 32 - 1 0 0 0 10 0 -20 0 2 4 - 1 0 0 0 0 0 -5 1 1 -2 - 1 80 0 0 0 0 -160 0 16 48 - 1 0 0 0 0 10 -10 0 0 4 - 1 0 0 0 10 0 -10 0 0 2 - 1 0 0 5 0 0 -5 0 0 4 - 1 0 10 0 0 0 -10 0 0 6 - 1 40 0 0 0 0 -40 0 0 16 - 1 0 0 0 0 0 4 0 0 0 - 1 0 0 0 0 20 0 0 0 -8 - 1 0 0 0 20 0 0 0 0 -12 - 1 0 0 4 0 0 0 0 0 0 - 1 0 20 0 0 0 0 0 0 -4 - 1 80 0 0 0 0 0 0 0 -32 - 1 0 0 0 0 0 0 0 1 -4 - 1 0 0 0 0 0 0 1 0 -3 - - -0 0 0 # for future options... - - - -1 # set the iterator names -outerTimeTileIter outerProcTileIter1 outerProcTileIter2 innerTimeTileIter innerProcTileIter1 innerProcTileIter2 - -# --------------------- SCATTERING -------------------- -1 # Scattering functions -6 16 - 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 - - -1 # we set the scattering dimension names -outerTimeTileScatter outerProcTileScatter1 outerProcTileScatter2 innerTimeTileScatter innerProcTileScatter1 innerProcTileScatter2 - diff --git a/cloog-0.17.0/test/otl.good.c b/cloog-0.17.0/test/otl.good.c deleted file mode 100644 index 3004d8e72a2c37323e02c9a34f2f70a417ba35f8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/otl.good.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Generated from ../../../git/cloog/test/otl.cloog by CLooG 0.14.0-273-gfe7416f gmp bits in 0.24s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2) { hash(1); hash(outerTimeTileIter); hash(outerProcTileIter1); hash(outerProcTileIter2); hash(innerTimeTileIter); hash(innerProcTileIter1); hash(innerProcTileIter2); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int outerTimeTileScatter, outerProcTileScatter1, outerProcTileScatter2, innerTimeTileScatter, innerProcTileScatter1, innerProcTileScatter2; - /* Original iterators. */ - int outerTimeTileIter, outerProcTileIter1, outerProcTileIter2, innerTimeTileIter, innerProcTileIter1, innerProcTileIter2; - if ((M >= 3) && (N >= 4)) { - for (outerTimeTileScatter=1;outerTimeTileScatter<=floord(2*M+2*N-7,5);outerTimeTileScatter++) { - for (outerProcTileScatter1=max(ceild(outerTimeTileScatter,2),ceild(5*outerTimeTileScatter-M-2,5));outerProcTileScatter1<=min(min(floord(M+2*N-5,5),floord(5*outerTimeTileScatter+2*N+1,10)),outerTimeTileScatter);outerProcTileScatter1++) { - for (outerProcTileScatter2=max(max(max(max(max(ceild(outerTimeTileScatter-outerProcTileScatter1-1,2),ceild(5*outerProcTileScatter1-N-1,5)),ceild(5*outerTimeTileScatter-M-N+1,5)),ceild(5*outerTimeTileScatter-N-2,10)),ceild(5*outerTimeTileScatter-N-3,15)),outerTimeTileScatter-outerProcTileScatter1-1);outerProcTileScatter2<=min(min(min(floord(M+N-2,5),floord(5*outerTimeTileScatter-5*outerProcTileScatter1+N+4,5)),floord(5*outerTimeTileScatter+N+3,10)),outerProcTileScatter1);outerProcTileScatter2++) { - for (innerTimeTileScatter=max(max(max(ceild(10*outerProcTileScatter1-2*N,5),ceild(10*outerProcTileScatter2-N-2,5)),ceild(5*outerProcTileScatter1+5*outerProcTileScatter2-N-3,5)),outerTimeTileScatter);innerTimeTileScatter<=min(min(min(min(min(floord(2*M+2*N-6,5),floord(5*outerProcTileScatter1+M+3,5)),floord(5*outerProcTileScatter2+M+N,5)),floord(10*outerProcTileScatter2+N+3,5)),outerTimeTileScatter+1),outerProcTileScatter1+outerProcTileScatter2+1);innerTimeTileScatter++) { - for (innerProcTileScatter1=max(max(max(max(ceild(innerTimeTileScatter,2),ceild(5*innerTimeTileScatter-M-2,5)),ceild(5*outerTimeTileScatter-M-1,5)),outerProcTileScatter1),outerTimeTileScatter-outerProcTileScatter2);innerProcTileScatter1<=min(min(min(min(min(min(min(floord(M+2*N-4,5),floord(5*outerProcTileScatter2+N+2,5)),floord(-5*outerProcTileScatter2+5*innerTimeTileScatter+N+4,5)),floord(5*outerTimeTileScatter-5*outerProcTileScatter2+N+5,5)),floord(5*innerTimeTileScatter+2*N+2,10)),floord(5*outerTimeTileScatter+2*N+3,10)),outerTimeTileScatter),outerProcTileScatter1+1);innerProcTileScatter1++) { - for (innerProcTileScatter2=outerProcTileScatter2;innerProcTileScatter2<=outerProcTileScatter2;innerProcTileScatter2++) { - for (outerTimeTileIter=outerTimeTileScatter;outerTimeTileIter<=outerTimeTileScatter;outerTimeTileIter++) { - for (outerProcTileIter1=outerProcTileScatter1;outerProcTileIter1<=outerProcTileScatter1;outerProcTileIter1++) { - for (outerProcTileIter2=outerProcTileScatter2;outerProcTileIter2<=outerProcTileScatter2;outerProcTileIter2++) { - for (innerTimeTileIter=innerTimeTileScatter;innerTimeTileIter<=innerTimeTileScatter;innerTimeTileIter++) { - for (innerProcTileIter1=innerProcTileScatter1;innerProcTileIter1<=innerProcTileScatter1;innerProcTileIter1++) { - for (innerProcTileIter2=outerProcTileScatter2;innerProcTileIter2<=outerProcTileScatter2;innerProcTileIter2++) { - S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2); - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/param-split.c b/cloog-0.17.0/test/param-split.c deleted file mode 100644 index 97c75b10de0ccbce81f449a2fd2db58b704a50ea..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/param-split.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/param-split.cloog by CLooG 0.14.0-277-gce2ba57 gmp bits in 0.00s. */ -for (i=0;i<=M;i++) { - S1(i); - if (i == 0) { - S2(i); - } -} -if (M <= -1) { - S2(0); -} diff --git a/cloog-0.17.0/test/param-split.cloog b/cloog-0.17.0/test/param-split.cloog deleted file mode 100644 index 6f9e58fe8389dc69c60039678f407c0fc3aeb013..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/param-split.cloog +++ /dev/null @@ -1,24 +0,0 @@ -c - -0 3 - -0 - -2 - -1 -2 4 -1 1 0 0 -1 -1 1 0 - -0 0 0 - -1 -1 4 -0 1 0 0 - -0 0 0 - -0 - -0 diff --git a/cloog-0.17.0/test/param-split.good.c b/cloog-0.17.0/test/param-split.good.c deleted file mode 100644 index 25b3bc6c5637cc1e57a30c069b4697bf978fc89d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/param-split.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/param-split.cloog by CLooG 0.14.0-277-gce2ba57 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } - -void test(int M) -{ - /* Original iterators. */ - int i; - if (M >= 0) { - S1(0); - S2(0); - } - for (i=1;i<=M;i++) { - S1(i); - } - if (M <= -1) { - S2(0); - } -} diff --git a/cloog-0.17.0/test/pouchet.c b/cloog-0.17.0/test/pouchet.c deleted file mode 100644 index 3eb887fe5a9fa730bbee69ecebbde693dfc6a18f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/pouchet.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Generated from ../../../git/cloog/test/pouchet.cloog by CLooG 0.16.2-3-gc1aebd7 gmp bits in 0.03s. */ -if (Ny >= 2) { - for (c0=1;c0<=floord(Ny+4,2);c0++) { - for (c1=max(ceild(c0+1,2),c0-1);c1<=min(floord(2*c0+Ny,4),c0);c1++) { - if (c0 >= ceild(4*c1-Ny+1,2)) { - for (c2=1;c2<=2;c2++) { - S1(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1,c2); - S2(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1-1,c2); - } - } - if (2*c0 == 4*c1-Ny) { - for (c2=1;c2<=2;c2++) { - if (Ny%2 == 0) { - if ((2*c0+3*Ny)%4 == 0) { - S2((2*c0-Ny)/4,(2*c0+Ny)/4,(2*c0-Ny)/2,Ny-1,c2); - } - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/pouchet.cloog b/cloog-0.17.0/test/pouchet.cloog deleted file mode 100644 index bef72937dcebb28b85873361911e3c26e7a99115..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/pouchet.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# CLooG -> CLooG -# This is an automatic dump of a CLooG input file from a CloogInput data -# structure. - -# Language: C -c - -# Context: -1 - -0 3 0 0 0 1 - -1 # Parameter name(s) -Ny - -# Statement number: -2 - -# Iteration domain of statement 2 ((null)). -1 - -8 8 5 0 0 1 -1 0 0 1 0 0 0 0 -1 0 0 -1 0 0 0 2 -1 0 0 0 1 0 0 -1 -1 0 0 0 -1 0 1 -1 -1 0 0 0 0 1 0 -1 -1 0 0 0 0 -1 0 2 -0 -2 0 1 0 0 0 0 -0 0 -2 1 1 0 0 0 - -0 0 0 # For future options. - -# Iteration domain of statement 4 ((null)). -1 - -8 8 5 0 0 1 -1 0 0 1 0 0 0 0 -1 0 0 -1 0 0 0 2 -1 0 0 0 1 0 0 -1 -1 0 0 0 -1 0 1 -1 -1 0 0 0 0 1 0 -1 -1 0 0 0 0 -1 0 2 -0 -2 0 1 0 0 0 0 -0 0 -2 1 1 0 0 1 - -0 0 0 # For future options. - -0 # Iterator name(s) -# --------------------- SCATTERING -------------------- -2 # Scattering functions - -# Scattering of statement 2 ((null)). -1 - -6 14 6 5 0 1 -0 0 0 0 0 0 1 0 0 0 0 -1 0 0 -0 0 0 0 0 1 0 0 0 0 -1 0 0 0 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 -0 0 0 1 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -0 1 0 0 0 0 0 -1 -1 0 0 0 0 0 - -# Scattering of statement 4 ((null)). -1 - -6 14 6 5 0 1 -0 0 0 0 0 0 1 0 0 0 0 -1 0 -1 -0 0 0 0 0 1 0 0 0 0 -1 0 0 -1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 -0 0 0 1 0 0 0 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 -0 1 0 0 0 0 0 -1 -1 0 0 0 0 0 - -1 # Scattering dimension name(s) -c0 c1 c2 c3 c4 c5 diff --git a/cloog-0.17.0/test/pouchet.good.c b/cloog-0.17.0/test/pouchet.good.c deleted file mode 100644 index 43009f57b58b5b46c17000c81abdc6b01ade3b84..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/pouchet.good.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Generated from ../../../git/cloog/test/pouchet.cloog by CLooG 0.16.2-3-gc1aebd7 gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l,m) { hash(1); hash(i); hash(j); hash(k); hash(l); hash(m); } -#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } - -void test(int Ny) -{ - /* Scattering iterators. */ - int c0, c1, c2, c3, c4, c5; - /* Original iterators. */ - int i, j, k, l, m; - if (Ny >= 2) { - for (c0=1;c0<=floord(Ny+4,2);c0++) { - for (c1=max(ceild(c0+1,2),c0-1);c1<=min(floord(2*c0+Ny,4),c0);c1++) { - if (c0 >= ceild(4*c1-Ny+1,2)) { - for (c2=1;c2<=2;c2++) { - S1(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1,c2); - S2(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1-1,c2); - } - } - if (2*c0 == 4*c1-Ny) { - for (c2=1;c2<=2;c2++) { - if (Ny%2 == 0) { - if ((2*c0+3*Ny)%4 == 0) { - S2((2*c0-Ny)/4,(2*c0+Ny)/4,(2*c0-Ny)/2,Ny-1,c2); - } - } - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/rectangle.c b/cloog-0.17.0/test/rectangle.c deleted file mode 100644 index dba226abad7c6560da9339e44d43b7d91bfb938d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/rectangle.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/rectangle.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c1=0;c1<=2*n;c1++) { - for (i=max(0,c1-n);i<=min(c1,n);i++) { - S1(i,c1-i) ; - } -} diff --git a/cloog-0.17.0/test/rectangle.cloog b/cloog-0.17.0/test/rectangle.cloog deleted file mode 100644 index 9f639aba964907f1efdd7f967e348030d1094af5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/rectangle.cloog +++ /dev/null @@ -1,29 +0,0 @@ -# language: C -c - -# parameter {n | n>= 0} -1 3 -# n 1 -1 1 0 -1 -n - -1 # Number of statements: - -1 -# {ii, i | 0<=i<=n 0<=j<=n} -4 5 -# i j n 1 -1 1 0 0 0 -1 -1 0 1 0 -1 0 1 0 0 -1 0 -1 1 0 -0 0 0 -0 - -1 # Scattering functions - -1 6 -# c1 j i n 1 -0 1 -1 -1 0 0 -0 diff --git a/cloog-0.17.0/test/rectangle.good.c b/cloog-0.17.0/test/rectangle.good.c deleted file mode 100644 index b977e28ffb8554e21650a9fbb59f2262d3fbad82..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/rectangle.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/rectangle.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i, j; - for (c1=0;c1<=2*n;c1++) { - for (i=max(c1-n,0);i<=min(c1,n);i++) { - j = c1-i ; - S1(i,c1-i) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/QR.c b/cloog-0.17.0/test/reservoir/QR.c deleted file mode 100644 index 5a8c26f1e4bfe554a4e9a5420c286054f1e7a253..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/QR.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/QR.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.21s. */ -if (N >= 1) { - S1(0) ; - if ((M >= 1) && (N == 1)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S5(0) ; - } - if ((M <= 0) && (N == 1)) { - S3(0) ; - S10(0) ; - S5(0) ; - } - if ((M >= 1) && (N >= 2)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S1(1) ; - S5(0) ; - } - if ((M <= 0) && (N >= 2)) { - S3(0) ; - S10(0) ; - S1(1) ; - S5(0) ; - } - for (c2=2;c2<=min(M,N-1);c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - S6(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - S7(c2-2,c4,c6) ; - } - S8(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - S9(c2-2,c4,c6) ; - } - } - for (c4=c2-1;c4<=M-1;c4++) { - S2(c2-1,c4) ; - } - S3(c2-1) ; - for (c4=c2-1;c4<=M-1;c4++) { - S4(c2-1,c4) ; - } - S10(c2-1) ; - S1(c2) ; - S5(c2-1) ; - } - if ((M >= 1) && (M <= N-2)) { - for (c4=M;c4<=N-1;c4++) { - S6(M-1,c4) ; - S7(M-1,c4,M-1) ; - S8(M-1,c4) ; - S9(M-1,c4,M-1) ; - } - S3(M) ; - S10(M) ; - S1(M+1) ; - S5(M) ; - } - for (c2=max(2,M+2);c2<=N-1;c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - S6(c2-2,c4) ; - S8(c2-2,c4) ; - } - S3(c2-1) ; - S10(c2-1) ; - S1(c2) ; - S5(c2-1) ; - } - if ((M >= N) && (N >= 2)) { - S6(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - S7(N-2,N-1,c6) ; - } - S8(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - S9(N-2,N-1,c6) ; - } - for (c4=N-1;c4<=M-1;c4++) { - S2(N-1,c4) ; - } - S3(N-1) ; - for (c4=N-1;c4<=M-1;c4++) { - S4(N-1,c4) ; - } - S10(N-1) ; - S5(N-1) ; - } - if ((M == N-1) && (M >= 1)) { - S6(M-1,M) ; - S7(M-1,M,M-1) ; - S8(M-1,M) ; - S9(M-1,M,M-1) ; - S3(M) ; - S10(M) ; - S5(M) ; - } - if ((M <= N-2) && (N >= 2)) { - S6(N-2,N-1) ; - S8(N-2,N-1) ; - S3(N-1) ; - S10(N-1) ; - S5(N-1) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/QR.cloog b/cloog-0.17.0/test/reservoir/QR.cloog deleted file mode 100755 index 8baed208c680fb29d5c238a337dce43e14003202..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/QR.cloog +++ /dev/null @@ -1,228 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -10 - -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+l-1 >= 0, -i+j >= 0, -j+k-1 >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 0 1 -1 - 1 -1 1 0 0 0 - 1 0 -1 1 0 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+l-1 >= 0, -i+j >= 0, -j+k-1 >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 0 1 -1 - 1 -1 1 0 0 0 - 1 0 -1 1 0 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } - - 4 6 - 1 1 0 0 0 0 - 1 -1 1 0 0 -1 - 1 0 -1 0 1 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i >= 0, -i+j-1 >= 0, -j+m-1 >= 0, -i+k >= 0, -k+l-1 >= 0, 1 >= 0 } - - 6 7 - 1 1 0 0 0 0 0 - 1 -1 1 0 0 0 -1 - 1 0 -1 0 0 1 -1 - 1 -1 0 1 0 0 0 - 1 0 0 -1 1 0 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } - - 4 6 - 1 1 0 0 0 0 - 1 -1 1 0 0 -1 - 1 0 -1 0 1 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i >= 0, -i+j-1 >= 0, -j+m-1 >= 0, -i+k >= 0, -k+l-1 >= 0, 1 >= 0 } - - 6 7 - 1 1 0 0 0 0 0 - 1 -1 1 0 0 0 -1 - 1 0 -1 0 0 1 -1 - 1 -1 0 1 0 0 0 - 1 0 0 -1 1 0 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -10 - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -5 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 -3 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -6 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -3 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -4 - 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/QR.good.c b/cloog-0.17.0/test/reservoir/QR.good.c deleted file mode 100644 index facd21404de7eb6e08e5e6794cd65fc8e32cc532..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/QR.good.c +++ /dev/null @@ -1,208 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/QR.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i) { hash(5); hash(i); } -#define S6(i,j) { hash(6); hash(i); hash(j); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j) { hash(8); hash(i); hash(j); } -#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } -#define S10(i) { hash(10); hash(i); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M <= -1) && (N >= 1)) { - S1(0) ; - } - if ((M >= 0) && (N >= 1)) { - S1(0) ; - } - if ((M >= 1) && (N >= 2)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S1(1) ; - S5(0) ; - } - if ((M <= 0) && (N >= 2)) { - S3(0) ; - S10(0) ; - S1(1) ; - S5(0) ; - } - if ((M >= 1) && (N == 1)) { - for (c4=0;c4<=M-1;c4++) { - S2(0,c4) ; - } - S3(0) ; - for (c4=0;c4<=M-1;c4++) { - S4(0,c4) ; - } - S10(0) ; - S5(0) ; - } - if ((M <= 0) && (N == 1)) { - S3(0) ; - S10(0) ; - S5(0) ; - } - for (c2=2;c2<=min(N-1,M);c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - i = c2-2 ; - S6(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - i = c2-2 ; - S7(c2-2,c4,c6) ; - } - i = c2-2 ; - S8(c2-2,c4) ; - for (c6=c2-2;c6<=M-1;c6++) { - i = c2-2 ; - S9(c2-2,c4,c6) ; - } - } - for (c4=c2-1;c4<=M-1;c4++) { - i = c2-1 ; - S2(c2-1,c4) ; - } - i = c2-1 ; - S3(c2-1) ; - for (c4=c2-1;c4<=M-1;c4++) { - i = c2-1 ; - S4(c2-1,c4) ; - } - i = c2-1 ; - S10(c2-1) ; - S1(c2) ; - i = c2-1 ; - S5(c2-1) ; - } - if ((M >= 1) && (M <= N-2)) { - c2 = M+1 ; - for (c4=M;c4<=N-1;c4++) { - i = M-1 ; - S6(M-1,c4) ; - c6 = M-1 ; - i = M-1 ; - k = M-1 ; - S7(M-1,c4,M-1) ; - i = M-1 ; - S8(M-1,c4) ; - c6 = M-1 ; - i = M-1 ; - k = M-1 ; - S9(M-1,c4,M-1) ; - } - S3(M) ; - S10(M) ; - i = M+1 ; - S1(M+1) ; - S5(M) ; - } - if ((M >= N) && (N >= 2)) { - c4 = N-1 ; - i = N-2 ; - j = N-1 ; - S6(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - i = N-2 ; - j = N-1 ; - S7(N-2,N-1,c6) ; - } - i = N-2 ; - j = N-1 ; - S8(N-2,N-1) ; - for (c6=N-2;c6<=M-1;c6++) { - i = N-2 ; - j = N-1 ; - S9(N-2,N-1,c6) ; - } - for (c4=N-1;c4<=M-1;c4++) { - i = N-1 ; - S2(N-1,c4) ; - } - i = N-1 ; - S3(N-1) ; - for (c4=N-1;c4<=M-1;c4++) { - i = N-1 ; - S4(N-1,c4) ; - } - i = N-1 ; - S10(N-1) ; - i = N-1 ; - S5(N-1) ; - } - if ((M == N-1) && (N >= 2)) { - c4 = N-1 ; - i = N-2 ; - j = N-1 ; - S6(N-2,N-1) ; - c6 = N-2 ; - i = N-2 ; - j = N-1 ; - k = N-2 ; - S7(N-2,N-1,N-2) ; - i = N-2 ; - j = N-1 ; - S8(N-2,N-1) ; - c6 = N-2 ; - i = N-2 ; - j = N-1 ; - k = N-2 ; - S9(N-2,N-1,N-2) ; - i = N-1 ; - S3(N-1) ; - i = N-1 ; - S10(N-1) ; - i = N-1 ; - S5(N-1) ; - } - for (c2=max(M+2,2);c2<=N-1;c2++) { - for (c4=c2-1;c4<=N-1;c4++) { - i = c2-2 ; - S6(c2-2,c4) ; - i = c2-2 ; - S8(c2-2,c4) ; - } - i = c2-1 ; - S3(c2-1) ; - i = c2-1 ; - S10(c2-1) ; - S1(c2) ; - i = c2-1 ; - S5(c2-1) ; - } - if ((M <= N-2) && (N >= 2)) { - c4 = N-1 ; - i = N-2 ; - j = N-1 ; - S6(N-2,N-1) ; - i = N-2 ; - j = N-1 ; - S8(N-2,N-1) ; - i = N-1 ; - S3(N-1) ; - i = N-1 ; - S10(N-1) ; - i = N-1 ; - S5(N-1) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/bastoul3.c b/cloog-0.17.0/test/reservoir/bastoul3.c deleted file mode 100644 index 5f4b050888e025d5321ad824e80bfcc28c17a44a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/bastoul3.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/bastoul3.cloog by CLooG 0.16.3 gmp bits in 0.01s. */ -for (i=3;i<=9;i++) { - for (j=max(i-6,i-2*floord(i+1,2)+2);j<=min(3,i-2);j+=2) { - S1(i,j,(i-j)/2); - } -} diff --git a/cloog-0.17.0/test/reservoir/bastoul3.cloog b/cloog-0.17.0/test/reservoir/bastoul3.cloog deleted file mode 100644 index 8437226f1b79829f6109a318151e148b61e00a64..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/bastoul3.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# Figure 4 from "Efficient code generation for automatic parallelization -# and optimization". -# -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statements -1 - -1 - -# i' i j 1 - 6 5 - 0 1 -1 -2 0 - 1 0 1 0 -1 - 1 0 -1 0 3 - 1 0 0 1 -1 - 1 0 0 -1 3 - 1 0 0 0 1 - -0 0 0 - -0 -0 - - - diff --git a/cloog-0.17.0/test/reservoir/cholesky2.c b/cloog-0.17.0/test/reservoir/cholesky2.c deleted file mode 100644 index ee3c52e0bfa8ad502dfb178734b7e0bafbe1895a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/cholesky2.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/cholesky2.cloog by CLooG 0.14.0-283-g7c18f7a gmp bits in 0.04s. */ -if (M >= 1) { - if (M >= 2) { - S1(1); - } - for (c2=2;c2<=min(3,M);c2++) { - S2(1,c2); - } - if (M == 1) { - S1(1); - } - for (c2=4;c2<=3*M-4;c2++) { - if ((c2+1)%3 == 0) { - S1((c2+1)/3); - } - for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) { - for (c6=ceild(c2-c4+2,2);c6<=min(c4,c2-c4);c6++) { - S3(c2-c4-c6+1,c4,c6); - } - } - for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) { - if ((c2+c4)%2 == 0) { - S2((c2-c4+2)/2,c4); - } - } - } - for (c2=max(2*M,3*M-3);c2<=3*M-2;c2++) { - S3(c2-2*M+1,M,M); - } - if (M >= 2) { - S1(M); - } -} diff --git a/cloog-0.17.0/test/reservoir/cholesky2.cloog b/cloog-0.17.0/test/reservoir/cholesky2.cloog deleted file mode 100755 index 7317c6ade21b07995925d94c149f16ba829c994e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/cholesky2.cloog +++ /dev/null @@ -1,79 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 -1 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 4 5 - 1 1 0 0 -1 - 1 -1 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -j+l >= 0, -i+k-1 >= 0, j-k >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 0 -1 0 1 0 - 1 -1 0 1 0 -1 - 1 0 1 -1 0 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -3 0 1 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 -1 0 2 - 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 -1 0 1 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/cholesky2.good.c b/cloog-0.17.0/test/reservoir/cholesky2.good.c deleted file mode 100644 index 36efcde3bfd72a09ca6cfe35cdb0399f60cfd564..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/cholesky2.good.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=2;c2<=min(3,3*M-4);c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - for (c4=ceild(c2+4,3);c4<=min(c2,M);c4++) { - if ((c2+c4)%2 == 0) { - i = (c2-c4+2)/2 ; - S2((c2-c4+2)/2,c4) ; - } - } - } - for (c2=4;c2<=3*M-4;c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - for (c4=ceild(c2+2,3);c4<=min(c2-2,M);c4++) { - for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) { - i = c2-c4-c6+1 ; - S3(c2-c4-c6+1,c4,c6) ; - } - } - for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) { - if ((c2+c4)%2 == 0) { - i = (c2-c4+2)/2 ; - S2((c2-c4+2)/2,c4) ; - } - } - } - for (c2=max(2,3*M-3);c2<=min(3,3*M-2);c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - } - for (c2=max(3*M-3,4);c2<=3*M-2;c2++) { - if ((c2+1)%3 == 0) { - i = (c2+1)/3 ; - S1((c2+1)/3) ; - } - for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) { - for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) { - i = c2-c4-c6+1 ; - S3(c2-c4-c6+1,c4,c6) ; - } - } - } - if (M >= 1) { - c2 = 3*M-1 ; - S1(M) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/fusion1.c b/cloog-0.17.0/test/reservoir/fusion1.c deleted file mode 100644 index c2c0adfd0b8d7cedbe4698569fd09f0b0983c9f5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/fusion1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c2=0;c2<=M;c2++) { - S1(c2) ; -} -for (c2=1;c2<=M;c2++) { - S2(c2) ; -} -for (c2=0;c2<=M;c2++) { - S3(c2) ; -} diff --git a/cloog-0.17.0/test/reservoir/fusion1.cloog b/cloog-0.17.0/test/reservoir/fusion1.cloog deleted file mode 100755 index 3aea33418c6a495d78683cda4a525d2534ae810b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/fusion1.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -1 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j) | i >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 0 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -1 -# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 -1 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -1 -# { (i,j) | i >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 0 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 4 7 - 0 1 0 0 0 0 0 - 0 0 1 0 -1 0 0 - 0 0 0 1 0 0 0 - 1 0 0 0 0 0 1 - - - 4 7 - 0 1 0 0 0 0 -1 - 0 0 1 0 -1 0 0 - 0 0 0 1 0 0 0 - 1 0 0 0 0 0 1 - - - 4 7 - 0 1 0 0 0 0 -2 - 0 0 1 0 -1 0 0 - 0 0 0 1 0 0 0 - 1 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/fusion1.good.c b/cloog-0.17.0/test/reservoir/fusion1.good.c deleted file mode 100644 index ba28eba7e47bc4d2dd71ac4aa9f152d8513598ac..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/fusion1.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i) { hash(2); hash(i); } -#define S3(i) { hash(3); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2; - /* Original iterators. */ - int i; - for (c2=0;c2<=M;c2++) { - S1(c2) ; - } - for (c2=1;c2<=M;c2++) { - S2(c2) ; - } - for (c2=0;c2<=M;c2++) { - S3(c2) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/fusion2.c b/cloog-0.17.0/test/reservoir/fusion2.c deleted file mode 100644 index d9d02d633d69af5f88728684f63105b356bbb434..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/fusion2.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if ((M >= 1) && (N >= 1)) { - for (c4=1;c4<=M;c4++) { - S1(1,c4) ; - } - for (c2=2;c2<=N;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2-1,c4) ; - } - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c4=1;c4<=M;c4++) { - S2(N,c4) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/fusion2.cloog b/cloog-0.17.0/test/reservoir/fusion2.cloog deleted file mode 100755 index dad835303e1fb9b6d0156e74f23eba859326ec9c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/fusion2.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 1 0 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 1 0 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/fusion2.good.c b/cloog-0.17.0/test/reservoir/fusion2.good.c deleted file mode 100644 index b4b8f1ccae4a72f282eba39de9a2d6aa1669a0d7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/fusion2.good.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/fusion2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - if ((M >= 1) && (N >= 1)) { - for (c4=1;c4<=M;c4++) { - S1(1,c4) ; - } - } - if (M >= 1) { - for (c2=2;c2<=N;c2++) { - for (c4=1;c4<=M;c4++) { - i = c2-1 ; - S2(c2-1,c4) ; - } - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - } - if ((M >= 1) && (N >= 1)) { - c2 = N+1 ; - for (c4=1;c4<=M;c4++) { - S2(N,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/jacobi2.c b/cloog-0.17.0/test/reservoir/jacobi2.c deleted file mode 100644 index 421e8a9e786bceb7e6596059ede49bc112eba3d7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/jacobi2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c2=0;c2<=M-1;c2++) { - for (c4=0;c4<=M-1;c4++) { - S1(c2,c4) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/jacobi2.cloog b/cloog-0.17.0/test/reservoir/jacobi2.cloog deleted file mode 100755 index 73523629383618f5a94c86bf15755f46859150f7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/jacobi2.cloog +++ /dev/null @@ -1,37 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -1 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k) | i >= 0, -i+k-1 >= 0, j >= 0, -j+k-1 >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 0 - 1 -1 0 1 -1 - 1 0 1 0 0 - 1 0 -1 1 -1 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/jacobi2.good.c b/cloog-0.17.0/test/reservoir/jacobi2.good.c deleted file mode 100644 index 8c6ea0e3331da4de8b20c7de59e2cf3ed810f8f3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/jacobi2.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=0;c2<=M-1;c2++) { - for (c4=0;c4<=M-1;c4++) { - S1(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/jacobi3.c b/cloog-0.17.0/test/reservoir/jacobi3.c deleted file mode 100644 index 0182c158fe52e44bdb2d1faec2beb7d47fe80312..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/jacobi3.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if ((M >= 1) && (N >= 3)) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - S2((c2-1)/2,c4,c6) ; - } - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/jacobi3.cloog b/cloog-0.17.0/test/reservoir/jacobi3.cloog deleted file mode 100755 index dff32ff21fcafc202178dab1e473f56aac744600..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/jacobi3.cloog +++ /dev/null @@ -1,64 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/jacobi3.good.c b/cloog-0.17.0/test/reservoir/jacobi3.good.c deleted file mode 100644 index 39cfce35998df32d7cb78b4387b58e664142e45f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/jacobi3.good.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/jacobi3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 1) && (N >= 3)) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - } - if (N >= 3) { - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - i = (c2-1)/2 ; - S2((c2-1)/2,c4,c6) ; - } - } - } - } - } - if ((M >= 1) && (N >= 3)) { - c2 = 2*M+1 ; - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam1.c b/cloog-0.17.0/test/reservoir/lim-lam1.c deleted file mode 100644 index 469117cb5dd2fe7eda3eab0e91dfd8dbe9108ff7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam1.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/lim-lam1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -S1(1,100); -for (c2=-98;c2<=99;c2++) { - if (c2 <= 0) { - S1(1,-c2+1); - } - if (c2 >= 1) { - S2(c2,1); - } - for (c4=max(2,-2*c2+3);c4<=min(199,-2*c2+200);c4++) { - if (c4%2 == 0) { - S1((2*c2+c4)/2,c4/2); - } - if ((c4+1)%2 == 0) { - S2((2*c2+c4-1)/2,(c4+1)/2); - } - } - if (c2 <= 0) { - S1(c2+100,100); - } - if (c2 >= 1) { - S2(100,-c2+101); - } -} -S2(100,1); diff --git a/cloog-0.17.0/test/reservoir/lim-lam1.cloog b/cloog-0.17.0/test/reservoir/lim-lam1.cloog deleted file mode 100644 index 7a7c684f44e24fc19c9b703f86b4f98290cc50cb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam1.cloog +++ /dev/null @@ -1,54 +0,0 @@ -# Language -c - -# Context - - 1 2 - 1 1 -0 - -# Number of statments -2 - -1 -# { (i,j) | i-1 >= 0, -i+100 >= 0, j-1 >= 0, -j+100 >= 0 } - - 4 4 - 1 1 0 -1 - 1 -1 0 100 - 1 0 1 -1 - 1 0 -1 100 - -0 0 0 -1 -# { (i,j) | i-1 >= 0, -i+100 >= 0, j-1 >= 0, -j+100 >= 0 } - - 4 4 - 1 1 0 -1 - 1 -1 0 100 - 1 0 1 -1 - 1 0 -1 100 - -0 0 0 -0 -# Scattering functions -2 - - 6 9 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 1 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 -2 0 - 0 0 0 0 0 1 0 0 0 - 1 0 0 0 0 0 0 0 1 - - - 6 9 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 1 -1 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 -2 1 - 0 0 0 0 0 1 0 0 -1 - 1 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/lim-lam1.good.c b/cloog-0.17.0/test/reservoir/lim-lam1.good.c deleted file mode 100644 index cd6faf722ac6806bb8b580fceceda1d55bec0a43..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam1.good.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - S1(1,100) ; - for (c2=-98;c2<=0;c2++) { - c4 = -2*c2+2 ; - j = -c2+1 ; - S1(1,-c2+1) ; - for (c4=-2*c2+3;c4<=199;c4++) { - if (c4%2 == 0) { - i = (2*c2+c4)/2 ; - S1((2*c2+c4)/2,c4/2) ; - } - if ((c4+1)%2 == 0) { - i = (2*c2+c4-1)/2 ; - j = (c4+1)/2 ; - S2((2*c2+c4-1)/2,(c4+1)/2) ; - } - } - i = c2+100 ; - S1(c2+100,100) ; - } - for (c2=1;c2<=99;c2++) { - S2(c2,1) ; - for (c4=2;c4<=-2*c2+200;c4++) { - if (c4%2 == 0) { - i = (2*c2+c4)/2 ; - S1((2*c2+c4)/2,c4/2) ; - } - if ((c4+1)%2 == 0) { - i = (2*c2+c4-1)/2 ; - j = (c4+1)/2 ; - S2((2*c2+c4-1)/2,(c4+1)/2) ; - } - } - c4 = -2*c2+201 ; - j = -c2+101 ; - S2(100,-c2+101) ; - } - S2(100,1) ; -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam2.c b/cloog-0.17.0/test/reservoir/lim-lam2.c deleted file mode 100644 index ab1a32fc4e961b495444d203a42e8f4c103afdc9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam2.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -for (c2=1;c2<=M;c2++) { - S1(c2) ; -} -if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=N;c4++) { - S2(c2,c4) ; - } - } -} -if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=N-1;c4++) { - S3(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam2.cloog b/cloog-0.17.0/test/reservoir/lim-lam2.cloog deleted file mode 100755 index db50b74696d68e635901584dca9478e8e1b23869..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam2.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# Language -c - -# Context - - 3 4 - 1 1 0 -1 - 1 0 1 -1 - 1 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 5 - 1 1 0 0 -1 - 1 -1 1 0 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-2 >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 1 0 0 - 1 0 1 0 0 -2 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 1 0 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 -1 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/lim-lam2.good.c b/cloog-0.17.0/test/reservoir/lim-lam2.good.c deleted file mode 100644 index 0ea3332d4040c080def5c046e7a388774b6b3c73..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam2.good.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - S1(c2) ; - } - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=N;c4++) { - S2(c2,c4) ; - } - } - } - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=N-1;c4++) { - S3(c2,c4) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam3.c b/cloog-0.17.0/test/reservoir/lim-lam3.c deleted file mode 100644 index c68a6295fcc2cd9e8c045817908b46d55546baf5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam3.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/lim-lam3.cloog by CLooG 0.16.2-8-g1421b58 gmp bits in 0.03s. */ -S4(1); -for (c2=9;c2<=min(13,5*M-1);c2++) { - if (c2 <= M+7) { - S2(c2-7,1); - } - if (c2 == 10) { - S4(2); - } - if (c2 <= 3*M+3) { - if (c2%3 == 0) { - S3((c2-3)/3,1); - } - } -} -for (c2=14;c2<=5*M-1;c2++) { - for (c4=max(2,ceild(c2-M-3,4));c4<=min(floord(c2-8,3),M-1);c4++) { - for (c6=max(1,ceild(c2-2*c4-M-5,2));c6<=min(floord(c2-3*c4-6,2),c4-1);c6++) { - S1(c2-2*c4-2*c6-5,c4,c6); - } - } - for (c4=max(1,ceild(c2-M-3,4));c4<=floord(c2-4,5);c4++) { - S2(c2-4*c4-3,c4); - } - if (c2%5 == 0) { - S4(c2/5); - } - for (c4=max(1,ceild(c2-3*M-1,2));c4<=floord(c2-4,5);c4++) { - if ((c2+c4+2)%3 == 0) { - S3((c2-2*c4-1)/3,c4); - } - } -} -if (M >= 2) { - S4(M); -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam3.cloog b/cloog-0.17.0/test/reservoir/lim-lam3.cloog deleted file mode 100755 index 0d3d4a5aa63abc3d4083ead42c65337ace154957..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam3.cloog +++ /dev/null @@ -1,101 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -1 - 1 0 1 -0 - -# Number of statments -4 - -1 -# { (i,j,k,l) | -i+l >= 0, i-j-1 >= 0, k-1 >= 0, j-k-1 >= 0, 1 >= 0 } - - 5 6 - 1 -1 0 0 1 0 - 1 1 -1 0 0 -1 - 1 0 0 1 0 -1 - 1 0 1 -1 0 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } - - 4 5 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 1 -1 0 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } - - 4 5 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 1 -1 0 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } - - 3 4 - 1 1 0 -1 - 1 -1 1 0 - 1 0 0 1 - -0 0 0 -0 -# Scattering functions -4 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -2 -2 0 -5 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -4 0 -3 - 0 0 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -3 -2 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -5 0 0 - 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/lim-lam3.good.c b/cloog-0.17.0/test/reservoir/lim-lam3.good.c deleted file mode 100644 index 0cddca9a1f2c7b447f3b7e77e42f640aeb200e43..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam3.good.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } -#define S4(i) { hash(4); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=5;c2<=min(5*M,8);c2++) { - if (c2%5 == 0) { - S4(c2/5) ; - } - } - for (c2=9;c2<=min(13,5*M-1);c2++) { - for (c4=max(1,ceild(c2-M-3,4));c4<=floord(c2-4,5);c4++) { - i = c2-4*c4-3 ; - S2(c2-4*c4-3,c4) ; - } - if (c2%5 == 0) { - S4(c2/5) ; - } - for (c4=max(1,ceild(c2-3*M-1,2));c4<=floord(c2-4,5);c4++) { - if ((c2+c4+2)%3 == 0) { - i = (c2-2*c4-1)/3 ; - S3((c2-2*c4-1)/3,c4) ; - } - } - } - for (c2=14;c2<=5*M-1;c2++) { - for (c4=max(2,ceild(c2-M-3,4));c4<=min(M-1,floord(c2-8,3));c4++) { - for (c6=max(1,ceild(c2-2*c4-M-5,2));c6<=min(c4-1,floord(c2-3*c4-6,2));c6++) { - i = c2-2*c4-2*c6-5 ; - S1(c2-2*c4-2*c6-5,c4,c6) ; - } - } - for (c4=max(ceild(c2-M-3,4),1);c4<=floord(c2-4,5);c4++) { - i = c2-4*c4-3 ; - S2(c2-4*c4-3,c4) ; - } - if (c2%5 == 0) { - S4(c2/5) ; - } - for (c4=max(ceild(c2-3*M-1,2),1);c4<=floord(c2-4,5);c4++) { - if ((c2+c4+2)%3 == 0) { - i = (c2-2*c4-1)/3 ; - S3((c2-2*c4-1)/3,c4) ; - } - } - } - if (M >= 2) { - c2 = 5*M ; - S4(M) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam4.c b/cloog-0.17.0/test/reservoir/lim-lam4.c deleted file mode 100644 index b2c0845a95419227fefb6b37265ac92468ab890f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam4.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ -if (M >= 2) { - S1(1,0,0) ; - for (c2=2;c2<=2*M-2;c2++) { - for (c4=max(-M+1,-c2+1);c4<=-1;c4++) { - for (i=max(1,c2-M+1);i<=min(M-1,c2+c4);i++) { - S1(i,c2+c4-i,-c4) ; - } - for (c6=max(-c4,c2-M+1);c6<=min(M-1,c2-1);c6++) { - S2(c2-c6,c4+c6,c6) ; - } - } - for (i=max(1,c2-M+1);i<=min(c2,M-1);i++) { - S1(i,c2-i,0) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam4.cloog b/cloog-0.17.0/test/reservoir/lim-lam4.cloog deleted file mode 100755 index 0aa66e31561d5fba8247dbaa030cea9fc3bb33ee..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam4.cloog +++ /dev/null @@ -1,62 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l) | i-1 >= 0, -i+l-1 >= 0, j >= 0, k >= 0, -j-k+l-1 >= 0, 1 >= 0 } - - 6 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 -1 - 1 0 1 0 0 0 - 1 0 0 1 0 0 - 1 0 -1 -1 1 -1 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+l-1 >= 0, j >= 0, -j+k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 6 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 -1 - 1 0 1 0 0 0 - 1 0 -1 1 0 -1 - 1 0 0 -1 1 -1 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/lim-lam4.good.c b/cloog-0.17.0/test/reservoir/lim-lam4.good.c deleted file mode 100644 index afb05ec7bd649f56f4a4cfadd639ade13932c231..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam4.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if (M >= 2) { - S1(1,0,0) ; - } - for (c2=2;c2<=2*M-2;c2++) { - for (c4=max(-M+1,-c2+1);c4<=-1;c4++) { - for (i=max(1,c2-M+1);i<=min(c2+c4,M-1);i++) { - j = c2+c4-i ; - S1(i,c2+c4-i,-c4) ; - } - for (c6=max(-c4,c2-M+1);c6<=min(c2-1,M-1);c6++) { - i = c2-c6 ; - j = c4+c6 ; - S2(c2-c6,c4+c6,c6) ; - } - } - for (i=max(1,c2-M+1);i<=min(M-1,c2);i++) { - j = c2-i ; - S1(i,c2-i,0) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam5.c b/cloog-0.17.0/test/reservoir/lim-lam5.c deleted file mode 100644 index e6b0a57113a847cc909176f9e9e3fccbd6aa088b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam5.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S3(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam5.cloog b/cloog-0.17.0/test/reservoir/lim-lam5.cloog deleted file mode 100755 index c5d6ef9f4adc236bfa855a548c3c1dd9c264a695..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam5.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/lim-lam5.good.c b/cloog-0.17.0/test/reservoir/lim-lam5.good.c deleted file mode 100644 index 69d8805f80d527f6c01de8d62b17a0d4980ce5c9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam5.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S3(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam6.c b/cloog-0.17.0/test/reservoir/lim-lam6.c deleted file mode 100644 index 05baff17c8d03b76e2abe5ad4fb57072ac7a6401..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam6.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c4,c2) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/lim-lam6.cloog b/cloog-0.17.0/test/reservoir/lim-lam6.cloog deleted file mode 100755 index a1bf181a99c07b7e3ffe4d6331707066f46d4330..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam6.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 0 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 0 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/lim-lam6.good.c b/cloog-0.17.0/test/reservoir/lim-lam6.good.c deleted file mode 100644 index f49ab57149bc288022904002531c6e6b5302a6de..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/lim-lam6.good.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/lim-lam6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - if (M >= 1) { - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - } - if (M >= 1) { - for (c2=0;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c4,c2) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/liu-zhuge1.c b/cloog-0.17.0/test/reservoir/liu-zhuge1.c deleted file mode 100644 index b0f86022e1840bba69761403f14633a21a04e4e4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/liu-zhuge1.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/liu-zhuge1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ -if ((M >= 0) && (N >= 0)) { - for (c2=-4;c2<=min(-1,3*M+N-4);c2++) { - for (c4=max(0,c2-3*M+4);c4<=min(N,c2+4);c4++) { - if ((c2+2*c4+1)%3 == 0) { - S1((c2-c4+4)/3,c4); - } - } - } - for (c2=0;c2<=3*M+N-4;c2++) { - for (c4=max(0,c2-3*M);c4<=min(c2,c2-3*M+3);c4++) { - if ((c2+2*c4)%3 == 0) { - S2((c2-c4)/3,c4); - } - } - for (c4=max(0,c2-3*M+4);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S2((c2-c4)/3,c4); - } - if ((c2+2*c4+1)%3 == 0) { - S1((c2-c4+4)/3,c4); - } - } - for (c4=max(c2+1,c2-3*M+4);c4<=min(N,c2+4);c4++) { - if ((c2+2*c4+1)%3 == 0) { - S1((c2-c4+4)/3,c4); - } - } - for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S3((c2-c4)/3,c4); - } - } - } - for (c2=max(0,3*M+N-3);c2<=3*M+N;c2++) { - for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S2((c2-c4)/3,c4); - } - } - for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { - if ((c2+2*c4)%3 == 0) { - S3((c2-c4)/3,c4); - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/liu-zhuge1.cloog b/cloog-0.17.0/test/reservoir/liu-zhuge1.cloog deleted file mode 100755 index e28cb4bf8271cc583dd9a4ea0dcd93b888add7c0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/liu-zhuge1.cloog +++ /dev/null @@ -1,76 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 1 0 0 - 1 0 1 0 0 0 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 1 0 0 - 1 0 1 0 0 0 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 0 - 1 -1 0 1 0 0 - 1 0 1 0 0 0 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -3 -1 0 0 4 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -3 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - - - 6 11 - 0 1 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -3 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/liu-zhuge1.good.c b/cloog-0.17.0/test/reservoir/liu-zhuge1.good.c deleted file mode 100644 index 2b07aded62fb62f2ecb729ffc29218b80f82542d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/liu-zhuge1.good.c +++ /dev/null @@ -1,168 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/liu-zhuge1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j) { hash(3); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - if ((M >= 0) && (N >= 0)) { - for (c2=-4;c2<=min(-1,3*M+N-4);c2++) { - for (c4=max(0,c2-3*M+4);c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - } - } - if ((M <= 1) && (M >= 0)) { - for (c2=0;c2<=3*M+N-4;c2++) { - for (c4=max(c2-3*M,0);c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=c2-3*M+4;c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } - for (c2=0;c2<=min(3*M-4,N-1);c2++) { - for (c4=0;c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=c2+1;c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=0;c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - if (M >= 2) { - for (c2=3*M-3;c2<=N-1;c2++) { - for (c4=max(c2-3*M,0);c4<=c2-3*M+3;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=c2-3*M+4;c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=c2+1;c4<=min(c2+4,N);c4++) { - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=c2;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } - if (N >= 0) { - for (c2=N;c2<=3*M-4;c2++) { - for (c4=0;c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=0;c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } - for (c2=max(3*M-3,N);c2<=3*M+N-4;c2++) { - for (c4=max(c2-3*M,0);c4<=c2-3*M+3;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=c2-3*M+4;c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - if ((c2+2*c4+1)%3 == 0) { - i = (c2-c4+4)/3 ; - S1((c2-c4+4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=N;c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - if ((M >= 0) && (N >= 0)) { - for (c2=max(3*M+N-3,0);c2<=3*M+N;c2++) { - for (c4=max(0,c2-3*M);c4<=min(c2,N);c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S2((c2-c4)/3,c4) ; - } - } - for (c4=max(0,c2-3*M);c4<=min(c2,N);c4++) { - if ((c2+2*c4)%3 == 0) { - i = (c2-c4)/3 ; - S3((c2-c4)/3,c4) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/loechner3.c b/cloog-0.17.0/test/reservoir/loechner3.c deleted file mode 100644 index c3967b8577164d332e056ce5bc6e10010f618c8b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=c2+M;c4++) { - for (c6=max(1,-c2+c4);c6<=min(M,c4-1);c6++) { - S1(c2,c6,c4-c6) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/loechner3.cloog b/cloog-0.17.0/test/reservoir/loechner3.cloog deleted file mode 100755 index 04b34cb5c86397983167df9b7f801cc3aefb1e6e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner3.cloog +++ /dev/null @@ -1,39 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k,l) | -i+l >= 0, j-1 >= 0, -j+l >= 0, k-1 >= 0, i-k >= 0, 1 >= 0 } - - 6 6 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 0 - 1 0 0 1 0 -1 - 1 1 0 -1 0 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/loechner3.good.c b/cloog-0.17.0/test/reservoir/loechner3.good.c deleted file mode 100644 index 377fb462859ddeab7ebbfa9b3eff8d2e69f2bbce..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner3.good.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=1;c2<=M;c2++) { - for (c4=2;c4<=c2+M;c4++) { - for (c6=max(1,-c2+c4);c6<=min(M,c4-1);c6++) { - k = c4-c6 ; - S1(c2,c6,c4-c6) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/loechner4.c b/cloog-0.17.0/test/reservoir/loechner4.c deleted file mode 100644 index 8c4b9c7c71536c6b9ccdb53c7b9b215037bbd93c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner4.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 1) { - for (c2=2;c2<=2*M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=max(1,c2-M);c8<=min(M,c2-1);c8++) { - S1(c6,c4,c8,c2-c8) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/loechner4.cloog b/cloog-0.17.0/test/reservoir/loechner4.cloog deleted file mode 100755 index 503f56a8fed88232da901c7222a1fea1c98ef2cf..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner4.cloog +++ /dev/null @@ -1,44 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+m >= 0, j-1 >= 0, -j+m >= 0, k-1 >= 0, -k+m >= 0, l-1 >= 0, -l+m >= 0, 1 >= 0 } - - 9 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 1 0 - 1 0 1 0 0 0 -1 - 1 0 -1 0 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 0 -1 0 1 0 - 1 0 0 0 1 0 -1 - 1 0 0 0 -1 1 0 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 10 16 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/loechner4.good.c b/cloog-0.17.0/test/reservoir/loechner4.good.c deleted file mode 100644 index ecd109eb878049be0e8c085252e87172ae6d2cb1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner4.good.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6, c8; - /* Original iterators. */ - int i, j, k, l; - for (c2=2;c2<=2*M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=max(1,c2-M);c8<=min(c2-1,M);c8++) { - l = c2-c8 ; - S1(c6,c4,c8,c2-c8) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/loechner5.c b/cloog-0.17.0/test/reservoir/loechner5.c deleted file mode 100644 index 3ba1f5b80ccc5dd810234f6ddce7727d17ef2d25..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner5.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=1;c8<=M;c8++) { - S1(c4,c6,c2,c8) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/loechner5.cloog b/cloog-0.17.0/test/reservoir/loechner5.cloog deleted file mode 100755 index f208435011c1cf6538fac90578f24a04ab56019f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner5.cloog +++ /dev/null @@ -1,44 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -1 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+m >= 0, j-1 >= 0, -j+m >= 0, k-1 >= 0, -k+m >= 0, l-1 >= 0, -l+m >= 0, 1 >= 0 } - - 9 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 0 1 0 - 1 0 1 0 0 0 -1 - 1 0 -1 0 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 0 -1 0 1 0 - 1 0 0 0 1 0 -1 - 1 0 0 0 -1 1 0 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 10 16 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/loechner5.good.c b/cloog-0.17.0/test/reservoir/loechner5.good.c deleted file mode 100644 index 937c11815f423ff850c1f198349b0c72eba2bb05..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/loechner5.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/loechner5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6, c8; - /* Original iterators. */ - int i, j, k, l; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - for (c8=1;c8<=M;c8++) { - S1(c4,c6,c2,c8) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-interp.c b/cloog-0.17.0/test/reservoir/mg-interp.c deleted file mode 100644 index 3ed1fcf6d16acec087a85ee3bdb71b4ab0178afb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-interp.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/mg-interp.cloog by CLooG 0.16.2-5-g590827b gmp bits in 0.29s. */ -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6); - } - if (N == 2) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6); - S7(c2,1,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6); - S7(c2,1,c6); - } - } - if (N == 2) { - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6); - } - } - if (N == 2) { - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6); - } - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6); - } - } - if (N == 3) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6); - S7(c2,2,c6); - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6); - } - } - if (N >= 4) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6); - S7(c2,2,c6); - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6); - } - } - for (c4=3;c4<=2*N-5;c4++) { - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - S10(c2,(c4-1)/2,c6); - } - } - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S3(c2,(c4+1)/2,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S6(c2,(c4+2)/2,c6); - } - if ((c4+1)%2 == 0) { - S1(c2,(c4+3)/2,c6); - } - if (c4%2 == 0) { - S7(c2,(c4+2)/2,c6); - } - } - if ((c4+1)%2 == 0) { - S1(c2,(c4+3)/2,M); - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S11(c2,c4/2,c6); - } - } - } - if (N >= 4) { - for (c6=1;c6<=M-1;c6++) { - S6(c2,N-1,c6); - S7(c2,N-1,c6); - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,N-2,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M-1;c6++) { - S10(c2,N-2,c6); - } - for (c6=1;c6<=M;c6++) { - S3(c2,N-1,c6); - } - } - if (N >= 3) { - for (c6=1;c6<=M-1;c6++) { - S11(c2,N-1,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,N-1,c6); - } - } -} -if ((M == 1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - S1(c2,1,1); - for (c4=1;c4<=2*N-5;c4++) { - if ((c4+1)%2 == 0) { - S3(c2,(c4+1)/2,1); - } - if ((c4+1)%2 == 0) { - S1(c2,(c4+3)/2,1); - } - } - S3(c2,N-1,1); - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S2(c2,1,c6); - } - for (c6=1;c6<=M-1;c6++) { - S8(c2,1,c6); - } - for (c4=3;c4<=2*N-2;c4++) { - for (c6=1;c6<=M;c6++) { - if (c4%2 == 0) { - S2(c2,c4/2,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S8(c2,c4/2,c6); - } - } - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - S9(c2,(c4-1)/2,c6); - } - } - } - for (c6=1;c6<=M-1;c6++) { - S9(c2,N-1,c6); - } - } -} -if ((M == 1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=2;c4<=2*N-2;c4++) { - if (c4%2 == 0) { - S2(c2,c4/2,1); - } - } - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6); - } - } - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S5(c2,c4,c6); - } - } - } -} -if ((M >= P+1) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S12(c2,c4,c6); - } - } - } -} -if ((M >= 2) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S13(c2,c4,c6); - } - } - } -} -if ((M >= P+1) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S14(c2,c4,c6); - } - } - } -} -if ((M >= 2) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S15(c2,c4,c6); - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-interp.cloog b/cloog-0.17.0/test/reservoir/mg-interp.cloog deleted file mode 100755 index 9d084635f5ac456fbf3139e39049021c0ea76116..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-interp.cloog +++ /dev/null @@ -1,376 +0,0 @@ -# Language -c - -# Context - - 1 11 - 1 0 0 0 0 0 0 0 0 0 1 -0 - -# Number of statments -15 - -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-q >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -15 - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 3 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 2 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 2 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -5 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -6 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -7 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/mg-interp.good.c b/cloog-0.17.0/test/reservoir/mg-interp.good.c deleted file mode 100644 index 7f919c8355806faecf15db3b83d5b276b56dacbc..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-interp.good.c +++ /dev/null @@ -1,318 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-interp.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 1.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } -#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } -#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } -#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } -#define S10(i,j,k) { hash(10); hash(i); hash(j); hash(k); } -#define S11(i,j,k) { hash(11); hash(i); hash(j); hash(k); } -#define S12(i,j,k) { hash(12); hash(i); hash(j); hash(k); } -#define S13(i,j,k) { hash(13); hash(i); hash(j); hash(k); } -#define S14(i,j,k) { hash(14); hash(i); hash(j); hash(k); } -#define S15(i,j,k) { hash(15); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 2) && (N >= 4)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6) ; - S7(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S1(c2,2,c6) ; - } - S1(c2,2,M) ; - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6) ; - S7(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6) ; - } - for (c4=3;c4<=2*N-5;c4++) { - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - j = (c4-1)/2 ; - S10(c2,(c4-1)/2,c6) ; - } - } - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S3(c2,(c4+1)/2,c6) ; - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - j = (c4+2)/2 ; - S6(c2,(c4+2)/2,c6) ; - S7(c2,(c4+2)/2,c6) ; - } - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,c6) ; - } - } - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,M) ; - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S11(c2,c4/2,c6) ; - } - } - } - c4 = 2*N-4 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S6(c2,N-1,c6) ; - S7(c2,N-1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - j = N-2 ; - S11(c2,N-2,c6) ; - } - c4 = 2*N-3 ; - for (c6=1;c6<=M-1;c6++) { - j = N-2 ; - S10(c2,N-2,c6) ; - } - for (c6=1;c6<=M;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - } - c4 = 2*N-2 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S11(c2,N-1,c6) ; - } - c4 = 2*N-1 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S10(c2,N-1,c6) ; - } - } - } - if ((M >= 2) && (N == 3)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6) ; - S7(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S1(c2,2,c6) ; - } - S1(c2,2,M) ; - for (c6=1;c6<=M-1;c6++) { - S6(c2,2,c6) ; - S7(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,2,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,2,c6) ; - } - } - } - if ((M >= 2) && (N == 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S6(c2,1,c6) ; - S7(c2,1,c6) ; - } - for (c6=1;c6<=M;c6++) { - S3(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S11(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S10(c2,1,c6) ; - } - } - } - if ((M == 1) && (N >= 3)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=-1;c4<=0;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,1) ; - } - } - for (c4=1;c4<=2*N-5;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S3(c2,(c4+1)/2,1) ; - } - if ((c4+1)%2 == 0) { - j = (c4+3)/2 ; - S1(c2,(c4+3)/2,1) ; - } - } - for (c4=2*N-4;c4<=2*N-3;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S3(c2,(c4+1)/2,1) ; - } - } - } - } - if ((M == 1) && (N == 2)) { - for (c2=1;c2<=O-1;c2++) { - S1(c2,1,1) ; - S3(c2,1,1) ; - } - } - if ((M >= 2) && (N >= 3)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S2(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S8(c2,1,c6) ; - } - for (c4=3;c4<=2*N-2;c4++) { - for (c6=1;c6<=M;c6++) { - if (c4%2 == 0) { - S2(c2,c4/2,c6) ; - } - } - for (c6=1;c6<=M-1;c6++) { - if (c4%2 == 0) { - S8(c2,c4/2,c6) ; - } - } - for (c6=1;c6<=M-1;c6++) { - if ((c4+1)%2 == 0) { - j = (c4-1)/2 ; - S9(c2,(c4-1)/2,c6) ; - } - } - } - c4 = 2*N-1 ; - for (c6=1;c6<=M-1;c6++) { - j = N-1 ; - S9(c2,N-1,c6) ; - } - } - } - if ((M >= 2) && (N == 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S2(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S8(c2,1,c6) ; - } - for (c6=1;c6<=M-1;c6++) { - S9(c2,1,c6) ; - } - } - } - if ((M == 1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=2;c4<=2*N-2;c4++) { - if (c4%2 == 0) { - S2(c2,c4/2,1) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S5(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S12(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= Q+1)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S13(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S14(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=R;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S15(c2,c4,c6) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-interp2.c b/cloog-0.17.0/test/reservoir/mg-interp2.c deleted file mode 100644 index 688cc911bc35030e8dcfeb7d5457416fbdefdb56..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-interp2.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-interp2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.11s. */ -if (O >= 2) { - if ((M >= P+1) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S1(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S2(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S3(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-interp2.cloog b/cloog-0.17.0/test/reservoir/mg-interp2.cloog deleted file mode 100755 index d1218bc782a75430f32eae6dd423733208e31a51..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-interp2.cloog +++ /dev/null @@ -1,112 +0,0 @@ -# Language -c - -# Context - - 1 11 - 1 0 0 0 0 0 0 0 0 0 1 -0 - -# Number of statments -4 - -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-p >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-o >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 14 - 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 -1 1 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -4 - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 21 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/mg-interp2.good.c b/cloog-0.17.0/test/reservoir/mg-interp2.good.c deleted file mode 100644 index 2e1f3652d39f0beec3dff7a4a447fde60c394aeb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-interp2.good.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-interp2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.07s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= P+1) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S1(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= Q+1)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=Q;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S2(c2,c4,c6) ; - } - } - } - } - if ((M >= P+1) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=P;c6<=M-1;c6++) { - S3(c2,c4,c6) ; - } - } - } - } - if ((M >= 2) && (N >= 2)) { - for (c2=1;c2<=O-1;c2++) { - for (c4=1;c4<=N-1;c4++) { - for (c6=1;c6<=M-1;c6++) { - S4(c2,c4,c6) ; - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-psinv.c b/cloog-0.17.0/test/reservoir/mg-psinv.c deleted file mode 100644 index a0447e1b8a3adb0eda542cf2543fa911bc90e89c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-psinv.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-psinv.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ -if ((M >= 1) && (N >= 3) && (O >= 3)) { - if (M >= 3) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6); - S2(c2,2,c6); - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6); - } - } - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,N-1,c6); - } - } - } - if (M <= 2) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-psinv.cloog b/cloog-0.17.0/test/reservoir/mg-psinv.cloog deleted file mode 100755 index 7f0dd2c3c2a518b711bc613c03d29f4fe64cf278..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-psinv.cloog +++ /dev/null @@ -1,88 +0,0 @@ -# Language -c - -# Context - - 1 5 - 1 0 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -2 - 1 0 0 -1 1 0 0 -1 - 1 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/mg-psinv.good.c b/cloog-0.17.0/test/reservoir/mg-psinv.good.c deleted file mode 100644 index cb5b57c9a9bc3ad3dc7b5de78045c88fc6dd2856..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-psinv.good.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-psinv.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 3) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6) ; - } - } - } - c4 = 2*N-2 ; - for (c6=2;c6<=M-1;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - } - } - } - if ((M >= 3) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,2,c6) ; - } - } - } - if ((M >= 1) && (M <= 2) && (N >= 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-resid.c b/cloog-0.17.0/test/reservoir/mg-resid.c deleted file mode 100644 index 89a3cdaf1a65d39c1db3b0c76895dda179dd8af1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-resid.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-resid.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.03s. */ -if ((M >= 1) && (N >= 3) && (O >= 3)) { - if (M >= 3) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6); - S2(c2,2,c6); - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6); - } - } - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,N-1,c6); - } - } - } - if (M <= 2) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - S1(c2,(c4+1)/2,c6); - S2(c2,(c4+1)/2,c6); - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-resid.cloog b/cloog-0.17.0/test/reservoir/mg-resid.cloog deleted file mode 100755 index 7f0dd2c3c2a518b711bc613c03d29f4fe64cf278..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-resid.cloog +++ /dev/null @@ -1,88 +0,0 @@ -# Language -c - -# Context - - 1 5 - 1 0 0 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -1 - 1 0 0 -1 1 0 0 0 - 1 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 8 - 1 1 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 -1 - 1 0 1 0 0 0 0 -2 - 1 0 -1 0 0 1 0 -1 - 1 0 0 1 0 0 0 -2 - 1 0 0 -1 1 0 0 -1 - 1 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 15 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/mg-resid.good.c b/cloog-0.17.0/test/reservoir/mg-resid.good.c deleted file mode 100644 index 4056aab9bb457c0004dc0e981cbbff10afb7f33e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-resid.good.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-resid.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 3) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c4=4;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - for (c6=2;c6<=M-1;c6++) { - if (c4%2 == 0) { - S3(c2,c4/2,c6) ; - } - } - } - c4 = 2*N-2 ; - for (c6=2;c6<=M-1;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - } - } - } - if ((M >= 3) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=1;c6<=M;c6++) { - S1(c2,2,c6) ; - S2(c2,2,c6) ; - } - for (c6=2;c6<=M-1;c6++) { - S3(c2,2,c6) ; - } - } - } - if ((M >= 1) && (M <= 2) && (N >= 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c4=3;c4<=2*N-3;c4++) { - for (c6=1;c6<=M;c6++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S1(c2,(c4+1)/2,c6) ; - S2(c2,(c4+1)/2,c6) ; - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-rprj3.c b/cloog-0.17.0/test/reservoir/mg-rprj3.c deleted file mode 100644 index f7f7a4d01d6bc98a50306276d0210ffc987410fd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-rprj3.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-rprj3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.10s. */ -if ((M >= 2) && (N >= 3) && (O >= 3)) { - if (M >= 3) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=M;c6++) { - S1(c2,2,c6); - } - for (c4=3;c4<=N-1;c4++) { - for (c6=2;c6<=M;c6++) { - S2(c2,c4-1,c6); - } - S4(c2,c4-1,2); - for (c6=2;c6<=M-2;c6++) { - S3(c2,c4-1,c6); - S5(c2,c4-1,c6); - S4(c2,c4-1,c6+1); - } - S3(c2,c4-1,M-1); - S5(c2,c4-1,M-1); - for (c6=2;c6<=M;c6++) { - S1(c2,c4,c6); - } - } - for (c6=2;c6<=M;c6++) { - S2(c2,N-1,c6); - } - S4(c2,N-1,2); - for (c6=2;c6<=M-2;c6++) { - S3(c2,N-1,c6); - S5(c2,N-1,c6); - S4(c2,N-1,c6+1); - } - S3(c2,N-1,M-1); - S5(c2,N-1,M-1); - } - } - if (M == 2) { - for (c2=2;c2<=O-1;c2++) { - S1(c2,2,2); - for (c4=3;c4<=N-1;c4++) { - S2(c2,c4-1,2); - S1(c2,c4,2); - } - S2(c2,N-1,2); - } - } -} diff --git a/cloog-0.17.0/test/reservoir/mg-rprj3.cloog b/cloog-0.17.0/test/reservoir/mg-rprj3.cloog deleted file mode 100755 index adf72fd9deaaf56ee2376567042ac0c3269caafd..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-rprj3.cloog +++ /dev/null @@ -1,136 +0,0 @@ -# Language -c - -# Context - - 1 8 - 1 0 0 0 0 0 0 1 -0 - -# Number of statments -5 - -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l-1 >= 0, 1 >= 0 } - - 7 11 - 1 1 0 0 0 0 0 0 0 0 -2 - 1 -1 0 0 0 0 1 0 0 0 -1 - 1 0 1 0 0 0 0 0 0 0 -2 - 1 0 -1 0 0 1 0 0 0 0 -1 - 1 0 0 1 0 0 0 0 0 0 -2 - 1 0 0 -1 1 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -5 - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 1 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 18 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/mg-rprj3.good.c b/cloog-0.17.0/test/reservoir/mg-rprj3.good.c deleted file mode 100644 index 38ac53e4c2b21a3c49b880457661f23bc8cef604..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/mg-rprj3.good.c +++ /dev/null @@ -1,163 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/mg-rprj3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.39s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } - -void test(int M, int N, int O, int P, int Q, int R) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if ((M >= 4) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=M;c6++) { - S1(c2,2,c6) ; - } - for (c4=3;c4<=N-1;c4++) { - for (c6=2;c6<=M;c6++) { - j = c4-1 ; - S2(c2,c4-1,c6) ; - } - j = c4-1 ; - S4(c2,c4-1,2) ; - for (c6=2;c6<=M-2;c6++) { - j = c4-1 ; - S3(c2,c4-1,c6) ; - j = c4-1 ; - S5(c2,c4-1,c6) ; - j = c4-1 ; - k = c6+1 ; - S4(c2,c4-1,c6+1) ; - } - c6 = M-1 ; - j = c4-1 ; - k = M-1 ; - S3(c2,c4-1,M-1) ; - j = c4-1 ; - k = M-1 ; - S5(c2,c4-1,M-1) ; - for (c6=2;c6<=M;c6++) { - S1(c2,c4,c6) ; - } - } - for (c6=2;c6<=M;c6++) { - j = N-1 ; - S2(c2,N-1,c6) ; - } - j = N-1 ; - S4(c2,N-1,2) ; - for (c6=2;c6<=M-2;c6++) { - j = N-1 ; - S3(c2,N-1,c6) ; - j = N-1 ; - S5(c2,N-1,c6) ; - j = N-1 ; - k = c6+1 ; - S4(c2,N-1,c6+1) ; - } - c6 = M-1 ; - j = N-1 ; - k = M-1 ; - S3(c2,N-1,M-1) ; - j = N-1 ; - k = M-1 ; - S5(c2,N-1,M-1) ; - } - } - if ((M >= 4) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=M;c6++) { - S1(c2,2,c6) ; - } - for (c6=2;c6<=M;c6++) { - S2(c2,2,c6) ; - } - S4(c2,2,2) ; - for (c6=2;c6<=M-2;c6++) { - S3(c2,2,c6) ; - S5(c2,2,c6) ; - k = c6+1 ; - S4(c2,2,c6+1) ; - } - c6 = M-1 ; - k = M-1 ; - S3(c2,2,M-1) ; - k = M-1 ; - S5(c2,2,M-1) ; - } - } - if ((M == 3) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=3;c6++) { - S1(c2,2,c6) ; - } - for (c6=2;c6<=3;c6++) { - S2(c2,2,c6) ; - } - S4(c2,2,2) ; - S3(c2,2,2) ; - S5(c2,2,2) ; - } - } - if ((M == 3) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - for (c6=2;c6<=3;c6++) { - S1(c2,2,c6) ; - } - for (c4=3;c4<=N-1;c4++) { - for (c6=2;c6<=3;c6++) { - j = c4-1 ; - S2(c2,c4-1,c6) ; - } - j = c4-1 ; - S4(c2,c4-1,2) ; - j = c4-1 ; - S3(c2,c4-1,2) ; - j = c4-1 ; - S5(c2,c4-1,2) ; - for (c6=2;c6<=3;c6++) { - S1(c2,c4,c6) ; - } - } - for (c6=2;c6<=3;c6++) { - j = N-1 ; - S2(c2,N-1,c6) ; - } - j = N-1 ; - S4(c2,N-1,2) ; - j = N-1 ; - S3(c2,N-1,2) ; - j = N-1 ; - S5(c2,N-1,2) ; - } - } - if ((M == 2) && (N >= 4)) { - for (c2=2;c2<=O-1;c2++) { - S1(c2,2,2) ; - for (c4=3;c4<=N-1;c4++) { - j = c4-1 ; - S2(c2,c4-1,2) ; - S1(c2,c4,2) ; - } - j = N-1 ; - S2(c2,N-1,2) ; - } - } - if ((M == 2) && (N == 3)) { - for (c2=2;c2<=O-1;c2++) { - S1(c2,2,2) ; - S2(c2,2,2) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali1.c b/cloog-0.17.0/test/reservoir/pingali1.c deleted file mode 100644 index 505df8d566d25a92c8a86c57c611348f117eb3cb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali1.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/pingali1.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.01s. */ -if ((M >= 1) && (N >= 1)) { - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - S2(c2,1); - for (c4=3;c4<=2*N-1;c4++) { - for (c6=max(1,c4-N);c6<=floord(c4-1,2);c6++) { - S1(c2,c4-c6,c6); - } - if ((c4+1)%2 == 0) { - S2(c2,(c4+1)/2); - } - } - } - } - if (N == 1) { - for (c2=1;c2<=M;c2++) { - S2(c2,1); - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali1.cloog b/cloog-0.17.0/test/reservoir/pingali1.cloog deleted file mode 100755 index 0be0a2a18ca3f55956e68e4d44efa7ca7192ac12..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali1.cloog +++ /dev/null @@ -1,61 +0,0 @@ -# Language -c - -# Context - - 1 4 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, -j+m >= 0, k-1 >= 0, j-k-1 >= 0, 1 >= 0 } - - 6 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 -1 0 0 1 0 - 1 0 0 1 0 0 -1 - 1 0 1 -1 0 0 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+l >= 0, 1 >= 0 } - - 5 6 - 1 1 0 0 0 -1 - 1 -1 0 1 0 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -2 0 0 1 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/pingali1.good.c b/cloog-0.17.0/test/reservoir/pingali1.good.c deleted file mode 100644 index b72eb17ddcb1be5a0ac20c6a98fbd0ad9d3fac5b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali1.good.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if (N >= 2) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=2;c4++) { - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S2(c2,(c4+1)/2) ; - } - } - for (c4=3;c4<=2*N-1;c4++) { - for (c6=max(1,c4-N);c6<=floord(c4-1,2);c6++) { - j = c4-c6 ; - S1(c2,c4-c6,c6) ; - } - if ((c4+1)%2 == 0) { - j = (c4+1)/2 ; - S2(c2,(c4+1)/2) ; - } - } - } - } - if (N == 1) { - for (c2=1;c2<=M;c2++) { - S2(c2,1) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali2.c b/cloog-0.17.0/test/reservoir/pingali2.c deleted file mode 100644 index b09c4f93d71f16c7a950c33790f9bb0fd0a76d71..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali2.cloog b/cloog-0.17.0/test/reservoir/pingali2.cloog deleted file mode 100755 index 0f890386e1a50b334af5d9714f3f4bbe877fc6e6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali2.cloog +++ /dev/null @@ -1,56 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/pingali2.good.c b/cloog-0.17.0/test/reservoir/pingali2.good.c deleted file mode 100644 index 93417319b8f795f54d2a8ca9974bf47d37152bb0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali2.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali3.c b/cloog-0.17.0/test/reservoir/pingali3.c deleted file mode 100644 index b53542a09202931ed0700aa2333bb70799142918..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali3.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (M >= 1) { - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - S2(c2,c4,c6) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali3.cloog b/cloog-0.17.0/test/reservoir/pingali3.cloog deleted file mode 100755 index 8f345c0eb839c743c466c76312ded23cea04f417..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali3.cloog +++ /dev/null @@ -1,62 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+l >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 7 6 - 1 1 0 0 0 -1 - 1 -1 0 0 1 0 - 1 0 1 0 0 -1 - 1 0 -1 0 1 0 - 1 0 0 1 0 -1 - 1 0 0 -1 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/pingali3.good.c b/cloog-0.17.0/test/reservoir/pingali3.good.c deleted file mode 100644 index 5b5e4a9177e800f45a34c873eeb739a835513151..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali3.good.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - for (c6=1;c6<=M;c6++) { - S2(c2,c4,c6) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali4.c b/cloog-0.17.0/test/reservoir/pingali4.c deleted file mode 100644 index 99056994a1fdaf860678e1899d2889212ed7e103..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali4.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } -} -for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali4.cloog b/cloog-0.17.0/test/reservoir/pingali4.cloog deleted file mode 100755 index 46f4e07f643896cc82929e9e66758eb4d512fa98..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali4.cloog +++ /dev/null @@ -1,57 +0,0 @@ -# Language -c - -# Context - - 2 3 - 1 1 -2 - 1 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } - - 5 5 - 1 1 0 0 -1 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 0 -1 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - - - 6 10 - 0 1 0 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/pingali4.good.c b/cloog-0.17.0/test/reservoir/pingali4.good.c deleted file mode 100644 index 5b617071e38983272a04665b5161f250993ef325..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali4.good.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4; - /* Original iterators. */ - int i, j; - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S1(c2,c4) ; - } - } - for (c2=1;c2<=M;c2++) { - for (c4=1;c4<=M;c4++) { - S2(c2,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali5.c b/cloog-0.17.0/test/reservoir/pingali5.c deleted file mode 100644 index 1b2c415184cc7f858ebfa57138580fa1d2e1bc51..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali5.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/pingali5.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.02s. */ -if (M >= 2) { - for (c2=3;c2<=2*M-3;c2++) { - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c2-1,c4-1);i++) { - S1(i,c2-i,c4); - } - } - for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { - S2(c2-c4,c4); - } - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c2-1,c4-1);i++) { - S3(i,c2-i,c4); - } - } - } - for (c2=max(M+1,2*M-2);c2<=2*M-1;c2++) { - S2(M,c2-M); - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali5.cloog b/cloog-0.17.0/test/reservoir/pingali5.cloog deleted file mode 100755 index 2933d75bd8c67f4c39b5f89e9c0687fc3b79a54e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali5.cloog +++ /dev/null @@ -1,81 +0,0 @@ -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statments -3 - -1 -# { (i,j,k,l) | j-1 >= 0, i-j-1 >= 0, -i+k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 5 6 - 1 0 1 0 0 -1 - 1 1 -1 0 0 -1 - 1 -1 0 1 0 -1 - 1 0 0 -1 1 0 - 1 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } - - 4 5 - 1 -1 0 1 0 - 1 0 1 0 -1 - 1 1 -1 0 -1 - 1 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l) | j-1 >= 0, i-j-1 >= 0, -i+k-1 >= 0, -k+l >= 0, 1 >= 0 } - - 5 6 - 1 0 1 0 0 -1 - 1 1 -1 0 0 -1 - 1 -1 0 1 0 -1 - 1 0 0 -1 1 0 - 1 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -3 - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 12 - 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 -1 - 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 1 - - - 8 13 - 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -1 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 1 0 0 0 0 0 -1 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/pingali5.good.c b/cloog-0.17.0/test/reservoir/pingali5.good.c deleted file mode 100644 index 351e5d39256c5ad7705ce5ea7d6b5d7193a696ac..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali5.good.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } - -void test(int M) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - for (c2=3;c2<=2*M-3;c2++) { - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c4-1,c2-1);i++) { - j = c2-i ; - S1(i,c2-i,c4) ; - } - } - for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { - i = c2-c4 ; - S2(c2-c4,c4) ; - } - for (c4=ceild(c2+3,2);c4<=M;c4++) { - for (i=ceild(c2+1,2);i<=min(c4-1,c2-1);i++) { - j = c2-i ; - S3(i,c2-i,c4) ; - } - } - } - for (c2=max(2*M-2,3);c2<=2*M-1;c2++) { - for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { - i = c2-c4 ; - S2(c2-c4,c4) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali6.c b/cloog-0.17.0/test/reservoir/pingali6.c deleted file mode 100644 index 5ce4a8530d833a947a6bd0ca7821b3150664662e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali6.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ -if (N >= 3) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - S2((c2-1)/2,c4,c6) ; - } - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } -} diff --git a/cloog-0.17.0/test/reservoir/pingali6.cloog b/cloog-0.17.0/test/reservoir/pingali6.cloog deleted file mode 100755 index 93726ec93b8bd84fcdd98178a5cc45777e549e08..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali6.cloog +++ /dev/null @@ -1,66 +0,0 @@ -# Language -c - -# Context - - 3 4 - 1 1 0 -1 - 1 0 1 -1 - 1 0 0 1 -0 - -# Number of statments -2 - -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -1 -# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } - - 7 7 - 1 1 0 0 0 0 -1 - 1 -1 0 0 1 0 0 - 1 0 1 0 0 0 -2 - 1 0 -1 0 0 1 -1 - 1 0 0 1 0 0 -2 - 1 0 0 -1 0 1 -1 - 1 0 0 0 0 0 1 - -0 0 0 -0 -# Scattering functions -2 - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - - - 8 14 - 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 -2 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/pingali6.good.c b/cloog-0.17.0/test/reservoir/pingali6.good.c deleted file mode 100644 index 26e98317a9398e961b084e338800fbaba72a32c7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/pingali6.good.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/pingali6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int c2, c4, c6; - /* Original iterators. */ - int i, j, k; - if (N >= 3) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S1(1,c4,c6) ; - } - } - } - if (N >= 3) { - for (c2=3;c2<=2*M;c2++) { - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if (c2%2 == 0) { - S1(c2/2,c4,c6) ; - } - } - } - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - if ((c2+1)%2 == 0) { - i = (c2-1)/2 ; - S2((c2-1)/2,c4,c6) ; - } - } - } - } - } - if (N >= 3) { - c2 = 2*M+1 ; - for (c4=2;c4<=N-1;c4++) { - for (c6=2;c6<=N-1;c6++) { - S2(M,c4,c6) ; - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/stride.c b/cloog-0.17.0/test/reservoir/stride.c deleted file mode 100644 index e22c74b5f0700082cc73423e3136cb3737e883d7..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/stride.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/stride.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -if (M >= 2) { - for (c2=2;c2<=M;c2+=7) { - S1(c2,(c2-2)/7) ; - } -} diff --git a/cloog-0.17.0/test/reservoir/stride.cloog b/cloog-0.17.0/test/reservoir/stride.cloog deleted file mode 100644 index 760a1a622f2546aafcbf162f1de2c264cf66ff4c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/stride.cloog +++ /dev/null @@ -1,45 +0,0 @@ -# -# Stride-bug: -# -# for (i = 2; i <= N; i+=7) { -# S(i); -# -# becomes: -# -# for (i = 5; i <= N; i+=7) { -# S(i); - -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statements -1 - -1 - - 4 5 - 0 1 -7 0 -2 - 1 1 0 0 -2 - 1 -1 0 1 0 - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/stride2.c b/cloog-0.17.0/test/reservoir/stride2.c deleted file mode 100644 index 8c2b7bf7d5b3647504dbec749bbf40e34eae6d5d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/stride2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/stride2.cloog by CLooG 0.16.1-2-g0ae5c85 gmp bits in 0.00s. */ -if (M >= 2) { - for (c2=2;c2<=M;c2+=7) { - S1(c2,(c2-2)/7); - } -} diff --git a/cloog-0.17.0/test/reservoir/stride2.cloog b/cloog-0.17.0/test/reservoir/stride2.cloog deleted file mode 100644 index 5fb9b14c7e25fd35861a9d42da38c3226ea9d411..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/stride2.cloog +++ /dev/null @@ -1,45 +0,0 @@ -# -# Stride-bug: -# -# for (i = 2; i <= N; i+=7) { -# S(i); -# -# becomes: -# -# for (i = 5; i <= N; i+=7) { -# S(i); - -# Language -c - -# Context - - 1 3 - 1 0 1 -0 - -# Number of statements -1 - -1 - - 4 5 - 0 1 -7 0 -2 # i - 7j = 2 - 1 1 0 0 0 # i >= 0 - 1 -1 0 1 0 # i <= n - 1 0 0 0 1 - -0 0 0 -0 -# Scattering functions -1 - - 6 10 - 0 1 0 0 0 0 0 0 0 0 - 0 0 1 0 0 0 -1 0 0 0 - 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 - 1 0 0 0 0 0 0 0 0 1 - -0 diff --git a/cloog-0.17.0/test/reservoir/tang-xue1.c b/cloog-0.17.0/test/reservoir/tang-xue1.c deleted file mode 100644 index 7dd06101276f81b24b88c900dc21792e236f03c0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/tang-xue1.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from ../../../git/cloog/test/reservoir/tang-xue1.cloog by CLooG 0.14.0-165-g01eb246 gmp bits in 0.01s. */ -for (c2=0;c2<=9;c2++) { - for (c4=max(-1,c2-9);c4<=min(4,c2+3);c4++) { - for (c6=max(max(1,c2),c2-c4);c6<=min(min(9,c2+1),c2-c4+4);c6++) { - for (c8=max(1,-c2+c4+c6);c8<=min(4,-c2+c4+c6+1);c8++) { - if (c2%2 == 0) { - if (c4%2 == 0) { - S1(c2/2,(-c2+c4)/2,-c2+c6,-c4+c8); - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/tang-xue1.cloog b/cloog-0.17.0/test/reservoir/tang-xue1.cloog deleted file mode 100644 index bf9b92b9ff2696e3949fc31146ff9846aa78d59b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/tang-xue1.cloog +++ /dev/null @@ -1,80 +0,0 @@ -# -# Example 1 in "Generating Efficient Tiled Code for Distributed Memory -# Machines", Peiyi Tang and Jingling Xue. -# - -# for (int i = 1; i <= 9; i++) { -# for (int j = 1; j <= 4; j++) { -# A[i,2*j] = A[i,2*j-2] + A[i-1,2*j-2]; -# } -# } -# -# We tile it with a tiling matrix H = [1/2 0] -# [-1/2 1/2] -# -# We get: -# -# for (int i = 0; i <= 9; i += 2) { -# for (int j = max(-1, -9 + i); j <= min(4, 3 + i); j++) { -# for (int k = max(1, i, i-j); k <= min(4 + i -j, 1 + i, 9); k++) { -# for (int l = max(-i + j + k, 1); l <= min(4, 1 -i + j + k); l++) { -# if (i % 2 == 0) { -# if ((i + j) % 2 == 0) { -# A[k, 2 * l] = A[k, -2 + 2 * l] + A[-1 + k, -2 + 2 * l]; -# } -# } -# } -# } -# } -# } -# - -# language: C -c - -# parameter (none) -1 2 -# 1 -1 1 -0 - -1 # number of statements - -1 -# -2i-2j -l +4 >= 0 -# -k +l >= 0 -# -2i -k +9 >= 0 -# k >= 0 -# 2i +k -1 >= 0 -# k -l +1 >= 0 -# -k +1 >= 0 -# 2i+2j +l-1 >= 0 -8 6 -# i j k l 1 -1 -2 -2 0 -1 4 -1 0 0 -1 1 0 -1 -2 0 -1 0 9 -1 0 0 1 0 0 -1 2 0 1 0 -1 -1 0 0 1 -1 1 -1 0 0 -1 0 1 -1 2 2 0 1 -1 -0 0 0 -0 - -1 - -# Scattering functions -9 15 -# alpha=[2i, 2i+2j, 2i+k, 2i+2j+l] gamma=[0, 0, 0, 0] beta=[0, 0, 0, 0, 0, 0] -# c1 c2 c3 c4 c5 c6 c7 c8 c9 i j k l 1 -0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 -1 0 0 0 0 0 0 0 2 0 0 0 0 -0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 -1 0 0 0 0 0 2 2 0 0 0 -0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 -1 0 0 0 2 0 1 0 0 -0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 -1 0 2 2 0 1 0 -0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 -0 diff --git a/cloog-0.17.0/test/reservoir/tang-xue1.good.c b/cloog-0.17.0/test/reservoir/tang-xue1.good.c deleted file mode 100644 index 1c4215cb46b969c1fd72e58ddd2942f8719620da..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/tang-xue1.good.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/tang-xue1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } - -void test() -{ - /* Scattering iterators. */ - int c2, c4, c6, c8; - /* Original iterators. */ - int i, j, k, l; - for (c2=0;c2<=9;c2++) { - for (c4=max(-1,c2-9);c4<=min(4,c2+3);c4++) { - for (c6=max(max(c2,1),c2-c4);c6<=min(min(c2+1,9),c2-c4+4);c6++) { - for (c8=max(1,-c2+c4+c6);c8<=min(4,-c2+c4+c6+1);c8++) { - if (c2%2 == 0) { - if ((c2+c4)%2 == 0) { - j = (-c2+c4)/2 ; - k = -c2+c6 ; - l = -c4+c8 ; - S1(c2/2,(-c2+c4)/2,-c2+c6,-c4+c8) ; - } - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/reservoir/two.c b/cloog-0.17.0/test/reservoir/two.c deleted file mode 100644 index 374e75423932d2cca93f2eda345ed93e7aa301a6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/two.c +++ /dev/null @@ -1,2 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/./reservoir/two.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.00s. */ -S1(1,1,5); diff --git a/cloog-0.17.0/test/reservoir/two.cloog b/cloog-0.17.0/test/reservoir/two.cloog deleted file mode 100644 index 60b259f3e690c92cb1c712e8c2f1fabd74c967e6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/two.cloog +++ /dev/null @@ -1,26 +0,0 @@ -# Scan -# D = { (i, j, k) | 0 <= i < 10, 1 <= j < 20, 2i + 3j = k, i + j + 3 = 3k } -# -# language: C -c - -# parameter (none) -1 2 -1 1 -0 - -1 # Number of statements - -1 -6 5 -# i j k 1 -1 1 0 0 0 -1 -1 0 0 10 -1 0 1 0 -1 -1 0 -1 0 20 -0 2 3 -1 0 -0 1 1 -1 3 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/reservoir/two.good.c b/cloog-0.17.0/test/reservoir/two.good.c deleted file mode 100644 index a80671f3e9cd9c82eb1ee6ad3b13339cd0f26ad1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/reservoir/two.good.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/./reservoir/two.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } - -void test() -{ - /* Original iterators. */ - int i, j, k; - for (i=0;i<=1;i++) { - if ((i+1)%2 == 0) { - j = (-i+3)/2 ; - k = (i+9)/2 ; - S1(i,(-i+3)/2,(i+9)/2) ; - } - } -} diff --git a/cloog-0.17.0/test/singleton.c b/cloog-0.17.0/test/singleton.c deleted file mode 100644 index ad14ebe447e691e55d502110150fbfcf52d03a31..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/singleton.c +++ /dev/null @@ -1,3 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/singleton.cloog by CLooG 0.14.0-242-g720faff gmp bits in 0.00s. */ -S2(); -S1(); diff --git a/cloog-0.17.0/test/singleton.cloog b/cloog-0.17.0/test/singleton.cloog deleted file mode 100644 index 8636efb9b16a70ed6ddce93a3ff601af6e14c219..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/singleton.cloog +++ /dev/null @@ -1,27 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -0 2 -0 0 0 - -1 -0 2 -0 0 0 - -0 - -2 - -1 3 -0 -1 0 - -1 3 -0 -1 -1 - -0 diff --git a/cloog-0.17.0/test/singleton.good.c b/cloog-0.17.0/test/singleton.good.c deleted file mode 100644 index 40106ed26edb64ff1f50fbfd583d02b6771a6cc9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/singleton.good.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/singleton.cloog by CLooG 0.14.0-242-g720faff gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } - -void test() -{ - S2(); - S1(); -} diff --git a/cloog-0.17.0/test/sor1d.c b/cloog-0.17.0/test/sor1d.c deleted file mode 100644 index da1b5ece5682223e2683d8479f4dcdac7d5a73de..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/sor1d.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated from ../../../git/cloog/test/sor1d.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.11s. */ -if ((M >= 1) && (N >= 3)) { - for (glT1=-1;glT1<=floord(3*M+N-5,100);glT1++) { - for (rp1=max(max(0,ceild(100*glT1-2*M-N+5,100)),ceild(100*glT1-N-193,300));rp1<=min(min(floord(glT1+1,3),floord(M,100)),glT1);rp1++) { - for (vT1=max(max(100*glT1-100*rp1,200*rp1-3),200*rp1-N+1);vT1<=min(min(min(2*M+N-5,100*glT1-100*rp1+99),200*rp1+N+193),100*glT1-100*rp1+N+95);vT1++) { - if (rp1 >= max(1,ceild(vT1-N+7,200))) { - S3(glT1-rp1,rp1-1,rp1,100*rp1-1,-200*rp1+vT1+6); - } - for (vP1=max(max(1,ceild(vT1-N+5,2)),100*rp1);vP1<=min(min(floord(vT1+2,2),M),100*rp1+99);vP1++) { - S1(glT1-rp1,rp1,vP1,vT1-2*vP1+4); - } - if (rp1 <= min(floord(M-100,100),floord(vT1-197,200))) { - S2(glT1-rp1,rp1,rp1+1,100*rp1+99,-200*rp1+vT1-194); - } - } - } - S4(glT1); - } -} diff --git a/cloog-0.17.0/test/sor1d.cloog b/cloog-0.17.0/test/sor1d.cloog deleted file mode 100644 index ba1ca706d9978bc721e15b525a40000a9332bcef..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/sor1d.cloog +++ /dev/null @@ -1,256 +0,0 @@ -# created: Thu Dec 17 16:41:33 CET 2009 -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context -2 4 - 1 1 0 0 - 1 0 1 0 - - -1 # set parameter names -M N - -# --------------------- STATEMENTS -------------------- -4 - -# 1 computation stmts: -1 # domains per statement -19 8 - 1 -100 0 2 1 0 0 -4 - 1 0 0 0 1 0 0 -2 - 1 100 0 -2 -1 0 0 103 - 1 0 0 0 -1 0 1 -1 - 1 0 0 1 0 0 0 -1 - 1 0 -100 1 0 0 0 0 - 1 -100 0 2 0 0 1 -5 - 1 0 0 -1 0 1 0 0 - 1 0 100 -1 0 0 0 99 - 1 100 0 -2 0 0 0 101 - 1 0 50 0 0 0 0 49 - 1 -100 200 0 0 0 1 193 - 1 0 -100 0 0 1 0 0 - 1 100 -200 0 0 0 0 101 - 1 100 0 0 0 0 0 99 - 1 -100 0 0 0 2 1 -5 - 1 0 0 0 0 0 1 -3 - 1 0 0 0 0 2 1 94 - 1 0 0 0 0 1 0 -1 - - -0 0 0 # for future options... - - -# 1 prepare-send stmts: -1 # domains per statement -57 9 - 1 0 -200 0 2 1 0 0 -3 - 1 0 0 0 2 1 0 0 -5 - 1 -100 0 0 2 1 0 0 -4 - 1 0 0 0 0 1 0 0 -3 - 1 0 200 0 -2 -1 0 1 197 - 1 0 0 0 -2 -1 2 1 -3 - 1 100 0 0 -2 -1 0 0 103 - 1 0 0 0 0 -1 0 1 -1 - 1 0 0 -100 1 0 0 0 1 - 1 0 -100 0 1 0 0 0 0 - 1 0 0 0 1 0 0 0 -1 - 1 0 -200 0 2 0 0 1 -4 - 1 0 0 0 2 0 0 1 -6 - 1 -100 0 0 2 0 0 1 -5 - 1 0 0 100 -1 0 0 0 98 - 1 0 100 0 -1 0 0 0 99 - 1 0 0 0 -1 0 1 0 -1 - 1 0 200 0 -2 0 0 1 194 - 1 0 0 0 -2 0 2 1 -6 - 1 50 0 0 -1 0 0 0 50 - 1 0 -1 1 0 0 0 0 -1 - 1 0 0 100 0 0 0 0 97 - 1 0 -200 200 0 0 0 1 192 - 1 0 0 200 0 0 0 1 190 - 1 -100 0 200 0 0 0 1 191 - 1 0 1 -1 0 0 0 0 1 - 1 0 0 -100 0 0 1 0 0 - 1 0 200 -200 0 0 0 1 196 - 1 0 0 -200 0 0 2 1 -4 - 1 50 0 -100 0 0 0 0 51 - 1 -100 200 0 0 0 0 2 189 - 1 -100 200 0 0 0 0 1 193 - 1 0 100 0 0 0 0 1 94 - 1 0 200 0 0 0 0 1 192 - 1 0 50 0 0 0 0 0 49 - 1 100 -200 0 0 0 0 1 96 - 1 0 -100 0 0 0 1 1 -5 - 1 0 -100 0 0 0 1 0 -100 - 1 0 -200 0 0 0 2 1 -204 - 1 50 -100 0 0 0 0 0 -49 - 1 50 0 0 0 0 0 0 49 - 1 100 0 0 0 0 0 1 94 - 1 100 0 0 0 0 0 3 284 - 1 50 0 0 0 0 0 1 45 - 1 -100 0 0 0 0 2 1 -7 - 1 -100 0 0 0 0 2 2 -11 - 1 -100 0 0 0 0 2 4 179 - 1 -100 0 0 0 0 2 3 -15 - 1 0 0 0 0 0 2 1 -8 - 1 0 0 0 0 0 2 3 -16 - 1 0 0 0 0 0 1 1 -6 - 1 0 0 0 0 0 0 1 -4 - 1 0 0 0 0 0 2 4 79 - 1 0 0 0 0 0 2 7 463 - 1 0 0 0 0 0 2 6 269 - 1 0 0 0 0 0 2 5 75 - 1 0 0 0 0 0 1 0 -2 - - -0 0 0 # for future options... - - -# 1 prepare-receive stmts: -1 # domains per statement -57 9 - 1 0 -200 0 2 1 0 0 -3 - 1 0 0 0 2 1 0 0 -5 - 1 -100 0 0 2 1 0 0 -4 - 1 0 0 0 0 1 0 0 -3 - 1 0 200 0 -2 -1 0 1 197 - 1 0 0 0 -2 -1 2 1 -3 - 1 100 0 0 -2 -1 0 0 103 - 1 0 0 0 0 -1 0 1 -1 - 1 0 0 -100 1 0 0 0 1 - 1 0 -100 0 1 0 0 0 0 - 1 0 0 0 1 0 0 0 -1 - 1 0 -200 0 2 0 0 1 -4 - 1 0 0 0 2 0 0 1 -6 - 1 -100 0 0 2 0 0 1 -5 - 1 0 0 100 -1 0 0 0 98 - 1 0 100 0 -1 0 0 0 99 - 1 0 0 0 -1 0 1 0 -1 - 1 0 200 0 -2 0 0 1 194 - 1 0 0 0 -2 0 2 1 -6 - 1 50 0 0 -1 0 0 0 50 - 1 0 -1 1 0 0 0 0 -1 - 1 0 0 100 0 0 0 0 97 - 1 0 -200 200 0 0 0 1 192 - 1 0 0 200 0 0 0 1 190 - 1 -100 0 200 0 0 0 1 191 - 1 0 1 -1 0 0 0 0 1 - 1 0 0 -100 0 0 1 0 0 - 1 0 200 -200 0 0 0 1 196 - 1 0 0 -200 0 0 2 1 -4 - 1 50 0 -100 0 0 0 0 51 - 1 -100 200 0 0 0 0 2 189 - 1 -100 200 0 0 0 0 1 193 - 1 0 100 0 0 0 0 1 94 - 1 0 200 0 0 0 0 1 192 - 1 0 50 0 0 0 0 0 49 - 1 100 -200 0 0 0 0 1 96 - 1 0 -100 0 0 0 1 1 -5 - 1 0 -100 0 0 0 1 0 -100 - 1 0 -200 0 0 0 2 1 -204 - 1 50 -100 0 0 0 0 0 -49 - 1 50 0 0 0 0 0 0 49 - 1 100 0 0 0 0 0 1 94 - 1 100 0 0 0 0 0 3 284 - 1 50 0 0 0 0 0 1 45 - 1 -100 0 0 0 0 2 1 -7 - 1 -100 0 0 0 0 2 2 -11 - 1 -100 0 0 0 0 2 4 179 - 1 -100 0 0 0 0 2 3 -15 - 1 0 0 0 0 0 2 1 -8 - 1 0 0 0 0 0 2 3 -16 - 1 0 0 0 0 0 1 1 -6 - 1 0 0 0 0 0 0 1 -4 - 1 0 0 0 0 0 2 4 79 - 1 0 0 0 0 0 2 7 463 - 1 0 0 0 0 0 2 6 269 - 1 0 0 0 0 0 2 5 75 - 1 0 0 0 0 0 1 0 -2 - - -0 0 0 # for future options... - - -# 1 communication stmts: -1 # domains per statement -21 5 - 1 200 0 3 781 - 1 200 0 1 391 - 1 200 0 4 1075 - 1 100 0 1 392 - 1 100 0 0 197 - 1 -200 6 5 377 - 1 -200 6 6 671 - 1 -100 3 2 190 - 1 -200 6 3 -13 - 1 -100 3 1 -5 - 1 0 2 3 484 - 1 0 1 1 95 - 1 0 3 1 192 - 1 0 3 5 873 - 1 0 3 2 189 - 1 0 6 7 1062 - 1 0 6 5 771 - 1 0 3 4 579 - 1 0 0 1 -3 - 1 0 2 1 -5 - 1 0 1 0 -1 - - -0 0 0 # for future options... - - - -1 # set the iterator names -tileT1 tileP1 other1 other2 other3 other4 other5 - -# --------------------- SCATTERING -------------------- -4 # Scattering functions -9 17 - 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 -2 -1 0 0 4 - 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - -9 18 - 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -1 0 0 4 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 - 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 - -9 18 - 0 1 0 0 0 0 0 -1 0 0 -1 0 0 0 0 0 0 -1 - 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -1 0 0 4 - 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 - -9 14 - 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 - 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 - 0 0 0 1 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 1 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 1 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 1 0 0 0 0 - - -1 # we set the scattering dimension names -glT1 bl rp1 vT1 vP1 stmtType otherP1 arrAcc1 arrNr1 - diff --git a/cloog-0.17.0/test/sor1d.good.c b/cloog-0.17.0/test/sor1d.good.c deleted file mode 100644 index bb5d643a57f660fad2828085d4c7f5c78b464fc3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/sor1d.good.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/sor1d.cloog by CLooG 0.14.0-226-g3fc65ac gmp bits in 0.04s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(tileT1,tileP1,other1,other2) { hash(1); hash(tileT1); hash(tileP1); hash(other1); hash(other2); } -#define S2(tileT1,tileP1,other1,other2,other3) { hash(2); hash(tileT1); hash(tileP1); hash(other1); hash(other2); hash(other3); } -#define S3(tileT1,tileP1,other1,other2,other3) { hash(3); hash(tileT1); hash(tileP1); hash(other1); hash(other2); hash(other3); } -#define S4(tileT1) { hash(4); hash(tileT1); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int glT1, rp1, vT1, vP1, otherP1, arrAcc1; - /* Original iterators. */ - int tileT1, tileP1, other1, other2, other3; - if ((M >= 1) && (N >= 3)) { - for (glT1=-1;glT1<=floord(3*M+N-5,100);glT1++) { - for (rp1=max(max(0,ceild(100*glT1-2*M-N+5,100)),ceild(100*glT1-N-193,300));rp1<=min(min(min(min(floord(glT1+1,2),floord(M,100)),floord(100*glT1+99,100)),floord(50*glT1+51,150)),floord(100*glT1+N+98,300));rp1++) { - for (vT1=max(max(max(max(0,100*glT1-100*rp1),100*rp1-1),200*rp1-3),200*rp1-N+1);vT1<=min(min(2*M+N-5,100*glT1-100*rp1+99),200*rp1+N+193);vT1++) { - if (rp1 >= max(1,ceild(vT1-N+7,200))) { - S3(glT1-rp1,rp1-1,rp1,100*rp1-1,-200*rp1+vT1+6); - } - for (vP1=max(max(1,ceild(vT1-N+5,2)),100*rp1);vP1<=min(min(floord(vT1+2,2),M),100*rp1+99);vP1++) { - S1(glT1-rp1,rp1,vP1,vT1-2*vP1+4); - if ((rp1 <= min(floord(M-100,100),floord(vT1-197,200))) && (100*rp1 == vP1-99)) { - S2(glT1-rp1,rp1,rp1+1,100*rp1+99,-200*rp1+vT1-194); - } - } - } - } - S4(glT1); - } - } -} diff --git a/cloog-0.17.0/test/square+triangle-1-1-2-3.c b/cloog-0.17.0/test/square+triangle-1-1-2-3.c deleted file mode 100644 index c30b4e2b8e93585102705e24427aa05cac9c11c4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/square+triangle-1-1-2-3.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/square+triangle-1-1-2-3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ -for (j=1;j<=M;j++) { - S1(1,j); -} -for (i=2;i<=M;i++) { - S1(i,1); - for (j=2;j<=i;j++) { - S1(i,j); - S2(i,j); - } - for (j=i+1;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/square+triangle-1-1-2-3.cloog b/cloog-0.17.0/test/square+triangle-1-1-2-3.cloog deleted file mode 100644 index ce8f5471b508fe63be96c0135716eb2cfb69af04..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/square+triangle-1-1-2-3.cloog +++ /dev/null @@ -1,36 +0,0 @@ -# language: C -c - -# Context -# {M | M >= 1} -2 3 -# M 1 -1 1 -1 -1 0 1 -0 - -2 # Number of statements - -1 -# {i, j | 1<=i<=M; 1<=j<=M} -5 5 -# i j M 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 0 -1 1 0 -1 0 0 0 1 -0 0 0 - -1 -# {i, j | 2<=j<=i<=M} -4 5 -# i j M 1 -1 0 1 0 -2 -1 1 -1 0 0 -1 -1 0 1 0 -1 0 0 0 1 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/square+triangle-1-1-2-3.good.c b/cloog-0.17.0/test/square+triangle-1-1-2-3.good.c deleted file mode 100644 index ea68a7f5939cd74af09193f01b461aa8b880dbb9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/square+triangle-1-1-2-3.good.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated from ../../../git/cloog/test/square+triangle-1-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M) -{ - /* Original iterators. */ - int i, j; - for (j=1;j<=M;j++) { - S1(1,j) ; - } - for (i=2;i<=M-1;i++) { - S1(i,1) ; - for (j=2;j<=i;j++) { - S1(i,j) ; - S2(i,j) ; - } - for (j=i+1;j<=M;j++) { - S1(i,j) ; - } - } - if (M >= 2) { - S1(M,1) ; - for (j=2;j<=M;j++) { - S1(M,j) ; - S2(M,j) ; - } - } -} diff --git a/cloog-0.17.0/test/stride.c b/cloog-0.17.0/test/stride.c deleted file mode 100644 index d2cf8fe337e922db6927fdcead024c55318ac328..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from stride.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.01s. */ -for (c1=3;c1<=100;c1++) { - if (c1 == 25) { - S1(25); - } - if (c1%3 == 0) { - S2(c1,c1/3); - } -} diff --git a/cloog-0.17.0/test/stride.cloog b/cloog-0.17.0/test/stride.cloog deleted file mode 100644 index 152637776fa7478b3c958b8d6caa9bd5cb531170..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride.cloog +++ /dev/null @@ -1,32 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -1 3 -0 -1 25 --1 0 0 - -1 -3 4 -1 1 0 -3 -1 -1 0 100 -0 1 -3 0 -0 0 0 - -0 - -2 -2 5 -0 -1 0 1 0 -0 0 -1 0 0 - -2 6 -0 -1 0 1 0 0 -0 0 -1 0 1 0 - -0 diff --git a/cloog-0.17.0/test/stride.good.c b/cloog-0.17.0/test/stride.good.c deleted file mode 100644 index 73807234c9e62c4221f894ebcfdf2dd0e5b0bdbe..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride.good.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from stride.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=3;c1<=100;c1++) { - if (c1 == 25) { - S1(25); - } - if (c1%3 == 0) { - S2(c1,c1/3); - } - } -} diff --git a/cloog-0.17.0/test/stride2.c b/cloog-0.17.0/test/stride2.c deleted file mode 100644 index 320a2fb37142e6e41893e3406ae25b9c5cadf946..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride2.c +++ /dev/null @@ -1,7 +0,0 @@ -/* Generated from stride2.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ -for (c1=3;c1<=100;c1+=3) { - if (c1 == 27) { - S1(27); - } - S2(c1,c1/3); -} diff --git a/cloog-0.17.0/test/stride2.cloog b/cloog-0.17.0/test/stride2.cloog deleted file mode 100644 index 72a597a584c9491a65c8be168481faea592af73b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride2.cloog +++ /dev/null @@ -1,32 +0,0 @@ -c - -0 2 - -0 - -2 - -1 -1 3 -0 -1 27 --1 0 0 - -1 -3 4 -1 1 0 -3 -1 -1 0 100 -0 1 -3 0 -0 0 0 - -0 - -2 -2 5 -0 -1 0 1 0 -0 0 -1 0 0 - -2 6 -0 -1 0 1 0 0 -0 0 -1 0 1 0 - -0 diff --git a/cloog-0.17.0/test/stride2.good.c b/cloog-0.17.0/test/stride2.good.c deleted file mode 100644 index 4cf8b60ddef39d244333494d8697316f3b24da92..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride2.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from stride2.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test() -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - for (c1=3;c1<=100;c1+=3) { - if (c1 == 27) { - S1(27); - } - S2(c1,c1/3); - } -} diff --git a/cloog-0.17.0/test/stride3.c b/cloog-0.17.0/test/stride3.c deleted file mode 100644 index c228cb6b490b5b2be5dc0a0f45262aae0779f8b6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride3.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/stride3.cloog by CLooG 0.14.0-291-g5879c32 gmp bits in 0.00s. */ -if ((m <= n) && (n >= 1)) { - for (p1=max(50,50*m);p1<=50*n;p1+=50) { - S1(p1/50); - } -} diff --git a/cloog-0.17.0/test/stride3.cloog b/cloog-0.17.0/test/stride3.cloog deleted file mode 100644 index bd5d6b03196199b9e685210d72fa5362adf3bf69..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride3.cloog +++ /dev/null @@ -1,41 +0,0 @@ - - -# ---------------------- CONTEXT ---------------------- -c # language is C - -# Context (no constraints on two parameters) -1 4 # 1 lines and 4 columns -# eq/in m n 1 -1 0 0 0 # 0 >= 0, always true - -1 # We want to set manually the parameter names -m n # parameter names - -# --------------------- STATEMENTS -------------------- -1 # Number of statements - -1 # First statement: two domains -# First domain -3 5 # 3 lines and 5 columns -# eq/in i m n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # i <= n -1 1 -1 0 0 # i >= m -# Second domain -0 0 0 # for future options - - -1 # We want to set manually the iterator names -i j # iterator names - -# --------------------- SCATTERING -------------------- -1 # Scattering functions -# First function -2 7 # 2 lines and 7 columns -# eq/in p1 p2 i m n 1 -0 1 0 -50 0 0 0 # p1 = i -0 0 1 0 0 0 0 # p2 = 0 - -1 # We want to set manually the scattering dimension names -p1 p2 # scattering dimension names - diff --git a/cloog-0.17.0/test/stride4.c b/cloog-0.17.0/test/stride4.c deleted file mode 100644 index 2e874bec97cd76f9696870a2a5086917626495d2..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride4.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/stride4.cloog by CLooG 0.16.0-10-g13c6274 gmp bits in 0.00s. */ -if ((t >= 0) && (t <= 15)) { - for (i0=t;i0<=99;i0+=16) { - S1(i0,t); - } -} diff --git a/cloog-0.17.0/test/stride4.cloog b/cloog-0.17.0/test/stride4.cloog deleted file mode 100644 index 0271d97030542d2ce6d6aea599ddf4ccc9c39153..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/stride4.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# Language: C -c - -# Context: -1 - -0 3 0 0 0 1 - -1 # Parameter name(s) -t -# Statement number: -1 - -# Iteration domain of statement 1. -1 - -6 6 2 0 1 1 -0 1 0 16 -1 0 -0 0 1 0 -1 0 -1 1 0 0 0 0 -1 -1 0 0 0 99 -1 0 0 0 1 0 -1 0 0 0 -1 15 - -0 0 0 # For future options. - - -1 # Iterator name(s) - -i0 i1 - -# No scattering functions. -0 diff --git a/cloog-0.17.0/test/swim.c b/cloog-0.17.0/test/swim.c deleted file mode 100644 index 0a0046a6e6fec3973be4ecfe1370cd87e61fc49b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/swim.c +++ /dev/null @@ -1,672 +0,0 @@ -/* Generated from ../../../git/cloog/test/swim.cloog by CLooG 0.16.1-3-g277eafa gmp bits in 0.20s. */ -if (M == 1) { - S1(); - S2(); - S3(); - S4(); - S5(); - S6(); - S7(); - S8(); - S9(); - S10(); - S11(); - S12(); - S13(); - S14(); - S15(); - S16(); - S17(); - S18(); - S19(); - S20(); - S21(); - S22(); - S23(); - S24(); - S25(); - S26(); - S27(); - for (p1=1;p1<=N;p1++) { - for (p3=1;p3<=N;p3++) { - S28(p1,p3); - S29(p1,p3); - S30(p1,p3); - } - S31(p1); - } - S32(); - S33(); - S34(); - if (O <= 1) { - S35(); - } - S36(); - S37(); - if ((N >= 1) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5); - S41(p1,p3,p5); - S42(p1,p3,p5); - S43(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5); - S60(p1,p3,p5); - S61(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5); - S103(p1,p3,p5); - S104(p1,p3,p5); - S105(p1,p3,p5); - S106(p1,p3,p5); - S107(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5); - S41(p1,p3,p5); - S42(p1,p3,p5); - S43(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5); - S60(p1,p3,p5); - S61(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5); - S103(p1,p3,p5); - S104(p1,p3,p5); - S105(p1,p3,p5); - S106(p1,p3,p5); - S107(p1,p3,p5); - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N >= 1) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=Q;p3++) { - S44(p1,p3); - S45(p1,p3); - S46(p1,p3); - S47(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=Q;p3++) { - S62(p1,p3); - S63(p1,p3); - S64(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=Q;p3++) { - S108(p1,p3); - S109(p1,p3); - S110(p1,p3); - S111(p1,p3); - S112(p1,p3); - S113(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N >= 1) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - for (p3=1;p3<=R;p3++) { - S48(p1,p3); - S49(p1,p3); - S50(p1,p3); - S51(p1,p3); - } - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - for (p3=1;p3<=R;p3++) { - S65(p1,p3); - S66(p1,p3); - S67(p1,p3); - } - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - for (p3=1;p3<=R;p3++) { - S114(p1,p3); - S115(p1,p3); - S116(p1,p3); - S117(p1,p3); - S118(p1,p3); - S119(p1,p3); - } - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N >= 1) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5); - S96(p1,p3,p5); - S97(p1,p3,p5); - } - S98(p1,p3); - } - S99(p1); - S100(p1); - S101(p1); - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } - if ((N <= 0) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1); - S39(p1); - S52(p1); - S53(p1); - S54(p1); - S55(p1); - S56(p1); - S57(p1); - S58(p1); - S68(p1); - S69(p1); - S70(p1); - S71(p1); - S72(p1); - S73(p1); - S74(p1); - S75(p1); - S76(p1); - S77(p1); - S78(p1); - S79(p1); - S80(p1); - S81(p1); - S82(p1); - S83(p1); - S84(p1); - S85(p1); - S86(p1); - S87(p1); - S88(p1); - S89(p1); - S90(p1); - S91(p1); - S92(p1); - S93(p1); - S94(p1); - S99(p1); - S100(p1); - S101(p1); - S120(p1); - S121(p1); - S122(p1); - S123(p1); - S124(p1); - S125(p1); - } - } -} diff --git a/cloog-0.17.0/test/swim.cloog b/cloog-0.17.0/test/swim.cloog deleted file mode 100644 index 9216e463938f4aed10830fb40acfe2ef8753d39f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/swim.cloog +++ /dev/null @@ -1,2453 +0,0 @@ -c # language is C -# ---------- CONTEXT ---------- -# Context (no constraints on parameters) -1 8 # 1 lines, 8 columns -0 0 0 0 0 0 0 0 - -0 # Automatically find parameter names - -# ---------- STATEMENTS ---------- -125 # Number of statements - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -1 -1 -1 0 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -1 -1 -1 0 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -1 -1 -1 0 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -1 -1 -1 0 1 0 0 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -4 8 -1 0 0 -1 0 0 0 1 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -3 8 -1 1 0 0 0 0 0 -1 -1 -1 0 0 0 0 0 1 -1 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 1 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 1 0 0 0 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -9 11 -1 1 0 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 0 -1 0 0 0 1 0 0 0 0 0 -1 -1 0 0 0 -1 0 0 0 0 0 1 -1 0 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 1 0 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -7 10 -1 1 0 0 0 0 0 0 0 -2 -1 -1 0 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 0 -1 0 0 1 0 0 0 0 0 -1 -1 0 0 -1 0 0 0 0 0 1 -1 0 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -1 # Statement has 1 domain -5 9 -1 1 0 0 0 0 0 0 -2 -1 -1 0 0 0 1 0 0 0 -1 0 1 0 0 0 0 0 -1 -1 0 -1 0 0 0 0 0 1 -1 0 -1 0 0 0 0 0 1 -0 0 0 - -0 # Automatically find iterator names. - -# ---------- SCATTERING FUNCTIONS ---------- -125 # Number of scattering functions - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -5 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -6 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -7 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -8 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -9 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -10 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -11 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -15 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -16 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -17 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -18 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -19 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -20 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -21 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -22 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -23 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -24 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -25 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -26 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -28 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -29 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -30 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -31 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -32 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 15 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -33 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -3 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -5 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -6 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -7 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -8 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -9 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -10 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -11 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -13 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -14 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -15 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -16 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -17 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -18 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -19 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -20 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -21 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -22 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -23 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -24 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -25 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -26 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -27 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -28 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -29 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -30 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -31 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -32 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -33 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -35 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -36 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -37 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -38 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -39 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -40 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -41 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -42 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -43 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -44 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -45 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -3 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -4 # Beta 3 - -7 18 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -46 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -5 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -47 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -3 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -4 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 17 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -48 # Beta 1 -0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -49 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -50 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -51 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -52 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -53 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -7 16 -# p0 p1 p2 p3 p4 p5 p6 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 -0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -54 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 - -1 # Set the scattering parameter names. -p0 p1 p2 p3 p4 p5 p6 - diff --git a/cloog-0.17.0/test/swim.good.c b/cloog-0.17.0/test/swim.good.c deleted file mode 100644 index 80f0de1b223c92ea47eb8be22e155ef8ddd6e2e0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/swim.good.c +++ /dev/null @@ -1,819 +0,0 @@ -/* Generated from ../../../git/cloog/test/swim.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.70s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3() { hash(3); } -#define S4() { hash(4); } -#define S5() { hash(5); } -#define S6() { hash(6); } -#define S7() { hash(7); } -#define S8() { hash(8); } -#define S9() { hash(9); } -#define S10() { hash(10); } -#define S11() { hash(11); } -#define S12() { hash(12); } -#define S13() { hash(13); } -#define S14() { hash(14); } -#define S15() { hash(15); } -#define S16() { hash(16); } -#define S17() { hash(17); } -#define S18() { hash(18); } -#define S19() { hash(19); } -#define S20() { hash(20); } -#define S21() { hash(21); } -#define S22() { hash(22); } -#define S23() { hash(23); } -#define S24() { hash(24); } -#define S25() { hash(25); } -#define S26() { hash(26); } -#define S27() { hash(27); } -#define S28(i,j) { hash(28); hash(i); hash(j); } -#define S29(i,j) { hash(29); hash(i); hash(j); } -#define S30(i,j) { hash(30); hash(i); hash(j); } -#define S31(i) { hash(31); hash(i); } -#define S32() { hash(32); } -#define S33() { hash(33); } -#define S34() { hash(34); } -#define S35() { hash(35); } -#define S36() { hash(36); } -#define S37() { hash(37); } -#define S38(i) { hash(38); hash(i); } -#define S39(i) { hash(39); hash(i); } -#define S40(i,j,k) { hash(40); hash(i); hash(j); hash(k); } -#define S41(i,j,k) { hash(41); hash(i); hash(j); hash(k); } -#define S42(i,j,k) { hash(42); hash(i); hash(j); hash(k); } -#define S43(i,j,k) { hash(43); hash(i); hash(j); hash(k); } -#define S44(i,j) { hash(44); hash(i); hash(j); } -#define S45(i,j) { hash(45); hash(i); hash(j); } -#define S46(i,j) { hash(46); hash(i); hash(j); } -#define S47(i,j) { hash(47); hash(i); hash(j); } -#define S48(i,j) { hash(48); hash(i); hash(j); } -#define S49(i,j) { hash(49); hash(i); hash(j); } -#define S50(i,j) { hash(50); hash(i); hash(j); } -#define S51(i,j) { hash(51); hash(i); hash(j); } -#define S52(i) { hash(52); hash(i); } -#define S53(i) { hash(53); hash(i); } -#define S54(i) { hash(54); hash(i); } -#define S55(i) { hash(55); hash(i); } -#define S56(i) { hash(56); hash(i); } -#define S57(i) { hash(57); hash(i); } -#define S58(i) { hash(58); hash(i); } -#define S59(i,j,k) { hash(59); hash(i); hash(j); hash(k); } -#define S60(i,j,k) { hash(60); hash(i); hash(j); hash(k); } -#define S61(i,j,k) { hash(61); hash(i); hash(j); hash(k); } -#define S62(i,j) { hash(62); hash(i); hash(j); } -#define S63(i,j) { hash(63); hash(i); hash(j); } -#define S64(i,j) { hash(64); hash(i); hash(j); } -#define S65(i,j) { hash(65); hash(i); hash(j); } -#define S66(i,j) { hash(66); hash(i); hash(j); } -#define S67(i,j) { hash(67); hash(i); hash(j); } -#define S68(i) { hash(68); hash(i); } -#define S69(i) { hash(69); hash(i); } -#define S70(i) { hash(70); hash(i); } -#define S71(i) { hash(71); hash(i); } -#define S72(i) { hash(72); hash(i); } -#define S73(i) { hash(73); hash(i); } -#define S74(i) { hash(74); hash(i); } -#define S75(i) { hash(75); hash(i); } -#define S76(i) { hash(76); hash(i); } -#define S77(i) { hash(77); hash(i); } -#define S78(i) { hash(78); hash(i); } -#define S79(i) { hash(79); hash(i); } -#define S80(i) { hash(80); hash(i); } -#define S81(i) { hash(81); hash(i); } -#define S82(i) { hash(82); hash(i); } -#define S83(i) { hash(83); hash(i); } -#define S84(i) { hash(84); hash(i); } -#define S85(i) { hash(85); hash(i); } -#define S86(i) { hash(86); hash(i); } -#define S87(i) { hash(87); hash(i); } -#define S88(i) { hash(88); hash(i); } -#define S89(i) { hash(89); hash(i); } -#define S90(i) { hash(90); hash(i); } -#define S91(i) { hash(91); hash(i); } -#define S92(i) { hash(92); hash(i); } -#define S93(i) { hash(93); hash(i); } -#define S94(i) { hash(94); hash(i); } -#define S95(i,j,k) { hash(95); hash(i); hash(j); hash(k); } -#define S96(i,j,k) { hash(96); hash(i); hash(j); hash(k); } -#define S97(i,j,k) { hash(97); hash(i); hash(j); hash(k); } -#define S98(i,j) { hash(98); hash(i); hash(j); } -#define S99(i) { hash(99); hash(i); } -#define S100(i) { hash(100); hash(i); } -#define S101(i) { hash(101); hash(i); } -#define S102(i,j,k) { hash(102); hash(i); hash(j); hash(k); } -#define S103(i,j,k) { hash(103); hash(i); hash(j); hash(k); } -#define S104(i,j,k) { hash(104); hash(i); hash(j); hash(k); } -#define S105(i,j,k) { hash(105); hash(i); hash(j); hash(k); } -#define S106(i,j,k) { hash(106); hash(i); hash(j); hash(k); } -#define S107(i,j,k) { hash(107); hash(i); hash(j); hash(k); } -#define S108(i,j) { hash(108); hash(i); hash(j); } -#define S109(i,j) { hash(109); hash(i); hash(j); } -#define S110(i,j) { hash(110); hash(i); hash(j); } -#define S111(i,j) { hash(111); hash(i); hash(j); } -#define S112(i,j) { hash(112); hash(i); hash(j); } -#define S113(i,j) { hash(113); hash(i); hash(j); } -#define S114(i,j) { hash(114); hash(i); hash(j); } -#define S115(i,j) { hash(115); hash(i); hash(j); } -#define S116(i,j) { hash(116); hash(i); hash(j); } -#define S117(i,j) { hash(117); hash(i); hash(j); } -#define S118(i,j) { hash(118); hash(i); hash(j); } -#define S119(i,j) { hash(119); hash(i); hash(j); } -#define S120(i) { hash(120); hash(i); } -#define S121(i) { hash(121); hash(i); } -#define S122(i) { hash(122); hash(i); } -#define S123(i) { hash(123); hash(i); } -#define S124(i) { hash(124); hash(i); } -#define S125(i) { hash(125); hash(i); } - -void test(int M, int N, int O, int P, int Q, int R) -{ - /* Scattering iterators. */ - int p1, p3, p5; - /* Original iterators. */ - int i, j, k; - if (M == 1) { - S1() ; - S2() ; - S3() ; - S4() ; - S5() ; - S6() ; - S7() ; - S8() ; - S9() ; - S10() ; - S11() ; - S12() ; - S13() ; - S14() ; - S15() ; - S16() ; - S17() ; - S18() ; - S19() ; - S20() ; - S21() ; - S22() ; - S23() ; - S24() ; - S25() ; - S26() ; - S27() ; - } - if (M == 1) { - for (p1=1;p1<=N;p1++) { - for (p3=1;p3<=N;p3++) { - S28(p1,p3) ; - S29(p1,p3) ; - S30(p1,p3) ; - } - S31(p1) ; - } - } - if (M == 1) { - S32() ; - S33() ; - S34() ; - } - if ((M == 1) && (O <= 1)) { - S35() ; - } - if (M == 1) { - S36() ; - S37() ; - } - if ((M == 1) && (N >= 1) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5) ; - S41(p1,p3,p5) ; - S42(p1,p3,p5) ; - S43(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5) ; - S60(p1,p3,p5) ; - S61(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5) ; - S103(p1,p3,p5) ; - S104(p1,p3,p5) ; - S105(p1,p3,p5) ; - S106(p1,p3,p5) ; - S107(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q >= 1) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S40(p1,p3,p5) ; - S41(p1,p3,p5) ; - S42(p1,p3,p5) ; - S43(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S59(p1,p3,p5) ; - S60(p1,p3,p5) ; - S61(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - for (p5=1;p5<=R;p5++) { - S102(p1,p3,p5) ; - S103(p1,p3,p5) ; - S104(p1,p3,p5) ; - S105(p1,p3,p5) ; - S106(p1,p3,p5) ; - S107(p1,p3,p5) ; - } - } - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N >= 1) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q <= 0) && (R >= 1)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=R;p3++) { - S48(p1,p3) ; - S49(p1,p3) ; - S50(p1,p3) ; - S51(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=R;p3++) { - S65(p1,p3) ; - S66(p1,p3) ; - S67(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=R;p3++) { - S114(p1,p3) ; - S115(p1,p3) ; - S116(p1,p3) ; - S117(p1,p3) ; - S118(p1,p3) ; - S119(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N >= 1) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q <= 0) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N >= 1) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - for (p3=1;p3<=N;p3++) { - for (p5=1;p5<=N;p5++) { - S95(p1,p3,p5) ; - S96(p1,p3,p5) ; - S97(p1,p3,p5) ; - } - S98(p1,p3) ; - } - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } - if ((M == 1) && (N <= 0) && (Q >= 1) && (R <= 0)) { - for (p1=2;p1<=P;p1++) { - S38(p1) ; - S39(p1) ; - for (p3=1;p3<=Q;p3++) { - S44(p1,p3) ; - S45(p1,p3) ; - S46(p1,p3) ; - S47(p1,p3) ; - } - S52(p1) ; - S53(p1) ; - S54(p1) ; - S55(p1) ; - S56(p1) ; - S57(p1) ; - S58(p1) ; - for (p3=1;p3<=Q;p3++) { - S62(p1,p3) ; - S63(p1,p3) ; - S64(p1,p3) ; - } - S68(p1) ; - S69(p1) ; - S70(p1) ; - S71(p1) ; - S72(p1) ; - S73(p1) ; - S74(p1) ; - S75(p1) ; - S76(p1) ; - S77(p1) ; - S78(p1) ; - S79(p1) ; - S80(p1) ; - S81(p1) ; - S82(p1) ; - S83(p1) ; - S84(p1) ; - S85(p1) ; - S86(p1) ; - S87(p1) ; - S88(p1) ; - S89(p1) ; - S90(p1) ; - S91(p1) ; - S92(p1) ; - S93(p1) ; - S94(p1) ; - S99(p1) ; - S100(p1) ; - S101(p1) ; - for (p3=1;p3<=Q;p3++) { - S108(p1,p3) ; - S109(p1,p3) ; - S110(p1,p3) ; - S111(p1,p3) ; - S112(p1,p3) ; - S113(p1,p3) ; - } - S120(p1) ; - S121(p1) ; - S122(p1) ; - S123(p1) ; - S124(p1) ; - S125(p1) ; - } - } -} diff --git a/cloog-0.17.0/test/test.c b/cloog-0.17.0/test/test.c deleted file mode 100644 index a3d0711ce5bced19672394bc732711091bcc454e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/test.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/test.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ -for (i=1;i<=2;i++) { - for (j=1;j<=M;j++) { - S1(i,j); - } -} -for (i=3;i<=N;i++) { - for (j=1;j<=min(M,i-1);j++) { - S1(i,j); - } - if (i >= M+1) { - S2(i,i); - } - if (i <= M) { - S1(i,i); - S2(i,i); - } - for (j=i+1;j<=M;j++) { - S1(i,j); - } -} diff --git a/cloog-0.17.0/test/test.cloog b/cloog-0.17.0/test/test.cloog deleted file mode 100644 index 78bd336fb7287c4a9cd2bded69aac248fd48470d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/test.cloog +++ /dev/null @@ -1,33 +0,0 @@ -# language: C -c - -# parameters {m, n | 4<=m<=n} -2 4 -# m n 1 -1 -1 1 0 -1 1 0 -4 -0 - -2 # Number of statements - -1 -# {i, j | 1<=i<=n 1<=j<=m} -4 6 -# i j m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 0 1 0 0 -1 -1 0 -1 1 0 0 -0 0 0 - -1 -# {i, j | i=j 3<=j<=N} -3 6 -# i j m n 1 -0 1 -1 0 0 0 -1 0 1 0 0 -3 -1 0 -1 0 1 0 -0 0 0 -0 - -0 # Scattering functions diff --git a/cloog-0.17.0/test/test.good.c b/cloog-0.17.0/test/test.good.c deleted file mode 100644 index 3a786f8517f5c7368f6ad0dfb1b6dca04c1af78b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/test.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/test.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j) { hash(2); hash(i); hash(j); } - -void test(int M, int N) -{ - /* Original iterators. */ - int i, j; - for (i=1;i<=2;i++) { - for (j=1;j<=M;j++) { - S1(i,j) ; - } - } - for (i=3;i<=M-1;i++) { - for (j=1;j<=i-1;j++) { - S1(i,j) ; - } - S1(i,i) ; - S2(i,i) ; - for (j=i+1;j<=M;j++) { - S1(i,j) ; - } - } - for (j=1;j<=M-1;j++) { - S1(M,j) ; - } - S1(M,M) ; - S2(M,M) ; - for (i=M+1;i<=N;i++) { - for (j=1;j<=M;j++) { - S1(i,j) ; - } - S2(i,i) ; - } -} diff --git a/cloog-0.17.0/test/thomasset.c b/cloog-0.17.0/test/thomasset.c deleted file mode 100644 index f201f6f8d562d8ca3ab6f650c8afd272b33e1f7a..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/thomasset.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/thomasset.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.04s. */ -if (n >= 1) { - for (c1=0;c1<=floord(n-4,3);c1++) { - for (i=3*c1+1;i<=3*c1+3;i++) { - S1(i,c1); - } - } - c1 = floord(n-1,3); - if (c1 >= ceild(n-2,3)) { - if (c1 == 0) { - S1(1,0); - for (j=1;j<=n;j++) { - S2(1,j,0,0,0); - } - } - if (c1 >= 1) { - for (j=1;j<=2;j++) { - S2(1,j,0,c1,0); - } - } - for (i=max(2,3*c1+1);i<=n;i++) { - S1(i,c1); - } - } - if (3*c1 == n-3) { - for (i=n-2;i<=n;i++) { - if (n%3 == 0) { - S1(i,(n-3)/3); - } - } - } - if (c1 >= ceild(n-2,3)) { - for (c2=1;c2<=n-1;c2++) { - for (j=1;j<=2;j++) { - S2(c2+1,j,0,c1,0); - } - } - } - for (c1=ceild(n,3);c1<=floord(2*n,3);c1++) { - for (c2=0;c2<=n-1;c2++) { - for (j=max(1,3*c1-n);j<=min(n,3*c1-n+4);j++) { - p = max(ceild(3*c1-j,3),ceild(n-2,3)); - if (p <= min(floord(n,3),floord(3*c1-j+2,3))) { - S2(c2+1,j,0,p,c1-p); - } - } - } - } -} diff --git a/cloog-0.17.0/test/thomasset.cloog b/cloog-0.17.0/test/thomasset.cloog deleted file mode 100644 index 24c30ebb3aaa6e2d9d0a79d4bfb1188801b42104..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/thomasset.cloog +++ /dev/null @@ -1,51 +0,0 @@ -# language: C -c -1 3 -1 0 0 # 0 >= 0 -1 -n - -# ------------- STATEMENTS ------------- -2 # Number of statements - -# ax:Z -1 # The domain is made of one polyhedron -4 5 # 4 lines and 5 columns -# i j n -1 -1 0 1 0 -1 1 0 0 -1 -1 1 -3 0 -1 -1 -1 3 0 3 -0 0 0 # future options - -# ax:P -1 # The domain is made of one polyhedron -10 8 # 10 lines and 8 columns -# i j k p q n -1 -1 0 0 0 0 1 0 -1 0 -1 0 0 0 1 0 -1 0 1 0 0 0 0 -1 -1 1 0 0 0 0 0 -1 -1 0 1 0 0 -3 0 0 -1 0 -1 0 0 3 0 2 -1 0 0 0 -3 0 1 0 -1 0 0 0 3 0 -1 2 -1 0 0 -3 0 0 0 1 -1 0 0 3 0 0 0 1 -0 0 0 # future options -1 # Iterator Names -i j k p q - -# ------------- SCATTERING ------------- -2 # nb scattering functions -# Scattering for ax:Z -2 7 # 2 lines and 7 columns -# c1 c2 i j n -0 1 0 0 -1 0 0 -0 0 1 0 0 0 0 -# Scattering for ax:P -2 10 # 2 lines and 10 columns -# c1 c2 i j k p q n -0 1 0 0 0 -1 -1 -1 0 0 -0 0 1 -1 0 0 0 0 0 1 -0 # Scattering Function Names diff --git a/cloog-0.17.0/test/thomasset.good.c b/cloog-0.17.0/test/thomasset.good.c deleted file mode 100644 index f9ca01649ea106588b714c46680548b54a3d24e0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/thomasset.good.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Generated from ../../../git/cloog/test/thomasset.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.10s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k,p,q) { hash(2); hash(i); hash(j); hash(k); hash(p); hash(q); } - -void test(int n) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j, k, p, q; - for (c1=0;c1<=floord(n-5,3);c1++) { - for (i=max(3*c1+1,1);i<=3*c1+3;i++) { - S1(i,c1) ; - } - } - if (n == 1) { - S1(1,0) ; - for (k=0;k<=min(0,0);k++) { - for (p=max(0,ceild(-3*k-1,3));p<=min(floord(-3*k+1,3),0);p++) { - q = -k-p ; - S2(1,1,k,p,-k-p) ; - } - } - } - if (n >= 2) { - for (c1=max(0,ceild(n-4,3));c1<=0;c1++) { - S1(1,c1) ; - for (j=1;j<=min(n,3*c1-n+5);j++) { - for (k=0;k<=floord(3*c1-j-n+4,3);k++) { - for (p=ceild(n-2,3);p<=floord(3*c1-j-3*k+2,3);p++) { - q = c1-k-p ; - S2(1,j,k,p,c1-k-p) ; - } - } - } - for (i=2;i<=min(n,3*c1+3);i++) { - S1(i,c1) ; - } - for (c2=1;c2<=n-1;c2++) { - i = c2+1 ; - for (j=1;j<=min(3*c1-n+5,n);j++) { - for (k=0;k<=floord(3*c1-j-n+4,3);k++) { - for (p=ceild(n-2,3);p<=floord(3*c1-j-3*k+2,3);p++) { - q = c1-k-p ; - S2(c2+1,j,k,p,c1-k-p) ; - } - } - } - } - } - } - for (c1=max(1,ceild(n-4,3));c1<=floord(n-1,3);c1++) { - for (j=1;j<=3*c1-n+5;j++) { - for (k=0;k<=min(floord(3*c1-j-n+4,3),0);k++) { - for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { - q = c1-k-p ; - S2(1,j,k,p,c1-k-p) ; - } - } - } - for (i=3*c1+1;i<=min(n,3*c1+3);i++) { - S1(i,c1) ; - } - for (c2=1;c2<=n-1;c2++) { - i = c2+1 ; - for (j=1;j<=3*c1-n+5;j++) { - for (k=0;k<=min(floord(3*c1-j-n+4,3),0);k++) { - for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { - q = c1-k-p ; - S2(c2+1,j,k,p,c1-k-p) ; - } - } - } - } - } - if (n >= 1) { - for (c1=ceild(n,3);c1<=floord(2*n+1,3);c1++) { - for (c2=0;c2<=n-1;c2++) { - i = c2+1 ; - for (j=max(1,3*c1-n-1);j<=min(n,3*c1-n+5);j++) { - for (k=max(ceild(3*c1-j-n,3),0);k<=min(floord(3*c1-j-n+4,3),0);k++) { - for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { - q = c1-k-p ; - S2(c2+1,j,k,p,c1-k-p) ; - } - } - } - } - } - } -} diff --git a/cloog-0.17.0/test/tiling.c b/cloog-0.17.0/test/tiling.c deleted file mode 100644 index 86f2a2e343fc0d25572e093803ec7650543bd484..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/tiling.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Generated from ../../../git/cloog/test/tiling.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ -for (ii=0;ii<=floord(n,10);ii++) { - for (i=10*ii;i<=min(n,10*ii+9);i++) { - S1(ii,i) ; - } -} diff --git a/cloog-0.17.0/test/tiling.cloog b/cloog-0.17.0/test/tiling.cloog deleted file mode 100644 index fa2b6764f849e83d72bb85f5c429b6370021a5d3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/tiling.cloog +++ /dev/null @@ -1,30 +0,0 @@ -# language: C -c - -# parameter {n | n>= 0} -1 3 -# n 1 -1 1 0 -1 -n - -1 # Number of statements: - -1 -# {ii, i | t*ii<=i<=t*ii+t-1 0<=i<=n} -4 5 -# ii i n 1 -1 0 1 0 0 -1 0 -1 1 0 -1 10 -1 0 9 -1 -10 1 0 0 -0 0 0 -1 -ii i - -0 # Scattering functions - -1 6 -# c1 ii i n 1 -0 1 -1 -2 0 0 -0 diff --git a/cloog-0.17.0/test/tiling.good.c b/cloog-0.17.0/test/tiling.good.c deleted file mode 100644 index b7362867fed2e2145942b6dd582ae1b623aecd8d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/tiling.good.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/tiling.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(ii,i) { hash(1); hash(ii); hash(i); } - -void test(int n) -{ - /* Original iterators. */ - int ii, i; - for (ii=0;ii<=floord(n,10);ii++) { - for (i=max(10*ii,0);i<=min(10*ii+9,n);i++) { - S1(ii,i) ; - } - } -} diff --git a/cloog-0.17.0/test/uday_scalars.c b/cloog-0.17.0/test/uday_scalars.c deleted file mode 100644 index 6c8564c84a4bb37ac99e59286f1776493ec01ee0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/uday_scalars.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Generated from ../../../git/cloog/test/uday_scalars.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (n >= 0) { - for (p3=0;p3<=n;p3++) { - S1(p3,0,0) ; - } - for (p3=0;p3<=n;p3++) { - S2(0,p3,0) ; - } -} diff --git a/cloog-0.17.0/test/uday_scalars.cloog b/cloog-0.17.0/test/uday_scalars.cloog deleted file mode 100644 index 8da09d441c159612a72e3503034829dd40f002ca..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/uday_scalars.cloog +++ /dev/null @@ -1,58 +0,0 @@ -# Langage: C -c - -# Context (1 parameter) -# no constraints on parameters: -1 3 - 1 0 1 -1 # Parameter name(s) -n - -# Statement number: -2 - -# Iteration domain of statement 1. -1 # 1 domain -4 6 # 4 lines and 6 columns -# j l m n cst - 1 1 0 0 0 0 # j >= 0 - 1 -1 0 0 1 0 # j <= N - 0 0 1 0 0 0 # l = 0 - 0 0 0 1 0 0 # m = 0 -0 0 0 # For future options. - -# Iteration domain of statement 2. -1 # 1 domain -4 6 # 4 lines and 6 columns -# j l m n cst - 1 0 1 0 0 0 # l >= 0 - 1 0 -1 0 1 0 # l <= N - 0 1 0 0 0 0 # j = 0 - 0 0 0 1 0 0 # m = 0 -0 0 0 # For future options. - - -1 # Iterator name(s) -j l m - -# 1 scattering functions. -2 -# First function -4 10 -# p1 p2 p3 p4 j l m n cst - 0 1 0 0 0 0 0 0 0 0 # p1 = 0 - 0 0 1 0 0 0 0 0 0 -1 # p2 = 1 - 0 0 0 1 0 -1 0 0 0 0 # p3 = j - 0 0 0 0 1 0 0 0 0 0 # p4 = 0 - -# Second function -4 10 -# p1 p2 p3 p4 j l m n cst - 0 1 0 0 0 0 0 0 0 -1 # p1 = 1 - 0 0 1 0 0 0 0 0 0 0 # p2 = 0 - 0 0 0 1 0 0 -1 0 0 0 # p3 = l - 0 0 0 0 1 0 0 0 0 -1 # p4 = 1 - -1 # set scattering dimension names manually -p1 p2 p3 p4 - diff --git a/cloog-0.17.0/test/uday_scalars.good.c b/cloog-0.17.0/test/uday_scalars.good.c deleted file mode 100644 index e4969dafb8bda6356cb3660e4779b77d3096f73e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/uday_scalars.good.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Generated from ../../../git/cloog/test/uday_scalars.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(j,l,m) { hash(1); hash(j); hash(l); hash(m); } -#define S2(j,l,m) { hash(2); hash(j); hash(l); hash(m); } - -void test(int n) -{ - /* Scattering iterators. */ - int p3; - /* Original iterators. */ - int j, l, m; - for (p3=0;p3<=n;p3++) { - S1(p3,0,0) ; - } - for (p3=0;p3<=n;p3++) { - S2(0,p3,0) ; - } -} diff --git a/cloog-0.17.0/test/union.c b/cloog-0.17.0/test/union.c deleted file mode 100644 index f65b26f01177236f870e48473a000ffad004138c..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/union.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated from ../../../git/cloog/test/union.cloog by CLooG 0.16.0-3-g7eee03c gmp bits in 0.00s. */ -if (M <= -1) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } -} -if (M >= 11) { - for (c1=-100;c1<=0;c1++) { - S1(-c1); - } -} -if ((M >= 1) && (M <= 10)) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } -} diff --git a/cloog-0.17.0/test/union.cloog b/cloog-0.17.0/test/union.cloog deleted file mode 100644 index 33e8425960caef10af5e2b9bbd6c9a9019df13e8..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/union.cloog +++ /dev/null @@ -1,33 +0,0 @@ -c - -2 -1 3 -1 1 -1 - -1 3 -1 -1 -1 - -0 - -1 - -1 -2 4 -1 1 0 0 -1 -1 0 100 - -0 0 0 - -0 - -1 -2 -2 5 -0 -1 1 0 0 -1 0 0 -1 10 - -2 5 -0 -1 -1 0 0 -1 0 0 1 -11 - -0 diff --git a/cloog-0.17.0/test/union.good.c b/cloog-0.17.0/test/union.good.c deleted file mode 100644 index 70b4537d3a31bf51165391edd86f16b863b7e3b6..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/union.good.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Generated from ../../../git/cloog/test/union.cloog by CLooG 0.14.0-277-g62f7d82 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } - -void test(int M) -{ - /* Scattering iterators. */ - int c1; - /* Original iterators. */ - int i; - if (M <= -1) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } - } - if (M >= 1) { - if (M >= 11) { - for (c1=-100;c1<=0;c1++) { - S1(-c1); - } - } - if (M <= 10) { - for (c1=0;c1<=100;c1++) { - S1(c1); - } - } - } -} diff --git a/cloog-0.17.0/test/vasilache.c b/cloog-0.17.0/test/vasilache.c deleted file mode 100644 index 5a00a3363b3a408b3f76937ec61bcb2ec98e79a1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vasilache.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Generated from ../../../git/cloog/test/vasilache.cloog by CLooG 0.14.0-162-g1e599e0 gmp bits in 0.03s. */ -S1(); -S2(); -for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - S4(p1,p3); - S5(p1,p3); - } -} -for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - for (p5=0;p5<=floord(N-1,32);p5++) { - S7(p1,p3,p5,32*p5); - for (p7=32*p5+1;p7<=min(N-1,32*p5+31);p7++) { - S6(p1,p3,p5,p7-1); - S7(p1,p3,p5,p7); - } - if (p5 <= floord(N-33,32)) { - S6(p1,p3,p5,32*p5+31); - } - if (p5 >= ceild(N-32,32)) { - S6(p1,p3,p5,N-1); - } - } - } -} -S8(); diff --git a/cloog-0.17.0/test/vasilache.cloog b/cloog-0.17.0/test/vasilache.cloog deleted file mode 100644 index 29f9598a733e6b1b8a6ae9178bcaf21b5ee38a46..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vasilache.cloog +++ /dev/null @@ -1,248 +0,0 @@ -# A SCoP from matmul (matmul.B.main.scop1.cloog) to check normalization -# -# Options: -# cloog -f 8 -l 9 vasilache.cloog -# -# Correct: -# S1; -# S2; -# for (p0=0;p0<=N-1;p0++) { -# for (p1=0;p1<=N-1;p1++) { -# S4(i = p0,j = p1); -# S5(i = p0,j = p1); -# } -# } -# for (p0=0;p0<=N-1;p0++) { -# for (p1=0;p1<=N-1;p1++) { -# for (p2=0;p2<=floord(N-1,32);p2++) { -# S7(i = p0,j = p1,k = p2,l = 32*p2); -# for (p3=32*p2+1;p3<=min(N-1,32*p2+31);p3++) { -# S6(i = p0,j = p1,k = p2,l = p3-1); -# S7(i = p0,j = p1,k = p2,l = p3); -# } -# if (p2 >= ceild(N-32,32)) { -# S6(i = p0,j = p1,k = p2,l = N-1); -# } -# if (p2 <= floord(N-33,32)) { -# S6(i = p0,j = p1,k = p2,l = 32*p2+31); -# } -# } -# } -# } -# S8; -# -# -# NOT correct: -# S1 ; -# S2 ; -# for (p1=0;p1<=N-1;p1++) { -# for (p3=0;p3<=N-1;p3++) { -# S4(i = p1,j = p3) ; -# S5(i = p1,j = p3) ; -# } -# } -# for (p1=0;p1<=N-1;p1++) { -# for (p3=0;p3<=N-1;p3++) { -# for (p5=0;p5<=floord(N-1,32);p5++) { -# if (p5 <= 0) { -# S7(i = p1,j = p3,k = p5,l = 0) ; -# } -# p7 = 32*p5 ; -# l = 32*p5 ; -# S7(i = p1,j = p3,k = p5) ; -# for (p7=max(32*p5+1,1);p7<=min(32*p5+31,N-1);p7++) { -# l = p7-1 ; -# S6(i = p1,j = p3,k = p5) ; -# S7(i = p1,j = p3,k = p5,l = p7) ; -# } -# if (p5 >= ceild(N-32,32)) { -# l = N-1 ; -# S6(i = p1,j = p3,k = p5) ; -# } -# p7 = 32*p5+32 ; -# l = 32*p5+31 ; -# S6(i = p1,j = p3,k = p5) ; -# } -# } -# } -# S8 ; - - - -c # language is C -# ---------- CONTEXT ---------- -# Context (constraints on parameters) -2 4 # 1 lines, 4 columns -1 -1 0 3 -1 0 1 -100 - - -0 # Automatically find parameter names - -# ---------- STATEMENTS ---------- -8 # Number of statements - -1 # Statement has a non resticted domain -1 4 -1 0 0 0 -0 0 0 - -1 # Statement has a non resticted domain -1 4 -1 0 0 0 -0 0 0 - -1 # Statement has 1 domain -1 4 -1 1 0 -79 -0 0 0 - -1 # Statement has 1 domain -4 6 -1 1 0 0 0 0 -1 -1 0 0 1 -1 -1 0 1 0 0 0 -1 0 -1 0 1 -1 -0 0 0 - -1 # Statement has 1 domain -4 6 -1 1 0 0 0 0 -1 -1 0 0 1 -1 -1 0 1 0 0 0 -1 0 -1 0 1 -1 -0 0 0 - -1 # Statement has 1 domain -8 8 -1 1 0 0 0 0 0 0 -1 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 0 -1 0 -1 0 0 0 1 -1 -1 0 0 0 1 0 0 0 -1 0 0 0 -1 0 1 -1 -1 0 0 -32 1 0 0 0 -1 0 0 32 -1 0 0 31 -0 0 0 - -1 # Statement has 1 domain -8 8 -1 1 0 0 0 0 0 0 -1 -1 0 0 0 0 1 -1 -1 0 1 0 0 0 0 0 -1 0 -1 0 0 0 1 -1 -1 0 0 0 1 0 0 0 -1 0 0 0 -1 0 1 -1 -1 0 0 -32 1 0 0 0 -1 0 0 32 -1 0 0 31 -0 0 0 - -1 # Statement has a non resticted domain -1 4 -1 0 0 0 -0 0 0 - -0 # Automatically find iterator names. - -# ---------- SCATTERING FUNCTIONS ---------- -8 # Number of scattering functions - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -9 15 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 4 - -9 15 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 4 - -9 17 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 -1 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 4 - -9 17 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0 -0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 # Beta 4 - -9 13 -# p0 p1 p2 p3 p4 p5 p6 p7 p8 -0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 0 -0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 -0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 -0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 -0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 -0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 -0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 -0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 -0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 - -1 # Set the scattering parameter names. -p0 p1 p2 p3 p4 p5 p6 p7 p8 - diff --git a/cloog-0.17.0/test/vasilache.good.c b/cloog-0.17.0/test/vasilache.good.c deleted file mode 100644 index f12f3faffd169e142feb6562c86357fe38ff708d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vasilache.good.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Generated from ../../../git/cloog/test/vasilache.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.15s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1() { hash(1); } -#define S2() { hash(2); } -#define S3() { hash(3); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j) { hash(5); hash(i); hash(j); } -#define S6(i,j,k,l) { hash(6); hash(i); hash(j); hash(k); hash(l); } -#define S7(i,j,k,l) { hash(7); hash(i); hash(j); hash(k); hash(l); } -#define S8() { hash(8); } - -void test(int M, int N) -{ - /* Scattering iterators. */ - int p1, p3, p5, p7; - /* Original iterators. */ - int i, j, k, l; - S1() ; - S2() ; - for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - S4(p1,p3) ; - S5(p1,p3) ; - } - } - for (p1=0;p1<=N-1;p1++) { - for (p3=0;p3<=N-1;p3++) { - for (p5=0;p5<=floord(N-1,32);p5++) { - if (p5 >= 0) { - p7 = 32*p5 ; - l = 32*p5 ; - S7(p1,p3,p5,32*p5) ; - } - if (p5 <= -1) { - S7(p1,p3,p5,0) ; - } - for (p7=max(32*p5+1,1);p7<=min(N-1,32*p5+31);p7++) { - l = p7-1 ; - S6(p1,p3,p5,p7-1) ; - S7(p1,p3,p5,p7) ; - } - if (p5 >= ceild(N-32,32)) { - l = N-1 ; - S6(p1,p3,p5,N-1) ; - } - if (p5 <= floord(N-33,32)) { - p7 = 32*p5+32 ; - l = 32*p5+31 ; - S6(p1,p3,p5,32*p5+31) ; - } - } - } - } - S8() ; -} diff --git a/cloog-0.17.0/test/vivien.c b/cloog-0.17.0/test/vivien.c deleted file mode 100644 index d364046017d62192c0571fd1554f0f7d14b70fab..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vivien.c +++ /dev/null @@ -1,195 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/vivien.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.12s. */ -if (n >= 0) { - for (p1=-54*n+4;p1<=4;p1++) { - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (n >= 1) { - S3(1); - } - if (n <= 1) { - S1(2); - } - if (n >= 2) { - S4(1,2); - S1(2); - S6(1,2); - } - for (p1=7;p1<=min(9,4*n-2);p1++) { - if (p1 == 8) { - S4(1,3); - } - if (p1 == 8) { - S1(3); - } - if (p1 == 8) { - S6(1,3); - } - if (p1 == 9) { - S3(2); - } - if ((p1+1)%2 == 0) { - S2((p1-3)/2,1); - } - } - for (p1=10;p1<=min(2*n+58,4*n-2);p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=min(-1,floord(-p1+2*n,2));p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if ((p1 >= 2*n+4) && (p1 <= 4*n-6)) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1 >= 2*n+6) { - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - } - if (p1 <= 2*n+4) { - if (p1%2 == 0) { - S6(2,(p1-4)/2); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 >= 2*n+5) { - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 <= 2*n+2) { - if (p1%2 == 0) { - S6(1,(p1-2)/2); - } - } - for (p2=max(1,ceild(p1-2*n-1,2));p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } - } - if ((n >= 2) && (n <= 29)) { - S2(n,n-1); - } - if ((n >= 2) && (n <= 29)) { - S1(2*n-1); - } - if ((n >= 2) && (n <= 28)) { - S3(n); - } - for (p1=max(7,4*n+2);p1<=2*n+58;p1++) { - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - for (p1=2*n+59;p1<=4*n-2;p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if (p1 <= 4*n-6) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } - } - if (n >= 30) { - S2(n,n-1); - } - if (n >= 29) { - S3(n); - } -} diff --git a/cloog-0.17.0/test/vivien.cloog b/cloog-0.17.0/test/vivien.cloog deleted file mode 100644 index 3db4103b185f93959faf9e449d0310bdbdf0eeb9..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vivien.cloog +++ /dev/null @@ -1,156 +0,0 @@ -# Context -c # output in language C - -# no constraints on parameters -1 3 # 1 line and 3 columns - -# n 1 -1 0 0 # 0 >= 0 always true - -1 # Setting manually the parameter' sname -n # The name - - - -# -------------------- Statements ------------------ -6 # Number of statements - - -1 # First statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 27 -1 # i >= 1 -1 -1 1 28 # n >= i -0 0 0 - -1 # Second statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i k n 1 -1 1 29 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 0 1 0 -1 # k >= 1 -1 1 -1 0 -1 # k <= i-1 -0 0 0 - - -1 # Third statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 0 -1 # i >= 1 -1 -1 1 0 # n >= i -0 0 0 - - -1 # Fourth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - -1 # Fifth statement: 1 domain - -# First domain - -6 6 # 6 lines and 6 columns -# i j k n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # n >= i -1 -1 1 0 0 -1 # j >= i+1 -1 0 -1 0 1 0 # j <= n -1 0 0 1 0 -1 # k >= 1 -1 1 0 -1 0 -1 # k <= i-1 -0 0 0 - -1 # Sixth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - - -1 # We manually set the iterator names -i j k - - -# ------------------------ Scattering ------------------- - -6 # Number of scattering functions - - -# First function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -2 0 -2 # p1 = 2i+2 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Second function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 -1 # p1 = 2i+2j+1 -0 0 1 0 0 -1 0 0 # p2 = j -0 0 0 1 0 0 0 0 # p3 = 0 - -# Third function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -4 0 -1 # p1 = 4i+1 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Fourth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 # p2 = -i -0 0 0 1 0 0 0 0 # p3 = 0 - - -# Fifth function -3 9 # 3 lines and 9 columns -# p1 p2 p3 i j k n 1 -0 1 0 0 -2 -2 0 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 -1 # p2 = -i+1 -0 0 0 1 0 0 -1 0 0 # p3 = k - -# Sixth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 -2 # p2 = -i+2 -0 0 0 1 0 0 0 0 # p3 = 0 - -1 # Manually set the scattering dimensions -p1 p2 p3 - - - - - - - - - - - diff --git a/cloog-0.17.0/test/vivien.good.c b/cloog-0.17.0/test/vivien.good.c deleted file mode 100644 index 8d2c9d388473bffbbf1f596f1d3a67fe3ccc59f4..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vivien.good.c +++ /dev/null @@ -1,831 +0,0 @@ -/* Generated from ../../../git/cloog/test/vivien.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.78s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int p1, p2, p3; - /* Original iterators. */ - int i, j, k; - for (p1=-54*n+4;p1<=min(4,4*n+1);p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - if (n >= 1) { - S3(1) ; - } - if (n >= 2) { - S4(1,2) ; - S1(2) ; - S6(1,2) ; - } - for (p1=max(-54*n+4,4*n+2);p1<=6;p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - for (p1=7;p1<=min(min(2*n+2,9),floord(4*n+12,3));p1++) { - for (p2=ceild(-p1+2,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - } - for (p1=2*n+3;p1<=min(9,4*n-2);p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if (n >= 4) { - S4(2,3) ; - S4(1,4) ; - S5(2,3,1) ; - S6(2,3) ; - S1(4) ; - S6(1,4) ; - } - if (n == 3) { - S4(2,3) ; - S5(2,3,1) ; - S6(2,3) ; - S1(4) ; - } - for (p1=11;p1<=min(12,2*n+2);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if (n == 4) { - S2(4,1) ; - S2(3,2) ; - } - if (n == 5) { - S3(3) ; - S2(5,1) ; - S2(4,2) ; - } - if (n >= 6) { - S3(3) ; - S2(5,1) ; - S2(4,2) ; - } - if ((n <= 4) && (n >= 4)) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=-1;p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - for (p1=14;p1<=2*n+2;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if ((n <= 4) && (n >= 4)) { - S3(3) ; - for (p2=-n+6;p2<=2;p2++) { - i = -p2+6 ; - S2(-p2+6,p2) ; - } - } - if (n >= 7) { - p1 = 2*n+3 ; - if ((n+1)%2 == 0) { - i = (n+1)/2 ; - S3((n+1)/2) ; - } - S2(n,1) ; - for (p2=2;p2<=floord(n,2);p2++) { - i = -p2+n+1 ; - S2(-p2+n+1,p2) ; - } - } - if ((n <= 6) && (n >= 6)) { - p1 = 2*n+3 ; - if ((n+1)%2 == 0) { - i = (n+1)/2 ; - S3((n+1)/2) ; - } - S2(n,1) ; - for (p2=2;p2<=floord(n,2);p2++) { - i = -p2+n+1 ; - S2(-p2+n+1,p2) ; - } - } - if (n >= 7) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=ceild(-n+3,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - i = -p2+2 ; - j = p2+n ; - S6(-p2+2,p2+n) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - j = n-1 ; - S6(3,n-1) ; - S5(2,n,1) ; - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - if ((n <= 5) && (n >= 5)) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=-1;p2<=floord(-2*n+5,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=ceild(-n+3,2);p2<=-1;p2++) { - i = -p2+2 ; - j = p2+n ; - S6(-p2+2,p2+n) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - if ((n <= 6) && (n >= 6)) { - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - j = n-1 ; - S6(3,n-1) ; - S5(2,n,1) ; - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - } - for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-9,2*n+5);p1<=min(4*n-8,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-7,2*n+5);p1<=min(4*n-6,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(max(4*n-5,14),2*n+5);p1<=min(4*n-2,2*n+58);p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - if ((n >= 2) && (n <= 29)) { - p1 = 4*n-1 ; - p2 = n-1 ; - j = n-1 ; - S2(n,n-1) ; - } - for (p1=2*n+59;p1<=4*n-10;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n,7);p1<=min(4*n+1,2*n+58);p1++) { - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - if (n >= 30) { - p1 = 4*n-1 ; - p2 = n-1 ; - j = n-1 ; - S2(n,n-1) ; - } - for (p1=max(max(-54*n+4,4*n+2),7);p1<=2*n+58;p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - for (p1=max(4*n,2*n+59);p1<=4*n+1;p1++) { - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - } -} diff --git a/cloog-0.17.0/test/vivien2.c b/cloog-0.17.0/test/vivien2.c deleted file mode 100644 index d4f1f0442c28efdf3015b91dbe786bf6e13d627f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vivien2.c +++ /dev/null @@ -1,168 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/vivien2.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.10s. */ -for (p1=-54*n+4;p1<=4;p1++) { - if (p1%2 == 0) { - S1((p1-2)/2); - } -} -S3(1); -S4(1,2); -S1(2); -S6(1,2); -for (p1=7;p1<=9;p1++) { - if (p1 == 8) { - S4(1,3); - } - if (p1 == 8) { - S1(3); - } - if (p1 == 8) { - S6(1,3); - } - if (p1 == 9) { - S3(2); - } - if ((p1+1)%2 == 0) { - S2((p1-3)/2,1); - } -} -for (p1=10;p1<=2*n+58;p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=min(-1,floord(-p1+2*n,2));p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if ((p1 >= 2*n+4) && (p1 <= 4*n-6)) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1 >= 2*n+6) { - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - } - if (p1 <= 2*n+4) { - if (p1%2 == 0) { - S6(2,(p1-4)/2); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 >= 2*n+5) { - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - if (p1%2 == 0) { - S1((p1-2)/2); - } - } - if (p1 <= 2*n+2) { - if (p1%2 == 0) { - S6(1,(p1-2)/2); - } - } - for (p2=max(1,ceild(p1-2*n-1,2));p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } -} -for (p1=2*n+59;p1<=4*n-2;p1++) { - p2 = ceild(-p1+2,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - } - if (p1 >= 4*n-4) { - if (p1%2 == 0) { - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - p2 = ceild(-p1+6,4); - if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - S4(-p2,(p1+2*p2)/2); - } - if (p1%2 == 0) { - S6(-p2+2,(p1+2*p2-4)/2); - } - for (p3=1;p3<=-p2;p3++) { - if (p1%2 == 0) { - S5(-p2+1,(p1+2*p2-2)/2,p3); - } - } - } - if (p1 <= 4*n-6) { - if (p1%2 == 0) { - S6((p1-2*n+2)/2,n-1); - for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { - S5((p1-2*n)/2,n,p3); - } - } - } - if (p1%2 == 0) { - S6((p1-2*n)/2,n); - } - if ((p1+3)%4 == 0) { - S3((p1-1)/4); - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - S2((p1-2*p2-1)/2,p2); - } - } -} -S2(n,n-1); -S3(n); diff --git a/cloog-0.17.0/test/vivien2.cloog b/cloog-0.17.0/test/vivien2.cloog deleted file mode 100644 index 42e7fb7b971b40c8cfae8faa487e9659796ca39b..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vivien2.cloog +++ /dev/null @@ -1,156 +0,0 @@ -# Context -c # output in language C - -# no constraints on parameters -1 3 # 1 line and 3 columns - -# n 1 -1 1 -30 # 0 >= 0 always true - -1 # Setting manually the parameter' sname -n # The name - - - -# -------------------- Statements ------------------ -6 # Number of statements - - -1 # First statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 27 -1 # i >= 1 -1 -1 1 28 # n >= i -0 0 0 - -1 # Second statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i k n 1 -1 1 29 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 0 1 0 -1 # k >= 1 -1 1 -1 0 -1 # k <= i-1 -0 0 0 - - -1 # Third statement: 1 domain - -# First domain - -2 4 # 2 lines and 4 columns -# i n 1 -1 1 0 -1 # i >= 1 -1 -1 1 0 # n >= i -0 0 0 - - -1 # Fourth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - -1 # Fifth statement: 1 domain - -# First domain - -6 6 # 6 lines and 6 columns -# i j k n 1 -1 1 0 0 0 -1 # i >= 1 -1 -1 0 0 1 0 # n >= i -1 -1 1 0 0 -1 # j >= i+1 -1 0 -1 0 1 0 # j <= n -1 0 0 1 0 -1 # k >= 1 -1 1 0 -1 0 -1 # k <= i-1 -0 0 0 - -1 # Sixth statement: 1 domain - -# First domain - -4 5 # 4 lines and 5 columns -# i j n 1 -1 1 0 0 -1 # i >= 1 -1 -1 0 1 0 # n >= i -1 -1 1 0 -1 # j >= i+1 -1 0 -1 1 0 # j <= n -0 0 0 - - -1 # We manually set the iterator names -i j k - - -# ------------------------ Scattering ------------------- - -6 # Number of scattering functions - - -# First function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -2 0 -2 # p1 = 2i+2 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Second function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 -1 # p1 = 2i+2j+1 -0 0 1 0 0 -1 0 0 # p2 = j -0 0 0 1 0 0 0 0 # p3 = 0 - -# Third function -3 7 # 3 lines and 7 columns -# p1 p2 p3 i n 1 -0 1 0 0 -4 0 -1 # p1 = 4i+1 -0 0 1 0 0 0 0 # p2 = 0 -0 0 0 1 0 0 0 # p3 = 0 - -# Fourth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 # p2 = -i -0 0 0 1 0 0 0 0 # p3 = 0 - - -# Fifth function -3 9 # 3 lines and 9 columns -# p1 p2 p3 i j k n 1 -0 1 0 0 -2 -2 0 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 0 -1 # p2 = -i+1 -0 0 0 1 0 0 -1 0 0 # p3 = k - -# Sixth function -3 8 # 3 lines and 8 columns -# p1 p2 p3 i j n 1 -0 1 0 0 -2 -2 0 0 # p1 = 2i+2j -0 0 1 0 1 0 0 -2 # p2 = -i+2 -0 0 0 1 0 0 0 0 # p3 = 0 - -1 # Manually set the scattering dimensions -p1 p2 p3 - - - - - - - - - - - diff --git a/cloog-0.17.0/test/vivien2.good.c b/cloog-0.17.0/test/vivien2.good.c deleted file mode 100644 index 32f1fff503a063098e69c7c23ff343228189626e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/vivien2.good.c +++ /dev/null @@ -1,656 +0,0 @@ -/* Generated from ../../../git/cloog/test/vivien2.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.58s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i) { hash(1); hash(i); } -#define S2(i,j) { hash(2); hash(i); hash(j); } -#define S3(i) { hash(3); hash(i); } -#define S4(i,j) { hash(4); hash(i); hash(j); } -#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } -#define S6(i,j) { hash(6); hash(i); hash(j); } - -void test(int n) -{ - /* Scattering iterators. */ - int p1, p2, p3; - /* Original iterators. */ - int i, j, k; - for (p1=-54*n+4;p1<=4;p1++) { - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - } - S3(1) ; - S4(1,2) ; - S1(2) ; - S6(1,2) ; - for (p1=7;p1<=9;p1++) { - for (p2=ceild(-p1+2,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - } - S4(2,3) ; - S4(1,4) ; - S5(2,3,1) ; - S6(2,3) ; - S1(4) ; - S6(1,4) ; - for (p1=11;p1<=12;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - S3(3) ; - S2(5,1) ; - S2(4,2) ; - for (p1=14;p1<=2*n+2;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=-1;p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - if (p1%2 == 0) { - j = (p1-4)/2 ; - S6(2,(p1-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - if (p1%2 == 0) { - j = (p1-2)/2 ; - S6(1,(p1-2)/2) ; - } - if ((p1+1)%2 == 0) { - i = (p1-3)/2 ; - S2((p1-3)/2,1) ; - } - for (p2=2;p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - p1 = 2*n+3 ; - if ((n+1)%2 == 0) { - i = (n+1)/2 ; - S3((n+1)/2) ; - } - S2(n,1) ; - for (p2=2;p2<=floord(n,2);p2++) { - i = -p2+n+1 ; - S2(-p2+n+1,p2) ; - } - p1 = 2*n+4 ; - for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - } - for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - for (p2=ceild(-n+3,2);p2<=-2;p2++) { - j = p2+n+2 ; - S4(-p2,p2+n+2) ; - i = -p2+2 ; - j = p2+n ; - S6(-p2+2,p2+n) ; - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - j = p2+n+1 ; - S5(-p2+1,p2+n+1,p3) ; - } - } - j = n-1 ; - S6(3,n-1) ; - S5(2,n,1) ; - S6(2,n) ; - i = n+1 ; - S1(n+1) ; - for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=4*n-9;p1<=min(4*n-8,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=4*n-7;p1<=min(4*n-6,2*n+58);p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=4*n-5;p1<=2*n+58;p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+2*n+3,2),ceild(-p1+10,4));p2<=floord(-p1+2*n+4,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - if (p1%2 == 0) { - i = (p1-2)/2 ; - S1((p1-2)/2) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=2*n+59;p1<=4*n-10;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - p2 = floord(-p1+9,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+2,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) { - p2 = floord(-p1+5,4) ; - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - p2 = floord(-p1+2*n+4,2) ; - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) { - for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { - if (p1%2 == 0) { - j = (p1+2*p2)/2 ; - S4(-p2,(p1+2*p2)/2) ; - } - } - for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { - for (p3=1;p3<=-p2;p3++) { - i = -p2+1 ; - if (p1%2 == 0) { - j = (p1+2*p2-2)/2 ; - S5(-p2+1,(p1+2*p2-2)/2,p3) ; - } - } - } - for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) { - i = -p2+2 ; - if (p1%2 == 0) { - j = (p1+2*p2-4)/2 ; - S6(-p2+2,(p1+2*p2-4)/2) ; - } - } - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { - if ((p1+1)%2 == 0) { - i = (p1-2*p2-1)/2 ; - S2((p1-2*p2-1)/2,p2) ; - } - } - } - p1 = 4*n-1 ; - p2 = n-1 ; - j = n-1 ; - S2(n,n-1) ; - for (p1=4*n;p1<=4*n+1;p1++) { - if ((p1+3)%4 == 0) { - i = (p1-1)/4 ; - S3((p1-1)/4) ; - } - } -} diff --git a/cloog-0.17.0/test/walters.c b/cloog-0.17.0/test/walters.c deleted file mode 100644 index fdb218347f7e6784053df27b14708fa45b8c9014..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters.cloog by CLooG 0.16.1-3-g354eed5 gmp bits in 0.01s. */ -S2(1,0,1,0); -S4(1,0,1,0); -S3(2,0,1,1); -S4(2,0,1,1); -for (i=3;i<=10;i++) { - if ((i+1)%3 == 0) { - S3(i,(i-2)/3,(i+1)/3,(i+1)/3); - } - if ((i+2)%3 == 0) { - S2(i,(i-1)/3,(i+2)/3,(i-1)/3); - } - if (i%3 == 0) { - S1(i,i/3,i/3,i/3); - } - div36 = floord(i,3); - div37 = ceild(2*i-3*div36-1,3); - if (div37 <= floord(i+2,3)) { - S4(i,div36,div37,i-div36-div37); - } -} diff --git a/cloog-0.17.0/test/walters.cloog b/cloog-0.17.0/test/walters.cloog deleted file mode 100644 index 9a3ba81926bb13a80c33ded5a3eb12abd1b25f7f..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters.cloog +++ /dev/null @@ -1,189 +0,0 @@ -# language: C - -c - - - -# parameters - -1 2 - -1 1 - - 1 - - - -4 - - - -# S1: sub1 - -1 - -18 6 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 -1 3 0 0 2 - - 1 1 -3 0 0 0 - - 1 0 1 0 0 -1 - - 1 -1 3 0 0 0 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - -# S2: sub2 - -1 - -17 6 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 -1 0 3 0 0 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 -2 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - -# S3: sub3 - -1 - -18 6 - - 1 -1 0 0 0 10 - - 1 1 0 0 0 -1 - - 1 -1 0 0 3 1 - - 1 1 0 0 -3 1 - - 1 0 0 0 1 -1 - - 1 -1 0 0 3 -1 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - -# S4: enclosing - -1 - -8 6 - - 1 1 0 0 0 -1 - - 1 -1 0 0 0 10 - - 1 1 -3 0 0 0 - - 1 -1 3 0 0 2 - - 1 1 0 -3 0 2 - - 1 -1 0 3 0 0 - - 1 1 0 0 -3 1 - - 1 -1 0 0 3 1 - - 0 0 0 - - - - 1 - - i div36 div37 div38 - - 0 - - 0 diff --git a/cloog-0.17.0/test/walters.good.c b/cloog-0.17.0/test/walters.good.c deleted file mode 100644 index 0e1c2b7f4180f9f325c97268447e84b5b0ab7b9d..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters.good.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/walters.cloog by CLooG 0.14.0-223-gad1f0a0 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,div36,div37,div38) { hash(1); hash(i); hash(div36); hash(div37); hash(div38); } -#define S2(i,div36,div37,div38) { hash(2); hash(i); hash(div36); hash(div37); hash(div38); } -#define S3(i,div36,div37,div38) { hash(3); hash(i); hash(div36); hash(div37); hash(div38); } -#define S4(i,div36,div37,div38) { hash(4); hash(i); hash(div36); hash(div37); hash(div38); } - -void test() -{ - /* Original iterators. */ - int i, div36, div37, div38; - S2(1,0,1,0); - S4(1,0,1,0); - S3(2,0,1,1); - S4(2,0,1,1); - for (i=3;i<=10;i++) { - if ((i+2)%3 <= 1) { - div36 = floord(i-1,3); - if ((i+1)%3 <= 1) { - div37 = floord(i+1,3); - if ((i+1)%3 == 0) { - S3(i,div36,div37,(i+1)/3); - S4(i,div36,div37,(i+1)/3); - } - } - if ((i+2)%3 == 0) { - div38 = floord(i+1,3); - S2(i,div36,(i+2)/3,div38); - S4(i,div36,(i+2)/3,div38); - } - } - if (i%3 == 0) { - div37 = floord(i+2,3); - div38 = floord(i+1,3); - S1(i,i/3,div37,div38); - S4(i,i/3,div37,div38); - } - } -} diff --git a/cloog-0.17.0/test/walters2.c b/cloog-0.17.0/test/walters2.c deleted file mode 100644 index bc31d9ec7d8176f12bd75b6fa735ebe54a733ec0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters2.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters2.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.01s. */ -for (i=0;i<=51;i++) { - S2(0,i); -} -for (j=1;j<=24;j++) { - S2(j,0); - for (i=1;i<=50;i++) { - S1(j,i); - } - S2(j,51); -} -for (i=0;i<=51;i++) { - S2(25,i); -} diff --git a/cloog-0.17.0/test/walters2.cloog b/cloog-0.17.0/test/walters2.cloog deleted file mode 100644 index efdf2f6da123412014a8c111fc2955c2cbcd3ebb..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters2.cloog +++ /dev/null @@ -1,90 +0,0 @@ -# language: C -c - -# parameters -1 2 -1 1 - 1 - -2 - - -# S1 -1 -12 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 1 -1 - 1 -1 0 24 - 1 0 -1 50 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 0 0 0 - - - - - - -# S2 -4 -11 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 1 -1 - 1 1 0 -25 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 -12 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 1 -1 - 1 -1 0 24 - 1 0 1 -51 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 -10 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 1 0 -1 - 1 0 -1 0 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 -9 4 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 1 -1 0 0 - 1 1 0 0 - 1 -1 0 25 - 1 0 1 0 - 1 0 -1 51 - 0 0 0 - - - - 1 - j i - 0 - 0 - diff --git a/cloog-0.17.0/test/walters2.good.c b/cloog-0.17.0/test/walters2.good.c deleted file mode 100644 index 2b8990f5686c2ad912230628f65a7ae7c92a706e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters2.good.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Generated from /home/skimo/git/cloog/test/walters2.cloog by CLooG 0.14.0-227-g08f253a gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(j,i) { hash(1); hash(j); hash(i); } -#define S2(j,i) { hash(2); hash(j); hash(i); } - -void test() -{ - /* Original iterators. */ - int j, i; - for (i=0;i<=51;i++) { - S2(0,i); - } - for (j=1;j<=24;j++) { - S2(j,0); - for (i=1;i<=50;i++) { - S1(j,i); - } - S2(j,51); - } - for (i=0;i<=51;i++) { - if (i >= 0) { - S2(25,i); - } - } -} diff --git a/cloog-0.17.0/test/walters3.c b/cloog-0.17.0/test/walters3.c deleted file mode 100644 index fc922d69505785bb733c08f6494325dfaae9ea6e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters3.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters3.cloog by CLooG 0.14.0-338-g99c7504 gmp bits in 0.00s. */ -for (j=2;j<=8;j++) { - if (j%2 == 0) { - S1(j,j/2,j/2); - S2(j,j/2,j/2); - } -} -S2(10,5,5); diff --git a/cloog-0.17.0/test/walters3.cloog b/cloog-0.17.0/test/walters3.cloog deleted file mode 100644 index fb45ab0db628ccb29cbae77f05125fee9f16c147..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters3.cloog +++ /dev/null @@ -1,49 +0,0 @@ -# language: C -c - -# parameters -1 2 -1 1 - 1 - - -2 - -1 -15 5 - 1 -1 0 0 10 - 1 -1 0 0 8 - 1 -1 0 2 1 - 1 1 0 -2 0 - 1 -1 0 2 0 - 1 0 0 1 -1 - 1 1 -2 0 0 - 1 -1 2 0 1 - 1 1 0 0 -1 - 1 -1 0 0 10 - 0 1 -2 0 0 - 1 1 -2 0 0 - 1 -1 2 0 1 - 1 1 0 -2 0 - 1 -1 0 2 1 - 0 0 0 - - - -1 -7 5 - 1 1 0 0 -1 - 1 -1 0 0 10 - 0 1 -2 0 0 - 1 1 -2 0 0 - 1 -1 2 0 1 - 1 1 0 -2 0 - 1 -1 0 2 1 - 0 0 0 - - - 1 - j a b - #-------- SCATTERING ------------- - 0 # no scattering function - diff --git a/cloog-0.17.0/test/walters3.good.c b/cloog-0.17.0/test/walters3.good.c deleted file mode 100644 index 45a1b3338d46637705622a7ea730fa12f16845c1..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/walters3.good.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Generated from ../../../git/cloog/test/walters3.cloog by CLooG 0.14.0-338-g99c7504 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(j,a,b) { hash(1); hash(j); hash(a); hash(b); } -#define S2(j,a,b) { hash(2); hash(j); hash(a); hash(b); } - -void test() -{ - /* Original iterators. */ - int j, a, b; - for (j=2;j<=8;j++) { - if (j%2 == 0) { - S1(j,j/2,j/2); - S2(j,j/2,j/2); - } - } - S2(10,5,5); -} diff --git a/cloog-0.17.0/test/wavefront.c b/cloog-0.17.0/test/wavefront.c deleted file mode 100644 index c6d28685dde6eeb9eb855e2e58c1b08c0e898364..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/wavefront.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Generated from ../../../git/cloog/test/wavefront.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if ((m >= 1) && (n >= 1)) { - for (c1=2;c1<=n+m;c1++) { - for (c2=max(1,c1-m);c2<=min(n,c1-1);c2++) { - S1(c2,c1-c2) ; - } - } -} diff --git a/cloog-0.17.0/test/wavefront.cloog b/cloog-0.17.0/test/wavefront.cloog deleted file mode 100644 index 845b368902cc1bfb8514123178c77ca0cfb81270..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/wavefront.cloog +++ /dev/null @@ -1,27 +0,0 @@ -c - -1 4 -# n m 1 -1 0 0 1 -1 -n m - -1 - -1 -4 6 -# i j n m 1 -1 1 0 0 0 -1 -1 -1 0 1 0 0 -1 0 1 0 0 -1 -1 0 -1 0 1 0 -0 0 0 - -0 - -1 -2 8 -# c1 c2 i j n m 1 -0 1 0 -1 -1 0 0 0 -0 0 1 -1 0 0 0 0 -0 diff --git a/cloog-0.17.0/test/wavefront.good.c b/cloog-0.17.0/test/wavefront.good.c deleted file mode 100644 index c6e721fb75ec8499caeedac30837887eb12ea995..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/wavefront.good.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Generated from ../../../git/cloog/test/wavefront.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } - -void test(int n, int m) -{ - /* Scattering iterators. */ - int c1, c2; - /* Original iterators. */ - int i, j; - if ((n >= 1) && (m >= 1)) { - for (c1=2;c1<=n+m;c1++) { - for (c2=max(1,c1-m);c2<=min(n,c1-1);c2++) { - j = c1-c2 ; - S1(c2,c1-c2) ; - } - } - } -} diff --git a/cloog-0.17.0/test/yosr.c b/cloog-0.17.0/test/yosr.c deleted file mode 100644 index 341c7871634566c8bc2f0292fed25da778fbb857..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosr.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ -if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j) ; - } - for (proc=2;proc<=n-1;proc++) { - for (i=1;i<=proc-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,proc) ; - } - } - for (j=proc+1;j<=n;j++) { - S1(proc,j) ; - } - } - for (i=1;i<=n-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,n) ; - } - } -} diff --git a/cloog-0.17.0/test/yosr.cloog b/cloog-0.17.0/test/yosr.cloog deleted file mode 100644 index cefa03569a7de1bd4843cf2ed698ada2510fdf98..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosr.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# language: C -c - -# One parameter : n -1 3 -# n 1 -1 0 1 -# We want to set the parameter names... -1 -# and 'n' is the name of the unique parameter -n - -2 # Number of statements: 2. - -1 -# {i, j | 1<=i<=n-1; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 -1 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n-1; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 -1 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -# We want to let CLooG set the iterator names. -0 - -2 -# Scattering functions -1 6 -# c1 i j n 1 -0 1 -1 0 0 0 - -1 7 -# c1 i j k n 1 -0 1 0 0 -1 0 0 -1 -proc - -2 -# Scattering functions -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 -0 0 0 1 0 0 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 -0 0 0 1 0 0 -1 0 0 -0 - diff --git a/cloog-0.17.0/test/yosr.good.c b/cloog-0.17.0/test/yosr.good.c deleted file mode 100644 index 8845a2c5c9aa17e888131aef4eaa2da93407340e..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosr.good.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } - -void test(int n) -{ - /* Scattering iterators. */ - int proc; - /* Original iterators. */ - int i, j, k; - if (n >= 2) { - for (j=2;j<=n;j++) { - S1(1,j) ; - } - } - for (proc=2;proc<=n-1;proc++) { - for (i=1;i<=proc-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,proc) ; - } - } - for (j=proc+1;j<=n;j++) { - S1(proc,j) ; - } - } - if (n >= 2) { - for (i=1;i<=n-1;i++) { - for (j=i+1;j<=n;j++) { - S2(i,j,n) ; - } - } - } -} diff --git a/cloog-0.17.0/test/yosr2.c b/cloog-0.17.0/test/yosr2.c deleted file mode 100644 index 999eb41265afafecdf4aa56fccadda6701c69fc3..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosr2.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ -for (i=1;i<=M;i++) { - S2(i) ; -} -for (proc=2;proc<=M-1;proc++) { - for (i=1;i<=proc-1;i++) { - S4(i,proc) ; - } - for (j=1;j<=proc-1;j++) { - S1(proc,j) ; - } - for (j=proc+1;j<=M;j++) { - for (k=1;k<=proc-1;k++) { - S3(proc,j,k) ; - } - } -} -for (i=1;i<=M-1;i++) { - S4(i,M) ; -} -for (j=1;j<=M-1;j++) { - S1(M,j) ; -} diff --git a/cloog-0.17.0/test/yosr2.cloog b/cloog-0.17.0/test/yosr2.cloog deleted file mode 100644 index e9dea4a2bf2599684a067e78206fdff4048f92c0..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosr2.cloog +++ /dev/null @@ -1,71 +0,0 @@ -# language: C -c - -# parameter n -1 3 -# n 1 -1 1 -2 -0 - -4 # Number of statements - -1 -# S2 {k, l | 1<=k<=n; 1<=l<=k-1} -4 5 -# k l n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 0 1 0 -1 -1 1 -1 0 -1 -0 0 0 - -1 -# S3 {k | 1<=k<=n} -2 4 -# k n 1 -1 1 0 -1 -1 -1 1 0 -0 0 0 - -1 -# S5 {k, i, m | 1<=k<=n; k+1<=i<=n 1<=m<=k-1} -6 6 -# k i m n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 0 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 0 0 1 0 -1 -1 1 0 -1 0 -1 -0 0 0 - -1 -# S4 {k, i | 1<=k<=n; k+1<=i<=n} -4 5 -# k i n 1 -1 1 0 0 -1 -1 -1 0 1 0 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 -0 - - -4 # Scattering functions -1 6 -# c1 k l n 1 -0 1 -1 0 0 0 - -1 5 -# c1 k n 1 -0 1 0 0 0 - -1 7 -# c1 k i m n 1 -0 1 -1 0 0 0 0 - -1 6 -# c1 k i n 1 -0 1 0 -1 0 0 -1 -proc diff --git a/cloog-0.17.0/test/yosr2.good.c b/cloog-0.17.0/test/yosr2.good.c deleted file mode 100644 index 7608db8a842607139cba0f411130f7672d03e3a5..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosr2.good.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generated from ../../../git/cloog/test/yosr2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ -extern void hash(int); - -/* Useful macros. */ -#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) -#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) -#define max(x,y) ((x) > (y) ? (x) : (y)) -#define min(x,y) ((x) < (y) ? (x) : (y)) - -#define S1(i,j) { hash(1); hash(i); hash(j); } -#define S2(i) { hash(2); hash(i); } -#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } -#define S4(i,j) { hash(4); hash(i); hash(j); } - -void test(int M) -{ - /* Scattering iterators. */ - int proc; - /* Original iterators. */ - int i, j, k; - for (i=1;i<=M;i++) { - S2(i) ; - } - for (proc=2;proc<=M-1;proc++) { - for (i=1;i<=proc-1;i++) { - S4(i,proc) ; - } - for (j=1;j<=proc-1;j++) { - S1(proc,j) ; - } - for (j=proc+1;j<=M;j++) { - for (k=1;k<=proc-1;k++) { - S3(proc,j,k) ; - } - } - } - for (i=1;i<=M-1;i++) { - S4(i,M) ; - } - for (j=1;j<=M-1;j++) { - S1(M,j) ; - } -} diff --git a/cloog-0.17.0/test/yosrf.cloog b/cloog-0.17.0/test/yosrf.cloog deleted file mode 100644 index 1661ef71931df295267aa754882eb4e1fa9eee02..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosrf.cloog +++ /dev/null @@ -1,65 +0,0 @@ -# language: FORTRAN -f - -# One parameter : n -1 3 -# n 1 -1 0 1 -# We want to set the parameter names... -1 -# and 'n' is the name of the unique parameter -n - -2 # Number of statements: 2. - -1 -# {i, j | 1<=i<=n-1; i+1<=j<=n} -4 5 -# i j n 1 -1 1 0 0 -1 -1 -1 0 1 -1 -1 -1 1 0 -1 -1 0 -1 1 0 -0 0 0 - -1 -# {i, j, k | 1<=i<=n-1; i+1<=j<=n i+1<=k<=n} -6 6 -# i j k n 1 -1 1 0 0 0 -1 -1 -1 0 0 1 -1 -1 -1 1 0 0 -1 -1 0 -1 0 1 0 -1 -1 0 1 0 -1 -1 0 0 -1 1 0 -0 0 0 -# We want to let CLooG set the iterator names. -0 - -2 -# Scattering functions -1 6 -# c1 i j n 1 -0 1 -1 0 0 0 - -1 7 -# c1 i j k n 1 -0 1 0 0 -1 0 0 -1 -proc - -2 -# Scattering functions -3 8 -# c1 c2 c3 i j n 1 -0 1 0 0 -1 0 0 0 -0 0 1 0 0 0 0 0 -0 0 0 1 0 0 0 0 - -3 9 -# c1 c2 c3 i j k n 1 -0 1 0 0 0 0 -1 0 0 -0 0 1 0 0 0 0 0 -1 -0 0 0 1 0 0 -1 0 0 -0 - diff --git a/cloog-0.17.0/test/yosrf.f b/cloog-0.17.0/test/yosrf.f deleted file mode 100644 index 2d8efad9ecd79c786f972442bb990ae34893d261..0000000000000000000000000000000000000000 --- a/cloog-0.17.0/test/yosrf.f +++ /dev/null @@ -1,21 +0,0 @@ -! Generated from ../../../git/cloog/test/yosrf.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. -IF (n >= 2) THEN - DO j=2, n - S1(1,j) - END DO - DO proc=2, n-1 - DO i=1, proc-1 - DO j=i+1, n - S2(i,j,proc) - END DO - END DO - DO j=proc+1, n - S1(proc,j) - END DO - END DO - DO i=1, n-1 - DO j=i+1, n - S2(i,j,n) - END DO - END DO -END IF